Revision 30a3e5d4 configure

View differences:

configure
482 482
BeOS)
483 483
PREFIX="/boot/home/config"
484 484
# helps building libavcodec
485
CFLAGS="$CFLAGS -DPIC -fomit-frame-pointer"
485
add_cflags "-DPIC -fomit-frame-pointer"
486 486
# 3 gcc releases known for BeOS, each with ugly bugs
487 487
gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
488 488
case "$gcc_version" in
......
490 490
mmx="no"
491 491
;;
492 492
*20010315*) echo "BeBits gcc"
493
CFLAGS="$CFLAGS -fno-expensive-optimizations"
493
add_cflags "-fno-expensive-optimizations"
494 494
;;
495 495
esac
496 496
SHFLAGS=-nostart
......
520 520
FFSERVERLDFLAGS=""
521 521
SHFLAGS="-shared -Wl,-h,\$@"
522 522
need_inet_aton="yes"
523
extralibs="$extralibs -lsocket -lnsl"
523
add_extralibs "-lsocket -lnsl"
524 524
;;
525 525
NetBSD)
526 526
v4l="no"
......
529 529
audio_oss="yes"
530 530
dv1394="no"
531 531
make="gmake"
532
extralibs="$extralibs -lossaudio"
532
add_extralibs "-lossaudio"
533 533
;;
534 534
OpenBSD)
535 535
v4l="no"
......
540 540
make="gmake"
541 541
LIBOBJFLAGS="\$(PIC)"
542 542
LDCONFIG="ldconfig -m \$(shlibdir)"
543
extralibs="$extralibs -lossaudio"
543
add_extralibs "-lossaudio"
544 544
;;
545 545
FreeBSD)
546 546
v4l="no"
......
549 549
audio_oss="yes"
550 550
dv1394="no"
551 551
make="gmake"
552
CFLAGS="$CFLAGS -pthread"
552
add_cflags "-pthread"
553 553
;;
554 554
GNU/kFreeBSD)
555 555
v4l="no"
......
557 557
bktr="yes"
558 558
audio_oss="yes"
559 559
dv1394="no"
560
CFLAGS="$CFLAGS -pthread"
560
add_cflags "-pthread"
561 561
;;
562 562
BSD/OS)
563 563
v4l="no"
......
624 624
ar="emxomfar -p128"
625 625
ranlib="echo ignoring ranlib"
626 626
strip="echo ignoring strip"
627
CFLAGS="$CFLAGS -Zomf"
627
add_cflags "-Zomf"
628 628
FFLDFLAGS="-Zomf -Zstack 16384 -s"
629 629
SHFLAGS="-Zdll -Zomf"
630 630
FFSERVERLDFLAGS=""
......
701 701
  ;;
702 702
  --make=*) make="$optval"
703 703
  ;;
704
  --extra-cflags=*) CFLAGS="$CFLAGS $optval"
704
  --extra-cflags=*) add_cflags "$optval"
705 705
  ;;
706 706
  --extra-ldflags=*) EXTRALDFLAGS="$optval"
707 707
  ;;
......
1010 1010
needmdynamicnopic="no"
1011 1011
if test $targetos = Darwin; then
1012 1012
    if test -n "`$cc -v 2>&1 | grep xlc`"; then
1013
        CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
1013
        add_cflags "-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
1014 1014
    else
1015 1015
        gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
1016 1016
        case "$gcc_version" in
1017 1017
            *2.95*)
1018
                CFLAGS="$CFLAGS -no-cpp-precomp -pipe"
1018
                add_cflags "-no-cpp-precomp -pipe"
1019 1019
                ;;
1020 1020
            *[34].*)
1021
                CFLAGS="$CFLAGS -no-cpp-precomp -pipe -force_cpusubtype_ALL -Wno-sign-compare"
1021
                add_cflags "-no-cpp-precomp -pipe -force_cpusubtype_ALL -Wno-sign-compare"
1022 1022
                if test "$lshared" = no; then
1023 1023
                   needmdynamicnopic="yes"
1024 1024
                fi
1025 1025
                ;;
1026 1026
            *)
1027
                CFLAGS="$CFLAGS -no-cpp-precomp -pipe"
1027
                add_cflags "-no-cpp-precomp -pipe"
1028 1028
                if test "$lshared" = no; then
1029 1029
                   needmdynamicnopic="yes"
1030 1030
                fi
......
1032 1032
        esac
1033 1033
    fi
1034 1034
    if test $optimize != "no"; then
1035
        CFLAGS="$CFLAGS -fomit-frame-pointer"
