* configure.ac: Include X11/Xlib.h for XOpenDisplay. (Bug#68842)
authorUlrich Müller <ulm@gentoo.org>
Wed, 31 Jan 2024 07:49:36 +0000 (08:49 +0100)
committerUlrich Müller <ulm@gentoo.org>
Thu, 1 Feb 2024 12:29:55 +0000 (13:29 +0100)
Do not merge to master.

configure.ac

index 78d5475f75acc503aaca2c0c1e465ff8bfcc8ed5..34a5a89bea9956890a3d9a693190ea3a884bde68 100644 (file)
@@ -2697,7 +2697,7 @@ if test "${HAVE_X11}" = "yes"; then
 
   if test "${opsys}" = "gnu-linux"; then
     AC_CACHE_CHECK([whether X on GNU/Linux needs -b to link], [emacs_cv_b_link],
-    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
+    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]],
      [[XOpenDisplay ("foo");]])],
      [xgnu_linux_first_failure=no],
      [xgnu_linux_first_failure=yes])
@@ -2706,7 +2706,7 @@ if test "${HAVE_X11}" = "yes"; then
       OLD_LIBS="$LIBS"
       CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
       LIBS="$LIBS -b i486-linuxaout"
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]],
        [[XOpenDisplay ("foo");]])],
        [xgnu_linux_second_failure=no],
        [xgnu_linux_second_failure=yes])