From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOyrb-0005dQ-3K for qemu-devel@nongnu.org; Thu, 09 Jul 2009 15:00:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOyrW-0005c0-3l for qemu-devel@nongnu.org; Thu, 09 Jul 2009 15:00:58 -0400 Received: from [199.232.76.173] (port=47364 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOyrV-0005bf-Lc for qemu-devel@nongnu.org; Thu, 09 Jul 2009 15:00:54 -0400 Received: from rv-out-0708.google.com ([209.85.198.244]:24793) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOyrU-0003SS-E9 for qemu-devel@nongnu.org; Thu, 09 Jul 2009 15:00:52 -0400 Received: by rv-out-0708.google.com with SMTP id b17so78327rvf.22 for ; Thu, 09 Jul 2009 12:00:50 -0700 (PDT) Message-ID: <4A563E5F.3030708@codemonkey.ws> Date: Thu, 09 Jul 2009 14:00:47 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Set a useful default for kerneldir References: <20090701093319.GA12461@basil.fritz.box> In-Reply-To: <20090701093319.GA12461@basil.fritz.box> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andi Kleen Cc: qemu-devel@nongnu.org Andi Kleen wrote: > When no explicit kerneldir is specified use the standard > /lib/modules/$(uname -r)/build > convention to find the kernel includes. This should work out of the box > on a large number of distributions. > > Also support separate objdirs. > > Signed-off-by: Andi Kleen > > diff --git a/configure b/configure > index eb9d73a..8c2491d 100755 > --- a/configure > +++ b/configure > @@ -1148,6 +1148,13 @@ if test "$kvm" = "yes" ; then > #endif > int main(void) { return 0; } > EOF > + if test "$kerneldir" = "" ; then > + kerneldir="/lib/modules/`uname -r`/build" > + if test -d "$kerneldir/source" ; then > + kerneldir="$kerneldir/source" > + fi > + fi > + echo "Kerneldir $kerneldir" > This is the wrong place for this echo. They're all unified in a block further down in the code. Regards, Anthony Liguori