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-112-gf9fe50d


From: Gary V. Vaughan
Subject: [SCM] GNU Libtool branch, master, updated. v2.4.2-112-gf9fe50d
Date: Fri, 18 Nov 2011 02:42:13 +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  f9fe50d499e261d63123464d7ceb87b1c0619753 (commit)
       via  be51bfc53f39f1afc841a3cf7bc805d451515efa (commit)
       via  9cbe6b7f69dc08baeaa588f895ef3d3a3fd77729 (commit)
       via  edc6becf8856b21c8ce9e2f1b73ac58e67b361f4 (commit)
       via  d7919d50d00fa45768d80cbd39fb89e9e3be6344 (commit)
       via  460eb0638aa84cb44734f90531c90354b3c2840d (commit)
       via  e628dd85c18f06d0e0c85a9459410341e8502701 (commit)
       via  42c96694c18cec1eefdf622a94fbef3fa3499ea1 (commit)
       via  e3a2b48d8eeff1a9f9a17c5121453eca5baa71b1 (commit)
       via  2c0e68f058ebc36df0f581ab1232ac702f7e5a7a (commit)
       via  176ed6112974a072dfb0ff430fb6c2d9caf1f634 (commit)
       via  b5c821f6801f76ffcdf84369c69990082a2e097e (commit)
       via  d48e2355a38d9ea744f22f9c67c2002216d96f44 (commit)
       via  baf75223ff46efda8c86ae7fce05d3e77481c498 (commit)
       via  407cea5ebb78f144193f8d63716bb8ba8078b21a (commit)
       via  9aad3ebb014fa00c7361c4e9f60926bc08fdd62a (commit)
       via  f7f2fac6b265a31d4ba498644a8ce3104ed68fde (commit)
       via  0574d54b16271d2c849006f3b2a2eaae98c4e2ad (commit)
       via  e3fd7eb0b99575bf3101d0dd454083bb10cf9619 (commit)
       via  40adfb1b85e3a1d03b43367f8671176cdadf9d02 (commit)
       via  196ceeca0473f4e97e85d1402f600f098bc77988 (commit)
       via  8a7e35d988c8f80b19ecbf247b63b3f5a13b1b4a (commit)
       via  f3e71d08e878bdb7408d763f745b70bb34078af0 (commit)
       via  abc2b152d3e8a7427123cd651d888a6b3a6e5fde (commit)
       via  dbc76d2f97a9a689ecf4a37e6e64e7eb3d468d18 (commit)
       via  aa2b2b71fa04097cab30398ee5e5f99ad894773b (commit)
       via  cd1292f5bcd4bf2fbcb637e4cdb2338d2db56a63 (commit)
       via  435cb8d7140c33ffb42d2782f68d47d5833a5015 (commit)
       via  e993037093901c25a6eeb599a69c8bba444d3c7d (commit)
       via  bcdfe9f2731f378e9706d2455e765b3d79a454ee (commit)
       via  76fff42c2acd846eae5b4e05ba318ec6213f9eed (commit)
       via  0c19864f3d5bb8f5b7cdeb2e8c2ef4d201b4bfd1 (commit)
       via  5e07c2fc650ba3917aaa300d345fba7b0fdc1a08 (commit)
       via  eb82543f615145b78d2185c45b1abd98d0abf79b (commit)
       via  4e671d6ba69c889b1f9aee12de6c504d26dc6514 (commit)
      from  3e7c10eb673bd7ed271c5cd89df8e44e3cec962d (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 f9fe50d499e261d63123464d7ceb87b1c0619753
Author: Gary V. Vaughan <address@hidden>
Date:   Tue Nov 15 19:48:16 2011 +0700

    dist: hook syntax-check into `make distcheck'.
    
    To make sure we don't accidentally release anything with
    failing syntax-checks, have `make distcheck' run the
    syntax-checks automatically.
    * Makefile.am (distcheck-hook): New rule depending on
    syntax-check.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit be51bfc53f39f1afc841a3cf7bc805d451515efa
Author: Gary V. Vaughan <address@hidden>
Date:   Tue Oct 25 16:57:21 2011 +0700

    syntax-check: enable sc_prohibit_always_true_header_tests.
    
    * cfg.mk (local-checks-to-fix): Remove
    sc_prohibit_always_true_header_tests from list of disabled
    checks, because it no longer flags any violations.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 9cbe6b7f69dc08baeaa588f895ef3d3a3fd77729
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Oct 26 14:17:34 2011 +0700

    syntax-check: enable sc_program_name.
    
    * cfg.mk (local-checks-to-skip): Remove sc_program_name
    list of disabled checks.
    (exclude_file_name_regexp--sc_program_name): Don't check demo
    programs for use of set_program_name.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit edc6becf8856b21c8ce9e2f1b73ac58e67b361f4
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Oct 26 19:03:37 2011 +0700

    syntax-check: enable sc_bindtextdomain.
    
    * cfg.mk (local-checks-to-skip): Remove sc_bindtextdomain
    list of disabled checks.
    (exclude_file_name_regexp--sc_bindtextdomain): Don't check demo
    programs for use of bindtextdomain.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit d7919d50d00fa45768d80cbd39fb89e9e3be6344
Author: Gary V. Vaughan <address@hidden>
Date:   Tue Oct 25 11:16:02 2011 +0700

    syntax-check: fix violations and implement sc_trailing_blank-non-rfc3676.
    
    * cfg.mk (local-checks-to-fix): Move sc_trailing_blank from
    here...
    (local-checks-to-skip): ...to here, because otherwise it flags
    valid RFC3676 signature blocks.
    (sc_trailing_blank-non-rfc3676): An improved sc_trailing_blank
    implementation that doesn't flag signature blocks as violations.
    * Makefile.am, bootstrap.conf, doc/PLATFORMS,
    libltdl/config/ltmain.m4sh, libltdl/m4/libtool.m4,
    libltdl/m4/lt~obsolete.m4, tests/archive-in-archive.at,
    tests/convenience.at, tests/darwin.at, tests/depdemo/l1/l1.c,
    tests/depdemo/l2/l2.c, tests/depdemo/l3/l3.c,
    tests/depdemo/l4/l4.c, tests/f77demo/README,
    tests/f77demo/cprogram.c, tests/f77demo/foof.f,
    tests/f77demo/foof2.f, tests/f77demo/foof3.f,
    tests/f77demo/fprogram.f, tests/fcdemo/README,
    tests/fcdemo/cprogram.c, tests/fcdemo/foof.f90,
    tests/fcdemo/foof2.f90, tests/fcdemo/foof3.f90,
    tests/fcdemo/fprogram.f90, tests/mdemo/README,
    tests/mdemo/main.c, tests/mdemo/mlib.c, tests/objectlist.test,
    tests/static.at, tests/template.at, tests/testsuite.at: Remove
    trailing blanks.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 460eb0638aa84cb44734f90531c90354b3c2840d
Author: Gary V. Vaughan <address@hidden>
Date:   Tue Oct 25 12:00:58 2011 +0700

    syntax-check: fix violations and re-enable sc_useless_cpp_parens.
    
    * cfg.mk (local-checks-to-fix): Remove sc_useless_cpp_parens
    from list of disabled checks.
    * doc/libtool.texi, libltdl/argz.c, libltdl/argz_.h,
    build-aux/ltmain.m4sh, libltdl/libltdl/lt__alloc.h,
    libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h,
    libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h,
    libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
    libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h,
    libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
    libltdl/loaders/dyld.c, libltdl/loaders/loadlibrary.c,
    libltdl/loaders/shl_load.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
    libltdl/ltdl.c, libltdl/ltdl.h, libltdl/m4/libtool.m4, tests/demo/foo.h,
    tests/depdemo/sysdep.h, tests/exceptions.at, tests/export.at,
    tests/pdemo/foo.h, tests/stresstest.at: Remove useless parens in cpp
    `#if defined(foo)' statements.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit e628dd85c18f06d0e0c85a9459410341e8502701
Author: Gary V. Vaughan <address@hidden>
Date:   Tue Oct 25 09:34:11 2011 +0700

    syntax-check: fix violations and re-enable sc_space_tab.
    
    * cfg.mk (local-checks-to-fix): Remove sc_space_tab from list of
    disabled checks.
    (exclude_file_name_regexp--sc_space_tab): Don't flag space-tab
    sequences in diff files as an error.
    * Makefile.am, build-aux/general.m4sh, build-aux/git-hooks/commit-msg,
    build-aux/ltmain.m4sh, libltdl/loaders/dyld.c,
    libltdl/loaders/shl_load.c, libltdl/ltdl.h, libltdl/ltdl.mk,
    libltdl/slist.c, libtoolize.m4sh, m4/ltoptions.m4, tests/demo/dlmain.c,
    tests/depdemo/main.c, tests/libtoolize.at, tests/lt_dladvise.at,
    tests/pdemo/longer_file_name_dlmain.c, tests/sh.test, tests/static.at,
    tests/stresstest.at, tests/template.at: Fix space-tab sequences by
    reversing them in regexps, and deleting leading spaces in indentation.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 42c96694c18cec1eefdf622a94fbef3fa3499ea1
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 22:05:48 2011 +0700

    syntax-check: fix violations and re-enable sc_prohibit_undesirable_word_seq.
    
    * cfg.mk (local-checks-to-fix): Remove
    sc_prohibit_undesirable_word_seq from list of disabled checks.
    * doc/libtool.texi, build-aux/ltmain.m4sh,
    libltdl/m4/libtool.m4, libtoolize.m4sh: Replace all uses of "can
    not" with "cannot".
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit e3a2b48d8eeff1a9f9a17c5121453eca5baa71b1
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 21:51:24 2011 +0700

    syntax-check: fix violations and re-enable sc_probibit_test_minus_ao.
    
    * cfg.mk (local-checks-to-fix): Remove
    sc_probhibit_test_minus_ao from list of disabled checks.
    (exclude_file_name_regexp--sc_prohibit_tests_minus_ao): The
    matches from this syntax-check in libtool.m4 are all bogus.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 2c0e68f058ebc36df0f581ab1232ac702f7e5a7a
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 21:36:27 2011 +0700

    syntax-check: fix violations and re-enable sc_prohibit_strcmp.
    
    * cfg.mk (local-checks-to-fix): Remove sc_prohibit_strcmp
    from list of disabled checks.
    (exclude_file_name_regexp--sc_prohibit_strcmp): Ignore
    violations in libtool.texi and any demo C files.
    * libltdl/libltdl/lt__private.h (strneq, streq): Renamed from
    this...
    (STRNEQ, STREQ): ..to this.  Adjust all callers.
    * tests/slist.at: Add STREQ definition. Change all !strcmp calls
    to STREQ.
    * build-aux/ltmain.m4sh (func_emit_cwrapperexe_src): Add and use
    STREQ definition.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 176ed6112974a072dfb0ff430fb6c2d9caf1f634
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 18:52:57 2011 +0700

    syntax-check: fix violations and re-enable sc_prohibit_stddef_without_use.
    
    * cfg.mk (local-checks-to-fix): Remove
    sc_prohibit_stddef_without_use from list of disabled checks.
    * libltdl/argz.c, libltdl/lt__dirent.c, libltdl/slist.c: Remove
    spurious stddef.h #include lines.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit b5c821f6801f76ffcdf84369c69990082a2e097e
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 18:42:53 2011 +0700

    syntax-check: fix violations and re-enable sc_prohibit_magic_number_exit.
    
    * cfg.mk (local-checks-to-fix): Remove sc_prohibit_magic_number_exit
    from list of disabled checks.
    * ltmain.c: Removed unused file.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit d48e2355a38d9ea744f22f9c67c2002216d96f44
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 18:35:36 2011 +0700

    syntax-check: fix violations and re-enable sc_prohibit_have_config_h.
    
    * cfg.mk (local-checks-to-fix): Remove sc_prohibit_have_config_h
    from list of disabled checks.
    * tests/f77demo/foo.h, tests/fcdemo/foo.h: Remove spurious
    HAVE_CONFIG_H guards for #include <config.h>.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit baf75223ff46efda8c86ae7fce05d3e77481c498
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 18:29:45 2011 +0700

    syntax-check: fix violations and re-enable sc_prohibit_empty_lines_at_EOF.
    
    * cfg.mk (local-checks-to-fix): Remove
    sc_prohibit_empty_lines_at_EOF from list of disabled checks.
    * THANKS, libltdl/argz.c, libltdl/config/getopt.m4sh,
    tests/f77demo/README, tests/f77demo/cprogram.c,
    tests/f77demo/fprogram.f, tests/fcdemo/README,
    tests/fcdemo/cprogram.c, tests/libtoolize.at,
    tests/mdemo/README, tests/mdemo2/README, tests/pdemo-inst.test:
    Remove spurious empty lines from the end of these files.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 407cea5ebb78f144193f8d63716bb8ba8078b21a
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 18:24:11 2011 +0700

    syntax-check: fix violations and re-enable sc_prohibit_doubled_word.
    
    * cfg.mk (local-checks-to-fix): Remove sc_prohibit_doubled_word
    from list of disabled checks.
    * build-aux/general.m4sh (func_quote_for_eval): Remove one of a
     pair of "and"s in a comment.
    * tests/lt_dladvise.at (hint_global): Remove one of a pair of
    consecutive "to"s split across lines in a comment.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 9aad3ebb014fa00c7361c4e9f60926bc08fdd62a
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 18:20:58 2011 +0700

    syntax-check: fix violations and re-enable sc_prohibit_cvs_keyword.
    
    * cfg.mk (local-checks-to-fix): Remove sc_prohibit_cvs_keyword
    from list of disabled checks.
    * tests/tagdemo/README: Remove spurious CVS keyword.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit f7f2fac6b265a31d4ba498644a8ce3104ed68fde
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 18:03:23 2011 +0700

    syntax-check: fix violations and re-enable sc_makefile_at_at_check.
    
    At some point we were supporting some undetermined `broken
    make', as evidenced by having carried the following code since
    2003:
      ## use @LIBLTDL@ because some broken makes do not accept
      ## macros in targets, we can only do this because our LIBLTDL
      ## does not contain $(top_builddir).
      @LIBLTDL@: $(top_distdir)/libtool \
      ...
    However, we've also had *many* cases of macros in targets for
    just as long, so most likely we never fully supported makes
    allegedly broken in this way.  As of this release, we explicitly
    no longer support make implementations that do not accept macros
    in targets.
    * cfg.mk (local-checks-to-fix): Remove sc_makefile_at_at_check
    from list of disabled checks.
    * configure.ac (order-only prerequisites): Test with the
    order-only pipe symbol in a macro.
    * Makefile.am, tests/mdemo/Makefile.am: Convert all @FOO@ to
    $(FOO).
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 0574d54b16271d2c849006f3b2a2eaae98c4e2ad
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 16:35:00 2011 +0700

    syntax-check: fix violations and re-enable sc_makefile_TAB_only_indentation.
    
    * cfg.mk (local-checks-to-fix): Remove
    sc_makefile_TAB_only_indentation from list of disabled checks.
    * Makefile.am (libltdl/Makefile.am): Replace leading spaces with
    TABs.
    * libltdl/Makefile.am (libltdl_libltdl_la_SOURCES): Ditto.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit e3fd7eb0b99575bf3101d0dd454083bb10cf9619
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 16:29:54 2011 +0700

    syntax-check: fix violations and re-enable sc_m4_quote_check.
    
    * cfg.mk (local-checks-to-fix): Remove sc_m4_quote_check from
    list of disabled checks.
    * libltdl/m4/libtool.m4 (_LT_CHECK_OBJDIR): Quote LT_OBJDIR
    correctly.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 40adfb1b85e3a1d03b43367f8671176cdadf9d02
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Oct 24 16:23:41 2011 +0700

    syntax-check: fix violations and re-enable sc_file_system.
    
    * cfg.mk (local-checks-to-fix): Remove sc_file_system from list
    of disabled checks.
    (VC_LIST_ALWAYS_EXCLUDE_REGEX): Match mail directory correctly
    to avoid running its contents through syntax-check.
    * build-aux/ltmain.m4sh (func_mode_link): Use correct spelling
    for "file system".
    * libltdl/ltdl.c (try_dlopen): Ditto.
    * tests/dlloader-api.at: Ditto.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 196ceeca0473f4e97e85d1402f600f098bc77988
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Oct 26 14:33:45 2011 +0700

    syntax-check: fix violations and re-enable sc_error_message_uppercase.
    
    * cfg.mk (local-checks-to-fix): Remove
    sc_error_message_uppercase from list of disabled checks.
    (exclude_file_name_regexp--sc_error_message_uppercase): Don't
    match cvsu, which is not our file to edit.
    * doc/libtool.texi: Use lowercase error message in example.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 8a7e35d988c8f80b19ecbf247b63b3f5a13b1b4a
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 17 18:04:31 2011 +0700

    syntax-check: rationale for disabling sc_cast_of_x_alloc_return_value.
    
    * cfg.mk: Note that we support C++ compilation of libltdl, which
    in turn requires that *alloc return values be cast correctly.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit f3e71d08e878bdb7408d763f745b70bb34078af0
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Oct 26 15:11:45 2011 +0700

    syntax-check: fix violations and re-enable sc_cast_of_argument_to_free.
    
    * cfg.mk (local-checks-to-fix): Remove
    sc_cast_of_argument_to_free from list of disabled checks.
    * build-aux/ltmain.m4sh, libltdl/libltdl/lt__alloc.h,
    libltdl/lt__dirent.c: Casting argument to free is never
    necessary.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit abc2b152d3e8a7427123cd651d888a6b3a6e5fde
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Oct 26 14:57:55 2011 +0700

    syntax-check: fix violations and re-enable sc_avoid_if_before_free.
    
    * cfg.mk (local-checks-to-fix): Remove sc_avoid_if_before_free
    from list of disabled checks.
    According to gnulib/doc/free.texi: "On old platforms such as
    SunOS4, @code{free (NULL)} fails.  However, since all such
    systems are so old as to no longer be considered ``reasonable
    portability targets,'' this module is no longer useful."
    * libltdl/libltdl/lt__alloc.h (FREE, MEMREASSIGN): Don't protect
    against freeing NULL bug on SunOS4.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit dbc76d2f97a9a689ecf4a37e6e64e7eb3d468d18
Author: Gary V. Vaughan <address@hidden>
Date:   Tue Oct 25 11:31:48 2011 +0700

    syntax-check: skip sc_unmarked_diagnostics.
    
    * cfg.mk (local-checks-to-fix): Move sc_unmarked_diagnostics
    from here...
    (local-checks-to-skip): ...to here.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit aa2b2b71fa04097cab30398ee5e5f99ad894773b
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 27 10:00:29 2011 +0700

    libtoolize: rename `libltdl/config' directory to standard `build-aux'.
    
    In addition to moving the autoconf auxiliary script directory
    into the place expected by GNU developers ($top_srcdir/build-aux)
    we also simplify libtoolize somewhat by having libltdl use
    whatever directory was specified by the parent project.  This is
    much more flexible, allows libltdl client projects to also use a
    single canonical `$top_srcdir/build-aux' auxiliary script
    directory, and maintains backward compatibility with existing
    projects that wish to continue using $ltdl_dir/config.
    * libltdl/config: Moved whole directory from here...
    * build-aux: ...to here.
    * libtoolize.m4sh (func_install_pkgaux_subproject): Remove.
    (func_install_pkgaux_parent): Remove.
    (func_install_pkgaux_files): Considerably simplified now that we
    have only a single auxiliary directory to worry about.
    (subproject_aux_dir): Remove.
    * bootstrap.conf (libtool_readme_release_package_substitutions):
    No need to substitute our old unusual aux_dir location into
    README-release any more.
    * cfg.mk (_build-aux): Now that we use the standard location for
    this directory, no need to set this variable either.
    * configure.ac (AC_INIT): git-version-gen has moved.
    (AC_CONFIG_AUX_DIR): Adjust.
    * Makefile.am (stamp-mk, auxexefiles, auxfiles)
    (install-data-local): Use build-aux instead of config.
    (libltdl/stamp-mk): Ditto.
    * libltdl/configure.ac, tests/cdemo/configure.ac,
    tests/demo/configure.ac, tests/depdemo/configure.ac,
    tests/f77demo/configure.ac, tests/fcdemo/configure.ac,
    tests/mdemo/configure.ac, tests/mdemo2/configure.ac,
    tests/pdemo/configure.ac, tests/tagdemo/configure.ac
    (AC_CONFIG_AUX_DIR): Ditto.
    * tests/defs.m4sh (aux_dir): Ditto.
    * tests/configure-iface.at, tests/getopt-m4sh.at,
    tests/libtoolize.at, tests/subproject.at, tests/testsuite.at:
    Ditto.
    * Makefile.am (ltdl_ac_aux_dir): Extract at build-time...
    * libtoolize.m4sh (require_ltdl_ac_aux_dir): ...so that
    libtoolize can access it at runtime without requiring GNU M4 via
    the extract-trace script.
    (require_Makefile_am_filter): Use it to determine whether the
    aux_dir declared in the current (parent) project configure is
    compatible with the declarations in installed ltdl autotools
    source files.
    (require_configure_ac_filter): New function to perform similar
    checks and rewrite configure.ac during installation if necessary.
    * NEWS: Updated.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit cd1292f5bcd4bf2fbcb637e4cdb2338d2db56a63
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Nov 14 11:54:22 2011 +0700

    libtoolize: aux scripts go in ltdl dir when parent has no configure.
    
    When using libtoolize to install subproject libltdl into a
    parent project that does not use autotools, set the default
    directory for auxiliary scripts inside libltdl rather than
    littering the parent project with files it doesn't use.
    * libtoolize.m4sh (func_require_ac_aux_dir): In verbose mode,
    report results like other require_ funcs.
    (func_require_aux_dir): Put subproject auxiliary files into ltdl
    directory where libltdl/configure will be able to find
    `install-sh' and others.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 435cb8d7140c33ffb42d2782f68d47d5833a5015
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Nov 14 11:44:54 2011 +0700

    libtoolize: simplify runtime by substituting pkgauxdir.
    
    * Makefile.am (configure_edit): Substitute pkgauxdir.
    * libtoolize.m4sh (func_install_pkgaux_subproject)
    (func_install_pkgaux_parent, extract_trace): Use it.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit e993037093901c25a6eeb599a69c8bba444d3c7d
Author: Gary V. Vaughan <address@hidden>
Date:   Mon Nov 14 11:28:33 2011 +0700

    libtoolize: generate require_ltdl_relative_aux_dir definition.
    
    * libtoolize.m4sh (require_ltdl_relative_macro_dir): Change to
    be generated function...
    (require_ltdl_relative_aux_dir): ...so that we can easily
    generate this very similar function from the same code.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit bcdfe9f2731f378e9706d2455e765b3d79a454ee
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Oct 27 18:29:50 2011 +0700

    libtoolize: rename `libltdl/m4' directory to standard `m4'.
    
    In addition to moving the autoconf macro directory into the
    place expected by GNU developers ($top_srcdir/m4), we also
    simplify libtoolize somewhat by having libltdl use whatever
    directory was specified by the parent project.  This is much
    more flexible, allows libltdl client projects to also use a
    single canonical `$top_srcdir/m4' macro directory, and maintains
    backward compatibility with existing projects that wish to
    continue using $ltdl_dir/m4.
    * libltdl/m4: Moved to it's parent directory.
    * Makefile.am (ACLOCAL_AMFLAGS, BUILDCHECK_ENVIRONMENT)
    (libltdl/Makefile.am, libltdl/aclocal.m4): Adjust.
    * configure.ac (AC_CONFIG_MACRO_DIR): Adjust.
    * libltdl/configure.ac (AC_CONFIG_MACRO_DIR): Remove. The
    libtoolize script can pick up the project macro directory from
    ACLOCAL_AMFLAGS in libltdl/Makefile.am, saving us from needing
    to regenerate configure for the sake of a different macro
    directory declared in the libltdl using client project.
    * libtoolize.m4sh (func_install_pkgmacro_subproject): Remove.
    (func_install_pkgmacro_parent): Remove.
    (subproject_macro_dir): Remove.
    (require_libltdl_Makefile_am, require_ltdl_aclocal_amflags)
    (require_ltdl_am_macro_dir): New functions, generated at runtime
    by adding libltdl/Makefile.am to the generation loop.
    (func_install_pkgmacro_files): Considerably simplified now that
    we have only a single macro directory to worry about.
    (require_ltdl_relative_macro_dir): New function. Calculate the
    relative path from $ltdl_dir to the parent project macro_dir.
    (require_Makefile_am_filter): Depending on $ltdl_mode, edit
    Makefile.am ACLOCAL_AMFLAGS to use the parent project macro
    directory if necessary.
    (require_aclocal_m4_filter): Make sure m4_includes point to the
    correct macro directory by editing the file as it is copied
    into the parent project.
    (func_install_pkgltdl_files): Use the filters.
    (func_check_macros): Remove various advice that no longer
    applies with an always shared macro directory.
    (func_require_ltdl_dir): Don't default ltdl_dir to subproject
    when `--ltdl' was not given.
    (func_require_ltdl_mode): Leave ltdl_mode empty when ltdl_dir is
    not set.
    (func_require_macro_dir): Default to $ltdl_dir/m4 in subproject
    mode with no other directory implied by AC_CONFIG_MACRO_DIR or
    ACLOCAL_AMFLAGS, otherwise m4 as before.
    * tests/libtoolize.at: Match new "creating file `Makefile.am'"
    messages correctly.
    (subproject ltdl with non-shared directories): This test no
    longer makes sense, so repurposed...
    (subproject ltdl with non-canonical macro dir): ...this, to
    ensure subproject ltdl continues to automatically share the
    parent macro directory.
    * tests/cdemo/Makefile.am, tests/demo/Makefile.am,
    tests/depdemo/Makefile.am, tests/f77demo/Makefile.am,
    tests/fcdemo/Makefile.am, tests/mdemo/Makefile.am,
    tests/mdemo2/Makefile.am, tests/pdemo/Makefile.am,
    tests/tagdemo/Makefile.am (ACLOCAL_AMFLAGS): Use new location
    of macro_dir.
    * NEWS: Updated.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 76fff42c2acd846eae5b4e05ba318ec6213f9eed
Author: Gary V. Vaughan <address@hidden>
Date:   Tue Nov 1 12:29:48 2011 +0700

    libtoolize: rename `Makefile.inc' to standard `ltdl.mk'.
    
    * libltdl/Makefile.inc: Moved from here...
    * libltdl/ltdl.mk: ...to here.
    * Makefile.am, bootstrap.conf, tests/libtoolize.at,
    tests/nonrecursive.at: Adjust.
    * libtoolize.m4sh (func_install_pkgltdl_files): Set the
    destination file to `Makefile.inc' if grep finds an include for
    that name in a top-level Makefile.am.
    (func_check_macros): Print a deprecation warning if use of the
    old `Makefile.inc' convention is found.
    * tests/old-ltdl-iface.at: New test for renaming and warning
    correctly when `Makefile.inc' convention is still in use.
    * NEWS: Updated.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 0c19864f3d5bb8f5b7cdeb2e8c2ef4d201b4bfd1
Author: Gary V. Vaughan <address@hidden>
Date:   Fri Nov 11 11:49:23 2011 +0700

    libtoolize: refactor ACLOCAL_AMFLAGS extraction.
    
    Another simple refactor to simplify following changesets.
    * libtoolize.m4sh (require_Makefile_am, require_aclocal_amflags)
    (require_am_macro_dir): Generate these functions at runtime.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 5e07c2fc650ba3917aaa300d345fba7b0fdc1a08
Author: Gary V. Vaughan <address@hidden>
Date:   Fri Nov 11 11:32:51 2011 +0700

    libtoolize: rename require_makefile_am to require_Makefile_am.
    
    A simple refactoring to keep the next change self-contained.
    * libtoolize.m4sh (require_makefile_am): Renamed from this...
    (require_Makefile_am): ...to this.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit eb82543f615145b78d2185c45b1abd98d0abf79b
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 10 18:27:51 2011 +0700

    libtoolize: simplify copying of files that are edited during install.
    
    * libltdl/Makefile.inc (EXTRA_DIST): Don't list autotools files
    that Automake automatically adds to a (subproject)
    distribution...
    * Makefile.am (EXTRA_DIST): ...although, our layout is a bit odd
    because we reuse libltdl/Makefile.inc in non-recursive mode in
    our own tree, so we do need to add those very same files here...
    * libtoolize.m4sh (require_Makefile_am_filter)
    (require_Makefile_inc_filter): ...all of which means we no
    longer need to manually remove those files at libtoolize time.
    These two new functions are factored out of...
    (func_fixup_Makefile): ...this old function, now removed.
    (func_copy): Add support for an optional sed script as the last
    argument to filter the content of a file as it is copied.
    (func_install_pkgltdl_files): Much simplified by $require_<foo>
    the relevant filter scripts and passing them to func_copy.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 4e671d6ba69c889b1f9aee12de6c504d26dc6514
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 10 16:14:48 2011 +0700

    libtoolize: simplify file-copying and -linking call-graph.
    
    * libtoolize.m4sh (TAR): Remove.
    (func_copy_some_files, func_copy_cb): Remove.
    (func_copy): Refactor from all of the above, and simplify. No
    need to use $TAR to preserve timestamps when copying, since
    we've been running touch right afterwards anyway. Adjust all
    callers to use the new argument footprint.
    (func_serial_update, func_keyword_update): Delete any pre-
    existing destination file when used with `--force' before
    calling func_copy, now that the hardcoded special cases are not
    in there any more.
    (func_install_pkgmacro_subproject)
    (func_install_pkgaux_subproject): Use our own file loop -
    func_copy subsumes all the checks previously in
    func_copy_some_files, but operates on only one file at a time.
    (func_install_pkgltdl_files): Similarly, handle aclocal.m4 and
    configure special cases here, before calling func_copy.
    * tests/libtoolize.at: Make sure we match corrected "copying
    `configure.ac'" output.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

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

Summary of changes:
 Makefile.am                                        |  100 ++-
 NEWS                                               |   21 +
 THANKS                                             |    1 -
 bootstrap                                          |    7 +-
 bootstrap.conf                                     |    7 +-
 {libltdl/config => build-aux}/.gitignore           |    0
 {libltdl/config => build-aux}/cvsu                 |    0
 {libltdl/config => build-aux}/edit-readme-alpha    |    0
 {libltdl/config => build-aux}/extract-trace        |    4 +-
 {libltdl/config => build-aux}/general.m4sh         |    6 +-
 {libltdl/config => build-aux}/getopt.m4sh          |    1 -
 {libltdl/config => build-aux}/git-hooks/commit-msg |    2 +-
 {libltdl/config => build-aux}/git-log-fix          |    0
 {libltdl/config => build-aux}/ltmain.m4sh          |   64 +-
 {libltdl/config => build-aux}/options-parser       |    2 +-
 cfg.mk                                             |   58 +-
 configure.ac                                       |    9 +-
 doc/PLATFORMS                                      |    2 +-
 doc/libtool.texi                                   |   20 +-
 libltdl/argz.c                                     |    4 +-
 libltdl/argz_.h                                    |   12 +-
 libltdl/configure.ac                               |    3 +-
 libltdl/libgnu/.gitignore                          |    2 -
 libltdl/libltdl/lt__alloc.h                        |   12 +-
 libltdl/libltdl/lt__dirent.h                       |   10 +-
 libltdl/libltdl/lt__glibc.h                        |    8 +-
 libltdl/libltdl/lt__private.h                      |   20 +-
 libltdl/libltdl/lt__strl.h                         |   14 +-
 libltdl/libltdl/lt_dlloader.h                      |    4 +-
 libltdl/libltdl/lt_error.h                         |    4 +-
 libltdl/libltdl/lt_system.h                        |   46 +-
 libltdl/libltdl/slist.h                            |   12 +-
 libltdl/loaders/dld_link.c                         |    2 +-
 libltdl/loaders/dlopen.c                           |   30 +-
 libltdl/loaders/dyld.c                             |   36 +-
 libltdl/loaders/loadlibrary.c                      |    4 +-
 libltdl/loaders/preopen.c                          |   10 +-
 libltdl/loaders/shl_load.c                         |   14 +-
 libltdl/lt__dirent.c                               |    7 +-
 libltdl/lt__strl.c                                 |    8 +-
 libltdl/lt_dlloader.c                              |    2 +-
 libltdl/ltdl.c                                     |   64 +-
 libltdl/ltdl.h                                     |    6 +-
 libltdl/{Makefile.inc => ltdl.mk}                  |   12 +-
 libltdl/slist.c                                    |    3 +-
 libtoolize.m4sh                                    | 1043 +++++++++++---------
 ltmain.c                                           |   36 -
 {libltdl/m4 => m4}/.gitignore                      |    0
 {libltdl/m4 => m4}/argz.m4                         |    0
 {libltdl/m4 => m4}/autobuild.m4                    |    0
 {libltdl/m4 => m4}/libtool.m4                      |   18 +-
 {libltdl/m4 => m4}/ltdl.m4                         |    0
 {libltdl/m4 => m4}/ltoptions.m4                    |    2 +-
 {libltdl/m4 => m4}/ltsugar.m4                      |    0
 {libltdl/m4 => m4}/ltversion.in                    |    0
 {libltdl/m4 => m4}/lt~obsolete.m4                  |    2 +-
 tests/archive-in-archive.at                        |    2 +-
 tests/cdemo/Makefile.am                            |    2 +-
 tests/cdemo/configure.ac                           |    2 +-
 tests/convenience.at                               |    8 +-
 tests/darwin.at                                    |    2 +-
 tests/demo/Makefile.am                             |    2 +-
 tests/demo/configure.ac                            |    2 +-
 tests/demo/dlmain.c                                |    6 +-
 tests/demo/foo.h                                   |    6 +-
 tests/depdemo/Makefile.am                          |    2 +-
 tests/depdemo/configure.ac                         |    2 +-
 tests/depdemo/l1/l1.c                              |    2 +-
 tests/depdemo/l2/l2.c                              |    2 +-
 tests/depdemo/l3/l3.c                              |    2 +-
 tests/depdemo/l4/l4.c                              |    2 +-
 tests/depdemo/main.c                               |    2 +-
 tests/depdemo/sysdep.h                             |    2 +-
 tests/dlloader-api.at                              |    8 +-
 tests/exceptions.at                                |   18 +-
 tests/export.at                                    |   10 +-
 tests/f77demo/Makefile.am                          |    2 +-
 tests/f77demo/README                               |   10 +-
 tests/f77demo/configure.ac                         |    2 +-
 tests/f77demo/cprogram.c                           |   19 +-
 tests/f77demo/foo.h                                |    2 -
 tests/f77demo/foof.f                               |    2 -
 tests/f77demo/foof2.f                              |    2 -
 tests/f77demo/foof3.f                              |    2 -
 tests/f77demo/fprogram.f                           |    3 -
 tests/fcdemo/Makefile.am                           |    2 +-
 tests/fcdemo/README                                |   10 +-
 tests/fcdemo/configure.ac                          |    2 +-
 tests/fcdemo/cprogram.c                            |   19 +-
 tests/fcdemo/foo.h                                 |    2 -
 tests/fcdemo/foof.f90                              |    3 +-
 tests/fcdemo/foof2.f90                             |    3 +-
 tests/fcdemo/foof3.f90                             |    3 +-
 tests/fcdemo/fprogram.f90                          |    3 +-
 tests/getopt-m4sh.at                               |    4 +-
 tests/libtoolize.at                                |  168 ++--
 tests/lt_dladvise.at                               |    2 +-
 tests/mdemo/Makefile.am                            |   14 +-
 tests/mdemo/README                                 |    5 +-
 tests/mdemo/configure.ac                           |    2 +-
 tests/mdemo/main.c                                 |   20 +-
 tests/mdemo/mlib.c                                 |   16 +-
 tests/mdemo2/Makefile.am                           |    2 +-
 tests/mdemo2/README                                |    1 -
 tests/mdemo2/configure.ac                          |    2 +-
 tests/nonrecursive.at                              |    2 +-
 tests/objectlist.test                              |    2 +-
 tests/old-ltdl-iface.at                            |  138 +++
 tests/pdemo-inst.test                              |    1 -
 tests/pdemo/Makefile.am                            |    2 +-
 tests/pdemo/configure.ac                           |    2 +-
 tests/pdemo/foo.h                                  |    6 +-
 tests/pdemo/longer_file_name_dlmain.c              |    6 +-
 tests/sh.test                                      |   20 +-
 tests/slist.at                                     |   18 +-
 tests/static.at                                    |   14 +-
 tests/stresstest.at                                |   24 +-
 tests/tagdemo/Makefile.am                          |    2 +-
 tests/tagdemo/README                               |    2 -
 tests/tagdemo/configure.ac                         |    2 +-
 tests/template.at                                  |   14 +-
 tests/testsuite.at                                 |    8 +-
 122 files changed, 1301 insertions(+), 1127 deletions(-)
 rename {libltdl/config => build-aux}/.gitignore (100%)
 rename {libltdl/config => build-aux}/cvsu (100%)
 rename {libltdl/config => build-aux}/edit-readme-alpha (100%)
 rename {libltdl/config => build-aux}/extract-trace (99%)
 rename {libltdl/config => build-aux}/general.m4sh (99%)
 rename {libltdl/config => build-aux}/getopt.m4sh (99%)
 rename {libltdl/config => build-aux}/git-hooks/commit-msg (98%)
 rename {libltdl/config => build-aux}/git-log-fix (100%)
 rename {libltdl/config => build-aux}/ltmain.m4sh (99%)
 rename {libltdl/config => build-aux}/options-parser (99%)
 delete mode 100644 libltdl/libgnu/.gitignore
 rename libltdl/{Makefile.inc => ltdl.mk} (94%)
 delete mode 100644 ltmain.c
 rename {libltdl/m4 => m4}/.gitignore (100%)
 rename {libltdl/m4 => m4}/argz.m4 (100%)
 rename {libltdl/m4 => m4}/autobuild.m4 (100%)
 rename {libltdl/m4 => m4}/libtool.m4 (99%)
 rename {libltdl/m4 => m4}/ltdl.m4 (100%)
 rename {libltdl/m4 => m4}/ltoptions.m4 (99%)
 rename {libltdl/m4 => m4}/ltsugar.m4 (100%)
 rename {libltdl/m4 => m4}/ltversion.in (100%)
 rename {libltdl/m4 => m4}/lt~obsolete.m4 (99%)
 create mode 100644 tests/old-ltdl-iface.at

diff --git a/Makefile.am b/Makefile.am
index ab6a106..2c6cf81 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@
 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #####
 
-ACLOCAL_AMFLAGS        = -I libltdl/m4
+ACLOCAL_AMFLAGS                = -I m4
 
 AM_CPPFLAGS            =
 AM_LDFLAGS             =
@@ -189,13 +189,13 @@ $(libtoolize_in): $(libtoolize_m4sh) $(sh_files) 
Makefile.am
 
 lt_Makefile_am = $(srcdir)/$(ltdl_dir)/Makefile.am
 lt_Makefile_in = $(srcdir)/$(ltdl_dir)/Makefile.in
-lt_Makefile_inc        = $(srcdir)/$(ltdl_dir)/Makefile.inc
+ltdl_mk                = $(srcdir)/$(ltdl_dir)/ltdl.mk
 
-$(lt_Makefile_am): $(lt_Makefile_inc)
+$(lt_Makefile_am): $(ltdl_mk)
        $(AM_V_at)rm -f '$@'
        $(AM_V_GEN)( '$(SED)' -n '1,/^.. DO NOT REMOVE THIS LINE -- /p' \
-             '$(lt_Makefile_inc)'; \
-         { echo 'ACLOCAL_AMFLAGS = -I m4'; \
+             '$(ltdl_mk)'; \
+         { echo 'ACLOCAL_AMFLAGS = -I ../m4'; \
            echo 'AUTOMAKE_OPTIONS = foreign'; \
            echo 'AM_CPPFLAGS ='; \
            echo 'AM_LDFLAGS ='; \
@@ -209,11 +209,11 @@ $(lt_Makefile_am): $(lt_Makefile_inc)
            echo 'MOSTLYCLEANFILES ='; \
          }; \
          '$(SED)' -n '/^.. DO NOT REMOVE THIS LINE -- /,$$p' \
-             '$(lt_Makefile_inc)' \
+             '$(ltdl_mk)' \
            |'$(SED)' -e 's,libltdl_,,; s,libltdl/,,; s,: libltdl/,: ,' \
-               -e 's,\$$(libltdl_,$$(,' \
+             -e 's,\$$(libltdl_,$$(,' \
        ) |'$(SED)' -e '/^.. DO NOT REMOVE THIS LINE -- /d' \
-              -e '1s,^\(.. Makefile.\)inc.*,\1am -- Process this file with 
automake to produce Makefile.in,' > '$@'
+             -e '1s,^\(.. Makefile.\)inc.*,\1am -- Process this file with 
automake to produce Makefile.in,' > '$@'
        $(AM_V_at)chmod a-w '$@'
 
 ## Document the make macros that are needed to build bootstrap-deps
@@ -272,6 +272,8 @@ all-local: $(LTDL_BOOTSTRAP_DEPS)
 ## Libtool scripts. ##
 ## ---------------- ##
 
+ltdl_ac_aux_dir = `$(extract_trace) AC_CONFIG_AUX_DIR 
$(srcdir)/libltdl/configure.ac`
+
 configure_edit = $(SED) \
        -e 's,@aclocaldir\@,$(aclocaldir),g' \
        -e 's,@aux_dir\@,$(aux_dir),g' \
@@ -281,7 +283,9 @@ configure_edit = $(SED) \
        -e 's,@GREP\@,$(GREP),g' \
        -e 's,@host_triplet\@,$(host_triplet),g' \
        -e 's,@LN_S\@,$(LN_S),g' \
+       -e "s,@ltdl_ac_aux_dir\@,$(ltdl_ac_aux_dir),g" \
        -e 's,@macro_dir\@,$(macro_dir),g' \
+       -e 's,@pkgauxdir\@,$(pkgauxdir),g' \
        -e 's,@pkgaux_files\@,$(pkgaux_scripts) $(pkgaux_data_files),g' \
        -e 's,@pkgaux_install_files\@,$(pkgaux_install_files),g' \
        -e 's,@pkgaux_parent_files\@,$(pkgaux_parent_files),g' \
@@ -321,7 +325,7 @@ libtool: $(ltmain_sh) $(config_status) $(dotversion)
 
 .PHONY: configure-subdirs
 configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
address@hidden@:
+$(DIST_MAKEFILE_LIST):
        $(AM_V_at)dir=`echo '$@' |'$(SED)' 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \
        test -d "$$dir" || mkdir "$$dir" || exit 1; \
        abs_srcdir=`$(lt__cd) '$(srcdir)' && pwd`; \
@@ -332,31 +336,40 @@ configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
 ## Libltdl. ##
 ## -------- ##
 
-include libltdl/Makefile.inc
+include libltdl/ltdl.mk
 
 lt_aclocal_m4  = $(srcdir)/$(ltdl_dir)/aclocal.m4
 lt_config_h_in = $(srcdir)/$(ltdl_dir)/config-h.in
 lt_configure   = $(srcdir)/$(ltdl_dir)/configure
+lt_configure_ac        = $(srcdir)/$(ltdl_dir)/configure.ac
 stamp_mk       = $(srcdir)/$(ltdl_dir)/stamp-mk
 
 lt_obsolete_m4 = $(srcdir)/$(macro_dir)/lt~obsolete.m4
 
-EXTRA_DIST     += $(stamp_mk) $(lt_obsolete_m4)
+EXTRA_DIST     += $(lt_aclocal_m4) \
+                 $(lt_configure) \
+                 $(lt_configure_ac) \
+                 $(lt_config_h_in) \
+                 $(lt_Makefile_am) \
+                 $(lt_Makefile_in) \
+                 $(lt_obsolete_m4) \
+                 $(stamp_mk)
 
 $(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4)
        $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile
 
 # Don't let unused scripts leak into the libltdl Makefile
 $(stamp_mk): $(lt_Makefile_in)
-       $(AM_V_at)T='$(srcdir)/$(ltdl_dir)/Makefile.tmp'; \
-       for p in $(srcdir)/$(ltdl_dir)/config/*; do \
+       $(AM_V_at)T='$(srcdir)/$(aux_dir)/Makefile.tmp'; \
+       for p in $(srcdir)/$(aux_dir)/*; do \
          test -f "$$p" || continue; \
-         f=`echo "$$p" | $(SED) 's,^$(srcdir)/$(ltdl_dir)/,,'`; \
-         case " $(pkgaux_scripts) " in \
+         f=`echo "$$p" | $(SED) 's,^$(srcdir)/$(aux_dir)/,,'`; \
+         case " $(pkgaux_scripts) ltmain.sh " in \
            *" $$f "*) ;; \
            *) '$(SED)' \
-                 -e 's,\(\$$([^)]*)/\)*'"$$f"'\$$,,' \
-                 -e 's,\(\$$([^)]*)/\)*'"$$f"' ,,' \
+                 -e 's,\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"'\$$,,' \
+                 -e 's,\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"' ,,' \
+                 -e '/^[        ]*\\$$/d' \
                '$(lt_Makefile_in)' > "$$T" \
                  && mv -f "$$T" '$(lt_Makefile_in)';; \
          esac; \
@@ -376,7 +389,7 @@ lt_aclocal_m4_deps = \
 lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps)
 
 $(lt_aclocal_m4): $(lt_aclocal_m4_deps)
-       $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(ACLOCAL) -I m4
+       $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(ACLOCAL) -I ../m4
 
 $(lt_configure): $(lt_configure_deps)
        $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOCONF)
@@ -404,7 +417,7 @@ EXTRA_DIST  += $(doc_dir)/gendocs_template
 #   info_TEXINFOS      = $(doc_dir)/libtool.texi
 #
 # Producing the following error, even though srcdir is implicitly set:
-# "cannot open < ./@srcdir@/doc/libtool.texi: No such file or directory"
+# "cannot open < ./$(srcdir)/doc/libtool.texi: No such file or directory"
 info_TEXINFOS          = doc/libtool.texi
 doc_libtool_TEXINFOS   = $(doc_dir)/PLATFORMS $(doc_dir)/fdl.texi \
                          $(notes_texi)
@@ -440,7 +453,7 @@ $(libtoolize_1): $(libtoolize_in)
 ## ------------- ##
 
 ltdldir                = $(srcdir)/libltdl
-pkgauxdir      = $(pkgdatadir)/config
+pkgauxdir      = $(pkgdatadir)/build-aux
 
 # The timestamps on these files must be preserved carefully so we install,
 # uninstall and set executable with custom rules here.
@@ -458,7 +471,6 @@ pkgmacro_files      = argz.m4 libtool.m4 ltdl.m4 
ltoptions.m4 ltsugar.m4 \
 pkgltdl_files  = COPYING.LIB \
                  Makefile.am \
                  Makefile.in \
-                 Makefile.inc \
                  README \
                  configure.ac \
                  aclocal.m4 \
@@ -489,6 +501,7 @@ pkgltdl_files       = COPYING.LIB \
                  lt_error.c \
                  ltdl.c \
                  ltdl.h \
+                 ltdl.mk \
                  slist.c
 
 install-data-local: $(lt_Makefile_in)
@@ -567,7 +580,7 @@ $(readme): FORCE
          $(SHELL) $(edit_readme_alpha) '$@'; \
        fi
 
-git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's,[        ],,g'
+git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's,[         ],,g'
 
 dist-hook: $(changelog) $(dotversion) $(readme)
 ## Arrange so that .tarball-version appears only in the distribution
@@ -583,6 +596,8 @@ dist-hook: $(changelog) $(dotversion) $(readme)
          else :; fi; \
        done
 
+distcheck-hook: syntax-check
+
 uninstall-hook:
        @$(NORMAL_UNINSTALL)
        @list='$(pkgltdl_files)'; \
@@ -644,6 +659,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/versioning.at \
                  tests/destdir.at \
                  tests/old-m4-iface.at \
+                 tests/old-ltdl-iface.at \
                  tests/am-subdir.at \
                  tests/lt_dlexit.at \
                  tests/lt_dladvise.at \
@@ -699,7 +715,7 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" 
CFLAGS="$(CFLAGS)" \
 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
        LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
        LIBTOOL="$(abs_top_builddir)/libtool" \
-       tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
+       tst_aclocaldir="$(abs_top_srcdir)/m4"
 
 INSTALLCHECK_ENVIRONMENT = \
        LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) 
'$(program_transform_name)'`" \
@@ -714,12 +730,12 @@ $(testsuite): $(package_m4) $(TESTSUITE_AT) Makefile.am
 $(package_m4): $(dotversion) Makefile.am
        $(AM_V_GEN){ \
          echo '# Signature of the current package.'; \
-         echo 'm4_define([AT_PACKAGE_NAME],      address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_TARNAME],   address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_VERSION],   address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_STRING],    address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_BUGREPORT], address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_URL],       address@hidden@])'; \
+         echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])'; \
+         echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])'; \
+         echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])'; \
+         echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])'; \
+         echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
+         echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
        } > '$@'
 
 tests/atconfig: $(config_status)
@@ -954,13 +970,13 @@ INTERACTIVE_TESTS = \
 
 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-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-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-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
 
@@ -971,24 +987,24 @@ 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-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-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-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-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-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
@@ -999,17 +1015,17 @@ 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-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-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-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
@@ -1019,7 +1035,7 @@ 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/mdemo-shared.log: $(ORDER) tests/mdemo-dryrun.log \
                                tests/mdemo2-exec.log
 
 tests/mdemo-dryrun.log:                tests/mdemo-unst.log
@@ -1027,7 +1043,7 @@ 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-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
diff --git a/NEWS b/NEWS
index 9ecb6cd..32e9bb1 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,21 @@ NEWS - list of user-visible changes between releases of GNU 
Libtool
     version number or any other argument that Libtoolize needs to know at
     M4 time using git-version-gen from gnulib, for example.
 
+  - Invoking `libtoolize --ltdl' no longer maintains a separate autoconf
+    macro directory in the libltdl tree, but automatically adjusts the
+    installed libltdl configuration files to share whatever macro
+    directory is declared by the parent project. (Note: if you were
+    already sharing a macro directory with AC_CONFIG_MACRO_DIR(ltdl/m4)
+    or similar, that still works as does any other directory choice).
+
+  - Invoking `libtoolize --ltdl' no longer maintains a separate auxiliary
+    scripts directory in the libltdl tree, but automatically adjusts the
+    installed libltdl configuration files to share whatever auxiliary
+    scripts directory is declared by the parent project. (Note: if you
+    were already sharing an auxiliary directory with subproject libltdl
+    using AC_CONFIG_AUX_DIR(ltdl/config) or similar, that still works as
+    does any other directory choice).
+
   - The Autotest testsuite can be run without the especially time consuming
     tests with:
 
@@ -40,6 +55,12 @@ NEWS - list of user-visible changes between releases of GNU 
Libtool
     `configure.ac' (or `configure.in') that needs tracing to determine
     what modes and directories have been specified.
 
+  - The use of the idiosyncratically named `Makefile.inc' in nonrecursive
+    libltdl builds is deprecated, although it will be supported for one
+    more year or until the next release, whichever takes longer.  Please
+    upgrade to the more standard naming of `ltdl.mk' in keeping with other
+    GNU projects.
+
 New in 2.4.2 2011-10-17: git version 2.4.1a, Libtool team:
 
 * New features:
diff --git a/THANKS b/THANKS
index da43e65..84cb6c9 100644
--- a/THANKS
+++ b/THANKS
@@ -224,4 +224,3 @@ 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.
-
diff --git a/bootstrap b/bootstrap
index b0413ff..8776e21 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,8 +1,8 @@
 #! /bin/sh
 
 # Source required external libraries.
-. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"libltdl/config/options-parser"
-. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"libltdl/config/extract-trace"
+. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"build-aux/options-parser"
+. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"build-aux/extract-trace"
 
 # Set a version string for *this* script.
 scriptversion=2011-11-15.06; # UTC
@@ -1934,7 +1934,8 @@ $func_strrow_result
 # Echo program name prefixed message to standard error, and exit.
 func_internal_error ()
 {
-    func_fatal_error "INTERNAL: " ${1+"$@"} "
+    func_fatal_error "\
+INTERNAL: " ${1+"$@"} "
           Please report this bug to address@hidden'
           in as much detail as possible."
 }
diff --git a/bootstrap.conf b/bootstrap.conf
index e1537e2..6f0f0c3 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,4 +1,4 @@
-# bootstrap.conf (GNU Libtool) version 2011-11-02
+# bootstrap.conf (GNU Libtool) version 2011-11-11
 #
 # Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 # Written by Gary V. Vaughan, 2010
@@ -314,7 +314,7 @@ libtool_build_prerequisites ()
     func_verbose "ltdl_dir='$ltdl_dir'"
 
     # Whip up a dirty Makefile:
-    makes='Makefile.am libltdl/Makefile.inc'
+    makes='Makefile.am libltdl/ltdl.mk'
     rm -f Makefile
     {
       echo "aux_dir = $build_aux"
@@ -360,7 +360,6 @@ libtool_readme_release_package_substitutions ()
     # Perform substitutions to a temporary file
     $SED -e "\
         s,address@hidden@,$package,g
-        s,build-aux/,$build_aux/,
     " "$my_readme" > "${my_readme}T" \
         && mv "${my_readme}T" "$my_readme"
 }
@@ -445,7 +444,7 @@ libtool_require_package_url ()
     $require_configure_ac
 
     func_extract_trace AC_INIT
-    
+
     save_IFS="$IFS"
     IFS=:
     set dummy $func_extract_trace_result
diff --git a/libltdl/config/.gitignore b/build-aux/.gitignore
similarity index 100%
rename from libltdl/config/.gitignore
rename to build-aux/.gitignore
diff --git a/libltdl/config/cvsu b/build-aux/cvsu
similarity index 100%
rename from libltdl/config/cvsu
rename to build-aux/cvsu
diff --git a/libltdl/config/edit-readme-alpha b/build-aux/edit-readme-alpha
similarity index 100%
rename from libltdl/config/edit-readme-alpha
rename to build-aux/edit-readme-alpha
diff --git a/libltdl/config/extract-trace b/build-aux/extract-trace
similarity index 99%
rename from libltdl/config/extract-trace
rename to build-aux/extract-trace
index a230140..a4322ec 100755
--- a/libltdl/config/extract-trace
+++ b/build-aux/extract-trace
@@ -139,7 +139,7 @@ One of these is required:
 # Attempt to run `CMD --version', discarding errors.  The output can be
 # ignored by redirecting stdout, and this function used simply to test
 # whether the command exists and exits normally when passed a
-# `--version' argument. 
+# `--version' argument.
 # When FATAL-ERROR-MSG is given, then this function will display the
 # message and exit if running `CMD --version' returns a non-zero exit
 # status.
@@ -322,7 +322,7 @@ func_extract_trace ()
         # Dummy definitions for the macros we want to trace.
         # AM_INIT_AUTOMAKE at least produces no trace without this.
     '
-    
+
     _G_save=$IFS
     IFS=,
     for _G_macro in $_G_macros; do
diff --git a/libltdl/config/general.m4sh b/build-aux/general.m4sh
similarity index 99%
rename from libltdl/config/general.m4sh
rename to build-aux/general.m4sh
index b6e3d41..44eccec 100644
--- a/libltdl/config/general.m4sh
+++ b/build-aux/general.m4sh
@@ -68,7 +68,7 @@ exit_status=$EXIT_SUCCESS
 # Make sure IFS has a sensible default
 lt_nl='
 '
-IFS="  $lt_nl"
+IFS="   $lt_nl"
 
 dirname="s,/[^/]*$,,"
 basename="s,^.*/,,"
@@ -513,8 +513,8 @@ func_quote_for_eval ()
 
     case $func_quote_for_eval_unquoted_result in
       # Double-quote args containing shell metacharacters to delay
-      # word splitting, command substitution and and variable
-      # expansion for a subsequent eval.
+      # word splitting, command substitution and variable expansion
+      # for a subsequent eval.
       # Many Bourne shells cannot handle close brackets correctly
       # in scan sets, so we specify it separately.
       *[\@<:@\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*@:>@*|"")
diff --git a/libltdl/config/getopt.m4sh b/build-aux/getopt.m4sh
similarity index 99%
rename from libltdl/config/getopt.m4sh
rename to build-aux/getopt.m4sh
index e727c06..b76694e 100644
--- a/libltdl/config/getopt.m4sh
+++ b/build-aux/getopt.m4sh
@@ -645,4 +645,3 @@ func_split_long_opt ()
 
 exit_cmd=:
 ]])
