On Tue, 2008-04-15 at 20:09 +0200, Ralf Wildenhues wrote: > Hi Behdad, Hi Ralf,
Thanks for the quick response. > * Behdad Esfahbod wrote on Tue, Apr 15, 2008 at 07:39:19PM CEST: > > In short, all cairo source is C code, except for the BeOS backend that > > is C++. So we have a block like this in our Makefile.am: > > > However, even if CAIRO_HAS_BEOS_SURFACE is false, the C++ linker is > > chosen to link cairo. That we want to avoid. Any hints? > > You have to help automake pick the right linker, its linker choosing > algorithm is blissfully unaware of conditionals. You should be able to > set libcairo_la_LINK or cairo_LINK inside conditionals. Look in a > Makefile.in how they are typically set (since this is an implementation > detail, beware: this changed between 1.9.6 and 1.10+). I would have been happy doing that if it was as simple as: libcairo_la_LINK = $(LINK) and libcairo_la_LINK = $(CXXLINK) But as it happens now I can't do that, since libcairo_la_LDFLAGS and libcairo_la_CFLAGS need to go in the middle of the LINK command. It prolly works if I append at the end, but don't want to change any flag orders (yet). > If that Makefile.am otherwise has no other C++ code, and you are not > using cairo_LDFLAGS, you can just override > CXXLINK = $(LINK) I like this one. > I guess. Doesn't seem to work though. My libcairo_la_LINK is still a modified version of the CXXLINK. > Hope that helps. It did. I fully understand the problem now. > Of course somebody writing a patch to lift this > limitation in Automake would help even more. ;-) Shouldn't be too hard. So this email of your goes to sit in my inbox beside two other ones from you, from 2006 and 2007. Nice :-D. See you in 2009! > Cheers, > Ralf Cheers, -- behdad http://behdad.org/ "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." -- Benjamin Franklin, 1759