libtool-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Libtool branch, master, updated. v2.4.2-273-ge24f183


From: Gary V. Vaughan
Subject: [SCM] GNU Libtool branch, master, updated. v2.4.2-273-ge24f183
Date: Fri, 05 Oct 2012 11:15:19 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  e24f18306f92f7b31aa20f713924b740c0c850bc (commit)
       via  1a5b2496799401c736f652704b0f1fa817e21d11 (commit)
       via  edb06d7aaa22ef342068dc98769e78c94f07de6b (commit)
       via  0cd5530d7e78cc8e5c98087d653a712b5b60213a (commit)
       via  2759bf88a9055c28ebab2f6e74e357f10d95764d (commit)
       via  b4f5b4695304a94055841718138b7a4c6c7daac3 (commit)
       via  b078ea7ce89d9f422384b6708c8e2341b743084e (commit)
       via  833ec15cd0c77229c9bbfd3506648c5418cc2c80 (commit)
       via  58848f2e86fa827c50df95d607758105ad1a60d7 (commit)
       via  2c387b8e10eeb3a51a769de439406f20cad365fd (commit)
       via  0024c50ba355e23dd1ef2e95ded517ed6cdbf36d (commit)
       via  c91aa0b5c711ca63a168317a1493ed93683cac55 (commit)
       via  215149492c3fcc24f5eafffa65f3257bd6d98b3c (commit)
       via  a801a23e63ffb3fdd63544738c8912a7c13dc791 (commit)
       via  233829c0b5c3e822398222d4a2f6ea67f61790cf (commit)
       via  d7cdd528f9889e3c5c36591a5e4c847ca37cb50b (commit)
       via  6b83c12e3977294b736c45a277bebaf3d9fea0e6 (commit)
       via  81defe1b7ec03803008d09eea1900589570bb405 (commit)
       via  4bb16e6cc2328e931a52d6f6fc412017f5ffca67 (commit)
       via  656f63b761797efafe26691809183e49f7dcb4d6 (commit)
       via  bcc0740c8bea00db2219de693de8c93cfcad78ab (commit)
      from  848524eac71f05b671f77cd42e62489897a0f9eb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e24f18306f92f7b31aa20f713924b740c0c850bc
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 22:54:55 2012 +0700

    tests: remove last vestiges of the legacy test harness.
    
    All legacy tests have been fully migrated to Autotest, so
    no need to cling to the legacy scaffolding any more.
    * tests/defs.m4sh: Delete file.
    * configure.ac (AM_INIT_AUTOMAKE): Remove unused color-tests and
    parallel-tests options.
    * Makefile.am (defs_m4sh, defs_in, defs, TESTS): Remove.
    Adjust all dependencies.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 1a5b2496799401c736f652704b0f1fa817e21d11
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 22:38:01 2012 +0700

    tests: migrate legacy tagtrace.test to Autotest.
    
    * tests/tagtrace.test: Delete file.
    * tests/libtool.at (test LT_SUPPORTED_TAG interface): Add
    Autotest equivalent.
    * Makefile.am (TESTS): Remove tests/tagtrace.test.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit edb06d7aaa22ef342068dc98769e78c94f07de6b
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 22:04:11 2012 +0700

    tests: migrate legacy objectlist.test to Autotest.
    
    * tests/objectlist.test: Delete file.
    * tests/libtool.at (check objectlist file operation): Add
    Autotest equivalent.
    * Makefile.am (TESTS): Remove tests/objectlist.test.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 0cd5530d7e78cc8e5c98087d653a712b5b60213a
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 21:55:17 2012 +0700

    tests: migrate legacy link.test and link-2.test to Autotest.
    
    * tests/link.test, tests/link-2.test: Delete files.
    * tests/libtool.at (Check link operation): Add Autotest
    equivalent.
    * Makefile.am (TESTS): Remove tests/link.test and
    tests/link-2.test.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 2759bf88a9055c28ebab2f6e74e357f10d95764d
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 21:38:39 2012 +0700

    tests: migrate legacy nomode.test to Autotest.
    
    * tests/nomode.test: Delete file.
    * test/libtool.at (Check help output, No mode diagnostic): Add
    equivalent tests in Autotest.
    * Makefile.am (TESTS): Remove tests/nomode.test.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit b4f5b4695304a94055841718138b7a4c6c7daac3
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 21:22:06 2012 +0700

    tests: migrate legacy suffix.test to Autotest.
    
    * tests/suffix.test: Delete file.
    * tests/libtool.at (Transform source suffices): Add Autotest
    equivalent.
    * Makefile.am (TESTS): Remove tests/suffix.test.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit b078ea7ce89d9f422384b6708c8e2341b743084e
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 21:00:30 2012 +0700

    tests: migrate legacy quote.test to Autotest.
    
    * tests/quote.test: Moved from here...
    * tests/libtool.at: ...to here, and updated to Autotest.
    * Makefile.am (TESTS): Remove tests/quote.test.
    (TESTSUITE_AT): Add tests/libtool.at.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 833ec15cd0c77229c9bbfd3506648c5418cc2c80
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 20:19:33 2012 +0700

    maint: add missing 2012 copyright to newly pushed old files.
    
    * tests/cdemo.at, tests/demo.at, tests/depdemo.at,
    tests/f77demo.at, tests/fcdemo.at, tests/mdemo.at,
    tests/tagdemo.at (Copyright): Update with missing 2012.

commit 58848f2e86fa827c50df95d607758105ad1a60d7
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 4 20:13:29 2012 +0700

    syntax-check: remove test/demo directories from exemption regexps.
    
    * cfg.mk (exclude_file_name_regex--sc_bindtextdomain)
    (exclude_file_name_regexp--sc_program_name): Remove. The excluded
    directories no longer exist.
    (exclude_file_name_regexp--sc_prohibit_strcmp): Remove subexpression
    for matching removed demo directories.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 2c387b8e10eeb3a51a769de439406f20cad365fd
Author: Gary V. Vaughan <address@hidden>
Date:   Sun Nov 27 23:50:15 2011 +0700

    configure: remove unused conditionals and support for order only rules.
    
    Clean up some more unused cruft.
    * configure.ac (HAVE_CXX, HAVE_F77, HAVE_FC, HAVE_GCJ, HAVE_RC):
    Remove.  These were only used by the recently removed legacy
    tests.
    [order-only prerequisites]: Ditto.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 0024c50ba355e23dd1ef2e95ded517ed6cdbf36d
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 24 18:36:04 2011 +0700

    bootstrap: remove support for `-r' and `reconf_dirs'.
    
    With all those extra demo directories out of the way, we can
    revert to a more canonical bootstrap process, and jettison the
    cruft that was only there to work around the pain of
    needing to autoreconf 11 directories.  Bootstrap is now an order
    of magnitude faster.
    * bootstrap.conf (require_ltdl_dir): New function. Factored out
    of `libtool_build_prerequisites'.
    (libtool_build_prerequisites): Adjust.
    (func_reconfigure): Use `require_ltdl_dir' to determine the name
    of the other directory we need to autoreconf during bootstrap.
    (libtool_options_prep, libtool_parse_options)
    (libtool_validate_options): Remove.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit c91aa0b5c711ca63a168317a1493ed93683cac55
Author: Gary V. Vaughan <address@hidden>
Date:   Sun Nov 27 19:18:23 2011 +0700

    tests: let pic_flag and with-pic Autotests work on non-VPATH builds.
    
    * tests/pic_flag.at: Use _LT_DEMO_SETUP to generate a demo style
    project, rather than relying on $abs_top_srcdir/configure.
    * tests/with-pic.at: Likewise.
    * Makefile.am (TESTSUITE_AT): Move tests/pic_flag.at and
    tests/with-pic.at so that they run immediately following
    tests/demo.at.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 215149492c3fcc24f5eafffa65f3257bd6d98b3c
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 24 18:26:17 2011 +0700

    tests: migrate legacy tests/fcdemo tests to Autotest.
    
    Along with the demise of the last demo directory, so all the
    cruft for re-autotooling and distributing the additional
    directories is no longer necessary.
    * tests/fcdemo.at: New autotest groups, based on...
    * tests/fcdemo-conf.test, tests/fcdemo-exec.test,
    tests/fcdemo-make.test, tests/fcdemo-shared-exec.test,
    tests/fcdemo-shared-make.test, tests/fcdemo-shared.test,
    tests/fcdemo-static-exec.test, tests/fcdemo-static-make.test,
    tests/fcdemo-static.test: ...these legacy tests, now removed.
    * tests/fcdemo/Makefile.am, tests/fcdemo/README,
    tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
    tests/fcdemo/foo.h, tests/fcdemo/fooc.c, tests/fcdemo/foof.f90,
    tests/fcdemo/foof2.f90, tests/fcdemo/foof3.f90,
    tests/fcdemo/fprogram.f90: Remove.
    * configure.ac (CONF_SUBDIRS, DIST_MAKEFILE_LIST): Remove.
    * Makefile.am (DIST_SUBDIRS, FC_TESTS, clean-local-legacy)
    (configure-subdirs, distclean-recursive, distdir)
    (fake-distclean-legacy, $(DIST_MAKEFILE_LIST)): Remove.
    (COMMON_TESTS): Rename from this...
    (TESTS): ...to this.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit a801a23e63ffb3fdd63544738c8912a7c13dc791
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 24 17:51:08 2011 +0700

    tests: migrate legacy tests/f77demo tests to Autotest.
    
    * tests/f77demo.at: New autotest groups, based on...
    * tests/f77demo-conf.test, tests/f77demo-exec.test,
    tests/f77demo-make.test, tests/f77demo-shared-exec.test,
    tests/f77demo-shared-make.test, tests/f77demo-shared.test,
    tests/f77demo-static-exec.test, tests/f77demo-static-make.test,
    tests/f77demo-static.test: ...these legacy tests, now removed.
    * tests/f77demo/Makefile.am, tests/f77demo/README,
    tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
    tests/f77demo/foo.h, tests/f77demo/fooc.c, tests/f77demo/foof.f,
    tests/f77demo/foof2.f, tests/f77demo/foof3.f,
    tests/f77demo/fprogram.f: Remove.
    * configure.ac (CONF_SUBDIRS): Remove tests/f77demo.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 233829c0b5c3e822398222d4a2f6ea67f61790cf
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 24 15:49:07 2011 +0700

    tests: migrate legacy tests/mdemo2 tests to Autotest.
    
    This test was just a small non-ltdl aware library to load a
    library from the legacy mdemo test, which in turn used ltdl to
    call functions from modules. No need to create a whole other
    test group with copies of everything from mdemo setup - just
    tack the additional test on the end of the mdemo group.
    * tests/mdemo.at (link with library that loads ltdl modules):
    New test, based on...
    * tests/mdemo2-conf.test, tests/mdemo-exec.test,
    tests/mdemo-make.test: ...these legacy tests, now removed.
    * tests/mdemo2/Makefile.am, tests/mdemo2/README,
    tests/mdemo2/configure.ac, tests/mdemo2/main.c: Remove.
    * configure.ac (CONF_SUBDIRS): Remove tests/mdemo2.
    * Makefile.am: Adjust.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit d7cdd528f9889e3c5c36591a5e4c847ca37cb50b
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 24 15:10:11 2011 +0700

    tests: migrate legacy tests/mdemo tests to Autotest.
    
    * tests/mdemo.at: New autotest groups, based on...
    * tests/mdemo-conf.test, tests/mdemo-dryrun.test,
    tests/mdemo-exec.test, tests/mdemo-inst.test,
    tests/mdemo-make.test, tests/mdemo-shared-exec.test,
    tests/mdemo-shared-inst.test, tests/mdemo-shared-make.test,
    tests/mdemo-shared-unst.test, tests/mdemo-shared.test,
    tests/mdemo-static-exec.test, tests/mdemo-static-inst.test,
    tests/mdemo-static-make.test, tests/mdemo-static-unst.test,
    tests/mdemo-static.test, tests/mdemo-unst.test: ...these legacy
    tests, now removed.
    * tests/mdemo/Makefile.am, tests/mdemo/README,
    tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
    tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
    tests/mdemo/sub.c: Remove.
    * configure.ac (CONF_SUBDIRS): Remove tests/mdemo.
    * Makefile.am: Adjust.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 6b83c12e3977294b736c45a277bebaf3d9fea0e6
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 24 11:29:10 2011 +0700

    tests: migrate legacy tests/pdemo tests to Autotest.
    
    This test was a thinly veiled copy of the basic legacy
    demo-conf.test series, with the addition of long file names that
    are not unique in the first 17 characters of their name, mashed
    up with the cmdline_wrap.at max_cmd_len limits.  Migrating to
    Autotest means that this test will be automatically rerun with
    max_cmd_len=24 as cmdline_wrap.at recurses through the whole
    testsuite, so the migrated pdemo test is now simply another test
    case in demo.at with longer file names.
    * test/demo.at (linking with long file names): New test, based
    on...
    * tests/pdemo-conf.test, tests/pdemo-exec.test,
    tests/pdemo-inst.test, tests/pdemo-make.test: ...these legacy
    tests, now removed.
    * tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
    tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
    tests/pdemo/longer_file_name_foo.c,
    tests/pdemo/longer_file_name_foo2.c,
    tests/pdemo/longer_file_name_hell1.c,
    tests/pdemo/longer_file_name_hell2.c,
    tests/pdemo/longer_file_name_hello.c,
    tests/pdemo/longer_file_name_main.c: Remove.
    * configure.ac (CONF_SUBDIRS): Remove tests/pdemo.
    * Makefile.am: Adjust.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 81defe1b7ec03803008d09eea1900589570bb405
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Nov 23 22:23:16 2011 +0700

    tests: migrate legacy tests/tagdemo tests to Autotest.
    
    * tests/tagdemo.at: New autotest groups, based on...
    tests/tagdemo-conf.test, tests/tagdemo-exec.test,
    tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
    tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
    tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
    tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
    tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
    ...these legacy tests, now removed.
    * tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
    tests/tagdemo/README, tests/tagdemo/baz.cpp,
    tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
    tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
    tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
    tests/tagdemo/main.cpp: Remove.
    * configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
    * Makefile.am: Adjust.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 4bb16e6cc2328e931a52d6f6fc412017f5ffca67
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Nov 23 20:03:59 2011 +0700

    tests: migrate legacy tests/depdemo tests to Autotest.
    
    * tests/depdemo.at: New autotest groups, based on...
    * tests/depdemo-conf.test, tests/depdemo-exec.test,
    tests/depdemo-inst.test, tests/depdemo-make.test,
    tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
    tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
    tests/depdemo-nofast.test, tests/depdemo-relink.test,
    tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
    tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
    tests/depdemo-shared.test, tests/depdemo-static-exec.test,
    tests/depdemo-static-inst.test, tests/depdemo-static-make.test,
    tests/depdemo-static-unst.test, tests/depdemo-static.test,
    tests/depdemo-unst.test: ...these legacy test cases, now
    removed.
    * tests/depdemo/Makefile.am, tests/depdemo/README,
    tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
    tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
    tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
    tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
    tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
    tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
    tests/depdemo/l4/l4.h, tests/depdemo/main.c,
    tests/depdemo/sysdep.h: Remove.
    * configure.ac (CONF_SUBDIRS): Remove tests/depdemo.
    * Makefile.am: Adjust.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 656f63b761797efafe26691809183e49f7dcb4d6
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Nov 23 15:17:49 2011 +0700

    tests: migrate legacy tests/demo tests to Autotest.
    
    * 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>

commit bcc0740c8bea00db2219de693de8c93cfcad78ab
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Nov 21 23:15:54 2011 +0700

    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 <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                            |    1 -
 Makefile.am                           |  355 +------------
 NEWS                                  |    2 +
 bootstrap.conf                        |  175 ++-----
 cfg.mk                                |    4 +-
 configure.ac                          |   52 +--
 tests/cdemo-conf.test                 |   34 --
 tests/cdemo-exec.test                 |   34 --
 tests/cdemo-make.test                 |   34 --
 tests/cdemo-shared-exec.test          |    3 -
 tests/cdemo-shared-make.test          |    3 -
 tests/cdemo-shared.test               |   34 --
 tests/cdemo-static-exec.test          |    3 -
 tests/cdemo-static-make.test          |    3 -
 tests/cdemo-static.test               |   34 --
 tests/cdemo-undef-exec.test           |    3 -
 tests/cdemo-undef-make.test           |    3 -
 tests/cdemo-undef.test                |   49 --
 tests/cdemo.at                        |  193 +++++++
 tests/cdemo/.gitignore                |    1 -
 tests/cdemo/Makefile.am               |   53 --
 tests/cdemo/README                    |    4 -
 tests/cdemo/configure.ac              |   63 ---
 tests/cdemo/foo.c                     |   42 --
 tests/cdemo/foo.h                     |   37 --
 tests/cdemo/main.c                    |   45 --
 tests/defs.m4sh                       |  376 --------------
 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           |   63 ---
 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                |  107 ----
 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                         |  919 +++++++++++++++++++++++++++++++++
 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 --
 tests/depdemo-conf.test               |   34 --
 tests/depdemo-exec.test               |   35 --
 tests/depdemo-inst.test               |   37 --
 tests/depdemo-make.test               |   34 --
 tests/depdemo-nofast-exec.test        |    3 -
 tests/depdemo-nofast-inst.test        |    3 -
 tests/depdemo-nofast-make.test        |    3 -
 tests/depdemo-nofast-unst.test        |    3 -
 tests/depdemo-nofast.test             |   38 --
 tests/depdemo-relink.test             |  129 -----
 tests/depdemo-shared-exec.test        |    3 -
 tests/depdemo-shared-inst.test        |    3 -
 tests/depdemo-shared-make.test        |    3 -
 tests/depdemo-shared-unst.test        |    3 -
 tests/depdemo-shared.test             |   34 --
 tests/depdemo-static-exec.test        |    3 -
 tests/depdemo-static-inst.test        |    3 -
 tests/depdemo-static-make.test        |    3 -
 tests/depdemo-static-unst.test        |    3 -
 tests/depdemo-static.test             |   34 --
 tests/depdemo-unst.test               |   34 --
 tests/depdemo.at                      |  430 +++++++++++++++
 tests/depdemo/.gitignore              |    2 -
 tests/depdemo/Makefile.am             |   57 --
 tests/depdemo/README                  |   11 -
 tests/depdemo/configure.ac            |   68 ---
 tests/depdemo/l1/Makefile.am          |   33 --
 tests/depdemo/l1/l1.c                 |   41 --
 tests/depdemo/l1/l1.h                 |   50 --
 tests/depdemo/l2/Makefile.am          |   34 --
 tests/depdemo/l2/l2.c                 |   44 --
 tests/depdemo/l2/l2.h                 |   50 --
 tests/depdemo/l3/Makefile.am          |   35 --
 tests/depdemo/l3/l3.c                 |   46 --
 tests/depdemo/l3/l3.h                 |   50 --
 tests/depdemo/l4/Makefile.am          |   34 --
 tests/depdemo/l4/l4.c                 |   48 --
 tests/depdemo/l4/l4.h                 |   50 --
 tests/depdemo/main.c                  |   48 --
 tests/depdemo/sysdep.h                |   53 --
 tests/f77demo-conf.test               |   34 --
 tests/f77demo-exec.test               |   35 --
 tests/f77demo-make.test               |   36 --
 tests/f77demo-shared-exec.test        |    3 -
 tests/f77demo-shared-make.test        |    3 -
 tests/f77demo-shared.test             |   34 --
 tests/f77demo-static-exec.test        |    3 -
 tests/f77demo-static-make.test        |    3 -
 tests/f77demo-static.test             |   34 --
 tests/f77demo.at                      |  340 ++++++++++++
 tests/f77demo/.gitignore              |    2 -
 tests/f77demo/Makefile.am             |   65 ---
 tests/f77demo/README                  |   12 -
 tests/f77demo/configure.ac            |   71 ---
 tests/f77demo/cprogram.c              |   53 --
 tests/f77demo/foo.h                   |   53 --
 tests/f77demo/fooc.c                  |   41 --
 tests/f77demo/foof.f                  |   10 -
 tests/f77demo/foof2.f                 |   12 -
 tests/f77demo/foof3.f                 |   12 -
 tests/f77demo/fprogram.f              |   31 --
 tests/fcdemo-conf.test                |   42 --
 tests/fcdemo-exec.test                |   35 --
 tests/fcdemo-make.test                |   36 --
 tests/fcdemo-shared-exec.test         |    3 -
 tests/fcdemo-shared-make.test         |    3 -
 tests/fcdemo-shared.test              |   42 --
 tests/fcdemo-static-exec.test         |    3 -
 tests/fcdemo-static-make.test         |    3 -
 tests/fcdemo-static.test              |   42 --
 tests/fcdemo.at                       |  342 ++++++++++++
 tests/fcdemo/.gitignore               |    2 -
 tests/fcdemo/Makefile.am              |   75 ---
 tests/fcdemo/README                   |   12 -
 tests/fcdemo/configure.ac             |   78 ---
 tests/fcdemo/cprogram.c               |   54 --
 tests/fcdemo/foo.h                    |   54 --
 tests/fcdemo/fooc.c                   |   41 --
 tests/fcdemo/foof.f90                 |   10 -
 tests/fcdemo/foof2.f90                |   12 -
 tests/fcdemo/foof3.f90                |   12 -
 tests/fcdemo/fprogram.f90             |   31 --
 tests/libtool.at                      |  226 ++++++++
 tests/link-2.test                     |   50 --
 tests/link.test                       |   37 --
 tests/mdemo-conf.test                 |   34 --
 tests/mdemo-dryrun.test               |  116 -----
 tests/mdemo-exec.test                 |   39 --
 tests/mdemo-inst.test                 |   37 --
 tests/mdemo-make.test                 |   34 --
 tests/mdemo-shared-exec.test          |    3 -
 tests/mdemo-shared-inst.test          |    3 -
 tests/mdemo-shared-make.test          |    3 -
 tests/mdemo-shared-unst.test          |    3 -
 tests/mdemo-shared.test               |   34 --
 tests/mdemo-static-exec.test          |    3 -
 tests/mdemo-static-inst.test          |    3 -
 tests/mdemo-static-make.test          |    3 -
 tests/mdemo-static-unst.test          |    3 -
 tests/mdemo-static.test               |   34 --
 tests/mdemo-unst.test                 |   34 --
 tests/mdemo.at                        |  863 +++++++++++++++++++++++++++++++
 tests/mdemo/.gitignore                |    2 -
 tests/mdemo/Makefile.am               |   87 ---
 tests/mdemo/README                    |   16 -
 tests/mdemo/configure.ac              |   72 ---
 tests/mdemo/foo.h                     |   48 --
 tests/mdemo/foo1.c                    |   61 ---
 tests/mdemo/foo2.c                    |   61 ---
 tests/mdemo/main.c                    |  254 ---------
 tests/mdemo/mlib.c                    |  136 -----
 tests/mdemo/sub.c                     |   31 --
 tests/mdemo2-conf.test                |   34 --
 tests/mdemo2-exec.test                |   35 --
 tests/mdemo2-make.test                |   35 --
 tests/mdemo2/.gitignore               |    2 -
 tests/mdemo2/Makefile.am              |   53 --
 tests/mdemo2/README                   |    4 -
 tests/mdemo2/configure.ac             |   62 ---
 tests/mdemo2/main.c                   |   46 --
 tests/nomode.test                     |   48 --
 tests/objectlist.test                 |   48 --
 tests/pdemo-conf.test                 |   47 --
 tests/pdemo-exec.test                 |   36 --
 tests/pdemo-inst.test                 |   38 --
 tests/pdemo-make.test                 |   34 --
 tests/pdemo/.gitignore                |    3 -
 tests/pdemo/Makefile.am               |  171 ------
 tests/pdemo/configure.ac              |   73 ---
 tests/pdemo/foo.h                     |  102 ----
 tests/pdemo/longer_file_name_dlmain.c |   97 ----
 tests/pdemo/longer_file_name_foo.c    |   38 --
 tests/pdemo/longer_file_name_foo2.c   |   35 --
 tests/pdemo/longer_file_name_hell1.c  |   25 -
 tests/pdemo/longer_file_name_hell2.c  |   24 -
 tests/pdemo/longer_file_name_hello.c  |   36 --
 tests/pdemo/longer_file_name_main.c   |   47 --
 tests/pic_flag.at                     |   11 +-
 tests/quote.test                      |  136 -----
 tests/suffix.test                     |   53 --
 tests/tagdemo-conf.test               |   34 --
 tests/tagdemo-exec.test               |   34 --
 tests/tagdemo-make.test               |   34 --
 tests/tagdemo-shared-exec.test        |    3 -
 tests/tagdemo-shared-make.test        |    3 -
 tests/tagdemo-shared.test             |   34 --
 tests/tagdemo-static-exec.test        |    3 -
 tests/tagdemo-static-make.test        |    3 -
 tests/tagdemo-static.test             |   34 --
 tests/tagdemo-undef-exec.test         |    3 -
 tests/tagdemo-undef-make.test         |    3 -
 tests/tagdemo-undef.test              |   50 --
 tests/tagdemo.at                      |  395 ++++++++++++++
 tests/tagdemo/.gitignore              |    1 -
 tests/tagdemo/Makefile.am             |   63 ---
 tests/tagdemo/README                  |    6 -
 tests/tagdemo/baz.cpp                 |   38 --
 tests/tagdemo/baz.h                   |   46 --
 tests/tagdemo/configure.ac            |   96 ----
 tests/tagdemo/conv.cpp                |   32 --
 tests/tagdemo/conv.h                  |   35 --
 tests/tagdemo/foo.cpp                 |   68 ---
 tests/tagdemo/foo.h                   |   59 ---
 tests/tagdemo/main.cpp                |   79 ---
 tests/tagtrace.test                   |   71 ---
 tests/testsuite.at                    |   42 ++
 tests/with-pic.at                     |   17 +-
 236 files changed, 3830 insertions(+), 8554 deletions(-)
 delete mode 100755 tests/cdemo-conf.test
 delete mode 100755 tests/cdemo-exec.test
 delete mode 100755 tests/cdemo-make.test
 delete mode 100755 tests/cdemo-shared-exec.test
 delete mode 100755 tests/cdemo-shared-make.test
 delete mode 100755 tests/cdemo-shared.test
 delete mode 100755 tests/cdemo-static-exec.test
 delete mode 100755 tests/cdemo-static-make.test
 delete mode 100755 tests/cdemo-static.test
 delete mode 100755 tests/cdemo-undef-exec.test
 delete mode 100755 tests/cdemo-undef-make.test
 delete mode 100755 tests/cdemo-undef.test
 create mode 100644 tests/cdemo.at
 delete mode 100644 tests/cdemo/.gitignore
 delete mode 100644 tests/cdemo/Makefile.am
 delete mode 100644 tests/cdemo/README
 delete mode 100644 tests/cdemo/configure.ac
 delete mode 100644 tests/cdemo/foo.c
 delete mode 100644 tests/cdemo/foo.h
 delete mode 100644 tests/cdemo/main.c
 delete mode 100644 tests/defs.m4sh
 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
 delete mode 100755 tests/depdemo-conf.test
 delete mode 100755 tests/depdemo-exec.test
 delete mode 100755 tests/depdemo-inst.test
 delete mode 100755 tests/depdemo-make.test
 delete mode 100755 tests/depdemo-nofast-exec.test
 delete mode 100755 tests/depdemo-nofast-inst.test
 delete mode 100755 tests/depdemo-nofast-make.test
 delete mode 100755 tests/depdemo-nofast-unst.test
 delete mode 100755 tests/depdemo-nofast.test
 delete mode 100755 tests/depdemo-relink.test
 delete mode 100755 tests/depdemo-shared-exec.test
 delete mode 100755 tests/depdemo-shared-inst.test
 delete mode 100755 tests/depdemo-shared-make.test
 delete mode 100755 tests/depdemo-shared-unst.test
 delete mode 100755 tests/depdemo-shared.test
 delete mode 100755 tests/depdemo-static-exec.test
 delete mode 100755 tests/depdemo-static-inst.test
 delete mode 100755 tests/depdemo-static-make.test
 delete mode 100755 tests/depdemo-static-unst.test
 delete mode 100755 tests/depdemo-static.test
 delete mode 100755 tests/depdemo-unst.test
 create mode 100644 tests/depdemo.at
 delete mode 100644 tests/depdemo/.gitignore
 delete mode 100644 tests/depdemo/Makefile.am
 delete mode 100644 tests/depdemo/README
 delete mode 100644 tests/depdemo/configure.ac
 delete mode 100644 tests/depdemo/l1/Makefile.am
 delete mode 100644 tests/depdemo/l1/l1.c
 delete mode 100644 tests/depdemo/l1/l1.h
 delete mode 100644 tests/depdemo/l2/Makefile.am
 delete mode 100644 tests/depdemo/l2/l2.c
 delete mode 100644 tests/depdemo/l2/l2.h
 delete mode 100644 tests/depdemo/l3/Makefile.am
 delete mode 100644 tests/depdemo/l3/l3.c
 delete mode 100644 tests/depdemo/l3/l3.h
 delete mode 100644 tests/depdemo/l4/Makefile.am
 delete mode 100644 tests/depdemo/l4/l4.c
 delete mode 100644 tests/depdemo/l4/l4.h
 delete mode 100644 tests/depdemo/main.c
 delete mode 100644 tests/depdemo/sysdep.h
 delete mode 100755 tests/f77demo-conf.test
 delete mode 100755 tests/f77demo-exec.test
 delete mode 100755 tests/f77demo-make.test
 delete mode 100755 tests/f77demo-shared-exec.test
 delete mode 100755 tests/f77demo-shared-make.test
 delete mode 100755 tests/f77demo-shared.test
 delete mode 100755 tests/f77demo-static-exec.test
 delete mode 100755 tests/f77demo-static-make.test
 delete mode 100755 tests/f77demo-static.test
 create mode 100644 tests/f77demo.at
 delete mode 100644 tests/f77demo/.gitignore
 delete mode 100644 tests/f77demo/Makefile.am
 delete mode 100644 tests/f77demo/README
 delete mode 100644 tests/f77demo/configure.ac
 delete mode 100644 tests/f77demo/cprogram.c
 delete mode 100644 tests/f77demo/foo.h
 delete mode 100644 tests/f77demo/fooc.c
 delete mode 100644 tests/f77demo/foof.f
 delete mode 100644 tests/f77demo/foof2.f
 delete mode 100644 tests/f77demo/foof3.f
 delete mode 100644 tests/f77demo/fprogram.f
 delete mode 100755 tests/fcdemo-conf.test
 delete mode 100755 tests/fcdemo-exec.test
 delete mode 100755 tests/fcdemo-make.test
 delete mode 100755 tests/fcdemo-shared-exec.test
 delete mode 100755 tests/fcdemo-shared-make.test
 delete mode 100755 tests/fcdemo-shared.test
 delete mode 100755 tests/fcdemo-static-exec.test
 delete mode 100755 tests/fcdemo-static-make.test
 delete mode 100755 tests/fcdemo-static.test
 create mode 100644 tests/fcdemo.at
 delete mode 100644 tests/fcdemo/.gitignore
 delete mode 100644 tests/fcdemo/Makefile.am
 delete mode 100644 tests/fcdemo/README
 delete mode 100644 tests/fcdemo/configure.ac
 delete mode 100644 tests/fcdemo/cprogram.c
 delete mode 100644 tests/fcdemo/foo.h
 delete mode 100644 tests/fcdemo/fooc.c
 delete mode 100644 tests/fcdemo/foof.f90
 delete mode 100644 tests/fcdemo/foof2.f90
 delete mode 100644 tests/fcdemo/foof3.f90
 delete mode 100644 tests/fcdemo/fprogram.f90
 create mode 100755 tests/libtool.at
 delete mode 100755 tests/link-2.test
 delete mode 100755 tests/link.test
 delete mode 100755 tests/mdemo-conf.test
 delete mode 100755 tests/mdemo-dryrun.test
 delete mode 100755 tests/mdemo-exec.test
 delete mode 100755 tests/mdemo-inst.test
 delete mode 100755 tests/mdemo-make.test
 delete mode 100755 tests/mdemo-shared-exec.test
 delete mode 100755 tests/mdemo-shared-inst.test
 delete mode 100755 tests/mdemo-shared-make.test
 delete mode 100755 tests/mdemo-shared-unst.test
 delete mode 100755 tests/mdemo-shared.test
 delete mode 100755 tests/mdemo-static-exec.test
 delete mode 100755 tests/mdemo-static-inst.test
 delete mode 100755 tests/mdemo-static-make.test
 delete mode 100755 tests/mdemo-static-unst.test
 delete mode 100755 tests/mdemo-static.test
 delete mode 100755 tests/mdemo-unst.test
 create mode 100644 tests/mdemo.at
 delete mode 100644 tests/mdemo/.gitignore
 delete mode 100644 tests/mdemo/Makefile.am
 delete mode 100644 tests/mdemo/README
 delete mode 100644 tests/mdemo/configure.ac
 delete mode 100644 tests/mdemo/foo.h
 delete mode 100644 tests/mdemo/foo1.c
 delete mode 100644 tests/mdemo/foo2.c
 delete mode 100644 tests/mdemo/main.c
 delete mode 100644 tests/mdemo/mlib.c
 delete mode 100644 tests/mdemo/sub.c
 delete mode 100755 tests/mdemo2-conf.test
 delete mode 100755 tests/mdemo2-exec.test
 delete mode 100755 tests/mdemo2-make.test
 delete mode 100644 tests/mdemo2/.gitignore
 delete mode 100644 tests/mdemo2/Makefile.am
 delete mode 100644 tests/mdemo2/README
 delete mode 100644 tests/mdemo2/configure.ac
 delete mode 100644 tests/mdemo2/main.c
 delete mode 100755 tests/nomode.test
 delete mode 100755 tests/objectlist.test
 delete mode 100755 tests/pdemo-conf.test
 delete mode 100755 tests/pdemo-exec.test
 delete mode 100755 tests/pdemo-inst.test
 delete mode 100755 tests/pdemo-make.test
 delete mode 100644 tests/pdemo/.gitignore
 delete mode 100644 tests/pdemo/Makefile.am
 delete mode 100644 tests/pdemo/configure.ac
 delete mode 100644 tests/pdemo/foo.h
 delete mode 100644 tests/pdemo/longer_file_name_dlmain.c
 delete mode 100644 tests/pdemo/longer_file_name_foo.c
 delete mode 100644 tests/pdemo/longer_file_name_foo2.c
 delete mode 100644 tests/pdemo/longer_file_name_hell1.c
 delete mode 100644 tests/pdemo/longer_file_name_hell2.c
 delete mode 100644 tests/pdemo/longer_file_name_hello.c
 delete mode 100644 tests/pdemo/longer_file_name_main.c
 delete mode 100755 tests/quote.test
 delete mode 100755 tests/suffix.test
 delete mode 100755 tests/tagdemo-conf.test
 delete mode 100755 tests/tagdemo-exec.test
 delete mode 100755 tests/tagdemo-make.test
 delete mode 100755 tests/tagdemo-shared-exec.test
 delete mode 100755 tests/tagdemo-shared-make.test
 delete mode 100755 tests/tagdemo-shared.test
 delete mode 100755 tests/tagdemo-static-exec.test
 delete mode 100755 tests/tagdemo-static-make.test
 delete mode 100755 tests/tagdemo-static.test
 delete mode 100755 tests/tagdemo-undef-exec.test
 delete mode 100755 tests/tagdemo-undef-make.test
 delete mode 100755 tests/tagdemo-undef.test
 create mode 100644 tests/tagdemo.at
 delete mode 100644 tests/tagdemo/.gitignore
 delete mode 100644 tests/tagdemo/Makefile.am
 delete mode 100644 tests/tagdemo/README
 delete mode 100644 tests/tagdemo/baz.cpp
 delete mode 100644 tests/tagdemo/baz.h
 delete mode 100644 tests/tagdemo/configure.ac
 delete mode 100644 tests/tagdemo/conv.cpp
 delete mode 100644 tests/tagdemo/conv.h
 delete mode 100644 tests/tagdemo/foo.cpp
 delete mode 100644 tests/tagdemo/foo.h
 delete mode 100644 tests/tagdemo/main.cpp
 delete mode 100755 tests/tagtrace.test

