[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AM_COND_IF for earlier Automake
From: |
Ralf Wildenhues |
Subject: |
Re: AM_COND_IF for earlier Automake |
Date: |
Sun, 19 Dec 2010 15:13:35 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
* Dave Hart wrote on Sun, Dec 19, 2010 at 02:47:58PM CET:
> On Sun, Dec 19, 2010 at 10:48 UTC, Ralf Wildenhues wrote:
> > * Dave Hart wrote on Sat, Dec 18, 2010 at 07:57:13PM CET:
> >> m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF],
> >> [m4_ifndef([$1_TRUE],
> >> [m4_fatal([$0: no such condition "$1"])])dnl
> >> if test -z "$$1_TRUE"; then :
> >> m4_n([$2])[]dnl
> >> m4_ifval([$3],
> >> [else
> >> $3
> >> ])dnl
> >> fi[]dnl
> >> ])])
> >
> > Looks ok to me. If you experience problems later, please report back.
>
> When tested as above, my AM_COND_IF replacement was occurring with
> Automake 1.11, leading me to change the m4_fatal message to make it
> clear it was coming from a AM_COND_IF imposter. Substituting
> m4_define for AC_DEFUN cured the problem. Is it inappropriate to try
> to conditionalize AC_DEFUN under m4_ifndef?
Can you show the error you got, and maybe also a small example how you
got it? I'm not sure I fully understand otherwise.
Normally, AC_DEFUN under m4_ifndef should work ok. Hmm, you might want
to move the AC_DEFUN to a new line, as aclocal essentially greps for it.
With m4_define, you need to ensure yourself that the .m4 file you put
this in is included in aclocal.m4 (or configure.ac).
Cheers,
Ralf