summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2011-11-21 23:15:54 +0700
committerGary V. Vaughan <gary@gnu.org>2012-10-04 20:11:05 +0700
commitbcc0740c8bea00db2219de693de8c93cfcad78ab (patch)
tree92168b22e3c98283763249a481f5ab971f0f9fe0
parent848524eac71f05b671f77cd42e62489897a0f9eb (diff)
downloadlibtool-bcc0740c8bea00db2219de693de8c93cfcad78ab.tar.gz
tests: migrate legacy tests/cdemo tests to Autotest.
* tests/cdemo.at: New Autotest groups, based on... * tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared-exec.test, tests/cdemo-shared-make.test, tests/cdemo-shared.test, tests/cdemo-static-exec.test, tests/cdemo-static-make.test, tests/cdemo-static.test, tests/cdemo-undef-exec.test, tests/cdemo-undef-make.test, tests/cdemo-undef.test: ...these legacy test cases, now removed. tests/cdemo/Makefile.am, tests/cdemo/README, tests/cdemo/configure.ac, tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c: Remove. * configure.ac (CONF_SUBDIRS): Remove tests/cdemo. * Makefile.am: Adjust. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r--Makefile.am29
-rw-r--r--configure.ac2
-rwxr-xr-xtests/cdemo-conf.test34
-rwxr-xr-xtests/cdemo-exec.test34
-rwxr-xr-xtests/cdemo-make.test34
-rwxr-xr-xtests/cdemo-shared-exec.test3
-rwxr-xr-xtests/cdemo-shared-make.test3
-rwxr-xr-xtests/cdemo-shared.test34
-rwxr-xr-xtests/cdemo-static-exec.test3
-rwxr-xr-xtests/cdemo-static-make.test3
-rwxr-xr-xtests/cdemo-static.test34
-rwxr-xr-xtests/cdemo-undef-exec.test3
-rwxr-xr-xtests/cdemo-undef-make.test3
-rwxr-xr-xtests/cdemo-undef.test49
-rw-r--r--tests/cdemo.at193
-rw-r--r--tests/cdemo/.gitignore1
-rw-r--r--tests/cdemo/Makefile.am53
-rw-r--r--tests/cdemo/README4
-rw-r--r--tests/cdemo/configure.ac63
-rw-r--r--tests/cdemo/foo.c42
-rw-r--r--tests/cdemo/foo.h37
-rw-r--r--tests/cdemo/main.c45
-rw-r--r--tests/testsuite.at16
23 files changed, 213 insertions, 509 deletions
diff --git a/Makefile.am b/Makefile.am
index d470d392..5b71860c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -626,13 +626,14 @@ TESTSUITE = tests/testsuite
TESTSUITE_AT = tests/testsuite.at \
tests/getopt-m4sh.at \
tests/libtoolize.at \
+ tests/cdemo.at \
+ tests/convenience.at \
tests/help.at \
tests/duplicate_members.at \
tests/duplicate_conv.at \
tests/duplicate_deps.at \
tests/flags.at \
tests/inherited_flags.at \
- tests/convenience.at \
tests/link-order.at \
tests/link-order2.at \
tests/fail.at \
@@ -872,9 +873,6 @@ COMMON_TESTS = \
tests/quote.test \
tests/suffix.test \
tests/tagtrace.test \
- tests/cdemo-static.test \
- tests/cdemo-static-make.test \
- tests/cdemo-static-exec.test \
tests/demo-static.test \
tests/demo-static-make.test \
tests/demo-static-exec.test \
@@ -890,9 +888,6 @@ COMMON_TESTS = \
tests/mdemo-static-exec.test \
tests/mdemo-static-inst.test \
tests/mdemo-static-unst.test \
- tests/cdemo-conf.test \
- tests/cdemo-make.test \
- tests/cdemo-exec.test \
tests/demo-conf.test \
tests/demo-make.test \
tests/demo-exec.test \
@@ -933,17 +928,11 @@ COMMON_TESTS = \
tests/demo-nopic.test \
tests/demo-nopic-make.test \
tests/demo-nopic-exec.test \
- tests/cdemo-shared.test \
- tests/cdemo-shared-make.test \
- tests/cdemo-shared-exec.test \
tests/mdemo-shared.test \
tests/mdemo-shared-make.test \
tests/mdemo-shared-exec.test \
tests/mdemo-shared-inst.test \
- tests/mdemo-shared-unst.test \
- tests/cdemo-undef.test \
- tests/cdemo-undef-make.test \
- tests/cdemo-undef-exec.test
+ tests/mdemo-shared-unst.test
# Actually, only demo-relink and depdemo-relink require interaction,
# but they depend on the other tests being run beforehand.
@@ -963,18 +952,6 @@ INTERACTIVE_TESTS = \
tests/depdemo-relink.test \
tests/depdemo-shared-unst.test
-tests/cdemo-undef-exec.log: tests/cdemo-undef-make.log
-tests/cdemo-undef-make.log: tests/cdemo-undef.log
-tests/cdemo-undef.log: $(ORDER) tests/cdemo-shared-exec.log
-tests/cdemo-shared-exec.log: tests/cdemo-shared-make.log
-tests/cdemo-shared-make.log: tests/cdemo-shared.log
-tests/cdemo-shared.log: $(ORDER) tests/cdemo-exec.log
-tests/cdemo-exec.log: tests/cdemo-make.log
-tests/cdemo-make.log: tests/cdemo-conf.log
-tests/cdemo-conf.log: $(ORDER) tests/cdemo-static-exec.log
-tests/cdemo-static-exec.log: tests/cdemo-static-make.log
-tests/cdemo-static-make.log: tests/cdemo-static.log
-
tests/demo-shared-unst.log: tests/demo-noinst-link.log
tests/demo-noinst-link.log: tests/demo-relink.log
tests/demo-relink.log: tests/demo-hardcode.log
diff --git a/configure.ac b/configure.ac
index 517f7066..5384ddf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,7 +126,7 @@ AC_SUBST([pkgaux_scripts])
# All subdirectories that are configured on demand, but that must be
# included in the distribution.
-CONF_SUBDIRS="tests/cdemo tests/demo tests/depdemo tests/f77demo tests/fcdemo \
+CONF_SUBDIRS="tests/demo tests/depdemo tests/f77demo tests/fcdemo \
tests/mdemo tests/mdemo2 tests/pdemo tests/tagdemo"
AC_SUBST([CONF_SUBDIRS])
diff --git a/tests/cdemo-conf.test b/tests/cdemo-conf.test
deleted file mode 100755
index 4869730e..00000000
--- a/tests/cdemo-conf.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# cdemo-conf.test - try configuring the cdemo subdirectory
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2003
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_mkprefixdir
-func_cd "tests/cdemo"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-exit 0
diff --git a/tests/cdemo-exec.test b/tests/cdemo-exec.test
deleted file mode 100755
index dce62f23..00000000
--- a/tests/cdemo-exec.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# cdemo-exec.test - check that programs in the cdemo subdirectory are viable
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2003
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_require "cdemo-make" "tests/cdemo/cdemo$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/cdemo/cdemo$EXEEXT"
-
-exit $exec_status
diff --git a/tests/cdemo-make.test b/tests/cdemo-make.test
deleted file mode 100755
index 08e70a53..00000000
--- a/tests/cdemo-make.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# cdemo-make.test - try building in the cdemo subdirectory
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2003
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_require "cdemo-conf" "tests/cdemo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/cdemo"
-func_make
-
-exit 0
diff --git a/tests/cdemo-shared-exec.test b/tests/cdemo-shared-exec.test
deleted file mode 100755
index c784065a..00000000
--- a/tests/cdemo-shared-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/cdemo-exec.test
diff --git a/tests/cdemo-shared-make.test b/tests/cdemo-shared-make.test
deleted file mode 100755
index 254b3d41..00000000
--- a/tests/cdemo-shared-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/cdemo-make.test
diff --git a/tests/cdemo-shared.test b/tests/cdemo-shared.test
deleted file mode 100755
index 2d58bd33..00000000
--- a/tests/cdemo-shared.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# cdemo-shared.test - try configuring the cdemo subdirectory for shared libs
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2003
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_mkprefixdir
-func_cd "tests/cdemo"
-func_make_distclean
-func_configure "--disable-static"
-func_check_static_shared "no" "yes"
-
-exit 0
diff --git a/tests/cdemo-static-exec.test b/tests/cdemo-static-exec.test
deleted file mode 100755
index c784065a..00000000
--- a/tests/cdemo-static-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/cdemo-exec.test
diff --git a/tests/cdemo-static-make.test b/tests/cdemo-static-make.test
deleted file mode 100755
index 254b3d41..00000000
--- a/tests/cdemo-static-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/cdemo-make.test
diff --git a/tests/cdemo-static.test b/tests/cdemo-static.test
deleted file mode 100755
index 36ac2c56..00000000
--- a/tests/cdemo-static.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# cdemo-static.test - try configuring the cdemo subdirectory for static libs
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2003
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_mkprefixdir
-func_cd "tests/cdemo"
-func_make_distclean
-func_configure "--disable-shared"
-func_check_static_shared "yes" "no"
-
-exit 0
diff --git a/tests/cdemo-undef-exec.test b/tests/cdemo-undef-exec.test
deleted file mode 100755
index c784065a..00000000
--- a/tests/cdemo-undef-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/cdemo-exec.test
diff --git a/tests/cdemo-undef-make.test b/tests/cdemo-undef-make.test
deleted file mode 100755
index 254b3d41..00000000
--- a/tests/cdemo-undef-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/cdemo-make.test
diff --git a/tests/cdemo-undef.test b/tests/cdemo-undef.test
deleted file mode 100755
index 732e3553..00000000
--- a/tests/cdemo-undef.test
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/sh
-# cdemo-undef - test generating shared libraries with undefined symbols
-#
-# Copyright (C) 2003, 2004, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2003
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_mkprefixdir
-func_cd "tests/cdemo"
-func_make_distclean
-func_configure "--disable-static"
-
-grep '^allow_undefined_flag=.\{0,1\}unsupported.\{0,1\}$' ./libtool >/dev/null 2>&1 \
- && func_skip "$host doesn't support undefined symbols in shared libs"
-
-if test -f ./libtool; then
- $SED 's|allow_undefined=no|allow_undefined=yes|g' ./libtool > ltnew
-else
- exit 1
-fi
-
-if test -f ./ltnew; then
- rm -f libtool
- mv ltnew libtool
-else
- exit 1
-fi
-
-exit 0
diff --git a/tests/cdemo.at b/tests/cdemo.at
new file mode 100644
index 00000000..7a2f3693
--- /dev/null
+++ b/tests/cdemo.at
@@ -0,0 +1,193 @@
+# cdemo.at -- Using Automake to build a program and library -*- Autotest -*-
+#
+# Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2003
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+
+AT_BANNER([Convenience libraries.])
+
+
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[AT_DATA([configure.ac],
+[[AC_INIT([cdemo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+LT_INIT
+AC_SUBST([LIBTOOL_DEPS])
+LT_LIB_M
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_HEADERS([config.h:config.in.h])
+AC_OUTPUT
+]])
+
+AT_DATA([Makefile.am],
+[[AUTOMAKE_OPTIONS = no-dependencies foreign
+ACLOCAL_AMFLAGS = -I m4
+
+noinst_LTLIBRARIES = libfoo.la
+libfoo_la_SOURCES = foo.c
+libfoo_la_LIBADD = $(LIBM)
+libfoo_la_LDFLAGS = -no-undefined
+noinst_HEADERS = foo.h
+
+bin_PROGRAMS = cdemo
+cdemo_SOURCES = main.c
+cdemo_LDADD = libfoo.la
+
+libtool: $(LIBTOOL_DEPS)
+ $(SHELL) ./config.status --recheck
+]])
+
+AT_DATA([foo.h],
+[[#ifndef FOO_H
+#define FOO_H 1
+
+/* Silly constants that the functions return. */
+#define HELLO_RET 0xe110
+#define FOO_RET 0xf00
+
+extern int foo();
+
+extern int hello();
+
+#endif
+]])
+
+AT_DATA([foo.c],
+[[#include <config.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "foo.h"
+
+int foo() {
+ printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
+ return FOO_RET;
+}
+
+int hello() {
+ printf ("** This is libfoo **\n");
+ return HELLO_RET;
+}
+]])
+
+AT_DATA([main.c],
+[[#include <config.h>
+#include <stdio.h>
+#include "foo.h"
+
+int main ()
+{
+ int value;
+
+ printf ("Welcome to GNU libtool cdemo!\n");
+
+ value = hello();
+ printf ("hello returned: %i\n", value);
+ if (value == HELLO_RET)
+ printf("hello is ok!\n");
+
+ if (foo () == FOO_RET)
+ printf("foo is ok!\n");
+
+ return 0;
+}
+]])
+
+AT_DATA([expout],
+[[Welcome to GNU libtool cdemo!
+** This is libfoo **
+hello returned: 57616
+hello is ok!
+cos (0.0) = 1
+foo is ok!
+]])
+]) # _LT_SETUP
+
+
+## ------------- ##
+## Cdemo static. ##
+## ------------- ##
+
+AT_SETUP([build and link against a static library])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-shared],
+ [^build_old_libs=yes], [^build_libtool_libs=no])
+LT_AT_CHECK_EXECUTE([], [./cdemo])
+
+AT_CLEANUP
+
+
+## ------------- ##
+## Cdemo shared. ##
+## ------------- ##
+
+AT_SETUP([build and link against a dynamic library])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-static],
+ [^build_old_libs=no], [^build_libtool_libs=yes])
+LT_AT_CHECK_EXECUTE([], [./cdemo])
+
+AT_CLEANUP
+
+
+## ----------- ##
+## Cdemo conf. ##
+## ----------- ##
+
+AT_SETUP([build both static and dynamic])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([],
+ [^build_old_libs=yes], [^build_libtool_libs=yes])
+LT_AT_CHECK_EXECUTE([], [./cdemo])
+
+AT_CLEANUP
+
+
+## ------------ ##
+## Cdemo undef. ##
+## ------------ ##
+
+AT_SETUP([allow_undefined_flag])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-static])
+
+AT_CHECK([$EGREP "^allow_undefined_flag=.\{0,1\}unsupported.\{0,1\}$" libtool && (exit 77)],
+ 1, [ignore])
+
+sed 's|allow_undefined=no|allow_undefined=yes|g' libtool > ltnew && mv -f ltnew libtool
+
+LT_AT_CHECK_EXECUTE([], [./cdemo])
+
+AT_CLEANUP
diff --git a/tests/cdemo/.gitignore b/tests/cdemo/.gitignore
deleted file mode 100644
index f8d8b0ea..00000000
--- a/tests/cdemo/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/cdemo
diff --git a/tests/cdemo/Makefile.am b/tests/cdemo/Makefile.am
deleted file mode 100644
index 148ca53c..00000000
--- a/tests/cdemo/Makefile.am
+++ /dev/null
@@ -1,53 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## Copyright (C) 2003, 2004, 2005 Free Software Foundation
-## Written by Gary V. Vaughan, 2003
-##
-## This file is part of GNU Libtool.
-##
-## GNU Libtool 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.
-##
-## GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-## can be downloaded from http://www.gnu.org/licenses/gpl.html,
-## or obtained by writing to the Free Software Foundation, Inc.,
-## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#####
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
-AM_CPPFLAGS = -I$(top_srcdir)/../..
-
-noinst_LTLIBRARIES = libfoo.la
-
-libfoo_la_SOURCES = foo.c
-libfoo_la_LIBADD = $(LIBM)
-libfoo_la_LDFLAGS = -no-undefined
-
-noinst_HEADERS = foo.h
-
-bin_PROGRAMS = cdemo
-
-cdemo_SOURCES = main.c
-cdemo_LDADD = libfoo.la
-
-libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
-
-# Workaround a bug in Autoconf-2.61 and earlier that don't clean up
-# file droppings left by many compilers:
-distclean-local:
- ac_files="a.out.* a.exe.* a_out.exe.* b.out.* conftest.*"; \
- for ac_file in $$ac_files; do \
- case $$ac_file in \
- *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) rm -rf $$ac_file ;; \
- esac; \
- done
diff --git a/tests/cdemo/README b/tests/cdemo/README
deleted file mode 100644
index fd3e418c..00000000
--- a/tests/cdemo/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This is cdemo, 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/tests/cdemo/configure.ac b/tests/cdemo/configure.ac
deleted file mode 100644
index e008f72a..00000000
--- a/tests/cdemo/configure.ac
+++ /dev/null
@@ -1,63 +0,0 @@
-# Process this file with autoconf to create configure. -*- autoconf -*-
-#
-# Copyright (C) 2001, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-AC_PREREQ(2.54)
-
-## ------------------------ ##
-## Autoconf initialisation. ##
-## ------------------------ ##
-AC_INIT([cdemo], [1.0], [bug-libtool@gnu.org])
-AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ------------------ ##
-## C compiler checks. ##
-## ------------------ ##
-AC_PROG_CC
-
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-LT_INIT
-AC_SUBST([LIBTOOL_DEPS])
-
-
-## ---------------------------- ##
-## Libraries required by cdemo. ##
-## ---------------------------- ##
-LT_LIB_M
-
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/cdemo/foo.c b/tests/cdemo/foo.c
deleted file mode 100644
index b522feca..00000000
--- a/tests/cdemo/foo.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* foo.c -- trivial test library
-
- Copyright (C) 1998-1999, 2007 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- This file is part of GNU Libtool.
-
-GNU Libtool 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.
-
-GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "foo.h"
-#include <stdio.h>
-
-#include <math.h>
-
-int
-foo()
-{
- printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
- return FOO_RET;
-}
-
-int
-hello()
-{
- printf ("** This is libfoo **\n");
- return HELLO_RET;
-}
diff --git a/tests/cdemo/foo.h b/tests/cdemo/foo.h
deleted file mode 100644
index ae665638..00000000
--- a/tests/cdemo/foo.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* foo.h -- interface to the libfoo* libraries
-
- Copyright (C) 1998-1999 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- This file is part of GNU Libtool.
-
-GNU Libtool 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.
-
-GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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
-
-extern int foo();
-
-extern int hello();
-
-#endif /* !_FOO_H_ */
diff --git a/tests/cdemo/main.c b/tests/cdemo/main.c
deleted file mode 100644
index aef8bf05..00000000
--- a/tests/cdemo/main.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* main.c -- cdemo test program
-
- Copyright (C) 1998-1999, 2006 Free Software Foundation, Inc.
- Written by Thomas Tanner, 1998
-
- This file is part of GNU Libtool.
-
-GNU Libtool 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.
-
-GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "foo.h"
-#include <stdio.h>
-
-
-int
-main ()
-{
- int value;
-
- printf ("Welcome to GNU libtool cdemo!\n");
-
- value = hello();
- printf ("hello returned: %i\n", value);
- if (value == HELLO_RET)
- printf("hello is ok!\n");
-
- if (foo () == FOO_RET)
- printf("foo is ok!\n");
-
- return 0;
-}
diff --git a/tests/testsuite.at b/tests/testsuite.at
index bb4b875c..b8aeb135 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -208,6 +208,22 @@ m4_define([LT_AT_CHECK],
[echo "LT_ESCAPE([$1])"; AT_CHECK($@)])
+# LT_AT_CHECK_CONFIG (CONFIGURE-ARGS, [GREP-EXPRESSION], ...)
+# -----------------------------------------------------------
+# Bootstrap and configure the project, and check each GREP-EXPRESSION
+# works on the resulting libtool script.
+m4_define([LT_AT_CHECK_CONFIG],
+[LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
+ [--prefix="$prefixdir" $1], [ignore])
+m4_if([$#], 0, [],
+ [$#], 1, [], [$0_(m4_shift($@))])
+])
+m4_define([LT_AT_CHECK_CONFIG_],
+[AT_CHECK([$EGREP '$1' libtool], 0, [ignore])
+ m4_if([$#], 1, [], [$0(m4_shift($@))])
+])
+
+
# LT_AT_HOST_DATA(FILE, CONTENTS)
# -------------------------------
# Ensure correct line ending for expected output of host executables.