--- ../main.test2/configure 2005-10-12 23:27:51.000000000 +0200 +++ configure 2005-10-12 23:50:14.000000000 +0200 @@ -54,6 +54,7 @@ } tmp_run() { + test $_cross_compile = yes && return 0 "$TMPO" >> "$TMPLOG" 2>&1 } @@ -317,6 +318,7 @@ Miscellaneous options: --enable-runtime-cpudetection Enable runtime CPU detection [disable] + --enable-cross-compile Enable cross-compilation [autodetect] --cc=COMPILER use this C compiler to build MPlayer [gcc] --host-cc=COMPILER use this C compiler to build apps needed for the build process [gcc] --as=ASSEMBLER use this assembler to build MPlayer [as] @@ -414,6 +416,7 @@ test "$CC" && _cc="$CC" _as=auto _runtime_cpudetection=no +_cross_compile=auto for ac_option do case "$ac_option" in --target=*) @@ -455,6 +458,12 @@ --disable-runtime-cpudetection) _runtime_cpudetection=no ;; + --enable-cross-compile) + _cross_compile=yes + ;; + --disable-cross-compile) + _cross_compile=no + ;; --install-path=*) _install=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install" ;; @@ -714,6 +723,15 @@ test "$_host_cc" || _host_cc=$_cc echores $_host_cc +echocheck "cross compilation" +if test $_cross_compile = auto ; then + cat > $TMPC << EOF +int main() { return 0; } +EOF + _cross_compile=yes + cc_check && "$TMPO" && _cross_compile=no +fi +echores $_cross_compile # --- @@ -1541,6 +1559,8 @@ --with-extralibdir=*) ;; --enable-runtime-cpudetection) ;; --disable-runtime-cpudetection) ;; + --enable-cross-compile) ;; + --disable-cross-compile) ;; --install-path=*) ;; --with-install=*) ;;