diff --git a/.gitignore b/.gitignore
index f337328..c8db98e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,7 +48,6 @@
 Makefile
 Makefile.in
 \#*#
-_inst-*demo
 _libs
 acinclude.m4
 aclocal.m4
diff --git a/Makefile.am b/Makefile.am
index d470d39..3bcfb86 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,7 +58,6 @@ rebuild = rebuild=:; revision=`$(lt__cd) $(srcdir) && 
$(git_version_gen) | sed '
 # Bootstrap. #
 # ---------- #
 
-defs_m4sh      = $(tests_dir)/defs.m4sh
 general_m4sh   = $(srcdir)/$(m4sh_dir)/general.m4sh
 getopt_m4sh    = $(srcdir)/$(m4sh_dir)/getopt.m4sh
 libtoolize_m4sh        = $(srcdir)/libtoolize.m4sh
@@ -317,14 +316,6 @@ libtool: $(ltmain_sh) $(config_status) $(dotversion)
          cd '$(top_builddir)' && '$(SHELL)' ./config.status '$@'; \
        fi
 
-.PHONY: configure-subdirs
-configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
-$(DIST_MAKEFILE_LIST):
-       $(AM_V_at)dir=`echo '$@' |'$(SED)' 's|^[^/]*$$|.|;s|/[^/]*$$||'`; \
-       test -d "$$dir" || mkdir "$$dir" || exit 1; \
-       abs_srcdir=`$(lt__cd) '$(srcdir)' && pwd`; \
-       (cd "$$dir" && "$$abs_srcdir/$$dir/configure" --with-dist) || exit 1
-
 
 ## -------- ##
 ## Libltdl. ##
@@ -626,13 +617,19 @@ TESTSUITE = tests/testsuite
 TESTSUITE_AT   = tests/testsuite.at \
                  tests/getopt-m4sh.at \
                  tests/libtoolize.at \
+                 tests/libtool.at \
+                 tests/demo.at \
+                 tests/pic_flag.at \
+                 tests/with-pic.at \
+                 tests/cdemo.at \
+                 tests/convenience.at \
+                 tests/depdemo.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 \
@@ -670,21 +667,23 @@ TESTSUITE_AT      = tests/testsuite.at \
                  tests/resident.at \
                  tests/slist.at \
                  tests/need_lib_prefix.at \
+                 tests/mdemo.at \
                  tests/standalone.at \
                  tests/subproject.at \
                  tests/nonrecursive.at \
                  tests/recursive.at \
+                 tests/tagdemo.at \
                  tests/template.at \
                  tests/ctor.at \
                  tests/exceptions.at \
                  tests/early-libtool.at \
-                 tests/with-pic.at \
                  tests/no-executables.at \
                  tests/deplibs-ident.at \
                  tests/configure-iface.at \
                  tests/stresstest.at \
                  tests/cmdline_wrap.at \
-                 tests/pic_flag.at \
+                 tests/f77demo.at \
+                 tests/fcdemo.at \
                  tests/darwin.at \
                  tests/dumpbin-symbols.at \
                  tests/deplibs-mingw.at \
@@ -759,9 +758,7 @@ installcheck-local: $(testsuite_deps)
          AUTOTEST_PATH='$(exec_prefix)/bin'
 
 check-noninteractive-old:
-       $(AM_V_at)'$(MAKE)' $(AM_MAKEFLAGS) check-TESTS 
TESTS='$(NONINTERACTIVE_TESTS)'
-check-interactive-old:
-       $(AM_V_at)'$(MAKE)' $(AM_MAKEFLAGS) check-TESTS 
TESTS='$(INTERACTIVE_TESTS)'
+       $(AM_V_at)'$(MAKE)' $(AM_MAKEFLAGS) check-TESTS TESTS='$(TESTS)'
 
 # Run only noninteractive parts of the new testsuite.
 check-noninteractive-new: $(testsuite_deps_uninstalled)
@@ -772,345 +769,21 @@ check-noninteractive-new: $(testsuite_deps_uninstalled)
          $(TESTSUITEFLAGS)
 
 # Run only interactive parts of the new testsuite.
-check-interactive-new: $(testsuite_deps_uninstalled)
+check-interactive: $(testsuite_deps_uninstalled)
        $(AM_V_at)$(CD_TESTDIR); \
        CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
          $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
          -k interactive -k recursive INNER_TESTSUITEFLAGS=',interactive' \
          $(TESTSUITEFLAGS)
 
-check-interactive: check-interactive-old check-interactive-new
 check-noninteractive: check-noninteractive-old check-noninteractive-new
 
 # We need to remove any file droppings left behind by testsuite
-clean-local: clean-local-legacy
+clean-local:
        -$(CD_TESTDIR); \
        test -f "$$abs_srcdir/$(TESTSUITE)" && \
            '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" --clean
 
-
-## ------------- ##
-## Legacy tests. ##
-## ------------- ##
-
-# !WARNING! Don't add any new tests here, we are migrating to an
-#           Autotest driven framework, please add new test cases
-#           using the new framework above.  When the migration is
-#           complete this section should be removed.
-
-CXX_TESTS = \
-       tests/tagdemo-static.test \
-       tests/tagdemo-static-make.test \
-       tests/tagdemo-static-exec.test \
-       tests/tagdemo-conf.test \
-       tests/tagdemo-make.test \
-       tests/tagdemo-exec.test \
-       tests/tagdemo-shared.test \
-       tests/tagdemo-shared-make.test \
-       tests/tagdemo-shared-exec.test \
-       tests/tagdemo-undef.test \
-       tests/tagdemo-undef-make.test \
-       tests/tagdemo-undef-exec.test
-
-tests/tagdemo-undef-exec.log:  tests/tagdemo-undef-make.log
-tests/tagdemo-undef-make.log:  tests/tagdemo-undef.log
-tests/tagdemo-undef.log:       tests/tagdemo-shared-exec.log
-tests/tagdemo-shared-exec.log: tests/tagdemo-shared-make.log
-tests/tagdemo-shared-make.log: tests/tagdemo-shared.log
-tests/tagdemo-shared.log:      tests/tagdemo-exec.log
-tests/tagdemo-exec.log:                tests/tagdemo-make.log
-tests/tagdemo-make.log:                tests/tagdemo-conf.log
-tests/tagdemo-conf.log:                tests/tagdemo-static-exec.log
-tests/tagdemo-static-exec.log: tests/tagdemo-static-make.log
-tests/tagdemo-static-make.log: tests/tagdemo-static.log
-
-F77_TESTS = \
-       tests/f77demo-static.test \
-       tests/f77demo-static-make.test \
-       tests/f77demo-static-exec.test \
-       tests/f77demo-conf.test \
-       tests/f77demo-make.test \
-       tests/f77demo-exec.test \
-       tests/f77demo-shared.test \
-       tests/f77demo-shared-make.test \
-       tests/f77demo-shared-exec.test
-
-tests/f77demo-shared-exec.log: tests/f77demo-shared-make.log
-tests/f77demo-shared-make.log: tests/f77demo-shared.log
-tests/f77demo-shared.log:      tests/f77demo-exec.log
-tests/f77demo-exec.log:                tests/f77demo-make.log
-tests/f77demo-make.log:                tests/f77demo-conf.log
-tests/f77demo-conf.log:                tests/f77demo-static-exec.log
-tests/f77demo-static-exec.log: tests/f77demo-static-make.log
-tests/f77demo-static-make.log: tests/f77demo-static.log
-
-FC_TESTS = \
-       tests/fcdemo-static.test \
-       tests/fcdemo-static-make.test \
-       tests/fcdemo-static-exec.test \
-       tests/fcdemo-conf.test \
-       tests/fcdemo-make.test \
-       tests/fcdemo-exec.test \
-       tests/fcdemo-shared.test \
-       tests/fcdemo-shared-make.test \
-       tests/fcdemo-shared-exec.test
-
-tests/fcdemo-shared-exec.log:  tests/fcdemo-shared-make.log
-tests/fcdemo-shared-make.log:  tests/fcdemo-shared.log
-tests/fcdemo-shared.log:       tests/fcdemo-exec.log
-tests/fcdemo-exec.log:         tests/fcdemo-make.log
-tests/fcdemo-make.log:         tests/fcdemo-conf.log
-tests/fcdemo-conf.log:         tests/fcdemo-static-exec.log
-tests/fcdemo-static-exec.log:  tests/fcdemo-static-make.log
-tests/fcdemo-static-make.log:  tests/fcdemo-static.log
-
-COMMON_TESTS = \
-       tests/link.test \
-       tests/link-2.test \
-       tests/nomode.test \
-       tests/objectlist.test \
-       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 \
-       tests/demo-static-inst.test \
-       tests/demo-static-unst.test \
-       tests/depdemo-static.test \
-       tests/depdemo-static-make.test \
-       tests/depdemo-static-exec.test \
-       tests/depdemo-static-inst.test \
-       tests/depdemo-static-unst.test \
-       tests/mdemo-static.test \
-       tests/mdemo-static-make.test \
-       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 \
-       tests/demo-inst.test \
-       tests/demo-unst.test \
-       tests/demo-deplibs.test \
-       tests/depdemo-conf.test \
-       tests/depdemo-make.test \
-       tests/depdemo-exec.test \
-       tests/depdemo-inst.test \
-       tests/depdemo-unst.test \
-       tests/mdemo-conf.test \
-       tests/mdemo-make.test \
-       tests/mdemo-exec.test \
-       tests/mdemo-inst.test \
-       tests/mdemo-unst.test \
-       tests/mdemo-dryrun.test \
-       tests/mdemo2-conf.test \
-       tests/mdemo2-make.test \
-       tests/mdemo2-exec.test \
-       tests/pdemo-conf.test \
-       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/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
-
-# 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 \
-       tests/depdemo-shared-inst.test \
-       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
-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
-tests/depdemo-shared-exec.log: tests/depdemo-shared-make.log
-tests/depdemo-shared-make.log: tests/depdemo-shared.log
-tests/depdemo-shared.log: $(ORDER) tests/depdemo-nofast-unst.log
-tests/depdemo-nofast-unst.log: tests/depdemo-nofast-inst.log
-tests/depdemo-nofast-inst.log: tests/depdemo-nofast-exec.log
-tests/depdemo-nofast-exec.log: tests/depdemo-nofast-make.log
-tests/depdemo-nofast-make.log: tests/depdemo-nofast.log
-tests/depdemo-nofast.log: $(ORDER) tests/depdemo-unst.log
-tests/depdemo-unst.log:                tests/depdemo-inst.log
-tests/depdemo-inst.log:                tests/depdemo-exec.log
-tests/depdemo-exec.log:                tests/depdemo-make.log
-tests/depdemo-make.log:                tests/depdemo-conf.log
-tests/depdemo-conf.log: $(ORDER) tests/depdemo-static-unst.log
-tests/depdemo-static-unst.log: tests/depdemo-static-inst.log
-tests/depdemo-static-inst.log: tests/depdemo-static-exec.log
-tests/depdemo-static-exec.log: tests/depdemo-static-make.log
-tests/depdemo-static-make.log: tests/depdemo-static.log
-
-tests/mdemo-shared-unst.log:   tests/mdemo-shared-inst.log
-tests/mdemo-shared-inst.log:   tests/mdemo-shared-exec.log
-tests/mdemo-shared-exec.log:   tests/mdemo-shared-make.log
-tests/mdemo-shared-make.log:   tests/mdemo-shared.log
-tests/mdemo-shared.log: $(ORDER) tests/mdemo-dryrun.log \
-                               tests/mdemo2-exec.log
-
-tests/mdemo-dryrun.log:                tests/mdemo-unst.log
-tests/mdemo-unst.log:          tests/mdemo-inst.log
-tests/mdemo-inst.log:          tests/mdemo-exec.log
-tests/mdemo-exec.log:          tests/mdemo-make.log
-tests/mdemo-make.log:          tests/mdemo-conf.log
-tests/mdemo-conf.log: $(ORDER) tests/mdemo-static-unst.log
-tests/mdemo-static-unst.log:   tests/mdemo-static-inst.log
-tests/mdemo-static-inst.log:   tests/mdemo-static-exec.log
-tests/mdemo-static-exec.log:   tests/mdemo-static-make.log
-tests/mdemo-static-make.log:   tests/mdemo-static.log
-
-tests/mdemo2-exec.log:         tests/mdemo2-make.log
-tests/mdemo2-make.log:         tests/mdemo2-conf.log \
-                               tests/mdemo-dryrun.log
-
-tests/pdemo-inst.log:          tests/pdemo-exec.log
-tests/pdemo-exec.log:          tests/pdemo-make.log
-tests/pdemo-make.log:          tests/pdemo-conf.log
-
-
-NONINTERACTIVE_TESTS = $(COMMON_TESTS)
-if HAVE_CXX
-NONINTERACTIVE_TESTS += $(CXX_TESTS)
-endif
-if HAVE_F77
-# f77demo-static-exec.test might be interactive on MSYS.
-INTERACTIVE_TESTS += $(F77_TESTS)
-endif
-if HAVE_FC
-NONINTERACTIVE_TESTS += $(FC_TESTS)
-endif
-TESTS = $(NONINTERACTIVE_TESTS) $(INTERACTIVE_TESTS)
-
-defs           = tests/defs
-defs_in                = $(tests_dir)/defs.in
-
-EXTRA_DIST     += $(defs_in) $(defs_m4sh) \
-                 $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS) \
-                 $(INTERACTIVE_TESTS)
-DIST_SUBDIRS   += $(CONF_SUBDIRS)
-
-# The defs script shouldn't be recreated whenever the Makefile is
-# regenerated since the source tree can be read-only.
-check-recursive: $(defs)
-$(defs): $(defs_in)
-       $(AM_V_at)rm -f '$@'
-       $(AM_V_GEN)$(configure_edit) '$(defs_in)' > '$@'
-
-$(defs_in): $(defs_m4sh) $(general_m4sh) Makefile.am
-       $(AM_V_at)rm -f '$@'
-       $(AM_V_GEN)$(LT_M4SH) '$(defs_m4sh)' > '$@'
-
-# We need to remove any files that the above tests created.
-clean-local-legacy:
-       -for dir in $(CONF_SUBDIRS); do \
-         if test -f "$$dir/Makefile"; then \
-           (cd "$$dir" && '$(MAKE)' $(AM_MAKEFLAGS) distclean); \
-         else :; fi; \
-       done
-       rm -rf _inst _inst-*
-
-# For distclean, we may have to fake Makefiles in the test directories
-# so that descending in DIST_SUBDIRS works.
-# Hide the additional dependency from automake so it still outputs the rule.
-distclean_recursive = distclean-recursive
-$(distclean_recursive): fake-distclean-legacy
-.PHONY: fake-distclean-legacy
-fake-distclean-legacy:
-       -for dir in $(CONF_SUBDIRS); do \
-         if test ! -f "$$dir/Makefile"; then \
-           $(mkinstalldirs) "$$dir"; \
-           echo 'distclean: ; rm -f Makefile' > "$$dir/Makefile"; \
-         else :; fi; \
-       done
-
-$(TESTS): $(defs)
-DISTCLEANFILES += $(defs)
-
 ## An empty target to depend on when a rule needs to always run
 ## whenever it is visited.
 FORCE:
diff --git a/NEWS b/NEWS
index 8fe889e..d2e48d6 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,8 @@ NEWS - list of user-visible changes between releases of GNU 
Libtool
     using AC_CONFIG_AUX_DIR(ltdl/config) or similar, that still works as
     does any other directory choice).
 
+  - The legacy tests have all been migrated to the Autotest harness.
+
   - The Autotest testsuite can be run without the especially time consuming
     tests with:
 
diff --git a/bootstrap.conf b/bootstrap.conf
index 572a07e..527670d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,4 +1,4 @@
-# bootstrap.conf (GNU Libtool) version 2011-11-21
+# bootstrap.conf (GNU Libtool) version 2011-11-24
 #
 # Copyright (C) 2010-2012 Free Software Foundation, Inc.
 # Written by Gary V. Vaughan, 2010
@@ -110,15 +110,16 @@ require_bootstrap_uptodate=:
 
 # func_reconfigure
 # ------------------
-# In addition to needing to autoreconf several directories, Libtool
-# provides `libtoolize' and doesn't use `autopoint', so we can use a
-# somewhat simpler `func_reconfigure' implementation.
+# In addition to needing to autoreconf two directories, Libtool provides
+# `libtoolize' and doesn't use `autopoint', so we can use a somewhat
+# simpler `func_reconfigure' implementation than bootstrap's version.
 func_reconfigure ()
 {
     $debug_cmd
 
     $require_autoheader
     $require_build_aux
+    $require_ltdl_dir
     $require_macro_dir
 
     # Only need this from the top level directory
@@ -127,127 +128,19 @@ func_reconfigure ()
     export LIBTOOLIZE
     func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'"
 
-    # Also bootstrap any additional directories that were specified with
-    # `reconfdirs' in the environment.
-    save_IFS=$IFS
-    IFS=,
-    for sub in $opt_reconf_dirs; do
-      IFS=$save_IFS
-      my_autoreconf_options=
-      $opt_copy || func_append my_autoreconf_options " --symlink"
-      $opt_force && func_append my_autoreconf_options " --force"
-      $opt_verbose && func_append my_autoreconf_options " --verbose"
-      func_show_eval "$AUTORECONF$my_autoreconf_options --install $sub" \
-        'exit $?'
-    done
-    IFS=$save_IFS
-}
-
-
-
-## --------------- ##
-## Hook functions. ##
-## --------------- ##
-
-# `bootstrap' itself takes care of the arguments it recognises, so we only
-# have to handle additional options here.  Setting exit_cmd to anything
-# other than `:', will tell `bootstrap' to exit after printing it's own
-# option loop parser errors.  Best not to use any time-consuming $require_
-# functions here, otherwise they will be run even if we only need to
-# process `--version'.
-
-# libtool_options_prep [ARG...]
-# -----------------------------
-# Preparation for supporting additional options in Libtool bootstrap,
-# before the option parsing loop.
-libtool_options_prep ()
-{
-    $debug_cmd
-
-    # Extend the existing usage message
-    usage_message=$usage_message'
-Libtool Specific Options:
-  -r, --reconf-dirs=DIR1,DIR2,...
-                          limit the directories to be bootstrapped to
-                          the comma-delimited list of DIR1,DIR2,...
-'
-
-    # autoreconf all directories by default
-    test -n "$reconfdirs" \
-      || reconfdirs=". libltdl `ls -1d tests/*demo tests/*demo[0-9]`"
-
-    # pass back the list of options we consumed
-    func_quote_for_eval ${1+"$@"}
-    libtool_options_prep_result=$func_quote_for_eval_result
-}
-func_add_hook func_options_prep libtool_options_prep
+    my_autoreconf_options=
+    $opt_copy || func_append my_autoreconf_options " --symlink"
+    $opt_force && func_append my_autoreconf_options " --force"
+    $opt_verbose && func_append my_autoreconf_options " --verbose"
 
+    func_show_eval "$AUTORECONF$my_autoreconf_options --install ." \
+      'exit $?'
 
-# libtool_parse_options [ARG...]
-# ------------------------------
-# Provide handling for additional Libtool options inside the main option
-# parsing loop.
-libtool_parse_options ()
-{
-    $debug_cmd
-
-    # this inner loop lets us handle `-r.' in a single iteration
-    while test $# -gt 0; do
-      opt=$1
-      shift
-
-      case $opt in
-        --reconf-dirs|--reconfdirs|-r)
-              test $# = 0 && func_missing_arg $opt && break
-              # squash spaces so that delimiter is just `,' and nothing else
-              opt_reconf_dirs=`echo "$1" |$SED 's|,  *|,|g'`
-              shift
-              ;;
-
-        # Separate arguments to short options:
-        -r*)  func_split_short_opt "$opt"
-              set dummy "$func_split_short_opt_name" 
"$func_split_short_opt_arg" ${1+"$@"}
-              shift
-              ;;
-
-        *)    set dummy "$opt" ${1+"$@"}; shift; break ;;
-      esac
-    done
-
-    # pass back the list of options we consumed
-    func_quote_for_eval ${1+"$@"}
-    libtool_parse_options_result=$func_quote_for_eval_result
+    # Also bootstrap libltdl ready for installation.
+    func_show_eval "$AUTORECONF$my_autoreconf_options --install $ltdl_dir" \
+      'exit $?'
 }
-func_add_hook func_parse_options libtool_parse_options
-
-
-# libtool_validate_options [ARG...]
-# ---------------------------------
-# Validation of additional Libtool bootstrap options, after the main option
-# parsing loop.
-libtool_validate_options ()
-{
-    # support the old interface too: `reconfdirs='. libltdl' ./bootstrap'
-    test -n "$opt_reconf_dirs" \
-      || opt_reconf_dirs=`echo $reconfdirs |$SED 's|  *|,|g'`
-
-    # validate $opt_reconf_dirs
-    save_IFS=$IFS
-    IFS=,
-    for reconfdir in $opt_reconf_dirs; do
-      IFS=$save_IFS
-      test -d "$reconfdir" || {
-        func_error "bad reconf directory \`$reconfdir': directory does not 
exist"
-        exit_cmd=exit
-      }
-    done
-    IFS=$save_IFS
 
-    # pass back the list of options we consumed
-    func_quote_for_eval ${1+"$@"}
-    libtool_validate_options_result=$func_quote_for_eval_result
-}
-func_add_hook func_validate_options libtool_validate_options
 
 
 ## ---------------------------- ##
@@ -294,6 +187,7 @@ libtool_build_prerequisites ()
     $debug_cmd
 
     $require_build_aux
+    $require_ltdl_dir
     $require_macro_dir
     $require_package
     $require_package_bugreport
@@ -301,19 +195,6 @@ libtool_build_prerequisites ()
     $require_package_url
     $require_package_version
 
-    func_extract_trace LT_CONFIG_LTDL_DIR
-
-    save_ifs=$IFS
-    IFS=:
-    set dummy $func_extract_trace_result
-    IFS=$save_ifs
-    shift
-
-    ltdl_dir=$1
-    func_check_configuration ltdl_dir \
-        "LT_CONFIG_LTDL_DIR([name of your libltdl directory])"
-    func_verbose "ltdl_dir='$ltdl_dir'"
-
     # Whip up a dirty Makefile:
     makes='Makefile.am libltdl/ltdl.mk'
     rm -f Makefile
@@ -448,6 +329,32 @@ func_add_hook func_fini libtool_cleanup_empty_dirs
 ## Resource management. ##
 ## -------------------- ##
 
+# require_ltdl_dir
+# ----------------
+# Extract libtool's ltdl directory from configure.ac.
+require_ltdl_dir=func_require_ltdl_dir
+func_require_ltdl_dir ()
+{
+    $require_configure_ac
+
+    func_extract_trace LT_CONFIG_LTDL_DIR
+
+    save_ifs=$IFS
+    IFS=:
+    set dummy $func_extract_trace_result
+    IFS=$save_ifs
+    shift
+
+    ltdl_dir=$1
+    func_check_configuration ltdl_dir \
+        "LT_CONFIG_LTDL_DIR([name of your libltdl directory])"
+
+    func_verbose "ltdl_dir='$ltdl_dir'"
+
+    require_ltdl_dir=:
+}
+
+
 # require_package_url
 # -------------------
 # Ensure that package_url has a sensible default.
diff --git a/cfg.mk b/cfg.mk
index d0ab34b..10af0b6 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -250,12 +250,10 @@ sc_useless_quotes_in_case:
          $(_sc_search_regexp)
 
 # List syntax-check exempted files.
-exclude_file_name_regexp--sc_bindtextdomain = ^tests/.*demo[0-9]*/.*\.c$$
 exclude_file_name_regexp--sc_error_message_uppercase = \
   ^$(_build-aux)/cvsu$$
-exclude_file_name_regexp--sc_program_name = ^tests/.*demo[0-9]*/.*\.c$$
 exclude_file_name_regexp--sc_prohibit_strcmp = \
-  ^(doc/libtool.texi|tests/.*demo/.*\.c)$$
+  ^doc/libtool.texi$$
 exclude_file_name_regexp--sc_prohibit_test_minus_ao = \
   ^m4/libtool.m4$$
 exclude_file_name_regexp--sc_space_tab = \.diff$$
diff --git a/configure.ac b/configure.ac
index 517f706..661b779 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ echo
 dnl These are bootstrap requirements! Once built, libtool may work with
 dnl much older releases of autoconf and automake.  See release notes.
 dnl 1.11 is needed for color-tests, 1.11.1 fixes a security issue.
-AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects dist-xz color-tests 
parallel-tests])
+AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects dist-xz])
 AM_SILENT_RULES([yes])
 
 
@@ -124,18 +124,6 @@ fi
 pkgaux_scripts="compile config.guess config.sub depcomp install-sh missing"
 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 \
-       tests/mdemo tests/mdemo2 tests/pdemo tests/tagdemo"
-AC_SUBST([CONF_SUBDIRS])
-
-DIST_MAKEFILE_LIST=
-for dir in $CONF_SUBDIRS; do
-  DIST_MAKEFILE_LIST="$DIST_MAKEFILE_LIST$dir/Makefile "
-done
-AC_SUBST([DIST_MAKEFILE_LIST])
-
 
 ## ---------------- ##
 ## compiler checks. ##
@@ -169,44 +157,6 @@ LT_LANG(Windows Resource)
 AC_SUBST([to_host_file_cmd])dnl
 AC_SUBST([to_tool_file_cmd])dnl
 
-## --------------------------- ##
-## Work out which tests to run ##
-## --------------------------- ##
-AM_CONDITIONAL(HAVE_CXX,[test -n "[$]_LT_TAGVAR(compiler, CXX)"])
-AM_CONDITIONAL(HAVE_F77,[test -n "[$]_LT_TAGVAR(compiler, F77)"])
-AM_CONDITIONAL(HAVE_FC,[test -n "[$]_LT_TAGVAR(compiler, FC)"])
-AM_CONDITIONAL(HAVE_GCJ, [test -n "[$]_LT_TAGVAR(compiler, GCJ)"])
-AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"])
-
-## Whether `make' supports order-only prerequisites.
-AC_CACHE_CHECK([whether ${MAKE-make} supports order-only prerequisites],
-  [lt_cv_make_order_only],
-  [mkdir conftest.dir
-   cd conftest.dir
-   touch b
-   touch a
-cat >confmk << 'END'
-ORDER = |
-a: b $(ORDER) c
-a b c:
-       touch $[]@
-END
-   touch c
-   if ${MAKE-make} -s -q -f confmk >/dev/null 2>&1; then
-     lt_cv_make_order_only=yes
-   else
-     lt_cv_make_order_only=no
-   fi
-   cd ..
-   rm -rf conftest.dir
-])
-if test yes = "$lt_cv_make_order_only"; then
-  ORDER='|'
-else
-  ORDER=''
-fi
-AC_SUBST([ORDER])
-
 ## ---------------------- ##
 ## Gnulib initialisation. ##
 ## ---------------------- ##
