On Slackware 8.1, this caused a screenful of warnings for *every* file compiled, which makes it difficult to see important warnings.
Mike
ChangeLog:
* Turn off -Wpointer-arith if it generates warnings when including string.h.
Index: configure.ac =================================================================== RCS file: /home/wine/wine/configure.ac,v retrieving revision 1.126 diff -u -r1.126 configure.ac --- configure.ac 24 Jan 2003 01:08:15 -0000 1.126 +++ configure.ac 23 Feb 2003 22:03:49 -0000 @@ -634,11 +634,28 @@ AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux]) fi +dnl *** Check for noisy string.h *** + +OLD_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -Wpointer-arith -pedantic-errors" +AC_CACHE_CHECK([string.h that generates warings], ac_string_h_warnings, + AC_TRY_COMPILE( [#include <string.h>], + [;], + [ac_string_h_warnings=no], + [ac_string_h_warnings=yes] + ) +) +CFLAGS=$OLD_CFLAGS +if test "$ac_string_h_warnings" = "no" +then + CFLAGS="$OLD_CFLAGS -Wpointer-arith" +fi + dnl **** Check for gcc strength-reduce bug **** if test "x${GCC}" = "xyes" then - CFLAGS="$CFLAGS -Wall -Wpointer-arith" + CFLAGS="$CFLAGS -Wall" AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug, AC_TRY_RUN([ int L[[4]] = {0,1,2,3};