* 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.
## 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
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 \
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
## 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
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: