]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* configure.in (AC_CONFIG_SUBDIRS): added cdemo
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Wed, 13 Jan 1999 08:28:35 +0000 (08:28 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 13 Jan 1999 08:28:35 +0000 (08:28 +0000)
* Makefile.am (DIST_SUBDIRS): ditto
(ACINCLUDE_M4_LIST): ditto
* tests/Makefile.am (TESTS): added cdemo-shared.test
* tests/cdemo-static.test: disable shared libraries here
* tests/cdemo-shared.test: disable static libraries here
* doc/libtool.texi (Test descriptions): added cdemo tests
* THANKS: added Edouard G. Parmelan

1999-01-13  Edouard G. Parmelan  <Edouard.Parmelan@France.NCR.COM>

* ltmain.in: fix convenience libraries when static libraries
are disables.
* cdemo/README, cdemo/Makefile.am, cdemo/configure.in, cdemo/foo.h,
cdemo/foo1.c, cdemo/main.c, cdemo/.cvsignore, test/cdemo-conf.test,
test/cdemo-make.test, test/cdemo-exec.test, test/cdemo-static.test:
new tests for convenience libraries.
* autogen, Makefile.am, test/Makefile.am: ditto.

* ltconfig.in, doc/PLATFORMS: Added support for NCR MP-RAS
(i586-ncr-sysv4.3*) with native compiler.
* README, doc/libtool.texi: Added note for NCR MP-RAS compiler.

23 files changed:
ChangeLog
Makefile.am
README
THANKS
autogen
cdemo/.cvsignore [new file with mode: 0644]
cdemo/Makefile.am [new file with mode: 0644]
cdemo/README [new file with mode: 0644]
cdemo/configure.in [new file with mode: 0644]
cdemo/foo.h [new file with mode: 0644]
cdemo/foo1.c [new file with mode: 0644]
cdemo/main.c [new file with mode: 0644]
configure.in
doc/PLATFORMS
doc/libtool.texi
ltconfig.in
ltmain.in
tests/Makefile.am
tests/cdemo-conf.test [new file with mode: 0755]
tests/cdemo-exec.test [new file with mode: 0755]
tests/cdemo-make.test [new file with mode: 0755]
tests/cdemo-shared.test [new file with mode: 0755]
tests/cdemo-static.test [new file with mode: 0755]

index 0ee53c473c658a168c38e480bd13e2107f02da29..92a886c0fc1ed278532d210d813966b2a56e4efc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+1999-01-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * configure.in (AC_CONFIG_SUBDIRS): added cdemo
+       * Makefile.am (DIST_SUBDIRS): ditto
+       (ACINCLUDE_M4_LIST): ditto
+       * tests/Makefile.am (TESTS): added cdemo-shared.test
+       * tests/cdemo-static.test: disable shared libraries here
+       * tests/cdemo-shared.test: disable static libraries here
+       * doc/libtool.texi (Test descriptions): added cdemo tests
+       * THANKS: added Edouard G. Parmelan
+
+1999-01-13  Edouard G. Parmelan  <Edouard.Parmelan@France.NCR.COM>
+
+       * ltmain.in: fix convenience libraries when static libraries
+       are disables.
+       * cdemo/README, cdemo/Makefile.am, cdemo/configure.in, cdemo/foo.h,
+       cdemo/foo1.c, cdemo/main.c, cdemo/.cvsignore, test/cdemo-conf.test,
+       test/cdemo-make.test, test/cdemo-exec.test, test/cdemo-static.test:
+       new tests for convenience libraries.
+       * autogen, Makefile.am, test/Makefile.am: ditto.
+
+       * ltconfig.in, doc/PLATFORMS: Added support for NCR MP-RAS
+       (i586-ncr-sysv4.3*) with native compiler.
+       * README, doc/libtool.texi: Added note for NCR MP-RAS compiler.
+
 1999-01-12  Thomas Tanner  <tanner@gmx.de>
 
        * ltmain.in: before using LN_S remove the symlink
index 77383d7805462fb41758de2536f9b32980254167..ddb2549e0726a763473d333e42f51da3ebf34c09 100644 (file)
@@ -2,7 +2,7 @@
 ## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 AUTOMAKE_OPTIONS = gnits
 SUBDIRS = . doc tests $(BUILD_LTDL)
-DIST_SUBDIRS = . doc tests libltdl demo mdemo # depdemo
+DIST_SUBDIRS = . doc tests libltdl demo mdemo cdemo # depdemo
 
 # We need to export these variables when we run ltconfig.
 CFLAGS = @CFLAGS@
@@ -61,9 +61,11 @@ $(srcdir)/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in
 # We use our own libtool.m4 for these.
 ACINCLUDE_M4_LIST = \
        $(srcdir)/acinclude.m4 \
-       $(srcdir)/demo/acinclude.m4 \
        $(srcdir)/libltdl/acinclude.m4 \
-       $(srcdir)/mdemo/acinclude.m4
+       $(srcdir)/demo/acinclude.m4 \
+       $(srcdir)/mdemo/acinclude.m4 \
+       $(srcdir)/cdemo/acinclude.m4 # \ #
+#      $(srcdir)/depdemo/acinclude.m4
 
 # All our rules should depend on these demo files.
 all check: $(ACINCLUDE_M4_LIST) $(LIBTOOL_DEPS)
diff --git a/README b/README
index e72af818bf38bf93ca3ba2eee5adb22c4e2b2d3b..02754c1f12959d2607b168e23edfce480b4e66bc 100644 (file)
--- a/README
+++ b/README
@@ -19,6 +19,7 @@ Shared library support has been implemented for these platforms:
   GNU/Linux ELF (*-*-linux-gnu*, except aout, coff, and oldld)
   HP-UX 9.x, 10.x, 11.x (*-*-hpux9*, *-*-hpux10*, *-*-hpux11*) [see note]
   IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*)
