>>>>> "Ralf" == Ralf Corsepius <[EMAIL PROTECTED]> writes:
Ralf> If using the new AC_INIT and AM_INIT_AUTOMAKE syntax, PACKAGE Ralf> gets translated to lower case letters. - Why this change? Because that's the case for most packages. But that's not true: PACKAGE_NAME is not lower cased. Ralf> Furthermore, PACKAGE_TARNAME also is transformed to lower case Ralf> letters - Why this change? It _is_ true for TARNAME. Which is the one that makes sense for Automake when it makes dist. Ralf> IMO, both changes unnecessarily complicate things and avoidably Ralf> break well-known features of automake, without further reason. Unification. Let's say that you are used to the present scheme, but for a fresh person, there is obviously a problem. Ralf> In particular this change is in contradiction to this sentence Ralf> from info automake.info (1.4): Ralf> Automake doesn't do any interpretation of `PACKAGE' or Ralf> `VERSION'. Ralf> [Strictly speaking this sentence remains valid. It's autoconf Ralf> that interferes.] Right. What do you think about the following patch, that I just applied. Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Support pre-defined values. * doc/autoconf.texi (Initializing configure): Explain how to change AC_INIT default values. Index: doc/autoconf.texi =================================================================== RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v retrieving revision 1.577 diff -u -u -r1.577 autoconf.texi --- doc/autoconf.texi 28 Jan 2002 10:46:13 -0000 1.577 +++ doc/autoconf.texi 30 Jan 2002 13:05:46 -0000 @@ -1502,7 +1502,8 @@ @acindex PACKAGE_TARNAME @ovindex PACKAGE_TARNAME @cvindex PACKAGE_TARNAME -@var{package} once @samp{GNU } strip, and lower cased. +@var{package} once @samp{GNU } strip, lower cased, and all non +alphanumeric character mapped onto @samp{_}. @item @code{AC_PACKAGE_VERSION}, @code{PACKAGE_VERSION} @acindex PACKAGE_VERSION @@ -1522,6 +1523,24 @@ @cvindex PACKAGE_BUGREPORT Exactly @var{bug-report-address}. @end table + +All these values may be changed. For instance if the default value for +@code{AC_PACKAGE_NAME} does not suit your application, you can either +use: + +@example +m4_define([AC_PACKAGE_TARNAME], [GNU-Foo-Bar-1.0]) +AC_INIT([GNU Foo Bar], [1.0]) +@end example + +@noindent +or + +@example +AC_INIT([GNU Foo Bar], [1.0]) +m4_define([AC_PACKAGE_TARNAME], [GNU-Foo-Bar-1.0]) +AC_SUBST([PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME']) +@end example @end defmac Index: lib/autoconf/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v retrieving revision 1.783 diff -u -u -r1.783 general.m4 --- lib/autoconf/general.m4 24 Jan 2002 17:15:55 -0000 1.783 +++ lib/autoconf/general.m4 30 Jan 2002 13:05:46 -0000 @@ -289,12 +289,19 @@ [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])]) AS_LITERAL_IF([$2], [], [m4_warn([syntax], [AC_INIT: not a literal: $2])]) AS_LITERAL_IF([$3], [], [m4_warn([syntax], [AC_INIT: not a literal: $3])]) -m4_define([AC_PACKAGE_NAME], [$1]) -m4_define([AC_PACKAGE_TARNAME], - m4_tolower(m4_bpatsubst([[[$1]]], [GNU ]))) -m4_define([AC_PACKAGE_VERSION], [$2]) -m4_define([AC_PACKAGE_STRING], [$1 $2]) -m4_define([AC_PACKAGE_BUGREPORT], [$3]) +m4_ifndef([AC_PACKAGE_NAME], + [m4_define([AC_PACKAGE_NAME], [$1])]) +m4_ifndef([AC_PACKAGE_TARNAME], + [m4_define([AC_PACKAGE_TARNAME], + m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]], [GNU ])), + [[^abcdefghijklmnopqrstuvwxyz0123456789]], + [_]))]) +m4_ifndef([AC_PACKAGE_VERSION], + [m4_define([AC_PACKAGE_VERSION], [$2])]) +m4_ifndef([AC_PACKAGE_STRING], + [m4_define([AC_PACKAGE_STRING], [$1 $2])]) +m4_ifndef([AC_PACKAGE_BUGREPORT], + [m4_define([AC_PACKAGE_BUGREPORT], [$3])]) ])