[PATCH 1/4] build: only define WITH_POLKIT if enabled

Aleksander Morgado aleksander at aleksander.es
Fri Jun 23 08:04:00 UTC 2017


On Thu, Jun 22, 2017 at 10:59 AM, Aleksander Morgado
<aleksander at aleksander.es> wrote:
> ---
>  configure.ac  | 4 +---
>  src/mm-auth.c | 6 +++---
>  2 files changed, 4 insertions(+), 6 deletions(-)
>

This has been merged to git master.

> diff --git a/configure.ac b/configure.ac
> index 611677d2..c07a6be1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -296,9 +296,7 @@ elif test "x$with_polkit" = "xyes"; then
>      with_polkit=strict
>  fi
>
> -if test "x$with_polkit" = "xno"; then
> -    AC_DEFINE(WITH_POLKIT, 0, [Define if you have PolicyKit support])
> -else
> +if test "x$with_polkit" != "xno"; then
>         if test "x$have_polkit" = "xno"; then
>                 AC_MSG_ERROR(PolicyKit development headers are required)
>         fi
> diff --git a/src/mm-auth.c b/src/mm-auth.c
> index 939c0af5..9b1beea9 100644
> --- a/src/mm-auth.c
> +++ b/src/mm-auth.c
> @@ -21,8 +21,8 @@
>  #include "mm-auth.h"
>  #include "mm-auth-provider.h"
>
> -#ifdef WITH_POLKIT
> -#include "mm-auth-provider-polkit.h"
> +#if defined WITH_POLKIT
> +# include "mm-auth-provider-polkit.h"
>  #endif
>
>  static MMAuthProvider *authp = NULL;
> @@ -31,7 +31,7 @@ MMAuthProvider *
>  mm_auth_get_provider (void)
>  {
>      if (!authp) {
> -#if WITH_POLKIT
> +#if defined WITH_POLKIT
>          authp = mm_auth_provider_polkit_new ();
>  #else
>          authp = mm_auth_provider_new ();
> --
> 2.13.1
>



-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list