diff options
author | William Jon McCann <jmccann@redhat.com> | 2008-08-19 01:16:13 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2008-08-19 01:16:13 +0000 |
commit | cb63a3953f976ad6843f45701bcc0a09553f3796 (patch) | |
tree | f2bf607584a6f58a5e9d4da9ebd57f5bafca1183 /configure.ac | |
parent | 89dc882ec0245d46aeafce7a384f2109094f1e09 (diff) | |
download | gdm-cb63a3953f976ad6843f45701bcc0a09553f3796.tar.gz |
Make PolicyKit-gnome optional Patch from: Gilles Dartiguelongue
2008-08-18 William Jon McCann <jmccann@redhat.com>
* configure.ac: Make PolicyKit-gnome optional
Patch from: Gilles Dartiguelongue <gilles.dartiguelongue@esiee.org>
Fixes #547965
svn path=/trunk/; revision=6389
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 9bbe0ebf..6f85334b 100644 --- a/configure.ac +++ b/configure.ac @@ -118,8 +118,20 @@ PKG_CHECK_MODULES(POLKIT_GNOME, polkit-gnome >= $POLICYKIT_REQUIRED_VERSION, have_polkit=yes, have_polkit=no) -if test "x$have_polkit" = "xyes" ; then - AC_DEFINE(HAVE_POLKIT_GNOME, [], [Define if we have polkit]) + +AC_ARG_ENABLE([polkit], + AS_HELP_STRING([--enable-polkit], + [Enable PolicyKit support @<:@default=auto@:>@]), + enable_polkit=$enableval, enable_polkit=auto) + +if test "x$enable_polkit" != "xno"; then + if test "x$enable_polkit" = "xyes" -a "x$have_polkit" = "xno"; then + AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found]) + fi + + if test "x$have_polkit" = "xyes" ; then + AC_DEFINE(HAVE_POLKIT_GNOME, [], [Define if we have polkit]) + fi fi AM_CONDITIONAL(HAVE_POLKIT_GNOME, test x$have_polkit = xyes) AC_SUBST(HAVE_POLKIT_GNOME) |