1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

build: use PKG_CHECK_MODULES to check for xscreensaver

This commit is contained in:
Michael Vetter 2022-02-18 17:35:30 +01:00
parent 38ff3699b4
commit 28a9605a1f

View File

@ -268,19 +268,12 @@ AS_IF([test "x$PLATFORM" = xosx],
[AC_MSG_NOTICE([libnotify support will be disabled])])])])]) [AC_MSG_NOTICE([libnotify support will be disabled])])])])])
dnl feature: xscreensaver dnl feature: xscreensaver
AS_IF([test "x$enable_xscreensaver" != xno],
# TODO: rewrite this [PKG_CHECK_MODULES([xscrnsaver], [xscrnsaver],
if test "x$with_xscreensaver" = xyes; then [AC_MSG_NOTICE([xscreensaver support is enabled])],
AC_CHECK_LIB([Xss], [main], [], [AS_IF([test "x$enable_xscreensaver" = xyes],
[AC_MSG_ERROR([libXss is required for x autoaway support])]) [AC_MSG_ERROR([xscreensaver is required but does not exist])],
AC_CHECK_LIB([X11], [main], [], [AC_MSG_NOTICE([xscreensaver support is disabled])])])])
[AC_MSG_ERROR([libX11 is required for x autoaway support])])
elif test "x$with_xscreensaver" = x; then
AC_CHECK_LIB([Xss], [main], [],
[AC_MSG_NOTICE([libXss not found, falling back to profanity auto-away])])
AC_CHECK_LIB([X11], [main], [],
[AC_MSG_NOTICE([libX11 not found, falling back to profanity auto-away])])
fi
dnl feature: pgp dnl feature: pgp
AM_CONDITIONAL([BUILD_PGP], [false]) AM_CONDITIONAL([BUILD_PGP], [false])