qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Set a useful default for kerneldir
Date: Wed, 1 Jul 2009 11:33:19 +0200	[thread overview]
Message-ID: <20090701093319.GA12461@basil.fritz.box> (raw)


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.

             reply	other threads:[~2009-07-01  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01  9:33 Andi Kleen [this message]
2009-07-01 13:31 ` [Qemu-devel] [PATCH] Set a useful default for kerneldir Anthony Liguori
2009-07-01 13:40   ` Andi Kleen
2009-07-01 15:10   ` Avi Kivity
2009-07-09 19:00 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090701093319.GA12461@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).