summaryrefslogtreecommitdiffstats
path: root/hl/fortran/test/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'hl/fortran/test/Makefile.am')
-rw-r--r--hl/fortran/test/Makefile.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am
index 865e91e..a04041b 100644
--- a/hl/fortran/test/Makefile.am
+++ b/hl/fortran/test/Makefile.am
@@ -14,6 +14,14 @@ include $(top_srcdir)/config/commence.am
AM_CPPFLAGS=-I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/hl/src
AM_FCFLAGS=-I$(top_builddir)/fortran/src -I$(top_builddir)/hl/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/hl/fortran/src
+# 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 FORTRAN_SHARED_CONDITIONAL
+else
+ AM_LDFLAGS=-static
+endif
+
# Our main target, the test programs
TEST_PROG=tstlite tstimage tsttable
check_PROGRAMS=$(TEST_PROG)