libtool-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Libtool branch, pr-msvc-support, updated. v2.2.6-137-g89103f4


From: Peter Rosin
Subject: [SCM] GNU Libtool branch, pr-msvc-support, updated. v2.2.6-137-g89103f4
Date: Wed, 18 Mar 2009 22:03:21 +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, pr-msvc-support has been updated
       via  89103f4b11a3743dec1bfbdefd16269a19dc5377 (commit)
       via  032d3cc9c17b51649153f51c50d1586774799cbd (commit)
       via  c1cd198697def508fc64ffe16516cd76f8d2eb5b (commit)
       via  686f69d44f867ce91131bc51040f29dbc4d19616 (commit)
       via  95f16dc1f658f0ff2a47d728e4b49cc90c1f09e3 (commit)
       via  55b363f2147638c3b5c78df264286863f23ff605 (commit)
       via  7c483431f1026e5bbfedc18c369652bb96f9f8dd (commit)
       via  0ab77c78c67226c118aa2df5ef8c144d660a3a0f (commit)
       via  9e9ba5e0e2c0b3f33ee44081c5bc3f0b8991aebd (commit)
       via  77e114998457cb6170ad84b360cb5b9be90f2191 (commit)
       via  a23b561d4497d6560e0cf9065201cb4f811836ff (commit)
       via  5f24ee188d215eb1f54b138000010a0f04e4bb7f (commit)
       via  6d08820f7c04dc7269c40ac01bc844e3fedde624 (commit)
       via  f4788a1ba6fbbbdd90695661e79094c7071ad193 (commit)
       via  a967d9d23b2a0b095497e54fbb35f36976af19b9 (commit)
       via  af91ea10b4af5fbf5ed5b2010295fef61cfdcf97 (commit)
       via  92a785fd7eadea8db2f1b81ed0425fb93cf62874 (commit)
       via  a8bb7bd817c7606e848b4c57069d49f6b5b82ed6 (commit)
       via  5e43c14cc9a99af8fbd4121cf913a66b38e100e9 (commit)
       via  0980a3993a6138895d4884f92ff9764d426b148d (commit)
       via  425841cbdee3b690eb89a92403e97b0852f95771 (commit)
       via  13ef1b34b7a17af22769817f243c347b4412a890 (commit)
       via  b93a3db892cb3203ec5cfe10cb673999b13e13d2 (commit)
       via  18c603141ee49f71c49c0e54f9f831316c023b91 (commit)
       via  3e0beef8eb35a734514d5c4871f19a32c5edb145 (commit)
       via  d356bfc32fd946b3a62eec391fefa9e1714ff53d (commit)
       via  9f559243e8d9c2cc161acfab7ee4d274c7c422c5 (commit)
      from  c1778bd15dbd81a09ef190241104635fb3e8e6e8 (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 89103f4b11a3743dec1bfbdefd16269a19dc5377
Merge: c1778bd15dbd81a09ef190241104635fb3e8e6e8 
032d3cc9c17b51649153f51c50d1586774799cbd
Author: Peter Rosin <address@hidden>
Date:   Wed Mar 18 22:47:14 2009 +0100

    Merge branch 'master' into pr-msvc-support

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

Summary of changes:
 ChangeLog                  |  212 ++++++++++++++++++++++++++++++++++++++
 Makefile.am                |    5 +-
 NEWS                       |    3 +
 README                     |   12 ++-
 README.alpha               |    8 +-
 THANKS                     |    5 +
 bootstrap                  |    8 +-
 clcommit.m4sh              |    4 +-
 doc/libtool.texi           |   22 +++--
 libltdl/config/getopt.m4sh |   13 ++-
 libltdl/config/ltmain.m4sh |   40 +++++---
 libltdl/ltdl.c             |    4 +
 libltdl/m4/libtool.m4      |   30 +++++-
 libltdl/m4/lt~obsolete.m4  |    4 +-
 libtoolize.m4sh            |   32 +++---
 tests/cmdline_wrap.at      |    4 +-
 tests/cwrapper.at          |    1 +
 tests/defs.m4sh            |   12 +--
 tests/duplicate_members.at |   12 ++-
 tests/execute-mode.at      |    7 ++
 tests/fail.at              |   27 ++++--
 tests/help.at              |   90 ++++++++++++++++
 tests/install.at           |    8 +-
 tests/localization.at      |   12 +--
 tests/lt_dlopen.at         |  103 +++++++++++++++++++
 tests/lt_dlopenext.at      |  242 ++++++++++++++++++++++++++++++++++++++++++++
 tests/testsuite.at         |   20 ++++
 27 files changed, 854 insertions(+), 86 deletions(-)
 create mode 100644 tests/help.at
 create mode 100644 tests/lt_dlopen.at
 create mode 100644 tests/lt_dlopenext.at

diff --git a/ChangeLog b/ChangeLog
index 644a55b..3b3d37f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,217 @@
 2009-01-26  Peter Rosin  <address@hidden>
 
+       Don't settle for any dumpbin/link program as name lister.
+       * libltdl/m4/libtool.m4 (LT_PATH_NM): When locating dumpbin or
+       link -dump, check if they appear to really be capable of name
+       listing, in order to eliminate e.g. link from coreutils. This
+       makes the name lister decision fall back on nm as the default if
+       no acceptable candidate is found, which mainly happens on
+       (arguably broken) cross compiles.
+       * NEWS: Update
+       * THANKS: Update
+       Reports by Rudolf Leitgeb and Peter Kjellerstedt.
+
+2009-03-03  Ralf Wildenhues  <address@hidden>
+
+       Document INNER_TESTSUITEFLAGS, drop leading space.
+       * README: Document INNER_TESTSUITEFLAGS.
+       * tests/cmdline_wrap.at (Run tests with low max_cmd_len):
+       When using INNER_TESTSUITEFLAGS on the testsuite invocation,
+       drop leading space after "-k libtool", so that the user may
+       further limit the set of tests to be run.
+
+2009-03-02  Ralf Wildenhues  <address@hidden>
+
+       Fix low max_cmd_len template test on UnixWare.
+       * libltdl/config/ltmain.m4sh (func_mode_link): When expanding
+       $reload_cmds, always put objects in $reload_objs rather than
+       adding them to the command line, to allow more general command
+       lines in reload_cmds.  Ensure $reload_objs contains a leading
+       space.
+       * libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG) [sysv5*,
+       sco3.2v5*, sco5v6*] <reload_cmds>: For CC, invoke prelinker
+       before creating reloadable object.
+       (_LT_CMD_RELOAD) <reload_cmds, reload_flag>: Declare as
+       _LT_TAGDECL, not _LC_DECL.
+       (_LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG, _LT_LANG_FC_CONFIG)
+       (_LT_LANG_GCJ_CONFIG) <reload_cmds, reload_flag>: Initialize
+       from default (C tag) value.
+       * THANKS: Update.
+       Report and analysis by Tim Rice and John Wolfe.
+
+2009-02-28  Ralf Wildenhues  <address@hidden>
+
+       * doc/libtool.texi (Distributing libltdl, Test descriptions):
+       Add missing parentheses.
+
+2009-02-28  Tim Rice  <address@hidden>
+
+       Fix C++ template handling for old archives on UnixWare 7.1.4.
+       * libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG) [sysv5*,
+       sco3.2v5*, sco5v6*] <old_archive_cmds>: For CC, add template
+       prelink step before archiving.  Fixes template.at test failures.
+
+2009-02-28  Török Edwin  <address@hidden>  (tiny change)
+           Ralf Wildenhues  <address@hidden>
+
+       Do not add bogus directory arguments to link command lines.
+       * libltdl/config/ltmain.m4sh (func_mode_link): Ensure $path is
+       always initialized before it is used.  Reported for zsh, for
+       which $path contains $PATH entries even after "emulate sh", see
+       <http://bugs.debian.org/517501>.
+
+2009-02-28  Andreas Schwab  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Remove remaining references to CVS.
+       * bootstrap: Remove references to CVS.
+       * README.alpha: Likewise.
+       * clcommit.m4sh: Likewise.
+       * doc/libtool.texi: Bump copyright years.
+       (libtool script contents): Describe macro_revision as revision
+       without reference to CVS.
+
+2009-02-16  Ralf Wildenhues  <address@hidden>
+
+       Do not pass $INSTALL via TESTS_ENVIRONMENT.
+       * Makefile.am (TESTS_ENVIRONMENT): Set lt_INSTALL, not INSTALL,
+       so that a bogus relative path to the install-sh script in the
+       source tree is not propagated to the configure scripts of the
+       old test suite.
+       * tests/testsuite.at: Adjust.
+       * tests/install.at (Install tests): Likewise.
+
+2009-02-03  Ralf Wildenhues  <address@hidden>
+           Kurt Roeckx <address@hidden>
+
+       New test for lt_dlopenext error message.
+       * tests/lt_dlopenext.at (lt_dlopenext error messages): New file,
+       with new test, with sources taken from the Autobook example.
+       * Makefile.am: Update.
+
+2009-02-03  Kurt Roeckx <address@hidden>
+
+       lt_dlopenext sets error upon successful library load.
+       * libltdl/ltdl.c (lt_dlopenadvise): Fix bogus error on
+       successful loading of library with lt_dlopenext.
+       Report by Kaiwang Chen in <http://bugs.debian.org/510006>.
+
+2009-02-01  Ralf Wildenhues  <address@hidden>
+
+       Fix sed script in install.at.
+       * tests/install.at (Install tests): Fix typo in sed script,
+       fixes test failure on HP-UX.
+
+       Fix $INSTALL in testsuite with relative path to install-sh.
+       * tests/testsuite.at: If `$INSTALL' points to in-tree
+       install-sh, override a possibly-relative path to it with an
+       absolute one.
+
+       install mode: do not pass `-m $install_override_mode' to cp.
+       * libltdl/config/ltmain.m4sh (func_mode_install): New variable
+       $install_cp, factor test when `cp' is used for installation.
+       Do not pass mode override to cp.  Fixes `libtool --mode=install
+       cp ...' on HP-UX; cp should not be used for libraries that might
+       be needed by programs invoked during the installation process.
+
+       Fix sed script portability issue in func_version.
+       * libltdl/config/getopt.m4sh (func_version): Remove space in
+       `/\./! {' sed command, to please HP-UX sed.
+
+2009-01-31  Jeff Squyres <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       New test for bogus lt_dlopen error message.
+       * tests/lt_dlopen.at (lt_dlopen error messages): New file, new
+       test, marked as XFAIL for now.
+       * Makefile.am: Adjust.
+       Report and reproducible test case by Jeff Squyres.
+
+2009-01-31  Ralf Wildenhues  <address@hidden>
+
+       execute mode: do not transform *.lo or *.la arguments.
+       * libltdl/config/ltmain.m4sh (func_mode_execute): Do not check
+       arguments matching *.lo or *.la for script wrappers.
+       * tests/execute-mode.at (execute mode): Add tests.
+       * NEWS, THANKS: Update.
+       Report by Paul Biggar.
+
+       Nonexistent `main' does not guarantee link failure.
+       * tests/fail.at (Failure tests): Use an unresolved symbol,
+       rather than non-presence of `main', to provoke a link failure
+       also on QNX.  Only check for failure of the libtool script if
+       the link without libtool would have failed, too.
+       Report by Mike Gorchak.
+
+       Use AT_CHECK more liberally in duplicate members test.
+       * tests/duplicate_members.at (duplicate members in archive
+       tests): Wrap link commands in AT_CHECK, they might fail, as seen
+       on QNX.
+       * THANKS: Update.
+       Report by Mike Gorchak.
+
+2009-01-30  Akim Demaille  <address@hidden>
+
+       Fix cwrapper warnings from MSVC 2005.
+       * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src)
+       [file scope]: define _CRT_SECURE_NO_DEPRECATE.
+
+2009-01-29  Akim Demaille  <address@hidden>
+
+       Fix bootstrap with older libtool.m4 in reach of aclocal.
+       * libltdl/m4/lt~obsolete.m4: Add stub definitions for
+       _LT_REQUIRED_DARWIN_CHECKS and _LT_AC_PROG_CXXCPP.
+
+       Fix func_exec_init.
+       * tests/defs.m4sh (func_exec_init): Instead of using the undefined
+       my_dir, call func_dirname_and_basename and use its result.
+       (func_make): For consistency, don't use the useless local variable
+       my_dir.
+
+2009-01-29  Ralf Wildenhues  <address@hidden>
+
+       Document --mode short-hands better, and test them.
+       * doc/libtool.texi (Invoking libtool): Give examples for using
+       the `--mode=MODE' short-hand `MODE', or abbreviations thereof.
+       * libltdl/config/ltmain.m4sh: Mention the short-hand for MODE
+       in the --help output.
+       * tests/help.at (mode short-hands): New test group.
+       Suggestion by Bruno Haible.
+
+       func_version copes with multi-line copyright headers.
+       * libltdl/config/getopt.m4sh (func_version): Slurp in copyright
+       lines until a period is found.
+       * libltdl/config/ltmain.m4sh: Multi-line copyright is ok to use
+       now.
+       * tests/help.at (standard command line options): New file, new
+       tests.  Make this test group the first one for libtool tests,
+       moving the banner ...
+       * tests/duplicate_members.at: ... from here.
+       * Makefile.am (TESTSUITE_AT): Add tests/help.at.
+
+2009-01-29  Akim Demaille  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Normalize compiler output due to compiler wrappers.
+       * tests/testsuite.at (LT_AT_NORMALIZE_COMPILER_OUTPUT): New
+       macro, to normalize ccache and distcc output.
+       * tests/localization.at (localized compiler messages): Use it.
+
+2009-01-29  Peter Rosin  <address@hidden>
+
+       Make modified libtool script in cwrapper test executable
+       * tests/cwrapper.at: Make modified libtool script executable.
+       Report by Roumen Petrov.
+
+2009-01-28  Akim Demaille  <address@hidden>
+
+       Clean space uses.
+       * libtoolize.m4sh: Remove trailing spaces.
+       Use <tab><sp>, as some editors remove "useless" spaces in
+       <sp><tab>.
+
+2009-01-26  Peter Rosin  <address@hidden>
+
        AWK is required, make sure it is set.
        * libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS: Make sure
        AWK is set (automake brings it in, but is not always used).
