gettext
a80b9021 - build: Simplify the use of gnulib in libintl.

Commit
3 years ago
build: Simplify the use of gnulib in libintl. * gnulib-local/lib/localename-table.h.diff: New file. * gnulib-local/lib/localename.c.diff: New file. * gnulib-local/lib/tsearch.c.diff: New file. * gnulib-local/modules/gettext-runtime-intl-misc: New file, based on gettext-runtime/intl/Makefile.am. * gnulib-local/modules/tsearch.diff: New file. * gnulib-local/Makefile.am (EXTRA_DIST): Add them. * autogen.sh (GNULIB_MODULES_LIBINTL, GNULIB_SETLOCALE_DEPENDENCIES): New variables. Invoke gnulib-tool for the gettext-runtime/intl/ directory. Update 'aclocal' invocation for the gettext-runtime/intl/ directory. * gettext-runtime/intl/configure.ac (enable_relocatable): Set to yes always. Invoke gl_EARLY and gl_INIT. Don't invoke gl_USE_SYSTEM_EXTENSIONS, AM_PROG_CC_C_O, gl_COMMON, gl_RELOCATABLE_LIBRARY explicitly. Define IN_LIBINTL through config.h. Rename __libc* macros and symbols through config.h. Invoke AC_CONFIG_FILES for gnulib-lib/Makefile. * gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Don't rename __libc* macros and symbols here. (gt_INTL_SUBDIR_CORE): Don't test for tsearch. * gettext-runtime/intl/arg-nonnull.h: Remove file. * gettext-runtime/intl/attribute.h: Remove file. * gettext-runtime/intl/filename.h: Remove file. * gettext-runtime/intl/flexmember.h: Remove file. * gettext-runtime/intl/localcharset.h: Remove file. * gettext-runtime/intl/localcharset.c: Remove file. * gettext-runtime/intl/localename.c: Remove file. * gettext-runtime/intl/localename-table.in.h: Remove file. * gettext-runtime/intl/localename-table.c: Remove file. * gettext-runtime/intl/lock.h: Remove file. * gettext-runtime/intl/lock.c: Remove file. * gettext-runtime/intl/printf-args.h: Remove file. * gettext-runtime/intl/printf-args.c: Remove file. * gettext-runtime/intl/printf-parse.h: Remove file. * gettext-runtime/intl/printf-parse.c: Remove file. * gettext-runtime/intl/relocatable.h: Remove file. * gettext-runtime/intl/relocatable.c: Remove file. * gettext-runtime/intl/setlocale-lock.c: Remove file. * gettext-runtime/intl/setlocale_null.h: Remove file. * gettext-runtime/intl/setlocale_null.c: Remove file. * gettext-runtime/intl/thread-optim.h: Remove file. * gettext-runtime/intl/threadlib.c: Remove file. * gettext-runtime/intl/tsearch.h: Remove file. * gettext-runtime/intl/tsearch.c: Remove file. * gettext-runtime/intl/vasnprintf.c: Remove file. * gettext-runtime/intl/verify.h: Remove file. * gettext-runtime/intl/windows-initguard.h: Remove file. * gettext-runtime/intl/windows-mutex.h: Remove file. * gettext-runtime/intl/windows-mutex.c: Remove file. * gettext-runtime/intl/windows-once.h: Remove file. * gettext-runtime/intl/windows-once.c: Remove file. * gettext-runtime/intl/windows-recmutex.h: Remove file. * gettext-runtime/intl/windows-recmutex.c: Remove file. * gettext-runtime/intl/windows-rwlock.h: Remove file. * gettext-runtime/intl/windows-rwlock.c: Remove file. * gettext-runtime/intl/xsize.h: Remove file. * gettext-runtime/intl/xsize.c: Remove file. * gettext-runtime/intl/Makefile.am (ACLOCAL_AMFLAGS): Reference gnulib-m4 in this directory. (SUBDIRS): Add gnulib-lib. (AM_CPPFLAGS): Add -I statements for the gnulib-lib directory. Don't define BUILDING_DLL, IN_LIBINTL here. Don't parametrize the 'relocatable-lib-lgpl' module here. (EXTRA_DIST, LIBINTLSOURCES): Remove the said files. (localename-table.h): Remove rule. (*.lo): Remove rules and dependencies for the said files. (libintl_la_LIBADD, libintl_la_DEPENDENCIES, libgnuintl_la_LIBADD, libgnuintl_la_DEPENDENCIES): Add gnulib-lib/libgnu.la. (OTHER_LDFLAGS): Don't export _libintl_* symbols. (EXTRA_DIST): Add gnulib-m4/gnulib-cache.m4. * gettext-runtime/intl/gettextP.h: Include glthread/lock.h, not lock.h. (gl_locale_name_canonicalize, gl_locale_name_from_win32_LANGID, gl_locale_name_from_win32_LCID, gl_locale_name_thread_unsafe, gl_locale_name_thread, gl_locale_name_posix, gl_locale_name_environ, gl_locale_name_default, gl_locale_name): Remove macros. (_nl_locale_name_posix, _nl_locale_name_environ, _nl_locale_name_default): Remove declarations. * gettext-runtime/intl/plural-exp.h (FREE_EXPRESSION, PLURAL_PARSE, GERMANIC_PLURAL, EXTRACT_PLURAL_EXPRESSION): Prefix these libintl-private symbols with _libintl_, not libintl_. * gettext-runtime/intl/bindtextdom.c: Include glthread/lock.h, not lock.h. * gettext-runtime/intl/finddomain.c: Likewise. * gettext-runtime/intl/loadmsgcat.c: Likewise. * gettext-runtime/intl/localealias.c: Likewise. * gettext-runtime/intl/log.c: Likewise. * gettext-runtime/intl/textdomain.c: Likewise. * gettext-runtime/intl/dcigettext.c: Include localename.h. Include glthread/lock.h, not lock.h. Include <search.h> always; don't include tsearch.c. * gettext-runtime/intl/printf.c: Don't define libintl_vasprintf here. Instead, use _libintl_vasprintf from gnulib-lib/vasnprintf.c. Define _libintl_vasnwprintf instead of libintl_vasnwprintf. * gettext-runtime/intl/setlocale.c: Include <errno.h>, localename.h. (gl_locale_name_canonicalize): New declaration. * Makefile.am (distcheck-hook): Remove the file comparisons for files in gettext-runtime/intl/.
Author
Parents
Loading