16

I am trying to compile a gnome application and I am curious what the output means when I run the autogen.sh script:

~/Documents/Code/window-picker-applet $./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal 
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --install --copy
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
data/Makefile.am:11: `%'-style pattern rules are a GNU make extension
data/Makefile.am:11: wildcard $(top_srcdir: non-POSIX variable name
data/Makefile.am:11: (probably a GNU make extension)
autoreconf: Leaving directory `.'
[Output trunkated...]

Why am I getting the info configure.ac: not using Gettext? Is that a warning and should I change some of the configuration files to fix it? I know the application has a po/ folder so I think it should be using Gettext, hence I am confused about this warning.

I also had a lot of warnings with the N_ macro not being defined, so this might be related? [Update] See comment below [/Update]

lanoxx
  • 968
  • 1
  • 7
  • 15
  • The issue with the N_ macros not being defined was because the neccessary include (glib/gi18n.h) was missing. This had previously been in included with another include file (gtk/gtk.h) but it was removed in the latest gtk+ version. – lanoxx Feb 07 '12 at 18:38

2 Answers2

6

What OS?

Likely your system does not have all or some of the gettext system, namely the development portions. In many distributions, e.g. Debian/Ubuntu, gettext is separated into multiple packages: gettext-base and gettext.

The gettext-base package is for running programs which are multi-lingual, while gettext has the necessary parts for building.

  • I am running on Ubuntu (11.10). Gettext is installed but not gettext-base. – lanoxx Apr 25 '12 at 09:49
  • I am dealing with patching (via src code + ./configure) an old Fedora built platform with more code, and I'm running into this problem. Installing gettext, and the re-./configure on autoconf/autogen/m4 hasn't helped so far. I notice that pkg-config doesn't think getttext is installed. But, I notice that pkg-config on more modern systems doesn't list gettext either, even when gettext-base is installed. – mcr Aug 17 '15 at 03:04
4

Looks like your autogen.sh is calling autoreconf.

The project may be using intltool instead but if so autoreconf should pick that up and call intltoolize. If it's definitely using GNU gettext then this from the autopoint info page is helpful:

The ‘autopoint’ program copies standard gettext infrastructure files into a source package. It extracts from a macro call of the form ‘AM_GNU_GETTEXT_VERSION(VERSION)’, found in the package’s ‘configure.in’ or ‘configure.ac’ file, the gettext version used by the package, and copies the infrastructure files belonging to this version into the package.

And if we write AM_GNU_GETTEXT_VERSION then autopoint is correctly invoked by autoreconf.

To extract the latest available infrastructure which satisfies a version requirement, then you can use the form ‘AM_GNU_GETTEXT_REQUIRE_VERSION(VERSION)’ instead. For example, if gettext 0.19.8 is installed on your system and ‘0.19.1’ is requested, then the infrastructure files of version 0.19.8 will be copied into a source package.

The problem only appears when switching to this version of the macro, and while it does what it says on the tin it isn't known to autoreconf and we see a patch for support.

Gentoo users can get the same behaviour in ebuilds by using our eautoreconf function.

Writing AM_GNU_GETTEXT_VERSION and AM_GNU_GETTEXT_REQUIRE_VERSION immediately afterwards in my own configure.ac generates a warning but otherwise appears to yield the desired result.

arfbtwn
  • 156
  • 4