Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: source/libvpx/build/make/configure.sh

Issue 13849011: libvpx: Pull from upstream (Closed) Base URL: https://src.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/build/make/Android.mk ('k') | source/libvpx/vp8/decoder/onyxd_if.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 453 }
454 454
455 455
456 write_common_target_config_h() { 456 write_common_target_config_h() {
457 print_webm_license ${TMP_H} "/*" " */" 457 print_webm_license ${TMP_H} "/*" " */"
458 cat >> ${TMP_H} << EOF 458 cat >> ${TMP_H} << EOF
459 /* This file automatically generated by configure. Do not edit! */ 459 /* This file automatically generated by configure. Do not edit! */
460 #ifndef VPX_CONFIG_H 460 #ifndef VPX_CONFIG_H
461 #define VPX_CONFIG_H 461 #define VPX_CONFIG_H
462 #define RESTRICT ${RESTRICT} 462 #define RESTRICT ${RESTRICT}
463 #define INLINE ${INLINE}
463 EOF 464 EOF
464 print_config_h ARCH "${TMP_H}" ${ARCH_LIST} 465 print_config_h ARCH "${TMP_H}" ${ARCH_LIST}
465 print_config_h HAVE "${TMP_H}" ${HAVE_LIST} 466 print_config_h HAVE "${TMP_H}" ${HAVE_LIST}
466 print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST} 467 print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST}
467 echo "#endif /* VPX_CONFIG_H */" >> ${TMP_H} 468 echo "#endif /* VPX_CONFIG_H */" >> ${TMP_H}
468 mkdir -p `dirname "$1"` 469 mkdir -p `dirname "$1"`
469 cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1" 470 cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1"
470 } 471 }
471 472
472 process_common_cmdline() { 473 process_common_cmdline() {
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 esac 999 esac
999 ;; 1000 ;;
1000 x86*) 1001 x86*)
1001 bits=32 1002 bits=32
1002 enabled x86_64 && bits=64 1003 enabled x86_64 && bits=64
1003 check_cpp <<EOF && bits=x32 1004 check_cpp <<EOF && bits=x32
1004 #ifndef __ILP32__ 1005 #ifndef __ILP32__
1005 #error "not x32" 1006 #error "not x32"
1006 #endif 1007 #endif
1007 EOF 1008 EOF
1008 soft_enable runtime_cpu_detect
1009 soft_enable mmx
1010 soft_enable sse
1011 soft_enable sse2
1012 soft_enable sse3
1013 soft_enable ssse3
1014 1009
1015 case ${tgt_os} in 1010 case ${tgt_os} in
1016 win*) 1011 win*)
1017 enabled gcc && add_cflags -fno-common 1012 enabled gcc && add_cflags -fno-common
1018 ;; 1013 ;;
1019 solaris*) 1014 solaris*)
1020 CC=${CC:-${CROSS}gcc} 1015 CC=${CC:-${CROSS}gcc}
1021 CXX=${CXX:-${CROSS}g++} 1016 CXX=${CXX:-${CROSS}g++}
1022 LD=${LD:-${CROSS}gcc} 1017 LD=${LD:-${CROSS}gcc}
1023 CROSS=${CROSS:-g} 1018 CROSS=${CROSS:-g}
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 enabled optimizations && check_add_cflags -fomit-frame-pointer 1052 enabled optimizations && check_add_cflags -fomit-frame-pointer
1058 ;; 1053 ;;
1059 vs*) 1054 vs*)
1060 # When building with Microsoft Visual Studio the assembler is 1055 # When building with Microsoft Visual Studio the assembler is
1061 # invoked directly. Checking at configure time is unnecessary. 1056 # invoked directly. Checking at configure time is unnecessary.
1062 # Skip the check by setting AS arbitrarily 1057 # Skip the check by setting AS arbitrarily
1063 AS=msvs 1058 AS=msvs
1064 ;; 1059 ;;
1065 esac 1060 esac
1066 1061
1062 soft_enable runtime_cpu_detect
1063 soft_enable mmx
1064 soft_enable sse
1065 soft_enable sse2
1066 soft_enable sse3
1067 soft_enable ssse3
1067 # We can't use 'check_cflags' until the compiler is configured and CC is 1068 # We can't use 'check_cflags' until the compiler is configured and CC is
1068 # populated. 1069 # populated.
1069 if enabled gcc && ! disabled sse4_1 && ! check_cflags -msse4.1; then 1070 if enabled gcc && ! disabled sse4_1 && ! check_cflags -msse4; then
1070 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sse4_1 " 1071 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sse4_1 "
1071 else 1072 else
1072 soft_enable sse4_1 1073 soft_enable sse4_1
1073 fi 1074 fi
1074 1075
1075 case "${AS}" in 1076 case "${AS}" in
1076 auto|"") 1077 auto|"")
1077 which nasm >/dev/null 2>&1 && AS=nasm 1078 which nasm >/dev/null 2>&1 && AS=nasm
1078 which yasm >/dev/null 2>&1 && AS=yasm 1079 which yasm >/dev/null 2>&1 && AS=yasm
1079 [ "${AS}" = auto -o -z "${AS}" ] \ 1080 [ "${AS}" = auto -o -z "${AS}" ] \
1080 && die "Neither yasm nor nasm have been found" 1081 && die "Neither yasm nor nasm have been found"
1081 ;; 1082 ;;
1082 esac 1083 esac
1083 log_echo " using $AS" 1084 log_echo " using $AS"
1084 [ "${AS##*/}" = nasm ] && add_asflags -Ox 1085 [ "${AS##*/}" = nasm ] && add_asflags -Ox
1085 AS_SFX=.asm 1086 AS_SFX=.asm
1086 case ${tgt_os} in 1087 case ${tgt_os} in
1087 win32) 1088 win32)
1088 add_asflags -f win32 1089 add_asflags -f win32
1089 enabled debug && add_asflags -g cv8 1090 enabled debug && add_asflags -g cv8
1091 EXE_SFX=.exe
1090 ;; 1092 ;;
1091 win64) 1093 win64)
1092 add_asflags -f x64 1094 add_asflags -f x64
1093 enabled debug && add_asflags -g cv8 1095 enabled debug && add_asflags -g cv8
1096 EXE_SFX=.exe
1094 ;; 1097 ;;
1095 linux*|solaris*|android*) 1098 linux*|solaris*|android*)
1096 add_asflags -f elf${bits} 1099 add_asflags -f elf${bits}
1097 enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2 1100 enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2
1098 enabled debug && [ "${AS}" = nasm ] && add_asflags -g 1101 enabled debug && [ "${AS}" = nasm ] && add_asflags -g
1099 [ "${AS##*/}" = nasm ] && check_asm_align 1102 [ "${AS##*/}" = nasm ] && check_asm_align
1100 ;; 1103 ;;
1101 darwin*) 1104 darwin*)
1102 add_asflags -f macho${bits} 1105 add_asflags -f macho${bits}
1103 enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x8 6_64" 1106 enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x8 6_64"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 # Check for strip utility variant 1168 # Check for strip utility variant
1166 ${STRIP} -V 2>/dev/null | grep GNU >/dev/null && enable gnu_strip 1169 ${STRIP} -V 2>/dev/null | grep GNU >/dev/null && enable gnu_strip
1167 1170
1168 # Try to determine target endianness 1171 # Try to determine target endianness
1169 check_cc <<EOF 1172 check_cc <<EOF
1170 unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E'; 1173 unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E';
1171 EOF 1174 EOF
1172 [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' | 1175 [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' |
1173 grep '4f *32 *42 *45' >/dev/null 2>&1 && enable big_endian 1176 grep '4f *32 *42 *45' >/dev/null 2>&1 && enable big_endian
1174 1177
1178 # Try to find which inline keywords are supported
1179 check_cc <<EOF && INLINE="inline"
1180 static inline function() {}
1181 EOF
1182 check_cc <<EOF && INLINE="__attribute__((always_inline))"
1183 static __attribute__((always_inline)) function() {}
1184 EOF
1185
1175 # Almost every platform uses pthreads. 1186 # Almost every platform uses pthreads.
1176 if enabled multithread; then 1187 if enabled multithread; then
1177 case ${toolchain} in 1188 case ${toolchain} in
1178 *-win*-vs*);; 1189 *-win*-vs*);;
1179 *-android-gcc);; 1190 *-android-gcc);;
1180 *) check_header pthread.h && add_extralibs -lpthread 1191 *) check_header pthread.h && add_extralibs -lpthread
1181 esac 1192 esac
1182 fi 1193 fi
1183 1194
1184 # only for MIPS platforms 1195 # only for MIPS platforms
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 # Prepare the PWD for building. 1293 # Prepare the PWD for building.
1283 for f in ${OOT_INSTALLS}; do 1294 for f in ${OOT_INSTALLS}; do
1284 install -D ${source_path}/$f $f 1295 install -D ${source_path}/$f $f
1285 done 1296 done
1286 fi 1297 fi
1287 cp ${source_path}/build/make/Makefile . 1298 cp ${source_path}/build/make/Makefile .
1288 1299
1289 clean_temp_files 1300 clean_temp_files
1290 true 1301 true
1291 } 1302 }
OLDNEW
« no previous file with comments | « source/libvpx/build/make/Android.mk ('k') | source/libvpx/vp8/decoder/onyxd_if.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698