summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
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.