Using AM_ICONV for better detection of libiconv.

This commit is contained in:
Vincent Richard 2005-08-26 20:30:19 +00:00
parent dbdfee6fb5
commit 16465a0f17

View File

@ -1164,11 +1164,28 @@ AM_SANITY_CHECK
AM_PROG_LIBTOOL
AM_PROG_CC_C_O
AM_ICONV
#
# Some checks
#
# -- iconv
AC_MSG_CHECKING([if an usable version of iconv exists (required)])
AC_TRY_LINK(
[
#include <iconv.h>
],[
iconv_t x = iconv_open("", "");
return 0;
],[
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
AC_ERROR(no usable version of iconv has been found)
])
# -- global constructors (stolen from 'configure.in' in libsigc++)
AC_MSG_CHECKING([if linker supports global constructors])
cat > mylib.$ac_ext <<EOF