summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-25 03:05:00 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-25 03:05:00 +0000
commit950d274bd9ba40167dfa386083017346e07bbadd (patch)
tree844435264f59d2163db0c37f90d1d68599d789ed /source3/configure.in
parente9968db4f365b922273ae8c1e0b01a005dd5871e (diff)
downloadsamba-950d274bd9ba40167dfa386083017346e07bbadd.tar.gz
samba-950d274bd9ba40167dfa386083017346e07bbadd.tar.bz2
samba-950d274bd9ba40167dfa386083017346e07bbadd.zip
added a --with-libiconv=BASEDIR/ option to allow easier use of an
alternative iconv library (This used to be commit cfb6e67bb92f9d73aadabebae3ea5baeb07158a0)
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;
}