Re: Multiple test failures with --disable-shared

2010-06-13 Thread Ralf Wildenhues
Hi Peter,

* Peter O'Gorman wrote on Mon, Jun 14, 2010 at 05:18:55AM CEST:
> On 06/13/2010 12:07 AM, Ralf Wildenhues wrote:
> >* Peter O'Gorman wrote on Sun, Jun 13, 2010 at 06:07:44AM CEST:
[ the resident test ]
> >>I'm not sure what testing that modules cannot be unloaded gets you
> >>when you don't have shared libraries.
> >
> >That may be true, but the failure was during lt_dlopen.  I think it
> >should be possible to preload modules with the resident bit, no?  I
> >mean, they are the prototype of resident modules, their closing is what
> >won't do the right thing for non-residents (and maybe a future
> >improvement of the preopen loader could even emulate that).
> >
> >This failure looks like a genuine ltdl bug to me; why not leave it open
> >for now?

> IIRC this one could also be fixed by using
> LTDL_SET_PRELOADED_SYMBOLS, I don't remember for sure, but I recall
> being convinced that these were all testsuite issues.

Well, if that fixes it, then that is fine with me of course.

Thanks!
Ralf



Re: Multiple test failures with --disable-shared

2010-06-13 Thread Peter O'Gorman

On 06/13/2010 10:18 PM, Peter O'Gorman wrote:



It's either skip the test entirely or some crap like this, you can't
load a static archive "RTLD_LOCAL", then load a different static
archive with the same symbols later "RTLD_GLOBAL", and expect things
to work. I debated what to do, and decided to do the crap thing,
since it's possible some parts of the test are useful.


I don't have a better idea here either; only that something like your
paragraph above should be a comment right before the hack, so we don't
ask ourselves the same question again next time.


Ok, I'll try to come up with a comment that doesn't use the word 'crap' :-)


This is what I pushed.

Peter

>From 83b2c36410a7b0b1b75227ef287ca6112fe7fdcb Mon Sep 17 00:00:00 2001
From: Peter O'Gorman 
Date: Sun, 13 Jun 2010 22:21:54 -0500
Subject: [PATCH 1/3] Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure.

* tests/exceptions.at: Use it.
---
 ChangeLog   |5 +
 tests/exceptions.at |3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5ce2ca2..2cec96c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-13  Peter O'Gorman  
+
+	Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure.
+	* tests/exceptions.at: Use it.
+
 2010-06-13  Ralf Wildenhues  
 
 	Print Libtool project URL in program --help output.
diff --git a/tests/exceptions.at b/tests/exceptions.at
index 6fe9f9a..293723c 100644
--- a/tests/exceptions.at
+++ b/tests/exceptions.at
@@ -224,6 +224,9 @@ int exceptions_in_module (void)
 
 int main (void)
 {
+
+  LTDL_SET_PRELOADED_SYMBOLS();
+
   if (exceptions_in_prog ())
 return 1;
   if (exceptions_in_lib ())
-- 
1.7.0.1

>From 7b9d7e4af33bbd07f0836fa5a04b6eaac80f9bdd Mon Sep 17 00:00:00 2001
From: Peter O'Gorman 
Date: Sun, 13 Jun 2010 22:26:48 -0500
Subject: [PATCH 2/3] Avoid failure for --disable-shared.

* tests/lt_dladvise.at: Hack.
---
 ChangeLog|3 +++
 tests/lt_dladvise.at |   12 
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2cec96c..991d0be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-06-13  Peter O'Gorman  
 
+	Avoid failure for --disable-shared.
+	* tests/lt_dladvise.at: Hack.
+
 	Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure.
 	* tests/exceptions.at: Use it.
 
diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at
index cdbe91d..18c2104 100644
--- a/tests/lt_dladvise.at
+++ b/tests/lt_dladvise.at
@@ -223,7 +223,17 @@ main (void)
 
   hint_resident ();
   hint_local ();
+#ifdef HAVE_SHARED
   hint_global ();
+#else
+  /* This ugly hack is because we have symbols with the same name in both the
+ global module and the local one, we can't lt_dlopen the local module
+ locally and then later load the global module globally because of this.
+ Instead of skipping the test entirely, we test what we can and
+ have this hack. */
+  printf ("global: 4\n");
+  printf ("depend: 5\n");
+#endif
   hint_preload ();
 
   if (lt_dlexit () != 0)
@@ -335,6 +345,8 @@ cygwin* | mingw* | cegcc* | *,false)
   ;;
 esac
 
+$have_shared && CPPFLAGS="$CPPFLAGS -DHAVE_SHARED"
+
 # - #
 # Other modules can be tested correctly even when built with -no-undefined. #
 # - #
-- 
1.7.0.1

>From 23c144c1bcc5c71e05b27e7233a8bbef331cf410 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman 
Date: Sun, 13 Jun 2010 22:27:31 -0500
Subject: [PATCH 3/3] Test with --disable-shared at release time too.

* HACKING: Note it.
---
 ChangeLog |3 +++
 HACKING   |1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 991d0be..a313b4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-06-13  Peter O'Gorman  
 
+	Test with --disable-shared at release time too.
+	* HACKING: Note it.
+
 	Avoid failure for --disable-shared.
 	* tests/lt_dladvise.at: Hack.
 
diff --git a/HACKING b/HACKING
index 19ac2cd..7ea1818 100644
--- a/HACKING
+++ b/HACKING
@@ -641,6 +641,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 * Run `make distcheck'
   and `make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install'
   and `make distcheck DISTCHECK_CONFIGURE_FLAGS=--program-prefix=g'
+  and `make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-shared'
   and `make distcheck CC=g++'
   If there are any problems, fix them and start again.
 
-- 
1.7.0.1



Re: Multiple test failures with --disable-shared

2010-06-13 Thread Peter O'Gorman

On 06/13/2010 12:07 AM, Ralf Wildenhues wrote:

Hi Peter,

* Peter O'Gorman wrote on Sun, Jun 13, 2010 at 06:07:44AM CEST:

On 06/11/2010 11:56 PM, Gary V. Vaughan wrote:


1: There might be a better way.  I'm thinking...


I'm not sure what testing that modules cannot be unloaded gets you
when you don't have shared libraries.


That may be true, but the failure was during lt_dlopen.  I think it
should be possible to preload modules with the resident bit, no?  I
mean, they are the prototype of resident modules, their closing is what
won't do the right thing for non-residents (and maybe a future
improvement of the preopen loader could even emulate that).

This failure looks like a genuine ltdl bug to me; why not leave it open
for now?


Hi Ralf,

IIRC this one could also be fixed by using LTDL_SET_PRELOADED_SYMBOLS, I 
don't remember for sure, but I recall being convinced that these were 
all testsuite issues.





3: eww!


It's either skip the test entirely or some crap like this, you can't
load a static archive "RTLD_LOCAL", then load a different static
archive with the same symbols later "RTLD_GLOBAL", and expect things
to work. I debated what to do, and decided to do the crap thing,
since it's possible some parts of the test are useful.


I don't have a better idea here either; only that something like your
paragraph above should be a comment right before the hack, so we don't
ask ourselves the same question again next time.


Ok, I'll try to come up with a comment that doesn't use the word 'crap' :-)

Peter




Re: Print Libtool project URL in program --help output.

2010-06-13 Thread Bob Friesenhahn

On Sun, 13 Jun 2010, Ralf Wildenhues wrote:

* Ralf Wildenhues wrote on Sun, Jun 13, 2010 at 01:41:47PM CEST:

I'd like to change PACKAGE to be 'GNU libtool' eventually, but that
affects things like grepping generated .lo and .la files, and I don't
want to go there right now.


turned out to be a total no-brainer, as $PACKAGE has s/^GNU // and the
rest lowercased anyway.

The other change wrt. the previous patch iteration is a safe-guard in
the func_help to avoid possible double output of help lines.

Tested with git Autoconf and 2.62.  OK?


This change looks fine to me.

Bob



Thanks,
Ralf

   Print Libtool project URL in program --help output.

   * configure.ac (AC_INIT): Set PACKAGE argument to `GNU Libtool',
   so Autoconf knows this is GNU software.  For Autoconf < 2.64,
   if AC_PACKAGE_URL is not defined, substitute PACKAGE_URL.
   * Makefile.am (edit): Substitute PACKAGE_URL.
   ($(srcdir)/tests/package.m4): Also depend on Makefile.am.
   Define AT_PACKAGE_URL, for `tests/testsuite --help' output.
   * libltdl/config/getopt.m4sh (func_help): Also extract comment
   lines that mention a home page and general GNU help.
   * libltdl/config/ltmain.m4sh: Use @PACKAGE_BUGREPORT@ instead of
   hard-coded list address.  Also mention Libtool home page and
   general GNU help web page.
   * libtoolize.m4sh: Likewise.

diff --git a/Makefile.am b/Makefile.am
index c3f74e0..8e00b3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,6 +126,7 @@ edit = sed \
-e 's,@MACRO_VERSION\@,$(VERSION),g' \
-e 's,@PACKAGE\@,$(PACKAGE),g' \
-e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
+   -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
-e 's,@PACKAGE_NAME\@,$(PACKAGE),g' \
-e 's,@PACKAGE_STRING\@,$(PACKAGE) $(VERSION),g' \
-e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
@@ -543,7 +544,7 @@ $(srcdir)/$(TESTSUITE): $(srcdir)/tests/package.m4 
$(TESTSUITE_AT) Makefile.am
$(AUTOTEST) `echo $(TESTSUITE_AT) | sed 's,tests/,,g'` -o testsuite.tmp 
&& \
mv -f testsuite.tmp testsuite

-$(srcdir)/tests/package.m4: $(srcdir)/configure.ac
+$(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am
{ \
  echo '# Signature of the current package.'; \
  echo 'm4_define([AT_PACKAGE_NAME],  [...@package_name@])'; \
@@ -551,6 +552,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/configure.ac
  echo 'm4_define([AT_PACKAGE_VERSION],   [...@package_version@])'; \
  echo 'm4_define([AT_PACKAGE_STRING],[...@package_string@])'; \
  echo 'm4_define([AT_PACKAGE_BUGREPORT], [...@package_bugreport@])'; \
+ echo 'm4_define([AT_PACKAGE_URL],   [...@package_url@])'; \
} | $(edit) > $(srcdir)/tests/package.m4

tests/atconfig: $(top_builddir)/config.status
diff --git a/configure.ac b/configure.ac
index f47eb44..35c79f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,7 @@
# Process this file with autoconf to create configure. -*- autoconf -*-

-#   Copyright (C) 2001, 2004, 2005, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2001, 2004, 2005, 2008, 2010 Free Software Foundation,
+#   Inc.
#   Written by Gary V. Vaughan, 2001
#
#   This file is part of GNU Libtool.
@@ -30,7 +31,9 @@ dnl Oldest automake required for bootstrap is below in 
AM_INIT_AUTOMAKE.
##  ##
## Autoconf initialisation. ##
##  ##
-AC_INIT([libtool], [2.2.11a], [bug-libt...@gnu.org])
+AC_INIT([GNU Libtool], [2.2.11a], [bug-libt...@gnu.org])
+m4_ifndef([AC_PACKAGE_URL],
+ [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/libtool/])])
AC_CONFIG_HEADERS([config.h:config-h.in])
AC_CONFIG_SRCDIR([libtoolize.in])
LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
diff --git a/libltdl/config/getopt.m4sh b/libltdl/config/getopt.m4sh
index c378640..44cf727 100644
--- a/libltdl/config/getopt.m4sh
+++ b/libltdl/config/getopt.m4sh
@@ -546,6 +546,7 @@ func_help ()
$opt_debug

$SED -n '/^# Usage:/,/# Report bugs to/ {
+   :print
s/^# //
s/^# *$//
s*\$progname*'$progname'*
@@ -558,7 +559,11 @@ func_help ()
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
p
- }' < "$progpath"
+   d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
ret=$?
if test -z "$1"; then
  exit $ret
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 5906552..dd883a6 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -75,7 +75,9 @@ m4_divert_push([SCRIPT])# @configure_input@
# automake: $automake_version
# autoconf: $autoconf_version
#
-# Report bugs to .
+# Report bugs to <@PACKAGE_BUGREPORT@>.
+# GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
+# General help using GNU software: .

PROGRAM=libtool
packa...@package@
d

Re: Print Libtool project URL in program --help output.

2010-06-13 Thread Ralf Wildenhues
Updated patch.  This one doesn't require 2.64 any more, it just sets
PACKAGE_URL itself with older Autoconfs, and it changes the PACKAGE_NAME
to "GNU Libtool".  The "GNU " prefix lets Autoconf >= 2.64 compute the
right gnu.org web page automatically.

This:

* Ralf Wildenhues wrote on Sun, Jun 13, 2010 at 01:41:47PM CEST:
> I'd like to change PACKAGE to be 'GNU libtool' eventually, but that
> affects things like grepping generated .lo and .la files, and I don't
> want to go there right now.

turned out to be a total no-brainer, as $PACKAGE has s/^GNU // and the
rest lowercased anyway.

The other change wrt. the previous patch iteration is a safe-guard in
the func_help to avoid possible double output of help lines.

Tested with git Autoconf and 2.62.  OK?

Thanks,
Ralf

Print Libtool project URL in program --help output.

* configure.ac (AC_INIT): Set PACKAGE argument to `GNU Libtool',
so Autoconf knows this is GNU software.  For Autoconf < 2.64,
if AC_PACKAGE_URL is not defined, substitute PACKAGE_URL.
* Makefile.am (edit): Substitute PACKAGE_URL.
($(srcdir)/tests/package.m4): Also depend on Makefile.am.
Define AT_PACKAGE_URL, for `tests/testsuite --help' output.
* libltdl/config/getopt.m4sh (func_help): Also extract comment
lines that mention a home page and general GNU help.
* libltdl/config/ltmain.m4sh: Use @PACKAGE_BUGREPORT@ instead of
hard-coded list address.  Also mention Libtool home page and
general GNU help web page.
* libtoolize.m4sh: Likewise.

diff --git a/Makefile.am b/Makefile.am
index c3f74e0..8e00b3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,6 +126,7 @@ edit = sed \
-e 's,@MACRO_VERSION\@,$(VERSION),g' \
-e 's,@PACKAGE\@,$(PACKAGE),g' \
-e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
+   -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
-e 's,@PACKAGE_NAME\@,$(PACKAGE),g' \
-e 's,@PACKAGE_STRING\@,$(PACKAGE) $(VERSION),g' \
-e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
@@ -543,7 +544,7 @@ $(srcdir)/$(TESTSUITE): $(srcdir)/tests/package.m4 
$(TESTSUITE_AT) Makefile.am
$(AUTOTEST) `echo $(TESTSUITE_AT) | sed 's,tests/,,g'` -o testsuite.tmp 
&& \
mv -f testsuite.tmp testsuite
 
-$(srcdir)/tests/package.m4: $(srcdir)/configure.ac
+$(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am
{ \
  echo '# Signature of the current package.'; \
  echo 'm4_define([AT_PACKAGE_NAME],  [...@package_name@])'; \
@@ -551,6 +552,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/configure.ac
  echo 'm4_define([AT_PACKAGE_VERSION],   [...@package_version@])'; \
  echo 'm4_define([AT_PACKAGE_STRING],[...@package_string@])'; \
  echo 'm4_define([AT_PACKAGE_BUGREPORT], [...@package_bugreport@])'; \
+ echo 'm4_define([AT_PACKAGE_URL],   [...@package_url@])'; \
} | $(edit) > $(srcdir)/tests/package.m4
 
 tests/atconfig: $(top_builddir)/config.status
diff --git a/configure.ac b/configure.ac
index f47eb44..35c79f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,7 @@
 # Process this file with autoconf to create configure. -*- autoconf -*-
 
-#   Copyright (C) 2001, 2004, 2005, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2001, 2004, 2005, 2008, 2010 Free Software Foundation,
+#   Inc.
 #   Written by Gary V. Vaughan, 2001
 #
 #   This file is part of GNU Libtool.
@@ -30,7 +31,9 @@ dnl Oldest automake required for bootstrap is below in 
AM_INIT_AUTOMAKE.
 ##  ##
 ## Autoconf initialisation. ##
 ##  ##
-AC_INIT([libtool], [2.2.11a], [bug-libt...@gnu.org])
+AC_INIT([GNU Libtool], [2.2.11a], [bug-libt...@gnu.org])
+m4_ifndef([AC_PACKAGE_URL],
+ [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/libtool/])])
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([libtoolize.in])
 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
diff --git a/libltdl/config/getopt.m4sh b/libltdl/config/getopt.m4sh
index c378640..44cf727 100644
--- a/libltdl/config/getopt.m4sh
+++ b/libltdl/config/getopt.m4sh
@@ -546,6 +546,7 @@ func_help ()
 $opt_debug
 
 $SED -n '/^# Usage:/,/# Report bugs to/ {
+   :print
 s/^# //
s/^# *$//
s*\$progname*'$progname'*
@@ -558,7 +559,11 @@ func_help ()
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
p
- }' < "$progpath"
+   d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
 ret=$?
 if test -z "$1"; then
   exit $ret
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 5906552..dd883a6 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -75,7 +75,9 @@ m4_divert_push([SCRIPT])# @configure_input@
 # automake:$automake_version
 # autoconf:$autoconf_ver

Re: Print Libtool project URL in program --help output.

2010-06-13 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Sun, Jun 13, 2010 at 01:41:47PM CEST:
> Print Libtool project URL in program --help output.
> 
> * configure.ac (AC_PREREQ): Require Autoconf 2.64 for Libtool.
> (AC_INIT): Set URL argument.
> * Makefile.am (edit): Substitute PACKAGE_URL.
> ($(srcdir)/tests/package.m4): Also depend on Makefile.am.
> Define AT_PACKAGE_URL, for `tests/testsuite --help' output.
> * libltdl/config/getopt.m4sh (func_help): Also extract comment
> lines that mention a home page and general GNU help.
> * libltdl/config/ltmain.m4sh: Use @PACKAGE_BUGREPORT@ instead of
> hard-coded list address.  Also mention Libtool home page and
> general GNU help web page.
> * libtoolize.m4sh: Likewise.

