summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2014-03-18 19:58:03 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-03-18 19:58:03 -0700
commit55dbbbbeaa898d8bf3eea73cc314a2e60d212890 (patch)
tree9be75497686e2110ce37dbb097936fea2a30ef0d
parent4b41800d497b3e768269db0c63acb5136c7a3a99 (diff)
parentf1e8d58a5cd34125fcd4c0de15650519082f47ff (diff)
downloadlibvpx-55dbbbbeaa898d8bf3eea73cc314a2e60d212890.tar
libvpx-55dbbbbeaa898d8bf3eea73cc314a2e60d212890.tar.gz
libvpx-55dbbbbeaa898d8bf3eea73cc314a2e60d212890.tar.bz2
libvpx-55dbbbbeaa898d8bf3eea73cc314a2e60d212890.zip
Merge changes If529f310,I0f4a8202
* changes: configure: test for -mssse3 configure: factorize gcc machine option checks
-rwxr-xr-xbuild/make/configure.sh35
1 files changed, 17 insertions, 18 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 7991fb3c4..054c60173 100755
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -378,6 +378,19 @@ EOF
fi
}
+# tests for -m$1 toggling the feature given in $2. If $2 is empty $1 is used.
+check_gcc_machine_option() {
+ local opt="$1"
+ local feature="$2"
+ [ -n "$feature" ] || feature="$opt"
+
+ if enabled gcc && ! disabled "$feature" && ! check_cflags "-m$opt"; then
+ RTCD_OPTIONS="${RTCD_OPTIONS}--disable-$feature "
+ else
+ soft_enable "$feature"
+ fi
+}
+
write_common_config_banner() {
print_webm_license config.mk "##" ""
echo '# This file automatically generated by configure. Do not edit!' >> config.mk
@@ -1093,26 +1106,12 @@ EOF
soft_enable sse
soft_enable sse2
soft_enable sse3
- soft_enable ssse3
# We can't use 'check_cflags' until the compiler is configured and CC is
# populated.
- if enabled gcc && ! disabled sse4_1 && ! check_cflags -msse4; then
- RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sse4_1 "
- else
- soft_enable sse4_1
- fi
-
- if enabled gcc && ! disabled avx && ! check_cflags -mavx; then
- RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx "
- else
- soft_enable avx
- fi
-
- if enabled gcc && ! disabled avx2 && ! check_cflags -mavx2; then
- RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx2 "
- else
- soft_enable avx2
- fi
+ check_gcc_machine_option ssse3
+ check_gcc_machine_option sse4 sse4_1
+ check_gcc_machine_option avx
+ check_gcc_machine_option avx2
case "${AS}" in
auto|"")