adds -liconv when iconv_close is in libiconv

This commit is contained in:
akir 2004-09-02 16:51:54 +00:00
parent 312828fdbe
commit 8d87514b90

View file

@ -84,6 +84,17 @@ dnl now check for const char *msg argument in iconv(..)
[ AC_MSG_RESULT([yes (non const msg)])], [ AC_MSG_RESULT([yes (non const msg)])],
[ AC_DEFINE(HAVE_CONST_ICONV, 1, "iconv") [ AC_DEFINE(HAVE_CONST_ICONV, 1, "iconv")
AC_MSG_RESULT([yes (const msg)])]) AC_MSG_RESULT([yes (const msg)])])
dnl Check if iconv is part of libiconv
AC_CHECK_LIB(iconv, iconv_close,
AC_MSG_CHECKING([for iconv_close in libiconv])
AC_TRY_LINK(
#include <iconv.h>,
[int main() { return iconv_close((iconv_t)(-1)); }],
AC_MSG_RESULT([yes]),
LIBS="$LIBS -liconv"
)
)
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi