Andy Wingo wrote: > I just applied this to Guile. Perhaps something like it should go into > Gnulib? ... > diff --git a/lib/version-etc.c b/lib/version-etc.c > index 4f9de48..a7be46e 100644 > --- a/lib/version-etc.c > +++ b/lib/version-etc.c > @@ -245,7 +245,7 @@ emit_bug_reporting_address (void) > printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); > #else > printf (_("%s home page: <http://www.gnu.org/software/%s/>\n"), > - PACKAGE_NAME, PACKAGE); > + PACKAGE_NAME, PACKAGE_TARNAME); > #endif > fputs (_("General help using GNU software: > <http://www.gnu.org/gethelp/>\n"), > stdout);
Hi Andy, Thanks for the patch. How about the following instead? Then, if some package is defining PACKAGE specially and expecting that value to be used here, it will still appear. >From 5fb889fcb7862644117a42f2c11b905e1f416869 Mon Sep 17 00:00:00 2001 From: Andy Wingo <wi...@pobox.com> Date: Sun, 22 Nov 2009 09:47:12 +0100 Subject: [PATCH] version-etc: work also with AM_INIT_AUTOMAKE's no-define option * lib/version-etc.c [!defined PACKAGE]: Define to PACKAGE_TARNAME. --- ChangeLog | 5 +++++ lib/version-etc.c | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79c973d..bd42fd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-22 Andy Wingo <wi...@pobox.com> + + version-etc: work also with AM_INIT_AUTOMAKE's no-define option + * lib/version-etc.c [!defined PACKAGE]: Define to PACKAGE_TARNAME. + 2009-11-21 Jim Meyering <meyer...@redhat.com> sh-quote: avoid a warning from -Wstrict-prototypes diff --git a/lib/version-etc.c b/lib/version-etc.c index bf67c37..d76aa7c 100644 --- a/lib/version-etc.c +++ b/lib/version-etc.c @@ -32,6 +32,12 @@ #include "gettext.h" #define _(msgid) gettext (msgid) +/* If you use AM_INIT_AUTOMAKE's no-define option, + PACKAGE is not defined. Use PACKAGE_TARNAME instead. */ +#if ! defined PACKAGE && defined PACKAGE_TARNAME +# define PACKAGE PACKAGE_TARNAME +#endif + enum { COPYRIGHT_YEAR = 2009 }; /* The three functions below display the --version information the -- 1.6.5.3.502.gc3e2e