$NetBSD: patch-am,v 1.1 2004/06/09 05:42:31 taca Exp $ --- configure.in.orig Fri Aug 15 12:58:57 2003 +++ configure.in @@ -26,7 +26,7 @@ dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/stat.h unistd.h) AC_CHECK_HEADERS(sys/param.h sys/types.h netinet/in.h) -AC_CHECK_HEADERS(io.h windows.h) +AC_CHECK_HEADERS(io.h windows.h iconv.h) AC_MSG_CHECKING([for darts.h]) AC_ARG_WITH(darts, @@ -55,8 +55,13 @@ AC_ARG_WITH(libiconv, AC_SUBST(ICONV_CFLAGS) fi]) -AC_CHECK_LIB(iconv, iconv, [], [ - AC_CHECK_HEADER(iconv.h, [], AC_MSG_ERROR([ChaSen needs iconv]))]) +AC_MSG_CHECKING([iconv()]) +save_libs="$LIBS" +LIBS="$LIBS -liconv" +ac_cv_lib_iconv_iconv=no +AC_TRY_LINK([#include ], [iconv(0, 0, 0, 0, 0)], + [ac_cv_lib_iconv_iconv=yes], [AC_MSG_ERROR([ChaSen needs iconv])]) +AC_MSG_RESULT($ac_cv_lib_iconv_iconv) AC_DEFUN(cl_VAR_ICONV_ARG, [ for CODE in $2; do