checking for const msg in iconv
This commit is contained in:
parent
82de6ace6d
commit
622af75c92
1 changed files with 13 additions and 2 deletions
15
configure.in
15
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.h>],
|
||||
[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 <iconv.h>],
|
||||
[
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue