Fix x11 header check

Erik Joelsson erik.joelsson at oracle.com
Tue Mar 19 09:19:56 UTC 2013


On 2013-03-18 21:39, Omair Majid wrote:
> On 03/15/2013 03:55 PM, Omair Majid wrote:
>> In file included from
>> /builddir/build/BUILD/java-1.8.0-openjdk/jdk8/build/jdk8.build/jdk/gensrc_x11wrappers/sizer.64.c:11:0:
>> /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
> error:
>
> 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:
> http://cr.openjdk.java.net/~omajid/webrevs/x11-header-check/00/
>
Nice find and simple fix. The "break" is even mentioned in the 
documentation as a recommended way of solving this. I created:

8010277: Configure doesn't fail when Xrender.h is missing

/Erik
> Thanks,
> Omair
>
> [1]
> http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Generic-Headers.html



More information about the build-dev mailing list