--- embedaddon/pcre/configure	2012/02/21 23:05:51	1.1.1.1
+++ embedaddon/pcre/configure	2012/10/09 09:19:17	1.1.1.3
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for PCRE 8.21.
+# Generated by GNU Autoconf 2.68 for PCRE 8.31.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='PCRE'
 PACKAGE_TARNAME='pcre'
-PACKAGE_VERSION='8.21'
-PACKAGE_STRING='PCRE 8.21'
+PACKAGE_VERSION='8.31'
+PACKAGE_STRING='PCRE 8.31'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -613,27 +613,34 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
-LIBREADLINE
 LIBBZ2
 LIBZ
 DISTCHECK_CONFIGURE_FLAGS
 EXTRA_LIBPCRECPP_LDFLAGS
 EXTRA_LIBPCREPOSIX_LDFLAGS
+EXTRA_LIBPCRE16_LDFLAGS
 EXTRA_LIBPCRE_LDFLAGS
 PCRE_STATIC_CFLAG
-WITH_UTF8_FALSE
-WITH_UTF8_TRUE
+LIBREADLINE
+WITH_UTF_FALSE
+WITH_UTF_TRUE
 WITH_JIT_FALSE
 WITH_JIT_TRUE
 WITH_REBUILD_CHARTABLES_FALSE
 WITH_REBUILD_CHARTABLES_TRUE
 WITH_PCRE_CPP_FALSE
 WITH_PCRE_CPP_TRUE
+WITH_PCRE16_FALSE
+WITH_PCRE16_TRUE
+WITH_PCRE8_FALSE
+WITH_PCRE8_TRUE
 pcre_have_bits_type_traits
 pcre_have_type_traits
 pcre_have_ulong_long
 pcre_have_long_long
 enable_cpp
+enable_pcre16
+enable_pcre8
 PCRE_DATE
 PCRE_PRERELEASE
 PCRE_MINOR
@@ -692,6 +699,8 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
 am__untar
 am__tar
 AMTAR
@@ -756,6 +765,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_silent_rules
 enable_dependency_tracking
 enable_shared
 enable_static
@@ -764,11 +774,14 @@ enable_fast_install
 with_gnu_ld
 with_sysroot
 enable_libtool_lock
+enable_pcre8
+enable_pcre16
 enable_cpp
 enable_jit
 enable_pcregrep_jit
 enable_rebuild_chartables
 enable_utf8
+enable_utf
 enable_unicode_properties
 enable_newline_is_cr
 enable_newline_is_lf
@@ -781,6 +794,7 @@ enable_stack_for_recursion
 enable_pcregrep_libz
 enable_pcregrep_libbz2
 with_pcregrep_bufsize
+enable_pcretest_libedit
 enable_pcretest_libreadline
 with_posix_malloc_threshold
 with_link_size
