]> git.proxmox.com Git - qemu.git/blobdiff - configure
Add fdt to new feature convention
[qemu.git] / configure
index 7f063151522e14df2c5b1a574725f5bee195a730..6be2d74cc7c7b3dc3f8943d1e45ed04956e30efc 100755 (executable)
--- a/configure
+++ b/configure
@@ -177,10 +177,14 @@ esac
 # to ensure that several features are compiled in, and it is impossible without a
 # --enable-foo that exits if feature is not found
 
+bluez=""
 brlapi=""
 curl=""
 curses=""
+docs=""
+fdt=""
 nptl=""
+sdl=""
 vde=""
 vnc_tls=""
 vnc_sasl=""
@@ -207,17 +211,13 @@ linux_user="no"
 darwin_user="no"
 bsd_user="no"
 guest_base=""
-build_docs="yes"
 uname_release=""
 io_thread="no"
 mixemu="no"
-bluez="yes"
 kvm="no"
 kerneldir=""
 aix="no"
 blobs="yes"
-fdt="yes"
-sdl="yes"
 xen="yes"
 pkgversion=""
 
@@ -407,6 +407,8 @@ for opt do
   ;;
   --disable-sdl) sdl="no"
   ;;
+  --enable-sdl) sdl="yes"
+  ;;
   --fmod-lib=*) fmod_lib="$optarg"
   ;;
   --fmod-inc=*) fmod_inc="$optarg"
@@ -455,6 +457,8 @@ for opt do
   ;;
   --disable-bluez) bluez="no"
   ;;
+  --enable-bluez) bluez="yes"
+  ;;
   --disable-kvm) kvm="no"
   ;;
   --enable-profiler) profiler="yes"
@@ -506,6 +510,10 @@ for opt do
   ;;
   --enable-curl) curl="yes"
   ;;
+  --disable-fdt) fdt="no"
+  ;;
+  --enable-fdt) fdt="yes"
+  ;;
   --disable-nptl) nptl="no"
   ;;
   --enable-nptl) nptl="yes"
@@ -520,7 +528,9 @@ for opt do
   ;;
   --with-pkgversion=*) pkgversion=" ($optarg)"
   ;;
-  --disable-docs) build_docs="no"
+  --disable-docs) docs="no"
+  ;;
+  --enable-docs) docs="yes"
   ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
@@ -614,6 +624,7 @@ echo "  --disable-sparse         disable sparse checker (default)"
 echo "  --disable-strip          disable stripping binaries"
 echo "  --disable-werror         disable compilation abort on warning"
 echo "  --disable-sdl            disable SDL"
+echo "  --enable-sdl             enable SDL"
 echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
 echo "  --audio-drv-list=LIST    set audio drivers list:"
 echo "                           Available drivers: $audio_possible_drivers"
@@ -631,7 +642,10 @@ echo "  --disable-curses         disable curses output"
 echo "  --enable-curses          enable curses output"
 echo "  --disable-curl           disable curl connectivity"
 echo "  --enable-curl            enable curl connectivity"
+echo "  --disable-fdt            disable fdt device tree"
+echo "  --enable-fdt             enable fdt device tree"
 echo "  --disable-bluez          disable bluez stack connectivity"
+echo "  --enable-bluez           enable bluez stack connectivity"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-nptl            disable usermode NPTL support"
@@ -874,8 +888,7 @@ fi
 
 sdl_too_old=no
 
-if test "$sdl" = "yes" ; then
-  sdl=no
+if test "$sdl" != "no" ; then
   cat > $TMPC << EOF
 #include <SDL.h>
 #undef main /* We don't want SDL to override our main() */
@@ -906,6 +919,11 @@ EOF
         sdl=no
       fi
     fi # static link
+  else # sdl not found
+    if test "$sdl" = "yes" ; then
+      feature_not_found "sdl"
+    fi
+    sdl=no
   fi # sdl compile test
 fi
 
@@ -1171,10 +1189,7 @@ fi # test "$curl"
 
 ##########################################
 # bluez support probe
-if test "$bluez" = "yes" ; then
-  `pkg-config bluez 2> /dev/null` || bluez="no"
-fi
-if test "$bluez" = "yes" ; then
+if test "$bluez" != "no" ; then
   cat > $TMPC << EOF
 #include <bluetooth/bluetooth.h>
 int main(void) { return bt_error(0); }
@@ -1182,8 +1197,12 @@ EOF
   bluez_cflags=`pkg-config --cflags bluez 2> /dev/null`
   bluez_libs=`pkg-config --libs bluez 2> /dev/null`
   if compile_prog "$bluez_cflags" "$bluez_libs" ; then
+    bluez=yes
     libs_softmmu="$bluez_libs $libs_softmmu"
   else
+    if test "$bluez" = "yes" ; then
+      feature_not_found "bluez"
+    fi
     bluez="no"
   fi
 fi
@@ -1291,8 +1310,7 @@ fi
 
 ##########################################
 # fdt probe
-if test "$fdt" = "yes" ; then
-  fdt=no
+if test "$fdt" != "no" ; then
   fdt_libs="-lfdt"
   cat > $TMPC << EOF
 int main(void) { return 0; }
@@ -1300,6 +1318,11 @@ EOF
   if compile_prog "" "$fdt_libs" ; then
     fdt=yes
     libs_softmmu="$fdt_libs $libs_softmmu"
+  else
+    if test "$fdt" = "yes" ; then
+      feature_not_found "fdt"
+    fi
+    fdt=no
   fi
 fi
 
@@ -1404,8 +1427,16 @@ if compile_prog "" "" ; then
 fi
 
 # Check if tools are available to build documentation.
-if test "$build_docs" = "yes" -a \( ! -x "`which texi2html 2>/dev/null`" -o ! -x "`which pod2man 2>/dev/null`" \) ; then
-  build_docs="no"
+if test "$docs" != "no" ; then
+  if test -x "`which texi2html 2>/dev/null`" -a \
+          -x "`which pod2man 2>/dev/null`" ; then
+    docs=yes
+  else
+    if test "$docs" = "yes" ; then
+      feature_not_found "docs"
+    fi
+    docs=no
+  fi
 fi
 
 # Search for bsawp_32 function
@@ -1578,7 +1609,8 @@ if test -n "$sparc_cpu"; then
 fi
 echo "xen support       $xen"
 echo "brlapi support    $brlapi"
-echo "Documentation     $build_docs"
+echo "bluez  support    $bluez"
+echo "Documentation     $docs"
 [ ! -z "$uname_release" ] && \
 echo "uname -r          $uname_release"
 echo "NPTL support      $nptl"
@@ -1707,7 +1739,7 @@ if [ "$source_path_used" = "yes" ]; then
   echo "VPATH=$source_path" >> $config_host_mak
 fi
 echo "TARGET_DIRS=$target_list" >> $config_host_mak
-if [ "$build_docs" = "yes" ] ; then
+if [ "$docs" = "yes" ] ; then
   echo "BUILD_DOCS=yes" >> $config_host_mak
 fi
 if test "$sdl" = "yes" ; then