diff options
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | configure.in | 9 | ||||
| -rw-r--r-- | iconv-detect.c | 1 |
3 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * configure.in: Use AC_TRY_RUN instead of AC_TRY_LINK when checking + for iconv() in -liconv (#388788). Patch from Elijah Newren. + + * iconv-detect.c: Fix an implicit function declaration. + 2007-03-26 Harish Krishnaswamy <harish.krishnaswamy@gmail.com> * MAINTAINERS : Updates on the new guards. diff --git a/configure.in b/configure.in index 2ca966ca7..5d23d15d0 100644 --- a/configure.in +++ b/configure.in @@ -237,12 +237,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 7c1858a8e..96b4ed132 100644 --- a/iconv-detect.c +++ b/iconv-detect.c @@ -21,6 +21,7 @@ */ #include <stdio.h> +#include <stdlib.h> #include <iconv.h> enum { |