diff --git a/tests/cdemo-conf.test b/tests/cdemo-conf.test
deleted file mode 100755
index 4869730..0000000
--- 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 dce62f2..0000000
--- 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 08e70a5..0000000
--- 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 c784065..0000000
--- 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 254b3d4..0000000
--- 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 2d58bd3..0000000
--- 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 c784065..0000000
--- 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 254b3d4..0000000
--- 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 36ac2c5..0000000
--- 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 c784065..0000000
--- 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 254b3d4..0000000
--- 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 732e355..0000000
--- 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 0000000..f50106c
--- /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-2012 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 f8d8b0e..0000000
--- 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 148ca53..0000000
--- 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 fd3e418..0000000
--- 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 e008f72..0000000
--- 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], address@hidden)
-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 b522fec..0000000
--- 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 ae66563..0000000
--- 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 aef8bf0..0000000
--- 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/defs.m4sh b/tests/defs.m4sh
deleted file mode 100644
index 0b9ed38..0000000
--- a/tests/defs.m4sh
+++ /dev/null
@@ -1,376 +0,0 @@
-AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])
-# defs -- Defines for Libtool testing environment.
-#
-#   Copyright (C) 2003-2005, 2007-2012 Free Software Foundation, Inc.
-#   Written by Gord Matzigkeit, 1996
-#   Rewritten 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.
-####
-
-m4_divert_pop
-m4_include([general.m4sh])
-
-M4SH_VERBATIM([[
-: ${AUTOCONF="autoconf"}
-: ${AUTORECONF="autoreconf"}
-: ${LIBTOOL="./libtool"}
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# Disable usage of config.site for autoconf, unless DJGPP is present.
-# The DJGPP port of autoconf requires config.site, to work correctly.
-if test -z "$DJGPP"; then
-    CONFIG_SITE=/nonexistent
-fi
-
-# How verbose should we be?  Default is test output in log file.
-# Setting VERBOSE=debug puts the shell in debug mode.
-debug_cmd=:
-case $VERBOSE in
-DEBUG | debug )
-  debug_cmd='set -x'
-  $debug_cmd
-  ;;
-esac
-
-# func_msg arg...
-# Echo message with prefix.
-func_msg ()
-{
-    func_echo "=== " ${1+"$@"}
-}
-
-# func_skip arg...
-# Echo message to standard error, and skip the rest of this test.
-func_skip ()
-{
-    func_error ${1+"$@"}
-    exit $EXIT_SKIP
-}
-
-# func_fail arg...
-# Echo message to standard error, and fail this test.
-func_fail ()
-{
-    func_fatal_error ${1+"$@"}
-}
-
-# func_get_config varname_list src [failp] [regex]
-func_get_config ()
-{
-  $debug_cmd
-
-  my_varname_list=$1
-  my_src=$2
-  my_failp=false;  test -z "$3" || my_failp=:
-  my_regex=$4
-
-  my_exitp=false
-  if test -z "$my_regex"; then
-    my_regex='^('
-    my_build_regex=:
-  else
-    my_build_regex=false
-  fi
-  my_first=:
-
-  for my_varname in $my_varname_list; do
-    if $my_build_regex; then
-      $my_first || my_regex="$my_regex|"
-      my_first=false
-      my_regex=$my_regex$my_varname
-    fi
-    eval $my_varname=NONE
-  done
-  $my_build_regex && my_regex="$my_regex)="
-  eval `eval "$my_src" | eval "$EGREP \"$my_regex\""`
-
-  for my_varname in $my_varname_list; do
-    if eval test x\"\$$my_varname\" = xNONE; then
-      func_error "$my_varname not set in \`$my_src'"
-      $my_failp && my_exitp=:
-    fi
-  done
-
-  $my_exitp && exit $EXIT_FAILURE
-}
-
-
-# Extract some variables from the libtool configuration.
-func_get_config "objext
-objdir
-CC
-host
-host_os
-host_alias
-build
-build_alias" "$LIBTOOL --config" ": fatal"
-
-
-# func_mkprefixdir
-func_mkprefixdir ()
-{
-    $debug_cmd
-
-    # An absolute path to a test installation directory.
-    func_mkdir_p "$prefix"
-    prefix=`cd $prefix && pwd`
-}
-
-# func_rmprefixdir
-func_rmprefixdir ()
-{
-    $debug_cmd
-
-    test -d "$prefix" && rm -rf "$prefix"
-    prefix=NONE
-}
-
-# func_cd dir
-# Make sure a directory exists, and then change to it.
-func_cd ()
-{
-    $debug_cmd
-
-    my_dir=$1
-
-    # Maybe we have a VPATH build, in which case, create a new subdir.
-    func_mkdir_p "$my_dir"
-
-    # Change to our build directory.
-    cd "$my_dir" || func_fatal_error "couldn't cd to \`$my_dir'"
-}
-
-
-# func_require prereq file [...]
-# If FILE does not exist, give a fatal error regarding running PREREQ first.
-func_require ()
-{
-    $debug_cmd
-
-    my_prereq=$1; shift
-    my_files=${1+"$@"}
-
-    for my_file in $my_files; do
-      test -f "$my_file" \
-        || func_skip "You must run $my_prereq.test before running $0"
-    done
-}
-
-# func_configure_nofail [args ...]
-# Configure the demonstration.
-func_configure_nofail ()
-{
-    $debug_cmd
-
-    my_args=${1+"$@"}
-    func_dirname_and_basename "`pwd`"
-    my_dir=$func_basename_result
-    my_testdir=$abs_srcdir/tests/$my_dir
-    conf_status=$EXIT_FAILURE
-
-    test -n "$my_args" && my_args=" $my_args"
-    my_args=--srcdir=\"$my_testdir\"" "--prefix=\"$prefix\"$my_args
-    test -n "$host_alias" && my_args=$my_args" "--host=\"$host_alias\"
-    test -n "$build_alias" && my_args=$my_args" "--build=\"$build_alias\"
-
-    func_msg "Configuring in $my_dir"
-
-    test -f "$my_testdir/configure" || $AUTORECONF --force --install 
$my_testdir
-    if test -f "$my_testdir/configure"; then
-
-      eval func_msg $SHELL "$my_testdir/configure" $my_args
-      if eval $SHELL "$my_testdir/configure" $my_args; then
-       conf_status=$EXIT_SUCCESS
-      else
-       func_msg "FAILED: Configuring in $my_testdir"
-       ls -ltr $my_testdir
-      fi
-    fi
-}
-
-# func_configure [args ...]
-# Configure the demonstration, fail on error.
-func_configure ()
-{
-    func_configure_nofail ${1+"$@"}
-    if test "$conf_status" -eq "$EXIT_FAILURE"; then
-      exit $EXIT_FAILURE
-    fi
-}
-
-# func_check_static_shared staticp sharedp
-# Determine whether the generated libtool script is configured properly
-# for the expected STATICP and SHAREDP library building
-func_check_static_shared ()
-{
-    $debug_cmd
-
-    my_staticp=$1
-    my_sharedp=$2
-
-    if func_grep "^build_old_libs=$staticp" libtool &&
-       func_grep "^build_libtool_libs=$sharedp" libtool; then :
-    else
-      rm -f Makefile
-      exit $EXIT_FAIL
-    fi
-}
-
-
-# func_make [args ...]
-# Do the actual build.
-func_make ()
-{
-    $debug_cmd
-
-    my_args=${1+"$@"}
-    func_dirname_and_basename "`pwd`"
-    func_msg "Running \`$MAKE $my_args' in $func_basename_result"
-
-    eval $MAKE $my_args || exit $EXIT_FAIL
-}
-
-
-# func_distclean
-# Possibly clean up the distribution.
-func_make_distclean ()
-{
-    $debug_cmd
-
-    if test -f Makefile; then
-      func_make distclean
-    fi
-    rm -rf autom4te.cache config.cache
-}
-
-
-# func_make_uninstall
-# See that there were no files leftover in $prefix.
-# Ignore dotfiles, so that .nfsXXX files don't screw up the test.
-func_make_uninstall ()
-{
-    $debug_cmd
-
-    func_make uninstall
-
-    leftovers=`find $prefix ! -type d ! -name '.*' -print`
-    if test -n "$leftovers"; then
-      func_msg "Leftover after make uninstall:"
-      ls -l $leftovers
-      exit 1
-    fi
-}
-
-
-# func_exec_init mode
-func_exec_init ()
-{
-    $debug_cmd
-
-    func_dirname_and_basename "`pwd`"
-    func_msg "Executing $1 programs in $func_basename_result"
-
-    # Windows hosts search for dlls in the command path
-    PATH=$prefix/lib:$PATH
-
-    exec_status=$EXIT_SUCCESS
-}
-
-# func_exec_check program [msg ...]
-# Check to see if PROGRAM was built. If not display MSG.
-func_exec_check ()
-{
-    $debug_cmd
-
-    my_program=$1
-
-    if test -f "$my_program"; then :
-    else
-      shift
-      func_error "$0: $my_program did not build address@hidden"
-      exec_status=$EXIT_FAILURE
-    fi
-}
-
-# func_exec program [exp_output] [msg ...]
-# Check to see if PROGRAM really runs, and produces EXP_OUTPUT if given.
-# If not display MSG.
-func_exec ()
-{
-    $debug_cmd
-
-    my_program=$1
-    my_exp_output=$2
-    func_dirname_and_basename "`pwd`"
-    my_dir=$func_basename_result
-
-    test -n "$my_exp_output" \
-      && my_exp_output="| $EGREP -e "\"$my_exp_output\"
-
-    if eval $my_program $my_exp_output; then :
-    else
-      shift
-      test -z "$1" || shift
-      func_error "$0: cannot execute $my_program address@hidden"
-
-      if test "$build" != "$host"; then
-        func_msg "This may be ok since you seem to be cross-compiling."
-       exec_status=$EXIT_SKIP
-      else
-       # Simple check to see if they are superuser.
-       if test "$exec_status" = "$EXIT_FAILURE" || test -w /; then :
-       else
-         func_msg "You may need to run $0 as the superuser."
-       fi
-       exec_status=$EXIT_FAILURE
-      fi
-    fi
-}
-
-# Shared global variables for test scripts
-prefix=./_inst-`echo "$0" | sed 's|.*/||; s|-.*||'`
-abs_srcdir=`cd '@srcdir@' && pwd`
-abs_macro_dir=`cd '@srcdir@/@macro_dir@' && pwd`
-abs_aux_dir=`cd '@srcdir@/@aux_dir@' && pwd`
-scripts="$abs_aux_dir/ltmain.m4sh $abs_srcdir/libtoolize.m4sh"
-
-# Unset some MAKE... variables that may cause $MAKE to act like a
-# recursively invoked sub-make.  Any $MAKE invocation in a test is
-# conceptually an independent invocation.
-unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
-
-# On AIX, shared libraries remain loaded in memory after use if they
-# are world-readable, until root issues slibclean.  On NFS, this causes
-# a testsuite rerun to fail to clean up test group directories.  Avoid
-# this with a suitable umask.  Do not do this on other systems, for
-# example HP-UX suffers unless shared libraries are mode 555.
-case $host_os in
-aix*) umask o-rwx ;;
-esac
-
-func_msg "Running $progname"
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-]])
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 5654ff9..0000000
--- a/tests/demo-noinst-link.test
+++ /dev/null
@@ -1,63 +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
-}
-
-func_require "demo-inst" "$prefix/lib/libhello.la"
-
-func_mkprefixdir
-func_cd "tests/demo"
-
-# AIX 5.3 `/bin/sh' will invoke the trap for 0 at the end of a
-# function, so we set the trap outside of a function to be portable.
-trap func_restore_files 0 1 2 13 15
-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 4b32fba..0000000
--- a/tests/demo-relink.test
+++ /dev/null
@@ -1,107 +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"
-}
-
-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"
-
-# AIX 5.3 `/bin/sh' will invoke the trap for 0 at the end of a
-# function, so we set the trap outside of a function to be portable.
-func_save_files
-trap func_restore_files 0 1 2 13 15
-
-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..b79564a
--- /dev/null
+++ b/tests/demo.at
@@ -0,0 +1,919 @@
+# demo.at -- Linking and loading. -*- Autotest -*-
+#
+#   Copyright (C) 2003-2004, 2011-2012 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. ##
+## ------------------------------------------- ##
+
+# This function needs to be used, rather than 'exit', when a 'trap' handler is
+# in effect that refers to $?.
+func_exit ()
+{
+  (exit $1); exit $1
+}
+
+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"
+}
+
+
+# _LT_DEMO_SETUP
+# --------------
+m4_define([_LT_DEMO_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_CONFIG_HEADERS([config.h:config.in.h])
+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 snippet 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 <config.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "foo.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],
+[[#include <config.h>
+int hell1 (void) { return 1; }
+]])
+
+AT_DATA([hell2.c],
+[[#include <config.h>
+int hell2 (void) { return 2; }
+]])
+
+AT_DATA([hello.c],
+[[#include <config.h>
+#include <stdio.h>
+
+#include "foo.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 <config.h>
+#include <stdio.h>
+
+#include "foo.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 <config.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "foo.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_DEMO_SETUP
+
+
+# _LT_CHECK_EXECUTE([TARGETS])
+# ----------------------------
+# Run the listed make rules, and check that the built binaries work.
+m4_define([_LT_CHECK_EXECUTE],
+[LT_AT_CHECK_EXECUTE([$1],
+        [./hell_static], [./hell])
+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],
+[# Windows hosts search for dlls in the command path.
+PATH=$prefixdir/lib:$PATH
+
+LT_AT_CHECK_EXECUTE([install],
+        [$prefixdir/bin/hell_static], [$prefixdir/bin/hell])
+AT_CHECK([$prefixdir/bin/helldl$EXEEXT |
+    $EGREP '(Welcome to .*GNU Hell|unsupported)'], 0, [ignore])
+])
+
+
+## ------------ ##
+## Demo static. ##
+## ------------ ##
+
+AT_SETUP([link against a preloaded static library])
+
+_LT_DEMO_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-shared],
+                   [^build_old_libs=yes], [^build_libtool_libs=no])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ------------ ##
+## Demo shared. ##
+## ------------ ##
+
+AT_SETUP([build and dynamically load a module])
+
+_LT_DEMO_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-static],
+                   [^build_old_libs=no], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ---------- ##
+## Demo conf. ##
+## ---------- ##
+
+AT_SETUP([preload static and dynamic module])
+
+_LT_DEMO_SETUP
+
+LT_AT_CHECK_CONFIG([],
+                   [^build_old_libs=yes], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_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_DEMO_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_AT_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_DEMO_SETUP
+
+LT_AT_CHECK_CONFIG([--enable-fast-install=no])
+AT_CHECK([$EGREP '^hardcode_action=relink' libtool && (exit 77)], 1)
+
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## --------- ##
+## Demo pic. ##
+## --------- ##
+
+AT_SETUP([force PIC objects])
+
+_LT_DEMO_SETUP
+
+LT_AT_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_DEMO_SETUP
+LT_AT_CHECK_CONFIG([--with-pic=no])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
+
+
+## -------------- ##
+## Demo hardcode. ##
+## -------------- ##
+
+AT_SETUP([hardcoding library path])
+
+_LT_DEMO_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_AT_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)='`"
+
+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_DEMO_SETUP
+
+LT_AT_CHECK_CONFIG
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+
+# 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
+# AIX 5.3 `/bin/sh' will invoke the trap for 0 at the end of a
+# function, so we set the trap outside of a function to be portable.
+trap func_restore_files 0 1 2 13 15
+
+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])
+}
+
+func_restore_files
+
+# Undo the effect of the previous 'trap' command. Some shellology:
+# We cannot use "trap - 0 1 2 3 13 15", because Solaris sh would attempt to
+# execute the command "-". "trap '' ..." is fine only for signal 0 (= normal
+# exit); for the others we need to call 'exit' explicitly. The value of $? is
+# 128 + signal number and is set before the trap-registered command is run.
+trap '' 0
+trap 'func_exit $?' 1 2 3 13 15
+
+AT_CLEANUP
+
+
+## ----------------- ##
+## Demo noinst link. ##
+## ----------------- ##
+
+AT_SETUP([uninstalled libraries have priority])
+
+_LT_DEMO_SETUP
+
+LT_AT_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
+
+
+## ----------- ##
+## Pdemo conf. ##
+## ----------- ##
+
+AT_SETUP([linking with long file names])
+
+_LT_DEMO_SETUP
+
+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 = longer_file_name_hello.c longer_file_name_foo.c 
longer_file_name_foo2.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 longer_file_name_main.c and libhello.la
+hell_SOURCES = longer_file_name_main.c
+hell_LDADD = libhello.la
+
+# Create a statically linked version of hell.
+hell_static_SOURCES = longer_file_name_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 = longer_file_name_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
+]])
+
+AT_DATA([main.c],
+[[#include <config.h>
+#include <stdio.h>
+
+#include "foo.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 (foo2 () != FOO_RET)
+    return 1;
+
+  if (hello () != HELLO_RET)
+    return 2;
+
+  return 0;
+}
+]])
+
+AT_DATA([foo2.c],
+[[#include <config.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "foo.h"
+
+int foo2 (void) {
+  printf ("foo2 cos (0.0) = %g\n", (double) cos ((double) 0.0));
+  return FOO_RET;
+}
+]])
+
+AT_DATA([expout],
+[[Welcome to GNU Hell!
+cos (0.0) = 1
+foo2 cos (0.0) = 1
+** This is not GNU Hello. There is no built-in mail reader. **
+]])
+
+for file in dlmain.c foo.c foo2.c hello.c main.c; do
+  mv $file longer_file_name_$file
+done
+
+LT_AT_CHECK_CONFIG
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+
+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 9ee7f2e..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 snippet 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;
-}
diff --git a/tests/depdemo-conf.test b/tests/depdemo-conf.test
deleted file mode 100755
index 3a29734..0000000
--- a/tests/depdemo-conf.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# depdemo-conf.test - try configuring the depdemo 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/depdemo"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-exit 0
diff --git a/tests/depdemo-exec.test b/tests/depdemo-exec.test
deleted file mode 100755
index 6a6d270..0000000
--- a/tests/depdemo-exec.test
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# depdemo-exec.test - check that programs in the depdemo 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 "depdemo-make" "tests/depdemo/depdemo$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/depdemo/depdemo_static$EXEEXT"
-func_exec "tests/depdemo/depdemo$EXEEXT"
-
-exit $exec_status
diff --git a/tests/depdemo-inst.test b/tests/depdemo-inst.test
deleted file mode 100755
index a90b01d..0000000
--- a/tests/depdemo-inst.test
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh
-# depdemo-inst.test - try installing from the depdemo 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 "depdemo-make" "tests/depdemo/depdemo$EXEEXT"
-
-func_mkprefixdir
-func_cd "tests/depdemo"
-func_make "install"
-func_exec_init "installed"
-func_exec "$prefix/bin/depdemo_static$EXEEXT"
-func_exec "$prefix/bin/depdemo$EXEEXT"
-
-exit $status
diff --git a/tests/depdemo-make.test b/tests/depdemo-make.test
deleted file mode 100755
index d011401..0000000
--- a/tests/depdemo-make.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# depdemo-make.test - try building in the depdemo 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 "depdemo-conf" "tests/depdemo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/depdemo"
-func_make
-
-exit 0
diff --git a/tests/depdemo-nofast-exec.test b/tests/depdemo-nofast-exec.test
deleted file mode 100755
index 36dfc6c..0000000
--- a/tests/depdemo-nofast-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-exec.test
diff --git a/tests/depdemo-nofast-inst.test b/tests/depdemo-nofast-inst.test
deleted file mode 100755
index 4b7663c..0000000
--- a/tests/depdemo-nofast-inst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-inst.test
diff --git a/tests/depdemo-nofast-make.test b/tests/depdemo-nofast-make.test
deleted file mode 100755
index 6d49dee..0000000
--- a/tests/depdemo-nofast-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-make.test
diff --git a/tests/depdemo-nofast-unst.test b/tests/depdemo-nofast-unst.test
deleted file mode 100755
index e2c258d..0000000
--- a/tests/depdemo-nofast-unst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-unst.test
diff --git a/tests/depdemo-nofast.test b/tests/depdemo-nofast.test
deleted file mode 100755
index 2f4246f..0000000
--- a/tests/depdemo-nofast.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# depdemo-nofast.test - try configuring the ./depdemo 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/depdemo"
-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/depdemo-relink.test b/tests/depdemo-relink.test
deleted file mode 100755
index 0d01279..0000000
--- a/tests/depdemo-relink.test
+++ /dev/null
@@ -1,129 +0,0 @@
-#! /bin/sh
-# depdemo-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 ()
-{
-    func_mkdir_p "$objdir"
-    test "`echo _fnord/temp/libs/*`" = "_fnord/temp/libs/*" \
-      || mv -f _fnord/temp/libs/* "l3/$objdir"
-    mv -f "_fnord/temp/libl3.la" "l3"
-    test -f "_fnord/temp/lt-depdemo$EXEEXT" \
-      && mv -f "_fnord/temp/lt-depdemo$EXEEXT" "$objdir"
-    test -f "_fnord/temp/depdemo$EXEEXT" \
-      && mv -f "_fnord/temp/depdemo$EXEEXT" "$objdir"
-    rm -rf "_fnord"
-}
-
-func_save_files ()
-{
-    func_mkdir_p "_fnord/temp/libs"
-    test -f "$objdir/lt-depdemo$EXEEXT" \
-      && cp -f "$objdir/lt-depdemo$EXEEXT" "_fnord/temp"
-    test -f "$objdir/depdemo$EXEEXT" \
-      && cp -f "$objdir/depdemo$EXEEXT" "_fnord/temp"
-    cp -f l3/libl3.la "_fnord/temp"
-    cp -f l3/"$objdir"/* "_fnord/temp/libs"
-}
-
-func_require "depdemo-inst" "$prefix/lib/libl3.la"  "tests/depdemo/l3/libl3.la"
-
-func_mkprefixdir
-func_cd "tests/depdemo"
-
-# Check to make sure we have a dynamic library.
-func_get_config "library_names" "cat l3/libl3.la"
-test -z "$library_names" \
-  && func_skip "Exiting: depdemo/l3/libl3.la is not a shared library"
-
-# AIX 5.3 `/bin/sh' will invoke the trap for 0 at the end of a
-# function, so we set the trap outside of a function to be portable.
-trap func_restore_files 0 1 2 13 15
-func_save_files
-
-func_get_config 'shlibpath_overrides_runpath
-hardcode_action
-hardcode_direct
-hardcode_into_libs' "./libtool --config" ": fatal"
-
-./depdemo$EXEEXT # so that it links on-demand if needed
-
-func_msg "removing libl3.la from depdemo/l3"
-rm -rf l3/libl3.la l3/$objdir
-
-func_msg "running depdemo/depdemo"
-if ./depdemo$EXEEXT ||
-   # On AIX 4.1, when the installed copy of libl3 is loaded, it brings
-   # with it the installed copies of libl1 and libl2, with disjoint
-   # counters var_l1 and var_l2.  This is arguably acceptable behavior,
-   # but it's definitely not enough of a reason for the test to fail.
-   ./depdemo$EXEEXT -alt; 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"
-elif test "$build" != "$host"; then
-  func_msg "depdemo/depdemo does not run.  Since you seem to be"
-  func_msg "cross-compiling, this might be ok."
-else
-  func_fail "Exiting: depdemo/depdemo does not run, maybe libl3 was not 
installed"
-fi
-
-func_msg "linking a broken depdemo/l3/libl3.la"
-(cd l3 && $MAKE libl3.la libl3_la_OBJECTS=../l2/l2.lo) \
-  || func_fail "Exiting: cannot link broken libl3.la"
-rm -f l3/libl3.la
-
-func_msg "running depdemo/depdemo with broken libl3.la"
-if (./depdemo$EXEEXT) 2>&1; then
-  func_msg "Exiting: depdemo/depdemo runs even though libl3.la is incomplete"
-  func_fail "shlibpath_overrides_runpath should be set to no"
-elif test "$build" != "$host"; then
-  func_msg "Failed, as expected.  But since you seem to be"
-  func_msg "cross-compiling, this is not reliable."
-  status=$EXIT_SKIP
-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-depdemo || exit $EXIT_FAILURE
-  cp $objdir/depdemo $objdir/lt-depdemo || exit $EXIT_FAILURE
-  func_msg "running depdemo/depdemo with installed libl3.la"
-  if ./depdemo; 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/depdemo-shared-exec.test b/tests/depdemo-shared-exec.test
deleted file mode 100755
index 36dfc6c..0000000
--- a/tests/depdemo-shared-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-exec.test
diff --git a/tests/depdemo-shared-inst.test b/tests/depdemo-shared-inst.test
deleted file mode 100755
index 4b7663c..0000000
--- a/tests/depdemo-shared-inst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-inst.test
diff --git a/tests/depdemo-shared-make.test b/tests/depdemo-shared-make.test
deleted file mode 100755
index 6d49dee..0000000
--- a/tests/depdemo-shared-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-make.test
diff --git a/tests/depdemo-shared-unst.test b/tests/depdemo-shared-unst.test
deleted file mode 100755
index e2c258d..0000000
--- a/tests/depdemo-shared-unst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-unst.test
diff --git a/tests/depdemo-shared.test b/tests/depdemo-shared.test
deleted file mode 100755
index 8b334d6..0000000
--- a/tests/depdemo-shared.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# depdemo-shared.test - try configuring the depdemo 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/depdemo"
-func_make_distclean
-func_configure "--disable-static"
-func_check_static_shared "no" "yes"
-
-exit 0
diff --git a/tests/depdemo-static-exec.test b/tests/depdemo-static-exec.test
deleted file mode 100755
index 36dfc6c..0000000
--- a/tests/depdemo-static-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-exec.test
diff --git a/tests/depdemo-static-inst.test b/tests/depdemo-static-inst.test
deleted file mode 100755
index 4b7663c..0000000
--- a/tests/depdemo-static-inst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-inst.test
diff --git a/tests/depdemo-static-make.test b/tests/depdemo-static-make.test
deleted file mode 100755
index 6d49dee..0000000
--- a/tests/depdemo-static-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-make.test
diff --git a/tests/depdemo-static-unst.test b/tests/depdemo-static-unst.test
deleted file mode 100755
index e2c258d..0000000
--- a/tests/depdemo-static-unst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/depdemo-unst.test
diff --git a/tests/depdemo-static.test b/tests/depdemo-static.test
deleted file mode 100755
index 39de6b8..0000000
--- a/tests/depdemo-static.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# depdemo-static.test - try configuring the depdemo 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/depdemo"
-func_make_distclean
-func_configure "--disable-shared"
-func_check_static_shared "yes" "no"
-
-exit 0
diff --git a/tests/depdemo-unst.test b/tests/depdemo-unst.test
deleted file mode 100755
index 6096e6d..0000000
--- a/tests/depdemo-unst.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# depdemo-unst.test - try uninstalling in the depdemo 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 "depdemo-inst" "$prefix/bin/depdemo$EXEEXT" 
"tests/depdemo/Makefile"
-
-func_mkprefixdir
-func_cd "tests/depdemo"
-func_make_uninstall
-
-exit 0
diff --git a/tests/depdemo.at b/tests/depdemo.at
new file mode 100644
index 0000000..3c0666b
--- /dev/null
+++ b/tests/depdemo.at
@@ -0,0 +1,430 @@
+# depdemo.at -- Library interdependencies               -*- Autotest -*-
+#
+#   Copyright (C) 2003-2004, 2011-2012 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([Library interdependencies.])
+
+## ------------------------------------------- ##
+## Some functions shared by later tests cases. ##
+## ------------------------------------------- ##
+
+func_restore_files ()
+{
+    test "`echo _fnord/temp/libs/*`" = "_fnord/temp/libs/*" \
+      || mv -f _fnord/temp/libs/* "l3/$objdir"
+    mv -f "_fnord/temp/libl3.la" "l3"
+    test -f "_fnord/temp/lt-depdemo$EXEEXT" \
+      && mv -f "_fnord/temp/lt-depdemo$EXEEXT" "$objdir"
+    test -f "_fnord/temp/depdemo$EXEEXT" \
+      && mv -f "_fnord/temp/depdemo$EXEEXT" "$objdir"
+    rm -rf "_fnord"
+}
+
+func_save_files ()
+{
+    test -n "$objdir" || exit 1
+    $lt_INSTALL -d "_fnord/temp/libs"
+    test -f "$objdir/lt-depdemo$EXEEXT" \
+      && cp -f "$objdir/lt-depdemo$EXEEXT" "_fnord/temp"
+    test -f "$objdir/depdemo$EXEEXT" \
+      && cp -f "$objdir/depdemo$EXEEXT" "_fnord/temp"
+    cp -f l3/libl3.la "_fnord/temp"
+    cp -f l3/"$objdir"/* "_fnord/temp/libs"
+}
+
+
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[AT_DATA([configure.ac],
+[[AC_INIT([depdemo], ]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([win32-dll])
+AC_SUBST([LIBTOOL_DEPS])
+STATIC=
+test yes = "$enable_static" && STATIC=-static
+AC_SUBST([STATIC])
+
+LT_LIB_M
+AC_CONFIG_FILES([Makefile l1/Makefile l2/Makefile l3/Makefile l4/Makefile])
+AC_CONFIG_HEADERS([config.h:config.in.h])
+AC_OUTPUT
+]])
+
+AT_DATA([Makefile.am],
+[[AUTOMAKE_OPTIONS = no-dependencies foreign
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = l1 l2 l3 l4
+
+bin_PROGRAMS = depdemo depdemo_static
+
+depdemo_SOURCES = main.c
+depdemo_LDADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la \
+               $(top_builddir)/l4/libl4.la
+depdemo_DEPENDENCIES = $(top_builddir)/l1/libl1.la \
+               $(top_builddir)/l2/libl2.la $(top_builddir)/l4/libl4.la
+
+depdemo_static_SOURCES = $(depdemo_SOURCES)
+depdemo_static_LDADD = $(depdemo_LDADD)
+depdemo_static_DEPENDENCIES = $(depdemo_DEPENDENCIES)
+depdemo_static_LDFLAGS = $(STATIC)
+
+libtool: $(LIBTOOL_DEPS)
+       $(SHELL) ./config.status --recheck
+]])
+
+AT_DATA([main.c],
+[[#include <config.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "l1/l1.h"
+#include "l2/l2.h"
+#include "l4/l4.h"
+
+#define STREQ !strcmp
+
+int main (int argc, char **argv)
+{
+  printf("dependencies:\n");
+  func_l1(0);
+  func_l2(0);
+  func_l4(0);
+  if (argc == 2 && STREQ (argv[1], "-alt")
+      && var_l1 + var_l2 + var_l4 == 8)
+       return 0;
+  printf("var_l1(%d) + var_l2(%d) + var_l4(%d) == %d\n",
+         var_l1,var_l2,var_l4, var_l1 + var_l2 + var_l4);
+  if (var_l1 + var_l2 + var_l4 != 19)
+    {
+       printf("var_l1(%d) + var_l2(%d) + var_l4(%d) != 19\n",
+               var_l1,var_l2,var_l4);
+       return 1;
+    }
+  return 0;
+}
+]])
+
+# Create 4 directorys of mostly identical files.
+for i in 1 2 3 4; do
+  mkdir l$i
+
+  # l$i/Makefile.am:
+  {
+    $ECHO     'AUTOMAKE_OPTIONS = no-dependencies foreign'
+    $ECHO     'AM_CPPFLAGS = -I$(top_srcdir) -DBUILDING_LIBL'$i
+    $ECHO     'lib_LTLIBRARIES = libl'$i'.la'
+    $ECHO     'libl'$i'_la_SOURCES = l'$i'.c l'$i'.h'
+    $ECHO     'libl'$i'_la_LDFLAGS = -no-undefined'
+    $ECHO     'libl'$i'_la_LIBADD ='
+    if test 4 != $i; then
+      j=1; while test "$j" -lt "$i"; do
+        $ECHO 'libl'$i'_la_LIBADD += $(top_builddir)/l'$j'/libl'$j'.la'
+        j=`expr 1 + $j`
+      done
+    else
+      j=3
+      $ECHO   'libl'$i'_la_LIBADD += $(top_builddir)/l'$j'/libl'$j'.la $(LIBM)'
+    fi
+  } > l$i/Makefile.am
+
+  # l$i/l$i.h
+  [{
+    $ECHO '#ifndef L'$i'_H'
+    $ECHO '#define L'$i'_H'
+    $ECHO
+    $ECHO '#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__'
+    $ECHO '#  ifdef BUILDING_LIBL'$i
+    $ECHO '#    ifdef DLL_EXPORT'
+    $ECHO '#      define LIBL'$i'_SCOPE extern __declspec (dllexport)'
+    $ECHO '#    endif'
+    $ECHO '#  else'
+    $ECHO '#    define LIBL'$i'_SCOPE extern __declspec (dllimport)'
+    $ECHO '#  endif'
+    $ECHO '#endif'
+    $ECHO '#ifndef LIBL'$i'_SCOPE'
+    $ECHO '#  define LIBL'$i'_SCOPE extern'
+    $ECHO '#endif'
+    $ECHO
+    $ECHO '#ifdef __cplusplus'
+    $ECHO 'extern "C" {'
+    $ECHO '#endif'
+    $ECHO
+    $ECHO '  LIBL'$i'_SCOPE int var_l'$i';'
+    $ECHO '  int func_l'$i' (int);'
+    $ECHO
+    $ECHO '#ifdef __cplusplus'
+    $ECHO '}'
+    $ECHO '#endif'
+    $ECHO '#endif'
+  }] > l$i/l$i.h
+
+  # l$i/l$i.c:
+  {
+    if test 4 -ne $i; then
+      $ECHO     '#include <config.h>'
+      $ECHO     '#include <stdio.h>'
+      $ECHO
+      $ECHO     '#include "l'$i'/l'$i'.h"'
+      j=1; while test "$j" -lt "$i"; do
+        $ECHO   '#include "l'$j'/l'$j'.h"'
+        j=`expr 1 + $j`
+      done
+      $ECHO
+      $ECHO     'int var_l'$i' = 0;'
+      $ECHO     'int func_l'$i' (int indent) {'
+      $ECHO     '  int i;'
+      $ECHO     '  for (i = 0; i < indent; i++)'
+      $ECHO     "    putchar (' ');"
+      $ECHO     '  printf ("l'$i' (%i)\n", var_l'$i');'
+      if test 1 -eq $i; then
+        $ECHO   '  var_l1++;'
+      else
+        j=1; while test "$j" -lt "$i"; do
+          $ECHO '  func_l'$j'(indent+1);'
+          $ECHO '  var_l'$i' += var_l'$j';'
+          j=`expr 1 + $j`
+        done
+      fi
+      $ECHO     '  return 0;'
+      $ECHO     '}'
+    else
+      j=3
+      $ECHO     '#include <config.h>'
+      $ECHO     '#include <stdio.h>'
+      $ECHO     '#include <math.h>'
+      $ECHO     '#include "l'$i'/l'$i'.h"'
+      $ECHO     '#include "l'$j'/l'$j'.h"'
+      $ECHO
+      $ECHO     'int var_l'$i' = 0;'
+      $ECHO     'int func_l'$i' (int indent) {'
+      $ECHO     '  int i;'
+      $ECHO     '  for (i = 0; i < indent; i++)'
+      $ECHO     "    putchar (' ');"
+      $ECHO     '  printf ("l'$i' (%i)\n", var_l'$i');'
+      $ECHO     '  func_l'$j'(indent+1);'
+      $ECHO     '  for (i = 0; i < indent; i++)'
+      $ECHO     "    putchar (' ');"
+      $ECHO     '  printf("libm [cos (0.0) = %g]\n", (double) cos ((double) 
0.0));'
+      $ECHO     '  var_l'$i' += var_l'$j';'
+      $ECHO     '  return 0;'
+      $ECHO     '}'
+    fi
+  } > l$i/l$i.c
+done
+
+
+AT_DATA([expout],
+[[dependencies:
+l1 (0)
+l2 (0)
+ l1 (1)
+l4 (0)
+ l3 (0)
+  l1 (2)
+  l2 (2)
+   l1 (3)
+libm cos (0.0) = 1
+var_l1(4) + var_l2(6) + var_l4(9) == 19
+]])
+
+prefixdir=`pwd`/_inst
+]) # _LT_SETUP
+
+
+
+# _LT_CHECK_EXECUTE([TARGETS])
+# ----------------------------
+# Run the listed make rules, and check that the built binaries work.
+m4_define([_LT_CHECK_EXECUTE],
+[LT_AT_CHECK_EXECUTE([$1],
+        [./depdemo_static], [./depdemo])
+])
+
+# _LT_CHECK_INSTALL
+# -----------------
+# Run the make install rule, and check that installed binaries work too.
+m4_define([_LT_CHECK_INSTALL],
+[# Windows hosts search for dlls in the command path.
+PATH=$prefixdir/lib:$PATH
+LT_AT_CHECK_EXECUTE([install],
+        [$prefixdir/bin/depdemo_static], [$prefixdir/bin/depdemo])
+])
+
+
+## --------------- ##
+## Depdemo static. ##
+## --------------- ##
+
+AT_SETUP([static library interdependencies])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-shared],
+                   [^build_old_libs=yes], [^build_libtool_libs=no])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## --------------- ##
+## Depdemo shared. ##
+## --------------- ##
+
+AT_SETUP([shared library interdependencies])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-static],
+                   [^build_old_libs=no], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ------------- ##
+## Depdemo conf. ##
+## ------------- ##
+
+AT_SETUP([shared and static interdependencies])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([],
+                   [^build_old_libs=yes], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## --------------- ##
+## Depdemo nofast. ##
+## --------------- ##
+
+AT_SETUP([disable fast install])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--enable-fast-install=no])
+AT_CHECK([$EGREP '^hardcode_action=relink' libtool && (exit 77)], 1)
+
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## --------------- ##
+## Depdemo relink. ##
+## --------------- ##
+
+AT_SETUP([binary relinking at install time])
+AT_KEYWORDS([interactive])dnl This test causes a popup on Windows
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+
+# Check to make sure we have a dynamic library.
+eval `$EGREP '^library_names=' l3/libl3.la`
+AT_CHECK([test -n "$library_names" || (exit 77)])
+
+func_save_files
+
+# AIX 5.3 `/bin/sh' will invoke the trap for 0 at the end of a
+# function, so we set the trap outside of a function to be portable.
+trap func_restore_files 0 1 2 13 15
+
+eval "`$LIBTOOL --config | $EGREP '^shlibpath_overrides_runpath='`"
+eval "`$LIBTOOL --config | $EGREP '^hardcode_(action|direct|into_libs)='`"
+
+# Can't finish these tests reliably when cross-compiling.
+AT_CHECK([test "X$host" = "X$build" || (exit 77)])
+
+# Allow the binary to link on-demand if need be.
+./depdemo$EXEEXT >/dev/null || :
+
+# Remove l3/libl3.la from build tree.
+rm -f l3/libl3.la "l3/$objdir"/libl3.*
+
+# Either:
+#  - uninstalled ./depdem will run using the just installed libraries
+#    when the uninstalled libs are missing;
+#  - on AIX 4.1, when the installed copy of libl3 is loaded, it brings
+#    with it the installed copies of libl1 and libl2, with disjoint
+#    counters var_l1 and var_l2.  This is arguably unacceptable behaviour
+#    but definitely not enough of a reason for the test to fail;
+#  - or relinking at install time is necessary, and the uninstalled
+#    depdemo has only the uninstalled library paths hardcoded.
+AT_CHECK([./depdemo$EXEEXT >/dev/null ||
+    ./depdemo$EXEEXT -alt ||
+    test relink,yes = "$hardcode_action,$hardcode_direct"])
+
+# Link an incomplete l3/libl3.la.
+(cd l3 &&
+ LT_AT_MAKE([libl3.la], [libl3_la_OBJECTS=../l2/l2.lo])
+)
+AT_CHECK([test -f l3/libl3.la])
+
+# Try running uninstalled ./depdemo with only broken libl3.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.
+AT_CHECK([./depdemo$EXEEXT || (exit 1)], 1, [ignore], [ignore])
+
+test relink = "$hardcode_action" ||
+test yes = "$shlibpath_overrides_runpath" ||
+{
+    AT_CHECK([rm -f $objdir/lt-depdemo$EXEEXT])
+    AT_CHECK([cp $objdir/depdemo$EXEEXT $objdir/lt-depdemo$EXEEXT])
+
+    # Running depdemo with installed libl3.la.
+    # If the following check fails, then shlibpath_overrides_runpath is
+    # wrong, and should be set to `yes' on this host.
+    LT_AT_CHECK([./depdemo], 0, [expout])
+}
+
+# Undo the effect of the previous 'trap' command. Some shellology:
+# We cannot use "trap - 0 1 2 3 13 15", because Solaris sh would attempt to
+# execute the command "-". "trap '' ..." is fine only for signal 0 (= normal
+# exit); for the others we need to call 'exit' explicitly. The value of $? is
+# 128 + signal number and is set before the trap-registered command is run.
+trap '' 0
+trap 'func_exit $?' 1 2 3 13 15
+
+AT_CLEANUP
diff --git a/tests/depdemo/.gitignore b/tests/depdemo/.gitignore
deleted file mode 100644
index 8d0f34e..0000000
--- a/tests/depdemo/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/depdemo
-/depdemo_static
diff --git a/tests/depdemo/Makefile.am b/tests/depdemo/Makefile.am
deleted file mode 100644
index 282a861..0000000
--- a/tests/depdemo/Makefile.am
+++ /dev/null
@@ -1,57 +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)/../..
-
-SUBDIRS = l1 l2 l3 l4
-
-EXTRA_DIST = sysdep.h
-
-bin_PROGRAMS = depdemo depdemo_static
-
-depdemo_SOURCES = main.c
-depdemo_LDADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la \
-               $(top_builddir)/l4/libl4.la
-depdemo_DEPENDENCIES = $(top_builddir)/l1/libl1.la \
-               $(top_builddir)/l2/libl2.la $(top_builddir)/l4/libl4.la
-
-depdemo_static_SOURCES = $(depdemo_SOURCES)
-depdemo_static_LDADD = $(depdemo_LDADD)
-depdemo_static_DEPENDENCIES = $(depdemo_DEPENDENCIES)
-depdemo_static_LDFLAGS = $(STATIC)
-
-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/depdemo/README b/tests/depdemo/README
deleted file mode 100644
index 30d7166..0000000
--- a/tests/depdemo/README
+++ /dev/null
@@ -1,11 +0,0 @@
-This is depdemo, an example package that uses GNU libtool with an
-Automake-generated environment to build many interdependent libraries
-and a test program.
-
-There are four libraries: l1, l2, l3 and l4.
-l1 depends on nothing.
-l2 depends on l1.
-l3 depends on l1 and l2.
-l4 depends on l3 and libm.
-
-The test program uses l1, l2 and l4.
diff --git a/tests/depdemo/configure.ac b/tests/depdemo/configure.ac
deleted file mode 100644
index 7405b54..0000000
--- a/tests/depdemo/configure.ac
+++ /dev/null
@@ -1,68 +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([depdemo], [1.0], address@hidden)
-AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ---------------- ##
-## compiler checks. ##
-## ---------------- ##
-AC_PROG_CC
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-LT_INIT([win32-dll])
-AC_SUBST([LIBTOOL_DEPS])
-
-## ------------------------------- ##
-## depdemo specific configuration. ##
-## ------------------------------- ##
-STATIC="\`$CONFIG_SHELL ./libtool --features |$SED -n -e '/enable 
static/s/^.*\$\$/-static/p'\`"
-AC_SUBST([STATIC])
-
-## ------------------------------ ##
-## Libraries required by depdemo. ##
-## ------------------------------ ##
-LT_LIB_M
-
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile l1/Makefile l2/Makefile l3/Makefile l4/Makefile])
-AC_OUTPUT
diff --git a/tests/depdemo/l1/Makefile.am b/tests/depdemo/l1/Makefile.am
deleted file mode 100644
index b2e7cb8..0000000
--- a/tests/depdemo/l1/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-##   Copyright (C) 2003, 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.
-#####
-
-top_distdir = ../..
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-
-AM_CPPFLAGS = -I$(top_srcdir) -DBUILDING_LIBL1
-
-lib_LTLIBRARIES = libl1.la
-libl1_la_SOURCES = l1.c l1.h
-libl1_la_LDFLAGS = -no-undefined
diff --git a/tests/depdemo/l1/l1.c b/tests/depdemo/l1/l1.c
deleted file mode 100644
index 715a91e..0000000
--- a/tests/depdemo/l1/l1.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* l1.c -- trivial test library
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 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 "l1/l1.h"
-#include <stdio.h>
-
-int    var_l1 = 0;
-
-int
-func_l1 (int indent)
-{
-  int i;
-
-  for (i = 0; i < indent; i++)
-    putchar(' ');
-  printf("l1 (%i)\n", var_l1);
-  var_l1++;
-  return 0;
-}
diff --git a/tests/depdemo/l1/l1.h b/tests/depdemo/l1/l1.h
deleted file mode 100644
index d357d80..0000000
--- a/tests/depdemo/l1/l1.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* l1.h -- interface to a trivial library
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 2006, 2010 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 _L1_H_
-#define _L1_H_ 1
-
-#include "sysdep.h"
-
-#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__
-# ifdef BUILDING_LIBL1
-#  ifdef DLL_EXPORT
-#   define LIBL1_SCOPE extern __declspec (dllexport)
-#  endif
-# else
-#  define LIBL1_SCOPE extern __declspec (dllimport)
-# endif
-#endif
-#ifndef LIBL1_SCOPE
-# define LIBL1_SCOPE extern
-#endif
-
-__BEGIN_DECLS
-LIBL1_SCOPE int var_l1;
-int    func_l1 __P((int));
-__END_DECLS
-
-#endif /* !_L1_H_ */
diff --git a/tests/depdemo/l2/Makefile.am b/tests/depdemo/l2/Makefile.am
deleted file mode 100644
index 2cb86c5..0000000
--- a/tests/depdemo/l2/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-##   Copyright (C) 2003, 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.
-#####
-
-top_distdir = ../..
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-
-AM_CPPFLAGS = -I$(top_srcdir) -DBUILDING_LIBL2
-
-lib_LTLIBRARIES = libl2.la
-libl2_la_SOURCES = l2.c l2.h
-libl2_la_LDFLAGS = -no-undefined
-libl2_la_LIBADD = $(top_builddir)/l1/libl1.la
diff --git a/tests/depdemo/l2/l2.c b/tests/depdemo/l2/l2.c
deleted file mode 100644
index 76b7e60..0000000
--- a/tests/depdemo/l2/l2.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* l2.c -- trivial test library
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 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 "l2/l2.h"
-
-#include "l1/l1.h"
-#include <stdio.h>
-
-int    var_l2 = 0;
-
-int
-func_l2 (int indent)
-{
-  int i;
-
-  for (i = 0; i < indent; i++)
-    putchar(' ');
-  printf("l2 (%i)\n", var_l2);
-  func_l1(indent+1);
-  var_l2 += var_l1;
-  return 0;
-}
diff --git a/tests/depdemo/l2/l2.h b/tests/depdemo/l2/l2.h
deleted file mode 100644
index 0f6b3b9..0000000
--- a/tests/depdemo/l2/l2.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* l2.h -- interface to a trivial library
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 2006, 2010 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 _L2_H_
-#define _L2_H_ 1
-
-#include "sysdep.h"
-
-#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__
-# ifdef BUILDING_LIBL2
-#  ifdef DLL_EXPORT
-#   define LIBL2_SCOPE extern __declspec (dllexport)
-#  endif
-# else
-#  define LIBL2_SCOPE extern __declspec (dllimport)
-# endif
-#endif
-#ifndef LIBL2_SCOPE
-# define LIBL2_SCOPE extern
-#endif
-
-__BEGIN_DECLS
-LIBL2_SCOPE int var_l2;
-int    func_l2 __P((int));
-__END_DECLS
-
-#endif /* !_L2_H_ */
diff --git a/tests/depdemo/l3/Makefile.am b/tests/depdemo/l3/Makefile.am
deleted file mode 100644
index 341932f..0000000
--- a/tests/depdemo/l3/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-##   Copyright (C) 2003, 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.
-#####
-
-top_distdir = ../..
-extradir    = $(libdir)/extra
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-
-AM_CPPFLAGS = -I$(top_srcdir) -DBUILDING_LIBL3
-
-lib_LTLIBRARIES = libl3.la
-libl3_la_SOURCES = l3.c l3.h
-libl3_la_LDFLAGS = -no-undefined
-libl3_la_LIBADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la
diff --git a/tests/depdemo/l3/l3.c b/tests/depdemo/l3/l3.c
deleted file mode 100644
index 33910e6..0000000
--- a/tests/depdemo/l3/l3.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* l3.c -- trivial test library
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 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 "l3/l3.h"
-
-#include "l1/l1.h"
-#include "l2/l2.h"
-#include <stdio.h>
-
-int    var_l3 = 0;
-
-int
-func_l3 (int indent)
-{
-  int i;
-
-  for (i = 0; i < indent; i++)
-    putchar(' ');
-  printf("l3 (%i)\n", var_l3);
-  func_l1(indent+1);
-  func_l2(indent+1);
-  var_l3 += var_l1 + var_l2;
-  return 0;
-}
diff --git a/tests/depdemo/l3/l3.h b/tests/depdemo/l3/l3.h
deleted file mode 100644
index 60fcbd5..0000000
--- a/tests/depdemo/l3/l3.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* l3.h -- interface to a trivial library
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 2006, 2010 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 _L3_H_
-#define _L3_H_ 1
-
-#include "sysdep.h"
-
-#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__
-# ifdef BUILDING_LIBL3
-#  ifdef DLL_EXPORT
-#   define LIBL3_SCOPE extern __declspec (dllexport)
-#  endif
-# else
-#  define LIBL3_SCOPE extern __declspec (dllimport)
-# endif
-#endif
-#ifndef LIBL3_SCOPE
-# define LIBL3_SCOPE extern
-#endif
-
-__BEGIN_DECLS
-LIBL3_SCOPE int var_l3;
-int    func_l3 __P((int));
-__END_DECLS
-
-#endif /* !_L3_H_ */
diff --git a/tests/depdemo/l4/Makefile.am b/tests/depdemo/l4/Makefile.am
deleted file mode 100644
index fa0d4b2..0000000
--- a/tests/depdemo/l4/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-##   Copyright (C) 2003, 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.
-#####
-
-top_distdir = ../..
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-
-AM_CPPFLAGS = -I$(top_srcdir) -DBUILDING_LIBL4
-
-lib_LTLIBRARIES = libl4.la
-libl4_la_SOURCES = l4.c l4.h
-libl4_la_LDFLAGS = -no-undefined
-libl4_la_LIBADD = $(top_builddir)/l3/libl3.la $(LIBM)
diff --git a/tests/depdemo/l4/l4.c b/tests/depdemo/l4/l4.c
deleted file mode 100644
index 0ff2e33..0000000
--- a/tests/depdemo/l4/l4.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* l4.c -- trivial test library
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 2006, 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 "l4/l4.h"
-
-#include "l3/l3.h"
-#include <stdio.h>
-#include <math.h>
-
-int    var_l4 = 0;
-
-int
-func_l4 (int indent)
-{
-  int i;
-
-  for (i = 0; i < indent; i++)
-    putchar(' ');
-  printf("l4 (%i)\n", var_l4);
-  func_l3(indent+1);
-  for (i = 0; i <= indent; i++)
-    putchar(' ');
-  printf("libm [sin(1.5) = %f]\n", sin(1.5));
-  var_l4 += var_l3;
-  return 0;
-}
diff --git a/tests/depdemo/l4/l4.h b/tests/depdemo/l4/l4.h
deleted file mode 100644
index 703743f..0000000
--- a/tests/depdemo/l4/l4.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* l4.h -- interface to a trivial library
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 2006, 2010 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 _L4_H_
-#define _L4_H_ 1
-
-#include "sysdep.h"
-
-#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__
-# ifdef BUILDING_LIBL4
-#  ifdef DLL_EXPORT
-#   define LIBL4_SCOPE extern __declspec (dllexport)
-#  endif
-# else
-#  define LIBL4_SCOPE extern __declspec (dllimport)
-# endif
-#endif
-#ifndef LIBL4_SCOPE
-# define LIBL4_SCOPE extern
-#endif
-
-__BEGIN_DECLS
-LIBL4_SCOPE int var_l4;
-int    func_l4 __P((int));
-__END_DECLS
-
-#endif /* !_L4_H_ */
diff --git a/tests/depdemo/main.c b/tests/depdemo/main.c
deleted file mode 100644
index 73e4db0..0000000
--- a/tests/depdemo/main.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* main.c -- inter-library dependency test program
-
-   Copyright (C) 1998, 1999, 2000, 2006 Free Software Foundation
-   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 "l1/l1.h"
-#include "l2/l2.h"
-#include "l4/l4.h"
-#include <stdio.h>
-#include <string.h>
-
-int
-main (int argc, char **argv)
-{
-  printf("dependencies:\n");
-  func_l1(0);
-  func_l2(0);
-  func_l4(0);
-  if (argc == 2 && strcmp (argv[1], "-alt") == 0
-      && var_l1 + var_l2 + var_l4 == 8)
-       return 0;
-  printf("var_l1(%d) + var_l2(%d) + var_l4(%d) == %d\n",var_l1,var_l2,var_l4, 
var_l1 + var_l2 + var_l4);
-  if (var_l1 + var_l2 + var_l4 != 20)
-       {
-       printf("var_l1(%d) + var_l2(%d) + var_l4(%d) != 
20\n",var_l1,var_l2,var_l4);
-       return 1;
-       }
-  return 0;
-}
diff --git a/tests/depdemo/sysdep.h b/tests/depdemo/sysdep.h
deleted file mode 100644
index 7c00990..0000000
--- a/tests/depdemo/sysdep.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* sysdep.h -- system dependent declarations
-
-   Copyright (C) 1998-1999 Thomas Tanner
-   Copyright (C) 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.
-*/
-
-/* Only include this header file once. */
-#ifndef _SYSDEP_H_
-#define _SYSDEP_H_ 1
-
-/* __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
-
-/* __P 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 __P
-#if defined __STDC__ || defined _AIX || (defined __mips && defined 
_SYSTYPE_SVR4) || defined WIN32 || defined __cplusplus
-# define __P(protos) protos
-#else
-# define __P(protos) ()
-#endif
-
-#endif /* !_SYSDEP_H_ */
diff --git a/tests/f77demo-conf.test b/tests/f77demo-conf.test
deleted file mode 100755
index feb3a85..0000000
--- a/tests/f77demo-conf.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# f77demo-conf.test - try configuring the f77demo 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/f77demo"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-exit 0
diff --git a/tests/f77demo-exec.test b/tests/f77demo-exec.test
deleted file mode 100755
index 40539fd..0000000
--- a/tests/f77demo-exec.test
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# f77demo-exec.test - check that programs in the f77demo 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 "f77demo-make" "tests/f77demo/fprogram$EXEEXT" 
"tests/f77demo/cprogram$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/f77demo/fprogram$EXEEXT"
-func_exec "tests/f77demo/cprogram$EXEEXT"
-
-exit $exec_status
diff --git a/tests/f77demo-make.test b/tests/f77demo-make.test
deleted file mode 100755
index 19a153d..0000000
--- a/tests/f77demo-make.test
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# f77demo-make.test - try building in the f77demo 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 "f77demo-conf" "tests/f77demo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/f77demo"
-# May fail make on some platforms, simply "skip" in that case
-#func_make
-eval $MAKE || func_skip "The improved fortran tests catch a known failure mode"
-
-exit 0
diff --git a/tests/f77demo-shared-exec.test b/tests/f77demo-shared-exec.test
deleted file mode 100755
index b9fdb03..0000000
--- a/tests/f77demo-shared-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/f77demo-exec.test
diff --git a/tests/f77demo-shared-make.test b/tests/f77demo-shared-make.test
deleted file mode 100755
index bee5491..0000000
--- a/tests/f77demo-shared-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/f77demo-make.test
diff --git a/tests/f77demo-shared.test b/tests/f77demo-shared.test
deleted file mode 100755
index 26cca0b..0000000
--- a/tests/f77demo-shared.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# f77demo-shared.test - try configuring the f77demo 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/f77demo"
-func_make_distclean
-func_configure "--disable-static"
-func_check_static_shared "no" "yes"
-
-exit 0
diff --git a/tests/f77demo-static-exec.test b/tests/f77demo-static-exec.test
deleted file mode 100755
index b9fdb03..0000000
--- a/tests/f77demo-static-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/f77demo-exec.test
diff --git a/tests/f77demo-static-make.test b/tests/f77demo-static-make.test
deleted file mode 100755
index bee5491..0000000
--- a/tests/f77demo-static-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/f77demo-make.test
diff --git a/tests/f77demo-static.test b/tests/f77demo-static.test
deleted file mode 100755
index 395b63d..0000000
--- a/tests/f77demo-static.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# f77demo-static.test - try configuring the f77demo 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/f77demo"
-func_make_distclean
-func_configure "--disable-shared"
-func_check_static_shared "yes" "no"
-
-exit 0
diff --git a/tests/f77demo.at b/tests/f77demo.at
new file mode 100644
index 0000000..78da9a8
--- /dev/null
+++ b/tests/f77demo.at
@@ -0,0 +1,340 @@
+# f77demo.at -- Fortran 77 language support.           -*- Autotest -*-
+#
+#   Copyright (C) 2003, 2005-2006, 2011-2012 Free Software Foundation,
+#   Inc.
+#   Written by Eric Lindahl, 2002
+#   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([F77 language support.])
+
+
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[LT_AT_TAG([F77])
+AT_KEYWORDS([libtool])
+
+AT_DATA([configure.ac],
+[[AC_INIT([f77demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+
+AC_PROG_F77
+dnl When configuring for `make dist' purposes, skip checks that may yield fatal
+dnl errors when there is no working F77 compiler.
+if test -z "$with_dist"; then
+  dnl Check the flags needed to link f77 programs with ld (i.e. cc)
+  AC_F77_LIBRARY_LDFLAGS
+  dnl Check for underscoring of external names
+  AC_F77_WRAPPERS
+fi
+LT_INIT
+AC_SUBST([LIBTOOL_DEPS])
+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
+
+lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
+
+libfoo_la_SOURCES = foof.f
+libfoo_la_LDFLAGS = -no-undefined
+libfoo_la_LIBADD = libfoo2.la
+
+libfoo2_la_SOURCES = foof2.f
+libfoo2_la_LDFLAGS = -no-undefined
+
+libfoo3_la_SOURCES = foof3.f
+libfoo3_la_LDFLAGS = -no-undefined
+
+libmix_la_SOURCES = foof.f foof2.f fooc.c
+libmix_la_LDFLAGS = -no-undefined
+
+noinst_HEADERS = foo.h
+
+bin_PROGRAMS = fprogram cprogram
+
+fprogram_SOURCES = fprogram.f
+fprogram_LDADD = libfoo.la libfoo3.la
+
+cprogram_SOURCES = cprogram.c
+cprogram_LDADD = libmix.la $(FLIBS)
+
+libtool: $(LIBTOOL_DEPS)
+       $(SHELL) ./config.status --recheck
+]])
+
+AT_DATA([fprogram.f],
+[[      program fprogram
+      implicit none
+      integer*4 arg,res
+
+      write(*,*) 'Welcome to GNU libtool Fortran demo!'
+      write(*,*) 'Real programmers write in FORTRAN.'
+      arg=2
+
+      call fsub(arg,res)
+
+      write(*,*) 'fsub returned, saying that 2 *',arg,' =',res
+
+      if (res.eq.4) then
+         write(*,*) 'fsub is ok!'
+      endif
+
+      call fsub3(arg,res)
+
+      write(*,*) 'fsub3 returned, saying that 4 *',arg,' =',res
+
+      if (res.eq.8) then
+         write(*,*) 'fsub3 is ok!'
+      endif
+
+      stop
+      end
+]])
+
+AT_DATA([cprogram.c],
+[[#include <config.h>
+#include <stdio.h>
+
+#include "foo.h"
+
+int
+main ()
+{
+  int arg,cres,fres;
+
+  printf ("Welcome to GNU libtool mixed C/Fortran demo!\n");
+
+  arg=2;
+
+  cres=csub(arg);
+
+  printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres);
+
+  if(cres==2*arg)
+    printf ("The C subroutine is ok!\n");
+
+  printf("\nCalling the C wrapper routine...\n");
+  fres=fwrapper(arg);
+
+  printf ("The C wrapper to the fortran subroutine returned,\n"
+         "claiming that 2*%d = %d\n",arg,fres);
+
+  if(fres==2*arg)
+    printf ("The Fortran 77 subroutine is ok!\n");
+
+  return 0;
+}
+]])
+
+AT_DATA([foo.h],
+[[#ifndef _FOO_H_
+#define _FOO_H_ 1
+
+/* config.h is necessary for the fortran name mangling */
+#include <config.h>
+
+/* csub is an extremely useful subroutine that
+ * returns the argument multiplied by two :-)
+ */
+extern int csub(int);
+
+/* This routine performs the same action, but
+ * calls the fortran subroutine fsub to do the
+ * real work.
+ */
+extern int fwrapper(int);
+
+/* fsub does the same thing as csub, i.e. res=arg*2.
+ * Use autoconf macro for fortran function names.
+ * Note that fortran passes args by reference, so
+ * you need to provide pointers to your ints.
+ */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+void F77_FUNC(fsub,FSUB)(int *arg, int *res);
+
+#endif
+]])
+
+AT_DATA([fooc.c],
+[[#include <config.h>
+#include <stdio.h>
+
+#include "foo.h"
+
+int csub(int arg)
+{
+  return (2*arg);
+}
+
+
+int fwrapper(int arg)
+{
+  int res;
+  printf("Calling the Fortran 77 subroutine from the C wrapper...\n");
+  F77_FUNC(fsub,FSUB)(&arg,&res);
+  printf("Returned from the Fortran 77 subroutine...\n");
+  return res;
+}
+]])
+
+AT_DATA([foof.f],
+[[      subroutine fsub(arg,res)
+      write(*,*) 'fsub called'
+      call fsubf(arg,res)
+      return
+      end
+]])
+
+AT_DATA([foof2.f],
+[[      subroutine fsubf(arg,res)
+      implicit none
+      integer*4 arg,res
+      write(*,*) 'fsubf called'
+      res=arg*2
+      return
+      end
+]])
+
+AT_DATA([foof3.f],
+[[      subroutine fsub3(arg,res)
+      implicit none
+      integer*4 arg,res
+      write(*,*) 'fsub3 called'
+      res=arg*4
+      return
+      end
+]])
+
+LT_AT_AUTOHEADER
+]) # _LT_SETUP
+
+
+# _LT_CHECK_EXECUTE
+# -----------------
+# Run the default make rule, and check that the built binaries work.
+m4_define([_LT_CHECK_EXECUTE],
+[LT_AT_MAKE
+
+# Oddly, the output of dynamically linked fprogram differs depending
+# on whether it is redirected to a file or sent to stdout, so we
+# just check return status, and ignore output.
+# Advice on this weirdness from a Fortran user much appreciated!
+AT_DATA([expout],
+[[ Welcome to GNU libtool Fortran demo!
+ Real programmers write in FORTRAN.
+ fsub called
+ fsubf called
+ fsub returned, saying that 2 *           2  =           4
+ fsub is ok!
+ fsub3 called
+ fsub3 returned, saying that 4 *           2  =           8
+ fsub3 is ok!
+]])
+LT_AT_EXEC_CHECK([./fprogram], 0, [ignore])
+
+AT_DATA([expout],
+[[Welcome to GNU libtool mixed C/Fortran demo!
+The C subroutine returned, claiming that 2*2 = 4
+The C subroutine is ok!
+
+Calling the C wrapper routine...
+Calling the Fortran 77 subroutine from the C wrapper...
+ fsub called
+ fsubf called
+Returned from the Fortran 77 subroutine...
+The C wrapper to the fortran subroutine returned,
+claiming that 2*2 = 4
+The Fortran 77 subroutine is ok!
+]])
+LT_AT_EXEC_CHECK([./cprogram], 0, [expout])
+])
+
+
+## --------------- ##
+## F77demo static. ##
+## --------------- ##
+
+AT_SETUP([static library])
+
+# Executing the static fprogram might be interactive on MSYS.
+AT_KEYWORDS([interactive])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-shared],
+                   [^build_old_libs=yes], [^build_libtool_libs=no])
+
+AT_DATA([expout],
+[[ Welcome to GNU libtool Fortran demo!
+ Real programmers write in FORTRAN.
+ fsub called
+ fsubf called
+ fsub returned, saying that 2 *           2  =           4
+ fsub is ok!
+ fsub3 called
+ fsub3 returned, saying that 4 *           2  =           8
+ fsub3 is ok!
+]])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
+
+
+## --------------- ##
+## F77demo shared. ##
+## --------------- ##
+
+AT_SETUP([shared library])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-static],
+                   [^build_old_libs=no], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
+
+
+## ------------- ##
+## F77demo conf. ##
+## ------------- ##
+
+AT_SETUP([shared and static together])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([],
+                   [^build_old_libs=yes], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
diff --git a/tests/f77demo/.gitignore b/tests/f77demo/.gitignore
deleted file mode 100644
index 05d41fa..0000000
--- a/tests/f77demo/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/cprogram
-/fprogram
diff --git a/tests/f77demo/Makefile.am b/tests/f77demo/Makefile.am
deleted file mode 100644
index 83e5db6..0000000
--- a/tests/f77demo/Makefile.am
+++ /dev/null
@@ -1,65 +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)/../..
-
-lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
-
-libfoo_la_SOURCES = foof.f
-libfoo_la_LDFLAGS = -no-undefined
-libfoo_la_LIBADD = libfoo2.la
-
-libfoo2_la_SOURCES = foof2.f
-libfoo2_la_LDFLAGS = -no-undefined
-
-libfoo3_la_SOURCES = foof3.f
-libfoo3_la_LDFLAGS = -no-undefined
-
-libmix_la_SOURCES = foof.f foof2.f fooc.c
-libmix_la_LDFLAGS = -no-undefined
-
-noinst_HEADERS = foo.h
-
-bin_PROGRAMS = fprogram cprogram
-
-fprogram_SOURCES = fprogram.f
-fprogram_LDADD = libfoo.la libfoo3.la
-
-cprogram_SOURCES = cprogram.c
-cprogram_LDADD = libmix.la $(FLIBS)
-
-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/f77demo/README b/tests/f77demo/README
deleted file mode 100644
index e23e69b..0000000
--- a/tests/f77demo/README
+++ /dev/null
@@ -1,12 +0,0 @@
-This is a short demo of the fortran support in libtool.
-
-fprogram is a pure-fortran program which is linked
-against the fortran-only library libfoo.la
-
-cprogram is a C program, which is linked against the
-mixed C and fortran library libmix.la. The program
-calls a C function, which in turn calls a fortran
-function.
-
-This demo requires GNU autoconf, automake,
-libtool with the F77 tag and quite obvious Fortran 77.
diff --git a/tests/f77demo/configure.ac b/tests/f77demo/configure.ac
deleted file mode 100644
index 9ff3858..0000000
--- a/tests/f77demo/configure.ac
+++ /dev/null
@@ -1,71 +0,0 @@
-# Process this file with autoconf to create configure. -*- autoconf -*-
-#
-#   Copyright (C) 2001, 2003, 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([f77demo], [1.0], address@hidden)
-AC_CONFIG_HEADERS([config.h:config-h.in])
-AC_CONFIG_SRCDIR([foof.f])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-AC_ARG_WITH([dist], AS_HELP_STRING([--with-dist],
-                                  [ignore errors not affecting `make dist']))
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ------------------ ##
-## C compiler checks. ##
-## ------------------ ##
-AC_PROG_CC
-
-## ------------------------ ##
-## Fortran compiler checks. ##
-## ------------------------ ##
-AC_PROG_F77
-dnl When configuring for `make dist' purposes, skip checks that may yield fatal
-dnl errors when there is no working F77 compiler.
-if test -z "$with_dist"; then
-  dnl Check the flags needed to link f77 programs with ld (i.e. cc)
-  AC_F77_LIBRARY_LDFLAGS
-  dnl Check for underscoring of external names
-  AC_F77_WRAPPERS
-fi
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-LT_INIT
-AC_SUBST([LIBTOOL_DEPS])
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/f77demo/cprogram.c b/tests/f77demo/cprogram.c
deleted file mode 100644
index 1089e8c..0000000
--- a/tests/f77demo/cprogram.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* cprogram.c
-
-   Copyright (C) 2002, 2005, 2006 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>
-
-int
-main ()
-{
-  int arg,cres,fres;
-
-  printf ("Welcome to GNU libtool mixed C/Fortran demo!\n");
-
-  arg=2;
-
-  cres=csub(arg);
-
-  printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres);
-
-  if(cres==2*arg)
-    printf ("The C subroutine is ok!\n");
-
-  printf("\nCalling the C wrapper routine...\n");
-  fres=fwrapper(arg);
-
-  printf ("The C wrapper to the fortran subroutine returned,\n"
-         "claiming that 2*%d = %d\n",arg,fres);
-
-  if(fres==2*arg)
-    printf ("The Fortran 77 subroutine is ok!\n");
-
-  return 0;
-}
diff --git a/tests/f77demo/foo.h b/tests/f77demo/foo.h
deleted file mode 100644
index 88934fc..0000000
--- a/tests/f77demo/foo.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* foo.h -- interface to fortran and C libraries
-
-   Copyright (C) 1998-1999, 2006 Free Software Foundation, Inc.
-   Written by Eric Lindahl, 2002
-
-   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.
-*/
-
-#ifndef _FOO_H_
-#define _FOO_H_ 1
-
-/* config.h is necessary for the fortran name mangling */
-#include <config.h>
-
-/* csub is an extremely useful subroutine that
- * returns the argument multiplied by two :-)
- */
-extern int csub(int);
-
-/* This routine performs the same action, but
- * calls the fortran subroutine fsub to do the
- * real work.
- */
-extern int fwrapper(int);
-
-/* fsub does the same thing as csub, i.e. res=arg*2.
- * Use autoconf macro for fortran function names.
- * Note that fortran passes args by reference, so
- * you need to provide pointers to your ints.
- */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-void F77_FUNC(fsub,FSUB)(int *arg, int *res);
-
-#endif
diff --git a/tests/f77demo/fooc.c b/tests/f77demo/fooc.c
deleted file mode 100644
index 3dca0ed..0000000
--- a/tests/f77demo/fooc.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* fooc.c
-
-   Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
-   Written by Eric Lindahl, 2002
-
-   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 csub(int arg)
-{
-  return (2*arg);
-}
-
-
-int fwrapper(int arg)
-{
-  int res;
-  printf("Calling the Fortran 77 subroutine from the C wrapper...\n");
-  F77_FUNC(fsub,FSUB)(&arg,&res);
-  printf("Returned from the Fortran 77 subroutine...\n");
-  return res;
-}
diff --git a/tests/f77demo/foof.f b/tests/f77demo/foof.f
deleted file mode 100644
index 6f6c6f6..0000000
--- a/tests/f77demo/foof.f
+++ /dev/null
@@ -1,10 +0,0 @@
-C This program is free software; you can redistribute it and/or
-C modify it under the terms of the GNU General Public License
-C as published by the Free Software Foundation; either version 2
-C of the License, or (at your option) any later version.
-
-      subroutine fsub(arg,res)
-      write(*,*) 'fsub called'
-      call fsubf(arg,res)
-      return
-      end
diff --git a/tests/f77demo/foof2.f b/tests/f77demo/foof2.f
deleted file mode 100644
index f7e2fe4..0000000
--- a/tests/f77demo/foof2.f
+++ /dev/null
@@ -1,12 +0,0 @@
-C This program is free software; you can redistribute it and/or
-C modify it under the terms of the GNU General Public License
-C as published by the Free Software Foundation; either version 2
-C of the License, or (at your option) any later version.
-
-      subroutine fsubf(arg,res)
-      implicit none
-      integer*4 arg,res
-      write(*,*) 'fsubf called'
-      res=arg*2
-      return
-      end
diff --git a/tests/f77demo/foof3.f b/tests/f77demo/foof3.f
deleted file mode 100644
index 8b7307f..0000000
--- a/tests/f77demo/foof3.f
+++ /dev/null
@@ -1,12 +0,0 @@
-C This program is free software; you can redistribute it and/or
-C modify it under the terms of the GNU General Public License
-C as published by the Free Software Foundation; either version 2
-C of the License, or (at your option) any later version.
-
-      subroutine fsub3(arg,res)
-      implicit none
-      integer*4 arg,res
-      write(*,*) 'fsub3 called'
-      res=arg*4
-      return
-      end
diff --git a/tests/f77demo/fprogram.f b/tests/f77demo/fprogram.f
deleted file mode 100644
index 6fcdb75..0000000
--- a/tests/f77demo/fprogram.f
+++ /dev/null
@@ -1,31 +0,0 @@
-C This program is free software; you can redistribute it and/or
-C modify it under the terms of the GNU General Public License
-C as published by the Free Software Foundation; either version 2
-C of the License, or (at your option) any later version.
-
-      program fprogram
-      implicit none
-      integer*4 arg,res
-
-      write(*,*) 'Welcome to GNU libtool Fortran demo!'
-      write(*,*) 'Real programmers write in FORTRAN.'
-      arg=2
-
-      call fsub(arg,res)
-
-      write(*,*) 'fsub returned, saying that 2 *',arg,' =',res
-
-      if (res.eq.4) then
-         write(*,*) 'fsub is ok!'
-      endif
-
-      call fsub3(arg,res)
-
-      write(*,*) 'fsub3 returned, saying that 4 *',arg,' =',res
-
-      if (res.eq.8) then
-         write(*,*) 'fsub3 is ok!'
-      endif
-
-      stop
-      end
diff --git a/tests/fcdemo-conf.test b/tests/fcdemo-conf.test
deleted file mode 100755
index 028b53e..0000000
--- a/tests/fcdemo-conf.test
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# fcdemo-conf.test - try configuring the fcdemo subdirectory
-#
-#   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_mkprefixdir
-func_cd "tests/fcdemo"
-func_make_distclean
-# We do not want to fail if all we got was a Fortran 77 compiler.
-func_configure_nofail
-if test "$conf_status" -eq "$EXIT_FAILURE"; then
-  case `echo $FC | $SED "$basename"` in
-    g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | 
af77*)
-       func_skip "The FC fortran tests do not work with Fortran 77 compilers" 
;;
-    *) exit $EXIT_FAILURE
-  esac
-fi
-func_check_static_shared "yes" "yes"
-
-exit 0
diff --git a/tests/fcdemo-exec.test b/tests/fcdemo-exec.test
deleted file mode 100755
index 3ee57a8..0000000
--- a/tests/fcdemo-exec.test
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# fcdemo-exec.test - check that programs in the fcdemo 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 "fcdemo-make" "tests/fcdemo/fprogram$EXEEXT" 
"tests/fcdemo/cprogram$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/fcdemo/fprogram$EXEEXT"
-func_exec "tests/fcdemo/cprogram$EXEEXT"
-
-exit $exec_status
diff --git a/tests/fcdemo-make.test b/tests/fcdemo-make.test
deleted file mode 100755
index 3de3a58..0000000
--- a/tests/fcdemo-make.test
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# fcdemo-make.test - try building in the fcdemo subdirectory
-#
-#   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 "fcdemo-conf" "tests/fcdemo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/fcdemo"
-# May fail make on some platforms, simply "skip" in that case
-#func_make
-eval $MAKE || func_skip "The improved fortran tests catch a known failure mode"
-
-exit 0
diff --git a/tests/fcdemo-shared-exec.test b/tests/fcdemo-shared-exec.test
deleted file mode 100755
index 84b20a0..0000000
--- a/tests/fcdemo-shared-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/fcdemo-exec.test
diff --git a/tests/fcdemo-shared-make.test b/tests/fcdemo-shared-make.test
deleted file mode 100755
index 3c20e3f..0000000
--- a/tests/fcdemo-shared-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/fcdemo-make.test
diff --git a/tests/fcdemo-shared.test b/tests/fcdemo-shared.test
deleted file mode 100755
index 76fb694..0000000
--- a/tests/fcdemo-shared.test
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# fcdemo-shared.test - try configuring the fcdemo subdirectory for shared libs
-#
-#   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_mkprefixdir
-func_cd "tests/fcdemo"
-func_make_distclean
-# We do not want to fail if all we got was a Fortran 77 compiler.
-func_configure_nofail "--disable-static"
-if test "$conf_status" -eq "$EXIT_FAILURE"; then
-  case `echo $FC | $SED "$basename"` in
-    g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | 
af77*)
-       func_skip "The FC fortran tests do not work with Fortran 77 compilers" 
;;
-    *) exit $EXIT_FAILURE
-  esac
-fi
-func_check_static_shared "no" "yes"
-
-exit 0
diff --git a/tests/fcdemo-static-exec.test b/tests/fcdemo-static-exec.test
deleted file mode 100755
index 84b20a0..0000000
--- a/tests/fcdemo-static-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/fcdemo-exec.test
diff --git a/tests/fcdemo-static-make.test b/tests/fcdemo-static-make.test
deleted file mode 100755
index 3c20e3f..0000000
--- a/tests/fcdemo-static-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/fcdemo-make.test
diff --git a/tests/fcdemo-static.test b/tests/fcdemo-static.test
deleted file mode 100755
index 2e27020..0000000
--- a/tests/fcdemo-static.test
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# fcdemo-static.test - try configuring the fcdemo subdirectory for static libs
-#
-#   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_mkprefixdir
-func_cd "tests/fcdemo"
-func_make_distclean
-# We do not want to fail if all we got was a Fortran 77 compiler.
-func_configure_nofail "--disable-shared"
-if test "$conf_status" -eq "$EXIT_FAILURE"; then
-  case `echo $FC | $SED "$basename"` in
-    g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | 
af77*)
-       func_skip "The FC fortran tests do not work with Fortran 77 compilers" 
;;
-    *) exit $EXIT_FAILURE
-  esac
-fi
-func_check_static_shared "yes" "no"
-
-exit 0
diff --git a/tests/fcdemo.at b/tests/fcdemo.at
new file mode 100644
index 0000000..3a545eb
--- /dev/null
+++ b/tests/fcdemo.at
@@ -0,0 +1,342 @@
+# fcdemo.at -- Fortran 90/95 language support.         -*- Autotest -*-
+#
+#   Copyright (C) 2003, 2005-2006, 2011-2012 Free Software Foundation,
+#   Inc.
+#   Written by Eric Lindahl, 2002
+#   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([Fortran language support.])
+
+
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[LT_AT_TAG([FC])
+AT_KEYWORDS([libtool])
+
+AT_DATA([configure.ac],
+[[AC_INIT([fcdemo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+
+AC_LANG_PUSH([Fortran])
+AC_PROG_FC
+dnl Check the flags needed to link fc programs with ld (i.e. cc)
+AC_FC_LIBRARY_LDFLAGS
+dnl Check for underscoring of external names
+AC_FC_WRAPPERS
+dnl We need to use .f90 and not .f to enable Automake FC support
+dnl Some Intel ifc/ifort do not understand .f95.  :-/
+AC_FC_SRCEXT([f90])
+dnl Yes, we want free-form Fortran!
+AC_FC_FREEFORM
+AC_LANG_POP
+
+LT_INIT
+AC_SUBST([LIBTOOL_DEPS])
+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
+
+lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
+
+libfoo_la_SOURCES = foof.f90
+libfoo_la_LDFLAGS = -no-undefined
+libfoo_la_LIBADD = libfoo2.la
+
+libfoo2_la_SOURCES = foof2.f90
+libfoo2_la_LDFLAGS = -no-undefined
+
+libfoo3_la_SOURCES = foof3.f90
+libfoo3_la_LDFLAGS = -no-undefined
+
+libmix_la_SOURCES = foof.f90 foof2.f90 fooc.c
+libmix_la_LDFLAGS = -no-undefined
+
+noinst_HEADERS = foo.h
+
+bin_PROGRAMS = fprogram cprogram
+
+fprogram_SOURCES = fprogram.f90
+fprogram_LDADD = libfoo.la libfoo3.la
+
+cprogram_SOURCES = cprogram.c
+cprogram_LDADD = libmix.la $(FCLIBS)
+
+libtool: $(LIBTOOL_DEPS)
+       $(SHELL) ./config.status --recheck
+
+# Work around Automake bug, where FCFLAGS_f90 is not provided:
+.f90.o:
+       $(FCCOMPILE) -c -o @S|@@ $(FCFLAGS_f90) $<
+
+.f90.obj:
+       $(FCCOMPILE) -c -o @S|@@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
+
+.f90.lo:
+       $(LTFCCOMPILE) -c -o @S|@@ $(FCFLAGS_f90) $<
+]])
+
+AT_DATA([fprogram.f90],
+[[program fprogram
+  implicit none
+  integer arg,res
+
+  write(*,*) 'Welcome to GNU libtool Fortran demo!'
+  write(*,*) 'Real programmers write in FORTRAN.'
+  arg=2
+
+  call fsub(arg,res)
+
+  write(*,*) 'fsub returned, saying that 2 *',arg,' =',res
+
+  if (res.eq.4) then
+     write(*,*) 'fsub is ok!'
+  endif
+
+  call fsub3(arg,res)
+
+  write(*,*) 'fsub3 returned, saying that 4 *',arg,' =',res
+
+  if (res.eq.8) then
+     write(*,*) 'fsub3 is ok!'
+  endif
+
+  stop
+end
+]])
+
+AT_DATA([cprogram.c],
+[[#include <config.h>
+#include <stdio.h>
+
+#include "foo.h"
+
+int
+main ()
+{
+  int arg,cres,fres;
+
+  printf ("Welcome to GNU libtool mixed C/Fortran demo!\n");
+
+  arg=2;
+
+  cres=csub (arg);
+
+  printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres);
+
+  if (cres == 2*arg)
+    printf ("The C subroutine is ok!\n");
+
+  printf ("\nCalling the C wrapper routine...\n");
+  fres = fwrapper (arg);
+
+  printf ("The C wrapper to the fortran subroutine returned,\n"
+         "claiming that 2*%d = %d\n",arg,fres);
+
+  if (fres == 2*arg)
+    printf ("The Fortran subroutine is ok!\n");
+
+  return 0;
+}
+]])
+
+AT_DATA([foo.h],
+[[#ifndef _FOO_H_
+#define _FOO_H_ 1
+
+/* config.h is necessary for the fortran name mangling */
+#include <config.h>
+
+/* csub is an extremely useful subroutine that
+ * returns the argument multiplied by two :-)
+ */
+extern int csub(int);
+
+/* This routine performs the same action, but
+ * calls the fortran subroutine fsub to do the
+ * real work.
+ */
+extern int fwrapper(int);
+
+/* fsub does the same thing as csub, i.e. res=arg*2.
+ * Use autoconf macro for fortran function names.
+ * Note that fortran passes args by reference, so
+ * you need to provide pointers to your ints.
+ */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+void FC_FUNC(fsub,FSUB)(int *arg, int *res);
+
+#endif
+]])
+
+AT_DATA([fooc.c],
+[[#include <config.h>
+#include <stdio.h>
+
+#include "foo.h"
+
+int csub(int arg)
+{
+  return (2*arg);
+}
+
+
+int fwrapper(int arg)
+{
+  int res;
+  printf("Calling the Fortran subroutine from the C wrapper...\n");
+  FC_FUNC(fsub,FSUB)(&arg,&res);
+  printf("Returned from the Fortran subroutine...\n");
+  return res;
+}
+]])
+
+AT_DATA([foof.f90],
+[[subroutine fsub(arg,res)
+  write(*,*) 'fsub called'
+  call fsubf(arg,res)
+  return
+end
+]])
+
+AT_DATA([foof2.f90],
+[[subroutine fsubf(arg,res)
+  implicit none
+  integer arg,res
+  write(*,*) 'fsubf called'
+  res=arg*2
+  return
+end
+]])
+
+AT_DATA([foof3.f90],
+[[subroutine fsub3(arg,res)
+  implicit none
+  integer arg,res
+  write(*,*) 'fsub3 called'
+  res=arg*4
+  return
+end
+]])
+
+LT_AT_AUTOHEADER
+]) # _LT_SETUP
+
+
+# _LT_CHECK_EXECUTE
+# -----------------
+# Run the default make rule, and check that the built binaries work.
+m4_define([_LT_CHECK_EXECUTE],
+[LT_AT_MAKE
+
+# Oddly, the output of dynamically linked fprogram differs depending
+# on whether it is redirected to a file or sent to stdout, so we
+# just check return status, and ignore output.
+# Advice on this weirdness from a Fortran user much appreciated!
+AT_DATA([expout],
+[[ Welcome to GNU libtool Fortran demo!
+ Real programmers write in FORTRAN.
+ fsub called
+ fsubf called
+ fsub returned, saying that 2 *           2  =           4
+ fsub is ok!
+ fsub3 called
+ fsub3 returned, saying that 4 *           2  =           8
+ fsub3 is ok!
+]])
+LT_AT_EXEC_CHECK([./fprogram], 0, [ignore])
+
+AT_DATA([expout],
+[[Welcome to GNU libtool mixed C/Fortran demo!
+The C subroutine returned, claiming that 2*2 = 4
+The C subroutine is ok!
+
+Calling the C wrapper routine...
+Calling the Fortran subroutine from the C wrapper...
+ fsub called
+ fsubf called
+Returned from the Fortran subroutine...
+The C wrapper to the fortran subroutine returned,
+claiming that 2*2 = 4
+The Fortran subroutine is ok!
+]])
+LT_AT_EXEC_CHECK([./cprogram], 0, [expout])
+])
+
+
+## -------------- ##
+## Fcdemo static. ##
+## -------------- ##
+
+AT_SETUP([static library])
+
+# Executing the static fprogram might be interactive on MSYS.
+AT_KEYWORDS([interactive])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-shared],
+                   [^build_old_libs=yes], [^build_libtool_libs=no])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
+
+
+## -------------- ##
+## Fcdemo shared. ##
+## -------------- ##
+
+AT_SETUP([shared library])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-static],
+                   [^build_old_libs=no], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
+
+
+## ------------ ##
+## Fcdemo conf. ##
+## ------------ ##
+
+AT_SETUP([shared and static together])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([],
+                   [^build_old_libs=yes], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+
+AT_CLEANUP
diff --git a/tests/fcdemo/.gitignore b/tests/fcdemo/.gitignore
deleted file mode 100644
index 05d41fa..0000000
--- a/tests/fcdemo/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/cprogram
-/fprogram
diff --git a/tests/fcdemo/Makefile.am b/tests/fcdemo/Makefile.am
deleted file mode 100644
index f494e9f..0000000
--- a/tests/fcdemo/Makefile.am
+++ /dev/null
@@ -1,75 +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)/../..
-
-lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
-
-libfoo_la_SOURCES = foof.f90
-libfoo_la_LDFLAGS = -no-undefined
-libfoo_la_LIBADD = libfoo2.la
-
-libfoo2_la_SOURCES = foof2.f90
-libfoo2_la_LDFLAGS = -no-undefined
-
-libfoo3_la_SOURCES = foof3.f90
-libfoo3_la_LDFLAGS = -no-undefined
-
-libmix_la_SOURCES = foof.f90 foof2.f90 fooc.c
-libmix_la_LDFLAGS = -no-undefined
-
-noinst_HEADERS = foo.h
-
-bin_PROGRAMS = fprogram cprogram
-
-fprogram_SOURCES = fprogram.f90
-fprogram_LDADD = libfoo.la libfoo3.la
-
-cprogram_SOURCES = cprogram.c
-cprogram_LDADD = libmix.la $(FCLIBS)
-
-libtool: $(LIBTOOL_DEPS)
-       $(SHELL) ./config.status --recheck
-
-# work around Automake bug not providing FCFLAGS_f90:
-.f90.o:
-       $(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
-
-.f90.obj:
-       $(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
-
-.f90.lo:
-       $(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
-
-# 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/fcdemo/README b/tests/fcdemo/README
deleted file mode 100644
index c18cc97..0000000
--- a/tests/fcdemo/README
+++ /dev/null
@@ -1,12 +0,0 @@
-This is a short demo of the fortran support in libtool.
-
-fprogram is a pure-fortran program which is linked
-against the fortran-only library libfoo.la
-
-cprogram is a C program, which is linked against the
-mixed C and fortran library libmix.la. The program
-calls a C function, which in turn calls a fortran
-function.
-
-This demo requires GNU autoconf, automake,
-libtool with the FC tag and quite obvious Fortran.
diff --git a/tests/fcdemo/configure.ac b/tests/fcdemo/configure.ac
deleted file mode 100644
index 0092e08..0000000
--- a/tests/fcdemo/configure.ac
+++ /dev/null
@@ -1,78 +0,0 @@
-# Process this file with autoconf to create configure. -*- autoconf -*-
-#
-#   Copyright (C) 2001, 2003, 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([fcdemo], [1.0], address@hidden)
-AC_CONFIG_HEADERS([config.h:config-h.in])
-AC_CONFIG_SRCDIR([foof.f90])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-AC_ARG_WITH([dist], AS_HELP_STRING([--with-dist],
-                                  [ignore errors not affecting `make dist']))
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ------------------ ##
-## C compiler checks. ##
-## ------------------ ##
-AC_PROG_CC
-
-## ------------------------ ##
-## Fortran compiler checks. ##
-## ------------------------ ##
-AC_LANG_PUSH([Fortran])
-AC_PROG_FC
-dnl When configuring for `make dist' purposes, skip checks that may yield fatal
-dnl errors when there is no working F90 compiler.
-if test -z "$with_dist"; then
-  dnl Check the flags needed to link fc programs with ld (i.e. cc)
-  AC_FC_LIBRARY_LDFLAGS
-  dnl Check for underscoring of external names
-  AC_FC_WRAPPERS
-  dnl We need to use .f90 and not .f to enable Automake FC support
-  dnl Some Intel ifc/ifort do not understand .f95.  :-/
-  AC_FC_SRCEXT([f90])
-  dnl Yes, we want free form Fortran!
-  AC_FC_FREEFORM
-fi
-AC_LANG_POP
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-LT_INIT
-AC_SUBST([LIBTOOL_DEPS])
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/fcdemo/cprogram.c b/tests/fcdemo/cprogram.c
deleted file mode 100644
index e7818e0..0000000
--- a/tests/fcdemo/cprogram.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* cprogram.c
-
-   Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
-   Written by Ralf Wildenhues, 2002
-
-   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 arg,cres,fres;
-
-  printf ("Welcome to GNU libtool mixed C/Fortran demo!\n");
-
-  arg = 2;
-
-  cres = csub (arg);
-
-  printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres);
-
-  if (cres == 2*arg)
-    printf ("The C subroutine is ok!\n");
-
-  printf ("\nCalling the C wrapper routine...\n");
-  fres = fwrapper (arg);
-
-  printf ("The C wrapper to the fortran subroutine returned,\n"
-         "claiming that 2*%d = %d\n",arg,fres);
-
-  if (fres == 2*arg)
-    printf ("The Fortran subroutine is ok!\n");
-
-  return 0;
-}
diff --git a/tests/fcdemo/foo.h b/tests/fcdemo/foo.h
deleted file mode 100644
index 09f0dce..0000000
--- a/tests/fcdemo/foo.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* foo.h -- interface to fortran and C libraries
-
-   Copyright (C) 1998-1999, 2005 Free Software Foundation, Inc.
-   Written by Eric Lindahl, 2002
-
-   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.
-*/
-
-#ifndef _FOO_H_
-#define _FOO_H_ 1
-
-/* config.h is necessary for the fortran name mangling */
-#include <config.h>
-
-/* csub is an extremely useful subroutine that
- * returns the argument multiplied by two :-)
- */
-extern int csub(int);
-
-/* This routine performs the same action, but
- * calls the fortran subroutine fsub to do the
- * real work.
- */
-extern int fwrapper(int);
-
-/* fsub does the same thing as csub, i.e. res=arg*2.
- * Use autoconf macro for fortran function names.
- * Note that fortran passes args by reference, so
- * you need to provide pointers to your ints.
- */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-void FC_FUNC(fsub,FSUB)(int *arg, int *res);
-
-
-#endif
diff --git a/tests/fcdemo/fooc.c b/tests/fcdemo/fooc.c
deleted file mode 100644
index 68968ea..0000000
--- a/tests/fcdemo/fooc.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* fooc.c
-
-   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
-   Written by Ralf Wildenhues, 2005
-
-   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 csub (int arg)
-{
-  return 2*arg;
-}
-
-
-int fwrapper (int arg)
-{
-  int res;
-  printf("Calling the Fortran subroutine from the C wrapper...\n");
-  FC_FUNC(fsub,FSUB)(&arg,&res);
-  printf("Returned from the Fortran subroutine...\n");
-  return res;
-}
diff --git a/tests/fcdemo/foof.f90 b/tests/fcdemo/foof.f90
deleted file mode 100644
index 7877f21..0000000
--- a/tests/fcdemo/foof.f90
+++ /dev/null
@@ -1,10 +0,0 @@
-! This program is free software; you can redistribute it and/or
-! modify it under the terms of the GNU General Public License
-! as published by the Free Software Foundation; either version 2
-! of the License, or (at your option) any later version.
-
-subroutine fsub(arg,res)
-  write(*,*) 'fsub called'
-  call fsubf(arg,res)
-  return
-end
diff --git a/tests/fcdemo/foof2.f90 b/tests/fcdemo/foof2.f90
deleted file mode 100644
index 9917ee7..0000000
--- a/tests/fcdemo/foof2.f90
+++ /dev/null
@@ -1,12 +0,0 @@
-! This program is free software; you can redistribute it and/or
-! modify it under the terms of the GNU General Public License
-! as published by the Free Software Foundation; either version 2
-! of the License, or (at your option) any later version.
-
-subroutine fsubf(arg,res)
-  implicit none
-  integer arg,res
-  write(*,*) 'fsubf called'
-  res=arg*2
-  return
-end
diff --git a/tests/fcdemo/foof3.f90 b/tests/fcdemo/foof3.f90
deleted file mode 100644
index 5de3c84..0000000
--- a/tests/fcdemo/foof3.f90
+++ /dev/null
@@ -1,12 +0,0 @@
-! This program is free software; you can redistribute it and/or
-! modify it under the terms of the GNU General Public License
-! as published by the Free Software Foundation; either version 2
-! of the License, or (at your option) any later version.
-
-subroutine fsub3(arg,res)
-  implicit none
-  integer arg,res
-  write(*,*) 'fsub3 called'
-  res=arg*4
-  return
-end
diff --git a/tests/fcdemo/fprogram.f90 b/tests/fcdemo/fprogram.f90
deleted file mode 100644
index 4fa1500..0000000
--- a/tests/fcdemo/fprogram.f90
+++ /dev/null
@@ -1,31 +0,0 @@
-! This program is free software; you can redistribute it and/or
-! modify it under the terms of the GNU General Public License
-! as published by the Free Software Foundation; either version 2
-! of the License, or (at your option) any later version.
-
-program fprogram
-  implicit none
-  integer arg,res
-
-  write(*,*) 'Welcome to GNU libtool Fortran demo!'
-  write(*,*) 'Real programmers write in FORTRAN.'
-  arg=2
-
-  call fsub(arg,res)
-
-  write(*,*) 'fsub returned, saying that 2 *',arg,' =',res
-
-  if (res.eq.4) then
-     write(*,*) 'fsub is ok!'
-  endif
-
-  call fsub3(arg,res)
-
-  write(*,*) 'fsub3 returned, saying that 4 *',arg,' =',res
-
-  if (res.eq.8) then
-     write(*,*) 'fsub3 is ok!'
-  endif
-
-  stop
-end
diff --git a/tests/libtool.at b/tests/libtool.at
new file mode 100755
index 0000000..fafec37
--- /dev/null
+++ b/tests/libtool.at
@@ -0,0 +1,226 @@
+# libtool.at -- basic libtool operation tests -*- Autotest -*-
+#
+#   Copyright (C) 2003-2005, 2008, 2011-2012 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([Basic libtool operation.])
+
+
+## ------------------ ##
+## Check help output. ##
+## ------------------ ##
+
+AT_SETUP([check help output])
+
+AT_CHECK([$LIBTOOL --help], [0], [stdout], [stderr])
+AT_CHECK([grep '^Usage:' stdout stderr], [0], [ignore])
+
+AT_CHECK([$LIBTOOL --mode=link --help], [0], [stdout], [stderr])
+AT_CHECK([grep '^Usage:' stdout stderr], [0], [ignore])
+
+AT_CLEANUP
+
+
+## ------------------- ##
+## No mode diagnostic. ##
+## ------------------- ##
+
+AT_SETUP([diagnose no mode specified])
+
+AT_CHECK([$LIBTOOL], [1], [ignore], [stderr])
+AT_CHECK([grep 'you must specify a MODE' stderr], [0], [ignore])
+
+AT_CLEANUP
+
+
+## ----------------------------------- ##
+## Shell meta-characters in filenames. ##
+## ----------------------------------- ##
+
+AT_SETUP([quote shell meta-characters in filenames])
+
+eval `$LIBTOOL --config | grep '^wl='`
+
+# Do the torture test.
+for mode in compile link install; do
+
+  # Unfortunately, without an array data type, it is nearly impossible
+  # to protect libtool from metacharacters in filenames.  So, we just
+  # try metacharacters in the options it needs to pass to other programs.
+
+  # preargs and postargs need to go through libtool unmodified.
+  case $mode in
+  compile)
+    preargs="$CC -c"
+    preflag=
+    match_preflag=
+    flag=-DVAR=
+    postargs=foo.c
+    ;;
+
+  link)
+    preargs="$CC -o hell -g -O"
+    preflag=-Wl,
+    match_preflag=$wl
+    flag=-someflag=
+    postargs=foo.o
+    ;;
+
+  install)
+    preargs="install -c"
+    preflag=
+    match_preflag=
+    flag=--something=
+    postargs="hell /usr/local/bin/hell"
+    ;;
+  esac
+
+  # Trivial.
+  LT_AT_CHECK([$LIBTOOL -n --mode=$mode $preargs $preflag"$flag:test" 
$postargs],
+          [0], [stdout])
+  # We must not attempt to match $preargs in the output, because libtool
+  # may modify them.  For example, on Cygwin, ``libtool --mode=link gcc -o
+  # foo foo.o''  becomes ``gcc -o foo.exe foo.o''.
+  LT_AT_CHECK([$EGREP "$mode:.*$match_preflag$flag:test " stdout], [0], 
[ignore])
+
+  # Metacharacters that should be backslashified.
+  for mchar in \" \` \$ \\; do
+    LT_AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag"$flag$mchar:test$mchar" $postargs],
+            [0], [stdout])
+    LT_AT_CHECK([$EGREP 
"$mode:.*$match_preflag\"?$flag\\\\\\$mchar:test\\\\\\$mchar\"? " stdout], [0], 
[ignore])
+  done
+
+  # Metacharacters that should be double quoted, and need escaping for grep
+  for mchar in "@<:@" "@:>@" "^" "*"; do
+
+    LT_AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag"$flag$mchar:test$mchar" $postargs],
+            [0], [stdout])
+    LT_AT_CHECK([grep "$mode:.*$match_preflag\"$flag\\$mchar:test\\$mchar\" " 
stdout], [0], [ignore])
+  done
+
+  # Metacharacters that should be double quoted, that are not special to grep.
+  for mchar in "~" "#" "&" "(" ")" "{" "}" "|" ";" "<" ">" "?" "'" " " "       
"; do
+
+    LT_AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag"$flag$mchar:test$mchar" $postargs],
+            [0], [stdout])
+    LT_AT_CHECK([grep "$mode:.*$match_preflag\"$flag$mchar:test$mchar\" " 
stdout], [0], [ignore])
+  done
+done
+
+AT_CLEANUP
+
+
+## -------------------------- ##
+## Transform source suffices. ##
+## -------------------------- ##
+
+AT_SETUP([transform source suffices])
+
+# Extensions taken from the ones that Automake recognizes, plus Objective C,
+# and GNU Ada.  Also test that multiple dots are handled correctly.
+extensions="C F S ada adb ads asm c c++ cc cpp cxx f f90 F90 f95 F95 f03 F03 
for go m s sx ada.ada"
+bad_names=foo.
+
+for ext in $extensions; do
+  # Try a sample compile command.
+  AT_CHECK([$LIBTOOL -n --mode=compile compiler -c foo.$ext],
+           [1], [ignore], [stderr])
+  AT_CHECK([grep 'cannot' stderr], [1], [ignore])
+done
+
+# Make sure that invalid suffixes are not recognized.
+for name in $bad_names; do
+  AT_CHECK([$LIBTOOL -n --mode=compile compiler -c $name],
+           [1], [ignore], [stderr])
+  AT_CHECK([grep 'cannot' stderr], [0], [ignore])
+done
+
+AT_CLEANUP
+
+
+## --------------------- ##
+## Check link operation. ##
+## --------------------- ##
+
+AT_SETUP([check link mode operation])
+
+AT_CHECK([$LIBTOOL -n --mode=link $CC -o gettext ../lib/libnlsut.a], [0], 
[stdout])
+AT_CHECK([$EGREP '../lib/libnlsut.a' stdout], [0], [ignore])
+
+
+AT_DATA([hell.lo],
+[[# Generated by libtool
+pic_object=none
+non_pic_object=hell.o
+]])
+
+AT_CHECK([$LIBTOOL --mode=link $CC -o something foo.o hell.lo], [1], [stdout], 
[ignore])
+AT_CHECK([$FGREP '.lo ' stdout], [1], [ignore])
+
+AT_CLEANUP
+
+
+## -------------------------------- ##
+## Check objectlist file operation. ##
+## -------------------------------- ##
+
+AT_SETUP([check objectlist file operation])
+
+AT_CHECK([$LIBTOOL -n --mode=link $CC -objectlist nonexistent], [1], [ignore], 
[stderr])
+AT_CHECK([grep 'nonexistent' stderr], [0], [ignore])
+
+AT_CLEANUP
+
+
+## --------------------------------- ##
+## Check LT_SUPPORTED_TAG interface. ##
+## --------------------------------- ##
+
+AT_SETUP([test LT_SUPPORTED_TAG interface])
+
+AT_CHECK([test no != "$AUTOCONF" || exit 77])
+
+cp $abs_top_srcdir/aclocal.m4 ./aclocal.m4
+cp $abs_top_srcdir/configure.ac ./configure.ac
+cp -r $abs_top_srcdir/build-aux ./build-aux
+cp -r $abs_top_srcdir/m4 ./m4
+
+# Retrieve the list of tags supported by our main libtool script.
+traced_tags=`$AUTOCONF --trace 'LT_SUPPORTED_TAG:$1'`
+AT_CHECK([test -n "$traced_tags"])
+
+# Ensure each of them is accepted by --tag.
+# (We do some useless operation like erasing an empty file, because
+# we are just interested in whether --tag accepts the tag or not.)
+for tag in $traced_tags; do
+  AT_CHECK([$LIBTOOL -n --mode=link --tag=$tag compiler -o liba.la foo.lo],
+           [], [ignore], [stderr])
+  AT_CHECK([grep 'ignoring unknown tag' stderr], [1], [ignore])
+done
+
+# Ensure the above command would have failed for unknown tags
+AT_CHECK([$LIBTOOL -n --mode=link --tag=UnKnOwN compiler -o liba.la foo.lo],
+         [], [ignore], [stderr])
+AT_CHECK([grep 'ignoring unknown tag' stderr], [0], [ignore])
+
+AT_CLEANUP
diff --git a/tests/link-2.test b/tests/link-2.test
deleted file mode 100755
index d7c1895..0000000
--- a/tests/link-2.test
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/sh
-# link-2.test - check that .lo files aren't made into programs.
-#
-#   Copyright (C) 2003-2004, 2011-2012 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
-
-rm -f hell.lo
-cat > hell.lo <<EOF
-# Generated by libtool
-pic_object=none
-non_pic_object=hell.o
-EOF
-
-# Try a sample link command.
-linkresult=`$LIBTOOL -n --mode=link $CC -o something foo.o hell.lo`
-res=$?
-
-rm -f hell.lo
-
-test 0 -eq "$res" || exit $EXIT_FAILURE
-
-echo "$linkresult"
-case $linkresult in
-*".lo "*)
-  func_fail "$progname: .lo files should not be linked into programs"
-  ;;
-esac
-
-exit $EXIT_SUCCESS
diff --git a/tests/link.test b/tests/link.test
deleted file mode 100755
index fec376c..0000000
--- a/tests/link.test
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh
-# link.test - make sure that linking against libraries is legal.
-#
-#   Copyright (C) 2003-2004, 2011-2012 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
-
-# Try a sample link command.
-linkresult=`$LIBTOOL -n --mode=link $CC -o gettext ../lib/libnlsut.a`
-test $? -eq 0 || exit $EXIT_FAILURE
-
-echo "$linkresult"
-echo "$linkresult" | $EGREP ../lib/libnlsut.a >/dev/null 2>&1 || {
-  func_fail "$progname: ../lib/libnlsut.a was not used as expected in linking"
-}
-
-exit $EXIT_SUCCESS
diff --git a/tests/mdemo-conf.test b/tests/mdemo-conf.test
deleted file mode 100755
index 5742af0..0000000
--- a/tests/mdemo-conf.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# mdemo-conf.test - try configuring the mdemo 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/mdemo"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-exit 0
diff --git a/tests/mdemo-dryrun.test b/tests/mdemo-dryrun.test
deleted file mode 100755
index 678891d..0000000
--- a/tests/mdemo-dryrun.test
+++ /dev/null
@@ -1,116 +0,0 @@
-#! /bin/sh
-# mdemo-dryrun.test - check whether the --dry-run mode works properly
-#
-#   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 "mdemo-conf" "tests/mdemo/Makefile"
-
-func_mkprefixdir
-func_cd "tests/mdemo"
-func_make "clean"
-
-# create `before' and `after' in a directory deep within objdir,
-# so that their creation and removal does not modify even a timestamp
-# in the output of `ls -l . $objdir'
-func_mkdir_p "$objdir/temp/temp"
-before=$objdir/temp/temp/before
-after=$objdir/temp/temp/after
-
-# Create a new libtool script that will enter dry run if the environment
-# variable force_dry_run is set
-rm -f $objdir/libtool.new
-sed 's/^opt_dry_run=.*$/opt_dry_run=${force_dry_run-false}/' < libtool > 
$objdir/libtool.new
-chmod +x $objdir/libtool.new
-mv libtool $objdir/libtool
-mv $objdir/libtool.new libtool
-
-# main.o is not compiled with libtool, but it depends on it, so make
-# sure it is up-to-date.  libfoo2.la is linked with libsub.la, so make
-# sure it exists, otherwise libtool will complain.
-func_make main.$objext
-
-func_msg "Making object files in mdemo (dry run)"
-# ls -l in MSYS sometimes shows year, not time, for really fresh files.
-sleep 1
-ls -l . $objdir | grep -v total > $before
-force_dry_run=: $MAKE foo1.lo foo2.lo sub.lo || exit $?
-ls -l . $objdir | grep -v total > $after
-cmp $before $after > /dev/null || exit 1
-# Now really make them
-func_make foo1.lo foo2.lo libsub.la
-
-func_msg "Making libraries in mdemo (dry run)"
-# ls -l in MSYS sometimes shows year, not time, for really fresh files.
-sleep 1
-ls -l . $objdir | grep -v total > $before
-force_dry_run=: $MAKE foo1.la libfoo2.la || exit $?
-ls -l . $objdir | grep -v total > $after
-cmp $before $after > /dev/null || exit 1
-# Now really make them
-func_make foo1.la libfoo2.la
-
-func_msg "Making programs in ../mdemo (dry run)"
-# ls -l in MSYS sometimes shows year, not time, for really fresh files.
-sleep 1
-ls -l . $objdir | grep -v total > $before
-force_dry_run=: $MAKE mdemo$EXEEXT mdemo_static$EXEEXT 1>&2 || exit $?
-ls -l . $objdir | grep -v total > $after
-cmp $before $after > /dev/null || exit 1
-# Now really make them
-func_make mdemo$EXEEXT mdemo_static$EXEEXT
-
-func_msg "Running $MAKE install in ../mdemo (dry run)"
-# Libtool does not create these directories
-func_mkdir_p "$prefix/bin"
-func_mkdir_p "$prefix/lib"
-# ls -l in MSYS sometimes shows year, not time, for really fresh files.
-sleep 1
-ls -l . $objdir | grep -v total > $before
-ls -lR $prefix | grep -v total >> $before
-force_dry_run=: $MAKE install 1>&2 || exit 1
-ls -l . $objdir | grep -v total > $after
-ls -lR $prefix | grep -v total >> $after
-cmp $before $after > /dev/null || exit 1
-# Now really run it
-func_make install
-
-func_msg "Running $MAKE uninstall in ../mdemo (dry run)"
-# Libtool does not uninstall the programs, remove them first
-rm -f "$prefix/bin/mdemo$EXEEXT" "$prefix/bin/mdemo_static$EXEEXT"
-# ls -l in MSYS sometimes shows year, not time, for really fresh files.
-sleep 1
-ls -l . $objdir | grep -v total > $before
-ls -lR $prefix | grep -v total >> $before
-force_dry_run=: $MAKE uninstall 1>&2 || exit $?
-ls -l . $objdir | grep -v total > $after
-ls -lR $prefix | grep -v total >> $after
-cmp $before $after > /dev/null || exit 1
-# Now really run it
-func_make uninstall
-
-rm -f $before $after libtool
-mv $objdir/libtool libtool
-
-exit 0
diff --git a/tests/mdemo-exec.test b/tests/mdemo-exec.test
deleted file mode 100755
index ee3014e..0000000
--- a/tests/mdemo-exec.test
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh
-# mdemo-exec.test - check that programs in the mdemo subdirectory are viable
-#
-#   Copyright (C) 2003, 2004, 2005, 2007 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 "mdemo-make" "tests/mdemo/mdemo$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/mdemo/mdemo_static$EXEEXT tests/mdemo/foo1.la 
tests/mdemo/libfoo2.la" \
-         "try_iterate: .*libfoo2"
-func_exec "tests/mdemo/mdemo$EXEEXT tests/mdemo/foo1.la 
tests/mdemo/libfoo2.la" \
-         "try_iterate: .*libfoo2"
-func_exec "tests/mdemo/mdemo_static$EXEEXT `pwd`/tests/mdemo/foo1.la 
`pwd`/tests/mdemo/libfoo2.la"
-func_exec "tests/mdemo/mdemo$EXEEXT `pwd`/tests/mdemo/foo1.la 
`pwd`/tests/mdemo/libfoo2.la"
-
-exit $exec_status
diff --git a/tests/mdemo-inst.test b/tests/mdemo-inst.test
deleted file mode 100755
index d611836..0000000
--- a/tests/mdemo-inst.test
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh
-# mdemo-inst.test - try installing from the mdemo 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 "mdemo-make" "tests/mdemo/mdemo$EXEEXT"
-
-func_mkprefixdir
-func_cd "tests/mdemo"
-func_make "install"
-func_exec_init "installed"
-func_exec "$prefix/bin/mdemo_static$EXEEXT $prefix/lib/foo1.la 
$prefix/lib/libfoo2.la"
-func_exec "$prefix/bin/mdemo$EXEEXT $prefix/lib/foo1.la $prefix/lib/libfoo2.la"
-
-exit $status
diff --git a/tests/mdemo-make.test b/tests/mdemo-make.test
deleted file mode 100755
index 29c4cd4..0000000
--- a/tests/mdemo-make.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# mdemo-make.test - try building in the mdemo 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 "mdemo-conf" "tests/mdemo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/mdemo"
-func_make
-
-exit 0
diff --git a/tests/mdemo-shared-exec.test b/tests/mdemo-shared-exec.test
deleted file mode 100755
index 17240b0..0000000
--- a/tests/mdemo-shared-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/mdemo-exec.test
diff --git a/tests/mdemo-shared-inst.test b/tests/mdemo-shared-inst.test
deleted file mode 100755
index 7b8f7a6..0000000
--- a/tests/mdemo-shared-inst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/mdemo-inst.test
diff --git a/tests/mdemo-shared-make.test b/tests/mdemo-shared-make.test
deleted file mode 100755
index ef661d8..0000000
--- a/tests/mdemo-shared-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/mdemo-make.test
diff --git a/tests/mdemo-shared-unst.test b/tests/mdemo-shared-unst.test
deleted file mode 100755
index 100ab8e..0000000
--- a/tests/mdemo-shared-unst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/mdemo-unst.test
diff --git a/tests/mdemo-shared.test b/tests/mdemo-shared.test
deleted file mode 100755
index fb32764..0000000
--- a/tests/mdemo-shared.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# mdemo-shared.test - try configuring the mdemo 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/mdemo"
-func_make_distclean
-func_configure "--disable-static"
-func_check_static_shared "no" "yes"
-
-exit 0
diff --git a/tests/mdemo-static-exec.test b/tests/mdemo-static-exec.test
deleted file mode 100755
index 17240b0..0000000
--- a/tests/mdemo-static-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/mdemo-exec.test
diff --git a/tests/mdemo-static-inst.test b/tests/mdemo-static-inst.test
deleted file mode 100755
index 7b8f7a6..0000000
--- a/tests/mdemo-static-inst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/mdemo-inst.test
diff --git a/tests/mdemo-static-make.test b/tests/mdemo-static-make.test
deleted file mode 100755
index ef661d8..0000000
--- a/tests/mdemo-static-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/mdemo-make.test
diff --git a/tests/mdemo-static-unst.test b/tests/mdemo-static-unst.test
deleted file mode 100755
index 100ab8e..0000000
--- a/tests/mdemo-static-unst.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/mdemo-unst.test
diff --git a/tests/mdemo-static.test b/tests/mdemo-static.test
deleted file mode 100755
index 5df535d..0000000
--- a/tests/mdemo-static.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# mdemo-static.test - try configuring the mdemo 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/mdemo"
-func_make_distclean
-func_configure "--disable-shared"
-func_check_static_shared "yes" "no"
-
-exit 0
diff --git a/tests/mdemo-unst.test b/tests/mdemo-unst.test
deleted file mode 100755
index e808e31..0000000
--- a/tests/mdemo-unst.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# mdemo-unst.test - try uninstalling in the mdemo 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 "mdemo-inst" "$prefix/bin/mdemo$EXEEXT" "tests/mdemo/Makefile"
-
-func_mkprefixdir
-func_cd "tests/mdemo"
-func_make_uninstall
-
-exit 0
diff --git a/tests/mdemo.at b/tests/mdemo.at
new file mode 100644
index 0000000..40f89b4
--- /dev/null
+++ b/tests/mdemo.at
@@ -0,0 +1,863 @@
+# demo.at -- Dynamic ltdl runtime loading -*- Autotest -*-
+#
+#   Copyright (C) 1998, 2002-2004, 2011-2012 Free Software Foundation,
+#   Inc.
+#   Written by Thomas Tanner, 1998
+#   Written by Greg Eisenhauer, 2002
+#   Rewritten 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([Dynamic ltdl runtime loading.])
+
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[dnl We can't use AT_DATA here, because we need an unquoted here-
+dnl document to splice in the path to the top level libltdl directory,
+dnl but, we do need to double m4-quote to prevent premature expansion
+dnl of any active m4 symbols in the here-doc content, and to maintain
+dnl the square-bracket symbols as is.
+[cat >configure.ac <<_EOT_
+AC_INIT([mdemo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+LT_CONFIG_LTDL_DIR([libltdl])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+LT_INIT([dlopen win32-dll])
+LTDL_INIT([nonrecursive])
+AC_SUBST([LIBTOOL_DEPS])
+AC_SUBST([INCLTDL])
+AC_SUBST([LIBLTDL])
+STATIC=
+test yes = "$enable_static" && STATIC=-static
+AC_SUBST([STATIC])
+LT_LIB_M
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_HEADERS([config.h:config.in.h])
+AC_OUTPUT
+_EOT_]
+
+
+[cat >Makefile.am <<_EOT_
+AUTOMAKE_OPTIONS = no-dependencies foreign
+ACLOCAL_AMFLAGS = -I m4
+AM_CPPFLAGS = \$(INCLTDL)
+AM_LDFLAGS =
+
+noinst_LTLIBRARIES =
+EXTRA_LTLIBRARIES =
+
+include_HEADERS =
+
+EXTRA_DIST =
+
+BUILT_SOURCES =
+CLEANFILES =
+MOSTLYCLEANFILES =
+
+lib_LTLIBRARIES = libsub.la foo1.la libfoo2.la libmlib.la
+
+foo1_la_SOURCES = foo1.c
+foo1_la_LIBADD = \$(LIBM) libsub.la
+foo1_la_LDFLAGS = -no-undefined -module -avoid-version
+
+libfoo2_la_SOURCES = foo2.c
+libfoo2_la_LIBADD = \$(LIBM) libsub.la
+libfoo2_la_LDFLAGS = -no-undefined -module -export-symbols-regex "libfoo2.*"
+
+libsub_la_SOURCES = sub.c
+libsub_la_LDFLAGS = -no-undefined
+
+## Use -export-symbols-regex here explicitly because libltdl marks
+## its exported symbols, and we use libltdl as a convenience archive.
+## Thus, on w32, auto-exporting is turned off.
+libmlib_la_SOURCES = mlib.c
+libmlib_la_LIBADD = \$(LIBLTDL) "-dlopen" foo1.la "-dlopen" libfoo2.la
+libmlib_la_LDFLAGS = -no-undefined -export-symbols-regex ".*"
+libmlib_la_DEPENDENCIES = \$(LIBLTDL) libsub.la foo1.la libfoo2.la
+
+noinst_HEADERS = foo.h
+
+\$(LIBLTDL): ${top_build_prefix}libtool \
+    ${top_build_prefix}config.h $top_srcdir/libltdl/ltdl.c \
+    $top_srcdir/libltdl/ltdl.h
+       cd $top_build_prefix; \$(MAKE) \`echo \$(LIBLTDL) | sed 
's|.*\.\./\.\./libltdl/|libltdl/|g'\`
+# Do not error out if toplevel config.h does not exist:
+${top_build_prefix}config.h:
+
+bin_PROGRAMS = mdemo mdemo_static
+
+# Create a version of mdemo that does dlopen.
+mdemo_SOURCES = main.c
+mdemo_LDFLAGS = -export-dynamic
+## The quotes around -dlopen below fool automake into accepting it
+mdemo_LDADD = \$(LIBLTDL) libsub.la "-dlopen" self \
+               "-dlopen" foo1.la "-dlopen" libfoo2.la
+mdemo_DEPENDENCIES = \$(LIBLTDL) libsub.la foo1.la libfoo2.la
+
+# Create a statically linked version of mdemo.
+mdemo_static_SOURCES = \$(mdemo_SOURCES)
+mdemo_static_LDFLAGS = \$(STATIC) \$(mdemo_LDFLAGS)
+mdemo_static_LDADD = \$(mdemo_LDADD)
+mdemo_static_DEPENDENCIES = \$(mdemo_DEPENDENCIES)
+
+libtool: \$(LIBTOOL_DEPS)
+       \$(SHELL) ./config.status --recheck
+
+include \$(srcdir)/libltdl/ltdl.mk
+include \$(srcdir)/mdemo.mk
+_EOT_]
+
+AT_DATA([mdemo.mk],
+[[# Don't abort for lack of mdemo.mk
+]])
+
+AT_DATA([foo.h],
+[[#ifndef FOO_H
+#define FOO_H
+
+/* Silly constants that the functions return. */
+#define HELLO_RET 0xe110
+#define FOO_RET 0xf00
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int sub (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+]])
+
+AT_DATA([foo1.c],
+[[#include <config.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "foo.h"
+
+#define nothing foo1_LTX_nothing
+#define foo1    foo1_LTX_foo1
+#define hello   foo1_LTX_hello
+
+/* Give a global variable definition. */
+int nothing = FOO_RET;
+
+/* private function */
+int _foo1_helper (void) {
+  sub ();
+  return FOO_RET;
+}
+
+/* export functions */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int foo1 (void) {
+    printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
+    return _foo1_helper ();
+}
+
+int hello () {
+    printf ("** This is foolib 1 **\n");
+    return HELLO_RET;
+}
+
+#ifdef __cplusplus
+}
+#endif
+]])
+
+AT_DATA([foo2.c],
+[[#include <config.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "foo.h"
+
+#define nothing libfoo2_LTX_nothing
+#define foo2    libfoo2_LTX_foo2
+#define hello   libfoo2_LTX_hello
+
+/* Give a global variable definition. */
+int nothing;
+
+/* private function */
+int _foo2_helper (void) {
+  sub ();
+  return FOO_RET;
+}
+
+/* export functions */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int foo2 (void) {
+    printf ("sin (0.0) = %g\n", (double) sin ((double) 0.0));
+    return _foo2_helper ();
+}
+
+int hello () {
+    printf ("** This is foolib 2 **\n");
+    return HELLO_RET;
+}
+
+#ifdef __cplusplus
+}
+#endif
+]])
+
+AT_DATA([mlib.c],
+[[#include <config.h>
+#include <stdio.h>
+
+#include "foo.h"
+#include "ltdl.h"
+
+int test_dl (char *filename) {
+  lt_dlhandle handle;
+  const lt_dlinfo *info;
+  int (*pfoo1)() = 0;
+  int (*pfoo2)() = 0;
+  int (*phello)() = 0;
+  int *pnothing = 0;
+  int ret = 0;
+
+  handle = lt_dlopen(filename);
+  if (!handle) {
+    fprintf (stderr, "can't open the module %s!\n", filename);
+    fprintf (stderr, "error was: %s\n", lt_dlerror());
+    return 1;
+  }
+
+  info = lt_dlgetinfo(handle);
+  if (!info) {
+    fprintf (stderr, "can't get module info: %s\n", lt_dlerror());
+    return 1;
+  }
+  if (info->name) {
+    printf ("module name: %s\n", info->name);
+  } else {
+    printf ("module is not a libtool module\n");
+  }
+  printf ("module filename: %s\n", info->filename);
+  printf ("module reference count: %i\n", info->ref_count);
+
+  phello = (int(*)())lt_dlsym(handle, "hello");
+  if (phello)
+    {
+      int value = (*phello) ();
+
+      printf ("hello returned: %i\n", value);
+      if (value == HELLO_RET)
+        printf("hello is ok!\n");
+    }
+  else
+    {
+      fprintf (stderr, "did not find the `hello' function\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
+      ret = 1;
+    }
+
+  pnothing = (int*)lt_dlsym(handle, "nothing");
+  /* Try assigning to the nothing variable. */
+  if (pnothing)
+    *pnothing = 1;
+  else
+    {
+      fprintf (stderr, "did not find the `nothing' variable\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
+      ret = 1;
+    }
+
+  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
+  /* Just call the functions and check return values. */
+  if (pfoo1)
+    {
+      if ((*pfoo1) () == FOO_RET)
+        printf("foo1 is ok!\n");
+      else
+       ret = 1;
+    }
+  else {
+    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
+    if (pfoo2)
+      {
+        if ((*pfoo2) () == FOO_RET)
+          printf("foo2 is ok!\n");
+        else ret = 1;
+      }
+    else
+      {
+        fprintf (stderr, "did not find any of the `foo' functions\n");
+        fprintf (stderr, "error was: %s\n", lt_dlerror());
+        ret = 1;
+      }
+  }
+  lt_dlclose(handle);
+  return ret;
+}
+
+int
+mlib_func (int argc, char **argv)
+{
+  int ret = 0;
+  int i;
+  /*
+   * Would be nice if this somehow worked for libraries, not just executables.
+   * LTDL_SET_PRELOADED_SYMBOLS();
+   */
+  if (lt_dlinit() != 0) {
+    fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
+    return 1;
+  }
+
+  for (i = 1; i < argc; i++)
+    if (test_dl(argv[i]))
+       ret = 1;
+
+  lt_dlexit();
+  return ret;
+}
+]])
+
+AT_DATA([sub.c],
+[[#include <config.h>
+#include <stdio.h>
+void sub (void) { printf ("sub() called\n"); }
+]])
+
+AT_DATA([main.c],
+[[#include <config.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "foo.h"
+#include "ltdl.h"
+
+#ifdef __cplusplus
+#  define EXPORT extern "C"
+#else
+#  define EXPORT extern
+#endif
+
+EXPORT int myfunc (void);
+
+int
+test_dl (char *filename, int test_ext)
+{
+  lt_dlhandle handle;
+  const lt_dlinfo *info;
+  int (*pfoo1)() = 0;
+  int (*pfoo2)() = 0;
+  int (*phello)() = 0;
+  int *pnothing = 0;
+  int ret = 0;
+
+  if (test_ext)
+    handle = lt_dlopenext (filename);
+  else
+    handle = lt_dlopen (filename);
+
+  if (!handle) {
+    fprintf (stderr, "can't open the module %s!\n", filename);
+    fprintf (stderr, "error was: %s\n", lt_dlerror());
+    return 1;
+  }
+
+  info = lt_dlgetinfo(handle);
+  if (!info) {
+    fprintf (stderr, "can't get module info: %s\n", lt_dlerror());
+    return 1;
+  }
+  if (info->name) {
+    printf ("module name: %s\n", info->name);
+  } else {
+    printf ("module is not a libtool module\n");
+  }
+  printf ("module filename: %s\n", info->filename);
+  printf ("module reference count: %i\n", info->ref_count);
+
+  phello = (int(*)())lt_dlsym(handle, "hello");
+  if (phello)
+    {
+      int value = (*phello) ();
+
+      printf ("hello returned: %i\n", value);
+      if (value == HELLO_RET)
+        printf("hello is ok!\n");
+    }
+  else
+    {
+      fprintf (stderr, "did not find the `hello' function\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
+      ret = 1;
+    }
+
+  pnothing = (int*)lt_dlsym(handle, "nothing");
+  /* Try assigning to the nothing variable. */
+  if (pnothing)
+    *pnothing = 1;
+  else
+    {
+      fprintf (stderr, "did not find the `nothing' variable\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
+      ret = 1;
+    }
+
+  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
+  /* Just call the functions and check return values. */
+  if (pfoo1)
+    {
+      if ((*pfoo1) () == FOO_RET)
+        printf("foo1 is ok!\n");
+      else
+       ret = 1;
+    }
+  else {
+    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
+    if (pfoo2)
+      {
+        if ((*pfoo2) () == FOO_RET)
+          printf("foo2 is ok!\n");
+        else ret = 1;
+      }
+    else
+      {
+        fprintf (stderr, "did not find any of the `foo' functions\n");
+        fprintf (stderr, "error was: %s\n", lt_dlerror());
+        ret = 1;
+      }
+  }
+  lt_dlclose(handle);
+  return ret;
+}
+
+int
+myfunc ()
+{
+  return HELLO_RET;
+}
+
+int myvar;
+
+int
+test_dlself ()
+{
+  lt_dlhandle handle;
+  int (*pmyfunc)() = 0;
+  int *pmyvar = 0;
+  int ret = 0;
+
+  handle = lt_dlopen(0);
+  if (!handle) {
+    fprintf (stderr, "can't dlopen the program!\n");
+    fprintf (stderr, "error was: %s\n", lt_dlerror());
+    return 1;
+  }
+
+  pmyfunc = (int(*)())lt_dlsym(handle, "myfunc");
+  if (pmyfunc)
+    {
+      int value = (*pmyfunc) ();
+
+      printf ("myfunc returned: %i\n", value);
+      if (value == HELLO_RET)
+        printf("myfunc is ok!\n");
+    }
+  else
+    {
+      fprintf (stderr, "did not find the `myfunc' function\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
+      ret = 1;
+    }
+
+  pmyvar = (int*)lt_dlsym(handle, "myvar");
+  /* Try assigning to the variable. */
+  if (pmyvar)
+    *pmyvar = 1;
+  else
+    {
+      fprintf (stderr, "did not find the `myvar' variable\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
+      ret = 1;
+    }
+
+  lt_dlclose(handle);
+  return ret;
+}
+
+static int
+callback (const char *filename, void *data)
+{
+  printf ("%s: %s\n", (char *)data, filename);
+  return 0;
+}
+
+static int
+try_iterate (const char *search_path)
+{
+  char *s = "try_iterate";
+  return lt_dlforeachfile (search_path, callback, s);
+}
+
+/* cheap dirname clone.  We require a '/' separator, nonempty and large
+   enough input, not ending with '/', and we will overwrite the input. */
+static char *
+my_dirname (char *path)
+{
+  char *p = strrchr (path, '/');
+  if (p)
+    *p = '\0';
+  else
+    {
+      path[0] = '.';
+      path[1] = '\0';
+    }
+  return path;
+}
+
+int
+main (int argc, char **argv)
+{
+  int i;
+  int ret = 0;
+  char *p;
+
+  printf ("Welcome to GNU libtool mdemo!\n");
+
+  if (argc < 2) {
+    fprintf (stderr, "usage: %s module [module...]\n", argv[0]);
+  }
+
+  LTDL_SET_PRELOADED_SYMBOLS();
+  if (lt_dlinit() != 0) {
+    fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
+    return 1;
+  }
+
+  for (i = 1; i < argc; i++)
+  {
+    if (test_dl(argv[i], 0))
+       ret = 1;
+    p = strrchr(argv[i], '.');
+    if (p)
+      {
+       *p = '\0';
+       if (test_dl(argv[i], 1))
+         ret = 1;
+       *p = '.';
+      }
+  }
+
+  if (test_dlself())
+    ret = 1;
+
+  for (i = 1; i < argc; i++)
+    if (argv[i][0] != '\0')
+      {
+       my_dirname (argv[i]);
+       if (try_iterate (argv[i]))
+         ret = 1;
+      }
+
+  lt_dlexit();
+  return ret;
+}
+]])
+
+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_EXECUTE
+# -----------------
+# Run the listed make rules, and check that the built binaries work.
+m4_define([_LT_CHECK_EXECUTE],
+[LT_AT_MAKE
+LT_AT_EXEC_CHECK([./mdemo_static], 0, [ignore], [],
+    [./foo1.la ./libfoo2.la | grep '^try_iterate: '])
+LT_AT_EXEC_CHECK([./mdemo], 0, [ignore], [],
+    [./foo1.la ./libfoo2.la | grep '^try_iterate: '])
+LT_AT_EXEC_CHECK([./mdemo_static], 0, [ignore], [],
+    [`pwd`/foo1.la `pwd`/libfoo2.la | grep '^try_iterate: '])
+LT_AT_EXEC_CHECK([./mdemo], 0, [ignore], [],
+    [`pwd`/foo1.la `pwd`/libfoo2.la | grep '^try_iterate: '])
+])
+
+# _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/mdemo_static], 0, [ignore], [],
+    [$prefixdir/lib/foo1.la $prefixdir/lib/libfoo2.la | grep '^try_iterate: '])
+LT_AT_EXEC_CHECK([$prefixdir/bin/mdemo], 0, [ignore], [],
+    [$prefixdir/lib/foo1.la $prefixdir/lib/libfoo2.la | grep '^try_iterate: '])
+])
+
+
+## ------------- ##
+## Mdemo static. ##
+## ------------- ##
+
+AT_SETUP([dynamically ltdl preload static modules])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-shared],
+                   [^build_old_libs=yes], [^build_libtool_libs=no])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ------------- ##
+## Mdemo shared. ##
+## ------------- ##
+
+AT_SETUP([dynamically ltdl load a shared module])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-static],
+                   [^build_old_libs=no], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ----------- ##
+## Mdemo conf. ##
+## ----------- ##
+
+AT_SETUP([ltdl load shared and static modules])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([],
+                   [^build_old_libs=yes], [^build_libtool_libs=yes])
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+
+## ------------- ##
+## Mdemo dryrun. ##
+## ------------- ##
+
+AT_SETUP([ltdl dryrun])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG
+LT_AT_MAKE([all-local libltdl/libltdlc.la])
+
+# create `before' and `after' in a directory deep within objdir,
+# so that their creation and removal does not modify even a timestamp
+# in the output of `ls -l . $objdir'
+$lt_INSTALL -d "$objdir/temp/temp"
+before=$objdir/temp/temp/before
+after=$objdir/temp/temp/after
+
+# Create a new libtool script that will enter dry run if the environment
+# variable force_dry_run is set
+sed 's|^opt_dry_run=.*$|opt_dry_run=$force_dry_run|' libtool > ltnew && mv 
ltnew libtool
+export force_dry_run
+
+# main.o is not compiled with libtool, but it depends on it, so make
+# sure it is up-to-date.  libfoo2.la is linked with libsub.la, so make
+# sure it exists, otherwise libtool will complain.
+force_dry_run=false
+LT_AT_MAKE([main.$objext])
+
+# Making object files
+# ls -l in MSYS sometimes shows year, not time, for really fresh files.
+sleep 1
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
+force_dry_run=:
+LT_AT_MAKE([foo1.lo foo2.lo libsub.la])
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
+AT_CHECK([cmp "$before" "$after"], 0, [ignore])
+
+# Now really make them
+force_dry_run=false
+LT_AT_MAKE([foo1.lo foo2.lo libsub.la])
+
+# Making libraries
+sleep 1 # for MSYS
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
+force_dry_run=:
+LT_AT_MAKE([foo1.la libfoo2.la])
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
+AT_CHECK([cmp "$before" "$after"], 0, [ignore])
+
+# Now really make them
+force_dry_run=false
+LT_AT_MAKE([foo1.la libfoo2.la])
+
+# Making programs
+sleep 1 # for MSYS
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
+force_dry_run=:
+LT_AT_MAKE([mdemo$EXEEXT mdemo_static$EXEEXT])
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
+AT_CHECK([cmp "$before" "$after"], 0, [ignore])
+
+# Running $MAKE install
+# Libtool does not create these directories
+$lt_INSTALL -d "$prefixdir/bin"
+$lt_INSTALL -d "$prefixdir/include"
+$lt_INSTALL -d "$prefixdir/lib"
+
+sleep 1 # for MSYS
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
+ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
+force_dry_run=:
+LT_AT_MAKE([install])
+
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
+ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
+AT_CHECK([cmp "$before" "$after"], 0, [ignore])
+
+# Now really install
+force_dry_run=false
+LT_AT_MAKE([install])
+
+# Running $MAKE uninstall
+# Libtool does not uninstall the programs, remove them first
+rm -f "$prefixdir/bin/mdemo$EXEEXT" "$prefixdir/bin/mdemo_static$EXEEXT"
+
+sleep 1 # for MSYS
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$before"
+ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$before"
+force_dry_run=:
+LT_AT_MAKE([uninstall])
+ls -l . "$objdir" | $EGREP -v '(^total|testsuite.log$)' > "$after"
+ls -lR "$prefixdir" | $EGREP -v '(^total|testsuite.log$)' >> "$after"
+AT_CHECK([cmp "$before" "$after"], 0, [ignore])
+
+# Now really uninstall
+force_dry_run=false
+LT_AT_CHECK_UNINSTALL
+
+AT_CLEANUP
+
+## ------- ##
+## Mdemo2. ##
+## ------- ##
+
+AT_SETUP([link with library that loads ltdl modules])
+
+_LT_SETUP
+
+AT_DATA([mdemo.mk],
+[[bin_PROGRAMS += mdemo2 mdemo2_static
+
+# Create a version of mdemo2 that links a library that does dlopen.
+mdemo2_LDFLAGS = -export-dynamic "-dlopen" force
+mdemo2_LDADD = libmlib.la
+
+# Create a statically linked version of mdemo.
+mdemo2_static_SOURCES = mdemo2.c
+mdemo2_static_LDFLAGS = $(STATIC) $(mdemo2_LDFLAGS)
+mdemo2_static_LDADD = $(mdemo2_LDADD)
+mdemo2_static_DEPENDENCIES = $(mdemo2_DEPENDENCIES)
+]])
+
+AT_DATA([mdemo2.c],
+[[#include <stdio.h>
+#include "ltdl.h"
+
+extern int mlib_func (int, char **);
+
+int main (int argc, char **argv)
+{
+  int ret = 0;
+
+  printf ("Welcome to GNU libtool mdemo2!\n");
+  if (argc < 2) {
+    fprintf (stderr, "usage: %s module [module...]\n", argv[0]);
+  }
+
+  /* This must be called in the program to get the preloaded symbols */
+  LTDL_SET_PRELOADED_SYMBOLS();
+
+  ret = mlib_func(argc, argv);
+
+  return ret;
+}
+]])
+
+AT_DATA([expout],
+[[Welcome to GNU libtool mdemo2!
+module name: foo1
+module reference count: 1
+** This is foolib 1 **
+hello returned: 57616
+hello is ok!
+cos (0.0) = 1
+sub() called
+foo1 is ok!
+module name: libfoo2
+module reference count: 1
+** This is foolib 2 **
+hello returned: 57616
+hello is ok!
+sin (0.0) = 0
+sub() called
+foo2 is ok!
+]])
+
+LT_AT_CHECK_CONFIG
+
+LT_AT_MAKE
+
+LT_AT_EXEC_CHECK([./mdemo2_static], 0, [expout], [],
+    [./foo1.la ./libfoo2.la | $EGREP -v '^module filename: '])
+LT_AT_EXEC_CHECK([./mdemo2], 0, [expout], [],
+    [./foo1.la ./libfoo2.la | $EGREP -v '^module filename: '])
+
+AT_CLEANUP
diff --git a/tests/mdemo/.gitignore b/tests/mdemo/.gitignore
deleted file mode 100644
index 458a9c6..0000000
--- a/tests/mdemo/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/mdemo
-/mdemo_static
diff --git a/tests/mdemo/Makefile.am b/tests/mdemo/Makefile.am
deleted file mode 100644
index ff9e459..0000000
--- a/tests/mdemo/Makefile.am
+++ /dev/null
@@ -1,87 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-##   Copyright (C) 2003, 2004, 2005, 2007, 2008 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)/../.. $(INCLTDL)
-
-lib_LTLIBRARIES = libsub.la foo1.la libfoo2.la libmlib.la
-
-foo1_la_SOURCES = foo1.c
-foo1_la_LIBADD = $(LIBM) libsub.la
-foo1_la_LDFLAGS = -no-undefined -module -avoid-version
-
-libfoo2_la_SOURCES = foo2.c
-libfoo2_la_LIBADD = $(LIBM) libsub.la
-libfoo2_la_LDFLAGS = -no-undefined -module -export-symbols-regex "libfoo2.*"
-
-libsub_la_SOURCES = sub.c
-libsub_la_LDFLAGS = -no-undefined
-
-## Use -export-symbols-regex here explicitly because libltdl marks
-## its exported symbols, and we use libltdl as a convenience archive.
-## Thus, on w32, auto-exporting is turned off.
-libmlib_la_SOURCES = mlib.c
-libmlib_la_LIBADD = $(LIBLTDL) "-dlopen" foo1.la "-dlopen" libfoo2.la
-libmlib_la_LDFLAGS = -no-undefined -export-symbols-regex ".*"
-libmlib_la_DEPENDENCIES = $(LIBLTDL) libsub.la foo1.la libfoo2.la
-
-noinst_HEADERS = foo.h
-
-bin_PROGRAMS = mdemo mdemo_static
-
-top_distdir = ../..
-$(LIBLTDL): $(top_distdir)/libtool \
-    $(top_distdir)/config.h $(srcdir)/$(top_distdir)/libltdl/ltdl.c \
-    $(srcdir)/$(top_distdir)/libltdl/ltdl.h
-       (cd $(top_distdir); $(MAKE) `echo $(LIBLTDL) | sed 
's|.*\.\./libltdl/|libltdl/|g'`)
-# Do not error out if toplevel config.h does not exist:
-$(top_distdir)/config.h:
-
-# Create a version of mdemo that does dlopen.
-mdemo_SOURCES = main.c
-mdemo_LDFLAGS = -export-dynamic
-## The quotes around -dlopen below fool automake into accepting it
-mdemo_LDADD = $(LIBLTDL) libsub.la "-dlopen" self \
-               "-dlopen" foo1.la "-dlopen" libfoo2.la
-mdemo_DEPENDENCIES = $(LIBLTDL) libsub.la foo1.la libfoo2.la
-
-# Create a statically linked version of mdemo.
-mdemo_static_SOURCES = $(mdemo_SOURCES)
-mdemo_static_LDFLAGS = $(STATIC) $(mdemo_LDFLAGS)
-mdemo_static_LDADD = $(mdemo_LDADD)
-mdemo_static_DEPENDENCIES = $(mdemo_DEPENDENCIES)
-
-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/mdemo/README b/tests/mdemo/README
deleted file mode 100644
index aa4cebb..0000000
--- a/tests/mdemo/README
+++ /dev/null
@@ -1,16 +0,0 @@
-This is mdemo, an example package that uses GNU libtool with an
-Automake-generated environment to build two simple modules and
-a program.
-
-It demonstrates how to build both dynamic and static libraries
-that can be dlopened. mdemo uses libtool's portable dlopen
-wrapper called "libltdl".
-All exported symbols are prefixed with "libname_LTX_" to avoid
-symbols conflicts, especially when linking statically.
-libltdl will automatically cut the prefix off to get the real name.
-
-Note that on Windows, for the purposes of illustrating ltdl, the
-libraries *are* built as dll's, but do not have the __declspec
-machinery to make them suitable for loading at link time.  This is
-only for clarity inside this example, look at the example in ../demo
-to see how the __declspec macros should be set up.
diff --git a/tests/mdemo/configure.ac b/tests/mdemo/configure.ac
deleted file mode 100644
index 8476b5d..0000000
--- a/tests/mdemo/configure.ac
+++ /dev/null
@@ -1,72 +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([mdemo], [1.0], address@hidden)
-AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ------------------ ##
-## C compiler checks. ##
-## ------------------ ##
-AC_PROG_CC
-
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-LTDL_CONVENIENCE([../../libltdl])
-AC_SUBST([INCLTDL])
-AC_SUBST([LIBLTDL])
-
-LT_INIT([dlopen win32-dll])
-AC_SUBST(LIBTOOL_DEPS)
-
-STATIC=
-test yes = "$enable_static" && STATIC="-static"
-AC_SUBST([STATIC])
-
-
-## ---------------------------- ##
-## Libraries required by mdemo. ##
-## ---------------------------- ##
-LT_LIB_M
-
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/mdemo/foo.h b/tests/mdemo/foo.h
deleted file mode 100644
index 8820813..0000000
--- a/tests/mdemo/foo.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* foo.h -- interface to the libfoo* libraries
-
-   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.
-*/
-
-/* Only include this header file once. */
-#ifndef _FOO_H_
-#define _FOO_H_ 1
-
-/* __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
-
-/* Silly constants that the functions return. */
-#define HELLO_RET 0xe110
-#define FOO_RET 0xf00
-
-extern void sub();
-
-#endif /* !_FOO_H_ */
diff --git a/tests/mdemo/foo1.c b/tests/mdemo/foo1.c
deleted file mode 100644
index 452ee59..0000000
--- a/tests/mdemo/foo1.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* foo1.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>
-
-#define nothing foo1_LTX_nothing
-#define foo1   foo1_LTX_foo1
-#define hello  foo1_LTX_hello
-
-/* Give a global variable definition. */
-int nothing;
-
-/* private function */
-int
-_foo1_helper()
-{
-  sub();
-  return FOO_RET;
-}
-
-/* exported functions */
-__BEGIN_DECLS
-
-int
-foo1()
-{
-  printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
-  return _foo1_helper();
-}
-
-int
-hello()
-{
-  printf ("** This is foolib 1 **\n");
-  return HELLO_RET;
-}
-
-__END_DECLS
diff --git a/tests/mdemo/foo2.c b/tests/mdemo/foo2.c
deleted file mode 100644
index e263285..0000000
--- a/tests/mdemo/foo2.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* foo2.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>
-
-#define nothing libfoo2_LTX_nothing
-#define foo2   libfoo2_LTX_foo2
-#define hello  libfoo2_LTX_hello
-
-/* Give a global variable definition. */
-int nothing;
-
-/* private function */
-int
-_foo2_helper()
-{
-  sub();
-  return FOO_RET;
-}
-
-/* exported functions */
-__BEGIN_DECLS
-
-int
-foo2()
-{
-  printf ("sin (0.0) = %g\n", (double) sin ((double) 0.0));
-  return _foo2_helper();
-}
-
-int
-hello()
-{
-  printf ("** This is foolib 2 **\n");
-  return HELLO_RET;
-}
-
-__END_DECLS
diff --git a/tests/mdemo/main.c b/tests/mdemo/main.c
deleted file mode 100644
index ea732a9..0000000
--- a/tests/mdemo/main.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/* main.c -- mdemo test program
-
-   Copyright (C) 1998-2000, 2006, 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 "ltdl.h"
-#include <stdio.h>
-#include <string.h>
-
-LT_BEGIN_C_DECLS
-extern int myfunc (void);
-LT_END_C_DECLS
-
-int
-test_dl (char *filename, int test_ext)
-{
-  lt_dlhandle handle;
-  const lt_dlinfo *info;
-  int (*pfoo1)() = 0;
-  int (*pfoo2)() = 0;
-  int (*phello)() = 0;
-  int *pnothing = 0;
-  int ret = 0;
-
-  if (test_ext)
-    handle = lt_dlopenext (filename);
-  else
-    handle = lt_dlopen (filename);
-
-  if (!handle) {
-    fprintf (stderr, "can't open the module %s!\n", filename);
-    fprintf (stderr, "error was: %s\n", lt_dlerror());
-    return 1;
-  }
-
-  info = lt_dlgetinfo(handle);
-  if (!info) {
-    fprintf (stderr, "can't get module info: %s\n", lt_dlerror());
-    return 1;
-  }
-  if (info->name) {
-    printf ("module name: %s\n", info->name);
-  } else {
-    printf ("module is not a libtool module\n");
-  }
-  printf ("module filename: %s\n", info->filename);
-  printf ("module reference count: %i\n", info->ref_count);
-
-  phello = (int(*)())lt_dlsym(handle, "hello");
-  if (phello)
-    {
-      int value = (*phello) ();
-
-      printf ("hello returned: %i\n", value);
-      if (value == HELLO_RET)
-        printf("hello is ok!\n");
-    }
-  else
-    {
-      fprintf (stderr, "did not find the `hello' function\n");
-      fprintf (stderr, "error was: %s\n", lt_dlerror());
-      ret = 1;
-    }
-
-  pnothing = (int*)lt_dlsym(handle, "nothing");
-  /* Try assigning to the nothing variable. */
-  if (pnothing)
-    *pnothing = 1;
-  else
-    {
-      fprintf (stderr, "did not find the `nothing' variable\n");
-      fprintf (stderr, "error was: %s\n", lt_dlerror());
-      ret = 1;
-    }
-
-  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
-  /* Just call the functions and check return values. */
-  if (pfoo1)
-    {
-      if ((*pfoo1) () == FOO_RET)
-        printf("foo1 is ok!\n");
-      else
-       ret = 1;
-    }
-  else {
-    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
-    if (pfoo2)
-      {
-        if ((*pfoo2) () == FOO_RET)
-          printf("foo2 is ok!\n");
-        else ret = 1;
-      }
-    else
-      {
-        fprintf (stderr, "did not find any of the `foo' functions\n");
-        fprintf (stderr, "error was: %s\n", lt_dlerror());
-        ret = 1;
-      }
-  }
-  lt_dlclose(handle);
-  return ret;
-}
-
-int
-myfunc ()
-{
-  return HELLO_RET;
-}
-
-int myvar;
-
-int
-test_dlself ()
-{
-  lt_dlhandle handle;
-  int (*pmyfunc)() = 0;
-  int *pmyvar = 0;
-  int ret = 0;
-
-  handle = lt_dlopen(0);
-  if (!handle) {
-    fprintf (stderr, "can't dlopen the program!\n");
-    fprintf (stderr, "error was: %s\n", lt_dlerror());
-    return 1;
-  }
-
-  pmyfunc = (int(*)())lt_dlsym(handle, "myfunc");
-  if (pmyfunc)
-    {
-      int value = (*pmyfunc) ();
-
-      printf ("myfunc returned: %i\n", value);
-      if (value == HELLO_RET)
-        printf("myfunc is ok!\n");
-    }
-  else
-    {
-      fprintf (stderr, "did not find the `myfunc' function\n");
-      fprintf (stderr, "error was: %s\n", lt_dlerror());
-      ret = 1;
-    }
-
-  pmyvar = (int*)lt_dlsym(handle, "myvar");
-  /* Try assigning to the variable. */
-  if (pmyvar)
-    *pmyvar = 1;
-  else
-    {
-      fprintf (stderr, "did not find the `myvar' variable\n");
-      fprintf (stderr, "error was: %s\n", lt_dlerror());
-      ret = 1;
-    }
-
-  lt_dlclose(handle);
-  return ret;
-}
-
-static int
-callback (const char *filename, void *data)
-{
-  printf ("%s: %s\n", (char *)data, filename);
-  return 0;
-}
-
-static int
-try_iterate (const char *search_path)
-{
-  char *s = "try_iterate";
-  return lt_dlforeachfile (search_path, callback, s);
-}
-
-/* cheap dirname clone.  We require a '/' separator, nonempty and large
-   enough input, not ending with '/', and we will overwrite the input. */
-static char *
-my_dirname (char *path)
-{
-  char *p = strrchr (path, '/');
-  if (p)
-    *p = '\0';
-  else
-    {
-      path[0] = '.';
-      path[1] = '\0';
-    }
-  return path;
-}
-
-int
-main (int argc, char **argv)
-{
-  int i;
-  int ret = 0;
-  char *p;
-
-  printf ("Welcome to GNU libtool mdemo!\n");
-
-  if (argc < 2) {
-    fprintf (stderr, "usage: %s module [module...]\n", argv[0]);
-  }
-
-  LTDL_SET_PRELOADED_SYMBOLS();
-  if (lt_dlinit() != 0) {
-    fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
-    return 1;
-  }
-
-  for (i = 1; i < argc; i++)
-  {
-    if (test_dl(argv[i], 0))
-       ret = 1;
-    p = strrchr(argv[i], '.');
-    if (p)
-      {
-       *p = '\0';
-       if (test_dl(argv[i], 1))
-         ret = 1;
-       *p = '.';
-      }
-  }
-
-  if (test_dlself())
-    ret = 1;
-
-  for (i = 1; i < argc; i++)
-    if (argv[i][0] != '\0')
-      {
-       my_dirname (argv[i]);
-       if (try_iterate (argv[i]))
-         ret = 1;
-      }
-
-  lt_dlexit();
-  return ret;
-}
diff --git a/tests/mdemo/mlib.c b/tests/mdemo/mlib.c
deleted file mode 100644
index 38374a4..0000000
--- a/tests/mdemo/mlib.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* mlib.c -- mlib library
-
-   Copyright (C) 2002, 2006 Free Software Foundation, Inc.
-   Written by Greg Eisenhauer, 2002
-   Extracted from mdemo.c
-
-   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 "ltdl.h"
-#include <stdio.h>
-
-int
-test_dl (char *filename)
-{
-  lt_dlhandle handle;
-  const lt_dlinfo *info;
-  int (*pfoo1)() = 0;
-  int (*pfoo2)() = 0;
-  int (*phello)() = 0;
-  int *pnothing = 0;
-  int ret = 0;
-
-  handle = lt_dlopen(filename);
-  if (!handle) {
-    fprintf (stderr, "can't open the module %s!\n", filename);
-    fprintf (stderr, "error was: %s\n", lt_dlerror());
-    return 1;
-  }
-
-  info = lt_dlgetinfo(handle);
-  if (!info) {
-    fprintf (stderr, "can't get module info: %s\n", lt_dlerror());
-    return 1;
-  }
-  if (info->name) {
-    printf ("module name: %s\n", info->name);
-  } else {
-    printf ("module is not a libtool module\n");
-  }
-  printf ("module filename: %s\n", info->filename);
-  printf ("module reference count: %i\n", info->ref_count);
-
-  phello = (int(*)())lt_dlsym(handle, "hello");
-  if (phello)
-    {
-      int value = (*phello) ();
-
-      printf ("hello returned: %i\n", value);
-      if (value == HELLO_RET)
-        printf("hello is ok!\n");
-    }
-  else
-    {
-      fprintf (stderr, "did not find the `hello' function\n");
-      fprintf (stderr, "error was: %s\n", lt_dlerror());
-      ret = 1;
-    }
-
-  pnothing = (int*)lt_dlsym(handle, "nothing");
-  /* Try assigning to the nothing variable. */
-  if (pnothing)
-    *pnothing = 1;
-  else
-    {
-      fprintf (stderr, "did not find the `nothing' variable\n");
-      fprintf (stderr, "error was: %s\n", lt_dlerror());
-      ret = 1;
-    }
-
-  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
-  /* Just call the functions and check return values. */
-  if (pfoo1)
-    {
-      if ((*pfoo1) () == FOO_RET)
-        printf("foo1 is ok!\n");
-      else
-       ret = 1;
-    }
-  else {
-    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
-    if (pfoo2)
-      {
-        if ((*pfoo2) () == FOO_RET)
-          printf("foo2 is ok!\n");
-        else ret = 1;
-      }
-    else
-      {
-        fprintf (stderr, "did not find any of the `foo' functions\n");
-        fprintf (stderr, "error was: %s\n", lt_dlerror());
-        ret = 1;
-      }
-  }
-  lt_dlclose(handle);
-  return ret;
-}
-
-int
-mlib_func (int argc, char **argv)
-{
-  int ret = 0;
-  int i;
-  /*
-   * Would be nice if this somehow worked for libraries, not just executables.
-   * LTDL_SET_PRELOADED_SYMBOLS();
-   */
-  if (lt_dlinit() != 0) {
-    fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
-    return 1;
-  }
-
-  for (i = 1; i < argc; i++)
-    if (test_dl(argv[i]))
-       ret = 1;
-
-  lt_dlexit();
-  return ret;
-}
diff --git a/tests/mdemo/sub.c b/tests/mdemo/sub.c
deleted file mode 100644
index eed001f..0000000
--- a/tests/mdemo/sub.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* sub.c -- trivial test library
-
-   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 <stdio.h>
-
-void
-sub ()
-{
-  printf ("sub() called\n");
-}
diff --git a/tests/mdemo2-conf.test b/tests/mdemo2-conf.test
deleted file mode 100755
index e399997..0000000
--- a/tests/mdemo2-conf.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# mdemo2-conf.test - try configuring the mdemo2 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/mdemo2"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-exit 0
diff --git a/tests/mdemo2-exec.test b/tests/mdemo2-exec.test
deleted file mode 100755
index 672df93..0000000
--- a/tests/mdemo2-exec.test
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# mdemo2-exec.test - check that programs in the mdemo2 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 "mdemo2-make" "tests/mdemo2/mdemo2$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/mdemo2/mdemo2_static$EXEEXT tests/mdemo/foo1.la 
tests/mdemo/libfoo2.la"
-func_exec "tests/mdemo2/mdemo2$EXEEXT tests/mdemo/foo1.la 
tests/mdemo/libfoo2.la"
-
-exit $exec_status
diff --git a/tests/mdemo2-make.test b/tests/mdemo2-make.test
deleted file mode 100755
index 8f5e4dc..0000000
--- a/tests/mdemo2-make.test
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# mdemo2-make.test - try building in the mdemo2 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 "mdemo2-conf" "tests/mdemo2/Makefile"
-func_require "mdemo-make" "tests/mdemo/libmlib.la"
-
-func_rmprefixdir
-func_cd "tests/mdemo2"
-func_make
-
-exit 0
diff --git a/tests/mdemo2/.gitignore b/tests/mdemo2/.gitignore
deleted file mode 100644
index 44b759d..0000000
--- a/tests/mdemo2/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/mdemo2
-/mdemo2_static
diff --git a/tests/mdemo2/Makefile.am b/tests/mdemo2/Makefile.am
deleted file mode 100644
index 3b2beb1..0000000
--- a/tests/mdemo2/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)/../.. -I$(top_srcdir)/../../libltdl
-
-bin_PROGRAMS = mdemo2 mdemo2_static
-
-# Create a version of mdemo2 that links a library that does dlopen.
-mdemo2_SOURCES = main.c
-mdemo2_LDFLAGS = -export-dynamic "-dlopen" force
-mdemo2_LDADD = ../mdemo/libmlib.la
-
-# Create a statically linked version of mdemo.
-mdemo2_static_SOURCES = $(mdemo2_SOURCES)
-mdemo2_static_LDFLAGS = $(STATIC) $(mdemo2_LDFLAGS)
-mdemo2_static_LDADD = $(mdemo2_LDADD)
-mdemo2_static_DEPENDENCIES = $(mdemo2_DEPENDENCIES)
-
-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/mdemo2/README b/tests/mdemo2/README
deleted file mode 100644
index a808876..0000000
--- a/tests/mdemo2/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This is mdemo2, an example package that attempts to use GNU libtool to
-link with a library that itself does dlopening of libtool modules.
-
-This demo depends upon the libraries generated in ../mdemo.
diff --git a/tests/mdemo2/configure.ac b/tests/mdemo2/configure.ac
deleted file mode 100644
index b25e455..0000000
--- a/tests/mdemo2/configure.ac
+++ /dev/null
@@ -1,62 +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([mdemo2], [1.0], address@hidden)
-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([dlopen])
-AC_SUBST(LIBTOOL_DEPS)
-
-STATIC=
-test yes = "$enable_static" && STATIC="-static"
-AC_SUBST([STATIC])
-
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/mdemo2/main.c b/tests/mdemo2/main.c
deleted file mode 100644
index a08d968..0000000
--- a/tests/mdemo2/main.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* main.c -- mdemo2 test program
-
-   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
-   Written by Greg Eisenhauer, 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.
-*/
-
-#include <stdio.h>
-#include "ltdl.h"
-
-extern int mlib_func (int, char **);
-
-int
-main (int argc, char **argv)
-{
-  int ret = 0;
-
-  printf ("Welcome to GNU libtool mdemo2!\n");
-  if (argc < 2) {
-    fprintf (stderr, "usage: %s module [module...]\n", argv[0]);
-  }
-
-/* This must be called in the program to get the preloaded symbols */
-  LTDL_SET_PRELOADED_SYMBOLS();
-
-  ret = mlib_func(argc, argv);
-
-  return ret;
-}
diff --git a/tests/nomode.test b/tests/nomode.test
deleted file mode 100755
index e1044ff..0000000
--- a/tests/nomode.test
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /bin/sh
-# nomode.test - check that we can actually get help
-#
-#   Copyright (C) 2003-2004, 2011-2012 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
-
-status=$EXIT_SUCCESS
-if $LIBTOOL --help 2>&1 | grep '^Usage:' >/dev/null; then :
-else
-  echo "cannot get top-level help"
-  status=$EXIT_FAILURE
-fi
-
-if $LIBTOOL --mode=link --help 2>&1 | grep '^Usage:' >/dev/null; then :
-else
-  echo "cannot get --mode=link help"
-  status=$EXIT_FAILURE
-fi
-
-# The emoticon below works around a nasty bug in Ultrix /bin/sh
-if ($LIBTOOL 2>&1; :) | grep 'you must specify a MODE' >/dev/null; then :
-else
-  echo "invalid error when no mode is specified"
-  status=$EXIT_FAILURE
-fi
-
-exit $status
diff --git a/tests/objectlist.test b/tests/objectlist.test
deleted file mode 100755
index 351c7e9..0000000
--- a/tests/objectlist.test
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /bin/sh
-# objectlist.test - make sure that a nonexisting objectlist file is properly
-#                   mentioned and that the argument may contain spaces.
-#
-#   Copyright (C) 2003-2004, 2011-2012 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
-
-# Try a sample link command.
-linkresult=`$LIBTOOL -n --mode=link $CC -objectlist nonexistant 2>&1`
-test $? -eq 0 && exit $EXIT_FAILURE
-
-echo "$linkresult" | $EGREP "nonexistant" >/dev/null 2>&1 && {
-  func_msg "$progname: error message contains -objectlist argument as expected"
-}  || exit $EXIT_FAILURE
-
-
-objlist="object list with spaces"
-: > "$objlist"
-linkresult=`$LIBTOOL -n --mode=link $CC -o a.out -objectlist "$objlist" 2>&1`
-rm -f "$objlist"
-
-echo "$linkresult" | $EGREP "spaces" >/dev/null 2>&1 && {
-  func_msg "$progname: -objectlist with spaces in filename not recognized."
-  exit $EXIT_FAILURE
-}
-
-exit $EXIT_SUCCESS
diff --git a/tests/pdemo-conf.test b/tests/pdemo-conf.test
deleted file mode 100755
index 9298ccd..0000000
--- a/tests/pdemo-conf.test
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /bin/sh
-# pdemo-conf.test - try configuring the pdemo 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/pdemo"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-if test -f ./libtool ; then
-  sed 's/^max_cmd_len=*/max_cmd_len=24 # /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/pdemo-exec.test b/tests/pdemo-exec.test
deleted file mode 100755
index d051ff9..0000000
--- a/tests/pdemo-exec.test
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# pdemo-exec.test - check that programs in the pdemo 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 "pdemo-make" "tests/pdemo/hell$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/pdemo/hell_static$EXEEXT" 'Welcome to GNU Hell'
-func_exec "tests/pdemo/hell$EXEEXT" 'Welcome to GNU Hell'
-func_exec "tests/pdemo/helldl$EXEEXT" '(Welcome to .*GNU Hell|unsupported)'
-
-exit $exec_status
diff --git a/tests/pdemo-inst.test b/tests/pdemo-inst.test
deleted file mode 100755
index 67753b1..0000000
--- a/tests/pdemo-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 "pdemo-make" "tests/pdemo/hell$EXEEXT"
-
-func_mkprefixdir
-func_cd "tests/pdemo"
-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/pdemo-make.test b/tests/pdemo-make.test
deleted file mode 100755
index 867f6aa..0000000
--- a/tests/pdemo-make.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# pdemo-make.test - try building in the pdemo 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 "pdemo-conf" "tests/pdemo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/pdemo"
-func_make
-
-exit 0
diff --git a/tests/pdemo/.gitignore b/tests/pdemo/.gitignore
deleted file mode 100644
index e1ee57d..0000000
--- a/tests/pdemo/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/hell
-/hell_static
-/helldl
diff --git a/tests/pdemo/Makefile.am b/tests/pdemo/Makefile.am
deleted file mode 100644
index 775b347..0000000
--- a/tests/pdemo/Makefile.am
+++ /dev/null
@@ -1,171 +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 = longer_file_name_hello.c longer_file_name_foo.c 
longer_file_name_foo2.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 longer_file_name_main.c and libhello.la
-hell_SOURCES = longer_file_name_main.c
-hell_LDADD = libhello.la
-
-# Create a statically linked version of hell.
-hell_static_SOURCES = longer_file_name_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 = longer_file_name_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'`
-
-# 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 = longer_file_name_hello.$(OBJEXT) 
longer_file_name_foo.$(OBJEXT)
-EXTRA_LTLIBRARIES = libhell1.la libhell2.la
-libhell1_la_SOURCES = longer_file_name_hell1.c
-libhell1_la_LIBADD = -L. -lhell0
-libhell1_la_LDFLAGS = -no-undefined -rpath $(libdir)
-libhell1_la_DEPENDENCIES = libhell0.a
-libhell2_la_SOURCES = longer_file_name_hell2.c
-libhell2_la_LIBADD = -L. -lhell0
-libhell2_la_LDFLAGS = -no-undefined -rpath $(libdir)
-libhell2_la_DEPENDENCIES = libhell0.a
-EXTRA_PROGRAMS = hell0
-hell0_SOURCES = longer_file_name_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
-
-# 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/pdemo/configure.ac b/tests/pdemo/configure.ac
deleted file mode 100644
index 5fe89c7..0000000
--- a/tests/pdemo/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([pdemo], [1.0], address@hidden)
-AC_CONFIG_SRCDIR([longer_file_name_hello.c])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ------------------ ##
-## C compiler checks. ##
-## ------------------ ##
-AC_PROG_CC
-
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-LT_INIT([dlopen])
-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 pdemo. ##
-## ---------------------------- ##
-LT_LIB_M
-
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/pdemo/foo.h b/tests/pdemo/foo.h
deleted file mode 100644
index 1843783..0000000
--- a/tests/pdemo/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 snippet allows us to check
- * for __CYGWIN32__ reliably for both old and (probable) future releases.
- */
-#ifdef __CYGWIN__
-#  ifndef __CYGWIN32__
-#    define __CYGWIN32__
-#  endif
-#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 __CYGWIN32__ || 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
-
-#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
-
-/* 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 foo2 LT_PARAMS((void));
-int hello LT_PARAMS((void));
-LIBHELLO_SCOPE int nothing;
-__END_DECLS
-
-#endif /* !_FOO_H_ */
diff --git a/tests/pdemo/longer_file_name_dlmain.c 
b/tests/pdemo/longer_file_name_dlmain.c
deleted file mode 100644
index 73caa78..0000000
--- a/tests/pdemo/longer_file_name_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 (int argc, char **argv)
-{
-  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/pdemo/longer_file_name_foo.c 
b/tests/pdemo/longer_file_name_foo.c
deleted file mode 100644
index 9d92304..0000000
--- a/tests/pdemo/longer_file_name_foo.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* foo.c -- trivial test function for libfoo
-
-   Copyright (C) 1996-1999, 2007, 2010 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/pdemo/longer_file_name_foo2.c 
b/tests/pdemo/longer_file_name_foo2.c
deleted file mode 100644
index 65d3bba..0000000
--- a/tests/pdemo/longer_file_name_foo2.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* foo.c -- trivial test function for libfoo
-
-   Copyright (C) 1996-1999, 2007, 2010 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>
-
-int
-foo2()
-{
-  printf ("foo2 cos (0.0) = %g\n", (double) cos ((double) 0.0));
-  return FOO_RET;
-}
diff --git a/tests/pdemo/longer_file_name_hell1.c 
b/tests/pdemo/longer_file_name_hell1.c
deleted file mode 100644
index 98025e8..0000000
--- a/tests/pdemo/longer_file_name_hell1.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* longer_file_name_hell1.c -- trivial test function for libfoo
-
-   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/pdemo/longer_file_name_hell2.c 
b/tests/pdemo/longer_file_name_hell2.c
deleted file mode 100644
index d3468ca..0000000
--- a/tests/pdemo/longer_file_name_hell2.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* longer_file_name_hell2.c -- trivial test function for libfoo
-   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/pdemo/longer_file_name_hello.c 
b/tests/pdemo/longer_file_name_hello.c
deleted file mode 100644
index a7847fa..0000000
--- a/tests/pdemo/longer_file_name_hello.c
+++ /dev/null
@@ -1,36 +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.
-*/
-
-#define _LIBFOO_COMPILATION
-#include "foo.h"
-#undef _LIBFOO_COMPILATION
-
-#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/pdemo/longer_file_name_main.c 
b/tests/pdemo/longer_file_name_main.c
deleted file mode 100644
index 572ca4b..0000000
--- a/tests/pdemo/longer_file_name_main.c
+++ /dev/null
@@ -1,47 +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 (foo2() != FOO_RET)
-    return 1;
-
- if (hello () != HELLO_RET)
-    return 2;
-
-  return 0;
-}
diff --git a/tests/pic_flag.at b/tests/pic_flag.at
index 20beec0..c72593b 100644
--- a/tests/pic_flag.at
+++ b/tests/pic_flag.at
@@ -44,10 +44,17 @@ if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then 
:; else
   CXX_pic_flag=
 fi
 
-AT_CHECK([test . != "$at_srcdir" || exit 77])
+# Set up a tests/demo.at style project.
+_LT_DEMO_SETUP
+
+# Bootstrap, and configure it so that we can extract libtool --config
+# settings.
+LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
+    [ignore], [ignore])
+
 LT_AT_CONFIGURE([lt_cv_prog_compiler_pic="$C_pic_flag" ]dnl
                [lt_cv_prog_compiler_pic_CXX="$CXX_pic_flag"],
-               ["$abs_top_srcdir"/configure --disable-silent-rules])
+               [./configure])
 : ${MAKE=make}
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([if ./libtool --features | grep 'enable shared libraries'; then ]dnl
diff --git a/tests/quote.test b/tests/quote.test
deleted file mode 100755
index bff8280..0000000
--- a/tests/quote.test
+++ /dev/null
@@ -1,136 +0,0 @@
-#! /bin/sh
-# quote.test - make sure that shell metacharacters do not blow up libtool
-#
-#   Copyright (C) 2003-2005, 2008, 2011-2012 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
-
-# Do the torture test.
-status=$EXIT_SUCCESS
-
-case $1 in
-  --no-reexec)
-    ;;
-  *)
-    func_get_config "SHELL" "$LIBTOOL --config"
-    exec $SHELL "$0" --no-reexec ${1+"$@"}
-    ;;
-esac
-
-func_get_config "ECHO wl" "$LIBTOOL --config"
-
-for mode in compile link install; do
-  echo "== $mode mode"
-
-  # Unfortunately, without an array data type, it is nearly impossible
-  # to protect libtool from metacharacters in filenames.  So, we just
-  # try metacharacters in the options it needs to pass to other programs.
-
-  # preargs and postargs need to go through libtool unmodified.
-  case $mode in
-  compile)
-    preargs="$CC -c"
-    preflag=
-    match_preflag=
-    flag=-DVAR=
-    postargs=foo.c
-    ;;
-
-  link)
-    preargs="$CC -o hell -g -O"
-    preflag=-Wl,
-    match_preflag=$wl
-    flag=-someflag=
-    postargs=foo.o
-    ;;
-
-  install)
-    preargs="install -c"
-    preflag=
-    match_preflag=
-    flag=--something=
-    postargs="hell /usr/local/bin/hell"
-    ;;
-  esac
-
-  # Trivial.
-  echo "= trying: no quoting"
-  result=`$LIBTOOL -n --mode=$mode $preargs $preflag"$flag:test" $postargs` || 
status=$EXIT_FAILURE
-  # We used to have the contents of $match in the case statement,
-  # without an intermediate variable, but it would fail on at least
-  # Solaris' and HP-UX's /bin/sh.  Ugh!
-  # We must not attempt to match $preargs in the output, because libtool
-  # may modify them.  For example, on Cygwin, ``libtool --mode=link gcc -o
-  # foo foo.o''  becomes ``gcc -o foo.exe foo.o''.
-  match="$match_preflag$flag:test "
-  case $result in
-  *"$match"*)
-    $ECHO "= passed: $result"
-    ;;
-  *)
-    $ECHO "= failed: $result"
-    status=$EXIT_FAILURE
-    ;;
-  esac
-
-  # Metacharacters that should be backslashified.
-  for mchar in \\ \" \` \$; do
-    $ECHO "= trying: \\$mchar quoting"
-    result=`$LIBTOOL -n --mode=$mode $preargs $preflag"$flag$mchar:test$mchar" 
$postargs` || status=$EXIT_FAILURE
-    match="$match_preflag$flag\\$mchar:test\\$mchar "
-    alt_match="$match_preflag\"$flag\\$mchar:test\\$mchar\" "
-    case $result in
-    *"$match"*)
-      $ECHO "= passed: $result"
-      ;;
-    *"$alt_match"*)
-      $ECHO "= passed (harmless ksh bug): $result"
-      ;;
-    *)
-      $ECHO "= failed: $result"
-      status=$EXIT_FAILURE
-      ;;
-    esac
-  done
-
-  # Metacharacters that should be double quoted.
-  for mchar in "[" "]" "~" "#" "^" "&" "*" "(" ")" "{" "}" "|" ";" "<" ">" "?" 
\
-      "'" " " "        "; do
-
-    $ECHO "= trying: \"$mchar\" quoting"
-    result=`$LIBTOOL -n --mode=$mode $preargs $preflag"$flag$mchar:test$mchar" 
$postargs` || status=$EXIT_FAILURE
-    match="$match_preflag\"$flag$mchar:test$mchar\" "
-    case $result in
-    *"$match"*)
-      $ECHO "= passed: $result"
-      ;;
-    *)
-      $ECHO "= failed: $result"
-      status=$EXIT_FAILURE
-      ;;
-    esac
-  done
-done
-
-exit $status
diff --git a/tests/suffix.test b/tests/suffix.test
deleted file mode 100755
index b06cb22..0000000
--- a/tests/suffix.test
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-# suffix.test - check that libtool knows how to transform source suffices.
-#
-#   Copyright (C) 2003-2004, 2007-2008, 2011-2012 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.
-####
-
-# Extensions taken from the ones that Automake recognizes, plus Objective C,
-# and GNU Ada.  Also test that multiple dots are handled correctly.
-extensions="C F S ada adb ads asm c c++ cc cpp cxx f f90 F90 f95 F95 f03 F03 
for go m s sx ada.ada"
-bad_names=foo.
-
-. tests/defs || exit 1
-
-status=$EXIT_SUCCESS
-for ext in $extensions; do
-  # Try a sample compile command.
-  if ($LIBTOOL -n --mode=compile compiler -c foo.$ext 2>&1; exit 0) | grep 
'cannot'; then
-    status=$EXIT_FAILURE
-  else
-    echo "recognized foo.$ext as a valid source file"
-  fi
-done
-
-# Make sure that invalid suffixes are not recognized.
-for name in $bad_names; do
-  if ($LIBTOOL -n --mode=compile compiler -c $name 2>&1; exit 0) | grep 
'cannot'; then :
-  else
-    echo "incorrectly recognized $name as a valid source file"
-    status=$EXIT_FAILURE
-  fi
-done
-
-exit $status
diff --git a/tests/tagdemo-conf.test b/tests/tagdemo-conf.test
deleted file mode 100755
index 96dfc3a..0000000
--- a/tests/tagdemo-conf.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# tagdemo-conf.test - try configuring the tagdemo 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/tagdemo"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-exit 0
diff --git a/tests/tagdemo-exec.test b/tests/tagdemo-exec.test
deleted file mode 100755
index 6f90109..0000000
--- a/tests/tagdemo-exec.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# tagdemo-exec.test - check that programs in the tagdemo 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 "tagdemo-make" "tests/tagdemo/tagdemo$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/tagdemo/tagdemo$EXEEXT"
-
-exit $exec_status
diff --git a/tests/tagdemo-make.test b/tests/tagdemo-make.test
deleted file mode 100755
index 235dc7f..0000000
--- a/tests/tagdemo-make.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# tagdemo-make.test - try building in the tagdemo 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 "tagdemo-conf" "tests/tagdemo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/tagdemo"
-func_make
-
-exit 0
diff --git a/tests/tagdemo-shared-exec.test b/tests/tagdemo-shared-exec.test
deleted file mode 100755
index 43338b0..0000000
--- a/tests/tagdemo-shared-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/tagdemo-exec.test
diff --git a/tests/tagdemo-shared-make.test b/tests/tagdemo-shared-make.test
deleted file mode 100755
index 6add5f1..0000000
--- a/tests/tagdemo-shared-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/tagdemo-make.test
diff --git a/tests/tagdemo-shared.test b/tests/tagdemo-shared.test
deleted file mode 100755
index 6fe671f..0000000
--- a/tests/tagdemo-shared.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# tagdemo-shared.test - try configuring the tagdemo 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/tagdemo"
-func_make_distclean
-func_configure "--disable-static"
-func_check_static_shared "no" "yes"
-
-exit 0
diff --git a/tests/tagdemo-static-exec.test b/tests/tagdemo-static-exec.test
deleted file mode 100755
index 43338b0..0000000
--- a/tests/tagdemo-static-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/tagdemo-exec.test
diff --git a/tests/tagdemo-static-make.test b/tests/tagdemo-static-make.test
deleted file mode 100755
index 6add5f1..0000000
--- a/tests/tagdemo-static-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/tagdemo-make.test
diff --git a/tests/tagdemo-static.test b/tests/tagdemo-static.test
deleted file mode 100755
index 6c5785f..0000000
--- a/tests/tagdemo-static.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# tagdemo-static.test - try configuring tagdemo 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/tagdemo"
-func_make_distclean
-func_configure "--disable-shared"
-func_check_static_shared "yes" "no"
-
-exit 0
diff --git a/tests/tagdemo-undef-exec.test b/tests/tagdemo-undef-exec.test
deleted file mode 100755
index 43338b0..0000000
--- a/tests/tagdemo-undef-exec.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/tagdemo-exec.test
diff --git a/tests/tagdemo-undef-make.test b/tests/tagdemo-undef-make.test
deleted file mode 100755
index 6add5f1..0000000
--- a/tests/tagdemo-undef-make.test
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-. tests/defs || exit 1
-. $abs_srcdir/tests/tagdemo-make.test
diff --git a/tests/tagdemo-undef.test b/tests/tagdemo-undef.test
deleted file mode 100755
index 89d97cd..0000000
--- a/tests/tagdemo-undef.test
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/sh
-# tagdemo-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/tagdemo"
-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/tagdemo.at b/tests/tagdemo.at
new file mode 100644
index 0000000..3909d56
--- /dev/null
+++ b/tests/tagdemo.at
@@ -0,0 +1,395 @@
+# tagdemo.at -- C++ Language support.                   -*- Autotest -*-
+#
+#   Copyright (C) 2003-2005, 2011-2012 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([C++ language support.])
+
+
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[LT_AT_TAG([CXX])
+AT_KEYWORDS([libtool])
+
+AT_DATA([configure.ac],
+[[AC_INIT([tagdemo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_CXXCPP
+
+# Check for namespace support and new-style headers
+AC_LANG_PUSH([C++])
+AC_MSG_CHECKING([whether the compiler implements namespaces])
+AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[namespace A { namespace B { int i = 0; }}]],
+                    [[using namespace A::B; return i;]])],
+    [AC_MSG_RESULT([yes])
+     AC_DEFINE([HAVE_NAMESPACES],[1],
+              [define if the compiler implements namespaces])],
+    [AC_MSG_RESULT([no])])
+
+AC_MSG_CHECKING([whether the compiler has ISO C++ iostream])
+AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[#include <iostream>
+#ifdef HAVE_NAMESPACES
+using namespace std;
+#endif ]], [[cout << "bingo\n"; return 0;]])],
+    [AC_MSG_RESULT([yes])
+     AC_DEFINE([HAVE_IOSTREAM],[1],
+              [define if the compiler has ISO C++ iostream])],
+    [AC_MSG_RESULT([no])])
+AC_LANG_POP([C++])
+
+AC_LANG([C++])
+LT_INIT
+
+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 = libconv.la
+lib_LTLIBRARIES = libfoo.la libbaz.la
+
+libfoo_la_SOURCES = foo.cpp
+libfoo_la_LDFLAGS = -no-undefined
+libfoo_la_LIBADD = libconv.la $(LIBM)
+
+# Test some of the ILD support when using tagged configurations.
+libbaz_la_SOURCES = baz.cpp
+libbaz_la_LDFLAGS = -no-undefined
+libbaz_la_LIBADD = libfoo.la
+
+# Test convenience libraries.
+libconv_la_SOURCES = conv.cpp
+libconv_la_LDFLAGS = -no-undefined
+
+noinst_HEADERS = foo.h baz.h conv.h
+
+bin_PROGRAMS = tagdemo
+
+tagdemo_SOURCES = main.cpp
+tagdemo_LDADD = libbaz.la libfoo.la
+
+libtool: $(LIBTOOL_DEPS)
+       $(SHELL) ./config.status --recheck
+]])
+
+AT_DATA([main.cpp],
+[[#include <config.h>
+#if HAVE_IOSTREAM
+# include <iostream>
+#else
+# include <iostream.h>
+#endif
+
+#include "foo.h"
+#include "baz.h"
+#include "conv.h"
+
+#if HAVE_NAMESPACES
+namespace std { }
+using namespace std;
+#endif
+
+int main (int, char *[])
+{
+  cout << "Welcome to GNU libtool tagdemo C++!" << endl;
+
+  foobar_derived FB;
+  // Instantiate the derived class.
+
+  foobar *fb = &FB;
+  // Have some fun with polymorphism.
+
+  int value = fb->hello();
+
+  cout << "foobar::hello returned: " << value << endl;
+  if (value = HELLO_RET)
+    cout << "foobar::hello is ok!" << endl;
+
+  if (fb->foo() == FOO_RET)
+    cout << "foobar::foo is ok!" << endl;
+
+  // --------------
+
+  barbaz_derived BB;
+  // Instantiate the derived class.
+
+  barbaz *bb = &BB;
+  // Have some fun with polymorphism.
+
+  // barbaz_derived::baz() should return FOO_RET since it calls
+  // foobar_derived::foo(), which in turn calls ::foo().
+  if (bb->baz() == FOO_RET)
+    cout << "barbaz::baz is ok!" << endl;
+
+  // --------------
+
+  if (convenience())
+    cout << "convenience is ok!" << endl;
+
+  return 0;
+}
+]])
+
+AT_DATA([foo.h],
+[[#ifndef FOO_H
+#define FOO_H
+// Silly constants that the functions return.
+#define HELLO_RET 0xe110
+#define FOO_RET 0xf00
+
+// Our C test functions.
+extern "C"
+{
+  int foo(void);
+  int hello(void);
+}
+
+// Our test C++ base class.
+class foobar
+{
+public:
+  virtual int foo(void) = 0;
+  virtual int hello(void) = 0;
+  // Some dummy pure virtual functions.
+};
+
+
+// Our test C++ derived class.
+class foobar_derived : public foobar
+{
+public:
+  virtual int foo(void);
+  virtual int hello(void);
+  // Override the base class' pure virtual functions.
+};
+
+#endif
+]])
+
+AT_DATA([foo.cpp],
+[[#include <config.h>
+#ifdef HAVE_IOSTREAM
+# include <iostream>
+#else
+# include <iostream.h>
+#endif
+
+#ifdef HAVE_NAMESPACES
+namespace std { }
+using namespace std;
+#endif
+
+#include <math.h>
+
+#include "foo.h"
+
+// Our C functions.
+int
+foo(void)
+{
+  cout << "cos (0.0) = " << (double) cos ((double) 0.0) << endl;
+  return FOO_RET;
+}
+
+int
+hello(void)
+{
+  cout << "** This is libfoo (tagdemo) **" << endl;
+  return HELLO_RET;
+}
+
+
+// --------------------------------------------------------------------
+// Our C++ derived class methods.
+
+
+int
+foobar_derived::foo(void)
+{
+  return ::foo();
+}
+
+int
+foobar_derived::hello(void)
+{
+  return ::hello();
+}
+]])
+
+AT_DATA([baz.h],
+[[#ifndef BAZ_H
+#define BAZ_H 1
+
+// Our test C++ base class.
+class barbaz
+{
+public:
+  virtual int baz(void) = 0;
+  // Some dummy pure virtual functions.
+};
+
+// Our test C++ derived class.
+class barbaz_derived : public barbaz
+{
+public:
+  virtual int baz(void);
+  // Override the base class' pure virtual functions.
+};
+
+#endif
+]])
+
+AT_DATA([baz.cpp],
+[[#include <config.h>
+
+#include "foo.h"
+#include "baz.h"
+
+// --------------------------------------------------------------------
+// Our C++ derived class methods.
+
+
+int
+barbaz_derived::baz(void)
+{
+  foobar_derived FB;
+
+  return FB.foo();
+}
+]])
+
+AT_DATA([conv.h],
+[[#ifndef CONV_H
+#define CONV_H
+
+// Our C test functions.
+extern "C"
+{
+  int convenience(void);
+}
+
+#endif
+]])
+
+AT_DATA([conv.cpp],
+[[#include <config.h>
+
+#include "conv.h"
+
+//Our C function.
+int convenience (void) { return 1; }
+]])
+
+AT_DATA([expout],
+[[Welcome to GNU libtool tagdemo C++!
+** This is libfoo (tagdemo) **
+foobar::hello returned: 57616
+foobar::hello is ok!
+cos (0.0) = 1
+foobar::foo is ok!
+cos (0.0) = 1
+barbaz::baz is ok!
+convenience is ok!
+]])
+
+prefixdir=`pwd`/_inst
+]) # _LT_SETUP
+
+
+## --------------- ##
+## Tagdemo static. ##
+## --------------- ##
+
+AT_SETUP([static library])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-shared],
+                   [^build_old_libs=yes], [^build_libtool_libs=no])
+LT_AT_CHECK_EXECUTE([], [./tagdemo])
+
+AT_CLEANUP
+
+
+## --------------- ##
+## Tagdemo shared. ##
+## --------------- ##
+
+AT_SETUP([shared library])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([--disable-static],
+                   [^build_old_libs=no], [^build_libtool_libs=yes])
+LT_AT_CHECK_EXECUTE([], [./tagdemo])
+
+AT_CLEANUP
+
+
+## ------------- ##
+## Tagdemo conf. ##
+## ------------- ##
+
+AT_SETUP([shared and static together])
+
+_LT_SETUP
+
+LT_AT_CHECK_CONFIG([],
+                   [^build_old_libs=yes], [^build_libtool_libs=yes])
+LT_AT_CHECK_EXECUTE([], [./tagdemo])
+
+AT_CLEANUP
+
+
+## -------------- ##
+## Tagdemo undef. ##
+## -------------- ##
+
+AT_SETUP([allow_undefined_flag])
+
+_LT_SETUP
+
+LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
+                [--disable-static], [ignore])
+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([], [./tagdemo])
+
+
+AT_CLEANUP
diff --git a/tests/tagdemo/.gitignore b/tests/tagdemo/.gitignore
deleted file mode 100644
index 7451dd9..0000000
--- a/tests/tagdemo/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/tagdemo
diff --git a/tests/tagdemo/Makefile.am b/tests/tagdemo/Makefile.am
deleted file mode 100644
index 71a7825..0000000
--- a/tests/tagdemo/Makefile.am
+++ /dev/null
@@ -1,63 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-##   Copyright (C) 2003, 2004, 2005, 2011 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 = libconv.la
-lib_LTLIBRARIES = libfoo.la libbaz.la
-
-libfoo_la_SOURCES = foo.cpp
-libfoo_la_LDFLAGS = -no-undefined
-libfoo_la_LIBADD = libconv.la $(LIBM)
-
-# Test some of the ILD support when using tagged configurations.
-libbaz_la_SOURCES = baz.cpp
-libbaz_la_LDFLAGS = -no-undefined
-libbaz_la_LIBADD = libfoo.la
-
-# Test convenience libraries.
-libconv_la_SOURCES = conv.cpp
-libconv_la_LDFLAGS = -no-undefined
-
-noinst_HEADERS = foo.h baz.h conv.h
-
-bin_PROGRAMS = tagdemo
-
-tagdemo_SOURCES = main.cpp
-tagdemo_LDADD = libbaz.la 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/tagdemo/README b/tests/tagdemo/README
deleted file mode 100644
index b82576d..0000000
--- a/tests/tagdemo/README
+++ /dev/null
@@ -1,6 +0,0 @@
-This directory contains a sample package that demonstrates the use of
-GNU Libtool's multi-language support through the use of configuration
-tags.  It requires GNU autoconf, automake and of course libtool.
-
-The demonstration generates a library from C++ sources, which is then
-linked to a C++ program.
diff --git a/tests/tagdemo/baz.cpp b/tests/tagdemo/baz.cpp
deleted file mode 100644
index 2e47e3e..0000000
--- a/tests/tagdemo/baz.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// -*- C++ -*-
-//    baz.cpp -- a slightly more complicated test library
-//
-//    Copyright (C) 1998-2000 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 "baz.h"
-
-// --------------------------------------------------------------------
-// Our C++ derived class methods.
-
-
-int
-barbaz_derived::baz(void)
-{
-  foobar_derived FB;
-
-  return FB.foo();
-}
diff --git a/tests/tagdemo/baz.h b/tests/tagdemo/baz.h
deleted file mode 100644
index 2737a2c..0000000
--- a/tests/tagdemo/baz.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- C++ -*-
-//    baz.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 _BAZ_H_
-#define _BAZ_H_ 1
-
-// Our test C++ base class.
-class barbaz
-{
-public:
-  virtual int baz(void) = 0;
-  // Some dummy pure virtual functions.
-};
-
-
-// Our test C++ derived class.
-class barbaz_derived : public barbaz
-{
-public:
-  virtual int baz(void);
-  // Override the base class' pure virtual functions.
-};
-
-#endif /* !_FOO_H_ */
diff --git a/tests/tagdemo/configure.ac b/tests/tagdemo/configure.ac
deleted file mode 100644
index 36f3591..0000000
--- a/tests/tagdemo/configure.ac
+++ /dev/null
@@ -1,96 +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([tagdemo], [1.0], address@hidden)
-AC_CONFIG_SRCDIR([foo.cpp])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-AC_CANONICAL_TARGET
-
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ---------------- ##
-## Compiler checks. ##
-## ---------------- ##
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_CC_C_O
-
-AC_PROG_CXX
-AC_PROG_CXXCPP
-
-# Check for namespace support and new-style headers
-AC_LANG_PUSH([C++])
-AC_MSG_CHECKING([whether the compiler implements namespaces])
-AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[namespace A { namespace B { int i = 0; }}]],
-                    [[using namespace A::B; return i;]])],
-    [AC_MSG_RESULT([yes])
-     AC_DEFINE([HAVE_NAMESPACES],[1],
-              [define if the compiler implements namespaces])],
-    [AC_MSG_RESULT([no])])
-
-AC_MSG_CHECKING([whether the compiler has ISO C++ iostream])
-AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <iostream>
-#ifdef HAVE_NAMESPACES
-using namespace std;
-#endif ]], [[cout << "bingo\n"; return 0;]])],
-    [AC_MSG_RESULT([yes])
-     AC_DEFINE([HAVE_IOSTREAM],[1],
-              [define if the compiler has ISO C++ iostream])],
-    [AC_MSG_RESULT([no])])
-AC_LANG_POP([C++])
-
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-
-# Set the test language to C++.
-AC_LANG([C++])
-LT_INIT
-
-
-## ------------------------------ ##
-## Libraries required by tagdemo. ##
-## ------------------------------ ##
-LT_LIB_M
-
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/tagdemo/conv.cpp b/tests/tagdemo/conv.cpp
deleted file mode 100644
index 44f7000..0000000
--- a/tests/tagdemo/conv.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// -*- C++ -*-
-//    conv.cpp -- trivial convenience test library
-//
-//    Copyright (C) 1998-2000 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 "conv.h"
-
-// Our C functions.
-int
-convenience(void)
-{
-  return 1;
-}
diff --git a/tests/tagdemo/conv.h b/tests/tagdemo/conv.h
deleted file mode 100644
index 56ff71b..0000000
--- a/tests/tagdemo/conv.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- C++ -*-
-//    conv.h -- part of the 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 _CONV_H_
-#define _CONV_H_ 1
-
-// Our C test functions.
-extern "C"
-{
-  int convenience(void);
-}
-
-#endif /* !_CONV_H_ */
diff --git a/tests/tagdemo/foo.cpp b/tests/tagdemo/foo.cpp
deleted file mode 100644
index 2572619..0000000
--- a/tests/tagdemo/foo.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// -*- C++ -*-
-//    foo.cpp -- trivial test library
-//
-//    Copyright (C) 1998-2000, 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"
-#ifdef HAVE_IOSTREAM
-# include <iostream>
-#else
-# include <iostream.h>
-#endif
-#ifdef HAVE_NAMESPACES
-namespace std { }
-using namespace std;
-#endif
-
-#include <math.h>
-
-// Our C functions.
-int
-foo(void)
-{
-  cout << "cos (0.0) = " << (double) cos ((double) 0.0) << endl;
-  return FOO_RET;
-}
-
-int
-hello(void)
-{
-  cout << "** This is libfoo (tagdemo) **" << endl;
-  return HELLO_RET;
-}
-
-
-// --------------------------------------------------------------------
-// Our C++ derived class methods.
-
-
-int
-foobar_derived::foo(void)
-{
-  return ::foo();
-}
-
-int
-foobar_derived::hello(void)
-{
-  return ::hello();
-}
diff --git a/tests/tagdemo/foo.h b/tests/tagdemo/foo.h
deleted file mode 100644
index e7d6746..0000000
--- a/tests/tagdemo/foo.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*- C++ -*-
-//    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
-
-// Our C test functions.
-extern "C"
-{
-  int foo(void);
-  int hello(void);
-}
-
-// Our test C++ base class.
-class foobar
-{
-public:
-  virtual int foo(void) = 0;
-  virtual int hello(void) = 0;
-  // Some dummy pure virtual functions.
-};
-
-
-// Our test C++ derived class.
-class foobar_derived : public foobar
-{
-public:
-  virtual int foo(void);
-  virtual int hello(void);
-  // Override the base class' pure virtual functions.
-};
-
-#endif /* !_FOO_H_ */
diff --git a/tests/tagdemo/main.cpp b/tests/tagdemo/main.cpp
deleted file mode 100644
index ea642c3..0000000
--- a/tests/tagdemo/main.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// -*- C++ -*-
-//    main.cpp -- tagdemo test program
-//
-//    Copyright (C) 1998-2000 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 "baz.h"
-#include "conv.h"
-#ifdef HAVE_IOSTREAM
-# include <iostream>
-#else
-# include <iostream.h>
-#endif
-#ifdef HAVE_NAMESPACES
-namespace std { }
-using namespace std;
-#endif
-
-
-int
-main (int, char *[])
-{
-  cout << "Welcome to GNU libtool tagdemo C++!" << endl;
-
-  foobar_derived FB;
-  // Instantiate the derived class.
-
-  foobar *fb = &FB;
-  // Have some fun with polymorphism.
-
-  int value = fb->hello();
-
-  cout << "foobar::hello returned: " << value << endl;
-  if (value == HELLO_RET)
-    cout << "foobar::hello is ok!" << endl;
-
-  if (fb->foo() == FOO_RET)
-    cout << "foobar::foo is ok!" << endl;
-
-  // --------------
-
-  barbaz_derived BB;
-  // Instantiate the derived class.
-
-  barbaz *bb = &BB;
-  // Have some fun with polymorphism.
-
-
-  // barbaz_derived::baz() should return FOO_RET since it calls
-  // foobar_derived::foo(), which in turn calls ::foo().
-  if (bb->baz() == FOO_RET)
-    cout << "barbaz::baz is ok!" << endl;
-
-  // --------------
-
-  if (convenience())
-    cout << "convenience is ok!" << endl;
-
-  return 0;
-}
diff --git a/tests/tagtrace.test b/tests/tagtrace.test
deleted file mode 100755
index 27bea64..0000000
--- a/tests/tagtrace.test
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /bin/sh
-# tagtrace.test - check the LT_SUPPORTED_TAGS interface
-#
-#   Copyright (C) 2004-2005, 2011-2012 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.
-####
-
-. tests/defs || exit 1
-
-: ${fnord=$abs_srcdir/fnord$$}
-
-$AUTOCONF --version > /dev/null 2>&1 || func_skip "This test requires GNU 
Autoconf"
-if touch $fnord; then
-  rm $fnord
-else
-  func_skip "This test requires write access to the source tree"
-fi
-
-( cd "$abs_srcdir" && $AUTOCONF --trace 'LT_SUPPORTED_TAG:$1' ) >/dev/null
-ret=$?
-if test 63 -eq "$ret" || test 1 -eq "$ret"; then
-  func_error "This test requires the same Autoconf version"
-  func_skip  "as the one that was used to bootstrap Libtool"
-elif test 0 -ne "$ret"; then
-  func_fatal_error "\`$AUTOCONF --trace' exited $ret"
-fi
-
-# Abort as soon as something fails.
-set -e
-
-# Retrieve the list of tags supported by our main libtool script.
-traced_tags=`cd "$abs_srcdir" && $AUTOCONF --trace 'LT_SUPPORTED_TAG:$1'`
-
-test -n "$traced_tags"
-
-# Ensure each of them is accepted by --tag.
-# (We do some useless operation like erasing an empty file, because
-# we are just interested in whether --tag accepts the tag or not.)
-for tag in $traced_tags; do
-  $LIBTOOL -n --mode=link --tag=$tag compiler -o liba.la foo.lo >output 2>&1
-  cat output
-  if grep 'ignoring unknown tag' output; then
-    exit $EXIT_FAILURE
-  else
-    :
-  fi
-done
-
-# Ensure the above command would have failed for unknown tags
-$LIBTOOL -n --mode=link --tag=UnKnOwN compiler -o liba.la foo.lo >output 2>&1
-cat output
-grep 'ignoring unknown tag' output
-
-rm -f output
diff --git a/tests/testsuite.at b/tests/testsuite.at
index bb4b875..60ff5d5 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -36,6 +36,7 @@ for tool in ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF; 
do
 done
 export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF
 eval `$LIBTOOL --config | grep '^EGREP='`
