summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2000-09-06 18:31:47 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2000-09-06 18:31:47 (GMT)
commit763bb8d9a09143153ec9417f5f68fced319eb91d (patch)
tree4740f601daf5b261e0373bab0eef7a1b0afe15ec /configure.in
parenta56d88a99a01a668e35f404bd65021cde65b77b5 (diff)
downloadhdf5-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.in25
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