-
diff --git a/libltdl/config/git-hooks/commit-msg 
b/build-aux/git-hooks/commit-msg
similarity index 98%
rename from libltdl/config/git-hooks/commit-msg
rename to build-aux/git-hooks/commit-msg
index 620ee77..f6e8051 100755
--- a/libltdl/config/git-hooks/commit-msg
+++ b/build-aux/git-hooks/commit-msg
@@ -79,7 +79,7 @@ fn_check_msg ()
 
     # Flag duplicated Copyright-paperwork-exempt lines.
     count=`grep "$CPR_re" "$log_file" 2>/dev/null \
-      |wc |sed -e 's,^[         ]*,,;s,[       ].*$,,'`
+      |wc |sed -e 's,^[         ]*,,;s,[        ].*$,,'`
 
     test 2 -gt "$count" || {
       $ECHO 'More than one Copyright-paperwork-exempt line.'
diff --git a/libltdl/config/git-log-fix b/build-aux/git-log-fix
similarity index 100%
rename from libltdl/config/git-log-fix
rename to build-aux/git-log-fix
diff --git a/libltdl/config/ltmain.m4sh b/build-aux/ltmain.m4sh
similarity index 99%
rename from libltdl/config/ltmain.m4sh
rename to build-aux/ltmain.m4sh
index 24491a9..5e8fb25 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -349,7 +349,7 @@ dnl SHORT   LONG                           DEFAULT          
      INIT
 dnl ----------------------------------------------------------------------
 M4SH_GETOPTS(
   [n],         [--dry-run|--dryrun],           [],                     [],
-  [],          [--config],                     [],                     [
+  [],          [--config],                     [],                     [
        func_config],
   [;],         [--dlopen|-dlopen],             [],                     [],
   [],          [--preserve-dup-deps],          [],                     [],
@@ -732,7 +732,7 @@ func_convert_core_path_wine_to_w32 ()
 {
   $debug_cmd
 
-  # unfortunately, winepath doesn't convert paths, only file names 
+  # unfortunately, winepath doesn't convert paths, only file names
   func_convert_core_path_wine_to_w32_result=""
   if test -n "$1"; then
     oldIFS=$IFS
@@ -1316,7 +1316,7 @@ func_mode_compile ()
       case $arg in
       -shared)
        test "$build_libtool_libs" != yes && \
-         func_fatal_configuration "can not build a shared library"
+         func_fatal_configuration "cannot build a shared library"
        build_old_libs=no
        continue
        ;;
@@ -2511,16 +2511,16 @@ func_generate_dlsyms ()
 extern \"C\" {
 #endif
 
-#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || 
(__GNUC__ > 4))
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || 
(__GNUC__ > 4))
 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
 #endif
 
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  
*/
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#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__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
@@ -3424,22 +3424,24 @@ EOF
 #include <fcntl.h>
 #include <sys/stat.h>
 
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
 /* declarations of non-ANSI functions */
-#if defined(__MINGW32__)
+#if defined __MINGW32__
 # ifdef __STRICT_ANSI__
 int _putenv (const char *);
 # endif
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
 # ifdef __STRICT_ANSI__
 char *realpath (const char *, char *);
 int putenv (char *);
 int setenv (const char *, const char *, int);
 # endif
-/* #elif defined (other platforms) ... */
+/* #elif defined other_platform || defined ... */
 #endif
 
 /* portability defines, excluding path handling macros */
-#if defined(_MSC_VER)
+#if defined _MSC_VER
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
@@ -3450,21 +3452,21 @@ int setenv (const char *, const char *, int);
 #  define _INTPTR_T_DEFINED
 #  define intptr_t int
 # endif
-#elif defined(__MINGW32__)
+#elif defined __MINGW32__
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
 # define getcwd  _getcwd
 # define putenv  _putenv
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
 # define HAVE_SETENV
 # define FOPEN_WB "wb"
-/* #elif defined (other platforms) ... */
+/* #elif defined other platforms ... */
 #endif
 
-#if defined(PATH_MAX)
+#if defined PATH_MAX
 # define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
+#elif defined MAXPATHLEN
 # define LT_PATHMAX MAXPATHLEN
 #else
 # define LT_PATHMAX 1024
@@ -3483,8 +3485,8 @@ int setenv (const char *, const char *, int);
 # define PATH_SEPARATOR ':'
 #endif
 
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+  defined __OS2__
 # define HAVE_DOS_BASED_FILE_SYSTEM
 # define FOPEN_WB "wb"
 # ifndef DIR_SEPARATOR_2
@@ -3517,10 +3519,10 @@ int setenv (const char *, const char *, int);
 
 #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
 #define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
+  if (stale) { free (stale); stale = 0; } \
 } while (0)
 
-#if defined(LT_DEBUGWRAPPER)
+#if defined LT_DEBUGWRAPPER
 static int lt_debug = 1;
 #else
 static int lt_debug = 0;
@@ -3620,7 +3622,7 @@ main (int argc, char *argv[])
   newargc=0;
   for (i = 1; i < argc; i++)
     {
-      if (strcmp (argv[i], dumpscript_opt) == 0)
+      if (STREQ (argv[i], dumpscript_opt))
        {
 EOF
            case "$host" in
@@ -3634,12 +3636,12 @@ EOF
          lt_dump_script (stdout);
          return 0;
        }
-      if (strcmp (argv[i], debug_opt) == 0)
+      if (STREQ (argv[i], debug_opt))
        {
           lt_debug = 1;
           continue;
        }
-      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+      if (STREQ (argv[i], ltwrapper_option_prefix))
         {
           /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
              namespace, but it is not one of the ones we know about and
@@ -3818,7 +3820,7 @@ base_name (const char *name)
 {
   const char *base;
 
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
   /* Skip over the disk name in MSDOS pathnames. */
   if (isalpha ((unsigned char) name[0]) && name[1] == ':')
     name += 2;
@@ -3887,7 +3889,7 @@ find_executable (const char *wrapper)
     return NULL;
 
   /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
   if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
     {
       concat_name = xstrdup (wrapper);
@@ -3905,7 +3907,7 @@ find_executable (const char *wrapper)
            return concat_name;
          XFREE (concat_name);
        }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
     }
 #endif
 
@@ -4047,7 +4049,7 @@ strendzap (char *str, const char *pat)
   if (patlen <= len)
     {
       str += len - patlen;
-      if (strcmp (str, pat) == 0)
+      if (STREQ (str, pat))
        *str = '\0';
     }
   return str;
@@ -4421,7 +4423,7 @@ func_mode_link ()
       case $arg in
       -shared)
        test "$build_libtool_libs" != yes && \
-         func_fatal_configuration "can not build a shared library"
+         func_fatal_configuration "cannot build a shared library"
        build_old_libs=no
        break
        ;;
@@ -6060,7 +6062,7 @@ func_mode_link ()
                  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
                    *-*-unixware7*) add_dir="-L$dir" ;;
                  *-*-darwin* )
-                   # if the lib is a (non-dlopened) module then we can not
+                   # if the lib is a (non-dlopened) module then we cannot
                    # link against it, someone is ignoring the earlier warnings
                    if /usr/bin/file -L $add 2> /dev/null |
                         $GREP ": [^:]* bundle" >/dev/null ; then
@@ -6210,7 +6212,7 @@ func_mode_link ()
            # Just print a warning and add the library to dependency_libs so
            # that the program can be linked against the static library.
            echo
-           $ECHO "*** Warning: This system can not link to static lib archive 
$lib."
+           $ECHO "*** Warning: This system cannot link to static lib archive 
$lib."
            echo "*** I have the capability to make that library automatically 
link in when"
            echo "*** you link to this library.  But I can only do this if you 
have a"
            echo "*** shared version of the library, which you do not appear to 
have."
@@ -6736,7 +6738,7 @@ func_mode_link ()
 
        windows)
          # Use '-' rather than '.', since we only want one
-         # extension on DOS 8.3 filesystems.
+         # extension on DOS 8.3 file systems.
          func_arith $current - $age
          major=$func_arith_result
          versuffix="-$major"
@@ -8644,7 +8646,7 @@ library_names='$library_names'
 # The name of the static archive.
 old_library='$old_library'
 
-# Linker flags that can not go in dependency_libs.
+# Linker flags that cannot go in dependency_libs.
 inherited_linker_flags='$new_inherited_linker_flags'
 
 # Libraries that this one depends upon.
diff --git a/libltdl/config/options-parser b/build-aux/options-parser
similarity index 99%
rename from libltdl/config/options-parser
rename to build-aux/options-parser
index decddb7..7a3cf6d 100644
--- a/libltdl/config/options-parser
+++ b/build-aux/options-parser
@@ -319,7 +319,7 @@ func_run_hooks ()
 #
 #        # Note that for efficiency, we parse as many options as we can
 #        # recognise in a loop before passing the remainder back to the
-#        # caller on the first unrecognised argument we encounter. 
+#        # caller on the first unrecognised argument we encounter.
 #        while test $# -gt 0; do
 #          opt=$1; shift
 #          case $opt in
diff --git a/cfg.mk b/cfg.mk
index d84c6cf..6a1748c 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -21,8 +21,6 @@
 # or obtained by writing to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Boston, # MA 02111-1301, USA.
 
-_build-aux = libltdl/config
-
 # Set format of NEWS
 old_NEWS_hash := d41d8cd98f00b204e9800998ecf8427e
 
@@ -37,45 +35,39 @@ announcement_Cc_ = address@hidden, $(PACKAGE_BUGREPORT)
 endif
 
 # Don't syntax check the mail subdirectory.
-VC_LIST_ALWAYS_EXCLUDE_REGEX = /mail/
+VC_LIST_ALWAYS_EXCLUDE_REGEX = ^mail/
 
 local-checks-to-fix =                          \
-       sc_file_system                          \
-       sc_m4_quote_check                       \
-       sc_makefile_TAB_only_indentation        \
-       sc_makefile_at_at_check                 \
        sc_prohibit_always-defined_macros       \
-       sc_prohibit_always_true_header_tests    \
-       sc_prohibit_cvs_keyword                 \
-       sc_prohibit_doubled_word                \
-       sc_prohibit_empty_lines_at_EOF          \
-       sc_prohibit_have_config_h               \
-       sc_prohibit_magic_number_exit           \
-       sc_prohibit_stddef_without_use          \
-       sc_prohibit_strcmp                      \
-       sc_prohibit_test_minus_ao               \
-       sc_prohibit_undesirable_word_seq        \
        sc_require_config_h                     \
-       sc_require_config_h_first               \
-       sc_space_tab                            \
-       sc_trailing_blank                       \
-       sc_unmarked_diagnostics                 \
-       sc_useless_cpp_parens
+       sc_require_config_h_first
 
 local-checks-to-skip =                         \
        $(local-checks-to-fix)                  \
        sc_GPL_version                          \
-       sc_avoid_if_before_free                 \
-       sc_bindtextdomain                       \
-       sc_cast_of_argument_to_free             \
        sc_cast_of_x_alloc_return_value         \
-       sc_error_message_uppercase              \
-       sc_program_name
+       sc_trailing_blank                       \
+       sc_unmarked_diagnostics
 
 # GPL_version: checks for GPLv3, which we don't use
-# avoid_if_before_free: we don't use the gnulib malloc modules
-# bindtextdomain: libtool isn't internationalized
-# cast_of_argument_to_free: ditto
-# cast_of_x_alloc_return_value: ditto
-# error_message_uppercase: we like our error messages
-# program_name: libtool has no programs!
+# cast_of_x_alloc_return_value:
+#         We support C++ compilation which does require casting here.
+# trailing_blank: flags valid rfc3676 separators
+# unmarked_diagnostics: libtool isn't internationalized
+
+sc_trailing_blank-non-rfc3676:
+       @prohibit='([^-][^-][    ][      ]*|^[   ][      ]*)$$'         \
+       halt='found trailing blank(s)'                                  \
+         $(_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)$$
+exclude_file_name_regexp--sc_prohibit_test_minus_ao = \
+  ^m4/libtool.m4$$
+exclude_file_name_regexp--sc_space_tab = \.diff$$
+exclude_file_name_regexp--sc_trailing_blank-non-rfc3676 = \.diff$$
diff --git a/configure.ac b/configure.ac
index d6906d1..5c07723 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ dnl Oldest automake required for bootstrap is below in 
AM_INIT_AUTOMAKE.
 ## Autoconf initialisation. ##
 ## ------------------------ ##
 AC_INIT([GNU Libtool],
-       m4_esyscmd([libltdl/config/git-version-gen .tarball-version]),
+       m4_esyscmd([build-aux/git-version-gen .tarball-version]),
        address@hidden)
 m4_ifndef([AC_PACKAGE_URL],
          [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/s/libtool/])])
@@ -51,8 +51,8 @@ m4_define([AC_CONFIG_MACRO_DIR],
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([libtoolize.m4sh])
 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
-AC_CONFIG_AUX_DIR([libltdl/config])
-AC_CONFIG_MACRO_DIR([libltdl/m4])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_LIBOBJ_DIR([libltdl])
 
 package_revision=`$SHELL $ac_aux_dir/git-version-gen .tarball-version`
@@ -186,7 +186,8 @@ AC_CACHE_CHECK([whether ${MAKE-make} supports order-only 
prerequisites],
    touch b
    touch a
 cat >confmk << 'END'
-a: b | c
+ORDER = |
+a: b $(ORDER) c
 a b c:
        touch $[]@
 END
diff --git a/doc/PLATFORMS b/doc/PLATFORMS
index a724144..eb8ee73 100644
--- a/doc/PLATFORMS
+++ b/doc/PLATFORMS
@@ -110,7 +110,7 @@ mips-sgi-irix5.2                cc       1.3b     ok
 mips-sni-sysv4                 cc       1.3.5    ok
   (Siemens C-compiler)
 mips-sni-sysv4                 gcc      1.3.5    ok
-  (gcc-2.7.2.3, GNU assembler 2.8.1, native ld) 
+  (gcc-2.7.2.3, GNU assembler 2.8.1, native ld)
 mipsel-unknown-openbsd2.1       gcc      1.0      ok
 powerpc-apple-darwin6.4         gcc      1.5      ok
 (apple dev tools released 12/2002)
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 462efa5..cdb0cd7 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -1710,7 +1710,7 @@ expected installation path established during 
@code{libtool --mode=link}.
 
 Thus, end-users need change nothing, and @command{automake}-style
 @code{make install DESTDIR=/tmp} will Just Work(tm) most of the time.
-For systems where fast installation can not be turned on, relinking
+For systems where fast installation cannot be turned on, relinking
 may be needed.  In this case, a @samp{DESTDIR} install will fail.
 
 Currently it is not generally possible to install into a temporary
@@ -2558,7 +2558,7 @@ you will need to add the following to the 
@file{Makefile.am} of the
 parent project:
 
 @example
-## libltdl/Makefile.inc @r{appends to the following variables}
+## libltdl/ltdl.mk @r{appends to the following variables}
 ## @r{so we set them here before including it:}
 BUILT_SOURCES   =
 
@@ -2575,7 +2575,7 @@ EXTRA_DIST   =
 CLEANFILES   =
 MOSTLYCLEANFILES   =
 
-include libltdl/Makefile.inc
+include libltdl/ltdl.mk
 @end example
 
 @noindent
@@ -3221,9 +3221,9 @@ Here are the relevant portions of that file:
    compilers that don't understand ANSI C prototypes still work,
    and ANSI C compilers can issue warnings about type mismatches. */
 #undef PARAMS
-#if defined (__STDC__) || defined (_AIX) \
-        || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
-        || defined(WIN32) || defined(__cplusplus)
+#if defined __STDC__ || defined _AIX \
+        || (defined __mips && defined _SYSTYPE_SVR4) \
+        || defined WIN32 || defined __cplusplus
 # define PARAMS(protos) protos
 #else
 # define PARAMS(protos) ()
@@ -4635,7 +4635,7 @@ This function allows you to integrate your own error 
messages into
 If the allocation of an identifier fails, this function returns -1.
 
 @example
-int myerror = lt_dladderror ("Doh!");
+int myerror = lt_dladderror ("doh!");
 if (myerror < 0)
   perror (lt_dlerror ());
 @end example
@@ -4816,14 +4816,14 @@ noinst_LTLIBRARIES =
 lib_LTLIBRARIES =
 EXTRA_LTLIBRARIES =
 
-include libltdl/Makefile.inc
+include libltdl/ltdl.mk
 @end example
 
 @noindent
 Unless you build no other libraries from this @file{Makefile.am},
 you will also need to change @code{lib_LTLIBRARIES} to assign with
 @samp{+=} so that the @code{libltdl} targets declared in
address@hidden are not overwritten.
address@hidden are not overwritten.
 
 @item recursive
 This build mode still requires that you use Automake, but (in contrast
@@ -6855,7 +6855,7 @@ line (such as @address@hidden/address@hidden) when
 @end defvar
 
 @defvar hardcode_direct_absolute
-Some architectures hardcode "absolute" library directories that can not
+Some architectures hardcode "absolute" library directories that cannot
 be overridden by @code{shlibpath_var} when @code{hardcode_direct} is
 @samp{yes}.  In that case set @code{hardcode_direct_absolute} to
 @samp{yes}, or otherwise @samp{no}.
diff --git a/libltdl/argz.c b/libltdl/argz.c
index 8567723..c30276b 100644
--- a/libltdl/argz.c
+++ b/libltdl/argz.c
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
 
-#if defined(LTDL) && defined LT_CONFIG_H
+#if defined LTDL && defined LT_CONFIG_H
 #  include LT_CONFIG_H
 #else
 #  include <config.h>
@@ -37,7 +37,6 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #include <argz.h>
 
 #include <assert.h>
-#include <stddef.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <errno.h>
@@ -223,4 +222,3 @@ argz_stringify (char *argz, size_t argz_len, int sep)
        }
     }
 }
-
diff --git a/libltdl/argz_.h b/libltdl/argz_.h
index 0557575..25d3e56 100644
--- a/libltdl/argz_.h
+++ b/libltdl/argz_.h
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#if !defined(LT__ARGZ_H)
+#if !defined LT__ARGZ_H
 #define LT__ARGZ_H 1
 
 #include <stdlib.h>
@@ -36,14 +36,14 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #include <errno.h>
 #include <sys/types.h>
 
-#if defined(LTDL)
+#if defined LTDL
 #  include "lt__glibc.h"
 #  include "lt_system.h"
 #else
 #  define LT_SCOPE
 #endif
 
-#if defined(__cplusplus)
+#if defined __cplusplus
 extern "C" {
 #endif
 
@@ -57,12 +57,12 @@ LT_SCOPE char *      argz_next      (char *argz, size_t 
argz_len,
                                 const char *entry);
 LT_SCOPE void   argz_stringify (char *argz, size_t argz_len, int sep);
 
-#if defined(__cplusplus)
+#if defined __cplusplus
 }
 #endif
 
-#if !defined(LTDL)
+#if !defined LTDL
 #  undef LT_SCOPE
 #endif
 
-#endif /*!defined(LT__ARGZ_H)*/
+#endif /*!defined LT__ARGZ_H*/
diff --git a/libltdl/configure.ac b/libltdl/configure.ac
index 9b737c2..662a0ff 100644
--- a/libltdl/configure.ac
+++ b/libltdl/configure.ac
@@ -43,8 +43,7 @@ AC_PREREQ(2.59)dnl We use AS_HELP_STRING
 AC_INIT([libltdl], [2.4.3a], address@hidden)
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([ltdl.c])
-AC_CONFIG_AUX_DIR([config])
-AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([../build-aux])
 LT_CONFIG_LTDL_DIR([.]) # I am me!
 
 
diff --git a/libltdl/libgnu/.gitignore b/libltdl/libgnu/.gitignore
deleted file mode 100644
index d9f5394..0000000
--- a/libltdl/libgnu/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile.am
-/dummy.c
diff --git a/libltdl/libltdl/lt__alloc.h b/libltdl/libltdl/lt__alloc.h
index 1ceddf0..23807c8 100644
--- a/libltdl/libltdl/lt__alloc.h
+++ b/libltdl/libltdl/lt__alloc.h
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#if !defined(LT__ALLOC_H)
+#if !defined LT__ALLOC_H
 #define LT__ALLOC_H 1
 
 #include "lt_system.h"
@@ -37,10 +37,10 @@ LT_BEGIN_C_DECLS
 
 #define MALLOC(tp, n)          (tp*) lt__malloc((n) * sizeof(tp))
 #define REALLOC(tp, mem, n)    (tp*) lt__realloc((mem), (n) * sizeof(tp))
-#define FREE(mem)                                      LT_STMT_START { \
-       if (mem) { free ((void *)mem); mem = NULL; }    } LT_STMT_END
-#define MEMREASSIGN(p, q)                              LT_STMT_START { \
-       if ((p) != (q)) { if (p) free (p); (p) = (q); (q) = 0; }        \
+#define FREE(mem)                              LT_STMT_START { \
+       free (mem); mem = NULL;                                 } LT_STMT_END
+#define MEMREASSIGN(p, q)                      LT_STMT_START { \
+       if ((p) != (q)) { free (p); (p) = (q); (q) = 0; }       \
                                                                } LT_STMT_END
 
 /* If set, this function is called when memory allocation has failed.  */
@@ -55,4 +55,4 @@ LT_SCOPE char *lt__strdup (const char *string);
 
 LT_END_C_DECLS
 
-#endif /*!defined(LT__ALLOC_H)*/
+#endif /*!defined LT__ALLOC_H*/
diff --git a/libltdl/libltdl/lt__dirent.h b/libltdl/libltdl/lt__dirent.h
index 4f24f82..b455422 100644
--- a/libltdl/libltdl/lt__dirent.h
+++ b/libltdl/libltdl/lt__dirent.h
@@ -28,10 +28,10 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#if !defined(LT__DIRENT_H)
+#if !defined LT__DIRENT_H
 #define LT__DIRENT_H 1
 
-#if defined(LT_CONFIG_H)
+#if defined LT_CONFIG_H
 #  include LT_CONFIG_H
 #else
 #  include <config.h>
@@ -80,8 +80,8 @@ LT_SCOPE void         closedir        (DIR *entry);
 
 LT_END_C_DECLS
 
-#else /* !defined(__WINDOWS__)*/
+#else /* !defined __WINDOWS__*/
 ERROR - cannot find dirent
-#endif /*!defined(__WINDOWS__)*/
+#endif /*!defined __WINDOWS__*/
 
-#endif /*!defined(LT__DIRENT_H)*/
+#endif /*!defined LT__DIRENT_H*/
diff --git a/libltdl/libltdl/lt__glibc.h b/libltdl/libltdl/lt__glibc.h
index f284773..a8f0bc3 100644
--- a/libltdl/libltdl/lt__glibc.h
+++ b/libltdl/libltdl/lt__glibc.h
@@ -28,16 +28,16 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#if !defined(LT__GLIBC_H)
+#if !defined LT__GLIBC_H
 #define LT__GLIBC_H 1
 
-#if defined(LT_CONFIG_H)
+#if defined LT_CONFIG_H
 #  include LT_CONFIG_H
 #else
 #  include <config.h>
 #endif
 
-#if !defined(HAVE_ARGZ_H) || !defined(HAVE_WORKING_ARGZ)
+#if !defined HAVE_ARGZ_H || !defined HAVE_WORKING_ARGZ
 /* Redefine any glibc symbols we reimplement to import the
    implementations into our lt__ namespace so we don't ever
    clash with the system library if our clients use argz_*
@@ -80,4 +80,4 @@ extern "C" {
 
 #include <slist.h>
 
-#endif /*!defined(LT__GLIBC_H)*/
+#endif /*!defined LT__GLIBC_H*/
diff --git a/libltdl/libltdl/lt__private.h b/libltdl/libltdl/lt__private.h
index f4c4a3d..5fb489e 100644
--- a/libltdl/libltdl/lt__private.h
+++ b/libltdl/libltdl/lt__private.h
@@ -28,10 +28,10 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#if !defined(LT__PRIVATE_H)
+#if !defined LT__PRIVATE_H
 #define LT__PRIVATE_H 1
 
-#if defined(LT_CONFIG_H)
+#if defined LT_CONFIG_H
 #  include LT_CONFIG_H
 #else
 #  include <config.h>
@@ -43,7 +43,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #include <errno.h>
 #include <string.h>
 
-#if defined(HAVE_UNISTD_H)
+#if defined HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
 
@@ -56,15 +56,15 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 /* ...and all exported interfaces.  */
 #include "ltdl.h"
 
-#if defined(WITH_DMALLOC)
+#if defined WITH_DMALLOC
 #  include <dmalloc.h>
 #endif
 
 /* DLL building support on win32 hosts;  mostly to workaround their
    ridiculous implementation of data symbol exporting. */
 #ifndef LT_GLOBAL_DATA
-# if defined(__WINDOWS__) || defined(__CYGWIN__)
-#  if defined(DLL_EXPORT)      /* defined by libtool (if required) */
+# if defined __WINDOWS__ || defined __CYGWIN__
+#  if defined DLL_EXPORT       /* defined by libtool (if required) */
 #   define LT_GLOBAL_DATA      __declspec(dllexport)
 #  endif
 # endif
@@ -86,7 +86,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 
 LT_BEGIN_C_DECLS
 
-#if !defined(errno)
+#if !defined errno
 extern int errno;
 #endif
 
@@ -94,8 +94,8 @@ LT_SCOPE void lt__alloc_die_callback (void);
 
 
 /* For readability:  */
-#define strneq(s1, s2) (strcmp((s1), (s2)) != 0)
-#define streq(s1, s2)  (!strcmp((s1), (s2)))
+#define STRNEQ(s1, s2) (strcmp((s1), (s2)) != 0)
+#define STREQ(s1, s2)  (strcmp((s1), (s2)) == 0)
 
 
 
@@ -146,4 +146,4 @@ LT_SCOPE const char *lt__set_last_error     (const char 
*errormsg);
 
 LT_END_C_DECLS
 
-#endif /*!defined(LT__PRIVATE_H)*/
+#endif /*!defined LT__PRIVATE_H*/
diff --git a/libltdl/libltdl/lt__strl.h b/libltdl/libltdl/lt__strl.h
index 5799dc8..915a688 100644
--- a/libltdl/libltdl/lt__strl.h
+++ b/libltdl/libltdl/lt__strl.h
@@ -28,10 +28,10 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
 
-#if !defined(LT__STRL_H)
+#if !defined LT__STRL_H
 #define LT__STRL_H 1
 
-#if defined(LT_CONFIG_H)
+#if defined LT_CONFIG_H
 #  include LT_CONFIG_H
 #else
 #  include <config.h>
@@ -40,14 +40,14 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #include <string.h>
 #include "lt_system.h"
 
-#if !defined(HAVE_STRLCAT)
+#if !defined HAVE_STRLCAT
 #  define strlcat(dst,src,dstsize) lt_strlcat(dst,src,dstsize)
 LT_SCOPE size_t lt_strlcat(char *dst, const char *src, const size_t dstsize);
-#endif /* !defined(HAVE_STRLCAT) */
+#endif /* !defined HAVE_STRLCAT */
 
-#if !defined(HAVE_STRLCPY)
+#if !defined HAVE_STRLCPY
 #  define strlcpy(dst,src,dstsize) lt_strlcpy(dst,src,dstsize)
 LT_SCOPE size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize);
-#endif /* !defined(HAVE_STRLCPY) */
+#endif /* !defined HAVE_STRLCPY */
 
-#endif /*!defined(LT__STRL_H)*/
+#endif /*!defined LT__STRL_H*/
diff --git a/libltdl/libltdl/lt_dlloader.h b/libltdl/libltdl/lt_dlloader.h
index 589fd0d..ed9b489 100644
--- a/libltdl/libltdl/lt_dlloader.h
+++ b/libltdl/libltdl/lt_dlloader.h
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
 
-#if !defined(LT_DLLOADER_H)
+#if !defined LT_DLLOADER_H
 #define LT_DLLOADER_H 1
 
 #include <libltdl/lt_system.h>
@@ -87,4 +87,4 @@ LT_SCOPE void         lt_dlloader_dump        (void);
 
 LT_END_C_DECLS
 
-#endif /*!defined(LT_DLLOADER_H)*/
+#endif /*!defined LT_DLLOADER_H*/
diff --git a/libltdl/libltdl/lt_error.h b/libltdl/libltdl/lt_error.h
index e789b3a..5c2dab2 100644
--- a/libltdl/libltdl/lt_error.h
+++ b/libltdl/libltdl/lt_error.h
@@ -29,7 +29,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 */
 
 /* Only include this header file once. */
-#if !defined(LT_ERROR_H)
+#if !defined LT_ERROR_H
 #define LT_ERROR_H 1
 
 #include <libltdl/lt_system.h>
@@ -82,4 +82,4 @@ LT_SCOPE int  lt_dlseterror   (int errorcode);
 
 LT_END_C_DECLS
 
-#endif /*!defined(LT_ERROR_H)*/
+#endif /*!defined LT_ERROR_H*/
diff --git a/libltdl/libltdl/lt_system.h b/libltdl/libltdl/lt_system.h
index f1545ce..2d65eb5 100644
--- a/libltdl/libltdl/lt_system.h
+++ b/libltdl/libltdl/lt_system.h
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
 
-#if !defined(LT_SYSTEM_H)
+#if !defined LT_SYSTEM_H
 #define LT_SYSTEM_H 1
 
 #include <stddef.h>
@@ -36,10 +36,10 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #include <sys/types.h>
 
 /* Some systems do not define EXIT_*, even with STDC_HEADERS.  */
-#if !defined(EXIT_SUCCESS)
+#if !defined EXIT_SUCCESS
 # define EXIT_SUCCESS 0
 #endif
-#if !defined(EXIT_FAILURE)
+#if !defined EXIT_FAILURE
 # define EXIT_FAILURE 1
 #endif
 
@@ -53,7 +53,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
    so that C++ compilers don't mangle their names.  Use LTDL_END_C_DECLS at
    the end of C declarations. */
-#if defined(__cplusplus)
+#if defined __cplusplus
 # define LT_BEGIN_C_DECLS      extern "C" {
 # define LT_END_C_DECLS                }
 #else
@@ -63,11 +63,11 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 
 /* LT_STMT_START/END are used to create macros which expand to a
    a single compound statement in a portable way.  */
-#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
+#if defined  __GNUC__ && !defined  __STRICT_ANSI__ && !defined  __cplusplus
 #  define LT_STMT_START        (void)(
 #  define LT_STMT_END          )
 #else
-#  if (defined (sun) || defined (__sun__))
+#  if (defined sun || defined __sun__)
 #    define LT_STMT_START      if (1)
 #    define LT_STMT_END        else (void)0
 #  else
@@ -77,11 +77,11 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #endif
 
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  
*/
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#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__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
@@ -91,41 +91,41 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 /* Canonicalise Windows and Cygwin recognition macros.
    To match the values set by recent Cygwin compilers, make sure that if
    __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT!  */
-#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
+#if defined __CYGWIN32__ && !defined __CYGWIN__
 # define __CYGWIN__ __CYGWIN32__
 #endif
-#if defined(__CYGWIN__)
-# if defined(__WINDOWS__)
+#if defined __CYGWIN__
+# if defined __WINDOWS__
 #   undef __WINDOWS__
 # endif
-#elif defined(_WIN32)
+#elif defined _WIN32
 # define __WINDOWS__ _WIN32
-#elif defined(WIN32)
+#elif defined WIN32
 # define __WINDOWS__ WIN32
 #endif
-#if defined(__CYGWIN__) && defined(__WINDOWS__)
+#if defined __CYGWIN__ && defined __WINDOWS__
 # undef __WINDOWS__
 #endif
 
 
 /* DLL building support on win32 hosts;  mostly to workaround their
    ridiculous implementation of data symbol exporting. */
-#if !defined(LT_SCOPE)
-#  if defined(__WINDOWS__) || defined(__CYGWIN__)
-#    if defined(DLL_EXPORT)            /* defined by libtool (if required) */
+#if !defined LT_SCOPE
+#  if defined __WINDOWS__ || defined __CYGWIN__
+#    if defined DLL_EXPORT             /* defined by libtool (if required) */
 #      define LT_SCOPE extern __declspec(dllexport)
 #    endif
-#    if defined(LIBLTDL_DLL_IMPORT)    /* define if linking with this dll */
+#    if defined LIBLTDL_DLL_IMPORT     /* define if linking with this dll */
        /* note: cygwin/mingw compilers can rely instead on auto-import */
 #      define LT_SCOPE extern __declspec(dllimport)
 #    endif
 #  endif
-#  if !defined(LT_SCOPE)               /* static linking or !__WINDOWS__ */
+#  if !defined LT_SCOPE                        /* static linking or 
!__WINDOWS__ */
 #    define LT_SCOPE   extern
 #  endif
 #endif
 
-#if defined(__WINDOWS__)
+#if defined __WINDOWS__
 /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
    separator when it is set. */
 # define LT_DIRSEP_CHAR                '\\'
@@ -134,13 +134,13 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 # define LT_PATHSEP_CHAR       ':'
 #endif
 
-#if defined(_MSC_VER) /* Visual Studio */
+#if defined _MSC_VER /* Visual Studio */
 #  define R_OK 4
 #endif
 
 /* fopen() mode flags for reading a text file */
 #undef LT_READTEXT_MODE
-#if defined(__WINDOWS__) || defined(__CYGWIN__)
+#if defined __WINDOWS__ || defined __CYGWIN__
 #  define LT_READTEXT_MODE "rt"
 #else
 #  define LT_READTEXT_MODE "r"
@@ -163,4 +163,4 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #  define LT_CONC3(a, b, c)    LT__CONC3(a, b, c)
 #endif
 
-#endif /*!defined(LT_SYSTEM_H)*/
+#endif /*!defined LT_SYSTEM_H*/
diff --git a/libltdl/libltdl/slist.h b/libltdl/libltdl/slist.h
index 4d56509..0cd7f0c 100644
--- a/libltdl/libltdl/slist.h
+++ b/libltdl/libltdl/slist.h
@@ -38,10 +38,10 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
    get to manage the memory involved by yourself.
 */
 
-#if !defined(SLIST_H)
+#if !defined SLIST_H
 #define SLIST_H 1
 
-#if defined(LTDL)
+#if defined LTDL
 #  include <libltdl/lt__glibc.h>
 #  include <libltdl/lt_system.h>
 #else
@@ -50,7 +50,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 
 #include <stddef.h>
 
-#if defined(__cplusplus)
+#if defined __cplusplus
 extern "C" {
 #endif
 
@@ -85,12 +85,12 @@ LT_SCOPE void *     slist_foreach   (SList *slist, 
SListCallback *foreach,
 LT_SCOPE SList *slist_box      (const void *userdata);
 LT_SCOPE void *        slist_unbox     (SList *item);
 
-#if defined(__cplusplus)
+#if defined __cplusplus
 }
 #endif
 
-#if !defined(LTDL)
+#if !defined LTDL
 #  undef LT_SCOPE
 #endif
 
-#endif /*!defined(SLIST_H)*/
+#endif /*!defined SLIST_H*/
diff --git a/libltdl/loaders/dld_link.c b/libltdl/loaders/dld_link.c
index 7e882c9..97aad1e 100644
--- a/libltdl/loaders/dld_link.c
+++ b/libltdl/loaders/dld_link.c
@@ -90,7 +90,7 @@ get_vtable (lt_user_data loader_data)
 /* --- IMPLEMENTATION --- */
 
 
-#if defined(HAVE_DLD_H)
+#if defined HAVE_DLD_H
 #  include <dld.h>
 #endif
 
diff --git a/libltdl/loaders/dlopen.c b/libltdl/loaders/dlopen.c
index 1d052b4..2866e62 100644
--- a/libltdl/loaders/dlopen.c
+++ b/libltdl/loaders/dlopen.c
@@ -68,7 +68,7 @@ get_vtable (lt_user_data loader_data)
   if (vtable && !vtable->name)
     {
       vtable->name             = "lt_dlopen";
-#if defined(DLSYM_USCORE)
+#if defined DLSYM_USCORE
       vtable->sym_prefix       = "_";
 #endif
       vtable->module_open      = vm_open;
@@ -93,53 +93,53 @@ get_vtable (lt_user_data loader_data)
 /* --- IMPLEMENTATION --- */
 
 
-#if defined(HAVE_DLFCN_H)
+#if defined HAVE_DLFCN_H
 #  include <dlfcn.h>
 #endif
 
-#if defined(HAVE_SYS_DL_H)
+#if defined HAVE_SYS_DL_H
 #  include <sys/dl.h>
 #endif
 
 
 /* We may have to define LT_LAZY_OR_NOW in the command line if we
    find out it does not work in some platform. */
-#if !defined(LT_LAZY_OR_NOW)
-#  if defined(RTLD_LAZY)
+#if !defined LT_LAZY_OR_NOW
+#  if defined RTLD_LAZY
 #    define LT_LAZY_OR_NOW     RTLD_LAZY
 #  else
-#    if defined(DL_LAZY)
+#    if defined DL_LAZY
 #      define LT_LAZY_OR_NOW   DL_LAZY
 #    endif
 #  endif /* !RTLD_LAZY */
 #endif
-#if !defined(LT_LAZY_OR_NOW)
-#  if defined(RTLD_NOW)
+#if !defined LT_LAZY_OR_NOW
+#  if defined RTLD_NOW
 #    define LT_LAZY_OR_NOW     RTLD_NOW
 #  else
-#    if defined(DL_NOW)
+#    if defined DL_NOW
 #      define LT_LAZY_OR_NOW   DL_NOW
 #    endif
 #  endif /* !RTLD_NOW */
 #endif
-#if !defined(LT_LAZY_OR_NOW)
+#if !defined LT_LAZY_OR_NOW
 #  define LT_LAZY_OR_NOW       0
 #endif /* !LT_LAZY_OR_NOW */
 
 /* We only support local and global symbols from modules for loaders
    that provide such a thing, otherwise the system default is used.  */
-#if !defined(RTLD_GLOBAL)
-#  if defined(DL_GLOBAL)
+#if !defined RTLD_GLOBAL
+#  if defined DL_GLOBAL
 #    define RTLD_GLOBAL                DL_GLOBAL
 #  endif
 #endif /* !RTLD_GLOBAL */
-#if !defined(RTLD_LOCAL)
-#  if defined(DL_LOCAL)
+#if !defined RTLD_LOCAL
+#  if defined DL_LOCAL
 #    define RTLD_LOCAL         DL_LOCAL
 #  endif
 #endif /* !RTLD_LOCAL */
 
-#if defined(HAVE_DLERROR)
+#if defined HAVE_DLERROR
 #  define DLERROR(arg) dlerror ()
 #else
 #  define DLERROR(arg) LT__STRERROR (arg)
diff --git a/libltdl/loaders/dyld.c b/libltdl/loaders/dyld.c
index b139d6c..ee60cfe 100644
--- a/libltdl/loaders/dyld.c
+++ b/libltdl/loaders/dyld.c
@@ -93,8 +93,8 @@ get_vtable (lt_user_data loader_data)
 /* --- IMPLEMENTATION --- */
 
 
-#if defined(HAVE_MACH_O_DYLD_H)
-#  if !defined(__APPLE_CC__) && !defined(__MWERKS__) && 
!defined(__private_extern__)
+#if defined HAVE_MACH_O_DYLD_H
+#  if !defined __APPLE_CC__ && !defined __MWERKS__ && !defined 
__private_extern__
   /* Is this correct? Does it still function properly? */
 #    define __private_extern__ extern
 #  endif
@@ -104,7 +104,7 @@ get_vtable (lt_user_data loader_data)
 #include <mach-o/getsect.h>
 
 /* We have to put some stuff here that isn't in older dyld.h files */
-#if !defined(ENUM_DYLD_BOOL)
+#if !defined ENUM_DYLD_BOOL
 # define ENUM_DYLD_BOOL
 # undef FALSE
 # undef TRUE
@@ -113,46 +113,46 @@ get_vtable (lt_user_data loader_data)
     TRUE
  };
 #endif
-#if !defined(LC_REQ_DYLD)
+#if !defined LC_REQ_DYLD
 # define LC_REQ_DYLD 0x80000000
 #endif
-#if !defined(LC_LOAD_WEAK_DYLIB)
+#if !defined LC_LOAD_WEAK_DYLIB
 # define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)
 #endif
 
-#if !defined(NSADDIMAGE_OPTION_NONE)
+#if !defined NSADDIMAGE_OPTION_NONE
 #  define NSADDIMAGE_OPTION_NONE                          0x0
 #endif
-#if !defined(NSADDIMAGE_OPTION_RETURN_ON_ERROR)
+#if !defined NSADDIMAGE_OPTION_RETURN_ON_ERROR
 #  define NSADDIMAGE_OPTION_RETURN_ON_ERROR               0x1
 #endif
-#if !defined(NSADDIMAGE_OPTION_WITH_SEARCHING)
+#if !defined NSADDIMAGE_OPTION_WITH_SEARCHING
 #  define NSADDIMAGE_OPTION_WITH_SEARCHING                0x2
 #endif
-#if !defined(NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED)
+#if !defined NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
 #  define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED         0x4
 #endif
-#if !defined(NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME)
+#if !defined NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME
 #  define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8
 #endif
 
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND)
+#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
 #  define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND               0x0
 #endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW)
+#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
 #  define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW           0x1
 #endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY)
+#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY
 #  define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY         0x2
 #endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
+#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
 #  define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR    0x4
 #endif
 
 #define LT__SYMLOOKUP_OPTS     (NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW \
                                | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
 
-#if defined(__BIG_ENDIAN__)
+#if defined __BIG_ENDIAN__
 #  define LT__MAGIC    MH_MAGIC
 #else
 #  define LT__MAGIC    MH_CIGAM
@@ -240,8 +240,8 @@ vm_open (lt_user_data loader_data, const char *filename,
     {
     case NSObjectFileImageSuccess:
       module = NSLinkModule (ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR
-                                           | NSLINKMODULE_OPTION_PRIVATE
-                                           | NSLINKMODULE_OPTION_BINDNOW);
+                                           | NSLINKMODULE_OPTION_PRIVATE
+                                           | NSLINKMODULE_OPTION_BINDNOW);
       NSDestroyObjectFileImage (ofi);
 
       if (module)
@@ -302,7 +302,7 @@ vm_close (lt_user_data loader_data, lt_module module)
            {
              flags |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
            }
-#if defined(__ppc__)
+#if defined __ppc__
          flags |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
 #endif
          if (!NSUnLinkModule (module, flags))
diff --git a/libltdl/loaders/loadlibrary.c b/libltdl/loaders/loadlibrary.c
index 179c009..2c2dc75 100644
--- a/libltdl/loaders/loadlibrary.c
+++ b/libltdl/loaders/loadlibrary.c
@@ -32,7 +32,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #include "lt__private.h"
 #include "lt_dlloader.h"
 
-#if defined(__CYGWIN__)
+#if defined __CYGWIN__
 # include <sys/cygwin.h>
 #endif
 
@@ -163,7 +163,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char 
*filename,
          return 0;
        }
       len = 0;
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
       cygwin_conv_to_full_win32_path (filename, wpath);
       len = 0;
 #else
diff --git a/libltdl/loaders/preopen.c b/libltdl/loaders/preopen.c
index 7149287..1fe4127 100644
--- a/libltdl/loaders/preopen.c
+++ b/libltdl/loaders/preopen.c
@@ -168,7 +168,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char 
*filename,
       const lt_dlsymlist *symbol;
       for (symbol= lists->symlist; symbol->name; ++symbol)
        {
-         if (!symbol->address && streq (symbol->name, filename))
+         if (!symbol->address && STREQ (symbol->name, filename))
            {
              /* If the next symbol's name and address is 0, it means
                 the module just contains the originator and no symbols.
@@ -214,7 +214,7 @@ vm_sym (lt_user_data LT__UNUSED loader_data, lt_module 
module, const char *name)
 
   while (symbol->name)
     {
-      if (streq (symbol->name, name))
+      if (STREQ (symbol->name, name))
        {
          return symbol->address;
        }
@@ -336,8 +336,8 @@ lt_dlpreload_open (const char *originator, 
lt_dlpreload_callback_func *func)
   for (list = preloaded_symlists; list; list = list->next)
     {
       /* ...that was preloaded by the requesting ORIGINATOR... */
-      if ((originator && streq (list->symlist->name, originator))
-          || (!originator && streq (list->symlist->name, "@PROGRAM@")))
+      if ((originator && STREQ (list->symlist->name, originator))
+          || (!originator && STREQ (list->symlist->name, "@PROGRAM@")))
        {
          const lt_dlsymlist *symbol;
          unsigned int idx = 0;
@@ -349,7 +349,7 @@ lt_dlpreload_open (const char *originator, 
lt_dlpreload_callback_func *func)
          while ((symbol = &list->symlist[++idx])->name != 0)
            {
              if ((symbol->address == 0)
-                 && (strneq (symbol->name, "@PROGRAM@")))
+                 && (STRNEQ (symbol->name, "@PROGRAM@")))
                {
                  lt_dlhandle handle = lt_dlopen (symbol->name);
                  if (handle == 0)
diff --git a/libltdl/loaders/shl_load.c b/libltdl/loaders/shl_load.c
index 5a09d87..7ebfeec 100644
--- a/libltdl/loaders/shl_load.c
+++ b/libltdl/loaders/shl_load.c
@@ -90,7 +90,7 @@ get_vtable (lt_user_data loader_data)
 /* --- IMPLEMENTATION --- */
 
 
-#if defined(HAVE_DL_H)
+#if defined HAVE_DL_H
 #  include <dl.h>
 #endif
 
@@ -103,11 +103,11 @@ get_vtable (lt_user_data loader_data)
  *
  * Optionally:
  * BIND_FIRST     - Place the library at the head of the symbol search
- *                  order.
+ *                  order.
  * BIND_NONFATAL   - The default BIND_IMMEDIATE behavior is to treat all
- *                  unsatisfied symbols as fatal.  This flag allows
- *                  binding of unsatisfied code symbols to be deferred
- *                  until use.
+ *                  unsatisfied symbols as fatal.  This flag allows
+ *                  binding of unsatisfied code symbols to be deferred
+ *                  until use.
  *                  [Perl: For certain libraries, like DCE, deferred
  *                  binding often causes run time problems. Adding
  *                  BIND_NONFATAL to BIND_IMMEDIATE still allows
@@ -125,10 +125,10 @@ get_vtable (lt_user_data loader_data)
  *                  library specified by the path argument.
  */
 
-#if !defined(DYNAMIC_PATH)
+#if !defined DYNAMIC_PATH
 #  define DYNAMIC_PATH         0
 #endif
-#if !defined(BIND_RESTRICTED)
+#if !defined BIND_RESTRICTED
 #  define BIND_RESTRICTED      0
 #endif
 
diff --git a/libltdl/lt__dirent.c b/libltdl/lt__dirent.c
index 30dc072..6da267c 100644
--- a/libltdl/lt__dirent.c
+++ b/libltdl/lt__dirent.c
@@ -31,18 +31,17 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #include "lt__private.h"
 
 #include <assert.h>
-#include <stddef.h>
 
 #include "lt__dirent.h"
 
-#if defined(__WINDOWS__)
+#if defined __WINDOWS__
 
 void
 closedir (DIR *entry)
 {
   assert (entry != (DIR *) NULL);
   FindClose (entry->hSearch);
-  free ((void *) entry);
+  free (entry);
 }
 
 
@@ -104,4 +103,4 @@ readdir (DIR *entry)
   return &entry->file_info;
 }
 
-#endif /*defined(__WINDOWS__)*/
+#endif /*defined __WINDOWS__*/
diff --git a/libltdl/lt__strl.c b/libltdl/lt__strl.c
index c2cee58..e79a0d2 100644
--- a/libltdl/lt__strl.c
+++ b/libltdl/lt__strl.c
@@ -46,7 +46,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
    if (lt_strlcat(dst, src, dstsize) >= dstsize)
      return -1;
 */
-#if !defined(HAVE_STRLCAT)
+#if !defined HAVE_STRLCAT
 size_t
 lt_strlcat(char *dst, const char *src, const size_t dstsize)
 {
@@ -79,7 +79,7 @@ lt_strlcat(char *dst, const char *src, const size_t dstsize)
 
   return length;
 }
-#endif /* !defined(HAVE_STRLCAT) */
+#endif /* !defined HAVE_STRLCAT */
 
 /*
   lt_strlcpy copies up to dstsize - 1 characters from the NULL-terminated
@@ -94,7 +94,7 @@ lt_strlcat(char *dst, const char *src, const size_t dstsize)
     if (lt_strlcpy(dst, src, dstsize) >= dstsize)
       return -1;
 */
-#if !defined(HAVE_STRLCPY)
+#if !defined HAVE_STRLCPY
 size_t
 lt_strlcpy(char *dst, const char *src, const size_t dstsize)
 {
@@ -124,4 +124,4 @@ lt_strlcpy(char *dst, const char *src, const size_t dstsize)
 
   return length;
 }
-#endif /* !defined(HAVE_STRLCPY) */
+#endif /* !defined HAVE_STRLCPY */
diff --git a/libltdl/lt_dlloader.c b/libltdl/lt_dlloader.c
index 2c99a22..699a504 100644
--- a/libltdl/lt_dlloader.c
+++ b/libltdl/lt_dlloader.c
@@ -52,7 +52,7 @@ loader_callback (SList *item, void *userdata)
 
   assert (vtable);
 
-  return streq (vtable->name, name) ? (void *) item : NULL;
+  return STREQ (vtable->name, name) ? (void *) item : NULL;
 }
 
 
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
index 01853e0..fba276c 100644
--- a/libltdl/ltdl.c
+++ b/libltdl/ltdl.c
@@ -46,15 +46,15 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #define LT_ARCHIVE_EXT ".la"
 
 /* max. filename length */
-#if !defined(LT_FILENAME_MAX)
+#if !defined LT_FILENAME_MAX
 #  define LT_FILENAME_MAX      1024
 #endif
 
-#if !defined(LT_LIBEXT)
+#if !defined LT_LIBEXT
 #  define LT_LIBEXT "a"
 #endif
 
-#if !defined(LT_LIBPREFIX)
+#if !defined LT_LIBPREFIX
 #  define LT_LIBPREFIX "lib"
 #endif
 
@@ -77,15 +77,15 @@ static      const char      objdir[]                = 
LT_OBJDIR;
 static const char      archive_ext[]           = LT_ARCHIVE_EXT;
 static  const char     libext[]                = LT_LIBEXT;
 static  const char     libprefix[]             = LT_LIBPREFIX;
-#if defined(LT_MODULE_EXT)
+#if defined LT_MODULE_EXT
 static const char      shlib_ext[]             = LT_MODULE_EXT;
 #endif
 /* If the loadable module suffix is not the same as the linkable
  * shared library suffix, this will be defined. */
-#if defined(LT_SHARED_EXT)
+#if defined LT_SHARED_EXT
 static const char      shared_ext[]            = LT_SHARED_EXT;
 #endif
-#if defined(LT_DLSEARCH_PATH)
+#if defined LT_DLSEARCH_PATH
 static const char      sys_dlsearch_path[]     = LT_DLSEARCH_PATH;
 #endif
 
@@ -385,7 +385,7 @@ tryall_dlopen (lt_dlhandle *phandle, const char *filename,
     {
       if ((handle->info.filename == filename) /* dlopen self: 0 == 0 */
          || (handle->info.filename && filename
-             && streq (handle->info.filename, filename)))
+             && STREQ (handle->info.filename, filename)))
        {
          break;
        }
@@ -495,7 +495,7 @@ tryall_dlopen_module (lt_dlhandle *handle, const char 
*prefix,
   assert (handle);
   assert (dirname);
   assert (dlname);
-#if defined(LT_DIRSEP_CHAR)
+#if defined LT_DIRSEP_CHAR
   /* Only canonicalized names (i.e. with DIRSEP chars already converted)
      should make it into this function:  */
   assert (strchr (dirname, LT_DIRSEP_CHAR) == 0);
@@ -606,7 +606,7 @@ canonicalize_path (const char *path, char **pcanonical)
 
        /* Anything other than a directory separator is copied verbatim.  */
        if ((path[src] != '/')
-#if defined(LT_DIRSEP_CHAR)
+#if defined LT_DIRSEP_CHAR
            && (path[src] != LT_DIRSEP_CHAR)
 #endif
            )
@@ -618,7 +618,7 @@ canonicalize_path (const char *path, char **pcanonical)
           NULL terminator.  */
        else if ((path[1+ src] != LT_PATHSEP_CHAR)
                 && (path[1+ src] != LT_EOS_CHAR)
-#if defined(LT_DIRSEP_CHAR)
+#if defined LT_DIRSEP_CHAR
                 && (path[1+ src] != LT_DIRSEP_CHAR)
 #endif
                 && (path[1+ src] != '/'))
@@ -806,7 +806,7 @@ find_handle (const char *search_path, const char *base_name,
   return phandle;
 }
 
-#if !defined(LTDL_DLOPEN_DEPLIBS)
+#if !defined LTDL_DLOPEN_DEPLIBS
 static int
 load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
 {
@@ -814,7 +814,7 @@ load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
   return 0;
 }
 
-#else /* defined(LTDL_DLOPEN_DEPLIBS) */
+#else /* defined LTDL_DLOPEN_DEPLIBS */
 static int
 load_deplibs (lt_dlhandle handle, char *deplibs)
 {
@@ -969,7 +969,7 @@ load_deplibs (lt_dlhandle handle, char *deplibs)
 
   return errors;
 }
-#endif /* defined(LTDL_DLOPEN_DEPLIBS) */
+#endif /* defined LTDL_DLOPEN_DEPLIBS */
 
 static int
 unload_deplibs (lt_dlhandle handle)
@@ -1108,11 +1108,11 @@ parse_dotla_file(FILE *file, char **dlname, char 
**libdir, char **deplibs,
        {
          errors += trim (deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]);
        }
-      else if (streq (line, "installed=yes\n"))
+      else if (STREQ (line, "installed=yes\n"))
        {
          *installed = 1;
        }
-      else if (streq (line, "installed=no\n"))
+      else if (STREQ (line, "installed=no\n"))
        {
          *installed = 0;
        }
@@ -1274,7 +1274,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, 
const char *ext,
     name[ext - base_name] = LT_EOS_CHAR;
   }
 
-  /* Before trawling through the filesystem in search of a module,
+  /* Before trawling through the file system in search of a module,
      check whether we are opening a preloaded module.  */
   if (!dir)
     {
@@ -1324,7 +1324,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, 
const char *ext,
     }
 
   /* Check whether we are opening a libtool module (.la extension).  */
-  if (ext && streq (ext, archive_ext))
+  if (ext && STREQ (ext, archive_ext))
     {
       /* this seems to be a libtool module */
       FILE *   file     = 0;
@@ -1356,7 +1356,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, 
const char *ext,
                file = find_file (search_path, base_name, &dir);
            }
 
-#if defined(LT_MODULE_PATH_VAR)
+#if defined LT_MODULE_PATH_VAR
          if (!file)
            {
              search_path = getenv (LT_MODULE_PATH_VAR);
@@ -1364,7 +1364,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, 
const char *ext,
                file = find_file (search_path, base_name, &dir);
            }
 #endif
-#if defined(LT_DLSEARCH_PATH)
+#if defined LT_DLSEARCH_PATH
          if (!file && *sys_dlsearch_path)
            {
              file = find_file (sys_dlsearch_path, base_name, &dir);
@@ -1461,11 +1461,11 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, 
const char *ext,
                                 &newhandle, advise)
                   && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name,
                                    &newhandle, advise)
-#if defined(LT_MODULE_PATH_VAR)
+#if defined LT_MODULE_PATH_VAR
                   && !find_handle (getenv (LT_MODULE_PATH_VAR), base_name,
                                    &newhandle, advise)
 #endif
-#if defined(LT_DLSEARCH_PATH)
+#if defined LT_DLSEARCH_PATH
                   && !find_handle (sys_dlsearch_path, base_name,
                                    &newhandle, advise)
 #endif
@@ -1538,12 +1538,12 @@ has_library_ext (const char *filename)
 
   ext = strrchr (filename, '.');
 
-  if (ext && ((streq (ext, archive_ext))
-#if defined(LT_MODULE_EXT)
-            || (streq (ext, shlib_ext))
+  if (ext && ((STREQ (ext, archive_ext))
+#if defined LT_MODULE_EXT
+            || (STREQ (ext, shlib_ext))
 #endif
-#if defined(LT_SHARED_EXT)
-            || (streq (ext, shared_ext))
+#if defined LT_SHARED_EXT
+            || (STREQ (ext, shared_ext))
 #endif
     ))
     {
@@ -1680,7 +1680,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
       if (handle || ((errors > 0) && !file_not_found ()))
        return handle;
 
-#if defined(LT_MODULE_EXT)
+#if defined LT_MODULE_EXT
       /* Try appending SHLIB_EXT.   */
       LT__SETERRORSTR (saved_error);
       errors = try_dlopen (&handle, filename, shlib_ext, advise);
@@ -1691,7 +1691,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
        return handle;
 #endif
 
-#if defined(LT_SHARED_EXT)
+#if defined LT_SHARED_EXT
       /* Try appending SHARED_EXT.   */
       LT__SETERRORSTR (saved_error);
       errors = try_dlopen (&handle, filename, shared_ext, advise);
@@ -1919,14 +1919,14 @@ lt_dlforeachfile (const char *search_path,
                                       foreachfile_callback, fpptr, data);
        }
 
-#if defined(LT_MODULE_PATH_VAR)
+#if defined LT_MODULE_PATH_VAR
       if (!is_done)
        {
          is_done = foreach_dirinpath (getenv(LT_MODULE_PATH_VAR), 0,
                                       foreachfile_callback, fpptr, data);
        }
 #endif
-#if defined(LT_DLSEARCH_PATH)
+#if defined LT_DLSEARCH_PATH
       if (!is_done && *sys_dlsearch_path)
        {
          is_done = foreach_dirinpath (sys_dlsearch_path, 0,
@@ -2281,7 +2281,7 @@ lt_dlisresident   (lt_dlhandle handle)
 /* --- MODULE INFORMATION --- */
 
 typedef struct {
-  const char *id_string;
+  char *id_string;
   lt_dlhandle_interface *iface;
 } lt__interface_id;
 
@@ -2428,7 +2428,7 @@ lt_dlhandle_fetch (lt_dlinterface_id iface, const char 
*module_name)
   while ((handle = lt_dlhandle_iterate (iface, handle)))
     {
       lt_dlhandle cur = handle;
-      if (cur && cur->info.name && streq (cur->info.name, module_name))
+      if (cur && cur->info.name && STREQ (cur->info.name, module_name))
        break;
     }
 
diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h
index 749a54d..010bb03 100644
--- a/libltdl/ltdl.h
+++ b/libltdl/ltdl.h
@@ -30,7 +30,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 */
 
 /* Only include this header file once. */
-#if !defined(LTDL_H)
+#if !defined LTDL_H
 #define LTDL_H 1
 
 #include <libltdl/lt_system.h>
@@ -57,7 +57,7 @@ LT_SCOPE int      lt_dlexit           (void);
 LT_SCOPE int       lt_dladdsearchdir    (const char *search_dir);
 LT_SCOPE int       lt_dlinsertsearchdir (const char *before,
                                                  const char *search_dir);
-LT_SCOPE int       lt_dlsetsearchpath   (const char *search_path);
+LT_SCOPE int       lt_dlsetsearchpath   (const char *search_path);
 LT_SCOPE const char *lt_dlgetsearchpath         (void);
 LT_SCOPE int       lt_dlforeachfile     (
                        const char *search_path,
@@ -160,4 +160,4 @@ LT_SCOPE int            lt_dlisresident     (lt_dlhandle 
handle);
 
 LT_END_C_DECLS
 
-#endif /*!defined(LTDL_H)*/
+#endif /*!defined LTDL_H*/
diff --git a/libltdl/Makefile.inc b/libltdl/ltdl.mk
similarity index 94%
rename from libltdl/Makefile.inc
rename to libltdl/ltdl.mk
index 931b68d..dd3fc62 100644
--- a/libltdl/Makefile.inc
+++ b/libltdl/ltdl.mk
@@ -1,4 +1,4 @@
-## Makefile.inc -- includable Makefile.am snippet
+## ltdl.mk -- includable Makefile snippet
 ##
 ##   Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
 ##   Written by Gary V. Vaughan, 2003
@@ -60,7 +60,7 @@ libltdl_libltdl_la_SOURCES = libltdl/libltdl/lt__alloc.h \
                          libltdl/libltdl/lt__strl.h \
                          libltdl/libltdl/lt_dlloader.h \
                          libltdl/libltdl/lt_error.h \
-                         libltdl/libltdl/lt_system.h \
+                         libltdl/libltdl/lt_system.h \
                          libltdl/libltdl/slist.h \
                          libltdl/loaders/preopen.c \
                          libltdl/lt__alloc.c \
@@ -97,7 +97,7 @@ EXTRA_LTLIBRARIES            += libltdl/dlopen.la \
 
 libltdl_dlopen_la_SOURCES      = libltdl/loaders/dlopen.c
 libltdl_dlopen_la_LDFLAGS      = -module -avoid-version
-libltdl_dlopen_la_LIBADD       = $(LIBADD_DLOPEN)
+libltdl_dlopen_la_LIBADD       = $(LIBADD_DLOPEN)
 
 libltdl_dld_link_la_SOURCES    = libltdl/loaders/dld_link.c
 libltdl_dld_link_la_LDFLAGS    = -module -avoid-version
@@ -126,12 +126,6 @@ CLEANFILES                += libltdl/libltdl.la \
 CLEANFILES            += $(LIBOBJS) $(LTLIBOBJS)
 
 EXTRA_DIST            += libltdl/COPYING.LIB \
-                         libltdl/configure.ac \
-                         libltdl/Makefile.am \
-                         libltdl/aclocal.m4 \
-                         libltdl/Makefile.in \
-                         libltdl/configure \
-                         libltdl/config-h.in \
                          libltdl/README
 
 ## --------------------------- ##
diff --git a/libltdl/slist.c b/libltdl/slist.c
index 25906a4..189c2c3 100644
--- a/libltdl/slist.c
+++ b/libltdl/slist.c
@@ -31,7 +31,6 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #include <assert.h>
 
 #include "slist.h"
-#include <stddef.h>
 #include <stdlib.h>
 
 static SList * slist_sort_merge    (SList *left, SList *right,
@@ -230,7 +229,7 @@ slist_reverse (SList *slist)
       next             = slist->next;
       slist->next      = result;
       result           = slist;
-      slist            = next;
+      slist            = next;
     }
 
   return result;
diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index 53494dd..be44973 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -67,8 +67,6 @@ AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])
 # GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
 # General help using GNU software: <http://www.gnu.org/gethelp/>.
 
-: ${TAR=tar}
-
 PROGRAM=libtoolize
 
 m4_divert_pop
@@ -88,7 +86,7 @@ M4SH_VERBATIM([[
       --debug|--no-warn|--quiet|--verbose)
                envopts="${envopts+$envopts }$opt"                        ;;
       --*)     env_warning="${env_warning+$env_warning
-}unrecognized environment option \`$opt'"                                ;;
+}unrecognized environment option \`$opt'"                                ;;
       *)       func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;;
     esac
   done
@@ -112,8 +110,7 @@ M4SH_GETOPTS(
        CP="func_echo_all $CP"
        test -n "$LN_S" && LN_S="func_echo_all $LN_S"
        MKDIR="func_echo_all $MKDIR"
-       RM="func_echo_all $RM"
-       TAR="func_echo_all $TAR"],
+       RM="func_echo_all $RM"],
   [q],         [--quiet|--automake],           [],                     [],
   [v],         [--verbose],                    [],                     [],
   [],          [--no-warning|--no-warn],       [],                     [],
@@ -211,183 +208,92 @@ func_whisper_error_hdr ()
 
     func_whisper_once "$my_msg_var"
     func_error "$*"
-}
-
-
-# func_copy srcfile destfile [msg_var]
-# A wrapper for func_copy_cb that accepts arguments in the same order
-# as the cp(1) shell command.
-func_copy ()
-{
-    $debug_cmd
-
-    test -f "$1" || \
-      { func_error "\`$1' not copied:  not a regular file"; return 1; }
-
-    func_dirname_and_basename "$1"
-    my_f1=$func_basename_result
-
-    if test -d "$2"; then
-
-      func_copy_cb "$my_f1" \
-       `$ECHO "$1" | $SED "$dirname"` "$2" "$3"
 
-    else
-
-      # Supporting this would mean changing the timestamp:
-      func_dirname_and_basename "$2"
-      my_tname=$func_basename_result
-      test "X$my_f1" = "X$my_tname" \
-        || func_fatal_error "func_copy() cannot change filename on copy"
-
-      func_copy_cb "$my_f1" \
-        `$ECHO "$1" | $SED "$dirname"` \
-        `$ECHO "$2" | $SED "$dirname"` \
-       "$3"
-
-    fi
-
-    return $copy_return_status # set in func_copy_cb
+    exit_status=$EXIT_FAILURE
 }
 
 
-# func_copy_cb filename srcdir destdir [msg_var]
+# func_copy filename srcdir destdir [msg_var [filter]]
 # If option `--copy' was specified, or soft-linking SRCFILE to DESTFILE
 # fails, then try to copy SRCFILE to DESTFILE (making sure to update the
 # timestamp so that a series of files with dependencies can be copied
