diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2000-09-06 18:31:47 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2000-09-06 18:31:47 (GMT) |
commit | 763bb8d9a09143153ec9417f5f68fced319eb91d (patch) | |
tree | 4740f601daf5b261e0373bab0eef7a1b0afe15ec /configure.in | |
parent | a56d88a99a01a668e35f404bd65021cde65b77b5 (diff) | |
download | hdf5-763bb8d9a09143153ec9417f5f68fced319eb91d.zip hdf5-763bb8d9a09143153ec9417f5f68fced319eb91d.tar.gz hdf5-763bb8d9a09143153ec9417f5f68fced319eb91d.tar.bz2 |
[svn-r2516] Added stuff so that C++ compilers can include the src/H5{pub}config.h
files. I append to them an #undef of the inline macro. Then, if it's a
C++ compiler, the inline keyword isn't redefined incorrectly...
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.in b/configure.in index ba0e10d..491a93f 100644 --- a/configure.in +++ b/configure.in @@ -1322,3 +1322,28 @@ touch ./config/stamp2 # Finally the makefiles test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +dnl We don't want inline defined for C++ compilers +cat >> src/H5config.h <<EOF + +/* inline is a keyword in C++. If this is a C++ compiler, undefine it */ +#ifdef __cplusplus +# ifdef inline +# undef inline +# endif +#endif +EOF + +dnl Put the C++ ifdef wrappers in the H5pubconf file as well, but only +dnl if it's not there already. +if (! grep __cplusplus src/H5pubconf.h >/dev/null); then + cat >> src/H5pubconf.h <<EOF + +/* inline is a keyword in C++. If this is a C++ compiler, undefine it */ +#ifdef __cplusplus +# ifdef inline +# undef inline +# endif +#endif +EOF +fi |