]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Don't compile relocatable.c any more.
authorBruno Haible <bruno@clisp.org>
Wed, 13 Sep 2023 21:11:52 +0000 (23:11 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 13 Sep 2023 21:12:21 +0000 (23:12 +0200)
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 <debohman@gmail.com> at
<https://savannah.gnu.org/bugs/?64536>.

* 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.

.gitignore
autogen.sh
gettext-runtime/intl/Makefile.am
gettext-runtime/intl/compat.c [new file with mode: 0644]
gettext-runtime/intl/configure.ac
gnulib-local/modules/gettext-runtime-intl-misc

index de2c6c476663fb7955c37a55a16c3bf98db28389..9c0c8f30e11f81ddcd25ac90d3f0df43f66a862c 100644 (file)
@@ -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
index 983c5500b644df77e509a499d0d1c5c89019df3e..20385edcd88b25cc92c3bee499dc453806229f7b 100755 (executable)
@@ -121,7 +121,6 @@ if ! $skip_gnulib; then
     localename
     lock
     manywarnings
-    relocatable-lib-lgpl
     tsearch
     vasnprintf-posix
     vasnwprintf-posix
index b2e62801543643a8c8d9e2675bee19bfb82fd826..76fe427d3113799be21fdff90294d496160092f6 100644 (file)
@@ -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 (file)
index 0000000..65f1bfd
--- /dev/null
@@ -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 <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "libgnuintl.h"
+
+void
+libintl_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix)
+{
+}
index 30a86065ef7c5bb95027314f6d14e60f24c9a335..0c46ccb5ecd68b05394199fb7da1ad127db8d75d 100644 (file)
@@ -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
index 59738717a1ecb8035c42d4bef20bbd3ff3c3b85a..648889af828e665335ad91f51777fc8febea18dd 100644 (file)
@@ -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@