diff options
-rwxr-xr-x | configure | 7 | ||||
-rw-r--r-- | configure.in | 18 |
2 files changed, 15 insertions, 10 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 20891 2011-05-23 17:02:39Z derobins . +# From configure.in Id: configure.in 20892 2011-05-23 17:29:14Z derobins . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for HDF5 1.9.82. # @@ -22506,9 +22506,10 @@ 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 diff --git a/configure.in b/configure.in index c761e5a..fb488c7 100644 --- a/configure.in +++ b/configure.in @@ -1378,19 +1378,23 @@ 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 |