summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-08-21 22:13:03 (GMT)
committerGitHub <noreply@github.com>2023-08-21 22:13:03 (GMT)
commitceef4a9ebd055f9ec0378a97ec2ce9421cdec866 (patch)
tree887ab50783fb357f8c5f9fe0dee1d6ba5dc536a5 /configure.ac
parent89b4afd4b317c5131cbc8607c99d21b369d050eb (diff)
downloadhdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.zip
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.gz
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.bz2
Merge/update CMake, presets,java and tools (#3393)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac148
1 files changed, 91 insertions, 57 deletions
diff --git a/configure.ac b/configure.ac
index 403a82b..0fad0ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,14 +81,21 @@ AM_MAINTAINER_MODE([enable])
## This allows multiple src-dir builds within one host.
AC_PREFIX_DEFAULT([`pwd`/hdf5])
-## Run post processing on files created by configure.
+## Run post processing on files created by configure
+##
## src/H5pubconf.h:
## Generate src/H5pubconf.h from src/H5config.h by prepending H5_ to all
## macro names. This avoid name conflict between HDF5 macro names and those
## generated by another software package that uses the HDF5 library.
+##
## src/libhdf5.settings:
-## Remove all lines begun with "#" which are generated by CONDITIONAL's of
-## configure.
+## Remove all lines beginning with "#" which are generated by CONDITIONAL's
+## of configure.
+##
+## src/H5build_settings.c
+## Remove all lines beginning with "#" which are generated by CONDITIONAL's
+## of configure. This uses a check for whitespace after the pound sign
+## to avoid clobbering include statements.
AC_CONFIG_COMMANDS([pubconf], [
echo "creating src/H5pubconf.h"
sed 's/#define /#define H5_/' <src/H5config.h |\
@@ -182,6 +189,14 @@ saved_user_JAVAFLAGS="$JAVAFLAGS"
saved_user_LDFLAGS="$LDFLAGS"
saved_user_CPPFLAGS="$CPPFLAGS"
+## Strip out -Werror from CFLAGS since that can cause checks to fail when
+## compiling the test program fails due to warnings
+CFLAGS="`echo $CFLAGS | sed -e 's/-Werror//g'`"
+CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Werror//g'`"
+FCFLAGS="`echo $FCFLAGS | sed -e 's/-Werror//g'`"
+JAVACFLAGS="`echo $JAVACFLAGS | sed -e 's/-Werror//g'`"
+CPPFLAGS="`echo $CPPFLAGS | sed -e 's/-Werror//g'`"
+
## Support F9X variable to define Fortran compiler if FC variable is
## not used. This should be deprecated in the future.
if test "x" = "x$FC"; then
@@ -535,30 +550,6 @@ AC_CHECK_SIZEOF([double])
AC_CHECK_SIZEOF([long double])
## ----------------------------------------------------------------------
-## Check for non-standard extension __FLOAT128
-##
-HAVE_FLOAT128=0
-HAVE_QUADMATH=0
-FLT128_DIG=0
-LDBL_DIG=0
-
-AC_CHECK_SIZEOF([__float128])
-AC_CHECK_SIZEOF([_Quad])
-AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], [])
-PAC_FC_LDBL_DIG
-
-AC_SUBST([PAC_C_MAX_REAL_PRECISION])
-
-if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then
- AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available])
- PAC_C_MAX_REAL_PRECISION=$FLT128_DIG
-else
- PAC_C_MAX_REAL_PRECISION=$LDBL_DIG
-fi
-AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $PAC_C_MAX_REAL_PRECISION, [Determine the maximum decimal precision in C])
-AC_MSG_RESULT([$PAC_C_MAX_REAL_PRECISION])
-
-## ----------------------------------------------------------------------
## Check if the Fortran interface should be enabled
##
@@ -579,6 +570,30 @@ AC_MSG_RESULT([$HDF_FORTRAN])
if test "X$HDF_FORTRAN" = "Xyes"; then
+## ----------------------------------------------------------------------
+## Check for non-standard extension __FLOAT128
+##
+ HAVE_FLOAT128=0
+ HAVE_QUADMATH=0
+ FLT128_DIG=0
+ LDBL_DIG=0
+
+ AC_CHECK_SIZEOF([__float128])
+ AC_CHECK_SIZEOF([_Quad])
+ AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], [])
+ PAC_FC_LDBL_DIG
+
+ AC_SUBST([PAC_C_MAX_REAL_PRECISION])
+
+ if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then
+ AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available])
+ PAC_C_MAX_REAL_PRECISION=$FLT128_DIG
+ else
+ PAC_C_MAX_REAL_PRECISION=$LDBL_DIG
+ fi
+ AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $PAC_C_MAX_REAL_PRECISION, [Determine the maximum decimal precision in C])
+ AC_MSG_RESULT([$PAC_C_MAX_REAL_PRECISION])
+
## We will output an include file for Fortran, H5config_f.inc which
## contains various configure definitions used by the Fortran Library.
## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro
@@ -832,6 +847,7 @@ AC_LANG_POP(C++)
## library is disabled.
AC_SUBST([HDF5_HL])
AC_SUBST([HDF5_HL_TOOLS])
+AC_SUBST([HDF5_HL_GIF_TOOLS])
## The high-level library and high-level tools are enabled unless the build mode
## is clean.
@@ -872,22 +888,6 @@ else
AC_MSG_RESULT([no])
fi
-AC_MSG_CHECKING([if the high-level tools are enabled])
-AC_ARG_ENABLE([hltools],
- [AS_HELP_STRING([--enable-hltools],
- [Enable the high-level tools.
- [default=yes]
- ])],
- [HDF5_HL_TOOLS=$enableval])
-
-if test "X${HDF5_HL}" = "Xyes" -a "X-$HDF5_HL_TOOLS" = "X-yes"; then
- AC_MSG_RESULT([yes])
- HL_TOOLS="tools"
-else
- AC_MSG_RESULT([no])
-fi
-
-
## ----------------------------------------------------------------------
## Enable new references for dimension scales
##
@@ -1179,6 +1179,27 @@ AC_ARG_ENABLE([tools],
AC_MSG_RESULT([$HDF5_TOOLS])
## ----------------------------------------------------------------------
+## Check if they would like to disable building the high-level GIF
+## tools (they have unfixed CVE issues)
+##
+
+AC_MSG_CHECKING([if the high-level GIF tools are enabled])
+AC_ARG_ENABLE([hlgiftools],
+ [AS_HELP_STRING([--enable-hlgiftools],
+ [Enable the high-level GIF tools. NOTE: These have unfixed CVE issues!
+ [default=no]
+ ])],
+ [HDF5_HL_GIF_TOOLS=$enableval])
+
+if test "X-$HDF5_TOOLS" = "X-yes" -a "X-$HDF5_HL" = "X-yes" -a "X-$HDF5_HL_GIF_TOOLS" = "X-yes"; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+ HDF5_HL_GIF_TOOLS="no"
+fi
+
+
+## ----------------------------------------------------------------------
## Check if they would like to enable building doxygen files
##
@@ -1465,7 +1486,12 @@ case "$host_cpu-$host_vendor-$host_os" in
## VFD on Linux systems.
H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS"
;;
-
+ *mingw*)
+ AC_DEFINE([HAVE_WINDOWS], [1], [Define if this is a Windows machine])
+ AC_DEFINE([HAVE_WIN32_API], [1], [Define if on the Windows platform using the Win32 API])
+ AC_DEFINE([HAVE_MINGW], [1], [Define if using MinGW])
+ H5_CPPFLAGS="-D_GNU_SOURCE -D__USE_MINGW_ANSI_STDIO $H5_CPPFLAGS"
+ ;;
esac
## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
@@ -2044,8 +2070,8 @@ if test "X$THREADSAFE" = "Xyes"; then
## supported a priori. POSIX.1-2001 requires that a conformant
## system need only support one of SYSTEM or PROCESS scopes.
##
- ## For cross-compiling, we've added a pessimistic 'no'. You can
- ## hand-hack the config file if you know otherwise.
+ ## CROSS-COMPILING: Use a pessimistic 'no'. You can hand-hack the config
+ ## file if you know otherwise.
AC_MSG_CHECKING([Pthreads supports system scope])
AC_CACHE_VAL([hdf5_cv_system_scope_threads],
[AC_RUN_IFELSE(
@@ -2499,6 +2525,7 @@ case "X-$DEV_WARNINGS" in
;;
X-no)
H5_CFLAGS="$H5_CFLAGS $NO_DEVELOPER_WARNING_CFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_DEVELOPER_WARNING_FCFLAGS"
AC_MSG_RESULT([no])
;;
*)
@@ -3545,12 +3572,13 @@ 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
+## the IBM Power 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.
##
+## CROSS-COMPILING: Assume 'no'
AC_MSG_CHECKING([if using special algorithm to convert long double to (unsigned) long values])
## NOTE: Place all configure test programs into cmake's source file, then use a preprocessor directive
@@ -3565,7 +3593,7 @@ else
AC_CACHE_VAL([hdf5_cv_ldouble_to_long_special],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE([$TEST_SRC])]
- , [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no],)])
+ , [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no], [hdf5_cv_ldouble_to_long_special=no])])
fi
if test ${hdf5_cv_ldouble_to_long_special} = "yes"; then
@@ -3579,11 +3607,12 @@ 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,
+## (This flag should be off for all machines, except for IBM Power 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.
##
+## CROSS-COMPILING: Assume 'no'
AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values])
TEST_SRC="`(echo \"#define H5_LONG_TO_LDOUBLE_SPECIAL_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
@@ -3594,7 +3623,7 @@ else
AC_CACHE_VAL([hdf5_cv_long_to_ldouble_special],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE([$TEST_SRC])]
- , [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no],)])
+ , [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no], [hdf5_cv_long_to_ldouble_special=no])])
fi
if test ${hdf5_cv_long_to_ldouble_special} = "yes"; then
@@ -3616,6 +3645,7 @@ fi
## 0x4351ccf385ebc8a0ffcc... will make the converted values wildly wrong.
## This test detects this wrong behavior and disable the test.
##
+## CROSS-COMPILING: Assume 'yes'
AC_MSG_CHECKING([if correctly converting long double to (unsigned) long long values])
TEST_SRC="`(echo \"#define H5_LDOUBLE_TO_LLONG_ACCURATE_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
@@ -3625,7 +3655,7 @@ if test ${ac_cv_sizeof_long_double} = 0; then
else
AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate],
[AC_RUN_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],
- [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], [hdf5_cv_ldouble_to_llong_accurate=yes])])
fi
if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then
@@ -3645,6 +3675,7 @@ fi
## When the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
## ..., 7fffff..., the converted values are twice as big as they should be.
##
+## CROSS-COMPILING: Assume 'yes'
AC_MSG_CHECKING([if correctly converting (unsigned) long long to long double values])
TEST_SRC="`(echo \"#define H5_LLONG_TO_LDOUBLE_CORRECT_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
@@ -3654,7 +3685,7 @@ if test ${ac_cv_sizeof_long_double} = 0; then
else
AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct],
[AC_RUN_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],
- [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], [hdf5_cv_llong_to_ldouble_correct=yes])])
fi
if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then
@@ -3669,6 +3700,7 @@ fi
## Set the flag to indicate that the machine is IBM ppc64le and cannot
## accurately convert some long double values.
##
+## CROSS-COMPILING: Assume 'yes'
AC_MSG_CHECKING([if the system is IBM ppc64le and cannot correctly convert some long double values])
TEST_SRC="`(echo \"#define H5_DISABLE_SOME_LDOUBLE_CONV_TEST 1\"; cat $srcdir/config/cmake/ConversionTests.c)`"
@@ -3678,7 +3710,7 @@ if test ${ac_cv_sizeof_long_double} = 0; then
else
AC_CACHE_VAL([hdf5_cv_disable_some_ldouble_conv],
[AC_RUN_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],
- [hdf5_cv_disable_some_ldouble_conv=yes], [hdf5_cv_disable_some_ldouble_conv=no],[])])
+ [hdf5_cv_disable_some_ldouble_conv=yes], [hdf5_cv_disable_some_ldouble_conv=no], [hdf5_cv_disable_some_ldouble_conv=yes])])
fi
if test ${hdf5_cv_disable_some_ldouble_conv} = "yes"; then
@@ -3882,11 +3914,13 @@ esac
AC_SUBST([DEFAULT_API_VERSION])
AC_MSG_CHECKING([which version of public symbols to use by default])
AC_ARG_WITH([default-api-version],
- [AS_HELP_STRING([--with-default-api-version=(v16|v18|v110|v112)],
+ [AS_HELP_STRING([--with-default-api-version=(default|v16|v18|v110|v112)],
[Specify default release version of public symbols
[default=v112]])],,
[withval=v112])
+## Allowing "default" allows the GitHub CI to check that we didn't forget
+## to change the defaults when creating a new major version
if test "X$withval" = "Xv16"; then
AC_MSG_RESULT([v16])
DEFAULT_API_VERSION=v16
@@ -4059,7 +4093,7 @@ AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"])
AM_CONDITIONAL([BUILD_TESTS_CONDITIONAL], [test "X$HDF5_TESTS" = "Xyes"])
AM_CONDITIONAL([BUILD_TESTS_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
AM_CONDITIONAL([BUILD_TOOLS_CONDITIONAL], [test "X$HDF5_TOOLS" = "Xyes"])
-AM_CONDITIONAL([BUILD_TOOLS_HL_CONDITIONAL], [test "X$HDF5_HL_TOOLS" = "Xyes"])
+AM_CONDITIONAL([BUILD_TOOLS_HL_GIF_CONDITIONAL], [test "X$HDF5_HL_GIF_TOOLS" = "Xyes"])
AM_CONDITIONAL([BUILD_DOXYGEN_CONDITIONAL], [test "X$HDF5_DOXYGEN" = "Xyes"])
## ----------------------------------------------------------------------
@@ -4164,10 +4198,10 @@ fi
##
AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"])
-AC_CONFIG_FILES([src/libhdf5.settings
- Makefile
+AC_CONFIG_FILES([Makefile
doxygen/Doxyfile
src/Makefile
+ src/libhdf5.settings
test/Makefile
test/H5srcdir_str.h
test/testabort_fail.sh