diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2014-01-17 16:59:52 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2014-01-17 16:59:52 +0000 |
commit | 5fd8da4b6c81a9afd0cc0186644cda8268012e7b (patch) | |
tree | 820384cf8eb02ac0d73213471c021bd0bbfb017b | |
parent | d69cf0a5f2a3235a6b8a209a0d2b599a2f89150e (diff) | |
download | pcre-5fd8da4b6c81a9afd0cc0186644cda8268012e7b.tar.gz |
Fix error in README; give an error for invalid --with-pcregrep-bufsize values
in ./configure.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1449 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | README | 10 | ||||
-rw-r--r-- | configure.ac | 7 |
3 files changed, 17 insertions, 6 deletions
@@ -80,6 +80,12 @@ Version 8.35-RC1 xx-xxxx-201x failing. Because of the uncertainty, the script did not used to stop if test 3 failed; it now does. If further versions of a French locale ever come to light, they can now easily be added. + +16. If --with-pcregrep-bufsize was given a non-integer value such as "50K", + there was a message during ./configure, but it did not stop. This now + provokes an error. The invalid example in README has been corrected. + If a value less than the minimum is given, the minimum value has always + been used, but now a warning is given. Version 8.34 15-December-2013 @@ -373,12 +373,12 @@ library. They are also documented in the pcrebuild man page. Of course, the relevant libraries must be installed on your system. -. The default size of internal buffer used by pcregrep can be set by, for - example: +. The default size (in bytes) of the internal buffer used by pcregrep can be + set by, for example: - --with-pcregrep-bufsize=50K + --with-pcregrep-bufsize=51200 - The default value is 20K. + The value must be a plain integer. The default is 20480. . It is possible to compile pcretest so that it links with the libreadline or libedit libraries, by specifying, respectively, @@ -988,4 +988,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx. Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 08 January 2014 +Last updated: 17 January 2014 diff --git a/configure.ac b/configure.ac index 786898b..40703f0 100644 --- a/configure.ac +++ b/configure.ac @@ -248,7 +248,7 @@ AC_ARG_ENABLE(pcregrep-libbz2, # Handle --with-pcregrep-bufsize=N AC_ARG_WITH(pcregrep-bufsize, AS_HELP_STRING([--with-pcregrep-bufsize=N], - [pcregrep buffer size (default=20480)]), + [pcregrep buffer size (default=20480, minimum=8192)]), , with_pcregrep_bufsize=20480) # Handle --enable-pcretest-libedit @@ -744,7 +744,12 @@ if test "$enable_pcregrep_libbz2" = "yes"; then fi if test $with_pcregrep_bufsize -lt 8192 ; then + AC_MSG_WARN([$with_pcregrep_bufsize is too small for --with-pcregrep-bufsize; using 8192]) with_pcregrep_bufsize="8192" +else + if test $? -gt 1 ; then + AC_MSG_ERROR([Bad value for --with-pcregrep-bufsize]) + fi fi AC_DEFINE_UNQUOTED([PCREGREP_BUFSIZE], [$with_pcregrep_bufsize], [ |