summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-09-16 21:16:11 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-09-16 21:16:11 (GMT)
commitb656c90c8a86eb7cb2d14baaadcc23fd8f22fbad (patch)
tree4b6a7c7abb7be441d37e87ac0d549b421e540186 /configure.in
parentcc8f7d98bf0a373e397faecd14e3480cf5c0777d (diff)
downloadhdf5-b656c90c8a86eb7cb2d14baaadcc23fd8f22fbad.zip
hdf5-b656c90c8a86eb7cb2d14baaadcc23fd8f22fbad.tar.gz
hdf5-b656c90c8a86eb7cb2d14baaadcc23fd8f22fbad.tar.bz2
[svn-r11420] Purpose:
Bug fix Description: Disabled C++ shared libraries for Sun Workshop compiler. Solution: This bug only seems to happen when using the -xarch=v9 flag to compile in 64-bit mode, but disabling shared libraries entirely for this compiler is an easier fix (I don't know how to detect 64 bit mode from the command line). The framework for disabling shared libraries for other C++ compilers is in place. Platforms tested: sol, mir, sleipnir, modi4
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 9f059b9..a5ee50c 100644
--- a/configure.in
+++ b/configure.in
@@ -555,6 +555,29 @@ fi
AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
dnl ----------------------------------------------------------------------
+dnl Sun WorkShop C++ seems to have trouble with shared libraries in 64-bit
+dnl mode. This may be related libtool's historical inability to handle the
+dnl -xarch=v9 flag, or the fact that our tests pass this flag as part of
+dnl the CXX variable rather than as a CXXFLAG.
+dnl Avoid the problem by turning off C++ shared libraries when this
+dnl compiler is involved.
+if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
+ H5_CXX_SHARED="yes"
+
+ if (${CXX} -V 2>&1 | grep 'Sun WorkShop') > /dev/null; then
+ echo " warning: shared libraries are not supported for Sun WorkShop C++!"
+ echo " disabling shared Fortran libraries"
+ H5_CXX_SHARED="no"
+ 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])
+ fi
+fi
+
+AM_CONDITIONAL([CXX_SHARED_CONDITIONAL], [test "X$H5_CXX_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
dnl the problem if optimization is enabled.