Re: Conditionals in autoconf/make



"John R. Sheets" wrote:
> 
> Hi,
> 
> I'm trying to integrate the gnome-canvas-pixbuf item into a GNOME 1.x
> application, while leaving a path open to GNOME 2.0, using autoconf
> checks.  I copied gnome-canvas-pixbuf.[ch] into my application
> directory, to conditionally compile in case the user has a GNOME 1.x
> install.  Here's my intial pass, which unfortunately doesn't work:
> 
> -------------------
> 
> <configure.in>
> AC_CHECK_LIB(gnomeui, gnome_canvas_pixbuf_get_type, ,
>  [GNOME_1_X_SOURCES="gnome-canvas-pixbuf.c"
>   AC_SUBST(GNOME_1_X_SOURCES)
>   AC_MSG_RESULT([*** Using local version of gnome-canvas-pixbuf...])],
>  `gnome-config --libs gnomeui`)
> 
> <Makefile.am>
> bin_PROGRAMS = anvil
> anvil_SOURCES = $(GNOME_1_X_SOURCES) <etc...>
> 
> -------------------
> 
> It works fine if I put "gnome-canvas-pixbuf.c" directly into
> anvil_SOURCES, but ignores it when I put it in as $(GNOME_1_X_SOURCES).
> Is this something goofy with automake?
> 
> Am I going about this in the wrong way?  It seems like this is something
> that would have come up before.  What's the officially encouraged way?
> I did notice AM_CONDITIONAL, but that looks more geared towards
> command-line configure options.
> 
> John

Ok, I feel kind of out of touch here. I've looked at the info pages for
automake etc., but I still am kind of clueless when it comes to actually
creating my own .am files. Is there a nice, straightforward tutorial on
this, or do I have to wander around macro hell trying to figure out how
it all gets put together?


-- 
Colin Fox
cfox@telus.net
http://overkill.starnetc.com/~cfox



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]