summaryrefslogtreecommitdiffstats
path: root/acsite.m4
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2010-05-05 17:34:26 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2010-05-05 17:34:26 (GMT)
commitf0ecd713070b869c0d89d2ff0c991ade04852177 (patch)
tree3ad6778fc01cffeab1699c26b5ad2399e2e110e1 /acsite.m4
parent74c8b68acab0fc2408740e7a38a2ab2bcdf58f57 (diff)
downloadhdf5-f0ecd713070b869c0d89d2ff0c991ade04852177.zip
hdf5-f0ecd713070b869c0d89d2ff0c991ade04852177.tar.gz
hdf5-f0ecd713070b869c0d89d2ff0c991ade04852177.tar.bz2
[svn-r18709] Purpose:
Improve configure's large-file support control. Description: Modified configure to now attempt to add defines necessary for supporting largefiles on all systems, instead of solely on linux. This is in response to user requests to enable largefile support on Solaris by default, as well as to give extra control on AIX (instead of just jamming the necessary flag into the config files). The old --enable-linux-lfs flag has been removed in favor of the --enable-largefile flag (enabled by default), which can be used on all platforms. On systems where large files cannot be supported in this manner, configure will report as such. Tested: h5committest AIX (NCSA's blue_print machine) duty, liberty, and linew.
Diffstat (limited to 'acsite.m4')
-rw-r--r--acsite.m435
1 files changed, 35 insertions, 0 deletions
diff --git a/acsite.m4 b/acsite.m4
index 0ed8781..eaab535 100644
--- a/acsite.m4
+++ b/acsite.m4
@@ -19,6 +19,41 @@ dnl -------------------------------------------------------------------------
dnl -------------------------------------------------------------------------
dnl -------------------------------------------------------------------------
+dnl _AC_SYS_LARGEFILE_MACRO_VALUE
+dnl
+dnl The following macro overrides the autoconf macro of the same name
+dnl with this custom definition. This macro performs the same checks as
+dnl autoconf's native _AC_SYS_LARGEFILE_MACRO_VALUE, but will also set
+dnl AM_CPPFLAGS with the appropriate -D defines so additional configure
+dnl sizeof checks do not fail.
+dnl
+# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
+# CACHE-VAR,
+# DESCRIPTION,
+# PROLOGUE, [FUNCTION-BODY])
+# ----------------------------------------------------------
+m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
+[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
+[while :; do
+ m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
+ [AC_LANG_PROGRAM([$5], [$6])],
+ [$3=no; break])
+ m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
+ [AC_LANG_PROGRAM([@%:@define $1 $2
+$5], [$6])],
+ [$3=$2; break])
+ $3=unknown
+ break
+done])
+case $$3 in #(
+ no | unknown) ;;
+ *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4])
+ AM_CPPFLAGS="-D$1=$$3 $AM_CPPFLAGS";;
+esac
+rm -rf conftest*[]dnl
+])# _AC_SYS_LARGEFILE_MACRO_VALUE
+
+dnl -------------------------------------------------------------------------
dnl AC_F9X_MODS()
dnl
dnl Check how F9X handles modules. This macro also checks which