summaryrefslogtreecommitdiff
path: root/source3/aclocal.m4
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2003-08-13 21:29:59 +0000
committerRichard Sharpe <sharpe@samba.org>2003-08-13 21:29:59 +0000
commit7a56a78964cb148f632cc1dcfcf4c9feecc4ed17 (patch)
tree4fdbdf91467cec99b5ec0fff82ee27b9ca0761d3 /source3/aclocal.m4
parent1a43ca5ace8e36b7e0b7b4503e8e0522dbf1127d (diff)
downloadsamba-7a56a78964cb148f632cc1dcfcf4c9feecc4ed17.tar.gz
samba-7a56a78964cb148f632cc1dcfcf4c9feecc4ed17.tar.bz2
samba-7a56a78964cb148f632cc1dcfcf4c9feecc4ed17.zip
This is an intermediate commit ... we check for three different charsets
in an iconv_open to be more robust. However, what we really want to do is find the name for something like CP850, which can be IBM850 on Solaris, and we might want to also check for ISO-8859-1. So, this commit adds a macro to aclocal.m4 that can check for a specific charset. (This used to be commit 81dc28ca82b94d1bc42f96273f6cefac6ca1848c)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r--source3/aclocal.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index acf36c6cbb..b069c516ed 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -609,6 +609,25 @@ AC_DEFUN(jm_ICONV,
fi
])
+AC_DEFUN(rjs_CHARSET
+[
+ dnl Find out if we can convert from $1 to UCS2-LE
+ AC_MSG_CHECKING(we can convert from $1 to UCS2-LE)
+ AC_TRY_RUN([
+#include <$jm_cv_include>
+main(){
+ iconv_t cd = iconv_open("$1", "UCS-2LE");
+ if (cd == 0 || cd == (iconv_t)-1) {
+ return -1;
+ }
+ return 0;
+}
+ ],ICONV_CHARSET=$1,ICONV_CHARSET="",])
+ if test x"$ICONV_CHARSET" != x; then
+ AC_MSG_RESULT($ICONV_CHARSET)
+ fi
+])
+
dnl CFLAGS_ADD_DIR(CFLAGS, $INCDIR)
dnl This function doesn't add -I/usr/include into CFLAGS
AC_DEFUN(CFLAGS_ADD_DIR,[