summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/Makefile.in2
-rw-r--r--fortran/examples/Makefile.in2
-rw-r--r--fortran/src/Makefile.am8
-rw-r--r--fortran/src/Makefile.in7
-rw-r--r--fortran/test/Makefile.am8
-rw-r--r--fortran/test/Makefile.in7
-rw-r--r--fortran/testpar/Makefile.in2
7 files changed, 36 insertions, 0 deletions
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index ab70f03..2a816b4 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -140,6 +140,8 @@ FCFLAGS = @FCFLAGS@
FCLIBS = @FCLIBS@
FFLAGS = @FFLAGS@
FILTERS = @FILTERS@
+FORTRAN_SHARED_CONDITIONAL_FALSE = @FORTRAN_SHARED_CONDITIONAL_FALSE@
+FORTRAN_SHARED_CONDITIONAL_TRUE = @FORTRAN_SHARED_CONDITIONAL_TRUE@
FSEARCH_DIRS = @FSEARCH_DIRS@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 82199b9..61eb63d 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -128,6 +128,8 @@ FCFLAGS = @FCFLAGS@
FCLIBS = @FCLIBS@
FFLAGS = @FFLAGS@
FILTERS = @FILTERS@
+FORTRAN_SHARED_CONDITIONAL_FALSE = @FORTRAN_SHARED_CONDITIONAL_FALSE@
+FORTRAN_SHARED_CONDITIONAL_TRUE = @FORTRAN_SHARED_CONDITIONAL_TRUE@
FSEARCH_DIRS = @FSEARCH_DIRS@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index 9b83a9d..266186f 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -29,6 +29,14 @@ AM_FCLIBS=$(LIBHDF5)
# This is our main target, the fortran library
lib_LTLIBRARIES=libhdf5_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 FORTRAN_SHARED_CONDITIONAL
+else
+ AM_LDFLAGS=-static
+endif
+
# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled
if BUILD_PARALLEL_CONDITIONAL
PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index ab6fb9a..e9d5390 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -195,6 +195,8 @@ FCFLAGS = @FCFLAGS@
FCLIBS = @FCLIBS@
FFLAGS = @FFLAGS@
FILTERS = @FILTERS@
+FORTRAN_SHARED_CONDITIONAL_FALSE = @FORTRAN_SHARED_CONDITIONAL_FALSE@
+FORTRAN_SHARED_CONDITIONAL_TRUE = @FORTRAN_SHARED_CONDITIONAL_TRUE@
FSEARCH_DIRS = @FSEARCH_DIRS@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
@@ -352,6 +354,11 @@ AM_FCLIBS = $(LIBHDF5)
# This is our main target, the fortran library
lib_LTLIBRARIES = libhdf5_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.
+@FORTRAN_SHARED_CONDITIONAL_FALSE@AM_LDFLAGS = -static
@BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.f90
# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index 079119e..5301b90 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -26,6 +26,14 @@ INCLUDES=-I$(top_srcdir)/src -I$(top_builddir)/fortran/src
# The Fortran test library
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 FORTRAN_SHARED_CONDITIONAL
+else
+ AM_LDFLAGS=-static
+endif
+
# Our main targets, the tests themselves
TEST_PROG=fortranlib_test fflush1 fflush2
check_PROGRAMS=$(TEST_PROG)
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index ad8b493..7ac0e8c 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -189,6 +189,8 @@ FCFLAGS = @FCFLAGS@
FCLIBS = @FCLIBS@
FFLAGS = @FFLAGS@
FILTERS = @FILTERS@
+FORTRAN_SHARED_CONDITIONAL_FALSE = @FORTRAN_SHARED_CONDITIONAL_FALSE@
+FORTRAN_SHARED_CONDITIONAL_TRUE = @FORTRAN_SHARED_CONDITIONAL_TRUE@
FSEARCH_DIRS = @FSEARCH_DIRS@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
@@ -347,6 +349,11 @@ INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/fortran/src
# The Fortran test library
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.
+@FORTRAN_SHARED_CONDITIONAL_FALSE@AM_LDFLAGS = -static
+
# Our main targets, the tests themselves
TEST_PROG = fortranlib_test fflush1 fflush2
libh5test_fortran_la_SOURCES = fortranlib_test.f90 tH5F.f90 tH5D.f90 \
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index a071ffd..6724b8c 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -152,6 +152,8 @@ FCFLAGS = @FCFLAGS@
FCLIBS = @FCLIBS@
FFLAGS = @FFLAGS@
FILTERS = @FILTERS@
+FORTRAN_SHARED_CONDITIONAL_FALSE = @FORTRAN_SHARED_CONDITIONAL_FALSE@
+FORTRAN_SHARED_CONDITIONAL_TRUE = @FORTRAN_SHARED_CONDITIONAL_TRUE@
FSEARCH_DIRS = @FSEARCH_DIRS@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@