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
mixemu="no"
bluez="yes"
kvm="yes"
mixemu="no"
bluez="yes"
kvm="yes"
# OS specific
targetos=`uname -s`
# OS specific
targetos=`uname -s`
;;
--disable-aio) aio="no"
;;
;;
--disable-aio) aio="no"
;;
+ --kerneldir=*) kerneldir="$optarg"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
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 " --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
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
#endif
int main(void) { return 0; }
EOF
#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
:
if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $kvm_cflags $TMPC \
2>/dev/null ; then
: