Fix x11 header check (was: Re: New official README-builds.html)

Omair Majid omajid at
Mon Mar 18 20:39:18 UTC 2013

On 03/15/2013 03:55 PM, Omair Majid wrote:
> In file included from
> /builddir/build/BUILD/java-1.8.0-openjdk/jdk8/build/
> /builddir/build/BUILD/java-1.8.0-openjdk/jdk8/jdk/src/solaris/native/sun/awt/awt_p.h:51:36:
> fatal error: X11/extensions/Xrender.h: No such file or directory
>  #include <X11/extensions/Xrender.h>

So this one turns out to be a bug in how we use AC_CHECK_HEADERS. If I
remove the package that provides this header file on my machine,
configure tells me that the header is missing but does not indicate an

checking for IceConnectionNumber in -lICE... yes
checking for X11/extensions/shape.h... yes
checking for X11/extensions/Xrender.h... no
checking for X11/extensions/XTest.h... yes
checking cups/cups.h usability... yes
checking cups/cups.h presence... yes

The documentation for AC_CHECK_HEADERS [1] states:

If action-if-found is given, it is additional shell code to execute when
one of the header files is found

So what happens is that as long as the last header in the list
[X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h]
is found, X11_A_OK is set to "yes", and the build continues.

A one-line fix is:


PGP Key: 66484681 (
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681

More information about the build-dev mailing list