diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-01-30 22:20:13 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-01-30 22:20:13 (GMT) |
commit | ceec9c45d9345bb6e864a492ad49932537dd4fdc (patch) | |
tree | f5f5378eab3a5032264921b1e154159252a8dbb7 /c++/configure.in | |
parent | 1e35713691e20b00fa3458c77391fbc84efbb7a5 (diff) | |
download | hdf5-ceec9c45d9345bb6e864a492ad49932537dd4fdc.zip hdf5-ceec9c45d9345bb6e864a492ad49932537dd4fdc.tar.gz hdf5-ceec9c45d9345bb6e864a492ad49932537dd4fdc.tar.bz2 |
[svn-r6353] Purpose:
Update
Description:
Updated the configure scripts. Fortran and C++ didn't have proper
checks for Linux LFS support. Also needed to remove the "-g" flag
from the compile line if --enable-production is set. For that, I took
how it's being done in HDF5 Lite...
Platforms tested:
Linux
Diffstat (limited to 'c++/configure.in')
-rw-r--r-- | c++/configure.in | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/c++/configure.in b/c++/configure.in index 1b3d73f..0c83165 100644 --- a/c++/configure.in +++ b/c++/configure.in @@ -242,6 +242,19 @@ AC_ARG_ENABLE(production, case "X-$enable_production" in X-yes) AC_MSG_RESULT("production") + + dnl Remove the "-g" flag from CXXFLAGS if it's in there. + dnl + CXXFLAGS_temp="" + if test -n "$CXXFLAGS"; then + for d in $CXXFLAGS ; do + if test "X$d" != "X-g"; then + CXXFLAGS_temp="$CXXFLAGS_temp $d" + fi + done + CXXFLAGS=$CXXFLAGS_temp + fi + CONFIG_MODE=production CXXFLAGS="$CXXFLAGS $PROD_CXXFLAGS" CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS" @@ -281,37 +294,41 @@ else fi AC_SUBST(LT_STATIC_EXEC) +dnl ---------------------------------------------------------------------- +dnl Test for 64bit stuff before the data types and their sizes. The +dnl result could effect the outcome of the sizeof macros below. +dnl 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_ARG_ENABLE([linux-lfs], [AC_HELP_STRING([--enable-linux-lfs], [Enable support for large (64-bit) files on Linux. [default=check]])]) + LINUX_LFS="no" 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]) + MAJOR_VER="`uname -r | cut -d '.' -f1`" + MINOR_VER="`uname -r | cut -d '.' -f2`" + + if test ${MAJOR_VER} -gt 2 -o ${MAJOR_VER} -eq 2 -a ${MINOR_VER} -ge 4; then + LINUX_LFS="yes" + fi ;; esac - AC_MSG_CHECKING([for large file support on linux mode]) + AC_MSG_CHECKING([for large file support mode on Linux]) if test "X$LINUX_LFS" = "Xyes"; then AC_MSG_RESULT([enabled]) - CXXFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE ${CXXFLAGS}" + CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS" else AC_MSG_RESULT([disabled]) fi @@ -319,13 +336,13 @@ case "$host_cpu-$host_vendor-$host_os" in 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}" + CPPFLAGS="-D_POSIX_SOURCE $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> - CXXFLAGS="-D_BSD_SOURCE ${CXXFLAGS}" + CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS" ;; esac |