intltool.m4 gets DATADIRNAME wrong for non-glibc platforms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
intltool |
Triaged
|
Medium
|
Unassigned |
Bug Description
intltool.m4 has a AC_LANG_PROGRAM check for checking if _nl_msg_cat_cntr symbol is available. However, the check only looks in libc, and thus fails if the symbols are in an external library. In e.g. a mingw environment, the symbol is in libintl library instead.
As a quick hack, I've added LIBS="$LIBS -lintl" to intltool.m4 and it fixes the check for me. Hardcoding -lintl here isn't obviously correct. How should we handle this?
# Set DATADIRNAME correctly if it is not set yet
# (copied from glib-gettext.m4)
if test -z "$DATADIRNAME"; then
+ intl_save_
+ LIBS="$LIBS -lintl"
AC_LINK_IFELSE(
[AC_
[DATADIRNA
[case $host in
*-*-solaris*)
dnl On Solaris, if bind_textdomain
dnl GNU format message catalog is always supported,
dnl since both are added to the libc all together.
dnl Hence, we'd like to go with DATADIRNAME=share
dnl in this case.
AC_
;;
*)
[DATADIRNA
;;
esac])
+ LIBS=$intl_
fi
AC_SUBST(
Also compare to how glib-gettext.m4 sets LIBS= to the detected intl library before doing a similar check: git.gnome. org/browse/ glib/tree/ m4macros/ glib-gettext. m4#n206
http://