]> git.webhop.me Git - lcd4linux.git/commitdiff
Fix the dbus/pkg-config confgure (Now the configure script will probably require...
authoredman007 <edman007@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Sat, 21 Nov 2009 18:19:09 +0000 (18:19 +0000)
committeredman007 <edman007@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Sat, 21 Nov 2009 18:19:09 +0000 (18:19 +0000)
Defines to compile the dbus plugin are now properly set

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1069 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

configure.in
plugins.m4

index ef69b3511ca6dd666fd5104e59f3112d000f4ccc..b1c4b8c5157f90013bfa4e6b3823ad5213bfdbff 100644 (file)
@@ -39,6 +39,7 @@ AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
+PKG_PROG_PKG_CONFIG
 
 # dmalloc
 AM_WITH_DMALLOC
index 2e211a32c28896b69d493f379856d8441a41652e..009e28b6ec7d02764958ab6b54e6afc6b8c4097d 100644 (file)
@@ -249,12 +249,21 @@ fi
 
 #DBus
 if test "$PLUGIN_DBUS" = "yes"; then
-   PKG_CHECK_MODULES(DBUS, dbus-1, dbus-1 >= 1.0, HAVE_DBUS="yes", HAVE_DBUS="no")
-   if test "x$HAVE_DBUS" != "xyes"; then
+   PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0, HAVE_DBUS="yes", HAVE_DBUS="no")
+   if test "x$HAVE_DBUS" == "xyes"; then
       PLUGINS="$PLUGINS plugin_dbus.o"
       PLUGINLIBS="$PLUGINLIBS $DBUS_LIBS"
       CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
       AC_DEFINE(PLUGIN_DBUS,1,[dbus plugin])
+
+      DBUS_VERSION=$($PKG_CONFIG --modversion dbus-1)
+      DBUS_VERSION_MAJOR=$(echo $DBUS_VERSION | cut -d . -f 1)
+      DBUS_VERSION_MINOR=$(echo $DBUS_VERSION | cut -d . -f 2)
+      DBUS_VERSION_MICRO=$(echo $DBUS_VERSION | cut -d . -f 3)
+
+      AC_DEFINE_UNQUOTED(DBUS_VERSION_MAJOR, $DBUS_VERSION_MAJOR, [DBus Major Version])
+      AC_DEFINE_UNQUOTED(DBUS_VERSION_MINOR, $DBUS_VERSION_MINOR, [DBus Minor Version])
+      AC_DEFINE_UNQUOTED(DBUS_VERSION_MICRO, $DBUS_VERSION_MICRO, [DBus Micro Version])
    else
       AC_MSG_WARN(dbus-1 not found check that PKG_CONFIG_PATH is set correctly: dbus plugin disabled)
    fi