diff options
author | Scott Wegner <swegner@hdfgroup.org> | 2008-09-17 14:04:35 (GMT) |
---|---|---|
committer | Scott Wegner <swegner@hdfgroup.org> | 2008-09-17 14:04:35 (GMT) |
commit | 036aa878b0c167e4c39a290a75b5dc241ac4f218 (patch) | |
tree | 1d1cc1def6d68befff2515ae2f7a59d540fd3093 /configure.in | |
parent | 95149cc0957dd05585388c8d8532d84269bf0075 (diff) | |
download | hdf5-036aa878b0c167e4c39a290a75b5dc241ac4f218.zip hdf5-036aa878b0c167e4c39a290a75b5dc241ac4f218.tar.gz hdf5-036aa878b0c167e4c39a290a75b5dc241ac4f218.tar.bz2 |
[svn-r15639] Purpose: Check for __func__ keyword during configure
Description:
In some of the new H5EA* code, many new C99 features are being used. Most of them are portable to all compilers, but the __func__ keyword in particular isn't supported in Visual Studio on Windows. Instead, Windows defines the __FUNCTION__ keyword, which can be used as a direct substitute.
We now check for the __func__ keyword during configure and define the feature flag H5_HAVE_C99_FUNC. There was previously a check for __FUNCTION__, and the feature flags H5_HAVE_FUNCTION. In H5EApkg.h, we check for the presents of each of these in order to see which to use. If neither are avaiable, fail.
Tested:
h5committest (kagiso, smirom, linew)
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.in b/configure.in index fe49b4e..6e2a4e1 100644 --- a/configure.in +++ b/configure.in @@ -2062,8 +2062,14 @@ AC_TRY_COMPILE(,[int __attribute__((unused)) x], AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) +AC_MSG_CHECKING([for __func__ extension]) +AC_TRY_COMPILE(,[ const char *fname = __func__; ], + AC_DEFINE([HAVE_C99_FUNC], [1], + [Define if the compiler understand the __func__ keyword]) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no])) AC_MSG_CHECKING([for __FUNCTION__ extension]) -AC_TRY_COMPILE(,[(void)__FUNCTION__], +AC_TRY_COMPILE(,[ const char *fname = __FUNCTION__; ], AC_DEFINE([HAVE_FUNCTION], [1], [Define if the compiler understand the __FUNCTION__ keyword]) AC_MSG_RESULT([yes]), |