about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2005-08-16 23:16:27 +0000
committerWayne Davison <wayned@users.sourceforge.net>2005-08-16 23:16:27 +0000
commit27c6fd0ad20cb7e5f4c4b80bb49193fd33e1f203 (patch)
treef00157ae4936d82ee8b68d2f33d934c5831362f6
parent6a07e4da046fdd72cc41aa7f38bcdef404a8f524 (diff)
downloadzsh-27c6fd0ad20cb7e5f4c4b80bb49193fd33e1f203.tar.gz
zsh-27c6fd0ad20cb7e5f4c4b80bb49193fd33e1f203.tar.xz
zsh-27c6fd0ad20cb7e5f4c4b80bb49193fd33e1f203.zip
Added --enable-/disable-multibyte support, with the default being to
check for multibyte support and define ZLE_UNICODE_SUPPORT accordingly.
-rw-r--r--configure.ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f66b2ddf1..62e5d4a4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2063,6 +2063,37 @@ int ptsname();], ,
    fi
 fi
 
+dnl ---------------------
+dnl multibyte ZLE support
+dnl ---------------------
+AC_ARG_ENABLE(multibyte,
+[  --enable-multibyte         support multibyte chars in the zsh line editor],
+[zsh_cv_c_zle_unicode_support=$enableval],
+[AC_CACHE_CHECK(if the system adequately supports multibyte chars,
+ zsh_cv_c_zle_unicode_support,
+  [AC_TRY_COMPILE([
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+   ], [
+int main() {
+#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) \
+ && defined(HAVE_MBRTOWC) && defined(HAVE_WCRTOMB) \
+ && defined (__STDC_ISO_10646__)
+    return 0;
+#else
+# error Not supported.
+#endif
+}
+  ],
+    zsh_cv_c_zle_unicode_support=yes,
+    zsh_cv_c_zle_unicode_support=no)])
+])
+AH_TEMPLATE([ZLE_UNICODE_SUPPORT],
+[Define to 1 if you want unicode support in the line editor.])
+if test $zsh_cv_c_zle_unicode_support = yes; then
+  AC_DEFINE(ZLE_UNICODE_SUPPORT)
+fi
 
 dnl ---------------
 dnl dynamic loading