summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-09-15 21:30:06 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-09-15 21:30:06 (GMT)
commitcc8f7d98bf0a373e397faecd14e3480cf5c0777d (patch)
tree293f1fe8128713c4e30c5ac068a0a3d7077e8521 /fortran/test
parent7c3f0740877f30683d9492b97fee97a780d9dd7f (diff)
downloadhdf5-cc8f7d98bf0a373e397faecd14e3480cf5c0777d.zip
hdf5-cc8f7d98bf0a373e397faecd14e3480cf5c0777d.tar.gz
hdf5-cc8f7d98bf0a373e397faecd14e3480cf5c0777d.tar.bz2
[svn-r11418] Purpose:
Bug fix/feature Description: Disabled shared libraries for a number of Fortran compilers that don't support them. This allows other compilers to support shared Fortran libraries. Solution: Added a conditional, SHARED_FORTRAN_CONDITIONAL, which is true if Fortran supports shared libraries. It is set in configure.in. Platforms tested: mir, sleipnir, colonelk, heping
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/Makefile.am8
-rw-r--r--fortran/test/Makefile.in7
2 files changed, 15 insertions, 0 deletions
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 \