hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Mon Aug 25 04:00:39 PDT 2008


 configure.in |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit aa673602a42b3fab01b14dfd2934e9f15e4c6428
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Mon Aug 25 12:58:43 2008 +0200

    added check for ConsoleKit >= v0.3.1 to configure
    
    Added check for ConsoleKit >= v0.3.1 to configure to be able
    to differ between the versions due to API breakage.

diff --git a/configure.in b/configure.in
index d25a64b..5cc6e5d 100644
--- a/configure.in
+++ b/configure.in
@@ -486,6 +486,20 @@ if test "x$enable_console_kit" != "xno"; then
    AM_CONDITIONAL(HAVE_CONKIT, true)
    AC_DEFINE(HAVE_CONKIT, [], [Set if we use ConsoleKit])
    msg_conkit=yes
+   # yes this is ugly, but there is no other way to get the version of CK 
+   AC_MSG_CHECKING([if ConsoleKit version 0.3.0 or newer])
+   if $PKG_CONFIG --atleast-version=0.3.0 ck-connector; then
+     AC_MSG_RESULT([yes])
+     AC_DEFINE(HAVE_CK_0_3, 1, [Define to 1 if ConsoleKit is v0.3.0 or newer])
+   else 
+     if $PKG_CONFIG --max-version=0.2.10 ck-connector; then
+       AC_MSG_RESULT([no])
+     else
+       #assume we have the latest version
+       AC_MSG_WARN([Couldn't detect ConsoleKit version, install the devel package, assume for now you use >= 0.3.0])
+       AC_DEFINE(HAVE_CK_0_3, 1, [Define to 1 if ConsoleKit is v0.3.0 or newer])
+     fi
+   fi
 fi
 
 AC_PATH_PROG(GPERF, [gperf], [no])


More information about the hal-commit mailing list