libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 02/10] tests: migrate legacy tests/demo tests to Autotest.


From: Gary V. Vaughan
Subject: [PATCH 02/10] tests: migrate legacy tests/demo tests to Autotest.
Date: Fri, 25 Nov 2011 16:10:53 +0700

* tests/demo.at: New autotest groups, based on...
* tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast-exec.test, tests/demo-nofast-inst.test,
tests/demo-nofast-make.test, tests/demo-nofast-unst.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic-exec.test, tests/demo-nopic-make.test,
tests/demo-nopic.test, tests/demo-pic-exec.test,
tests/demo-pic-make.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared-exec.test,
tests/demo-shared-inst.test, tests/demo-shared-make.test,
tests/demo-shared-unst.test, tests/demo-shared.test,
tests/demo-static-exec.test, tests/demo-static-inst.test,
tests/demo-static-make.test, tests/demo-static-unst.test,
tests/demo-static.test, tests/demo-unst.test: ...these legacy
test cases, now removed.
* tests/demo/Makefile.am, tests/demo/README,
tests/demo/configure.ac, tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/demo.
* Makefile.am: Adjust.

Signed-off-by: Gary V. Vaughan <address@hidden>
---
 Makefile.am                 |   61 +----
 configure.ac                |    2 +-
 tests/demo-conf.test        |   34 --
 tests/demo-deplibs.test     |   38 --
 tests/demo-exec.test        |   36 --
 tests/demo-hardcode.test    |  129 -------
 tests/demo-inst.test        |   38 --
 tests/demo-make.test        |   34 --
 tests/demo-nofast-exec.test |    3 -
 tests/demo-nofast-inst.test |    3 -
 tests/demo-nofast-make.test |    3 -
 tests/demo-nofast-unst.test |    3 -
 tests/demo-nofast.test      |   38 --
 tests/demo-noinst-link.test |   60 ----
 tests/demo-nopic-exec.test  |    3 -
 tests/demo-nopic-make.test  |    3 -
 tests/demo-nopic.test       |   56 ---
 tests/demo-pic-exec.test    |    3 -
 tests/demo-pic-make.test    |    3 -
 tests/demo-pic.test         |   33 --
 tests/demo-relink.test      |  105 ------
 tests/demo-shared-exec.test |    3 -
 tests/demo-shared-inst.test |    3 -
 tests/demo-shared-make.test |    3 -
 tests/demo-shared-unst.test |    3 -
 tests/demo-shared.test      |   34 --
 tests/demo-static-exec.test |    3 -
 tests/demo-static-inst.test |    3 -
 tests/demo-static-make.test |    3 -
 tests/demo-static-unst.test |    3 -
 tests/demo-static.test      |   34 --
 tests/demo-unst.test        |   34 --
 tests/demo.at               |  802 +++++++++++++++++++++++++++++++++++++++++++
 tests/demo/.gitignore       |    7 -
 tests/demo/Makefile.am      |  178 ----------
 tests/demo/README           |    9 -
 tests/demo/configure.ac     |   73 ----
 tests/demo/dlmain.c         |   97 ------
 tests/demo/foo.c            |   38 --
 tests/demo/foo.h            |  102 ------
 tests/demo/hell1.c          |   25 --
 tests/demo/hell2.c          |   25 --
 tests/demo/hello.c          |   34 --
 tests/demo/main.c           |   44 ---
 44 files changed, 804 insertions(+), 1444 deletions(-)
 delete mode 100755 tests/demo-conf.test
 delete mode 100755 tests/demo-deplibs.test
 delete mode 100755 tests/demo-exec.test
 delete mode 100755 tests/demo-hardcode.test
 delete mode 100755 tests/demo-inst.test
 delete mode 100755 tests/demo-make.test
 delete mode 100755 tests/demo-nofast-exec.test
 delete mode 100755 tests/demo-nofast-inst.test
 delete mode 100755 tests/demo-nofast-make.test
 delete mode 100755 tests/demo-nofast-unst.test
 delete mode 100755 tests/demo-nofast.test
 delete mode 100755 tests/demo-noinst-link.test
 delete mode 100755 tests/demo-nopic-exec.test
 delete mode 100755 tests/demo-nopic-make.test
 delete mode 100755 tests/demo-nopic.test
 delete mode 100755 tests/demo-pic-exec.test
 delete mode 100755 tests/demo-pic-make.test
 delete mode 100755 tests/demo-pic.test
 delete mode 100755 tests/demo-relink.test
 delete mode 100755 tests/demo-shared-exec.test
 delete mode 100755 tests/demo-shared-inst.test
 delete mode 100755 tests/demo-shared-make.test
 delete mode 100755 tests/demo-shared-unst.test
 delete mode 100755 tests/demo-shared.test
 delete mode 100755 tests/demo-static-exec.test
 delete mode 100755 tests/demo-static-inst.test
 delete mode 100755 tests/demo-static-make.test
 delete mode 100755 tests/demo-static-unst.test
 delete mode 100755 tests/demo-static.test
 delete mode 100755 tests/demo-unst.test
 create mode 100644 tests/demo.at
 delete mode 100644 tests/demo/.gitignore
 delete mode 100644 tests/demo/Makefile.am
 delete mode 100644 tests/demo/README
 delete mode 100644 tests/demo/configure.ac
 delete mode 100644 tests/demo/dlmain.c
 delete mode 100644 tests/demo/foo.c
 delete mode 100644 tests/demo/foo.h
 delete mode 100644 tests/demo/hell1.c
 delete mode 100644 tests/demo/hell2.c
 delete mode 100644 tests/demo/hello.c
 delete mode 100644 tests/demo/main.c

diff --git a/Makefile.am b/Makefile.am
index 77941ac..91107e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -630,6 +630,7 @@ TESTSUITE   = tests/testsuite
 TESTSUITE_AT   = tests/testsuite.at \
                  tests/getopt-m4sh.at \
                  tests/libtoolize.at \
+                 tests/demo.at \
                  tests/cdemo.at \
                  tests/convenience.at \
                  tests/help.at \
@@ -877,11 +878,6 @@ COMMON_TESTS = \
        tests/quote.test \
        tests/suffix.test \
        tests/tagtrace.test \
-       tests/demo-static.test \
-       tests/demo-static-make.test \
-       tests/demo-static-exec.test \
-       tests/demo-static-inst.test \
-       tests/demo-static-unst.test \
        tests/depdemo-static.test \
        tests/depdemo-static-make.test \
        tests/depdemo-static-exec.test \
@@ -892,12 +888,6 @@ COMMON_TESTS = \
        tests/mdemo-static-exec.test \
        tests/mdemo-static-inst.test \
        tests/mdemo-static-unst.test \
-       tests/demo-conf.test \
-       tests/demo-make.test \
-       tests/demo-exec.test \
-       tests/demo-inst.test \
-       tests/demo-unst.test \
-       tests/demo-deplibs.test \
        tests/depdemo-conf.test \
        tests/depdemo-make.test \
        tests/depdemo-exec.test \
@@ -916,22 +906,11 @@ COMMON_TESTS = \
        tests/pdemo-make.test \
        tests/pdemo-exec.test \
        tests/pdemo-inst.test \
-       tests/demo-nofast.test \
-       tests/demo-nofast-make.test \
-       tests/demo-nofast-exec.test \
-       tests/demo-nofast-inst.test \
-       tests/demo-nofast-unst.test \
        tests/depdemo-nofast.test \
        tests/depdemo-nofast-make.test \
        tests/depdemo-nofast-exec.test \
        tests/depdemo-nofast-inst.test \
        tests/depdemo-nofast-unst.test \
-       tests/demo-pic.test \
-       tests/demo-pic-make.test \
-       tests/demo-pic-exec.test \
-       tests/demo-nopic.test \
-       tests/demo-nopic-make.test \
-       tests/demo-nopic-exec.test \
        tests/mdemo-shared.test \
        tests/mdemo-shared-make.test \
        tests/mdemo-shared-exec.test \
@@ -941,14 +920,6 @@ COMMON_TESTS = \
 # Actually, only demo-relink and depdemo-relink require interaction,
 # but they depend on the other tests being run beforehand.
 INTERACTIVE_TESTS = \
-       tests/demo-shared.test \
-       tests/demo-shared-make.test \
-       tests/demo-shared-exec.test \
-       tests/demo-shared-inst.test \
-       tests/demo-hardcode.test \
-       tests/demo-relink.test \
-       tests/demo-noinst-link.test \
-       tests/demo-shared-unst.test \
        tests/depdemo-shared.test \
        tests/depdemo-shared-make.test \
        tests/depdemo-shared-exec.test \