diff --git a/Makefile.am b/Makefile.am
index b30884b..cdd6984 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -451,6 +451,7 @@ dist-hook:
 TESTSUITE      = tests/testsuite
 TESTSUITE_AT   = tests/testsuite.at \
                  tests/libtoolize.at \
+                 tests/help.at \
                  tests/duplicate_members.at \
                  tests/duplicate_conv.at \
                  tests/duplicate_deps.at \
@@ -478,6 +479,8 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/am-subdir.at \
                  tests/lt_dlexit.at \
                  tests/lt_dladvise.at \
+                 tests/lt_dlopen.at \
+                 tests/lt_dlopenext.at \
                  tests/ltdl-api.at \
                  tests/need_lib_prefix.at \
                  tests/standalone.at \
@@ -502,7 +505,7 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" 
CFLAGS="$(CFLAGS)" \
        LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
        AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
        LT_AR="$(LT_AR)" LT_ARFLAGS="$(LT_ARFLAGS)" \
-       STRIP="$(STRIP)" INSTALL="$(INSTALL)" \
+       STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \
        OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
        SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \
        CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \
diff --git a/NEWS b/NEWS
index 934fbfc..e6bffd8 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,9 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
     only the default informational output. See New Features, --no-silent.
   - Link tests are guarded by cache variables so they can be avoided for
     bootstrapping purposes (e.g., when link tests are not possible).