-# in the right order that their timestamps won't trigger rebuilds).
-func_copy_cb ()
+# in the right order that their timestamps won't trigger rebuilds). If
+# FILTER is non-empty, it is a sed script to apply to SRCFILE as it is
+# copied.  MSG_VAR names a variable for use with func_whisper_hdr.
+func_copy ()
 {
     $debug_cmd
 
-    my_file="$1"
-    my_srcdir="$2"
-    my_destdir="$3"
-    my_msg_var="$4"
-    copy_return_status=1
+    my_filename=$1
+    my_srcdir=$2
+    my_destdir=$3
+    my_msg_var=$4
+    my_filter=$5
 
-    # Libtool is probably misinstalled if this happens:
-    test -f "$my_srcdir/$my_file" ||
-        func_fatal_error "\`$my_file' not found in \`$my_srcdir'"
+    my_srcfile=$my_srcdir/$my_filename
+    my_destfile=$my_destdir/$my_filename
 
-    case $opt_verbose in
-      false) my_copy_msg="file \`$my_destdir/$my_file'"     ;;
-      *)     my_copy_msg="file from \`$my_srcdir/$my_file'" ;;
-    esac
-    func_mkdir_p `$ECHO "$my_destdir/$my_file" | $SED "$dirname"`
+    # Libtool is probably misinstalled if this happens:
+    test -f "$my_srcfile" || {
+      func_whisper_error_hdr "$my_msg_var" "\`$my_srcfile' not found"
+      return 1
+    }
 
