summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-05 16:28:56 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-05 16:28:56 +0000
commiteac3026225fe7224a1e1c492482b7480df5f36ea (patch)
tree5dfca5bd3ca76edc7d84293cd60affb65d473388 /configure
parent7ba1e61953f4592606e60b2e7507ff6a6faf861a (diff)
downloadqemu-eac3026225fe7224a1e1c492482b7480df5f36ea.tar.gz
qemu-eac3026225fe7224a1e1c492482b7480df5f36ea.tar.bz2
qemu-eac3026225fe7224a1e1c492482b7480df5f36ea.zip
Add --kerneldir configure argument
This allows a user to override the default search path and also makes cross compilation work a bit nicer wrt KVM detection. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5628 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure b/configure
index 53167d5df7..067c3c572d 100755
--- a/configure
+++ b/configure
@@ -116,6 +116,7 @@ nptl="yes"
mixemu="no"
bluez="yes"
kvm="yes"
+kerneldir=""
# OS specific
targetos=`uname -s`
@@ -359,6 +360,8 @@ for opt do
;;
--disable-aio) aio="no"
;;
+ --kerneldir=*) kerneldir="$optarg"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
@@ -468,6 +471,7 @@ echo " --enable-uname-release=R Return R for uname -r in usermode emulation"
echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
echo " --disable-vde disable support for vde network"
echo " --disable-aio disable AIO support"
+echo " --kerneldir=PATH look for kernel includes in PATH"
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
@@ -968,8 +972,11 @@ if test "$kvm" = "yes" ; then
#endif
int main(void) { return 0; }
EOF
- # FIXME make this configurable
- kvm_cflags=-I/lib/modules/`uname -r`/build/include
+ if test "$kerneldir" != "" ; then
+ kvm_cflags=-I"$kerneldir"/include
+ else
+ kvm_cflags=""
+ fi
if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $kvm_cflags $TMPC \
2>/dev/null ; then
: