bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] nl_langinfo: avoid configure-time syntax error


From: Paolo Bonzini
Subject: Re: [PATCH] nl_langinfo: avoid configure-time syntax error
Date: Tue, 05 Jan 2010 18:58:26 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 01/04/2010 03:03 PM, Jim Meyering wrote:
Testing my proposed make-regex-use-nl_langinfo changes,
I encountered this configure failure:
     ...
     checking whether<netinet/in.h>  is self-contained... yes
     ./configure: line 31968: syntax error near unexpected token `else'
     ./configure: line 31968: `  else'

It was due to this syntax error:

     if test $HAVE_LANGINFO_H = 1; then

     else
       ac_cv_func_nl_langinfo=no
     fi

Here's the work-around.
However, it would be far better if AC_CHECK_FUNCS_ONCE
were to expand to e.g., ":" rather than the empty string,
so that it can be used unadorned in situations like the above.
Otherwise, it looks like a pitfall designed to trap the uninitiated.

Bruno, ok to apply?

No, AC_CHECK_FUNCS_ONCE should _always_ expand to an empty string. The test is done always---and it is done outside the macro. It's clearer to do as in the attached patch. Bruno, is this okay?

Paolo

Attachment: nl-langinfo.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]