From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41094 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5eU2-0007aG-RA for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5eTw-0004bn-On for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:34 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:48077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5eTw-0004Lx-Lw for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:28 -0400 Received: by mail-qy0-f173.google.com with SMTP id 36so629119qyk.4 for ; Tue, 12 Oct 2010 06:01:28 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 12 Oct 2010 15:00:30 +0200 Message-Id: <1286888457-5033-13-git-send-email-pbonzini@redhat.com> In-Reply-To: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 12/39] move --srcdir detection earlier List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This will help getting config.guess and config.sub from the srcdir. Signed-off-by: Paolo Bonzini --- configure | 28 +++++++++++++++------------- 1 files changed, 15 insertions(+), 13 deletions(-) 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 <