]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/demo-shared.test, tests/demo-static.test: new tests
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Thu, 21 Jan 1999 03:50:07 +0000 (03:50 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 21 Jan 1999 03:50:07 +0000 (03:50 +0000)
* tests/mdemo-shared.test, tests/mdemo-static.test: ditto
* tests/Makefile.am: ditto
* doc/libtool.texi: document them
* demo/Makefile.am, mdemo/Makefile.am (@STATIC@): do not use
-static unconditionally, it can't work with --disable-static
* demo/configure.in, mdemo/configure.in: check whether libtool was
configured to build static libraries and, if not, set STATIC to an
empty string

ChangeLog
demo/Makefile.am
demo/configure.in
doc/libtool.texi
mdemo/Makefile.am
mdemo/configure.in
tests/Makefile.am
tests/demo-shared.test [new file with mode: 0755]
tests/demo-static.test [new file with mode: 0755]
tests/mdemo-shared.test [new file with mode: 0755]
tests/mdemo-static.test [new file with mode: 0755]

index a7f4b9565469cb5139d501b3967c659d2cca91b2..03360e8a61b253f421a4a12b627d73a83a1c45ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+1999-01-21  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * tests/demo-shared.test, tests/demo-static.test: new tests
+       * tests/mdemo-shared.test, tests/mdemo-static.test: ditto
+       * tests/Makefile.am: ditto
+       * doc/libtool.texi: document them
+       * demo/Makefile.am, mdemo/Makefile.am (@STATIC@): do not use
+       -static unconditionally, it can't work with --disable-static
+       * demo/configure.in, mdemo/configure.in: check whether libtool was 
+       configured to build static libraries and, if not, set STATIC to an 
+       empty string
+
 1999-01-20  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * ltmain.in (module, droppeddeps): if libtool could not satisfy
index 9034bc4668428063740c1af74dda0ce62d8602d5..7cf94b32f97486f94616282bd86cb54e205cf0ed 100644 (file)
@@ -29,7 +29,7 @@ hell_LDADD = libhello.la
 # Create an easier-to-debug version of hell.
 hell_debug_SOURCES = main.c
 hell_debug_LDADD = libhello.la
-hell_debug_LDFLAGS = -static
+hell_debug_LDFLAGS = @STATIC@
 
 if BINARY_HELLDL
 
index f151af9183392e07d4ca0df39465dec879fbc32a..e0fac772d0971e55cb5a198050bd0d70fd6411c6 100644 (file)
@@ -7,6 +7,13 @@ AC_C_CONST
 AC_EXEEXT
 AM_PROG_LIBTOOL
 
+if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
+  STATIC=-static
+else
+  STATIC=
+fi
+AC_SUBST(STATIC)
+
 AM_CONDITIONAL(BINARY_HELLDL, [dnl
 grep '^global_symbol_pipe=..*$' ./libtool >/dev/null])
 
index 7ecde30f2b8942d38430e70421d947eeae0255d0..0baf3b57ed6fdf9d558f9c39cc342674ad4e1b64 100644 (file)
@@ -2830,28 +2830,43 @@ line as an assignment in the libtool script.
 @itemx demo-inst.test
 @itemx demo-make.test
 @itemx demo-unst.test
+@itemx demo-static.test
+@itemx demo-shared.test
 @pindex demo-conf.test
 @pindex demo-exec.test
 @pindex demo-inst.test
 @pindex demo-make.test
 @pindex demo-unst.test
+@pindex demo-static.test
+@pindex demo-shared.test
 These programs check to see that the @file{demo} subdirectory of the
 libtool distribution can be configured, built, installed, and
 uninstalled correctly.
 
 The @file{demo} subdirectory contains a demonstration of a trivial
-package that uses libtool.
+package that uses libtool.  The tests @file{cdemo-make.test},
+@file{cdemo-exec.test}, @file{cdemo-inst.test} and
+@file{cdemo-unst.test} are executed three times, under three different
+libtool configurations: @file{cdemo-conf.test} configures
+@file{cdemo/libtool} to build both static and shared libraries,
+@file{cdemo-static.test} builds only static libraries
+(@samp{--disable-shared}), and @file{cdemo-shared.test} builds only
+shared libraries (@samp{--disable-static}).
 
 @item mdemo-conf.test
 @itemx mdemo-exec.test
 @itemx mdemo-inst.test
 @itemx mdemo-make.test
 @itemx mdemo-unst.test
+@itemx mdemo-static.test
+@itemx mdemo-shared.test
 @pindex mdemo-conf.test
 @pindex mdemo-exec.test
 @pindex mdemo-inst.test
 @pindex mdemo-make.test
 @pindex mdemo-unst.test
+@pindex mdemo-static.test
+@pindex mdemo-shared.test
 These programs check to see that the @file{mdemo} subdirectory of the
 libtool distribution can be configured, built, installed, and
 uninstalled correctly.
@@ -2862,12 +2877,13 @@ load modules.  The library @file{libltdl} provides an experimental
 dlopen wrapper for various platforms (Linux, Solaris, HP/UX, Win32 etc.) 
 including support for dlpreopened modules (@pxref{Dlpreopening}).
 
-NOTE: The tests @file{mdemo-exec.test} and @file{mdemo-inst.test} are
-known to fail on platforms that do not fully support inter-library
-dependencies.  We'd appreciate your help in porting the recently
-introduced inter-library dependencies code to various platforms, even
-some very common platforms haven't been updated yet (@pxref{Porting
-inter-library dependencies}).
+The tests @file{mdemo-make.test}, @file{mdemo-exec.test},
+@file{mdemo-inst.test} and @file{mdemo-unst.test} are executed
+three times, under three different libtool configurations:
+@file{mdemo-conf.test} configures @file{mdemo/libtool} to build both
+static and shared libraries, @file{mdemo-static.test} builds only static
+libraries (@samp{--disable-shared}), and @file{mdemo-shared.test} builds
+only shared libraries (@samp{--disable-static}).
 
 @item cdemo-conf.test
 @itemx cdemo-exec.test
@@ -2878,6 +2894,7 @@ inter-library dependencies}).
 @pindex cdemo-exec.test
 @pindex cdemo-make.test
 @pindex cdemo-static.test
+@pindex cdemo-shared.test
 These programs check to see that the @file{cdemo} subdirectory of the
 libtool distribution can be configured and built correctly.
 
index 31600e7a25305ad405c64bdf50606fcc8b3f7aef..b56c2ecaafd379eebf62a2af3c42c53bb9089bd0 100644 (file)
@@ -32,6 +32,6 @@ mdemo_DEPENDENCIES = ../libltdl/libltdlc.la foo1.la libfoo2.la
 
 # Create an easier-to-debug version of mdemo.
 mdemo_debug_SOURCES = $(mdemo_SOURCES)
-mdemo_debug_LDFLAGS = -static $(mdemo_LDFLAGS)
+mdemo_debug_LDFLAGS = @STATIC@ $(mdemo_LDFLAGS)
 mdemo_debug_LDADD = $(mdemo_LDADD)
 mdemo_debug_DEPENDENCIES = $(mdemo_DEPENDENCIES)
index b070b9083935a01f764ded5985ed5d0e04befc5a..c29c35906599edc4deb4dbdba01ab41dd49eebeb 100644 (file)
@@ -7,6 +7,13 @@ AC_C_CONST
 AC_EXEEXT
 AM_PROG_LIBTOOL
 
+if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
+  STATIC=-static
+else
+  STATIC=
+fi
+AC_SUBST(STATIC)
+
 AC_CHECK_HEADERS(math.h)
 
 AC_CHECK_LIB(m, cos, LIBADD_M="-lm", LIBADD_M=)
index 976f41e60e05dbf5ad505cc69307eac884046d42..a62438015f5290dfcb7bbd0ca48f74cc6ae2720e 100644 (file)
@@ -2,12 +2,20 @@
 
 AUTOMAKE_OPTIONS = gnits
 
-TESTS = demo-conf.test demo-make.test demo-exec.test \
+TESTS = demo-static.test demo-make.test demo-exec.test \
+       demo-inst.test demo-unst.test hardcode.test \
+       mdemo-static.test mdemo-make.test mdemo-exec.test \
+       mdemo-inst.test mdemo-unst.test \
+       cdemo-static.test cdemo-make.test cdemo-exec.test \
+       demo-conf.test demo-make.test demo-exec.test \
        demo-inst.test demo-unst.test hardcode.test \
        mdemo-conf.test mdemo-make.test mdemo-exec.test \
        mdemo-inst.test mdemo-unst.test \
        cdemo-conf.test cdemo-make.test cdemo-exec.test \
