~ubuntu-branches/ubuntu/trusty/libpeas/trusty-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2013-01-16 09:53:41 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130116095341-wfnkv4dnzt9t8je7
Tags: 1.6.2-0ubuntu1
* New upstream release
* debian/control:
  - Use standards version 3.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1493
1493
 
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"
1499
1499
                done
1503
1503
])
1504
1504
 
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
dnl WARN_CFLAGS
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])"])
1517
1518
 
1518
 
    warnCFLAGS=
1519
1519
    if test "x$GCC" != xyes; then
1520
1520
        enable_compile_warnings=no
1521
1521
    fi
1531
1531
        warning_flags="-Wall"
1532
1532
        ;;
1533
1533
    yes)
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"
1535
1535
        ;;
1536
1536
    maximum|error)
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([], [],
1544
 
                        has_option=yes,
1545
 
                        has_option=no,)
1546
 
                CFLAGS="$SAVE_CFLAGS"
1547
 
                AC_MSG_RESULT($has_option)
1548
 
                if test $has_option = yes; then
1549
 
                  warning_flags="$warning_flags $option"
1550
 
                fi
1551
 
                unset has_option
1552
 
                unset SAVE_CFLAGS
1553
 
        done
1554
 
        unset option
1555
 
        if test "$enable_compile_warnings" = "error" ; then
1556
 
            warning_flags="$warning_flags -Werror"
1557
 
        fi
 
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"
1558
1538
        ;;
1559
1539
    *)
1560
1540
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1561
1541
        ;;
1562
1542
    esac
 
1543
 
 
1544
    if test "$enable_compile_warnings" = "error" ; then
 
1545
        warning_flags="$warning_flags -Werror"
 
1546
    fi
 
1547
 
 
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([], [],
 
1554
            has_option=yes,
 
1555
            has_option=no,)
 
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"
 
1560
        fi
 
1561
        unset has_option
 
1562
        unset save_CFLAGS
 
1563
    done
 
1564
    unset 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)
1566
1568
 
1567
1569
    AC_ARG_ENABLE(iso-c,
1568
1570
                  AC_HELP_STRING([--enable-iso-c],
1585
1587
    fi
1586
1588
    AC_MSG_RESULT($complCFLAGS)
1587
1589
 
1588
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
1590
    WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
1589
1591
    AC_SUBST(WARN_CFLAGS)
1590
1592
])
1591
1593