Change --enable-pcre8 etc to --enable-pcre2-8 etc and consequent changes;

change "pcre" to "pcre2" in a number of files.
This commit is contained in:
Philip.Hazel 2014-10-17 15:52:57 +00:00
parent 2f27ca131d
commit eb59159ce0
20 changed files with 223 additions and 210 deletions

View File

@ -232,7 +232,7 @@ while (<STDIN>)
redo; # Process the joined lines redo; # Process the joined lines
} }
# .EX/.EE are used in the pcredemo page to bracket the entire program, # .EX/.EE are used in the pcre2demo page to bracket the entire program,
# which is unmodified except for turning backslash into "\e". # which is unmodified except for turning backslash into "\e".
elsif (/^\.EX\s*$/) elsif (/^\.EX\s*$/)

View File

@ -12,8 +12,8 @@ Copyright (c) 1997-2014 University of Cambridge
All rights reserved All rights reserved
PCRE JUST-IN-TIME COMPILATION SUPPORT PCRE2 JUST-IN-TIME COMPILATION SUPPORT
------------------------------------- --------------------------------------
Written by: Zoltan Herczeg Written by: Zoltan Herczeg
Email local part: hzmester Email local part: hzmester

View File

@ -261,8 +261,7 @@ IF(PCRE2_SUPPORT_VALGRIND)
SET(SUPPORT_VALGRIND 1) SET(SUPPORT_VALGRIND 1)
ENDIF(PCRE2_SUPPORT_VALGRIND) ENDIF(PCRE2_SUPPORT_VALGRIND)
# This next one used to contain # This next one used to reference ${READLINE_LIBRARY})
# SET(PCRETEST_LIBS ${READLINE_LIBRARY})
# but I was advised to add the NCURSES test as well, along with # but I was advised to add the NCURSES test as well, along with
# some modifications to cmake/FindReadline.cmake which should # some modifications to cmake/FindReadline.cmake which should
# make it possible to override the default if necessary. PH # make it possible to override the default if necessary. PH
@ -519,15 +518,6 @@ ENDIF(PCRE2_BUILD_PCRE2_32)
# Executables # Executables
# Removed by PH (2008-01-23) because pcredemo shouldn't really be built
# automatically, and it gave trouble in some environments anyway.
# ADD_EXECUTABLE(pcredemo pcredemo.c)
# TARGET_LINK_LIBRARIES(pcredemo pcreposix)
# IF(NOT BUILD_SHARED_LIBS)
# # make sure to not use declspec(dllimport) in static mode on windows
# SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC")
# ENDIF(NOT BUILD_SHARED_LIBS)
IF(PCRE2_BUILD_PCRE2GREP) IF(PCRE2_BUILD_PCRE2GREP)
ADD_EXECUTABLE(pcre2grep src/pcre2grep.c) ADD_EXECUTABLE(pcre2grep src/pcre2grep.c)
SET_PROPERTY(TARGET pcre2grep SET_PROPERTY(TARGET pcre2grep

View File

@ -28,8 +28,8 @@ Copyright (c) 1997-2014 University of Cambridge
All rights reserved. All rights reserved.
PCRE JUST-IN-TIME COMPILATION SUPPORT PCRE2 JUST-IN-TIME COMPILATION SUPPORT
------------------------------------- --------------------------------------
Written by: Zoltan Herczeg Written by: Zoltan Herczeg
Email local part: hzmester Email local part: hzmester

View File

@ -159,7 +159,7 @@ EXTRA_DIST =
# These files contain additional m4 macros that are used by autoconf. # These files contain additional m4 macros that are used by autoconf.
EXTRA_DIST += \ EXTRA_DIST += \
m4/ax_pthread.m4 m4/pcre_visibility.m4 m4/ax_pthread.m4 m4/pcre2_visibility.m4
# These files contain maintenance information # These files contain maintenance information
@ -179,7 +179,7 @@ EXTRA_DIST += \
doc/index.html.src doc/index.html.src
# These files are usable versions of pcre2.h and config.h that are distributed # These files are usable versions of pcre2.h and config.h that are distributed
# for the benefit of people who are building PCRE manually, without the # for the benefit of people who are building PCRE2 manually, without the
# Autotools support. # Autotools support.
EXTRA_DIST += \ EXTRA_DIST += \
@ -286,7 +286,7 @@ COMMON_SOURCES = \
src/pcre2_valid_utf.c \ src/pcre2_valid_utf.c \
src/pcre2_xclass.c src/pcre2_xclass.c
if WITH_PCRE8 if WITH_PCRE2_8
lib_LTLIBRARIES += libpcre2-8.la lib_LTLIBRARIES += libpcre2-8.la
libpcre2_8_la_SOURCES = \ libpcre2_8_la_SOURCES = \
$(COMMON_SOURCES) $(COMMON_SOURCES)
@ -297,9 +297,9 @@ libpcre2_8_la_CFLAGS = \
$(VISIBILITY_CFLAGS) \ $(VISIBILITY_CFLAGS) \
$(AM_CFLAGS) $(AM_CFLAGS)
libpcre2_8_la_LIBADD = libpcre2_8_la_LIBADD =
endif # WITH_PCRE8 endif # WITH_PCRE2_8
if WITH_PCRE16 if WITH_PCRE2_16
lib_LTLIBRARIES += libpcre2-16.la lib_LTLIBRARIES += libpcre2-16.la
libpcre2_16_la_SOURCES = \ libpcre2_16_la_SOURCES = \
$(COMMON_SOURCES) $(COMMON_SOURCES)
@ -310,9 +310,9 @@ libpcre2_16_la_CFLAGS = \
$(VISIBILITY_CFLAGS) \ $(VISIBILITY_CFLAGS) \
$(AM_CFLAGS) $(AM_CFLAGS)
libpcre2_16_la_LIBADD = libpcre2_16_la_LIBADD =
endif # WITH_PCRE16 endif # WITH_PCRE2_16
if WITH_PCRE32 if WITH_PCRE2_32
lib_LTLIBRARIES += libpcre2-32.la lib_LTLIBRARIES += libpcre2-32.la
libpcre2_32_la_SOURCES = \ libpcre2_32_la_SOURCES = \
$(COMMON_SOURCES) $(COMMON_SOURCES)
@ -323,7 +323,7 @@ libpcre2_32_la_CFLAGS = \
$(VISIBILITY_CFLAGS) \ $(VISIBILITY_CFLAGS) \
$(AM_CFLAGS) $(AM_CFLAGS)
libpcre2_32_la_LIBADD = libpcre2_32_la_LIBADD =
endif # WITH_PCRE32 endif # WITH_PCRE2_32
# The pcre2_chartables.c.dist file is the default version of # The pcre2_chartables.c.dist file is the default version of
# pcre2_chartables.c, used unless --enable-rebuild-chartables is specified. # pcre2_chartables.c, used unless --enable-rebuild-chartables is specified.
@ -357,43 +357,43 @@ EXTRA_DIST += \
sljit/sljitNativeX86_common.c \ sljit/sljitNativeX86_common.c \
sljit/sljitUtils.c sljit/sljitUtils.c
if WITH_PCRE8 if WITH_PCRE2_8
libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS) libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS)
endif # WITH_PCRE8 endif # WITH_PCRE2_8
if WITH_PCRE16 if WITH_PCRE2_16
libpcre2_16_la_LDFLAGS = $(EXTRA_LIBPCRE2_16_LDFLAGS) libpcre2_16_la_LDFLAGS = $(EXTRA_LIBPCRE2_16_LDFLAGS)
endif # WITH_PCRE16 endif # WITH_PCRE2_16
if WITH_PCRE32 if WITH_PCRE2_32
libpcre2_32_la_LDFLAGS = $(EXTRA_LIBPCRE2_32_LDFLAGS) libpcre2_32_la_LDFLAGS = $(EXTRA_LIBPCRE2_32_LDFLAGS)
endif # WITH_PCRE32 endif # WITH_PCRE2_32
if WITH_VALGRIND if WITH_VALGRIND
if WITH_PCRE8 if WITH_PCRE2_8
libpcre2_8_la_CFLAGS += $(VALGRIND_CFLAGS) libpcre2_8_la_CFLAGS += $(VALGRIND_CFLAGS)
endif # WITH_PCRE8 endif # WITH_PCRE2_8
if WITH_PCRE16 if WITH_PCRE2_16
libpcre2_16_la_CFLAGS += $(VALGRIND_CFLAGS) libpcre2_16_la_CFLAGS += $(VALGRIND_CFLAGS)
endif # WITH_PCRE16 endif # WITH_PCRE2_16
if WITH_PCRE32 if WITH_PCRE2_32
libpcre2_32_la_CFLAGS += $(VALGRIND_CFLAGS) libpcre2_32_la_CFLAGS += $(VALGRIND_CFLAGS)
endif # WITH_PCRE32 endif # WITH_PCRE2_32
endif # WITH_VALGRIND endif # WITH_VALGRIND
if WITH_GCOV if WITH_GCOV
if WITH_PCRE8 if WITH_PCRE2_8
libpcre2_8_la_CFLAGS += $(GCOV_CFLAGS) libpcre2_8_la_CFLAGS += $(GCOV_CFLAGS)
endif # WITH_PCRE8 endif # WITH_PCRE2_8
if WITH_PCRE16 if WITH_PCRE2_16
libpcre2_16_la_CFLAGS += $(GCOV_CFLAGS) libpcre2_16_la_CFLAGS += $(GCOV_CFLAGS)
endif # WITH_PCRE16 endif # WITH_PCRE2_16
if WITH_PCRE32 if WITH_PCRE2_32
libpcre2_32_la_CFLAGS += $(GCOV_CFLAGS) libpcre2_32_la_CFLAGS += $(GCOV_CFLAGS)
endif # WITH_PCRE32 endif # WITH_PCRE2_32
endif # WITH_GCOV endif # WITH_GCOV
## A version of the 8-bit library that has a POSIX API. ## A version of the 8-bit library that has a POSIX API.
if WITH_PCRE8 if WITH_PCRE2_8
lib_LTLIBRARIES += libpcre2-posix.la lib_LTLIBRARIES += libpcre2-posix.la
libpcre2_posix_la_SOURCES = src/pcre2posix.c libpcre2_posix_la_SOURCES = src/pcre2posix.c
libpcre2_posix_la_CFLAGS = \ libpcre2_posix_la_CFLAGS = \
@ -404,11 +404,11 @@ libpcre2_posix_la_LIBADD = libpcre2-8.la
if WITH_GCOV if WITH_GCOV
libpcre2_posix_la_CFLAGS += $(GCOV_CFLAGS) libpcre2_posix_la_CFLAGS += $(GCOV_CFLAGS)
endif # WITH_GCOV endif # WITH_GCOV
endif # WITH_PCRE8 endif # WITH_PCRE2_8
## Build pcre2grep if the 8-bit library is enabled ## Build pcre2grep if the 8-bit library is enabled
if WITH_PCRE8 if WITH_PCRE2_8
bin_PROGRAMS += pcre2grep bin_PROGRAMS += pcre2grep
pcre2grep_SOURCES = src/pcre2grep.c pcre2grep_SOURCES = src/pcre2grep.c
pcre2grep_CFLAGS = $(AM_CFLAGS) pcre2grep_CFLAGS = $(AM_CFLAGS)
@ -418,7 +418,7 @@ if WITH_GCOV
pcre2grep_CFLAGS += $(GCOV_CFLAGS) pcre2grep_CFLAGS += $(GCOV_CFLAGS)
pcre2grep_LDADD += $(GCOV_LIBS) pcre2grep_LDADD += $(GCOV_LIBS)
endif # WITH_GCOV endif # WITH_GCOV
endif # WITH_PCRE8 endif # WITH_PCRE2_8
## -------- Testing ---------- ## -------- Testing ----------
@ -430,15 +430,15 @@ noinst_PROGRAMS += pcre2_jit_test
pcre2_jit_test_SOURCES = src/pcre2_jit_test.c pcre2_jit_test_SOURCES = src/pcre2_jit_test.c
pcre2_jit_test_CFLAGS = $(AM_CFLAGS) pcre2_jit_test_CFLAGS = $(AM_CFLAGS)
pcre2_jit_test_LDADD = pcre2_jit_test_LDADD =
if WITH_PCRE8 if WITH_PCRE2_8
pcre2_jit_test_LDADD += libpcre2-8.la pcre2_jit_test_LDADD += libpcre2-8.la
endif # WITH_PCRE8 endif # WITH_PCRE2_8
if WITH_PCRE16 if WITH_PCRE2_16
pcre2_jit_test_LDADD += libpcre2-16.la pcre2_jit_test_LDADD += libpcre2-16.la
endif # WITH_PCRE16 endif # WITH_PCRE2_16
if WITH_PCRE32 if WITH_PCRE2_32
pcre2_jit_test_LDADD += libpcre2-32.la pcre2_jit_test_LDADD += libpcre2-32.la
endif # WITH_PCRE32 endif # WITH_PCRE2_32
if WITH_GCOV if WITH_GCOV
pcre2_jit_test_CFLAGS += $(GCOV_CFLAGS) pcre2_jit_test_CFLAGS += $(GCOV_CFLAGS)
pcre2_jit_test_LDADD += $(GCOV_LIBS) pcre2_jit_test_LDADD += $(GCOV_LIBS)
@ -455,17 +455,17 @@ pcre2test_SOURCES = src/pcre2test.c
pcre2test_CFLAGS = $(AM_CFLAGS) pcre2test_CFLAGS = $(AM_CFLAGS)
pcre2test_LDADD = $(LIBREADLINE) pcre2test_LDADD = $(LIBREADLINE)
if WITH_PCRE8 if WITH_PCRE2_8
pcre2test_LDADD += libpcre2-8.la libpcre2-posix.la pcre2test_LDADD += libpcre2-8.la libpcre2-posix.la
endif # WITH_PCRE8 endif # WITH_PCRE2_8
if WITH_PCRE16 if WITH_PCRE2_16
pcre2test_LDADD += libpcre2-16.la pcre2test_LDADD += libpcre2-16.la
endif # WITH_PCRE16 endif # WITH_PCRE2_16
if WITH_PCRE32 if WITH_PCRE2_32
pcre2test_LDADD += libpcre2-32.la pcre2test_LDADD += libpcre2-32.la
endif # WITH_PCRE32 endif # WITH_PCRE2_32
if WITH_VALGRIND if WITH_VALGRIND
pcre2test_CFLAGS += $(VALGRIND_CFLAGS) pcre2test_CFLAGS += $(VALGRIND_CFLAGS)
@ -488,10 +488,10 @@ dist_noinst_SCRIPTS += RunTest
## When the 8-bit library is configured, pcre2grep will have been built. ## When the 8-bit library is configured, pcre2grep will have been built.
if WITH_PCRE8 if WITH_PCRE2_8
TESTS += RunGrepTest TESTS += RunGrepTest
dist_noinst_SCRIPTS += RunGrepTest dist_noinst_SCRIPTS += RunGrepTest
endif # WITH_PCRE8 endif # WITH_PCRE2_8
## Distribute all the test data files ## Distribute all the test data files
@ -597,7 +597,7 @@ CLEANFILES += \
## ------------ End of testing ------------- ## ------------ End of testing -------------
# PCRE demonstration program. Not built automatcally. The point is that the # PCRE2 demonstration program. Not built automatcally. The point is that the
# users should build it themselves. So just distribute the source. # users should build it themselves. So just distribute the source.
EXTRA_DIST += src/pcre2demo.c EXTRA_DIST += src/pcre2demo.c
@ -608,15 +608,15 @@ EXTRA_DIST += src/pcre2demo.c
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pkgconfig_DATA =
if WITH_PCRE8 if WITH_PCRE2_8
pkgconfig_DATA += libpcre2-8.pc libpcre2-posix.pc pkgconfig_DATA += libpcre2-8.pc libpcre2-posix.pc
endif endif
if WITH_PCRE16 if WITH_PCRE2_16
pkgconfig_DATA += libpcre2-16.pc pkgconfig_DATA += libpcre2-16.pc
endif endif
if WITH_PCRE32 if WITH_PCRE2_32
pkgconfig_DATA += libpcre2-32.pc pkgconfig_DATA += libpcre2-32.pc
endif endif

