From 3818abb4aef50d3122925a3d731904124ec1e9cc Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Apr 2009 18:29:01 +0000 Subject: Move all CFLAGS checks together at the beginning of configure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29169 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index b8a4477424..5cdff8855d 100755 --- a/configure +++ b/configure @@ -2416,6 +2416,23 @@ elif test -z "$CFLAGS" ; then 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 @@ fi 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). -- cgit v1.2.3