From 8e888241130e35ee140ba6c184d0ceff1598c430 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 8 Jan 2009 21:02:04 +0100 Subject: [PATCH] Add support for reading policy directory from polkit.pc --- configure.ac | 5 +++++ plugins/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1d8fc5e..223e1e0 100644 --- a/configure.ac +++ b/configure.ac @@ -198,6 +198,11 @@ if (test "${enable_polkit}" = "yes"); then AC_MSG_ERROR(PolicyKit >= 0.7 is required)) AC_SUBST(POLKIT_CFLAGS) AC_SUBST(POLKIT_LIBS) + POLKIT_DATADIR="`pkg-config --variable=policydir polkit`" + if (test -z "${POLKIT_DATADIR}"); then + POLKIT_DATADIR="${datadir}/PolicyKit/policy" + fi + AC_SUBST(POLKIT_DATADIR) fi AM_CONDITIONAL(POLKIT, test "${enable_polkit}" = "yes") diff --git a/plugins/Makefile.am b/plugins/Makefile.am index b4c187b..befc2d9 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -96,7 +96,7 @@ polkit_la_SOURCES = polkit.c polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@ polkit_la_CFLAGS = @GLIB_CFLAGS@ @POLKIT_CFLAGS@ -policydir = $(datadir)/PolicyKit/policy +policydir = @POLKIT_DATADIR@ policy_DATA = connman.policy endif -- 1.7.9.5