diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-03-28 17:17:19 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-03-28 17:17:19 (GMT) |
commit | 9138b343aa6b3e314ef6e0a332a2ba3570311427 (patch) | |
tree | eda15db2e838cd7a1226b4c36597edd2092582c9 /configure.ac | |
parent | c76847d107d5fab28e6b9ced5b054669064e984a (diff) | |
download | hdf5-9138b343aa6b3e314ef6e0a332a2ba3570311427.zip hdf5-9138b343aa6b3e314ef6e0a332a2ba3570311427.tar.gz hdf5-9138b343aa6b3e314ef6e0a332a2ba3570311427.tar.bz2 |
[svn-r23480] Reposition conditional and libtool commands.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/configure.ac b/configure.ac index 4f9f7a5..ff5151f 100644 --- a/configure.ac +++ b/configure.ac @@ -1037,11 +1037,6 @@ LT_PREREQ([2.2]) LT_INIT([dlopen]) ## ---------------------------------------------------------------------- -## Set a macro if shared library is enabled. -## -AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"]) - -## ---------------------------------------------------------------------- ## Check if we should install only statically linked executables. ## This check needs to occur after libtool is initialized because ## we check a libtool cache value and may issue a warning based @@ -4440,6 +4435,64 @@ if test -n "$TESTPARALLEL"; then FORTRAN_PARALLEL_MAKE=fortran/$TESTPARALLEL/Makefile fi fi +LT_OUTPUT +no_create=$saved_no_create + +## Then the stamp2 file for H5config.h +touch ./config/stamp2 + +## Finally the makefiles +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +## Post processing to patch up some deficiencies in libtool +case $host_os in + linux* | freebsd* ) + ## If gcc is not used, need to set $wl to use "-Wl," + if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then + : using gcc + else + echo 'fixing $wl in' $ofile +ed - $ofile <<EOF 2> /dev/null +g/^wl=""/s//wl="-Wl,"/ +w +q +EOF + fi + ;; +esac + +## Are we compiling static libraries, shared libraries, or both? This +## is only used for the libhdf5.settings file. We can't just look at +## $enable_static and $enable_shared because if they're yes the ltconfig +## might have decided that one or the other is simply not possible. +## Therefore we have to ask the generated `libtool' shell script +## which 'features' it has enabled. +if (./libtool --features | grep '^enable shared libraries' > /dev/null); then + enable_shared=yes +else + enable_shared=no +fi + +if (./libtool --features | grep '^enable static libraries' > /dev/null); then + enable_static=yes +else + enable_static=no +fi + +if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then + STATIC_SHARED="static, shared" +elif test "X$enable_static" = "Xyes"; then + STATIC_SHARED="static" +elif test "X$enable_shared" = "Xyes"; then + STATIC_SHARED="shared" +else + STATIC_SHARED="none" +fi + +## ---------------------------------------------------------------------- +## Set a macro if shared library is enabled. +## +AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"]) AC_CONFIG_FILES([src/libhdf5.settings Makefile @@ -4519,59 +4572,6 @@ AC_CONFIG_FILES([src/libhdf5.settings hl/fortran/examples/run-hlfortran-ex.sh]) AC_OUTPUT -LT_OUTPUT -no_create=$saved_no_create - -## Then the stamp2 file for H5config.h -touch ./config/stamp2 - -## Finally the makefiles -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -## Post processing to patch up some deficiencies in libtool -case $host_os in - linux* | freebsd* ) - ## If gcc is not used, need to set $wl to use "-Wl," - if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then - : using gcc - else - echo 'fixing $wl in' $ofile -ed - $ofile <<EOF 2> /dev/null -g/^wl=""/s//wl="-Wl,"/ -w -q -EOF - fi - ;; -esac - -## Are we compiling static libraries, shared libraries, or both? This -## is only used for the libhdf5.settings file. We can't just look at -## $enable_static and $enable_shared because if they're yes the ltconfig -## might have decided that one or the other is simply not possible. -## Therefore we have to ask the generated `libtool' shell script -## which 'features' it has enabled. -if (./libtool --features | grep '^enable shared libraries' > /dev/null); then - enable_shared=yes -else - enable_shared=no -fi - -if (./libtool --features | grep '^enable static libraries' > /dev/null); then - enable_static=yes -else - enable_static=no -fi - -if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then - STATIC_SHARED="static, shared" -elif test "X$enable_static" = "Xyes"; then - STATIC_SHARED="static" -elif test "X$enable_shared" = "Xyes"; then - STATIC_SHARED="shared" -else - STATIC_SHARED="none" -fi chmod 755 tools/misc/h5cc |