]> git.eshelyaron.com Git - emacs.git/commitdiff
* configure.ac: Silence warning with some old Xrandr.h.
authorGlenn Morris <rgm@gnu.org>
Sat, 4 Oct 2014 07:22:51 +0000 (00:22 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 4 Oct 2014 07:22:51 +0000 (00:22 -0700)
Fixes: debbugs:18465
ChangeLog
configure.ac

index 218e61a2427541bdd0a2fea33b56f857d331fc6b..3b751b721ffd4951abbf7707e078a2e6cc1952c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-04  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac: Silence warning with some old Xrandr.h.  (Bug#18465)
+
 2014-10-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * configure.ac: Port to strict POSIX shells on non-MinGW (Bug#18612).
index b706b814787176d60e0edabffd80f03d999efd17..dcfbaca706efdbac324889c5efd888fb11d50ae9 100644 (file)
@@ -3377,8 +3377,12 @@ if test "${HAVE_X11}" = "yes"; then
   EMACS_CHECK_MODULES([XRANDR], [$XRANDR_MODULES])
   if test $HAVE_XRANDR = no; then
     # Test old way in case pkg-config doesn't have it (older machines).
+    # Include Xrender.h by hand to work around bug in older Xrandr.h
+    # (e.g. RHEL5) and silence (harmless) configure warning (bug#18465).
     AC_CHECK_HEADER(X11/extensions/Xrandr.h,
-      [AC_CHECK_LIB(Xrandr, XRRGetScreenResources, HAVE_XRANDR=yes)])
+      [AC_CHECK_LIB(Xrandr, XRRGetScreenResources, HAVE_XRANDR=yes)],
+      [], [AC_INCLUDES_DEFAULT
+#include <X11/extensions/Xrender.h>])
     if test $HAVE_XRANDR = yes; then
       XRANDR_LIBS=-lXrandr
     fi