]> sjero.net Git - wget/commitdiff
[svn] Prefer gettext with explicitly linked libintl, so non-standard libintl's
authorhniksic <devnull@localhost>
Fri, 10 Oct 2003 13:02:56 +0000 (06:02 -0700)
committerhniksic <devnull@localhost>
Fri, 10 Oct 2003 13:02:56 +0000 (06:02 -0700)
get picked up along with their includes.

ChangeLog
aclocal.m4

index a150389e9ffde8612926adeb8e27ee72cfb74656..c22d34799c2dfabbab327209b8b6b96bcd473753 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * aclocal.m4 (WGET_WITH_NLS): First check for gettext in libintl,
+       then use the libc version.  That way systems that get libintl.h
+       from /usr/local/include will get the matching gettext.
+
 2003-10-10  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * po/tr.po: Ditto.
index f55b502fb511f8c1f851c98454d2aa9f66e9b49a..753ad2ab76554e2514d38ecfaedf563162f28046 100644 (file)
@@ -278,14 +278,19 @@ AC_DEFUN(WGET_WITH_NLS,
 
       AC_CHECK_HEADERS(locale.h libintl.h)
 
-      AC_CHECK_FUNCS(gettext, [], [
-       AC_CHECK_LIB(intl, gettext, [
-          dnl gettext is in libintl; announce the fact manually.
-          LIBS="-lintl $LIBS"
-         AC_DEFINE(HAVE_GETTEXT)
-        ], [
-         AC_MSG_RESULT(
-           [gettext not found; disabling NLS])
+      dnl Prefer gettext found in -lintl to the one in libc.
+      dnl Otherwise it can happen that we include libintl.h from
+      dnl /usr/local/lib, but fail to specify -lintl, which results in
+      dnl link or run-time failures.  (Symptom: libintl_bindtextdomain
+      dnl not found at link-time.)
+
+      AC_CHECK_LIB(intl, gettext, [
+        dnl gettext is in libintl; announce the fact manually.
+        LIBS="-lintl $LIBS"
+       AC_DEFINE(HAVE_GETTEXT)
+      ], [
+        AC_CHECK_FUNCS(gettext, [], [
+          AC_MSG_RESULT([gettext not found; disabling NLS])
           HAVE_NLS=no
         ])
       ])