]> git.proxmox.com Git - mirror_qemu.git/blobdiff - configure
Delete duplicate code.
[mirror_qemu.git] / configure
index fae860b98422b048017d9365aca811eda58ca33d..f204d048cbfb0b932574d714eaa2e9dbde351b3e 100755 (executable)
--- a/configure
+++ b/configure
@@ -112,6 +112,7 @@ darwin_user="no"
 build_docs="no"
 uname_release=""
 curses="yes"
+nptl="yes"
 
 # OS specific
 targetos=`uname -s`
@@ -331,6 +332,8 @@ for opt do
   ;;
   --disable-curses) curses="no"
   ;;
+  --disable-nptl) nptl="no"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -424,6 +427,7 @@ echo "  --enable-dsound          enable DirectSound audio driver"
 echo "  --disable-brlapi         disable BrlAPI"
 echo "  --disable-vnc-tls        disable TLS encryption for VNC server"
 echo "  --disable-curses         disable curses output"
+echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-system          enable all system emulation targets"
 echo "  --disable-system         disable all system emulation targets"
 echo "  --enable-linux-user      enable all linux usermode emulation targets"
@@ -641,6 +645,24 @@ int main(void) {
 }
 EOF
 
+# Check host NPTL support
+cat > $TMPC <<EOF
+#include <sched.h>
+#include <linux/futex.h>
+void foo()
+{
+#if !defined(CLONE_SETTLS) || !defined(FUTEX_WAIT)
+#error bork
+#endif
+}
+EOF
+
+if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC 2> /dev/null ; then
+  :
+else
+   nptl="no"
+fi
+
 ##########################################
 # SDL probe
 
@@ -839,6 +861,7 @@ echo "brlapi support    $brlapi"
 echo "Documentation     $build_docs"
 [ ! -z "$uname_release" ] && \
 echo "uname -r          $uname_release"
+echo "NPTL support      $nptl"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1105,6 +1128,9 @@ echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
 tools=
 if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
   tools="qemu-img\$(EXESUF) $tools"
+  if [ "$linux" = "yes" ] ; then
+      tools="qemu-nbd\$(EXESUF) $tools"
+  fi
 fi
 echo "TOOLS=$tools" >> $config_mak
 
@@ -1187,6 +1213,7 @@ echo "#include \"../config-host.h\"" >> $config_h
 
 bflt="no"
 elfload32="no"
+target_nptl="no"
 interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
 echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
 
@@ -1195,7 +1222,7 @@ case "$target_cpu" in
     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"
+    if test $kqemu = "yes" -a "$target_softmmu" = "yes"
     then
       echo "#define USE_KQEMU 1" >> $config_h
     fi
@@ -1229,6 +1256,7 @@ case "$target_cpu" in
     echo "#define TARGET_ARCH \"arm\"" >> $config_h
     echo "#define TARGET_ARM 1" >> $config_h
     bflt="yes"
+    target_nptl="yes"
   ;;
   cris)
     echo "TARGET_ARCH=cris" >> $config_mak
@@ -1237,10 +1265,8 @@ case "$target_cpu" in
   ;;
   m68k)
     echo "TARGET_ARCH=m68k" >> $config_mak
-    echo "CONFIG_DYNGEN_OP=yes" >> $config_mak
     echo "#define TARGET_ARCH \"m68k\"" >> $config_h
     echo "#define TARGET_M68K 1" >> $config_h
-    echo "#define CONFIG_DYNGEN_OP 1" >> $config_h
     bflt="yes"
   ;;
   mips|mipsel)
@@ -1378,6 +1404,10 @@ if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then
   echo "TARGET_HAS_BFLT=yes" >> $config_mak
   echo "#define TARGET_HAS_BFLT 1" >> $config_h
 fi
+if test "$target_user_only" = "yes" \
+        -a "$nptl" = "yes" -a "$target_nptl" = "yes"; then
+  echo "#define USE_NPTL 1" >> $config_h
+fi
 # 32 bit ELF loader in addition to native 64 bit loader?
 if test "$target_user_only" = "yes" -a "$elfload32" = "yes"; then
   echo "TARGET_HAS_ELFLOAD32=yes" >> $config_mak