summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2009-03-17 21:16:01 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2009-03-17 21:16:01 +0000
commitf6cacbfecd16ac9d19ee6fe6c26c107ee4846b1c (patch)
treefb3166c26b8f211814f8302719f5bd93842aa575 /configure.ac
parent8d719b57aa95b8a2baebd8fd13c6b80c2da84680 (diff)
downloadpcre-f6cacbfecd16ac9d19ee6fe6c26c107ee4846b1c.tar.gz
Add support for UTF-8 in EBCDIC environments.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@391 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 18 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index f5dabf0..7b7c46f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,7 +102,7 @@ AC_ARG_ENABLE(rebuild-chartables,
# Handle --enable-utf8 (disabled by default)
AC_ARG_ENABLE(utf8,
AS_HELP_STRING([--enable-utf8],
- [enable UTF-8 support]),
+ [enable UTF-8 support (incompatible with --enable-ebcdic)]),
, enable_utf8=unset)
# Handle --enable-unicode-properties
@@ -150,7 +150,7 @@ AC_ARG_ENABLE(bsr-anycrlf,
# Handle --enable-ebcdic
AC_ARG_ENABLE(ebcdic,
AS_HELP_STRING([--enable-ebcdic],
- [assume EBCDIC coding rather than ASCII; use this only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]),
+ [assume EBCDIC coding rather than ASCII; incompatible with --enable-utf8; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]),
, enable_ebcdic=no)
# Handle --disable-stack-for-recursion
@@ -226,10 +226,17 @@ then
fi
# Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled.
+# Also check that UTF-8 support is not requested, because PCRE cannot handle
+# EBCDIC and UTF-8 in the same build. To do so it would need to use different
+# character constants depending on the mode.
#
if test "x$enable_ebcdic" = "xyes"
then
enable_rebuild_chartables=yes
+ if test "x$enable_utf8" = "xyes"
+ then
+ AC_MSG_ERROR([support for EBCDIC and UTF-8 cannot be enabled at the same time])
+ fi
fi
# Convert the newline identifier into the appropriate integer value.
@@ -381,7 +388,10 @@ fi
if test "$enable_utf8" = "yes"; then
AC_DEFINE([SUPPORT_UTF8], [], [
- Define to enable support for the UTF-8 Unicode encoding.])
+ Define to enable support for the UTF-8 Unicode encoding. This will
+ work even in an EBCDIC environment, but it is incompatible with
+ the EBCDIC macro. That is, PCRE can support *either* EBCDIC code
+ *or* ASCII/UTF-8, but not both at once.])
fi
if test "$enable_unicode_properties" = "yes"; then
@@ -502,7 +512,11 @@ if test "$enable_ebcdic" = "yes"; then
AC_DEFINE_UNQUOTED([EBCDIC], [], [
If you are compiling for a system that uses EBCDIC instead of ASCII
character codes, define this macro as 1. On systems that can use
- "configure", this can be done via --enable-ebcdic.])
+ "configure", this can be done via --enable-ebcdic. PCRE will then
+ assume that all input strings are in EBCDIC. If you do not define
+ this macro, PCRE will assume input strings are ASCII or UTF-8 Unicode.
+ It is not possible to build a version of PCRE that supports both
+ EBCDIC and UTF-8.])
fi
# Platform specific issues