summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2010-11-17 18:07:51 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2010-11-17 18:07:51 (GMT)
commit8897a3dcbdcb5569b0a0e3d15cef452beb683e98 (patch)
treefb69979e23b6ac841535c98613218a4218275660 /configure.in
parent30be8ee01c503bfd2f92c27ebcc0c3bef8b6e0a5 (diff)
downloadhdf5-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!)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in90
1 files changed, 64 insertions, 26 deletions
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