+  - Argument mangling of execute mode has been improved (i.e., lessened).
+  - Fix 2.1b regression that caused nm to not be the default name lister.
+    The regression affected mainly (arguably broken) cross compiles.
 
 * Miscellaneous changes:
 
diff --git a/README b/README
index 2bffd27..612699e 100644
--- a/README
+++ b/README
@@ -104,6 +104,15 @@ possible to test an installed script, possibly from a 
different Libtool
 release, with
   gmake check-local TESTSUITEFLAGS="-k libtool LIBTOOL=/path/to/libtool"
 
+Some tests, like the one exercising max_cmd_len limits, make use of this
+to invoke the testsuite recursively on a subset of tests.  For these
+tests, the variable INNER_TESTSUITEFLAGS may be used.  It will be
+expanded right after the `-k libtool', without separating whitespace,
+so that further limiting of the recursive set of tests is possible.
+For example, to run only the template tests within the max_cmd_len, use
+  gmake check-local TESTSUITEFLAGS="-v -x -k max_cmd_len \
+                     INNER_TESTSUITEFLAGS=',template -v -x'"
+
 If you wish to report test failures to the libtool list, you need to
 send the file `tests/testsuite.log' to the bug report mailing list,
 <address@hidden>.
@@ -165,7 +174,8 @@ For more details about version numbers, see:
     http://www.gnu.org/software/libtool/contribute.html
 
 -- 
-  Copyright (C) 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+  Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009  Free Software
+  Foundation, Inc.
   Written by Gary V. Vaughan, 2004
 
   This file is part of GNU Libtool.
diff --git a/README.alpha b/README.alpha
index 2231630..903fafb 100644
--- a/README.alpha
+++ b/README.alpha
@@ -21,10 +21,9 @@ subject line including the string `[PLATFORM]'.
 =================
 
 If this distribution doesn't work for you, before you report the
-problem, please try upgrading to the latest version from CVS first:
+problem, please try upgrading to the latest version from git first:
 
-  export CVS_RSH=ssh
-  cvs -z3 -d :pserver:address@hidden:/sources/libtool co libtool
+  git clone git://git.savannah.gnu.org/libtool.git
   cd libtool
   ./bootstrap
 
@@ -115,7 +114,8 @@ send the file `tests/testsuite.log' to the bug report 
mailing list,
 <address@hidden>.
 
 -- 
-  Copyright (C) 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+  Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009  Free Software
+  Foundation, Inc.
   Written by Gary V. Vaughan, 2004
 
   This file is part of GNU Libtool.
diff --git a/THANKS b/THANKS
index d1ed846..1094bec 100644
--- a/THANKS
+++ b/THANKS
@@ -104,6 +104,7 @@
   Joel N. Weber II             address@hidden
   Joerg Sonnenberger           address@hidden
   John Bowler                  address@hidden
+  John Wolfe                   address@hidden
   Joseph Beckenbach III                address@hidden
   Karl Berry                   address@hidden
   Kenneth Albanowski           address@hidden
@@ -116,14 +117,17 @@
   Marcel Loose                 address@hidden
   Mark Kettenis                        address@hidden
   Michael Haubenwallner                address@hidden
+  Mike Gorchak                 address@hidden
   Mike Frysinger               address@hidden
   Nix                          address@hidden
   Olaf Lenz                    address@hidden
   Olly Betts                   address@hidden
   Patrick Welche               address@hidden
+  Paul Biggar                  address@hidden
   Paul Eggert                  address@hidden
   Peter Eisentraut             address@hidden
   Peter Jeremy                 address@hidden
+  Peter Kjellerstedt           address@hidden
   Rainer Orth                  address@hidden
   Rainer Tammer                        address@hidden
   Ralf Menzel                  address@hidden
@@ -133,6 +137,7 @@
   Roberto Bagnara              address@hidden
   Roland Mainz                 address@hidden
   Roumen Petrov                        address@hidden
+  Rudolf Leitgeb               address@hidden
   Sam Thursfield               address@hidden
   Sebastian Wilhelmi           address@hidden
   Simon Josefsson              address@hidden
diff --git a/bootstrap b/bootstrap
index f8b44c1..0b3648f 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,7 @@
 #! /bin/sh
-# bootstrap -- Helps bootstrapping libtool, when checked out from CVS.
+# bootstrap -- Helps bootstrapping libtool, when checked out from repository.
 #
-#   Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc,
+#   Copyright (C) 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc,
 #   Mritten by Gary V. Vaughan, 2003
 #
 #   This file is part of GNU Libtool.
@@ -47,7 +47,7 @@ export SHELL
 case $1 in
 --help|-h*)
   cat <<EOF
-`echo $0 | sed 's,^.*/,,g'`: This script is designed to bootstrap a fresh CVS 
checkout
+`echo $0 | sed 's,^.*/,,g'`: This script is designed to bootstrap a fresh 
repository checkout
 of Libtool.  Useful environment variable settings:
   reconfdirs='. libltdl'     Do not bootstrap the old test suite.
   WORKING_LIBOBJ_SUPPORT=:   Declare that you have fixed LIBOBJDIR support
@@ -149,7 +149,7 @@ rm -f Makefile
 # Make a dummy libtoolize script for autoreconf:
 cat > $auxdir/libtoolize <<'EOF'
 #! /bin/sh
-# This is a dummy file for bootstrapping CVS libtool.
+# This is a dummy file for bootstrapping libtool.
 echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'
 exit 0
 EOF
diff --git a/clcommit.m4sh b/clcommit.m4sh
index 73719cc..351076a 100644
--- a/clcommit.m4sh
+++ b/clcommit.m4sh
@@ -5,7 +5,7 @@ AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])dnl
 # Written by Gary V. Vaughan <address@hidden>
 # and Alexandre Oliva <address@hidden>
 
-# Copyright (C) 1999, 2000, 2004, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2004, 2006, 2008, 2009 Free Software Foundation, 
Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -52,7 +52,7 @@ AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])dnl
 
 # This script eases checking in changes to git-maintained projects
 # with ChangeLog files.  It will check that there have been no
-# conflicting commits in the CVS repository and print which files it
+# conflicting commits in the git repository and print which files it
 # is going to commit to stderr.  A list of files to compare and to
 # check in can be given in the command line.  If it is not given, all
 # files in the current working directory are considered for check in.
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 6307530..624f414 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -26,7 +26,7 @@
 @ifnottex
 This file documents GNU Libtool @value{VERSION}
 