1035
        add_cflags "-fomit-frame-pointer"
1036 1036
    fi
1037 1037
fi
1038 1038

  
......
1051 1051
if test $tune != "generic"; then
1052 1052
    case $tune in
1053 1053
        601|ppc601|PowerPC601)
1054
            CFLAGS="$CFLAGS -mcpu=601"
1054
            add_cflags "-mcpu=601"
1055 1055
            if test $altivec = "yes"; then
1056 1056
                echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
1057 1057
            fi
1058 1058
            TUNECPU=ppc601
1059 1059
        ;;
1060 1060
        603*|ppc603*|PowerPC603*)
1061
            CFLAGS="$CFLAGS -mcpu=603"
1061
            add_cflags "-mcpu=603"
1062 1062
            if test $altivec = "yes"; then
1063 1063
                echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
1064 1064
            fi
1065 1065
            TUNECPU=ppc603
1066 1066
        ;;
1067 1067
        604*|ppc604*|PowerPC604*)
1068
            CFLAGS="$CFLAGS -mcpu=604"
1068
            add_cflags "-mcpu=604"
1069 1069
            if test $altivec = "yes"; then
1070 1070
                echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
1071 1071
            fi
1072 1072
            TUNECPU=ppc604
1073 1073
        ;;
1074 1074
        G3|g3|75*|ppc75*|PowerPC75*)
1075
            CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
1075
            add_cflags "-mcpu=750 -mtune=750 -mpowerpc-gfxopt"
1076 1076
            if test $altivec = "yes"; then
1077 1077
                echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
1078 1078
            fi
1079 1079
            TUNECPU=ppc750
1080 1080
        ;;
1081 1081
        G4|g4|745*|ppc745*|PowerPC745*)
1082
            CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
1082
            add_cflags "-mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
1083 1083
            if test $altivec = "no"; then
1084 1084
                echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
1085 1085
            fi
1086 1086
            TUNECPU=ppc7450
1087 1087
        ;;
1088 1088
        74*|ppc74*|PowerPC74*)
1089
            CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
1089
            add_cflags "-mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
1090 1090
            if test $altivec = "no"; then
1091 1091
                echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
1092 1092
            fi
1093 1093
            TUNECPU=ppc7400
1094 1094
        ;;
1095 1095
        G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
1096
            CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
1096
            add_cflags "-mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
1097 1097
            if test $altivec = "no"; then
1098 1098
                echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
1099 1099
            fi
......
1101 1101
            POWERPCMODE="64bits"
1102 1102
        ;;
1103 1103
        i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
1104
            CFLAGS="$CFLAGS -march=$tune"
1104
            add_cflags "-march=$tune"
1105 1105
        ;;
1106 1106
        sparc64)
1107
            CFLAGS="$CFLAGS -mcpu=v9 -mtune=v9"
1107
            add_cflags "-mcpu=v9 -mtune=v9"
1108 1108
        ;;
1109 1109
        *)
1110 1110
        echo "WARNING: Unknown CPU \"$tune\", ignored."
......
1132 1132
if test $cpu = "powerpc"; then
1133 1133
    if test $altivec = "yes"; then
1134 1134
        if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
1135
            CFLAGS="$CFLAGS -faltivec"
1135
            add_cflags "-faltivec"
1136 1136
        else
1137
            CFLAGS="$CFLAGS -maltivec -mabi=altivec"
1137
            add_cflags "-maltivec -mabi=altivec"
1138 1138
        fi
1139 1139
    fi
1140 1140
fi
......
1458 1458

  
1459 1459
if enabled optimize; then
1460 1460
    if test -n "`$cc -v 2>&1 | grep xlc`"; then
1461
        CFLAGS="$CFLAGS -O5"
1462
        LDFLAGS="$LDFLAGS -O5"
1461
        add_cflags  "-O5"
1462
        add_ldflags "-O5"
1463 1463
    else
1464
        CFLAGS="-O3 $CFLAGS"
1464
        add_cflags "-O3"
1465 1465
    fi
1466 1466
fi
1467 1467

  
......
1476 1476
fi
1477 1477

  
1478 1478
if test "$gprof" = "yes" ; then
1479
    CFLAGS="$CFLAGS -p"
1480
    LDFLAGS="$LDFLAGS -p"
1479
    add_cflags  "-p"
1480
    add_ldflags "-p"
1481 1481
fi
1482 1482

  
1483 1483
# find if .align arg is power-of-two or not

Also available in: Unified diff