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
}
# .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".
elsif (/^\.EX\s*$/)

View File

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

View File

@ -261,8 +261,7 @@ IF(PCRE2_SUPPORT_VALGRIND)
SET(SUPPORT_VALGRIND 1)
ENDIF(PCRE2_SUPPORT_VALGRIND)
# This next one used to contain
# SET(PCRETEST_LIBS ${READLINE_LIBRARY})
# This next one used to reference ${READLINE_LIBRARY})
# but I was advised to add the NCURSES test as well, along with
# some modifications to cmake/FindReadline.cmake which should
# make it possible to override the default if necessary. PH
@ -519,15 +518,6 @@ ENDIF(PCRE2_BUILD_PCRE2_32)
# 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)
ADD_EXECUTABLE(pcre2grep src/pcre2grep.c)
SET_PROPERTY(TARGET pcre2grep

View File

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

View File

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

View File

@ -64,12 +64,13 @@ pcre2test commands.
End
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 \
# pcrecompat pcrepattern pcresyntax pcrejit pcrepartial \
# pcreprecompile pcreperform pcreposix pcrecpp pcresample \
# pcrelimits pcrestack ; do
#for file in \
# pcre2syntax \
# pcre2precompile pcre2perform pcre2posix pcre2sample \
# pcre2stack ; do
echo " Processing $file.3"
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
# significant trailing spaces. Do not detrail RunTest.bat, because it has CRLF
# 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
# those pcre[16|32]_xx files that just define COMPILE_PCRE16 and then #include the
# common file, because they aren't going to change.
# configure files are also omitted from the detrailing.
files="\
Makefile.am \
@ -195,45 +194,45 @@ files="\
CMakeLists.txt \
RunGrepTest \
RunTest \
pcre-config.in \
pcre2-config.in \
libpcre.pc.in \
libpcre16.pc.in \
libpcre32.pc.in \
libpcreposix.pc.in \
libpcrecpp.pc.in \
config.h.in \
pcre_chartables.c.dist \
pcredemo.c \
pcregrep.c \
pcretest.c \
pcre2_chartables.c.dist \
pcre2demo.c \
pcre2grep.c \
pcre2test.c \
dftables.c \
pcreposix.c \
pcreposix.h \
pcre.h.in \
pcre_internal.h \
pcre_byte_order.c \
pcre_compile.c \
pcre_config.c \
pcre_dfa_exec.c \
pcre_exec.c \
pcre_fullinfo.c \
pcre_get.c \
pcre_globals.c \
pcre_jit_compile.c \
pcre_jit_test.c \
pcre_maketables.c \
pcre_newline.c \
pcre_ord2utf8.c \
pcre2posix.c \
pcre2posix.h \
pcre2.h.in \
pcre2_internal.h \
pcre2_byte_order.c \
pcre2_compile.c \
pcre2_config.c \
pcre2_dfa_exec.c \
pcre2_exec.c \
pcre2_fullinfo.c \
pcre2_get.c \
pcre2_globals.c \
pcre2_jit_compile.c \
pcre2_jit_test.c \
pcre2_maketables.c \
pcre2_newline.c \
pcre2_ord2utf8.c \
pcre16_ord2utf16.c \
pcre32_ord2utf32.c \
pcre_printint.c \
pcre_refcount.c \
pcre_string_utils.c \
pcre_study.c \
pcre_tables.c \
pcre_valid_utf8.c \
pcre_version.c \
pcre_xclass.c \
pcre2_printint.c \
pcre2_refcount.c \
pcre2_string_utils.c \
pcre2_study.c \
pcre2_tables.c \
pcre2_valid_utf8.c \
pcre2_version.c \
pcre2_xclass.c \
pcre16_utf16_utils.c \
pcre32_utf32_utils.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.)
. 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
--enable-pcre32 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
--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-pcre2-8 to disable
building the 8-bit library.
. If you want to include support for just-in-time compiling, which can give

View File

@ -1,6 +1,6 @@
#! /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
# 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
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

View File

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

View File