-       cdemo-static.test cdemo-make.test cdemo-exec.test \
+       demo-shared.test demo-make.test demo-exec.test \
+       demo-inst.test demo-unst.test hardcode.test \
+       mdemo-shared.test mdemo-make.test mdemo-exec.test \
+       mdemo-inst.test mdemo-unst.test \
        cdemo-shared.test cdemo-make.test cdemo-exec.test \
        link.test link-2.test nomode.test \
        quote.test sh.test suffix.test
diff --git a/tests/demo-shared.test b/tests/demo-shared.test
new file mode 100755 (executable)
index 0000000..64ced1f
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+# demo-conf.test - try configuring the ../demo subdirectory
+
+# Test script header.
+need_prefix=yes
+if test -z "$srcdir"; then
+  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
+  test "$srcdir" = "$0" && srcdir=.
+  test "${VERBOSE+set}" != "set" && VERBOSE=yes
+fi
+. $srcdir/defs || exit 1
+
+# Maybe we have a VPATH build, in which case, create a new subdir.
+test -d ../demo || mkdir ../demo
+
+# Change to our build directory.
+cd ../demo || exit 1
+
+# Possibly clean up the distribution.
+if test -f Makefile; then
+  echo "= Running $make distclean in ../demo"
+  $make distclean
+fi
+rm -f config.cache
+
+# Configure the demonstration.
+echo "= Configuring in ../demo (prefix=$prefix) with --disable-static"
+CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-static || exit 1
+
+exit 0
diff --git a/tests/demo-static.test b/tests/demo-static.test
new file mode 100755 (executable)
index 0000000..9508a9e
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+# demo-conf.test - try configuring the ../demo subdirectory
+
+# Test script header.
+need_prefix=yes
+if test -z "$srcdir"; then
+  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
+  test "$srcdir" = "$0" && srcdir=.
+  test "${VERBOSE+set}" != "set" && VERBOSE=yes
+fi
+. $srcdir/defs || exit 1
+
+# Maybe we have a VPATH build, in which case, create a new subdir.
+test -d ../demo || mkdir ../demo
+
+# Change to our build directory.
+cd ../demo || exit 1
+
+# Possibly clean up the distribution.
+if test -f Makefile; then
+  echo "= Running $make distclean in ../demo"
+  $make distclean
+fi
+rm -f config.cache
+
+# Configure the demonstration.
+echo "= Configuring in ../demo (prefix=$prefix) with --disable-shared"
+CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-shared || exit 1
+
+exit 0
diff --git a/tests/mdemo-shared.test b/tests/mdemo-shared.test
new file mode 100755 (executable)
index 0000000..f1b3fee
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+# mdemo-conf.test - try configuring the ../libltdl and ../mdemo subdirectories
+
+# Test script header.
+need_prefix=yes
+if test -z "$srcdir"; then
+  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
+  test "$srcdir" = "$0" && srcdir=.
+  test "${VERBOSE+set}" != "set" && VERBOSE=yes
+fi
+. $srcdir/defs || exit 1
+
+# Maybe we have a VPATH build, in which case, create a new subdir.
+test -d ../mdemo || mkdir ../mdemo
+
+# Change to our build directory.
+cd ../mdemo || exit 1
+
+# Possibly clean up the distribution.
+if test -f Makefile; then
+  echo "= Running $make distclean in ../mdemo"
+  $make distclean
+fi
+rm -f config.cache
+
+# Configure the demonstration.
+echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-static"
+CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-static || exit 1
+
+exit 0
diff --git a/tests/mdemo-static.test b/tests/mdemo-static.test
new file mode 100755 (executable)
index 0000000..b063fc5
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+# mdemo-conf.test - try configuring the ../libltdl and ../mdemo subdirectories
+
+# Test script header.
+need_prefix=yes
+if test -z "$srcdir"; then
+  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
+  test "$srcdir" = "$0" && srcdir=.
+  test "${VERBOSE+set}" != "set" && VERBOSE=yes
+fi
+. $srcdir/defs || exit 1
+
+# Maybe we have a VPATH build, in which case, create a new subdir.
+test -d ../mdemo || mkdir ../mdemo
+
+# Change to our build directory.
+cd ../mdemo || exit 1
+
+# Possibly clean up the distribution.
+if test -f Makefile; then
+  echo "= Running $make distclean in ../mdemo"
+  $make distclean
+fi
+rm -f config.cache
+
+# Configure the demonstration.
+echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-shared"
+CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-shared || exit 1
+
+exit 0