diff options
Diffstat (limited to 'hl/fortran/src')
-rw-r--r-- | hl/fortran/src/Makefile.am | 8 | ||||
-rw-r--r-- | hl/fortran/src/Makefile.in | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index 2222f90..8c77c9b 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -18,6 +18,14 @@ AM_FCFLAGS=-I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/sr # Our main target, the high-level fortran library lib_LTLIBRARIES=libhdf5hl_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 + # Source files for the library #if BUILD_PARALLEL_CONDITIONAL # PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.f90 diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 09209f8..206428c 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -153,6 +153,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@ @@ -309,6 +311,11 @@ AM_FCFLAGS = -I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/ # Our main target, the high-level fortran library lib_LTLIBRARIES = libhdf5hl_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 + # Source files for the library #if BUILD_PARALLEL_CONDITIONAL # PARALLEL_COND_SRC=HDFDmpiof.c HDF5mpio.f90 |