Add support for building PolicyKit support into the daemon
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 25 May 2009 14:46:36 +0000 (16:46 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 25 May 2009 14:46:36 +0000 (16:46 +0200)
bootstrap-configure
configure.ac
plugins/Makefile.am

index c0d3fca..6b8d523 100755 (executable)
@@ -34,6 +34,6 @@ fi
                --enable-udev \
                --enable-iwmx \
                --enable-iospm \
-               --enable-polkit \
+               --enable-polkit=builtin \
                --enable-client \
                --enable-tools $*
index cdf0b09..2a7ca87 100644 (file)
@@ -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}])
index 5866ac2..d0e562d 100644 (file)
@@ -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@