6.12. Gettext-0.14.5

The Gettext package contains utilities for internationalization and localization. These allow programs to be compiled with NLS (Native Language Support), enabling them to output messages in the user's native language.

6.12.1. Installation of Gettext

Gettext has an issue with cross-compiling where it can't find getline. Fix it here:

cd gettext-tools
echo "am_cv_func_working_getline=yes" >> config.cache

Prepare Gettext for compilation:

CC="${CC} ${BUILD64}" CXX="${CXX} ${BUILD64}" \
   ./configure --prefix=/tools \
   --host=${LFS_TARGET} --disable-shared \
   --cache-file=config.cache

The meaning of the configure options:

--disable-shared

This tells Gettext not to create a shared library.

Only one program in the Gettext package needs to be built:

make -C lib
make -C src msgfmt

Install the msgfmt binary:

cp -v src/msgfmt /tools/bin

Details on this package are located in Section 10.31.2, “Contents of Gettext.”