[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2.64, glib and syntax error: unexpected end of file
From: |
Ralf Wildenhues |
Subject: |
Re: 2.64, glib and syntax error: unexpected end of file |
Date: |
Fri, 14 Aug 2009 19:41:58 +0200 |
User-agent: |
Mutt/1.5.20 (2009-08-09) |
Hi Frederic,
* Frederic Peters wrote on Fri, Aug 14, 2009 at 02:02:27PM CEST:
> Building glib fails with autoconf 2.64; ./configure gives out this
> error:
>
> checking for GNUC visibility attribute... ./configure: line 31209:
> syntax error: unexpected end of file
> Anyway I reduced this as best as I could in the attached tarball;
> autoreconf; ./configure gives expected result with 2.63
> and aborts with the same 'unexpected end of file' with 2.64.
Thank you very much for this reduced test case, it made the analysis
rather easy. The GLIB_CHECK_COMPILE_WARNINGS macro in your acinclude.m4
file contains:
AS_IF([_AC_EVAL_STDERR($ac_compile) &&
AC_TRY_COMMAND([(if test -s conftest.err; then false ; else true;
fi)])],
[$2],
[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
m4_ifvaln([$3],[$3])dnl])dnl
ac_compile="$glib_ac_compile_save"
and it's the two dnl's that cause the problem, they lead to this
configure code:
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fiac_compile="$glib_ac_compile_save"
with the "fi" and the next line without intervening space.
Autoconf 2.64 changed AS_IF a bit to be more compact, and to allow
things like
AS_IF(...) && ...
as documented in NEWS:
** The m4sh macros AS_IF and AS_CASE can now be used in shell lists.
The responsibility for supplying a trailing newline now belongs to
the call site, but since most users did not add dnl, this generally
results in fewer empty lines in configure.
As a consequence, you need to remove the last dnl in the m4_ifvaln line.
With 2.63, it will lead to a harmless extra newline in the configure
script.
Cheers,
Ralf