Peter Johansson <[email protected]> wrote on 18/12/2009 00:05:46:
> From: Peter Johansson <[email protected]>
> To: Joakim Tjernlund <[email protected]>
> Cc: [email protected]
> Date: 18/12/2009 00:05
> Subject: Re: ifdef expessions in Makefile.am
>
> Hi Joakim,
>
> Joakim Tjernlund wrote:
> > Thanks, but I can't make that work for me
> > AM_CONDITIONAL seems to be an automake 1.11 feature
> >
>
> That seems inaccurate because I've used AM_CONDITIONAL since 2004.
>
> > and the AC_SUBST variant does not quite fit
> > Basically I want:
> > if @TEST@ then
> > SUBDIRS+= dir1/dir2/@TEST@
> > SUBDIRS+= dir3/dir2/@TEST@
> > SUBDIRS+= dir4/@TEST@
> > ....
> > endif
> >
> >
> Would you mind, rather than telling us what syntax you wanna use, let us
> know why you cannot use AM_CONDITIONAL. In particular it would be useful
> to know where the value of @TEST@ is decided? What values can @TEST@ take?
>
I tried the example you pointed me to, added this to configure.ac:
AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
and got:
# > autoconf
configure.ac:32: error: possibly undefined macro: AM_CONDITIONAL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
This is autoconf 2.63
Jocke