-    $RM "$my_destdir/$my_file"
-    if $opt_copy; then
-      if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \
-           | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1; } \
-        && touch "$my_destdir/$my_file"; then
-       func_whisper_hdr "$my_msg_var" "copying $my_copy_msg"
-       copy_return_status=0
-      fi
-    else
-      if test "$my_file" = "aclocal.m4"; then
-       if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \
-            | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1 ; }
-       then
-         func_whisper_hdr "$my_msg_var" "copying $my_copy_msg"
-         copy_return_status=0
-       fi
-      else
-       if $LN_S "$my_srcdir/$my_file" "$my_destdir/$my_file"; then
-         func_whisper_hdr "$my_msg_var" "linking $my_copy_msg"
-         copy_return_status=0
-       fi
-      fi
-    fi
-    if test "$copy_return_status" != 0; then
+    # Require --force to remove existing $my_destfile.
+    $opt_force && $RM "$my_destfile"
+    test -f "$my_destfile" && {
       func_whisper_error_hdr "$my_msg_var" \
-          "can not copy \`$my_srcdir/$my_file' to \`$my_destdir/'"
-      exit_status=$EXIT_FAILURE
-    fi
-}
-
-
-# func_copy_some_files srcfile_list srcdir destdir [msg_var] [cb=func_copy_cb]
-# Call COPY_CB for each regular file in SRCDIR named by the space delimited
-# names in SRCFILE_LIST.
-func_copy_some_files ()
-{
-    $debug_cmd
+        "\`$my_destfile' exists: use \`--force' to overwrite"
+      return 1
+    }
 