@@ -1342,7 +1356,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures PCRE 8.21 to adapt to many kinds of systems.
+\`configure' configures PCRE 8.31 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1412,7 +1426,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of PCRE 8.21:";;
+     short | recursive ) echo "Configuration of PCRE 8.31:";;
    esac
   cat <<\_ACEOF
 
@@ -1420,6 +1434,8 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
   --enable-shared[=PKGS]  build shared libraries [default=yes]
@@ -1427,16 +1443,20 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-pcre8         disable 8 bit character support
+  --enable-pcre16         enable 16 bit character support
   --disable-cpp           disable C++ support
   --enable-jit            enable Just-In-Time compiling support
   --disable-pcregrep-jit  disable JIT support in pcregrep
   --enable-rebuild-chartables
                           rebuild character tables in current locale
-  --enable-utf8           enable UTF-8 support (incompatible with
+  --enable-utf8           another name for --enable-utf. Kept only for
+                          compatibility reasons
+  --enable-utf            enable UTF-8/16 support (incompatible with
                           --enable-ebcdic)
   --enable-unicode-properties
                           enable Unicode properties support (implies
-                          --enable-utf8)
+                          --enable-utf)
   --enable-newline-is-cr  use CR as newline character
   --enable-newline-is-lf  use LF as newline character (default)
   --enable-newline-is-crlf
@@ -1446,13 +1466,15 @@ Optional Features:
   --enable-newline-is-any use any valid Unicode newline sequence
   --enable-bsr-anycrlf    \R matches only CR, LF, CRLF by default
   --enable-ebcdic         assume EBCDIC coding rather than ASCII; incompatible
-                          with --enable-utf8; use only in (uncommon) EBCDIC
+                          with --enable-utf; use only in (uncommon) EBCDIC
                           environments; it implies --enable-rebuild-chartables
   --disable-stack-for-recursion
                           don't use stack recursion when matching
   --enable-pcregrep-libz  link pcregrep with libz to handle .gz files
   --enable-pcregrep-libbz2
                           link pcregrep with libbz2 to handle .bz2 files
+  --enable-pcretest-libedit
+                          link pcretest with libedit
   --enable-pcretest-libreadline
                           link pcretest with libreadline
 
@@ -1553,7 +1575,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-PCRE configure 8.21
+PCRE configure 8.31
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2308,7 +2330,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by PCRE $as_me 8.21, which was
+It was created by PCRE $as_me 8.31, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3124,7 +3146,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pcre'
- VERSION='8.21'
+ VERSION='8.31'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3164,6 +3186,18 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMT
 
 
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
 ac_config_headers="$ac_config_headers config.h"
 
 
@@ -15674,9 +15708,9 @@ fi
 
 
 PCRE_MAJOR="8"
-PCRE_MINOR="21"
+PCRE_MINOR="31"
 PCRE_PRERELEASE=""
-PCRE_DATE="2011-12-12"
+PCRE_DATE="2012-07-06"
 
 if test "$PCRE_MINOR" = "08" -o "$PCRE_MINOR" = "09"
 then
@@ -15698,13 +15732,33 @@ then
   htmldir='${docdir}/html'
 fi
 
+# Handle --disable-pcre8 (enabled by default)
+# Check whether --enable-pcre8 was given.
+if test "${enable_pcre8+set}" = set; then :
+  enableval=$enable_pcre8;
+else
+  enable_pcre8=unset
+fi
+
+
+
+# Handle --enable-pcre16 (disabled by default)
+# Check whether --enable-pcre16 was given.
+if test "${enable_pcre16+set}" = set; then :
+  enableval=$enable_pcre16;
+else
+  enable_pcre16=unset
+fi
+
+
+
 # Handle --disable-cpp. The substitution of enable_cpp is needed for use in
 # pcre-config.
 # Check whether --enable-cpp was given.
 if test "${enable_cpp+set}" = set; then :
   enableval=$enable_cpp;
 else
-  enable_cpp=yes
+  enable_cpp=unset
 fi
 
 
@@ -15745,6 +15799,15 @@ else
 fi
 
 
+# Handle --enable-utf (disabled by default)
+# Check whether --enable-utf was given.
+if test "${enable_utf+set}" = set; then :
+  enableval=$enable_utf;
+else
+  enable_utf=unset
+fi
+
+
 # Handle --enable-unicode-properties
 # Check whether --enable-unicode-properties was given.
 if test "${enable_unicode_properties+set}" = set; then :
@@ -15840,6 +15903,15 @@ else
 fi
 
 
+# Handle --enable-pcretest-libedit
+# Check whether --enable-pcretest-libedit was given.
+if test "${enable_pcretest_libedit+set}" = set; then :
+  enableval=$enable_pcretest_libedit;
+else
+  enable_pcretest_libedit=no
+fi
+
+
 # Handle --enable-pcretest-libreadline
 # Check whether --enable-pcretest-libreadline was given.
 if test "${enable_pcretest_libreadline+set}" = set; then :
@@ -15896,34 +15968,76 @@ else
 fi
 
 
-# Make sure that if enable_unicode_properties was set, that UTF-8 support
-# is enabled.
-#
+# Copy enable_utf8 value to enable_utf for compatibility reasons
+if test "x$enable_utf8" != "xunset"
+then
+  if test "x$enable_utf" != "xunset"
+  then
+    as_fn_error $? "--enable/disable-utf8 is kept only for compatibility reasons and its value is copied to --enable/disable-utf. Newer code must use --enable/disable-utf alone." "$LINENO" 5
+  fi
+  enable_utf=$enable_utf8
+fi
+
+# Set the default value for pcre8
+if test "x$enable_pcre8" = "xunset"
+then
+  enable_pcre8=yes
+fi
+
+# Set the default value for pcre16
+if test "x$enable_pcre16" = "xunset"
+then
+  enable_pcre16=no
+fi
+
+# Make sure enable_pcre8 or enable_pcre16 was set
+if test "x$enable_pcre8$enable_pcre16" = "xnono"
+then
+  as_fn_error $? "Either 8 or 16 bit (or both) pcre library must be enabled" "$LINENO" 5
+fi
+
+# Make sure that if enable_unicode_properties was set, that UTF support is enabled.
 if test "x$enable_unicode_properties" = "xyes"
 then
-  if test "x$enable_utf8" = "xno"
+  if test "x$enable_utf" = "xno"
   then
-    as_fn_error $? "support for Unicode properties requires UTF-8 support" "$LINENO" 5
+    as_fn_error $? "support for Unicode properties requires UTF-8/16 support" "$LINENO" 5
   fi
-  enable_utf8=yes
+  enable_utf=yes
 fi
 
-if test "x$enable_utf8" = "xunset"
+# enable_utf is disabled by default.
+if test "x$enable_utf" = "xunset"
 then
-  enable_utf8=no
+  enable_utf=no
 fi
 
+# enable_cpp copies the value of enable_pcre8 by default
+if test "x$enable_cpp" = "xunset"
+then
+  enable_cpp=$enable_pcre8
+fi
+
+# Make sure that if enable_cpp was set, that enable_pcre8 support is enabled
+if test "x$enable_cpp" = "xyes"
+then
+  if test "x$enable_pcre8" = "xno"
+  then
+    as_fn_error $? "C++ library requires pcre library with 8 bit characters" "$LINENO" 5
+  fi
+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
+# Also check that UTF support is not requested, because PCRE cannot handle
+# EBCDIC and UTF 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"
+  if test "x$enable_utf" = "xyes"
   then
-    as_fn_error $? "support for EBCDIC and UTF-8 cannot be enabled at the same time" "$LINENO" 5
+    as_fn_error $? "support for EBCDIC and UTF-8/16 cannot be enabled at the same time" "$LINENO" 5
   fi
 fi
 
@@ -16268,6 +16382,22 @@ fi
 
 
 # Conditional compilation
+ if test "x$enable_pcre8" = "xyes"; then
+  WITH_PCRE8_TRUE=
+  WITH_PCRE8_FALSE='#'
+else
+  WITH_PCRE8_TRUE='#'
+  WITH_PCRE8_FALSE=
+fi
+
+ if test "x$enable_pcre16" = "xyes"; then
+  WITH_PCRE16_TRUE=
+  WITH_PCRE16_FALSE='#'
+else
+  WITH_PCRE16_TRUE='#'
+  WITH_PCRE16_FALSE=
+fi
+
  if test "x$enable_cpp" = "xyes"; then
   WITH_PCRE_CPP_TRUE=
   WITH_PCRE_CPP_FALSE='#'
@@ -16292,12 +16422,12 @@ else
   WITH_JIT_FALSE=
 fi
 
- if test "x$enable_utf8" = "xyes"; then
-  WITH_UTF8_TRUE=
-  WITH_UTF8_FALSE='#'
+ if test "x$enable_utf" = "xyes"; then
+  WITH_UTF_TRUE=
+  WITH_UTF_FALSE='#'
 else
-  WITH_UTF8_TRUE='#'
-  WITH_UTF8_FALSE=
+  WITH_UTF_TRUE='#'
+  WITH_UTF_FALSE=
 fi
 
 
@@ -16529,7 +16659,8 @@ LIBS="$OLD_LIBS"
 
 # Check for the availabiity of libreadline
 
-for ac_header in readline/readline.h
+if test "$enable_pcretest_libreadline" = "yes"; then
+ for ac_header in readline/readline.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
@@ -16541,7 +16672,7 @@ fi
 
 done
 
-for ac_header in readline/history.h
+ for ac_header in readline/history.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
 if test "x$ac_cv_header_readline_history_h" = xyes; then :
@@ -16553,7 +16684,7 @@ fi
 
 done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
 $as_echo_n "checking for readline in -lreadline... " >&6; }
 if ${ac_cv_lib_readline_readline+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -16590,10 +16721,315 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
 $as_echo "$ac_cv_lib_readline_readline" >&6; }
 if test "x$ac_cv_lib_readline_readline" = xyes; then :
-  HAVE_LIB_READLINE=1
+  LIBREADLINE="-lreadline"
+else
+  unset ac_cv_lib_readline_readline;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+$as_echo_n "checking for readline in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_readline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline -ltinfo $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_readline_readline=yes
+else
+  ac_cv_lib_readline_readline=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
+$as_echo "$ac_cv_lib_readline_readline" >&6; }
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
+  LIBREADLINE="-ltinfo"
+else
+  unset ac_cv_lib_readline_readline;
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+$as_echo_n "checking for readline in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_readline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline -lcurses $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_readline_readline=yes
+else
+  ac_cv_lib_readline_readline=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
+$as_echo "$ac_cv_lib_readline_readline" >&6; }
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
+  LIBREADLINE="-lcurses"
+else
+  unset ac_cv_lib_readline_readline;
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+$as_echo_n "checking for readline in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_readline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline -lncurses $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_readline_readline=yes
+else
+  ac_cv_lib_readline_readline=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
+$as_echo "$ac_cv_lib_readline_readline" >&6; }
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
+  LIBREADLINE="-lncurses"
+else
+  unset ac_cv_lib_readline_readline;
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+$as_echo_n "checking for readline in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_readline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline -lncursesw $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_readline_readline=yes
+else
+  ac_cv_lib_readline_readline=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
+$as_echo "$ac_cv_lib_readline_readline" >&6; }
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
+  LIBREADLINE="-lncursesw"
+else
+  unset ac_cv_lib_readline_readline;
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+$as_echo_n "checking for readline in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_readline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline -ltermcap $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_readline_readline=yes
+else
+  ac_cv_lib_readline_readline=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
+$as_echo "$ac_cv_lib_readline_readline" >&6; }
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
+  LIBREADLINE="-ltermcap"
+else
+  LIBREADLINE=""
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+
+ if test -n "$LIBREADLINE"; then
+   if test "$LIBREADLINE" != "-lreadline"; then
+     echo "-lreadline needs $LIBREADLINE"
+     LIBREADLINE="-lreadline $LIBREADLINE"
+   fi
+ fi
+fi
+
+
+# Check for the availability of libedit. Different distributions put its
+# headers in different places. Try to cover the most common ones.
+
+if test "$enable_pcretest_libedit" = "yes"; then
+  for ac_header in editline/readline.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_editline_readline_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EDITLINE_READLINE_H 1
+_ACEOF
+ HAVE_EDITLINE_READLINE_H=1
+else
+  for ac_header in edit/readline/readline.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "edit/readline/readline.h" "ac_cv_header_edit_readline_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_edit_readline_readline_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EDIT_READLINE_READLINE_H 1
+_ACEOF
+ HAVE_READLINE_READLINE_H=1
+else
+  for ac_header in readline/readline.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_readline_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_READLINE_READLINE_H 1
+_ACEOF
+ HAVE_READLINE_READLINE_H=1
+fi
+
+done
+
+fi
+
+done
+
+fi
+
+done
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -ledit" >&5
+$as_echo_n "checking for readline in -ledit... " >&6; }
+if ${ac_cv_lib_edit_readline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ledit  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_edit_readline=yes
+else
+  ac_cv_lib_edit_readline=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5
+$as_echo "$ac_cv_lib_edit_readline" >&6; }
+if test "x$ac_cv_lib_edit_readline" = xyes; then :
+  LIBEDIT="-ledit"
+fi
+
+fi
+
 # This facilitates -ansi builds under Linux
 
 PCRE_STATIC_CFLAG=""
@@ -16607,6 +17043,18 @@ fi
 
 # Here is where pcre specific defines are handled
 
+if test "$enable_pcre8" = "yes"; then
+
+$as_echo "#define SUPPORT_PCRE8 /**/" >>confdefs.h
+
+fi
+
+if test "$enable_pcre16" = "yes"; then
+
+$as_echo "#define SUPPORT_PCRE16 /**/" >>confdefs.h
+
+fi
+
 if test "$enable_jit" = "yes"; then
 
 $as_echo "#define SUPPORT_JIT /**/" >>confdefs.h
@@ -16621,9 +17069,9 @@ $as_echo "#define SUPPORT_PCREGREP_JIT /**/" >>confdef
 
 fi
 
-if test "$enable_utf8" = "yes"; then
+if test "$enable_utf" = "yes"; then
 
-$as_echo "#define SUPPORT_UTF8 /**/" >>confdefs.h
+$as_echo "#define SUPPORT_UTF /**/" >>confdefs.h
 
 fi
 
@@ -16661,8 +17109,13 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-if test "$enable_pcretest_libreadline" = "yes"; then
+if test "$enable_pcretest_libedit" = "yes"; then
 
+$as_echo "#define SUPPORT_LIBEDIT /**/" >>confdefs.h
+
+  LIBREADLINE="$LIBEDIT"
+elif test "$enable_pcretest_libreadline" = "yes"; then
+
 $as_echo "#define SUPPORT_LIBREADLINE /**/" >>confdefs.h
 
 fi
@@ -16737,10 +17190,13 @@ esac
 # (Note: The libpcre*_version bits are m4 variables, assigned above)
 
 EXTRA_LIBPCRE_LDFLAGS="$EXTRA_LIBPCRE_LDFLAGS \
+                       $NO_UNDEFINED -version-info 1:1:0"
+
+EXTRA_LIBPCRE16_LDFLAGS="$EXTRA_LIBPCRE16_LDFLAGS \
                        $NO_UNDEFINED -version-info 0:1:0"
 
 EXTRA_LIBPCREPOSIX_LDFLAGS="$EXTRA_LIBPCREPOSIX_LDFLAGS \
-                            $NO_UNDEFINED -version-info 0:0:0"
+                            $NO_UNDEFINED -version-info 0:1:0"
 
 EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS \
                           $NO_UNDEFINED -version-info 0:0:0 \
@@ -16750,10 +17206,12 @@ EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS \
 
 
 
-# When we run 'make distcheck', use these arguments.
-DISTCHECK_CONFIGURE_FLAGS="--enable-jit --enable-cpp --enable-unicode-properties"
 
+# When we run 'make distcheck', use these arguments. Turning off compiler
+# optimization makes it run faster.
+DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre16 --enable-jit --enable-cpp --enable-unicode-properties"
 
+
 # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is
 # specified, the relevant library is available.
 
@@ -16785,6 +17243,23 @@ fi
 
 # Similarly for --enable-pcretest-readline
 
+if test "$enable_pcretest_libedit" = "yes"; then
+  if test "$enable_pcretest_libreadline" = "yes"; then
+    echo "** Cannot use both --enable-pcretest-libedit and --enable-pcretest-readline"
+    exit 1
+  fi
+  if test "$HAVE_EDITLINE_READLINE_H" != "1" -a \
+          "$HAVE_READLINE_READLINE_H" != "1"; then
+    echo "** Cannot --enable-pcretest-libedit because neither editline/readline.h"
+    echo "** nor readline/readline.h was found."
+    exit 1
+  fi
+  if test -z "$LIBEDIT"; then
+    echo "** Cannot --enable-pcretest-libedit because libedit library was not found."
+    exit 1
+  fi
+fi
+
 if test "$enable_pcretest_libreadline" = "yes"; then
   if test "$HAVE_READLINE_H" != "1"; then
     echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found."
@@ -16794,12 +17269,14 @@ if test "$enable_pcretest_libreadline" = "yes"; then
     echo "** Cannot --enable-pcretest-readline because readline/history.h was not found."
     exit 1
   fi
-  LIBREADLINE="-lreadline"
+  if test -z "$LIBREADLINE"; then
+    echo "** Cannot --enable-pcretest-readline because readline library was not found."
+    exit 1
+  fi
 fi
 
-
 # Produce these files, in addition to config.h.
-ac_config_files="$ac_config_files Makefile libpcre.pc libpcreposix.pc libpcrecpp.pc pcre-config pcre.h pcre_stringpiece.h pcrecpparg.h"
+ac_config_files="$ac_config_files Makefile libpcre.pc libpcre16.pc libpcreposix.pc libpcrecpp.pc pcre-config pcre.h pcre_stringpiece.h pcrecpparg.h"
 
 
 # Make the generated script files executable.
@@ -16940,6 +17417,14 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__
   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${WITH_PCRE8_TRUE}" && test -z "${WITH_PCRE8_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_PCRE8\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WITH_PCRE16_TRUE}" && test -z "${WITH_PCRE16_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_PCRE16\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${WITH_PCRE_CPP_TRUE}" && test -z "${WITH_PCRE_CPP_FALSE}"; then
   as_fn_error $? "conditional \"WITH_PCRE_CPP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16952,8 +17437,8 @@ if test -z "${WITH_JIT_TRUE}" && test -z "${WITH_JIT_F
   as_fn_error $? "conditional \"WITH_JIT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${WITH_UTF8_TRUE}" && test -z "${WITH_UTF8_FALSE}"; then
-  as_fn_error $? "conditional \"WITH_UTF8\" was never defined.
+if test -z "${WITH_UTF_TRUE}" && test -z "${WITH_UTF_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_UTF\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
@@ -17365,7 +17850,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by PCRE $as_me 8.21, which was
+This file was extended by PCRE $as_me 8.31, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17431,7 +17916,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-PCRE config.status 8.21
+PCRE config.status 8.31
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -17944,6 +18429,7 @@ do
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "libpcre.pc") CONFIG_FILES="$CONFIG_FILES libpcre.pc" ;;
+    "libpcre16.pc") CONFIG_FILES="$CONFIG_FILES libpcre16.pc" ;;
     "libpcreposix.pc") CONFIG_FILES="$CONFIG_FILES libpcreposix.pc" ;;
     "libpcrecpp.pc") CONFIG_FILES="$CONFIG_FILES libpcrecpp.pc" ;;
     "pcre-config") CONFIG_FILES="$CONFIG_FILES pcre-config" ;;
@@ -19507,9 +19993,11 @@ $PACKAGE-$VERSION configuration summary:
     Linker flags .................... : ${LDFLAGS}
     Extra libraries ................. : ${LIBS}
 
+    Build 8 bit pcre library ........ : ${enable_pcre8}
+    Build 16 bit pcre library ....... : ${enable_pcre16}
     Build C++ library ............... : ${enable_cpp}
     Enable JIT compiling support .... : ${enable_jit}
-    Enable UTF-8 support ............ : ${enable_utf8}
+    Enable UTF-8/16 support ......... : ${enable_utf}
     Unicode properties .............. : ${enable_unicode_properties}
     Newline char/sequence ........... : ${enable_newline}
     \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
@@ -19526,6 +20014,7 @@ $PACKAGE-$VERSION configuration summary:
     Buffer size for pcregrep ........ : ${with_pcregrep_bufsize}
     Link pcregrep with libz ......... : ${enable_pcregrep_libz}
     Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}
+    Link pcretest with libedit ...... : ${enable_pcretest_libedit}
     Link pcretest with libreadline .. : ${enable_pcretest_libreadline}
 
 EOF