about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2023-01-11 16:08:42 +0100
committerMichael Vetter <jubalh@iodoru.org>2023-01-11 16:08:42 +0100
commite19a15fd27cd2e6bf2ccdb18628e6407f43a4fa6 (patch)
treeb92243dd16a01d6882ff1772deaf23cda3fc2826
parent3adc399da0416b5eff5bd126ab60afe831de39b3 (diff)
downloadprofani-tty-e19a15fd27cd2e6bf2ccdb18628e6407f43a4fa6.tar.gz
Fix xscreensaver detection
In 28a9605a1 we migrated from AC_CHECK_LIB which defines HAVE_LIBXSS automatically. With pkg-config way you need it explicit. And also x11 is needed or else linking will fail missing XFree().

Patch provided by Paul Fertser and comitted by jubalh.
Thanks Paul!

Fix https://github.com/profanity-im/profanity/issues/1695
-rw-r--r--configure.ac5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 28b8ae67..0d200286 100644
--- a/configure.ac
+++ b/configure.ac
@@ -273,9 +273,10 @@ AS_IF([test "x$PLATFORM" = xosx],
 
 dnl feature: xscreensaver
 AS_IF([test "x$with_xscreensaver" != xno],
-    [PKG_CHECK_MODULES([xscrnsaver], [xscrnsaver],
+    [PKG_CHECK_MODULES([xscrnsaver], [xscrnsaver x11],
         [AC_MSG_NOTICE([xscreensaver support is enabled]);
-         LIBS="$xscrnsaver_LIBS $LIBS" CFLAGS="$CFLAGS $xscrnsaver_CFLAGS"],
+         LIBS="$xscrnsaver_LIBS $LIBS" CFLAGS="$CFLAGS $xscrnsaver_CFLAGS"
+         AC_DEFINE([HAVE_LIBXSS], [1], [xscreensaver support])],
         [AS_IF([test "x$with_xscreensaver" = xyes],
             [AC_MSG_ERROR([xscreensaver is required but does not exist])],
             [AC_MSG_NOTICE([xscreensaver support is disabled])])])])