summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-05-31 22:07:49 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-05-31 22:07:49 (GMT)
commit1e9354bcf551c16f3ad9d6a4ad42a2bce827c95e (patch)
tree20d28f7dd91b67f06880d6ca6566c1caa3dc06ae /configure.ac
parent734aebc39538039c6e81db63edd68eb3a2029cd2 (diff)
parent5c5ea7e89fbac1d31880d61e6a35ff6034019078 (diff)
downloadhdf5-1e9354bcf551c16f3ad9d6a4ad42a2bce827c95e.zip
hdf5-1e9354bcf551c16f3ad9d6a4ad42a2bce827c95e.tar.gz
hdf5-1e9354bcf551c16f3ad9d6a4ad42a2bce827c95e.tar.bz2
Merge branch 'develop' into windows_open
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index d0aeda9..9695fe3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -918,14 +918,13 @@ 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"
-
- ## Disable fortran shared libraries on Mac. (MAM - 03/30/11)
-
+ ## tell libtool to do the right thing with COMMON symbols, this fixes
+ ## corrupt values with COMMON and EQUIVALENCE when building shared
+ ## Fortran libraries on OSX with gnu and Intel compilers (HDFFV-2772).
case "`uname`" in
Darwin*)
- H5_FORTRAN_SHARED="no"
- CHECK_WARN="Shared Fortran libraries not currently supported on Mac."
- ;;
+ H5_LDFLAGS="$H5_LDFLAGS -Wl,-commons,use_dylibs"
+ ;;
esac
## Report results of check(s)
@@ -3484,6 +3483,14 @@ chmod 755 tools/src/misc/h5cc
if test "X$HDF_FORTRAN" = "Xyes"; then
chmod 755 fortran/src/h5fc
+ ## libtool does not pass the correct argument linker (wl=) for the Intel Fortran compiler
+ ## on OS X, which is needed when building shared libraries on OS X. This script
+ ## replaces the 3rd occurrence, which is for Fortran, of wl="" with wl="-Wl," (HDFFV-2772)
+ case "`uname`" in
+ Darwin*)
+ cat libtool | awk '/wl=\"/{c++;if(c==3){sub("wl=\"\"","wl=\"-Wl,\"");c=0}}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
+ ;;
+ esac
fi
if test "X$HDF_CXX" = "Xyes"; then