autoconf-archive-maintainers
[Top][All Lists]
Advanced

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

Re: AX_PROG_{PERL, ...} -> (AU) obsoletes both AX_WITH_{PERL, ...} and A


From: Francesco Salvestrini
Subject: Re: AX_PROG_{PERL, ...} -> (AU) obsoletes both AX_WITH_{PERL, ...} and AX_PROG_{PERL, ...}_VERSION
Date: Thu, 14 Oct 2010 14:00:37 +0200
User-agent: KMail/1.13.5 (Linux/2.6.35-gentoo-r10; KDE/4.4.5; i686; ; )

On Wednesday 13 October 2010, Ralf Wildenhues wrote:
> * Peter Simons wrote on Wed, Oct 13, 2010 at 01:15:00PM CEST:
> >  > --- a/m4/ax_with_perl.m4
> >  > +++ b/m4/ax_with_perl.m4
> >  > 
> >  > +AU_DEFUN([AX_WITH_PERL], [AX_PROG_PERL($2,,,[ PERL=$1 ])])
> >  > 
> >  >  AC_DEFUN([AX_WITH_PERL],[
> >  >  
> >  >      AX_WITH_PROG(PERL,perl,$1,$2)
> >  >  
> >  >  ])
> > 
> > I am surprised that this code works. Is it possible to have both an
> > AU_DEFUN and an AC_DEFUN for the same name?
> 
> Yes, it is.  I think that it doesn't make a lot of sense in this case
> though, because the AC_DEFUN (which comes later here) will just
> overwrite the definition from the AU_DEFUN.  It makes more sense to have
> AU_DEFUN followed by m4_define which then means that the former is
> active during autoupdate, but the latter during autoconf.

My intention was to keep both autoconf and autoupdate happy, the patch 
attached mainly to show the approach.

Do you agree for keeping the AU_DEFUN + m4_define couple or should it be 
better/simpler/cleaner to have an AU_DEFUN only ?

> Please get in the habit of using proper m4 quoting though, at least the
> macro arguments should be quoted:
> 
>     AU_DEFUN([AX_WITH_PERL], [AX_PROG_PERL([$2],,,[ PERL=$1 ])])
> 
>     AC_DEFUN([AX_WITH_PERL],[
>         AX_WITH_PROG(PERL,perl,[$1],[$2])
>     ])
> 
> so that, when they happen to contain a comma, don't mess up the number
> of arguments to called macros.

My (at-least-second) mistake. Fixed.

Thank you for all your advices.

Cheers,
Francesco

-- 
He who loses, wins the race,
And parallel lines meet in space.
                -- John Boyd, "Last Starship from Earth"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]