mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-11 03:32:39 +00:00
add --cross-compile option to assume cross-compilation without cross-prefix
Originally committed as revision 5550 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ddab0670b9
commit
fac252f95b
9
configure
vendored
9
configure
vendored
@ -48,6 +48,7 @@ show_help(){
|
|||||||
echo "Advanced options (experts only):"
|
echo "Advanced options (experts only):"
|
||||||
echo " --source-path=PATH path to source code [$source_path]"
|
echo " --source-path=PATH path to source code [$source_path]"
|
||||||
echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
|
echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
|
||||||
|
echo " --cross-compile assume a cross-compiler is used"
|
||||||
echo " --cc=CC use C compiler CC [$cc]"
|
echo " --cc=CC use C compiler CC [$cc]"
|
||||||
echo " --make=MAKE use specified make [$make]"
|
echo " --make=MAKE use specified make [$make]"
|
||||||
echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
|
echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
|
||||||
@ -267,7 +268,7 @@ check_lib(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_exec(){
|
check_exec(){
|
||||||
check_ld "$@" && { test -n "$cross_prefix" || $TMPE 2>&1 >>$logfile; }
|
check_ld "$@" && { test "$cross_compile" = yes || $TMPE 2>&1 >>$logfile; }
|
||||||
}
|
}
|
||||||
|
|
||||||
require(){
|
require(){
|
||||||
@ -306,6 +307,7 @@ incdir=""
|
|||||||
mandir=""
|
mandir=""
|
||||||
bindir=""
|
bindir=""
|
||||||
cross_prefix=""
|
cross_prefix=""
|
||||||
|
cross_compile="no"
|
||||||
cc="gcc"
|
cc="gcc"
|
||||||
ar="ar"
|
ar="ar"
|
||||||
ranlib="ranlib"
|
ranlib="ranlib"
|
||||||
@ -662,6 +664,8 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
|
--cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
|
||||||
;;
|
;;
|
||||||
|
--cross-compile) cross_compile=yes
|
||||||
|
;;
|
||||||
--cc=*) cc=`echo $opt | cut -d '=' -f 2-`
|
--cc=*) cc=`echo $opt | cut -d '=' -f 2-`
|
||||||
;;
|
;;
|
||||||
--make=*) make=`echo $opt | cut -d '=' -f 2`
|
--make=*) make=`echo $opt | cut -d '=' -f 2`
|
||||||
@ -825,6 +829,7 @@ fi
|
|||||||
# Combine FFLDFLAGS and the LDFLAGS environment variable
|
# Combine FFLDFLAGS and the LDFLAGS environment variable
|
||||||
LDFLAGS="$FFLDFLAGS $LDFLAGS"
|
LDFLAGS="$FFLDFLAGS $LDFLAGS"
|
||||||
|
|
||||||
|
test -n "$cross_prefix" && cross_compile=yes
|
||||||
cc="${cross_prefix}${cc}"
|
cc="${cross_prefix}${cc}"
|
||||||
ar="${cross_prefix}${ar}"
|
ar="${cross_prefix}${ar}"
|
||||||
ranlib="${cross_prefix}${ranlib}"
|
ranlib="${cross_prefix}${ranlib}"
|
||||||
@ -1132,7 +1137,7 @@ fi
|
|||||||
|
|
||||||
# ---
|
# ---
|
||||||
# big/little-endian test
|
# big/little-endian test
|
||||||
if test -z "$cross_prefix" ; then
|
if test "$cross_compile" = "no"; then
|
||||||
check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
|
check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
int main(int argc, char ** argv){
|
int main(int argc, char ** argv){
|
||||||
|
Loading…
Reference in New Issue
Block a user