+  NCR MP-RAS 3.x (*-ncr-sysv4.3*) [see note]
   NetBSD 1.x (*-*-netbsd*)
   OpenBSD 2.x (*-*-openbsd*)
   OS/2 using EMX (*-*-os2*)
@@ -35,6 +36,10 @@ libtool's requirements, so users may report unusual problems.  There
 is no workaround except to install a working sed (such as GNU sed) on
 these systems.
 
+NOTE: The vendor-distributed NCR MP-RAS cc programs emits copyright
+on standard error that confuse tests on size of conftest.err.  The
+workaround is to specify CC when run configure with CC='cc -Hnocopyr'.
+
 NOTE: Any earlier DG/UX system with ELF executables, such as R3.10 or
 R4.10, is also likely to work, but hasn't been explicitly tested.
 
diff --git a/THANKS b/THANKS
index 7055b792600d6da1f51bf45c77fdbefc4654ce58..5754aac3cc4ba5ab750e13f9da1feafcdd4b974a 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -13,6 +13,7 @@ Bruno Haible <haible@ilog.fr>
 Carl D. Roth <roth@cse.ucsc.edu>
 Charles S. Kerr <cskerr@delenn.jccbi.gov>
 Chris P. Ross <cross@eng.us.uu.net>
+Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
 Eric Estievenart <eric@via.ecp.fr>
 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
 H.J. Lu <hjl@gnu.org>
diff --git a/autogen b/autogen
index 5f1185c9adc1d8eba2fa0cf4c675bde61769a2d1..15a882cb5f6983720ad8d5cef65b25261262a00d 100644 (file)
--- a/autogen
+++ b/autogen
@@ -10,7 +10,7 @@ aclocal
 automake --gnits --add-missing
 autoconf
 
