Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LLNbW-000706-Q4 for qemu-devel@nongnu.org; Fri, 09 Jan 2009 15:05:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LLNbW-0006yw-5H for qemu-devel@nongnu.org; Fri, 09 Jan 2009 15:05:14 -0500 Received: from [199.232.76.173] (port=48036 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LLNbV-0006yi-VK for qemu-devel@nongnu.org; Fri, 09 Jan 2009 15:05:13 -0500 Received: from savannah.gnu.org ([199.232.41.3]:37662 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LLNbV-0002ys-30 for qemu-devel@nongnu.org; Fri, 09 Jan 2009 15:05:13 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LLNbT-0007VU-4N for qemu-devel@nongnu.org; Fri, 09 Jan 2009 20:05:11 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LLNbS-0007VQ-T1 for qemu-devel@nongnu.org; Fri, 09 Jan 2009 20:05:11 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 09 Jan 2009 20:05:10 +0000 Subject: [Qemu-devel] [6263] fix configuring kvm probe when using --kerneldir (Christian Ehrhardt ) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6263 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6263 Author: aliguori Date: 2009-01-09 20:05:10 +0000 (Fri, 09 Jan 2009) Log Message: ----------- fix configuring kvm probe when using --kerneldir (Christian Ehrhardt) There is already a variable kvm_cflags which gets the path of the kernel includes when using --kerneldir. But eventually with newer kernels we all will need arch/$arch/include too (my case was a incldue of asm/kvm.h which was not found anymore). Headers in a full kernel source are not flattened to one arch like they are if e.g. installed kernel headers are used. To fix that, the includes added to cflags depending on --kerneldir should also contian the arch includes. The patch adds a special check for x86 because its source layout recently changed, all others directly use arch/$cpu/include if existent. Signed-off-by: Christian Ehrhardt Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/configure Modified: trunk/configure =================================================================== --- trunk/configure 2009-01-09 19:51:09 UTC (rev 6262) +++ trunk/configure 2009-01-09 20:05:10 UTC (rev 6263) @@ -964,6 +964,12 @@ EOF if test "$kerneldir" != "" ; then kvm_cflags=-I"$kerneldir"/include + if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) \ + -a -d "$kerneldir/arch/x86/include" ; then + kvm_cflags="$kvm_cflags -I$kerneldir/arch/x86/include" + elif test -d "$kerneldir/arch/$cpu/include" ; then + kvm_cflags="$kvm_cflags -I$kerneldir/arch/$cpu/include" + fi else kvm_cflags="" fi