aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-02-11 23:57:52 +0000
committerMåns Rullgård <mans@mansr.com>2010-02-11 23:57:52 +0000
commit8d4c00ed3867a01d75a4361049974b84ec574fde (patch)
tree8cdf486dae8b3e4e486df202c51f65e320bc5239 /configure
parent4368990236a0f846b7e49effec2d916d96eedca2 (diff)
downloadffmpeg-8d4c00ed3867a01d75a4361049974b84ec574fde.tar.gz
configure: require --arch and --target-os when cross-compiling
Originally committed as revision 21766 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure b/configure
index 203146f2ff..e85f6ee013 100755
--- a/configure
+++ b/configure
@@ -1427,12 +1427,12 @@ yasmexe="yasm"
nm_opts='-g'
# machine
-arch=$(uname -m)
+arch_default=$(uname -m)
cpu="generic"
# OS
-target_os=$(tolower $(uname -s))
-host_os=$target_os
+target_os_default=$(tolower $(uname -s))
+host_os=$target_os_default
# configurable options
enable avcodec
@@ -1606,6 +1606,13 @@ set >> $logfile
test -n "$cross_prefix" && enable cross_compile
+if enabled cross_compile; then
+ test -n "$arch" && test -n "$target_os" ||
+ die "Must specify target arch and OS when cross-compiling"
+fi
+
+set_default arch target_os
+
ar="${cross_prefix}${ar}"
cc_default="${cross_prefix}${cc_default}"
nm_default="${cross_prefix}${nm_default}"