$OpenBSD: patch-aclocal_m4,v 1.1 2004/10/05 14:15:22 naddy Exp $
--- aclocal.m4.orig	Sat May 11 01:58:56 2002
+++ aclocal.m4	Sat Sep 25 19:01:53 2004
@@ -10,6 +10,7 @@ dnl but WITHOUT ANY WARRANTY, to the ext
 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 dnl PARTICULAR PURPOSE.
 
+m4_include(iconv.m4)
 
 dnl AC_PROG_INTLTOOL([MINIMUM-VERSION])
 # serial 1 AC_PROG_INTLTOOL
@@ -182,12 +183,12 @@ AC_DEFUN(AM_GLIB_WITH_NLS,
 	        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)])
+		  gt_cv_func_dgettext_libintl=no, $LIBICONV)],
+	        gt_cv_func_dgettext_libintl=no)],, $LIBICONV)
 	  fi
 
           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-	    LIBS="$LIBS -lintl";
+	    LIBS="$LIBS -lintl $LIBICONV";
           fi
 
 	  if test "$gt_cv_func_dgettext_libc" = "yes" \
@@ -293,6 +294,7 @@ unistd.h sys/param.h])
    AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
 strdup __argz_count __argz_stringify __argz_next])
 
+   AM_ICONV
    AM_LC_MESSAGES
    AM_GLIB_WITH_NLS
 
