diff --git a/configure b/configure
index 9cf7ffe7ba39448a5b5343a2d80b18dad2334eb1..321dda183e38d9e0e6d4e8e65ed7043d3104d0ab 100755
--- a/configure
+++ b/configure
@@ -10668,8 +10668,9 @@ fi
 
 if test "x${GCC}" = "xyes"
 then
-  CFLAGS="$CFLAGS -Wall -Wpointer-arith"
-  echo "$as_me:$LINENO: checking for gcc strength-reduce bug" >&5
+  CFLAGS="$CFLAGS -Wall"
+
+    echo "$as_me:$LINENO: checking for gcc strength-reduce bug" >&5
 echo $ECHO_N "checking for gcc strength-reduce bug... $ECHO_C" >&6
 if test "${ac_cv_c_gcc_strength_bug+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10830,6 +10831,58 @@ echo "${ECHO_T}$ac_cv_c_gcc_gstabs" >&6
   then
     CFLAGS="$CFLAGS -gstabs+"
   fi
+
+    saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS -Wpointer-arith -Werror"
+  echo "$as_me:$LINENO: checking for broken string.h that generates warnings" >&5
+echo $ECHO_N "checking for broken string.h that generates warnings... $ECHO_C" >&6
+if test "${ac_cv_c_string_h_warnings+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_string_h_warnings=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_string_h_warnings=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_string_h_warnings" >&5
+echo "${ECHO_T}$ac_cv_c_string_h_warnings" >&6
+  CFLAGS=$saved_CFLAGS
+  if test "$ac_cv_c_string_h_warnings" = "no"
+  then
+    CFLAGS="$CFLAGS -Wpointer-arith"
+  fi
 fi
 
 
diff --git a/configure.ac b/configure.ac
index 321d97e5ac5cab7e28601531b963e799009859f9..60964deef553c372e3ebc4359c89bd731b8e96aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -634,11 +634,13 @@ then
     AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
 fi
 
-dnl **** Check for gcc strength-reduce bug ****
+dnl **** Check for gcc specific options ****
 
 if test "x${GCC}" = "xyes"
 then
-  CFLAGS="$CFLAGS -Wall -Wpointer-arith"
+  CFLAGS="$CFLAGS -Wall"
+
+  dnl Check for strength-reduce bug
   AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
                   AC_TRY_RUN([
 int	L[[4]] = {0,1,2,3};
@@ -676,6 +678,18 @@ int main(void) {
   then
     CFLAGS="$CFLAGS -gstabs+"
   fi
+
+  dnl Check for noisy string.h
+  saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS -Wpointer-arith -Werror"
+  AC_CACHE_CHECK([for broken string.h that generates warnings], ac_cv_c_string_h_warnings,
+      AC_TRY_COMPILE([#include <string.h>],[],
+                     [ac_cv_c_string_h_warnings=no],[ac_cv_c_string_h_warnings=yes]))
+  CFLAGS=$saved_CFLAGS
+  if test "$ac_cv_c_string_h_warnings" = "no"
+  then
+    CFLAGS="$CFLAGS -Wpointer-arith"
+  fi
 fi
 
 dnl **** Check how to define a function in assembly code ****