diff options
author | John Koleszar <jkoleszar@google.com> | 2010-05-25 13:00:43 -0700 |
---|---|---|
committer | Code Review <code-review@webmproject.org> | 2010-05-25 13:00:43 -0700 |
commit | c601db956a682167e4f670f02144f225e8c27621 (patch) | |
tree | fd7c22bd842915650e69254e7a52a8efe026b0f3 /build/make | |
parent | 4c627f5697d0d286b87ac411a89f17887ff54e8a (diff) | |
parent | 98058bccfcded58f75dc275dc3dec3a862a1f39c (diff) | |
download | libvpx-c601db956a682167e4f670f02144f225e8c27621.tar libvpx-c601db956a682167e4f670f02144f225e8c27621.tar.gz libvpx-c601db956a682167e4f670f02144f225e8c27621.tar.bz2 libvpx-c601db956a682167e4f670f02144f225e8c27621.zip |
Merge "configure: detect toolchain if not specified"
Diffstat (limited to 'build/make')
-rwxr-xr-x | build/make/configure.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh index e7dd5849a..62d8b6497 100755 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -478,6 +478,42 @@ setup_gnu_toolchain() { } process_common_toolchain() { + if [ -z "$toolchain" ]; then + uname="$(uname -a)" + + # detect tgt_isa + case "$uname" in + *x86_64*) + tgt_isa=x86_64 + ;; + *i[3456]86*) + tgt_isa=x86 + ;; + esac + + # detect tgt_os + case "$uname" in + *Darwin\ Kernel\ Version\ 8*) + tgt_isa=universal + tgt_os=darwin8 + ;; + *Darwin\ Kernel\ Version\ 9*) + tgt_isa=universal + tgt_os=darwin9 + ;; + *Msys*|*Cygwin*) + tgt_os=win32 + ;; + *Linux*|*BSD*) + tgt_os=linux + ;; + esac + + if [ -n "$tgt_isa" ] && [ -n "$tgt_os" ]; then + toolchain=${tgt_isa}-${tgt_os}-gcc + fi + fi + toolchain=${toolchain:-generic-gnu} is_in ${toolchain} ${all_platforms} || enabled force_toolchain \ |