From: Bruno Haible Date: Wed, 13 Sep 2023 21:11:52 +0000 (+0200) Subject: intl: Don't compile relocatable.c any more. X-Git-Tag: v0.23~404 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b182c17096847cb581c3e2c3f42c145c47c7c7a6;p=thirdparty%2Fgettext.git intl: Don't compile relocatable.c any more. The library does not need relocatable.h any more since today. As a side effect, libintl.la gets installed again and "make uninstall" erases the installed libintl.{a,so} again (regressions from 2021-06-20). Reported by David Bohman at . * autogen.sh (GNULIB_MODULES_LIBINTL): Remove relocatable-lib-lgpl. * gnulib-local/modules/gettext-runtime-intl-misc (Makefile.am): Don't augment AM_CPPFLAGS. * gettext-runtime/intl/configure.ac: Don't set enable_relocatable. Don't define the C symbols relocate, relocate2. * gettext-runtime/intl/compat.c: New file. * gettext-runtime/intl/Makefile.am: Update comments. (LIBINTLSOURCES): Add compat.c. (compat.lo): New rule. --- diff --git a/.gitignore b/.gitignore index de2c6c476..9c0c8f30e 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,6 @@ /gettext-runtime/doc/relocatable.texi /gettext-runtime/intl/gnulib-lib/ /gettext-runtime/intl/gnulib-m4/ -/gettext-runtime/intl/doc/relocatable.texi /gettext-runtime/libasprintf/gnulib-lib/ /gettext-runtime/libasprintf/gnulib-m4/ /gettext-runtime/m4/build-to-host.m4 diff --git a/autogen.sh b/autogen.sh index 983c5500b..20385edcd 100755 --- a/autogen.sh +++ b/autogen.sh @@ -121,7 +121,6 @@ if ! $skip_gnulib; then localename lock manywarnings - relocatable-lib-lgpl tsearch vasnprintf-posix vasnwprintf-posix diff --git a/gettext-runtime/intl/Makefile.am b/gettext-runtime/intl/Makefile.am index b2e628015..76fe427d3 100644 --- a/gettext-runtime/intl/Makefile.am +++ b/gettext-runtime/intl/Makefile.am @@ -32,7 +32,6 @@ MAINTAINERCLEANFILES = SUFFIXES = # -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro. -# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro. AM_CPPFLAGS = \ -Ignulib-lib -I$(srcdir)/gnulib-lib \ -DLOCALEDIR=$(localedir_c_make) \ @@ -114,7 +113,7 @@ EXTRA_DIST += \ # libintl_freelocale # setlocale.c: libintl_newlocale # libintl_setlocale -# relocatable.c: libintl_set_relocation_prefix +# compat.c: libintl_set_relocation_prefix # # The following files implement private API. # gettextP.h: dcigettext.c: libintl_dcigettext @@ -203,7 +202,8 @@ LIBINTLSOURCES = \ setlocale.c \ version.c \ osdep.c \ - intl-compat.c + intl-compat.c \ + compat.c # We must not install the libintl.h/libintl.la files if we are on a # system which has the GNU gettext() function in its C library or in a @@ -361,6 +361,8 @@ osdep.lo: $(srcdir)/osdep.c $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/osdep.c intl-compat.lo: $(srcdir)/intl-compat.c $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/intl-compat.c +compat.lo: $(srcdir)/compat.c + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/compat.c # Dependencies. @@ -394,6 +396,7 @@ setlocale.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo version.lo: ../config.h libgnuintl.h osdep.lo: ../config.h $(srcdir)/intl-exports.c $(srcdir)/os2compat.c intl-compat.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h +compat.lo: ../config.h libgnuintl.h # Version information according to Woe32 conventions. EXTRA_DIST += libintl.rc diff --git a/gettext-runtime/intl/compat.c b/gettext-runtime/intl/compat.c new file mode 100644 index 000000000..65f1bfd7a --- /dev/null +++ b/gettext-runtime/intl/compat.c @@ -0,0 +1,25 @@ +/* Symbols for backward compatibility. + Copyright (C) 2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "libgnuintl.h" + +void +libintl_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix) +{ +} diff --git a/gettext-runtime/intl/configure.ac b/gettext-runtime/intl/configure.ac index 30a86065e..0c46ccb5e 100644 --- a/gettext-runtime/intl/configure.ac +++ b/gettext-runtime/intl/configure.ac @@ -42,10 +42,6 @@ gl_PROG_AR_RANLIB dnl Set preferences for the gnulib module 'threadlib'. gl_AVOID_WINPTHREAD -dnl Set preferences for the gnulib module 'relocatable-lib-lgpl': -dnl Enable relocatability unconditionally. -enable_relocatable=yes - dnl Early checks, assembled by gnulib. gl_EARLY @@ -348,9 +344,6 @@ AH_VERBATIM([znoexport], [ #define printf_frexp _libintl_printf_frexp /* Symbols defined by gnulib module 'printf-frexpl'. */ #define printf_frexpl _libintl_printf_frexpl -/* Symbols defined by gnulib module 'relocatable-lib-lgpl'. */ -#define relocate _libintl_relocate -#define relocate2 _libintl_relocate2 /* Symbols defined by gnulib module 'setlocale-null'. */ #define setlocale_null _libintl_setlocale_null #define setlocale_null_r _libintl_setlocale_null_r diff --git a/gnulib-local/modules/gettext-runtime-intl-misc b/gnulib-local/modules/gettext-runtime-intl-misc index 59738717a..648889af8 100644 --- a/gnulib-local/modules/gettext-runtime-intl-misc +++ b/gnulib-local/modules/gettext-runtime-intl-misc @@ -11,12 +11,6 @@ AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME]) Makefile.am: -# Parameterization of the 'relocatable-lib-lgpl' module. -AM_CPPFLAGS += \ - -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC -DBUILDING_DLL \ - -Dset_relocation_prefix=libintl_set_relocation_prefix \ - -DDEPENDS_ON_LIBICONV=1 - # Enable more warning options in this directory. AM_CFLAGS += @WARN_CFLAGS@