aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2019-12-02 12:24:01 -0500
committerJason Woodward2019-12-02 12:27:26 -0500
commit06c461216a0f15f323a0f4851179e03d4a3d08b7 (patch)
tree9c57cd813636623dc9993d1717d38d616dcfc5b3
parent33d5b0b3d0fdd2a08d39ad4a58ca936c493b3379 (diff)
downloadgslapt-06c461216a0f15f323a0f4851179e03d4a3d08b7.tar.gz
define polkit system actiondir from pkg-config
-rw-r--r--configure.ac12
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 5437638..bdb44a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,12 +72,7 @@ fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
-AS_AC_EXPAND(DATADIR, $datadir)
-POLKIT_SYSTEM_ACTIONS_DIR="$DATADIR/polkit-1/actions"
-AC_SUBST(POLKIT_SYSTEM_ACTIONS_DIR)
-AC_DEFINE_UNQUOTED(POLKIT_SYSTEM_ACTIONS_DIR, "$POLKIT_SYSTEM_ACTIONS_DIR", [Where system actions dir for POLKIT is])
AM_CONDITIONAL(POLKIT, false)
-
AC_ARG_WITH(
[polkit],
AC_HELP_STRING([--with-polkit], [use Polkit pkexec to start gslapt (default is auto)]),
@@ -86,6 +81,13 @@ AC_ARG_WITH(
)
if test x"$ac_cv_prog_PKEXEC" = x"yes"; then
AM_CONDITIONAL(POLKIT, true)
+ AS_AC_EXPAND(DATADIR, $datadir)
+ PKG_CHECK_VAR(POLKIT_SYSTEM_ACTIONS_DIR, polkit-gobject-1, actiondir)
+ if test x"$POLKIT_SYSTEM_ACTIONS_DIR" = x; then
+ POLKIT_SYSTEM_ACTIONS_DIR="$DATADIR/polkit-1/actions"
+ fi
+ AC_SUBST(POLKIT_SYSTEM_ACTIONS_DIR)
+ AC_DEFINE_UNQUOTED(POLKIT_SYSTEM_ACTIONS_DIR, "$POLKIT_SYSTEM_ACTIONS_DIR", [Where system actions dir for POLKIT is])
fi
GETTEXT_PACKAGE=gslapt