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])
])
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.