From patchwork Tue Oct 12 13:00:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 67559 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 59D5DB6F0D for ; Wed, 13 Oct 2010 00:19:08 +1100 (EST) Received: from localhost ([127.0.0.1]:34218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5ekz-0008Go-5X for incoming@patchwork.ozlabs.org; Tue, 12 Oct 2010 09:19:05 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject:date :message-id:x-mailer:in-reply-to:references; bh=MLFcU8TEHJ4CuJikNUqCo8Fhn05fj5gWJwUmE7ugrbY=; b=mZ8LXisiACZKuQ2ifkTYfiIn1FwAfSKP35gFQRi6fA+l0j1AFLUycc1yE9Uy05HOhk qWg80r+TXp6KF0CoHb0A4WVtXpeJ5JLzr9sw8ASYGj2K1P1e4n/TgCZ8p/zOgbUuAxRx 8e3j7LYAgdgm98iYBPUB1+FJEvQb1pKpcsM3w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; b=F6HtruEUy3Lnlz4xFq2RoaZ+T2SKPiarUxVFUNvuHIqts5VyzM0NLK+J85aU7d88Ll Wg3C79V7HBkaAanEzQPChIQ9zpsW891AWG8NGoAwncdKx+PsHiUxX4T8YgJS6Wz5XGVK bTpS//P8rGvePK1X5TW+JIi4kPMy2goEo/ut0= Received: by 10.224.184.77 with SMTP id cj13mr5684168qab.323.1286888487741; Tue, 12 Oct 2010 06:01:27 -0700 (PDT) Received: from localhost.localdomain (nat-pool-brq-t.redhat.com [209.132.186.34]) by mx.google.com with ESMTPS id s34sm5931078qcp.20.2010.10.12.06.01.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Oct 2010 06:01:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 12 Oct 2010 15:00:30 +0200 Message-Id: <1286888457-5033-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 12/39] move --srcdir detection earlier X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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 <