autoconf
[Top][All Lists]
Advanced

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

RE: changequote


From: Bernard Dautrevaux
Subject: RE: changequote
Date: Thu, 21 Dec 2000 18:52:28 +0100

> -----Original Message-----
> From: Akim Demaille [mailto:address@hidden
> Sent: Thursday, December 21, 2000 4:15 PM
> To: Bernard Dautrevaux
> Cc: 'Mirar'; Autoconf List
> Subject: Re: changequote
> 
> 
> 
>     AC_ARG_WITH(mmalloc,
>     [  --with-mmalloc          Use memory mapped malloc package],
>     [case "${withval}" in
>       yes)  want_mmalloc=true ;;
>       no)   want_mmalloc=false;;
>       *)    AC_MSG_ERROR(bad value ${withval} for GDB 
> with-mmalloc option)
> ;;
>     esac],[want_mmalloc=false])dnl
> 
> Didn't try to reproduce, but at least be aware that using dnl like
> this is a bad idea.  Use `[]dnl' to avoid having the dnl pasted to the
> last tokens of the expansion of the previous macro (here
> AC_ARG_WITH).  This stupid example highlights what might happen.
> 
> % m4
> define(foo, bar)
> foo()dnl
> bardnl
> foo()`'dnl toto
> bar
> 

Yeah... That's fun :-) It's now a time we no more run into this kind of
stuff with the C preprocessor, so it's kind to know there is still some
places where we can :-)

More seriously, I've had to suppress those dnl's when installing standard
GNU packages (the snippet above is from GDB 5.0 (I got the tarball from
cygwin, but I don't think they add them). This seems to indicate that this
used to work, but no more work now.

Note that inspecting the generated "configure" script it looks like a whole
chunk of code was simply missing in configure, then we get mismatched
constructs (like an unexpected EOF, or an unexpected "esac" or the like...)

Regards,

        Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:    +33 (0) 1 47 68 80 80
Fax:    +33 (0) 1 47 88 97 85
e-mail: address@hidden
                address@hidden
-------------------------------------------- 



reply via email to

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