diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2017-05-25 18:20:55 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2017-05-25 18:20:55 (GMT) |
commit | 53ab586c4ec7fe8b829ff405217929243ef31f1e (patch) | |
tree | 8bbca9bb9efd788a73493b91aed7c2007b0fbbf1 | |
parent | 6a230585f0380503db2280db0ba069c639bb6103 (diff) | |
parent | 133168d8fcd5210c66d65ba3c1b349f72fd39f0f (diff) | |
download | hdf5-53ab586c4ec7fe8b829ff405217929243ef31f1e.zip hdf5-53ab586c4ec7fe8b829ff405217929243ef31f1e.tar.gz hdf5-53ab586c4ec7fe8b829ff405217929243ef31f1e.tar.bz2 |
Merge pull request #533 in HDFFV/hdf5 from ~BRTNFLD/hdf5_msb:hdf5_1_8 to hdf5_1_8
* commit '133168d8fcd5210c66d65ba3c1b349f72fd39f0f':
Fixed for building shared fortran libraries on OS X, HDFFV-2772
fixed print formatting
-rw-r--r-- | configure.ac | 19 | ||||
-rw-r--r-- | fortran/test/fortranlib_test.f90 | 6 | ||||
-rw-r--r-- | fortran/test/fortranlib_test_1_8.f90 | 6 | ||||
-rw-r--r-- | fortran/test/fortranlib_test_F03.f90 | 6 |
4 files changed, 22 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 7f34ad6c..a5b69c8 100644 --- a/configure.ac +++ b/configure.ac @@ -644,14 +644,13 @@ 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) - + ## tell libtool to do the right thing with COMMON symbols, this fixes + ## corrupt values with COMMON and EQUIVALENCE when building shared + ## Fortran libraries on OSX with gnu and Intel compilers (HDFFV-2772). case "`uname`" in Darwin*) - H5_FORTRAN_SHARED="no" - CHECK_WARN="Shared Fortran libraries not currently supported on Mac." - ;; + H5_LDFLAGS="$H5_LDFLAGS -Wl,-commons,use_dylibs" + ;; esac ## Report results of check(s) @@ -3003,6 +3002,14 @@ chmod 755 tools/misc/h5cc if test "X$HDF_FORTRAN" = "Xyes"; then chmod 755 fortran/src/h5fc + ## libtool does not pass the correct argument linker (wl=) for the Intel Fortran compiler + ## on OS X, which is needed when building shared libraries on OS X. This script + ## replaces the 3rd occurrence, which is for Fortran, of wl="" with wl="-Wl," (HDFFV-2772) + case "`uname`" in + Darwin*) + cat libtool | awk '/wl=\"/{c++;if(c==3){sub("wl=\"\"","wl=\"-Wl,\"");c=0}}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool + ;; + esac fi if test "X$HDF_CXX" = "Xyes"; then diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90 index 79ff161..e4e2fbf 100644 --- a/fortran/test/fortranlib_test.f90 +++ b/fortran/test/fortranlib_test.f90 @@ -50,11 +50,11 @@ PROGRAM fortranlibtest IF(total_error .EQ. 0) THEN WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO") - WRITE(*, '(I1)', advance="NO") majnum + WRITE(*, '(I0)', advance="NO") majnum WRITE(*, '(".")', advance="NO") - WRITE(*, '(I1)', advance="NO") minnum + WRITE(*, '(I0)', advance="NO") minnum WRITE(*, '(" release ")', advance="NO") - WRITE(*, '(I3)') relnum + WRITE(*, '(I0)') relnum ELSE total_error = total_error + 1 ENDIF diff --git a/fortran/test/fortranlib_test_1_8.f90 b/fortran/test/fortranlib_test_1_8.f90 index 320d661..1cbea1d 100644 --- a/fortran/test/fortranlib_test_1_8.f90 +++ b/fortran/test/fortranlib_test_1_8.f90 @@ -48,11 +48,11 @@ PROGRAM fortranlibtest CALL h5get_libversion_f(majnum, minnum, relnum, total_error) IF(total_error .EQ. 0) THEN WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO") - WRITE(*, '(I1)', advance="NO") majnum + WRITE(*, '(I0)', advance="NO") majnum WRITE(*, '(".")', advance="NO") - WRITE(*, '(I1)', advance="NO") minnum + WRITE(*, '(I0)', advance="NO") minnum WRITE(*, '(" release ")', advance="NO") - WRITE(*, '(I3)') relnum + WRITE(*, '(I0)') relnum ELSE total_error = total_error + 1 ENDIF diff --git a/fortran/test/fortranlib_test_F03.f90 b/fortran/test/fortranlib_test_F03.f90 index 1b8cf97..722d431 100644 --- a/fortran/test/fortranlib_test_F03.f90 +++ b/fortran/test/fortranlib_test_F03.f90 @@ -49,11 +49,11 @@ PROGRAM fortranlibtest_F03 CALL h5get_libversion_f(majnum, minnum, relnum, total_error) IF(total_error .EQ. 0) THEN WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO") - WRITE(*, '(I1)', advance="NO") majnum + WRITE(*, '(I0)', advance="NO") majnum WRITE(*, '(".")', advance="NO") - WRITE(*, '(I1)', advance="NO") minnum + WRITE(*, '(I0)', advance="NO") minnum WRITE(*, '(" release ")', advance="NO") - WRITE(*, '(I3)') relnum + WRITE(*, '(I0)') relnum ELSE total_error = total_error + 1 ENDIF |