Scratch this patch, there's no need to require 2.64.  I'll come up with
something better.



Print Libtool project URL in program --help output.

2010-06-13 Thread Ralf Wildenhues
Is Autoconf >= 2.64 spread widely enough for Libtool development by now?
If not, that could probably be hacked around in configure.ac, but I'd
need to test with old Autoconf then.

Anyway, this updates --help output of libtool, libtoolize, and the
testsuite script to match current GNU Coding Standards.

I amended func_help with a heuristic that should continue to work fine
with the other scripts that don't have the extra help lines, mailnotify
and clcommit.  (Do you think it needs a testsuite addition to ensure
this heuristic isn't picking up extra junk from ltmain and libtoolize?)

I verified that @PACKAGE_BUGREPORT@ is not present in ltmain.sh any more
(thus it is not changed to a user package that happens to use
AC_PROG_LIBTOOL).

I'd like to change PACKAGE to be 'GNU libtool' eventually, but that
affects things like grepping generated .lo and .la files, and I don't
want to go there right now.

I am not (yet) mentioning other mailing lists, that is logically an
orthogonal issue IMVHO.

Thanks,
Ralf

Print Libtool project URL in program --help output.

* configure.ac (AC_PREREQ): Require Autoconf 2.64 for Libtool.
(AC_INIT): Set URL argument.
* Makefile.am (edit): Substitute PACKAGE_URL.
($(srcdir)/tests/package.m4): Also depend on Makefile.am.
Define AT_PACKAGE_URL, for `tests/testsuite --help' output.
* libltdl/config/getopt.m4sh (func_help): Also extract comment
lines that mention a home page and general GNU help.
* libltdl/config/ltmain.m4sh: Use @PACKAGE_BUGREPORT@ instead of
hard-coded list address.  Also mention Libtool home page and
general GNU help web page.
* libtoolize.m4sh: Likewise.

diff --git a/Makefile.am b/Makefile.am
index c3f74e0..8e00b3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,6 +126,7 @@ edit = sed \
-e 's,@MACRO_VERSION\@,$(VERSION),g' \
-e 's,@PACKAGE\@,$(PACKAGE),g' \
-e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
+   -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
-e 's,@PACKAGE_NAME\@,$(PACKAGE),g' \
-e 's,@PACKAGE_STRING\@,$(PACKAGE) $(VERSION),g' \
-e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
@@ -543,7 +544,7 @@ $(srcdir)/$(TESTSUITE): $(srcdir)/tests/package.m4 
$(TESTSUITE_AT) Makefile.am
$(AUTOTEST) `echo $(TESTSUITE_AT) | sed 's,tests/,,g'` -o testsuite.tmp 
&& \
mv -f testsuite.tmp testsuite
 
-$(srcdir)/tests/package.m4: $(srcdir)/configure.ac
+$(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am
{ \
  echo '# Signature of the current package.'; \
  echo 'm4_define([AT_PACKAGE_NAME],  [...@package_name@])'; \
@@ -551,6 +552,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/configure.ac
  echo 'm4_define([AT_PACKAGE_VERSION],   [...@package_version@])'; \
  echo 'm4_define([AT_PACKAGE_STRING],[...@package_string@])'; \
  echo 'm4_define([AT_PACKAGE_BUGREPORT], [...@package_bugreport@])'; \
+ echo 'm4_define([AT_PACKAGE_URL],   [...@package_url@])'; \
} | $(edit) > $(srcdir)/tests/package.m4
 
 tests/atconfig: $(top_builddir)/config.status
diff --git a/configure.ac b/configure.ac
index f47eb44..0ec5407 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,7 @@
 # Process this file with autoconf to create configure. -*- autoconf -*-
 
-#   Copyright (C) 2001, 2004, 2005, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2001, 2004, 2005, 2008, 2010 Free Software Foundation,
+#   Inc.
 #   Written by Gary V. Vaughan, 2001
 #
 #   This file is part of GNU Libtool.
@@ -23,14 +24,16 @@
 
 
 
-AC_PREREQ(2.62)dnl Some m4sh scripts use $as_echo
+AC_PREREQ(2.64)dnl We use PACKAGE_URL.
+dnl We needed 2.62 because some m4sh scripts use $as_echo.
 dnl Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
 
 
 ##  ##
 ## Autoconf initialisation. ##
 ##  ##
-AC_INIT([libtool], [2.2.11a], [bug-libt...@gnu.org])
+AC_INIT([libtool], [2.2.11a], [bug-libt...@gnu.org], [],
+   [http://www.gnu.org/software/libtool/])
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([libtoolize.in])
 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
diff --git a/libltdl/config/getopt.m4sh b/libltdl/config/getopt.m4sh
index c378640..f98f4f4 100644
--- a/libltdl/config/getopt.m4sh
+++ b/libltdl/config/getopt.m4sh
@@ -546,6 +546,7 @@ func_help ()
 $opt_debug
 
 $SED -n '/^# Usage:/,/# Report bugs to/ {
+   :print
 s/^# //
s/^# *$//
s*\$progname*'$progname'*
@@ -558,7 +559,10 @@ func_help ()
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
p
- }' < "$progpath"
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
 ret=$?
 if test -z "$1"; then
   exit $ret
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4

Enable colored Autotest testsuite output if available.

2010-06-13 Thread Ralf Wildenhues
OK to commit this patch if this one is accepted into Autoconf?


The move the testsuite.at code above AT_INIT should have no impact
beside reordering things in the PREPARE_TESTS diversion a bit, which
should be harmless (I checked the diff with current git Autoconf).

Thanks,
Ralf

Enable colored Autotest testsuite output if available.

* tests/testsuite.at: Move AT_INIT call down to late in the
file, all prior code can go beforehand.
Call AT_COLOR_TESTS if defined.

diff --git a/tests/testsuite.at b/tests/testsuite.at
index 423e544..3935962 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,6 +1,6 @@
 # Process with autom4te to create an -*- Autotest -*- test suite.
 #
-#   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+#   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
 #   Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
@@ -23,8 +23,6 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 
-AT_INIT
-
 m4_divert_push([PREPARE_TESTS])dnl
 : ${tst_dist=dist}
 : ${ACLOCAL=aclocal}
@@ -441,6 +439,11 @@ m4_pattern_allow([^dnl$])
 # We exercise these tools.
 dnl AT_TESTED([grep autoreconf autom4te automake])
 
+# Enable colored output if available.
+m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
+
+AT_INIT
+
 ## --- ##
 ## The suite.  ##
 ## --- ##