| 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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 soft_enable realtime_only | 918 soft_enable realtime_only |
| 919 if [ ${tgt_isa} = "armv7" ]; then | 919 if [ ${tgt_isa} = "armv7" ]; then |
| 920 soft_enable runtime_cpu_detect | 920 soft_enable runtime_cpu_detect |
| 921 fi | 921 fi |
| 922 if enabled runtime_cpu_detect; then | 922 if enabled runtime_cpu_detect; then |
| 923 add_cflags "-I${SDK_PATH}/sources/android/cpufeatures" | 923 add_cflags "-I${SDK_PATH}/sources/android/cpufeatures" |
| 924 fi | 924 fi |
| 925 ;; | 925 ;; |
| 926 | 926 |
| 927 darwin*) | 927 darwin*) |
| 928 if [ -z "${sdk_path}" ]; then | 928 |
| 929 SDK_PATH=`xcode-select -print-path 2> /dev/null` | 929 XCRUN_FIND="xcrun --sdk iphoneos -find" |
| 930 SDK_PATH=${SDK_PATH}/Platforms/iPhoneOS.platform/Developer | 930 CXX="$(${XCRUN_FIND} clang++)" |
| 931 else | 931 CC="$(${XCRUN_FIND} clang)" |
| 932 SDK_PATH=${sdk_path} | 932 AR="$(${XCRUN_FIND} ar)" |
| 933 fi | 933 LD="$(${XCRUN_FIND} ld)" |
| 934 TOOLCHAIN_PATH=${SDK_PATH}/usr/bin | 934 AS="$(${XCRUN_FIND} as)" |
| 935 CXX=${TOOLCHAIN_PATH}/g++ | 935 STRIP="$(${XCRUN_FIND} strip)" |
| 936 CC=${TOOLCHAIN_PATH}/gcc | 936 NM="$(${XCRUN_FIND} nm)" |
| 937 AR=${TOOLCHAIN_PATH}/ar | 937 RANLIB="$(${XCRUN_FIND} ranlib)" |
| 938 LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2 | |
| 939 AS=${TOOLCHAIN_PATH}/as | |
| 940 STRIP=${TOOLCHAIN_PATH}/strip | |
| 941 NM=${TOOLCHAIN_PATH}/nm | |
| 942 AS_SFX=.s | 938 AS_SFX=.s |
| 943 | 939 |
| 944 # ASFLAGS is written here instead of using check_add_asflags | 940 # ASFLAGS is written here instead of using check_add_asflags |
| 945 # because we need to overwrite all of ASFLAGS and purge the | 941 # because we need to overwrite all of ASFLAGS and purge the |
| 946 # options that were put in above | 942 # options that were put in above |
| 947 ASFLAGS="-version -arch ${tgt_isa} -g" | 943 ASFLAGS="-arch ${tgt_isa} -g" |
| 948 | 944 |
| 949 add_cflags -arch ${tgt_isa} | 945 alt_libc="$(xcrun --sdk iphoneos --show-sdk-path)" |
| 950 add_ldflags -arch_only ${tgt_isa} | 946 add_cflags -arch ${tgt_isa} -isysroot ${alt_libc} |
| 951 | 947 add_ldflags -arch ${tgt_isa} -ios_version_min 7.0 |
| 952 if [ -z "${alt_libc}" ]; then | |
| 953 alt_libc=${SDK_PATH}/SDKs/iPhoneOS6.0.sdk | |
| 954 fi | |
| 955 | |
| 956 add_cflags "-isysroot ${alt_libc}" | |
| 957 | |
| 958 # Add the paths for the alternate libc | |
| 959 for d in usr/include; do | |
| 960 try_dir="${alt_libc}/${d}" | |
| 961 [ -d "${try_dir}" ] && add_cflags -I"${try_dir}" | |
| 962 done | |
| 963 | 948 |
| 964 for d in lib usr/lib usr/lib/system; do | 949 for d in lib usr/lib usr/lib/system; do |
| 965 try_dir="${alt_libc}/${d}" | 950 try_dir="${alt_libc}/${d}" |
| 966 [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}" | 951 [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}" |
| 967 done | 952 done |
| 968 | 953 |
| 969 asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl" | 954 asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl" |
| 970 ;; | 955 ;; |
| 971 | 956 |
| 972 linux*) | 957 linux*) |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 setup_gnu_toolchain | 1069 setup_gnu_toolchain |
| 1085 #for 32 bit x86 builds, -O3 did not turn on this flag | 1070 #for 32 bit x86 builds, -O3 did not turn on this flag |
| 1086 enabled optimizations && disabled gprof && check_add_cflags -fom
it-frame-pointer | 1071 enabled optimizations && disabled gprof && check_add_cflags -fom
it-frame-pointer |
| 1087 ;; | 1072 ;; |
| 1088 vs*) | 1073 vs*) |
| 1089 # When building with Microsoft Visual Studio the assembler is | 1074 # When building with Microsoft Visual Studio the assembler is |
| 1090 # invoked directly. Checking at configure time is unnecessary. | 1075 # invoked directly. Checking at configure time is unnecessary. |
| 1091 # Skip the check by setting AS arbitrarily | 1076 # Skip the check by setting AS arbitrarily |
| 1092 AS=msvs | 1077 AS=msvs |
| 1093 msvs_arch_dir=x86-msvs | 1078 msvs_arch_dir=x86-msvs |
| 1079 vc_version=${tgt_cc##vs} |
| 1080 case $vc_version in |
| 1081 7|8|9|10) |
| 1082 echo "${tgt_cc} does not support avx/avx2, disabling...
.." |
| 1083 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx --disable-av
x2 " |
| 1084 soft_disable avx |
| 1085 soft_disable avx2 |
| 1086 ;; |
| 1087 esac |
| 1094 ;; | 1088 ;; |
| 1095 esac | 1089 esac |
| 1096 | 1090 |
| 1097 soft_enable runtime_cpu_detect | 1091 soft_enable runtime_cpu_detect |
| 1098 soft_enable mmx | 1092 soft_enable mmx |
| 1099 soft_enable sse | 1093 soft_enable sse |
| 1100 soft_enable sse2 | 1094 soft_enable sse2 |
| 1101 soft_enable sse3 | 1095 soft_enable sse3 |
| 1102 soft_enable ssse3 | 1096 soft_enable ssse3 |
| 1103 # We can't use 'check_cflags' until the compiler is configured and CC is | 1097 # We can't use 'check_cflags' until the compiler is configured and CC is |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 # Prepare the PWD for building. | 1340 # Prepare the PWD for building. |
| 1347 for f in ${OOT_INSTALLS}; do | 1341 for f in ${OOT_INSTALLS}; do |
| 1348 install -D ${source_path}/$f $f | 1342 install -D ${source_path}/$f $f |
| 1349 done | 1343 done |
| 1350 fi | 1344 fi |
| 1351 cp ${source_path}/build/make/Makefile . | 1345 cp ${source_path}/build/make/Makefile . |
| 1352 | 1346 |
| 1353 clean_temp_files | 1347 clean_temp_files |
| 1354 true | 1348 true |
| 1355 } | 1349 } |
| OLD | NEW |