From MAILER-DAEMON Sat Sep 05 05:17:23 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MjrOc-0008Pr-R3
	for mharc-libtool-commit@gnu.org; Sat, 05 Sep 2009 05:17:22 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MjrOa-0008MZ-8G
	for libtool-commit@gnu.org; Sat, 05 Sep 2009 05:17:20 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MjrOZ-0008LK-Cz
	for libtool-commit@gnu.org; Sat, 05 Sep 2009 05:17:19 -0400
Received: from [199.232.76.173] (port=39172 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MjrOY-0008L1-Ty
	for libtool-commit@gnu.org; Sat, 05 Sep 2009 05:17:18 -0400
Received: from savannah.gnu.org ([199.232.41.3]:35753 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MjrOY-0001at-FA
	for libtool-commit@gnu.org; Sat, 05 Sep 2009 05:17:18 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MjrOX-0000Tm-9Y
	for libtool-commit@gnu.org; Sat, 05 Sep 2009 09:17:17 +0000
Received: from pekberg by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MjrOW-0000TH-Nn
	for libtool-commit@gnu.org; Sat, 05 Sep 2009 09:17:17 +0000
From: "Peter Rosin" <peda@lysator.liu.se>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d1de1d4adaadf5b709c646862e7f649bb9179aea
X-Git-Newrev: c9bbeef468f64064e1d50e39c945df929cbc21d8
Message-Id: <E1MjrOW-0000TH-Nn@cvs.savannah.gnu.org>
Date: Sat, 05 Sep 2009 09:17:16 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-139-gc9bbeef
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 05 Sep 2009 09:17:20 -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  c9bbeef468f64064e1d50e39c945df929cbc21d8 (commit)
      from  d1de1d4adaadf5b709c646862e7f649bb9179aea (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 c9bbeef468f64064e1d50e39c945df929cbc21d8
Author: Peter Rosin <peda@lysator.liu.se>
Date:   Fri Sep 4 22:19:36 2009 +0200

    Make -Wc,FLAG behave like -Xcompiler FLAG in link mode.
    
    * libltdl/config/ltmain.m4sh (func_mode_link): Remove "-Wc,"
    instead of replacing it with "$wl" when linking programs
    through the compiler driver, just as is the case when linking
    libraries.
    * NEWS: Update.
    
    Signed-off-by: Peter Rosin <peda@lysator.liu.se>

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

Summary of changes:
 ChangeLog                  |    9 +++++++++
 NEWS                       |    3 +++
 libltdl/config/ltmain.m4sh |    2 +-
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e38a608..9e5d353 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-04  Peter Rosin  <peda@lysator.liu.se>
+
+	Make -Wc,FLAG behave like -Xcompiler FLAG in link mode.
+	* libltdl/config/ltmain.m4sh (func_mode_link): Remove "-Wc,"
+	instead of replacing it with "$wl" when linking programs
+	through the compiler driver, just as is the case when linking
+	libraries.
+	* NEWS: Update.
+
 2009-08-23  Lennart Poettering  <lennart@poettering.net>  (tiny change)
 
 	Shut up prototype warnings with recent GCC and -Wstrict-prototypes.
diff --git a/NEWS b/NEWS
index 15ed32b..d6a35aa 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,9 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
     extraction of convenience archives with a lock.
   - The Libtool macro files do not contain instances of __oline__ any more,
     easing merges for configure scripts that are added to version control.
+  - Fix ancient bug where "-Wc," was turned into "$wl" (typically "-Wl,")
+    when using the compiler driver to link programs. Now "-Wc," is stripped
+    just as it is when linking libraries through the compiler driver.
 
 * Miscellaneous changes:
 
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 9e4cfdb..4633ff2 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -4299,7 +4299,7 @@ func_mode_link ()
 	for flag in $args; do
 	  IFS="$save_ifs"
           func_quote_for_eval "$flag"
-	  arg="$arg $wl$func_quote_for_eval_result"
+	  arg="$arg $func_quote_for_eval_result"
 	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
 	done
 	IFS="$save_ifs"


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Sun Sep 06 13:35:37 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MkLeL-0001IN-M5
	for mharc-libtool-commit@gnu.org; Sun, 06 Sep 2009 13:35:37 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MkLeK-0001IF-Dp
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 13:35:36 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MkLeJ-0001Hy-5W
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 13:35:35 -0400
Received: from [199.232.76.173] (port=36759 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MkLeJ-0001Hv-0Y
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 13:35:35 -0400
Received: from savannah.gnu.org ([199.232.41.3]:54658 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MkLeI-0004cK-KZ
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 13:35:34 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MkLeI-0002H0-5d
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 17:35:34 +0000
Received: from rwild by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MkLeH-0002GT-MD
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 17:35:34 +0000
From: "Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c9bbeef468f64064e1d50e39c945df929cbc21d8
X-Git-Newrev: 0805518173d95032e22c2832e73724c08ac2d9c7
Message-Id: <E1MkLeH-0002GT-MD@cvs.savannah.gnu.org>
Date: Sun, 06 Sep 2009 17:35:33 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-141-g0805518
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 06 Sep 2009 17:35:36 -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  0805518173d95032e22c2832e73724c08ac2d9c7 (commit)
       via  8c35d797572d3ccef6d1ed6ebc59e679b5b80aa6 (commit)
      from  c9bbeef468f64064e1d50e39c945df929cbc21d8 (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 0805518173d95032e22c2832e73724c08ac2d9c7
Author: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Date:   Sun Sep 6 12:42:34 2009 +0200

    Fix failure test in the presence of --with-pic or -prefer-pic.
    
    * tests/fail.at (Failure tests): Run non-PIC failure test only
    if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
    and also -prefer-pic has not been passed in $CFLAGS.
    * THANKS: Update.
    Report by Donn Washburn.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

commit 8c35d797572d3ccef6d1ed6ebc59e679b5b80aa6
Author: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Date:   Sun Sep 6 09:48:33 2009 +0200

    Add testsuite exposure for passing of compiler and linker flags.
    
    * tests/flags.at (passing flags through libtool): New file, new
    test, for bug fixed in previous commit.
    * Makefile.am (TESTSUITE_AT): Add tests/flags.at.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

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

Summary of changes:
 ChangeLog      |   14 ++++++++
 Makefile.am    |    1 +
 THANKS         |    1 +
 tests/fail.at  |   15 ++++++---
 tests/flags.at |   96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 122 insertions(+), 5 deletions(-)
 create mode 100644 tests/flags.at

diff --git a/ChangeLog b/ChangeLog
index 9e5d353..60bf373 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-09-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Fix failure test in the presence of --with-pic or -prefer-pic.
+	* tests/fail.at (Failure tests): Run non-PIC failure test only
+	if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
+	and also -prefer-pic has not been passed in $CFLAGS.
+	* THANKS: Update.
+	Report by Donn Washburn.
+
+	Add testsuite exposure for passing of compiler and linker flags.
+	* tests/flags.at (passing flags through libtool): New file, new
+	test, for bug fixed in previous commit.
+	* Makefile.am (TESTSUITE_AT): Add tests/flags.at.
+
 2009-09-04  Peter Rosin  <peda@lysator.liu.se>
 
 	Make -Wc,FLAG behave like -Xcompiler FLAG in link mode.
diff --git a/Makefile.am b/Makefile.am
index a18955e..e22fcc2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -455,6 +455,7 @@ TESTSUITE_AT	= tests/testsuite.at \
 		  tests/duplicate_members.at \
 		  tests/duplicate_conv.at \
 		  tests/duplicate_deps.at \
+		  tests/flags.at \
 		  tests/inherited_flags.at \
 		  tests/convenience.at \
 		  tests/link-order.at \
diff --git a/THANKS b/THANKS
index e976ba8..9353885 100644
--- a/THANKS
+++ b/THANKS
@@ -88,6 +88,7 @@
   Daniel Reed			n@ml.org
   Daniel Richard G.		skunk@iSKUNK.ORG
   DJ Delorie			dj@delorie.com
+  Donn Washburn			n5xwb@comcast.net
   Edouard G. Parmelan		Edouard.Parmelan@France.NCR.COM
   Erez Zadok			ezk@shekel.mcl.cs.columbia.edu
   Eric Estievenart		eric@via.ecp.fr
diff --git a/tests/fail.at b/tests/fail.at
index fb05f8c..cec954b 100644
--- a/tests/fail.at
+++ b/tests/fail.at
@@ -50,15 +50,20 @@ FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c])
 AT_CHECK([test -f a.lo], [1])
 
 # non-PIC compile failure
-case $pic_mode in default | yes)
-  case $build_old_libs,$pic_flag in yes,*-DPIC*)
-    AT_DATA([a.c], [[
+case $pic_mode in default | no)
+  case " $CFLAGS " in
+   *\ -prefer-pic\ *) ;;
+   *)
+    case $build_old_libs,$pic_flag in yes,*-DPIC*)
+      AT_DATA([a.c], [[
 #ifndef PIC
   choke me
 #endif
 ]])
-    FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c])
-    AT_CHECK([test -f a.lo], [1])
+      FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c])
+      AT_CHECK([test -f a.lo], [1])
+      ;;
+    esac
     ;;
   esac
   ;;
