bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: conditional use of gettext


From: Vincent Torri
Subject: Re: conditional use of gettext
Date: Wed, 9 Jun 2010 11:30:19 +0200 (CEST)



On Wed, 9 Jun 2010, Bruno Haible wrote:

Hi,

Vincent Torri wrote:
in configure.ac, I use


m4_ifdef([AM_GNU_GETTEXT_VERSION], [AM_GNU_GETTEXT_VERSION([0.12.1])])
m4_ifdef([AM_GNU_GETTEXT],
    [
     AM_GNU_GETTEXT([external])
     po_makefile_in=po/Makefile.in
     AM_CONDITIONAL([HAVE_PO], [true])
    ],
    [
     AM_CONDITIONAL([HAVE_PO], [false])
    ])

to check conditionnally if gettext m4 macro is installed or not. And it is
installed. But autopoint and aclocal are giving the following message:

Running autopoint...
autopoint: *** Missing version: please specify in configure.ac through a line
'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using
autopoint: *** Stop.
Running aclocal...
configure.ac:48: warning: macro `AM_GNU_GETTEXT' not found in library

What is wrong, here ?

'autopoint' recognizes the AM_GNU_GETTEXT_VERSION invocation only if it's
on a line of its own. So, you need to change your first line to:

m4_ifdef([AM_GNU_GETTEXT_VERSION], [
AM_GNU_GETTEXT_VERSION([0.12.1])
])

haaa, ok :-) Thank you

But what is exactly the point of this conditionalization?
 - You know that if your configure.ac invokes AM_GNU_GETTEXT,
   the installing person can pass --enable-nls or --disable-nls
   and thus choose to disable gettext at installation time.
 - After you ran 'gettextize', the po/Makefile.in.in and gettext.m4
   files will be part of your package. If they are not committed
   in version control, 'autopoint' restores these files. That is
   the entire point of the AM_GNU_GETTEXT_VERSION([...]) declaration.
   So the m4_ifdef condition should always be true.

The point is that some system do not have gettext installed :-) So no autopoint to install gettext.m4. No previous installation of that file neither

Vincent Torri



reply via email to

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