[Top][All Lists]

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

Re: m4 quoting and autoheader

From: Adam Mercer
Subject: Re: m4 quoting and autoheader
Date: Wed, 19 May 2010 11:04:46 -0500

On Wed, May 19, 2010 at 10:46, Eric Blake <address@hidden> wrote:


> The latest version of autoconf depends on m4 1.4.6 or greater, because
> m4 1.4.5 has bugs in translit that newer autoconf would trigger
> (autoconf 2.59 did not trigger those bugs, so using stock tools on your
> distro should still be okay).  If you are going to upgrade to newer
> autoconf, you also need to upgrade m4.

Thanks I'll bear that in mind.

> You should use m4_translit instead of translit, and you want the
> expansion of your temporary macro 'uppercase' to occur prior to calling
> AC_DEFINE, rather than after.  You ended up transliterating " to ",
> because you used the wrong quoting.  You also want to ensure that the
> result of the transliteration is not itself treated as a macro, hence
> the double-quoting.  Also, treating uppercase as a temporary macro
> implies using pushdef/popdef rather than define.  Try this instead
> (although I haven't tested it):
>  m4_pushdef([uppercase],translit([[$1]],[a-z],[A-Z]))
>  AC_DEFINE([HAVE_LIB]uppercase, [1], [Define if ...])
>  m4_popdef([uppercase])
> ])

Thanks a lot Eric, that does the trick!



reply via email to

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