-Copyright (C) 1996-2008 Free Software Foundation, Inc.
+Copyright (C) 1996-2009 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3
@@ -53,7 +53,7 @@ identical to this one except for the removal of this paragraph
 
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 2008 Free Software Foundation, Inc.
+Copyright @copyright{} 2009 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the @sc{gnu} Free Documentation License, Version 1.3
@@ -1162,8 +1162,16 @@ operation mode, and exit.
 Use @var{mode} as the operation mode.  When using libtool from the
 command line, you can give just @var{mode} (or a unique abbreviation
 of it) as the first argument as a shorthand for the full
address@hidden@var{mode}}.
address@hidden@var{mode}}.  For example, the following are equivalent:
 
address@hidden
+$ @kbd{libtool --mode=execute --dry-run gdb prog.exe}
+$ @kbd{libtool        execute --dry-run gdb prog.exe}
+$ @kbd{libtool        exe     --dry-run gdb prog.exe}
+$ @kbd{libtool        e       --dry-run gdb prog.exe}
address@hidden example
+
address@hidden
 @var{mode} must be set to one of the following:
 
 @table @option
@@ -4526,7 +4534,7 @@ unnecessary but makes it easy to forget to upgrade 
@file{acinclude.m4}
 if you move to a different release of libltdl.
 @c
 }.  Having made the macros available, you must add a call to the
address@hidden macro (after the call to @samp{LT_INIT}
address@hidden macro (after the call to @samp{LT_INIT})
 to your package's @file{configure.ac} to
 perform the configure time checks required to build the library
 correctly.  Unfortunately, this method has problems if you then try to
@@ -5056,7 +5064,7 @@ static and shared libraries, @file{depdemo-static.test} 
builds only static
 libraries (@option{--disable-shared}), and @file{depdemo-shared.test} builds
 only shared libraries (@option{--disable-static}).
 @file{depdemo-nofast.test} configures @file{depdemo/libtool} to
-disable the fast-install mode (@option{--enable-fast-install=no}.
+disable the fast-install mode (@option{--enable-fast-install=no}).
 
 @item mdemo-conf.test
 @itemx mdemo-exec.test
@@ -6028,7 +6036,7 @@ linking.
 
 @defvar macro_version
 @defvarx macro_revision
-The release and CVS revision from which the libtool.m4 macros were
+The release and revision from which the libtool.m4 macros were
 taken.  This is used to ensure that macros and @code{ltmain.sh}
 correspond to the same Libtool version.
 @end defvar
@@ -6227,7 +6235,7 @@ trick$ chmod +x libtool
 trick$ libtool --version
 ltmain.sh (GNU @@PACKAGE@@@@TIMESTAMP@@) @@VERSION@@
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 trick$
diff --git a/libltdl/config/getopt.m4sh b/libltdl/config/getopt.m4sh
index 8cf99de..d0f92f6 100644
--- a/libltdl/config/getopt.m4sh
+++ b/libltdl/config/getopt.m4sh
@@ -1,6 +1,7 @@
 m4_if([getopt.m4sh -- getopt helper functions           -*- Autoconf -*-
 
-   Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+   Foundation, Inc.
    Written by Gary V. Vaughan, 2004
 
    This file is part of GNU Cvs-utils.
@@ -35,7 +36,15 @@ M4SH_VERBATIM([[
 # Echo version message to standard output and exit.
 func_version ()
 {
-    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+    $SED -n '/(C)/!b go
+       :more
+       /\./!{
+         N
+         s/\n# //
+         b more
+       }
+       :go
+       /^# '$PROGRAM' (GNU /,/# warranty; / {
         s/^# //
        s/^# *$//
         s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 799299a..392145a 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -4,7 +4,8 @@ m4_divert_push([SCRIPT])# @configure_input@
 # libtool (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
 # Written by Gordon Matzigkeit <address@hidden>, 1996
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 
2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -59,7 +60,8 @@ m4_divert_push([SCRIPT])# @configure_input@
 #         link               create a library or an executable
 #         uninstall          remove libraries from an installed directory
 #
-# MODE-ARGS vary depending on the MODE.
+# MODE-ARGS vary depending on the MODE.  When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
 #
 # When reporting a bug, please describe a test case to reproduce it and
@@ -1367,7 +1369,7 @@ func_mode_execute ()
     for file
     do
       case $file in
-      -*) ;;
+      -* | *.la | *.lo ) ;;
       *)
        # Do a test to see if this is really a libtool program.
        if func_ltwrapper_script_p "$file"; then
@@ -1523,6 +1525,10 @@ func_mode_install ()
     func_quote_for_eval "$arg"
     install_prog="$install_prog$func_quote_for_eval_result"
     install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
 
     # We need to accept at least all the BSD install flags.
     dest=
@@ -1545,10 +1551,9 @@ func_mode_install ()
       case $arg in
       -d) isdir=yes ;;
       -f)
-       case " $install_prog " in
-       *[\\\ /]cp\ *) ;;
-       *) prev=$arg ;;
-       esac
+       if $install_cp; then :; else
+         prev=$arg
+       fi
        ;;
       -g | -m | -o)
        prev=$arg
@@ -1590,8 +1595,10 @@ func_mode_install ()
       func_fatal_help "the \`$prev' option requires an argument"
 
     if test -n "$install_override_mode" && $no_mode; then
-      func_quote_for_eval "$install_override_mode"
-      install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
+      if $install_cp; then :; else
+       func_quote_for_eval "$install_override_mode"
+       install_shared_prog="$install_shared_prog -m 
$func_quote_for_eval_result"
+      fi
     fi
 
     if test -z "$files"; then
@@ -2772,6 +2779,9 @@ func_emit_cwrapperexe_src ()
 */
 EOF
            cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef _MSC_VER
@@ -5676,6 +5686,7 @@ func_mode_link ()
          if test "$link_all_deplibs" != no; then
            # Add the search paths of all dependency libraries
            for deplib in $dependency_libs; do
+             path=
              case $deplib in
              -L*) path="$deplib" ;;
              *.la)
@@ -7012,17 +7023,19 @@ EOF
                  # command to the queue.
                  if test "$k" -eq 1 ; then
                    # The first file doesn't have a previous command to add.
-                   eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+                   reload_objs=$objlist
+                   eval concat_cmds=\"$reload_cmds\"
                  else
                    # All subsequent reloadable object files will link in
                    # the last one created.
-                   eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist 
$last_robj~\$RM $last_robj\"
+                   reload_objs="$objlist $last_robj"
+                   eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM 
$last_robj\"
                  fi
                  last_robj=$output_objdir/$output_la-${k}.$objext
                  func_arith $k + 1
                  k=$func_arith_result
                  output=$output_objdir/$output_la-${k}.$objext
-                 objlist=$obj
+                 objlist=" $obj"
                  func_len " $last_robj"
                  func_arith $len0 + $func_len_result
                  len=$func_arith_result
@@ -7032,7 +7045,8 @@ EOF
              # reloadable object file.  All subsequent reloadable object
              # files will link in the last one created.
              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist 
