emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/configure.in


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/configure.in
Date: Mon, 02 Jan 2006 18:10:17 +0000

Index: emacs/configure.in
diff -u emacs/configure.in:1.402 emacs/configure.in:1.403
--- emacs/configure.in:1.402    Sun Dec 25 19:29:28 2005
+++ emacs/configure.in  Mon Jan  2 18:10:16 2006
@@ -1261,6 +1261,19 @@
   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 @@
 #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 @@
 
 /* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]