-    my_srcfile_list="$1"
-    my_srcdir="$2"
-    my_destdir="$3"
-    my_msg_var="$4"
-    my_copy_cb="${5-func_copy_cb}"
-
-    for my_filename in $my_srcfile_list; do
-      if test -f "$my_srcdir/$my_filename"; then
-        if test "X$my_copy_cb" = Xfunc_copy_cb; then
-         $opt_force || if test -f "$my_destdir/$my_filename"; then
-           func_whisper_error_hdr "$my_msg_var" \
-             "\`$my_destdir/$my_filename' exists: use \`--force' to overwrite"
-           continue
-         fi
-        fi
+    # Be careful to support `func_copy dir/target srcbase destbase'.
+    func_dirname "$my_destfile"
+    func_mkdir_p "$func_dirname_result"
+
+    # Filters always take priority.
+    if test -n "$my_filter"; then
+      if $opt_dry_run || {
+          ( umask 0
+            $SED -e "$my_filter" "$my_srcfile" > "$my_destfile"
+          ) >/dev/null 2>&1
+        }
+      then
+        func_whisper_once "$my_msg_var"
+        if $opt_verbose; then
+          func_whisper "$SED -e '$my_filter' $my_srcfile > $my_destfile"
+         else
+          func_whisper "creating file \`$my_destfile'"
+         fi
       else
-       func_whisper_error_hdr "$my_msg_var" \
-         "\`$my_filename' not found in \`$my_srcdir'"
+        func_whisper_error_hdr "$my_msg_var" "creating \`$my_destfile' from 
\`$my_srcfile' failed"
+        return 1
       fi
+      return 0
+    fi
 
-      $my_copy_cb "$my_filename" "$my_srcdir" "$my_destdir" "$my_msg_var"
-    done
-}
-
-
-# func_fixup_Makefile srcfile srcdir destdir
-func_fixup_Makefile ()
-{
-    $debug_cmd
-
-    $require_ltdl_dir
-
-    my_filename="$1"
-    my_srcdir="$2"
-    my_destdir="$3"
-    my_fixup_non_subpackage_script='/^[^#]/{
-      s,(LIBOBJS),(ltdl_LIBOBJS),g
-      s,(LTLIBOBJS),(ltdl_LTLIBOBJS),g
-      s,libltdl/configure.ac,,
-      s,libltdl/configure,,
-      s,libltdl/aclocal.m4,,
-      s,libltdl/config-h.in,,
-      s,libltdl/Makefile.am,,
-      s,libltdl/Makefile.in,,
-      /^[       ]*\\\\$/d
-    }'
-    case $my_filename in
-      Makefile.am)
-       my_fixup_non_subpackage_script=`echo "$my_fixup_non_subpackage_script" 
| \
-               sed 's,libltdl/,,'`
-       my_fixup_inc_paths_script= ;;
-      Makefile.inc)
-       repl=$ltdl_dir
-       repl_uscore=`$ECHO "$repl" | $SED 's,[/.+-],_,g'`
-       my_fixup_inc_paths_script="\
-         s,libltdl_,@address@hidden,
-         s,libltdl/,@repl@/,
-         s,: libltdl/,: @repl@/,
-         s, -Ilibltdl , address@hidden@ ,
-         s,\\\$(libltdl_,\$(@address@hidden,
-         s,)/libltdl ,)/@repl@ ,
-         s,@repl_uscore@,${repl_uscore},g
-         s,@repl@,${repl},g"
-       ;;
-    esac
+    # Otherwise copy or link according to `--copy' option.
+    if $opt_copy; then
+      my_copycmd=$CP
+      my_copy_type=copying
+    else
+      my_copycmd=$LN_S
+      my_copy_type=linking
+    fi
+    my_copy_msg="$my_copy_type file \`$my_destfile'"
+    $opt_verbose && my_copy_msg="$my_copycmd $my_srcfile $my_destdir"
 
-    $RM "$my_destdir/$my_filename" 2>/dev/null
-    func_whisper "creating file \`$my_destdir/$my_filename'"
-    if $opt_dry_run; then :;
+    if $opt_dry_run || {
+        ( umask 0
+          $my_copycmd "$my_srcfile" "$my_destfile"
+        ) >/dev/null 2>&1
+      }
+    then
+      func_whisper_hdr "$my_msg_var" "$my_copy_msg"
     else
-      $SED "$my_fixup_non_subpackage_script
-           $my_fixup_inc_paths_script" \
-       < "$my_srcdir/$my_filename" > "$my_destdir/$my_filename" ||
-       func_fatal_error "cannot create $my_destdir/$my_filename"
+      func_whisper_error_hdr "$my_msg_var" \
+        "$my_copy_type \`$my_srcdir/$my_filename' to \`$my_destdir/' failed"
+      return 1
     fi
 }
 
@@ -647,7 +553,8 @@ func_serial_update ()
     fi
 
     if $my_serial_update_p || $opt_force; then
-      func_copy "$my_srcfile" "$my_destfile" "$my_msg_var"
+      $RM "$my_destfile"
+      func_copy "$my_filename" "$my_srcdir" "$my_destdir" "$my_msg_var"
       my_return_status=$?
     elif $opt_force && test "X$my_dest_serial" = "X$my_src_serial"; then
       func_whisper_hdr "$my_msg_var" "\`$my_destfile' is already up to date."
@@ -719,7 +626,8 @@ func_keyword_update ()
     fi
 
     if $my_keyword_update_p || $opt_force; then
-      func_copy "$my_srcfile" "$my_destfile" "$my_msg_var"
+      $RM "$my_destfile"
+      func_copy "$my_filename" "$my_srcdir" "$my_destdir" "$my_msg_var"
     elif $opt_verbose || $opt_force && test "X$my_dest_serial" = 
"X$my_src_serial"; then
       func_whisper_hdr "$my_msg_var" "\`$my_destfile' is already up to date."
     fi
@@ -792,46 +700,19 @@ func_install_update ()
 }
 
 
-# func_install_pkgmacro_subproject
-# Unless --quiet was passed, display a message. Then copy pkgmacro_files
-# from libtool installation tree to subproject libltdl tree.
-func_install_pkgmacro_subproject ()
-{
-    $debug_cmd
-
-    $require_macro_dir
-
-    # Remove any lingering files that my have been installed by some
-    # previous libtoolize release:
-    $opt_force && for file in $all_pkgmacro_files; do
-      test -f "$subproject_macro_dir/$file" && func_verbose "rm -f 
'$subproject_macro_dir/$file'"
-      rm -f "$subproject_macro_dir/$file"
-    done
-
-    # Copy all the files from installed libltdl to this project, if the
-    # user specified a macro_dir.
-    $opt_quiet || if test "x$macro_dir" != "x$subproject_macro_dir"; then
-      pkgmacro_header="putting macros in \`$subproject_macro_dir'."
-    elif test -n "$subproject_macro_dir"; then
-      pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, 
\`$subproject_macro_dir'."
-    fi
-
-    func_copy_some_files "$pkgmacro_files" \
-      "$aclocaldir" "$subproject_macro_dir" pkgmacro_header
-}
-
-
-# func_install_pkgmacro_parent
-# Unless --quiet was passed, or AC_CONFIG_MACRO_DIR was not seen, display
-# a message.  Then update appropriate macros if newer ones are available
-# from the libtool installation tree.
-func_install_pkgmacro_parent ()
+# func_install_pkgmacro_files
+# Install copies of the libtool and libltdl m4 macros into this package.
+func_install_pkgmacro_files ()
 {
     $debug_cmd
 
     $require_ac_macro_dir
+    $require_am_macro_dir
+    $require_ltdl_mode
     $require_macro_dir
 
+    $opt_ltdl || test -n "$ac_macro_dir$am_macro_dir" || return
+
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
     $opt_force && for file in $all_pkgmacro_files; do
@@ -839,8 +720,7 @@ func_install_pkgmacro_parent ()
       rm -f "$macro_dir/$file"
     done
 
-    # Copy all the files from installed libltdl to this project, if the
-    # user specified a macro_dir.
+    # Install the libltdl autoconf macros to this project's source tree.
     $opt_quiet || if test -n "$ac_macro_dir"; then
       my_pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, 
\`$ac_macro_dir'."
     else
@@ -849,69 +729,35 @@ func_install_pkgmacro_parent ()
 
     for file in $pkgmacro_files; do
       case $file in
-        argz.m4|ltdl.m4)
-          $opt_ltdl || {
-            func_verbose "Not copying \`$macro_dir/$file', libltdl not used."
-            continue
-          }
-          ;;
-      esac
-
-      case $file in
         libtool.m4)
-          func_serial_update libtool.m4 "$aclocaldir" "$macro_dir" \
-            my_pkgmacro_header LT_INIT 'A[CM]_PROG_LIBTOOL' ;;
-
+          func_serial_update "$file" "$aclocaldir" "$macro_dir" \
+            my_pkgmacro_header LT_INIT 'A[CM]_PROG_LIBTOOL'
+          ;;
         ltdl.m4)
-          func_serial_update ltdl.m4 "$aclocaldir" "$macro_dir" \
-            my_pkgmacro_header 'LTDL_INIT' ;;
-
-        *)
+          if $opt_ltdl; then
+            func_serial_update "$file" "$aclocaldir" "$macro_dir" \
+              my_pkgmacro_header 'LTDL_INIT'
+          else
+            func_verbose "Not copying \`$macro_dir/$file', libltdl not used."
+          fi
+          ;;
+        ltoptions.m4|ltsugar.m4|ltversion.m4|lt~obsolete.m4)
           func_serial_update "$file" "$aclocaldir" "$macro_dir" \
-            my_pkgmacro_header "$file" ;;
+            my_pkgmacro_header "$file"
+          ;;
+        *)
+          if $opt_ltdl; then
+            func_serial_update "$file" "$aclocaldir" "$macro_dir" \
+              my_pkgmacro_header "$file"
+          else
+            func_verbose "Not copying \`$macro_dir/$file', libltdl not used."
+          fi
+          ;;
       esac
     done
 }
 
 
-# func_install_pkgmacro_files
-# Install copies of the libtool and libltdl m4 macros into this package.
-func_install_pkgmacro_files ()
-{
-    $debug_cmd
-
-    $require_ac_macro_dir
-    $require_am_macro_dir
-    $require_configure_ac
-    $require_ltdl_mode
-    $require_macro_dir
-
-  # 1. Parent has separate macro_dir to subproject ltdl:
-    if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
-       test "x$macro_dir" != "x$subproject_macro_dir"
-    then
-      # No point installing configure macros in the parent project when
-      # there's no $configure_ac to use them.
-      test -f "$configure_ac" && func_install_pkgmacro_parent
-      func_install_pkgmacro_subproject
-
-  # 2. Parent shares macro_dir with subproject ltdl:
-    elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject"
-       # && test "x$macro_dir" = "x$subproject_macro_dir"
-    then
-      func_install_pkgmacro_subproject
-
-  # 3. Not a subproject, but macro_dir was specified in parent:
-    elif test -n "$ac_macro_dir$am_macro_dir"; then
-      func_install_pkgmacro_parent
-
-  # 4. AC_CONFIG_MACRO_DIR was not specified:
-    else
-      func_verbose "AC_CONFIG_MACRO_DIR not defined, not copying libtool 
macros."
-    fi
-}
-
-
 # func_install_pkgltdl_files
 # Install copies of the libltdl files into this package.  Any auxiliary
 # or m4 macro files needed in the libltdl tree will also be copied by
@@ -941,74 +787,88 @@ func_install_pkgltdl_files ()
       pkgltdl_header="putting libltdl files in \`$ltdl_dir'."
     fi
 
+    $require_Makefile_am_filter
+    $require_Makefile_inc_filter
+
     # Copy ltdl sources appropriate to the requested ltdl_mode.
     for file in $pkgltdl_files; do
+      my_copy_filter=
       case $file in
         Makefile.am|Makefile.in)
-          test recursive = "$ltdl_mode" \
-            && func_fixup_Makefile "$file" "$pkgltdldir" "$ltdl_dir"
-          test subproject = "$ltdl_mode" \
-            && func_copy "$pkgltdldir/$file" "$ltdl_dir/$file" pkgltdl_header
-          ;;
-        Makefile.inc)
-          test nonrecursive = "$ltdl_mode" \
-            && func_fixup_Makefile "$file" "$pkgltdldir" "$ltdl_dir"
+          test nonrecursive = "$ltdl_mode" && continue
+          my_copy_filter=$Makefile_am_filter
           ;;
-        aclocal.m4|config-h.in|configure|configure.ac)
-          test subproject = "$ltdl_mode" \
-            && func_copy "$pkgltdldir/$file" "$ltdl_dir/$file" pkgltdl_header
-          ;;
-        *)
-          func_copy "$pkgltdldir/$file" "$ltdl_dir/$file" pkgltdl_header
+
+        ltdl.mk)
+          test nonrecursive = "$ltdl_mode" || continue
+          my_copy_filter=$Makefile_inc_filter
           ;;
-      esac
-    done
-}
 
+        aclocal.m4)
+          test subproject = "$ltdl_mode" && {
+            $require_aclocal_m4_filter
 
-# func_install_pkgaux_subproject
-# Unless --quiet was passed, display a message. Then copy pkgaux_files
-# from libtool installation tree to subproject libltdl tree.
-func_install_pkgaux_subproject ()
-{
-    $debug_cmd
+            # Always copy aclocal.m4, otherwise regenerating it can
+            # overwrite the destination if it is symlinked.
+            ( opt_copy=:
+              func_copy "$file" "$pkgltdldir" "$ltdl_dir" \
+                pkgltdl_header "$aclocal_m4_filter"
+            )
+          }
+          continue
+         ;;
 
-    $require_ac_aux_dir
-    $require_aux_dir
-    $require_ltdl_dir
+        config-h.in)
+          test subproject = "$ltdl_mode" || continue
+          ;;
 
-    # Remove any lingering files that my have been installed by some
-    # previous libtoolize release:
-    $opt_force && for file in $all_pkgaux_files; do
-      test -f "$subproject_aux_dir/$file" && func_verbose "rm -f 
'$subproject_aux_dir/$file'"
-      rm -f "$subproject_aux_dir/$file"
-    done
+        configure)
+          test subproject = "$ltdl_mode" && {
+            $require_configure_ac_filter
 
-    # Copy all the files from installed libltdl to this project, if the
-    # user specified an aux_dir.
-    $opt_quiet || if test "x$ac_aux_dir" = "x$subproject_aux_dir"; then
-      pkgaux_header="putting auxiliary files in AC_CONFIG_AUX_DIR, 
\`$subproject_aux_dir'."
-    elif test -n "$ac_aux_dir"; then
-      pkgaux_header="putting auxiliary files in \`$aux_dir'."
-    else
-      pkgaux_header="putting auxiliary files in \`$subproject_aux_dir'."
-    fi
+            # Always copy configure, otherwise regenerating it can
+            # overwrite the destination if it is symlinked.
+            ( opt_copy=:
+              func_copy "$file" "$pkgltdldir" "$ltdl_dir" \
+                pkgltdl_header "$configure_ac_filter"
+            )
+          }
+          continue
+         ;;
 
-    func_copy_some_files "$pkgaux_files" \
-      "$pkgdatadir/config" "$ltdl_dir/config" pkgaux_header
+        configure.ac)
+          test subproject = "$ltdl_mode" || continue
+          $require_configure_ac_filter
+          my_copy_filter=$configure_ac_filter
+          ;;
+      esac
+
+      # Still here?  Copy the file then, with selected filters.
+      func_copy "$file" "$pkgltdldir" "$ltdl_dir" \
+        pkgltdl_header "$my_copy_filter"
+
+      # FIXME: Remove in 2013
+      #        (along with deprecation warning in func_check_macros)
+      test ltdl.mk = "$file" \
+        && func_grep "^-\?include $ltdl_dir/Makefile.inc\$" Makefile.am \
+        && mv "$ltdl_dir/$file" "$ltdl_dir/Makefile.inc" \
+        && func_whisper "renaming file \`$ltdl_dir/Makefile.inc'"
+    done
 }
 
 
-# func_install_pkgaux_parent
-# Unless --quiet was passed, or AC_CONFIG_AUX_DIR was not seen, display a
-# message.  Then update appropriate auxiliary files if newer ones are
-# available from the libtool installation tree.
-func_install_pkgaux_parent ()
+# func_install_pkgaux_files
+# Install copies of the auxiliary files into this package according to
+# the whether libltdl is included as a subproject, and whether the parent
+# shares the AC_CONFIG_AUX_DIR setting.
+func_install_pkgaux_files ()
 {
     $debug_cmd
 
     $require_ac_aux_dir
     $require_aux_dir
+    $require_configure_ac
+    $require_ltdl_mode
 
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
@@ -1023,54 +883,51 @@ func_install_pkgaux_parent ()
       pkgaux_header="putting auxiliary files in \`$aux_dir'."
     fi
 
-    if $opt_install; then
-      func_config_update config.guess \
-        "$pkgdatadir/config" "$aux_dir" pkgaux_header
-      func_config_update config.sub \
-        "$pkgdatadir/config" "$aux_dir" pkgaux_header
-      func_install_update install-sh \
-        "$pkgdatadir/config" "$aux_dir" pkgaux_header
-    fi
-    func_ltmain_update ltmain.sh \
-      "$pkgdatadir/config" "$aux_dir" pkgaux_header
-}
-
-
-# func_install_pkgaux_files
-# Install copies of the auxiliary files into this package according to
-# the whether libltdl is included as a subproject, and whether the parent
-# shares the AC_CONFIG_AUX_DIR setting.
-func_install_pkgaux_files ()
-{
-    $debug_cmd
-
-    $require_aux_dir
-    $require_configure_ac
-    $require_ltdl_mode
-
-  # 1. Parent shares aux_dir with subproject ltdl:
-    if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
-       test "x$aux_dir" = "x$subproject_aux_dir"
-    then
-      func_install_pkgaux_subproject
-
-  # 2. Parent has separate aux_dir to subproject ltdl:
-    elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject"
-       # && test "x$aux_dir" != "x$subproject_aux_dir" is implied
-    then
-      if test -n "$configure_ac"; then
-       func_install_pkgaux_parent
-      fi
-      func_install_pkgaux_subproject
-
-  # 3. Not subproject, but AC_CONFIG_AUX_DIR was used in parent:
-    elif test -n "$ac_aux_dir" || test "x$aux_dir" = "x."; then
-      func_install_pkgaux_parent
+    for file in $pkgaux_files; do
+      case $file in
+        config.guess|config.sub)
+          $opt_install || test subproject = "$ltdl_mode" || continue
+          func_config_update "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+          ;;
+        install-sh)
+          $opt_install || test subproject = "$ltdl_mode" || continue
+          func_install_update "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+          ;;
+        ltmain.sh)
+          func_ltmain_update "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+          ;;
+        *)
+          test subproject = "$ltdl_mode" || continue
+          func_copy "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+          ;;
+      esac
+    done
 
-  # 4. AC_CONFIG_AUX_DIR was not specified:
-    else
-      func_verbose "AC_CONFIG_AUX_DIR not defined, not copying libtool 
auxiliary files."
-    fi
+    # If the parent project is using Autoconf and linking with Libtool,
+    # even if subproject libltdl already has a copy, the parent project
+    # will still need to build libtool for its own purposes, and might
+    # need another copy of ltmain.sh if the parent didn't declare an
+    # AC_CONFIG_AUX_DIR.
+    pkgaux_hdr="putting another copy of auxiliary files in \`.'"
+    test -f "$configure_ac" \
+      && test -z "$ac_aux_dir" \
+      && test subproject = "$ltdl_mode" \
+      && test "$aux_dir" = "$ltdl_dir" \
+      && func_ltmain_update "$file" "$pkgauxdir" . pkgaux_hdr
+
+    # FIXME: Remove in 2013.
+    # Very old parent projects using `libtoolize --install --ltdl', and
+    # a top-level $configure_ac to build the ltdl subproject, but not
+    # using Automake themselves, might still be relying on the old
+    # behaviour of libtoolize to put a second copy of some `Auxiliary
+    # Programs' needed by the top-level configure (instead of using
+    # the recommended method: `automake --add-missing').
+    test -f "$configure_ac" \
+      && test subproject = "$ltdl_mode" \
+      && test "$aux_dir" = "$ltdl_dir" \
+      && func_config_update config.guess "$pkgauxdir" . pkgaux_hdr \
+      && func_config_update config.sub "$pkgauxdir" . pkgaux_hdr \
+      && func_install_update install-sh "$pkgauxdir" . pkgaux_hdr
 }
 
 
@@ -1090,7 +947,7 @@ func_nonemptydir_p ()
 
     # check that the directories contents can be ls'ed
     test -n "`{ cd $my_dir && ls; } 2>/dev/null`" \
-        || func_fatal_error "can not list files: \`$my_dir'"
+        || func_fatal_error "cannot list files: \`$my_dir'"
 }
 
 
@@ -1116,12 +973,7 @@ func_check_macros ()
 
     ac_config_macro_dir_advised=false
 
-    if test -n "$ac_macro_dir$ltdl_dir" && test -z 
"$ac_macro_dir$am_macro_dir"; then
-      my_ac_config_macro_srcdir="$aclocaldir"
-      if $opt_ltdl && test "$macro_dir" != "$subproject_macro_dir"; then
-       my_ac_config_macro_srcdir="$subproject_macro_dir"
-      fi
-
+    if test -z "$ac_macro_dir$am_macro_dir"; then
       my_missing=
       for file in $pkgmacro_files; do
         case $file in
@@ -1137,13 +989,8 @@ func_check_macros ()
       if test -n "$my_missing"; then
         func_echo "You should add the contents of the following files to 
\`aclocal.m4':"
         for need in $my_missing; do
-         func_echo "  \`$my_ac_config_macro_srcdir/$need'"
+         func_echo "  \`$aclocaldir/$need'"
         done
-
-        if test "$my_ac_config_macro_srcdir" != "$aclocaldir"; then
-          func_echo "or else add 
\`AC_CONFIG_MACRO_DIR([$subproject_macro_dir])' to $configure_ac."
-         ac_config_macro_dir_advised=:
-        fi
       fi
     fi
 
@@ -1171,14 +1018,15 @@ func_check_macros ()
       test -n "$ac_ltdl_dir" ||
         func_echo "Remember to add \`LT_CONFIG_LTDL_DIR([$ltdl_dir])' to 
\`$configure_ac'."
 
-      # For subproject mode, offer some suggestions for avoiding duplicate
-      # files in a project that uses libltdl:
-      if test "x$ltdl_mode" = "xsubproject"; then
-        test "$subproject_aux_dir" = "$aux_dir" ||
-          func_echo "Consider using 
\`AC_CONFIG_AUX_DIR([$subproject_aux_dir])' in $configure_ac."
-        $ac_config_macro_dir_advised || test "$subproject_macro_dir" = 
"$macro_dir" ||
-          func_echo "Consider using 
\`AC_CONFIG_MACRO_DIR([$subproject_macro_dir])' in $configure_ac."
-       ac_config_macro_dir_advised=:
+      # For nonrecursive mode, warn about continued use of Makefile.inc:
+      # FIXME: Remove in 2013
+      #        (along with last minute rename in func_install_pkgltdl_files)
+      if test "x$ltdl_mode" = "xnonrecursive"; then
+       if func_grep "^-\?include $ltdl_dir/Makefile.inc\$" Makefile.am;
+       then
+         func_error "Use of \`include $ltdl_dir/Makefile.inc' is deprecated!"
+         func_echo "Consider updating to use of \`include $ltdl_dir/ltdl.mk' 
in Makefile.am."
+       fi
       fi
     fi
 
@@ -1198,11 +1046,7 @@ func_check_macros ()
       func_echo "Consider adding \`-I m4' to ACLOCAL_AMFLAGS in Makefile.am."
 
     elif test -z "$am_macro_dir"; then
-      if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" && test 
"$subproject_macro_dir" != "$macro_dir"; then
-       func_echo "Consider adding \`-I $subproject_macro_dir' to 
ACLOCAL_AMFLAGS in Makefile.am."
-      else
-        func_echo "Consider adding \`-I $macro_dir' to ACLOCAL_AMFLAGS in 
Makefile.am."
-      fi
+      func_echo "Consider adding \`-I $macro_dir' to ACLOCAL_AMFLAGS in 
Makefile.am."
     fi
 
     # Don't trace for this, we're just checking the user didn't invoke it
@@ -1249,7 +1093,6 @@ func_autoconf_configure ()
 }
 
 
-
 ## -------------------- ##
 ## Resource management. ##
 ## -------------------- ##
@@ -1262,6 +1105,236 @@ func_autoconf_configure ()
 # used in preference to deriving the default. Call them using their
 # associated `require_*' variable to ensure that they are executed, at
 # most, once.
