[Top][All Lists]

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

Re: Invoking AM_GNU_GETTEXT conditionally in

From: Ralf Wildenhues
Subject: Re: Invoking AM_GNU_GETTEXT conditionally in
Date: Sat, 20 Feb 2010 11:25:18 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hello David,

* David Bruce wrote on Fri, Feb 12, 2010 at 09:55:03PM CET:
> dnl NOTE - the following conditional does not work.
> if test $native_win32 = yes; then
> else
>   AM_GNU_GETTEXT([external])
> fi

AFAICS, the AM_GNU_GETTEXT macro cannot be invoked more than once,
conditionally, in a file, with the decision only made at
configure time.[1]  Whether you have an intl/ subdirectory in your
distribution tarball should not depend upon the system you're building
on, I guess.

If you want to allow different types of distributions of your tarball,
you should expand the macro differently at m4 (autoconf) run time, by
an m4 conditional like m4_ifdef, m4_if or so.

Hope that helps.  Feel free to ask for more details on macro expansion
(the Autoconf manual has some text about it); for more detailed
AM_GNU_GETTEXT semantics, it may help to ask on bug-gnu-gettext.


[1] The internal reason why it can't work is that the macro uses
AC_REQUIRE (thus you should use AS_IF not shell if, to let required
macros be expanded outside the shell conditional), and that it does
more different, complex things at m4 time depending upon the macro
argument, which means your shell conditional isn't taken into account
for these things.

reply via email to

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