qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/5] configure: probe for dbus


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 4/5] configure: probe for dbus
Date: Wed, 8 Feb 2012 18:37:35 +0100

Signed-off-by: Paolo Bonzini <address@hidden>
---
 configure |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 763db24..0f305cb 100755
--- a/configure
+++ b/configure
@@ -119,6 +119,7 @@ curl=""
 curses=""
 docs=""
 fdt=""
+dbus=""
 nptl=""
 sdl=""
 vnc="yes"
@@ -510,6 +511,7 @@ if test "$mingw32" = "yes" ; then
   sysconfdir="\${prefix}"
   confsuffix=""
   guest_agent="no"
+  dbus="no"
 fi
 
 werror=""
@@ -623,6 +625,10 @@ for opt do
   ;;
   --disable-strip) strip_opt="no"
   ;;
+  --disable-dbus) dbus="no"
+  ;;
+  --enable-dbus) dbus="yes"
+  ;;
   --disable-vnc-tls) vnc_tls="no"
   ;;
   --enable-vnc-tls) vnc_tls="yes"
@@ -1007,6 +1013,8 @@ echo "  --disable-xen            disable xen backend 
driver support"
 echo "  --enable-xen             enable xen backend driver support"
 echo "  --disable-brlapi         disable BrlAPI"
 echo "  --enable-brlapi          enable BrlAPI"
+echo "  --disable-dbus           disable dbus interaction"
+echo "  --enable-dbus            enable dbus interaction"
 echo "  --disable-vnc-tls        disable TLS encryption for VNC server"
 echo "  --enable-vnc-tls         enable TLS encryption for VNC server"
 echo "  --disable-vnc-sasl       disable SASL encryption for VNC server"
@@ -1987,6 +1995,32 @@ else
 fi
 
 ##########################################
+# dbus detection
+if test "$dbus" != "no" ; then
+  cat > $TMPC <<EOF
+#include <glib.h>
+#include <glib-object.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+int main(void) { DBusGConnection *bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
+dbus_g_connection_unref(bus); return 0; }
+EOF
+  dbus_cflags=`$pkg_config --cflags gobject-2.0 dbus-glib-1 2> /dev/null`
+  dbus_libs=`$pkg_config --libs gobject-2.0 dbus-glib-1 2> /dev/null`
+  if compile_prog "$glib_cflags $dbus_cflags" "$glib_libs $dbus_libs" ; then
+    dbus=yes
+    QEMU_CFLAGS="$QEMU_CFLAGS $dbus_cflags"
+    libs_softmmu="$dbus_libs $libs_softmmu"
+    libs_tools="$dbus_libs $libs_tools"
+  else
+    if test "$dbus" = "yes" ; then
+      feature_not_found "dbus"
+    fi
+    dbus=no
+  fi
+fi
+
+##########################################
 # libcap probe
 
 if test "$cap" != "no" ; then
@@ -2874,6 +2908,7 @@ echo "Audio drivers     $audio_drv_list"
 echo "Extra audio cards $audio_card_list"
 echo "Block whitelist   $block_drv_whitelist"
 echo "Mixer emulation   $mixemu"
+echo "DBus support      $dbus"
 echo "VNC support       $vnc"
 if test "$vnc" = "yes" ; then
     echo "VNC TLS support   $vnc_tls"
@@ -3219,6 +3254,10 @@ if test "$opengl" = "yes" ; then
   echo "CONFIG_OPENGL=y" >> $config_host_mak
 fi
 
+if test "$dbus" = "yes" ; then
+  echo "CONFIG_DBUS=y" >> $config_host_mak
+fi
+
 if test "$libiscsi" = "yes" ; then
   echo "CONFIG_LIBISCSI=y" >> $config_host_mak
 fi
-- 
1.7.7.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]