From 9138b343aa6b3e314ef6e0a332a2ba3570311427 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 28 Mar 2013 12:17:19 -0500 Subject: [svn-r23480] Reposition conditional and libtool commands. --- configure.ac | 116 +++++++++++++++++++++++++++---------------------------- test/Makefile.am | 18 ++++----- 2 files changed, 66 insertions(+), 68 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 < /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 < /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 diff --git a/test/Makefile.am b/test/Makefile.am index df6a9e5..62b309d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -24,12 +24,11 @@ include $(top_srcdir)/config/commence.am INCLUDES=-I$(top_srcdir)/src -I$(top_builddir)/src # Test script for error_test and err_compat +TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh +SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) if HAVE_SHARED_CONDITIONAL - TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh - SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) plugin$(EXEEXT) -else - TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh - SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) + TEST_SCRIPT += test_plugin.sh + SCRIPT_DEPEND += plugin$(EXEEXT) endif check_SCRIPTS = $(TEST_SCRIPT) @@ -55,10 +54,10 @@ TEST_PROG= testhdf5 lheap ohdr stab gheap cache cache_api cache_tagging \ # 'make check' doesn't run them directly, so they are not included in TEST_PROG. # Also build testmeta, which is used for timings test. It builds quickly, # and this lets automake keep all its test programs in one place. +check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version testmeta links_env if HAVE_SHARED_CONDITIONAL - check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version testmeta links_env plugin + check_PROGRAMS+= plugin else - check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version testmeta links_env endif # These programs generate test files for the tests. They don't need to be @@ -99,10 +98,9 @@ LDADD=libh5test.la $(LIBHDF5) ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \ ttsafe_acreate.c +VFD_LIST = sec2 stdio core split multi family if DIRECT_VFD_CONDITIONAL - VFD_LIST = sec2 stdio core split multi family direct -else - VFD_LIST = sec2 stdio core split multi family + VFD_LIST += direct endif # Additional target for running timing test -- cgit v0.12