Markus Armbruster <arm...@redhat.com> writes:

> Sascha Silbe <si...@linux.vnet.ibm.com> writes:
>
>> Dear Markus,
>>
>> Markus Armbruster <arm...@redhat.com> writes:
>>
>>> ---
>>>  tests/header-test-template.c | 16 ++++++++++++++++
>> [...]
>>
>> Thanks, that helped, I get a bit further now.
>>
>> Is "make header-check" supposed to work on a host that doesn't have all
>> optional dependencies installed? It fails for me because some OpenGL
>> related header is missing. configure correctly detected that and didn't
>> enable OpenGL support:
>>
>> $ make check-headers
>>   CC    tests/headers/include/ui/shader.o
>> In file included from tests/headers/include/ui/shader.c:14:0:
>> ./include/ui/shader.h:6:22: fatal error: epoxy/gl.h: No such file or 
>> directory
>>  #include <epoxy/gl.h>
>>                       ^
>> compilation terminated.
>> make: *** [tests/headers/include/ui/shader.o] Error 1
>> rm tests/headers/include/ui/shader.c
>> $ grep OPENGL config-host.*
>
> Hmm, this demonstrates some of our headers may only be included when
> certain CONFIG_* are defined.
>
> Actually, I ran into a related case myself: headers that don't compile
> with CONFIG_WIN32.
>
> We can either add suitable ifdeffery to make our headers work always, or
> mark headers so the test skips them when their requirements aren't met,
> similarly to how this patch skips certain headers when CONFIG_WIN32 is
> defined.
>
> Regardless, we need to find the problemtatic headers.  Perhaps you can
> find a few more with "make -k check-source".

I think I tracked them down.  Not too bad, just a dozen or so.  Now I
have to make up my mind whether I prefer to document their configuration
requirements with comments or with ifdefs.

Reply via email to