diff --git a/tests/flags.at b/tests/flags.at
new file mode 100644
index 0000000..3de1fcb
--- /dev/null
+++ b/tests/flags.at
@@ -0,0 +1,96 @@
+# flags.at -- libtool passing of flags             -*- 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([passing flags through libtool])
+AT_KEYWORDS([libtool])
+AT_KEYWORDS([CXX F77 FC])
+
+LDFLAGS="$LDFLAGS -no-undefined"
+eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
+
+AT_DATA([a.c],
+[[int main () { return 0; }
+]])
+
+AT_DATA([a.f],
+[[      program main
+      end
+]])
+
+cp a.c a.cpp
+cp a.f a.f90
+
+# Linker flags are not passed to the archiver, so don't test static libraries.
+if $LIBTOOL --features | grep 'enable shared libraries'; then
+  library_and_module='library.la "module.la -module -avoid-version"'
+else
+  library_and_module=
+fi
+
+for tag in CC CXX F77 FC; do
+  if $LIBTOOL --tag=$tag 2>&1 | grep 'unknown tag'; then
+    continue
+  fi
+  case $tag in
+  CC) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c ;;
+  CXX) compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp;;
+  F77) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.f ;;
+  FC) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.f90 ;;
+  esac
+
+  eval "`$LIBTOOL --tag=$tag --config | $EGREP '^(wl|archive_cmds|reload_cmds)='`"
+
+  AT_CHECK([$LIBTOOL --tag=$tag --mode=compile $compile -c $source],
+	   [], [ignore], [ignore])
+
+  # Linker flags are prefixed with ${wl} iff they are passed to the
+  # compiler driver, instead of directly to the linker.
+  case $archive_cmds in
+  *\$LD*\$linker_flags*) maybe_wl= ;;
+  *) maybe_wl=$wl ;;
+  esac
+
+  for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
+    case $flag in
+    -Wc, | -Xcompiler\ )
+      AT_CHECK([$LIBTOOL -n --tag=$tag --mode=compile $compile ]dnl
+	       [$flag-foo -c $source], [], [stdout], [ignore])
+      AT_CHECK([$FGREP " -foo" stdout], [], [ignore])
+      flag_prefix=
+      ;;
+    -Wl, | -Xlinker\ )
+      flag_prefix=$maybe_wl
+      ;;
+    esac
+
+    eval set program "$library_and_module"
+    for output
+    do
+      AT_CHECK([$LIBTOOL -n --tag=$tag --mode=link $link ]dnl
+	       [-o $output a.lo -rpath /nowhere $flag-foo], [], [stdout], [ignore])
+      AT_CHECK([$FGREP " $flag_prefix-foo" stdout], [], [ignore])
+    done
+  done
+done
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Sun Sep 06 13:38:56 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MkLhX-00039t-U5
	for mharc-libtool-commit@gnu.org; Sun, 06 Sep 2009 13:38:56 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MkLhX-000396-0t
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 13:38:55 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MkLhV-00037n-SK
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 13:38:54 -0400
Received: from [199.232.76.173] (port=57446 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MkLhV-00037c-KJ
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 13:38:53 -0400
Received: from savannah.gnu.org ([199.232.41.3]:54725 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MkLhV-000573-3k
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 13:38:53 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MkLhU-0002RH-It
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 17:38:52 +0000
Received: from rwild by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MkLhU-0002Ql-6e
	for libtool-commit@gnu.org; Sun, 06 Sep 2009 17:38:52 +0000
From: "Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0805518173d95032e22c2832e73724c08ac2d9c7
X-Git-Newrev: 2eb8c3e51fde5f3a220eaad5c9e31a215aab330d
Message-Id: <E1MkLhU-0002Ql-6e@cvs.savannah.gnu.org>
Date: Sun, 06 Sep 2009 17:38:52 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-142-g2eb8c3e
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 06 Sep 2009 17:38:55 -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  2eb8c3e51fde5f3a220eaad5c9e31a215aab330d (commit)
      from  0805518173d95032e22c2832e73724c08ac2d9c7 (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 2eb8c3e51fde5f3a220eaad5c9e31a215aab330d
Author: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Date:   Sun Sep 6 19:38:06 2009 +0200

    Testsuite keyword 'interactive' and check-* rules.
    
    * Makefile.am (testsuite_deps, testsuite_deps_uninstalled):
    New variables.
    (check-local, installcheck-local): Use them.
    (check-interactive, check-noninteractive): New rules.
    * tests/link-order2.at (Link order of deplibs),
    tests/static.at (static linking flags for programs): Add keyword
    `interactive'.
    * doc/libtool.texi (Test descriptions): Document all keywords
    used in the Libtool test suite.
    * NEWS: Update.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

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

Summary of changes:
 ChangeLog            |   12 +++++++++
 Makefile.am          |   23 +++++++++++++++-
 NEWS                 |    3 ++
 doc/libtool.texi     |   68 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/link-order2.at |    1 +
 tests/static.at      |    1 +
 6 files changed, 106 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 60bf373..f874852 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2009-09-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+	Testsuite keyword 'interactive' and check-* rules.
+	* Makefile.am (testsuite_deps, testsuite_deps_uninstalled):
+	New variables.
+	(check-local, installcheck-local): Use them.
+	(check-interactive, check-noninteractive): New rules.
+	* tests/link-order2.at (Link order of deplibs),
+	tests/static.at (static linking flags for programs): Add keyword
+	`interactive'.
+	* doc/libtool.texi (Test descriptions): Document all keywords
+	used in the Libtool test suite.
+	* NEWS: Update.
+
 	Fix failure test in the presence of --with-pic or -prefer-pic.
 	* tests/fail.at (Failure tests): Run non-PIC failure test only
 	if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
diff --git a/Makefile.am b/Makefile.am
index e22fcc2..bdfad2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -547,19 +547,38 @@ DISTCLEANFILES += tests/atconfig
 
 CD_TESTDIR	= abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
 
+testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
+testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la $(bin_SCRIPTS)
+
 # Hook the test suite into the check rule
-check-local: tests/atconfig $(srcdir)/$(TESTSUITE) libltdl/libltdlc.la $(bin_SCRIPTS)
+check-local: $(testsuite_deps_uninstalled)
 	$(CD_TESTDIR); \
 	CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
 	  $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS)
 
 # Run the test suite on the *installed* tree.
-installcheck-local: tests/atconfig $(srcdir)/$(TESTSUITE)
+installcheck-local: $(testsuite_deps)
 	$(CD_TESTDIR); \
 	CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
 	  $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \
 	  AUTOTEST_PATH="$(exec_prefix)/bin"
 
+# Run only noninteractive parts of the new testsuite.
+check-noninteractive: $(testsuite_deps_uninstalled)
+	$(CD_TESTDIR); \
+	CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
+	  $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
+	  -k !interactive INNER_TESTSUITEFLAGS=",!interactive" \
+	  $(TESTSUITEFLAGS)
+
+# Run only interactive parts of the new testsuite.
+check-interactive: $(testsuite_deps_uninstalled)
+	$(CD_TESTDIR); \
+	CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
+	  $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
+	  -k interactive -k recursive INNER_TESTSUITEFLAGS=",interactive" \
+	  $(TESTSUITEFLAGS)
+
 # We need to remove any file droppings left behind by testsuite
 clean-local: clean-local-legacy
 	-$(CD_TESTDIR); \
diff --git a/NEWS b/NEWS
index d6a35aa..c7d3016 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - New libtool command line flag --no-verbose, which disables only
     the extra "verbose" output messages and has no effect on the
     default informational messages.
+  - New convenience make targets `check-noninteractive' to avoid long testsuite
+    runs on Windows with popup windows in the middle, and `check-interactive'
+    for the complement set of tests.
 
 * Changes in supported systems or compilers:
 
diff --git a/doc/libtool.texi b/doc/libtool.texi
index a7872c6..18b9a97 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -5166,6 +5166,74 @@ directory, except that Fortran 90 is used in combination with the
 
 @end table
 
+The new, Autotest-based test suite uses keywords to classify certain
+test groups:
+
+@table @samp
+@item CXX
+@itemx F77
+@itemx FC
+@itemx GCJ
+The test group exercises one of these @command{libtool} language tags.
+
+@item autoconf
+@itemx automake
+These keywords denote that the respective external program is needed
+by the test group.  The tests are typically skipped if the program is
+not installed.  The @samp{automake} keyword may also denote use of the
+@command{aclocal} program.
+
+@item interactive
+This test group may require user interaction on some systems.  Typically,
+this means closing a popup window about a DLL load error on Windows.
+
+@item libltdl
+Denote that the @file{libltdl} library is exercised by the test group.
+
+@item libtool
+@itemx libtoolize
+Denote that the @command{libtool} or @command{libtoolize} scripts are
+exercised by the test group, respectively.
+
+@item recursive
+Denote that this test group may recursively re-invoke the test suite
+itself, with changed settings and maybe a changed @command{libtool}
+script.  You may use the @env{INNER_TESTSUITEFLAGS} variable to pass
+additional settings to this recursive invocation.  Typically, recursive
+invocations delimit the set of tests with another keyword, for example
+by passing @code{-k libtool} right before the expansion of the
+@env{INNER_TESTSUITEFLAGS} variable (without an intervening space, so
+you get the chance for further delimitation).
+
+Test groups with the keyword @samp{recursive} should not be denoted with
+keywords, in order to avoid infinite recursion.  As a consequence,
+recursive test groups themselves should never require user interaction,
+while the test groups they invoke may do so.
+@end table
+
+For example, in order to avoid any interactive test groups, you could
+use this:
+
+@smallexample
+make check-local \
+  TESTSUITEFLAGS='-k !interactive INNER_TESTSUITEFLAGS=",!interactive"'
+@end smallexample
+
+@noindent
+while to run only those test groups, you would use this:
+
+@smallexample
+make check-local \
+  TESTSUITEFLAGS='-k interactive -k recursive INNER_TESTSUITEFLAGS=,interactive'
+@end smallexample
+
+@noindent
+but the convenience targets @samp{check-interactive} and
+@samp{check-noninteractive} avoid needing to remember these complex
+commands, in addition to also disabling interactive tests in the old
+test suite.
+
+
 @node When tests fail
 @subsection When tests fail
 @cindex failed tests
diff --git a/tests/link-order2.at b/tests/link-order2.at
index 57ff4a0..a6eea0e 100644
--- a/tests/link-order2.at
+++ b/tests/link-order2.at
@@ -45,6 +45,7 @@
 
 AT_SETUP([Link order of deplibs])
 AT_KEYWORDS([libtool])
+AT_KEYWORDS([interactive])dnl running 'wrong' may cause a popup window.
 
 eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='`
 
diff --git a/tests/static.at b/tests/static.at
index 575c227..f59b124 100644
--- a/tests/static.at
+++ b/tests/static.at
@@ -67,6 +67,7 @@
 
 AT_SETUP([static linking flags for programs])
 AT_KEYWORDS([libtool])
+AT_KEYWORDS([interactive])dnl Some of the exec_fail test cause popups with MinGW.
 
 LDFLAGS="$LDFLAGS -no-undefined"
 prefix=`pwd`/inst


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Mon Sep 07 01:45:29 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MkX2f-0008Jf-CX
	for mharc-libtool-commit@gnu.org; Mon, 07 Sep 2009 01:45:29 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MkX2c-0008Hi-RN
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 01:45:26 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MkX2Z-0008EW-Pb
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 01:45:25 -0400
Received: from [199.232.76.173] (port=53225 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MkX2Z-0008EC-Fg
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 01:45:23 -0400
Received: from savannah.gnu.org ([199.232.41.3]:40485 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MkX2Z-0003Nt-3l
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 01:45:23 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MkX2Y-0006p5-8B
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 05:45:22 +0000
Received: from pogma by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MkX2X-0006oZ-Md
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 05:45:21 +0000
From: "Peter O'Gorman" <peter@pogma.com>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2eb8c3e51fde5f3a220eaad5c9e31a215aab330d
X-Git-Newrev: 4ad8b63bd1069246c540ba2973da967fe7b68c9c
Message-Id: <E1MkX2X-0006oZ-Md@cvs.savannah.gnu.org>
Date: Mon, 07 Sep 2009 05:45:21 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-143-g4ad8b63
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Sep 2009 05:45:27 -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  4ad8b63bd1069246c540ba2973da967fe7b68c9c (commit)
      from  2eb8c3e51fde5f3a220eaad5c9e31a215aab330d (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 4ad8b63bd1069246c540ba2973da967fe7b68c9c
Author: Peter O'Gorman <peter@pogma.com>
Date:   Mon Sep 7 00:41:58 2009 -0500

    Use darwin's -force_load flag if available for whole_archive_flag_spec
    
    * libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
    -force_load and use it if there.
    * tests/darwin.at: Add a simple test.

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

Summary of changes:
 ChangeLog             |    7 ++++++
 libltdl/m4/libtool.m4 |   31 +++++++++++++++++++++++++-
 tests/darwin.at       |   56 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 92 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f874852..a9f29ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-07  Peter O'Gorman  <peter@pogma.com
+
+	Use darwin's -force_load flag if available for whole_archive_flag_spec
+	* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
+	-force_load and use it if there.
+	* tests/darwin.at: Add a simple test.
+
 2009-09-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	Testsuite keyword 'interactive' and check-* rules.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index b081f7b..bb1097f 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -971,6 +971,29 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	[lt_cv_ld_exported_symbols_list=no])
 	LDFLAGS="$save_LDFLAGS"
     ])
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err conftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
@@ -998,7 +1021,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
     else
       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -1018,7 +1041,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
diff --git a/tests/darwin.at b/tests/darwin.at
index 8884fd2..8f55f80 100644
--- a/tests/darwin.at
+++ b/tests/darwin.at
@@ -148,3 +148,59 @@ AT_CHECK([$LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS ]dnl
 AT_CHECK([grep stamp $lockfile], [], [ignore])
 
 AT_CLEANUP
+
+AT_SETUP([darwin gdb debug information])
+
+AT_CHECK([gdb --version || (exit 77)],[ignore],[ignore],[ignore])
+
+AT_DATA([foo.c], [[
+int foo (void) { return 0; }
+]])
+
+AT_DATA([bar.c], [[
+extern int foo (void);
+int bar (void) { return foo (); }
+]])
+
+AT_DATA([main.c], [[
+extern int bar(void);
+
+int main() { return bar();}
+]])
+
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c],
+	 [], [ignore], [ignore])
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo],
+	 [], [ignore], [ignore])
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS ]dnl
+	 [  -o libbar.la bar.lo -rpath /foo libfoo.la ],
+	 [], [ignore], [ignore])
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS ]dnl
+	 [  -o main main.lo libbar.la],[], [ignore], [ignore])
+AT_CHECK([echo quit | $LIBTOOL --mode=execute gdb main 2>err1],
+	 [ignore], [ignore], [stderr])
+
+AT_CHECK([grep 'Could not find object file' stderr],[1],[ignore],[ignore])
+
+AT_XFAIL_IF([
+eval "`$LIBTOOL --config | $EGREP '^(whole_archive_flag_spec)='`"
+case $whole_archive_flag_spec:$host_os in
+:darwin*) : ;;
+*) false ;;
+esac ])
+
+# Remove any dSYM bundle
+rm -rf .libs/*.dSYM
+
+AT_CHECK([echo quit | $LIBTOOL --mode=execute gdb main],
+	 [ignore], [ignore], [stderr])
+AT_CHECK([grep 'Could not find object file' stderr],[1],[ignore],[ignore])
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Mon Sep 07 17:12:08 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MklVQ-0007Eb-NC
	for mharc-libtool-commit@gnu.org; Mon, 07 Sep 2009 17:12:08 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MklVO-0007Cc-R9
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 17:12:06 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MklVN-0007BR-LW
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 17:12:05 -0400
Received: from [199.232.76.173] (port=52318 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MklVN-0007BB-Fr
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 17:12:05 -0400
Received: from savannah.gnu.org ([199.232.41.3]:32921 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MklVN-0007ap-9r
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 17:12:05 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MklVL-0003Se-L9
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 21:12:04 +0000
Received: from pogma by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MklVJ-0003S7-KW
	for libtool-commit@gnu.org; Mon, 07 Sep 2009 21:12:02 +0000
From: "Peter O'Gorman" <peter@pogma.com>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4ad8b63bd1069246c540ba2973da967fe7b68c9c
X-Git-Newrev: 91697c2092ad24aab5b926abd7b9247f14d2d9b9
Message-Id: <E1MklVJ-0003S7-KW@cvs.savannah.gnu.org>
Date: Mon, 07 Sep 2009 21:12:01 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-144-g91697c2
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Sep 2009 21:12:07 -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  91697c2092ad24aab5b926abd7b9247f14d2d9b9 (commit)
      from  4ad8b63bd1069246c540ba2973da967fe7b68c9c (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 91697c2092ad24aab5b926abd7b9247f14d2d9b9
Author: Peter O'Gorman <peter@pogma.com>
Date:   Mon Sep 7 15:17:03 2009 -0500

    Fix redirect in test case.
    
    tests/darwin.at: Fix stderr redirect.

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

Summary of changes:
 ChangeLog       |    3 +++
 tests/darwin.at |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a9f29ae..cc43535 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-09-07  Peter O'Gorman  <peter@pogma.com
 
+	Fix redirect in test case.
+	* tests/darwin.at: Fix stderr redirect.
+
 	Use darwin's -force_load flag if available for whole_archive_flag_spec
 	* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
 	-force_load and use it if there.
diff --git a/tests/darwin.at b/tests/darwin.at
index 8f55f80..bb71207 100644
--- a/tests/darwin.at
+++ b/tests/darwin.at
@@ -184,7 +184,7 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS ]dnl
 
 AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS ]dnl
 	 [  -o main main.lo libbar.la],[], [ignore], [ignore])
-AT_CHECK([echo quit | $LIBTOOL --mode=execute gdb main 2>err1],
+AT_CHECK([echo quit | $LIBTOOL --mode=execute gdb main],
 	 [ignore], [ignore], [stderr])
 
 AT_CHECK([grep 'Could not find object file' stderr],[1],[ignore],[ignore])


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Tue Sep 08 14:05:11 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ml543-00070g-3f
	for mharc-libtool-commit@gnu.org; Tue, 08 Sep 2009 14:05:11 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ml540-000705-U6
	for libtool-commit@gnu.org; Tue, 08 Sep 2009 14:05:09 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Ml540-0006zm-9o
	for libtool-commit@gnu.org; Tue, 08 Sep 2009 14:05:08 -0400
Received: from [199.232.76.173] (port=59624 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ml540-0006zj-60
	for libtool-commit@gnu.org; Tue, 08 Sep 2009 14:05:08 -0400
Received: from savannah.gnu.org ([199.232.41.3]:46952 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Ml53z-0000bS-K7
	for libtool-commit@gnu.org; Tue, 08 Sep 2009 14:05:07 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Ml53y-00011F-O5
	for libtool-commit@gnu.org; Tue, 08 Sep 2009 18:05:06 +0000
Received: from rwild by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Ml53x-0000zy-JL
	for libtool-commit@gnu.org; Tue, 08 Sep 2009 18:05:06 +0000
From: "Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 91697c2092ad24aab5b926abd7b9247f14d2d9b9
X-Git-Newrev: b03736353b6d478a68bfc19c017605eb21a3edce
Message-Id: <E1Ml53x-0000zy-JL@cvs.savannah.gnu.org>
Date: Tue, 08 Sep 2009 18:05:05 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-146-gb037363
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Sep 2009 18:05:09 -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  b03736353b6d478a68bfc19c017605eb21a3edce (commit)
       via  1e4e1984b07e4ce21f421b45854b846a93a12128 (commit)
      from  91697c2092ad24aab5b926abd7b9247f14d2d9b9 (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 b03736353b6d478a68bfc19c017605eb21a3edce
Author: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Date:   Mon Sep 7 21:27:08 2009 +0200

    Allow dlopen self test to work with gcc's -fvisibility=hidden.
    
    * libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Declare default
    visibility for the symbol we are going to test dlopen (NULL)
    when a GCC version is used that understands the visibility
    attribute, under the assumption that if -fvisibility=hidden
    will be used, the user code will be sufficiently annotated
    for visibility of needed symbols from the main executable.
    * THANKS: Update.
    Report by Josh Hursey against OpenMPI.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

commit 1e4e1984b07e4ce21f421b45854b846a93a12128
Author: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Date:   Mon Sep 7 21:08:50 2009 +0200

    Fix and split recent testsuite addition for compile/link flags.
    
    * tests/flags.at (passing flags through libtool): Split into ...
    (passing CC flags through libtool)
    (passing CXX flags through libtool)
    (passing F77 flags through libtool)
    (passing FC flags through libtool)
    (passing GCJ flags through libtool): ... these five tests,
    factorized with m4_foreach.  Fix F77 and FC compile and link
    commands; add GCJ tag.  Use LT_AT_TAG to correctly skip tags
    for which no compiler exists.  Use $EXEEXT where appropriate.
    Drop unneeded use of reload_cmds.
    Reports by Peter Rosin and Peter O'Gorman.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

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

Summary of changes:
 ChangeLog             |   25 ++++++++++++
 THANKS                |    1 +
 libltdl/m4/libtool.m4 |   14 ++++++-
 tests/flags.at        |   99 ++++++++++++++++++++++++++-----------------------
 4 files changed, 91 insertions(+), 48 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cc43535..d3e924f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2009-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Allow dlopen self test to work with gcc's -fvisibility=hidden.
+	* libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Declare default
+	visibility for the symbol we are going to test dlopen (NULL)
+	when a GCC version is used that understands the visibility
+	attribute, under the assumption that if -fvisibility=hidden
+	will be used, the user code will be sufficiently annotated
+	for visibility of needed symbols from the main executable.
+	* THANKS: Update.
+	Report by Josh Hursey against OpenMPI.
+
+	Fix and split recent testsuite addition for compile/link flags.
+	* tests/flags.at (passing flags through libtool): Split into ...
+	(passing CC flags through libtool)
+	(passing CXX flags through libtool)
+	(passing F77 flags through libtool)
+	(passing FC flags through libtool)
+	(passing GCJ flags through libtool): ... these five tests,
+	factorized with m4_foreach.  Fix F77 and FC compile and link
+	commands; add GCJ tag.  Use LT_AT_TAG to correctly skip tags
+	for which no compiler exists.  Use $EXEEXT where appropriate.
+	Drop unneeded use of reload_cmds.
+	Reports by Peter Rosin and Peter O'Gorman.
+
 2009-09-07  Peter O'Gorman  <peter@pogma.com
 
 	Fix redirect in test case.
diff --git a/THANKS b/THANKS
index 9353885..8baf7f4 100644
--- a/THANKS
+++ b/THANKS
@@ -110,6 +110,7 @@
   John Bowler			jbowler@acm.org
   John R. Cary			cary@txcorp.com
   John Wolfe			jlw@sco.com
+  Josh Hursey			jjhursey@open-mpi.org
   Joseph Beckenbach III		jrb3@best.com
   Lennart Poettering		lennart@poettering.net
   Karl Berry			karl@freefriends.org
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index bb1097f..662a88b 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1651,7 +1651,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* 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))
+void fnord () __attribute__((visibility("default")));
+#endif
+
+void fnord () { int i=42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -1660,7 +1666,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
diff --git a/tests/flags.at b/tests/flags.at
index 3de1fcb..eceda74 100644
--- a/tests/flags.at
+++ b/tests/flags.at
@@ -21,24 +21,42 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ####
 
-AT_SETUP([passing flags through libtool])
+m4_foreach([lt_tag], [CC, CXX, F77, FC, GCJ],
+[AT_SETUP([passing lt_tag flags through libtool])
 AT_KEYWORDS([libtool])
-AT_KEYWORDS([CXX F77 FC])
+LT_AT_TAG([lt_tag])
 
 LDFLAGS="$LDFLAGS -no-undefined"
 eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
 
-AT_DATA([a.c],
+m4_case(lt_tag,
+[CC], [AT_DATA([a.c],
 [[int main () { return 0; }
 ]])
-
-AT_DATA([a.f],
+compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c
+],
+[CXX], [AT_DATA([a.cpp],
+[[int main () { return 0; }
+]])
+compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp
+],
+[F77], [AT_DATA([a.f],
 [[      program main
       end
 ]])
-
-cp a.c a.cpp
-cp a.f a.f90
+compile="$F77 $FFLAGS" link="$F77 $FFLAGS $LDFLAGS" source=a.f
+],
+[FC], [AT_DATA([a.f90],
+[[      program main
+      end
+]])
+compile="$FC $FCFLAGS" link="$FC $FCFLAGS $LDFLAGS" source=a.f90
+],
+[GCJ], [AT_DATA([a.java],
+[[class a {}
+]])
+compile="$GCJ $GCJFLAGS" link="$GCJ $GCJFLAGS $LDFLAGS" source=a.java
+])
 
 # Linker flags are not passed to the archiver, so don't test static libraries.
 if $LIBTOOL --features | grep 'enable shared libraries'; then
@@ -47,50 +65,39 @@ else
   library_and_module=
 fi
 
-for tag in CC CXX F77 FC; do
-  if $LIBTOOL --tag=$tag 2>&1 | grep 'unknown tag'; then
-    continue
-  fi
-  case $tag in
-  CC) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c ;;
-  CXX) compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp;;
-  F77) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.f ;;
-  FC) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.f90 ;;
-  esac
+eval "`$LIBTOOL --tag=lt_tag --config | $EGREP '^(wl|archive_cmds)='`"
 
-  eval "`$LIBTOOL --tag=$tag --config | $EGREP '^(wl|archive_cmds|reload_cmds)='`"
+AT_CHECK([$LIBTOOL --tag=lt_tag --mode=compile $compile -c $source],
+	 [], [ignore], [ignore])
 
-  AT_CHECK([$LIBTOOL --tag=$tag --mode=compile $compile -c $source],
-	   [], [ignore], [ignore])
+# Linker flags are prefixed with ${wl} iff they are passed to the
+# compiler driver, instead of directly to the linker.
+case $archive_cmds in
+*\$LD*\$linker_flags*) maybe_wl= ;;
+*) maybe_wl=$wl ;;
+esac
 
-  # Linker flags are prefixed with ${wl} iff they are passed to the
-  # compiler driver, instead of directly to the linker.
-  case $archive_cmds in
-  *\$LD*\$linker_flags*) maybe_wl= ;;
-  *) maybe_wl=$wl ;;
+for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
+  case $flag in
+  -Wc, | -Xcompiler\ )
+    AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=compile $compile ]dnl
+	     [$flag-foo -c $source], [], [stdout], [ignore])
+    AT_CHECK([$FGREP " -foo" stdout], [], [ignore])
+    flag_prefix=
+    ;;
+  -Wl, | -Xlinker\ )
+    flag_prefix=$maybe_wl
+    ;;
   esac
 
-  for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
-    case $flag in
-    -Wc, | -Xcompiler\ )
-      AT_CHECK([$LIBTOOL -n --tag=$tag --mode=compile $compile ]dnl
-	       [$flag-foo -c $source], [], [stdout], [ignore])
-      AT_CHECK([$FGREP " -foo" stdout], [], [ignore])
-      flag_prefix=
-      ;;
-    -Wl, | -Xlinker\ )
-      flag_prefix=$maybe_wl
-      ;;
-    esac
-
-    eval set program "$library_and_module"
-    for output
-    do
-      AT_CHECK([$LIBTOOL -n --tag=$tag --mode=link $link ]dnl
-	       [-o $output a.lo -rpath /nowhere $flag-foo], [], [stdout], [ignore])
-      AT_CHECK([$FGREP " $flag_prefix-foo" stdout], [], [ignore])
-    done
+  eval set program$EXEEXT "$library_and_module"
+  for output
+  do
+    AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=link $link ]dnl
+	     [-o $output a.lo -rpath /nowhere $flag-foo], [], [stdout], [ignore])
+    AT_CHECK([$FGREP " $flag_prefix-foo" stdout], [], [ignore])
   done
 done
 
 AT_CLEANUP
+])dnl m4_foreach(tag)


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Thu Sep 10 04:06:39 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mlefv-000639-EE
	for mharc-libtool-commit@gnu.org; Thu, 10 Sep 2009 04:06:39 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mlefu-00061w-Em
	for libtool-commit@gnu.org; Thu, 10 Sep 2009 04:06:38 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mlefr-0005z2-TZ
	for libtool-commit@gnu.org; Thu, 10 Sep 2009 04:06:37 -0400
Received: from [199.232.76.173] (port=56966 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mlefr-0005yw-Pk
	for libtool-commit@gnu.org; Thu, 10 Sep 2009 04:06:35 -0400
Received: from savannah.gnu.org ([199.232.41.3]:60368 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Mlefp-0006sI-U4
	for libtool-commit@gnu.org; Thu, 10 Sep 2009 04:06:34 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mlefp-0006cV-5n
	for libtool-commit@gnu.org; Thu, 10 Sep 2009 08:06:33 +0000
Received: from pekberg by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mlefo-0006bF-2k
	for libtool-commit@gnu.org; Thu, 10 Sep 2009 08:06:33 +0000
From: "Peter Rosin" <peda@lysator.liu.se>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/pr-msvc-support
X-Git-Reftype: branch
X-Git-Oldrev: a128e6d5f8a57c0f3cfb85a28d8d843f504a3cdf
X-Git-Newrev: dd42e63ce688302500f349606c55bf173feda3a4
Message-Id: <E1Mlefo-0006bF-2k@cvs.savannah.gnu.org>
Date: Thu, 10 Sep 2009 08:06:32 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, pr-msvc-support,
	updated. v2.2.6-182-gdd42e63
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Sep 2009 08:06:38 -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  dd42e63ce688302500f349606c55bf173feda3a4 (commit)
       via  b03736353b6d478a68bfc19c017605eb21a3edce (commit)
       via  1e4e1984b07e4ce21f421b45854b846a93a12128 (commit)
       via  91697c2092ad24aab5b926abd7b9247f14d2d9b9 (commit)
       via  4ad8b63bd1069246c540ba2973da967fe7b68c9c (commit)
       via  2eb8c3e51fde5f3a220eaad5c9e31a215aab330d (commit)
       via  0805518173d95032e22c2832e73724c08ac2d9c7 (commit)
       via  8c35d797572d3ccef6d1ed6ebc59e679b5b80aa6 (commit)
       via  c9bbeef468f64064e1d50e39c945df929cbc21d8 (commit)
       via  d1de1d4adaadf5b709c646862e7f649bb9179aea (commit)
       via  db160ae47c151fe037ba686d925652cd4b34fe9f (commit)
       via  04329d83555b5f8d2fd02428418a79ea392b2d91 (commit)
       via  00558363daebeb41c02ab8eaa9cb5218caf97867 (commit)
       via  f0f99955cb283ead0817744921621d66c049709f (commit)
       via  a228f07a8ffb9610c070203de04ea2242755a71e (commit)
       via  7244857f7bc0e90f52ca5b6be37652911653e654 (commit)
       via  75765d58c38c55ef069ef100732c1e978f4151a6 (commit)
       via  82f62c98de38974cb63e39dbfeb2b45c614b4be7 (commit)
       via  2772d14559c584d142e44fdea69124ce62285b40 (commit)
       via  6769a76d6bbcc55b70b1c7279b7226aaa33d65b5 (commit)
       via  8a08afac5d4f560a0fdd53611e9db680a3a5145c (commit)
       via  b04fe8e6da2b5bed914911bfd8567ba9e93da40b (commit)
       via  efe1cfec710dbd06987fed02ec4d70d5c6630322 (commit)
       via  f578833bb8bd54092ce74f48ab07a26fdad28727 (commit)
       via  d812c6326b9f1206715f1125970805a05a856e32 (commit)
       via  740565c4fdd69be05a0a5d118bf6c77a51498bcf (commit)
       via  1f4a1d723744feddc05a77bc687366c286950651 (commit)
       via  e3095b37d09aa637c465b3099781bf5d69f9f059 (commit)
       via  2af6f65468e1890da42b32baeac3054a756c0e72 (commit)
       via  19880129dd60fb0aaefa03ee764951af38b0451e (commit)
       via  57013d8e689ed32f0a4fb8d3b0549ed5e793e2d6 (commit)
       via  94537d111dcd64b0937ffe36dda485f794b47fbb (commit)
       via  f4c14adc49a89beccbecb6177c8fae4d13040b9d (commit)
       via  848215b440b53cae6979dd5a65ea41e9d5ab5b3d (commit)
       via  26d36541aded9124add202e288a79f3c08242687 (commit)
       via  5ef9367f2a030124e7b5ed4a4194a12c545d6fce (commit)
       via  7f0ba74e84f5dd7e72908835a5a8335c9ecb3eba (commit)
       via  5d560c68d815824d284661354e525d1936c823b9 (commit)
       via  81a734cdda29f4ba61ee1f3bbbb2513ed4ed6323 (commit)
       via  2ff7159eb45c8ae9ca1588e65d198a2aeea3eed6 (commit)
       via  a2fa12747f531979b946cc4d3c9a9c0e07b460cf (commit)
       via  5f2bbb494a2753afb2878c399cfd8316b7403a5b (commit)
       via  8965cb5fa339aa4f63d0e77fcc91e0e46929348d (commit)
      from  a128e6d5f8a57c0f3cfb85a28d8d843f504a3cdf (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 dd42e63ce688302500f349606c55bf173feda3a4
Merge: a128e6d5f8a57c0f3cfb85a28d8d843f504a3cdf b03736353b6d478a68bfc19c017605eb21a3edce
Author: Peter Rosin <peda@lysator.liu.se>
Date:   Wed Sep 9 12:36:23 2009 +0200

    Merge branch 'master' into pr-msvc-support

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

Summary of changes:
 ChangeLog                  |  346 ++++++++++++++++++++++++++++++++++++++++++++
 Makefile.am                |   25 +++-
 NEWS                       |   16 ++
 THANKS                     |   12 ++
 bootstrap                  |    4 +-
 doc/libtool.texi           |   77 ++++++++++-
 libltdl/config/ltmain.m4sh |  186 +++---------------------
 libltdl/m4/libtool.m4      |  272 ++++++++++++++++++++--------------
 libltdl/m4/lt~obsolete.m4  |    6 +-
 libtoolize.m4sh            |    1 +
 tests/configure-iface.at   |   21 +++
 tests/darwin.at            |  108 ++++++++++++++-
 tests/execute-mode.at      |    3 +-
 tests/fail.at              |   15 ++-
 tests/flags.at             |  103 +++++++++++++
 tests/link-order2.at       |    1 +
 tests/localization.at      |   10 ++
 tests/lt_dladvise.at       |    9 +-
 tests/nonrecursive.at      |    4 +-
 tests/old-m4-iface.at      |    8 +-
 tests/static.at            |    1 +
 tests/versioning.at        |  239 ++++++++++++++++++++++++++++++
 22 files changed, 1167 insertions(+), 300 deletions(-)
 create mode 100644 tests/flags.at
 create mode 100644 tests/versioning.at

diff --git a/ChangeLog b/ChangeLog
index b7c37f8..d88355d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,349 @@
+2009-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Allow dlopen self test to work with gcc's -fvisibility=hidden.
+	* libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Declare default
+	visibility for the symbol we are going to test dlopen (NULL)
+	when a GCC version is used that understands the visibility
+	attribute, under the assumption that if -fvisibility=hidden
+	will be used, the user code will be sufficiently annotated
+	for visibility of needed symbols from the main executable.
+	* THANKS: Update.
+	Report by Josh Hursey against OpenMPI.
+
+	Fix and split recent testsuite addition for compile/link flags.
+	* tests/flags.at (passing flags through libtool): Split into ...
+	(passing CC flags through libtool)
+	(passing CXX flags through libtool)
+	(passing F77 flags through libtool)
+	(passing FC flags through libtool)
+	(passing GCJ flags through libtool): ... these five tests,
+	factorized with m4_foreach.  Fix F77 and FC compile and link
+	commands; add GCJ tag.  Use LT_AT_TAG to correctly skip tags
+	for which no compiler exists.  Use $EXEEXT where appropriate.
+	Drop unneeded use of reload_cmds.
+	Reports by Peter Rosin and Peter O'Gorman.
+
+2009-09-07  Peter O'Gorman  <peter@pogma.com
+
+	Fix redirect in test case.
+	* tests/darwin.at: Fix stderr redirect.
+
+	Use darwin's -force_load flag if available for whole_archive_flag_spec
+	* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
+	-force_load and use it if there.
+	* tests/darwin.at: Add a simple test.
+
+2009-09-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Testsuite keyword 'interactive' and check-* rules.
+	* Makefile.am (testsuite_deps, testsuite_deps_uninstalled):
+	New variables.
+	(check-local, installcheck-local): Use them.
+	(check-interactive, check-noninteractive): New rules.
+	* tests/link-order2.at (Link order of deplibs),
+	tests/static.at (static linking flags for programs): Add keyword
+	`interactive'.
+	* doc/libtool.texi (Test descriptions): Document all keywords
+	used in the Libtool test suite.
+	* NEWS: Update.
+
+	Fix failure test in the presence of --with-pic or -prefer-pic.
+	* tests/fail.at (Failure tests): Run non-PIC failure test only
+	if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
+	and also -prefer-pic has not been passed in $CFLAGS.
+	* THANKS: Update.
+	Report by Donn Washburn.
+
+	Add testsuite exposure for passing of compiler and linker flags.
+	* tests/flags.at (passing flags through libtool): New file, new
+	test, for bug fixed in previous commit.
+	* Makefile.am (TESTSUITE_AT): Add tests/flags.at.
+
+2009-09-04  Peter Rosin  <peda@lysator.liu.se>
+
+	Make -Wc,FLAG behave like -Xcompiler FLAG in link mode.
+	* libltdl/config/ltmain.m4sh (func_mode_link): Remove "-Wc,"
+	instead of replacing it with "$wl" when linking programs
+	through the compiler driver, just as is the case when linking
+	libraries.
+	* NEWS: Update.
+
+2009-08-23  Lennart Poettering  <lennart@poettering.net>  (tiny change)
+
+	Shut up prototype warnings with recent GCC and -Wstrict-prototypes.
+	* libltdl/config/ltmain.m4sh (func_generate_dlsyms): Use recent
+	GCC's diagnostic pragma to override a -Wstrict-prototypes
+	setting for the symbol list code.
+	* THANKS: Update.
+
+2009-08-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Remove __oline__ from macros, for less spurious configure diffs.
+	* libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK, _LT_COMPILER_OPTION)
+	(_LT_COMPILER_C_O, LT_PATH_NM): Replace __oline__ instances with
+	$LINENO.
+	* NEWS: Update.
+
+2009-07-24  Roumen Petrov  <bugtrack@roumenpetrov.info>  (tiny change)
+
+	Fixup 'execute mode' test for w32.
+	* tests/execute-mode.at (execute mode): Add missing $EXEEXT.
+	(LDFLAGS): Add -no-undefined.
+
+2009-07-01  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net> (tiny change)
+	    Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	[CXX] Use correct export_dynamic_flag_spec for PE-COFF $hosts
+	* libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG) [cygwin*|mingw*|pw32*|cegcc*]:
+	Define export_dynamic_flag_spec as -Wl,--export-all-symbols here as well
+	(see commit 5f2bbb494a2753afb2878c399cfd8316b7403a5b).
+
+2009-06-29  Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	[mingw] Improve sys_lib_search_path_spec detection.
+	* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Fix handling
+	of dos-style paths when parsing $CC -print-search-dirs output.
+
+2009-06-28  Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	Finish adding alias for obsoleted AC_LIBTOOL_RC macro.
+	* libltdl/m4/libtool.m4: Add reminder comment concerning
+	aclocal-1.4 backwards compatibility.
+	* libltdl/m4/lt~obsolete.m4: Remove unnecessary AC_DEFUN.
+
+2009-06-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	Add alias for obsoleted AC_LIBTOOL_RC macro.
+	* libltdl/m4/libtool.m4: Add alias for obsoleted
+	macro AC_LIBTOOL_RC.
+
+2009-06-21  Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	Remove unneeded functions and options from cwrapper
+	* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src)
+	[lt_opt_process_env_set]: Remove.
+	[lt_opt_process_env_prepend]: Remove.
+	[lt_opt_process_env_append]: Remove.
+	[lt_split_name_value]: Remove.
+	[file scope]: Don't declare removed functions. Remove
+	constants and defines related to eliminated commandline
+	options.
+	[main]: Remove code related to eliminated commandline
+	options --lt-env-set, --lt-env-prepend, --lt-env-append.
+
+2009-06-19  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net> (tiny change)
+	    Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	Ensure LT_PATH_LD works when called before LT_INIT
+	* libltdl/m4/libtool.m4 (LT_PATH_LD): AC_REQUIRE _LT_PROG_ECHO_BACKSLASH.
+
+2009-06-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Add versioning tests.
+	* tests/versioning.at (versioning): New file, new test.
+	* Makefile.am (TESTSUITE_AT): Adjust.
+	Prompted by bug report from Mike Gorchak.
+
+2009-06-14  Mike Gorchak  <mike@malva.ua>  (tiny change)
+	    Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Fix versioning computation for QNX.
+	* libltdl/config/ltmain.m4sh (func_mode_link): Set `$current'
+	and `$age' properly for version_type `qnx'.
+
+2009-06-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Avoid spurious localization testsuite failure on HP-UX/ia64.
+	* tests/localization.at (localized compiler messages): Skip test
+	if the compiler warning output contains `locale', for HP-UX.
+
+2009-06-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Fix concurrent extraction of convenience libraries on Darwin.
+	* libltdl/m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE): New libtool
+	variable `lock_old_archive_extraction', set to `yes' on darwin.
+	* doc/libtool.texi (libtool script contents): Document it.
+	* libltdl/config/ltmain.m4sh (func_extract_an_archive): Lock
+	`ar x' invocation if `lock_old_archive_extraction' is yes.
+	* tests/darwin.at (darwin concurrent library extraction): New
+	test.
+	* NEWS: Update.
+	Report by Akim Demaille.
+
+2009-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Fix testsuite failure of lt_dlopenadvise test on FreeMiNT.
+	* tests/lt_dladvise.at (lt_dlopenadvise library loading): Do not
+	build moddepend for systems without shared libraries.
+	Report by Alan Hourihane.
+
+	testsuite: avoid failures due to old Automake.
+	* tests/configure-iface.at (installable libltdl)
+	(--with-ltdl-include/lib, --with-included-ltdl):
+	Speficy libmodule_la_SOURCES in Makefile.am as the default
+	source file naming scheme changed in Automake 1.8.
+	* tests/nonrecursive.at (_LT_AT_LTDL_SETUP): Require Automake
+	1.9.6.
+	* THANKS: Update.
+	Report by Robert Garron.
+
+	testsuite: add missing @LIBS@ in a link command line.
+	* tests/old-m4-iface.at (AC_WITH_LTDL): Use @LIBS@ when linking.
+	Report by Patrice Fromy.
+
+	testsuite: cope when some installed libltdl.la has been removed.
+	* tests/old-m4-iface.at (AC_WITH_LTDL): Pass --with-included-ltdl
+	to configure, to ensure we do not accidentally link against a
+	previously installed libltdl.so where the corresponding .la
+	file has been removed, thus we do not add a run path, and the
+	runtime linker then fails to find libltdl.so.7.
+	* tests/configure-iface.at (--with-ltdl-include/lib): Remove -L
+	flags from LDFLAGS to avoid picking up an installed libltdl
+	outside of the default locations.
+	* THANKS: Update.
+	Prompted by report from Patrice Fromy.
+
+2009-06-07  Vincent Torri  <vtorri@univ-evry.fr>  (tiny change)
+
+	Fix C wrapper invocation for ceGCC hosts (cegcc and mingw32ce).
+	* libltdl/config/ltmain.m4sh (func_mode_link): do not generate
+	C wrapper for cegcc and mingw32ce hosts.
+	(func_emit_cwrapperexe_src): remove useless check on
+	__MINGW32CE__.
+
+2009-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Don't pick up double-quotes from /etc/ld.so.conf on Ubuntu.
+	* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [ linux ]
+	<sys_lib_dlsearch_path_spec>: Remove embedded double quotes from
+	paths picked up from /etc/ld.so.conf.  Fixes libltdl compile
+	failure on Ubuntu 7.10.
+	* THANKS: Update.
+	Report by Camilo La Rota.
+
+2009-06-06  Richard Sandiford  <richards@transitive.com>
+
+	Fix GNU nm invocation for AIX.
+	* libldtl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
+	<export_symbols_cmds>: Modify the GNU-nm-on-AIX version so that
+	it adds weak defined symbols to the export list.
+
+	Build AIX shared libraries with binutils 2.19.50+.
+	* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
+	<lt_use_gnu_ld_interface>: New variable to control whether the
+	GNU ld or native ld interface is used.  Set to "no" for GNU ld
+	2.19.50+ on AIX, otherwise mirror $with_gnu_ld.  Update the
+	warning message that is printed when using GNU ld on AIX.
+	Adjust the whole_archive_flag_spec value for GNU ld on AIX.
+	* NEWS, THANKS: Update.
+
+2009-05-27  Peter O'Gorman  <peter@pogma.com>
+
+	Don't run compiler checks twice.
+	libltdl/m4/libtool.m4 (_LT_PROG_FC, _LT_PROG_F77,
+	_LT_PROG_CXX): Remove these macros.
+	libltdl/m4/lt~obsolete.m4: Add removed macros here.
+	libltdl/m4/libtool.m4 (_LT_LANG_FC_CONFIG, _LT_LANG_F77_CONFIG,
+	_LT_LANG_CXX_CONFIG): Remove references to removed macros, and
+	move functionality here.
+	NEWS: Update.
+
+2009-05-05  Rainer Emrich  <r.emrich@de.tecosim.com>  (tiny change)
+	    Peter Rosin  <peda@lysator.liu.se>
+	    Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Fix cross compilation for HPPA/64 with a BSD file command.
+	* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD)
+	[hpux10.20*, hpux11*, !ia64] <lt_cv_deplibs_check_method>:
+	Match the dot in `PA-RISC 2.0' literally.  Adjust hppa*64*
+	pattern to also match BSD `file' output, used in cross
+	compilation setups.
+	* THANKS: Update.
+	Report and initial patch by Rainer Emrich, refined by Peter
+	Rosin.
+
+2009-05-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	libtoolize: ignore trailing junk on scriptversion line.
+	* libtoolize.m4sh (func_install_update): Ignore semi-colon or
+	comment-sign and all following characters when parsing a
+	`scriptversion' line in one of the auxiliary scripts; recent
+	Automake-provided script have a stylized comment to induce
+	Emacs to use UTC.
+	Exposed by the `libtoolize config files serial update' test.
+
+2009-05-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Skip localization test when setlocale is not functional.
+	* tests/localization.at (localized compiler messages): Skip
+	test when there is a warning about `LC_ALL'.
+	* THANKS: Update.
+	Report by Maciej Helminiak.
+
+2009-05-02  Alan Hourihane  <alanh@fairlite.co.uk>  (tiny change)
+
+	Improved support for FreeMiNT.
+	* libltdl/m4/libtool.m4 (LT_CMD_MAX_LEN) [mint]: Hard-code
+	command line length limit to 8192, to avoid long test.
+	* NEWS, THANKS: Update.
+
+2009-05-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Initial port for BlueGene BG/L.
+	* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
+	(_LT_LANG_CXX_CONFIG) [linux]: Detect bgxl*, bgf*, mpixl*
+	compilers.
+	* NEWS, THANKS: Update.
+	Report, feedback and testing by John R. Cary and Christian
+	Rössel.
+
+	manual: fix grammaros.
+	* doc/libtool.texi (Dlpreopening): Fix grammaro.
+	(C header files): Remove duplicate word.
+
+	Allow through -tp=* at link time, for pgcc.
+	* libltdl/config/ltmain.m4sh (func_mode_link): Portlant Group
+	pgcc uses `-tp=PROCESSOR' for target processor selection; allow
+	the flag through at link time.
+	Report by Ethan Mallove.
+
+	Fix quoting of eval'ed variable.
+	* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Double-quote
+	$lt_cv_sys_global_symbol_pipe for eval, like we do in ltmain,
+	in order to preserve TABs and multiple adjacent whitespace.
+	Report by Bruno Haible.
+
+2009-04-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Cope better with missing `makeinfo' in `bootstrap'.
+	* bootstrap: Update `./doc/notes.txt' last so missing `makeinfo'
+	does not cause a broken tree.
+	* THANKS: Update.
+	Report by Christian Rössel.
+
+2009-03-29  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>  (tiny change)
+	    Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	[cygwin] Improve operation with gcc4
+	* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [cygwin*]:
+	Add w32api to sys_lib_search_path_spec without overriding gcc's
+	own search path.
+
+2009-03-29  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>  (tiny change)
+	    Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	Use correct export_dynamic_flag_spec for PE-COFF $hosts
+	* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) 
+	[cygwin*|mingw*|pw32*|cegcc*]: Define export_dynamic_flag_spec
+	as -Wl,--export-all-symbols, as required by GNU ld for PE-COFF.
+
+2009-03-29  Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+	Improve compatibility with older automake
+	* libltdl/m4/lt~obsolete.m4: Add AC_DEFUNs for
+	_LT_PREPARE_SED_QUOTE_VARS and _LT_PROG_ECHO_BACKSLASH.
+	Report by Yaakov Selkowitz.
+
 2009-03-20  Peter Rosin  <peda@lysator.liu.se>
 
 	LT_OUTPUT should always create the libtool script.
diff --git a/Makefile.am b/Makefile.am
index cdd6984..dbd3718 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -455,6 +455,7 @@ TESTSUITE_AT	= tests/testsuite.at \
 		  tests/duplicate_members.at \
 		  tests/duplicate_conv.at \
 		  tests/duplicate_deps.at \
+		  tests/flags.at \
 		  tests/inherited_flags.at \
 		  tests/convenience.at \
 		  tests/link-order.at \
@@ -474,6 +475,7 @@ TESTSUITE_AT	= tests/testsuite.at \
 		  tests/localization.at \
 		  tests/nocase.at \
 		  tests/install.at \
+		  tests/versioning.at \
 		  tests/destdir.at \
 		  tests/old-m4-iface.at \
 		  tests/am-subdir.at \
@@ -549,19 +551,38 @@ DISTCLEANFILES += tests/atconfig
 
 CD_TESTDIR	= abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
 
+testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
+testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la $(bin_SCRIPTS)
+
 # Hook the test suite into the check rule
-check-local: tests/atconfig $(srcdir)/$(TESTSUITE) libltdl/libltdlc.la $(bin_SCRIPTS)
+check-local: $(testsuite_deps_uninstalled)
 	$(CD_TESTDIR); \
 	CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
 	  $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS)
 
 # Run the test suite on the *installed* tree.
-installcheck-local: tests/atconfig $(srcdir)/$(TESTSUITE)
+installcheck-local: $(testsuite_deps)
 	$(CD_TESTDIR); \
 	CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
 	  $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \
 	  AUTOTEST_PATH="$(exec_prefix)/bin"
 
+# Run only noninteractive parts of the new testsuite.
+check-noninteractive: $(testsuite_deps_uninstalled)
+	$(CD_TESTDIR); \
+	CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
+	  $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
+	  -k !interactive INNER_TESTSUITEFLAGS=",!interactive" \
+	  $(TESTSUITEFLAGS)
+
+# Run only interactive parts of the new testsuite.
+check-interactive: $(testsuite_deps_uninstalled)
+	$(CD_TESTDIR); \
+	CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
+	  $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
+	  -k interactive -k recursive INNER_TESTSUITEFLAGS=",interactive" \
+	  $(TESTSUITEFLAGS)
+
 # We need to remove any file droppings left behind by testsuite
 clean-local: clean-local-legacy
 	-$(CD_TESTDIR); \
diff --git a/NEWS b/NEWS
index e6bffd8..25d9777 100644
--- a/NEWS
+++ b/NEWS
@@ -12,12 +12,18 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - New libtool command line flag --no-verbose, which disables only
     the extra "verbose" output messages and has no effect on the
     default informational messages.
+  - New convenience make targets `check-noninteractive' to avoid long testsuite
+    runs on Windows with popup windows in the middle, and `check-interactive'
+    for the complement set of tests.
 
 * Changes in supported systems or compilers:
 
   - Improved support for 64bit Windows (mingw64).
   - Improved support for cegcc (Windows CE/PocketPC).
   - Support for GNU/kOpenSolaris (kopensolaris*-gnu).
+  - Initial support for compilers on BlueGene BG/L.
+  - Improved support for Atari FreeMiNT.
+  - With binutils 2.19.50+, shared libraries can be built on AIX.
   - Initial support for Microsoft Visual C w/o wrapper scripts.
 
 * Bug fixes:
@@ -34,6 +40,16 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - 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.
+  - Fix long standing bug that caused compiler checks for Fortran and
+    C++ compilers to run twice.
+  - Link mode works around a parallel build failure on Darwin 9.6.0 due
+    to the `ar' `flock'ing an archive upon extraction, by protecting the
+    extraction of convenience archives with a lock.
+  - The Libtool macro files do not contain instances of __oline__ any more,
+    easing merges for configure scripts that are added to version control.
+  - Fix ancient bug where "-Wc," was turned into "$wl" (typically "-Wl,")
+    when using the compiler driver to link programs. Now "-Wc," is stripped
+    just as it is when linking libraries through the compiler driver.
 
 * Miscellaneous changes:
 
diff --git a/THANKS b/THANKS
index 1094bec..8baf7f4 100644
--- a/THANKS
+++ b/THANKS
@@ -67,6 +67,7 @@
   their time and energy in helping to track down bugs, port to new systems,
   and generally assist in the libtool maintainership process:
 
+  Alan Hourihane		alanh@fairlite.co.uk
   Alexei Sheplyakov		varg@theor.jinr.ru
   Alon Bar-Lev			alon.barlev@gmail.com
   Andreas Schwab		schwab@suse.de
@@ -75,9 +76,11 @@
   Brad Smith			brad@comstyle.com
   Brian Barrett			brbarret@osl.iu.edu
   Bruno Haible			haible@ilog.fr
+  Camilo La Rota		camilo.larota@ens-lyon.fr
   Carl D. Roth			roth@cse.ucsc.edu
   Chris P. Ross			cross@eng.us.uu.net
   Christian Biesinger		cbiesinger@web.de
+  Christian Rössel		christian.roessel@gmx.de
   Christoph Egger		Christoph_Egger@gmx.de
   Christopher Hulbert		cchgroupmail@gmail.com
   Craig Tierney			Craig.Tierney@noaa.gov
@@ -85,6 +88,7 @@
   Daniel Reed			n@ml.org
   Daniel Richard G.		skunk@iSKUNK.ORG
   DJ Delorie			dj@delorie.com
+  Donn Washburn			n5xwb@comcast.net
   Edouard G. Parmelan		Edouard.Parmelan@France.NCR.COM
   Erez Zadok			ezk@shekel.mcl.cs.columbia.edu
   Eric Estievenart		eric@via.ecp.fr
@@ -104,12 +108,16 @@
   Joel N. Weber II		devnull@gnu.org
   Joerg Sonnenberger		joerg@netbsd.org
   John Bowler			jbowler@acm.org
+  John R. Cary			cary@txcorp.com
   John Wolfe			jlw@sco.com
+  Josh Hursey			jjhursey@open-mpi.org
   Joseph Beckenbach III		jrb3@best.com
+  Lennart Poettering		lennart@poettering.net
   Karl Berry			karl@freefriends.org
   Kenneth Albanowski		kjahds@kjahds.com
   Kevin Ryde			user42@zip.com.au
   Kurt D. Zeilenga		Kurt@OpenLDAP.Org
+  Maciej Helminiak		dion2@wp.pl
   Maciej W. Rozycki		macro@linux-mips.org
   Manfred Weichel		Manfred.Weichel@pdb.siemens.de
   Marc Espie			espie@nerim.net
@@ -122,16 +130,20 @@
   Nix				nix@esperi.org.uk
   Olaf Lenz			olenz@fias.uni-frankfurt.de
   Olly Betts			olly@muscat.co.uk
+  Patrice Fromy			patrice.fromy@u-psud.fr
   Patrick Welche		prlw1@newn.cam.ac.uk
   Paul Biggar			paul.biggar@gmail.com
   Paul Eggert			eggert@twinsun.com
   Peter Eisentraut		peter_e@gmx.net
   Peter Jeremy			peterjeremy@optushome.com.au
   Peter Kjellerstedt		peter.kjellerstedt@axis.com
+  Rainer Emrich			r.emrich@de.tecosim.com
   Rainer Orth			ro@TechFak.Uni-Bielefeld.DE
   Rainer Tammer			tammer@tammer.net
   Ralf Menzel			menzel@ls6.cs.uni-dortmund.de
   Richard Purdie		rpurdie@rpsys.net
+  Richard Sandiford		richards@transitive.com
+  Robert Garron			Robert.Garron@Access3000.net
   Robert Millan			rmh@aybabtu.com
   Robert Ögren			lists@roboros.com
   Roberto Bagnara		bagnara@cs.unipr.it
diff --git a/bootstrap b/bootstrap
index 0b3648f..d505c36 100755
--- a/bootstrap
+++ b/bootstrap
@@ -132,9 +132,9 @@ $SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes > Makefile
 # configure, and ltversion.m4 to generate configure in the first place:
 rm -f $auxdir/ltmain.sh $m4dir/ltversion.m4
 
-$MAKE ./$auxdir/ltmain.sh ./$m4dir/ltversion.m4 ./doc/notes.txt \
+$MAKE ./$auxdir/ltmain.sh ./$m4dir/ltversion.m4 \
     ./libtoolize.in ./tests/defs.in ./tests/package.m4 \
-    ./tests/testsuite ./libltdl/Makefile.am \
+    ./tests/testsuite ./libltdl/Makefile.am ./doc/notes.txt \
     srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" \
     PACKAGE_BUGREPORT="bug-$2@gnu.org" M4SH="$AUTOM4TE --language=m4sh" \
     AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO" \
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 624f414..610117e 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -3119,7 +3119,7 @@ Also the only thing that must go outside the
 @code{BEGIN_C_DECLS}/@code{END_C_DECLS} pair are @code{#include} lines.
 Strictly speaking it is only C symbol names that need to be protected,
 but your header files will be more maintainable if you have a single
-pair of of these macros around the majority of the header contents.
+pair of these macros around the majority of the header contents.
 
 You should use these definitions of @code{PARAMS}, @code{BEGIN_C_DECLS},
 and @code{END_C_DECLS} into your own headers.  Then, you may use them to
@@ -3353,7 +3353,7 @@ though Libtool takes care of that detail if you use
 An array of @var{lt_symbol} structures, representing all the preloaded
 symbols linked into the program proper.  For each module
 @option{-dlpreopen}ed by the Libtool linked program
-there is an element with the @var{name} of the module and a @var{address}
+there is an element with the @var{name} of the module and an @var{address}
 of @code{0}, followed by all symbols exported from this file.
 For the executable itself the special name @samp{@@PROGRAM@@} is used.
 The last element of all has a @var{name} and @var{address} of
@@ -5226,6 +5226,74 @@ directory, except that Fortran 90 is used in combination with the
 
 @end table
 
+The new, Autotest-based test suite uses keywords to classify certain
+test groups:
+
+@table @samp
+@item CXX
+@itemx F77
+@itemx FC
+@itemx GCJ
+The test group exercises one of these @command{libtool} language tags.
+
+@item autoconf
+@itemx automake
+These keywords denote that the respective external program is needed
+by the test group.  The tests are typically skipped if the program is
+not installed.  The @samp{automake} keyword may also denote use of the
+@command{aclocal} program.
+
+@item interactive
+This test group may require user interaction on some systems.  Typically,
+this means closing a popup window about a DLL load error on Windows.
+
+@item libltdl
+Denote that the @file{libltdl} library is exercised by the test group.
+
+@item libtool
+@itemx libtoolize
+Denote that the @command{libtool} or @command{libtoolize} scripts are
+exercised by the test group, respectively.
+
+@item recursive
+Denote that this test group may recursively re-invoke the test suite
+itself, with changed settings and maybe a changed @command{libtool}
+script.  You may use the @env{INNER_TESTSUITEFLAGS} variable to pass
+additional settings to this recursive invocation.  Typically, recursive
+invocations delimit the set of tests with another keyword, for example
+by passing @code{-k libtool} right before the expansion of the
+@env{INNER_TESTSUITEFLAGS} variable (without an intervening space, so
+you get the chance for further delimitation).
+
+Test groups with the keyword @samp{recursive} should not be denoted with
+keywords, in order to avoid infinite recursion.  As a consequence,
+recursive test groups themselves should never require user interaction,
+while the test groups they invoke may do so.
+@end table
+
+For example, in order to avoid any interactive test groups, you could
+use this:
+
+@smallexample
+make check-local \
+  TESTSUITEFLAGS='-k !interactive INNER_TESTSUITEFLAGS=",!interactive"'
+@end smallexample
+
+@noindent
+while to run only those test groups, you would use this:
+
+@smallexample
+make check-local \
+  TESTSUITEFLAGS='-k interactive -k recursive INNER_TESTSUITEFLAGS=,interactive'
+@end smallexample
+
+@noindent
+but the convenience targets @samp{check-interactive} and
+@samp{check-noninteractive} avoid needing to remember these complex
+commands, in addition to also disabling interactive tests in the old
+test suite.
+
+
 @node When tests fail
 @subsection When tests fail
 @cindex failed tests
@@ -5765,6 +5833,11 @@ these commands, libtool will proceed to link against @var{$objdir/$newlib}
 instead of @var{soname}.
 @end defvar
 
+@defvar lock_old_archive_extraction
+Set to @samp{yes} if the extraction of a static library requires locking
+the library file.  This is required on Darwin.
+@end defvar
+
 @defvar archiver_list_spec
 How to feed a file listing to the archiver.
 @end defvar
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 392145a..40ff9d3 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -2001,6 +2001,10 @@ func_generate_dlsyms ()
 extern \"C\" {
 #endif
 
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
 /* External symbol declarations for the compiler. */\
 "
 
