Situation:
- system has gettext & co in libc
- standalone libintl also installed
- <libintl.h> comes from libintl, not libc

Issue:
- libintl.h defines gettext & co with a prefix to avoid
  link issues with the symbols in libc
  => gettext.m4 detects this properly by looking for
     bindtextdomain in -lintl, BUT does not do anything
     with this information other than flagging the
     available gettext as GNU.
  => none of the executable link (due to missing references
     to libintl_gettext() etc.)

Resolution:
- update gettext.m4 to modern libintl configury
- or, failing that, adjust gettext.m4 as shown below to ensure
  INTLLIBS gets set properly.  In this case there may remain
  issues on systems that have a libintl that requires iconv()
  and iconv() is only available from a standalone library
  (=> additional -liconv needed in INTLLIBS).

Index: gettext.m4
===================================================================
RCS file: /cvs/src/src/gettext.m4,v
retrieving revision 1.6
diff -u -r1.6 gettext.m4
--- gettext.m4  31 Jan 2005 20:29:41 -0000      1.6
+++ gettext.m4  20 Jul 2005 08:14:59 -0000
@@ -55,6 +55,9 @@
                 gt_cv_func_gettext_libintl=no)])])
           fi

+          dnl FIXME: recent libintl may need -liconv too
+          test "$gt_cv_func_gettext_libintl" = "yes" && INTLLIBS=-lintl
+
           if test "$gt_cv_func_gettext_libc" = "yes" \
              || test "$gt_cv_func_gettext_libintl" = "yes"; then
              AC_DEFINE(HAVE_GETTEXT, 1,


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to