aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index cc2f2f62..6f6621d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,22 @@ AC_SUBST(UDEV_BASE_DIR)
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
+# PolicyKit
+AC_ARG_WITH(polkit, AS_HELP_STRING([--with-polkit], [Build with PolicyKit support]))
+AM_CONDITIONAL(WITH_POLKIT, test "x$with_polkit" = "xyes")
+case $with_polkit in
+ yes)
+ with_polkit=yes
+ PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.95)
+ AC_DEFINE(WITH_POLKIT, 1, [Define if you want to use PolicyKit])
+ AC_SUBST(POLKIT_CFLAGS)
+ AC_SUBST(POLKIT_LIBS)
+ ;;
+ *)
+ with_polkit=no
+ ;;
+esac
+
# PPPD
AC_CHECK_HEADERS(pppd/pppd.h, have_pppd_headers="yes", have_pppd_headers="no")
AM_CONDITIONAL(HAVE_PPPD_H, test "x$have_pppd_headers" = "xyes")
@@ -119,4 +135,6 @@ echo Building documentation: ${with_docs}
echo
echo Building PPP-enabled tests: ${have_pppd_headers}
echo
+echo Building with PolicyKit support: ${with_polkit}
+echo