diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2010-11-17 18:08:31 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2010-11-17 18:08:31 (GMT) |
commit | e23584d6b792cf7014c3d4d1e5e540ed87aa18da (patch) | |
tree | 2f840e54105d1c34caf03f420660aaaebb1835b6 | |
parent | e0225c649678cd867c8a545ab8e3fe541fc5ccb7 (diff) | |
download | hdf5-e23584d6b792cf7014c3d4d1e5e540ed87aa18da.zip hdf5-e23584d6b792cf7014c3d4d1e5e540ed87aa18da.tar.gz hdf5-e23584d6b792cf7014c3d4d1e5e540ed87aa18da.tar.bz2 |
[svn-r19809] Purpose:
Add "--enable-unsupported" configure flag.
Description
The "--enable-unsupported" configure flag allows a user to
prevent configure from failing due to the use of incompatible
options, such as c++ with parallel.
Specifying --enable-unsupported will bypass all of configure's
checks for incompatible and unsupported combinations of flags.
There are no guarantees that the library will be configured
in any sort of working condition, but that's the risk of
using the --enable-unsupported flag.
I've changed all default error messages related to unsupported
option combinations to indicate that using --enable-unsupported
will allow configure to complete without error.
Tested:
by hand on jam, tested all unsupported configure option
combinations with and without the new flag, making sure
the flag allows configure to finish without error.
(h5committest wouldn't do any good here; it won't test
the new option, and since we're enabling unsupported
combinations, failures are likely to occur in build or
tests with --enable-unsupported turned on anyways.
That's why they're unsupported!)
-rwxr-xr-x | configure | 86 | ||||
-rw-r--r-- | configure.in | 107 | ||||
-rw-r--r-- | release_docs/RELEASE.txt | 7 |
3 files changed, 148 insertions, 52 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 19671 2010-10-27 01:54:11Z koziol . +# From configure.in Id: configure.in 19745 2010-11-09 03:18:18Z koziol . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67 for HDF5 1.8.7-snap1. # @@ -840,6 +840,7 @@ ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking +enable_unsupported enable_fortran enable_cxx enable_shared @@ -1522,6 +1523,7 @@ Optional Features: (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --enable-unsupported Allow unsupported combinations of configure options --enable-fortran Compile the Fortran interface [default=no] --enable-cxx Compile the C++ interface [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] @@ -4930,6 +4932,27 @@ fi CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unsupported combinations of configure options are allowed" >&5 +$as_echo_n "checking if unsupported combinations of configure options are allowed... " >&6; } +# Check whether --enable-unsupported was given. +if test "${enable_unsupported+set}" = set; then : + enableval=$enable_unsupported; ALLOW_UNSUPPORTED=$enableval +fi + + +case "X-$ALLOW_UNSUPPORTED" in + X-|X-no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + X-yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) + ;; +esac + HDF5_INTERFACES="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 $as_echo_n "checking if Fortran interface enabled... " >&6; } @@ -7457,16 +7480,24 @@ if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_productio CC="${CC-cc} -Mx,28,0x8" fi +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 + case "`uname`" in CYGWIN*) $as_echo "#define CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM 1" >>confdefs.h - if test "X${enable_shared}" = "Xyes"; then - echo ' warning: shared libraries are not supported on Cygwin!' - echo ' disabling shared libraries' - fi - enable_shared="no" ;; esac @@ -24100,12 +24131,16 @@ if test "${enable_threadsafe+set}" = set; then : fi -if test "X${HDF_CXX}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - as_fn_error $? "--enable-cxx and --enable-threadsafe flags are incompatible" "$LINENO" 5 +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_CXX}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + as_fn_error $? "--enable-cxx and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 + fi fi -if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - as_fn_error $? "--enable-fortran and --enable-threadsafe flags are incompatible" "$LINENO" 5 +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + as_fn_error $? "--enable-fortran and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 + fi fi case "X-$THREADSAFE" in @@ -25571,19 +25606,25 @@ if test "${enable_parallel+set}" = set; then : fi -if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - as_fn_error $? "--enable-cxx and --enable-parallel flags are incompatible" "$LINENO" 5 +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + as_fn_error $? "--enable-cxx and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 + fi fi -if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - as_fn_error $? "--enable-threadsafe and --enable-parallel flags are incompatible" "$LINENO" 5 +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + as_fn_error $? "--enable-threadsafe and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 + fi fi -if test "X${PARALLEL}" != "X" -a "X${enable_cxx}" = "Xyes" ; then - as_fn_error $? "An MPI compiler is being used; --enable-cxx is not allowed" "$LINENO" 5 -fi -if test "X${PARALLEL}" != "X" -a "X${THREADSAFE}" = "Xyes"; then - as_fn_error $? "An MPI compiler is being used; --enable-threadsafe is not allowed" "$LINENO" 5 +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${PARALLEL}" != "X" -a "X${enable_cxx}" = "Xyes" ; then + as_fn_error $? "An MPI compiler is being used; --enable-cxx is not allowed. Use --enable-unsupported to override this error." "$LINENO" 5 + fi + if test "X${PARALLEL}" != "X" -a "X${THREADSAFE}" = "Xyes"; then + as_fn_error $? "An MPI compiler is being used; --enable-threadsafe is not allowed. Use --enable-unsupported to override this error." "$LINENO" 5 + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for parallel support files" >&5 @@ -28230,12 +28271,13 @@ else as_fn_error $? "invalid version of public symbols given" "$LINENO" 5 fi -if test "X${DEFAULT_API_VERSION}" != "Xv18" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then - as_fn_error $? "Removing old public API symbols not allowed when using them as default public API symbols" "$LINENO" 5 +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${DEFAULT_API_VERSION}" != "Xv18" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then + as_fn_error $? "Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error." "$LINENO" 5 + fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to perform strict file format checks" >&5 $as_echo_n "checking Whether to perform strict file format checks... " >&6; }; # Check whether --enable-strict-format-checks was given. diff --git a/configure.in b/configure.in index 649edfe..f6342d7 100644 --- a/configure.in +++ b/configure.in @@ -346,6 +346,28 @@ dnl AC_PROG_CC CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" +dnl ---------------------------------------------------------------------------- +dnl Configure disallows unsupported combinations of options. However, users +dnl may want to override and build with unsupported combinations for their +dnl own use. They can use the --enable-unsupported configure flag, which +dnl ignores any errors from configure due to incompatible flags. +AC_MSG_CHECKING([if unsupported combinations of configure options are allowed]) +AC_ARG_ENABLE([unsupported], + [AC_HELP_STRING([--enable-unsupported], + [Allow unsupported combinations of configure options])], + [ALLOW_UNSUPPORTED=$enableval]) + +case "X-$ALLOW_UNSUPPORTED" in + X-|X-no) + AC_MSG_RESULT([no]) + ;; + X-yes) + AC_MSG_RESULT([yes]) + ;; + *) + ;; +esac + dnl ---------------------------------------------------------------------- dnl Check if they would like the Fortran interface compiled dnl @@ -909,8 +931,22 @@ if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_productio fi dnl ---------------------------------------------------------------------- -dnl Shared libraries are not currently supported under Cygwin. -dnl +dnl Shared libraries are not currently supported under Cygwin, so configure +dnl 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 + +dnl ---------------------------------------------------------------------- dnl The GCC compiler on Cygwin running on Windows XP has rounding problem dnl in the data conversion dt_arith.c from unsigned long long to long dnl double (see bug #1813). I define a macro here to skip the test for @@ -919,11 +955,6 @@ dnl 2010/5/5 - SLU case "`uname`" in CYGWIN*) AC_DEFINE([CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM], [1], [Define a macro for Cygwin (on XP only) where the compiler has rounding problem converting from unsigned long long to long double]) - if test "X${enable_shared}" = "Xyes"; then - echo ' warning: shared libraries are not supported on Cygwin!' - echo ' disabling shared libraries' - fi - enable_shared="no" ;; esac @@ -1877,14 +1908,20 @@ AC_ARG_ENABLE([threadsafe], THREADSAFE=$enableval) dnl The --enable-threadsafe flag is not compatible with --enable-cxx. -dnl If the user tried to specify both flags, throw an error. -if test "X${HDF_CXX}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - AC_MSG_ERROR([--enable-cxx and --enable-threadsafe flags are incompatible]) +dnl If the user tried to specify both flags, throw an error, unless +dnl they also provided the --enable-unsupported flag. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_CXX}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + AC_MSG_ERROR([--enable-cxx and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) + fi fi -dnl --enable-threadsafe is also incompatible with --enable-fortran. -if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - AC_MSG_ERROR([--enable-fortran and --enable-threadsafe flags are incompatible]) +dnl --enable-threadsafe is also incompatible with --enable-fortran, unless +dnl --enable-unsupported has been specified on the configure line. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + AC_MSG_ERROR([--enable-fortran and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) + fi fi case "X-$THREADSAFE" in @@ -2499,24 +2536,33 @@ AC_ARG_ENABLE([parallel], [Search for MPI-IO and MPI support files])]) dnl The --enable-parallel flag is not compatible with --enable-cxx. -dnl If the user tried to specify both flags, throw an error. -if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - AC_MSG_ERROR([--enable-cxx and --enable-parallel flags are incompatible]) +dnl If the user tried to specify both flags, throw an error, unless +dnl they also provided the --enable-unsupported flag. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + AC_MSG_ERROR([--enable-cxx and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error.]) + fi fi -dnl --enable-parallel is also incompatible with --enable-threadsafe. -if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - AC_MSG_ERROR([--enable-threadsafe and --enable-parallel flags are incompatible]) +dnl --enable-parallel is also incompatible with --enable-threadsafe, unless +dnl --enable-unsupported has been specified on the configure line. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + AC_MSG_ERROR([--enable-threadsafe and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error.]) + fi fi dnl It's possible to build in parallel by specifying a parallel compiler dnl without using the --enable-parallel flag. This isn't allowed with -dnl C++ or threadsafe, either. -if test "X${PARALLEL}" != "X" -a "X${enable_cxx}" = "Xyes" ; then - AC_MSG_ERROR([An MPI compiler is being used; --enable-cxx is not allowed]) -fi -if test "X${PARALLEL}" != "X" -a "X${THREADSAFE}" = "Xyes"; then - AC_MSG_ERROR([An MPI compiler is being used; --enable-threadsafe is not allowed]) +dnl C++ or threadsafe, either, unless the --enable-unsupported flag +dnl has also been specified. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${PARALLEL}" != "X" -a "X${enable_cxx}" = "Xyes" ; then + AC_MSG_ERROR([An MPI compiler is being used; --enable-cxx is not allowed. Use --enable-unsupported to override this error.]) + fi + if test "X${PARALLEL}" != "X" -a "X${THREADSAFE}" = "Xyes"; then + AC_MSG_ERROR([An MPI compiler is being used; --enable-threadsafe is not allowed. Use --enable-unsupported to override this error.]) + fi fi AC_MSG_CHECKING([for parallel support files]) @@ -4142,12 +4188,15 @@ else fi dnl It's an error to try to disable deprecated public API symbols while -dnl choosing an older version of the public API as the default. -if test "X${DEFAULT_API_VERSION}" != "Xv18" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then - AC_MSG_ERROR([Removing old public API symbols not allowed when using them as default public API symbols]) +dnl choosing an older version of the public API as the default. However, +dnl if the user insists on doing this via the --enable-unsupported configure +dnl flag, we'll let them. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${DEFAULT_API_VERSION}" != "Xv18" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then + AC_MSG_ERROR([Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error.]) + fi fi - dnl ---------------------------------------------------------------------- dnl Enable strict file format checks dnl diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d7abf6a..2d08b39 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -56,7 +56,12 @@ New Features Configuration ------------- - - None + - Added a new configure option, "--enable-unsupported", which can + be used to stop configure from preventing the use of unsupported + configure option combinations, such as c++ in parallel or fortran + with threadsafe. Use at your own risk, as it may result in a + library that won't compile or run as expected! + (MAM - 2010/11/17 - Bug 2061) Library ------- |