Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxlFb-0006P1-S1 for qemu-devel@nongnu.org; Wed, 05 Nov 2008 11:28:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxlFa-0006Oa-6S for qemu-devel@nongnu.org; Wed, 05 Nov 2008 11:28:59 -0500 Received: from [199.232.76.173] (port=40759 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxlFa-0006OX-1d for qemu-devel@nongnu.org; Wed, 05 Nov 2008 11:28:58 -0500 Received: from savannah.gnu.org ([199.232.41.3]:38334 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 1KxlFZ-00087q-OZ for qemu-devel@nongnu.org; Wed, 05 Nov 2008 11:28:57 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KxlFZ-0007HI-9C for qemu-devel@nongnu.org; Wed, 05 Nov 2008 16:28:57 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KxlFY-0007HD-Vq for qemu-devel@nongnu.org; Wed, 05 Nov 2008 16:28:57 +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: Wed, 05 Nov 2008 16:28:57 +0000 Subject: [Qemu-devel] [5628] Add --kerneldir configure argument 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: 5628 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5628 Author: aliguori Date: 2008-11-05 16:28:56 +0000 (Wed, 05 Nov 2008) Log Message: ----------- 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 Modified Paths: -------------- trunk/configure Modified: trunk/configure =================================================================== --- trunk/configure 2008-11-05 16:04:33 UTC (rev 5627) +++ trunk/configure 2008-11-05 16:28:56 UTC (rev 5628) @@ -116,6 +116,7 @@ mixemu="no" bluez="yes" kvm="yes" +kerneldir="" # OS specific targetos=`uname -s` @@ -359,6 +360,8 @@ ;; --disable-aio) aio="no" ;; + --kerneldir=*) kerneldir="$optarg" + ;; *) echo "ERROR: unknown option $opt"; show_help="yes" ;; esac @@ -468,6 +471,7 @@ 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 @@ #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 :