summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2011-04-11 21:00:38 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2011-04-11 21:00:38 (GMT)
commite006157deb5866bf45ca0f092d42b7f9969e4209 (patch)
tree3e5e3db5969ab9cff933088a3a54b2f1df1435bb /configure.in
parenta835d1e65a3dbae4feca742db93d0b2e1a9ff29c (diff)
downloadhdf5-e006157deb5866bf45ca0f092d42b7f9969e4209.zip
hdf5-e006157deb5866bf45ca0f092d42b7f9969e4209.tar.gz
hdf5-e006157deb5866bf45ca0f092d42b7f9969e4209.tar.bz2
[svn-r20475] Purpose:
- Revise shared Fortran library disabling scenarios in configure - Improve configure output summary Description: Shared Fortran libraries are not supported on Mac, but were being disabled by configure in a way that also forced the C libraries to be static-only. This has been fixed, so now only shared Fortran is disabled while shared C can remain. This prompted two additional changes: 1. While working on the check that addresses whether or not shared Fortran libraries are allowed, removed old and no longer needed check(s) that disable shared Fortran libraries with HP, Intel 8, PGI, and Absoft compilers. (Essentially, Mac is the only situation in which Fortran shared are disabled by configure.) 2. Having two different states of libraries (i.e. shared C library with static-only Fortran library) was not apparent in the configure summary, which labeled all libraries as either shared and/or static. I've added lines to both the C++ and Fortran output sections to list shared/static-ness of these libraries specifically. Additionally, I've made sure that the new --enable-unsupported configure option correctly overrides configure if it tries to disable a shared library. Tested: jam, fred, & h5committest
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in92
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