simple example:
$ cat configure.ac
AC_INIT
AS_IF([:], [
: some random user stuff
],[
AC_PROG_LEX
AC_DECL_YYTEXT
])
AC_OUTPUT
$ autoconf --version
autoconf (GNU Autoconf) 2.64
$ autoconf&& ./configure -q
./configure: line 2676: syntax error near unexpected token `fi'
./co
On Sunday 05 April 2009 20:46:03 Eric Blake wrote:
> According to Mike Frysinger on 4/5/2009 4:10 PM:
> > AC_TRY_COMPILE() is invoked with an empty 4th argument: []. i think
> >
> > [ sp_expire_available=yes ], []
> > )
>
> That's not an empty fourth argument. Remember, trailing space IS
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
[adding autoconf-patches, replies can drop autoconf]
According to Eric Blake on 4/6/2009 8:25 PM:
> According to Mike Frysinger on 4/6/2009 3:43 PM:
> I'm also leaning towards omitting the else if $1 is provably blank,
> otherwise providing the : in c
Eric Blake writes:
> According to Andreas Schwab on 4/7/2009 3:47 AM:
>>>From the autoconf manual:
>>
>> There are shells that do not reset the exit status from an `if':
>>
>> $ if (exit 42); then true; fi; echo $?
>> 42
>>
>> whereas a proper shell should have print
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Andreas Schwab on 4/7/2009 3:47 AM:
>>From the autoconf manual:
>
> There are shells that do not reset the exit status from an `if':
>
> $ if (exit 42); then true; fi; echo $?
> 42
>
> whereas a proper shel
Eric Blake writes:
> I'm also leaning towards omitting the else if $1 is provably blank,
> otherwise providing the : in case non-blank $1 ultimately expands to a
> blank (unless someone finds a shell where 'if false ; then :; fi; echo $?'
> fails to output 0).
>From the autoconf manual:
Th
On Monday 06 April 2009 22:25:12 Eric Blake wrote:
> Now for a question - right now, m4_default([$1], [$2]) is a nice shorthand
> for m4_ifval([$1], [$1], [$2]); is there any reason to create a shorthand
> for m4_ifnblank([$1], [$1], [$2]) that likewise only needs two arguments?
> And if so, what
* Ralf Wildenhues wrote on Tue, Apr 07, 2009 at 07:38:10AM CEST:
>
> But that isn't what you need here. There are situations in which you
> cannot prove whether $1 is blank or not. In that case, we should add
> both the ":\n" as well as $1.
Actually, $1 can just expand to `#\n' (that is, commen
* Eric Blake wrote on Tue, Apr 07, 2009 at 04:25:12AM CEST:
> I'm also leaning towards omitting the else if $1 is provably blank,
OK with me.
> otherwise providing the : in case non-blank $1 ultimately expands to a
> blank (unless someone finds a shell where 'if false ; then :; fi; echo $?'
> fai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Mike Frysinger on 4/6/2009 3:43 PM:
>>> m4_define([_AS_IF_ELSE],
>>> [m4_ifvaln([$1],
>>> -[else
>>> +[else :
>>>$1])])
>>>
>>> m4_defun([AS_IF],
>> I like this one, for simplicity and obvious correctness alone, but will
>> defer to
On Monday 06 April 2009 14:09:29 Ralf Wildenhues wrote:
> Hello Mike, Eric,
>
> * Mike Frysinger wrote on Mon, Apr 06, 2009 at 03:16:53PM CEST:
> > --- a/lib/m4sugar/m4sh.m4
> > +++ b/lib/m4sugar/m4sh.m4
> > @@ -607,7 +607,7 @@ m4_define([_AS_IF],
> > ])
> > m4_define([_AS_IF_ELSE],
> > [m4_ifva
Hello Mike, Eric,
* Mike Frysinger wrote on Mon, Apr 06, 2009 at 03:16:53PM CEST:
> --- a/lib/m4sugar/m4sh.m4
> +++ b/lib/m4sugar/m4sh.m4
> @@ -607,7 +607,7 @@ m4_define([_AS_IF],
> ])
> m4_define([_AS_IF_ELSE],
> [m4_ifvaln([$1],
> -[else
> +[else :
>$1])])
>
> m4_defun([AS_IF],
I like
On Monday 06 April 2009 08:59:32 Eric Blake wrote:
> According to Mike Frysinger on 4/5/2009 7:19 PM:
> >> i'm not an expert by any means with internal autoconf/m4. if there's a
> >> m4 helper function to test whether an argument contains something other
> >> than whitespace, then the change to m4
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Mike Frysinger on 4/5/2009 7:19 PM:
>> i'm not an expert by any means with internal autoconf/m4. if there's a m4
>> helper function to test whether an argument contains something other than
>> whitespace, then the change to m4sh.m4:_AS_IF
On Sunday 05 April 2009 21:01:29 Mike Frysinger wrote:
> On Sunday 05 April 2009 20:46:03 Eric Blake wrote:
> > That said, autoconf could probably be taught that, for some macros, an
> > argument of all whitespace is morally equivalent to an empty argument.
> > Patches welcome.
>
> i'm not an exper
On Sunday 05 April 2009 20:46:03 Eric Blake wrote:
> According to Mike Frysinger on 4/5/2009 4:10 PM:
> > AC_TRY_COMPILE() is invoked with an empty 4th argument: []. i think
> >
> > [ sp_expire_available=yes ], []
> > )
>
> That's not an empty fourth argument. Remember, trailing space IS
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Mike Frysinger on 4/5/2009 4:10 PM:
> AC_TRY_COMPILE() is invoked with an empty 4th argument: []. i think
>
> [ sp_expire_available=yes ], []
> )
That's not an empty fourth argument. Remember, trailing space IS
significant,
after upgrading from 2.63 to 2.63b, i noticed some code configure.ac files
(like in openssh) results in invalid shell code. this is because
AC_TRY_COMPILE() is invoked with an empty 4th argument: []. i think
specifically, this:
AC_TRY_COMPILE(
[
#include
#include
stru
18 matches
Mail list logo