Code

Making an enable/disable flag for building with dbus
authorTed Gould <ted@gould.cx>
Sat, 15 May 2010 18:20:53 +0000 (13:20 -0500)
committerTed Gould <ted@gould.cx>
Sat, 15 May 2010 18:20:53 +0000 (13:20 -0500)
configure.ac

index a5891b4a27089014405a6ff131c4d36f59dd29d2..3e0408b1550a96dc81b1d65336a6fc0b3aa0fe40 100644 (file)
@@ -699,20 +699,27 @@ dnl ******************************
 dnl Check for dbus functionality
 dnl ******************************
 
-PKG_CHECK_MODULES(DBUS, dbus-glib-1, with_dbus=yes, with_dbus=no)
-if test "x$with_dbus" = "xyes"; then
-       AC_DEFINE(WITH_DBUS,1,[Build in dbus])
-       if test "x$with_localinstall" = "xyes"; then
-               DBUSSERVICEDIR="${datadir}/dbus-1/services/"
-       else
-               DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
+AC_ARG_ENABLE(dbusapi,
+       [  --enable-dbusapi       compile with support for DBus interface],
+       enable_dbusapi=$enableval,enable_dbusapi=yes)
+AC_DEFINE(WITH_DBUS,1,[Build in dbus])
+
+if test "x$dbusapi" = "xyes"; then
+       PKG_CHECK_MODULES(DBUS, dbus-glib-1, with_dbus=yes, with_dbus=no)
+       if test "x$with_dbus" = "xyes"; then
+               if test "x$with_localinstall" = "xyes"; then
+                       DBUSSERVICEDIR="${datadir}/dbus-1/services/"
+               else
+                       DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
+               fi
+               AC_SUBST(DBUSSERVICEDIR)
        fi
-       AC_SUBST(DBUSSERVICEDIR)
+
+       AC_SUBST(DBUS_LIBS)
+       AC_SUBST(DBUS_CFLAGS)
 fi
-AM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
 
-AC_SUBST(DBUS_LIBS)
-AC_SUBST(DBUS_CFLAGS)
+AM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
 
 dnl ******************************
 dnl Check for ImageMagick Magick++