[Top][All Lists]

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

Re: AC_CHECK_FUNC with -Werror

From: Ralf Wildenhues
Subject: Re: AC_CHECK_FUNC with -Werror
Date: Fri, 5 Jun 2009 19:34:26 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Chris,

* Chris Frey wrote on Fri, Jun 05, 2009 at 10:11:57AM CEST:
> I'm noticing that if I use something like AC_CHECK_FUNC([strdup])
> and then run configure like:
>       CFLAGS="-Wall -Werror" ./configure
> The test for strdup fails with the error:
>       error: conflicting types for built-in function 'strdup'
> when using gcc 4.3.2.
> What is the recommended way to use both of these features (AC_CHECK_FUNC
> and -Werror) at once?

Not use -Werror.  Seriously, it is impossible to get all configure tests
to be effective, efficient, portable, and warning-free for all kinds of
useful and useless compiler warning flags from all kinds of compilers
and compiler versions.  We've been fixing a few instances that could be
improved without greater harm, but with some it just seems impossible to

Just add -Werror at 'make' time if you need to use it.

You can also think about using Automake-1.11's silent-rules option, some
people say it helps them see warnings stand out more from the build log
(but a good editor that parses 'make' output does just as well).

Hope that helps.


reply via email to

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