View File

@ -64,12 +64,13 @@ pcre2test commands.
End End
echo "Making pcre2.txt" echo "Making pcre2.txt"
for file in pcre2api pcre2callout pcre2unicode ; do for file in pcre2 pcre2api pcre2build pcre2callout pcre2compat pcre2jit \
pcre2limits pcre2matching pcre2partial pcre2unicode ; do
#for file in pcre pcre16 pcre32 pcrebuild pcrematching \ #for file in \
# pcrecompat pcrepattern pcresyntax pcrejit pcrepartial \ # pcre2syntax \
# pcreprecompile pcreperform pcreposix pcrecpp pcresample \ # pcre2precompile pcre2perform pcre2posix pcre2sample \
# pcrelimits pcrestack ; do # pcre2stack ; do
echo " Processing $file.3" echo " Processing $file.3"
nroff -c -man $file.3 >$file.rawtxt nroff -c -man $file.3 >$file.rawtxt
@ -173,9 +174,7 @@ exit
# These files are detrailed; do not detrail the test data because there may be # These files are detrailed; do not detrail the test data because there may be
# significant trailing spaces. Do not detrail RunTest.bat, because it has CRLF # significant trailing spaces. Do not detrail RunTest.bat, because it has CRLF
# line endings and the detrail script removes all trailing white space. The # line endings and the detrail script removes all trailing white space. The
# configure files are also omitted from the detrailing. We don't bother with # configure files are also omitted from the detrailing.
# those pcre[16|32]_xx files that just define COMPILE_PCRE16 and then #include the
# common file, because they aren't going to change.
files="\ files="\
Makefile.am \ Makefile.am \
@ -195,45 +194,45 @@ files="\
CMakeLists.txt \ CMakeLists.txt \
RunGrepTest \ RunGrepTest \
RunTest \ RunTest \
pcre-config.in \ pcre2-config.in \
libpcre.pc.in \ libpcre.pc.in \
libpcre16.pc.in \ libpcre16.pc.in \
libpcre32.pc.in \ libpcre32.pc.in \
libpcreposix.pc.in \ libpcreposix.pc.in \
libpcrecpp.pc.in \ libpcrecpp.pc.in \
config.h.in \ config.h.in \
pcre_chartables.c.dist \ pcre2_chartables.c.dist \
pcredemo.c \ pcre2demo.c \
pcregrep.c \ pcre2grep.c \
pcretest.c \ pcre2test.c \
dftables.c \ dftables.c \
pcreposix.c \ pcre2posix.c \
pcreposix.h \ pcre2posix.h \
pcre.h.in \ pcre2.h.in \
pcre_internal.h \ pcre2_internal.h \
pcre_byte_order.c \ pcre2_byte_order.c \
pcre_compile.c \ pcre2_compile.c \
pcre_config.c \ pcre2_config.c \
pcre_dfa_exec.c \ pcre2_dfa_exec.c \
pcre_exec.c \ pcre2_exec.c \
pcre_fullinfo.c \ pcre2_fullinfo.c \
pcre_get.c \ pcre2_get.c \
pcre_globals.c \ pcre2_globals.c \
pcre_jit_compile.c \ pcre2_jit_compile.c \
pcre_jit_test.c \ pcre2_jit_test.c \
pcre_maketables.c \ pcre2_maketables.c \
pcre_newline.c \ pcre2_newline.c \
pcre_ord2utf8.c \ pcre2_ord2utf8.c \
pcre16_ord2utf16.c \ pcre16_ord2utf16.c \
pcre32_ord2utf32.c \ pcre32_ord2utf32.c \
pcre_printint.c \ pcre2_printint.c \
pcre_refcount.c \ pcre2_refcount.c \
pcre_string_utils.c \ pcre2_string_utils.c \
pcre_study.c \ pcre2_study.c \
pcre_tables.c \ pcre2_tables.c \
pcre_valid_utf8.c \ pcre2_valid_utf8.c \
pcre_version.c \ pcre2_version.c \
pcre_xclass.c \ pcre2_xclass.c \
pcre16_utf16_utils.c \ pcre16_utf16_utils.c \
pcre32_utf32_utils.c \ pcre32_utf32_utils.c \
pcre16_valid_utf16.c \ pcre16_valid_utf16.c \

