Category Archives: autotools

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