@@ -956,36 +927,6 @@ INTERACTIVE_TESTS = \
        tests/depdemo-relink.test \
        tests/depdemo-shared-unst.test
 
-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
-tests/demo-hardcode.log:       tests/demo-shared-inst.log
-tests/demo-shared-inst.log:    tests/demo-shared-exec.log
-tests/demo-shared-exec.log:    tests/demo-shared-make.log
-tests/demo-shared-make.log:    tests/demo-shared.log
-tests/demo-shared.log: $(ORDER)        tests/demo-nopic-exec.log
-tests/demo-nopic-exec.log:     tests/demo-nopic-make.log
-tests/demo-nopic-make.log:     tests/demo-nopic.log
-tests/demo-nopic.log: $(ORDER) tests/demo-pic-exec.log
-tests/demo-pic-exec.log:       tests/demo-pic-make.log
-tests/demo-pic-make.log:       tests/demo-pic.log
-tests/demo-pic.log: $(ORDER)   tests/demo-nofast-unst.log
-tests/demo-nofast-unst.log:    tests/demo-nofast-inst.log
-tests/demo-nofast-inst.log:    tests/demo-nofast-exec.log
-tests/demo-nofast-exec.log:    tests/demo-nofast-make.log
-tests/demo-nofast-make.log:    tests/demo-nofast.log
-tests/demo-nofast.log: $(ORDER)        tests/demo-deplibs.log
-tests/demo-deplibs.log:                tests/demo-unst.log
-tests/demo-unst.log:           tests/demo-inst.log
-tests/demo-inst.log:           tests/demo-exec.log
-tests/demo-exec.log:           tests/demo-make.log
-tests/demo-make.log:           tests/demo-conf.log
-tests/demo-conf.log: $(ORDER)  tests/demo-static-unst.log
-tests/demo-static-unst.log:    tests/demo-static-inst.log
-tests/demo-static-inst.log:    tests/demo-static-exec.log
-tests/demo-static-exec.log:    tests/demo-static-make.log
-tests/demo-static-make.log:    tests/demo-static.log
-
 tests/depdemo-shared-unst.log: tests/depdemo-relink.log
 tests/depdemo-relink.log:      tests/depdemo-shared-inst.log
 tests/depdemo-shared-inst.log: tests/depdemo-shared-exec.log
diff --git a/configure.ac b/configure.ac
index 8b27629..ae65a47 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/demo tests/depdemo tests/f77demo tests/fcdemo \
+CONF_SUBDIRS="tests/depdemo tests/f77demo tests/fcdemo \
        tests/mdemo tests/mdemo2 tests/pdemo tests/tagdemo"
 AC_SUBST([CONF_SUBDIRS])
 