6
README
View File

@ -164,10 +164,10 @@ library. They are also documented in the pcre2build man page.
(See also "Shared libraries on Unix-like systems" below.) (See also "Shared libraries on Unix-like systems" below.)
. By default, only the 8-bit library is built. If you add --enable-pcre16 to . By default, only the 8-bit library is built. If you add --enable-pcre2-16 to
the "configure" command, the 16-bit library is also built. If you add the "configure" command, the 16-bit library is also built. If you add
--enable-pcre32 to the "configure" command, the 32-bit library is also built. --enable-pcre2-32 to the "configure" command, the 32-bit library is also built.
If you want only the 16-bit or 32-bit library, use --disable-pcre8 to disable If you want only the 16-bit or 32-bit library, use --disable-pcre2-8 to disable
building the 8-bit library. building the 8-bit library.
. If you want to include support for just-in-time compiling, which can give . If you want to include support for just-in-time compiling, which can give

View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Run pcre2grep tests. The assumption is that the PCRE tests check the library # Run pcre2grep tests. The assumption is that the PCRE2 tests check the library
# itself. What we are checking here is the file handling and options that are # itself. What we are checking here is the file handling and options that are
# supported by pcre2grep. This script must be run in the build directory. # supported by pcre2grep. This script must be run in the build directory.
@ -535,7 +535,7 @@ if [ $utf8 -ne 0 ] ; then
if [ $? != 0 ] ; then exit 1; fi if [ $? != 0 ] ; then exit 1; fi
else else
echo "Skipping pcre2grep UTF-8 tests: no UTF-8 support in PCRE library" echo "Skipping pcre2grep UTF-8 tests: no UTF-8 support in PCRE2 library"
fi fi

View File

@ -270,11 +270,11 @@ fi
# All of 8-bit, 16-bit, and 32-bit character strings may be supported, but only # All of 8-bit, 16-bit, and 32-bit character strings may be supported, but only
# one need be. # one need be.
$sim ./pcre2test -C pcre2_8 >/dev/null $sim ./pcre2test -C pcre2-8 >/dev/null
support8=$? support8=$?
$sim ./pcre2test -C pcre2_16 >/dev/null $sim ./pcre2test -C pcre2-16 >/dev/null
support16=$? support16=$?
$sim ./pcre2test -C pcre2_32 >/dev/null $sim ./pcre2test -C pcre2-32 >/dev/null
support32=$? support32=$?
# Initialize all bitsizes skipped # Initialize all bitsizes skipped

View File

@ -98,26 +98,37 @@ then
htmldir='${docdir}/html' htmldir='${docdir}/html'
fi fi
# Handle --disable-pcre8 (enabled by default) # Force an error for PCRE1 size options
AC_ARG_ENABLE(pcre8, AC_ARG_ENABLE(pcre8,,,enable_pcre8=no)
AS_HELP_STRING([--disable-pcre8], AC_ARG_ENABLE(pcre16,,,enable_pcre16=no)
AC_ARG_ENABLE(pcre32,,,enable_pcre32=no)
if test "$enable_pcre8$enable_pcre16$enable_pcre32" != "nonono"
then
echo "** ERROR: Use --[[en|dis]]able-pcre2-[[8|16|32]], not --[[en|dis]]able-pcre[[8|16|32]]"
exit 1
fi
# Handle --disable-pcre2-8 (enabled by default)
AC_ARG_ENABLE(pcre2-8,
AS_HELP_STRING([--disable-pcre2-8],
[disable 8 bit character support]), [disable 8 bit character support]),
, enable_pcre8=unset) , enable_pcre2_8=unset)
AC_SUBST(enable_pcre8) AC_SUBST(enable_pcre2_8)
# Handle --enable-pcre16 (disabled by default) # Handle --enable-pcre2-16 (disabled by default)
AC_ARG_ENABLE(pcre16, AC_ARG_ENABLE(pcre2-16,
AS_HELP_STRING([--enable-pcre16], AS_HELP_STRING([--enable-pcre2-16],
[enable 16 bit character support]), [enable 16 bit character support]),
, enable_pcre16=unset) , enable_pcre2_16=unset)
AC_SUBST(enable_pcre16) AC_SUBST(enable_pcre2_16)
# Handle --enable-pcre32 (disabled by default) # Handle --enable-pcre2-32 (disabled by default)
AC_ARG_ENABLE(pcre32, AC_ARG_ENABLE(pcre2-32,
AS_HELP_STRING([--enable-pcre32], AS_HELP_STRING([--enable-pcre2-32],
[enable 32 bit character support]), [enable 32 bit character support]),
, enable_pcre32=unset) , enable_pcre2_32=unset)
AC_SUBST(enable_pcre32) AC_SUBST(enable_pcre2_32)
# Handle --enable-jit (disabled by default) # Handle --enable-jit (disabled by default)
AC_ARG_ENABLE(jit, AC_ARG_ENABLE(jit,
@ -264,26 +275,26 @@ AC_ARG_ENABLE(coverage,
[enable code coverage reports using gcov]), [enable code coverage reports using gcov]),
, enable_coverage=no) , enable_coverage=no)
# Set the default value for pcre8 # Set the default value for pcre2-8
if test "x$enable_pcre8" = "xunset" if test "x$enable_pcre2_8" = "xunset"
then then
enable_pcre8=yes enable_pcre2_8=yes
fi fi
# Set the default value for pcre16 # Set the default value for pcre2-16
if test "x$enable_pcre16" = "xunset" if test "x$enable_pcre2_16" = "xunset"
then then
enable_pcre16=no enable_pcre2_16=no
fi fi
# Set the default value for pcre32 # Set the default value for pcre2-32
if test "x$enable_pcre32" = "xunset" if test "x$enable_pcre2_32" = "xunset"
then then
enable_pcre32=no enable_pcre2_32=no
fi fi
# Make sure at least one library is selected # Make sure at least one library is selected
if test "x$enable_pcre8$enable_pcre16$enable_pcre32" = "xnonono" if test "x$enable_pcre2_8$enable_pcre2_16$enable_pcre2_32" = "xnonono"
then then
AC_MSG_ERROR([At least one of the 8, 16 or 32 bit libraries must be enabled]) AC_MSG_ERROR([At least one of the 8, 16 or 32 bit libraries must be enabled])
fi fi
@ -367,9 +378,9 @@ AC_CHECK_HEADERS(limits.h sys/types.h sys/stat.h dirent.h)
AC_CHECK_HEADERS([windows.h], [HAVE_WINDOWS_H=1]) AC_CHECK_HEADERS([windows.h], [HAVE_WINDOWS_H=1])
# Conditional compilation # Conditional compilation
AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes") AM_CONDITIONAL(WITH_PCRE2_8, test "x$enable_pcre2_8" = "xyes")
AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes") AM_CONDITIONAL(WITH_PCRE2_16, test "x$enable_pcre2_16" = "xyes")
AM_CONDITIONAL(WITH_PCRE32, test "x$enable_pcre32" = "xyes") AM_CONDITIONAL(WITH_PCRE2_32, test "x$enable_pcre2_32" = "xyes")
AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes") AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes") AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
AM_CONDITIONAL(WITH_UNICODE, test "x$enable_unicode" = "xyes") AM_CONDITIONAL(WITH_UNICODE, test "x$enable_unicode" = "xyes")
@ -478,17 +489,17 @@ AC_SUBST(PCRE2_STATIC_CFLAG)
# Here is where PCRE2-specific defines are handled # Here is where PCRE2-specific defines are handled
if test "$enable_pcre8" = "yes"; then if test "$enable_pcre2_8" = "yes"; then
AC_DEFINE([SUPPORT_PCRE2_8], [], [ AC_DEFINE([SUPPORT_PCRE2_8], [], [
Define to any value to enable the 8 bit PCRE2 library.]) Define to any value to enable the 8 bit PCRE2 library.])
fi fi
if test "$enable_pcre16" = "yes"; then if test "$enable_pcre2_16" = "yes"; then
AC_DEFINE([SUPPORT_PCRE2_16], [], [ AC_DEFINE([SUPPORT_PCRE2_16], [], [
Define to any value to enable the 16 bit PCRE2 library.]) Define to any value to enable the 16 bit PCRE2 library.])
fi fi
if test "$enable_pcre32" = "yes"; then if test "$enable_pcre2_32" = "yes"; then
AC_DEFINE([SUPPORT_PCRE2_32], [], [ AC_DEFINE([SUPPORT_PCRE2_32], [], [
Define to any value to enable the 32 bit PCRE2 library.]) Define to any value to enable the 32 bit PCRE2 library.])
fi fi
@ -691,7 +702,7 @@ AC_SUBST(EXTRA_LIBPCRE2_POSIX_LDFLAGS)
# When we run 'make distcheck', use these arguments. Turning off compiler # When we run 'make distcheck', use these arguments. Turning off compiler
# optimization makes it run faster. # optimization makes it run faster.
DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre16 --enable-pcre32 --enable-jit --enable-utf" DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre2-16 --enable-pcre2-32 --enable-jit --enable-utf"
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
# Check that, if --enable-pcre2grep-libz or --enable-pcre2grep-libbz2 is # Check that, if --enable-pcre2grep-libz or --enable-pcre2grep-libbz2 is
@ -850,9 +861,9 @@ $PACKAGE-$VERSION configuration summary:
Linker flags .................... : ${LDFLAGS} Linker flags .................... : ${LDFLAGS}
Extra libraries ................. : ${LIBS} Extra libraries ................. : ${LIBS}
Build 8-bit pcre2 library ....... : ${enable_pcre8} Build 8-bit pcre2 library ....... : ${enable_pcre2_8}
Build 16-bit pcre2 library ...... : ${enable_pcre16} Build 16-bit pcre2 library ...... : ${enable_pcre2_16}
Build 32-bit pcre2 library ...... : ${enable_pcre32} Build 32-bit pcre2 library ...... : ${enable_pcre2_32}
Enable JIT compiling support .... : ${enable_jit} Enable JIT compiling support .... : ${enable_jit}
Enable Unicode support .......... : ${enable_unicode} Enable Unicode support .......... : ${enable_unicode}
Newline char/sequence ........... : ${enable_newline} Newline char/sequence ........... : ${enable_newline}

