diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 92 |
1 files changed, 49 insertions, 43 deletions
diff --git a/configure.in b/configure.in index a79d238..08f078d 100644 --- a/configure.in +++ b/configure.in @@ -852,68 +852,74 @@ elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then fi dnl ---------------------------------------------------------------------- -dnl Many Fortran compilers don't support shared libraries. Some of these -dnl compilers include: -dnl pgf90 version 6.0-4 -dnl Absoft 32bit Fortran 95 9.0 -dnl HP F90 v2.4 -dnl Intel Fortran Compiler 8.1 -dnl If any of these compilers is being used, disable shared libraries for -dnl Fortran. This prevents building shared libraries and also prevents -dnl trying to link against shared libraries. -if test "X${HDF_FORTRAN}" = "Xyes"; then +dnl Fortran libraries are not currently supported on Mac. Disable them. +dnl (this is overridable with --enable-unsupported). +dnl +AC_SUBST([H5_FORTRAN_SHARED]) +H5_FORTRAN_SHARED="no" +if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then + AC_MSG_CHECKING([if shared Fortran libraries are supported]) H5_FORTRAN_SHARED="yes" - if (${FC} -V 2>&1 | grep '^pgf90') > /dev/null; then + dnl Disable fortran shared libraries on Mac. (MAM - 03/30/11) + case "`uname`" in + Darwin*) H5_FORTRAN_SHARED="no" - fi + CHECK_WARN="Shared Fortran libraries not currently supported on Mac." + ;; + esac - if (${FC} -V 2>&1 | grep '^Intel(R) Fortran') > /dev/null; then - if (${FC} -v 2>&1 | grep '^Version 8.') > /dev/null; then - H5_FORTRAN_SHARED="no" + dnl Report results of check(s) + if test "X${H5_FORTRAN_SHARED}" = "Xno"; then + AC_MSG_RESULT([no]) + AC_MSG_WARN([$CHECK_WARN]) + if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + AC_MSG_WARN([Disabling shared Fortran libraries.]) + AC_MSG_WARN([To override this behavior, please use --enable-unsupported configure option.]) + if test "X${enable_static}" = "Xno"; then + AC_MSG_ERROR([both static and shared Fortran libraries are disabled]) + fi else -dnl echo 'adding fortran compiler flag needed for building shared libraries' - FCFLAGS="${FCFLAGS} -fPIC" - AM_FCFLAGS="${AM_FCFLAGS} -fPIC" + AC_MSG_WARN([Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag]) + H5_FORTRAN_SHARED="yes" fi - fi - if (${FC} +version 2>&1 | grep '^HP F90') > /dev/null; then - H5_FORTRAN_SHARED="no" - fi - - if (${FC} -V 2>&1 | grep '^Absoft') > /dev/null; then - H5_FORTRAN_SHARED="no" - fi - - if test "X${enable_shared}" != "Xno" && test "X${H5_FORTRAN_SHARED}" = "Xno"; then - AC_MSG_WARN([shared libraries are not supported; disabling shared Fortran libraries]) - fi - - if test "X${enable_static}" = "Xno" && test "X${H5_FORTRAN_SHARED}" = "Xno"; then - AC_MSG_ERROR([both static and shared Fortran libraries are disabled]) + else + AC_MSG_RESULT([yes]) fi fi AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"]) -dnl Disable C++ shared libraries if shared libraries are disabled. -dnl This prevents Automake from trying to link against shared libraries, -dnl which caused problems on tg-login +dnl ---------------------------------------------------------------------- +dnl Disable C++ shared libraries if +DD64 flag is detected. +dnl +AC_SUBST([H5_CXX_SHARED]) H5_CXX_SHARED="no" if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then + AC_MSG_CHECKING([if shared C++ libraries are supported]) H5_CXX_SHARED="yes" -dnl Try to detect the +DD64 flag for HPUX aCC compiler and disable C++ shared libraries if it's -dnl being used. - + dnl Disable C++ shared libraries if DD64 flag is being used. if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'DD64') > /dev/null; then - echo " warning: +DD64 flag detected" - echo " disabling shared C++ libraries" H5_CXX_SHARED="no" + CHECK_WARN="Shared C++ libraries not currently supported with +DD64 flag." fi - if test "X${enable_static}" = "Xno" && test "X${H5_CXX_SHARED}" = "Xno"; then - AC_MSG_ERROR([both static and shared C++ libraries are disabled]) + dnl Report results of check(s) + if test "X${H5_CXX_SHARED}" = "Xno"; then + AC_MSG_RESULT([no]) + AC_MSG_WARN([$CHECK_WARN]) + if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + AC_MSG_WARN([Disabling shared C++ libraries.]) + AC_MSG_WARN([To override this behavior, please use --enable-unsupported configure option.]) + if test "X${enable_static}" = "Xno"; then + AC_MSG_ERROR([both static and shared C++ libraries are disabled]) + fi + else + AC_MSG_WARN([Allowing unsupported C++ shared librares due to use of --enable-unsupported flag]) + fi + else + AC_MSG_RESULT([yes]) fi fi |