diff --git a/tests/demo-conf.test b/tests/demo-conf.test
deleted file mode 100755
index 1ef9fa2..0000000
--- a/tests/demo-conf.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# demo-conf.test - try configuring the demo 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/demo"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-exit 0
diff --git a/tests/demo-deplibs.test b/tests/demo-deplibs.test
deleted file mode 100755
index 2e4c99f..0000000
--- a/tests/demo-deplibs.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# demo-deplibs.test - check whether the shared library check method is OK
-#
-#   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 "demo-conf" "tests/demo/libhello.la"
-
-func_mkprefixdir
-func_cd "tests/demo"
-echo "linking a shared library against a static library"
-func_make "deplibs-check"
-func_exec_init "uninstalled"
-func_exec_check "hell0$EXEEXT" "check your deplibs_check_method"
-func_exec "./hell0$EXEEXT" "" "check your deplibs_check_method"
-
-exit $exec_status
diff --git a/tests/demo-exec.test b/tests/demo-exec.test
deleted file mode 100755
index b586e94..0000000
--- a/tests/demo-exec.test
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# demo-exec.test - check that programs in the ../demo subdirectory are viable
-#
-#   Copyright (C) 2003, 2004, 2005 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 "demo-make" "tests/demo/hell$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/demo/hell_static$EXEEXT" 'Welcome to GNU Hell'
-func_exec "tests/demo/hell$EXEEXT" 'Welcome to GNU Hell'
-func_exec "tests/demo/helldl$EXEEXT" '(Welcome to .*GNU Hell|unsupported)'
-
-exit $exec_status
diff --git a/tests/demo-hardcode.test b/tests/demo-hardcode.test
deleted file mode 100755
index 269c2ff..0000000
--- a/tests/demo-hardcode.test
+++ /dev/null
@@ -1,129 +0,0 @@
-#! /bin/sh
-# demo-hardcode.test - check to see what the system linker hardcodes
-#
-#   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 "demo-inst" "$prefix/lib/libhello.la"
-
-func_mkprefixdir
-func_cd "tests/demo"
-
-# Check to make sure we have a dynamic library.
-func_get_config "library_names" "cat ./libhello.la"
-test -z "$library_names" \
-  && func_skip "Exiting: demo/libhello.la is not a shared library"
-
-func_make "hardcode"
-
-# Extra tools we might need
-: ${DUMPSTABS=dumpstabs}
-
-# Suck in all the hardcode_* variable settings.
-func_msg "Finding libtool.m4's guesses at hardcoding values"
-func_get_config 'hardcode_direct
-hardcode_minus_L
-hardcode_shlibpath_var
-hardcode_libdir_flag_spec' "./libtool --config" ": fatal"
-
-echo "= Searching for hardcoded library directories in each program"
-for file in hc-*; do
-  case $file in
-  hc-direct)  expected="$hardcode_direct" ;;
-  hc-libpath) expected="$hardcode_shlibpath_var" ;;
-  hc-minusL)  expected="$hardcode_minus_L" ;;
-
-  hc-libflag)
-    if test -n "$hardcode_libdir_flag_spec"; then
-      expected=yes
-    else
-      expected=unsupported
-    fi
-    ;;
-
-  *)
-    continue
-    ;;
-  esac
-
-  # Discover whether the objdir really was hardcoded.
-  hardcoded=no
-
-  # Solaris cc may store the command line in a debugging section,
-  # which leads to false positives.  Unfortunately, Solaris strip
-  # is not capable to remove the section (unlike GNU binutils strip).
-  # So we use dumpstabs if it seems to work.
-  if { $DUMPSTABS -d $file; } >/dev/null 2>&1; then
-    if $DUMPSTABS -d $file 2>/dev/null | $FGREP "$objdir" >/dev/null 2>&1; then
-      hardcoded=yes
-    else
-      hardcoded=no
-    fi
-  # At least AIX fgrep doesn't work for binary files, and AIX also
-  # doesn't have strings(1), so we need this strange conversion
-  # (which only works on ASCII).
-  # AIX fgrep also has a limited line length, so we turn unprintable
-  # characters into newlines.
-  elif cat $file | (tr '\000-\037\200-\377' '\n' || cat) 2>/dev/null \
-                | $FGREP "$objdir" > /dev/null 2>&1; then
-    hardcoded=yes
-  elif $FGREP "$objdir" $file > /dev/null 2>&1; then
-    # We retry fgrep without tr, in case the above lead to a false negative.
-    hardcoded=yes
-  elif (sed -e '1!d' $file | grep 'unsupported') >/dev/null 2>&1; then
-    hardcoded=unsupported
-  fi
-
-  # Check the result.
-  case $hardcoded in
-  yes)
-    if test yes = "$expected"; then
-      echo "$objdir was hardcoded in \`$file', as libtool expected"
-    else
-      echo "$objdir was hardcoded in \`$file', which fooled libtool" 1>&2
-      exit_status=1
-    fi
-    ;;
-
-  no)
-    if test no = "$expected"; then
-      echo "$objdir was not hardcoded in \`$file', as libtool expected"
-    else
-      echo "$objdir was not hardcoded in \`$file', which fooled libtool" 1>&2
-      exit_status=1
-    fi
-    ;;
-
-  unsupported)
-    if test unsupported = "$expected"; then
-      echo "\`$file' was not linked properly, as libtool expected"
-    else
-      echo "\`$file' was not linked properly, which fooled libtool" 1>&2
-      exit_status=1
-    fi
-    ;;
-  esac
-done
-
-exit $exit_status
diff --git a/tests/demo-inst.test b/tests/demo-inst.test
deleted file mode 100755
index 3bd5ea6..0000000
--- a/tests/demo-inst.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# demo-inst.test - try installing from the demo 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 "demo-make" "tests/demo/hell$EXEEXT"
-
-func_mkprefixdir
-func_cd "tests/demo"
-func_make "install"
-func_exec_init "installed"
-func_exec "$prefix/bin/hell_static$EXEEXT" 'Welcome to GNU Hell'
-func_exec "$prefix/bin/hell$EXEEXT" 'Welcome to GNU Hell'
-func_exec "$prefix/bin/helldl$EXEEXT" '(Welcome to .*GNU Hell|unsupported)'
-
-exit $status
diff --git a/tests/demo-make.test b/tests/demo-make.test
deleted file mode 100755
index a1f9bfd..0000000
--- a/tests/demo-make.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# demo-make.test - try building in the demo 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 "demo-conf" "tests/demo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/demo"
-func_make
-
-exit 0
diff --git a/tests/demo-nofast-exec.test b/tests/demo-nofast-exec.test
deleted file mode 100755
index 6745d2e..0000000
--- a/tests/demo-nofast-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-exec.test
diff --git a/tests/demo-nofast-inst.test b/tests/demo-nofast-inst.test
deleted file mode 100755
index 0213f20..0000000
--- a/tests/demo-nofast-inst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-inst.test
diff --git a/tests/demo-nofast-make.test b/tests/demo-nofast-make.test
deleted file mode 100755
index 04bee2f..0000000
--- a/tests/demo-nofast-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-make.test
diff --git a/tests/demo-nofast-unst.test b/tests/demo-nofast-unst.test
deleted file mode 100755
index 97a250f..0000000
--- a/tests/demo-nofast-unst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-unst.test
diff --git a/tests/demo-nofast.test b/tests/demo-nofast.test
deleted file mode 100755
index 6b50f4a..0000000
--- a/tests/demo-nofast.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# demo-nofast.test - try configuring the ../demo 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/demo"
-func_make_distclean
-func_configure "--enable-fast-install=no"
-
-if func_grep '^hardcode_action=relink' libtool; then
-  rm -f Makefile
-  exit 77
-fi
-
-exit 0
diff --git a/tests/demo-noinst-link.test b/tests/demo-noinst-link.test
deleted file mode 100755
index 5e658b0..0000000
--- a/tests/demo-noinst-link.test
+++ /dev/null
@@ -1,60 +0,0 @@
-#! /bin/sh
-# demo-noinst-link.test - make sure we do not link with an installed
-#                         library when an uninstalled one is to be used
-#
-#   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_restore_files ()
-{
-    mv -f "$objdir"/temp/libs/* "$objdir"
-    mv -f "$objdir/temp/libhello.la" "$objdir/temp/hell$EXEEXT" .
-    rm -rf "$objdir/temp"
-}
-
-func_save_files ()
-{
-    func_mkdir_p "$objdir/temp/libs"
-    cp -f libhello.la "hell$EXEEXT" "$objdir/temp"
-    cp -f "$objdir"/* "$objdir"/temp/libs
-    trap "func_restore_files" 0 1 2 13 15
-}
-
-func_require "demo-inst" "$prefix/lib/libhello.la"
-
-func_mkprefixdir
-func_cd "tests/demo"
-func_save_files
-
-func_msg "removing \`libhello.la' and \`hell' from demo"
-rm -f libhello.la "hell$EXEEXT"
-
-status=$EXIT_SUCCESS
-func_msg "linking \`hell' with a broken \`demo/libhello.la'"
-if $MAKE "hell$EXEEXT" libhello_la_OBJECTS=hello.lo; then
-  func_msg "Succeeded: this means the installed library was used, which is 
wrong"
-  status=$EXIT_FAILURE
-fi
-
-exit $status
diff --git a/tests/demo-nopic-exec.test b/tests/demo-nopic-exec.test
deleted file mode 100755
index 6745d2e..0000000
--- a/tests/demo-nopic-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-exec.test
diff --git a/tests/demo-nopic-make.test b/tests/demo-nopic-make.test
deleted file mode 100755
index 04bee2f..0000000
--- a/tests/demo-nopic-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-make.test
diff --git a/tests/demo-nopic.test b/tests/demo-nopic.test
deleted file mode 100755
index b44f34b..0000000
--- a/tests/demo-nopic.test
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-# demo-nopic.test - try configuring the ../demo subdirectory
-#
-#   Copyright (C) 2003, 2004, 2010 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
-
-case $host in
-hppa*|x86_64*|s390*)
-       func_skip "$host doesn't like non-PIC shared libs"
-       ;;
-*-solaris*|*-sunos*)
-       func_skip "libtool does not build non-PIC shared libs on $host"
-       ;;
-esac
-
-if test "$build" = "$host" && test -d "/etc/selinux"; then
-       _selinux=`getenforce 2>/dev/null || echo "Disabled"`
-       case $_selinux in
-       *Enforcing)
-               _sebool_allow_execmod=`getsebool allow_execmod 2>/dev/null`
-               case $_sebool_allow_execmod in
-                       *off)
-                               func_skip "SELinux policy disallows"
-                               ;;
-               esac
-               ;;
-       esac
-fi
-
-func_rmprefixdir
-func_cd "tests/demo"
-func_make_distclean
-func_configure "--with-pic=no"
-
-exit 0
diff --git a/tests/demo-pic-exec.test b/tests/demo-pic-exec.test
deleted file mode 100755
index 6745d2e..0000000
--- a/tests/demo-pic-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-exec.test
diff --git a/tests/demo-pic-make.test b/tests/demo-pic-make.test
deleted file mode 100755
index 04bee2f..0000000
--- a/tests/demo-pic-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-make.test
diff --git a/tests/demo-pic.test b/tests/demo-pic.test
deleted file mode 100755
index cce0184..0000000
--- a/tests/demo-pic.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-# demo-pic.test - try configuring the ../demo 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_rmprefixdir
-func_cd "tests/demo"
-func_make_distclean
-func_configure "--with-pic=yes"
-
-exit 0
diff --git a/tests/demo-relink.test b/tests/demo-relink.test
deleted file mode 100755
index b463441..0000000
--- a/tests/demo-relink.test
+++ /dev/null
@@ -1,105 +0,0 @@
-#! /bin/sh
-# demo-relink.test - check to see whether shlibpath overrides runpath
-#
-#   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_restore_files ()
-{
-    mv -f "$objdir"/temp/libs/* "$objdir"
-    mv -f "$objdir/temp/libhello.la" .
-    rm -rf "$objdir/temp"
-}
-
-func_save_files ()
-{
-    func_mkdir_p "$objdir/temp/libs"
-    cp -f libhello.la "$objdir/temp"
-    cp -f "$objdir"/libhello.* "$objdir/lt-hell$EXEEXT" "$objdir/temp/libs"
-    trap "func_restore_files" 0 1 2 13 15
-}
-
-func_require "demo-inst" "$prefix/lib/libhello.la"  "tests/demo/libhello.la"
-
-func_mkprefixdir
-func_cd "tests/demo"
-
-# Check to make sure we have a dynamic library.
-func_get_config "library_names" "cat libhello.la"
-test -z "$library_names" \
-  && func_skip "Exiting: demo/libhello.la is not a shared library"
-
-func_save_files
-
-func_get_config 'shlibpath_overrides_runpath
-hardcode_action
-hardcode_direct
-hardcode_into_libs' "./libtool --config" ": fatal"
-
-./hell$EXEEXT # so that it links on-demand if needed
-
-func_msg "removing libhello.la from demo"
-rm -f libhello.la "$objdir"/libhello.*
-
-func_msg "running demo/hell"
-if ./hell$EXEEXT; then
-  :
-elif test relink,yes = "$hardcode_action,$hardcode_direct"; then
-  func_msg "Ok, uninstalled programs fail after uninstalled libraries are 
removed."
-  func_msg "This works in other configurations, but not in this particular 
one."
-else
-  func_fail "Exiting: demo/hell does not run, maybe libhello was not installed"
-fi
-
-func_msg "linking a broken demo/libhello.la"
-func_make libhello.la libhello_la_OBJECTS=hello.lo \
-  || func_fail "Exiting: cannot link broken libhello.la"
-rm -f libhello.la
-
-func_msg "running demo/hell with broken libhello.la"
-if (./hell) 2>&1; then
-  func_msg "Exiting: demo/hell runs even though libhello.la is incomplete"
-  func_fail "shlibpath_overrides_runpath should be set to no"
-else
-  func_msg "Failed, as expected"
-fi
-
-if test relink = "$hardcode_action"; then
-  func_msg "Exiting: install-time relinking is required"
-  exit $EXIT_SUCCESS
-fi
-
-if test yes != "$shlibpath_overrides_runpath"; then
-  rm -f $objdir/lt-hell$EXEEXT || exit $EXIT_FAILURE
-  cp $objdir/hell$EXEEXT $objdir/lt-hell$EXEEXT || exit $EXIT_FAILURE
-  func_msg "running demo/hell with installed libhello.la"
-  if ./hell; then
-    func_msg "Worked, as expected"
-  else
-    func_msg "shlibpath_overrides_runpath should be set to yes"
-    status=$EXIT_FAILURE
-  fi
-fi
-
-exit $status
diff --git a/tests/demo-shared-exec.test b/tests/demo-shared-exec.test
deleted file mode 100755
index 6745d2e..0000000
--- a/tests/demo-shared-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-exec.test
diff --git a/tests/demo-shared-inst.test b/tests/demo-shared-inst.test
deleted file mode 100755
index 0213f20..0000000
--- a/tests/demo-shared-inst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-inst.test
diff --git a/tests/demo-shared-make.test b/tests/demo-shared-make.test
deleted file mode 100755
index 04bee2f..0000000
--- a/tests/demo-shared-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-make.test
diff --git a/tests/demo-shared-unst.test b/tests/demo-shared-unst.test
deleted file mode 100755
index 97a250f..0000000
--- a/tests/demo-shared-unst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-unst.test
diff --git a/tests/demo-shared.test b/tests/demo-shared.test
deleted file mode 100755
index 422307b..0000000
--- a/tests/demo-shared.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# demo-shared.test - try configuring the demo 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/demo"
-func_make_distclean
-func_configure "--disable-static"
-func_check_static_shared "no" "yes"
-
-exit 0
diff --git a/tests/demo-static-exec.test b/tests/demo-static-exec.test
deleted file mode 100755
index 6745d2e..0000000
--- a/tests/demo-static-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-exec.test
diff --git a/tests/demo-static-inst.test b/tests/demo-static-inst.test
deleted file mode 100755
index 0213f20..0000000
--- a/tests/demo-static-inst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-inst.test
diff --git a/tests/demo-static-make.test b/tests/demo-static-make.test
deleted file mode 100755
index 04bee2f..0000000
--- a/tests/demo-static-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-make.test
diff --git a/tests/demo-static-unst.test b/tests/demo-static-unst.test
deleted file mode 100755
index 97a250f..0000000
--- a/tests/demo-static-unst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/demo-unst.test
diff --git a/tests/demo-static.test b/tests/demo-static.test
deleted file mode 100755
index 59eb493..0000000
--- a/tests/demo-static.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# demo-static.test - try configuring the demo 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/demo"
-func_make_distclean
-func_configure "--disable-shared"
-func_check_static_shared "yes" "no"
-
-exit 0
diff --git a/tests/demo-unst.test b/tests/demo-unst.test
deleted file mode 100755
index 9820879..0000000
--- a/tests/demo-unst.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# demo-unst.test - try uninstalling in the demo 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 "demo-inst" "$prefix/bin/hell$EXEEXT" "tests/demo/Makefile"
-
-func_mkprefixdir
-func_cd "tests/demo"
-func_make_uninstall
-
-exit 0
diff --git a/tests/demo.at b/tests/demo.at
new file mode 100644
index 0000000..347889d
--- /dev/null
+++ b/tests/demo.at
@@ -0,0 +1,802 @@
+# 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([Linking and loading.])
+
+## ------------------------------------------- ##
+## Some functions shared by later tests cases. ##
+## ------------------------------------------- ##
+
+func_restore_files ()
+{
+    test -n "$objdir" || exit 1
+    mv -f "$objdir"/temp/libs/* "$objdir"
+    mv -f "$objdir/temp/libhello.la" .
+    rm -rf "$objdir/temp"
+}
+
+func_save_files ()
+{
+    test -n "$objdir" || exit 1
+    $lt_INSTALL -d "$objdir/temp/libs"
+    cp -f libhello.la "$objdir/temp"
+    cp -f "$objdir"/libhello.* "$objdir/lt-hell$EXEEXT" "$objdir/temp/libs"
+    trap "func_restore_files" 0 1 2 13 15
+}
+
+
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[AT_DATA([configure.ac],
+[[AC_INIT([demo], ]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([dlopen win32-dll])
+AC_SUBST([LIBTOOL_DEPS])
+STATIC=
+test yes = "$enable_static" && STATIC=-static
+AC_SUBST([STATIC])
+
+case $lt_cv_sys_global_symbol_pipe in
+  ?*) binary_helldl=yes ;;
+esac
+AM_CONDITIONAL([BINARY_HELLDL], [test yes = "$binary_helldl"])
+
+LT_LIB_M
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+]])
+
+AT_DATA([Makefile.am],
+[[AUTOMAKE_OPTIONS = no-dependencies foreign
+ACLOCAL_AMFLAGS = -I m4
+
+# Build a libtool library, libhello.la for installation in libdir.
+lib_LTLIBRARIES = libhello.la
+libhello_la_SOURCES = hello.c foo.c
+libhello_la_LIBADD = $(LIBM)
+libhello_la_LDFLAGS = -no-undefined -version-info 3:12:1
+libhello_la_CPPFLAGS = $(AM_CPPFLAGS) -DBUILDING_LIBHELLO
+
+include_HEADERS = foo.h
+
+if BINARY_HELLDL
+BUILD_helldl = helldl
+else
+BUILD_helldl =
+endif
+
+bin_PROGRAMS = hell hell_static $(BUILD_helldl)
+
+# Build hell from main.c and libhello.la
+hell_SOURCES = main.c
+hell_LDADD = libhello.la
+
+# Create a statically linked version of hell.
+hell_static_SOURCES = main.c
+hell_static_LDADD = libhello.la
+hell_static_LDFLAGS = $(STATIC)
+
+if BINARY_HELLDL
+
+# Create a version of hell that does a preloaded dlopen.
+helldl_SOURCES = dlmain.c
+helldl_LDFLAGS = -export-dynamic -dlpreopen libhello.la
+helldl_DEPENDENCIES = libhello.la
+
+else
+
+# Create a script that says that -dlopen is not supported.
+bin_SCRIPTS = helldl
+helldl helldl$(EXEEXT):
+       rm -rf $@
+       echo '#! /bin/sh' > $@
+       echo 'echo sorry, -dlopen is unsupported' >> $@
+       chmod +x $@
+
+endif
+
+libtool: $(LIBTOOL_DEPS)
+       $(SHELL) ./config.status --recheck
+
+include $(srcdir)/demo.mk
+]])
+
+AT_DATA([demo.mk],
+[[## Don't abort for lack of demo.mk
+]])
+
+AT_DATA([foo.h],
+[[#ifndef FOO_H
+#define FOO_H
+
+/* At some point, cygwin will stop defining __CYGWIN32__, but b19 and
+ * earlier do not define __CYGWIN__.  This snippit allows us to check
+ * for __CYGWIN__ reliably for both current, old, and (probable) future
+ * releases.
+ */
+#ifdef __CYGWIN32__
+#  ifndef __CYGWIN__
+#    define __CYGWIN__
+#  endif
+#endif
+
+#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__
+# ifdef BUILDING_LIBHELLO
+#  ifdef DLL_EXPORT
+#   define LIBHELLO_SCOPE extern __declspec (dllexport)
+#  endif
+# else
+#  define LIBHELLO_SCOPE extern __declspec (dllimport)
+# endif
+#endif
+#ifndef LIBHELLO_SCOPE
+# define LIBHELLO_SCOPE extern
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  
*/
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* Silly constants that the functions return. */
+#define HELLO_RET 0xe110
+#define FOO_RET 0xf00
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int foo (void);
+int hello (void);
+LIBHELLO_SCOPE int nothing;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+]])
+
+AT_DATA([foo.c],
+[[#include "foo.h"
+#include <stdio.h>
+
+#include <math.h>
+
+/* Give a global variable definition. */
+int nothing = FOO_RET;
+
+int foo (void) {
+  printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
+  return FOO_RET;
+}
+]])
+
+AT_DATA([hell1.c],
+[[int hell1 (void) { return 1; }
+]])
+
+AT_DATA([hell2.c],
+[[int hell2 (void) { return 2; }
+]])
+
+AT_DATA([hello.c],
+[[#include "foo.h"
+#include <stdio.h>
+
+int hello (void) {
+  printf ("** This is not GNU Hello. There is no built-in mail reader. **\n");
+  return HELLO_RET;
+}
+]])
+
+AT_DATA([main.c],
+[[#include "foo.h"
+#include <stdio.h>
+
+int main ()
+{
+  printf ("Welcome to GNU Hell!\n");
+
+  /* Try assigning to the nothing variable. */
+  nothing = 1;
+
+  /* Just call the functions and check return values. */
+  if (foo () != FOO_RET)
+    return 1;
+
+  if (hello () != HELLO_RET)
+    return 2;
+
+  return 0;
+}
+]])
+
+AT_DATA([dlmain.c],
+[[#include "foo.h"
+#include <stdio.h>
+#include <string.h>
+
+#define STREQ !strcmp
+
+#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
+
+typedef struct
+{
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+
+extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[];
+
+int main ()
+{
+  const lt_dlsymlist *s;
+  int (*pfoo)() = 0;
+  int (*phello)() = 0;
+  int *pnothing = 0;
+
+  printf ("Welcome to *modular* GNU Hell!\n");
+
+  /* Look up the symbols we require for this demonstration. */
+  s = lt_preloaded_symbols;
+  while (s->name)
+    {
+      if (s->address) {
+        const char *name = s->name;
+        printf ("found symbol: %s\n", name);
+        if (STREQ ("hello", name))
+         phello = (int(*)())s->address;
+        else if (STREQ ("foo", name))
+         pfoo = (int(*)())s->address;
+        else if (STREQ ("nothing", name))
+#ifndef _WIN32
+         /* In an ideal world we could do this... */
+         pnothing = (int*)s->address;
+#else /* !_WIN32 */
+         /* In an ideal world a shared lib would be able to export data */
+         pnothing = (int*)&nothing;
+#endif
+      } else
+        printf ("found file: %s\n", s->name);
+      s ++;
+    }
+
+  /* Try assigning to the nothing variable. */
+  if (pnothing)
+    *pnothing = 1;
+  else
+    fprintf (stderr, "did not find the `nothing' variable\n");
+
+  /* Just call the functions and check return values. */
+  if (pfoo)
+    {
+      if ((*pfoo) () != FOO_RET)
+       return 1;
+    }
+  else
+    fprintf (stderr, "did not find the `foo' function\n");
+
+  if (phello)
+    {
+      if ((*phello) () != HELLO_RET)
+       return 3;
+    }
+  else
+    fprintf (stderr, "did not find the `hello' function\n");
+
+  return 0;
+}
+]])
+
+AT_DATA([expout],
+[[Welcome to GNU Hell!
+cos (0.0) = 1
+** This is not GNU Hello. There is no built-in mail reader. **
+]])
+
+prefixdir=`pwd`/_inst
+]) # _LT_SETUP
+
+
+# _LT_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_CHECK_CONFIG],
+[LT_AT_BOOTSTRAP([], [-I m4], [ignore], [--add-missing], [],
+        [--prefix="$prefixdir" $1], [ignore])
+m4_if([$#], 0, [],
+      [$#], 1, [], [$0_(m4_shift($@))])
+])
+m4_define([_LT_CHECK_CONFIG_],
+[AT_CHECK([$EGREP '$1' libtool], 0, [ignore])
+ m4_if([$#], 1, [], [$0(m4_shift($@))])
+])
+
+
+# _LT_CHECK_EXECUTE([TARGETS])
+# ----------------------------
+# Run the listed make rules, and check that the built binaries work.
+m4_define([_LT_CHECK_EXECUTE],
+[LT_AT_MAKE([$1])
+LT_AT_EXEC_CHECK([./hell_static], 0, [expout])
+LT_AT_EXEC_CHECK([./hell], 0, [expout])
+AT_CHECK([./helldl$EXEEXT | $EGREP '(Welcome to .*GNU Hell|unsupported)'], 0, 
[ignore])
+])
+
+# _LT_CHECK_INSTALL
+# -----------------
+# Run the make install rule, and check that installed binaries work too.
+m4_define([_LT_CHECK_INSTALL],
+[LT_AT_MAKE([install])
+
+# Windows hosts search for dlls in the command path.
+PATH=$prefixdir/lib:$PATH
+
+LT_AT_EXEC_CHECK([$prefixdir/bin/hell_static], 0, [expout])
+LT_AT_EXEC_CHECK([$prefixdir/bin/hell], 0, [expout])
+AT_CHECK([$prefixdir/bin/helldl$EXEEXT |
+    $EGREP '(Welcome to .*GNU Hell|unsupported)'], 0, [ignore])
+])
+
+# _LT_CHECK_UNINSTALL
+# -------------------
+# Make sure uninstallation is complete.
+m4_define([_LT_CHECK_UNINSTALL],
+[LT_AT_MAKE([uninstall])
+
+leftovers=`find $prefixdir ! -type d ! -name '.*' -print`
+AT_CHECK([test -z "$leftovers"])
+])
+
+
+## ------------ ##
+## Demo static. ##
+## ------------ ##
+
+AT_SETUP([link against a preloaded static library])
+
+_LT_SETUP
+
+_LT_CHECK_CONFIG([--disable-shared],
+                 [^build_old_libs=yes], [^build_libtool_libs=no])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+_LT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ------------ ##
+## Demo shared. ##
+## ------------ ##
+
+AT_SETUP([build and dynamically load a module])
+
+_LT_SETUP
+
+_LT_CHECK_CONFIG([--disable-static],
+                 [^build_old_libs=no], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+_LT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ---------- ##
+## Demo conf. ##
+## ---------- ##
+
+AT_SETUP([preload static and dynamic module])
+
+_LT_SETUP
+
+_LT_CHECK_CONFIG([],
+                 [^build_old_libs=yes], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+_LT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ------------ ##
+## Demo deplib. ##
+## ------------ ##
+
+# This is one of the essential tests for deplibs_check_method=pass_all.
+# If this one passes with pass_all, it is likely that pass_all works.
+
+AT_SETUP([deplibs_check_method])
+
+_LT_SETUP
+
+AT_DATA([demo.mk],
+[[EXTRA_LIBRARIES = libhell0.a
+libhell0_a_SOURCES =
+libhell0_a_LIBADD = hello.$(OBJEXT) foo.$(OBJEXT)
+EXTRA_LTLIBRARIES = libhell1.la libhell2.la
+libhell1_la_SOURCES = hell1.c
+libhell1_la_LIBADD = -L. -lhell0
+libhell1_la_LDFLAGS = -no-undefined -rpath $(libdir)
+libhell1_la_DEPENDENCIES = libhell0.a
+libhell2_la_SOURCES = hell2.c
+libhell2_la_LIBADD = -L. -lhell0
+libhell2_la_LDFLAGS = -no-undefined -rpath $(libdir)
+libhell2_la_DEPENDENCIES = libhell0.a
+EXTRA_PROGRAMS = hell0
+hell0_SOURCES = main.c
+hell0_LDADD = libhell1.la libhell2.la $(LIBM)
+
+# 'hell0' in EXTRA_PROGRAMS gets translated to 'hell0.exe'; but we
+# must explicitly list the wrapper script 'hell0'.  (bin_PROGRAMS
+# are handled seamlessly by automake rules; the extra step is only
+# necessary for EXTRA_PROGRAMS)
+CLEANFILES = $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) hell0
+
+deplibs-check: hell0$(EXEEXT)
+]])
+
+_LT_CHECK_CONFIG([--disable-static])
+LT_AT_MAKE([deplibs-check])
+LT_AT_EXEC_CHECK([./hell0], 0, [expout])
+
+AT_CLEANUP
+
+
+## ------------ ##
+## Demo nofast. ##
+## ------------ ##
+
+AT_SETUP([disable fast install])
+
+_LT_SETUP
+
+_LT_CHECK_CONFIG([--enable-fast-install=no])
+AT_CHECK([$EGREP '^hardcode_action=relink' libtool && (exit 77)], 1)
+
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+_LT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## --------- ##
+## Demo pic. ##
+## --------- ##
+
+AT_SETUP([force PIC objects])
+
+_LT_SETUP
+
+_LT_CHECK_CONFIG([--with-pic])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
+
+
+## ----------- ##
+## Demo nopic. ##
+## ----------- ##
+
+AT_SETUP([force non-PIC objects])
+
+AT_CHECK([case $host in
+hppa*|x86_64*|s390*)
+  # These hosts cannot use non-PIC shared libs
+  exit 77 ;;
+*-solaris*|*-sunos*)
+  # Libtool does not build non-PIC shared libs on these hosts
+  exit 77 ;;
+esac
+
+if test "X$build" = "X$host" && test -d "/etc/selinux"; then
+       _selinux=`getenforce 2>/dev/null || echo "Disabled"`
+       case $_selinux in
+       *Enforcing)
+               _sebool_allow_execmod=`getsebool allow_execmod 2>/dev/null`
+               case $_sebool_allow_execmod in
+               *off)
+                       # SELinux policy disallows non-PIC
+                       exit 77
+                       ;;
+               esac
+               ;;
+       esac
+fi
+])
+
+_LT_SETUP
+_LT_CHECK_CONFIG([--with-pic=no])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
+
+
+## -------------- ##
+## Demo hardcode. ##
+## -------------- ##
+
+AT_SETUP([hardcoding library path])
+
+_LT_SETUP
+
+AT_DATA([demo.mk],
+[[hardcode_tests = hc-direct hc-libflag hc-libpath hc-minusL
+CLEANFILES = $(hardcode_tests)
+
+# Unfortunately, in order to test libtool thoroughly, we need access
+# to its private directory.
+objdir = `$(LIBTOOL) --config | sed -n -e 's/^objdir=\(.*\)$$/\1/p'`
+
+# Test programs to see what gets hardcoded.
+.PHONY: hardcode
+hardcode: $(hardcode_tests)
+SET_HARDCODE_FLAGS = \
+  eval `$(LIBTOOL) --config | sed -n -e '/^hardcode_.*=/p; /^wl=/p'`
+hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
+       @rm -f hc-direct
+       @echo "You may ignore any linking errors from the following command:"
+       @shlib=./$(objdir)/libhello.a; \
+         eval "`grep '^library_names' libhello.la`"; \
+         for lib in $$library_names; do \
+           shlib="./$(objdir)/$$lib"; \
+         done; \
+         $(SET_HARDCODE_FLAGS); \
+         libdir=$(libdir); \
+         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
+         echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib 
$(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
+         eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib 
$(LIBS) $(LIBM) $$flag || echo unsupported > $@"
+
+hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
+       @$(SET_HARDCODE_FLAGS); \
+         libdir=`pwd`/$(objdir); \
+         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
+         if test -z "$$flag"; then \
+           echo "echo unsupported > $@"; \
+           echo unsupported > $@ || status="$$?"; \
+         else \
+           echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag 
-L$(libdir) -lhello $(LIBS) $(LIBM)"; \
+           $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) 
-lhello $(LIBS) $(LIBM) || status="$$?"; \
+         fi; \
+         exit $$status
+
+hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
+       @rm -f hc-libpath
+       @echo "You may ignore any linking errors from the following command:"
+       @$(SET_HARDCODE_FLAGS); \
+         eval `$(LIBTOOL) --config | grep '^shlibpath_var='`; \
+         libdir=$(libdir); \
+         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
+         echo "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 
$(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
+         eval "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 
$(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"
+
+hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
+       @rm -f hc-minusL
+       @$(SET_HARDCODE_FLAGS); \
+         libdir=$(libdir); \
+         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
+         echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) 
-lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
+         eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) 
-lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"
+]])
+
+_LT_CHECK_CONFIG([--disable-static])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+
+eval `$EGREP '^library_names=' libhello.la`
+AT_CHECK([test -n "$library_names" || (exit 77)])
+
+# Extra tools we may need
+: ${DUMPSTABS="dumpstabs"}
+
+LT_AT_MAKE([hardcode])
+
+eval "`$LIBTOOL --config | $EGREP 
'^hardcode_(direct|minus_L|shlibpath_var|libdir_flag_spec)='`"
+eval "`$LIBTOOL --config | $EGREP '^(FGREP|objdir)='`"
+
+AT_CHECK([[exit_status=0
+for file in hc-*; do
+  case $file in
+  hc-direct)  expected="$hardcode_direct" ;;
+  hc-libpath) expected="$hardcode_shlibpath_var" ;;
+  hc-minusL)  expected="$hardcode_minus_L" ;;
+
+  hc-libflag)
+    if test -n "$hardcode_libdir_flag_spec"; then
+      expected=yes
+    else
+      expected=unsupported
+    fi
+    ;;
+
+  *)
+    continue
+    ;;
+  esac
+
+  # Discover whether the objdir really was hardcoded.
+  hardcoded=no
+
+  # Solaris cc may store the command line in a debugging section,
+  # which leads to false positives.  Unfortunately, Solaris strip
+  # is not capable to remove the section (unlike GNU binutils strip).
+  # So we use dumpstabs if it seems to work.
+  if { $DUMPSTABS -d $file; } >/dev/null 2>&1; then
+    if $DUMPSTABS -d $file 2>/dev/null | $FGREP "$objdir" >/dev/null 2>&1; then
+      hardcoded=yes
+    else
+      hardcoded=no
+    fi
+
+  # At least AIX fgrep doesn't work for binary files, and AIX also
+  # doesn't have strings(1), so we need this strange conversion
+  # (which only works on ASCII).
+  # AIX fgrep also has a limited line length, so we turn unprintable
+  # characters into newlines.
+  elif cat $file | (tr '\000-\037\200-\377' '\n' || cat) 2>/dev/null \
+                | $FGREP "$objdir" > /dev/null 2>&1; then
+    hardcoded=yes
+
+  elif $FGREP "$objdir" $file > /dev/null 2>&1; then
+    # We retry fgrep without tr, in case the above lead to a false negative.
+    hardcoded=yes
+  elif (sed -e '1!d' $file | grep 'unsupported') >/dev/null 2>&1; then
+    hardcoded=unsupported
+  fi
+
+  # Check the result.
+  case $hardcoded in
+  yes)
+    if test yes = "$expected"; then
+      echo "$objdir was hardcoded in \`$file', as libtool expected"
+    else
+      echo "$objdir was hardcoded in \`$file', which fooled libtool" 1>&2
+      exit_status=1
+    fi
+    ;;
+
+  no)
+    if test no = "$expected"; then
+      echo "$objdir was not hardcoded in \`$file', as libtool expected"
+    else
+      echo "$objdir was not hardcoded in \`$file', which fooled libtool" 1>&2
+      exit_status=1
+    fi
+    ;;
+
+  unsupported)
+    if test unsupported = "$expected"; then
+      echo "\`$file' was not linked properly, as libtool expected"
+    else
+      echo "\`$file' was not linked properly, which fooled libtool" 1>&2
+      exit_status=1
+    fi
+    ;;
+  esac
+done
+]], 0, [ignore])
+
+AT_CLEANUP
+
+
+## ------------ ##
+## Demo relink. ##
+## ------------ ##
+
+AT_SETUP([binary relinking at install time])
+AT_KEYWORDS([interactive])dnl This test causes a popup on Windows
+
+_LT_SETUP
+
+_LT_CHECK_CONFIG
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+
+eval "`$LIBTOOL --config | $EGREP '^objdir='`"
+
+
+# Check to make sure we have a dynamic library.
+eval `$EGREP '^library_names=' libhello.la`
+AT_CHECK([test -n "$library_names" || (exit 77)])
+
+func_save_files
+
+eval "`$LIBTOOL --config | $EGREP '^shlibpath_overrides_runpath='`"
+eval "`$LIBTOOL --config | $EGREP '^hardcode_(action|direct|into_libs)='`"
+
+# Allow the binary to link on-demand if need be.
+./hell$EXEEXT >/dev/null || :
+
+# Remove libhello.la from build tree.
+rm -f libhello.la "$objdir"/libhello.*
+
+# Either uninstalled ./hell will run using the just installed libraries
+# when the uninstalled libs are missing, or relinking at install time
+# is necessary, and the uninstalled ./hell has only the uninstalled
+# library paths hardcoded.
+AT_CHECK([./hell$EXEEXT >/dev/null || test relink,yes = 
"$hardcode_action,$hardcode_direct"])
+
+# Link an incomplete libhello.la.
+LT_AT_MAKE([libhello.la], [libhello_la_OBJECTS=hello.lo])
+AT_CHECK([test -f libhello.la])
+
+# Try running uninstalled ./hell with only broken libhello.la in build tree.
+# If the following has normal exit status, shlibpath_overrides_runpath is
+# wrong, and should be set to `no' on this host.
+# The unusual `|| (exit 1)' is to normalize all non-zero exit statuses.
+LT_AT_CHECK([./hell || (exit 1)], 1, [ignore], [ignore])
+
+test relink = "$hardcode_action" ||
+test yes = "$shlibpath_overrides_runpath" ||
+{
+    AT_CHECK([rm -f $objdir/lt-hell$EXEEXT])
+    AT_CHECK([cp $objdir/hell$EXEEXT $objdir/lt-hell$EXEEXT])
+
+    # Running demo/hell with installed libhello.la.
+    # If the following check fails, then shlibpath_overrides_runpath is
+    # wrong, and should be set to `yes' on this host.
+    LT_AT_CHECK([./hell], 0, [expout])
+}
+
+AT_CLEANUP
+
+
+## ----------------- ##
+## Demo noinst link. ##
+## ----------------- ##
+
+AT_SETUP([uninstalled libraries have priority])
+
+_LT_SETUP
+
+_LT_CHECK_CONFIG
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+
+# Remove libhello.la and hell from build tree.
+rm -f libhello.la "hell$EXEEXT"
+
+# If this check fails (i.e. the make succeeds), then the installed library
+# was used, which is wrong.
+AT_CHECK([$unset LIBTOOL LIBTOOLIZE; $MAKE hell$EXEEXT 
libhello_la_OBJECTS=hello.lo || (exit 1)],
+         [1], [ignore], [ignore])
+
+AT_CLEANUP
diff --git a/tests/demo/.gitignore b/tests/demo/.gitignore
deleted file mode 100644
index 0e0f6fc..0000000
--- a/tests/demo/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-/hc-direct
-/hc-libflag
-/hc-libpath
-/hc-minusL
-/hell
-/hell_static
-/helldl
diff --git a/tests/demo/Makefile.am b/tests/demo/Makefile.am
deleted file mode 100644
index 3cf17c6..0000000
--- a/tests/demo/Makefile.am
+++ /dev/null
@@ -1,178 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-##   Copyright (C) 2003, 2004, 2005, 2010 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)/../..
-
-# Build a libtool library, libhello.la for installation in libdir.
-lib_LTLIBRARIES = libhello.la
-libhello_la_SOURCES = hello.c foo.c
-libhello_la_LIBADD = $(LIBM)
-libhello_la_LDFLAGS = -no-undefined -version-info 3:12:1
-libhello_la_AM_CPPFLAGS = $(AM_CPPFLAGS) -DBUILDING_LIBHELLO
-
-include_HEADERS = foo.h
-
-if BINARY_HELLDL
-BUILD_helldl = helldl
-else
-BUILD_helldl =
-endif
-
-bin_PROGRAMS = hell hell_static $(BUILD_helldl)
-
-# Build hell from main.c and libhello.la
-hell_SOURCES = main.c
-hell_LDADD = libhello.la
-
-# Create a statically linked version of hell.
-hell_static_SOURCES = main.c
-hell_static_LDADD = libhello.la
-hell_static_LDFLAGS = $(STATIC)
-
-if BINARY_HELLDL
-
-# Create a version of hell that does a preloaded dlopen.
-helldl_SOURCES = dlmain.c
-helldl_LDFLAGS = -export-dynamic -dlpreopen libhello.la
-helldl_DEPENDENCIES = libhello.la
-
-else
-
-bin_SCRIPTS = helldl
-# create a script that says that -dlopen is not supported
-helldl helldl$(EXEEXT):
-       rm -f $@
-       echo '#! /bin/sh' > $@
-       echo '-dlopen is unsupported' >> $@
-       chmod +x $@
-endif
-
-libtool: $(LIBTOOL_DEPS)
-       $(SHELL) ./config.status --recheck
-
-#----------------------------------------------------------------------
-# The following declarations are only used in the testsuite:
-#----------------------------------------------------------------------
-
-hardcode_tests = hc-direct hc-libflag hc-libpath hc-minusL
-CLEANFILES = $(hardcode_tests)
-
-# Unfortunately, in order to test libtool thoroughly, we need access
-# to its private directory.
-objdir = `$(LIBTOOL) --config | sed -n -e 's/^objdir=\(.*\)$$/\1/p'`
-
-# The following rules are only for the libtool demo and tests.
-# Regenerate our acinclude.m4 only if it doesn't exist.
-$(srcdir)/acinclude.m4:
-       rm -f $(srcdir)/acinclude.m4
-       cd $(srcdir) && $(LN_S) ../libtool.m4 acinclude.m4
-
-
-# Test programs to see what gets hardcoded.
-.PHONY: hardcode
-hardcode: $(hardcode_tests)
-SET_HARDCODE_FLAGS = \
-  eval `$(LIBTOOL) --config | sed -n -e '/^hardcode_.*=/p; /^wl=/p'`
-hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
-       @rm -f hc-direct
-       @echo "You may ignore any linking errors from the following command:"
-       @shlib=./$(objdir)/libhello.a; \
-         eval "`grep '^library_names' libhello.la`"; \
-         for lib in $$library_names; do \
-           shlib="./$(objdir)/$$lib"; \
-         done; \
-         $(SET_HARDCODE_FLAGS); \
-         libdir=$(libdir); \
-         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib 
$(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
-         eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib 
$(LIBS) $(LIBM) $$flag || echo unsupported > $@"
-
-hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
-       @$(SET_HARDCODE_FLAGS); \
-         libdir=`pwd`/$(objdir); \
-         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         if test -z "$$flag"; then \
-           echo "echo unsupported > $@"; \
-           echo unsupported > $@ || status="$$?"; \
-         else \
-           echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag 
-L$(libdir) -lhello $(LIBS) $(LIBM)"; \
-           $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) 
-lhello $(LIBS) $(LIBM) || status="$$?"; \
-         fi; \
-         exit $$status
-
-hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
-       @rm -f hc-libpath
-       @echo "You may ignore any linking errors from the following command:"
-       @$(SET_HARDCODE_FLAGS); \
-         eval `$(LIBTOOL) --config | grep '^shlibpath_var='`; \
-         libdir=$(libdir); \
-         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 
$(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
-         eval "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ 
$(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"
-
-hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
-       @rm -f hc-minusL
-       @$(SET_HARDCODE_FLAGS); \
-         libdir=$(libdir); \
-         flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) 
-lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
-         eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) 
-lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"
-
-# This is one of the essential tests for deplibs_check_method=pass_all.
-# If this one passes with pass_all, it is likely that pass_all works
-EXTRA_LIBRARIES = libhell0.a
-libhell0_a_SOURCES =
-libhell0_a_LIBADD = hello.$(OBJEXT) foo.$(OBJEXT)
-EXTRA_LTLIBRARIES = libhell1.la libhell2.la
-libhell1_la_SOURCES = hell1.c
-libhell1_la_LIBADD = -L. -lhell0
-libhell1_la_LDFLAGS = -no-undefined -rpath $(libdir)
-libhell1_la_DEPENDENCIES = libhell0.a
-libhell2_la_SOURCES = hell2.c
-libhell2_la_LIBADD = -L. -lhell0
-libhell2_la_LDFLAGS = -no-undefined -rpath $(libdir)
-libhell2_la_DEPENDENCIES = libhell0.a
-EXTRA_PROGRAMS = hell0
-hell0_SOURCES = main.c
-hell0_LDADD = libhell1.la libhell2.la $(LIBM)
-
-# 'hell0' in EXTRA_PROGRAMS gets translated to 'hell0.exe'; but we
-# must explicitly list the wrapper script 'hell0'.  (bin_PROGRAMS
-# are handled seamlessly by automake rules; the extra step is only
-# necessary for EXTRA_PROGRAMS)
-CLEANFILES += $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) hell0
-
-deplibs-check: hell0$(EXEEXT)
-
-# 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/demo/README b/tests/demo/README
deleted file mode 100644
index 511fd83..0000000
--- a/tests/demo/README
+++ /dev/null
@@ -1,9 +0,0 @@
-This is GNU hell, an example package that uses GNU libtool with an
-Automake-generated environment to build a simple library and program.
-
-Admittedly, it would be better if this was a more realistic example,
-say, a program that actually did something useful, but we can't have
-everything.
-
-Send bug reports and comments about GNU hell to the libtool mailing
-list <address@hidden>.
diff --git a/tests/demo/configure.ac b/tests/demo/configure.ac
deleted file mode 100644
index 27a0da5..0000000
--- a/tests/demo/configure.ac
+++ /dev/null
@@ -1,73 +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([demo], [1.0], address@hidden)
-AC_CONFIG_SRCDIR([hello.c])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ---------------- ##
-## compiler checks. ##
-## ---------------- ##
-AC_PROG_CC
-
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-LT_INIT([dlopen win32-dll])
-AC_SUBST([LIBTOOL_DEPS])
-
-STATIC=
-test yes = "$enable_static" && STATIC=-static
-AC_SUBST([STATIC])
-
-case $lt_cv_sys_global_symbol_pipe in
-  ?*) binary_helldl=yes ;;
-esac
-AM_CONDITIONAL([BINARY_HELLDL], [test yes = "$binary_helldl"])
-
-
-## --------------------------- ##
-## Libraries required by demo. ##
-## --------------------------- ##
-LT_LIB_M
-
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/demo/dlmain.c b/tests/demo/dlmain.c
deleted file mode 100644
index 495ae7c..0000000
--- a/tests/demo/dlmain.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* dlmain.c -- hello test program that uses simulated dynamic linking
-
-   Copyright (C) 1996-1999, 2004, 2006, 2007, 2010 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.
-*/
-
-#include "foo.h"
-#include <stdio.h>
-#include <string.h>
-
-#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
-
-typedef struct
-{
-  const char *name;
-  lt_ptr_t address;
-} lt_dlsymlist;
-
-extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[];
-
-int
-main ()
-{
-  const lt_dlsymlist *s;
-  int (*pfoo)() = 0;
-  int (*phello)() = 0;
-  int *pnothing = 0;
-
-  printf ("Welcome to *modular* GNU Hell!\n");
-
-  /* Look up the symbols we require for this demonstration. */
-  s = lt_preloaded_symbols;
-  while (s->name)
-    {
-      if (s->address) {
-        const char *name = s->name;
-        printf ("found symbol: %s\n", name);
-        if (!strcmp ("hello", name))
-         phello = (int(*)())s->address;
-        else if (!strcmp ("foo", name))
-         pfoo = (int(*)())s->address;
-        else if (!strcmp ("nothing", name))
-#ifndef _WIN32
-         /* In an ideal world we could do this... */
-         pnothing = (int*)s->address;
-#else /* !_WIN32 */
-         /* In an ideal world a shared lib would be able to export data */
-         pnothing = (int*)&nothing;
-#endif
-      } else
-        printf ("found file: %s\n", s->name);
-      s ++;
-    }
-
-  /* Try assigning to the nothing variable. */
-  if (pnothing)
-    *pnothing = 1;
-  else
-    fprintf (stderr, "did not find the `nothing' variable\n");
-
-  /* Just call the functions and check return values. */
-  if (pfoo)
-    {
-      if ((*pfoo) () != FOO_RET)
-       return 1;
-    }
-  else
-    fprintf (stderr, "did not find the `foo' function\n");
-
-  if (phello)
-    {
-      if ((*phello) () != HELLO_RET)
-       return 3;
-    }
-  else
-    fprintf (stderr, "did not find the `hello' function\n");
-
-  return 0;
-}
diff --git a/tests/demo/foo.c b/tests/demo/foo.c
deleted file mode 100644
index 4f32f3c..0000000
--- a/tests/demo/foo.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* foo.c -- trivial test function for libfoo
-
-   Copyright (C) 1996-1999, 2007 Free Software Foundation, Inc.
-   Written by Gordon Matzigkeit, 1996
-
-   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>
-
-/* Give a global variable definition. */
-int nothing = FOO_RET;
-
-int
-foo ()
-{
-  printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
-  return FOO_RET;
-}
diff --git a/tests/demo/foo.h b/tests/demo/foo.h
deleted file mode 100644
index 5609d8d..0000000
--- a/tests/demo/foo.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* foo.h -- interface to the libfoo library
-
-   Copyright (C) 1996-1999, 2010 Free Software Foundation, Inc.
-   Written by Gord Matzigkeit, 1996
-
-   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
-
-/* At some point, cygwin will stop defining __CYGWIN32__, but b19 and
- * earlier do not define __CYGWIN__.  This snippit allows us to check
- * for __CYGWIN__ reliably for both current, old, and (probable) future
- * releases.
- */
-#ifdef __CYGWIN32__
-#  ifndef __CYGWIN__
-#    define __CYGWIN__
-#  endif
-#endif
-
-#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__
-# ifdef BUILDING_LIBHELLO
-#  ifdef DLL_EXPORT
-#   define LIBHELLO_SCOPE extern __declspec (dllexport)
-#  endif
-# else
-#  define LIBHELLO_SCOPE extern __declspec (dllimport)
-# endif
-#endif
-#ifndef LIBHELLO_SCOPE
-# define LIBHELLO_SCOPE extern
-#endif
-
-/* __BEGIN_DECLS should be used at the beginning of your declarations,
-   so that C++ compilers don't mangle their names.  Use __END_DECLS at
-   the end of C declarations. */
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
-
-/* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers
-   that don't understand ANSI C prototypes still work, and ANSI C
-   compilers can issue warnings about type mismatches. */
-#undef LTDL_PARAMS
-#if defined __STDC__ || defined _AIX || (defined __mips && defined 
_SYSTYPE_SVR4) || defined __CYGWIN__ || defined __cplusplus
-# define LT_PARAMS(protos) protos
-# define lt_ptr_t     void*
-#else
-# define LT_PARAMS(protos) ()
-# define lt_ptr_t     char*
-#endif
-
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  
*/
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
-   relocations are performed -- see ld's documentation on pseudo-relocs.  */
-# define LT_DLSYM_CONST
-#elif defined __osf__
-/* This system does not cope well with relocations in const data.  */
-# define LT_DLSYM_CONST
-#else
-# define LT_DLSYM_CONST const
-#endif
-
-/* Silly constants that the functions return. */
-#define HELLO_RET 0xe110
-#define FOO_RET 0xf00
-
-
-/* Declarations.  Note the wonderful use of the above macros. */
-__BEGIN_DECLS
-int foo LT_PARAMS((void));
-int hello LT_PARAMS((void));
-LIBHELLO_SCOPE int nothing;
-__END_DECLS
-
-#endif /* !_FOO_H_ */
diff --git a/tests/demo/hell1.c b/tests/demo/hell1.c
deleted file mode 100644
index 3e65617..0000000
--- a/tests/demo/hell1.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* hell1.c -- hello test program that uses simulated dynamic linking
-
-   Copyright (C) 1996 Free Software Foundation, Inc.
-   Written by Gord Matzigkeit, 1996
-
-   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.
-*/
-
-int hell1() { return 1; }
diff --git a/tests/demo/hell2.c b/tests/demo/hell2.c
deleted file mode 100644
index 91a7548..0000000
--- a/tests/demo/hell2.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* hell2.c -- hello test program that uses simulated dynamic linking
-
-   Copyright (C) 1996 Free Software Foundation, Inc.
-   Written by Gord Matzigkeit, 1996
-
-   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.
-*/
-
-int hell2() { return 2; }
diff --git a/tests/demo/hello.c b/tests/demo/hello.c
deleted file mode 100644
index fc08c1a..0000000
--- a/tests/demo/hello.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* hello.c -- trivial test function for libfoo
-
-   Copyright (C) 1996-1999 Free Software Foundation, Inc.
-   Written by Gord Matzigkeit, 1996
-
-   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
-hello ()
-{
-  printf ("** This is not GNU Hello.  There is no built-in mail reader. **\n");
-  return HELLO_RET;
-}
diff --git a/tests/demo/main.c b/tests/demo/main.c
deleted file mode 100644
index eaa0c60..0000000
--- a/tests/demo/main.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* main.c -- trivial hello test program
-
-   Copyright (C) 1996-1999, 2006 Free Software Foundation, Inc.
-   Written by Gord Matzigkeit, 1996
-
-   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 ()
-{
-  printf ("Welcome to GNU Hell!\n");
-
-  /* Try assigning to the nothing variable */
-  nothing = 1;
-
-  /* Just call the functions and check return values. */
-  if (foo () != FOO_RET)
-    return 1;
-
-  if (hello () != HELLO_RET)
-    return 2;
-
-  return 0;
-}
-- 
1.7.7.4

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]