+eval `$LIBTOOL --config | $EGREP '^(FGREP|objdir|objext)'`
 eval `$LIBTOOL --config | $EGREP 
'^(host|host_os|host_alias|build|build_alias|to_host_file_cmd|to_tool_file_cmd)='`
 configure_options=--prefix=/nonexistent
 if test -n "$host_alias"; then
@@ -208,6 +209,47 @@ 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_CHECK_EXECUTE([TARGETS], [PROGRAM], ...)
+# ----------------------------------------------
+# Run the listed make rules, and check that the following PROGRAMs work.
+m4_define([LT_AT_CHECK_EXECUTE],
+[LT_AT_MAKE([$1])
+m4_if([$#], 0, [],
+      [$#], 1, [], [$0_(m4_shift($@))])
+])
+m4_define([LT_AT_CHECK_EXECUTE_],
+[LT_AT_EXEC_CHECK([$1], 0, [expout])
+m4_if([$#], 1, [], [$0(m4_shift($@))])
+])
+
+
+# LT_AT_CHECK_UNINSTALL
+# ---------------------
+# Make sure uninstallation is complete.
+m4_define([LT_AT_CHECK_UNINSTALL],
+[LT_AT_MAKE([uninstall])
+
+leftovers=`find $prefixdir ! -type d ! -name '.*' -print`
+AT_CHECK([test -z "$leftovers"])
+])
+
+
 # LT_AT_HOST_DATA(FILE, CONTENTS)
 # -------------------------------
 # Ensure correct line ending for expected output of host executables.
diff --git a/tests/with-pic.at b/tests/with-pic.at
index 915acf5..2ffbd03 100644
--- a/tests/with-pic.at
+++ b/tests/with-pic.at
@@ -22,6 +22,14 @@
 ####
 
 AT_SETUP([test --with-pic])
+
+# Set up a tests/demo.at style project.
+_LT_DEMO_SETUP
+
+# Bootstrap, and configure it so that we can extract libtool --config
+# settings.
+LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
+    [], [ignore])
 eval `$LIBTOOL --config | $EGREP '^(pic_flag|FGREP)='`
 
 real_pic=false
@@ -31,25 +39,24 @@ esac
 AT_CHECK([$real_pic || exit 77])
 AT_CHECK([test . != "$at_srcdir" || exit 77])
 
-CONFIGURE=$abs_top_srcdir/tests/demo/configure
 : ${MAKE=make}
 
-LT_AT_CONFIGURE([--disable-shared --with-pic=no], [$CONFIGURE])
+LT_AT_CONFIGURE([--disable-shared --with-pic=no])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([$FGREP -v "$pic_flag" stdout], [], [ignore], [ignore])
 $MAKE clean
 
-LT_AT_CONFIGURE([--disable-shared --with-pic=yes], [$CONFIGURE])
+LT_AT_CONFIGURE([--disable-shared --with-pic=yes])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([$FGREP "$pic_flag" stdout], [], [ignore], [ignore])
 $MAKE clean
 
-LT_AT_CONFIGURE([--disable-shared --with-pic="demo,foo,bar"], [$CONFIGURE])
+LT_AT_CONFIGURE([--disable-shared --with-pic="demo,foo,bar"])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([$FGREP "$pic_flag" stdout], [], [ignore], [ignore])
 $MAKE clean
 
-LT_AT_CONFIGURE([--disable-shared --with-pic="foo,bar"], [$CONFIGURE])
+LT_AT_CONFIGURE([--disable-shared --with-pic="foo,bar"])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([$FGREP -v "$pic_flag" stdout], [], [ignore], [ignore])
 $MAKE clean


hooks/post-receive
-- 
GNU Libtool



reply via email to

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