[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to dinamically set VERSION for AC_INIT
From: |
Stefano Sabatini |
Subject: |
How to dinamically set VERSION for AC_INIT |
Date: |
Fri, 14 Dec 2007 15:45:54 +0100 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
Hi all autoconfers,
I have a package managed by SVN, and I would like to assign the
AC_PACKAGE_VERSION using the current SVN version number.
So I hacked up this in configure.in:
SVN_VERSION=`./version.sh`
AC_INIT(my-fine-package, $SVN_VERSION)
where version.sh is a script which will output on stdout the SVN
revision number.
This as expected *doesn't* work, autoconf indeed complains with:
configure.in:8: warning: AC_INIT: not a literal: $SVN_VERSION
and I get a syntax error when running the autogenerated configure
script.
The autoconf maual says about AC_INIT:
|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.
So my question is: how can I compute with M4 the value to put in the
AC_INIT macro (sorry I'm an M4 newbie).
Also, do you think is this approach a sane way to assign the
AC_PACKAGE_VERSION to an autoconfigured package?
Many thanks in advance.
Best regards.
--
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
- How to dinamically set VERSION for AC_INIT,
Stefano Sabatini <=