diff options
-rw-r--r-- | configure.in | 9 | ||||
-rw-r--r-- | iconv-detect.c | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 03cc1e6206..85e864a8a6 100644 --- a/configure.in +++ b/configure.in @@ -144,12 +144,15 @@ save_CFLAGS="$CFLAGS" save_LIBS="$LIBS" CFLAGS="$CFLAGS $ICONV_CFLAGS" LIBS="$LIBS $ICONV_LIBS -liconv" -AC_CACHE_CHECK(for iconv in -liconv, ac_cv_libiconv, AC_TRY_LINK([ +AC_CACHE_CHECK(for iconv in -liconv, ac_cv_libiconv, AC_TRY_RUN([ #include <iconv.h> -], [ + +int main (int argc, char **argv) +{ iconv_t cd; cd = iconv_open ("UTF-8", "ISO-8859-1"); -], ac_cv_libiconv=yes, ac_cv_libiconv=no)) +} +], ac_cv_libiconv=yes, ac_cv_libiconv=no, ac_cv_libiconv=no)) if test $ac_cv_libiconv = yes; then ICONV_LIBS="$ICONV_LIBS -liconv" have_iconv=yes diff --git a/iconv-detect.c b/iconv-detect.c index 899d07f239..67dbd8e6bf 100644 --- a/iconv-detect.c +++ b/iconv-detect.c @@ -22,6 +22,7 @@ #include <stdio.h> +#include <stdlib.n> #include <iconv.h> enum { |