From 371e3f8a9150cf451b67435994faa9ad5a9b8b8d Mon Sep 17 00:00:00 2001 From: mathias Date: Thu, 21 Apr 2005 19:48:46 +0000 Subject: this should REALLY fix it. --- configure.in | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index c525f64..604c5eb 100644 --- a/configure.in +++ b/configure.in @@ -96,18 +96,17 @@ if test "x$ac_found_iconv" = "xyes"; then AC_CACHE_CHECK(for iconv declaration, ac_cv_iconv_const, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]], - [[#ifdef __cplusplus - "C" - #endif - #if defined(__STDC__) || defined(__cplusplus) - size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); - #else - size_t iconv(); - #endif]])], - [ac_cv_iconv_const=], - [ac_cv_iconv_const=const])]) - AC_DEFINE_UNQUOTED([HAVE_CONST_ICONV], $ac_cv_iconv_const, - [Define as const if the declaration of iconv() needs const.]) + [[ + char **msg, **new_msg; + size_t result, inleft, outleft; + result = iconv((iconv_t)(-1), msg, &inleft, new_msg, &outleft); + return 0; + ]])], + [ac_cv_iconv_const=no], + [ac_cv_iconv_const=yes])]) + if test "x$ac_cv_iconv_const" = xyes; then + AC_DEFINE(HAVE_CONST_ICONV, 1, [Define if you have the iconv() function.]) + fi fi -- cgit v0.11.2