mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
[svn-r23480] Reposition conditional and libtool commands.
This commit is contained in:
parent
c76847d107
commit
9138b343aa
116
configure.ac
116
configure.ac
@ -1036,11 +1036,6 @@ AC_LIBTOOL_WIN32_DLL
|
||||
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
|
||||
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user