comparison configure @ 18319:0ebc285b31a2

use CPP/LDFLAGS if set (but warn about this), and set our CFLAGS before they are used by cc_check.
author reimar
date Thu, 27 Apr 2006 19:06:25 +0000
parents 2b78ad4401e1
children 29b2221982b3
comparison
equal deleted inserted replaced
18318:fd4719223745 18319:0ebc285b31a2
510 _install=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install" 510 _install=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install"
511 ;; 511 ;;
512 --with-install=*) 512 --with-install=*)
513 _install=`echo $ac_option | cut -d '=' -f 2 ` 513 _install=`echo $ac_option | cut -d '=' -f 2 `
514 ;; 514 ;;
515 --enable-profile)
516 _profile='-p'
517 ;;
518 --disable-profile)
519 _profile=
520 ;;
521 --enable-debug)
522 _debug='-g'
523 ;;
524 --enable-debug=*)
525 _debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
526 ;;
527 --disable-debug)
528 _debug=
529 ;;
515 esac 530 esac
516 done 531 done
517 532
518 # Determine our OS name and CPU architecture 533 # Determine our OS name and CPU architecture
519 if test -z "$_target" ; then 534 if test -z "$_target" ; then
1470 echocheck "assembler support of -pipe option" 1485 echocheck "assembler support of -pipe option"
1471 cat > $TMPC << EOF 1486 cat > $TMPC << EOF
1472 int main(void) { return 0; } 1487 int main(void) { return 0; }
1473 EOF 1488 EOF
1474 cc_check -pipe && _pipe="-pipe" && echores "yes" || echores "no" 1489 cc_check -pipe && _pipe="-pipe" && echores "yes" || echores "no"
1490
1491 # Checking for CFLAGS
1492 _stripbinaries=yes
1493 if test "$_profile" != "" || test "$_debug" != "" ; then
1494 CFLAGS="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
1495 if test "$_cc_major" -ge "3" ; then
1496 CFLAGS=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
1497 fi
1498 _stripbinaries=no
1499 elif test -z "$CFLAGS" ; then
1500 CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
1501 else
1502 _warn_CFLAGS=yes
1503 fi
1504 if test -n "$LDFLAGS" ; then
1505 _ld_extra="$_ld_extra $LDFLAGS"
1506 _warn_CFLAGS=yes
1507 fi
1508 if test -n "$CPPFLAGS" ; then
1509 _inc_extra="$_inc_extra $LDFLAGS"
1510 _warn_CFLAGS=yes
1511 fi
1475 1512
1476 _prefix="/usr/local" 1513 _prefix="/usr/local"
1477 1514
1478 # GOTCHA: the variables below defines the default behavior for autodetection 1515 # GOTCHA: the variables below defines the default behavior for autodetection
1479 # and have - unless stated otherwise - at least 2 states : yes no 1516 # and have - unless stated otherwise - at least 2 states : yes no
1643 --disable-runtime-cpudetection) ;; 1680 --disable-runtime-cpudetection) ;;
1644 --enable-cross-compile) ;; 1681 --enable-cross-compile) ;;
1645 --disable-cross-compile) ;; 1682 --disable-cross-compile) ;;
1646 --install-path=*) ;; 1683 --install-path=*) ;;
1647 --with-install=*) ;; 1684 --with-install=*) ;;
1685 --enable-profile) ;;
1686 --disable-profile) ;;
1687 --enable-debug) ;;
1688 --enable-debug=*) ;;
1689 --disable-debug) ;;
1648 1690
1649 # Real 2nd pass 1691 # Real 2nd pass
1650 --enable-mencoder) _mencoder=yes ;; 1692 --enable-mencoder) _mencoder=yes ;;
1651 --disable-mencoder) _mencoder=no ;; 1693 --disable-mencoder) _mencoder=no ;;
1652 --enable-dynamic-plugins) _dynamic_plugins=yes ;; 1694 --enable-dynamic-plugins) _dynamic_plugins=yes ;;
1980 2022
1981 --with-xmmsplugindir=*) 2023 --with-xmmsplugindir=*)
1982 _xmmsplugindir=`echo $ac_option | cut -d '=' -f 2` 2024 _xmmsplugindir=`echo $ac_option | cut -d '=' -f 2`
1983 ;; 2025 ;;
1984 2026
1985 --enable-profile)
1986 _profile='-p'
1987 ;;
1988 --disable-profile)
1989 _profile=
1990 ;;
1991 --enable-debug)
1992 _debug='-g'
1993 ;;
1994 --enable-debug=*)
1995 _debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
1996 ;;
1997 --disable-debug)
1998 _debug=
1999 ;;
2000 --enable-crash-debug) 2027 --enable-crash-debug)
2001 _crash_debug=yes 2028 _crash_debug=yes
2002 ;; 2029 ;;
2003 --disable-crash-debug) 2030 --disable-crash-debug)
2004 _crash_debug=no 2031 _crash_debug=no
6969 _def_charset="#undef MSG_CHARSET" 6996 _def_charset="#undef MSG_CHARSET"
6970 fi 6997 fi
6971 6998
6972 6999
6973 ############################################################################# 7000 #############################################################################
6974
6975 # Checking for CFLAGS
6976 _stripbinaries=yes
6977 if test "$_profile" != "" || test "$_debug" != "" ; then
6978 CFLAGS="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
6979 if test "$_cc_major" -ge "3" ; then
6980 CFLAGS=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
6981 fi
6982 _stripbinaries=no
6983 elif test -z "$CFLAGS" ; then
6984 CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
6985 else
6986 _warn_CFLAGS=yes
6987 fi
6988 7001
6989 echocheck "automatic gdb attach" 7002 echocheck "automatic gdb attach"
6990 if test "$_crash_debug" = yes ; then 7003 if test "$_crash_debug" = yes ; then
6991 _def_crash_debug='#define CRASH_DEBUG 1' 7004 _def_crash_debug='#define CRASH_DEBUG 1'
6992 else 7005 else
8254 fi 8267 fi
8255 8268
8256 if test "$_warn_CFLAGS" = yes; then 8269 if test "$_warn_CFLAGS" = yes; then
8257 cat <<EOF 8270 cat <<EOF
8258 8271
8259 MPlayer compilation will use the CFLAGS set by you, but: 8272 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8260 8273
8261 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** *** 8274 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8262 8275
8263 It is strongly recommended to let MPlayer choose the correct CFLAGS! 8276 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8264 To do so, execute 'CFLAGS= ./configure <options>' 8277 To do so, execute 'CFLAGS= ./configure <options>'