add an escape for when targethost is not defined but usecrosscompile is.
authorNeil Williams <codehelp@debian.org>
Fri, 11 Jan 2013 17:01:22 +0000 (17:01 +0000)
committerBrian Fraser <fraserbn@gmail.com>
Wed, 22 Jan 2014 16:08:19 +0000 (13:08 -0300)
See http://www.nntp.perl.org/group/perl.perl5.porters/2012/12/msg196443.html
"Cross-building and Makefile.SH", which explains the reasoning for this.

Configure

index 44a6c0d..73d6e21 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -2879,7 +2879,20 @@ esac
 
 : Define -Dtargethost=somecomputer to run compiled tests on another machine
 case "$targethost" in
-    '') echo "No targethost for running compiler tests against defined, running locally" >&4
+    '') echo "Checking for cross-compile" >&4
+    case "$usecrosscompile$multiarch" in
+       *$define*) echo "Skipping the rest of Configure as no targethost was defined when cross-compiling" >&4
+         if [ -f Makefile ]; then
+           echo " "
+           echo "Now you must ensure config.sh, config.h and the generated headers exist and run a $make."
+         else
+           echo "Configure done."
+         fi
+       exit 0
+       ;;
+    esac
+    ;;
+     *) echo "No targethost for running compiler tests against defined, running locally" >&4
         run=''
         to=:
         from=: