On Wed, Mar 3, 2010 at 1:47 PM, Eric Blake <eblake@xxxxxxxxxx> wrote: > According to Ralf Corsepius on 3/3/2010 4:04 AM: >> On 03/03/2010 11:52 AM, Steffen Dettmer wrote: >>> Hi, >>> >>> in configure.in I have: >>> >>> AC_CHECK_FUNCS(printf) > > C89 guarantees the existence of printf - this particular use of > AC_CHECK_FUNCS is most likely unnecessary for any modern > machine, unless your goal is to port to an embedded system that > doesn't provide all of C89. Unfortunately we cannot rely on C89. (a platform without a function actually is the easy case; the difficult case is when a platform is able to link a function which must not be called because it just crashes because of bad library retargeting) > > > cc1: warnings being treated as errors conftest.c:67: > > > warning: conflicting types for built-in function 'printf' > > > > > > what to do best here? > > Not using -Werror > > That's been the standard advice for years now. Do I understand correctly that it is generally adviced to not use the option -Werror? Do you have some link? In my case, most Development Rules require that sources compile without warnings. It seems that across the team less warnings get accidently checked in when using -Werror/-WX (our other compilers have no such option) or what the compilers support to abort on warnings, so it was decided to build some software with that option. > Don't do something if it hurts. mmm... (I think the idea is to make a warning hurting to ensure that it is fixed instantly and cannot be overseen / forgotten). > -Werror is a can of worms - there is NO way to silence all > possible warnings for all possible compilers. It's great on a > per-compiler build (for example, coreutils provides > --enable-gcc-warnings, which conditionally adds -Werror to > CFLAGS if the compiler spuports it), but only for the program > itself, and not for the duration of the configure run. Yes, inside configure -Werror isn't needed but for compiling all the programs source files. How to add it for the program but not for the configure run? Via libxyz_a_CFLAGS of all libs? > Meanwhile, there is a patch on the table to teach autoconf 2.66 how to > recognize and work around -Werror coupled with gcc; I hope to finish > reviewing and apply it soon. > http://lists.gnu.org/archive/html/bug-autoconf/2010-02/msg00040.html ohh sounds promising :) oki, Steffen _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf