summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in26
1 files changed, 24 insertions, 2 deletions
diff --git a/source3/configure.in b/source3/configure.in
index a7b51578ff..ce66eef973 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -995,13 +995,35 @@ if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
AC_DEFINE(HAVE_UX_UT_SYSLEN)
fi
+
+#################################################
+# check for libiconv support
+AC_MSG_CHECKING(whether to use libiconv)
+AC_ARG_WITH(libiconv,
+[ --with-libiconv=BASEDIR use libiconv in BASEDIR/lib and BASEDIR/include
+ --without-libiconv Don't use libiconv library],
+[ case "$withval" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ CFLAGS="$CFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ AC_CHECK_LIB(iconv, iconv_open)
+ ;;
+ esac ],
+ AC_MSG_RESULT(no)
+)
+
+
############
-# check for iconv in libc, and if not then we build our own
+# check for iconv in libc
AC_CACHE_CHECK([for working iconv],samba_cv_HAVE_NATIVE_ICONV,[
AC_TRY_RUN([
#include <iconv.h>
main() {
- iconv_t cd = iconv_open("ASCII", "UCS2");
+ iconv_t cd = iconv_open("ASCII", "UCS-2LE");
if (cd == 0 || cd == (iconv_t)-1) return -1;
return 0;
}