diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 83 |
1 files changed, 58 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac index d92d23a..523a880 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,6 @@ ## ---------------------------------------------------------------------- ## Initialize configure. ## -AC_REVISION($Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest $) AC_PREREQ([2.69]) ## AC_INIT takes the name of the package, the version number, and an @@ -37,18 +36,46 @@ AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # use silent rules where available - automake 1.11 -## AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies -## 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. +## AM_MAINTAINER_MODE determines the behavior of "rebuild rules" that contain +## dependencies for Makefile.in files, configure, src/H5config.h, etc. If +## AM_MAINTAINER_MODE is enabled, these files will be rebuilt if out of date. +## When disabled, the autotools build files can get out of sync and the build +## system will not complain or try to regenerate downstream files. ## -## By default, it is enabled. Users can configure with -## --disable-maintainer-mode to prevent running the autotools. -AM_MAINTAINER_MODE([disable]) +## The AM_MAINTAINER_MODE macro also determines whether the +## --(enable|disable)-maintainer-mode configure option is available. When the +## macro is present, with or without a parameter, the option will be added +## to the generated configure script. +## +## In summary: +## +## AM_MAINTAINER_MODE([enable]) +## - Build dependencies ON by default +## - Configure option exists +## +## AM_MAINTAINER_MODE([disable]) +## - Build dependencies OFF by default +## - Configure option exists +## +## AM_MAINTAINER_MODE +## - Build dependencies OFF by default +## - Configure option exists +## +## No AM_MAINTAINER_MODE macro +## - Build dependencies ON by default +## - No configure option to control build dependencies +## +## The biggest concern for us is that version control systems like git +## usually don't preserve dependencies between timestamps, so the build +## system will often think that upstream build files like Makefile.am are +## dirty and that rebuilding needs to occur when it doesn't. This is a problem +## in release branches where we provide the autotools-generated files. Users +## who don't have autoconf, automake, etc. will then have difficulty building +## release branches checked out from git. +## +## By default, maintainer mode is enabled in development branches and disabled +## in release branches. +AM_MAINTAINER_MODE([enable]) ## ---------------------------------------------------------------------- ## Set prefix default (install directory) to a directory in the build area. @@ -296,7 +323,7 @@ AC_MSG_CHECKING([for clang sanitizer checks]) AC_ARG_ENABLE([sanitize-checks], [AS_HELP_STRING([--enable-sanitize-checks=address], [(clang/clang++ compilers only) Enable sanitize checks. - Address is useful for detecting issues dealing with + Address is useful for detecting issues dealing with memory. See AddressSanitizer in config/sanitizer/README.md for more information. [default=none] @@ -311,7 +338,7 @@ fi if test "X$CC_BASENAME" = "Xclang"; then AC_SUBST([CLANG_SANITIZE_CHECKS]) - # There are several sanitizer tools. At present we are testing + # There are several sanitizer tools. At present we are testing # and describing only -fsanitizer=address with autotools. case "X-$CLANG_SANITIZE_CHECKS" in X-no|X-none) @@ -328,8 +355,8 @@ if test "X$CC_BASENAME" = "Xclang"; then # The clang compiler doesn't support some of them; they should be # checked before adding them to the list in the help message. # The sanitizers/sanitizers.cmake file lists these options: - # address, memory, memoryWithOrigins, undefined, thread, leak, - # 'address;undefined'. Which and which combinations of these are + # address, memory, memoryWithOrigins, undefined, thread, leak, + # 'address;undefined'. Which and which combinations of these are # supported varies by compiler version, but unsupported options # or combinations will result in configure errors reported in config.log. # Comma separated lists of sanitize options wil be entered intact in @@ -1024,7 +1051,10 @@ AC_ARG_ENABLE([tests], [HDF5_TESTS=$enableval]) if test "X$HDF5_TESTS" = "Xno"; then + AC_MSG_RESULT([yes]) echo "Building HDF5 tests is disabled" +else + AC_MSG_RESULT([no]) fi ## ---------------------------------------------------------------------- @@ -1045,7 +1075,10 @@ AC_ARG_ENABLE([tools], [HDF5_TOOLS=$enableval]) if test "X$HDF5_TOOLS" = "Xno"; then + AC_MSG_RESULT([yes]) echo "Building HDF5 tools is disabled" +else + AC_MSG_RESULT([no]) fi ## ---------------------------------------------------------------------- @@ -1594,19 +1627,19 @@ case "X-$withval" in 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]) - if test -n "$szlib_lib"; then 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 + if test "x$HAVE_SZLIB" = "xyes"; then AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB]) - if test -z "$HAVE_SZLIB"; then + if test -n "$HAVE_SZLIB"; then + AC_CHECK_HEADERS([szlib.h], + [HAVE_SZLIB_H="yes"], + [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB]) + else AC_MSG_RESULT([Using SZ_BufftoBuffCompress from libsz in $szlib_lib failed. Szip not enabled.]) fi fi @@ -1892,10 +1925,10 @@ esac ## ---------------------------------------------------------------------- -## Does the struct stat have the st_blocks field? This field is not Posix. +## Does the struct stat have the st_blocks field? This field is not POSIX. ## AC_MSG_CHECKING([for st_blocks in struct stat]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM[[ +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]) @@ -2031,7 +2064,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ AC_MSG_CHECKING([how to print long long]) AC_CACHE_VAL([hdf5_cv_printf_ll], [ -for hdf5_cv_printf_ll in l ll L q unknown; do +for hdf5_cv_printf_ll in ll l L q unknown; do AC_RUN_IFELSE( [AC_LANG_PROGRAM([ #include <stdio.h> |