diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2010-11-17 18:07:51 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2010-11-17 18:07:51 (GMT) |
commit | 8897a3dcbdcb5569b0a0e3d15cef452beb683e98 (patch) | |
tree | fb69979e23b6ac841535c98613218a4218275660 | |
parent | 30be8ee01c503bfd2f92c27ebcc0c3bef8b6e0a5 (diff) | |
download | hdf5-8897a3dcbdcb5569b0a0e3d15cef452beb683e98.zip hdf5-8897a3dcbdcb5569b0a0e3d15cef452beb683e98.tar.gz hdf5-8897a3dcbdcb5569b0a0e3d15cef452beb683e98.tar.bz2 |
[svn-r19808] 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 | 77 | ||||
-rw-r--r-- | configure.in | 90 | ||||
-rw-r--r-- | release_docs/RELEASE.txt | 6 |
3 files changed, 125 insertions, 48 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 19740 2010-11-07 14:31:35Z hdftest . +# From configure.in Id: configure.in 19781 2010-11-15 05:04:28Z vchoi . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67 for HDF5 1.9.80. # @@ -839,6 +839,7 @@ ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking +enable_unsupported enable_fortran enable_cxx enable_shared @@ -1519,6 +1520,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] @@ -4922,6 +4924,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; } @@ -7449,15 +7472,18 @@ if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_productio CC="${CC-cc} -Mx,28,0x8" fi -case "`uname`" in - CYGWIN*) - 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 +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 enable_dlopen=yes @@ -25538,19 +25564,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 @@ -28201,12 +28233,13 @@ else as_fn_error $? "invalid version of public symbols given" "$LINENO" 5 fi -if test "X${DEFAULT_API_VERSION}" != "Xv110" -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}" != "Xv110" -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 0271a2f..79bc1cf 100644 --- a/configure.in +++ b/configure.in @@ -345,6 +345,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 @@ -908,16 +930,20 @@ 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. -case "`uname`" in - CYGWIN*) - 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 +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 Create libtool. If shared/static libraries are going to be enabled @@ -2460,24 +2486,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]) @@ -4106,12 +4141,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}" != "Xv110" -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}" != "Xv110" -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 1d17c4e..2a60b70 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -39,6 +39,12 @@ New Features Configuration: ------------- + - 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 parallel + HDF5 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) - PHDF5 changed to use "mpiexec", instead of mpirun, as the default MPI applications startup command as defined in the MPI-2 definition, section 4.1. (AKC - 2010/6/11 - Bug 1921) |