1dnl Check for iconv
2
3m4_include([m4/reorganization/libs/iconv.m4])
4
5if test "x$with_iconv" != "xno"; then
6  AM_ICONV
7  AC_CHECK_HEADERS([iconv.h],[],[],[#include <stdlib.h>])
8  if test "x$am_cv_func_iconv" = "xyes"; then
9    AC_CHECK_HEADERS([localcharset.h])
10    am_save_LIBS="$LIBS"
11    LIBS="${LIBS} ${LIBICONV}"
12    AC_CHECK_FUNCS([locale_charset])
13    LIBS="${am_save_LIBS}"
14    if test "x$ac_cv_func_locale_charset" != "xyes"; then
15      # If locale_charset() is not in libiconv, we have to find libcharset.
16      AC_CHECK_LIB(charset,locale_charset)
17    fi
18  fi
19fi
20