diff mbox

[12/39] move --srcdir detection earlier

Message ID 1286888457-5033-13-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Oct. 12, 2010, 1 p.m. UTC
This will help getting config.guess and config.sub from the srcdir.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)
diff mbox

Patch

diff --git a/configure b/configure
index f61c5b8..e059525 100755
--- a/configure
+++ b/configure
@@ -183,6 +183,9 @@  for opt do
   ;;
   --cc=*) CC="$optarg"
   ;;
+  --source-path=*) source_path="$optarg"
+  source_path_used="yes"
+  ;;
   --cpu=*) cpu="$optarg"
   ;;
   --extra-cflags=*) QEMU_CFLAGS="$optarg $QEMU_CFLAGS"
@@ -229,6 +232,17 @@  QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
 QEMU_CPPFLAGS="-I. -I\$(SRC_PATH)"
 LDFLAGS="-g $LDFLAGS"
 
+# find source path
+source_path=`dirname "$0"`
+source_path_used="no"
+workdir=`pwd`
+if [ -z "$source_path" ]; then
+    source_path=$workdir
+else
+    source_path=`cd "$source_path"; pwd`
+fi
+[ -f "$workdir/vl.c" ] || source_path_used="yes"
+
 check_define() {
 cat > $TMPC <<EOF
 #if !defined($1)
@@ -479,17 +493,6 @@  if test "$mingw32" = "yes" ; then
   confsuffix=""
 fi
 
-# find source path
-source_path=`dirname "$0"`
-source_path_used="no"
-workdir=`pwd`
-if [ -z "$source_path" ]; then
-    source_path=$workdir
-else
-    source_path=`cd "$source_path"; pwd`
-fi
-[ -f "$workdir/vl.c" ] || source_path_used="yes"
-
 werror=""
 
 for opt do
@@ -501,8 +504,7 @@  for opt do
   ;;
   --interp-prefix=*) interp_prefix="$optarg"
   ;;
-  --source-path=*) source_path="$optarg"
-  source_path_used="yes"
+  --source-path=*)
   ;;
   --cross-prefix=*)
   ;;