]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Make shared library dependencies work in relocatable installation.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Mar 2019 17:26:16 +0000 (18:26 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 4 Mar 2019 17:26:16 +0000 (18:26 +0100)
* 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.

gettext-tools/gnulib-lib/Makefile.am
gettext-tools/libgettextpo/Makefile.am
gettext-tools/src/Makefile.am

index 589a1e488b5d2f858ba33cebd24c1fd1f7b74b34..939b4ba383f8b18a1cf39b1293836f24f5c809d6 100644 (file)
@@ -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 \
index 4398b7fc8004ac7776b87a4b3142ac1c18635032..076b14b9a50ea8808e20074eb0bc1a45d94a7c8d 100644 (file)
@@ -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
index 1a829acd1d54e44599e13085f824b7574ae92890..d08d9d2e9f044951260f0470ac2bb14b13e7a9a8 100644 (file)
@@ -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: