Re: AC_TRY_COMPILE() annoyances with 2.63b

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

 



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
> significant, and only leading space is stripped.  The bug is in your
> configure.ac.
> 
> That said, autoconf could probably be taught that, for some macros, an
> argument of all whitespace is morally equivalent to an empty argument.

seems the issue is worse than people being pedantic with [].  for example, if 
a macro is expanded implicitly, then a user explicit call to that macro gets 
nooped and we're back where we started -- syntax error

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'
./configure: line 2676: `fi'
-mike


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux