Re: gnome-vfs circular build dependency



On 19/02/04 12:04, Dmitry G. Mastrukov wrote:

I was just about too. More of that I was naot able to build gnome-vfs
unless I changed check in configure.in from
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.3.1 libgnomeui-2.0 >= 2.5.1, AM_CONDITIONAL(HAVE_GTK, true))
to PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.3.1 libgnomeui-2.0 >= 2.5.1, AM_CONDITIONAL(HAVE_GTK, true), AM_CONDITIONAL(HAVE_GTK, false))

IMHO cross-dependency is a bad idea. I think functionality from gtk
subdir in gnome-vfs should be merged in libgnomeui or a new module for
it should be created.
Note that this actually highlights a common configure.in bug. It is an error to put an AM_CONDITIONAL() statement inside a branch like that.

The way AM_CONDITIONAL works is by evaluating the condition, then defining the substitutions COND_TRUE and COND_FALSE to "" and "#", depending on the value. The Makefile.in then contains lines like:
   @COND_TRUE@ do this if condition is true
   @COND_FALSE@ do this if condition is false

So in the resulting Makefile, one branch will be active and the other commented out.

Unfortunately, if the AM_CONDITIONAL doesn't get executed (because it is masked by an if statement), both the substitutions will be "", so both branches in the Makefile will be active and things break.

For automake >= 1.6 (or maybe 1.5), the AM_CONDITIONAL implementation adds some code to detect this case, causing configure to error out if the AM_CONDITIONAL doesn't get executed.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/





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