mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 06:28:05 +02:00
configure: check whether polkit-agent-1 is available
This commit is contained in:
parent
ca5d6be99c
commit
c7aaee107e
1 changed files with 17 additions and 0 deletions
17
configure.ac
17
configure.ac
|
|
@ -498,6 +498,22 @@ else
|
|||
fi
|
||||
AC_SUBST(NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT)
|
||||
|
||||
PKG_CHECK_MODULES(POLKIT, [polkit-agent-1 >= 0.97], [have_pk_agent=yes],[have_pk_agent=no])
|
||||
AC_ARG_ENABLE(polkit-agent, AS_HELP_STRING([--enable-polkit-agent], [enable polkit agent for clients]),
|
||||
[enable_polkit_agent=${enableval}], [enable_polkit_agent=${have_pk_agent}])
|
||||
if (test "${enable_polkit_agent}" = "yes"); then
|
||||
if test x"$have_pk_agent" = x"no"; then
|
||||
AC_MSG_ERROR(Polkit agent is required)
|
||||
fi
|
||||
|
||||
AC_SUBST(POLKIT_CFLAGS)
|
||||
AC_SUBST(POLKIT_LIBS)
|
||||
AC_DEFINE(WITH_POLKIT_AGENT, 1, [Define if you have polkit agent])
|
||||
else
|
||||
AC_DEFINE(WITH_POLKIT_AGENT, 0, [Define if you have polkit agent])
|
||||
fi
|
||||
AM_CONDITIONAL(WITH_POLKIT_AGENT, test "${enable_polkit_agent}" = "yes")
|
||||
|
||||
AC_ARG_ENABLE(modify-system,
|
||||
AS_HELP_STRING([--enable-modify-system], [Allow users to modify system connections]))
|
||||
if test "${enable_modify_system}" = "yes"; then
|
||||
|
|
@ -1013,6 +1029,7 @@ if test "${enable_polkit}" = "yes"; then
|
|||
else
|
||||
echo " policykit: no"
|
||||
fi
|
||||
echo " polkit agent: ${enable_polkit_agent}"
|
||||
echo " selinux: $have_selinux"
|
||||
echo
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue