summaryrefslogtreecommitdiff
path: root/m4macros
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-05-21 19:09:37 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-05-21 19:09:37 +0000
commit679d9be8a58a711f9e05073e52a1456ff4d0a664 (patch)
treecfd34cd5a30984483244534f86aa981e6bc42d64 /m4macros
parentea3db7ce061d19e11914f3d86720c613630d48ce (diff)
Move iconv tests before gettext checks. (#81999)
Mon May 20 18:02:46 2002 Owen Taylor <otaylor@redhat.com> * configure.in: Move iconv tests before gettext checks. (#81999) * m4macros/glib-gettext.m4 acinclude.m4: If we can't link to gettext, try adding in -liconv. (#80076, Boyd Lynn Gerber) * m4macros/glib-gettext.m4 acinclude.m4: Suppress warnings about xgettext not being GNU gettext when libintl wasn't found at all. (#79016, Andrew P. Lentvorski, Jr.)
Diffstat (limited to 'm4macros')
-rw-r--r--m4macros/glib-gettext.m428
1 files changed, 18 insertions, 10 deletions
diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4
index 1be1ec6a4..fb4f36105 100644
--- a/m4macros/glib-gettext.m4
+++ b/m4macros/glib-gettext.m4
@@ -85,24 +85,32 @@ AC_DEFUN(AM_GLIB_WITH_NLS,
nls_cv_header_intl=
nls_cv_header_libgt=
CATOBJEXT=NONE
+ XGETTEXT=:
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
- if test "$gt_cv_func_dgettext_libc" != "yes"; then
+ gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
+
+ if test "$gt_cv_func_dgettext_libc" != "yes" ; then
AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for dgettext in libintl],
- gt_cv_func_dgettext_libintl,
- [AC_CHECK_LIB(intl, dgettext,
- gt_cv_func_dgettext_libintl=yes,
- gt_cv_func_dgettext_libintl=no)],
- gt_cv_func_dgettext_libintl=no)])
- fi
+ [AC_CHECK_LIB(intl, dgettext,
+ gt_cv_func_dgettext_libintl=yes)])
+
+ if test "$gt_cv_func_dgettext_libc" != "yes" ; then
+ AC_MSG_NOTICE([Seeing if -liconv is needed to use gettext])
+ AC_CHECK_LIB(intl, dcgettext,
+ [gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv],
+ :,-liconv)
+ fi
+ fi
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
- LIBS="$LIBS -lintl";
+ LIBS="$LIBS -lintl $libintl_extra_libs";
fi
if test "$gt_cv_func_dgettext_libc" = "yes" \
@@ -129,7 +137,7 @@ AC_DEFUN(AM_GLIB_WITH_NLS,
# Added by Martin Baulig 12/15/98 for libc5 systems
if test "$gt_cv_func_dgettext_libc" != "yes" \
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
- INTLLIBS=-lintl
+ INTLLIBS="-lintl $libintl_extra_libs"
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
fi
])