@ -98,26 +98,37 @@ then
htmldir='${docdir}/html'
fi
# Handle --disable-pcre8 (enabled by default)
AC_ARG_ENABLE(pcre8,
AS_HELP_STRING([--disable-pcre8],
# Force an error for PCRE1 size options
AC_ARG_ENABLE(pcre8,,,enable_pcre8=no)
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]),
, enable_pcre8=unset)
AC_SUBST(enable_pcre8)
, enable_pcre2_8=unset)
AC_SUBST(enable_pcre2_8)
# Handle --enable-pcre16 (disabled by default)
AC_ARG_ENABLE(pcre16,
AS_HELP_STRING([--enable-pcre16],
# Handle --enable-pcre2-16 (disabled by default)
AC_ARG_ENABLE(pcre2-16,
AS_HELP_STRING([--enable-pcre2-16],
[enable 16 bit character support]),
, enable_pcre16=unset)
AC_SUBST(enable_pcre16)
, enable_pcre2_16=unset)
AC_SUBST(enable_pcre2_16)
# Handle --enable-pcre32 (disabled by default)
AC_ARG_ENABLE(pcre32,
AS_HELP_STRING([--enable-pcre32],
# Handle --enable-pcre2-32 (disabled by default)
AC_ARG_ENABLE(pcre2-32,
AS_HELP_STRING([--enable-pcre2-32],
[enable 32 bit character support]),
, enable_pcre32=unset)
AC_SUBST(enable_pcre32)
, enable_pcre2_32=unset)
AC_SUBST(enable_pcre2_32)
# Handle --enable-jit (disabled by default)
AC_ARG_ENABLE(jit,
@ -264,26 +275,26 @@ AC_ARG_ENABLE(coverage,
[enable code coverage reports using gcov]),
, enable_coverage=no)
# Set the default value for pcre8
if test "x$enable_pcre8" = "xunset"
# Set the default value for pcre2-8
if test "x$enable_pcre2_8" = "xunset"
then
enable_pcre8=yes
enable_pcre2_8=yes
fi
# Set the default value for pcre16
if test "x$enable_pcre16" = "xunset"
# Set the default value for pcre2-16
if test "x$enable_pcre2_16" = "xunset"
then
enable_pcre16=no
enable_pcre2_16=no
fi
# Set the default value for pcre32
if test "x$enable_pcre32" = "xunset"
# Set the default value for pcre2-32
if test "x$enable_pcre2_32" = "xunset"
then
enable_pcre32=no
enable_pcre2_32=no
fi
# 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
AC_MSG_ERROR([At least one of the 8, 16 or 32 bit libraries must be enabled])
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])
# Conditional compilation
AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes")
AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes")
AM_CONDITIONAL(WITH_PCRE32, test "x$enable_pcre32" = "xyes")
AM_CONDITIONAL(WITH_PCRE2_8, test "x$enable_pcre2_8" = "xyes")
AM_CONDITIONAL(WITH_PCRE2_16, test "x$enable_pcre2_16" = "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_JIT, test "x$enable_jit" = "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
if test "$enable_pcre8" = "yes"; then
if test "$enable_pcre2_8" = "yes"; then
AC_DEFINE([SUPPORT_PCRE2_8], [], [
Define to any value to enable the 8 bit PCRE2 library.])
fi
if test "$enable_pcre16" = "yes"; then
if test "$enable_pcre2_16" = "yes"; then
AC_DEFINE([SUPPORT_PCRE2_16], [], [
Define to any value to enable the 16 bit PCRE2 library.])
fi
if test "$enable_pcre32" = "yes"; then
if test "$enable_pcre2_32" = "yes"; then
AC_DEFINE([SUPPORT_PCRE2_32], [], [
Define to any value to enable the 32 bit PCRE2 library.])
fi
@ -691,7 +702,7 @@ AC_SUBST(EXTRA_LIBPCRE2_POSIX_LDFLAGS)
# When we run 'make distcheck', use these arguments. Turning off compiler
# 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)
# Check that, if --enable-pcre2grep-libz or --enable-pcre2grep-libbz2 is
@ -850,9 +861,9 @@ $PACKAGE-$VERSION configuration summary:
Linker flags .................... : ${LDFLAGS}
Extra libraries ................. : ${LIBS}
Build 8-bit pcre2 library ....... : ${enable_pcre8}
Build 16-bit pcre2 library ...... : ${enable_pcre16}
Build 32-bit pcre2 library ...... : ${enable_pcre32}
Build 8-bit pcre2 library ....... : ${enable_pcre2_8}
Build 16-bit pcre2 library ...... : ${enable_pcre2_16}
Build 32-bit pcre2 library ...... : ${enable_pcre2_32}
Enable JIT compiling support .... : ${enable_jit}
Enable Unicode support .......... : ${enable_unicode}
Newline char/sequence ........... : ${enable_newline}

View File

@ -117,9 +117,9 @@ to the same value:
.sp
ebcdic compiled for an EBCDIC environment
jit just-in-time support is available
pcre2_16 the 16-bit library was built
pcre2_32 the 32-bit library was built
pcre2_8 the 8-bit library was built
pcre2-16 the 16-bit library was built
pcre2-32 the 32-bit library was built
pcre2-8 the 8-bit library was built
unicode Unicode support is available
.sp
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
Version: @PACKAGE_VERSION@
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
Version: @PACKAGE_VERSION@
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
Version: @PACKAGE_VERSION@
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
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre2-posix
Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@
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 user has put into $CC $CFLAGS $CPPFLAGS.
AC_MSG_CHECKING([whether the -Werror option is usable])
AC_CACHE_VAL([pcre_cv_cc_vis_werror], [
pcre_save_CFLAGS="$CFLAGS"
AC_CACHE_VAL([pcre2_cv_cc_vis_werror], [
pcre2_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[pcre_cv_cc_vis_werror=yes],
[pcre_cv_cc_vis_werror=no])
CFLAGS="$pcre_save_CFLAGS"])
AC_MSG_RESULT([$pcre_cv_cc_vis_werror])
[pcre2_cv_cc_vis_werror=yes],
[pcre2_cv_cc_vis_werror=no])
CFLAGS="$pcre2_save_CFLAGS"])
AC_MSG_RESULT([$pcre2_cv_cc_vis_werror])
dnl Now check whether visibility declarations are supported.
AC_MSG_CHECKING([for simple visibility declarations])
AC_CACHE_VAL([pcre_cv_cc_visibility], [
pcre_save_CFLAGS="$CFLAGS"
AC_CACHE_VAL([pcre2_cv_cc_visibility], [
pcre2_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden"
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 "visibility attribute not supported in this configuration; ignored"
dnl at the first function definition in every compilation unit, and we
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"
fi
AC_COMPILE_IFELSE(
@ -65,11 +65,11 @@ AC_DEFUN([PCRE2_VISIBILITY],
void dummyfunc (void) {}
]],
[[]])],
[pcre_cv_cc_visibility=yes],
[pcre_cv_cc_visibility=no])
CFLAGS="$pcre_save_CFLAGS"])
AC_MSG_RESULT([$pcre_cv_cc_visibility])
if test $pcre_cv_cc_visibility = yes; then
[pcre2_cv_cc_visibility=yes],
[pcre2_cv_cc_visibility=no])
CFLAGS="$pcre2_save_CFLAGS"])
AC_MSG_RESULT([$pcre2_cv_cc_visibility])
if test $pcre2_cv_cc_visibility = yes; then
VISIBILITY_CFLAGS="-fvisibility=hidden"
VISIBILITY_CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
HAVE_VISIBILITY=1