+#
+# Some of the require functions are very similar, so we generate those
+# as this file is sourced. They look complicated, but they are the same
+# as normal function declarations wrapped in "eval '<definition>'", so
+# that embedded single quotes need to be escaped, and wherever a symbol
+# is generated, we drop out of the single quotes and expand a variable
+# that holds the symbol.
+#
+# After that, the rest appear in asciibetical order.
+
+for base in aux_dir macro_dir; do
+
+  # require_ltdl_relative_aux_dir
+  # require_ltdl_relative_macro_dir
+  # -------------------------------
+  # Set ltdl_relative_aux_dir to the relative path from $ltdl_dir to
+  # the parent project auxiliary directory, and similarly for relative
+  # macro directory.
+  r=ltdl_relative_$base        # _r_esource acquired by calling this function
+  v=require_$r         # _v_ariable pointing to the function
+  f=func_$v            # _f_unction name
+  eval $v'='$f'
+  '$f' ()
+  {
+    $debug_cmd
+
+    $require_ltdl_dir
+    $require_'$base'
+
+    func_relative_path "$ltdl_dir" "$'$base'"
+    '$r'=$func_relative_path_result
+
+    test -n "$'$r'" && func_verbose "'$r'='\'\$$r\''"
+
+    '$v'=:
+  }'
+  # Some of these functions need to acquire the resource managed by the
+  # lexically preceding function; $o serves that purpose.
+  o=$r
+
+done
+
+for base in '' ltdl_; do
+  if test ltdl_ = "$base"; then p='$pkgltdldir/'; else p=; fi
+
+  # require_Makefile_am
+  # require_ltdl_Makefile_am
+  # ------------------------
+  # If not already set, set Makefile_am to `Makefile.am' if that file is
+  # present in the current directory, and similarly for
+  # `$pkgltdldir/Makefile.am'.
+  r=${base}Makefile_am
+  v=require_$r
+  f=func_$v
+  eval $v'='$f'
+  '$f' ()
+  {
+    $debug_cmd
+
+    test -n "$'$r'" || '$r'='$p'Makefile.am
+
+    if test -f "$'$r'"; then
+      func_verbose "found \`$'$r\''"
+    else
+      '$r'=
+    fi
+
+    '$v'=:
+  }'
+  o=$r
+
+
+  # require_aclocal_amflags
+  # require_ltdl_aclocal_amflags
+  # ----------------------------
+  # Extract `$aclocal_amflags' from `Makefile.am' if present, and
+  # similarly for `libltdl/Makefile.am'.
+  r=${base}aclocal_amflags
+  v=require_$r
+  f=func_$v
+  eval $v'='$f'
+  '$f' ()
+  {
+    $debug_cmd
+
+    $require_'$o'
+
+    test -n "$'$o'" && {
+      _G_sed_extract_aclocal_amflags='\''s|#.*$||
+        /^[     ]*ACLOCAL_AMFLAGS[      ]*=/ {
+            s|^.*=[     ]*\(.*\)|'$r'="\1"|
+            p
+        }'\''
+
+      _G_aclocal_flags_cmd=`$SED -n "$_G_sed_extract_aclocal_amflags" \
+          "$'$o'"`
+      eval "$_G_aclocal_flags_cmd"
+
+      test -n "$'$r'" && func_verbose "'$r'='\$$r\''"
+    }
+
+    '$v'=:
+  }'
+  o=$r
+
+
+  # require_am_macro_dir
+  # require_ltdl_am_macro_dir
+  # -------------------------
+  # Set am_macro_dir to the first directory specified in
+  # ACLOCAL_AMFLAGS from `Makefile.am', and similarly for
+  # 'libltdl/Makefile.am'.
+  r=${base}am_macro_dir
+  v=require_$r
+  f=func_$v
+  eval $v'='$f'
+  '$f' ()
+  {
+    $debug_cmd
+
+    $require_'$o'
+
+    _G_minus_I_seen=false
+    for _G_arg in $'$o'; do
+      case $_G_minus_I_seen,$_G_arg in
+        :,*)   '$r'=$_G_arg; break ;;
+        *,-I)  _G_minus_I_seen=: ;;
+        *,-I*) '$r'=`expr x$_G_opt : '\''x-I\(.*\)$'\''`; break ;;
+      esac
+    done
+
+    test -n "$'$r'" && func_verbose "'$r'='\'\$$r\''"
+
+    '$v'=:
+  }'
+  o=$r
+
+done
+
+
+# require_Makefile_am_filter
+# --------------------------
+# Set `Makefile_am_filter' ready for passing to func_copy when libltdl's
+# stock Makefile.am contents need to be filtered to work in recursive
+# mode.
+require_Makefile_am_filter=func_require_Makefile_am_filter
+func_require_Makefile_am_filter ()
+{
+    $debug_cmd
+
+    $require_ltdl_mode
+
+    case $ltdl_mode in
+      recursive)
+        Makefile_am_filter='
+            /^[^#]/{
+              s,(LIBOBJS),(ltdl_LIBOBJS),g
+              s,(LTLIBOBJS),(ltdl_LTLIBOBJS),g
+            }'
+        ;;
+
+      subproject)
+        $require_ltdl_ac_aux_dir
+        $require_ltdl_am_macro_dir
+        $require_ltdl_relative_aux_dir
+        $require_ltdl_relative_macro_dir
+
+        test "$ltdl_am_macro_dir" = "$ltdl_relative_macro_dir" || {
+          my_am_macro_dir_regex=`$ECHO "\
+$ltdl_am_macro_dir" |$SED "$sed_make_literal_regex"`
+
+          Makefile_am_filter="
+            /^ACLOCAL_AMFLAGS = /{
+              s, -I $my_am_macro_dir_regex\$, -I $ltdl_relative_macro_dir,
+            }
+            s,dir)/$my_am_macro_dir_regex,dir)/$ltdl_relative_macro_dir,g"
+        }
+
+        test "$ltdl_ac_aux_dir" = "$ltdl_relative_aux_dir" || {
+          my_aux_dir_regex=`$ECHO "\
+$ltdl_ac_aux_dir" |$SED "$sed_make_literal_regex"`
+
+          Makefile_am_filter="$Makefile_am_filter
+            s,$my_aux_dir_regex,$ltdl_relative_aux_dir,g
+            s,/\./,/,g
+          "
+        }
+        ;;
+    esac
+
+    require_Makefile_am_filter=:
+}
+
+
+# require_Makefile_inc_filter
+# ---------------------------
+# Set `Makefile_inc_filter' ready for passing to func_copy in order for
+# the contents of Makefile.inc to match the nonrecursive libltdl
+# directory into which it is copied.
+require_Makefile_inc_filter=func_require_Makefile_inc_filter
+func_require_Makefile_inc_filter ()
+{
+    $debug_cmd
+
+    $require_ltdl_dir
+
+    # Note that we strip comments right here, rather than rely on
+    # using a $SED that allows comments.
+    my_uscore=`$ECHO "$ltdl_dir" | $SED 's,[/.+-],_,g'`
+    Makefile_inc_filter=`$ECHO '
+      /^[^#]/{
+
+        # Use only libltdl conditional objects.
+        s,(LIBOBJS),(ltdl_LIBOBJS),g
+        s,(LTLIBOBJS),(ltdl_LTLIBOBJS),g
+
+        # Convert libltdl path and variable sections to $ltdl_dir.
+        s,libltdl_,@address@hidden,
+        s,libltdl/,@ltdl_dir@/,
+        s,: libltdl/,: @ltdl_dir@/,
+        s, -Ilibltdl , address@hidden@ ,
+        s,\$(libltdl_,\$(@address@hidden,
+        s,)/libltdl ,)/@ltdl_dir@ ,
+        s,@my_uscore@,'"$my_uscore"',g
+        s,@ltdl_dir@,'"$ltdl_dir"',g
+
+      }' | $SED '/^[    ]*#/d;/^$/d'`
+
+    require_Makefile_inc_filter=:
+}
 
 
 # require_ac_aux_dir
@@ -1274,17 +1347,19 @@ func_require_ac_aux_dir ()
 
     $require_configure_ac
 
-    if test -n "$configure_ac"; then
+    test -n "$configure_ac" && {
       func_extract_trace AC_CONFIG_AUX_DIR
       ac_aux_dir=$func_extract_trace_result
 
       case $ac_aux_dir in
         *\$*)
           func_fatal_error "\
-can not expand unknown variable in AC_CONFIG_AUX_DIR argument."
+cannot expand unknown variable in AC_CONFIG_AUX_DIR argument."
           ;;
       esac
-    fi
+    }
+
+    test -n "$ac_aux_dir" && func_verbose "ac_aux_dir='$ac_aux_dir'"
 
     require_ac_aux_dir=:
 }
@@ -1307,7 +1382,7 @@ func_require_ac_ltdl_dir ()
       case $ac_ltdl_dir in
         *\$*)
           func_fatal_error "\
-can not expand unknown variable in LT_CONFIG_LTDL_DIR argument."
+cannot expand unknown variable in LT_CONFIG_LTDL_DIR argument."
           ;;
       esac
     fi
@@ -1334,7 +1409,7 @@ func_require_ac_ltdl_mode ()
       *" recursive "*)    ac_ltdl_mode=recursive    ;;
       *" subproject "*)   ac_ltdl_mode=subproject   ;;
     esac
-      
+
     require_ac_ltdl_mode=:
 }
 
@@ -1356,7 +1431,7 @@ func_require_ac_ltdl_options ()
       case $ac_ltdl_options in
         *\$*)
           func_fatal_error "\
-can not expand unknown variable in LTDL_INIT argument."
+cannot expand unknown variable in LTDL_INIT argument."
           ;;
       esac
     fi
@@ -1384,54 +1459,32 @@ func_require_ac_macro_dir ()
 }
 
 
-# require_aclocal_amflags
-# -----------------------
-# Extract `$aclocal_amflags' from `Makefile.am' if present.
-require_aclocal_amflags=func_require_aclocal_amflags
-func_require_aclocal_amflags ()
+# require_aclocal_m4_filter
+# -------------------------
+# Set `aclocal_m4_filter' ready for passing to func_copy when libltdl's
+# stock aclocal.m4 contents need to be filtered to work in recursive
+# mode.
+require_aclocal_m4_filter=func_require_aclocal_m4_filter
+func_require_aclocal_m4_filter ()
 {
     $debug_cmd
 
-    $require_makefile_am
+    $require_ltdl_am_macro_dir
+    $require_ltdl_relative_macro_dir
 
-    test -n "$makefile_am" && {
-      _G_sed_extract_aclocal_amflags='s|#.*$||
-        /^[     ]*ACLOCAL_AMFLAGS[      ]*=/ {
-            s|^.*=[     ]*\(.*\)|aclocal_amflags="\1"|
-            p
-        }'
+    test "$ltdl_am_macro_dir" = "$ltdl_relative_macro_dir" || {
+      my_am_macro_dir_regex=`$ECHO "\
+$ltdl_am_macro_dir" |$SED "$sed_make_literal_regex"`
 
-      _G_aclocal_flags_cmd=`$SED -n "$_G_sed_extract_aclocal_amflags" \
-          "$makefile_am"`
-      eval "$_G_aclocal_flags_cmd"
-
-      func_verbose "ACLOCAL_AMFLAGS='$aclocal_amflags'"
+      # Tricky [m] quoting to stop m4sh processing from flagging an
+      # undefined macro.
+      aclocal_m4_filter="
+        /^[m]4_include(/{
+          s,$my_am_macro_dir_regex,$ltdl_relative_macro_dir,g
+        }"
     }
 
-    require_aclocal_amflags=:
-}
-
-
-# require_am_macro_dir
-# --------------------
-# Set am_macro_dir to the first directory specified in ACLOCAL_AMFLAGS.
-require_am_macro_dir=func_require_am_macro_dir
-func_require_am_macro_dir ()
-{
-    $debug_cmd
-
-    $require_aclocal_amflags
-
-    _G_minus_I_seen=false
-    for _G_arg in $aclocal_amflags; do
-      case $_G_minus_I_seen,$_G_arg in
-        :,*)   am_macro_dir=$_G_arg; break ;;
-        *,-I)  _G_minus_I_seen=: ;;
-        *,-I*) am_macro_dir=`expr x$_G_opt : 'x-I\(.*\)$'`; break ;;
-      esac
-    done
-
-    require_am_macro_dir=:
+    require_aclocal_m4_filter=:
 }
 
 
@@ -1446,8 +1499,22 @@ func_require_aux_dir ()
 
     $require_ac_aux_dir
 
-    test -n "$aux_dir" || aux_dir=$ac_aux_dir
-    test -n "$aux_dir" || {
+    test -z "$aux_dir" && aux_dir=$ac_aux_dir
+
+    # Subproject ltdl without $configure_ac keeps pkgauxfiles in
+    # specified --ltdl optarg directory.
+    test -z "$aux_dir" && $opt_ltdl && {
+      $require_configure_ac
+
+      test -n "$configure_ac" || {
+        $require_ltdl_dir
+        $require_ltdl_mode
+
+        test subproject = "$ltdl_mode" && aux_dir="$ltdl_dir"
+      }
+    }
+
+    test -z "$aux_dir" && {
       # Try to intuit aux_dir using the same heuristic as Autoconf.
       for _G_dir in . .. ../..; do
         if test -f "$_G_dir/install-sh" || test -f "$_G_dir/install.sh"
@@ -1459,7 +1526,7 @@ func_require_aux_dir ()
     }
 
     # Use the current directory if all else fails.
-    test -n "$aux_dir" || aux_dir=.
+    test -z "$aux_dir" && aux_dir=.
 
     require_aux_dir=:
 }
@@ -1467,8 +1534,8 @@ func_require_aux_dir ()
 
 # require_configure_ac
 # --------------------
-# Ensure that there is a `configure.ac' or `configure.in' file in the
-# current directory, and that `$configure_ac' contains its name.
+# Ensure that there is a `configure.ac' or `configure.in' file in this
+# directory, and that `$configure_ac' contains its name.
 require_configure_ac=func_require_configure_ac
 func_require_configure_ac ()
 {
@@ -1485,6 +1552,50 @@ func_require_configure_ac ()
 }
 
 
+# require_configure_ac_filter
+# ---------------------------
+# Set `configure_ac_filter' ready for passing to func_copy when
+# libltdl's stock configure.ac contents need to be filtered to work in
+# subproject mode.
+require_configure_ac_filter=func_require_configure_ac_filter
+func_require_configure_ac_filter ()
+{
+    $debug_cmd
+
+    $require_ltdl_ac_aux_dir
+    $require_ltdl_relative_aux_dir
+
+    test "$ltdl_ac_aux_dir" = "$ltdl_relative_aux_dir" || {
+      my_aux_dir_regex=`$ECHO "\
+$ltdl_ac_aux_dir" |$SED "$sed_make_literal_regex"`
+
+      configure_ac_filter="
+        s,$my_aux_dir_regex,$ltdl_relative_aux_dir,g
+      "
+    }
+
+    require_configure_ac_filter=:
+}
+
+
+# require_ltdl_ac_aux_dir
+# -----------------------
+# This needs to work in subproject mode, when GNU M4 may not be
+# available and hence extract-trace can't be used.  But since we
+# installed libltdl/configure.ac, then we already know what value
+# we used.
+require_ltdl_ac_aux_dir=func_require_ltdl_ac_aux_dir
+func_require_ltdl_ac_aux_dir ()
+{
+    $debug_cmd
+
+    ltdl_ac_aux_dir="@ltdl_ac_aux_dir@"
+    func_verbose "ltdl_ac_aux_dir='$ltdl_ac_aux_dir'"
+
+    require_ltdl_ac_aux_dir=:
+}
+
+
 # require_ltdl_dir
 # ----------------
 # If both are specified, ensure both --ltdl=LTDL_DIR and
@@ -1496,8 +1607,8 @@ func_require_ltdl_dir ()
 
     $require_ac_ltdl_dir
 
-    test -n "$ltdl_dir" || ltdl_dir=$ac_ltdl_dir
-    test -n "$ltdl_dir" || ltdl_dir=libltdl
+    test -z "$ltdl_dir" && ltdl_dir=$ac_ltdl_dir
+    test -z "$ltdl_dir" && $opt_ltdl && ltdl_dir=libltdl
 
     if test -n "$ac_ltdl_dir"; then
       test "$ac_ltdl_dir" = "$ltdl_dir" || func_fatal_error "\
@@ -1519,14 +1630,20 @@ func_require_ltdl_mode ()
 
     $require_ac_ltdl_mode
 
-    test -n "$ltdl_mode" || ltdl_mode=$ac_ltdl_mode
-    test -n "$ltdl_mode" || ltdl_mode=subproject
+    test -z "$ltdl_mode" && ltdl_mode=$ac_ltdl_mode
+    test -z "$ltdl_mode" && {
+      $require_ltdl_dir
+
+      test -n "$ltdl_dir" && ltdl_mode=subproject
+    }
 
     if test -n "$ac_ltdl_mode"; then
       test "$ac_ltdl_mode" = "$ltdl_mode" || func_fatal_error "\
 --$ltdl_mode does not match LTDL_INIT($ac_ltdl_mode)"
     fi
 
+    func_verbose "ltdl mode='$ltdl_mode'"
+
     require_ltdl_mode=:
 }
 
@@ -1543,37 +1660,31 @@ func_require_macro_dir ()
     $require_ac_macro_dir
     $require_am_macro_dir
 
+    # AC_CONFIG_MACRO_DIR takes precedence.
     macro_dir=$ac_macro_dir
-    test -n "$macro_dir" || macro_dir=$am_macro_dir
-    test -n "$macro_dir" || macro_dir=m4
-
-    if test -n "$ac_macro_dir" && test -n "$am_macro_dir"; then
-      test "$ac_macro_dir" = "$am_macro_dir" || func_fatal_error "\
-AC_CONFIG_MACRO_DIR([$ac_macro_dir]) conflicts with ACLOCAL_AMFLAGS=-I 
$am_macro_dir."
-    fi
 
-    require_macro_dir=:
-}
+    # Followed by first -I optarg from ACLOCAL_AMFLAGS.
+    test -z "$macro_dir" && macro_dir=$am_macro_dir
 
+    # Subproject ltdl without either of the above keeps macros in
+    # specified --ltdl optarg subdirectory.
+    test -z "$macro_dir" && $opt_ltdl && {
+      $require_ltdl_dir
+      $require_ltdl_mode
 
-# require_makefile_am
-# -------------------
-# If not already set, set makefile_am to `Makefile.am' if that file is
-# present in the current directory.
-require_makefile_am=func_require_makefile_am
-func_require_makefile_am ()
-{
-    $debug_cmd
+      test subproject = "$ltdl_mode" && macro_dir="$ltdl_dir/m4"
+    }
 
-    test -n "$makefile_am" || makefile_am=Makefile.am
+    # Use ./m4 as the last resort.
+    test -z "$macro_dir" && macro_dir=m4
 
-    if test -f Makefile.am; then
-      func_verbose "found \`$makefile_am'"
-    else
-      makefile_am=
+    # Diagnose conflicts.
+    if test -n "$ac_macro_dir" && test -n "$am_macro_dir"; then
+      test "$ac_macro_dir" = "$am_macro_dir" || func_fatal_error "\
+AC_CONFIG_MACRO_DIR([$ac_macro_dir]) conflicts with ACLOCAL_AMFLAGS=-I 
$am_macro_dir."
     fi
 
-    require_makefile_am=:
+    require_macro_dir=:
 }
 
 
@@ -1632,7 +1743,7 @@ func_require_seen_libtool ()
   # without --install, and the project may not be using Automake.
   all_pkgaux_files="compile install-sh depcomp missing ltmain.sh 
snippet/_Noreturn.h snippet/arg-nonnull.h snippet/c++defs.h 
snippet/warn-on-use.h"
   all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 
ltversion.in ltversion.m4 lt~obsolete.m4"
-  all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am 
README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure 
configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h 
libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h 
libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h 
loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c 
loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c 
lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c"
+  all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am 
README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure 
configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h 
libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h 
libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h 
loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c 
loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c 
lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h ltdl.mk slist.c"
 
   # Files installed by func_install_*, some files are missing from these
   # lists deliberately because their respective func_install has to handle
@@ -1644,29 +1755,21 @@ func_require_seen_libtool ()
   # Locations for important files:
   address@hidden@
   address@hidden@
-  address@hidden@
+  address@hidden@
   address@hidden@
   address@hidden@
 
   # Allow the user to override the master libtoolize repository:
   if test -n "$_lt_pkgdatadir"; then
+    pkgauxdir="$_lt_pkgdatadir/build-aux"
     pkgltdldir="$_lt_pkgdatadir/libltdl"
-    pkgdatadir="$_lt_pkgdatadir/libltdl"
-    aclocaldir="$_lt_pkgdatadir/libltdl/m4"
+    aclocaldir="$_lt_pkgdatadir/m4"
   fi
+  func_nonemptydir_p pkgauxdir
   func_nonemptydir_p pkgltdldir
-  func_nonemptydir_p pkgdatadir
   func_nonemptydir_p aclocaldir
 
-  extract_trace=$pkgdatadir/config/extract-trace
-
-  $require_ltdl_dir
-  case $ltdl_dir in
-  .) ltdlprefix= ;;
-  *) ltdlprefix=$ltdl_dir/ ;;
-  esac
-  subproject_aux_dir=${ltdlprefix}config
-  subproject_macro_dir=${ltdlprefix}m4
+  extract_trace=$pkgauxdir/extract-trace
 
   # :::BE CAREFUL HERE:::
   # func_check_macros needs to check whether --ltdl was specified when
diff --git a/ltmain.c b/ltmain.c
deleted file mode 100644
index 2afc88a..0000000
--- a/ltmain.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* ltmain.c - C implementation of GNU Libtool
- * Copyright (C) 1998-1999 Free Software Foundation, Inc.
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, a copy can be downloaded from
- * http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * As a special exception to the GNU General Public License, if you
- * distribute this file as part of a program that contains a
- * configuration script generated by Autoconf, you may include it under
- * the same distribution terms that you use for the rest of that program.
- */
-
-#include <stdio.h>             /* printf */
-#include <stdlib.h>            /* exit */
-
-int
-main (argc, argv)
-     int argc;
-     char **argv;
-{
-  printf ("hello, world!\n");
-  exit (0);
-}
diff --git a/libltdl/m4/.gitignore b/m4/.gitignore
similarity index 100%
rename from libltdl/m4/.gitignore
rename to m4/.gitignore
diff --git a/libltdl/m4/argz.m4 b/m4/argz.m4
similarity index 100%
rename from libltdl/m4/argz.m4
rename to m4/argz.m4
diff --git a/libltdl/m4/autobuild.m4 b/m4/autobuild.m4
similarity index 100%
rename from libltdl/m4/autobuild.m4
rename to m4/autobuild.m4
diff --git a/libltdl/m4/libtool.m4 b/m4/libtool.m4
similarity index 99%
rename from libltdl/m4/libtool.m4
rename to m4/libtool.m4
index 00c1102..a9e20cf 100644
--- a/libltdl/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1195,7 +1195,7 @@ fi
 # Invoke $ECHO with all args, space-separated.
 func_echo_all ()
 {
-    $ECHO "$*" 
+    $ECHO "$*"
 }
 
 case "$ECHO" in
@@ -1795,7 +1795,7 @@ else
 
 /* When -fvisbility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || 
(__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || 
(__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -2065,7 +2065,7 @@ objdir=$lt_cv_objdir
 _LT_DECL([], [objdir], [0],
          [The name of the directory that contains temporary libtool files])dnl
 m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
   [Define to the sub-directory in which libtool stores uninstalled libraries.])
 ])# _LT_CHECK_OBJDIR
 
@@ -2280,7 +2280,7 @@ aix[[4-9]]*)
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not 
hardcode correct
+    # AIX (on Power*) has no versioning support, so currently we cannot 
hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
     if test "$aix_use_runtimelinking" = yes; then
@@ -3751,11 +3751,11 @@ _LT_EOF
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
          cat <<_LT_EOF > conftest.$ac_ext
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  
*/
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#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@&address@hidden
-#elif defined(__osf__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT@&address@hidden
 #else
@@ -4897,7 +4897,7 @@ _LT_EOF
        _LT_TAGVAR(ld_shlibs, $1)=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -5539,7 +5539,7 @@ _LT_EOF
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
@@ -6791,7 +6791,7 @@ if test "$_lt_caught_CXX_error" != yes; then
       ;;
 
       sysv5* | sco3.2v5* | sco5v6*)
-       # Note: We can NOT use -z defs as we might desire, because we do not
+       # Note: We CANNOT use -z defs as we might desire, because we do not
        # link with -lc, and that would cause any symbols used from libc to
        # always be unresolved, which means just about no library would
        # ever link correctly.  If we're not using GNU ld we use -z text
diff --git a/libltdl/m4/ltdl.m4 b/m4/ltdl.m4
similarity index 100%
rename from libltdl/m4/ltdl.m4
rename to m4/ltdl.m4
diff --git a/libltdl/m4/ltoptions.m4 b/m4/ltoptions.m4
similarity index 99%
rename from libltdl/m4/ltoptions.m4
rename to m4/ltoptions.m4
index 5d9acd8..301b0a3 100644
--- a/libltdl/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -81,7 +81,7 @@ m4_if([$1],[LT_INIT],[
   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-                  [_LT_ENABLE_FAST_INSTALL])
+                  [_LT_ENABLE_FAST_INSTALL])
   ])
 ])# _LT_SET_OPTIONS
 
diff --git a/libltdl/m4/ltsugar.m4 b/m4/ltsugar.m4
similarity index 100%
rename from libltdl/m4/ltsugar.m4
rename to m4/ltsugar.m4
diff --git a/libltdl/m4/ltversion.in b/m4/ltversion.in
similarity index 100%
rename from libltdl/m4/ltversion.in
rename to m4/ltversion.in
diff --git a/libltdl/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
similarity index 99%
rename from libltdl/m4/lt~obsolete.m4
rename to m4/lt~obsolete.m4
index c573da9..ffeab56 100644
--- a/libltdl/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -25,7 +25,7 @@
 # included after everything else.  This provides aclocal with the
 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 # because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
 #
 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 # Yes, that means every name once taken will need to remain here until
diff --git a/tests/archive-in-archive.at b/tests/archive-in-archive.at
index fd67c7d..5cd6d77 100644
--- a/tests/archive-in-archive.at
+++ b/tests/archive-in-archive.at
@@ -44,7 +44,7 @@ $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o 
foo.lo foo.c
 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
 $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
 -o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir
