summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2000-09-07 20:57:34 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2000-09-07 20:57:34 (GMT)
commit9a993423708356808048661aa916fe4dac57df83 (patch)
tree428dad9b69040b87690cda54e33ce601efb3bf44 /configure.in
parent8d6b1221f22b7041c3a84a5f5ab331219db6aa6f (diff)
downloadhdf5-9a993423708356808048661aa916fe4dac57df83.zip
hdf5-9a993423708356808048661aa916fe4dac57df83.tar.gz
hdf5-9a993423708356808048661aa916fe4dac57df83.tar.bz2
[svn-r2522] Small bug. A test if src/H5pubconf.h already contains the __cplusplus
macro didn't work on all systems. This fixes it. This also introduces the ability to configure for fortran and c++. This is not to be implemented yet, though!
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in61
1 files changed, 51 insertions, 10 deletions
diff --git a/configure.in b/configure.in
index 491a93f..f69c458 100644
--- a/configure.in
+++ b/configure.in
@@ -116,6 +116,52 @@ dnl Check for programs.
dnl
AC_PROG_CC
CC_BASENAME="`echo $CC |cut -f1 -d' ' |xargs basename 2>/dev/null`"
+
+config_dirs=""
+
+dnl ----------------------------------------------------------------------
+dnl Check if they would like the Fortran interface compiled
+dnl
+AC_MSG_CHECKING(if fortran interface enabled)
+AC_ARG_ENABLE(fortran,
+ [ --enable-fortran Compile the Fortran interface.],
+ HDF_FORTRAN=$enableval)
+
+if test "X$HDF_FORTRAN" = Xyes; then
+ echo "yes"
+
+ if test -z $config_dirs; then
+ config_dirs=fortran
+ else
+ config_dirs=${config_dirs} fortran
+ fi
+else
+ echo "no"
+fi
+
+dnl ----------------------------------------------------------------------
+dnl Check if they would like the Fortran interface compiled
+dnl
+AC_MSG_CHECKING(if c++ interface enabled)
+AC_ARG_ENABLE(c++,
+ [ --enable-c++ Compile the C++ interface.],
+ HDF_CXX=$enableval)
+
+if test "X$HDF_CXX" = Xyes; then
+ echo "yes"
+
+ if test -z $config_dirs; then
+ config_dirs=c++
+ else
+ config_dirs=${config_dirs} c++
+ fi
+else
+ echo "no"
+fi
+
+dnl Run configure in the subdirectories if specified
+AC_CONFIG_SUBDIRS(${config_dirs})
+
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AM_PROG_LIBTOOL
@@ -1327,23 +1373,18 @@ 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
+#if defined(__cplusplus) && defined(inline)
+#undef inline
#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
+{ grep __cplusplus src H5pubconf.h 1>2 2>/dev/null;} || \
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
+#if defined(__cplusplus) && defined(inline)
+#undef inline
#endif
EOF
-fi