$NetBSD: patch-am,v 1.2 2007/08/02 15:03:11 taca Exp $ --- configure.in.orig 2007-07-03 14:52:16.000000000 +0900 +++ configure.in @@ -33,7 +33,7 @@ dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/param.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]) # Checks for typedefs, structures, and compiler characteristics. @@ -76,8 +76,12 @@ 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]))]) +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