View File

@ -117,9 +117,9 @@ to the same value:
.sp .sp
ebcdic compiled for an EBCDIC environment ebcdic compiled for an EBCDIC environment
jit just-in-time support is available jit just-in-time support is available
pcre2_16 the 16-bit library was built pcre2-16 the 16-bit library was built
pcre2_32 the 32-bit library was built pcre2-32 the 32-bit library was built
pcre2_8 the 8-bit library was built pcre2-8 the 8-bit library was built
unicode Unicode support is available unicode Unicode support is available
.sp .sp
If an unknown option is given, an error message is output; the exit code is 0. If an unknown option is given, an error message is output; the exit code is 0.

View File

@ -9,4 +9,4 @@ Name: libpcre2-16
Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre2-16 Libs: -L${libdir} -lpcre2-16
Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@

View File

@ -9,4 +9,4 @@ Name: libpcre2-32
Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre2-32 Libs: -L${libdir} -lpcre2-32
Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@

View File

@ -9,4 +9,4 @@ Name: libpcre2-8
Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre2-8 Libs: -L${libdir} -lpcre2-8
Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@

View File

@ -9,5 +9,5 @@ Name: libpcre2-posix
Description: Posix compatible interface to libpcre2-8 Description: Posix compatible interface to libpcre2-8
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre2-posix Libs: -L${libdir} -lpcre2-posix
Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@
Requires.private: libpcre2-8 Requires.private: libpcre2-8

