Remove 'local' from configure and configure.sh
'local' is not posix. Change-Id: I46d7acfa574cbef686cee1b35022f5781485c3fa
This commit is contained in:
parent
2926d24478
commit
07fa6adfe1
32
build/make/configure.sh
Executable file → Normal file
32
build/make/configure.sh
Executable file → Normal file
@ -381,8 +381,8 @@ EOF
|
|||||||
|
|
||||||
# tests for -m$1 toggling the feature given in $2. If $2 is empty $1 is used.
|
# tests for -m$1 toggling the feature given in $2. If $2 is empty $1 is used.
|
||||||
check_gcc_machine_option() {
|
check_gcc_machine_option() {
|
||||||
local opt="$1"
|
opt="$1"
|
||||||
local feature="$2"
|
feature="$2"
|
||||||
[ -n "$feature" ] || feature="$opt"
|
[ -n "$feature" ] || feature="$opt"
|
||||||
|
|
||||||
if enabled gcc && ! disabled "$feature" && ! check_cflags "-m$opt"; then
|
if enabled gcc && ! disabled "$feature" && ! check_cflags "-m$opt"; then
|
||||||
@ -419,8 +419,8 @@ true
|
|||||||
}
|
}
|
||||||
|
|
||||||
write_common_target_config_mk() {
|
write_common_target_config_mk() {
|
||||||
local CC="${CC}"
|
saved_CC="${CC}"
|
||||||
local CXX="${CXX}"
|
saved_CXX="${CXX}"
|
||||||
enabled ccache && CC="ccache ${CC}"
|
enabled ccache && CC="ccache ${CC}"
|
||||||
enabled ccache && CXX="ccache ${CXX}"
|
enabled ccache && CXX="ccache ${CXX}"
|
||||||
print_webm_license $1 "##" ""
|
print_webm_license $1 "##" ""
|
||||||
@ -470,6 +470,8 @@ EOF
|
|||||||
|
|
||||||
enabled msvs && echo "CONFIG_VS_VERSION=${vs_version}" >> "${1}"
|
enabled msvs && echo "CONFIG_VS_VERSION=${vs_version}" >> "${1}"
|
||||||
|
|
||||||
|
CC="${saved_CC}"
|
||||||
|
CXX="${saved_CXX}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1314,8 +1316,9 @@ process_toolchain() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_config_mk() {
|
print_config_mk() {
|
||||||
local prefix=$1
|
saved_prefix="${prefix}"
|
||||||
local makefile=$2
|
prefix=$1
|
||||||
|
makefile=$2
|
||||||
shift 2
|
shift 2
|
||||||
for cfg; do
|
for cfg; do
|
||||||
if enabled $cfg; then
|
if enabled $cfg; then
|
||||||
@ -1323,11 +1326,13 @@ print_config_mk() {
|
|||||||
echo "${prefix}_${upname}=yes" >> $makefile
|
echo "${prefix}_${upname}=yes" >> $makefile
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
prefix="${saved_prefix}"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_config_h() {
|
print_config_h() {
|
||||||
local prefix=$1
|
saved_prefix="${prefix}"
|
||||||
local header=$2
|
prefix=$1
|
||||||
|
header=$2
|
||||||
shift 2
|
shift 2
|
||||||
for cfg; do
|
for cfg; do
|
||||||
upname="`toupper $cfg`"
|
upname="`toupper $cfg`"
|
||||||
@ -1337,10 +1342,11 @@ print_config_h() {
|
|||||||
echo "#define ${prefix}_${upname} 0" >> $header
|
echo "#define ${prefix}_${upname} 0" >> $header
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
prefix="${saved_prefix}"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_config_vars_h() {
|
print_config_vars_h() {
|
||||||
local header=$1
|
header=$1
|
||||||
shift
|
shift
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
upname="`toupper $1`"
|
upname="`toupper $1`"
|
||||||
@ -1350,9 +1356,10 @@ print_config_vars_h() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_webm_license() {
|
print_webm_license() {
|
||||||
local destination=$1
|
saved_prefix="${prefix}"
|
||||||
local prefix="$2"
|
destination=$1
|
||||||
local suffix="$3"
|
prefix="$2"
|
||||||
|
suffix="$3"
|
||||||
shift 3
|
shift 3
|
||||||
cat <<EOF > ${destination}
|
cat <<EOF > ${destination}
|
||||||
${prefix} Copyright (c) 2011 The WebM project authors. All Rights Reserved.${suffix}
|
${prefix} Copyright (c) 2011 The WebM project authors. All Rights Reserved.${suffix}
|
||||||
@ -1363,6 +1370,7 @@ ${prefix} tree. An additional intellectual property rights grant can be found${s
|
|||||||
${prefix} in the file PATENTS. All contributing project authors may${suffix}
|
${prefix} in the file PATENTS. All contributing project authors may${suffix}
|
||||||
${prefix} be found in the AUTHORS file in the root of the source tree.${suffix}
|
${prefix} be found in the AUTHORS file in the root of the source tree.${suffix}
|
||||||
EOF
|
EOF
|
||||||
|
prefix="${saved_prefix}"
|
||||||
}
|
}
|
||||||
|
|
||||||
process_targets() {
|
process_targets() {
|
||||||
|
22
configure
vendored
22
configure
vendored
@ -67,10 +67,10 @@ Codecs:
|
|||||||
EOF
|
EOF
|
||||||
#restore editor state '
|
#restore editor state '
|
||||||
|
|
||||||
local family;
|
family="";
|
||||||
local last_family;
|
last_family="";
|
||||||
local c;
|
c="";
|
||||||
local str;
|
str="";
|
||||||
for c in ${CODECS}; do
|
for c in ${CODECS}; do
|
||||||
family=${c%_*}
|
family=${c%_*}
|
||||||
if [ "${family}" != "${last_family}" ]; then
|
if [ "${family}" != "${last_family}" ]; then
|
||||||
@ -412,7 +412,7 @@ process_cmdline() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_process_cmdline() {
|
post_process_cmdline() {
|
||||||
local c
|
c=""
|
||||||
|
|
||||||
# If the codec family is disabled, disable all components of that family.
|
# If the codec family is disabled, disable all components of that family.
|
||||||
# If the codec family is enabled, enable all components of that family.
|
# If the codec family is enabled, enable all components of that family.
|
||||||
@ -459,8 +459,8 @@ process_targets() {
|
|||||||
enabled universal && echo "FAT_ARCHS=${fat_bin_archs}" >> config.mk
|
enabled universal && echo "FAT_ARCHS=${fat_bin_archs}" >> config.mk
|
||||||
|
|
||||||
# Calculate the default distribution name, based on the enabled features
|
# Calculate the default distribution name, based on the enabled features
|
||||||
local cf
|
cf=""
|
||||||
local DIST_DIR=vpx
|
DIST_DIR=vpx
|
||||||
for cf in $CODEC_FAMILIES; do
|
for cf in $CODEC_FAMILIES; do
|
||||||
if enabled ${cf}_encoder && enabled ${cf}_decoder; then
|
if enabled ${cf}_encoder && enabled ${cf}_decoder; then
|
||||||
DIST_DIR="${DIST_DIR}-${cf}"
|
DIST_DIR="${DIST_DIR}-${cf}"
|
||||||
@ -482,7 +482,7 @@ process_targets() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [ -f "${source_path}/build/make/version.sh" ]; then
|
if [ -f "${source_path}/build/make/version.sh" ]; then
|
||||||
local ver=`"$source_path/build/make/version.sh" --bare "$source_path"`
|
ver=`"$source_path/build/make/version.sh" --bare "$source_path"`
|
||||||
DIST_DIR="${DIST_DIR}-${ver}"
|
DIST_DIR="${DIST_DIR}-${ver}"
|
||||||
VERSION_STRING=${ver}
|
VERSION_STRING=${ver}
|
||||||
ver=${ver%%-*}
|
ver=${ver%%-*}
|
||||||
@ -516,7 +516,7 @@ EOF
|
|||||||
# Write makefiles for all enabled targets
|
# Write makefiles for all enabled targets
|
||||||
#
|
#
|
||||||
for tgt in libs examples docs solution; do
|
for tgt in libs examples docs solution; do
|
||||||
local tgt_fn="$tgt-$toolchain.mk"
|
tgt_fn="$tgt-$toolchain.mk"
|
||||||
|
|
||||||
if enabled $tgt; then
|
if enabled $tgt; then
|
||||||
echo "Creating makefiles for ${toolchain} ${tgt}"
|
echo "Creating makefiles for ${toolchain} ${tgt}"
|
||||||
@ -555,7 +555,7 @@ process_detect() {
|
|||||||
true;
|
true;
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local result=false
|
result=false
|
||||||
for d in "$@"; do
|
for d in "$@"; do
|
||||||
[ -f "${d##-I}/$header" ] && result=true && break
|
[ -f "${d##-I}/$header" ] && result=true && break
|
||||||
done
|
done
|
||||||
@ -604,7 +604,7 @@ process_toolchain() {
|
|||||||
# Handle universal binaries for this architecture
|
# Handle universal binaries for this architecture
|
||||||
case $toolchain in
|
case $toolchain in
|
||||||
universal-darwin*)
|
universal-darwin*)
|
||||||
local darwin_ver=${tgt_os##darwin}
|
darwin_ver=${tgt_os##darwin}
|
||||||
|
|
||||||
# Snow Leopard (10.6/darwin10) dropped support for PPC
|
# Snow Leopard (10.6/darwin10) dropped support for PPC
|
||||||
# Include PPC support for all prior versions
|
# Include PPC support for all prior versions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user