$last_robj\"
+             reload_objs="$objlist $last_robj"
+             eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
              if test -n "$last_robj"; then
                eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
              fi
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
index 6e19599..80b5675 100644
--- a/libltdl/ltdl.c
+++ b/libltdl/ltdl.c
@@ -1614,6 +1614,9 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
 {
   lt_dlhandle  handle  = 0;
   int          errors  = 0;
+  const char * saved_error     = 0;
+
+  LT__GETERROR (saved_error);
 
   /* Can't have symbols hidden and visible at the same time!  */
   if (advise && advise->is_symlocal && advise->is_symglobal)
@@ -1650,6 +1653,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
 
 #if defined(LT_MODULE_EXT)
       /* Try appending SHLIB_EXT.   */
+      LT__SETERRORSTR (saved_error);
       errors = try_dlopen (&handle, filename, shlib_ext, advise);
 
       /* As before, if the file was found but loading failed, return now
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index cec2aaa..6c42147 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -2987,8 +2987,8 @@ case $host_os in
     fi
     ;;
 esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
@@ -3274,7 +3274,19 @@ if test "$lt_cv_path_NM" != "no"; then
   NM="$lt_cv_path_NM"
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
   AC_SUBST([DUMPBIN])
   if test "$DUMPBIN" != ":"; then
     NM="$DUMPBIN"
@@ -5504,6 +5516,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6458,6 +6472,10 @@ if test "$_lt_caught_CXX_error" != yes; then
           CC*)
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib 
$libobjs $deplibs $compiler_flags'
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G 
${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs 
$compiler_flags'
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+             '"$_LT_TAGVAR(old_archive_cmds, $1)"
+           _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+             '"$_LT_TAGVAR(reload_cmds, $1)"
            ;;
          *)
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib 
$libobjs $deplibs $compiler_flags'
@@ -6792,6 +6810,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6935,6 +6955,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -7080,6 +7102,8 @@ _LT_CC_BASENAME([$compiler])
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
 ## CAVEAT EMPTOR:
 ## There is no encapsulation within the following macros, do not change
diff --git a/libltdl/m4/lt~obsolete.m4 b/libltdl/m4/lt~obsolete.m4
index 637bb20..b60bbd2 100644
--- a/libltdl/m4/lt~obsolete.m4
+++ b/libltdl/m4/lt~obsolete.m4
@@ -1,6 +1,6 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
@@ -90,3 +90,5 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],        
[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 m4_ifndef([_LT_AC_LANG_RC_CONFIG],     [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 m4_ifndef([AC_LIBTOOL_CONFIG],         [AC_DEFUN([AC_LIBTOOL_CONFIG])])
 m4_ifndef([_LT_AC_FILE_LTDLL_C],       [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],        
[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],                
[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index 8096440..27f17a7 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -181,7 +181,7 @@ all_pkgltdl_files="COPYING.LIB Makefile Makefile.in 
Makefile.inc Makefile.am REA
       --install|-i)    opt_install=: ;;
 
       --ltdl)          opt_ltdl=:
-                       if test "$#" -gt 0; then
+                       if test "$#" -gt 0; then
                          case $1 in
                            -*) ;;
                            *)  ltdldir=`$ECHO "$1" | $SED 's,/*$,,'`
@@ -194,7 +194,7 @@ all_pkgltdl_files="COPYING.LIB Makefile Makefile.in 
Makefile.inc Makefile.am REA
       --no-warn)       opt_warning=false ;;
 
       --nonrecursive|--non-recursive)
-                       ltdl_mode=nonrecursive
+                       ltdl_mode=nonrecursive
                        ;;
 
       --quiet|--automake|-q) # --automake is for 1.5 compatibility
@@ -310,7 +310,7 @@ func_copy_cb ()
     copy_return_status=1
 
     # Libtool is probably misinstalled if this happens:
-    test -f "$my_srcdir/$my_file" || 
+    test -f "$my_srcdir/$my_file" ||
         func_fatal_error "\`$my_file' not found in \`$my_srcdir'"
 
     case $opt_verbose in
@@ -374,7 +374,7 @@ func_copy_some_files ()
         if test "X$my_copy_cb" = Xfunc_copy_cb; then
          $opt_force || if test -f "$my_destdir/$my_filename"; then
            $opt_quiet || func_echo_once "$my_msg_var"
-           $opt_quiet \
+           $opt_quiet \
              || func_error "\`$my_destdir/$my_filename' exists: use \`--force' 
to overwrite"
            continue
          fi
@@ -482,12 +482,12 @@ func_scan_files ()
         s,^.*AC_REQUIRE(.*$,,; s,^.*m4@&address@hidden(.*$,,;
        s,^.*m4@&address@hidden(.*$,,
        s,^.*A[CU]_DEFUN(.*$,,; s,^.*m4@&address@hidden(.*$,,
-       /AC_CONFIG_AUX_DIR(/ {
-           s,^.*AC_CONFIG_AUX_DIR([[   ]*\([^])]*\).*$,ac_auxdir=\1,
+       /AC_CONFIG_AUX_DIR(/ {
+           s,^.*AC_CONFIG_AUX_DIR([[    ]*\([^])]*\).*$,ac_auxdir=\1,
            p
         }
-       /AC_CONFIG_MACRO_DIR(/ {
-           s,^.*AC_CONFIG_MACRO_DIR([[         ]*\([^])]*\).*$,ac_macrodir=\1,
+       /AC_CONFIG_MACRO_DIR(/ {
+           s,^.*AC_CONFIG_MACRO_DIR([[  ]*\([^])]*\).*$,ac_macrodir=\1,
            p
         }
        /_LT_CONFIG_LTDL_DIR(/d
@@ -502,14 +502,14 @@ func_scan_files ()
        }
        /the.*option into.*LT_INIT.*parameter/d
        /\@<:@LT_INIT/d
-       /LT_INIT/                {
+       /LT_INIT/                {
            s,^.*$,seen_libtool=:,
            p
        }
        /\@<:@LTDL_INIT/d
        /LTDL_INIT/          {
-           s,^.*LTDL_INIT([[   ]*\([^])]*\).*$,ltdl_options="\1",
-           s,^.*LTDL_INIT[     ]*$,seen_ltdl=:,
+           s,^.*LTDL_INIT([[    ]*\([^])]*\).*$,ltdl_options="\1",
+           s,^.*LTDL_INIT[      ]*$,seen_ltdl=:,
            p
        }
        /LT_WITH_LTDL/       {
@@ -633,8 +633,8 @@ func_scan_files ()
     # Hunt for ACLOCAL_AMFLAGS in `Makefile.am' for a `-I' argument.
 
     my_sed_aclocal_flags='
-        /^[    ]*ACLOCAL_[A-Z_]*FLAGS[         ]*=/ {
-           s,^[^=]*=[  ]*\(.*\), \1,
+        /^[     ]*ACLOCAL_[A-Z_]*FLAGS[         ]*=/ {
+           s,^[^=]*=[   ]*\(.*\), \1,
            q
        }
        d'
@@ -699,7 +699,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
        }
@@ -980,7 +980,7 @@ func_ltmain_update ()
     $opt_debug
     my_sed_ltmain='
        /^package_revision='\''*[0-9][1-9.]*'\''*/ {
-           s,^package_revision='\''*\([0-9.]*\)'\''*[  ]*$,\1,
+           s,^package_revision='\''*\([0-9.]*\)'\''*[   ]*$,\1,
            p
        }
        d'
@@ -1499,7 +1499,7 @@ func_check_macros ()
       else
         func_echo "Consider adding \`-I $macrodir' to ACLOCAL_AMFLAGS in 
Makefile.am."
       fi
-    fi 
+    fi
 
     # Don't trace for this, we're just checking the user didn't invoke it
     # directly from configure.ac.
diff --git a/tests/cmdline_wrap.at b/tests/cmdline_wrap.at
index 0c47db8..13edabc 100644
--- a/tests/cmdline_wrap.at
+++ b/tests/cmdline_wrap.at
@@ -1,6 +1,6 @@
 # cmdline_wrap.at -- run tests with low max_cmd_len           -*- Autotest -*-
 
-#   Copyright (C) 2007 Free Software Foundation, Inc.
+#   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2007
 #
 #   This file is part of GNU Libtool.
@@ -40,7 +40,7 @@ mkdir tests
 cd tests
 INNER_TESTSUITEFLAGS="$INNER_TESTSUITEFLAGS abs_top_srcdir=$abs_top_srcdir \
   abs_builddir=$abs_builddir"
-AT_CHECK([$CONFIG_SHELL $abs_srcdir/testsuite -k libtool 
$INNER_TESTSUITEFLAGS],
+AT_CHECK([$CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS],
         [], [ignore], [ignore])
 
 AT_CLEANUP
diff --git a/tests/cwrapper.at b/tests/cwrapper.at
index ce4572e..42f8d0f 100644
--- a/tests/cwrapper.at
+++ b/tests/cwrapper.at
@@ -58,6 +58,7 @@ orig_LIBTOOL=$LIBTOOL
 for restrictive_flags in '-Wall -Werror' '-std=c89 -Wall -Werror' '-std=c99 
-Wall -Werror'; do
   CFLAGS="$orig_CFLAGS $restrictive_flags"
   sed "s/LTCFLAGS=.*/&' $restrictive_flags'/" < "$orig_LIBTOOL" > ./libtool
+  chmod +x libtool
   LIBTOOL=./libtool
 
   # make sure $restrictive_flags do not cause a failure
diff --git a/tests/defs.m4sh b/tests/defs.m4sh
index 27c6f77..58296da 100644
--- a/tests/defs.m4sh
+++ b/tests/defs.m4sh
@@ -2,7 +2,7 @@ AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])dnl
 # @configure_input@
 # defs -- Defines for Libtool testing environment.
 #
