This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++ PATCH] do not override PACKAGE


>>> "Phil" == Phil Edwards <phil@jaj.com> writes:

 Phil> On Sat, Aug 09, 2003 at 12:51:11AM +0200, Alexandre Duret-Lutz wrote:
 >> 
 >> This fixes the PACKAGE renaming issue the "Right Way".

 Phil> I was told the 4-arg form was deprecated.

You were told wrong.

 >> Automake
 >> actually has nothing to do about it.

 Phil> *shrug* The incorrect form of PACKAGE is assigned during
 Phil> the expansion of AM_INIT_AUTOMAKE.  (I realize that it's
 Phil> autoconf which expands configure.ac.)

Yes, and it's also Autoconf which computes the tarball name.
Automake simply does PACKAGE=$PACKAGE_TARNAME.


`AM_INIT_AUTOMAKE([OPTIONS])'
`AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])'
     Runs many macros required for proper operation of the generated
     Makefiles.
 
     This macro has two forms, the first of which is preferred.  In
     this form, `AM_INIT_AUTOMAKE' is called with a single argument --
     a space-separated list of Automake options which should be applied
     to every `Makefile.am' in the tree.  The effect is as if each
     option were listed in `AUTOMAKE_OPTIONS'.
 
     The second, deprecated, form of `AM_INIT_AUTOMAKE' has two required
     arguments: the package and the version number.  This form is
     obsolete because the PACKAGE and VERSION can be obtained from
     Autoconf's `AC_INIT' macro (which itself has an old and a new
     form).
 
     If your `configure.in' has:
          AC_INIT(src/foo.c)
          AM_INIT_AUTOMAKE(mumble, 1.5)
     you can modernize it as follows:
          AC_INIT(mumble, 1.5)
          AC_CONFIG_SRCDIR(src/foo.c)
          AM_INIT_AUTOMAKE

     Note that if you're upgrading your `configure.in' from an earlier
     version of Automake, it is not always correct to simply move the
     package and version arguments from `AM_INIT_AUTOMAKE' directly to
     `AC_INIT', as in the example above.  The first argument to
     `AC_INIT' should be the name of your package (e.g. `GNU Automake'),
     not the tarball name (e.g. `automake') that you used to pass to
     `AM_INIT_AUTOMAKE'.  Autoconf tries to derive a tarball name from
     the package name, which should work for most but not all package
     names.  (If it doesn't work for yours, you can use the
     four-argument form of `AC_INIT' -- supported in Autoconf versions
     greater than 2.52g -- to provide the tarball name explicitly).


 - Macro: AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME])
     Process any command-line arguments and perform various
     initializations and verifications.

     Set the name of the PACKAGE and its VERSION.  These are typically
     used in `--version' support, including that of `configure'.  The
     optional argument BUG-REPORT should be the email to which users
     should send bug reports.  The package TARNAME differs from
     PACKAGE: the latter designates the full package name (e.g., `GNU
     Autoconf'), while the former is meant for distribution tar ball
     names (e.g., `autoconf').  It defaults to PACKAGE with `GNU '
     stripped, lower-cased, and all characters other than alphanumerics
     and underscores are changed to `-'.
     
     It is preferable that the arguments of `AC_INIT' be static, i.e.,
     there should not be any shell computation, but they can be
     computed by M4.
     
     The following M4 macros (e.g., `AC_PACKAGE_NAME'), output variables
     (e.g., `PACKAGE_NAME'), and preprocessor symbols (e.g.,
     `PACKAGE_NAME') are defined by `AC_INIT':
    
    `AC_PACKAGE_NAME', `PACKAGE_NAME'
          Exactly PACKAGE.

    `AC_PACKAGE_TARNAME', `PACKAGE_TARNAME'
          Exactly TARNAME.

    `AC_PACKAGE_VERSION', `PACKAGE_VERSION'
          Exactly VERSION.

    `AC_PACKAGE_STRING', `PACKAGE_STRING'
          Exactly `PACKAGE VERSION'.

    `AC_PACKAGE_BUGREPORT', `PACKAGE_BUGREPORT'
          Exactly BUG-REPORT.

-- 
Alexandre Duret-Lutz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]