View File

@ -34,26 +34,26 @@ AC_DEFUN([PCRE2_VISIBILITY],
dnl whether it leads to an error because of some other option that the dnl whether it leads to an error because of some other option that the
dnl user has put into $CC $CFLAGS $CPPFLAGS. dnl user has put into $CC $CFLAGS $CPPFLAGS.
AC_MSG_CHECKING([whether the -Werror option is usable]) AC_MSG_CHECKING([whether the -Werror option is usable])
AC_CACHE_VAL([pcre_cv_cc_vis_werror], [ AC_CACHE_VAL([pcre2_cv_cc_vis_werror], [
pcre_save_CFLAGS="$CFLAGS" pcre2_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror" CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE( AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])], [AC_LANG_PROGRAM([[]], [[]])],
[pcre_cv_cc_vis_werror=yes], [pcre2_cv_cc_vis_werror=yes],
[pcre_cv_cc_vis_werror=no]) [pcre2_cv_cc_vis_werror=no])
CFLAGS="$pcre_save_CFLAGS"]) CFLAGS="$pcre2_save_CFLAGS"])
AC_MSG_RESULT([$pcre_cv_cc_vis_werror]) AC_MSG_RESULT([$pcre2_cv_cc_vis_werror])
dnl Now check whether visibility declarations are supported. dnl Now check whether visibility declarations are supported.
AC_MSG_CHECKING([for simple visibility declarations]) AC_MSG_CHECKING([for simple visibility declarations])
AC_CACHE_VAL([pcre_cv_cc_visibility], [ AC_CACHE_VAL([pcre2_cv_cc_visibility], [
pcre_save_CFLAGS="$CFLAGS" pcre2_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden" CFLAGS="$CFLAGS -fvisibility=hidden"
dnl We use the option -Werror and a function dummyfunc, because on some dnl We use the option -Werror and a function dummyfunc, because on some
dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
dnl "visibility attribute not supported in this configuration; ignored" dnl "visibility attribute not supported in this configuration; ignored"
dnl at the first function definition in every compilation unit, and we dnl at the first function definition in every compilation unit, and we
dnl don't want to use the option in this case. dnl don't want to use the option in this case.
if test $pcre_cv_cc_vis_werror = yes; then if test $pcre2_cv_cc_vis_werror = yes; then
CFLAGS="$CFLAGS -Werror" CFLAGS="$CFLAGS -Werror"
fi fi
AC_COMPILE_IFELSE( AC_COMPILE_IFELSE(
@ -65,11 +65,11 @@ AC_DEFUN([PCRE2_VISIBILITY],
void dummyfunc (void) {} void dummyfunc (void) {}
]], ]],
[[]])], [[]])],
[pcre_cv_cc_visibility=yes], [pcre2_cv_cc_visibility=yes],
[pcre_cv_cc_visibility=no]) [pcre2_cv_cc_visibility=no])
CFLAGS="$pcre_save_CFLAGS"]) CFLAGS="$pcre2_save_CFLAGS"])
AC_MSG_RESULT([$pcre_cv_cc_visibility]) AC_MSG_RESULT([$pcre2_cv_cc_visibility])
if test $pcre_cv_cc_visibility = yes; then if test $pcre2_cv_cc_visibility = yes; then
VISIBILITY_CFLAGS="-fvisibility=hidden" VISIBILITY_CFLAGS="-fvisibility=hidden"
VISIBILITY_CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden" VISIBILITY_CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
HAVE_VISIBILITY=1 HAVE_VISIBILITY=1

View File

