Revision fac252f9

View differences:

configure
48 48
  echo "Advanced options (experts only):"
49 49
  echo "  --source-path=PATH       path to source code [$source_path]"
50 50
  echo "  --cross-prefix=PREFIX    use PREFIX for compilation tools [$cross_prefix]"
51
  echo "  --cross-compile          assume a cross-compiler is used"
51 52
  echo "  --cc=CC                  use C compiler CC [$cc]"
52 53
  echo "  --make=MAKE              use specified make [$make]"
53 54
  echo "  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS [$CFLAGS]"
......
267 268
}
268 269

  
269 270
check_exec(){
270
    check_ld "$@" && { test -n "$cross_prefix" || $TMPE 2>&1 >>$logfile; }
271
    check_ld "$@" && { test "$cross_compile" = yes || $TMPE 2>&1 >>$logfile; }
271 272
}
272 273

  
273 274
require(){
......
306 307
mandir=""
307 308
bindir=""
308 309
cross_prefix=""
310
cross_compile="no"
309 311
cc="gcc"
310 312
ar="ar"
311 313
ranlib="ranlib"
......
662 664
  ;;
663 665
  --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
664 666
  ;;
667
  --cross-compile) cross_compile=yes
668
  ;;
665 669
  --cc=*) cc=`echo $opt | cut -d '=' -f 2-`
666 670
  ;;
667 671
  --make=*) make=`echo $opt | cut -d '=' -f 2`
......
825 829
# Combine FFLDFLAGS and the LDFLAGS environment variable
826 830
LDFLAGS="$FFLDFLAGS $LDFLAGS"
827 831

  
832
test -n "$cross_prefix" && cross_compile=yes
828 833
cc="${cross_prefix}${cc}"
829 834
ar="${cross_prefix}${ar}"
830 835
ranlib="${cross_prefix}${ranlib}"
......
1132 1137

  
1133 1138
# ---
1134 1139
# big/little-endian test
1135
if test -z "$cross_prefix" ; then
1140
if test "$cross_compile" = "no"; then
1136 1141
    check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
1137 1142
#include <inttypes.h>
1138 1143
int main(int argc, char ** argv){

Also available in: Unified diff