kqemu/qvm86 must now be compiled outside QEMU


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1750 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/configure b/configure
index fa05bbf..64cb745 100755
--- a/configure
+++ b/configure
@@ -85,6 +85,7 @@
 fmod_inc=""
 linux="no"
 kqemu="no"
+profiler="no"
 kernel_path=""
 cocoa="no"
 check_gfx="yes"
@@ -197,6 +198,8 @@
   ;;
   --disable-kqemu) kqemu="no"
   ;;
+  --enable-profiler) profiler="yes"
+  ;;
   --kernel-path=*) kernel_path=${opt#--kernel-path=}
   ;;
   --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no"
@@ -365,7 +368,7 @@
 echo "  --target-list=LIST       set target list [$target_list]"
 echo ""
 echo "kqemu kernel acceleration support:"
-echo "  --disable-kqemu          disable kqemu build"
+echo "  --disable-kqemu          disable kqemu support"
 echo "  --kernel-path=PATH       set the kernel path (configure probes it)"
 echo ""
 echo "Advanced options (experts only):"
@@ -407,48 +410,6 @@
 bindir="$prefix/bin"
 fi
 
-# kqemu support
-if test $kqemu = "yes" ; then
-    # test if the source code is installed
-    if test '!' -f "kqemu/Makefile" ; then
-        kqemu="no"
-    fi
-fi
-
-# Linux specific kqemu configuration
-if test $kqemu = "yes" -a $linux = "yes" ; then
-# find the kernel path
-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"
-    fi
-fi
-fi
-
-if test $kqemu = "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"
-fi
-
-# find build system (2.6 or legacy)
-kbuild26="yes"
-if grep -q "PATCHLEVEL = 4" $kernel_path/Makefile ; then
-kbuild26="no"
-fi
-
-fi # kqemu
-
-fi # kqemu and linux
-
-
 echo "Install prefix    $prefix"
 echo "BIOS directory    $datadir"
 echo "binary directory  $bindir"
@@ -464,6 +425,7 @@
 echo "host big endian   $bigendian"
 echo "target list       $target_list"
 echo "gprof enabled     $gprof"
+echo "profiler          $profiler"
 echo "static build      $static"
 if test "$darwin" = "yes" ; then
     echo "Cocoa support     $cocoa"
@@ -490,17 +452,6 @@
 fi
 echo ""
 echo "kqemu support     $kqemu"
-if test $kqemu = "yes" -a $linux = "yes" ; then
-echo ""
-echo "KQEMU Linux module configuration:"
-echo "kernel sources    $kernel_path"
-echo -n "kbuild type       "
-if test $kbuild26 = "yes"; then
-echo "2.6"
-else
-echo "2.4"
-fi
-fi
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -601,6 +552,9 @@
   echo "CONFIG_STATIC=yes" >> $config_mak
   echo "#define CONFIG_STATIC 1" >> $config_h
 fi
+if test $profiler = "yes" ; then
+  echo "#define CONFIG_PROFILER 1" >> $config_h
+fi
 if test "$slirp" = "yes" ; then
   echo "CONFIG_SLIRP=yes" >> $config_mak
   echo "#define CONFIG_SLIRP 1" >> $config_h
@@ -638,15 +592,6 @@
 head $source_path/VERSION >> $config_h
 echo "\"" >> $config_h
 
-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
-fi
 echo "SRC_PATH=$source_path" >> $config_mak
 echo "TARGET_DIRS=$target_list" >> $config_mak
 
@@ -746,6 +691,9 @@
   echo "#define TARGET_X86_64 1" >> $config_h
   if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64"  ; then
     echo "#define USE_KQEMU 1" >> $config_h
+    if test $kqemu_profile = "yes" ; then
+      echo "#define CONFIG_KQEMU_PROFILE 1" >> $config_h
+    fi
   fi
 elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then
   echo "TARGET_ARCH=mips" >> $config_mak