Mercurial > emacs
diff configure.in @ 67981:6e1f6ef9bc5f
* configure.in: Use -Wno-pointer-sign if available.
* configure: Regenerate.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 02 Jan 2006 18:10:16 +0000 |
parents | 063e68f9e91f |
children | 199e8947976a 55e22205ba88 |
line wrap: on
line diff
--- a/configure.in Mon Jan 02 15:41:56 2006 +0000 +++ b/configure.in Mon Jan 02 18:10:16 2006 +0000 @@ -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