Gnulib is a set of C snipets that provide a portable implementation of
common C functions and symbols (such as strdup, getopt, etc.). When
you include one in your project, it is used as fallback if the host
implementation does not exist or is broken.

This permits to rely on standard and stable C functions.

http://www.gnu.org/software/gnulib/
http://www.gnu.org/software/gnulib/manual/gnulib.html


Initial import:
/usr/src/gnulib/gnulib-tool \
  --source-base=gnulib/lib --m4-base=gnulib/m4 \
  --import

Then follow the manual and instructions from gnulib-tool (changes are
scattered among the autotools build system files).

We use the getopt module (for getopt_long()) and the relocatable-prog
(get_full_program_name() and relocate()).


To refresh Gnulib, just:
/usr/src/gnulib/gnulib-tool --import

Gnulib will use 'gnulib/m4/gnulib-cache.m4' to detect which modules
need to be updated.