@@ -2278,13 +2282,18 @@ func_extract_an_archive ()
     f_ex_an_ar_dir="$1"; shift
     f_ex_an_ar_oldlib="$1"
     if test "X$ar_extract_one_by_one" != "Xyes"; then
-      func_show_eval "(cd \$f_ex_an_ar_dir && $AR ${AR_XFLAGS}${AR_SEP}\"\$f_ex_an_ar_oldlib\")" 'exit $?'
+      func_show_eval "(cd \$f_ex_an_ar_dir && $AR ${AR_XFLAGS}${AR_SEP}\"\$f_ex_an_ar_oldlib\")" \
+		     'stat=$?; rm -f "$lockfile"; exit $stat'
     else
       $AR ${AR_TFLAGS}${AR_SEP}"$f_ex_an_ar_oldlib" | while read name
       do
-	func_show_eval "(cd \$f_ex_an_ar_dir && $AR ${AR_XFLAGS}${AR_SEP}\$name \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+	func_show_eval "(cd \$f_ex_an_ar_dir && $AR ${AR_XFLAGS}${AR_SEP}\$name \"\$f_ex_an_ar_oldlib\")" \
+		       'stat=$?; rm -f "$lockfile"; exit $stat'
       done
     fi
+    if test "$lock_old_archive_extraction" = yes; then
+      $opt_dry_run || rm -f "$lockfile"
+    fi
     if ($AR ${AR_TFLAGS}${AR_SEP}"$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
      :
     else
@@ -2800,9 +2809,7 @@ EOF
 #include <assert.h>
 #include <string.h>
 #include <ctype.h>
-#ifndef __MINGW32CE__
-# include <errno.h>
-#endif
+#include <errno.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 
@@ -2832,7 +2839,7 @@ int setenv (const char *, const char *, int);
 #  define _INTPTR_T_DEFINED
 #  define intptr_t int
 # endif
-#elif defined(__MINGW32__) && !defined(__MINGW32CE__)
+#elif defined(__MINGW32__)
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
@@ -2930,10 +2937,6 @@ char *strendzap (char *str, const char *pat);
 void lt_fatal (const char *message, ...);
 void lt_setenv (const char *name, const char *value);
 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
 void lt_update_exe_path (const char *name, const char *value);
 void lt_update_lib_path (const char *name, const char *value);
 char **prepare_spawn (char **argv);
@@ -2990,18 +2993,6 @@ static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
 
 static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
 
-static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
-  /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
-  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
-  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
-
 int
 main (int argc, char *argv[])
 {
@@ -3126,51 +3117,6 @@ EOF
   newargc=0;
   for (i = 1; i < argc; i++)
     {
-      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
-        {
-          if (argv[i][env_set_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_set_opt_len + 1;
-              lt_opt_process_env_set (p);
-            }
-          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_set (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_set_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
-        {
-          if (argv[i][env_prepend_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_prepend_opt_len + 1;
-              lt_opt_process_env_prepend (p);
-            }
-          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_prepend_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
-        {
-          if (argv[i][env_append_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_append_opt_len + 1;
-              lt_opt_process_env_append (p);
-            }
-          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_append (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_append_opt);
-          continue;
-        }
       if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
         {
           /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
@@ -3207,11 +3153,7 @@ EOF
   if (rval == -1)
     {
       /* failed to start process */
-#ifndef __MINGW32CE__
       LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
-#else
-      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\"\n", lt_argv_zero));
-#endif
       return 127;
     }
   return rval;
@@ -3440,12 +3382,8 @@ chase_symlinks (const char *pathspec)
 	}
       else
 	{
-#ifndef __MINGW32CE__
 	  char *errstr = strerror (errno);
 	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
-#else
-	  lt_fatal ("Error accessing file %s", tmp_pathspec);
-#endif
 	}
     }
   XFREE (tmp_pathspec);
@@ -3555,89 +3493,6 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
   return new_value;
 }
 
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
-  const char *p;
-  int len;
-  if (!arg || !*arg)
-    return 1;
-
-  p = strchr (arg, (int)'=');
-
-  if (!p)
-    return 1;
-
-  *value = xstrdup (++p);
-
-  len = strlen (arg) - strlen (*value);
-  *name = XMALLOC (char, len);
-  strncpy (*name, arg, len-1);
-  (*name)[len - 1] = '\0';
-
-  return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
-    }
-
-  lt_setenv (name, value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 0);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 1);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
 void
 lt_update_exe_path (const char *name, const char *value)
 {
@@ -4500,7 +4355,7 @@ func_mode_link ()
 	for flag in $args; do
 	  IFS="$save_ifs"
           func_quote_for_eval "$flag"
-	  arg="$arg $wl$func_quote_for_eval_result"
+	  arg="$arg $func_quote_for_eval_result"
 	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
 	done
 	IFS="$save_ifs"
@@ -4556,8 +4411,9 @@ func_mode_link ()
       # -F/path gives path to uninstalled frameworks, gcc on darwin
       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
       # @file GCC response files
+      # -tp=* Portland pgcc target processor selection
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
         func_quote_for_eval "$arg"
 	arg="$func_quote_for_eval_result"
         func_append compile_command " $arg"
@@ -5995,7 +5851,7 @@ func_mode_link ()
 	    age="$number_minor"
 	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
+	  freebsd-aout|freebsd-elf|qnx|sunos)
 	    current="$number_major"
 	    revision="$number_minor"
 	    age="0"
@@ -7542,15 +7398,15 @@ EOF
 
       wrappers_required=yes
       case $host in
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
       *cygwin* | *mingw* )
         if test "$build_libtool_libs" != yes; then
           wrappers_required=no
         fi
         ;;
-      *cegcc*)
-        # Disable wrappers for cegcc, we are cross compiling anyway.
-        wrappers_required=no
-        ;;
       *)
         if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
           wrappers_required=no
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 2da617e..1a2d7d4 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -860,11 +860,13 @@ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
 
 # _LT_TAG_COMPILER
@@ -969,6 +971,29 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	[lt_cv_ld_exported_symbols_list=no])
 	LDFLAGS="$save_LDFLAGS"
     ])
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err conftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
@@ -996,7 +1021,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
     else
       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -1016,7 +1041,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
