Conditionals in autoconf/make


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:


AC_CHECK_LIB(gnomeui, gnome_canvas_pixbuf_get_type, ,
  AC_MSG_RESULT([*** Using local version of gnome-canvas-pixbuf...])],
 `gnome-config --libs gnomeui`)

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.


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