Changeset 7784 for trunk/configure.ac


Ignore:
Timestamp:
Jan 23, 2009, 6:46:09 PM (13 years ago)
Author:
charles
Message:

(trunk) #1742: don't use warnings added in gcc 3.4 if we're using a version older than that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r7772 r7784  
    2727else
    2828  supported_build=no
    29   CFLAGS="$CFLAGS -g -O0"
    30   CXXFLAGS="$CXXFLAGS -g -O0"
     29  CFLAGS="$CFLAGS -g -O"
     30  CXXFLAGS="$CXXFLAGS -g -O"
    3131  if test m4_substr(peer_id_prefix,6,1) = "X"; then
    3232    AC_DEFINE(TR_BETA_RELEASE, 1, [Define to 1 if this is a beta release of Transmission])
     
    5858AC_C_INLINE
    5959if test "x$GCC" = "xyes" ; then
    60     CFLAGS="-std=gnu99 -ggdb3 -Wall -Wextra -Wredundant-decls -Wpointer-arith -Wformat-security -W -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winit-self -Wundef -Wnested-externs -Wmissing-format-attribute"
    61     CXXFLAGS="-Wall -Wformat-security -W"
     60
     61    CFLAGS="-std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunreachable-code -Wunused-parameter -Wwrite-strings"
     62
     63    dnl figure out gcc version
     64    AC_MSG_CHECKING([gcc version])
     65    GCC_VERSION=`$CC -dumpversion`
     66    GCC_MAJOR=`echo $GCC_VERSION | cut -d . -f1`
     67    GCC_MINOR=`echo $GCC_VERSION | cut -d . -f2`
     68    GCC_VERSION_NUM=`(expr $GCC_MAJOR "*" 100 + $GCC_MINOR) 2>/dev/null`
     69
     70    AC_MSG_RESULT($GCC_VERSION)
     71    if test $GCC_VERSION_NUM -ge 304; then
     72        dnl these were added in 3.4
     73        CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
     74    fi
    6275fi
    6376
Note: See TracChangeset for help on using the changeset viewer.