@@ -1160,7 +1189,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     if test "$lt_cv_prog_gnu_ld" = yes; then
       case `/usr/bin/file conftest.$ac_objext` in
@@ -1376,10 +1405,19 @@ if test -n "$RANLIB"; then
   esac
   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
 _LT_DECL([], [old_postinstall_cmds], [2])
 _LT_DECL([], [old_postuninstall_cmds], [2])
 _LT_TAGDECL([], [old_archive_cmds], [2],
     [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
 ])# _LT_CMD_OLD_ARCHIVE
 
 
@@ -1404,11 +1442,11 @@ AC_CACHE_CHECK([$1], [$2],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -1515,6 +1553,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -1672,7 +1715,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* 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))
+void fnord () __attribute__((visibility("default")));
+#endif
+
+void fnord () { int i=42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -1681,7 +1730,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -1857,11 +1910,11 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -2034,7 +2087,11 @@ if test "$GCC" = yes; then
     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
     *) lt_awk_arg="/^libraries:/" ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
   case $lt_search_path_spec in
   *\;*)
     # if the path contains ";" then we assume it to be the separator
@@ -2079,6 +2136,12 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 }'`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+  esac
   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
@@ -2221,26 +2284,12 @@ cygwin* | mingw* | pw32* | cegcc*)
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $SED '/^libraries:/!d; s///; s,=/,/,g'`
-      case $sys_lib_search_path_spec in
-      *\;[c-zC-Z]:*)
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-        ;;
-      *)
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-	;;
-      esac
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
@@ -2504,7 +2553,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -2851,6 +2900,7 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],
@@ -3085,11 +3135,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -3297,13 +3347,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
   [lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
   cat conftest.out >&AS_MESSAGE_LOG_FD
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -3497,7 +3547,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
 	mv -f "$nlist"T "$nlist"
@@ -3806,8 +3856,8 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 	    ;;
-	  xlc* | xlC*)
-	    # IBM XL 8.0 on PPC
+	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
@@ -4090,8 +4140,8 @@ m4_if([$1], [CXX], [
         # All Alpha code is PIC.
         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
@@ -4250,8 +4300,10 @@ m4_if([$1], [CXX], [
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
     # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
@@ -4334,7 +4386,33 @@ dnl Note also adjust exclude_expsyms for C++ above.
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
   if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
@@ -4367,11 +4445,12 @@ dnl Note also adjust exclude_expsyms for C++ above.
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -4407,6 +4486,7 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -4472,7 +4552,7 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 	  tmp_sharedflag='--shared' ;;
-	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
 	esac
@@ -4494,7 +4574,7 @@ _LT_EOF
         fi
 
 	case $cc_basename in
-	xlf*)
+	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
@@ -4625,8 +4705,10 @@ _LT_EOF
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
 	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
@@ -4730,8 +4812,13 @@ _LT_EOF
 	  # -berok will link without error, but may produce a broken library.
 	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  if test "$with_gnu_ld" = yes; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  fi
 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 	  # This is similar to how AIX traditionally builds its shared libraries.
 	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS$AR_SEP$output_objdir/$libname$release.a $output_objdir/$soname'
@@ -5462,37 +5549,21 @@ CC="$lt_save_CC"
 ])# _LT_LANG_C_CONFIG
 
 
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
 # _LT_LANG_CXX_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
 # the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
 
 AC_LANG_PUSH(C++)
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -5745,8 +5816,13 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # -berok will link without error, but may produce a broken library.
 	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	    # Exported symbols can be pulled into shared objects from archives
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    if test "$with_gnu_ld" = yes; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    fi
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 	    # This is similar to how AIX traditionally builds its shared
 	    # libraries.
@@ -5826,6 +5902,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 	  # as there is no search path for DLLs.
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	  _LT_TAGVAR(always_export_symbols, $1)=no
 	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -6147,7 +6224,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # dependencies.
 	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
 	    ;;
-	  xl*)
+	  xl* | mpixl* | bgxl*)
 	    # IBM XL 8.0 on PPC, with GNU ld
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -6764,32 +6841,16 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 ])# _LT_SYS_HIDDEN_LIBDEPS
 
 
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
 # _LT_LANG_F77_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6909,32 +6970,17 @@ AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
 
 
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
 # _LT_LANG_FC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
diff --git a/libltdl/m4/lt~obsolete.m4 b/libltdl/m4/lt~obsolete.m4
index b60bbd2..bf92b5e 100644
--- a/libltdl/m4/lt~obsolete.m4
+++ b/libltdl/m4/lt~obsolete.m4
@@ -77,7 +77,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
 m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
 m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
@@ -92,3 +91,8 @@ 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])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index 27f17a7..bff700a 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -1021,6 +1021,7 @@ func_install_update ()
     $opt_debug
     my_sed_install='
 	/^scriptversion='\''*[0-9][1-9.-]*'\''*/ {
+	    s,[#;].*,,
 	    s,^scriptversion='\''*\([0-9.-]*\)'\''*,\1,
 	    s/-/./g
 	    p
diff --git a/tests/configure-iface.at b/tests/configure-iface.at
index 77e2ebc..2071646 100644
--- a/tests/configure-iface.at
+++ b/tests/configure-iface.at
@@ -127,6 +127,9 @@ SUBDIRS			= libltdl
 AM_CPPFLAGS		= $(LTDLINCL)
 
 lib_LTLIBRARIES		= libmodule.la
+# Automake < 1.8 will use libmodule.la.c as default source,
+# while newer will choose libmodule.c; so specify it here.
+libmodule_la_SOURCES	= libmodule.c
 libmodule_la_LDFLAGS	= -module
 
 bin_PROGRAMS		= main
@@ -196,6 +199,9 @@ AT_DATA([Makefile.am],
 AM_CPPFLAGS		= $(LTDLINCL)
 
 lib_LTLIBRARIES		= libmodule.la
+# Automake < 1.8 will use libmodule.la.c as default source,
+# while newer will choose libmodule.c; so specify it here.
+libmodule_la_SOURCES	= libmodule.c
 libmodule_la_LDFLAGS	= -module
 
 bin_PROGRAMS		= main
@@ -204,6 +210,18 @@ main_LDADD		= $(LIBLTDL)
 main_DEPENDENCIES	= $(LTDLDEPS) libmodule.la
 ]])
 
+## Try to avoid linking against a previously installed libltdl found
+## with an explicit -L/path.
+save_LDFLAGS=$LDFLAGS
+LDFLAGS=
+for l in $save_LDFLAGS
+do
+  case $l in
+  -L*) ;;
+  *) LDFLAGS="$LDFLAGS $l" ;;
+  esac
+done
+
 # We don't use 'libtoolize --ltdl', so that we get an error if the test
 # tries to build and link against its own ltdl sources:
 LT_AT_BOOTSTRAP([], [-I _inst/aclocal], [], [--add-missing], [],
@@ -250,6 +268,9 @@ SUBDIRS			= libltdl
 AM_CPPFLAGS		= $(LTDLINCL)
 
 lib_LTLIBRARIES		= libmodule.la
+# Automake < 1.8 will use libmodule.la.c as default source,
+# while newer will choose libmodule.c; so specify it here.
+libmodule_la_SOURCES	= libmodule.c
 libmodule_la_LDFLAGS	= -module
 
 bin_PROGRAMS		= main
diff --git a/tests/darwin.at b/tests/darwin.at
index 6284116..bb71207 100644
--- a/tests/darwin.at
+++ b/tests/darwin.at
@@ -1,6 +1,6 @@
 # darwin.at - tests specific to Mac OS X
 #
-#   Copyright (C) 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 #   Written by Peter O'Gorman, 2008
 #
 #   This file is part of GNU Libtool.
@@ -98,3 +98,109 @@ AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC  -o main$EXEEXT $CPPFLAGS $CFLAGS $L
 
 PATH=$save_PATH
 AT_CLEANUP
+
+
+AT_SETUP([darwin concurrent library extraction])
+
+AT_DATA([foo.c], [[
+int foo (void) { return 0; }
+]])
+
+AT_DATA([bar.c], [[
+extern int foo1 (void);
+int bar (void) { return foo1 (); }
+]])
+cp bar.c baz.c
+
+objects=
+for obj in 1 2 3 4 5 6 7 8; do
+  sed "s/foo/foo$obj/" < foo.c > foo$obj.c
+  AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c],
+	   [], [ignore], [ignore])
+  objects="$objects foo$obj.lo"
+done
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects],
+	 [], [ignore], [ignore])
+
+# Hypothesis: concurrent convenience archive extraction works.
+for i in 1 2 3 4 5; do
+  rm -f libbar.la libbaz.la
+  AT_CHECK([($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS ]dnl
+	   [  -o libbar.la bar.lo -rpath /foo libfoo.la) & ]dnl
+	   [($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS ]dnl
+	   [  -o libbaz.la baz.lo -rpath /foo libfoo.la) & ]dnl
+	   [wait; test -f libbar.la && test -f libbaz.la],
+	   [], [ignore], [ignore])
+done
+
+# Hypothesis: the lock is not used in dry run mode.
+eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
+# Next line is internal detail.
+lockfile=$objdir/libfoo.a.lock
+echo stamp > $lockfile
+AT_CHECK([$LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS ]dnl
+	 [ -o libbar.la bar.lo -rpath /foo libfoo.la],
+	 [], [ignore], [ignore])
+AT_CHECK([grep stamp $lockfile], [], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([darwin gdb debug information])
+
+AT_CHECK([gdb --version || (exit 77)],[ignore],[ignore],[ignore])
+
+AT_DATA([foo.c], [[
+int foo (void) { return 0; }
+]])
+
+AT_DATA([bar.c], [[
+extern int foo (void);
+int bar (void) { return foo (); }
+]])
+
+AT_DATA([main.c], [[
+extern int bar(void);
+
+int main() { return bar();}
+]])
+
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c],
+	 [], [ignore], [ignore])
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo],
+	 [], [ignore], [ignore])
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS ]dnl
+	 [  -o libbar.la bar.lo -rpath /foo libfoo.la ],
+	 [], [ignore], [ignore])
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS ]dnl
+	 [  -o main main.lo libbar.la],[], [ignore], [ignore])
+AT_CHECK([echo quit | $LIBTOOL --mode=execute gdb main],
+	 [ignore], [ignore], [stderr])
+
+AT_CHECK([grep 'Could not find object file' stderr],[1],[ignore],[ignore])
+
+AT_XFAIL_IF([
+eval "`$LIBTOOL --config | $EGREP '^(whole_archive_flag_spec)='`"
+case $whole_archive_flag_spec:$host_os in
+:darwin*) : ;;
+*) false ;;
+esac ])
+
+# Remove any dSYM bundle
+rm -rf .libs/*.dSYM
+
+AT_CHECK([echo quit | $LIBTOOL --mode=execute gdb main],
+	 [ignore], [ignore], [stderr])
+AT_CHECK([grep 'Could not find object file' stderr],[1],[ignore],[ignore])
+
+AT_CLEANUP
diff --git a/tests/execute-mode.at b/tests/execute-mode.at
index 0fba29c..a1f2017 100644
--- a/tests/execute-mode.at
+++ b/tests/execute-mode.at
@@ -110,6 +110,7 @@ int main (int argc, char **argv)
 }
 ]])
 
+LDFLAGS="$LDFLAGS -no-undefined"
 instdir=`pwd`/inst
 libdir=$instdir/lib
 
@@ -211,7 +212,7 @@ do
 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])
+AT_CHECK([$LIBTOOL --mode=execute echo ./main$EXEEXT 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])
diff --git a/tests/fail.at b/tests/fail.at
index fb05f8c..cec954b 100644
--- a/tests/fail.at
+++ b/tests/fail.at
@@ -50,15 +50,20 @@ FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c])
 AT_CHECK([test -f a.lo], [1])
 
 # non-PIC compile failure
-case $pic_mode in default | yes)
-  case $build_old_libs,$pic_flag in yes,*-DPIC*)
-    AT_DATA([a.c], [[
+case $pic_mode in default | no)
+  case " $CFLAGS " in
+   *\ -prefer-pic\ *) ;;
+   *)
+    case $build_old_libs,$pic_flag in yes,*-DPIC*)
+      AT_DATA([a.c], [[
 #ifndef PIC
   choke me
 #endif
 ]])
-    FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c])
-    AT_CHECK([test -f a.lo], [1])
+      FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c])
+      AT_CHECK([test -f a.lo], [1])
+      ;;
+    esac
     ;;
   esac
   ;;
diff --git a/tests/flags.at b/tests/flags.at
new file mode 100644
index 0000000..eceda74
--- /dev/null
+++ b/tests/flags.at
@@ -0,0 +1,103 @@
+# flags.at -- libtool passing of flags             -*- 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.
+####
+
+m4_foreach([lt_tag], [CC, CXX, F77, FC, GCJ],
+[AT_SETUP([passing lt_tag flags through libtool])
+AT_KEYWORDS([libtool])
+LT_AT_TAG([lt_tag])
+
+LDFLAGS="$LDFLAGS -no-undefined"
+eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
+
+m4_case(lt_tag,
+[CC], [AT_DATA([a.c],
+[[int main () { return 0; }
+]])
+compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c
+],
+[CXX], [AT_DATA([a.cpp],
+[[int main () { return 0; }
+]])
+compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp
+],
+[F77], [AT_DATA([a.f],
+[[      program main
+      end
+]])
+compile="$F77 $FFLAGS" link="$F77 $FFLAGS $LDFLAGS" source=a.f
+],
+[FC], [AT_DATA([a.f90],
+[[      program main
+      end
+]])
+compile="$FC $FCFLAGS" link="$FC $FCFLAGS $LDFLAGS" source=a.f90
+],
+[GCJ], [AT_DATA([a.java],
+[[class a {}
+]])
+compile="$GCJ $GCJFLAGS" link="$GCJ $GCJFLAGS $LDFLAGS" source=a.java
+])
+
+# Linker flags are not passed to the archiver, so don't test static libraries.
+if $LIBTOOL --features | grep 'enable shared libraries'; then
+  library_and_module='library.la "module.la -module -avoid-version"'
+else
+  library_and_module=
+fi
+
+eval "`$LIBTOOL --tag=lt_tag --config | $EGREP '^(wl|archive_cmds)='`"
+
+AT_CHECK([$LIBTOOL --tag=lt_tag --mode=compile $compile -c $source],
+	 [], [ignore], [ignore])
+
+# Linker flags are prefixed with ${wl} iff they are passed to the
+# compiler driver, instead of directly to the linker.
+case $archive_cmds in
+*\$LD*\$linker_flags*) maybe_wl= ;;
+*) maybe_wl=$wl ;;
+esac
+
+for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
+  case $flag in
+  -Wc, | -Xcompiler\ )
+    AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=compile $compile ]dnl
+	     [$flag-foo -c $source], [], [stdout], [ignore])
+    AT_CHECK([$FGREP " -foo" stdout], [], [ignore])
+    flag_prefix=
+    ;;
+  -Wl, | -Xlinker\ )
+    flag_prefix=$maybe_wl
+    ;;
+  esac
+
+  eval set program$EXEEXT "$library_and_module"
+  for output
+  do
+    AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=link $link ]dnl
+	     [-o $output a.lo -rpath /nowhere $flag-foo], [], [stdout], [ignore])
+    AT_CHECK([$FGREP " $flag_prefix-foo" stdout], [], [ignore])
+  done
+done
+
+AT_CLEANUP
+])dnl m4_foreach(tag)
diff --git a/tests/link-order2.at b/tests/link-order2.at
index 57ff4a0..a6eea0e 100644
--- a/tests/link-order2.at
+++ b/tests/link-order2.at
@@ -45,6 +45,7 @@
 
 AT_SETUP([Link order of deplibs])
 AT_KEYWORDS([libtool])
+AT_KEYWORDS([interactive])dnl running 'wrong' may cause a popup window.
 
 eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='`
 
