autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_INIT receiving PACKAGE_VERSION from outside


From: Bob Friesenhahn
Subject: Re: AC_INIT receiving PACKAGE_VERSION from outside
Date: Fri, 11 Mar 2005 09:30:33 -0600 (CST)

On Fri, 11 Mar 2005, Sam Steingold wrote:

* Stepan Kasal <address@hidden> [2005-03-11 09:48:42 +0100]:

On Thu, Mar 10, 2005 at 01:13:47PM -0500, Sam Steingold wrote:
Is there a way to keep the package version outside of
configure.ac:AC_INIT?
...
. ./version.sh
AC_INIT(my package, ${myversion})

this solution doesn't work, as AC_INIT expects that it's arguments are
known when m4 runs (ie. when configure is created).

so, it is impossible for configure to get the version information from
outside, it must be hard coded in the shell script.
why was this design decision made?
I (and apparently at least two more other people) consider this
behavior a bug, not a feature.
Is there a chance this will be eventually fixed?

I also consider it to be horrendous to edit configure.ac simply to release a new package version. For daily snapshot packages, the package "version" can change every day! There should be no need to thrash in the version control system to simply insert a formatted date or some other versioning information.

By using the legacy AM_INIT_AUTOMAKE you can insert your own values:

# Source file containing package/library versioning information.
. ${srcdir}/version.sh

AM_INIT_AUTOMAKE($PACKAGE_NAME,"${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}", 
' ')

In the above example, version.sh initializes a set of variables. The package ChangeLog is inspected to obtain a reasonable date.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]