qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Set a useful default for kerneldir
@ 2009-07-01  9:33 Andi Kleen
  2009-07-01 13:31 ` Anthony Liguori
  2009-07-09 19:00 ` Anthony Liguori
  0 siblings, 2 replies; 5+ messages in thread
From: Andi Kleen @ 2009-07-01  9:33 UTC (permalink / raw)
  To: qemu-devel


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 <ak@linux.intel.com>

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"
   if test "$kerneldir" != "" ; then
       kvm_cflags=-I"$kerneldir"/include
       if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) \

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-09 19:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-01  9:33 [Qemu-devel] [PATCH] Set a useful default for kerneldir Andi Kleen
2009-07-01 13:31 ` Anthony Liguori
2009-07-01 13:40   ` Andi Kleen
2009-07-01 15:10   ` Avi Kivity
2009-07-09 19:00 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).