From 973fbdac9163ba98bd5358b9f24bf6f5d5844e34 Mon Sep 17 00:00:00 2001 From: edman007 Date: Sat, 21 Nov 2009 18:19:09 +0000 Subject: Fix the dbus/pkg-config confgure (Now the configure script will probably require pkg-config to be installed) 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 | 1 + plugins.m4 | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index ef69b35..b1c4b8c 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/plugins.m4 b/plugins.m4 index 2e211a3..009e28b 100644 --- a/plugins.m4 +++ b/plugins.m4 @@ -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 -- cgit v1.2.3