-for sub in demo depdemo libltdl mdemo; do
+for sub in demo depdemo libltdl mdemo cdemo; do
   cd $sub
   rm -f acinclude.m4
   ln -s ../libtool.m4 acinclude.m4
diff --git a/cdemo/.cvsignore b/cdemo/.cvsignore
new file mode 100644 (file)
index 0000000..88dae73
--- /dev/null
@@ -0,0 +1,13 @@
+.deps
+.libs
+Makefile
+Makefile.in
+aclocal.m4
+acinclude.m4
+configure
+config.*
+conftest*
+libtool
+*.lo
+*.la
+cdemo
diff --git a/cdemo/Makefile.am b/cdemo/Makefile.am
new file mode 100644 (file)
index 0000000..31774d1
--- /dev/null
@@ -0,0 +1,18 @@
+# A brief demonstration of Libtool modules. -*-Makefile-*-
+#
+AUTOMAKE_OPTIONS = no-dependencies foreign
+
+INCLUDES = -I$(srcdir)/../libltdl
+
+EXTRA_DIST = acinclude.m4
+
+noinst_LTLIBRARIES = libfoo1.la
+
+libfoo1_la_SOURCES = foo1.c
+
+noinst_HEADERS = foo.h
+
+bin_PROGRAMS = cdemo
+
+cdemo_SOURCES = main.c
+cdemo_LDADD = libfoo1.la $(LIBADD_M)
diff --git a/cdemo/README b/cdemo/README
new file mode 100644 (file)
index 0000000..00a1609
--- /dev/null
@@ -0,0 +1,4 @@
+This is mdemo, an example package that uses GNU libtool with an
+Automake-generated environment to build two simple libraries and programs.
+
+It demonstrates how to build convenience libraries
diff --git a/cdemo/configure.in b/cdemo/configure.in
new file mode 100644 (file)
index 0000000..df5a505
--- /dev/null
@@ -0,0 +1,15 @@
+dnl Initialize the cdemo package.
+AC_INIT(main.c)
+AM_INIT_AUTOMAKE(cdemo,0.1)
+
+AC_PROG_CC
+AC_EXEEXT
+AM_PROG_LIBTOOL
+
+AC_CHECK_HEADERS(string.h math.h)
+
+AC_CHECK_LIB(m, cos, LIBADD_M="-lm", LIBADD_M=)
+AC_SUBST(LIBADD_M)
+
+dnl Output the makefile
+AC_OUTPUT(Makefile)
diff --git a/cdemo/foo.h b/cdemo/foo.h
new file mode 100644 (file)
index 0000000..62590b7
--- /dev/null
@@ -0,0 +1,29 @@
+/* foo.h -- interface to the libfoo* libraries
+   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Originally by Thomas Tanner <tanner@gmx.de>
+   This file is part of GNU Libtool.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+USA. */
+
+/* Only include this header file once. */
+#ifndef _FOO_H_
+#define _FOO_H_ 1
+
+/* Silly constants that the functions return. */
+#define HELLO_RET 0xe110
+#define FOO_RET 0xf00
+
+#endif /* !_FOO_H_ */
diff --git a/cdemo/foo1.c b/cdemo/foo1.c
new file mode 100644 (file)
index 0000000..6a02754
--- /dev/null
@@ -0,0 +1,42 @@
+/* foo1.c -- trivial test library
+   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Originally by Thomas Tanner <tanner@gmx.de>
+   This file is part of GNU Libtool.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+USA. */
+
+#include "foo.h"
+#include <stdio.h>
+
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+/* exported functions */
+
+int
+foo1()
+{
+  printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
+  return FOO_RET;
+}
+
+int
+hello()
+{
+  printf ("** This is foolib 1 **\n");
+  return HELLO_RET;
+}
diff --git a/cdemo/main.c b/cdemo/main.c
new file mode 100644 (file)
index 0000000..67e2c11
--- /dev/null
@@ -0,0 +1,41 @@
+/* main.c -- cdemo test program
+   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Originally by Thomas Tanner <tanner@gmx.de>
+   This file is part of GNU Libtool.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+USA. */
+
+#include "foo.h"
+#include <stdio.h>
+
+
+int
+main (int argc, char **argv)
+{
+  int value;
+
+  printf ("Welcome GNU libtool cdemo!\n");
+
+  value = hello();
+  printf ("hello returned: %i\n", value);
+  if (value == HELLO_RET)
+    printf("hello is ok!\n");
+
+  if (foo1 () == FOO_RET)
+    printf("foo1 is ok!\n");
+
+  return 0;
+}
index 7056550445fca95e6818efb0772745a5fc0c40ce..9f83491945a22c1b2c806fd3be18191b7b64f13a 100644 (file)
@@ -28,8 +28,7 @@ AC_PROG_LN_S
 dnl For the `lineno' script (which puts line numbers into `ltconfig').
 AC_PROG_AWK
 
