blob: 43b1eb505a76bbe94b19e3ea7af0b3ea5b8320ea [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From 8f58e1b5c15fc3b6f775207971d078c058d9eb7b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 1 Sep 2022 08:21:56 -0700
4Subject: [PATCH] m4macros: Check for a function provided by libX11 in
5 AC_CHECK_LIB
6
7checking for main is not ideal, since its not a function from libX11
8moreover with newer versions of autoconf this will start to fail [1], so
9change this to use XFree API which is provided by libX11 and seems more
10relevant to check here.
11
12[1] https://lists.gnu.org/archive/html/autoconf-patches/2022-08/msg00018.html
13
14Upstream-Status: Submitted [https://gitlab.xfce.org/xfce/xfce4-dev-tools/-/issues/57]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 m4macros/xdt-depends.m4 | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/m4macros/xdt-depends.m4 b/m4macros/xdt-depends.m4
21index 3c07c90..ce1b272 100644
22--- a/m4macros/xdt-depends.m4
23+++ b/m4macros/xdt-depends.m4
24@@ -213,7 +213,7 @@ AC_DEFUN([XDT_CHECK_LIBX11],
25
26 LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS=
27 if test x"$no_x" != x"yes"; then
28- AC_CHECK_LIB([X11], [main],
29+ AC_CHECK_LIB([X11], [XFree],
30 [
31 AC_DEFINE([HAVE_LIBX11], [1], [Define if libX11 is available])
32 LIBX11_CFLAGS="$X_CFLAGS"
33--
342.37.3
35