|
From: Dirk M. <mu...@kd...> - 2005-02-26 21:04:30
|
CVS commit by mueller:
add -Wno-pointer-sign if compiler supports it (removes 2000+ warnings when compiling with gcc 4.0)
M +22 -0 configure.in 1.149
--- valgrind/configure.in #1.148:1.149
@@ -252,4 +252,26 @@
AC_SUBST(PREFERRED_STACK_BOUNDARY)
+# does this compiler support -Wno-pointer-sign ?
+AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign ])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wno-pointer-sign"
+
+AC_TRY_COMPILE(, [
+int main () { return 0 ; }
+],
+[
+no_pointer_sign=yes
+AC_MSG_RESULT([yes])
+], [
+no_pointer_sign=no
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+if test x$no_pointer_sign = xyes; then
+ CFLAGS="$CFLAGS -Wno-pointer-sign"
+fi
+
# Check for TLS support in the compiler and linker
AC_CACHE_CHECK([for TLS support], vg_cv_tls,
|