From: Marcel Holtmann Date: Mon, 25 May 2009 14:46:36 +0000 (+0200) Subject: Add support for building PolicyKit support into the daemon X-Git-Tag: maemo-0.19~23 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=7c5f70200f076d2afdce9c34dc59ce8fd4e1baba;hp=7b21a23c9e0dcd3b4d9ecacef52374cc6f5c88d9;p=connman Add support for building PolicyKit support into the daemon --- diff --git a/bootstrap-configure b/bootstrap-configure index c0d3fca..6b8d523 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 cdf0b09..2a7ca87 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 5866ac2..d0e562d 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@