-#   Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software
+#   Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software
 #   Foundation, Inc.
 #   Written by Gord Matzigkeit, 1996
 #   Rewritten by Gary V. Vaughan, 2003
@@ -102,7 +102,7 @@ func_get_config ()
     my_build_regex=false
   fi
   my_first=:
-  
+
   for my_varname in $my_varname_list; do
     if $my_build_regex; then
       $my_first || my_regex="$my_regex|"
@@ -247,9 +247,7 @@ func_make ()
     $opt_debug
     my_args=${1+"$@"}
     func_dirname_and_basename "`pwd`"
-    my_dir=$func_basename_result
-
-    func_msg "Running \`$MAKE $my_args' in $my_dir"
+    func_msg "Running \`$MAKE $my_args' in $func_basename_result"
 
     eval $MAKE $my_args || exit $EXIT_FAIL
 }
@@ -288,7 +286,8 @@ func_make_uninstall ()
 func_exec_init ()
 {
     $opt_debug
-    func_msg "Executing $1 programs in $my_dir"
+    func_dirname_and_basename "`pwd`"
+    func_msg "Executing $1 programs in $func_basename_result"
 
     # Windows hosts search for dlls in the command path
     PATH=$prefix/lib:$PATH
@@ -359,4 +358,3 @@ func_msg "Running $progname"
 # sh-indentation:2
 # End:
 ]])
-
diff --git a/tests/duplicate_members.at b/tests/duplicate_members.at
index afa9d20..4f054f7 100755
--- a/tests/duplicate_members.at
+++ b/tests/duplicate_members.at
@@ -1,6 +1,6 @@
 # duplicate_members.at -- duplicate members in archive tests  -*- Autotest -*-
 
-#   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
 #   Written by Alexandre Oliva & Peter O'Gorman, 2005
 #
 #   This file is part of GNU Libtool.
@@ -22,7 +22,6 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ####
 
-AT_BANNER([Testing libtool functions.])
 AT_SETUP([duplicate members in archive tests])
 AT_KEYWORDS([libtool])
 
@@ -62,13 +61,16 @@ do
   $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o $a/a.lo $a/a.c
 done
 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libc0.la 6/a.lo
-$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 2/a.lo 
3/a.lo 4/a.lo 5/a.lo libc0.la
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la ]dnl
+        [1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la], [], [ignore], [ignore])
 
 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
-$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo 
libconv.la -rpath /notexist
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la ]dnl
+        [ bar.lo libconv.la -rpath /notexist], [], [ignore], [ignore])
 
 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c
-$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo 
./libbar.la
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT 
]dnl
+        [main.lo ./libbar.la], [], [ignore], [ignore])
 
 LT_AT_EXEC_CHECK([./main],[0],[ignore],[ignore])
 
diff --git a/tests/execute-mode.at b/tests/execute-mode.at
index fc38ece..0fba29c 100644
--- a/tests/execute-mode.at
+++ b/tests/execute-mode.at
@@ -210,4 +210,11 @@ do
   arg1=
 done
 
+# Check that .la files are not transformed by the wrapper searching loop.
+AT_CHECK([$LIBTOOL --mode=execute echo ./main liba.lo libfakelib.la], [], 
[stdout])
+# This could be .libs/lt-main or similar (or just plain `main').
+AT_CHECK([grep main stdout], [], [ignore])
+AT_CHECK([grep liba.lo stdout], [], [ignore])
+AT_CHECK([grep libfakelib.la stdout], [], [ignore])
+
 AT_CLEANUP
diff --git a/tests/fail.at b/tests/fail.at
index 088ad9e..fb05f8c 100644
--- a/tests/fail.at
+++ b/tests/fail.at
@@ -1,6 +1,6 @@
 # fail.at -- test that libtool really fail when it should     -*- Autotest -*-
 #
-#   Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2005
 #
 #   This file is part of GNU Libtool.
@@ -64,13 +64,26 @@ case $pic_mode in default | yes)
   ;;
 esac
 
-# program creation failure
-echo 'int not_main(void) { return 0; }' > a.c
+# program creation failure.
+# We can't rely on `main' not being present: the QNX linker
+# won't error out in that case, although the resulting binary won't work.
+# So we provoke a link failure due to an unresolved symbol, and require
+# libtool to fail only if the link without libtool would have failed, too.
+cat > a.c <<'EOF'
+extern int nonexistent_function (void);
+int main (void)
+{
+  return nonexistent_function ();
+}
+EOF
 $CC $CPPFLAGS $CFLAGS -c a.c
-FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT])
-AT_CHECK([{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x 
a$EXEEXT; }], [1])
-FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT 
-static])
-AT_CHECK([{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x 
a$EXEEXT; }], [1])
+if $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then :; else
+  rm -f a a$EXEEXT
+  FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT])
+  AT_CHECK([{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x 
a$EXEEXT; }], [1])
+  FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT 
-static])
+  AT_CHECK([{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x 
a$EXEEXT; }], [1])
+fi
 
 # shared library creation failure
 case $build_libtool_libs in yes)
