diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index b18ccc063..74765de35 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.63]) dnl The NM version number m4_define([nm_major_version], [0]) m4_define([nm_minor_version], [8]) -m4_define([nm_micro_version], [999]) +m4_define([nm_micro_version], [9997]) m4_define([nm_version], [nm_major_version.nm_minor_version.nm_micro_version]) @@ -337,12 +337,20 @@ else fi AM_CONDITIONAL(WITH_WIMAX, test "${enable_wimax}" = "yes") -PKG_CHECK_MODULES(POLKIT, polkit-gobject-1) -AC_SUBST(POLKIT_CFLAGS) - -# Check for polkit_authority_get_sync() -AC_CHECK_LIB([polkit-gobject-1], [polkit_authority_get_sync], ac_have_pk_auth_get_sync="1", ac_have_pk_auth_get_sync="0") -AC_DEFINE_UNQUOTED(HAVE_POLKIT_AUTHORITY_GET_SYNC, $ac_have_pk_auth_get_sync, [Define if you have a polkit with polkit_authority_get_sync()]) +PKG_CHECK_MODULES(POLKIT, [polkit-gobject-1 >= 0.97], [have_polkit=yes],[have_polkit=no]) +AC_ARG_ENABLE(polkit, AS_HELP_STRING([--enable-polkit], [enable PolicyKit support]), + [enable_polkit=${enableval}], [enable_polkit=${have_polkit}]) +if (test "${enable_polkit}" = "yes"); then + if test x"$have_polkit" = x"no"; then + AC_MSG_ERROR(PolicyKit development headers are required) + fi + AC_SUBST(POLKIT_CFLAGS) + AC_SUBST(POLKIT_LIBS) + AC_DEFINE(WITH_POLKIT, 1, [Define if you have PolicyKit support]) +else + AC_DEFINE(WITH_POLKIT, 0, [Define if you have PolicyKit support]) +fi +AM_CONDITIONAL(WITH_POLKIT, test "${enable_polkit}" = "yes") AC_ARG_WITH(crypto, AS_HELP_STRING([--with-crypto=nss | gnutls], [Cryptography library to use for certificate and key operations]),ac_crypto=$withval, ac_crypto=nss) @@ -705,6 +713,12 @@ else echo systemd support: no fi +if test "${enable_polkit}" = "yes"; then + echo PolicyKit support: yes +else + echo PolicyKit support: no +fi + if test -n "${with_ck}"; then echo ConsoleKit support: ${with_ck} else |