From: Bruno Haible Date: Mon, 4 Mar 2019 17:26:16 +0000 (+0100) Subject: build: Make shared library dependencies work in relocatable installation. X-Git-Tag: v0.20~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2159f9f203db8ea5df8c1643c6dd204fbb420d4e;p=thirdparty%2Fgettext.git build: Make shared library dependencies work in relocatable installation. * gettext-tools/gnulib-lib/Makefile.am (RELOCATABLE_LIBRARY_PATH): New variable. (libgettextlib_la_LDFLAGS): Augment for relocatable installation. * gettext-tools/src/Makefile.am (libgettextsrc_la_LDFLAGS): Augment for relocatable installation. * gettext-tools/libgettextpo/Makefile.am (RELOCATABLE_LIBRARY_PATH): New variable. (libgettextpo_la_LDFLAGS): Augment for relocatable installation. --- diff --git a/gettext-tools/gnulib-lib/Makefile.am b/gettext-tools/gnulib-lib/Makefile.am index 589a1e488..939b4ba38 100644 --- a/gettext-tools/gnulib-lib/Makefile.am +++ b/gettext-tools/gnulib-lib/Makefile.am @@ -1,5 +1,5 @@ ## Makefile for the gettext-tools/gnulib-lib subdirectory of GNU gettext -## Copyright (C) 1995-1998, 2000-2006, 2009, 2016 Free Software +## Copyright (C) 1995-1998, 2000-2006, 2009, 2016, 2019 Free Software ## Foundation, Inc. ## ## This program is free software: you can redistribute it and/or modify @@ -66,6 +66,15 @@ if OS2 libgettextlib_la_LDFLAGS += -os2dllname gtlib endif +# Specify installation directory, for --enable-relocatable. +if RELOCATABLE_VIA_LD +# This is needed, because libgettextlib depends on libintl. +libgettextlib_la_LDFLAGS += `$(RELOCATABLE_LDFLAGS) $(libdir)` +endif + +# Support for relocatability. +RELOCATABLE_LIBRARY_PATH = $(libdir) + # Linking with C++ libraries is needed _only_ on mingw and Cygwin. if !WOE32DLL libgettextlib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am index 4398b7fc8..076b14b9a 100644 --- a/gettext-tools/libgettextpo/Makefile.am +++ b/gettext-tools/libgettextpo/Makefile.am @@ -122,6 +122,15 @@ if OS2 libgettextpo_la_LDFLAGS += -os2dllname gtpo endif +# Specify installation directory, for --enable-relocatable. +if RELOCATABLE_VIA_LD +# This is needed, because libgettextpo depends on libintl. +libgettextpo_la_LDFLAGS += `$(RELOCATABLE_LDFLAGS) $(libdir)` +endif + +# Support for relocatability. +RELOCATABLE_LIBRARY_PATH = $(libdir) + # Version information according to Woe32 conventions. EXTRA_DIST += libgettextpo.rc if WOE32 diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index 1a829acd1..d08d9d2e9 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -1,5 +1,5 @@ ## Makefile for the gettext-tools/src subdirectory of GNU gettext -## Copyright (C) 1995-1998, 2000-2018 Free Software Foundation, Inc. +## Copyright (C) 1995-1998, 2000-2019 Free Software Foundation, Inc. ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -275,6 +275,12 @@ libgettextsrc_la_LDFLAGS += -Wl,--export-all-symbols libgettextsrc_la_CPPFLAGS += $(GETTEXTLIB_EXPORTS_FLAGS) endif +# Specify installation directory, for --enable-relocatable. +if RELOCATABLE_VIA_LD +# This is needed, because libgettextsrc depends on libgettextlib and libintl. +libgettextsrc_la_LDFLAGS += `$(RELOCATABLE_LDFLAGS) $(libdir)` +endif + # No need to install libgettextsrc.a, except on AIX. install-exec-hook: install-exec-clean install-exec-clean: