Update of /cvsroot/pclasses/pclasses2/toc/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21438/toc/tests
Modified Files:
PACKAGE_NAME-config.at libdl.sh libltdl.sh libs11n.sh
Log Message:
mass commit: toc-related fixes/changes
Index: libdl.sh
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/toc/tests/libdl.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- libdl.sh 22 Dec 2004 19:04:25 -0000 1.1
+++ libdl.sh 24 Dec 2004 12:44:04 -0000 1.2
@@ -1,32 +1,28 @@
# toc_run_description = looking for libdl
# toc_begin_help =
#
-# Looks for libdl. It calls toc_export
-# for the following variables:
+# Looks for libdl. It exports the following config variables:
#
# HAVE_LIBDL = 0 or 1
-# LDADD_LIBDL = empty or "-ldl -rdynamic"
-# LDADD_DL = empty or "-ldl -rdynamic", possibly with -L/path...
+# HAVE_DLFCN_H = currently always the same as HAVE_LIBDL.
+# LDADD_LIBDL = empty or "-ldl -rdynamic", possibly with -L/path...
+# LDADD_DL = same as LDADD_LIBDL
#
# Note that LDADD_LIBDL is specific to the libdl test, whereas LDADD_DL is used
-# by both the libdl and libltdl tests.
+# by both the libdl and libltdl tests, and possibly other libdl-like tests.
#
# = toc_end_help
-toc_add_config HAVE_LIBDL=0
-toc_add_config LDADD_LIBDL=
-toc_export LDADD_DL=
-
err=1
-toc_test gcc_build_and_run ${TOC_HOME}/tests/c/check_for_dlopen_and_friends.c -rdynamic -ldl && {
+if toc_test gcc_build_and_run \
+ ${TOC_HOME}/tests/c/check_for_dlopen_and_friends.c -rdynamic -ldl ; then
err=0
toc_export HAVE_LIBDL=1
+ toc_export HAVE_DLFCN_H=1
+ toc_export HAVE_DLOPEN=1
toc_export LDADD_LIBDL="-ldl -rdynamic"
toc_export LDADD_DL="${LDADD_LIBDL}"
-}
+fi
return $err
-
-
-
Index: PACKAGE_NAME-config.at
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/toc/tests/PACKAGE_NAME-config.at,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- PACKAGE_NAME-config.at 22 Dec 2004 19:04:25 -0000 1.1
+++ PACKAGE_NAME-config.at 24 Dec 2004 12:44:04 -0000 1.2
@@ -3,6 +3,12 @@
# This gets filtered at configure-time to create
# ${PACKAGE_NAME}-config.
+
+version="@PACKAGE_VERSION@"
+ldadd="@CLIENT_LDADD@"
+includes="@CLIENT_INCLUDES@"
+prefix="@prefix@"
+
usage() {
cat <<EOF 1>&2
@@ -13,10 +19,14 @@
$0 [options]
Options:
---libs : prints linker information about what libs clients should link to
+--libs : prints linker information about what libs clients should link to.
+ [${ldadd}]
--includes : prints INCLUDES information
+ [$includes]
--prefix : prints the library's installation prefix
+ [$prefix]
--version : prints the library's version
+ [$version]
--toc-make : prints a makefile snippet suitable for use with toc makefiles
--toc-config : prints info suitable for use in a toc configure script
EOF
@@ -28,11 +38,6 @@
exit 1;
}
-version="@PACKAGE_VERSION@"
-ldadd="@CLIENT_LDADD@"
-includes="@CLIENT_INCLUDES@"
-prefix="@prefix@"
-
for arg in "$@"; do
case $arg in
Index: libltdl.sh
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/toc/tests/libltdl.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- libltdl.sh 22 Dec 2004 19:04:25 -0000 1.1
+++ libltdl.sh 24 Dec 2004 12:44:04 -0000 1.2
@@ -20,12 +20,12 @@
err=1
-toc_test gcc_build_and_run ${TOC_HOME}/tests/c/check_for_ltdlopen_and_friends.c -rdynamic -lltdl && {
+if toc_test gcc_build_and_run ${TOC_HOME}/tests/c/check_for_ltdlopen_and_friends.c -rdynamic -lltdl; then
err=0
toc_export HAVE_LIBLTDL=1
toc_export LDADD_LIBLTDL="-lltdl -rdynamic"
toc_export LDADD_DL="${LDADD_LIBLTDL}"
-}
+fi
return $err
Index: libs11n.sh
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/toc/tests/libs11n.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- libs11n.sh 22 Dec 2004 19:04:25 -0000 1.1
+++ libs11n.sh 24 Dec 2004 12:44:04 -0000 1.2
@@ -13,6 +13,8 @@
#
# This test exports the following config vars:
#
+# - HAVE_LIBS11N = 0 or 1
+#
# - LIBS11N_PREFIX: an empty value if the test fails or s11n's
# installation prefix if the test passes.
#
@@ -30,6 +32,12 @@
# = toc_end_help
+toc_export HAVE_LIBS11N=0
+if test x0 = "x${configure_with_s11n-1}"; then
+ echo "s11n was explicitely disabled."
+ return 0
+fi
+
s11n_path=${1-${s11n_prefix-${prefix}}}:${prefix}/bin:${PATH}
toc_find libs11n-config $s11n_path || {
@@ -40,7 +48,7 @@
s11nconfig=${TOC_FIND_RESULT}
-
+toc_export HAVE_LIBS11N=1
toc_export LIBS11N_PREFIX=$($s11nconfig --prefix)
toc_export LIBS11N_CONFIG=$s11nconfig
|