summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac219
1 files changed, 31 insertions, 188 deletions
diff --git a/configure.ac b/configure.ac
index b8f1531..7b3cc2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,16 +39,17 @@ AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
## AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies
-## for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE
-## is *not* included here, these files will be rebuilt if out of date.
-## This is a problem because if users try to build on a machine with
+## for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE
+## is enabled, these files will be rebuilt if out of date. This is a
+## problem because if users try to build on a machine with
## the wrong versions of autoconf and automake, these files will be
## rebuilt with the wrong versions and bad things can happen.
## Also, CVS doesn't preserve dependencies between timestamps, so
## Makefiles will often think rebuilding needs to occur when it doesn't.
-## Developers should './configure --enable-maintainer-mode' to turn on
-## rebuild rules.
-AM_MAINTAINER_MODE
+##
+## By default, it is enabled. Users can configure with
+## --disable-maintainer-mode to prevent running the autotools.
+AM_MAINTAINER_MODE([enable])
## ----------------------------------------------------------------------
## Set prefix default (install directory) to a directory in the build area.
@@ -110,7 +111,7 @@ AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_LDFLAGS])
-## Make sure flags are set to something (otherwise macros may set them later).
+## Make sure flags are initialized.
AM_CFLAGS="${AM_CFLAGS}"
AM_CXXFLAGS="${AM_CXXFLAGS}"
AM_FCFLAGS="${AM_FCFLAGS}"
@@ -193,15 +194,9 @@ AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a`
## ----------------------------------------------------------------------
## Some platforms have broken basename, and/or xargs programs. Check
## that it actually does what it's supposed to do. Catch this early
-## since configure relies upon them heavily and there's no use continuing
-## if it's broken.
+## since configure and scripts relies upon them heavily and there's
+## no use continuing if it's broken.
##
-
-## Avoid depending upon Character Ranges.
-## These are defined by autoconf.
-## as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-## as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-
AC_MSG_CHECKING([if basename works])
BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`"
if test $BASENAME_TEST != "basename_works"; then
@@ -210,6 +205,7 @@ else
AC_MSG_RESULT([yes])
fi
+## xargs basename used in configure to get the CC_BASENAME value
AC_MSG_CHECKING([if xargs works])
XARGS_TEST="`echo /foo/bar/baz/qux/xargs_works | xargs basename`"
if test $XARGS_TEST != "xargs_works"; then
@@ -587,6 +583,7 @@ AC_PROG_INSTALL
## ----------------------------------------------------------------------
## Set up ${TR} which is used to process DEBUG_PKG.
+
AC_PATH_PROG([TR], [tr])
@@ -694,80 +691,14 @@ fi
AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
## ----------------------------------------------------------------------
-## Disable C++ shared libraries if +DD64 flag is detected.
-##
-AC_SUBST([H5_CXX_SHARED])
-H5_CXX_SHARED="no"
-if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
- AC_MSG_CHECKING([if shared C++ libraries are supported])
- H5_CXX_SHARED="yes"
-
- ## Disable C++ shared libraries if DD64 flag is being used.
-
- if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'DD64') > /dev/null; then
- H5_CXX_SHARED="no"
- CHECK_WARN="Shared C++ libraries not currently supported with +DD64 flag."
- fi
-
- ## Report results of check(s)
-
- if test "X${H5_CXX_SHARED}" = "Xno"; then
- AC_MSG_RESULT([no])
- AC_MSG_WARN([$CHECK_WARN])
- if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then
- AC_MSG_WARN([Disabling shared C++ libraries.])
- AC_MSG_WARN([To override this behavior, please use --enable-unsupported configure option.])
- if test "X${enable_static}" = "Xno"; then
- AC_MSG_ERROR([both static and shared C++ libraries are disabled])
- fi
- else
- AC_MSG_WARN([Allowing unsupported C++ shared librares due to use of --enable-unsupported flag])
- fi
- else
- AC_MSG_RESULT([yes])
- fi
-fi
-
-AM_CONDITIONAL([CXX_SHARED_CONDITIONAL], [test "X$H5_CXX_SHARED" = "Xyes"])
-
-## ----------------------------------------------------------------------
-## pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect
-## these versions and add option "-Mx,28,0x8" to the compiler to avoid
-## the problem if optimization is enabled.
-##
-
-if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_production" = "Xyes"; then
- echo 'adding compiler flag to avoid optimization problem in pgcc'
- CC="${CC-cc} -Mx,28,0x8"
-fi
-
-## ----------------------------------------------------------------------
-## Shared libraries are not currently supported under Cygwin, so configure
-## disables them unless --enable-unsupported has been supplied by the user.
-
-if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then
- case "`uname`" in
- CYGWIN*)
- if test "X${enable_shared}" = "Xyes"; then
- echo ' warning: shared libraries are not supported on Cygwin!'
- echo ' disabling shared libraries'
- echo ' use --enable-unsupported to override this warning and keep shared libraries enabled'
- fi
- enable_shared="no"
- ;;
- esac
-fi
-
-## ----------------------------------------------------------------------
-## Windows won't create DLLs without the following macro.
-##
-AC_LIBTOOL_WIN32_DLL
-
-## ----------------------------------------------------------------------
## Create libtool. If shared/static libraries are going to be enabled
## or disabled, it should happen before these macros.
LT_PREREQ([2.2])
-LT_INIT([dlopen])
+
+## ----------------------------------------------------------------------
+## dlopen - This will use an improved version of libtool
+## win32-dll - This will build clean dlls on win32 platforms.
+LT_INIT([dlopen,win32-dll])
## ----------------------------------------------------------------------
## Check if we should install only statically linked executables.
@@ -908,32 +839,6 @@ done
rm maketest
## ----------------------------------------------------------------------
-## pmake will throw an error if variables are undefined in a Makefile.
-## These errors can be changed to warnings using the -V flag.
-##
-AC_SUBST([AM_MAKEFLAGS]) AM_MAKEFLAGS=""
-
-## Don't run test if MAKE is defined but is the empty string
-if test -n "${MAKE-make}"; then
-
- AC_MSG_CHECKING([whether make will build with undefined variables])
-
- cat >maketest <<EOF
-foo: \$(UNDEFINED) \$(UNDEFINED2)
- @echo \$(UNDEFINED3) works
-EOF
-
- if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no, setting -V flag])
- AM_MAKEFLAGS="\-V"
- fi
-
- rm maketest
-fi
-
-## ----------------------------------------------------------------------
## Production flags? Save the value in $CONFIG_MODE so we have it for
## the record.
##
@@ -989,8 +894,6 @@ if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
AC_CHECK_LIB([nsl], [xdr_int])
fi
-dnl AC_CHECK_LIB([coug], [main]) ## ...for ASCI/Red
-
## ----------------------------------------------------------------------
## Check for system header files.
##
@@ -1605,6 +1508,17 @@ AC_ARG_ENABLE([threadsafe],
## with the thread-safety option because the lock is not hoisted
## into the higher-level API calls.
+## --enable-threadsafe is incompatible with --enable-hl unless
+## --enable-unsupported has been specified on the configure line.
+##
+## Note that the high-level library is enabled by default so most
+## users will have to add --disable-hl to the configure options.
+if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then
+ if test "X${HDF5_HL}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then
+ AC_MSG_ERROR([The thread-safe library is incompatible with the high-level library. --enable-unsupported will allow building the high-level library, though this configuration is not supported by The HDF Group. Alternatively,--disable-hl can be used to prevent building the high-level library (recommended).])
+ fi
+fi
+
## The --enable-threadsafe flag is not compatible with --enable-cxx.
## If the user tried to specify both flags, throw an error, unless
## they also provided the --enable-unsupported flag.
@@ -2432,10 +2346,9 @@ fi
## ----------------------------------------------------------------------
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
-
-## Check these regardless. If the checks are moved inside the main
-## direct VFD block, the output is nested.
-
+## ----------------------------------------------------------------------
+## Check if Direct I/O driver is enabled by --enable-direct-vfd
+##
AC_CACHE_VAL([hdf5_cv_direct_io],
AC_CHECK_DECL([O_DIRECT], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no], [[#include <fcntl.h>]]))
AC_CACHE_VAL([hdf5_cv_posix_memalign],
@@ -2588,76 +2501,6 @@ esac
## -----------------------------------------------------------------------
## Set flag to indicate that the machine can handle conversion from
-## long double to integers accurately. This flag should be set "yes" for
-## all machines except all SGIs. For SGIs, some conversions are
-## incorrect and its cache value is set "no" in its config/irix6.x and
-## irix5.x.
-##
-AC_MSG_CHECKING([if converting from long double to integers is accurate])
-
-if test ${ac_cv_sizeof_long_double} = 0; then
- hdf5_cv_ldouble_to_integer_accurate=${hdf5_cv_ldouble_to_integer_accurate=no}
-else
- AC_CACHE_VAL([hdf5_cv_ldouble_to_integer_accurate], [hdf5_cv_ldouble_to_integer_accurate=yes])
-fi
-
-if test "${hdf5_cv_ldouble_to_integer_accurate}" = "yes"; then
- AC_DEFINE([LDOUBLE_TO_INTEGER_ACCURATE], [1],
- [Define if your system can convert long double to integers accurately.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-## -----------------------------------------------------------------------
-## Set flag to indicate that the machine can do conversion from
-## long double to integers regardless of accuracy. This flag should be
-## set "yes" for all machines except HP-UX 11.00. For HP-UX 11.00, the
-## compiler has 'floating exception' when converting 'long double' to all
-## integers except 'unsigned long long'. Other HP-UX systems are unknown
-## yet. (1/8/05 - SLU)
-
-AC_MSG_CHECKING([if converting from long double to integers works])
-
-if test ${ac_cv_sizeof_long_double} = 0; then
- hdf5_cv_ldouble_to_integer_works=${hdf5_cv_ldouble_to_integer_works=no}
-else
- AC_CACHE_VAL([hdf5_cv_ldouble_to_integer_works],
- [AC_TRY_RUN([
- int main(void)
- {
- void *align;
- long double ld= 9701917572145405952.00L;
- unsigned char v1;
- short v2;
- unsigned int v3;
- int ret = 0;
-
- align = (void*)malloc(sizeof(long double));
- memcpy(align, &ld, sizeof(long double));
-
- /*For HU-UX11.00, there's floating exception(core dump) when doing some of casting
- *from 'long double' to integers*/
- v1=(unsigned char)(*((long double*)align));
- v2=(short)(*((long double*)align));
- v3=(unsigned int)(*((long double*)align));
-
- done:
- exit(ret);
- }
- ], [hdf5_cv_ldouble_to_integer_works=yes], [hdf5_cv_ldouble_to_integer_works=no],)])
-fi
-
-if test ${hdf5_cv_ldouble_to_integer_works} = "yes"; then
- AC_DEFINE([LDOUBLE_TO_INTEGER_WORKS], [1],
- [Define if your system can convert from long double to integer values.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-## -----------------------------------------------------------------------
-## Set flag to indicate that the machine can handle conversion from
## integers to long double. (This flag should be set "yes" for all
## machines except all SGIs, where some conversions are
## incorrect and its cache value is set "no" in its config/irix6.x and