OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 ## | 2 ## |
3 ## configure.sh | 3 ## configure.sh |
4 ## | 4 ## |
5 ## This script is sourced by the main configure script and contains | 5 ## This script is sourced by the main configure script and contains |
6 ## utility functions and other common bits that aren't strictly libvpx | 6 ## utility functions and other common bits that aren't strictly libvpx |
7 ## related. | 7 ## related. |
8 ## | 8 ## |
9 ## This build system is based in part on the FFmpeg configure script. | 9 ## This build system is based in part on the FFmpeg configure script. |
10 ## | 10 ## |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 AS=${AS:-nasm} | 1053 AS=${AS:-nasm} |
1054 ;; | 1054 ;; |
1055 esac | 1055 esac |
1056 | 1056 |
1057 AS="${alt_as:-${AS:-auto}}" | 1057 AS="${alt_as:-${AS:-auto}}" |
1058 case ${tgt_cc} in | 1058 case ${tgt_cc} in |
1059 icc*) | 1059 icc*) |
1060 CC=${CC:-icc} | 1060 CC=${CC:-icc} |
1061 LD=${LD:-icc} | 1061 LD=${LD:-icc} |
1062 setup_gnu_toolchain | 1062 setup_gnu_toolchain |
1063 add_cflags -use-msasm -use-asm | 1063 add_cflags -use-msasm # remove -use-msasm too? |
1064 add_ldflags -i-static | 1064 # add -no-intel-extensions to suppress warning #10237 |
1065 enabled x86_64 && add_cflags -ipo -no-prec-div -static -xSSE2 -a
xSSE2 | 1065 # refer to http://software.intel.com/en-us/forums/topic/280199 |
| 1066 add_ldflags -i-static -no-intel-extensions |
| 1067 enabled x86_64 && add_cflags -ipo -static -O3 -no-prec-div |
1066 enabled x86_64 && AR=xiar | 1068 enabled x86_64 && AR=xiar |
1067 case ${tune_cpu} in | 1069 case ${tune_cpu} in |
1068 atom*) | 1070 atom*) |
1069 tune_cflags="-x" | 1071 tune_cflags="-x" |
1070 tune_cpu="SSE3_ATOM" | 1072 tune_cpu="SSE3_ATOM" |
1071 ;; | 1073 ;; |
1072 *) | 1074 *) |
1073 tune_cflags="-march=" | 1075 tune_cflags="-march=" |
1074 ;; | 1076 ;; |
1075 esac | 1077 esac |
(...skipping 23 matching lines...) Expand all Loading... |
1099 soft_enable sse3 | 1101 soft_enable sse3 |
1100 soft_enable ssse3 | 1102 soft_enable ssse3 |
1101 # We can't use 'check_cflags' until the compiler is configured and CC is | 1103 # We can't use 'check_cflags' until the compiler is configured and CC is |
1102 # populated. | 1104 # populated. |
1103 if enabled gcc && ! disabled sse4_1 && ! check_cflags -msse4; then | 1105 if enabled gcc && ! disabled sse4_1 && ! check_cflags -msse4; then |
1104 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sse4_1 " | 1106 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sse4_1 " |
1105 else | 1107 else |
1106 soft_enable sse4_1 | 1108 soft_enable sse4_1 |
1107 fi | 1109 fi |
1108 | 1110 |
| 1111 if enabled gcc && ! disabled avx && ! check_cflags -mavx; then |
| 1112 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx " |
| 1113 else |
| 1114 soft_enable avx |
| 1115 fi |
| 1116 |
| 1117 if enabled gcc && ! disabled avx2 && ! check_cflags -mavx2; then |
| 1118 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx2 " |
| 1119 else |
| 1120 soft_enable avx2 |
| 1121 fi |
| 1122 |
1109 case "${AS}" in | 1123 case "${AS}" in |
1110 auto|"") | 1124 auto|"") |
1111 which nasm >/dev/null 2>&1 && AS=nasm | 1125 which nasm >/dev/null 2>&1 && AS=nasm |
1112 which yasm >/dev/null 2>&1 && AS=yasm | 1126 which yasm >/dev/null 2>&1 && AS=yasm |
1113 [ "${AS}" = auto -o -z "${AS}" ] \ | 1127 [ "${AS}" = auto -o -z "${AS}" ] \ |
1114 && die "Neither yasm nor nasm have been found" | 1128 && die "Neither yasm nor nasm have been found" |
1115 ;; | 1129 ;; |
1116 esac | 1130 esac |
1117 log_echo " using $AS" | 1131 log_echo " using $AS" |
1118 [ "${AS##*/}" = nasm ] && add_asflags -Ox | 1132 [ "${AS##*/}" = nasm ] && add_asflags -Ox |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 # Prepare the PWD for building. | 1346 # Prepare the PWD for building. |
1333 for f in ${OOT_INSTALLS}; do | 1347 for f in ${OOT_INSTALLS}; do |
1334 install -D ${source_path}/$f $f | 1348 install -D ${source_path}/$f $f |
1335 done | 1349 done |
1336 fi | 1350 fi |
1337 cp ${source_path}/build/make/Makefile . | 1351 cp ${source_path}/build/make/Makefile . |
1338 | 1352 |
1339 clean_temp_files | 1353 clean_temp_files |
1340 true | 1354 true |
1341 } | 1355 } |
OLD | NEW |