--- qemu-0.8.0.orig/configure +++ qemu-0.8.0/configure @@ -85,6 +85,8 @@ fmod_inc="" linux="no" kqemu="no" +qvm86="no" +kernel_module="no" kernel_path="" cocoa="no" check_gfx="yes" @@ -99,6 +101,10 @@ ;; MINGW32*) mingw32="yes" +if [ "$cpu" = "i386" ] ; then + kqemu="yes" + qvm86="yes" +fi ;; FreeBSD) bsd="yes" @@ -124,6 +130,7 @@ linux="yes" if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes" + qvm86="yes" fi ;; esac @@ -197,6 +204,8 @@ ;; --disable-kqemu) kqemu="no" ;; + --disable-qvm86) kqvm86="no" + ;; --kernel-path=*) kernel_path=${opt#--kernel-path=} ;; --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no" @@ -366,6 +375,7 @@ echo "" echo "kqemu kernel acceleration support:" echo " --disable-kqemu disable kqemu build" +echo " --disable-qvm86 disable qvm86 build" echo " --kernel-path=PATH set the kernel path (configure probes it)" echo "" echo "Advanced options (experts only):" @@ -414,27 +424,42 @@ fi fi -# Linux specific kqemu configuration -if test $kqemu = "yes" -a $linux = "yes" ; then +# qvm86 support +if test $qvm86 = "yes" ; then + # test if the source code is installed + if test '!' -f "qvm86/Makefile" ; then + qvm86="no" + fi +fi + +if test $kqemu = "yes" -o $qvm86 = "yes" ; then + kernel_module=yes +fi + # find the kernel path +if test $kernel_module = "yes"; then +if test "$linux" = "yes"; then if test -z "$kernel_path" ; then kernel_version=`uname -r` kernel_path="/lib/modules/$kernel_version/build" if test '!' -d "$kernel_path/include" ; then kernel_path="/usr/src/linux" if test '!' -d "$kernel_path/include" ; then - echo "Could not find kernel includes in /lib/modules or /usr/src/linux - cannot build the kqemu module" - kqemu="no" + echo "Could not find kernel includes in /lib/modules or /usr/src/linux - cannot build kernel module" + kernel_module="no" fi fi fi +fi # linux +fi # kernel_module -if test $kqemu = "yes" ; then +if test $kernel_module = yes; then +if test "$linux" = "yes"; then # test that the kernel config is present if test '!' -f "$kernel_path/Makefile" ; then - echo "No Makefile file present in $kernel_path - kqemu cannot be built" - kqemu="no" + echo "No .config file present in $kernel_path - kernel module cannot be built" + kernel_module="no" fi # find build system (2.6 or legacy) @@ -443,10 +468,13 @@ kbuild26="no" fi -fi # kqemu - -fi # kqemu and linux +fi # linux +fi # kernel_module +if test ! $kernel_module = "yes"; then + kqemu="no" + qvm86="no" +fi echo "Install prefix $prefix" echo "BIOS directory $datadir" @@ -488,10 +516,12 @@ echo -n " (lib='$fmod_lib' include='$fmod_inc')" fi echo "" -echo "kqemu support $kqemu" -if test $kqemu = "yes" -a $linux = "yes" ; then +echo "kqemu $kqemu" +echo "qvm86 $qvm86" +if test $kernel_module = "yes"; then +if test "$linux" = "yes"; then echo "" -echo "KQEMU Linux module configuration:" +echo "Kernel module configuration:" echo "kernel sources $kernel_path" echo -n "kbuild type " if test $kbuild26 = "yes"; then @@ -500,6 +530,7 @@ echo "2.4" fi fi +fi if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -639,11 +670,14 @@ if test $kqemu = "yes" ; then echo "CONFIG_KQEMU=yes" >> $config_mak - if test $linux = "yes" ; then - echo "KERNEL_PATH=$kernel_path" >> $config_mak - if test $kbuild26 = "yes" ; then - echo "CONFIG_KBUILD26=yes" >> $config_mak - fi +fi +if test $qvm86 = "yes" ; then + echo "CONFIG_QVM86=yes" >> $config_mak +fi +if test $kernel_module = "yes" ; then + echo "KERNEL_PATH=$kernel_path" >> $config_mak + if test "$kbuild26" = "yes" ; then + echo "CONFIG_KBUILD26=yes" >> $config_mak fi fi echo "SRC_PATH=$source_path" >> $config_mak @@ -713,7 +747,7 @@ echo "TARGET_ARCH=i386" >> $config_mak echo "#define TARGET_ARCH \"i386\"" >> $config_h echo "#define TARGET_I386 1" >> $config_h - if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "i386" ; then + if test $kernel_module = "yes" -a "$target_softmmu" = "yes" -a "$cpu" = "i386"; then echo "#define USE_KQEMU 1" >> $config_h fi elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then