003-libintl-compatibility.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --- a/libelf/libelfP.h
  2. +++ b/libelf/libelfP.h
  3. @@ -39,6 +39,9 @@
  4. #include <stdio.h>
  5. #include <string.h>
  6. +#ifdef _ /* fix libintl-stub */
  7. +#undef _
  8. +#endif
  9. /* gettext helper macros. */
  10. #define _(Str) dgettext ("elfutils", Str)
  11. --- a/libdw/libdwP.h
  12. +++ b/libdw/libdwP.h
  13. @@ -35,7 +35,9 @@
  14. #include <libdw.h>
  15. #include <dwarf.h>
  16. -
  17. +#ifdef _ /* fix libintl-stub */
  18. +#undef _
  19. +#endif
  20. /* gettext helper macros. */
  21. #define _(Str) dgettext ("elfutils", Str)
  22. --- a/libdwfl/libdwflP.h
  23. +++ b/libdwfl/libdwflP.h
  24. @@ -43,6 +43,9 @@
  25. typedef struct Dwfl_Process Dwfl_Process;
  26. +#ifdef _ /* fix libintl-stub */
  27. +#undef _
  28. +#endif
  29. /* gettext helper macros. */
  30. #define _(Str) dgettext ("elfutils", Str)
  31. --- a/libasm/libasmP.h
  32. +++ b/libasm/libasmP.h
  33. @@ -35,6 +35,9 @@
  34. #include "libdwelf.h"
  35. +#ifdef _ /* fix libintl-stub */
  36. +#undef _
  37. +#endif
  38. /* gettext helper macros. */
  39. #define _(Str) dgettext ("elfutils", Str)
  40. --- a/config/libelf.pc.in
  41. +++ b/config/libelf.pc.in
  42. @@ -8,7 +8,7 @@ Description: elfutils libelf library to
  43. Version: @VERSION@
  44. URL: http://elfutils.org/
  45. -Libs: -L${libdir} -lelf
  46. +Libs: -L${libdir} -lelf @intl_LDFLAGS@
  47. Cflags: -I${includedir}
  48. Requires.private: zlib
  49. --- a/configure.ac
  50. +++ b/configure.ac
  51. @@ -543,6 +543,9 @@ AC_CONFIG_FILES([config/libelf.pc config
  52. AC_SUBST(USE_NLS, yes)
  53. AM_PO_SUBDIRS
  54. +case "$USE_NLS" in yes) intl_LDFLAGS="-lintl" ;; esac
  55. +AC_SUBST([intl_LDFLAGS])
  56. +
  57. dnl Appended to the config.h file.
  58. dnl We hide all kinds of configuration magic in lib/eu-config.h.
  59. AH_BOTTOM([#include <eu-config.h>])