build: Restore the ability to build gettext-tools separately, part 1.
Reported by Hanspeter Niederstrasser <nieder@users.sourceforge.net>
in <https://savannah.gnu.org/bugs/?56333>.
Code based on patch by Miguel Ángel Arruga Vivas <rosen644835@gmail.com>.
* autogen.sh: Copy libtextstyle.m4 for use by gettext-tools.
* gettext-tools/configure.ac: New option --with-installed-libtextstyle.
(USE_INSTALLED_LIBTEXTSTYLE): New conditional.
* gettext-tools/src/Makefile.am (textstyle.h): Disable rule if
USE_INSTALLED_LIBTEXTSTYLE is true.
(LT_LIBTEXTSTYLE): New variable.
(libgettextsrc_la_LDFLAGS): Use it instead of hardcoding a relative filename of
libtextstyle.la.
* configure.ac: Filter out --with-installed-libtextstyle from inherited --help
output.
* Makefile.am (distcheck-hook): Compare different copies of libtextstyle.m4.
* PACKAGING: Document that gettext-tools's configure needs to be invoked with
--with-installed-libtextstyle.