summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-09-15 21:30:06 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-09-15 21:30:06 (GMT)
commitcc8f7d98bf0a373e397faecd14e3480cf5c0777d (patch)
tree293f1fe8128713c4e30c5ac068a0a3d7077e8521 /configure.in
parent7c3f0740877f30683d9492b97fee97a780d9dd7f (diff)
downloadhdf5-cc8f7d98bf0a373e397faecd14e3480cf5c0777d.zip
hdf5-cc8f7d98bf0a373e397faecd14e3480cf5c0777d.tar.gz
hdf5-cc8f7d98bf0a373e397faecd14e3480cf5c0777d.tar.bz2
[svn-r11418] Purpose:
Bug fix/feature Description: Disabled shared libraries for a number of Fortran compilers that don't support them. This allows other compilers to support shared Fortran libraries. Solution: Added a conditional, SHARED_FORTRAN_CONDITIONAL, which is true if Fortran supports shared libraries. It is set in configure.in. Platforms tested: mir, sleipnir, colonelk, heping
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in50
1 files changed, 43 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 7216b8e..9f059b9 100644
--- a/configure.in
+++ b/configure.in
@@ -504,20 +504,56 @@ dnl As of Libtool 1.5.14, libtool officially doesn't know how to create
dnl shared libraries with pgcc. In fact, it is able to do so on some
dnl platforms, but not all (e.g., pgcc 5.2-4 on mir).
dnl Disable shared libraries when using pgcc. -JL 09/2005
-if (${CC-cc} -V 2>&1 | grep '^pgcc') > /dev/null; then
+if test "X${enable_shared}" != "Xno" && \
+ (${CC-cc} -V 2>&1 | grep '^pgcc') > /dev/null; then
echo ' warning: shared libraries are not supported for pgcc!'
echo ' disabling shared libraries'
enable_shared="no"
fi
-dnl A similar problem seems to exist for pgf90 version 6.0-4.
-if test "X$HDF_FORTRAN" = "Xyes" && \
- (${FC} -V 2>&1 | grep '^pgf90') > /dev/null; then
- echo ' warning: shared libraries are not supported for pgf90!'
- echo ' disabling shared libraries'
- enable_shared="no"
+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.
+if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
+ H5_FORTRAN_SHARED="yes"
+
+ if (${FC} -V 2>&1 | grep '^pgf90') > /dev/null; then
+ echo " warning: shared libraries are not supported for pgf90!"
+ echo " disabling shared Fortran libraries"
+ H5_FORTRAN_SHARED="no"
+ fi
+
+ if (${FC} -V 2>&1 | grep '^Intel(R) Fortran Compiler') > /dev/null; then
+ echo " warning: shared libraries are not supported for ifort!"
+ echo " disabling shared Fortran libraries"
+ H5_FORTRAN_SHARED="no"
+ fi
+
+ if (${FC} +version 2>&1 | grep '^HP F90') > /dev/null; then
+ echo " warning: shared libraries are not supported for f90!"
+ echo " disabling shared Fortran libraries"
+ H5_FORTRAN_SHARED="no"
+ fi
+
+ if (${FC} -V 2>&1 | grep '^Absoft') > /dev/null; then
+ echo " warning: shared libraries are not supported for Absoft f95!"
+ echo " disabling shared Fortran libraries"
+ H5_FORTRAN_SHARED="no"
+ 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])
+ fi
fi
+AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
+
dnl ----------------------------------------------------------------------
dnl pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect
dnl these versions and add option "-Mx,28,0x8" to the compiler to avoid