summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in15
1 files 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));
63], 63],
64[AC_MSG_RESULT(no)]) 64[AC_MSG_RESULT(no)])
65 65
66AC_MSG_CHECKING([iconv]) 66AC_MSG_CHECKING([for iconv])
67AC_TRY_COMPILE( 67AC_TRY_COMPILE(
68[#include <iconv.h>], 68[#include <iconv.h>],
69[iconv_t cd = iconv_open("", "")], 69[iconv_t cd = iconv_open("", "")],
@@ -72,7 +72,18 @@ HAVE_ICONV=no)
72 72
73if test x"$HAVE_ICONV" = x"yes"; then 73if test x"$HAVE_ICONV" = x"yes"; then
74 AC_DEFINE(HAVE_ICONV, 1, "iconv") 74 AC_DEFINE(HAVE_ICONV, 1, "iconv")
75 AC_MSG_RESULT([yes]) 75dnl now check for const char *msg argument in iconv(..)
76 AC_TRY_COMPILE(
77 [#include <iconv.h>],
78 [
79 char **msg, **new_msg;
80 size_t result, inleft, outleft;
81 result = iconv((iconv_t)(-1), msg, &inleft, new_msg, &outleft);
82 return 0;
83 ],
84 [ AC_MSG_RESULT([yes (non const msg)])],
85 [ AC_DEFINE(HAVE_CONST_ICONV, 1, "iconv")
86 AC_MSG_RESULT([yes (const msg)])])
76else 87else
77 AC_MSG_RESULT([no]) 88 AC_MSG_RESULT([no])
78fi 89fi