summaryrefslogtreecommitdiffstats
path: root/c++/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2002-05-31 22:25:37 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2002-05-31 22:25:37 (GMT)
commitdfe2b45ee1727fab82127e1890917e2d7d7c25c9 (patch)
tree581e9ee69395d992ec208fd7313a1d51ae94d93d /c++/configure.in
parentae818ca9df9e12f4ba32e85de2f49ce164a0095f (diff)
downloadhdf5-dfe2b45ee1727fab82127e1890917e2d7d7c25c9.zip
hdf5-dfe2b45ee1727fab82127e1890917e2d7d7c25c9.tar.gz
hdf5-dfe2b45ee1727fab82127e1890917e2d7d7c25c9.tar.bz2
[svn-r5495] Purpose:
Bug Fix Description: C++ uses the "off_t" type for external files as well. I'm assuming that there's going to be a problem with 4 byte off_ts and 8 byte off_ts in the C++ code as well. I compiled everything on Linux and it worked, but I don't think we have a check for this bug in the library yet... Platforms tested: Linux
Diffstat (limited to 'c++/configure.in')
-rw-r--r--c++/configure.in48
1 files changed, 48 insertions, 0 deletions
diff --git a/c++/configure.in b/c++/configure.in
index 074b277..9b95b60 100644
--- a/c++/configure.in
+++ b/c++/configure.in
@@ -281,6 +281,54 @@ else
fi
AC_SUBST(LT_STATIC_EXEC)
+case "$host_cpu-$host_vendor-$host_os" in
+ *linux*)
+ dnl ----------------------------------------------------------------------
+ dnl Enable large file support on linux? Store the result in the LINUX_LFS
+ dnl variable for posterity
+ AC_ARG_ENABLE(linux-lfs,
+ [AC_HELP_STRING([--enable-linux-lfs],
+ [Enable support for large (64-bit)
+ files on Linux. [default=check]])])
+
+ case "X-$enable_linux_lfs" in
+ X-yes)
+ LINUX_LFS=yes
+ ;;
+ X-no)
+ LINUX_LFS=no
+ ;;
+ X-|*)
+ LINUX_LFS=no
+ AC_CHECK_FUNCS([getdents64],
+ dnl Add the large file support flags to the CXXFLAGS macro if
+ dnl we're on a Linux system which austensibly supports LFS. (We
+ dnl think it does if it has the `getdents64' syscall).
+ [LINUX_LFS=yes])
+ ;;
+ esac
+
+ AC_MSG_CHECKING([for large file support on linux mode])
+ if test "X$LINUX_LFS" = "Xyes"; then
+ AC_MSG_RESULT([enabled])
+ CXXFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE ${CXXFLAGS}"
+ else
+ AC_MSG_RESULT([disabled])
+ fi
+
+ dnl Add POSIX support on Linux systems, so <features.h> defines
+ dnl __USE_POSIX, which is required to get the prototype for fdopen
+ dnl defined correctly in <stdio.h>
+ CXXFLAGS="-D_POSIX_SOURCE ${CXXFLAGS}"
+
+ 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>
+ CXXFLAGS="-D_BSD_SOURCE ${CXXFLAGS}"
+ ;;
+esac
+
dnl ----------------------------------------------------------------------
dnl Checks for compiler characteristics.
dnl