back: Copy the -Wdeclaration-after-statement test from base. Also adds -Wall.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32878 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-04-17 21:16:12 +00:00
parent 88048d141c
commit 7d4e86e5d3
3 changed files with 64 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-04-17 Eric Wasylishen <ewasylishen@gmail.com>
* configure.ac: Copy the -Wdeclaration-after-statement test from
base. Also adds -Wall.
2011-04-14 Eric Wasylishen <ewasylishen@gmail.com>
* Source/cairo/CairoFontEnumerator.m:

39
configure vendored
View file

@ -594,6 +594,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
BACKEND_NAME
WARN_FLAGS
BUILD_SERVER
BUILD_GRAPHICS
WITH_WRASTER
@ -6725,6 +6726,44 @@ _ACEOF
#--------------------------------------------------------------------
# Check for -Wdeclaration-after-statement
#--------------------------------------------------------------------
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wdeclaration-after-statement" >&5
$as_echo_n "checking whether the compiler supports -Wdeclaration-after-statement... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
HAS_W_DECL_AFTER_STATEMENT=yes
else
HAS_W_DECL_AFTER_STATEMENT=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$saved_CFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_W_DECL_AFTER_STATEMENT" >&5
$as_echo "$HAS_W_DECL_AFTER_STATEMENT" >&6; }
if test x"$HAS_W_DECL_AFTER_STATEMENT" = x"yes"; then
WARN_FLAGS="-Wall -Wdeclaration-after-statement"
else
WARN_FLAGS=-Wall
fi
#--------------------------------------------------------------------
# Set the name of the backend
#--------------------------------------------------------------------

View file

@ -634,6 +634,26 @@ AC_DEFINE_UNQUOTED(BUILD_GRAPHICS,$BUILD_GRAPHICS,
AC_SUBST(BUILD_GRAPHICS)
AC_SUBST(BUILD_SERVER)
#--------------------------------------------------------------------
# Check for -Wdeclaration-after-statement
#--------------------------------------------------------------------
AC_MSG_CHECKING(whether the compiler supports -Wdeclaration-after-statement)
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],HAS_W_DECL_AFTER_STATEMENT=yes,HAS_W_DECL_AFTER_STATEMENT=no)
CFLAGS="$saved_CFLAGS"
AC_MSG_RESULT($HAS_W_DECL_AFTER_STATEMENT)
if test x"$HAS_W_DECL_AFTER_STATEMENT" = x"yes"; then
WARN_FLAGS="-Wall -Wdeclaration-after-statement"
else
WARN_FLAGS=-Wall
fi
AC_SUBST(WARN_FLAGS)
#--------------------------------------------------------------------
# Set the name of the backend
#--------------------------------------------------------------------