diff --git a/tests/help.at b/tests/help.at
new file mode 100644
index 0000000..3460a2b
--- /dev/null
+++ b/tests/help.at
@@ -0,0 +1,90 @@
+# help.at -- standard command line options          -*- Autotest -*-
+#
+#   Copyright (C) 2009 Free Software Foundation, Inc.
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+AT_BANNER([Testing libtool functions.])
+
+AT_SETUP([standard command line options])
+AT_KEYWORDS([libtool])
+AT_KEYWORDS([libtoolize])
+
+AT_CHECK([$LIBTOOLIZE --help], [], [ignore])
+AT_CHECK([$LIBTOOLIZE --version], [], [stdout])
+AT_CHECK([grep 'Copyright.*Free Software Foundation' stdout], [], [ignore])
+AT_CHECK([$LIBTOOL --help], [], [ignore])
+AT_CHECK([$LIBTOOL --help-all], [], [ignore])
+AT_CHECK([$LIBTOOL --version], [], [stdout])
+AT_CHECK([grep 'Copyright.*Free Software Foundation' stdout], [], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([mode short-hands])
+
+AT_DATA([a.c],
+[[int a () { return 0; }
+]])
+
+AT_DATA([main.c],
+[[extern int a ();
+int main () { return a (); }
+]])
+
+inst=`pwd`/inst
+libdir=$inst/lib
+bindir=$inst/bin
+mkdir $inst $libdir $bindir
+
+AT_CHECK([$LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo ]dnl
+        [-no-undefined -rpath $libdir], [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo ]dnl
+        [liba.la], [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL execute --dry-run ./main$EXEEXT],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL exe --dry-run ./main$EXEEXT],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL e --dry-run ./main$EXEEXT],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL install cp liba.la $libdir],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL i cp main$EXEEXT $bindir],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL finish $libdir],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL f $libdir],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL uninstall rm -f $libdir/liba.la],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL u rm -f $bindir/main$EXEEXT],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL clean rm -f main$EXEEXT],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL cl liba.la],
+        [], [ignore], [ignore])
+
+AT_CLEANUP
diff --git a/tests/install.at b/tests/install.at
index f77970e..5e15555 100644
--- a/tests/install.at
+++ b/tests/install.at
@@ -1,6 +1,6 @@
 # install.at -- install mode tests             -*- Autotest -*-
 #
-#   Copyright (C) 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2008
 #
 #   This file is part of GNU Libtool.
@@ -30,7 +30,7 @@ AT_KEYWORDS([libtool])
 
 AT_CHECK([$LIBTOOL --features | grep 'enable shared libraries' || exit 77],
         [], [ignore])
-sed 's,^\(install_override_mode=\).*,&755,' < $LIBTOOL > ./libtool
+sed 's,^\(install_override_mode\)=.*,\1=755,' < $LIBTOOL > ./libtool
 LIBTOOL=./libtool
 chmod a+rx $LIBTOOL
 
@@ -41,10 +41,10 @@ echo 'int a () { return 0; }' > a.c
 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
 AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo ]dnl
         [-rpath $inst -no-undefined], [], [ignore], [ignore])
-AT_CHECK([$LIBTOOL --mode=install $INSTALL liba.la $inst],
+AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL liba.la $inst],
         [], [stdout], [ignore])
 AT_CHECK([grep ' -m 755' stdout], [], [ignore])
-AT_CHECK([$LIBTOOL --mode=install $INSTALL -m 644 liba.la $inst],
+AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst],
         [], [stdout], [ignore])
 AT_CHECK([grep ' -m 755' stdout], [], [ignore])
 AT_CHECK([grep ' -m 644.*liba.la' stdout], [], [ignore])
diff --git a/tests/localization.at b/tests/localization.at
index 92b19ac..119b38d 100644
--- a/tests/localization.at
+++ b/tests/localization.at
@@ -43,15 +43,13 @@ AT_CHECK([$CC $CPPFLAGS $CFLAGS -c b.c || exit 77], [], 
[stdout], [stderr])
 
 # Find out about expected output.
 AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c || exit 1], [1], [stdout], [stderr])
-LT_AT_UNIFY_NL([stdout], [expected-stdout])
-LT_AT_UNIFY_NL([stderr], [expected-stderr])
+LT_AT_NORMALIZE_COMPILER_OUTPUT([stdout], [expected-stdout])
+LT_AT_NORMALIZE_COMPILER_OUTPUT([stderr], [expected-stderr])
 AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || 
exit 1],
         [1], [stdout], [stderr])
-LT_AT_UNIFY_NL([stderr])
-AT_CHECK([diff expected-stderr stderr])
-LTBASE=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
-grep -v "^$LTBASE: compile" stdout > libtool-stdout
-LT_AT_UNIFY_NL([libtool-stdout])
+LT_AT_NORMALIZE_COMPILER_OUTPUT([stdout], [libtool-stdout])
+LT_AT_NORMALIZE_COMPILER_OUTPUT([stderr], [libtool-stderr])
+AT_CHECK([diff expected-stderr libtool-stderr])
 AT_CHECK([diff expected-stdout libtool-stdout])
 
 # check that we get our quoting right.
