# HG changeset patch # User diego # Date 1239388141 0 # Node ID fe379c71cb530def044de0751f50f7efe3474113 # Parent af00bd66ccf66653468c71d53868d16a0c288198 Move all CFLAGS checks together at the beginning of configure. diff -r af00bd66ccf6 -r fe379c71cb53 configure --- a/configure Fri Apr 10 17:39:44 2009 +0000 +++ b/configure Fri Apr 10 18:29:01 2009 +0000 @@ -2416,6 +2416,23 @@ else _warn_CFLAGS=yes fi + +cat > $TMPC << EOF +int main(void) { return 0; } +EOF +if test "$cc_vendor" = "gnu" ; then + cc_check -std=gnu99 && CFLAGS="-std=gnu99 $CFLAGS" + cc_check -Wdeclaration-after-statement && CFLAGS="-Wdeclaration-after-statement $CFLAGS" + cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS" + cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS" + cc_check -Wundef && CFLAGS="-Wundef $CFLAGS" +else + CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS" +fi + +cc_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer" + + if test -n "$LDFLAGS" ; then extra_ldflags="$extra_ldflags $LDFLAGS" _warn_CFLAGS=yes @@ -8017,21 +8034,6 @@ CXXFLAGS=" $CFLAGS -D__STDC_LIMIT_MACROS" -cat > $TMPC << EOF -int main(void) { return 0; } -EOF -if test "$cc_vendor" = "gnu" ; then - cc_check -std=gnu99 && CFLAGS="-std=gnu99 $CFLAGS" - cc_check -Wdeclaration-after-statement && CFLAGS="-Wdeclaration-after-statement $CFLAGS" - cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS" - cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS" - cc_check -Wundef && CFLAGS="-Wundef $CFLAGS" -else - CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS" -fi - -cc_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer" - # This must be the last test to be performed. Any other tests following it # could fail due to linker errors. libdvdnavmini is intentionally not linked # against libdvdread (to permit MPlayer to use its own copy of the library).