-AC_CONFIG_SUBDIRS(libltdl demo mdemo  dnl #depdemo
-)
+AC_CONFIG_SUBDIRS(libltdl demo mdemo cdemo) dnl #depdemo
 AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
 
 # Local Variables:
index c2744edcde12d3f479a113f7f1c97a8275601f58..753cd49f697f0b79f5c4a81e7ffbdc21c3b58ff8 100644 (file)
@@ -36,6 +36,7 @@ i386-unknown-netbsd1.3I               egcs    1.2e    ok
 i386-unknown-netbsd1.3.3       gcc     1.2e    ok      gcc/g++ 2.7.2.2, gas 1.92.3
 i386-unknown-openbsd2.4                gcc     1.2e    ok
 i486-ncr-sysv4.3.03            gcc     1.2e    ok
+i586-ncr-sysv4.3.03            cc      1.2e    ok      cc -Hnocopyr
 i586-pc-gnu0.3                 gcc     1.2b    ok
 i586-dg-dguxR4.20MU01          gcc     1.2     ok
 i486-pc-linux-gnulibc1         gcc     1.2e    ok
index e4b9fb31c15179947f0dc0fdc755fecf1fed1125..ce26f12c1348acad72e4db2fa18582c5f0c24370 100644 (file)
@@ -2610,8 +2610,39 @@ 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.
+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}).
+
+@item cdemo-conf.test
+@itemx cdemo-exec.test
+@itemx cdemo-make.test
+@itemx cdemo-static.test
+@itemx cdemo-shared.test
+@pindex cdemo-conf.test
+@pindex cdemo-exec.test
+@pindex cdemo-make.test
+@pindex cdemo-static.test
+These programs check to see that the @file{cdemo} subdirectory of the
+libtool distribution can be configured and built correctly.
+
+The @file{cdemo} subdirectory contains a demonstration of libtool
+convenience libraries, a mechanism that allows build-time static
+libraries to be created, in a way that their components can be later
+linked into programs or other libraries, even shared ones.
+
+The tests @file{cdemo-make.test} and @file{cdemo-exec.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}).
+
+NOTE: The tests after @file{cdemo-static.test} are known to fail on all
+platforms.  A fix is underway.
 
 @item hardcode.test
 @pindex hardcode.test
@@ -2877,6 +2908,11 @@ broken, and cannot handle libtool's requirements, so users may report
 unusual problems.  There is no workaround except to install a working
 @code{sed} (such as GNU @code{sed}) on these systems.
 
+Note: The vendor-distributed NCR MP-RAS @code{cc} programs emits
+copyright on standard error that confuse tests on size of
+@file{conftest.err}.  The workaround is to specify @code{CC}
+when run @code{configure} with @kbd{CC='cc -Hnocopyr'}.
+
 @node Platform quirks
 @section Platform quirks
 