View File

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

View File

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

View File

@ -93,7 +93,7 @@ for (;;)
$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,?//;
@ -162,7 +162,6 @@ for (;;)
s/\s+$//; # Remove trailing space
s/^\s+//; # Remove leading space
s/\\Y//g; # Remove \Y (pcretest flag to set PCRE_NO_START_OPTIMIZE)
last if ($_ eq "");
$x = eval "\"$_\""; # To get escapes processed

View File

@ -574,9 +574,9 @@ static coptstruct coptlist[] = {
{ "jit", CONF_INT, PCRE2_CONFIG_JIT },
{ "linksize", CONF_INT, PCRE2_CONFIG_LINKSIZE },
{ "newline", CONF_NL, PCRE2_CONFIG_NEWLINE },
{ "pcre2_16", CONF_FIX, SUPPORT_16 },
{ "pcre2_32", CONF_FIX, SUPPORT_32 },
{ "pcre2_8", CONF_FIX, SUPPORT_8 },
{ "pcre2-16", CONF_FIX, SUPPORT_16 },
{ "pcre2-32", CONF_FIX, SUPPORT_32 },
{ "pcre2-8", CONF_FIX, SUPPORT_8 },
{ "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(" linksize internal link size [2, 3, 4]\n");
printf(" newline newline type [CR, LF, CRLF, ANYCRLF, ANY]\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_32 32 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-32 32 bit library support enabled [0, 1]\n");
printf(" unicode Unicode and UTF support enabled [0, 1]\n");
printf(" -d set default pattern control 'debug'\n");
printf(" -dfa set default subject control 'dfa'\n");
@ -5389,11 +5389,25 @@ if (PO(options) != DO(options) || PO(control) != DO(control))
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);
PCRE2_CONFIG(PCRE2_CONFIG_UNICODE_VERSION, uversion);
PCRE2_CONFIG(PCRE2_CONFIG_JITTARGET, jittarget);
if (PCRE2_CONFIG(PCRE2_CONFIG_VERSION, NULL) !=
PCRE2_CONFIG(PCRE2_CONFIG_VERSION, version) ||
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
debugging. They grow automatically when very long lines are read. The 16-