diff --git a/tests/localization.at b/tests/localization.at
index 119b38d..71cdad4 100644
--- a/tests/localization.at
+++ b/tests/localization.at
@@ -49,6 +49,16 @@ AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || exit
 	 [1], [stdout], [stderr])
 LT_AT_NORMALIZE_COMPILER_OUTPUT([stdout], [libtool-stdout])
 LT_AT_NORMALIZE_COMPILER_OUTPUT([stderr], [libtool-stderr])
+# Avoid these errors:
+# GNU/Linux:
+#   /bin/sh: warning: setlocale: LC_ALL: cannot change locale (de_DE)
+# HP-UX:
+#   Warning! One or more of your selected locales are not available.
+#   Please invoke the commands "locale" and "locale -a" to verify your
+#   selections and the available locales.
+#
+#   Continuing processing using the "C" locale.
+AT_CHECK([grep locale stdout stderr && exit 77], [1])
 AT_CHECK([diff expected-stderr libtool-stderr])
 AT_CHECK([diff expected-stdout libtool-stdout])
 
diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at
index 3bf9bee..cdbe91d 100644
--- a/tests/lt_dladvise.at
+++ b/tests/lt_dladvise.at
@@ -1,6 +1,6 @@
 # lt_dladvise.at -- test libltdl functionality                -*- Autotest -*-
 #
-#   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2007
 #
 #   This file is part of GNU Libtool.
@@ -318,8 +318,11 @@ dlpreloadable='preload'
 # are reporting not able to accept the global hint to lt_dlopenadvise().    #
 # ------------------------------------------------------------------------- #
 
-case $host_os in
-cygwin* | mingw* | cegcc*)
+have_shared=false
+$LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=:
+
+case $host_os,$have_shared in
+cygwin* | mingw* | cegcc* | *,false)
   # These hosts do not support linking without -no-undefined
   CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
   ;;
diff --git a/tests/nonrecursive.at b/tests/nonrecursive.at
index 0ccabe8..d37ec05 100644
--- a/tests/nonrecursive.at
+++ b/tests/nonrecursive.at
@@ -1,6 +1,6 @@
 # nonrecursive.at -- test nonrecursive Automake Libltdl       -*- Autotest -*-
 #
-#   Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2005
 #
 #   This file is part of GNU Libtool.
@@ -46,7 +46,7 @@ AC_OUTPUT
 
 AT_DATA([Makefile.am],
 [[ACLOCAL_AMFLAGS = -I ltdl/m4
-AUTOMAKE_OPTIONS	= 1.7
+AUTOMAKE_OPTIONS	= 1.9.6
 BUILT_SOURCES		=
 
 AM_CPPFLAGS		=
diff --git a/tests/old-m4-iface.at b/tests/old-m4-iface.at
index 1e374d4..cb823a2 100644
--- a/tests/old-m4-iface.at
+++ b/tests/old-m4-iface.at
@@ -1,6 +1,6 @@
 # old-m4-iface.at -- exercise old m4 interface to libtool     -*- Autotest -*-
 #
-#   Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2005
 #
 #   This file is part of GNU Libtool.
@@ -143,7 +143,7 @@ module.la: module.lo
 	$(LTLINK) module.lo -module -avoid-version -rpath /dev/null
 
 ltdldemo@EXEEXT@: main.@OBJEXT@ module.la libltdl/libltdlc.la
-	$(LTLINK) main.@OBJEXT@ -dlopen module.la @LIBLTDL@
+	$(LTLINK) main.@OBJEXT@ -dlopen module.la @LIBLTDL@ @LIBS@
 
 .SUFFIXES:
 .SUFFIXES: .c .@OBJEXT@ .lo
@@ -155,8 +155,10 @@ ltdldemo@EXEEXT@: main.@OBJEXT@ module.la libltdl/libltdlc.la
 	$(LTCOMPILE) -c -o $@ $<
 ]])
 
+# Be sure to use the in-tree libltdl, somebody might have removed
+# an installed libltdl.la file.
 LT_AT_BOOTSTRAP([--ltdl --install], [-I libltdl/m4], [ignore], [ignore],
-	[--force])
+	[--force], [--with-included-ltdl])
 
 LT_AT_EXEC_CHECK([./ltdldemo], 0, [ignore])
 
diff --git a/tests/static.at b/tests/static.at
index 68dab5a..dfa4c42 100644
--- a/tests/static.at
+++ b/tests/static.at
@@ -67,6 +67,7 @@
 
 AT_SETUP([static linking flags for programs])
 AT_KEYWORDS([libtool])
+AT_KEYWORDS([interactive])dnl Some of the exec_fail test cause popups with MinGW.
 
 LDFLAGS="$LDFLAGS -no-undefined"
 prefix=`pwd`/inst