index 12e99cf47b0b2ba50b94b6b45d383fef3d13b859..22f1ae71effc9ccbb93f41c0c5c467cbfbe917f9 100755 (executable)
@@ -1294,6 +1294,14 @@ else
     hardcode_shlibpath_var=no
     ;;
 
+  sysv4.3*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs'
+    hardcode_direct=no
+    hardcode_minus_L=no
+    hardcode_shlibpath_var=no
+    export_dynamic_flag_spec='-Bexport'
+    ;;
+
   uts4*)
     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs'
     hardcode_libdir_flag_spec='-L$libdir'
index a239b4f92be5ef2b995fdd0e5d145115229e0ad5..23581d19673e934dcccc4bbe0a164ebd01c07a33 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1292,6 +1292,7 @@ compiler."
        libext=al
        oldlibs="$output_objdir/$libname.$libext $oldlibs"
        build_libtool_libs=convenience
+       build_old_libs=yes
        dependency_libs="$deplibs"
 
        if test -n "$vinfo"; then
index a3fd4bedd65f1b1868e1b9e3d42aced25d83ab06..976f41e60e05dbf5ad505cc69307eac884046d42 100644 (file)
@@ -6,6 +6,9 @@ TESTS = 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 \
+       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/cdemo-conf.test b/tests/cdemo-conf.test
new file mode 100755 (executable)
index 0000000..d8c6ee4
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+# cdemo-conf.test - try configuring the ../cdemo 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 ../cdemo || mkdir ../cdemo
+
+# Change to our build directory.
+cd ../cdemo || 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 ../cdemo (prefix=$prefix)"
+CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix || exit 1
+
+exit 0
diff --git a/tests/cdemo-exec.test b/tests/cdemo-exec.test
new file mode 100755 (executable)
index 0000000..e83cb24
--- /dev/null
@@ -0,0 +1,28 @@
+#! /bin/sh
+# cdemo-exec.test - check that programs in the ../cdemo subdirectory are viable
+
+# Test script header.
+need_prefix=no
+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
+
+if test -f ../cdemo/cdemo; then :
+else
+  echo "You must run cdemo-make.test before running $0" 1>&2
+  exit 1
+fi
+
+# Check to see if the programs really run.
+echo "Executing uninstalled programs in ../cdemo"
+
+if ../cdemo/cdemo; then :
+else
+  echo "$0: cannot execute ../cdemo/cdemo" 1>&2
+  status=1
+fi
+
+exit $status
diff --git a/tests/cdemo-make.test b/tests/cdemo-make.test
new file mode 100755 (executable)
index 0000000..25416b0
--- /dev/null
@@ -0,0 +1,25 @@
+#! /bin/sh
+# cdemo-make.test - try building in the ../cdemo subdirectory
+
+# Test script header.
+need_prefix=no
+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
+
+if test -f ../cdemo/Makefile; then :
+else
+  echo "You must run cdemo-conf.test before running $0" 1>&2
+  exit 1
+fi
+
+# Change to our build directory.
+cd ../cdemo || exit 1
+
+# Do the actual build.
+echo "Making in ../cdemo"
+$make || exit 1
+exit 0
diff --git a/tests/cdemo-shared.test b/tests/cdemo-shared.test
new file mode 100755 (executable)
index 0000000..4d6c157
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+# cdemo-conf.test - try configuring the ../cdemo 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 ../cdemo || mkdir ../cdemo
+
+# Change to our build directory.
+cd ../cdemo || 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 ../cdemo (prefix=$prefix) with --disable-static"
+CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-static || exit 1
+
+exit 0
diff --git a/tests/cdemo-static.test b/tests/cdemo-static.test
new file mode 100755 (executable)
index 0000000..7e253f5
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+# cdemo-conf.test - try configuring the ../cdemo 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 ../cdemo || mkdir ../cdemo
+
+# Change to our build directory.
+cd ../cdemo || 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 ../cdemo (prefix=$prefix) with --disable-static"
+CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-shared || exit 1
+
+exit 0