diff --git a/tests/lt_dlopen.at b/tests/lt_dlopen.at
new file mode 100644
index 0000000..0aae2f8
--- /dev/null
+++ b/tests/lt_dlopen.at
@@ -0,0 +1,103 @@
+# lt_dlopen.at -- test libltdl functionality                -*- Autotest -*-
+#
+#   Copyright (C) 2009 Free Software Foundation, Inc.
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+AT_SETUP([lt_dlopen error messages])
+AT_KEYWORDS([libltdl])
+
+# The bug is not fixed:
+AT_XFAIL_IF([:])
+
+# This test only works if the system allows undefined symbols.
+eval `$LIBTOOL --config | grep '^allow_undefined_flag='`
+AT_CHECK([test unsupported != "$allow_undefined_flag" || exit 77])
+
+AT_DATA([main.c],
+[[#include <ltdl.h>
+#include <stdio.h>
+
+int
+main (int argc, char* argv[])
+{
+  int err = 0;
+  lt_dlhandle plugin_handle;
+
+  if (argc < 2)
+    {
+      fprintf (stderr, "usage: %s plugin\n", argv[0]);
+      return 1;
+    }
+
+  lt_dlinit ();
+  plugin_handle = lt_dlopenext (argv[1]);
+  if (NULL != plugin_handle)
+    {
+      printf ("plugin opened successfully!\n");
+      lt_dlclose (plugin_handle);
+    }
+  else
+    {
+      printf ("plugin failed to open: %s\n", lt_dlerror());
+      err = 1;
+    }
+  lt_dlexit ();
+  return err;
+}
+]])
+
+AT_DATA([good-plugin.c],
+[[int foo;
+int *i = &foo;
+]])
+
+AT_DATA([missing-symbol-plugin.c],
+[[/* On systems that allow undefined symbols, this will compile,
+     but the symbol "foo" won't be found at runtime */
+extern int foo;
+int *i = &foo;
+]])
+
+: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
+: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
+
+CPPFLAGS="$LTDLINCL $CPPFLAGS"
+inst=`pwd`/inst
+libdir=$inst/lib
+
+AT_CHECK([$CC $CPPFLAGS $CFLAGS -c main.c], [], [ignore], [ignore])
+for file in good-plugin.c missing-symbol-plugin.c; do
+  AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file],
+          [], [ignore], [ignore])
+done
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath 
$libdir ]dnl
+        [-module -avoid-version good-plugin.lo], [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o 
missing-symbol-plugin.la -rpath $libdir]dnl
+        [-module -avoid-version missing-symbol-plugin.lo], [], [ignore], 
[ignore])
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT 
main.$OBJEXT ]dnl
+        [-dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL],
+        [], [ignore], [ignore])
+
+LT_AT_EXEC_CHECK([./main], [], [ignore], [ignore], [./good-plugin.la])
+LT_AT_EXEC_CHECK([./main], [1], [ignore], [stderr], 
[./missing-symbol-plugin.la])
+AT_CHECK([grep 'missing symbol' stderr], [], [ignore])
+
+AT_CLEANUP
diff --git a/tests/lt_dlopenext.at b/tests/lt_dlopenext.at
new file mode 100644
index 0000000..3d148a9
--- /dev/null
+++ b/tests/lt_dlopenext.at
@@ -0,0 +1,242 @@
+# lt_dlopenext.at -- test libltdl functionality             -*- Autotest -*-
+#
+#   Copyright (C) 2009 Free Software Foundation, Inc.
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+AT_SETUP([lt_dlopenext error messages])
+AT_KEYWORDS([libltdl])
+
+# This test requires shared library support.
+AT_CHECK([$LIBTOOL --features | grep 'enable shared libraries' || exit 77],
+        [], [ignore])
+
+prefix=`pwd`/inst
+libdir=$prefix/lib
+bindir=$prefix/bin
+mkdir $prefix $libdir $bindir
+
+# This code is copied from the Autobook:
+# <http://sources.redhat.com/autobook/autobook/autobook_169.html>
+# so if it needs changes, be sure to notify the Autobook authors
+# about them.
+
+AT_DATA([simple-module.c],
+[[
+#include <stdio.h>
+
+int
+run (const char *argument)
+{
+  printf ("Hello, %s!\n", argument);
+  return 0;
+}
+]])
+
+AT_DATA([ltdl-loader.c],
+[[
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef EXIT_FAILURE
+#  define EXIT_FAILURE        1
+#  define EXIT_SUCCESS        0
+#endif
+
+#include <limits.h>
+#ifndef PATH_MAX
+#  define PATH_MAX 255
+#endif
+
+#include <string.h>
+#include <ltdl.h>
+
+#ifndef MODULE_PATH_ENV
+#  define MODULE_PATH_ENV        "MODULE_PATH"
+#endif
+
+typedef int entrypoint (const char *argument);
+
+/* Save and return a copy of the dlerror() error  message,
+   since the next API call may overwrite the original. */
+static char *dlerrordup (char *errormsg);
+
+int
+main (int argc, const char *argv[])
+{
+  char *errormsg = NULL;
+  lt_dlhandle module = NULL;
+  entrypoint *run = NULL;
+  int errors = 0;
+
+  if (argc != 3)
+    {
+      fprintf (stderr, "USAGE: main MODULENAME ARGUMENT\n");
+      exit (EXIT_FAILURE);
+    }
+
+  /* Initialise libltdl. */
+  errors = lt_dlinit ();
+
+  /* Set the module search path. */
+  if (!errors)
+    {
+      const char *path = getenv (MODULE_PATH_ENV);
+
+      if (path != NULL)
+        errors = lt_dlsetsearchpath (path);
+    }
+
+  /* Load the module. */
+  if (!errors)
+    module = lt_dlopenext (argv[1]);
+
+  /* Find the entry point. */
+  if (module)
+    {
+      run = (entrypoint *) lt_dlsym (module, "run");
+
+      /* In principle, run might legitimately be NULL, so
+         I don't use run == NULL as an error indicator
+         in general. */
+      errormsg = dlerrordup (errormsg);
+      if (errormsg != NULL)
+        {
+          errors = lt_dlclose (module);
+          module = NULL;
+        }
+    }
+  else
+    errors = 1;
+
+  /* Call the entry point function. */
+  if (!errors)
+    {
+      int result = (*run) (argv[2]);
+      if (result < 0)
+        errormsg = strdup ("module entry point execution failed");
+      else
+        printf ("\t=> %d\n", result);
+    }
+
+  /* Unload the module, now that we are done with it. */
+  if (!errors)
+    errors = lt_dlclose (module);
+
+  if (errors)
+    {
+      /* Diagnose the encountered error. */
+      errormsg = dlerrordup (errormsg);
+
+      if (!errormsg)
+        {
+          fprintf (stderr, "%s: dlerror() failed.\n", argv[0]);
+          return EXIT_FAILURE;
+        }
+    }
+
+  /* Finished with ltdl now. */
+  if (!errors)
+    if (lt_dlexit () != 0)
+      errormsg = dlerrordup (errormsg);
+
+  if (errormsg)
+    {
+      fprintf (stderr, "%s: %s.\n", argv[0], errormsg);
+      free (errormsg);
+      exit (EXIT_FAILURE);
+    }
+
+  return EXIT_SUCCESS;
+}
+
+/* Be careful to save a copy of the error message,
+   since the  next API call may overwrite the original. */
+static char *
+dlerrordup (char *errormsg)
+{
+  char *error = (char *) lt_dlerror ();
+  if (error && !errormsg)
+    errormsg = strdup (error);
+  return errormsg;
+}
+]])
+
+: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
+: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
+
+CPPFLAGS="$LTDLINCL $CPPFLAGS"
+LDFLAGS="$LDFLAGS -no-undefined"
+
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la ]dnl
+        [simple-module.lo -rpath $libdir -module -avoid-version],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c ltdl-loader.c],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT ]dnl
+        [ltdl-loader.$OBJEXT -dlopen self $LIBLTDL],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=install cp simple-module.la 
$libdir/simple-module.la], [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=clean rm -f simple-module.la], [], [ignore], 
[ignore])
+
+# Try finding the module with and without the .la file, with absolute
+# path, relative path, or one of the path variables.  Do not override
+# $PATH for w32, see shlibpath.at for the hacks this requires.
+#
+# Finding the module without the .la file will not work if MODULE_EXT
+# aka. shared_ext is empty.
+
+eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shrext_cmds)='`
+
+module=no
+eval shared_ext=\"$shrext_cmds\"
+if test -n "$shared_ext"; then
+  have_lafile="with without"
+else
+  have="with"
+fi
+
+if test "$shlibpath_var" = PATH; then
+  $unset shlibpath_var || shlibpath_var=
+fi
+
+for lafile in $have_lafile; do
+  if test $lafile = without; then
+    rm $libdir/simple-module.la
+  fi
+
+  for dir in inst/lib "$libdir"; do
+    LT_AT_EXEC_CHECK([./ltdl-loader], [], [stdout], [ignore],
+                    [$dir/simple-module World])
+    AT_CHECK([grep "Hello, World" stdout], [], [ignore])
+
+    for var in MODULE_PATH LTDL_LIBRARY_PATH $shlibpath_var
+    do
+      eval $var=\$dir
+      export $var
+      LT_AT_EXEC_CHECK([./ltdl-loader], [], [stdout], [ignore],
+                      [simple-module World])
+      AT_CHECK([grep "Hello, World" stdout], [], [ignore])
+      $unset $var || eval $var=
+    done
+  done
+done
+
+AT_CLEANUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 24e8174..e9226ee 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -52,6 +52,12 @@ else
   unset=false
 fi
 : ${mkdir_p="$abs_top_srcdir/libltdl/config/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
+    ;;
+esac
 
 # On AIX, shared libraries remain loaded in memory after use if they
 # are world-readable, until root issues slibclean.  On NFS, this causes
@@ -218,6 +224,20 @@ m4_define([LT_AT_UNIFY_NL],
 esac])
 
 
+# LT_AT_NORMALIZE_COMPILER_OUTPUT(FILE, [RESULT-FILE])
+# ----------------------------------------------------
+# Normalize differences in compiler output stemming from, e.g.,
+# - distcc process numbers,
+# - ccache file location,
+# - newline encoding,
+# - location of the libtool script.
+m4_define([LT_AT_NORMALIZE_COMPILER_OUTPUT],
+[_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
+[sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < $1 > $1.t]
+LT_AT_UNIFY_NL([$1.t], [m4_default([$2], [$1])])[]dnl
+])
+
+
 # LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR],
 #                 [ARGS-OR-STATUS-ADJUST])
 # --------------------------------------------------------------


hooks/post-receive
--
GNU Libtool




reply via email to

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