adds -liconv when iconv_close is in libiconv
akir akir
1 files changed,
11 insertions(+),
0 deletions(-)
jump to
M
configure.in
→
configure.in
@@ -84,6 +84,17 @@ ],
[ AC_MSG_RESULT([yes (non const msg)])], [ AC_DEFINE(HAVE_CONST_ICONV, 1, "iconv") 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 AC_MSG_RESULT([no]) fi