[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_INIT translates PACKAGE to lower case
From: |
Akim Demaille |
Subject: |
Re: AC_INIT translates PACKAGE to lower case |
Date: |
31 Jan 2002 17:53:52 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
>>>>> "Ralf" == Ralf Corsepius <address@hidden> writes:
Ralf> To give an example: What I want to see, is this:
Ralf> AC_INIT([libXrc],[0.1]) AM_INIT_AUTOMAKE
Yes, I have understood, for *your* application, you prefer something
else. Since I will not change the semantics of the first parameters
(set since 2.50), since you don't like m4_define, the easiest remains
introducing a fourth parameter:
/tmp % cat configure.ac nostromo 17:49
AC_INIT(GNU Foo, 1.0, fofo, fooooo)
echo m4_defn([AC_PACKAGE_NAME])
echo m4_defn([AC_PACKAGE_VERSION])
echo m4_defn([AC_PACKAGE_BUGREPORT])
echo m4_defn([AC_PACKAGE_TARNAME])
/tmp % $ace/tests/autoconf nostromo Err 2
/tmp % ./configure nostromo 17:49
GNU Foo
1.0
fofo
fooooo
/tmp % ./configure --version nostromo 17:49
GNU Foo configure 1.0
generated by GNU Autoconf 2.52h
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
Now, please, let's spend more time on addressing actual issues.
Index: ChangeLog
from Akim Demaille <address@hidden>
* lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Accept $4.
* doc/autoconf.texi (Initializing configure): Adjust.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.580
diff -u -u -r1.580 autoconf.texi
--- doc/autoconf.texi 30 Jan 2002 16:13:10 -0000 1.580
+++ doc/autoconf.texi 31 Jan 2002 16:52:16 -0000
@@ -1479,16 +1479,24 @@
anything else. The only other required macro is @code{AC_OUTPUT}
(@pxref{Output}).
address@hidden AC_INIT (@var{package})
address@hidden AC_INIT (@var{package}, @var{version}, @ovar{bug-report},
@ovar{tarname})
@acindex INIT
Process any command-line arguments and perform various initializations
-and verifications. Set the name of the @var{package} and its
address@hidden The optional argument @var{bug-report-address} should be
-the email to which users should send bug reports.
-
-These three arguments should be @emph{static}, i.e., there should not be
-any shell computation, but they can be computed by M4. The following M4
-macros (e.g., @code{AC_PACKAGE_NAME}), output variables (e.g.,
+and verifications.
+
+Set the name of the @var{package} and its @var{version}. These are
+typically used in @option{--version} support, including that of
address@hidden The optional argument @var{bug-report} should be
+the email to which users should send bug reports. The package
address@hidden differs from @var{package}: the latter designates the full
+package name (e.g., @samp{GNU Autoconf}), while the latter is meant for
+distribution tar ball names (e.g., @samp{autoconf}). It defaults to
address@hidden once @samp{GNU } strip, lower cased, and all non
+alphanumeric character mapped onto @samp{-}.
+
+It is preferable that these arguments be static, i.e., there should not
+be any shell computation, but they can be computed by M4. The following
+M4 macros (e.g., @code{AC_PACKAGE_NAME}), output variables (e.g.,
@code{PACKAGE_NAME}), and preprocessor symbols (e.g.,
@code{PACKAGE_NAME}) are then defined:
@@ -1503,8 +1511,7 @@
@acindex PACKAGE_TARNAME
@ovindex PACKAGE_TARNAME
@cvindex PACKAGE_TARNAME
address@hidden once @samp{GNU } strip, lower cased, and all non
-alphanumeric character mapped onto @samp{-}.
+Exactly @var{tarname}.
@item @code{AC_PACKAGE_VERSION}, @code{PACKAGE_VERSION}
@acindex PACKAGE_VERSION
@@ -1522,26 +1529,8 @@
@acindex PACKAGE_BUGREPORT
@ovindex PACKAGE_BUGREPORT
@cvindex PACKAGE_BUGREPORT
-Exactly @var{bug-report-address}.
+Exactly @var{bug-report}.
@end table
-
-All these values may be changed. For instance if the default value for
address@hidden does not suit your application, you can either
-use:
-
address@hidden
-m4_define([AC_PACKAGE_TARNAME], [GNU-Foo-Bar-1.0])
-AC_INIT([GNU Foo Bar], [1.0])
address@hidden example
-
address@hidden
-or
-
address@hidden
-AC_INIT([GNU Foo Bar], [1.0])
-m4_define([AC_PACKAGE_TARNAME], [GNU-Foo-Bar-1.0])
-AC_SUBST([PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])
address@hidden example
@end defmac
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.785
diff -u -u -r1.785 general.m4
--- lib/autoconf/general.m4 30 Jan 2002 16:13:11 -0000 1.785
+++ lib/autoconf/general.m4 31 Jan 2002 16:52:17 -0000
@@ -283,8 +283,8 @@
-# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT)
-# ---------------------------------------------------
+# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
+# --------------------------------------------------------------
m4_define([_AC_INIT_PACKAGE],
[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])])
@@ -293,9 +293,11 @@
[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_default([$4],
+ [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],
- Re: AC_INIT translates PACKAGE to lower case, (continued)
- Re: AC_INIT translates PACKAGE to lower case, Ralf Corsepius, 2002/01/30
- Re: AC_INIT translates PACKAGE to lower case, Akim Demaille, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Ralf Corsepius, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Akim Demaille, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Ralf Corsepius, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Tim Van Holder, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Ralf Corsepius, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Tim Van Holder, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Alexandre Duret-Lutz, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Ralf Corsepius, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case,
Akim Demaille <=
- Re: AC_INIT translates PACKAGE to lower case, Russ Allbery, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Ralf Corsepius, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Dan Kegel, 2002/01/31
- Re: AC_INIT translates PACKAGE to lower case, Alexandre Duret-Lutz, 2002/01/31