0002-Link-against-libintl-when-needed.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 008e7dc0ae46281360be62b7d69cd13e0a7f7e14 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sun, 7 Feb 2016 18:24:35 +0100
  4. Subject: [PATCH] Link against libintl when needed
  5. Since the kbd code uses gettext functionality, it should link with the
  6. libintl library using the @INTLLIBS@ symbol provided by the gettext m4
  7. macro. This is necessary on C libraries that don't provide a built-in
  8. gettext functionality, and rely on the libintl library provided by
  9. gettext, as is the case with the uClibc C library.
  10. @INTLLIBS@ is empty when linking a separate library is not needed, as
  11. is the case with the glibc C library.
  12. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  13. ---
  14. src/Makefile.am | 2 +-
  15. tests/Makefile.am | 2 +-
  16. 2 files changed, 2 insertions(+), 2 deletions(-)
  17. diff --git a/src/Makefile.am b/src/Makefile.am
  18. index 40e8083..d4e0583 100644
  19. --- a/src/Makefile.am
  20. +++ b/src/Makefile.am
  21. @@ -80,7 +80,7 @@ mapscrn_CFLAGS = -DMAIN
  22. loadunimap_CFLAGS = -DMAIN
  23. noinst_LIBRARIES = libcommon.a libfont.a
  24. -LDADD = libcommon.a libfont.a libkeymap/libkeymap.la
  25. +LDADD = libcommon.a libfont.a libkeymap/libkeymap.la @INTLLIBS@
  26. install-exec-hook:
  27. for i in psfaddtable psfgettable psfstriptable; do \
  28. diff --git a/tests/Makefile.am b/tests/Makefile.am
  29. index 1976333..848fd31 100644
  30. --- a/tests/Makefile.am
  31. +++ b/tests/Makefile.am
  32. @@ -4,7 +4,7 @@ AM_CPPFLAGS = \
  33. -DDATADIR=\"$(srcdir)\" -DBUILDDIR=\"$(builddir)\"
  34. AM_CFLAGS = $(CHECK_CFLAGS)
  35. -LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS)
  36. +LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) @INTLLIBS@
  37. EXTRA_DIST = \
  38. alt-is-meta.in \
  39. --
  40. 2.6.4