On 05/19/2010 09:33 AM, Adam Mercer wrote: > Hi > > One of the platforms I _need_ to support for development is CentOS 5, > which comes with very old versions of the autotools: > > m4-1.4.5-3.el5.1 There's part of your problem. > > If I locally update to the latest versions of autoconf and automnake > the build works, but not using the system autoconf and automake. 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. Now, back to your question: > AC_DEFUN([LALSUITE_TEST],[ > define([uppercase],translit($1, "a-z", "A-Z")) > AC_DEFINE([HAVE_LIB[]uppercase[]],[1],[Define to 1 if you have the > $1 library]) > ]) 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): AC_DEFUN([LALSUITE_TEST],[ m4_pushdef([uppercase],translit([[$1]],[a-z],[A-Z])) AC_DEFINE([HAVE_LIB]uppercase, [1], [Define if ...]) m4_popdef([uppercase]) ]) -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf