summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMichel Bardiaux <mbardiaux@peaktime.be>2006-01-03 14:18:43 +0000
committerDiego Biurrun <diego@biurrun.de>2006-01-03 14:18:43 +0000
commit9f23a10ae096e67d49f1bfd4da1a89b4cdb64652 (patch)
tree27ee889305326ef9ce757e9cea7fb95cceefcc32 /configure
parentbf3027c87b7a8e00af3a6de0dbd742de9ea46c0c (diff)
Add -Wdeclaration-after-statement to CFLAGS on GCCs that support it.
patch by Michel Bardiaux < mbardiaux !! at !! mediaxim !! dot !! be > Originally committed as revision 4804 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure b/configure
index f5a4dcf6e6..5c7ad4f5a3 100755
--- a/configure
+++ b/configure
@@ -1029,6 +1029,17 @@ if $cc -msse -o $TMPO $TMPC 2> /dev/null ; then
builtin_vector=yes
fi
+# Probe for -Wdeclaration-after-statement
+if test "$cc" == "gcc"; then
+ cat > $TMPC << EOF
+ int main( void ) { return 0; }
+EOF
+
+ if $cc -Wdeclaration-after-statement -Werror -o $TMPE $TMPC 2> /dev/null ; then
+ CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+ fi
+fi
+
# dlopen/dlfcn.h probing
cat > $TMPC << EOF