[Cairo] Re: Patch for cairo --without-x

John Ellson ellson at research.att.com
Thu Nov 27 07:24:50 PST 2003


James Henstridge wrote:

> On 27/11/03 22:39, John Ellson wrote:
>
>> James Henstridge wrote:
>>
>>>
>>> If we decide to require automake >= 1.7 to build Cairo from CVS 
>>> (which I highly recommend), then it should be pretty easy to 
>>> conditionally install the cairo-xlib.h with syntax like this:
>>>
>>> include_HEADERS = cairo.h
>>> libcairo_la_SOURCES = ...
>>> if HAVE_X_BACKEND
>>> include_HEADERS += cairo-xlib.h
>>> libcairo_la_SOURCES += cairo_xlib_surface.c
>>> endif 
>>
>>
>>
>> This conditional make feature also works in automake-1.6.   We use it 
>> in graphviz.
>>
>> It solves the problem that you want "make dist" to recurse into all 
>> directories, but
>> that you only conditionally want to make the targets in some of them 
>> based on
>> a configure switch.
>
>
> Are you sure?  Whenever I tried using the += syntax inside a 
> conditional with automake 1.6, I ended up with a broken Makefile (the 
> += got changed to a normal equals, and would override the original 
> definition of the variable).  It didn't raise an error, but it also 
> didn't work.


OK, we use the conditional, but not the += syntax.

A workaround would be to define two separate products, with separate 
SOURCES and HEADERS, then make
the products conditional.

John





More information about the cairo mailing list