summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap-configure2
-rw-r--r--configure.ac12
-rw-r--r--plugins/Makefile.am9
3 files changed, 16 insertions, 7 deletions
diff --git a/bootstrap-configure b/bootstrap-configure
index c0d3fcad..6b8d523b 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -34,6 +34,6 @@ fi
--enable-udev \
--enable-iwmx \
--enable-iospm \
- --enable-polkit \
+ --enable-polkit=builtin \
--enable-client \
--enable-tools $*
diff --git a/configure.ac b/configure.ac
index cdf0b091..2a7ca877 100644
--- a/configure.ac
+++ b/configure.ac
@@ -265,10 +265,11 @@ AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)'])
AC_SUBST([GATCHAT_CFLAGS], ['-I$(top_srcdir)/gatchat'])
AC_SUBST([GATCHAT_LIBS], ['$(top_builddir)/gatchat/libgatchat.la'])
-AC_ARG_ENABLE(polkit, AC_HELP_STRING([--enable-polkit],
- [enable PolicyKit support]), [enable_polkit=${enableval}])
-if (test "${enable_polkit}" = "yes"); then
- PKG_CHECK_MODULES(POLKIT, polkit-dbus >= 0.7, enable_polkit=yes,
+AC_ARG_ENABLE(polkit,
+ AC_HELP_STRING([--enable-polkit], [enable PolicyKit support]),
+ [enable_polkit=${enableval}], [enable_polkit="no"])
+if (test "${enable_polkit}" != "no"); then
+ PKG_CHECK_MODULES(POLKIT, polkit-dbus >= 0.7, dummy=yes,
AC_MSG_ERROR(PolicyKit >= 0.7 is required))
AC_SUBST(POLKIT_CFLAGS)
AC_SUBST(POLKIT_LIBS)
@@ -278,7 +279,8 @@ if (test "${enable_polkit}" = "yes"); then
fi
AC_SUBST(POLKIT_DATADIR)
fi
-AM_CONDITIONAL(POLKIT, test "${enable_polkit}" = "yes")
+AM_CONDITIONAL(POLKIT, test "${enable_polkit}" != "no")
+AM_CONDITIONAL(POLKIT_BUILTIN, test "${enable_polkit}" = "builtin")
AC_ARG_ENABLE(client, AC_HELP_STRING([--enable-client],
[enable command line client]), [enable_client=${enableval}])
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 5866ac24..d0e562de 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -5,8 +5,8 @@ plugin_LTLIBRARIES =
builtin_modules =
builtin_sources =
-builtin_cflags =
builtin_libadd =
+builtin_cflags =
if LOOPBACK
if LOOPBACK_BUILTIN
@@ -138,9 +138,16 @@ endif
endif
if POLKIT
+if POLKIT_BUILTIN
+builtin_modules += polkit
+builtin_sources += polkit.c
+builtin_libadd += @POLKIT_LIBS@
+builtin_cflags += @POLKIT_CFLAGS@
+else
plugin_LTLIBRARIES += polkit.la
polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@
polkit_la_CFLAGS = $(AM_CFLAGS) @POLKIT_CFLAGS@
+endif
if DATAFILES
policydir = @POLKIT_DATADIR@