diff options
author | aliguori | 2009-01-09 21:05:10 +0100 |
---|---|---|
committer | aliguori | 2009-01-09 21:05:10 +0100 |
commit | 8444eb6ecd90c4e1b8497fb9c2f41c598c897275 (patch) | |
tree | 4172b988f188cfc70c86b29405bb401adfad09af /configure | |
parent | Mark openbios-ppc as a binary file. (diff) | |
download | qemu-8444eb6ecd90c4e1b8497fb9c2f41c598c897275.tar.gz qemu-8444eb6ecd90c4e1b8497fb9c2f41c598c897275.tar.xz qemu-8444eb6ecd90c4e1b8497fb9c2f41c598c897275.zip |
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 <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6263 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -964,6 +964,12 @@ int main(void) { return 0; } 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 |