[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_INIT receiving PACKAGE_VERSION from outside
From: |
Bruno Haible |
Subject: |
Re: AC_INIT receiving PACKAGE_VERSION from outside |
Date: |
Fri, 11 Mar 2005 20:01:58 +0100 |
User-agent: |
KMail/1.5 |
Sam Steingold wrote:
> >> > AC_INIT
> >> > AC_CONFIG_SRCDIR(foo.c)
> >> > . $srcdir/version.sh
> >> > AM_INIT_AUTOMAKE(my package, $VERSION_NUMBER)
> >>
> >> Are you _sure_ it works?
> >> ...
> >> Specifically, the code above will result in empty PACKAGE_* variables.
> >
> > Yes, the PACKAGE_* variables are empty afterwards. If you need them, you
> > have to assign them explicitly:
> > PACKAGE_NAME='my package'
> > PACKAGE_VERSION=$VERSION_NUMBER
> > etc.
>
> no, this does _not_ work.
> all the substitution code is done when AC_INIT is over.
> nothing you can do in configure.ac after AC_INIT can change what
> configure will substitute for @address@hidden
Huh? Works for me. When I use this in a configure.ac
. $srcdir/../version.sh
AM_INIT_AUTOMAKE(gettext-runtime, $VERSION_NUMBER)
PACKAGE_NAME=gettext-runtime
PACKAGE_TARNAME=gettext-runtime-$VERSION_NUMBER
PACKAGE_VERSION=$VERSION_NUMBER
PACKAGE_STRING="GNU gettext-runtime $VERSION_NUMBER"
PACKAGE_BUGREPORT="address@hidden"
I get this in config.status:
s,@PACKAGE_NAME@,gettext-runtime,;t t
s,@PACKAGE_TARNAME@,gettext-runtime-0.14.3,;t t
s,@PACKAGE_VERSION@,0.14.3,;t t
s,@PACKAGE_STRING@,GNU gettext-runtime 0.14.3,;t t
s,@PACKAGE_BUGREPORT@,address@hidden,;t t
So the substitution of @PACKAGE_VERSION@ works. The only thing that doesn't
work is the C macros PACKAGE_NAME etc. in config.h (they all get defined to
empty strings), but you can easily work around it by using this in
Makefile.am:
AM_CPPFLAGS = -DMY_PACKAGE_NAME=\"@address@hidden" ...
Bruno
- AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/10
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Eric Hanchrow, 2005/03/10
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Stepan Kasal, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/11
- Message not available
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruno Haible, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruno Haible, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside,
Bruno Haible <=
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruce Korb, 2005/03/12
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Alexandre Duret-Lutz, 2005/03/17
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/18
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruno Haible, 2005/03/18
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Alexandre Duret-Lutz, 2005/03/18
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruno Haible, 2005/03/18
Message not available