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

Unified Diff: source/libvpx/build/make/configure.sh

Issue 898943004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/config/mac/ia32/vpx_config.asm ('k') | source/libvpx/build/make/iosbuild.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/build/make/configure.sh
diff --git a/source/libvpx/build/make/configure.sh b/source/libvpx/build/make/configure.sh
index f98018027d1dd8196fbc60df3de11c992d1a3978..c0b5072e985acc4ff35363a468b350df26c27e99 100755
--- a/source/libvpx/build/make/configure.sh
+++ b/source/libvpx/build/make/configure.sh
@@ -201,7 +201,7 @@ disabled(){
soft_enable() {
for var in $*; do
if ! disabled $var; then
- log_echo " enabling $var"
+ enabled $var || log_echo " enabling $var"
enable_feature $var
fi
done
@@ -210,7 +210,7 @@ soft_enable() {
soft_disable() {
for var in $*; do
if ! enabled $var; then
- log_echo " disabling $var"
+ disabled $var || log_echo " disabling $var"
disable_feature $var
fi
done
@@ -508,9 +508,11 @@ process_common_cmdline() {
elif [ $action = "disable" ] && ! disabled $option ; then
echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null ||
die_unknown $opt
+ log_echo " disabling $option"
elif [ $action = "enable" ] && ! enabled $option ; then
echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null ||
die_unknown $opt
+ log_echo " enabling $option"
fi
${action}_feature $option
;;
@@ -606,6 +608,13 @@ setup_gnu_toolchain() {
EXE_SFX=
}
+# Reliably find the newest available Darwin SDKs. (Older versions of
+# xcrun don't support --show-sdk-path.)
+show_darwin_sdk_path() {
+ xcrun --sdk $1 --show-sdk-path 2>/dev/null ||
+ xcodebuild -sdk $1 -version Path 2>/dev/null
+}
+
process_common_toolchain() {
if [ -z "$toolchain" ]; then
gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}"
@@ -666,6 +675,10 @@ process_common_toolchain() {
tgt_isa=x86_64
tgt_os=darwin13
;;
+ *darwin14*)
+ tgt_isa=x86_64
+ tgt_os=darwin14
+ ;;
x86_64*mingw32*)
tgt_os=win64
;;
@@ -725,31 +738,17 @@ process_common_toolchain() {
IOS_VERSION_MIN="6.0"
# Handle darwin variants. Newer SDKs allow targeting older
- # platforms, so find the newest SDK available.
+ # platforms, so use the newest one available.
case ${toolchain} in
*-darwin*)
- if [ -z "${DEVELOPER_DIR}" ]; then
- DEVELOPER_DIR=`xcode-select -print-path 2> /dev/null`
- [ $? -ne 0 ] && OSX_SKIP_DIR_CHECK=1
- fi
- if [ -z "${OSX_SKIP_DIR_CHECK}" ]; then
- OSX_SDK_ROOTS="${DEVELOPER_DIR}/SDKs"
- OSX_SDK_VERSIONS="MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk"
- OSX_SDK_VERSIONS="${OSX_SDK_VERSIONS} MacOSX10.7.sdk"
- for v in ${OSX_SDK_VERSIONS}; do
- if [ -d "${OSX_SDK_ROOTS}/${v}" ]; then
- osx_sdk_dir="${OSX_SDK_ROOTS}/${v}"
- fi
- done
+ osx_sdk_dir="$(show_darwin_sdk_path macosx)"
+ if [ -d "${osx_sdk_dir}" ]; then
+ add_cflags "-isysroot ${osx_sdk_dir}"
+ add_ldflags "-isysroot ${osx_sdk_dir}"
fi
;;
esac
- if [ -d "${osx_sdk_dir}" ]; then
- add_cflags "-isysroot ${osx_sdk_dir}"
- add_ldflags "-isysroot ${osx_sdk_dir}"
- fi
-
case ${toolchain} in
*-darwin8-*)
add_cflags "-mmacosx-version-min=10.4"
@@ -775,12 +774,18 @@ process_common_toolchain() {
add_cflags "-mmacosx-version-min=10.9"
add_ldflags "-mmacosx-version-min=10.9"
;;
+ *-darwin14-*)
+ add_cflags "-mmacosx-version-min=10.10"
+ add_ldflags "-mmacosx-version-min=10.10"
+ ;;
*-iphonesimulator-*)
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
- osx_sdk_dir="$(xcrun --sdk iphonesimulator --show-sdk-path)"
- add_cflags "-isysroot ${osx_sdk_dir}"
- add_ldflags "-isysroot ${osx_sdk_dir}"
+ iossim_sdk_dir="$(show_darwin_sdk_path iphonesimulator)"
+ if [ -d "${iossim_sdk_dir}" ]; then
+ add_cflags "-isysroot ${iossim_sdk_dir}"
+ add_ldflags "-isysroot ${iossim_sdk_dir}"
+ fi
;;
esac
@@ -952,7 +957,7 @@ EOF
;;
darwin*)
- XCRUN_FIND="xcrun --sdk iphoneos -find"
+ XCRUN_FIND="xcrun --sdk iphoneos --find"
CXX="$(${XCRUN_FIND} clang++)"
CC="$(${XCRUN_FIND} clang)"
AR="$(${XCRUN_FIND} ar)"
@@ -979,10 +984,14 @@ EOF
# options that were put in above
ASFLAGS="-arch ${tgt_isa} -g"
- alt_libc="$(xcrun --sdk iphoneos --show-sdk-path)"
- add_cflags -arch ${tgt_isa} -isysroot ${alt_libc}
+ add_cflags -arch ${tgt_isa}
add_ldflags -arch ${tgt_isa}
+ alt_libc="$(show_darwin_sdk_path iphoneos)"
+ if [ -d "${alt_libc}" ]; then
+ add_cflags -isysroot ${alt_libc}
+ fi
+
if [ "${LD}" = "${CXX}" ]; then
add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}"
else
@@ -1150,6 +1159,14 @@ EOF
auto|"")
which nasm >/dev/null 2>&1 && AS=nasm
which yasm >/dev/null 2>&1 && AS=yasm
+ if [ "${AS}" = nasm ] ; then
+ # Apple ships version 0.98 of nasm through at least Xcode 6. Revisit
+ # this check if they start shipping a compatible version.
+ apple=`nasm -v | grep "Apple"`
+ [ -n "${apple}" ] \
+ && echo "Unsupported version of nasm: ${apple}" \
+ && AS=""
+ fi
[ "${AS}" = auto ] || [ -z "${AS}" ] \
&& die "Neither yasm nor nasm have been found"
;;
@@ -1243,10 +1260,13 @@ EOF
fi
tgt_os_no_version=$(echo "${tgt_os}" | tr -d "[0-9]")
+ if [ "${tgt_os_no_version}" = "openbsd" ] || [ "`uname`" = "OpenBSD" ]; then
+ openbsd_like=yes
+ fi
# Default use_x86inc to yes when we are 64 bit, non-pic, or on any
# non-Darwin target.
if [ "${tgt_isa}" = "x86_64" ] || [ "${pic}" != "yes" ] || \
- [ "${tgt_os_no_version}" != "darwin" ]; then
+ [ "${openbsd_like}" != "yes" ]; then
soft_enable use_x86inc
fi
« no previous file with comments | « source/config/mac/ia32/vpx_config.asm ('k') | source/libvpx/build/make/iosbuild.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698