003-libintl-compatibility.patch 1.5 KB

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