From f56cb6a8f0e5f5314f3c439efc566e7815b88f9c Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 3 Mar 2015 17:27:21 -0500 Subject: [svn-r26347] Moves large file and POSIX/GNU defines from AM_CPPFLAGS to H5_CPPFLAGS, which is where the rest of the #defines reside. The key difference is that AM_CPPFLAGS is exported to h5cc. These #defines are not necessary to consume the HDF5 API and it's bad form to inflict our build configuration on users. In particular, the GNU/POSIX defines could easily conflict with a user's. Fixes: HDFFV-9152 Tested on: h5committest --- acsite.m4 | 2 +- configure | 10 +++++----- configure.ac | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/acsite.m4 b/acsite.m4 index eaab535..722d606 100644 --- a/acsite.m4 +++ b/acsite.m4 @@ -48,7 +48,7 @@ done]) case $$3 in #( no | unknown) ;; *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]) - AM_CPPFLAGS="-D$1=$$3 $AM_CPPFLAGS";; + H5_CPPFLAGS="-D$1=$$3 $H5_CPPFLAGS";; esac rm -rf conftest*[]dnl ])# _AC_SYS_LARGEFILE_MACRO_VALUE diff --git a/configure b/configure index 77ee69a..14795ab 100755 --- a/configure +++ b/configure @@ -22806,7 +22806,7 @@ cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF - AM_CPPFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits $AM_CPPFLAGS";; + H5_CPPFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits $H5_CPPFLAGS";; esac rm -rf conftest* @@ -22894,7 +22894,7 @@ cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF - AM_CPPFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files $AM_CPPFLAGS";; + H5_CPPFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files $H5_CPPFLAGS";; esac rm -rf conftest* fi @@ -22906,7 +22906,7 @@ case "$host_cpu-$host_vendor-$host_os" in *linux*) ## Make available various LFS-related routines using the following ## _LARGEFILE*_SOURCE macros. - AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" + H5_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $H5_CPPFLAGS" ## Add POSIX support on Linux systems, so defines ## __USE_POSIX, which is required to get the prototype for fdopen @@ -22932,7 +22932,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## Need to add this so that O_DIRECT is visible for the direct ## VFD on Linux systems. - AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS" + H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" ## Also add BSD support on Linux systems, so defines ## __USE_BSD, which is required to get the prototype for strdup @@ -22942,7 +22942,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html ## however, we do not do this since it breaks the big test on some ## older platforms. - AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS" + H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS" ;; esac diff --git a/configure.ac b/configure.ac index b93ba86..e75bd27 100644 --- a/configure.ac +++ b/configure.ac @@ -1095,7 +1095,7 @@ case "$host_cpu-$host_vendor-$host_os" in *linux*) ## Make available various LFS-related routines using the following ## _LARGEFILE*_SOURCE macros. - AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" + H5_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $H5_CPPFLAGS" ## Add POSIX support on Linux systems, so defines ## __USE_POSIX, which is required to get the prototype for fdopen @@ -1121,7 +1121,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## Need to add this so that O_DIRECT is visible for the direct ## VFD on Linux systems. - AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS" + H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" ## Also add BSD support on Linux systems, so defines ## __USE_BSD, which is required to get the prototype for strdup @@ -1131,7 +1131,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html ## however, we do not do this since it breaks the big test on some ## older platforms. - AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS" + H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS" ;; esac -- cgit v0.12