-$LIBTOOL --mode=install cp libfoo.la $thisdir 
+$LIBTOOL --mode=install cp libfoo.la $thisdir
 eval `$EGREP '^(old_library)=' < libfoo.la`
 libfoo=$old_library
 AT_CHECK([$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS 
$LDFLAGS \
diff --git a/tests/cdemo/Makefile.am b/tests/cdemo/Makefile.am
index ba58fea..148ca53 100644
--- a/tests/cdemo/Makefile.am
+++ b/tests/cdemo/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
 noinst_LTLIBRARIES = libfoo.la
diff --git a/tests/cdemo/configure.ac b/tests/cdemo/configure.ac
index 727a2eb..e008f72 100644
--- a/tests/cdemo/configure.ac
+++ b/tests/cdemo/configure.ac
@@ -28,7 +28,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([cdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/convenience.at b/tests/convenience.at
index f076e61..0f6a0e2 100644
--- a/tests/convenience.at
+++ b/tests/convenience.at
@@ -43,7 +43,7 @@ cat >main3.c <<EOF
 extern int a1(void), a2(void), a3(void);
 int main(void) { return a1() + a2() + a3() != 6; }
 EOF
-for i in 1 2 3; do 
+for i in 1 2 3; do
   echo "int a$i(void) { return $i; }" > a$i.c
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main$i.c
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c
@@ -83,7 +83,7 @@ cat >main3.cpp <<EOF
 extern int a1(void), a2(void), a3(void);
 int main(void) { return a1() + a2() + a3() != 6; }
 EOF
-for i in 1 2 3; do 
+for i in 1 2 3; do
   echo "int a$i(void) { return $i; }" > a$i.cpp
   $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c main$i.cpp
   $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c a$i.cpp
@@ -136,7 +136,7 @@ cat >main3.f <<EOF
       end
 EOF
 
-for i in 1 2 3; do 
+for i in 1 2 3; do
   cat >a$i.f <<EOF
       subroutine a$i(res)
       implicit none
@@ -196,7 +196,7 @@ cat >main3.f <<EOF
       end
 EOF
 
-for i in 1 2 3; do 
+for i in 1 2 3; do
   cat >a$i.f <<EOF
       subroutine a$i(res)
       implicit none
diff --git a/tests/darwin.at b/tests/darwin.at
index b255abe..6eab4cd 100644
--- a/tests/darwin.at
+++ b/tests/darwin.at
@@ -36,7 +36,7 @@ int main() { return 0;}
 
 $noskip && {
 $CC $CPPFLAGS $CFLAGS -arch ppc -arch i386 -o simple simple.c 2>&1 > /dev/null 
|| noskip=false
-rm -f simple 
+rm -f simple
 }
 
 AT_CHECK([$noskip || (exit 77)])
diff --git a/tests/demo/Makefile.am b/tests/demo/Makefile.am
index a3c6144..3cf17c6 100644
--- a/tests/demo/Makefile.am
+++ b/tests/demo/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
 # Build a libtool library, libhello.la for installation in libdir.
diff --git a/tests/demo/configure.ac b/tests/demo/configure.ac
index ccfc6fb..7a84441 100644
--- a/tests/demo/configure.ac
+++ b/tests/demo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([demo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([hello.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/demo/dlmain.c b/tests/demo/dlmain.c
index 8c8be09..495ae7c 100644
--- a/tests/demo/dlmain.c
+++ b/tests/demo/dlmain.c
@@ -54,13 +54,13 @@ main ()
         const char *name = s->name;
         printf ("found symbol: %s\n", name);
         if (!strcmp ("hello", name))
-         phello = (int(*)())s->address;
+         phello = (int(*)())s->address;
         else if (!strcmp ("foo", name))
-         pfoo = (int(*)())s->address;
+         pfoo = (int(*)())s->address;
         else if (!strcmp ("nothing", name))
 #ifndef _WIN32
          /* In an ideal world we could do this... */
-         pnothing = (int*)s->address;
+         pnothing = (int*)s->address;
 #else /* !_WIN32 */
          /* In an ideal world a shared lib would be able to export data */
          pnothing = (int*)&nothing;
diff --git a/tests/demo/foo.h b/tests/demo/foo.h
index e8a2c87..5609d8d 100644
--- a/tests/demo/foo.h
+++ b/tests/demo/foo.h
@@ -67,7 +67,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
    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)
+#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
@@ -76,11 +76,11 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #endif
 
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  
*/
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#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__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
diff --git a/tests/depdemo/Makefile.am b/tests/depdemo/Makefile.am
index ef6b060..282a861 100644
--- a/tests/depdemo/Makefile.am
+++ b/tests/depdemo/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
 SUBDIRS = l1 l2 l3 l4
diff --git a/tests/depdemo/configure.ac b/tests/depdemo/configure.ac
index 31231f3..175110c 100644
--- a/tests/depdemo/configure.ac
+++ b/tests/depdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([depdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/depdemo/l1/l1.c b/tests/depdemo/l1/l1.c
index d7c6c1e..715a91e 100644
--- a/tests/depdemo/l1/l1.c
+++ b/tests/depdemo/l1/l1.c
@@ -37,5 +37,5 @@ func_l1 (int indent)
     putchar(' ');
   printf("l1 (%i)\n", var_l1);
   var_l1++;
-  return 0; 
+  return 0;
 }
diff --git a/tests/depdemo/l2/l2.c b/tests/depdemo/l2/l2.c
index b545332..76b7e60 100644
--- a/tests/depdemo/l2/l2.c
+++ b/tests/depdemo/l2/l2.c
@@ -40,5 +40,5 @@ func_l2 (int indent)
   printf("l2 (%i)\n", var_l2);
   func_l1(indent+1);
   var_l2 += var_l1;
-  return 0; 
+  return 0;
 }
diff --git a/tests/depdemo/l3/l3.c b/tests/depdemo/l3/l3.c
index 6056907..33910e6 100644
--- a/tests/depdemo/l3/l3.c
+++ b/tests/depdemo/l3/l3.c
@@ -42,5 +42,5 @@ func_l3 (int indent)
   func_l1(indent+1);
   func_l2(indent+1);
   var_l3 += var_l1 + var_l2;
-  return 0; 
+  return 0;
 }
diff --git a/tests/depdemo/l4/l4.c b/tests/depdemo/l4/l4.c
index 068a0d9..0ff2e33 100644
--- a/tests/depdemo/l4/l4.c
+++ b/tests/depdemo/l4/l4.c
@@ -44,5 +44,5 @@ func_l4 (int indent)
     putchar(' ');
   printf("libm [sin(1.5) = %f]\n", sin(1.5));
   var_l4 += var_l3;
-  return 0; 
+  return 0;
 }
diff --git a/tests/depdemo/main.c b/tests/depdemo/main.c
index c4569b3..73e4db0 100644
--- a/tests/depdemo/main.c
+++ b/tests/depdemo/main.c
@@ -42,7 +42,7 @@ main (int argc, char **argv)
   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 1;
        }
   return 0;
 }
diff --git a/tests/depdemo/sysdep.h b/tests/depdemo/sysdep.h
index 4430b61..7c00990 100644
--- a/tests/depdemo/sysdep.h
+++ b/tests/depdemo/sysdep.h
@@ -44,7 +44,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
    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)
+#if defined __STDC__ || defined _AIX || (defined __mips && defined 
_SYSTYPE_SVR4) || defined WIN32 || defined __cplusplus
 # define __P(protos) protos
 #else
 # define __P(protos) ()
diff --git a/tests/dlloader-api.at b/tests/dlloader-api.at
index 5eeafba..3215c3b 100644
--- a/tests/dlloader-api.at
+++ b/tests/dlloader-api.at
@@ -45,7 +45,7 @@ first_open (lt_user_data data, const char *filename, 
lt_dladvise advise)
   static const char *first_module = "first";
   const char *ctx = (const char *) data;
 
-  /* Use a magic string to avoid possible interactions with filesystem
+  /* Use a magic string to avoid possible interactions with file system
    * objects.  Prepend '/' to short-circuit libltdl's search of
    * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar).
    */
@@ -115,7 +115,7 @@ last_open (lt_user_data data, const char *filename, 
lt_dladvise advise)
   static const char *last_module = "last";
   const char *ctx = (const char *) data;
 
-  /* Use a magic string to avoid possible interactions with filesystem
+  /* Use a magic string to avoid possible interactions with file system
    * objects.  Prepend '/' to short-circuit libltdl's search of
    * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar).
    */
@@ -277,7 +277,7 @@ main (int argc, char* argv[])
 
   printf ("Found loader \"%s\"\n", finder->name);
 
-  /* Use a magic string to avoid possible interactions with filesystem
+  /* Use a magic string to avoid possible interactions with file system
    * objects.  Prepend '/' to short-circuit libltdl's search of
    * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar).
    */
@@ -324,7 +324,7 @@ main (int argc, char* argv[])
 
   lt_dlclose (module);
 
-  /* Use a magic string to avoid possible interactions with filesystem
+  /* Use a magic string to avoid possible interactions with file system
    * objects.  Prepend '/' to short-circuit libltdl's search of
    * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar).
    */
diff --git a/tests/exceptions.at b/tests/exceptions.at
index 286b2ac..c1dcce1 100644
--- a/tests/exceptions.at
+++ b/tests/exceptions.at
@@ -80,9 +80,9 @@ AT_DATA([common.h],
 #include <exception>
 #include <string>
 
-#if defined(__CYGWIN__) || defined(_WIN32)
-# if defined(DLL_EXPORT) || defined(USING_COMMON_DLL)
-#  if defined(LIBTOOL_TEST_IN_COMMON)
+#if defined __CYGWIN__ || defined _WIN32
+# if defined DLL_EXPORT || defined USING_COMMON_DLL
+#  if defined LIBTOOL_TEST_IN_COMMON
 #   define COMMON_IMPEXP __declspec (dllexport)
 #  else
 #   define COMMON_IMPEXP __declspec (dllimport)
@@ -124,9 +124,9 @@ int common_dummy (void)
 AT_DATA([module.h],
 [[#include "common.h"
 
-#if defined(__CYGWIN__) || defined(_WIN32)
-# if defined(DLL_EXPORT) || defined(USING_MODULE_DLL)
-#  if defined(LIBTOOL_TEST_IN_MODULE)
+#if defined __CYGWIN__ || defined _WIN32
+# if defined DLL_EXPORT || defined USING_MODULE_DLL
+#  if defined LIBTOOL_TEST_IN_MODULE
 #   define MODULE_IMPEXP __declspec (dllexport)
 #  else
 #   define MODULE_IMPEXP __declspec (dllimport)
@@ -170,9 +170,9 @@ AT_DATA([lib.h],
 #include <string>
 
 
-#if defined(__CYGWIN__) || defined(_WIN32)
-# if defined(DLL_EXPORT) || defined(USING_LIB_DLL)
-#  if defined(LIBTOOL_TEST_IN_LIB)
+#if defined __CYGWIN__ || defined _WIN32
+# if defined DLL_EXPORT || defined USING_LIB_DLL
+#  if defined LIBTOOL_TEST_IN_LIB
 #   define LIB_IMPEXP __declspec (dllexport)
 #  else
 #   define LIB_IMPEXP __declspec (dllimport)
diff --git a/tests/export.at b/tests/export.at
index 39adfbc..eaf4123 100644
--- a/tests/export.at
+++ b/tests/export.at
@@ -103,18 +103,18 @@ AT_DATA(main.c,
  * For users, it's best to realize that they should not provide any
  * non-function API at all.
  */
-#if defined(LIBA_DLL_IMPORT)
-#  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
+#if defined LIBA_DLL_IMPORT
+#  if defined _WIN32 || defined WIN32 || defined __CYGWIN__
 #    define LIBA_SCOPE extern __declspec(dllimport)
-#    if defined(_MSC_VER)
+#    if defined _MSC_VER
 #      define LIBA_SCOPE_VAR LIBA_SCOPE
 #    endif
 #  endif
 #endif
-#if !defined(LIBA_SCOPE)
+#if !defined LIBA_SCOPE
 #  define LIBA_SCOPE extern
 #endif
-#if !defined(LIBA_SCOPE_VAR)
+#if !defined LIBA_SCOPE_VAR
 #  define LIBA_SCOPE_VAR extern
 #endif
 #ifdef __cplusplus
diff --git a/tests/f77demo/Makefile.am b/tests/f77demo/Makefile.am
index d38156e..83e5db6 100644
--- a/tests/f77demo/Makefile.am
+++ b/tests/f77demo/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
 lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
diff --git a/tests/f77demo/README b/tests/f77demo/README
index 11df06c..e23e69b 100644
--- a/tests/f77demo/README
+++ b/tests/f77demo/README
@@ -1,16 +1,12 @@
 This is a short demo of the fortran support in libtool.
 
-fprogram is a pure-fortran program which is linked 
+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 
+calls a C function, which in turn calls a fortran
 function.
 
-This demo requires GNU autoconf, automake, 
+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
index 041fa06..9ff3858 100644
--- a/tests/f77demo/configure.ac
+++ b/tests/f77demo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 AC_INIT([f77demo], [1.0], address@hidden)
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([foof.f])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 AC_ARG_WITH([dist], AS_HELP_STRING([--with-dist],
                                   [ignore errors not affecting `make dist']))
diff --git a/tests/f77demo/cprogram.c b/tests/f77demo/cprogram.c
index 8495524..1089e8c 100644
--- a/tests/f77demo/cprogram.c
+++ b/tests/f77demo/cprogram.c
@@ -28,27 +28,26 @@ 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
index 35d32f9..88934fc 100644
--- a/tests/f77demo/foo.h
+++ b/tests/f77demo/foo.h
@@ -26,9 +26,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define _FOO_H_ 1
 
 /* config.h is necessary for the fortran name mangling */
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 /* csub is an extremely useful subroutine that
  * returns the argument multiplied by two :-)
diff --git a/tests/f77demo/foof.f b/tests/f77demo/foof.f
index f899c49..6f6c6f6 100644
--- a/tests/f77demo/foof.f
+++ b/tests/f77demo/foof.f
@@ -1,9 +1,7 @@
-C 
 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.
-C 
 
       subroutine fsub(arg,res)
       write(*,*) 'fsub called'
diff --git a/tests/f77demo/foof2.f b/tests/f77demo/foof2.f
index e1f1550..f7e2fe4 100644
--- a/tests/f77demo/foof2.f
+++ b/tests/f77demo/foof2.f
@@ -1,9 +1,7 @@
-C 
 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.
-C 
 
       subroutine fsubf(arg,res)
       implicit none
diff --git a/tests/f77demo/foof3.f b/tests/f77demo/foof3.f
index 6d88204..8b7307f 100644
--- a/tests/f77demo/foof3.f
+++ b/tests/f77demo/foof3.f
@@ -1,9 +1,7 @@
-C 
 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.
-C 
 
       subroutine fsub3(arg,res)
       implicit none
diff --git a/tests/f77demo/fprogram.f b/tests/f77demo/fprogram.f
index f4b4ccd..6fcdb75 100644
--- a/tests/f77demo/fprogram.f
+++ b/tests/f77demo/fprogram.f
@@ -1,9 +1,7 @@
-C 
 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.
-C 
 
       program fprogram
       implicit none
@@ -31,4 +29,3 @@ C
 
       stop
       end
-
diff --git a/tests/fcdemo/Makefile.am b/tests/fcdemo/Makefile.am
index 299286e..f494e9f 100644
--- a/tests/fcdemo/Makefile.am
+++ b/tests/fcdemo/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
 lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
diff --git a/tests/fcdemo/README b/tests/fcdemo/README
index 50cee2b..c18cc97 100644
--- a/tests/fcdemo/README
+++ b/tests/fcdemo/README
@@ -1,16 +1,12 @@
 This is a short demo of the fortran support in libtool.
 
-fprogram is a pure-fortran program which is linked 
+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 
+calls a C function, which in turn calls a fortran
 function.
 
-This demo requires GNU autoconf, automake, 
+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
index d718953..0092e08 100644
--- a/tests/fcdemo/configure.ac
+++ b/tests/fcdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 AC_INIT([fcdemo], [1.0], address@hidden)
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([foof.f90])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 AC_ARG_WITH([dist], AS_HELP_STRING([--with-dist],
                                   [ignore errors not affecting `make dist']))
diff --git a/tests/fcdemo/cprogram.c b/tests/fcdemo/cprogram.c
index 39fa395..e7818e0 100644
--- a/tests/fcdemo/cprogram.c
+++ b/tests/fcdemo/cprogram.c
@@ -29,27 +29,26 @@ 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
index cf91d5a..09f0dce 100644
--- a/tests/fcdemo/foo.h
+++ b/tests/fcdemo/foo.h
@@ -26,9 +26,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 #define _FOO_H_ 1
 
 /* config.h is necessary for the fortran name mangling */
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 /* csub is an extremely useful subroutine that
  * returns the argument multiplied by two :-)
diff --git a/tests/fcdemo/foof.f90 b/tests/fcdemo/foof.f90
index 794dde9..7877f21 100644
--- a/tests/fcdemo/foof.f90
+++ b/tests/fcdemo/foof.f90
@@ -1,9 +1,8 @@
-! 
 ! 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)
diff --git a/tests/fcdemo/foof2.f90 b/tests/fcdemo/foof2.f90
index 913868b..9917ee7 100644
--- a/tests/fcdemo/foof2.f90
+++ b/tests/fcdemo/foof2.f90
@@ -1,9 +1,8 @@
-! 
 ! 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
diff --git a/tests/fcdemo/foof3.f90 b/tests/fcdemo/foof3.f90
index 922751b..5de3c84 100644
--- a/tests/fcdemo/foof3.f90
+++ b/tests/fcdemo/foof3.f90
@@ -1,9 +1,8 @@
-! 
 ! 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
diff --git a/tests/fcdemo/fprogram.f90 b/tests/fcdemo/fprogram.f90
index dca35b8..4fa1500 100644
--- a/tests/fcdemo/fprogram.f90
+++ b/tests/fcdemo/fprogram.f90
@@ -1,9 +1,8 @@
-! 
 ! 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
diff --git a/tests/getopt-m4sh.at b/tests/getopt-m4sh.at
index 17cdb53..4c11dbf 100644
--- a/tests/getopt-m4sh.at
+++ b/tests/getopt-m4sh.at
@@ -47,7 +47,7 @@ M4SH_GETOPTS(
 m4_pattern_forbid([m4_include])
 m4_pattern_forbid([AS_INIT])
 AT_CHECK([$M4SH --version || exit 77], [], [ignore], [ignore])
-AT_CHECK([$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options],
+AT_CHECK([$M4SH -B $abs_top_srcdir/build-aux options.m4sh > t-options],
         [], [], [], [AT_CHECK([test $at_status -eq 63 && exit 77])])
 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
 ])# _LT_AT_GETOPT_M4SH_SETUP
@@ -60,7 +60,7 @@ m4_define([_LT_AT_FALLBACK_FUNC_EXTRACT],
 [dnl {{
 $SED '/^# func_dirname /q' options > options.tmp
 echo '# func_append var value' >> options.tmp
-$SED -n '/^$1 ()/,/^} # $1 /p' $abs_top_srcdir/libltdl/config/ltmain.m4sh >> 
options.tmp
+$SED -n '/^$1 ()/,/^} # $1 /p' $abs_top_srcdir/build-aux/ltmain.m4sh >> 
options.tmp
 $SED '1,/^# func_dirname/d' options >> options.tmp
 rm -f options && mv options.tmp options])
 
diff --git a/tests/libtoolize.at b/tests/libtoolize.at
index 748cd4d..70ba941 100644
--- a/tests/libtoolize.at
+++ b/tests/libtoolize.at
@@ -296,7 +296,6 @@ libtoolize: copying file `m4/ltversion.m4'
 libtoolize: copying file `m4/lt~obsolete.m4'
 libtoolize: putting libltdl files in `ltdl'.
 libtoolize: copying file `ltdl/COPYING.LIB'
-libtoolize: creating file `ltdl/Makefile.inc'
 libtoolize: copying file `ltdl/README'
 libtoolize: copying file `ltdl/argz_.h'
 libtoolize: copying file `ltdl/argz.c'
@@ -323,6 +322,7 @@ libtoolize: copying file `ltdl/lt_dlloader.c'
 libtoolize: copying file `ltdl/lt_error.c'
 libtoolize: copying file `ltdl/ltdl.c'
 libtoolize: copying file `ltdl/ltdl.h'
+libtoolize: creating file `ltdl/ltdl.mk'
 libtoolize: copying file `ltdl/slist.c'
 libtoolize: Remember to add `LT_CONFIG_LTDL_DIR([ltdl])' to `configure.ac'.
 libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
@@ -351,22 +351,22 @@ AT_CLEANUP
 # Macro to generate data files common to several tests.
 m4_pushdef([_LT_AT_LTDL_SETUP],
 [AT_DATA(expout,
-[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
-libtoolize: linking file `ltdl/config/compile'
-libtoolize: linking file `ltdl/config/config.guess'
-libtoolize: linking file `ltdl/config/config.sub'
-libtoolize: linking file `ltdl/config/depcomp'
-libtoolize: linking file `ltdl/config/install-sh'
-libtoolize: linking file `ltdl/config/missing'
-libtoolize: linking file `ltdl/config/ltmain.sh'
-libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'.
-libtoolize: linking file `ltdl/m4/argz.m4'
-libtoolize: linking file `ltdl/m4/libtool.m4'
-libtoolize: linking file `ltdl/m4/ltdl.m4'
-libtoolize: linking file `ltdl/m4/ltoptions.m4'
-libtoolize: linking file `ltdl/m4/ltsugar.m4'
-libtoolize: linking file `ltdl/m4/ltversion.m4'
-libtoolize: linking file `ltdl/m4/lt~obsolete.m4'
+[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
+libtoolize: linking file `build-aux/compile'
+libtoolize: linking file `build-aux/config.guess'
+libtoolize: linking file `build-aux/config.sub'
+libtoolize: linking file `build-aux/depcomp'
+libtoolize: linking file `build-aux/install-sh'
+libtoolize: linking file `build-aux/missing'
+libtoolize: linking file `build-aux/ltmain.sh'
+libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
+libtoolize: linking file `m4/argz.m4'
+libtoolize: linking file `m4/libtool.m4'
+libtoolize: linking file `m4/ltdl.m4'
+libtoolize: linking file `m4/ltoptions.m4'
+libtoolize: linking file `m4/ltsugar.m4'
+libtoolize: linking file `m4/ltversion.m4'
+libtoolize: linking file `m4/lt~obsolete.m4'
 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
 libtoolize: linking file `ltdl/COPYING.LIB'
 libtoolize: linking file `ltdl/Makefile.am'
@@ -377,7 +377,7 @@ libtoolize: copying file `ltdl/aclocal.m4'
 libtoolize: linking file `ltdl/argz_.h'
 libtoolize: linking file `ltdl/argz.c'
 libtoolize: linking file `ltdl/config-h.in'
-libtoolize: linking file `ltdl/configure'
+libtoolize: copying file `ltdl/configure'
 libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
 libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
 libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
@@ -407,15 +407,15 @@ libtoolize: linking file `ltdl/slist.c'
 AT_DATA([configure.ac],
 [[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
 LT_CONFIG_LTDL_DIR([ltdl])
-AC_CONFIG_AUX_DIR([ltdl/config])
-AC_CONFIG_MACRO_DIR([ltdl/m4])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
 LT_INIT
 LTDL_INIT
 AC_OUTPUT
 ]])
 
 AT_DATA([Makefile.am],
-[[ACLOCAL_AMFLAGS = -I ltdl/m4
+[[ACLOCAL_AMFLAGS = -I m4
 ]])
 ])# _LT_AT_LTDL_SETUP
 
@@ -450,22 +450,22 @@ AT_CLEANUP
 AT_SETUP([diagnose missing LTDL_INIT invocation])
 
 AT_DATA(expout,
-[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
-libtoolize: copying file `ltdl/config/compile'
-libtoolize: copying file `ltdl/config/config.guess'
-libtoolize: copying file `ltdl/config/config.sub'
-libtoolize: copying file `ltdl/config/depcomp'
-libtoolize: copying file `ltdl/config/install-sh'
-libtoolize: copying file `ltdl/config/missing'
-libtoolize: copying file `ltdl/config/ltmain.sh'
-libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'.
-libtoolize: copying file `ltdl/m4/argz.m4'
-libtoolize: copying file `ltdl/m4/libtool.m4'
-libtoolize: copying file `ltdl/m4/ltdl.m4'
-libtoolize: copying file `ltdl/m4/ltoptions.m4'
-libtoolize: copying file `ltdl/m4/ltsugar.m4'
-libtoolize: copying file `ltdl/m4/ltversion.m4'
-libtoolize: copying file `ltdl/m4/lt~obsolete.m4'
+[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
+libtoolize: copying file `build-aux/compile'
+libtoolize: copying file `build-aux/config.guess'
+libtoolize: copying file `build-aux/config.sub'
+libtoolize: copying file `build-aux/depcomp'
+libtoolize: copying file `build-aux/install-sh'
+libtoolize: copying file `build-aux/missing'
+libtoolize: copying file `build-aux/ltmain.sh'
+libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
+libtoolize: copying file `m4/argz.m4'
+libtoolize: copying file `m4/libtool.m4'
+libtoolize: copying file `m4/ltdl.m4'
+libtoolize: copying file `m4/ltoptions.m4'
+libtoolize: copying file `m4/ltsugar.m4'
+libtoolize: copying file `m4/ltversion.m4'
+libtoolize: copying file `m4/lt~obsolete.m4'
 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
 libtoolize: copying file `ltdl/COPYING.LIB'
 libtoolize: copying file `ltdl/Makefile.am'
@@ -502,14 +502,14 @@ libtoolize: copying file `ltdl/ltdl.c'
 libtoolize: copying file `ltdl/ltdl.h'
 libtoolize: copying file `ltdl/slist.c'
 libtoolize: Remember to add `LTDL_INIT' to configure.ac.
-libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am.
+libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
 ]])
 
 AT_DATA([configure.ac],
 [[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
 LT_CONFIG_LTDL_DIR([ltdl])
-AC_CONFIG_AUX_DIR([ltdl/config])
-AC_CONFIG_MACRO_DIR([ltdl/m4])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
 LT_INIT
 AC_OUTPUT
 ]])
@@ -689,7 +689,7 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
 ## Upgrading an aclocal maintained aclocal.m4 without AC_CONFIG_MACRO_DIR. ##
 ## ----------------------------------------------------------------------- ##
 
-LT_AT_ACLOCAL([-I $abs_top_srcdir/libltdl/m4])
+LT_AT_ACLOCAL([-I $abs_top_srcdir/m4])
 
 ## The following code is adapted (and simplified) from libtoolize.m4sh
 ####
@@ -713,7 +713,7 @@ func_serial ()
     my_filename="$1"
     my_macro_regex="$2"
     my_sed_serial='
-       /^# serial [1-9][0-9.]*[        ]*'"$my_macro_regex"'[  ]*$/ {
+       /^# serial [1-9][0-9.]*[         ]*'"$my_macro_regex"'[  ]*$/ {
            s,^# serial \([1-9][0-9.]*\).*$,\1,
            q
        }
@@ -743,7 +743,7 @@ ltversion_serial=`func_serial 
"$tst_aclocaldir/ltversion.m4" ltversion.m4`
 ltsugar_serial=`func_serial "$tst_aclocaldir/ltsugar.m4" ltsugar.m4`
 lt_obsolete_serial=`func_serial "$tst_aclocaldir/lt~obsolete.m4" 
lt~obsolete.m4`
 $SED -e 's,^#.*serial.*ltoptions.m4$,# serial 99999 ltoptions.m4,' \
-  -e "s,^#.*serial.*libtool.m4\$,# serial $libtool_serial libtool.m4," \
+   -e "s,^#.*serial.*libtool.m4\$,# serial $libtool_serial libtool.m4," \
   -e "s,^#.*serial.*ltversion.m4\$,# serial $ltversion_serial ltversion.m4," \
   -e "s,^#.*serial.*ltsugar.m4\$,# serial $ltsugar_serial ltsugar.m4," \
   -e "s,^#.*serial.*lt~obsolete.m4\$,# serial $lt_obsolete_serial 
lt~obsolete.m4," \
@@ -798,7 +798,6 @@ libtoolize: copying file `m4/ltversion.m4'
 libtoolize: copying file `m4/lt~obsolete.m4'
 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
 libtoolize: copying file `ltdl/COPYING.LIB'
-libtoolize: creating file `ltdl/Makefile.inc'
 libtoolize: copying file `ltdl/README'
 libtoolize: copying file `ltdl/argz_.h'
 libtoolize: copying file `ltdl/argz.c'
@@ -825,6 +824,7 @@ libtoolize: copying file `ltdl/lt_dlloader.c'
 libtoolize: copying file `ltdl/lt_error.c'
 libtoolize: copying file `ltdl/ltdl.c'
 libtoolize: copying file `ltdl/ltdl.h'
+libtoolize: creating file `ltdl/ltdl.mk'
 libtoolize: copying file `ltdl/slist.c'
 ]])
 
@@ -847,26 +847,21 @@ LT_AT_CHECK_LIBTOOLIZE([--copy --install --ltdl=ltdl], 0, 
expout)
 AT_CLEANUP
 
 
-## -------------------------------------------------------- ##
-## Check subproject ltdl with non-shared AC_CONFIG_.*_DIRs. ##
-## -------------------------------------------------------- ##
+## ------------------------------------------------- ##
+## Check subproject ltdl with unconventional layout. ##
+## ------------------------------------------------- ##
 
-AT_SETUP([subproject ltdl with non-shared directories])
+AT_SETUP([subproject ltdl with unconventional layout])
 
 AT_DATA(expout,
-[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
-libtoolize: copying file `build-aux/config.guess'
-libtoolize: copying file `build-aux/config.sub'
-libtoolize: copying file `build-aux/install-sh'
-libtoolize: copying file `build-aux/ltmain.sh'
-libtoolize: putting auxiliary files in `build-aux'.
-libtoolize: copying file `ltdl/config/compile'
-libtoolize: copying file `ltdl/config/config.guess'
-libtoolize: copying file `ltdl/config/config.sub'
-libtoolize: copying file `ltdl/config/depcomp'
-libtoolize: copying file `ltdl/config/install-sh'
-libtoolize: copying file `ltdl/config/missing'
-libtoolize: copying file `ltdl/config/ltmain.sh'
+[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `acaux'.
+libtoolize: copying file `acaux/compile'
+libtoolize: copying file `acaux/config.guess'
+libtoolize: copying file `acaux/config.sub'
+libtoolize: copying file `acaux/depcomp'
+libtoolize: copying file `acaux/install-sh'
+libtoolize: copying file `acaux/missing'
+libtoolize: copying file `acaux/ltmain.sh'
 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `acm4'.
 libtoolize: copying file `acm4/argz.m4'
 libtoolize: copying file `acm4/libtool.m4'
@@ -875,25 +870,17 @@ libtoolize: copying file `acm4/ltoptions.m4'
 libtoolize: copying file `acm4/ltsugar.m4'
 libtoolize: copying file `acm4/ltversion.m4'
 libtoolize: copying file `acm4/lt~obsolete.m4'
-libtoolize: putting macros in `ltdl/m4'.
-libtoolize: copying file `ltdl/m4/argz.m4'
-libtoolize: copying file `ltdl/m4/libtool.m4'
-libtoolize: copying file `ltdl/m4/ltdl.m4'
-libtoolize: copying file `ltdl/m4/ltoptions.m4'
-libtoolize: copying file `ltdl/m4/ltsugar.m4'
-libtoolize: copying file `ltdl/m4/ltversion.m4'
-libtoolize: copying file `ltdl/m4/lt~obsolete.m4'
 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
 libtoolize: copying file `ltdl/COPYING.LIB'
-libtoolize: copying file `ltdl/Makefile.am'
-libtoolize: copying file `ltdl/Makefile.in'
+libtoolize: creating file `ltdl/Makefile.am'
+libtoolize: creating file `ltdl/Makefile.in'
 libtoolize: copying file `ltdl/README'
-libtoolize: copying file `ltdl/configure.ac'
-libtoolize: copying file `ltdl/aclocal.m4'
+libtoolize: creating file `ltdl/configure.ac'
+libtoolize: creating file `ltdl/aclocal.m4'
 libtoolize: copying file `ltdl/argz_.h'
 libtoolize: copying file `ltdl/argz.c'
 libtoolize: copying file `ltdl/config-h.in'
-libtoolize: copying file `ltdl/configure'
+libtoolize: creating file `ltdl/configure'
 libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
 libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
 libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
@@ -918,15 +905,13 @@ libtoolize: copying file `ltdl/lt_error.c'
 libtoolize: copying file `ltdl/ltdl.c'
 libtoolize: copying file `ltdl/ltdl.h'
 libtoolize: copying file `ltdl/slist.c'
-libtoolize: Consider using `AC_CONFIG_AUX_DIR([ltdl/config])' in configure.ac.
-libtoolize: Consider using `AC_CONFIG_MACRO_DIR([ltdl/m4])' in configure.ac.
-libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am.
+libtoolize: Consider adding `-I acm4' to ACLOCAL_AMFLAGS in Makefile.am.
 ]])
 
 AT_DATA([configure.ac],
 [[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
 LT_CONFIG_LTDL_DIR([ltdl])
-AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_AUX_DIR([acaux])
 AC_CONFIG_MACRO_DIR([acm4])
 LT_INIT
 LTDL_INIT([subproject])
@@ -945,14 +930,14 @@ AT_CLEANUP
 AT_SETUP([Subproject ltdl without GNU M4])
 
 AT_DATA(expout,
-[[libtoolize: putting auxiliary files in `ltdl/config'.
-libtoolize: linking file `ltdl/config/compile'
-libtoolize: linking file `ltdl/config/config.guess'
-libtoolize: linking file `ltdl/config/config.sub'
-libtoolize: linking file `ltdl/config/depcomp'
-libtoolize: linking file `ltdl/config/install-sh'
-libtoolize: linking file `ltdl/config/missing'
-libtoolize: linking file `ltdl/config/ltmain.sh'
+[[libtoolize: putting auxiliary files in `ltdl'.
+libtoolize: linking file `ltdl/compile'
+libtoolize: linking file `ltdl/config.guess'
+libtoolize: linking file `ltdl/config.sub'
+libtoolize: linking file `ltdl/depcomp'
+libtoolize: linking file `ltdl/install-sh'
+libtoolize: linking file `ltdl/missing'
+libtoolize: linking file `ltdl/ltmain.sh'
 libtoolize: putting macros in `ltdl/m4'.
 libtoolize: linking file `ltdl/m4/argz.m4'
 libtoolize: linking file `ltdl/m4/libtool.m4'
@@ -963,15 +948,15 @@ libtoolize: linking file `ltdl/m4/ltversion.m4'
 libtoolize: linking file `ltdl/m4/lt~obsolete.m4'
 libtoolize: putting libltdl files in `ltdl'.
 libtoolize: linking file `ltdl/COPYING.LIB'
-libtoolize: linking file `ltdl/Makefile.am'
-libtoolize: linking file `ltdl/Makefile.in'
+libtoolize: creating file `ltdl/Makefile.am'
+libtoolize: creating file `ltdl/Makefile.in'
 libtoolize: linking file `ltdl/README'
-libtoolize: linking file `ltdl/configure.ac'
-libtoolize: copying file `ltdl/aclocal.m4'
+libtoolize: creating file `ltdl/configure.ac'
+libtoolize: creating file `ltdl/aclocal.m4'
 libtoolize: linking file `ltdl/argz_.h'
 libtoolize: linking file `ltdl/argz.c'
 libtoolize: linking file `ltdl/config-h.in'
-libtoolize: linking file `ltdl/configure'
+libtoolize: creating file `ltdl/configure'
 libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
 libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
 libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
@@ -1086,4 +1071,3 @@ AT_CHECK([grep 'keep me' acinclude.m4], 0, [ignore])
 AT_CHECK([test -f libltdl/acinclude.m4], 1, [ignore], [ignore])
 
 AT_CLEANUP
-
diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at
index 18c2104..48cf5e9 100644
--- a/tests/lt_dladvise.at
+++ b/tests/lt_dladvise.at
@@ -174,7 +174,7 @@ hint_global (void)
 
       /* Don't attempt to load moddepend unless modglobal was successfully
          loaded and the symglobal hint was taken, and the system allows to
-        to have undefined symbols.  */
+        have undefined symbols.  */
       if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS)
         {
           hint_ext ();
diff --git a/tests/mdemo/Makefile.am b/tests/mdemo/Makefile.am
index f73fc9b..7f34be1 100644
--- a/tests/mdemo/Makefile.am
+++ b/tests/mdemo/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../.. $(INCLTDL)
 
 lib_LTLIBRARIES = libsub.la foo1.la libfoo2.la libmlib.la
@@ -43,18 +43,16 @@ libsub_la_LDFLAGS = -no-undefined
 ## 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_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
+libmlib_la_DEPENDENCIES = $(LIBLTDL) libsub.la foo1.la libfoo2.la
 
 noinst_HEADERS = foo.h
 
 bin_PROGRAMS = mdemo mdemo_static
 
-## use @LIBLTDL@ because some broken makes do not accept macros in targets
-## we can only do this because our LIBLTDL does not contain ${top_builddir}
 top_distdir = ../..
address@hidden@: $(top_distdir)/libtool \
+$(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'`)
@@ -65,9 +63,9 @@ $(top_distdir)/config.h:
 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 \
+mdemo_LDADD = $(LIBLTDL) libsub.la "-dlopen" self \
                "-dlopen" foo1.la "-dlopen" libfoo2.la
-mdemo_DEPENDENCIES = @LIBLTDL@ libsub.la foo1.la libfoo2.la
+mdemo_DEPENDENCIES = $(LIBLTDL) libsub.la foo1.la libfoo2.la
 
 # Create a statically linked version of mdemo.
 mdemo_static_SOURCES = $(mdemo_SOURCES)
diff --git a/tests/mdemo/README b/tests/mdemo/README
index 936396a..aa4cebb 100644
--- a/tests/mdemo/README
+++ b/tests/mdemo/README
@@ -1,10 +1,10 @@
 This is mdemo, an example package that uses GNU libtool with an
-Automake-generated environment to build two simple modules and 
+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". 
+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.
@@ -14,4 +14,3 @@ 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
index c1a88f2..0253843 100644
--- a/tests/mdemo/configure.ac
+++ b/tests/mdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([mdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/mdemo/main.c b/tests/mdemo/main.c
index 3a95664..ea732a9 100644
--- a/tests/mdemo/main.c
+++ b/tests/mdemo/main.c
@@ -34,7 +34,7 @@ LT_END_C_DECLS
 int
 test_dl (char *filename, int test_ext)
 {
-  lt_dlhandle handle;  
+  lt_dlhandle handle;
   const lt_dlinfo *info;
   int (*pfoo1)() = 0;
   int (*pfoo2)() = 0;
@@ -65,12 +65,12 @@ test_dl (char *filename, int test_ext)
   }
   printf ("module filename: %s\n", info->filename);
   printf ("module reference count: %i\n", info->ref_count);
-  
-  phello = (int(*)())lt_dlsym(handle, "hello");  
+
+  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");
@@ -82,7 +82,7 @@ test_dl (char *filename, int test_ext)
       ret = 1;
     }
 
-  pnothing = (int*)lt_dlsym(handle, "nothing");  
+  pnothing = (int*)lt_dlsym(handle, "nothing");
   /* Try assigning to the nothing variable. */
   if (pnothing)
     *pnothing = 1;
@@ -93,7 +93,7 @@ test_dl (char *filename, int test_ext)
       ret = 1;
     }
 
-  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");  
+  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
   /* Just call the functions and check return values. */
   if (pfoo1)
     {
@@ -103,7 +103,7 @@ test_dl (char *filename, int test_ext)
        ret = 1;
     }
   else {
-    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");  
+    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
     if (pfoo2)
       {
         if ((*pfoo2) () == FOO_RET)
@@ -132,7 +132,7 @@ int myvar;
 int
 test_dlself ()
 {
-  lt_dlhandle handle;  
+  lt_dlhandle handle;
   int (*pmyfunc)() = 0;
   int *pmyvar = 0;
   int ret = 0;
@@ -148,7 +148,7 @@ test_dlself ()
   if (pmyfunc)
     {
       int value = (*pmyfunc) ();
-      
+
       printf ("myfunc returned: %i\n", value);
       if (value == HELLO_RET)
         printf("myfunc is ok!\n");
@@ -160,7 +160,7 @@ test_dlself ()
       ret = 1;
     }
 
-  pmyvar = (int*)lt_dlsym(handle, "myvar");  
+  pmyvar = (int*)lt_dlsym(handle, "myvar");
   /* Try assigning to the variable. */
   if (pmyvar)
     *pmyvar = 1;
diff --git a/tests/mdemo/mlib.c b/tests/mdemo/mlib.c
index c16c35c..38374a4 100644
--- a/tests/mdemo/mlib.c
+++ b/tests/mdemo/mlib.c
@@ -30,7 +30,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 int
 test_dl (char *filename)
 {
-  lt_dlhandle handle;  
+  lt_dlhandle handle;
   const lt_dlinfo *info;
   int (*pfoo1)() = 0;
   int (*pfoo2)() = 0;
@@ -57,12 +57,12 @@ test_dl (char *filename)
   }
   printf ("module filename: %s\n", info->filename);
   printf ("module reference count: %i\n", info->ref_count);
-  
-  phello = (int(*)())lt_dlsym(handle, "hello");  
+
+  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");
@@ -74,7 +74,7 @@ test_dl (char *filename)
       ret = 1;
     }
 
-  pnothing = (int*)lt_dlsym(handle, "nothing");  
+  pnothing = (int*)lt_dlsym(handle, "nothing");
   /* Try assigning to the nothing variable. */
   if (pnothing)
     *pnothing = 1;
@@ -85,7 +85,7 @@ test_dl (char *filename)
       ret = 1;
     }
 
-  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");  
+  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
   /* Just call the functions and check return values. */
   if (pfoo1)
     {
@@ -95,7 +95,7 @@ test_dl (char *filename)
        ret = 1;
     }
   else {
-    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");  
+    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
     if (pfoo2)
       {
         if ((*pfoo2) () == FOO_RET)
@@ -113,7 +113,7 @@ test_dl (char *filename)
   return ret;
 }
 
-int 
+int
 mlib_func (int argc, char **argv)
 {
   int ret = 0;
diff --git a/tests/mdemo2/Makefile.am b/tests/mdemo2/Makefile.am
index e215650..3b2beb1 100644
--- a/tests/mdemo2/Makefile.am
+++ b/tests/mdemo2/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../.. -I$(top_srcdir)/../../libltdl
 
 bin_PROGRAMS = mdemo2 mdemo2_static
diff --git a/tests/mdemo2/README b/tests/mdemo2/README
index 8a1e18b..a808876 100644
--- a/tests/mdemo2/README
+++ b/tests/mdemo2/README
@@ -2,4 +2,3 @@ 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
index c73ae5f..2c91e46 100644
--- a/tests/mdemo2/configure.ac
+++ b/tests/mdemo2/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([mdemo2], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/nonrecursive.at b/tests/nonrecursive.at
index d37ec05..fa8cfb6 100644
--- a/tests/nonrecursive.at
+++ b/tests/nonrecursive.at
@@ -62,7 +62,7 @@ EXTRA_DIST            =
 CLEANFILES             =
 MOSTLYCLEANFILES       =
 
-include ltdl/Makefile.inc
+include ltdl/ltdl.mk
 
 foo_la_LDFLAGS         = -module -avoid-version -no-undefined
 foo_la_SOURCES         = foo.c
diff --git a/tests/objectlist.test b/tests/objectlist.test
index 0506340..0eec0f3 100755
--- a/tests/objectlist.test
+++ b/tests/objectlist.test
@@ -43,6 +43,6 @@ 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/old-ltdl-iface.at b/tests/old-ltdl-iface.at
new file mode 100644
index 0000000..deb9dcd
--- /dev/null
+++ b/tests/old-ltdl-iface.at
@@ -0,0 +1,138 @@
+# old-ltdl-iface.at -- exercise old libtoolize interface to libltdl
+#
+#   Copyright (C) 2011 Free Software Foundation, Inc.
+#   Written by Gary V. Vaughan, 2011
+#
+#   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.
+####
+
+# FIXME: Remove this test in 2013, along with support for Makefile.inc
+
+
+AT_BANNER([Support for older libltdl interfaces.])
+
+
+## ------------------------- ##
+## Support for Makefile.inc. ##
+## ------------------------- ##
+
+AT_SETUP([Makefile.inc])
+
+AT_DATA([configure.in],
+[[AC_INIT([old-ltdl-iface-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_LIBOBJ_DIR([ltdl])
+LT_CONFIG_LTDL_DIR([ltdl])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+LT_INIT
+LTDL_INIT([nonrecursive])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+]])
+
+AT_DATA([Makefile.am],
+[[ACLOCAL_AMFLAGS = -I m4
+BUILT_SOURCES =
+AM_CPPFLAGS =
+AM_LDFLAGS =
+include_HEADERS =
+noinst_LTLIBRARIES =
+lib_LTLIBRARIES =
+EXTRA_LTLIBRARIES =
+EXTRA_DIST =
+CLEANFILES =
+MOSTLYCLEANFILES =
+include ltdl/Makefile.inc
+bin_PROGRAMS = old
+old_LDADD = -Lltdl $(LIBLTDL)
+]])
+
+AT_DATA([old.c],
+[[#include <stdio.h>
+#include "ltdl.h"
+int main (int argc, const void *argv[]) {
+  putchar ('.');
+  putchar (lt_dlinit () ? 'E' : '.');
+  putchar (lt_dlexit () ? 'E' : '.');
+  return 0;
+}
+]])
+
+AT_DATA([expout],
+[[libtoolize: putting auxiliary files in `.'.
+libtoolize: linking file `./config.guess'
+libtoolize: linking file `./config.sub'
+libtoolize: linking file `./install-sh'
+libtoolize: linking file `./ltmain.sh'
+libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
+libtoolize: linking file `m4/argz.m4'
+libtoolize: linking file `m4/libtool.m4'
+libtoolize: linking file `m4/ltdl.m4'
+libtoolize: linking file `m4/ltoptions.m4'
+libtoolize: linking file `m4/ltsugar.m4'
+libtoolize: linking file `m4/ltversion.m4'
+libtoolize: linking file `m4/lt~obsolete.m4'
+libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
+libtoolize: linking file `ltdl/COPYING.LIB'
+libtoolize: linking file `ltdl/README'
+libtoolize: linking file `ltdl/argz_.h'
+libtoolize: linking file `ltdl/argz.c'
+libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
+libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
+libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
+libtoolize: linking file `ltdl/libltdl/lt__private.h'
+libtoolize: linking file `ltdl/libltdl/lt__strl.h'
+libtoolize: linking file `ltdl/libltdl/lt_dlloader.h'
+libtoolize: linking file `ltdl/libltdl/lt_error.h'
+libtoolize: linking file `ltdl/libltdl/lt_system.h'
+libtoolize: linking file `ltdl/libltdl/slist.h'
+libtoolize: linking file `ltdl/loaders/dld_link.c'
+libtoolize: linking file `ltdl/loaders/dlopen.c'
+libtoolize: linking file `ltdl/loaders/dyld.c'
+libtoolize: linking file `ltdl/loaders/load_add_on.c'
+libtoolize: linking file `ltdl/loaders/loadlibrary.c'
+libtoolize: linking file `ltdl/loaders/preopen.c'
+libtoolize: linking file `ltdl/loaders/shl_load.c'
+libtoolize: linking file `ltdl/lt__alloc.c'
+libtoolize: linking file `ltdl/lt__dirent.c'
+libtoolize: linking file `ltdl/lt__strl.c'
+libtoolize: linking file `ltdl/lt_dlloader.c'
+libtoolize: linking file `ltdl/lt_error.c'
+libtoolize: linking file `ltdl/ltdl.c'
+libtoolize: linking file `ltdl/ltdl.h'
+libtoolize: creating file `ltdl/ltdl.mk'
+libtoolize: renaming file `ltdl/Makefile.inc'
+libtoolize: linking file `ltdl/slist.c'
+libtoolize: Consider updating to use of `include ltdl/ltdl.mk' in Makefile.am.
+]])
+
+AT_DATA([experr],
+[[libtoolize: Use of `include ltdl/Makefile.inc' is deprecated!
+]])
+
+LT_AT_CHECK_LIBTOOLIZE([--ltdl=ltdl --nonrecursive --install], 0, [expout], 
[experr])
+
+AT_CHECK([test -f ltdl/Makefile.inc])
+
+LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force])
+
+LT_AT_EXEC_CHECK([./old], 0, [[...]])
+
+AT_CLEANUP
diff --git a/tests/pdemo-inst.test b/tests/pdemo-inst.test
index 8188b00..67753b1 100755
--- a/tests/pdemo-inst.test
+++ b/tests/pdemo-inst.test
@@ -36,4 +36,3 @@ 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/Makefile.am b/tests/pdemo/Makefile.am
index 91fe1e2..775b347 100644
--- a/tests/pdemo/Makefile.am
+++ b/tests/pdemo/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
 # Build a libtool library, libhello.la for installation in libdir.
diff --git a/tests/pdemo/configure.ac b/tests/pdemo/configure.ac
index 83cb5d4..740603a 100644
--- a/tests/pdemo/configure.ac
+++ b/tests/pdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([pdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([longer_file_name_hello.c])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 
 ## ------------------------ ##
diff --git a/tests/pdemo/foo.h b/tests/pdemo/foo.h
index d08303b..2f666f3 100644
--- a/tests/pdemo/foo.h
+++ b/tests/pdemo/foo.h
@@ -53,7 +53,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
    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)
+#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
@@ -62,11 +62,11 @@ or obtained by writing to the Free Software Foundation, 
Inc.,
 #endif
 
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  
*/
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#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__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
diff --git a/tests/pdemo/longer_file_name_dlmain.c 
b/tests/pdemo/longer_file_name_dlmain.c
index ad223dc..73caa78 100644
--- a/tests/pdemo/longer_file_name_dlmain.c
+++ b/tests/pdemo/longer_file_name_dlmain.c
@@ -54,13 +54,13 @@ main (int argc, char **argv)
         const char *name = s->name;
         printf ("found symbol: %s\n", name);
         if (!strcmp ("hello", name))
-         phello = (int(*)())s->address;
+         phello = (int(*)())s->address;
         else if (!strcmp ("foo", name))
-         pfoo = (int(*)())s->address;
+         pfoo = (int(*)())s->address;
         else if (!strcmp ("nothing", name))
 #ifndef _WIN32
          /* In an ideal world we could do this... */
-         pnothing = (int*)s->address;
+         pnothing = (int*)s->address;
 #else /* !_WIN32 */
          /* In an ideal world a shared lib would be able to export data */
          pnothing = (int*)&nothing;
diff --git a/tests/sh.test b/tests/sh.test
index 3382dad..5c6d675 100755
--- a/tests/sh.test
+++ b/tests/sh.test
@@ -31,37 +31,37 @@
 status=$EXIT_SUCCESS
 
 # Check for bad binary operators.
-if $EGREP -n -e 'if[   ]+["'\'']?\$[^  ]+[     ]+(=|-[lg][te]|-eq|-ne)' 
$scripts; then
+if $EGREP -n -e 'if[    ]+["'\'']?\$[^  ]+[     ]+(=|-[lg][te]|-eq|-ne)' 
$scripts; then
   echo "use \`if test \$something =' instead of \`if \$something ='"
   status=$EXIT_FAILURE
 fi
 
 # Check for bad unary operators.
-if $EGREP -n -e 'if[   ]+-' $scripts; then
+if $EGREP -n -e 'if[    ]+-' $scripts; then
   echo "use \`if test -X' instead of \`if -X'"
   status=$EXIT_FAILURE
 fi
 
 # Check for using `[' instead of `test'.
-if $EGREP -n -e 'if[   ]+\[' $scripts; then
+if $EGREP -n -e 'if[    ]+\[' $scripts; then
   echo "use \`if test' instead of \`if ['"
   status=$EXIT_FAILURE
 fi
 
 # Check for using test X... instead of test "X...
-if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?X' $scripts; then
+if $EGREP -n -e 'test[  ]+(![   ])?(-.[         ]+)?X' $scripts; then
   echo "use \`test \"X...\"' instead of \`test X'"
   status=$EXIT_FAILURE
 fi
 
 # Check for using test $... instead of test "$...
-if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?X?\$' $scripts; then
+if $EGREP -n -e 'test[  ]+(![   ])?(-.[         ]+)?X?\$' $scripts; then
   echo "use \`test \"\$...\"' instead of \`test \$'"
   status=$EXIT_FAILURE
 fi
 
 # Never use test -e.
-if $EGREP -n -e 'test[         ]+(![   ])?-e' $scripts; then
+if $EGREP -n -e 'test[  ]+(![   ])?-e' $scripts; then
   echo "use \`test -f' instead of \`test -e'"
   status=$EXIT_FAILURE
 fi
@@ -80,7 +80,7 @@ if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | 
\
 fi
 
 # Check for using set -- instead of set dummy
-if $EGREP -n -e 'set[  ]+--[   ]+' $scripts; then
+if $EGREP -n -e 'set[   ]+--[   ]+' $scripts; then
   echo "use \`set dummy ...' instead of \`set -- ...'"
   status=$EXIT_FAILURE
 fi
@@ -89,7 +89,7 @@ fi
 for s in $scripts
 do
   if $SED -n '
-      /set[    ][      ]*dummy/{
+      /set[     ][      ]*dummy/{
          /set.*dummy.*;.*shift/d
          N
          /\n.*shift/D
@@ -107,7 +107,7 @@ do
   if $SED -n '
       /^func_.*(/{
          N
-         /^func_[^     ]* ()\n{$/d
+         /^func_[^      ]* ()\n{$/d
          p
       }' "$s" 2>&1 | $EGREP .; then
     echo "Function definitions should look like this in $s:
@@ -124,7 +124,7 @@ done
 for s in "$abs_macro_dir/libtool.m4"
 do
   if $SED -n '/case \$cc_basename in/,/esac/ {
-             /^[       ]*[a-zA-Z][a-zA-Z0-9+]*[^*][    ]*)/p
+             /^[        ]*[a-zA-Z][a-zA-Z0-9+]*[^*][    ]*)/p
              }'  $s 2>&1 | $EGREP .; then
     echo "\$cc_basename matches should include a trailing \`*' in $s."
     status=$EXIT_FAILURE
diff --git a/tests/slist.at b/tests/slist.at
index 741410c..68907e6 100644
--- a/tests/slist.at
+++ b/tests/slist.at
@@ -31,9 +31,11 @@ AT_DATA([test-slist.c], [[
 #include <stdio.h>
 #include "slist.h"
 
+#define STREQ(s1, s2)  (strcmp ((s1), (s2)) == 0)
+
 void *find_string (SList *item, void *data)
 {
-  if (data != NULL && !strcmp ((const char *) item->userdata, (const char 
*)data))
+  if (data != NULL && STREQ ((const char *) item->userdata, (const char 
*)data))
     return item;
   else
     return NULL;
@@ -83,10 +85,10 @@ int main ()
   assert (slist_find (list, find_string, (void *) "foo10") == NULL);
   item = (SList *) slist_find (list, find_string, (void *) "foo1");
   assert (item != NULL);
-  assert (!strcmp ((const char *) item->userdata, "foo1"));
+  assert (STREQ ((const char *) item->userdata, "foo1"));
 
   item = slist_nth (list, 10);
-  assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0"));
+  assert (item != NULL && STREQ ((const char *) item->userdata, "foo0"));
 
   puts ("list as inserted:");
   slist_foreach (list, print_item, NULL);
@@ -95,13 +97,13 @@ int main ()
   slist_foreach (list, print_item, NULL);
 
   item = slist_nth (list, 1);
-  assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0"));
+  assert (item != NULL && STREQ ((const char *) item->userdata, "foo0"));
 
   assert (10 == slist_length (list));
 
   /* slist_tail is the second item, not the last one */
   item = slist_tail (list);
-  assert (item != NULL && !strcmp ((const char *) item->userdata, "foo1"));
+  assert (item != NULL && STREQ ((const char *) item->userdata, "foo1"));
 
   assert (slist_tail (slist_nth (list, 10)) == NULL);
 
@@ -131,19 +133,19 @@ int main ()
   list_save = list;
   item = slist_remove (&list, find_string, (void *) "foo5");
   assert (list_save == list);
-  assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), 
"foo5"));
+  assert (item != NULL && STREQ (data = (char *) slist_unbox (item), "foo5"));
   free (data);
 
   list_save = list;
   item = slist_remove (&list, find_string, (void *) "foo9");
   assert (list_save == list);
-  assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), 
"foo9"));
+  assert (item != NULL && STREQ (data = (char *) slist_unbox (item), "foo9"));
   free (data);
 
   list_save = list;
   item = slist_remove (&list, find_string, (void *) "foo0");
   assert (list_save != list);
-  assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), 
"foo0"));
+  assert (item != NULL && STREQ (data = (char *) slist_unbox (item), "foo0"));
   free (data);
 
   list_save = list;
diff --git a/tests/static.at b/tests/static.at
index dfa4c42..5b779e6 100644
--- a/tests/static.at
+++ b/tests/static.at
@@ -37,9 +37,9 @@
 #     will only cause the linker not to consider `*.so' libraries, but only
 #     `*.a'.  The latter, however, may still be shared images.  :-/
 #     `-all-static' still works, however.
-#   
+#
 #     It will not work with dlpreloading until we fix its related bug.
-#   
+#
 #   Let's try the latter until we know better.
 
 # - Test -Bstatic/-Bdynamic.  It should work with all of:
@@ -248,7 +248,7 @@ for withdep in no yes; do
   $LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la
   $LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la
   $LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la
-  test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la 
+  test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la
   # simulate a non-libtool lib:
   rm -f $libdir3/liba3.la
 
@@ -301,13 +301,13 @@ for withdep in no yes; do
              [0], [ignore], [ignore])
     dnl # This usually fails.  So don't do it.
     dnl AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123b$EXEEXT 
m.$OBJEXT \
-    dnl         -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3],
-    dnl         [0], [ignore], [ignore])
+    dnl                 -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3],
+    dnl                 [0], [ignore], [ignore])
   fi
 
   ### install the programs.
   # We can't install any program that links dynamically against liba2.
-  for st in -static -static-libtool-libs $can_link_all_static `$per_deplib && 
echo 2 12 23 123 123a`; do 
+  for st in -static -static-libtool-libs $can_link_all_static `$per_deplib && 
echo 2 12 23 123 123a`; do
     echo "# m$st"
     AT_CHECK([$LIBTOOL --mode=install cp m${st}$EXEEXT $bindir/m${st}$EXEEXT], 
[0], [ignore], [stderr])
     if $have_static; then
@@ -318,7 +318,7 @@ for withdep in no yes; do
 
 
   ### Run each program once so that relinking has happened.
-  
+
   func_fix_path $prefix1 $prefix2 $prefix3
   func_test_exec -static -static-libtool-libs -all-static `$per_deplib && echo 
1 2 3 12 13 23 31 123 123a`
   func_restore_path
diff --git a/tests/stresstest.at b/tests/stresstest.at
index 9568d49..4722ffd 100644
--- a/tests/stresstest.at
+++ b/tests/stresstest.at
@@ -90,18 +90,18 @@ int ab = 1;
 
 AT_DATA(main.c,
 [[
-#if defined(LIBA_DLL_IMPORT)
-#  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
+#if defined LIBA_DLL_IMPORT
+#  if defined _WIN32 || defined WIN32 || defined __CYGWIN__
 #    define LIBA_SCOPE extern __declspec(dllimport)
-#    if defined(_MSC_VER)
+#    if defined _MSC_VER
 #      define LIBA_SCOPE_VAR LIBA_SCOPE
 #    endif
 #  endif
 #endif
-#if !defined(LIBA_SCOPE)
+#if !defined LIBA_SCOPE
 #  define LIBA_SCOPE extern
 #endif
-#if !defined(LIBA_SCOPE_VAR)
+#if !defined LIBA_SCOPE_VAR
 #  define LIBA_SCOPE_VAR extern
 #endif
 #ifdef __cplusplus
@@ -134,18 +134,18 @@ int main(void)
 
 AT_DATA(dlself.c,
 [[
-#if defined(LIBA_DLL_IMPORT)
-#  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
+#if defined LIBA_DLL_IMPORT
+#  if defined _WIN32 || defined WIN32 || defined __CYGWIN__
 #    define LIBA_SCOPE extern __declspec(dllimport)
-#    if defined(_MSC_VER)
+#    if defined _MSC_VER
 #      define LIBA_SCOPE_VAR LIBA_SCOPE
 #    endif
 #  endif
 #endif
-#if !defined(LIBA_SCOPE)
+#if !defined LIBA_SCOPE
 #  define LIBA_SCOPE extern
 #endif
-#if !defined(LIBA_SCOPE_VAR)
+#if !defined LIBA_SCOPE_VAR
 #  define LIBA_SCOPE_VAR extern
 #endif
 #ifdef __cplusplus
@@ -273,12 +273,12 @@ do
          esac
 
          LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o 
"$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la],
-                  [0],[ignore],[ignore])
+                  [0],[ignore],[ignore])
          LT_AT_EXEC_CHECK([./main],[0])
          for l10 in '' '-export-symbols dlselfsyms'
          do
            LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o 
"$rel"sub3/dlself$EXEEXT "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo 
-dlopen self $l10],
-                    [0],[ignore],[ignore])
+                    [0],[ignore],[ignore])
            LT_AT_EXEC_CHECK([./sub3/dlself],[0])
          done
        done
diff --git a/tests/tagdemo/Makefile.am b/tests/tagdemo/Makefile.am
index 295e7b6..71a7825 100644
--- a/tests/tagdemo/Makefile.am
+++ b/tests/tagdemo/Makefile.am
@@ -23,7 +23,7 @@
 #####
 
 AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS  = -I ../../libltdl/m4
+ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
 noinst_LTLIBRARIES = libconv.la
diff --git a/tests/tagdemo/README b/tests/tagdemo/README
index 33690e3..b82576d 100644
--- a/tests/tagdemo/README
+++ b/tests/tagdemo/README
@@ -1,5 +1,3 @@
-# $Id$
-
 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.
diff --git a/tests/tagdemo/configure.ac b/tests/tagdemo/configure.ac
index d97a6de..36f3591 100644
--- a/tests/tagdemo/configure.ac
+++ b/tests/tagdemo/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ(2.54)
 ## ------------------------ ##
 AC_INIT([tagdemo], [1.0], address@hidden)
 AC_CONFIG_SRCDIR([foo.cpp])
-AC_CONFIG_AUX_DIR([../../libltdl/config])
+AC_CONFIG_AUX_DIR([../../build-aux])
 
 AC_CANONICAL_TARGET
 
diff --git a/tests/template.at b/tests/template.at
index 1729778..4a549da 100644
--- a/tests/template.at
+++ b/tests/template.at
@@ -129,7 +129,7 @@ AT_KEYWORDS([libtool])
 
 noskip=:
 # Mac OS X.
-# The linker has issues with this test. 
+# The linker has issues with this test.
 case $host in
 *-darwin*) noskip=false ;;
 esac
@@ -218,12 +218,12 @@ case $compiler_c_o in
 yes)
   main_o=sub/main.$OBJEXT
   AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp],
-          [0], [ignore], [ignore])
+          [0], [ignore], [ignore])
   ;;
 *)
   main_o=main.$OBJEXT
   AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp],
-          [0], [ignore], [ignore])
+          [0], [ignore], [ignore])
   ;;
 esac
 
@@ -270,17 +270,17 @@ LT_AT_EXEC_CHECK([./sub/main])
 if $noskip; then
 
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo],
-        [0], [ignore], [ignore])
+        [0], [ignore], [ignore])
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
sub/main$EXEEXT $main_o lib2/libb.la],
-        [0], [ignore], [ignore])
+        [0], [ignore], [ignore])
   LT_AT_EXEC_CHECK([./sub/main])
 fi
 # both installed
 if $noskip; then
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar],
-        [0], [ignore], [ignore])
+        [0], [ignore], [ignore])
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
sub/main$EXEEXT $main_o lib2/libb.la],
-        [0], [ignore], [ignore])
+        [0], [ignore], [ignore])
   LT_AT_EXEC_CHECK([./sub/main])
 fi
 
diff --git a/tests/testsuite.at b/tests/testsuite.at
index c450e10..0c2ffcf 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -56,11 +56,11 @@ if (FOO=bar; unset FOO) >/dev/null 2>&1; then
 else
   unset=false
 fi
-: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
+: ${mkdir_p="$abs_top_srcdir/build-aux/install-sh -d"}
 # Fix relative paths in $lt_INSTALL
 case $lt_INSTALL in
-  *libltdl/config/install-sh*)
-    lt_INSTALL=$abs_top_srcdir/libltdl/config/install-sh
+  *build-aux/install-sh*)
+    lt_INSTALL=$abs_top_srcdir/build-aux/install-sh
     ;;
 esac
 
@@ -442,7 +442,7 @@ module.lo: $(LIBTOOL) module.c
        $(LTCOMPILE) -c module.c
 ]])
 cat >> Makefile <<EOF
-SHELL = $SHELL 
+SHELL = $SHELL
 EOF
 ])
 m4_popdef([_ARG_DIR])


hooks/post-receive
-- 
GNU Libtool



reply via email to

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