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

2010-06-15 Thread Bob Friesenhahn

On Tue, 15 Jun 2010, Ralf Wildenhues wrote:


* Bob Friesenhahn wrote on Sun, Jun 13, 2010 at 06:16:15PM CEST:

On Sun, 13 Jun 2010, Ralf Wildenhues wrote:

Tested with git Autoconf and 2.62.  OK?


This change looks fine to me.


Thanks for the review.  I had applied this, but it turns out it wasn't
complete after all.  The bootstrap script also tries to extract PACKAGE
and VERSION from configure.ac.  This causes, for example, bogus settings
in tests/package.m4 where the package name was 'GNU' and the email
bug-...@...  And then, we were not extracting PACKAGE_NAME and
PACKAGE_URL correctly at all.  And more fallout.

Any reasons against the patch below to fix this?  I'll otherwise push it
soonish.


For what it's worth, this change also looks fine to me.  You should be 
able to apply this and advance to step #3, which is hopefully a NOP.


Bob




  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.

[...]

Sorry about that glitch.

Cheers,
Ralf

   Fix bootstrap script to cope with changed AC_INIT arguments.

   * bootstrap: When extracting PACKAGE and VERSION from AC_INIT
   arguments, be sure to remove a 'GNU ' prefix and lowercase the
   package name for PACKAGE.  Also set PACKAGE_NAME and PACKAGE_URL
   appropriately for GNU software.  Pass these variables to the
   make commands creating tests/package.m4 and other files.
   * Makefile.am (edit): Fix substitution of PACKAGE_NAME and
   PACKAGE_STRING.
   * libltdl/config/announce-gen.m4sh: Use @PACKAGE@ not
   @package_str...@.

diff --git a/Makefile.am b/Makefile.am
index 8e00b3e..aa2cd9c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -127,8 +127,8 @@ edit = sed \
-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_NAME\@,$(PACKAGE_NAME),g' \
+   -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \
-e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
-e 's,@PACKAGE_VERSION\@,$(VERSION),g' \
-e 's,@SED\@,$(SED),g' \
diff --git a/bootstrap b/bootstrap
index d505c36..81ed4b0 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,8 @@
#! /bin/sh
# bootstrap -- Helps bootstrapping libtool, when checked out from repository.
#
-#   Copyright (C) 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc,
+#   Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Free Software
+#   Foundation, Inc,
#   Mritten by Gary V. Vaughan, 2003
#
#   This file is part of GNU Libtool.
@@ -116,9 +117,18 @@ fi
set dummy `$SED -n '
/AC_INIT/{
s/[][,()]/ /g
+   s/ GNU / /
p
}' configure.ac`
shift
+PACKAGE=`echo "$2" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+PACKAGE_NAME=$2
+PACKAGE_URL=
+if grep 'AC_INIT.*GNU' configure.ac >/dev/null; then
+  PACKAGE_NAME="GNU $PACKAGE_NAME"
+  PACKAGE_URL="http://www.gnu.org/software/$PACKAGE/";
+fi
+VERSION=$3

# Whip up a dirty Makefile:
makes='Makefile.am libltdl/Makefile.inc'
@@ -135,13 +145,15 @@ rm -f $auxdir/ltmain.sh $m4dir/ltversion.m4
$MAKE ./$auxdir/ltmain.sh ./$m4dir/ltversion.m4 \
./libtoolize.in ./tests/defs.in ./tests/package.m4 \
./tests/testsuite ./libltdl/Makefile.am ./doc/notes.txt \
-srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" \
-PACKAGE_BUGREPORT="bug...@gnu.org" M4SH="$AUTOM4TE --language=m4sh" \
+srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \
+PACKAGE_NAME="$PACKAGE_NAME" PACKAGE_URL="$PACKAGE_URL" \
+PACKAGE_BUGREPORT="bug-$pack...@gnu.org" M4SH="$AUTOM4TE --language=m4sh" \
AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO" \
GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"

test -f clcommit.m4sh && $MAKE -f Makefile.maint ./commit \
-srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="$AUTOM4TE -l m4sh" \
+srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \
+M4SH="$AUTOM4TE -l m4sh" \
SED="$SED" GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"

rm -f Makefile
diff --git a/libltdl/config/announce-gen.m4sh b/libltdl/config/announce-gen.m4sh
index a528fef..38e6232 100644
--- a/libltdl/config/announce-gen.m4sh
+++ b/libltdl/config/announce-gen.m4sh
@@ -99,7 +99,7 @@ test -d "$top_srcdir" || top_srcdir='@top_srcdir@'

# Initialisation:
mailnotify_flags=
-package_name="@PACKAGE_NAME@"
+package_name="@PACKAGE@"
sendmail_to=
valid_release_types='alpha,beta,release-candidate,stable'




--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/



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

2010-06-15 Thread Ralf Wildenhues
* Bob Friesenhahn wrote on Sun, Jun 13, 2010 at 06:16:15PM CEST:
> On Sun, 13 Jun 2010, Ralf Wildenhues wrote:
> >Tested with git Autoconf and 2.62.  OK?
> 
> This change looks fine to me.

Thanks for the review.  I had applied this, but it turns out it wasn't
complete after all.  The bootstrap script also tries to extract PACKAGE
and VERSION from configure.ac.  This causes, for example, bogus settings
in tests/package.m4 where the package name was 'GNU' and the email
bug-...@...  And then, we were not extracting PACKAGE_NAME and
PACKAGE_URL correctly at all.  And more fallout.

Any reasons against the patch below to fix this?  I'll otherwise push it
soonish.

> >   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.
[...]

Sorry about that glitch.

Cheers,
Ralf

Fix bootstrap script to cope with changed AC_INIT arguments.

* bootstrap: When extracting PACKAGE and VERSION from AC_INIT
arguments, be sure to remove a 'GNU ' prefix and lowercase the
package name for PACKAGE.  Also set PACKAGE_NAME and PACKAGE_URL
appropriately for GNU software.  Pass these variables to the
make commands creating tests/package.m4 and other files.
* Makefile.am (edit): Fix substitution of PACKAGE_NAME and
PACKAGE_STRING.
* libltdl/config/announce-gen.m4sh: Use @PACKAGE@ not
@package_str...@.

diff --git a/Makefile.am b/Makefile.am
index 8e00b3e..aa2cd9c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -127,8 +127,8 @@ edit = sed \
-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_NAME\@,$(PACKAGE_NAME),g' \
+   -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \
-e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
-e 's,@PACKAGE_VERSION\@,$(VERSION),g' \
-e 's,@SED\@,$(SED),g' \
diff --git a/bootstrap b/bootstrap
index d505c36..81ed4b0 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,8 @@
 #! /bin/sh
 # bootstrap -- Helps bootstrapping libtool, when checked out from repository.
 #
-#   Copyright (C) 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc,
+#   Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Free Software
+#   Foundation, Inc,
 #   Mritten by Gary V. Vaughan, 2003
 #
 #   This file is part of GNU Libtool.
@@ -116,9 +117,18 @@ fi
 set dummy `$SED -n '
 /AC_INIT/{
s/[][,()]/ /g
+   s/ GNU / /
p
 }' configure.ac`
 shift
+PACKAGE=`echo "$2" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+PACKAGE_NAME=$2
+PACKAGE_URL=
+if grep 'AC_INIT.*GNU' configure.ac >/dev/null; then
+  PACKAGE_NAME="GNU $PACKAGE_NAME"
+  PACKAGE_URL="http://www.gnu.org/software/$PACKAGE/";
+fi
+VERSION=$3
 
 # Whip up a dirty Makefile:
 makes='Makefile.am libltdl/Makefile.inc'
@@ -135,13 +145,15 @@ rm -f $auxdir/ltmain.sh $m4dir/ltversion.m4
 $MAKE ./$auxdir/ltmain.sh ./$m4dir/ltversion.m4 \
 ./libtoolize.in ./tests/defs.in ./tests/package.m4 \
 ./tests/testsuite ./libltdl/Makefile.am ./doc/notes.txt \
-srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" \
-PACKAGE_BUGREPORT="bug...@gnu.org" M4SH="$AUTOM4TE --language=m4sh" \
+srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \
+PACKAGE_NAME="$PACKAGE_NAME" PACKAGE_URL="$PACKAGE_URL" \
+PACKAGE_BUGREPORT="bug-$pack...@gnu.org" M4SH="$AUTOM4TE --language=m4sh" \
 AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO" \
 GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"
 
 test -f clcommit.m4sh && $MAKE -f Makefile.maint ./commit \
-srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="$AUTOM4TE -l m4sh" \
+srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \
+M4SH="$AUTOM4TE -l m4sh" \
 SED="$SED" GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"
 
 rm -f Makefile
diff --git a/libltdl/config/announce-gen.m4sh b/libltdl/config/announce-gen.m4sh
index a528fef..38e6232 100644
--- a/libltdl/config/announce-gen.m4sh
+++ b/libltdl/config/announce-gen.m4sh
@@ -99,7 +99,7 @@ test -d "$top_srcdir" || top_srcdir='@top_srcdir@'
 
 # Initialisation:
 mailnotify_flags=
-package_name="@PACKAGE_NAME@"
+package_name="@PACKAGE@"
 sendmail_to=
 valid_release_types='alpha,beta,release-candidate,stable'
 



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@
#

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 -

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`&qu