summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-01-02 18:10:16 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-01-02 18:10:16 +0000
commit01abe918fcabff234ed0cd105bd9e114fbb6a245 (patch)
tree0f944095d4f3e42e79d552a95e3971e2464e2e6b /configure.in
parent7e8b9dc3cc466eec23c233b219f73f4e9181bc40 (diff)
* configure.in: Use -Wno-pointer-sign if available.
* configure: Regenerate.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index b9d2b469f5..9303dd71f0 100644
--- a/configure.in
+++ b/configure.in
@@ -1261,6 +1261,19 @@ then
CC="$CC $NON_GCC_TEST_OPTIONS"
fi
+### Use -Wno-pointer-sign if the compiler supports it
+AC_MSG_CHECKING([whether gcc understands -Wno-pointer-sign])
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wno-pointer-sign"
+AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+if test $has_option = yes; then
+ C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
+fi
+AC_MSG_RESULT($has_option)
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
#### Some other nice autoconf tests.
dnl checks for programs
@@ -1394,6 +1407,10 @@ configure___ use_mmap_for_buffers=no
#endif
#endif
+#ifndef C_WARNINGS_SWITCH
+#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
+#endif
+
#ifndef LD_SWITCH_MACHINE
#define LD_SWITCH_MACHINE
#endif
@@ -1422,7 +1439,7 @@ configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
/* Get the CFLAGS for real compilation. */
#ifdef __GNUC__
-configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
+configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
#else
configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
#endif