1494
1494
DISABLE_DEPRECATED=""
1495
1495
if test $USE_MAINTAINER_MODE = yes; then
1496
DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
1496
DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS LIBSOUP"
1497
1497
for DOMAIN in $DOMAINS; do
1498
1498
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
1505
1505
dnl GNOME_COMPILE_WARNINGS
1506
dnl Turn on many useful compiler warnings
1506
dnl Turn on many useful compiler warnings and substitute the result into
1507
1508
dnl For now, only works on GCC
1508
1509
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1509
1510
dnl ******************************
1515
1516
[Turn on compiler warnings]),,
1516
1517
[enable_compile_warnings="m4_default([$1],[yes])"])
1519
1519
if test "x$GCC" != xyes; then
1520
1520
enable_compile_warnings=no
1531
1531
warning_flags="-Wall"
1534
warning_flags="-Wall -Wmissing-prototypes"
1534
warning_flags="-Wall -Wstrict-prototypes -Waggregate-return -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs"
1537
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1538
CFLAGS="$warning_flags $CFLAGS"
1539
for option in -Wno-sign-compare; do
1540
SAVE_CFLAGS="$CFLAGS"
1541
CFLAGS="$CFLAGS $option"
1542
AC_MSG_CHECKING([whether gcc understands $option])
1543
AC_TRY_COMPILE([], [],
1546
CFLAGS="$SAVE_CFLAGS"
1547
AC_MSG_RESULT($has_option)
1548
if test $has_option = yes; then
1549
warning_flags="$warning_flags $option"
1555
if test "$enable_compile_warnings" = "error" ; then
1556
warning_flags="$warning_flags -Werror"
1537
warning_flags="-Wall -Wstrict-prototypes -Waggregate-return -Wdeclaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -Wnested-externs -Wno-sign-compare"
1560
1540
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1544
if test "$enable_compile_warnings" = "error" ; then
1545
warning_flags="$warning_flags -Werror"
1548
dnl Check whether GCC supports the warning options
1549
for option in $warning_flags; do
1550
save_CFLAGS="$CFLAGS"
1551
CFLAGS="$CFLAGS $option"
1552
AC_MSG_CHECKING([whether gcc understands $option])
1553
AC_TRY_COMPILE([], [],
1556
CFLAGS="$save_CFLAGS"
1557
AC_MSG_RESULT([$has_option])
1558
if test $has_option = yes; then
1559
tested_warning_flags="$tested_warning_flags $option"
1563
1565
CFLAGS="$realsave_CFLAGS"
1564
1566
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1565
AC_MSG_RESULT($warning_flags)
1567
AC_MSG_RESULT($tested_warning_flags)
1567
1569
AC_ARG_ENABLE(iso-c,
1568
1570
AC_HELP_STRING([--enable-iso-c],