From 622af75c929bfc3f49e3a13775f356be1fd17ee6 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 31 Aug 2004 21:25:33 +0000 Subject: checking for const msg in iconv --- configure.in | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 3bb27b2..cfacf35 100644 --- a/configure.in +++ b/configure.in @@ -63,7 +63,7 @@ size_t x = strftime(s, 5, "%a", localtime(&t)); ], [AC_MSG_RESULT(no)]) -AC_MSG_CHECKING([iconv]) +AC_MSG_CHECKING([for iconv]) AC_TRY_COMPILE( [#include ], [iconv_t cd = iconv_open("", "")], @@ -72,7 +72,18 @@ HAVE_ICONV=no) if test x"$HAVE_ICONV" = x"yes"; then AC_DEFINE(HAVE_ICONV, 1, "iconv") - AC_MSG_RESULT([yes]) +dnl now check for const char *msg argument in iconv(..) + AC_TRY_COMPILE( + [#include ], + [ + char **msg, **new_msg; + size_t result, inleft, outleft; + result = iconv((iconv_t)(-1), msg, &inleft, new_msg, &outleft); + return 0; + ], + [ AC_MSG_RESULT([yes (non const msg)])], + [ AC_DEFINE(HAVE_CONST_ICONV, 1, "iconv") + AC_MSG_RESULT([yes (const msg)])]) else AC_MSG_RESULT([no]) fi -- cgit v0.11.2