summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac364
1 files changed, 160 insertions, 204 deletions
diff --git a/configure.ac b/configure.ac
index b441cad..96b26c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,10 +26,10 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.9.229], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.232], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
-AC_CONFIG_HEADER([src/H5config.h])
+AC_CONFIG_HEADERS([src/H5config.h])
AC_CONFIG_AUX_DIR([bin])
AC_CONFIG_MACRO_DIR([m4])
@@ -40,16 +40,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.
@@ -86,11 +87,16 @@ AC_CONFIG_COMMANDS([pubconf], [
## configure is currently running by using the --host=foo flag.
## For machines on which HDF5 is often configured, it can be convenient
## to specify the name of the machine rather than its canonical type.
-case $host_alias in
- redstorm)
- host_alias=x86_64-redstorm-linux-gnu
- ;;
-esac
+##
+## There are currently no hosts, but if there were they would be
+## listed by hostname and the alias would point to a file in
+## the config directory:
+##
+##case $host_alias in
+## <some host>)
+## host_alias=<config file in config directory>
+## ;;
+##esac
AC_CANONICAL_HOST
AC_SUBST([CPPFLAGS])
@@ -183,11 +189,13 @@ AC_SUBST([enable_shared])
AC_SUBST([enable_static])
AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a`
AC_SUBST([PAC_C_MAX_REAL_PRECISION])
+AC_SUBST([Fortran_COMPILER_ID])
+Fortran_COMPILER_ID=none
## ----------------------------------------------------------------------
## 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 and scripts relies upon them heavily and there's
+## since configure and scripts relies upon them heavily and there's
## no use continuing if it's broken.
##
AC_MSG_CHECKING([if basename works])
@@ -244,14 +252,8 @@ case $host_os in
freebsd*)
host_os_novers=freebsd
;;
- osf4.*)
- host_os_novers=osf4.x
- ;;
- osf5.*)
- host_os_novers=osf5.x
- ;;
- solaris2.*)
- host_os_novers=solaris2.x
+ solaris*)
+ host_os_novers=solaris
;;
*)
host_os_novers=$host_os
@@ -335,7 +337,7 @@ AC_ARG_ENABLE([unsupported],
[Allow unsupported combinations of configure options])],
[ALLOW_UNSUPPORTED=$enableval])
-case "X-$ALLOW_UNSUPPORTED" in
+case "X-$ALLOW_UNSUPPORTED" in
X-|X-no)
AC_MSG_RESULT([no])
;;
@@ -416,7 +418,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
[cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc])
AC_SUBST([FC]) HDF_FORTRAN=yes
-
+
HDF5_INTERFACES="$HDF5_INTERFACES fortran"
## --------------------------------------------------------------------
@@ -441,7 +443,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## --------------------------------------------------------------------
## Check for a Fortran compiler and how to include modules.
- ##
+ ##
AC_PROG_FC([PAC_FC_SEARCH_LIST],)
AC_F9X_MODS
@@ -517,7 +519,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_SUBST([H5CONFIG_F_RKIND])
AC_SUBST([H5CONFIG_F_RKIND_SIZEOF])
AC_SUBST([H5CONFIG_F_NUM_IKIND])
- AC_SUBST([H5CONFIG_F_IKIND])
+ AC_SUBST([H5CONFIG_F_IKIND])
+ AC_DEFINE_UNQUOTED([Fortran_COMPILER_ID], $Fortran_COMPILER_ID, [Define Fortran compiler ID])
## Setting definition if there is a 16 byte fortran integer
if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then
@@ -631,8 +634,8 @@ if test "X$HDF_CXX" = "Xyes"; then
# Checking if C++ can handle namespaces
PAC_PROG_CXX_NAMESPACE
-
- # Checking if C++ has offsetof extension
+
+ # Checking if C++ has offsetof extension
PAC_PROG_CXX_OFFSETOF
# if C++ can handle static cast
@@ -781,7 +784,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
H5_FORTRAN_SHARED="yes"
## Disable fortran shared libraries on Mac. (MAM - 03/30/11)
-
+
case "`uname`" in
Darwin*)
H5_FORTRAN_SHARED="no"
@@ -790,7 +793,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
esac
## Report results of check(s)
-
+
if test "X${H5_FORTRAN_SHARED}" = "Xno"; then
AC_MSG_RESULT([no])
AC_MSG_WARN([$CHECK_WARN])
@@ -821,12 +824,10 @@ LT_PREREQ([2.2])
## win32-dll - This will build clean dlls on win32 platforms.
LT_INIT([dlopen,win32-dll])
-
-
## ----------------------------------------------------------------------
## Check if we should install only statically linked executables.
## This check needs to occur after libtool is initialized because
-## we check a libtool cache value and may issue a warning based
+## we check a libtool cache value and may issue a warning based
## on its result.
AC_MSG_CHECKING([if we should install only statically linked executables])
AC_ARG_ENABLE([static_exec],
@@ -889,32 +890,6 @@ case "X-$RPATH" in
esac
## ----------------------------------------------------------------------
-## 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.
##
@@ -964,12 +939,6 @@ esac
AC_CHECK_LIB([m], [ceil])
AC_CHECK_LIB([dl], [dlopen])
-if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
- ## ...for Solaris
- AC_CHECK_LIB([socket], [socket])
- AC_CHECK_LIB([nsl], [xdr_int])
-fi
-
## ----------------------------------------------------------------------
## Check for system header files.
##
@@ -1006,24 +975,6 @@ case "`uname`" in
;;
esac
-case "$host" in
- alpha*-dec*-osf*)
- ## The <sys/sysinfo.h> and <sys/proc.h> are needed on the DEC
- ## Alpha to turn off UAC fixing. We do *not* attempt to
- ## locate these files on other systems because there are too
- ## many problems with including them.
- AC_CHECK_HEADERS([sys/sysinfo.h sys/proc.h])
- ;;
- mips*-sgi*)
- ## The <sys/fpu.h> is needed on the SGI machines to turn off
- ## denormalized floating-point values going to zero. We do *not*
- ## attempt to locate these files on other systems because there
- ## may be problems with including them.
- AC_CHECK_HEADERS([sys/fpu.h])
- AC_CHECK_FUNCS([get_fpc_csr])
- ;;
-esac
-
## ----------------------------------------------------------------------
## Some platforms require that all symbols are resolved when a library
## is linked. We can use the -no-undefined flag to tell libtool that
@@ -1047,11 +998,11 @@ fi
## ----------------------------------------------------------------------
## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines
-## that might need to be set for largefile support to behave
+## that might need to be set for largefile support to behave
## correctly. This macro is defined in acsite.m4 and overrides
## the version provided by Autoconf (as of v2.65). The custom
-## macro additionally adds the appropriate defines to AM_CPPFLAGS
-## so that later configure checks have them visible.
+## macro additionally adds the appropriate defines to AM_CPPFLAGS
+## so that later configure checks have them visible.
## Check for _FILE_OFFSET_BITS
_AC_SYS_LARGEFILE_MACRO_VALUE([_FILE_OFFSET_BITS], [64],
@@ -1072,16 +1023,16 @@ fi
##
case "$host_cpu-$host_vendor-$host_os" in
*linux*)
- ## Make available various LFS-related routines using the following
+ ## Make available various LFS-related routines using the following
## _LARGEFILE*_SOURCE macros.
AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS"
## Add POSIX support on Linux systems, so <features.h> defines
## __USE_POSIX, which is required to get the prototype for fdopen
- ## defined correctly in <stdio.h>.
+ ## defined correctly in <stdio.h>.
##
## This flag was removed from h5cc as of 2009-10-17 when it was found
- ## that the flag broke compiling netCDF-4 code with h5cc, but kept in
+ ## that the flag broke compiling netCDF-4 code with h5cc, but kept in
## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen
## is used only by H5_debug_mask which is used only when debugging in
## H5_init_library (all in H5.c). When the flag was removed this was
@@ -1096,46 +1047,36 @@ case "$host_cpu-$host_vendor-$host_os" in
##
## POSIX feature information can be found in the gcc manual at:
## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
-##SCOT H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS"
+ H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS"
## Need to add this so that O_DIRECT is visible for the direct
## VFD on Linux systems.
H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS"
-
- ## Also add BSD support on Linux systems, so <features.h> defines
- ## __USE_BSD, which is required to get the prototype for strdup
- ## defined correctly in <string.h> and snprintf & vsnprintf defined
- ## correctly in <stdio.h>
- ## Linking to the bsd-compat library is required as per the gcc manual:
- ## 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.
- H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS"
-
- ## _BSD_SOURCE is deprecated as of glibc 2.20, in favor of _DEFAULT_SOURCE.
- ## To avoid warnings, we define _DEFAULT_SOURCE in addition to _BSD_SOURCE,
- ## which should work for all versions of glibc.
- H5_CPPFLAGS="-D_DEFAULT_SOURCE $H5_CPPFLAGS"
;;
esac
-## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
+## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
## for configure checks.
## Note: Both will be restored by the end of configure.
CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS"
-AC_TRY_COMPILE([#include <sys/types.h>],
- [off64_t n = 0;],
- [AC_CHECK_FUNCS([lseek64 fseeko64 ftello64 ftruncate64])],
- [AC_MSG_RESULT([skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined])])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+]],
+ [[off64_t n = 0;]])],
+ [AC_CHECK_FUNCS([lseek64 fseeko64 ftello64 ftruncate64])],
+ [AC_MSG_RESULT([skipping test for lseek64, fseeko64 , ftello64, ftruncate64 because off64_t is not defined])])
+
AC_CHECK_FUNCS([fseeko ftello])
-AC_TRY_COMPILE([
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
-#include <sys/stat.h>],
-[struct stat64 sb;],
+#include <sys/stat.h>
+]],
+[[struct stat64 sb;]])],
[AC_CHECK_FUNCS([stat64 fstat64])],
-[AC_MSG_RESULT([skipping test for stat64() and fstat64()])])
+[AC_MSG_RESULT([skipping test for stat64 and fstat64])])
## Checkpoint the cache
AC_CACHE_SAVE
@@ -1196,17 +1137,16 @@ AC_CACHE_SAVE
## Check if the dev_t type is a scalar type (must come after the check for
## sys/types.h)
AC_MSG_CHECKING([if dev_t is scalar])
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
- ],
- [dev_t d1, d2; if(d1==d2) return 0;],
- AC_DEFINE([DEV_T_IS_SCALAR], [1],
- [Define if `dev_t' is a scalar])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
-)
+ ]],
+ [[dev_t d1, d2; if(d1==d2) return 0;]])],
+ [AC_DEFINE([DEV_T_IS_SCALAR], [1],
+ [Define if dev_t is a scalar])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
## ----------------------------------------------------------------------
## Fake --with-xxx option to allow us to create a help message for the
@@ -1430,17 +1370,17 @@ case $withval in
fi
;;
esac
-
+
saved_CPPFLAGS="$CPPFLAGS"
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
-
+
if test -n "$szlib_inc"; then
CPPFLAGS="$CPPFLAGS -I$szlib_inc"
AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc"
fi
-
+
AC_CHECK_HEADERS([szlib.h],
[HAVE_SZLIB_H="yes"],
[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB])
@@ -1449,7 +1389,7 @@ case $withval in
LDFLAGS="$LDFLAGS -L$szlib_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib"
fi
-
+
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
[LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB])
@@ -1466,7 +1406,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
AC_MSG_CHECKING([for szlib encoder])
## Set LD_LIBRARY_PATH so encoder test can find the library and run.
- ## Also add LL_PATH substitution to Makefiles so they can use the
+ ## Also add LL_PATH substitution to Makefiles so they can use the
## path as well, for testing examples.
if test -z "$LD_LIBRARY_PATH"; then
export LD_LIBRARY_PATH="$szlib_lib"
@@ -1489,25 +1429,25 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
]])]
, [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)]
)
-
- AC_DEFINE([HAVE_FILTER_SZIP], [1],
+
+ AC_DEFINE([HAVE_FILTER_SZIP], [1],
[Define if support for szip filter is enabled])
USE_FILTER_SZIP="yes"
if test ${hdf5_cv_szlib_can_encode} = "yes"; then
AC_MSG_RESULT([yes])
- fi
+ fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
AC_MSG_RESULT([no])
- fi
-
+ fi
+
## Add "szip" to external filter list
if test ${hdf5_cv_szlib_can_encode} = "yes"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
- fi
+ fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
@@ -1528,8 +1468,7 @@ AC_CACHE_SAVE
AC_MSG_CHECKING([for thread safe support])
AC_ARG_ENABLE([threadsafe],
[AS_HELP_STRING([--enable-threadsafe],
- [Enable thread-safe capability. This will disable the high-level library.
- You can override this behavior by specifying --enable-hl and --enable-unsupported.
+ [Enable thread-safe capability. Not compatible with the high-level library, Fortran, or C++ wrappers.
[default=no]])],
[THREADSAFE=$enableval])
@@ -1537,6 +1476,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. --disable-hl can be used to prevent building the high-level library (recommended). Alternatively, --enable-unsupported will allow building the high-level library, though this configuration is not supported by The HDF Group.])
+ 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.
@@ -1560,7 +1510,7 @@ case "X-$THREADSAFE" in
AC_MSG_RESULT([no])
;;
X-yes)
- THREADSAFE=yes
+ THREADSAFE=yes
AC_MSG_RESULT([yes])
;;
*)
@@ -1679,7 +1629,7 @@ fi
## ----------------------------------------------------------------------
## Check for MONOTONIC_TIMER support (used in clock_gettime). This has
-## to be done after any POSIX/BSD defines to ensure that the test gets
+## to be done after any POSIX defines to ensure that the test gets
## the correct POSIX level on linux.
AC_CHECK_DECL([CLOCK_MONOTONIC],[have_clock_monotonic="yes"],[have_clock_monotonic="no"],[[#include <time.h>]])
@@ -1690,11 +1640,12 @@ AC_CHECK_DECL([CLOCK_MONOTONIC],[have_clock_monotonic="yes"],[have_clock_monoton
## First check if `struct tm' has a `tm_gmtoff' member.
AC_MSG_CHECKING([for tm_gmtoff in struct tm])
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/time.h>
- #include <time.h>], [struct tm tm; tm.tm_gmtoff=0;],
+ #include <time.h>
+]], [[struct tm tm; tm.tm_gmtoff=0;]])],
[AC_DEFINE([HAVE_TM_GMTOFF], [1],
- [Define if `tm_gmtoff' is a member of `struct tm'])
+ [Define if tm_gmtoff is a member of struct tm])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
@@ -1706,11 +1657,11 @@ case "`uname`" in
AC_MSG_RESULT([disabled in CYGWIN])
;;
*)
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/time.h>
- #include <time.h>], [timezone=0;],
+ #include <time.h>]], [[timezone=0;]])],
[AC_DEFINE([HAVE_TIMEZONE], [1],
- [Define if `timezone' is a global variable])
+ [Define if timezone is a global variable])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
;;
@@ -1721,10 +1672,10 @@ esac
## Does the struct stat have the st_blocks field? This field is not Posix.
##
AC_MSG_CHECKING([for st_blocks in struct stat])
-AC_TRY_COMPILE([
- #include <sys/stat.h>],[struct stat sb; sb.st_blocks=0;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM[[
+ #include <sys/stat.h>]],[[struct stat sb; sb.st_blocks=0;]])],
[AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1],
- [Define if `struct stat' has the `st_blocks' field])
+ [Define if struct stat has the st_blocks field])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
@@ -1742,28 +1693,32 @@ esac
AC_CHECK_FUNCS([_scrsize ioctl])
AC_MSG_CHECKING([for struct videoconfig])
-AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[struct videoconfig w; w.numtextcols=0;]])],
[AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1],
- [Define if `struct videoconfig' is defined])
+ [Define if struct videoconfig is defined])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for struct text_info])
-AC_TRY_COMPILE(, [struct text_info w; w.screenwidth=0;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct text_info w; w.screenwidth=0;]])],
[AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1],
- [Define if `struct text_info' is defined])
+ [Define if struct text_info is defined])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for TIOCGWINSZ])
-AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGWINSZ;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/ioctl.h>
+]],[[int w=TIOCGWINSZ;]])],
[AC_DEFINE([HAVE_TIOCGWINSZ], [1],
[Define if the ioctl TIOGWINSZ is defined])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for TIOCGETD])
-AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGETD;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/ioctl.h>
+]],[[int w=TIOCGETD;]])],
[AC_DEFINE([HAVE_TIOCGETD], [1],
[Define if the ioctl TIOCGETD is defined])
AC_MSG_RESULT([yes])],
@@ -1810,26 +1765,26 @@ AC_COMPILE_IFELSE(
)
AC_MSG_CHECKING([for __attribute__ extension])
-AC_TRY_COMPILE(,[int __attribute__((unused)) x],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int __attribute__((unused)) x]])],
[AC_DEFINE([HAVE_ATTRIBUTE], [1],
[Define if the __attribute__(()) extension is present])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for __func__ extension])
-AC_TRY_COMPILE(,[ const char *fname = __func__; ],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ const char *fname = __func__; ]])],
[AC_DEFINE([HAVE_C99_FUNC], [1],
[Define if the compiler understands the __func__ keyword])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for __FUNCTION__ extension])
-AC_TRY_COMPILE(,[ const char *fname = __FUNCTION__; ],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],,[[ const char *fname = __FUNCTION__; ]])],
[AC_DEFINE([HAVE_FUNCTION], [1],
[Define if the compiler understands the __FUNCTION__ keyword])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for C99 designated initialization support])
-AC_TRY_COMPILE(,[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
typedef struct {
int x;
union {
@@ -1837,7 +1792,7 @@ AC_TRY_COMPILE(,[
double d;
} u;
} di_struct_t;
- di_struct_t x = {0, { .d = 0.0}}; ],
+ di_struct_t x = {0, { .d = 0.0}}; ]])],
[AC_DEFINE([HAVE_C99_DESIGNATED_INITIALIZER], [1],
[Define if the compiler understands C99 designated initialization of structs and unions])
AC_MSG_RESULT([yes])],
@@ -1867,7 +1822,7 @@ for hdf5_cv_printf_ll in l ll L q unknown; do
done])
AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u])
-AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
+AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
[Width for printf() for type `long long' or `__int64', use `ll'])
@@ -2186,7 +2141,7 @@ if test -n "$PARALLEL"; then
fi
## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with
- ## the empty string. This means that no launch commands were requested,
+ ## the empty string. This means that no launch commands were requested,
## so we will not use any launch commands.
if test "X$RUNSERIAL" = "Xnone"; then
RUNSERIAL=""
@@ -2199,21 +2154,23 @@ if test -n "$PARALLEL"; then
ADD_PARALLEL_FILES="yes"
AC_MSG_CHECKING([for MPI_Comm_c2f and MPI_Comm_f2c functions])
- AC_TRY_LINK([#include <mpi.h>],
- [MPI_Comm c_comm; MPI_Comm_c2f(c_comm)],
- AC_DEFINE([HAVE_MPI_MULTI_LANG_Comm], [1],
- [Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <mpi.h>
+ ]],
+ [[MPI_Comm c_comm; MPI_Comm_c2f(c_comm)]])],
+ [AC_DEFINE([HAVE_MPI_MULTI_LANG_Comm], [1],
+ [Define if MPI_Comm_c2f and MPI_Comm_f2c exist])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])]
)
AC_MSG_CHECKING([for MPI_Info_c2f and MPI_Info_f2c functions])
- AC_TRY_LINK([#include <mpi.h>],
- [MPI_Info c_info; MPI_Info_c2f(c_info)],
- AC_DEFINE([HAVE_MPI_MULTI_LANG_Info], [1],
- [Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mpi.h>]],
+ [[MPI_Info c_info; MPI_Info_c2f(c_info)]])],
+ [AC_DEFINE([HAVE_MPI_MULTI_LANG_Info], [1],
+ [Define if MPI_Info_c2f and MPI_Info_f2c exist])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])]
)
fi
@@ -2252,7 +2209,7 @@ if test -n "$PARALLEL"; then
fi
;;
esac
-
+
if test -n "$mpe_inc"; then
saved_CPPFLAGS="$CPPFLAGS"
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
@@ -2262,7 +2219,7 @@ if test -n "$PARALLEL"; then
else
AC_CHECK_HEADERS([mpe.h],, [unset MPE])
fi
-
+
if test -n "$mpe_lib"; then
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
@@ -2284,10 +2241,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],
@@ -2347,12 +2303,12 @@ AC_DEFINE_UNQUOTED([DEFAULT_PLUGINDIR], ["$default_plugindir"],
## Decide whether the presence of user's exception handling functions is
## checked and data conversion exceptions are returned. This is mainly
## for the speed optimization of hard conversions. Soft conversions can
-## actually benefit little.
+## actually benefit little.
##
AC_MSG_CHECKING([whether exception handling functions is checked during data conversions])
AC_ARG_ENABLE([dconv-exception],
[AS_HELP_STRING([--enable-dconv-exception],
- [if exception handling functions is checked during
+ [if exception handling functions is checked during
data conversions [default=yes]])],
[DCONV_EXCEPTION=$enableval], [DCONV_EXCEPTION=yes])
@@ -2406,9 +2362,9 @@ esac
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine is using a special algorithm to convert
-## 'long double' to '(unsigned) long' values. (This flag should only be set for
-## the IBM Power6 Linux. When the bit sequence of long double is
-## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
+## 'long double' to '(unsigned) long' values. (This flag should only be set for
+## the IBM Power6 Linux. When the bit sequence of long double is
+## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
## The machine's conversion gets the correct value. We define the macro and disable
## this kind of test until we figure out what algorithm they use.
@@ -2429,12 +2385,12 @@ else
unsigned char s[16];
unsigned char s2[8];
int ret = 1;
-
+
if(sizeof(long double) == 16 && sizeof(long) == 8) {
- /*make sure the long double type has 16 bytes in size and
+ /*make sure the long double type has 16 bytes in size and
* 11 bits of exponent. If it is,
- *the bit sequence should be like below. It's not
- *a decent way to check but this info isn't available. */
+ *the bit sequence should be like below. It's not
+ *a decent way to check but this info isn't available. */
memcpy(s, &ld, 16);
if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
@@ -2468,8 +2424,8 @@ else
if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
ret = 0;
- }
- }
+ }
+ }
exit(ret);
]])]
, [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no],)])
@@ -2485,10 +2441,10 @@ fi
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine is using a special algorithm
-## to convert some values of '(unsigned) long' to 'long double' values.
-## (This flag should be off for all machines, except for IBM Power6 Linux,
-## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
-## ..., 7fffff..., the compiler uses a unknown algorithm. We define a
+## to convert some values of '(unsigned) long' to 'long double' values.
+## (This flag should be off for all machines, except for IBM Power6 Linux,
+## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
+## ..., 7fffff..., the compiler uses a unknown algorithm. We define a
## macro and skip the test for now until we know about the algorithm.
##
AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values])
@@ -2506,17 +2462,17 @@ else
unsigned long ull;
unsigned char s[16];
int flag=0, ret=1;
-
+
/*Determine if long double has 16 byte in size, 11 bit exponent, and
- *the bias is 0x3ff */
- if(sizeof(long double) == 16) {
+ *the bias is 0x3ff */
+ if(sizeof(long double) == 16) {
ld = 1.0L;
memcpy(s, &ld, 16);
if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
- s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
- flag = 1;
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
+ flag = 1;
}
-
+
if(flag==1 && sizeof(long)==8) {
ll = 0x003fffffffffffffL;
ld = (long double)ll;
@@ -2532,7 +2488,7 @@ else
s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
ret = 0;
- }
+ }
if(flag==1 && sizeof(unsigned long)==8) {
ull = 0xffffffffffffffffUL;
ld = (long double)ull;
@@ -2550,7 +2506,7 @@ else
s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
ret = 0;
- }
+ }
exit(ret);
]])]
, [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no],)])
@@ -2581,7 +2537,7 @@ if test ${ac_cv_sizeof_long_double} = 0; then
hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no}
else
AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate],
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
int main(void)
{
long double ld = 20041683600089727.779961L;
@@ -2618,7 +2574,7 @@ else
done:
exit(ret);
}
- ], [hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no],)])
+ ]])], [hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no],[])])
fi
if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then
@@ -2644,7 +2600,7 @@ if test ${ac_cv_sizeof_long_double} = 0; then
hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no}
else
AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct],
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
int main(void)
{
long double ld;
@@ -2685,7 +2641,7 @@ else
done:
exit(ret);
}
- ], [hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no],)])
+ ]])],[hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no],[])])
fi
if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then