msgfmt, xgettext: Respect XDG_DATA_DIRS
Suggested in https://savannah.gnu.org/bugs/?47123
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add 'xmemdup0'.
* gettext-tools/gnulib-lib/.gitignore: Ignore files brought by gnulib-tool.
* gettext-tools/gnulib-tests/.gitignore: Likewise.
* gettext-tools/src/search-path.c: New file.
* gettext-tools/src/search-path.h: New file.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add search-path.h.
(libgettextsrc_la_SOURCES): Add search-path.c.
* gettext-tools/src/msgfmt.c: Include "search-path.h".
(main): Use get_search_path to locate ITS directories.
* gettext-tools/src/xgettext.c: Include "search-path.h".
(main): Use get_search_path to locate ITS directories.