summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-07-17 21:24:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-07-17 21:24:38 (GMT)
commit857e0e6e57f4f0a8ce9fec9b3200837065f3a058 (patch)
tree60ecbc708fd79439cc665ce3fd7a40eefa7b746d /configure.in
parent458621172b4744271f42403ea58b7f08526c5aa4 (diff)
downloadhdf5-857e0e6e57f4f0a8ce9fec9b3200837065f3a058.zip
hdf5-857e0e6e57f4f0a8ce9fec9b3200837065f3a058.tar.gz
hdf5-857e0e6e57f4f0a8ce9fec9b3200837065f3a058.tar.bz2
[svn-r4231] Purpose:
Bug fix. Description: On some systems (linux when not using gcc) the 'dev_t' is not actually a scalar variable. This causes the code which compares dev_t's in the file drivers to not compile. Solution: Detect this and set the DEV_T_IS_SCALAR flag so we can code around it in the file drivers. Platforms tested: FreeBSD 4.3 (hawkwind), Linux 2.4.2 (chiba city cluster at Argonne)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in33
1 files changed, 18 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index 0356238..bc03a8c 100644
--- a/configure.in
+++ b/configure.in
@@ -562,6 +562,20 @@ dnl Checkpoint the cache
AC_CACHE_SAVE
dnl ----------------------------------------------------------------------
+dnl Check if the dev_t type is a scalar type (must come after the check for
+dnl sys/types.h)
+ AC_MSG_CHECKING([if dev_t is scalar])
+ AC_TRY_COMPILE([
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+ ],
+ [dev_t d1, d2; if(d1==d2) return 0;],
+ AC_DEFINE(DEV_T_IS_SCALAR) AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ )
+
+dnl ----------------------------------------------------------------------
dnl Is HDF4 present? If so then we can compile the hdf4 related tools.
dnl The HDF4 software has 4 component libraries (df, mfhdf, z, jpeg)
dnl and many header files. Will just verify the presence of mfhdf.h
@@ -1140,7 +1154,7 @@ int main(void)
sprintf(s,"%${hdf5_cv_printf_ll}d",x);
exit(strcmp(s,"1099511627776"));
}
- ], break,,)
+ ], break,,continue)
done)
AC_MSG_RESULT(%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u)
@@ -1464,7 +1478,7 @@ int main(int argc, char **argv)
],
AC_MSG_RESULT(no),
AC_MSG_RESULT(yes)
- CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS")
+ CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS",AC_MSG_RESULT(no))
fi
dnl ----------------------------------------------------------------------
@@ -1695,6 +1709,8 @@ touch ./config/stamp2
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
dnl We don't want inline defined for C++ compilers
+dnl Don't worry about the C++ ifdef wrappers in the H5pubconf file, since
+dnl 'H5_inline' isn't a C++ keyword.
cat >> src/H5config.h <<EOF
/* inline is a keyword in C++. If this is a C++ compiler, undefine it */
@@ -1703,16 +1719,3 @@ cat >> src/H5config.h <<EOF
#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 2>&1; then
- :
-else
- cat >> src/H5pubconf.h <<EOF
-
-/* inline is a keyword in C++. If this is a C++ compiler, undefine it */
-#if defined(__cplusplus) && defined(inline)
-#undef inline
-#endif
-EOF
-fi