mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[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...
This commit is contained in:
parent
a56d88a99a
commit
763bb8d9a0
25
configure.in
25
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
|
||||
|
Loading…
Reference in New Issue
Block a user