diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-06-24 18:53:43 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-06-24 18:53:43 (GMT) |
commit | e030fe2751803461fedc8fe223da57986fa2c36a (patch) | |
tree | 1a1fb11ed6ff093244e34c1bd37701bfd959d097 /configure.ac | |
parent | a07297e90dc701d64b19b05a368aba765995d772 (diff) | |
download | hdf5-e030fe2751803461fedc8fe223da57986fa2c36a.zip hdf5-e030fe2751803461fedc8fe223da57986fa2c36a.tar.gz hdf5-e030fe2751803461fedc8fe223da57986fa2c36a.tar.bz2 |
[svn-r27278] Merge of 27270 from trunk. Fixes HDFFV-9119 and HDFFV-9421.
Changes that allow the autotools to correctly deal with inline
functions.
- Inline markup schemes are now checked with AC_COMPILE_IFELSE
tests instead of AC_C_INLINE.
- The inline designator is now H5_INLINE instead of H5_inline.
This is now set in H5private.h instead of H5pubconf.h.
Tested on: h5committest
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 5ed40c4..18628b4 100644 --- a/configure.ac +++ b/configure.ac @@ -1691,7 +1691,27 @@ AC_CHECK_FUNCS([tmpfile asprintf vasprintf vsnprintf waitpid]) ## Check compiler characteristics ## AC_C_CONST -AC_C_INLINE + +AC_MSG_CHECKING([if the compiler understands __inline__]) +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[static __inline__ void f(void){return;};]])], + [AC_DEFINE([HAVE___INLINE__], [1], [Define if the compiler understands __inline__]) AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] +) + +AC_MSG_CHECKING([if the compiler understands __inline]) +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[static __inline void f(void){return;};]])], + [AC_DEFINE([HAVE___INLINE], [1], [Define if the compiler understands __inline]) AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] +) + +AC_MSG_CHECKING([if the compiler understands inline]) +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[static inline void f(void){return;};]])], + [AC_DEFINE([HAVE_INLINE], [1], [Define if the compiler understands inline]) AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] +) AC_MSG_CHECKING([for __attribute__ extension]) AC_TRY_COMPILE(,[int __attribute__((unused)) x], @@ -2904,16 +2924,6 @@ if test "X$HDF_CXX" = "Xyes"; then chmod 755 c++/src/h5c++ fi -## We don't want inline defined for C++ compilers -## Don't worry about the C++ ifdef wrappers in the H5pubconf file, since -## 'H5_inline' isn't a C++ keyword. -cat >> src/H5config.h <<EOF - -#if defined(__cplusplus) && defined(inline) -#undef inline -#endif -EOF - ## HDF5 configure code created by autotools with gcc 4.9.2 is adding problematic ## linker flags: -l with no library name; -l <libname>, specifically gfortran or m. ## This sed script corrects "-l <libname>" first and then "-l " with no library name. |