diff --git a/tests/versioning.at b/tests/versioning.at
new file mode 100644
index 0000000..136a549
--- /dev/null
+++ b/tests/versioning.at
@@ -0,0 +1,239 @@
+# versioning.at -- test libtool versioning           -*- 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([versioning])
+AT_KEYWORDS([libtool])
+
+eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
+
+# Setup some library and program sources:
+# a library (a1), a new revision (a2), a compatible update (a3),
+# an incompatible update (a4).
+# Another library (libb) using liba, and a couple of programs,
+# using liba directly and indirectly through libb.
+
+AT_DATA([liba1.c], [[
+int a (void)
+{
+  return 0;
+}
+]])
+
+AT_DATA([liba2.c], [[
+/* The internal detail should be static.  It isn't static in this test,
+   so we can later find out that it's this revision of the library. */
+int internal_detail = 42;
+int a (void)
+{
+  return internal_detail - 42;
+}
+]])
+
+AT_DATA([liba3.c], [[
+int a (void)
+{
+  return 0;
+}
+int aa (void)
+{
+  return 0;
+}
+]])
+
+AT_DATA([liba4.c], [[
+int aa (void)
+{
+  return 0;
+}
+]])
+
+AT_DATA([libb.c], [[
+extern int a (void);
+int b (void)
+{
+  return a ();
+}
+]])
+
+AT_DATA([prog1.c], [[
+extern int a (void);
+int main (void)
+{
+  return a ();
+}
+]])
+
+AT_DATA([prog2.c], [[
+extern int b (void);
+int main (void)
+{
+  return b ();
+}
+]])
+
+AT_DATA([prog3.c], [[
+extern int a (void), internal_detail;
+int main (void)
+{
+  return a () + internal_detail - 42;
+}
+]])
+
+
+inst=`pwd`/inst
+libdir=$inst/lib
+bindir=$inst/bin
+mkdir $inst $libdir $bindir
+
+for file in liba1.c liba2.c liba3.c liba4.c libb.c; do
+  $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
+done
+for file in prog1.c prog2.c prog3.c; do
+  $CC $CPPFLAGS $CFLAGS -c $file
+done
+
+# Setup is finished here.
+
+# Hypothesis: -version-info is ignored for convenience archives.
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo ]dnl
+	 [-version-info 0:0:0], [], [ignore], [stderr])
+AT_CHECK([grep 'version-info.*ignored for convenience' stderr], [], [ignore])
+
+# Hypothesis: the deprecated -version-number works.
+# Be sure not to use zero here, it's not portable.
+for version_number in 1 1:1 2:1 1:1:1 3:2:1; do
+  AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo ]dnl
+	   [-version-number $version_number -rpath $libdir], [], [ignore], [ignore])
+done
+
+# Hypothesis: -version-info can be passed kinds of values, esp. zero ones
+# and large ones.
+# TODO: check something like 1001:2419:189 after fixing issues
+# for `version_type's of `irix', `nonstopux', or `osf'.
+for version_info in 1 1:2 0:0:0 1:1:1 13:241:7; do
+  AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo ]dnl
+	   [-version-info $version_info -rpath $libdir], [], [ignore], [ignore])
+done
+
+# Hypothesis: we diagnose when AGE is higher than CURRENT.
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo ]dnl
+	 [-version-info 1:3:2 -rpath $libdir], [1], [ignore], [stderr])
+AT_CHECK([grep 'AGE.*is greater than' stderr], [], [ignore])
+
+# Hypothesis: we diagnose invalid values.
+for version_info in 1:2:3:4 -1 0:-1 0:0:-1; do
+  AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo ]dnl
+	   [-version-info $version_info -rpath $libdir], [1], [ignore], [ignore])
+done
+
+
+# Now, create an original version of the library and associated users.
+# This setup will be reused for further hypotheses below, and these
+# functions will be used to test working programs.
+
+test_uninstalled ()
+{
+  # temporarily move installed libraries out of the way in order to avoid
+  # skewing test results:
+  mv $libdir temp
+  LT_AT_EXEC_CHECK([./prog1])
+  LT_AT_EXEC_CHECK([./prog2])
+  mv temp $libdir
+}
+
+test_installed ()
+{
+  # temporarily move uninstalled libraries out of the way in order to avoid
+  # skewing test results:
+  mv $objdir temp
+  LT_AT_EXEC_CHECK([$bindir/prog1])
+  LT_AT_EXEC_CHECK([$bindir/prog2])
+  mv temp $objdir
+}
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo ]dnl
+	 [-version-info 0:0:0 -rpath $libdir], [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la ]dnl
+	 [-version-info 0:0:0 -rpath $libdir], [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT ]dnl
+	 [liba.la], [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT ]dnl
+	 [libb.la], [], [ignore], [ignore])
+test_uninstalled
+AT_CHECK([$LIBTOOL --mode=install cp liba.la libb.la $libdir],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=clean rm -f liba.la], [], [ignore], [ignore])
+test_installed
+AT_CHECK([$LIBTOOL --mode=uninstall rm -f $libdir/liba.la], [], [ignore], [ignore])
+
+
+# Hypothesis: library revision updates do not require (uninstalled
+# nor installed) programs to be relinked.
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo ]dnl
+	 [-version-info 0:1:0 -rpath $libdir], [], [ignore], [ignore])
+test_uninstalled
+AT_CHECK([$LIBTOOL --mode=install cp liba.la libb.la $libdir],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=clean rm -f liba.la], [], [ignore], [ignore])
+test_installed
+# do not uninstall here: the library may be reused in the next test.
+
+# Hypothesis: backward compatible library updates do not require
+# (uninstalled nor installed) programs to be relinked.
+# This can have one of several reasons:
+# - the soname is the difference between $current and $age, thus
+#   unchanged; in this case, the newly installed library will be used,
+# - the soname is only $current, or we are linking statically, in which case
+#   the old installed library code will be used,
+# - the numbers are not encoded at all, in which case the newly installed
+#   library will be used.
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo ]dnl
+	 [-version-info 1:0:1 -rpath $libdir], [], [ignore], [ignore])
+# Do not test the uninstalled program, it may be broken (in the second case).
+AT_CHECK([$LIBTOOL --mode=install cp liba.la libb.la $libdir],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=clean rm -f liba.la], [], [ignore], [ignore])
+test_installed
+# do not uninstall here: the library may be reused in the next test.
+
+
+# Hypothesis: with shared libraries, incompatible library updates
+# will not cause old installed programs (linked against the old
+# library version) to break.
+# This can have one of several reasons:
+# - the soname has changed, so the old installed library will still be
+#   available,
+# - we are linking statically, so the old library code will still be used.
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo ]dnl
+	 [-version-info 2:0:0 -rpath $libdir], [], [ignore], [ignore])
+# We do not guarantee that old versions of an uninstalled library are still
+# available, so test_uninstalled will not necessarily work here any more.
+AT_CHECK([$LIBTOOL --mode=install cp liba.la libb.la $libdir],
+	 [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=clean rm -f liba.la], [], [ignore], [ignore])
+test_installed
+
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Fri Sep 11 01:21:43 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MlyZr-00028q-7M
	for mharc-libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:43 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MlyZp-00027f-DW
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:41 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MlyZo-00026p-LN
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:40 -0400
Received: from [199.232.76.173] (port=52847 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MlyZn-00026L-VN
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:40 -0400
Received: from savannah.gnu.org ([199.232.41.3]:34953 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MlyZn-0002TH-HL
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:39 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MlyZn-00017S-3w
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 05:21:39 +0000
Received: from pekberg by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MlyZm-00016s-RZ
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 05:21:39 +0000
From: "Peter Rosin" <peda@lysator.liu.se>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/pr-msvc-support
X-Git-Reftype: branch
X-Git-Oldrev: dd42e63ce688302500f349606c55bf173feda3a4
X-Git-Newrev: 158ac1566d248296e4ddcd39fee6743b7ba3a07e
Message-Id: <E1MlyZm-00016s-RZ@cvs.savannah.gnu.org>
Date: Fri, 11 Sep 2009 05:21:38 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, pr-msvc-support,
	updated. v2.2.6-184-g158ac15
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 11 Sep 2009 05:21:41 -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  158ac1566d248296e4ddcd39fee6743b7ba3a07e (commit)
       via  3a4f0d3958890c6d3ac1ff626b17586845d262bb (commit)
      from  dd42e63ce688302500f349606c55bf173feda3a4 (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 158ac1566d248296e4ddcd39fee6743b7ba3a07e
Merge: dd42e63ce688302500f349606c55bf173feda3a4 3a4f0d3958890c6d3ac1ff626b17586845d262bb
Author: Peter Rosin <peda@lysator.liu.se>
Date:   Fri Sep 11 06:40:30 2009 +0200

    Merge branch 'master' into pr-msvc-support

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

Summary of changes:
 ChangeLog             |    7 +++++++
 libltdl/m4/libtool.m4 |    3 ++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d88355d..59892b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-10  Peter Rosin  <peda@lysator.liu.se>
+
+	func_win32_libid doesn't work with MS dumpbin
+	* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): The $NM
+	interface is assumed to be BSD nm in func_win32_libid, so
+	check for that before using it.
+
 2009-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	Allow dlopen self test to work with gcc's -fvisibility=hidden.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 1a2d7d4..861e21a 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -3088,7 +3088,8 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Fri Sep 11 01:21:45 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MlyZt-0002AX-P2
	for mharc-libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MlyZq-00028T-L1
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:42 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MlyZo-00026Z-H9
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:41 -0400
Received: from [199.232.76.173] (port=52848 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MlyZo-00026P-0F
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:40 -0400
Received: from savannah.gnu.org ([199.232.41.3]:34951 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MlyZn-0002T2-CC
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 01:21:39 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MlyZm-00016y-RL
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 05:21:38 +0000
Received: from pekberg by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MlyZm-00016M-H4
	for libtool-commit@gnu.org; Fri, 11 Sep 2009 05:21:38 +0000
From: "Peter Rosin" <peda@lysator.liu.se>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b03736353b6d478a68bfc19c017605eb21a3edce
X-Git-Newrev: 3a4f0d3958890c6d3ac1ff626b17586845d262bb
Message-Id: <E1MlyZm-00016M-H4@cvs.savannah.gnu.org>
Date: Fri, 11 Sep 2009 05:21:38 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-147-g3a4f0d3
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 11 Sep 2009 05:21:43 -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  3a4f0d3958890c6d3ac1ff626b17586845d262bb (commit)
      from  b03736353b6d478a68bfc19c017605eb21a3edce (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |    7 +++++++
 libltdl/m4/libtool.m4 |    3 ++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d3e924f..a12d764 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-10  Peter Rosin  <peda@lysator.liu.se>
+
+	func_win32_libid doesn't work with MS dumpbin
+	* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): The $NM
+	interface is assumed to be BSD nm in func_win32_libid, so
+	check for that before using it.
+
 2009-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	Allow dlopen self test to work with gcc's -fvisibility=hidden.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 662a88b..bebce6b 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -2989,7 +2989,8 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Sat Sep 12 01:35:01 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MmLGG-0001Yq-QU
	for mharc-libtool-commit@gnu.org; Sat, 12 Sep 2009 01:35:01 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MmLGE-0001Vg-7r
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 01:34:58 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MmLGC-0001TS-GA
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 01:34:56 -0400
Received: from [199.232.76.173] (port=37057 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MmLGC-0001T2-7F
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 01:34:56 -0400
Received: from savannah.gnu.org ([199.232.41.3]:39170 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MmLGB-0002dG-Vf
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 01:34:56 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MmLGB-0002Ls-DM
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 05:34:55 +0000
Received: from rwild by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MmLGA-0002LM-Hc
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 05:34:55 +0000
From: "Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 3a4f0d3958890c6d3ac1ff626b17586845d262bb
X-Git-Newrev: 55e9cc469d1c7af570db876238ce2a26cc9506ac
Message-Id: <E1MmLGA-0002LM-Hc@cvs.savannah.gnu.org>
Date: Sat, 12 Sep 2009 05:34:54 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-148-g55e9cc4
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 12 Sep 2009 05:34:58 -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  55e9cc469d1c7af570db876238ce2a26cc9506ac (commit)
      from  3a4f0d3958890c6d3ac1ff626b17586845d262bb (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 55e9cc469d1c7af570db876238ce2a26cc9506ac
Author: Akim Demaille <demaille@gostai.com>
Date:   Fri Sep 11 13:14:29 2009 +0200

    libtool: clean libconftest.a.
    
    * libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Here.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

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

Summary of changes:
 ChangeLog             |    5 +++++
 libltdl/m4/libtool.m4 |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a12d764..6dd49ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-11  Akim Demaille  <demaille@gostai.com>
+
+	libtool: clean libconftest.a.
+	* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Here.
+
 2009-09-10  Peter Rosin  <peda@lysator.liu.se>
 
 	func_win32_libid doesn't work with MS dumpbin
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index bebce6b..a8c186b 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -991,7 +991,7 @@ _LT_EOF
       else
 	cat conftest.err >&AS_MESSAGE_LOG_FD
       fi
-        rm -f conftest.err conftest.a conftest conftest.c
+        rm -f conftest.err libconftest.a conftest conftest.c
         rm -rf conftest.dSYM
     ])
     case $host_os in


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Sat Sep 12 02:23:28 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MmM1A-0005yQ-1v
	for mharc-libtool-commit@gnu.org; Sat, 12 Sep 2009 02:23:28 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MmM18-0005vs-77
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 02:23:26 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MmM16-0005uD-M0
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 02:23:25 -0400
Received: from [199.232.76.173] (port=49362 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MmM16-0005tt-Fu
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 02:23:24 -0400
Received: from savannah.gnu.org ([199.232.41.3]:58897 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MmM15-0001M0-Sg
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 02:23:24 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MmM15-0004SE-FW
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 06:23:23 +0000
Received: from rwild by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MmM15-0004Rj-4s
	for libtool-commit@gnu.org; Sat, 12 Sep 2009 06:23:23 +0000
From: "Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 55e9cc469d1c7af570db876238ce2a26cc9506ac
X-Git-Newrev: 6858ed03d8cb56d324283f18a18eee21468929ce
Message-Id: <E1MmM15-0004Rj-4s@cvs.savannah.gnu.org>
Date: Sat, 12 Sep 2009 06:23:23 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-149-g6858ed0
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 12 Sep 2009 06:23:26 -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  6858ed03d8cb56d324283f18a18eee21468929ce (commit)
      from  55e9cc469d1c7af570db876238ce2a26cc9506ac (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 6858ed03d8cb56d324283f18a18eee21468929ce
Author: Dave Korn <dave.korn.cygwin@googlemail.com>
Date:   Sat Sep 12 08:01:38 2009 +0200

    Control where win32 DLLs get installed.
    
    * libltdl/config/general.m4sh (func_normal_abspath): New function.
    (func_relative_path): Likewise.
    * libltdl/config/ltmain.m4sh (func_mode_help): Document "-bindir".
    (func_mode_link): Accept new "-bindir" option and use it, if
    supplied, to place Windows DLLs.
    * tests/bindir.at: New file for install tests using "-bindir".
    * Makefile.am (TESTSUITE_AT): Add bindir.at.
    * doc/libtool.texi (Link Mode): Update documentation.
    * NEWS, THANKS: Update.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

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

Summary of changes:
 ChangeLog                   |   13 ++
 Makefile.am                 |    1 +
 NEWS                        |    1 +
 THANKS                      |    1 +
 doc/libtool.texi            |   19 ++-
 libltdl/config/general.m4sh |  145 +++++++++++++++++
 libltdl/config/ltmain.m4sh  |   33 ++++-
 tests/bindir.at             |  379 +++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 590 insertions(+), 2 deletions(-)
 create mode 100644 tests/bindir.at

diff --git a/ChangeLog b/ChangeLog
index 6dd49ec..70ea1c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-09-12  Dave Korn  <dave.korn.cygwin@googlemail.com>
+
+	Control where win32 DLLs get installed.
+	* libltdl/config/general.m4sh (func_normal_abspath): New function.
+	(func_relative_path): Likewise.
+	* libltdl/config/ltmain.m4sh (func_mode_help): Document "-bindir".
+	(func_mode_link): Accept new "-bindir" option and use it, if
+	supplied, to place Windows DLLs.
+	* tests/bindir.at: New file for install tests using "-bindir".
+	* Makefile.am (TESTSUITE_AT): Add bindir.at.
+	* doc/libtool.texi (Link Mode): Update documentation.
+	* NEWS, THANKS: Update.
+
 2009-09-11  Akim Demaille  <demaille@gostai.com>
 
 	libtool: clean libconftest.a.
diff --git a/Makefile.am b/Makefile.am
index bdfad2e..d2033c5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -469,6 +469,7 @@ TESTSUITE_AT	= tests/testsuite.at \
 		  tests/indirect_deps.at \
 		  tests/archive-in-archive.at \
 		  tests/execute-mode.at \
+		  tests/bindir.at \
 		  tests/cwrapper.at \
 		  tests/infer-tag.at \
 		  tests/localization.at \
diff --git a/NEWS b/NEWS
index c7d3016..f96a717 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - New convenience make targets `check-noninteractive' to avoid long testsuite
     runs on Windows with popup windows in the middle, and `check-interactive'
     for the complement set of tests.
+  - New link mode flag -bindir to specify the location for installed PE DLLs.
 
 * Changes in supported systems or compilers:
 
diff --git a/THANKS b/THANKS
index 8baf7f4..54c989b 100644
--- a/THANKS
+++ b/THANKS
@@ -87,6 +87,7 @@
   Dalibor Topic			robilad@kaffe.org
   Daniel Reed			n@ml.org
   Daniel Richard G.		skunk@iSKUNK.ORG
+  Dave Korn			dave.korn.cygwin@googlemail.com
   DJ Delorie			dj@delorie.com
   Donn Washburn			n5xwb@comcast.net
   Edouard G. Parmelan		Edouard.Parmelan@France.NCR.COM
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 18b9a97..27bf221 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -1376,6 +1376,18 @@ Tries to avoid versioning (@pxref{Versioning}) for libraries and modules,
 i.e.@: no version information is stored and no symbolic links are created.
 If the platform requires versioning, this option has no effect.
 
+@item -bindir
+Pass the absolute name of the directory for installing executable
+programs (@pxref{Directory Variables, , Directory Variables, standards,
+The GNU Coding Standards}).  @command{libtool} may use this value to
+install shared libraries there on systems that do not provide for any
+library hardcoding and use the directory of a program and the @env{PATH}
+variable as library search path.  This is typically used for DLLs on
+Windows or other systems using the PE (Portable Executable) format.
+On other systems, @option{-bindir} is ignored.  The default value used
+is @file{@var{libdir}/../bin} for libraries installed to
+@file{@var{libdir}}.  You should not use @option{-bindir} for modules.
+
 @item -dlopen @var{file}
 Same as @option{-dlpreopen @var{file}}, if native dlopening is not
 supported on the host platform (@pxref{Dlopened modules}) or if
@@ -1460,7 +1472,12 @@ the @option{-version-info} flag instead (@pxref{Versioning}).
 @item -rpath @var{libdir}
 If @var{output-file} is a library, it will eventually be installed in
 @var{libdir}.  If @var{output-file} is a program, add @var{libdir} to
-the run-time path of the program.
+the run-time path of the program.  On platforms that don't support
+hardcoding library paths into executables and only search PATH for
+shared libraries, such as when @var{output-file} is a Windows (or
+other PE platform) DLL, the @samp{.la} control file will be installed in
+@var{libdir}, but see @option{-bindir} above for the eventual destination
+of the @samp{.dll} or other library file itself.
 
 @item -R @var{libdir}
 If @var{output-file} is a program, add @var{libdir} to its run-time
diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh
index 4bc304c..53fafba 100644
--- a/libltdl/config/general.m4sh
+++ b/libltdl/config/general.m4sh
@@ -100,6 +100,151 @@ func_dirname_and_basename ()
 
 # Generated shell functions inserted here.
 
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar="s,^/\([^/]*\).*$,\1,"
+pathcdr="s,^/[^/]*,,"
+removedotparts="s@/\(\./\)\{1,\}@/@g;s,/\.$,/,"
+collapseslashes="s@/\{1,\}@/@g"
+finalslash="s,/*$,/,"
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # Start from root dir and reassemble the path.
+  func_normal_abspath_result=
+  func_normal_abspath_tpath=$1
+  func_normal_abspath_altnamespace=
+  case $func_normal_abspath_tpath in
+    "")
+      # Empty path, that just means $cwd.
+      func_stripname '' '/' "`pwd`"
+      func_normal_abspath_result=$func_stripname_result
+      return
+    ;;
+    # The next three entries are used to spot a run of precisely
+    # two leading slashes without using negated character classes;
+    # we take advantage of case's first-match behaviour.
+    ///*)
+      # Unusual form of absolute path, do nothing.
+    ;;
+    //*)
+      # Not necessarily an ordinary path; POSIX reserves leading '//'
+      # and for example Cygwin uses it to access remote file shares
+      # over CIFS/SMB, so we conserve a leading double slash if found.
+      func_normal_abspath_altnamespace=/
+    ;;
+    /*)
+      # Absolute path, do nothing.
+    ;;
+    *)
+      # Relative path, prepend $cwd.
+      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+    ;;
+  esac
+  # Cancel out all the simple stuff to save iterations.  We also want
+  # the path to end with a slash for ease of parsing, so make sure
+  # there is one (and only one) here.
+  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+  while :; do
+    # Processed it all yet?
+    if test "$func_normal_abspath_tpath" = / ; then
+      # If we ascended to the root using ".." the result may be empty now.
+      if test -z "$func_normal_abspath_result" ; then
+        func_normal_abspath_result=/
+      fi
+      break
+    fi
+    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcdr"`
+    # Figure out what to do with it
+    case $func_normal_abspath_tcomponent in
+      "")
+        # Trailing empty path component, ignore it.
+      ;;
+      ..)
+        # Parent dir; strip last assembled component from result.
+        func_dirname "$func_normal_abspath_result"
+        func_normal_abspath_result=$func_dirname_result
+      ;;
+      *)
+        # Actual path component, append it.
+        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+      ;;
+    esac
+  done
+  # Restore leading double-slash if one was found on entry.
+  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  func_relative_path_result=
+  func_normal_abspath "$1"
+  func_relative_path_tlibdir=$func_normal_abspath_result
+  func_normal_abspath "$2"
+  func_relative_path_tbindir=$func_normal_abspath_result
+
+  # Ascend the tree starting from libdir
+  while :; do
+    # check if we have found a prefix of bindir
+    case $func_relative_path_tbindir in
+      $func_relative_path_tlibdir)
+        # found an exact match
+        func_relative_path_tcancelled=
+        break
+        ;;
+      $func_relative_path_tlibdir*)
+        # found a matching prefix
+        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+        func_relative_path_tcancelled=$func_stripname_result
+        if test -z "$func_relative_path_result"; then
+          func_relative_path_result=.
+        fi
+        break
+        ;;
+      *)
+        func_dirname $func_relative_path_tlibdir
+        func_relative_path_tlibdir=${func_dirname_result}
+        if test "x$func_relative_path_tlibdir" = x ; then
+          # Have to descend all the way to the root!
+          func_relative_path_result=../$func_relative_path_result
+          func_relative_path_tcancelled=$func_relative_path_tbindir
+          break
+        fi
+        func_relative_path_result=../$func_relative_path_result
+        ;;
+    esac
+  done
+
+  # Now calculate path; take care to avoid doubling-up slashes.
+  func_stripname '' '/' "$func_relative_path_result"
+  func_relative_path_result=$func_stripname_result
+  func_stripname '/' '/' "$func_relative_path_tcancelled"
+  if test "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
+
 # The name of this program:
 func_dirname_and_basename "$progpath"
 progname=$func_basename_result
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 4633ff2..ab94928 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1129,6 +1129,8 @@ The following components of LINK-COMMAND are treated specially:
 
   -all-static       do not do any dynamic linking at all
   -avoid-version    do not add a version suffix if possible
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
   -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
@@ -3663,6 +3665,7 @@ func_mode_link ()
     new_inherited_linker_flags=
 
     avoid_version=no
+    bindir=
     dlfiles=
     dlprefiles=
     dlself=no
@@ -3755,6 +3758,11 @@ func_mode_link ()
 	esac
 
 	case $prev in
+	bindir)
+	  bindir="$arg"
+	  prev=
+	  continue
+	  ;;
 	dlfiles|dlprefiles)
 	  if test "$preload" = no; then
 	    # Add the symbol object into the linking commands.
@@ -4016,6 +4024,11 @@ func_mode_link ()
 	continue
 	;;
 
+      -bindir)
+	prev=bindir
+	continue
+	;;
+
       -dlopen)
 	prev=dlfiles
 	continue
@@ -7708,9 +7721,27 @@ EOF
 	  fi
 	  $RM $output
 	  # place dlname in correct position for cygwin
+	  # In fact, it would be nice if we could use this code for all target
+	  # systems that can't hard-code library paths into their executables
+	  # and that have no shared library path variable independent of PATH,
+	  # but it turns out we can't easily determine that from inspecting
+	  # libtool variables, so we have to hard-code the OSs to which it
+	  # applies here; at the moment, that means platforms that use the PE
+	  # object format with DLL files.  See the long comment at the top of
+	  # tests/bindir.at for full details.
 	  tdlname=$dlname
 	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+	      # If a -bindir argument was supplied, place the dll there.
+	      if test "x$bindir" != x ;
+	      then
+		func_relative_path "$install_libdir" "$bindir"
+		tdlname=$func_relative_path_result$dlname
+	      else
+		# Otherwise fall back on heuristic.
+		tdlname=../bin/$dlname
+	      fi
+	      ;;
 	  esac
 	  $ECHO > $output "\
 # $outputname - a libtool library file
diff --git a/tests/bindir.at b/tests/bindir.at
new file mode 100644
index 0000000..859b1c4
--- /dev/null
+++ b/tests/bindir.at
@@ -0,0 +1,379 @@
+# bindir.at -  Test the -bindir option
+#
+#   Copyright (C) 2009 Free Software Foundation, Inc.
+#   Written by Dave Korn, 2009
+#
+#   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.
+####
+
+####
+#  In this testcase, and in the chunk of code that makes use
+# of $bindir in ltmain.m4sh, we would very much have liked to
+# automatically decide which systems require dynamically-loaded
+# libraries to be installed to a directory in $PATH according
+# to the libtool properties that tell us that "the system provides
+# no way to hard-code library paths into executables, and also
+# has no $shlibpath_var independent of the PATH variable", in
+# Ralf's words.  But it turns out this is not possible, as:-
+#
+#> * Dave Korn wrote on Fri, Aug 14, 2009 at 04:30:27AM CEST:
+#>>> Ralf Wildenhues wrote:
+#>>>
+#>>>>> But in this particular case, I would argue that either you look at
+#>>>>> the libtool variables shlibpath_var and hardcode_action for "PATH"
+#>>>>> and "unsupported".
+#>>>
+#>>> On Cygwin, $hardcode_action = "immediate" in the generated libtool
+#>>> script. Did you perhaps mean $hardcode_shlibpath_var, which is indeed
+#>>> "unsupported"?
+#>
+#> Oh brother, yes, I forgot about those bogus hardcode_libdir_flag_spec
+#> settings.  They fool _LT_LINKER_HARDCODE_LIBPATH.  I don't remember whether
+#> they were needed in order to not break some semantics in ltmain (they
+#> probably were).
+#>
+#> Anyway, $hardcode_action = "immediate" is definitely wrong, but fixing that
+#> now is also way out of scope of this patch.  So I guess we need to stick to
+#> host matching in the code, and work out a separate fix for the setting of
+#> $hardcode_libdir_flag_spec.
+#
+# So alas we punt for now, and just hardcode the relevant OSs that require
+# this functionality.  That's Cygwin, MinGW and CeGCC for now; see the case
+# statement in libtool.m4sh around where the 'tdlname' variable is set.
+
+####
+# Verify compiling works, and skip remaining tests if not.
+#
+
+AT_SETUP([bindir compile check])
+
+AT_DATA([simple.c] ,[[
+int main() { return 0;}
+]])
+
+$CC $CPPFLAGS $CFLAGS -o simple simple.c || noskip=false
+rm -f simple
+
+AT_CHECK([$noskip || (exit 77)])
+
+AT_CLEANUP
+
+####
+# Now run the tests themselves.  First a simple test that we can
+# build and run an executable with a couple of tiny libraries.
+
+AT_SETUP([bindir basic lib test])
+
+bindirneeded=:
+case "$host_os" in
+  cygwin*|mingw*|cegcc*)
+    ;;
+  *)
+    bindirneeded=false
+    ;;
+esac
+
+####
+# These routines save the PATH before a test and restore it after,
+# prepending a chosen directory to the path on the platforms where
+# -bindir is needed after saving.
+#
+
+func_save_and_prepend_path ()
+{
+  save_PATH=$PATH
+  if $bindirneeded ; then
+    PATH=$1:$PATH
+  fi
+  export PATH
+}
+
+func_restore_path ()
+{
+  PATH=$save_PATH
+  export PATH
+}
+
+AT_DATA([foo.c],[[
+int x=11;
+]])
+
+AT_DATA([baz.c],[[
+extern int x;
+int baz (void);
+int baz (void) { return x;}
+]])
+
+AT_DATA([bar.c],[[
+extern int baz (void);
+int y=3;
+int bar (void);
+int bar (void) { return y + baz ();}
+]])
+
+AT_DATA([main.c],[[
+extern int baz (void);
+extern int bar (void);
+extern void abort (void);
+int main() {
+if (baz () + bar () - 25) abort ();
+return 0;
+}
+]])
+
+
+curdir=`pwd`
+eval "`$LIBTOOL --config | grep '^objdir='`"
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir],[0],[ignore],[ignore])
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir],[0],[ignore],[ignore])
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la],[0],[ignore],[ignore])
+
+# Check both static and shared versions run.  We don't install them
+# here, that will be covered by the later tests; we've rpath'd things
+# so that they can all be run in situ.
+
+LT_AT_NOINST_EXEC_CHECK([$LIBTOOL], [], [0], [ignore], [ignore], [--mode=execute ./main$EXEEXT])
+
+# Ensure libraries can be found on PATH, if we are on one
+# of the affected platforms, before testing the shared version.
+
+func_save_and_prepend_path $curdir/$objdir
+$bindirneeded && {
+  LT_AT_NOINST_EXEC_CHECK([$LIBTOOL], [], [0], [ignore], [ignore], [--mode=execute $objdir/main$EXEEXT])
+}
+
+#  In fact, prepending the PATH as above is superfluous on the windows
+# platforms that this feature is primarily aimed at, as the DLL search
+# path always includes the directory from which the app was launched.
+# To make sure it still works even when not side-by-side, we'll install
+# the main executable and execute it from there while the PATH still
+# points to the shared libs in the .libs subdir.  On other platforms,
+# the rpaths we set at link time will guarantee it runs from the bindir.
+
+mkdir $curdir/bin
+AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT], [], [ignore], [ignore])
+LT_AT_EXEC_CHECK([$curdir/bin/main$EXEEXT], [0], [ignore], [ignore], [])
+func_restore_path
+
+AT_CLEANUP
+
+####
+# This is the main testcase.  For a variety of bindir and libdir
+# settings, it verifies that all the files get installed exactly
+# where we want them to go, and that they can be executed once
+# installed.
+#
+
+AT_SETUP([bindir install tests])
+
+bindirneeded=:
+case "$host_os" in
+  cygwin*|mingw*|cegcc*)
+    ;;
+  *)
+    bindirneeded=false
+    ;;
+esac
+
+####
+# These routines save the PATH before a test and restore it after,
+# prepending a chosen directory to the path on the platforms where
+# -bindir is needed after saving.
+#
+
+func_save_and_prepend_path ()
+{
+  save_PATH=$PATH
+  if $bindirneeded ; then
+    PATH=$1:$PATH
+  fi
+  export PATH
+}
+
+func_restore_path ()
+{
+  PATH=$save_PATH
+  export PATH
+}
+
+AT_DATA([foo.c],[[
+int x=11;
+]])
+
+AT_DATA([baz.c],[[
+extern int x;
+int baz (void);
+int baz (void) { return x;}
+]])
+
+AT_DATA([bar.c],[[
+extern int baz (void);
+int y=3;
+int bar (void);
+int bar (void) { return y + baz ();}
+]])
+
+AT_DATA([main.c],[[
+extern int baz (void);
+extern int bar (void);
+extern void abort (void);
+int main() {
+if (baz () + bar () - 25) abort ();
+return 0;
+}
+]])
+
+# We only need to compile once, but we'll need to relink for each different value
+# of libdir in order to set the rpath, and we'll install for each combination of
+# libdir and bindir.
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c],[0],[ignore],[ignore])
+
+# Now try installing the libs.  There are the following cases:
+# No -bindir
+# -bindir below lib install dir
+# -bindir is lib install dir
+# -bindir beside lib install dir
+# -bindir above lib dir
+# -bindir above and beside lib dir
+# -bindir in entirely unrelated prefix.
+
+curdir=`pwd`
+for libdir in \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \
+	$curdir/usr/lib/gcc/../gcc/.//i686-pc-cygwin/4.5.0/../../././//. \
+	$curdir/usr/lib/ \
+	$curdir/usr/lib \
+	$curdir/baz \
+	$curdir/baz/lib/ ;
+do
+
+  # Do a basic install with no -bindir option for reference.  We use the sbin/
+  # dir for the main exe to avoid the potential "this only works because it's
+  # side-by-side with the libs" default DLL search path problem mentioned above.
+  rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr
+  AS_MKDIR_P($libdir)
+  AS_MKDIR_P($curdir/sbin)
+  AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir],[0],[ignore],[ignore])
+  AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir],[0],[ignore],[ignore])
+  AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir], [], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT], [], [ignore], [ignore])
+
+  # And ensure it went where we expect.  Could be looking for any of 'cygfoo-0.dll',
+  # 'libfoo-0.dll', or 'libfoo.so.0'.  We'll simplify this check by taking advantage
+  # of the fact that if it's a DLL, it has to go in bindir, so we'll not check for
+  # both forms in libdir.
+  AT_CHECK([$bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null], [], [ignore], [ignore])
+
+  # And that it can be executed.
+  extrapath=
+  $bindirneeded && extrapath=$libdir/../bin
+  func_save_and_prepend_path $extrapath
+  LT_AT_EXEC_CHECK([$curdir/sbin/main$EXEEXT], [0], [ignore], [ignore], [])
+  func_restore_path
+
+  for bindir in \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin/ \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/ \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/bin/ \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/bin \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/ \
+	$curdir/usr/lib/gcc/i686-pc-cygwin \
+	$curdir/usr/lib/bin/ \
+	$curdir/usr/lib/bin \
+	$curdir/usr/bin/ \
+	$curdir/usr/bin \
+	$curdir/bin/ \
+	$curdir/bin \
+	/tmp/foo/bar ;
+  do
+
+    # Clear any old stuff out before we install.  Because bindir
+    # may be in /tmp, we have to take care to create it securely
+    # and not to delete and recreate it if we do.
+    rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr
+
+    tmp=
+    case $bindir in
+      /tmp*)
+        # Create a temporary directory $tmp in $TMPDIR (default /tmp).
+        # Use mktemp if possible; otherwise fall back on mkdir,
+        # with $RANDOM to make collisions less likely.
+        : ${TMPDIR=/tmp}
+        {
+          tmp=`
+            (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
+          ` &&
+          test -n "$tmp" && test -d "$tmp"
+        } || {
+          tmp=$TMPDIR/foo$$-$RANDOM
+          (umask 077 && mkdir "$tmp")
+        } || exit 77
+        bindir=$tmp/bar
+      ;;
+      *)
+        # Clear any old stuff out before we install.
+        rm -rf $bindir
+        AS_MKDIR_P($bindir)
+      ;;
+    esac
+
+    # Relink with new rpaths.
+    AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir],[0],[ignore],[ignore])
+    AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la],[0],[ignore],[ignore])
+
+    # Recreate directories (bindir already done) and install.
+    AS_MKDIR_P($libdir)
+    AS_MKDIR_P($curdir/sbin)
+    AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir], [], [ignore], [ignore])
+    AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT], [], [ignore], [ignore])
+
+    # Ensure it went to bindir rather than default dir this time.
+    AT_CHECK([$bindirneeded && { test -f $bindir/???foo-0.dll || ls $bindir/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null], [], [ignore], [ignore])
+
+    # And that it can be executed.
+    extrapath=
+    $bindirneeded && extrapath=$bindir
+    func_save_and_prepend_path $extrapath
+    LT_AT_EXEC_CHECK([$curdir/sbin/main$EXEEXT], [0], [ignore], [ignore], [])
+    func_restore_path
+
+    # Clean up if we made a temp dir.  Subdirs under our testdir get rm'd
+    # and recreated at the top of the loop.  Securely created subdirs under
+    # /tmp get created precisely once and rm'd when we're done with them.
+    if test ! -z "$tmp" ; then
+      rm -rf "$tmp"
+    fi
+
+  done
+done
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Mon Sep 14 03:19:04 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mn5q4-0003xx-EB
	for mharc-libtool-commit@gnu.org; Mon, 14 Sep 2009 03:19:04 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mn5q2-0003xN-KH
	for libtool-commit@gnu.org; Mon, 14 Sep 2009 03:19:02 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mn5py-0003su-QH
	for libtool-commit@gnu.org; Mon, 14 Sep 2009 03:19:02 -0400
Received: from [199.232.76.173] (port=55378 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mn5py-0003sQ-HH
	for libtool-commit@gnu.org; Mon, 14 Sep 2009 03:18:58 -0400
Received: from savannah.gnu.org ([199.232.41.3]:60765 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Mn5px-0007SN-PW
	for libtool-commit@gnu.org; Mon, 14 Sep 2009 03:18:58 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mn5pv-00084A-4M
	for libtool-commit@gnu.org; Mon, 14 Sep 2009 07:18:55 +0000
Received: from pekberg by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mn5pu-00083b-9K
	for libtool-commit@gnu.org; Mon, 14 Sep 2009 07:18:55 +0000
From: "Peter Rosin" <peda@lysator.liu.se>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/pr-msvc-support
X-Git-Reftype: branch
X-Git-Oldrev: 158ac1566d248296e4ddcd39fee6743b7ba3a07e
X-Git-Newrev: 14efcbca1bbe78e8fbd220ba279047e3f2699d68
Message-Id: <E1Mn5pu-00083b-9K@cvs.savannah.gnu.org>
Date: Mon, 14 Sep 2009 07:18:54 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, pr-msvc-support,
	updated. v2.2.6-187-g14efcbc
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Sep 2009 07:19:02 -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  14efcbca1bbe78e8fbd220ba279047e3f2699d68 (commit)
       via  6858ed03d8cb56d324283f18a18eee21468929ce (commit)
       via  55e9cc469d1c7af570db876238ce2a26cc9506ac (commit)
      from  158ac1566d248296e4ddcd39fee6743b7ba3a07e (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 14efcbca1bbe78e8fbd220ba279047e3f2699d68
Merge: 158ac1566d248296e4ddcd39fee6743b7ba3a07e 6858ed03d8cb56d324283f18a18eee21468929ce
Author: Peter Rosin <peda@lysator.liu.se>
Date:   Mon Sep 14 09:14:08 2009 +0200

    Merge branch 'master' into pr-msvc-support

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

Summary of changes:
 ChangeLog                   |   18 ++
 Makefile.am                 |    1 +
 NEWS                        |    1 +
 THANKS                      |    1 +
 doc/libtool.texi            |   19 ++-
 libltdl/config/general.m4sh |  145 +++++++++++++++++
 libltdl/config/ltmain.m4sh  |   33 ++++-
 libltdl/m4/libtool.m4       |    2 +-
 tests/bindir.at             |  379 +++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 596 insertions(+), 3 deletions(-)
 create mode 100644 tests/bindir.at

diff --git a/ChangeLog b/ChangeLog
index 59892b6..bfb65e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2009-09-12  Dave Korn  <dave.korn.cygwin@googlemail.com>
+
+	Control where win32 DLLs get installed.
+	* libltdl/config/general.m4sh (func_normal_abspath): New function.
+	(func_relative_path): Likewise.
+	* libltdl/config/ltmain.m4sh (func_mode_help): Document "-bindir".
+	(func_mode_link): Accept new "-bindir" option and use it, if
+	supplied, to place Windows DLLs.
+	* tests/bindir.at: New file for install tests using "-bindir".
+	* Makefile.am (TESTSUITE_AT): Add bindir.at.
+	* doc/libtool.texi (Link Mode): Update documentation.
+	* NEWS, THANKS: Update.
+
+2009-09-11  Akim Demaille  <demaille@gostai.com>
+
+	libtool: clean libconftest.a.
+	* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Here.
+
 2009-09-10  Peter Rosin  <peda@lysator.liu.se>
 
 	func_win32_libid doesn't work with MS dumpbin
diff --git a/Makefile.am b/Makefile.am
index dbd3718..2b5e6b6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -470,6 +470,7 @@ TESTSUITE_AT	= tests/testsuite.at \
 		  tests/archive-in-archive.at \
 		  tests/exeext.at \
 		  tests/execute-mode.at \
+		  tests/bindir.at \
 		  tests/cwrapper.at \
 		  tests/infer-tag.at \
 		  tests/localization.at \
diff --git a/NEWS b/NEWS
index 25d9777..c9e9a22 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - New convenience make targets `check-noninteractive' to avoid long testsuite
     runs on Windows with popup windows in the middle, and `check-interactive'
     for the complement set of tests.
+  - New link mode flag -bindir to specify the location for installed PE DLLs.
 
 * Changes in supported systems or compilers:
 
diff --git a/THANKS b/THANKS
index 8baf7f4..54c989b 100644
--- a/THANKS
+++ b/THANKS
@@ -87,6 +87,7 @@
   Dalibor Topic			robilad@kaffe.org
   Daniel Reed			n@ml.org
   Daniel Richard G.		skunk@iSKUNK.ORG
+  Dave Korn			dave.korn.cygwin@googlemail.com
   DJ Delorie			dj@delorie.com
   Donn Washburn			n5xwb@comcast.net
   Edouard G. Parmelan		Edouard.Parmelan@France.NCR.COM
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 610117e..3b75af8 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -1378,6 +1378,18 @@ Tries to avoid versioning (@pxref{Versioning}) for libraries and modules,
 i.e.@: no version information is stored and no symbolic links are created.
 If the platform requires versioning, this option has no effect.
 
+@item -bindir
+Pass the absolute name of the directory for installing executable
+programs (@pxref{Directory Variables, , Directory Variables, standards,
+The GNU Coding Standards}).  @command{libtool} may use this value to
+install shared libraries there on systems that do not provide for any
+library hardcoding and use the directory of a program and the @env{PATH}
+variable as library search path.  This is typically used for DLLs on
+Windows or other systems using the PE (Portable Executable) format.
+On other systems, @option{-bindir} is ignored.  The default value used
+is @file{@var{libdir}/../bin} for libraries installed to
+@file{@var{libdir}}.  You should not use @option{-bindir} for modules.
+
 @item -dlopen @var{file}
 Same as @option{-dlpreopen @var{file}}, if native dlopening is not
 supported on the host platform (@pxref{Dlopened modules}) or if
@@ -1462,7 +1474,12 @@ the @option{-version-info} flag instead (@pxref{Versioning}).
 @item -rpath @var{libdir}
 If @var{output-file} is a library, it will eventually be installed in
 @var{libdir}.  If @var{output-file} is a program, add @var{libdir} to
-the run-time path of the program.
+the run-time path of the program.  On platforms that don't support
+hardcoding library paths into executables and only search PATH for
+shared libraries, such as when @var{output-file} is a Windows (or
+other PE platform) DLL, the @samp{.la} control file will be installed in
+@var{libdir}, but see @option{-bindir} above for the eventual destination
+of the @samp{.dll} or other library file itself.
 
 @item -R @var{libdir}
 If @var{output-file} is a program, add @var{libdir} to its run-time
diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh
index 4bc304c..53fafba 100644
--- a/libltdl/config/general.m4sh
+++ b/libltdl/config/general.m4sh
@@ -100,6 +100,151 @@ func_dirname_and_basename ()
 
 # Generated shell functions inserted here.
 
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar="s,^/\([^/]*\).*$,\1,"
+pathcdr="s,^/[^/]*,,"
+removedotparts="s@/\(\./\)\{1,\}@/@g;s,/\.$,/,"
+collapseslashes="s@/\{1,\}@/@g"
+finalslash="s,/*$,/,"
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # Start from root dir and reassemble the path.
+  func_normal_abspath_result=
+  func_normal_abspath_tpath=$1
+  func_normal_abspath_altnamespace=
+  case $func_normal_abspath_tpath in
+    "")
+      # Empty path, that just means $cwd.
+      func_stripname '' '/' "`pwd`"
+      func_normal_abspath_result=$func_stripname_result
+      return
+    ;;
+    # The next three entries are used to spot a run of precisely
+    # two leading slashes without using negated character classes;
+    # we take advantage of case's first-match behaviour.
+    ///*)
+      # Unusual form of absolute path, do nothing.
+    ;;
+    //*)
+      # Not necessarily an ordinary path; POSIX reserves leading '//'
+      # and for example Cygwin uses it to access remote file shares
+      # over CIFS/SMB, so we conserve a leading double slash if found.
+      func_normal_abspath_altnamespace=/
+    ;;
+    /*)
+      # Absolute path, do nothing.
+    ;;
+    *)
+      # Relative path, prepend $cwd.
+      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+    ;;
+  esac
+  # Cancel out all the simple stuff to save iterations.  We also want
+  # the path to end with a slash for ease of parsing, so make sure
+  # there is one (and only one) here.
+  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+  while :; do
+    # Processed it all yet?
+    if test "$func_normal_abspath_tpath" = / ; then
+      # If we ascended to the root using ".." the result may be empty now.
+      if test -z "$func_normal_abspath_result" ; then
+        func_normal_abspath_result=/
+      fi
+      break
+    fi
+    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcdr"`
+    # Figure out what to do with it
+    case $func_normal_abspath_tcomponent in
+      "")
+        # Trailing empty path component, ignore it.
+      ;;
+      ..)
+        # Parent dir; strip last assembled component from result.
+        func_dirname "$func_normal_abspath_result"
+        func_normal_abspath_result=$func_dirname_result
+      ;;
+      *)
+        # Actual path component, append it.
+        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+      ;;
+    esac
+  done
+  # Restore leading double-slash if one was found on entry.
+  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  func_relative_path_result=
+  func_normal_abspath "$1"
+  func_relative_path_tlibdir=$func_normal_abspath_result
+  func_normal_abspath "$2"
+  func_relative_path_tbindir=$func_normal_abspath_result
+
+  # Ascend the tree starting from libdir
+  while :; do
+    # check if we have found a prefix of bindir
+    case $func_relative_path_tbindir in
+      $func_relative_path_tlibdir)
+        # found an exact match
+        func_relative_path_tcancelled=
+        break
+        ;;
+      $func_relative_path_tlibdir*)
+        # found a matching prefix
+        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+        func_relative_path_tcancelled=$func_stripname_result
+        if test -z "$func_relative_path_result"; then
+          func_relative_path_result=.
+        fi
+        break
+        ;;
+      *)
+        func_dirname $func_relative_path_tlibdir
+        func_relative_path_tlibdir=${func_dirname_result}
+        if test "x$func_relative_path_tlibdir" = x ; then
+          # Have to descend all the way to the root!
+          func_relative_path_result=../$func_relative_path_result
+          func_relative_path_tcancelled=$func_relative_path_tbindir
+          break
+        fi
+        func_relative_path_result=../$func_relative_path_result
+        ;;
+    esac
+  done
+
+  # Now calculate path; take care to avoid doubling-up slashes.
+  func_stripname '' '/' "$func_relative_path_result"
+  func_relative_path_result=$func_stripname_result
+  func_stripname '/' '/' "$func_relative_path_tcancelled"
+  if test "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
+
 # The name of this program:
 func_dirname_and_basename "$progpath"
 progname=$func_basename_result
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 40ff9d3..d13c5b5 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1184,6 +1184,8 @@ The following components of LINK-COMMAND are treated specially:
 
   -all-static       do not do any dynamic linking at all
   -avoid-version    do not add a version suffix if possible
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
   -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
@@ -3719,6 +3721,7 @@ func_mode_link ()
     new_inherited_linker_flags=
 
     avoid_version=no
+    bindir=
     dlfiles=
     dlprefiles=
     dlself=no
@@ -3811,6 +3814,11 @@ func_mode_link ()
 	esac
 
 	case $prev in
+	bindir)
+	  bindir="$arg"
+	  prev=
+	  continue
+	  ;;
 	dlfiles|dlprefiles)
 	  if test "$preload" = no; then
 	    # Add the symbol object into the linking commands.
@@ -4072,6 +4080,11 @@ func_mode_link ()
 	continue
 	;;
 
+      -bindir)
+	prev=bindir
+	continue
+	;;
+
       -dlopen)
 	prev=dlfiles
 	continue
@@ -7859,9 +7872,27 @@ EOF
 	  fi
 	  $RM $output
 	  # place dlname in correct position for cygwin
+	  # In fact, it would be nice if we could use this code for all target
+	  # systems that can't hard-code library paths into their executables
+	  # and that have no shared library path variable independent of PATH,
+	  # but it turns out we can't easily determine that from inspecting
+	  # libtool variables, so we have to hard-code the OSs to which it
+	  # applies here; at the moment, that means platforms that use the PE
+	  # object format with DLL files.  See the long comment at the top of
+	  # tests/bindir.at for full details.
 	  tdlname=$dlname
 	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+	      # If a -bindir argument was supplied, place the dll there.
+	      if test "x$bindir" != x ;
+	      then
+		func_relative_path "$install_libdir" "$bindir"
+		tdlname=$func_relative_path_result$dlname
+	      else
+		# Otherwise fall back on heuristic.
+		tdlname=../bin/$dlname
+	      fi
+	      ;;
 	  esac
 	  $ECHO > $output "\
 # $outputname - a libtool library file
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 861e21a..f5c5bf5 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -991,7 +991,7 @@ _LT_EOF
       else
 	cat conftest.err >&AS_MESSAGE_LOG_FD
       fi
-        rm -f conftest.err conftest.a conftest conftest.c
+        rm -f conftest.err libconftest.a conftest conftest.c
         rm -rf conftest.dSYM
     ])
     case $host_os in
diff --git a/tests/bindir.at b/tests/bindir.at
new file mode 100644
index 0000000..859b1c4
--- /dev/null
+++ b/tests/bindir.at
@@ -0,0 +1,379 @@
+# bindir.at -  Test the -bindir option
+#
+#   Copyright (C) 2009 Free Software Foundation, Inc.
+#   Written by Dave Korn, 2009
+#
+#   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.
+####
+
+####
+#  In this testcase, and in the chunk of code that makes use
+# of $bindir in ltmain.m4sh, we would very much have liked to
+# automatically decide which systems require dynamically-loaded
+# libraries to be installed to a directory in $PATH according
+# to the libtool properties that tell us that "the system provides
+# no way to hard-code library paths into executables, and also
+# has no $shlibpath_var independent of the PATH variable", in
+# Ralf's words.  But it turns out this is not possible, as:-
+#
+#> * Dave Korn wrote on Fri, Aug 14, 2009 at 04:30:27AM CEST:
+#>>> Ralf Wildenhues wrote:
+#>>>
+#>>>>> But in this particular case, I would argue that either you look at
+#>>>>> the libtool variables shlibpath_var and hardcode_action for "PATH"
+#>>>>> and "unsupported".
+#>>>
+#>>> On Cygwin, $hardcode_action = "immediate" in the generated libtool
+#>>> script. Did you perhaps mean $hardcode_shlibpath_var, which is indeed
+#>>> "unsupported"?
+#>
+#> Oh brother, yes, I forgot about those bogus hardcode_libdir_flag_spec
+#> settings.  They fool _LT_LINKER_HARDCODE_LIBPATH.  I don't remember whether
+#> they were needed in order to not break some semantics in ltmain (they
+#> probably were).
+#>
+#> Anyway, $hardcode_action = "immediate" is definitely wrong, but fixing that
+#> now is also way out of scope of this patch.  So I guess we need to stick to
+#> host matching in the code, and work out a separate fix for the setting of
+#> $hardcode_libdir_flag_spec.
+#
+# So alas we punt for now, and just hardcode the relevant OSs that require
+# this functionality.  That's Cygwin, MinGW and CeGCC for now; see the case
+# statement in libtool.m4sh around where the 'tdlname' variable is set.
+
+####
+# Verify compiling works, and skip remaining tests if not.
+#
+
+AT_SETUP([bindir compile check])
+
+AT_DATA([simple.c] ,[[
+int main() { return 0;}
+]])
+
+$CC $CPPFLAGS $CFLAGS -o simple simple.c || noskip=false
+rm -f simple
+
+AT_CHECK([$noskip || (exit 77)])
+
+AT_CLEANUP
+
+####
+# Now run the tests themselves.  First a simple test that we can
+# build and run an executable with a couple of tiny libraries.
+
+AT_SETUP([bindir basic lib test])
+
+bindirneeded=:
+case "$host_os" in
+  cygwin*|mingw*|cegcc*)
+    ;;
+  *)
+    bindirneeded=false
+    ;;
+esac
+
+####
+# These routines save the PATH before a test and restore it after,
+# prepending a chosen directory to the path on the platforms where
+# -bindir is needed after saving.
+#
+
+func_save_and_prepend_path ()
+{
+  save_PATH=$PATH
+  if $bindirneeded ; then
+    PATH=$1:$PATH
+  fi
+  export PATH
+}
+
+func_restore_path ()
+{
+  PATH=$save_PATH
+  export PATH
+}
+
+AT_DATA([foo.c],[[
+int x=11;
+]])
+
+AT_DATA([baz.c],[[
+extern int x;
+int baz (void);
+int baz (void) { return x;}
+]])
+
+AT_DATA([bar.c],[[
+extern int baz (void);
+int y=3;
+int bar (void);
+int bar (void) { return y + baz ();}
+]])
+
+AT_DATA([main.c],[[
+extern int baz (void);
+extern int bar (void);
+extern void abort (void);
+int main() {
+if (baz () + bar () - 25) abort ();
+return 0;
+}
+]])
+
+
+curdir=`pwd`
+eval "`$LIBTOOL --config | grep '^objdir='`"
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir],[0],[ignore],[ignore])
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir],[0],[ignore],[ignore])
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la],[0],[ignore],[ignore])
+
+# Check both static and shared versions run.  We don't install them
+# here, that will be covered by the later tests; we've rpath'd things
+# so that they can all be run in situ.
+
+LT_AT_NOINST_EXEC_CHECK([$LIBTOOL], [], [0], [ignore], [ignore], [--mode=execute ./main$EXEEXT])
+
+# Ensure libraries can be found on PATH, if we are on one
+# of the affected platforms, before testing the shared version.
+
+func_save_and_prepend_path $curdir/$objdir
+$bindirneeded && {
+  LT_AT_NOINST_EXEC_CHECK([$LIBTOOL], [], [0], [ignore], [ignore], [--mode=execute $objdir/main$EXEEXT])
+}
+
+#  In fact, prepending the PATH as above is superfluous on the windows
+# platforms that this feature is primarily aimed at, as the DLL search
+# path always includes the directory from which the app was launched.
+# To make sure it still works even when not side-by-side, we'll install
+# the main executable and execute it from there while the PATH still
+# points to the shared libs in the .libs subdir.  On other platforms,
+# the rpaths we set at link time will guarantee it runs from the bindir.
+
+mkdir $curdir/bin
+AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT], [], [ignore], [ignore])
+LT_AT_EXEC_CHECK([$curdir/bin/main$EXEEXT], [0], [ignore], [ignore], [])
+func_restore_path
+
+AT_CLEANUP
+
+####
+# This is the main testcase.  For a variety of bindir and libdir
+# settings, it verifies that all the files get installed exactly
+# where we want them to go, and that they can be executed once
+# installed.
+#
+
+AT_SETUP([bindir install tests])
+
+bindirneeded=:
+case "$host_os" in
+  cygwin*|mingw*|cegcc*)
+    ;;
+  *)
+    bindirneeded=false
+    ;;
+esac
+
+####
+# These routines save the PATH before a test and restore it after,
+# prepending a chosen directory to the path on the platforms where
+# -bindir is needed after saving.
+#
+
+func_save_and_prepend_path ()
+{
+  save_PATH=$PATH
+  if $bindirneeded ; then
+    PATH=$1:$PATH
+  fi
+  export PATH
+}
+
+func_restore_path ()
+{
+  PATH=$save_PATH
+  export PATH
+}
+
+AT_DATA([foo.c],[[
+int x=11;
+]])
+
+AT_DATA([baz.c],[[
+extern int x;
+int baz (void);
+int baz (void) { return x;}
+]])
+
+AT_DATA([bar.c],[[
+extern int baz (void);
+int y=3;
+int bar (void);
+int bar (void) { return y + baz ();}
+]])
+
+AT_DATA([main.c],[[
+extern int baz (void);
+extern int bar (void);
+extern void abort (void);
+int main() {
+if (baz () + bar () - 25) abort ();
+return 0;
+}
+]])
+
+# We only need to compile once, but we'll need to relink for each different value
+# of libdir in order to set the rpath, and we'll install for each combination of
+# libdir and bindir.
+
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c],[0],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c],[0],[ignore],[ignore])
+
+# Now try installing the libs.  There are the following cases:
+# No -bindir
+# -bindir below lib install dir
+# -bindir is lib install dir
+# -bindir beside lib install dir
+# -bindir above lib dir
+# -bindir above and beside lib dir
+# -bindir in entirely unrelated prefix.
+
+curdir=`pwd`
+for libdir in \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \
+	$curdir/usr/lib/gcc/../gcc/.//i686-pc-cygwin/4.5.0/../../././//. \
+	$curdir/usr/lib/ \
+	$curdir/usr/lib \
+	$curdir/baz \
+	$curdir/baz/lib/ ;
+do
+
+  # Do a basic install with no -bindir option for reference.  We use the sbin/
+  # dir for the main exe to avoid the potential "this only works because it's
+  # side-by-side with the libs" default DLL search path problem mentioned above.
+  rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr
+  AS_MKDIR_P($libdir)
+  AS_MKDIR_P($curdir/sbin)
+  AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir],[0],[ignore],[ignore])
+  AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir],[0],[ignore],[ignore])
+  AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir], [], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT], [], [ignore], [ignore])
+
+  # And ensure it went where we expect.  Could be looking for any of 'cygfoo-0.dll',
+  # 'libfoo-0.dll', or 'libfoo.so.0'.  We'll simplify this check by taking advantage
+  # of the fact that if it's a DLL, it has to go in bindir, so we'll not check for
+  # both forms in libdir.
+  AT_CHECK([$bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null], [], [ignore], [ignore])
+
+  # And that it can be executed.
+  extrapath=
+  $bindirneeded && extrapath=$libdir/../bin
+  func_save_and_prepend_path $extrapath
+  LT_AT_EXEC_CHECK([$curdir/sbin/main$EXEEXT], [0], [ignore], [ignore], [])
+  func_restore_path
+
+  for bindir in \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin/ \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/ \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/bin/ \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/bin \
+	$curdir/usr/lib/gcc/i686-pc-cygwin/ \
+	$curdir/usr/lib/gcc/i686-pc-cygwin \
+	$curdir/usr/lib/bin/ \
+	$curdir/usr/lib/bin \
+	$curdir/usr/bin/ \
+	$curdir/usr/bin \
+	$curdir/bin/ \
+	$curdir/bin \
+	/tmp/foo/bar ;
+  do
+
+    # Clear any old stuff out before we install.  Because bindir
+    # may be in /tmp, we have to take care to create it securely
+    # and not to delete and recreate it if we do.
+    rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr
+
+    tmp=
+    case $bindir in
+      /tmp*)
+        # Create a temporary directory $tmp in $TMPDIR (default /tmp).
+        # Use mktemp if possible; otherwise fall back on mkdir,
+        # with $RANDOM to make collisions less likely.
+        : ${TMPDIR=/tmp}
+        {
+          tmp=`
+            (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
+          ` &&
+          test -n "$tmp" && test -d "$tmp"
+        } || {
+          tmp=$TMPDIR/foo$$-$RANDOM
+          (umask 077 && mkdir "$tmp")
+        } || exit 77
+        bindir=$tmp/bar
+      ;;
+      *)
+        # Clear any old stuff out before we install.
+        rm -rf $bindir
+        AS_MKDIR_P($bindir)
+      ;;
+    esac
+
+    # Relink with new rpaths.
+    AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir],[0],[ignore],[ignore])
+    AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la],[0],[ignore],[ignore])
+
+    # Recreate directories (bindir already done) and install.
+    AS_MKDIR_P($libdir)
+    AS_MKDIR_P($curdir/sbin)
+    AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir], [], [ignore], [ignore])
+    AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT], [], [ignore], [ignore])
+
+    # Ensure it went to bindir rather than default dir this time.
+    AT_CHECK([$bindirneeded && { test -f $bindir/???foo-0.dll || ls $bindir/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null], [], [ignore], [ignore])
+
+    # And that it can be executed.
+    extrapath=
+    $bindirneeded && extrapath=$bindir
+    func_save_and_prepend_path $extrapath
+    LT_AT_EXEC_CHECK([$curdir/sbin/main$EXEEXT], [0], [ignore], [ignore], [])
+    func_restore_path
+
+    # Clean up if we made a temp dir.  Subdirs under our testdir get rm'd
+    # and recreated at the top of the loop.  Securely created subdirs under
+    # /tmp get created precisely once and rm'd when we're done with them.
+    if test ! -z "$tmp" ; then
+      rm -rf "$tmp"
+    fi
+
+  done
+done
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool



From MAILER-DAEMON Fri Sep 18 14:39:45 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MoiMy-0008Gt-Vd
	for mharc-libtool-commit@gnu.org; Fri, 18 Sep 2009 14:39:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MoiMw-0008Gm-Gz
	for libtool-commit@gnu.org; Fri, 18 Sep 2009 14:39:42 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MoiMu-0008GZ-T6
	for libtool-commit@gnu.org; Fri, 18 Sep 2009 14:39:41 -0400
Received: from [199.232.76.173] (port=35114 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MoiMu-0008GG-MF
	for libtool-commit@gnu.org; Fri, 18 Sep 2009 14:39:40 -0400
Received: from savannah.gnu.org ([199.232.41.3]:49610 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MoiMu-0006bY-AH
	for libtool-commit@gnu.org; Fri, 18 Sep 2009 14:39:40 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MoiMt-0001HS-Sl
	for libtool-commit@gnu.org; Fri, 18 Sep 2009 18:39:39 +0000
Received: from rwild by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MoiMt-0001Gv-Gd
	for libtool-commit@gnu.org; Fri, 18 Sep 2009 18:39:39 +0000
From: "Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>
To: libtool-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6858ed03d8cb56d324283f18a18eee21468929ce
X-Git-Newrev: 741a9867eb71eb258ca1ed5b85bc7f03ce864195
Message-Id: <E1MoiMt-0001Gv-Gd@cvs.savannah.gnu.org>
Date: Fri, 18 Sep 2009 18:39:39 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-150-g741a986
X-BeenThere: libtool-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit notices for the GNU libtool shared library maintenance
	tool <libtool-commit.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/libtool-commit>
List-Post: <mailto:libtool-commit@gnu.org>
List-Help: <mailto:libtool-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/libtool-commit>,
	<mailto:libtool-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Sep 2009 18:39:43 -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  741a9867eb71eb258ca1ed5b85bc7f03ce864195 (commit)
      from  6858ed03d8cb56d324283f18a18eee21468929ce (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 741a9867eb71eb258ca1ed5b85bc7f03ce864195
Author: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Date:   Sun Sep 13 11:00:31 2009 +0200

    Initial support for the Cuda Compiler Driver on Linux.
    
    * libltdl/config/ltmain.m4sh (func_mode_compile): Accept source
    file extensions `.cu' and `.cup'.
    * libltdl/m4/libtool.m4 (_LT_COMPILER_NO_RTTI, _LT_COMPILER_PIC)
    (_LT_LINKER_SHLIBS): Support for `nvcc' compiler driver.
    * NEWS, THANKS: Update.
    Report by Mahesh Narayanamurthi.
    
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

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

Summary of changes:
 ChangeLog                  |   10 ++++++++++
 NEWS                       |    1 +
 THANKS                     |    1 +
 libltdl/config/ltmain.m4sh |    2 +-
 libltdl/m4/libtool.m4      |   18 +++++++++++++++++-
 5 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 70ea1c1..12ca085 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-09-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Initial support for the Cuda Compiler Driver on Linux.
+	* libltdl/config/ltmain.m4sh (func_mode_compile): Accept source
+	file extensions `.cu' and `.cup'.
+	* libltdl/m4/libtool.m4 (_LT_COMPILER_NO_RTTI, _LT_COMPILER_PIC)
+	(_LT_LINKER_SHLIBS): Support for `nvcc' compiler driver.
+	* NEWS, THANKS: Update.
+	Report by Mahesh Narayanamurthi.
+
 2009-09-12  Dave Korn  <dave.korn.cygwin@googlemail.com>
 
 	Control where win32 DLLs get installed.
diff --git a/NEWS b/NEWS
index f96a717..7843378 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - Initial support for compilers on BlueGene BG/L.
   - Improved support for Atari FreeMiNT.
   - With binutils 2.19.50+, shared libraries can be built on AIX.
+  - Initial support for the Cuda Compiler Driver on GNU/Linux.
 
 * Bug fixes:
 
diff --git a/THANKS b/THANKS
index 54c989b..7731a82 100644
--- a/THANKS
+++ b/THANKS
@@ -120,6 +120,7 @@
   Kurt D. Zeilenga		Kurt@OpenLDAP.Org
   Maciej Helminiak		dion2@wp.pl
   Maciej W. Rozycki		macro@linux-mips.org
+  Mahesh Narayanamurthi		mahesh.mach@gmail.com
   Manfred Weichel		Manfred.Weichel@pdb.siemens.de
   Marc Espie			espie@nerim.net
   Marc J. Fraioli		fraioli@dg-rtp.dg.com
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index ab94928..f1bf43f 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -783,7 +783,7 @@ func_mode_compile ()
     *.[cCFSifmso] | \
     *.ada | *.adb | *.ads | *.asm | \
     *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
       func_xform "$libobj"
       libobj=$func_xform_result
       ;;
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index a8c186b..02f5b5d 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -3287,7 +3287,12 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
 if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
 
   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
     lt_cv_prog_compiler_rtti_exceptions,
@@ -3939,6 +3944,13 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
@@ -4424,6 +4436,10 @@ _LT_EOF
 	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9


hooks/post-receive
-- 
GNU Libtool



