tools/pcre/Makefile.am
changeset 3831 babd0eee3c5e
parent 2762 d2d467bf1b5a
     1.1 --- a/tools/pcre/Makefile.am	Sun Mar 17 11:29:55 2013 -0400
     1.2 +++ b/tools/pcre/Makefile.am	Sun Mar 17 11:32:03 2013 -0400
     1.3 @@ -1,5 +1,7 @@
     1.4  ## Process this file with automake to produce Makefile.in.
     1.5  
     1.6 +ACLOCAL_AMFLAGS = -I m4
     1.7 +
     1.8  dist_doc_DATA = \
     1.9    doc/pcre.txt \
    1.10    doc/pcre-config.txt \
    1.11 @@ -15,7 +17,9 @@
    1.12  dist_html_DATA = \
    1.13    doc/html/index.html \
    1.14    doc/html/pcre.html \
    1.15 +  doc/html/pcre16.html \
    1.16    doc/html/pcre-config.html \
    1.17 +  doc/html/pcre_assign_jit_stack.html \
    1.18    doc/html/pcre_compile.html \
    1.19    doc/html/pcre_compile2.html \
    1.20    doc/html/pcre_config.html \
    1.21 @@ -23,6 +27,7 @@
    1.22    doc/html/pcre_copy_substring.html \
    1.23    doc/html/pcre_dfa_exec.html \
    1.24    doc/html/pcre_exec.html \
    1.25 +  doc/html/pcre_free_study.html \
    1.26    doc/html/pcre_free_substring.html \
    1.27    doc/html/pcre_free_substring_list.html \
    1.28    doc/html/pcre_fullinfo.html \
    1.29 @@ -31,16 +36,23 @@
    1.30    doc/html/pcre_get_stringtable_entries.html \
    1.31    doc/html/pcre_get_substring.html \
    1.32    doc/html/pcre_get_substring_list.html \
    1.33 -  doc/html/pcre_info.html \
    1.34 +  doc/html/pcre_jit_exec.html \
    1.35 +  doc/html/pcre_jit_stack_alloc.html \
    1.36 +  doc/html/pcre_jit_stack_free.html \
    1.37    doc/html/pcre_maketables.html \
    1.38 +  doc/html/pcre_pattern_to_host_byte_order.html \
    1.39    doc/html/pcre_refcount.html \
    1.40    doc/html/pcre_study.html \
    1.41 +  doc/html/pcre_utf16_to_host_byte_order.html \
    1.42    doc/html/pcre_version.html \
    1.43    doc/html/pcreapi.html \
    1.44    doc/html/pcrebuild.html \
    1.45    doc/html/pcrecallout.html \
    1.46    doc/html/pcrecompat.html \
    1.47 +  doc/html/pcredemo.html \
    1.48    doc/html/pcregrep.html \
    1.49 +  doc/html/pcrejit.html \
    1.50 +  doc/html/pcrelimits.html \
    1.51    doc/html/pcrematching.html \
    1.52    doc/html/pcrepartial.html \
    1.53    doc/html/pcrepattern.html \
    1.54 @@ -50,7 +62,12 @@
    1.55    doc/html/pcresample.html \
    1.56    doc/html/pcrestack.html \
    1.57    doc/html/pcresyntax.html \
    1.58 -  doc/html/pcretest.html
    1.59 +  doc/html/pcretest.html \
    1.60 +  doc/html/pcreunicode.html
    1.61 +
    1.62 +#   doc/html/pcre32.html \
    1.63 +#   doc/html/pcre_utf32_to_host_byte_order.html \
    1.64 +#
    1.65  
    1.66  pcrecpp_html = doc/html/pcrecpp.html
    1.67  dist_noinst_DATA = $(pcrecpp_html)
    1.68 @@ -69,7 +86,8 @@
    1.69  dist_noinst_SCRIPTS =
    1.70  
    1.71  # Some of the binaries we make are to be installed, and others are
    1.72 -# (non-user-visible) helper programs needed to build libpcre.
    1.73 +# (non-user-visible) helper programs needed to build libpcre, libpcre16
    1.74 +# or libpcre32.
    1.75  bin_PROGRAMS =
    1.76  noinst_PROGRAMS =
    1.77  
    1.78 @@ -81,15 +99,21 @@
    1.79  # the Autotools include by default.
    1.80  EXTRA_DIST =
    1.81  
    1.82 +# These files contain additional m4 macros that are used by autoconf.
    1.83 +EXTRA_DIST += \
    1.84 +  m4/ax_pthread.m4 m4/pcre_visibility.m4
    1.85 +
    1.86  # These files contain maintenance information
    1.87  EXTRA_DIST += \
    1.88    doc/perltest.txt \
    1.89    NON-UNIX-USE \
    1.90 +  NON-AUTOTOOLS-BUILD \
    1.91    HACKING
    1.92  
    1.93  # These files are used in the preparation of a release
    1.94  EXTRA_DIST += \
    1.95    PrepareRelease \
    1.96 +  CheckMan \
    1.97    CleanTxt \
    1.98    Detrail \
    1.99    132html \
   1.100 @@ -109,11 +133,39 @@
   1.101    pcre.h.generic \
   1.102    config.h.generic
   1.103  
   1.104 -pcre.h.generic: configure.ac
   1.105 +# The only difference between pcre.h.in and pcre.h is the setting of the PCRE
   1.106 +# version number. Therefore, we can create the generic version just by copying.
   1.107 +pcre.h.generic: pcre.h.in configure.ac
   1.108  	rm -f $@
   1.109  	cp -p pcre.h $@
   1.110  
   1.111 -MAINTAINERCLEANFILES += pcre.h.generic
   1.112 +# It is more complicated for config.h.generic. We need the version that results
   1.113 +# from a default configuration. We can get this by doing a configure in a
   1.114 +# temporary directory. However, some trickery is needed,
   1.115 +# because the source directory may already be configured. If you
   1.116 +# just try running configure in a new directory, it complains. For this reason,
   1.117 +# we move config.status out of the way while doing the default configuration.
   1.118 +# The resulting config.h is munged by perl to put #ifdefs round any #defines
   1.119 +# and to get rid of any gcc-specific visibility settings. Make sure that
   1.120 +# PCRE_EXP_DEFN is unset (in case it has visibility settings).
   1.121 +config.h.generic: configure.ac
   1.122 +	rm -rf $@ _generic
   1.123 +	mkdir _generic
   1.124 +	cs=$(srcdir)/config.status; test ! -f $$cs || mv -f $$cs $$cs.aside
   1.125 +	cd _generic && $(abs_top_srcdir)/configure || :
   1.126 +	cs=$(srcdir)/config.status; test ! -f $$cs.aside || mv -f $$cs.aside $$cs
   1.127 +	test -f _generic/config.h
   1.128 +	perl -n \
   1.129 +	  -e 'BEGIN{$$blank=0;}' \
   1.130 +	  -e 'if(/PCRE_EXP_DEFN/){print"/* #undef PCRE_EXP_DEFN */\n";$$blank=0;next;}' \
   1.131 +	  -e 'if(/to make a symbol visible/){next;}' \
   1.132 +	  -e 'if(/__attribute__ \(\(visibility/){next;}' \
   1.133 +	  -e 'if(/^#define\s(?!PACKAGE)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$blank=0;}' \
   1.134 +	  -e 'else {if(/^\s*$$/){print unless $$blank; $$blank=1;} else{print;$$blank=0;}}' \
   1.135 +	  _generic/config.h >$@
   1.136 +	rm -rf _generic
   1.137 +
   1.138 +MAINTAINERCLEANFILES += pcre.h.generic config.h.generic
   1.139  
   1.140  # These are the header files we'll install. We do not distribute pcre.h because
   1.141  # it is generated from pcre.h.in.
   1.142 @@ -158,10 +210,16 @@
   1.143  
   1.144  endif # WITH_REBUILD_CHARTABLES
   1.145  
   1.146 +BUILT_SOURCES = pcre_chartables.c
   1.147  
   1.148  ## The main pcre library
   1.149 +
   1.150 +# Build the 8 bit library if it is enabled.
   1.151 +if WITH_PCRE8
   1.152  lib_LTLIBRARIES += libpcre.la
   1.153 +
   1.154  libpcre_la_SOURCES = \
   1.155 +  pcre_byte_order.c \
   1.156    pcre_compile.c \
   1.157    pcre_config.c \
   1.158    pcre_dfa_exec.c \
   1.159 @@ -169,41 +227,211 @@
   1.160    pcre_fullinfo.c \
   1.161    pcre_get.c \
   1.162    pcre_globals.c \
   1.163 -  pcre_info.c \
   1.164    pcre_internal.h \
   1.165 +  pcre_jit_compile.c \
   1.166    pcre_maketables.c \
   1.167    pcre_newline.c \
   1.168    pcre_ord2utf8.c \
   1.169    pcre_refcount.c \
   1.170 +  pcre_string_utils.c \
   1.171    pcre_study.c \
   1.172    pcre_tables.c \
   1.173 -  pcre_try_flipped.c \
   1.174    pcre_ucd.c \
   1.175    pcre_valid_utf8.c \
   1.176    pcre_version.c \
   1.177    pcre_xclass.c \
   1.178    ucp.h
   1.179  
   1.180 +libpcre_la_CFLAGS = \
   1.181 +  $(VISIBILITY_CFLAGS) \
   1.182 +  $(AM_CFLAGS)
   1.183 +
   1.184 +libpcre_la_LIBADD =
   1.185 +
   1.186  ## This file is generated as part of the building process, so don't distribute.
   1.187  nodist_libpcre_la_SOURCES = \
   1.188    pcre_chartables.c
   1.189  
   1.190 -# The pcre_printint.src file is #included by some source files, so it must be
   1.191 -# distributed. The pcre_chartables.c.dist file is the default version of
   1.192 -# pcre_chartables.c, used unless --enable-rebuild-chartables is specified.
   1.193 -EXTRA_DIST += pcre_printint.src pcre_chartables.c.dist
   1.194 +endif # WITH_PCRE8
   1.195 +
   1.196 +# Build the 16 bit library if it is enabled.
   1.197 +if WITH_PCRE16
   1.198 +lib_LTLIBRARIES += libpcre16.la
   1.199 +libpcre16_la_SOURCES = \
   1.200 +  pcre16_byte_order.c \
   1.201 +  pcre16_chartables.c \
   1.202 +  pcre16_compile.c \
   1.203 +  pcre16_config.c \
   1.204 +  pcre16_dfa_exec.c \
   1.205 +  pcre16_exec.c \
   1.206 +  pcre16_fullinfo.c \
   1.207 +  pcre16_get.c \
   1.208 +  pcre16_globals.c \
   1.209 +  pcre16_jit_compile.c \
   1.210 +  pcre16_maketables.c \
   1.211 +  pcre16_newline.c \
   1.212 +  pcre16_ord2utf16.c \
   1.213 +  pcre16_refcount.c \
   1.214 +  pcre16_string_utils.c \
   1.215 +  pcre16_study.c \
   1.216 +  pcre16_tables.c \
   1.217 +  pcre16_ucd.c \
   1.218 +  pcre16_utf16_utils.c \
   1.219 +  pcre16_valid_utf16.c \
   1.220 +  pcre16_version.c \
   1.221 +  pcre16_xclass.c
   1.222 +
   1.223 +libpcre16_la_CFLAGS = \
   1.224 +  $(VISIBILITY_CFLAGS) \
   1.225 +  $(AM_CFLAGS)
   1.226 +
   1.227 +libpcre16_la_LIBADD =
   1.228 +
   1.229 +## This file is generated as part of the building process, so don't distribute.
   1.230 +nodist_libpcre16_la_SOURCES = \
   1.231 +  pcre_chartables.c
   1.232 +
   1.233 +endif # WITH_PCRE16
   1.234 +
   1.235 +# Build the 32 bit library if it is enabled.
   1.236 +if WITH_PCRE32
   1.237 +lib_LTLIBRARIES += libpcre32.la
   1.238 +libpcre32_la_SOURCES = \
   1.239 +  pcre32_byte_order.c \
   1.240 +  pcre32_chartables.c \
   1.241 +  pcre32_compile.c \
   1.242 +  pcre32_config.c \
   1.243 +  pcre32_dfa_exec.c \
   1.244 +  pcre32_exec.c \
   1.245 +  pcre32_fullinfo.c \
   1.246 +  pcre32_get.c \
   1.247 +  pcre32_globals.c \
   1.248 +  pcre32_jit_compile.c \
   1.249 +  pcre32_maketables.c \
   1.250 +  pcre32_newline.c \
   1.251 +  pcre32_ord2utf32.c \
   1.252 +  pcre32_refcount.c \
   1.253 +  pcre32_string_utils.c \
   1.254 +  pcre32_study.c \
   1.255 +  pcre32_tables.c \
   1.256 +  pcre32_ucd.c \
   1.257 +  pcre32_utf32_utils.c \
   1.258 +  pcre32_valid_utf32.c \
   1.259 +  pcre32_version.c \
   1.260 +  pcre32_xclass.c
   1.261  
   1.262 +libpcre32_la_CFLAGS = \
   1.263 +  $(VISIBILITY_CFLAGS) \
   1.264 +  $(AM_CFLAGS)
   1.265 +
   1.266 +libpcre32_la_LIBADD =
   1.267 +
   1.268 +## This file is generated as part of the building process, so don't distribute.
   1.269 +nodist_libpcre32_la_SOURCES = \
   1.270 +  pcre_chartables.c
   1.271 +
   1.272 +endif # WITH_PCRE32
   1.273 +
   1.274 +# The pcre_chartables.c.dist file is the default version of pcre_chartables.c,
   1.275 +# used unless --enable-rebuild-chartables is specified.
   1.276 +EXTRA_DIST += pcre_chartables.c.dist
   1.277 +
   1.278 +# The JIT compiler lives in a separate directory, but its files are #included
   1.279 +# when pcre_jit_compile.c is processed, so they must be distributed.
   1.280 +EXTRA_DIST += \
   1.281 +  sljit/sljitConfig.h \
   1.282 +  sljit/sljitConfigInternal.h \
   1.283 +  sljit/sljitExecAllocator.c \
   1.284 +  sljit/sljitLir.c \
   1.285 +  sljit/sljitLir.h \
   1.286 +  sljit/sljitNativeARM_Thumb2.c \
   1.287 +  sljit/sljitNativeARM_v5.c \
   1.288 +  sljit/sljitNativeMIPS_32.c \
   1.289 +  sljit/sljitNativeMIPS_common.c \
   1.290 +  sljit/sljitNativePPC_32.c \
   1.291 +  sljit/sljitNativePPC_64.c \
   1.292 +  sljit/sljitNativePPC_common.c \
   1.293 +  sljit/sljitNativeSPARC_32.c \
   1.294 +  sljit/sljitNativeSPARC_common.c \
   1.295 +  sljit/sljitNativeX86_32.c \
   1.296 +  sljit/sljitNativeX86_64.c \
   1.297 +  sljit/sljitNativeX86_common.c \
   1.298 +  sljit/sljitUtils.c
   1.299 +
   1.300 +if WITH_PCRE8
   1.301  libpcre_la_LDFLAGS = $(EXTRA_LIBPCRE_LDFLAGS)
   1.302 +endif # WITH_PCRE8
   1.303 +if WITH_PCRE16
   1.304 +libpcre16_la_LDFLAGS = $(EXTRA_LIBPCRE16_LDFLAGS)
   1.305 +endif # WITH_PCRE16
   1.306 +if WITH_PCRE32
   1.307 +libpcre32_la_LDFLAGS = $(EXTRA_LIBPCRE32_LDFLAGS)
   1.308 +endif # WITH_PCRE32
   1.309 +
   1.310 +if WITH_VALGRIND
   1.311 +if WITH_PCRE8
   1.312 +libpcre_la_CFLAGS += $(VALGRIND_CFLAGS)
   1.313 +endif # WITH_PCRE8
   1.314 +if WITH_PCRE16
   1.315 +libpcre16_la_CFLAGS += $(VALGRIND_CFLAGS)
   1.316 +endif # WITH_PCRE16
   1.317 +if WITH_PCRE32
   1.318 +libpcre32_la_CFLAGS += $(VALGRIND_CFLAGS)
   1.319 +endif # WITH_PCRE32
   1.320 +endif # WITH_VALGRIND
   1.321 +
   1.322 +if WITH_GCOV
   1.323 +if WITH_PCRE8
   1.324 +libpcre_la_CFLAGS += $(GCOV_CFLAGS)
   1.325 +endif # WITH_PCRE8
   1.326 +if WITH_PCRE16
   1.327 +libpcre16_la_CFLAGS += $(GCOV_CFLAGS)
   1.328 +endif # WITH_PCRE16
   1.329 +if WITH_PCRE32
   1.330 +libpcre32_la_CFLAGS += $(GCOV_CFLAGS)
   1.331 +endif # WITH_PCRE32
   1.332 +endif # WITH_GCOV
   1.333  
   1.334  CLEANFILES += pcre_chartables.c
   1.335  
   1.336 +## If JIT support is enabled, arrange for the JIT test program to run.
   1.337 +if WITH_JIT
   1.338 +TESTS += pcre_jit_test
   1.339 +noinst_PROGRAMS += pcre_jit_test
   1.340 +pcre_jit_test_SOURCES = pcre_jit_test.c
   1.341 +pcre_jit_test_CFLAGS = $(AM_CFLAGS)
   1.342 +pcre_jit_test_LDADD =
   1.343 +if WITH_PCRE8
   1.344 +pcre_jit_test_LDADD += libpcre.la
   1.345 +endif # WITH_PCRE8
   1.346 +if WITH_PCRE16
   1.347 +pcre_jit_test_LDADD += libpcre16.la
   1.348 +endif # WITH_PCRE16
   1.349 +if WITH_PCRE32
   1.350 +pcre_jit_test_LDADD += libpcre32.la
   1.351 +endif # WITH_PCRE32
   1.352 +if WITH_GCOV
   1.353 +pcre_jit_test_CFLAGS += $(GCOV_CFLAGS)
   1.354 +pcre_jit_test_LDADD += $(GCOV_LIBS)
   1.355 +endif # WITH_GCOV
   1.356 +endif # WITH_JIT
   1.357 +
   1.358  ## A version of the main pcre library that has a posix re API.
   1.359 +if WITH_PCRE8
   1.360 +
   1.361  lib_LTLIBRARIES += libpcreposix.la
   1.362  libpcreposix_la_SOURCES = \
   1.363    pcreposix.c
   1.364 +libpcreposix_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS)
   1.365  libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)
   1.366  libpcreposix_la_LIBADD = libpcre.la
   1.367  
   1.368 +if WITH_GCOV
   1.369 +libpcreposix_la_CFLAGS += $(GCOV_CFLAGS)
   1.370 +endif # WITH_GCOV
   1.371 +
   1.372 +endif # WITH_PCRE8
   1.373 +
   1.374  ## There's a C++ library as well.
   1.375  if WITH_PCRE_CPP
   1.376  
   1.377 @@ -213,24 +441,35 @@
   1.378    pcrecpp.cc \
   1.379    pcre_scanner.cc \
   1.380    pcre_stringpiece.cc
   1.381 +libpcrecpp_la_CXXFLAGS = $(VISIBILITY_CXXFLAGS) $(AM_CXXFLAGS)
   1.382  libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS)
   1.383  libpcrecpp_la_LIBADD = libpcre.la
   1.384  
   1.385  TESTS += pcrecpp_unittest
   1.386  noinst_PROGRAMS += pcrecpp_unittest
   1.387  pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc
   1.388 +pcrecpp_unittest_CXXFLAGS = $(AM_CXXFLAGS)
   1.389  pcrecpp_unittest_LDADD = libpcrecpp.la
   1.390  
   1.391  TESTS += pcre_scanner_unittest
   1.392  noinst_PROGRAMS += pcre_scanner_unittest
   1.393  pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc
   1.394 +pcre_scanner_unittest_CXXFLAGS = $(AM_CXXFLAGS)
   1.395  pcre_scanner_unittest_LDADD = libpcrecpp.la
   1.396  
   1.397  TESTS += pcre_stringpiece_unittest
   1.398  noinst_PROGRAMS += pcre_stringpiece_unittest
   1.399  pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc
   1.400 +pcre_stringpiece_unittest_CXXFLAGS = $(AM_CXXFLAGS)
   1.401  pcre_stringpiece_unittest_LDADD = libpcrecpp.la
   1.402  
   1.403 +if WITH_GCOV
   1.404 +libpcrecpp_la_CXXFLAGS += $(GCOV_CXXFLAGS)
   1.405 +pcrecpp_unittest_LDADD += $(GCOV_LIBS)
   1.406 +pcre_scanner_unittest_LDADD += $(GCOV_LIBS)
   1.407 +pcre_stringpiece_unittest_LDADD += $(GCOV_LIBS)
   1.408 +endif # WITH_GCOV
   1.409 +
   1.410  endif # WITH_PCRE_CPP
   1.411  
   1.412  ## The main unit tests
   1.413 @@ -243,16 +482,47 @@
   1.414  EXTRA_DIST += RunTest.bat
   1.415  bin_PROGRAMS += pcretest
   1.416  pcretest_SOURCES = pcretest.c
   1.417 -pcretest_LDADD = libpcreposix.la $(LIBREADLINE)
   1.418 +pcretest_CFLAGS = $(AM_CFLAGS)
   1.419 +pcretest_LDADD = $(LIBREADLINE)
   1.420 +if WITH_PCRE8
   1.421 +pcretest_SOURCES += pcre_printint.c
   1.422 +pcretest_LDADD += libpcre.la libpcreposix.la
   1.423 +endif # WITH_PCRE8
   1.424 +if WITH_PCRE16
   1.425 +pcretest_SOURCES += pcre16_printint.c
   1.426 +pcretest_LDADD += libpcre16.la
   1.427 +endif # WITH_PCRE16
   1.428 +if WITH_PCRE32
   1.429 +pcretest_SOURCES += pcre32_printint.c
   1.430 +pcretest_LDADD += libpcre32.la
   1.431 +endif # WITH_PCRE32
   1.432 +if WITH_VALGRIND
   1.433 +pcretest_CFLAGS += $(VALGRIND_CFLAGS)
   1.434 +endif # WITH_VALGRIND
   1.435 +if WITH_GCOV
   1.436 +pcretest_CFLAGS += $(GCOV_CFLAGS)
   1.437 +pcretest_LDADD += $(GCOV_LIBS)
   1.438 +endif # WITH_GCOV
   1.439  
   1.440 +if WITH_PCRE8
   1.441  TESTS += RunGrepTest
   1.442  dist_noinst_SCRIPTS += RunGrepTest
   1.443  bin_PROGRAMS += pcregrep
   1.444  pcregrep_SOURCES = pcregrep.c
   1.445 -pcregrep_LDADD = libpcreposix.la $(LIBZ) $(LIBBZ2)
   1.446 +pcregrep_CFLAGS = $(AM_CFLAGS)
   1.447 +pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
   1.448 +pcregrep_LDADD += libpcre.la libpcreposix.la
   1.449 +if WITH_GCOV
   1.450 +pcregrep_CFLAGS += $(GCOV_CFLAGS)
   1.451 +pcregrep_LDADD += $(GCOV_LIBS)
   1.452 +endif # WITH_GCOV
   1.453 +endif # WITH_PCRE8
   1.454  
   1.455  EXTRA_DIST += \
   1.456 +  testdata/grepbinary \
   1.457 +  testdata/grepfilelist \
   1.458    testdata/grepinput \
   1.459 +  testdata/grepinput3 \
   1.460    testdata/grepinput8 \
   1.461    testdata/grepinputv \
   1.462    testdata/grepinputx \
   1.463 @@ -260,6 +530,18 @@
   1.464    testdata/grepoutput \
   1.465    testdata/grepoutput8 \
   1.466    testdata/grepoutputN \
   1.467 +  testdata/greppatN4 \
   1.468 +  testdata/saved16 \
   1.469 +  testdata/saved16BE-1 \
   1.470 +  testdata/saved16BE-2 \
   1.471 +  testdata/saved16LE-1 \
   1.472 +  testdata/saved16LE-2 \
   1.473 +  testdata/saved32 \
   1.474 +  testdata/saved32BE-1 \
   1.475 +  testdata/saved32BE-2 \
   1.476 +  testdata/saved32LE-1 \
   1.477 +  testdata/saved32LE-2 \
   1.478 +  testdata/saved8 \
   1.479    testdata/testinput1 \
   1.480    testdata/testinput2 \
   1.481    testdata/testinput3 \
   1.482 @@ -270,6 +552,23 @@
   1.483    testdata/testinput8 \
   1.484    testdata/testinput9 \
   1.485    testdata/testinput10 \
   1.486 +  testdata/testinput11 \
   1.487 +  testdata/testinput12 \
   1.488 +  testdata/testinput13 \
   1.489 +  testdata/testinput14 \
   1.490 +  testdata/testinput15 \
   1.491 +  testdata/testinput16 \
   1.492 +  testdata/testinput17 \
   1.493 +  testdata/testinput18 \
   1.494 +  testdata/testinput19 \
   1.495 +  testdata/testinput20 \
   1.496 +  testdata/testinput21 \
   1.497 +  testdata/testinput22 \
   1.498 +  testdata/testinput23 \
   1.499 +  testdata/testinput24 \
   1.500 +  testdata/testinput25 \
   1.501 +  testdata/testinput26 \
   1.502 +  testdata/testinputEBC \
   1.503    testdata/testoutput1 \
   1.504    testdata/testoutput2 \
   1.505    testdata/testoutput3 \
   1.506 @@ -280,6 +579,28 @@
   1.507    testdata/testoutput8 \
   1.508    testdata/testoutput9 \
   1.509    testdata/testoutput10 \
   1.510 +  testdata/testoutput11-8 \
   1.511 +  testdata/testoutput11-16 \
   1.512 +  testdata/testoutput11-32 \
   1.513 +  testdata/testoutput12 \
   1.514 +  testdata/testoutput13 \
   1.515 +  testdata/testoutput14 \
   1.516 +  testdata/testoutput15 \
   1.517 +  testdata/testoutput16 \
   1.518 +  testdata/testoutput17 \
   1.519 +  testdata/testoutput18-16 \
   1.520 +  testdata/testoutput18-32 \
   1.521 +  testdata/testoutput19 \
   1.522 +  testdata/testoutput20 \
   1.523 +  testdata/testoutput21-16 \
   1.524 +  testdata/testoutput21-32 \
   1.525 +  testdata/testoutput22-16 \
   1.526 +  testdata/testoutput22-32 \
   1.527 +  testdata/testoutput23 \
   1.528 +  testdata/testoutput24 \
   1.529 +  testdata/testoutput25 \
   1.530 +  testdata/testoutput26 \
   1.531 +  testdata/testoutputEBC \
   1.532    testdata/wintestinput3 \
   1.533    testdata/wintestoutput3 \
   1.534    perltest.pl
   1.535 @@ -287,6 +608,7 @@
   1.536  CLEANFILES += \
   1.537  	testsavedregex \
   1.538  	teststderr \
   1.539 +        testtemp* \
   1.540  	testtry \
   1.541          testNinput
   1.542  
   1.543 @@ -309,13 +631,12 @@
   1.544  # A PCRE user submitted the following addition, saying that it "will allow
   1.545  # anyone using the 'mingw32' compiler to simply type 'make pcre.dll' and get a
   1.546  # nice DLL for Windows use". (It is used by the pcre.dll target.)
   1.547 -DLL_OBJS= pcre_compile.o pcre_config.o \
   1.548 +DLL_OBJS= pcre_byte_order.o pcre_compile.o pcre_config.o \
   1.549  	pcre_dfa_exec.o pcre_exec.o pcre_fullinfo.o pcre_get.o \
   1.550 -	pcre_globals.o pcre_info.o pcre_maketables.o \
   1.551 +	pcre_globals.o pcre_jit_compile.o pcre_maketables.o \
   1.552  	pcre_newline.o pcre_ord2utf8.o pcre_refcount.o \
   1.553 -	pcre_study.o pcre_tables.o pcre_try_flipped.o \
   1.554 -	pcre_ucd.o pcre_valid_utf8.o pcre_version.o \
   1.555 -	pcre_chartables.o \
   1.556 +	pcre_study.o pcre_tables.o pcre_ucd.o \
   1.557 +	pcre_valid_utf8.o pcre_version.o pcre_chartables.o \
   1.558  	pcre_xclass.o
   1.559  
   1.560  # A PCRE user submitted the following addition, saying that it "will allow
   1.561 @@ -327,14 +648,23 @@
   1.562  
   1.563  # We have .pc files for pkg-config users.
   1.564  pkgconfigdir = $(libdir)/pkgconfig
   1.565 -pkgconfig_DATA = libpcre.pc
   1.566 +pkgconfig_DATA = libpcre.pc libpcreposix.pc
   1.567 +if WITH_PCRE16
   1.568 +pkgconfig_DATA += libpcre16.pc
   1.569 +endif
   1.570 +if WITH_PCRE32
   1.571 +pkgconfig_DATA += libpcre32.pc
   1.572 +endif
   1.573  if WITH_PCRE_CPP
   1.574  pkgconfig_DATA += libpcrecpp.pc
   1.575  endif
   1.576  
   1.577  dist_man_MANS = \
   1.578    doc/pcre.3 \
   1.579 +  doc/pcre16.3 \
   1.580 +  doc/pcre32.3 \
   1.581    doc/pcre-config.1 \
   1.582 +  doc/pcre_assign_jit_stack.3 \
   1.583    doc/pcre_compile.3 \
   1.584    doc/pcre_compile2.3 \
   1.585    doc/pcre_config.3 \
   1.586 @@ -342,6 +672,7 @@
   1.587    doc/pcre_copy_substring.3 \
   1.588    doc/pcre_dfa_exec.3 \
   1.589    doc/pcre_exec.3 \
   1.590 +  doc/pcre_free_study.3 \
   1.591    doc/pcre_free_substring.3 \
   1.592    doc/pcre_free_substring_list.3 \
   1.593    doc/pcre_fullinfo.3 \
   1.594 @@ -350,16 +681,23 @@
   1.595    doc/pcre_get_stringtable_entries.3 \
   1.596    doc/pcre_get_substring.3 \
   1.597    doc/pcre_get_substring_list.3 \
   1.598 -  doc/pcre_info.3 \
   1.599 +  doc/pcre_jit_exec.3 \
   1.600 +  doc/pcre_jit_stack_alloc.3 \
   1.601 +  doc/pcre_jit_stack_free.3 \
   1.602    doc/pcre_maketables.3 \
   1.603 +  doc/pcre_pattern_to_host_byte_order.3 \
   1.604    doc/pcre_refcount.3 \
   1.605    doc/pcre_study.3 \
   1.606 +  doc/pcre_utf16_to_host_byte_order.3 \
   1.607 +  doc/pcre_utf32_to_host_byte_order.3 \
   1.608    doc/pcre_version.3 \
   1.609    doc/pcreapi.3 \
   1.610    doc/pcrebuild.3 \
   1.611    doc/pcrecallout.3 \
   1.612    doc/pcrecompat.3 \
   1.613    doc/pcregrep.1 \
   1.614 +  doc/pcrejit.3 \
   1.615 +  doc/pcrelimits.3 \
   1.616    doc/pcrematching.3 \
   1.617    doc/pcrepartial.3 \
   1.618    doc/pcrepattern.3 \
   1.619 @@ -369,7 +707,63 @@
   1.620    doc/pcresample.3 \
   1.621    doc/pcrestack.3 \
   1.622    doc/pcresyntax.3 \
   1.623 -  doc/pcretest.1
   1.624 +  doc/pcretest.1 \
   1.625 +  doc/pcreunicode.3
   1.626 +
   1.627 +# Arrange for the per-function man pages to have 16- and 32-bit names as well.
   1.628 +install-data-hook:
   1.629 +	ln -sf pcre_assign_jit_stack.3		 $(DESTDIR)$(man3dir)/pcre16_assign_jit_stack.3
   1.630 +	ln -sf pcre_compile.3			 $(DESTDIR)$(man3dir)/pcre16_compile.3
   1.631 +	ln -sf pcre_compile2.3			 $(DESTDIR)$(man3dir)/pcre16_compile2.3
   1.632 +	ln -sf pcre_config.3			 $(DESTDIR)$(man3dir)/pcre16_config.3
   1.633 +	ln -sf pcre_copy_named_substring.3	 $(DESTDIR)$(man3dir)/pcre16_copy_named_substring.3
   1.634 +	ln -sf pcre_copy_substring.3		 $(DESTDIR)$(man3dir)/pcre16_copy_substring.3
   1.635 +	ln -sf pcre_dfa_exec.3			 $(DESTDIR)$(man3dir)/pcre16_dfa_exec.3
   1.636 +	ln -sf pcre_exec.3			 $(DESTDIR)$(man3dir)/pcre16_exec.3
   1.637 +	ln -sf pcre_free_study.3		 $(DESTDIR)$(man3dir)/pcre16_free_study.3
   1.638 +	ln -sf pcre_free_substring.3		 $(DESTDIR)$(man3dir)/pcre16_free_substring.3
   1.639 +	ln -sf pcre_free_substring_list.3	 $(DESTDIR)$(man3dir)/pcre16_free_substring_list.3
   1.640 +	ln -sf pcre_fullinfo.3			 $(DESTDIR)$(man3dir)/pcre16_fullinfo.3
   1.641 +	ln -sf pcre_get_named_substring.3	 $(DESTDIR)$(man3dir)/pcre16_get_named_substring.3
   1.642 +	ln -sf pcre_get_stringnumber.3		 $(DESTDIR)$(man3dir)/pcre16_get_stringnumber.3
   1.643 +	ln -sf pcre_get_stringtable_entries.3	 $(DESTDIR)$(man3dir)/pcre16_get_stringtable_entries.3
   1.644 +	ln -sf pcre_get_substring.3		 $(DESTDIR)$(man3dir)/pcre16_get_substring.3
   1.645 +	ln -sf pcre_get_substring_list.3	 $(DESTDIR)$(man3dir)/pcre16_get_substring_list.3
   1.646 +	ln -sf pcre_jit_exec.3			 $(DESTDIR)$(man3dir)/pcre16_jit_exec.3
   1.647 +	ln -sf pcre_jit_stack_alloc.3		 $(DESTDIR)$(man3dir)/pcre16_jit_stack_alloc.3
   1.648 +	ln -sf pcre_jit_stack_free.3		 $(DESTDIR)$(man3dir)/pcre16_jit_stack_free.3
   1.649 +	ln -sf pcre_maketables.3		 $(DESTDIR)$(man3dir)/pcre16_maketables.3
   1.650 +	ln -sf pcre_pattern_to_host_byte_order.3 $(DESTDIR)$(man3dir)/pcre16_pattern_to_host_byte_order.3
   1.651 +	ln -sf pcre_refcount.3			 $(DESTDIR)$(man3dir)/pcre16_refcount.3
   1.652 +	ln -sf pcre_study.3			 $(DESTDIR)$(man3dir)/pcre16_study.3
   1.653 +	ln -sf pcre_utf16_to_host_byte_order.3	 $(DESTDIR)$(man3dir)/pcre16_utf16_to_host_byte_order.3
   1.654 +	ln -sf pcre_version.3			 $(DESTDIR)$(man3dir)/pcre16_version.3
   1.655 +	ln -sf pcre_assign_jit_stack.3		 $(DESTDIR)$(man3dir)/pcre32_assign_jit_stack.3
   1.656 +	ln -sf pcre_compile.3			 $(DESTDIR)$(man3dir)/pcre32_compile.3
   1.657 +	ln -sf pcre_compile2.3			 $(DESTDIR)$(man3dir)/pcre32_compile2.3
   1.658 +	ln -sf pcre_config.3			 $(DESTDIR)$(man3dir)/pcre32_config.3
   1.659 +	ln -sf pcre_copy_named_substring.3	 $(DESTDIR)$(man3dir)/pcre32_copy_named_substring.3
   1.660 +	ln -sf pcre_copy_substring.3		 $(DESTDIR)$(man3dir)/pcre32_copy_substring.3
   1.661 +	ln -sf pcre_dfa_exec.3			 $(DESTDIR)$(man3dir)/pcre32_dfa_exec.3
   1.662 +	ln -sf pcre_exec.3			 $(DESTDIR)$(man3dir)/pcre32_exec.3
   1.663 +	ln -sf pcre_free_study.3		 $(DESTDIR)$(man3dir)/pcre32_free_study.3
   1.664 +	ln -sf pcre_free_substring.3		 $(DESTDIR)$(man3dir)/pcre32_free_substring.3
   1.665 +	ln -sf pcre_free_substring_list.3	 $(DESTDIR)$(man3dir)/pcre32_free_substring_list.3
   1.666 +	ln -sf pcre_fullinfo.3			 $(DESTDIR)$(man3dir)/pcre32_fullinfo.3
   1.667 +	ln -sf pcre_get_named_substring.3	 $(DESTDIR)$(man3dir)/pcre32_get_named_substring.3
   1.668 +	ln -sf pcre_get_stringnumber.3		 $(DESTDIR)$(man3dir)/pcre32_get_stringnumber.3
   1.669 +	ln -sf pcre_get_stringtable_entries.3	 $(DESTDIR)$(man3dir)/pcre32_get_stringtable_entries.3
   1.670 +	ln -sf pcre_get_substring.3		 $(DESTDIR)$(man3dir)/pcre32_get_substring.3
   1.671 +	ln -sf pcre_get_substring_list.3	 $(DESTDIR)$(man3dir)/pcre32_get_substring_list.3
   1.672 +	ln -sf pcre_jit_exec.3			 $(DESTDIR)$(man3dir)/pcre32_jit_exec.3
   1.673 +	ln -sf pcre_jit_stack_alloc.3		 $(DESTDIR)$(man3dir)/pcre32_jit_stack_alloc.3
   1.674 +	ln -sf pcre_jit_stack_free.3		 $(DESTDIR)$(man3dir)/pcre32_jit_stack_free.3
   1.675 +	ln -sf pcre_maketables.3		 $(DESTDIR)$(man3dir)/pcre32_maketables.3
   1.676 +	ln -sf pcre_pattern_to_host_byte_order.3 $(DESTDIR)$(man3dir)/pcre32_pattern_to_host_byte_order.3
   1.677 +	ln -sf pcre_refcount.3			 $(DESTDIR)$(man3dir)/pcre32_refcount.3
   1.678 +	ln -sf pcre_study.3			 $(DESTDIR)$(man3dir)/pcre32_study.3
   1.679 +	ln -sf pcre_utf32_to_host_byte_order.3	 $(DESTDIR)$(man3dir)/pcre32_utf32_to_host_byte_order.3
   1.680 +	ln -sf pcre_version.3			 $(DESTDIR)$(man3dir)/pcre32_version.3
   1.681  
   1.682  pcrecpp_man = doc/pcrecpp.3
   1.683  EXTRA_DIST += $(pcrecpp_man)
   1.684 @@ -378,12 +772,105 @@
   1.685  man_MANS = $(pcrecpp_man)
   1.686  endif
   1.687  
   1.688 +# gcov/lcov code coverage reporting
   1.689 +
   1.690 +if WITH_GCOV
   1.691 +
   1.692 +# Coverage reporting targets:
   1.693 +#
   1.694 +# coverage: Create a coverage report from 'make check'
   1.695 +# coverage-baseline: Capture baseline coverage information
   1.696 +# coverage-reset: This zeros the coverage counters only
   1.697 +# coverage-report: This creates the coverage report only
   1.698 +# coverage-clean-report: This removes the generated coverage report
   1.699 +#   without cleaning the coverage data itself
   1.700 +# coverage-clean-data: This removes the captured coverage data without
   1.701 +#   removing the coverage files created at compile time (*.gcno)
   1.702 +# coverage-clean: This cleans all coverage data including the generated
   1.703 +#   coverage report.
   1.704 +
   1.705 +COVERAGE_TEST_NAME = $(PACKAGE)
   1.706 +COVERAGE_NAME = $(PACKAGE)-$(VERSION)
   1.707 +COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info
   1.708 +COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage
   1.709 +COVERAGE_LCOV_EXTRA_FLAGS =
   1.710 +COVERAGE_GENHTML_EXTRA_FLAGS =
   1.711 +
   1.712 +coverage_quiet = $(coverage_quiet_$(V))
   1.713 +coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY))
   1.714 +coverage_quiet_0 = --quiet
   1.715 +
   1.716 +coverage-check: all
   1.717 +	-$(MAKE) $(AM_MAKEFLAGS) -k check
   1.718 +
   1.719 +coverage-baseline:
   1.720 +	$(LCOV) $(coverage_quiet) \
   1.721 +		--directory $(top_builddir) \
   1.722 +		--output-file "$(COVERAGE_OUTPUT_FILE)" \
   1.723 +		--capture \
   1.724 +		--initial
   1.725 +
   1.726 +coverage-report:
   1.727 +	$(LCOV) $(coverage_quiet) \
   1.728 +		--directory $(top_builddir) \
   1.729 +		--capture \
   1.730 +		--output-file "$(COVERAGE_OUTPUT_FILE).tmp" \
   1.731 +		--test-name "$(COVERAGE_TEST_NAME)" \
   1.732 +		--no-checksum \
   1.733 +		--compat-libtool \
   1.734 +		$(COVERAGE_LCOV_EXTRA_FLAGS)
   1.735 +	$(LCOV) $(coverage_quiet) \
   1.736 +		--directory $(top_builddir) \
   1.737 +		--output-file "$(COVERAGE_OUTPUT_FILE)" \
   1.738 +		--remove "$(COVERAGE_OUTPUT_FILE).tmp" \
   1.739 +		"/tmp/*" \
   1.740 +		"/usr/include/*" \
   1.741 +		"$(includedir)/*"
   1.742 +	-@rm -f "$(COVERAGE_OUTPUT_FILE).tmp"
   1.743 +	LANG=C $(GENHTML) $(coverage_quiet) \
   1.744 +		--prefix $(top_builddir) \
   1.745 +		--output-directory "$(COVERAGE_OUTPUT_DIR)" \
   1.746 +		--title "$(PACKAGE) $(VERSION) Code Coverage Report" \
   1.747 +		--show-details "$(COVERAGE_OUTPUT_FILE)" \
   1.748 +		--legend \
   1.749 +		$(COVERAGE_GENHTML_EXTRA_FLAGS)
   1.750 +	@echo "Code coverage report written to file://$(abs_builddir)/$(COVERAGE_OUTPUT_DIR)/index.html"
   1.751 +
   1.752 +coverage-reset:
   1.753 +	-$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir)
   1.754 +
   1.755 +coverage-clean-report:
   1.756 +	-rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp"
   1.757 +	-rm -rf "$(COVERAGE_OUTPUT_DIR)"
   1.758 +
   1.759 +coverage-clean-data:
   1.760 +	-find $(top_builddir) -name "*.gcda" -delete
   1.761 +
   1.762 +coverage-clean: coverage-reset coverage-clean-report coverage-clean-data
   1.763 +	-find $(top_builddir) -name "*.gcno" -delete
   1.764 +
   1.765 +coverage-distclean: coverage-clean
   1.766 +
   1.767 +coverage: coverage-reset coverage-baseline coverage-check coverage-report
   1.768 +clean-local: coverage-clean
   1.769 +distclean-local: coverage-distclean
   1.770 +
   1.771 +.PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean
   1.772 +
   1.773 +else
   1.774 +
   1.775 +coverage:
   1.776 +	@echo "Configuring with --enable-coverage required to generate code coverage report."
   1.777 +
   1.778 +endif # WITH_GCOV
   1.779 +
   1.780  ## CMake support
   1.781  
   1.782  EXTRA_DIST += \
   1.783    cmake/COPYING-CMAKE-SCRIPTS \
   1.784    cmake/FindPackageHandleStandardArgs.cmake \
   1.785    cmake/FindReadline.cmake \
   1.786 +  cmake/FindEditline.cmake \
   1.787    CMakeLists.txt \
   1.788    config-cmake.h.in
   1.789