On Tue, Jul 12, 2011 at 8:32 AM, Roman Rakus <rrakus(a)redhat.com> wrote:
Since polkit 0.97 is polkit_authority_get_type_sync available. For
older
versions we need to use polkit_authority_get_type function.
Signed-off-by: Roman Rakus <rrakus(a)redhat.com>
---
src/CMakeLists.txt | 6 ++++++
src/include/config.h.in | 1 +
src/lib/mh_dbus_common.c | 9 ++++++++-
3 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e0a9914..4043d89 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -90,6 +90,9 @@ if(WITH-DBUS STREQUAL "ON")
pkg_check_modules(dbus-glib REQUIRED dbus-glib-1)
pkg_check_modules(polkit REQUIRED polkit-gobject-1)
+ SET(CMAKE_REQUIRED_LIBRARIES ${polkit_LIBRARIES})
+ check_function_exists (polkit_authority_get_sync HAVE_PK_GET_SYNC)
+
if(NOT dbus-glib_FOUND)
message(FATAL_ERROR "dbus-glib headers/libraries not found.")
endif(NOT dbus-glib_FOUND)
@@ -104,6 +107,9 @@ else(WITH-DBUS STREQUAL "ON")
pkg_check_modules(dbus-glib dbus-glib-1)
pkg_check_modules(polkit polkit-gobject-1)
+ SET(CMAKE_REQUIRED_LIBRARIES ${polkit_LIBRARIES})
+ check_function_exists (polkit_authority_get_sync HAVE_PK_GET_SYNC)
+
Why is this needed twice?
--
Russell Bryant