Use upstream gettext instead the glib one

Some people asked me about this, so here a fast tutorial:
Replace this in your


with this:


You can see an example in this commit: [1]

Now the theory: gettext has two different utilities: autopoint and gettextize. Here the different purposes of these programs:

  • autopoint [2] Copies the gettext infrastructure that has been omitted from version control.
  • gettextize [3] The `gettextize’ program is an interactive tool that helps the maintainer of a package internationalized through GNU `gettext’. … As a migration tool, for upgrading the GNU `gettext’ support in a package from a previous to a newer version of GNU `gettext’.

So, you should only use autopoint in your file. Only the maintainer should call the gettextize program.
Fortunately, autopoint is automatically called in both and autoreconf, so no need to change your file.

Note that autopoint needs the AM_GNU_GETTEXT_VERSION() macro to know the version of gettext files you want tou use, because it copies the infrastructure files belonging to this version into the package. ie, AM_GNU_GETTEXT_VERSION([0.17]) means exactly 0.17, not 0.17 and above.

Why we use glib-gettextize then? Well, as far as I know It’s mainly for historical reasons: autopoint was not added until version 0.11 of gettext. However, GNOME did not require gettext version 0.11 those days, so it would had been premature to rely on that script. That is not a problem anymore.

There is also a bug to deprecate the Glib gettext macros: [4]


Flattr this

4 thoughts on “Use upstream gettext instead the glib one”

  1. The exact version requirement of AM_GNU_GETTEXT_VERSION kind of concerns me. What happens if you don’t have that exact gettext version installed? I have gettext 0.18 installed on my Fedora 14 machine, so does that mean the gettext 0.17 requirement you added to Evolution’s is already out of date?

  2. @Matthew:

    Nope, AM_GNU_GETTEXT_VERSION only specifies the version of the infraestructure gettext files you want to use (Remember, It’s the info used by autopoint to generate the infraestructure files).
    For example, you can have gettext 0.18 installed but use the 0.16 version in the infrestructure files if you have AM_GNU_GETTEXT_VERSION([0.16]) in your
    In this case, the minimal gettext version to compile your program would be gettext 0.16

Comments are closed.