Re: How to dinamically set VERSION for AC_INIT

2007-12-14 Thread Stefano Sabatini
On date Friday 2007-12-14 15:56:49 +0100, Andreas Schwab wrote: > Stefano Sabatini <[EMAIL PROTECTED]> writes: > > > 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

Re: How to dinamically set VERSION for AC_INIT

2007-12-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [adding m4-discuss for a discussion on syscmd/esyscmd behavior] According to Eric Blake on 12/14/2007 8:05 AM: > According to Andreas Schwab on 12/14/2007 7:56 AM: >> AC_INIT(my-fine-package, m4_esyscmd([./version.sh | tr -d '\n'])) > >> Note that yo

Re: How to dinamically set VERSION for AC_INIT

2007-12-14 Thread Andreas Schwab
Eric Blake <[EMAIL PROTECTED]> writes: > According to Andreas Schwab on 12/14/2007 7:56 AM: >> AC_INIT(my-fine-package, m4_esyscmd([./version.sh | tr -d '\n'])) >> >> Note that you need to manually remove the final newline, unlike command >> substitutions m4_esyscmd does not do that for you. > >

Re: How to dinamically set VERSION for AC_INIT

2007-12-14 Thread Ralf Wildenhues
Hello, * Eric Blake wrote on Fri, Dec 14, 2007 at 04:04:20PM CET: > > AC_INIT([GNU Autoconf], > m4_esyscmd([build-aux/git-version-gen . .version]), > [EMAIL PROTECTED]) [...] > One thing to be aware of is build > dependencies [...] > Therefore, autoconf also has a GNUMakefile that

Re: How to dinamically set VERSION for AC_INIT

2007-12-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Andreas Schwab on 12/14/2007 7:56 AM: > AC_INIT(my-fine-package, m4_esyscmd([./version.sh | tr -d '\n'])) > > Note that you need to manually remove the final newline, unlike command > substitutions m4_esyscmd does not do that for you. Hm

Re: How to dinamically set VERSION for AC_INIT

2007-12-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Stefano Sabatini on 12/14/2007 7:45 AM: > > |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

Re: How to dinamically set VERSION for AC_INIT

2007-12-14 Thread Andreas Schwab
Stefano Sabatini <[EMAIL PROTECTED]> writes: > 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, $SV

Re: Detecting that AC_PROG_LIBTOOL has been invoked

2007-12-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paolo Bonzini on 12/14/2007 7:03 AM: >> What is the m4_provide_if? I didn't find it in the manual of autoconf >> and m4. > > It's in m4sugar. > >> Anyways, does this guarantee me that the user did INVOKE the give >> macros, not merely t

Re: Detecting that AC_PROG_LIBTOOL has been invoked

2007-12-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [Adding bug-autoconf, replies can drop libtool] According to Paolo Bonzini on 12/14/2007 5:24 AM: > > You can use m4_provide_if like this: > > m4_define([m4_provided], [ > m4_provide_if([AC_PROG_LIBTOOL], [], [ > m4_provide_if([LT_INIT], [], >

How to dinamically set VERSION for AC_INIT

2007-12-14 Thread Stefano Sabatini
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

Re: Detecting that AC_PROG_LIBTOOL has been invoked

2007-12-14 Thread Paolo Bonzini
m4_define([m4_provided], [ m4_provide_if([AC_PROG_LIBTOOL], [], [ m4_provide_if([LT_INIT], [], [m4_warn([syntax], [Libtool required by $1])])])])]) ... m4_provided([MY_MACRO_NAME]) I didn't count the number of closing brackets. What is the m4_provide_if? I didn't find it in