build: Detect misconfiguration of polkit

Closes #14142
This commit is contained in:
Michael Häner 2020-05-25 06:59:47 +02:00 committed by GitHub
parent 5182e6c0d6
commit 3f95c2bc04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ AC_ARG_ENABLE(polkit, AC_HELP_STRING([--disable-polkit], [Disable usage of polki
AC_MSG_CHECKING([whether to build with polkit])
if test "$enable_polkit" = "yes"; then
AC_MSG_RESULT($enable_polkit)
if test "$autodetect_polkit" = "no"; then
AC_MSG_ERROR([Couldn't find polkit. Try installing polkit])
fi
COCKPIT_BRIDGE_CFLAGS="$COCKPIT_CFLAGS $POLKIT_CFLAGS"
COCKPIT_BRIDGE_LIBS="$COCKPIT_LIBS $POLKIT_LIBS"
AC_DEFINE_UNQUOTED([WITH_POLKIT], [], [Build with polkit])