configure.in
changeset 8910 c23ffe72934c
parent 8889 26a6243b27c2
child 8922 dfb6f8611ebe
     1.1 --- a/configure.in	Sun Jun 22 10:05:59 2014 -0700
     1.2 +++ b/configure.in	Sun Jun 22 11:02:56 2014 -0700
     1.3 @@ -1159,6 +1159,28 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl See if GCC's -Wshadow is supported.
     1.8 +CheckWarnShadow()
     1.9 +{
    1.10 +    AC_MSG_CHECKING(for GCC -Wshadow option)
    1.11 +    have_gcc_Wshadow=no
    1.12 +
    1.13 +    save_CFLAGS="$CFLAGS"
    1.14 +    CFLAGS="$save_CFLAGS -Wshadow"
    1.15 +    AC_TRY_COMPILE([
    1.16 +    int x = 0;
    1.17 +    ],[
    1.18 +    ],[
    1.19 +    have_gcc_Wshadow=yes
    1.20 +    ])
    1.21 +    AC_MSG_RESULT($have_gcc_Wshadow)
    1.22 +    CFLAGS="$save_CFLAGS"
    1.23 +
    1.24 +    if test x$have_gcc_Wshadow = xyes; then
    1.25 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wshadow"
    1.26 +    fi
    1.27 +}
    1.28 +
    1.29  dnl Check for Wayland
    1.30  CheckWayland()
    1.31  {
    1.32 @@ -3216,6 +3238,7 @@
    1.33  
    1.34  dnl Do this on all platforms, after everything else.
    1.35  CheckWarnAll
    1.36 +#CheckWarnShadow
    1.37  
    1.38  # Verify that we have all the platform specific files we need
    1.39