@ -131,7 +131,7 @@ runtest()
jit=$? jit=$?
./pcre2test -C unicode >/dev/null ./pcre2test -C unicode >/dev/null
utf=$? utf=$?
./pcre2test -C pcre2_8 >/dev/null ./pcre2test -C pcre2-8 >/dev/null
pcre2_8=$? pcre2_8=$?
if [ $nlok -gt 0 ]; then if [ $nlok -gt 0 ]; then
@ -215,7 +215,7 @@ if [ $ISGCC -ne 0 -a $usemain -ne 0 ]; then
echo "---------- Maximally configured test with -O2 ----------" echo "---------- Maximally configured test with -O2 ----------"
SAVECLFAGS="$CFLAGS" SAVECLFAGS="$CFLAGS"
CFLAGS="$CFLAGS -O2" CFLAGS="$CFLAGS -O2"
opts="--disable-shared --enable-unicode $enable_jit --enable-pcre16 --enable-pcre32" opts="--disable-shared --enable-unicode $enable_jit --enable-pcre2-16 --enable-pcre2-32"
runtest runtest
CFLAGS="$SAVECFLAGS" CFLAGS="$SAVECFLAGS"
fi fi
@ -235,14 +235,14 @@ if [ $usemain -ne 0 ]; then
"--enable-newline-is-crlf --disable-shared" \ "--enable-newline-is-crlf --disable-shared" \
"--enable-newline-is-anycrlf --enable-bsr-anycrlf --disable-shared" \ "--enable-newline-is-anycrlf --enable-bsr-anycrlf --disable-shared" \
"--enable-unicode --enable-newline-is-any --disable-stack-for-recursion --disable-static" \ "--enable-unicode --enable-newline-is-any --disable-stack-for-recursion --disable-static" \
"--enable-pcre16" \ "--enable-pcre2-16" \
"--enable-pcre16 --disable-stack-for-recursion --disable-shared" \ "--enable-pcre2-16 --disable-stack-for-recursion --disable-shared" \
"--enable-pcre16 --enable-unicode --disable-stack-for-recursion --disable-shared" \ "--enable-pcre2-16 --enable-unicode --disable-stack-for-recursion --disable-shared" \
"--enable-pcre32" \ "--enable-pcre2-32" \
"--enable-pcre32 --disable-stack-for-recursion --disable-shared" \ "--enable-pcre2-32 --disable-stack-for-recursion --disable-shared" \
"--enable-pcre32 --enable-unicode --disable-stack-for-recursion --disable-shared" \ "--enable-pcre2-32 --enable-unicode --disable-stack-for-recursion --disable-shared" \
"--enable-pcre32 --enable-pcre16 --disable-shared" \ "--enable-pcre2-32 --enable-pcre2-16 --disable-shared" \
"--enable-pcre32 --enable-pcre16 --disable-pcre8 --disable-shared" "--enable-pcre2-32 --enable-pcre2-16 --disable-pcre2-8 --disable-shared"
do do
runtest runtest
done done
@ -256,16 +256,16 @@ if [ $usejit -ne 0 ]; then
"--enable-jit --disable-shared" \ "--enable-jit --disable-shared" \
"--enable-jit --enable-unicode --disable-shared" \ "--enable-jit --enable-unicode --disable-shared" \
"--enable-jit --enable-unicode --with-link-size=3 --disable-shared" \ "--enable-jit --enable-unicode --with-link-size=3 --disable-shared" \
"--enable-jit --enable-pcre16 --enable-unicode --disable-shared" \ "--enable-jit --enable-pcre2-16 --enable-unicode --disable-shared" \
"--enable-jit --enable-pcre16 --disable-pcre8 --disable-shared" \ "--enable-jit --enable-pcre2-16 --disable-pcre2-8 --disable-shared" \
"--enable-jit --enable-pcre16 --disable-pcre8 --enable-unicode --disable-shared" \ "--enable-jit --enable-pcre2-16 --disable-pcre2-8 --enable-unicode --disable-shared" \
"--enable-jit --enable-pcre16 --enable-unicode --with-link-size=3 --disable-shared" \ "--enable-jit --enable-pcre2-16 --enable-unicode --with-link-size=3 --disable-shared" \
"--enable-jit --enable-pcre16 --enable-unicode --with-link-size=4 --disable-shared" \ "--enable-jit --enable-pcre2-16 --enable-unicode --with-link-size=4 --disable-shared" \
"--enable-jit --enable-pcre32 --enable-unicode --disable-shared" \ "--enable-jit --enable-pcre2-32 --enable-unicode --disable-shared" \
"--enable-jit --enable-pcre32 --disable-pcre8 --disable-shared" \ "--enable-jit --enable-pcre2-32 --disable-pcre2-8 --disable-shared" \
"--enable-jit --enable-pcre32 --disable-pcre8 --enable-unicode --disable-shared" \ "--enable-jit --enable-pcre2-32 --disable-pcre2-8 --enable-unicode --disable-shared" \
"--enable-jit --enable-pcre32 --enable-unicode --with-link-size=4 --disable-shared" \ "--enable-jit --enable-pcre2-32 --enable-unicode --with-link-size=4 --disable-shared" \
"--enable-jit --enable-pcre32 --enable-pcre16 --disable-pcre8 --enable-unicode --enable-newline-is-anycrlf --enable-bsr-anycrlf --disable-shared" "--enable-jit --enable-pcre2-32 --enable-pcre2-16 --disable-pcre2-8 --enable-unicode --enable-newline-is-anycrlf --enable-bsr-anycrlf --disable-shared"
do do
runtest runtest
done done
@ -291,7 +291,7 @@ if [ $usevalgrind -ne 0 ]; then
if [ $usejit -ne 0 ]; then if [ $usejit -ne 0 ]; then
for opts in \ for opts in \
"--enable-jit --enable-unicode --disable-shared" \ "--enable-jit --enable-unicode --disable-shared" \
"--enable-jit --enable-pcre16 --enable-pcre32 --enable-unicode" "--enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-unicode"
do do
opts="--enable-valgrind $opts" opts="--enable-valgrind $opts"
runtest runtest

View File

@ -7,20 +7,20 @@ exec_prefix_set=no
cflags="[--cflags]" cflags="[--cflags]"
libs= libs=
if test @enable_pcre16@ = yes ; then if test @enable_pcre2_16@ = yes ; then
libs="[--libs16] $libs" libs="[--libs16] $libs"
fi fi
if test @enable_pcre32@ = yes ; then if test @enable_pcre2_32@ = yes ; then
libs="[--libs32] $libs" libs="[--libs32] $libs"
fi fi
if test @enable_pcre8@ = yes ; then if test @enable_pcre2_8@ = yes ; then
libs="[--libs8] [--libs-posix] $libs" libs="[--libs8] [--libs-posix] $libs"
cflags="$cflags [--cflags-posix]" cflags="$cflags [--cflags-posix]"
fi fi
usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] $libs $cflags" usage="Usage: pcre2-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
if test $# -eq 0; then if test $# -eq 0; then
echo "${usage}" 1>&2 echo "${usage}" 1>&2
@ -72,41 +72,41 @@ while test $# -gt 0; do
if test @includedir@ != /usr/include ; then if test @includedir@ != /usr/include ; then
includes=-I@includedir@ includes=-I@includedir@
fi fi
echo $includes @PCRE_STATIC_CFLAG@ echo $includes @PCRE2_STATIC_CFLAG@
;; ;;
--cflags-posix) --cflags-posix)
if test @enable_pcre8@ = yes ; then if test @enable_pcre2_8@ = yes ; then
if test @includedir@ != /usr/include ; then if test @includedir@ != /usr/include ; then
includes=-I@includedir@ includes=-I@includedir@
fi fi
echo $includes @PCRE_STATIC_CFLAG@ echo $includes @PCRE2_STATIC_CFLAG@
else else
echo "${usage}" 1>&2 echo "${usage}" 1>&2
fi fi
;; ;;
--libs-posix) --libs-posix)
if test @enable_pcre8@ = yes ; then if test @enable_pcre2_8@ = yes ; then
echo $libS$libR -lpcre2posix -lpcre2-8 echo $libS$libR -lpcre2posix -lpcre2-8
else else
echo "${usage}" 1>&2 echo "${usage}" 1>&2
fi fi
;; ;;
--libs8) --libs8)
if test @enable_pcre8@ = yes ; then if test @enable_pcre2_8@ = yes ; then
echo $libS$libR -lpcre2-8 echo $libS$libR -lpcre2-8
else else
echo "${usage}" 1>&2 echo "${usage}" 1>&2
fi fi
;; ;;
--libs16) --libs16)
if test @enable_pcre16@ = yes ; then if test @enable_pcre2_16@ = yes ; then
echo $libS$libR -lpcre2-16 echo $libS$libR -lpcre2-16
else else
echo "${usage}" 1>&2 echo "${usage}" 1>&2
fi fi
;; ;;
--libs32) --libs32)
if test @enable_pcre32@ = yes ; then if test @enable_pcre2_32@ = yes ; then
echo $libS$libR -lpcre2-32 echo $libS$libR -lpcre2-32
else else
echo "${usage}" 1>&2 echo "${usage}" 1>&2

