summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac41
-rw-r--r--fortran/src/Makefile.am2
-rw-r--r--fortran/test/Makefile.am2
-rw-r--r--fortran/testpar/Makefile.am2
-rw-r--r--hl/fortran/src/Makefile.am2
-rw-r--r--hl/fortran/test/Makefile.am2
6 files changed, 46 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index f6ac8cb..175488d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -647,6 +647,47 @@ AC_SUBST([RUNPARALLEL])
AC_SUBST([TESTPARALLEL])
## ----------------------------------------------------------------------
+## Fortran libraries are not currently supported on Mac. Disable them.
+## (this is overridable with --enable-unsupported).
+##
+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"
+
+ ## Disable fortran shared libraries on Mac. (MAM - 03/30/11)
+
+ case "`uname`" in
+ Darwin*)
+ H5_FORTRAN_SHARED="no"
+ CHECK_WARN="Shared Fortran libraries not currently supported on Mac."
+ ;;
+ esac
+
+ ## 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
+ AC_MSG_WARN([Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag])
+ H5_FORTRAN_SHARED="yes"
+ fi
+ else
+ AC_MSG_RESULT([yes])
+ fi
+fi
+
+AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
+
+## ----------------------------------------------------------------------
## Disable C++ shared libraries if +DD64 flag is detected.
##
AC_SUBST([H5_CXX_SHARED])
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index e5db074..a4b3843 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -37,7 +37,7 @@ libhdf5_fortran_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISIO
# Some Fortran compilers can't build shared libraries, so sometimes we
# want to build a shared C library and a static Fortran library. If so,
# pass the -static flag to the library linker.
-if HAVE_SHARED_CONDITIONAL
+if FORTRAN_SHARED_CONDITIONAL
else
AM_LDFLAGS+=-static
endif
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index 6d55250..735ab7a 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -31,7 +31,7 @@ noinst_LTLIBRARIES=libh5test_fortran.la
# Some Fortran compilers can't build shared libraries, so sometimes we
# want to build a shared C library and a static Fortran library. If so,
# pass the -static flag to the library linker.
-if HAVE_SHARED_CONDITIONAL
+if FORTRAN_SHARED_CONDITIONAL
else
AM_LDFLAGS+=-static
endif
diff --git a/fortran/testpar/Makefile.am b/fortran/testpar/Makefile.am
index 60ac23f..517a3c8 100644
--- a/fortran/testpar/Makefile.am
+++ b/fortran/testpar/Makefile.am
@@ -29,7 +29,7 @@ AM_FCFLAGS+=-I$(top_srcdir)/fortran/src -I$(top_srcdir)/fortran/test $(F9XMODFLA
# pass the -static flag to the library linker.
# (Actually, we historically have bad luck combining shared libraries with
# parallel code. But you're welcome to try...)
-if HAVE_SHARED_CONDITIONAL
+if FORTRAN_SHARED_CONDITIONAL
else
AM_LDFLAGS+=-static
endif
diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am
index a540a36..c8c4541 100644
--- a/hl/fortran/src/Makefile.am
+++ b/hl/fortran/src/Makefile.am
@@ -35,7 +35,7 @@ libhdf5hl_fortran_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVIS
# Some Fortran compilers can't build shared libraries, so sometimes we
# want to build a shared C library and a static Fortran library. If so,
# pass the -static flag to the library linker.
-if HAVE_SHARED_CONDITIONAL
+if FORTRAN_SHARED_CONDITIONAL
else
AM_LDFLAGS+=-static
endif
diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am
index 3671cdc..fa3a803 100644
--- a/hl/fortran/test/Makefile.am
+++ b/hl/fortran/test/Makefile.am
@@ -27,7 +27,7 @@ AM_FCFLAGS+=-I$(top_builddir)/fortran/src -I$(top_builddir)/hl/fortran/src $(F9X
# Some Fortran compilers can't build shared libraries, so sometimes we
# need to make sure the Fortran programs link against the static version
# of the HDF5 library. We do this by passing the -static flag to the linker.
-if HAVE_SHARED_CONDITIONAL
+if FORTRAN_SHARED_CONDITIONAL
else
AM_LDFLAGS+=-static
endif