summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure23
-rw-r--r--configure.in29
-rw-r--r--release_docs/RELEASE.txt5
-rw-r--r--src/H5config.h.in3
4 files changed, 45 insertions, 15 deletions
diff --git a/configure b/configure
index a82362a..1844384 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Id: configure.in 20873 2011-05-20 16:34:12Z songyulu .
+# From configure.in Id: configure.in 20893 2011-05-23 17:43:37Z koziol .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for HDF5 1.8.8-snap1.
#
@@ -22102,6 +22102,19 @@ fi
done
+for ac_header in mach/mach_time.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_mach_time_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MACH_MACH_TIME_H 1
+_ACEOF
+
+fi
+
+done
+
+
case "`uname`" in
CYGWIN*)
for ac_header in io.h sys/timeb.h
@@ -22523,13 +22536,15 @@ case "$host_cpu-$host_vendor-$host_os" in
AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS"
fi
- H5_CPPFLAGS="-D_POSIX_SOURCE $H5_CPPFLAGS"
+ H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS"
- AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS"
+ AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS"
+ AM_LDFLAGS="-lbsd-compat $AM_LDFLAGS"
;;
esac
-CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
+CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
+CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff --git a/configure.in b/configure.in
index cf1747f..3ce5be5 100644
--- a/configure.in
+++ b/configure.in
@@ -1227,6 +1227,9 @@ AC_CHECK_HEADERS([sys/socket.h sys/types.h])
AC_CHECK_HEADERS([stddef.h setjmp.h features.h])
AC_CHECK_HEADERS([stdint.h], [C9x=yes])
+dnl Darwin
+AC_CHECK_HEADERS([mach/mach_time.h])
+
dnl Windows
case "`uname`" in
CYGWIN*)
@@ -1408,25 +1411,31 @@ case "$host_cpu-$host_vendor-$host_os" in
dnl H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen
dnl is used only by H5_debug_mask which is used only when debugging in
dnl H5_init_library (all in H5.c). When the flag was removed this was
- dnl the only compile failure noted; however, defining the Macro
- dnl makes available the functionality from the POSIX.1 standard as well
- dnl as all or the ISO C facilities, according to a discussion of
- dnl defining the _POSIX_SOURCE, _BSD_SOURCE, and _POSIX_C_SOURCE Macros
- dnl and their interaction found at
- dnl http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html.
- H5_CPPFLAGS="-D_POSIX_SOURCE $H5_CPPFLAGS"
+ dnl the only compile failure noted.
+ dnl This was originally defined as _POSIX_SOURCE which was updated to
+ dnl _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
+ dnl functionality so clock_gettime and CLOCK_MONOTONIC are defined
+ dnl correctly.
+ dnl POSIX feature information can be found in the gcc manual at:
+ dnl http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
+ H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS"
dnl Also add BSD support on Linux systems, so <features.h> defines
dnl __USE_BSD, which is required to get the prototype for strdup
dnl defined correctly in <string.h> and snprintf & vsnprintf defined
dnl correctly in <stdio.h>
+ dnl Linking to the bsd-compat library is required as per the gcc manual:
+ dnl http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS"
+ AM_LDFLAGS="-lbsd-compat $AM_LDFLAGS"
;;
esac
-dnl Need to add AM_CPPFLAGS into CPPFLAGS to make them visible for configure checks.
-dnl Note: CPPFLAGS will be restored by the end of configure.
-CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
+dnl Need to add the AM_ and H5_ into CPFLAGS/CPPFLAGS to make them visible
+dnl for configure checks.
+dnl Note: Both will be restored by the end of configure.
+CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
+CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS"
AC_TRY_COMPILE([#include <sys/types.h>],
[off64_t n = 0;],
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 498d5d2..458389b 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -94,7 +94,10 @@ Bug Fixes since HDF5-1.8.7
Configuration
-------------
- - None
+ - Configure now uses the same flags and symbols in its tests that are
+ used to build the library.
+ - On linux we now link to the bsd_compat library, as per the gcc
+ manual, since we define _BSD_SOURCE.
Library
-------
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 9a1bfd4..01d808d 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -233,6 +233,9 @@
/* Define to 1 if you have the `lstat' function. */
#undef HAVE_LSTAT
+/* Define to 1 if you have the <mach/mach_time.h> header file. */
+#undef HAVE_MACH_MACH_TIME_H
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H