GNU bug report logs -
#7990
Quoting problem with AM_COND_IF
Previous Next
Reported by: Dennis Schridde <devurandom <at> gmx.net>
Date: Sat, 5 Feb 2011 19:46:02 UTC
Severity: normal
Tags: notabug
Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
When I write configure.ac as quoted below and run:
aclocal -I m4
autoconf
automake
the latter will respond with:
"configure.ac:7: missing m4 quoting, macro depth 2"
Changing the AS_IF line to:
AS_IF([test -x /bin],[
fixes that. (Of course also insert the obvious ']')
When I then run ./configure (after running autoconf and automake again), I get
this error:
./configure: line 2428: syntax error near unexpected token `('
The cause is that the error message is cut off at (before) the ',' comma.
This can be fixed by changing the AM_COND_IF line to:
AM_COND_IF([CONDITION],,[
(Of course also insert the obvious ']')
Since other macros defined by autoconf and automake do not have to be quoted
in this way, I assume that there is a quoting problem specific to AM_COND_IF.
I.e. AM_COND_IF does not quote its arguments hard enough, or something
similar.
--- configure.ac ---
AC_INIT([test], [0])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
AM_CONDITIONAL([CONDITION],[test -x /tmp])
AS_IF([test -x /bin],
AM_COND_IF([CONDITION],,
AC_MSG_ERROR([comma separated, message])
)
)
AC_OUTPUT([Makefile])
--- Makefile.am ---
ACLOCAL_AMFLAGS = -I m4
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 14 years and 108 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.