summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index bb85049a0c..3aad98a30f 100644
--- a/configure.in
+++ b/configure.in
@@ -124,10 +124,20 @@ return 0;
if test $ac_cv_c_compiler_gnu != no; then
if test x$opt_developer_mode = xyes; then
- CFLAGS="${CFLAGS} -g -Wall -Wno-pointer-sign -Wcast-align -W -Wpointer-arith -Wchar-subscripts -Wformat-security -Wno-format-y2k -Wmissing-braces -Winline -Wstrict-prototypes -Wno-unused-parameter"
+ CFLAGS="${CFLAGS} -g -Wall -Wcast-align -W -Wpointer-arith -Wchar-subscripts -Wformat-security -Wno-format-y2k -Wmissing-braces -Winline -Wstrict-prototypes -Wno-unused-parameter"
# CFLAGS="${CFLAGS} -g -W -Wall -Wcast-align -Wpointer-arith -Wchar-subscripts -Wformat-security -Wno-format-y2k -Wmissing-braces -Winline -Wstrict-prototypes -Wshadow -Wno-unused-parameter -Wimplicit -fno-common -Wno-sign-compare -Wbad-function-cast -Wendif-labels -Wmissing-declarations -Wno-missing-format-attribute -Wmissing-prototypes -Wnested-externs -Wpointer-arith -pedantic -Wlong-long -Wcast-qual -Wcast-align -Winline -Wredundant-decls -Wstrict-prototypes -Wwrite-strings -Wparentheses -Wsequence-point -Wpacked -Waggregate-return -Wfloat-equal -Wmultichar -Wunknown-pragmas -Wtrigraphs -Wswitch -Wreturn-type -Wmain -Wchar-subscripts -Wcomment -Wno-missing-noreturn"
fi
+ AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
+ _gcc_cflags_save=$CFLAGS
+ CFLAGS="-Wno-pointer-sign"
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
+ AC_MSG_RESULT($_gcc_psign)
+ CFLAGS=$_gcc_cflags_save;
+ if test x"$_gcc_psign" = xyes ; then
+ CFLAGS="$CFLAGS -Wno-pointer-sign"
+ fi
+
if test x$opt_dmalloc_mode = xyes; then
AC_CHECK_LIB(dmalloc, main)
AC_DEFINE(USE_DMALLOC, 1, [enable the use of dmalloc])