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: Ralf Wildenhues
Subject: Re: AX_PROG_{PERL, ...} -> (AU) obsoletes both AX_WITH_{PERL, ...} and AX_PROG_{PERL, ...}_VERSION
Date: Thu, 14 Oct 2010 20:46:27 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

* Francesco Salvestrini wrote on Thu, Oct 14, 2010 at 02:00:37PM CEST:
> 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 ?

Well, AU_DEFUN + m4_define should work.  It means that when autoconf is
run, the old (previously AC_DEFUN'ed) code is used, whereas with
autoupdate, the new code is used.  If the new code is strictly
equivalent to the old one, you should be able to just delete the
m4_define part.  If it is not, well, then I guess a NEWS entry would be
in order.  :-)  And then keeping the old code would make more sense, to
allow the user to delay the switch until an autoupdate.

Having only also AU_DEFUN has the advantage of warning with -Wobsolete.

Cheers,
Ralf



reply via email to

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