View File

@ -93,7 +93,7 @@ for (;;)
$showrest = ($mod =~ s/aftertext,?//); $showrest = ($mod =~ s/aftertext,?//);
# "allaftertext" is used by pcretest to print remainders after captures # "allaftertext" is used by pcre2test to print remainders after captures
$mod =~ s/allaftertext,?//; $mod =~ s/allaftertext,?//;
@ -162,7 +162,6 @@ for (;;)
s/\s+$//; # Remove trailing space s/\s+$//; # Remove trailing space
s/^\s+//; # Remove leading space s/^\s+//; # Remove leading space
s/\\Y//g; # Remove \Y (pcretest flag to set PCRE_NO_START_OPTIMIZE)
last if ($_ eq ""); last if ($_ eq "");
$x = eval "\"$_\""; # To get escapes processed $x = eval "\"$_\""; # To get escapes processed

View File

@ -574,9 +574,9 @@ static coptstruct coptlist[] = {
{ "jit", CONF_INT, PCRE2_CONFIG_JIT }, { "jit", CONF_INT, PCRE2_CONFIG_JIT },
{ "linksize", CONF_INT, PCRE2_CONFIG_LINKSIZE }, { "linksize", CONF_INT, PCRE2_CONFIG_LINKSIZE },
{ "newline", CONF_NL, PCRE2_CONFIG_NEWLINE }, { "newline", CONF_NL, PCRE2_CONFIG_NEWLINE },
{ "pcre2_16", CONF_FIX, SUPPORT_16 }, { "pcre2-16", CONF_FIX, SUPPORT_16 },
{ "pcre2_32", CONF_FIX, SUPPORT_32 }, { "pcre2-32", CONF_FIX, SUPPORT_32 },
{ "pcre2_8", CONF_FIX, SUPPORT_8 }, { "pcre2-8", CONF_FIX, SUPPORT_8 },
{ "unicode", CONF_INT, PCRE2_CONFIG_UNICODE } { "unicode", CONF_INT, PCRE2_CONFIG_UNICODE }
}; };
@ -5199,9 +5199,9 @@ printf(" ebcdic-nl NL code if compiled for EBCDIC\n");
printf(" jit just-in-time compiler supported [0, 1]\n"); printf(" jit just-in-time compiler supported [0, 1]\n");
printf(" linksize internal link size [2, 3, 4]\n"); printf(" linksize internal link size [2, 3, 4]\n");
printf(" newline newline type [CR, LF, CRLF, ANYCRLF, ANY]\n"); printf(" newline newline type [CR, LF, CRLF, ANYCRLF, ANY]\n");
printf(" pcre2_8 8 bit library support enabled [0, 1]\n"); printf(" pcre2-8 8 bit library support enabled [0, 1]\n");
printf(" pcre2_16 16 bit library support enabled [0, 1]\n"); printf(" pcre2-16 16 bit library support enabled [0, 1]\n");
printf(" pcre2_32 32 bit library support enabled [0, 1]\n"); printf(" pcre2-32 32 bit library support enabled [0, 1]\n");
printf(" unicode Unicode and UTF support enabled [0, 1]\n"); printf(" unicode Unicode and UTF support enabled [0, 1]\n");
printf(" -d set default pattern control 'debug'\n"); printf(" -d set default pattern control 'debug'\n");
printf(" -dfa set default subject control 'dfa'\n"); printf(" -dfa set default subject control 'dfa'\n");
@ -5389,11 +5389,25 @@ if (PO(options) != DO(options) || PO(control) != DO(control))
return 1; return 1;
} }
/* Get the PCRE2 and Unicode version number and JIT target information. */ /* Get the PCRE2 and Unicode version number and JIT target information, at the
same time checking that a request for the length gives the same answer. Also
check lengths for non-string items. */
PCRE2_CONFIG(PCRE2_CONFIG_VERSION, version); if (PCRE2_CONFIG(PCRE2_CONFIG_VERSION, NULL) !=
PCRE2_CONFIG(PCRE2_CONFIG_UNICODE_VERSION, uversion); PCRE2_CONFIG(PCRE2_CONFIG_VERSION, version) ||
PCRE2_CONFIG(PCRE2_CONFIG_JITTARGET, jittarget);
PCRE2_CONFIG(PCRE2_CONFIG_UNICODE_VERSION, NULL) !=
PCRE2_CONFIG(PCRE2_CONFIG_UNICODE_VERSION, uversion) ||
PCRE2_CONFIG(PCRE2_CONFIG_JITTARGET, NULL) !=
PCRE2_CONFIG(PCRE2_CONFIG_JITTARGET, jittarget) ||
PCRE2_CONFIG(PCRE2_CONFIG_UNICODE, NULL) != sizeof(int) ||
PCRE2_CONFIG(PCRE2_CONFIG_MATCHLIMIT, NULL) != sizeof(long int))
{
fprintf(stderr, "** Error in pcre2_config(): bad length\n");
return 1;
}
/* Get buffers from malloc() so that valgrind will check their misuse when /* Get buffers from malloc() so that valgrind will check their misuse when
debugging. They grow automatically when very long lines are read. The 16- debugging. They grow automatically when very long lines are read. The 16-