ongrep

A cleaned up fork of ngrep for OpenBSD
git clone git://git.sgregoratto.me/ongrep
Log | Files | Refs | README | LICENSE

commit 3e31520d9de78f9f1f3364bb6296dc968ece719e
parent f2a1f8b09194a8ab87787c1fdb60b968f5957c05
Author: Jordan Ritter <jpr5@darkridge.com>
Date:   Wed, 21 May 2014 16:51:14 -0700

Nuke included PCRE 7.4 library, deferring to system version

Diffstat:
Dpcre-7.4/132html | 296-------------------------------------------------------------------------------
Dpcre-7.4/AUTHORS | 23-----------------------
Dpcre-7.4/CMakeLists.txt | 356-------------------------------------------------------------------------------
Dpcre-7.4/COPYING | 5-----
Dpcre-7.4/ChangeLog | 3015-------------------------------------------------------------------------------
Dpcre-7.4/CleanTxt | 113-------------------------------------------------------------------------------
Dpcre-7.4/Detrail | 35-----------------------------------
Dpcre-7.4/HACKING | 414-------------------------------------------------------------------------------
Dpcre-7.4/INSTALL | 234-------------------------------------------------------------------------------
Dpcre-7.4/LICENCE | 68--------------------------------------------------------------------
Dpcre-7.4/Makefile.am | 364-------------------------------------------------------------------------------
Dpcre-7.4/Makefile.in | 1410-------------------------------------------------------------------------------
Dpcre-7.4/NEWS | 392-------------------------------------------------------------------------------
Dpcre-7.4/NON-UNIX-USE | 388-------------------------------------------------------------------------------
Dpcre-7.4/PrepareRelease | 214-------------------------------------------------------------------------------
Dpcre-7.4/README | 728-------------------------------------------------------------------------------
Dpcre-7.4/RunGrepTest | 271-------------------------------------------------------------------------------
Dpcre-7.4/RunTest | 279-------------------------------------------------------------------------------
Dpcre-7.4/RunTest.bat | 39---------------------------------------
Dpcre-7.4/aclocal.m4 | 7471-------------------------------------------------------------------------------
Dpcre-7.4/config-cmake.h.in | 31-------------------------------
Dpcre-7.4/config.guess | 1532-------------------------------------------------------------------------------
Dpcre-7.4/config.h.generic | 278-------------------------------------------------------------------------------
Dpcre-7.4/config.h.in | 219-------------------------------------------------------------------------------
Dpcre-7.4/config.sub | 1640-------------------------------------------------------------------------------
Dpcre-7.4/configure | 22891-------------------------------------------------------------------------------
Dpcre-7.4/configure.ac | 503-------------------------------------------------------------------------------
Dpcre-7.4/depcomp | 584-------------------------------------------------------------------------------
Dpcre-7.4/dftables.c | 199-------------------------------------------------------------------------------
Dpcre-7.4/install-sh | 507-------------------------------------------------------------------------------
Dpcre-7.4/libpcre.pc.in | 12------------
Dpcre-7.4/libpcrecpp.pc.in | 12------------
Dpcre-7.4/ltmain.sh | 6994-------------------------------------------------------------------------------
Dpcre-7.4/makevp.bat | 44--------------------------------------------
Dpcre-7.4/makevp_c.txt | 20--------------------
Dpcre-7.4/makevp_l.txt | 20--------------------
Dpcre-7.4/missing | 367-------------------------------------------------------------------------------
Dpcre-7.4/pcre-config.in | 69---------------------------------------------------------------------
Dpcre-7.4/pcre.h.generic | 303-------------------------------------------------------------------------------
Dpcre-7.4/pcre.h.in | 303-------------------------------------------------------------------------------
Dpcre-7.4/pcre_chartables.c.dist | 198-------------------------------------------------------------------------------
Dpcre-7.4/pcre_compile.c | 6145-------------------------------------------------------------------------------
Dpcre-7.4/pcre_config.c | 128-------------------------------------------------------------------------------
Dpcre-7.4/pcre_dfa_exec.c | 2896-------------------------------------------------------------------------------
Dpcre-7.4/pcre_exec.c | 4938------------------------------------------------------------------------------
Dpcre-7.4/pcre_fullinfo.c | 165-------------------------------------------------------------------------------
Dpcre-7.4/pcre_get.c | 465-------------------------------------------------------------------------------
Dpcre-7.4/pcre_globals.c | 63---------------------------------------------------------------
Dpcre-7.4/pcre_info.c | 93-------------------------------------------------------------------------------
Dpcre-7.4/pcre_internal.h | 1117-------------------------------------------------------------------------------
Dpcre-7.4/pcre_maketables.c | 143-------------------------------------------------------------------------------
Dpcre-7.4/pcre_newline.c | 164-------------------------------------------------------------------------------
Dpcre-7.4/pcre_ord2utf8.c | 85-------------------------------------------------------------------------------
Dpcre-7.4/pcre_printint.src | 512-------------------------------------------------------------------------------
Dpcre-7.4/pcre_refcount.c | 82-------------------------------------------------------------------------------
Dpcre-7.4/pcre_scanner.cc | 199-------------------------------------------------------------------------------
Dpcre-7.4/pcre_scanner.h | 172-------------------------------------------------------------------------------
Dpcre-7.4/pcre_scanner_unittest.cc | 158-------------------------------------------------------------------------------
Dpcre-7.4/pcre_stringpiece.cc | 43-------------------------------------------
Dpcre-7.4/pcre_stringpiece.h.in | 177-------------------------------------------------------------------------------
Dpcre-7.4/pcre_stringpiece_unittest.cc | 151------------------------------------------------------------------------------
Dpcre-7.4/pcre_study.c | 579-------------------------------------------------------------------------------
Dpcre-7.4/pcre_tables.c | 318-------------------------------------------------------------------------------
Dpcre-7.4/pcre_try_flipped.c | 137-------------------------------------------------------------------------------
Dpcre-7.4/pcre_ucp_searchfuncs.c | 179-------------------------------------------------------------------------------
Dpcre-7.4/pcre_valid_utf8.c | 162-------------------------------------------------------------------------------
Dpcre-7.4/pcre_version.c | 90-------------------------------------------------------------------------------
Dpcre-7.4/pcre_xclass.c | 148-------------------------------------------------------------------------------
Dpcre-7.4/pcrecpp.cc | 857-------------------------------------------------------------------------------
Dpcre-7.4/pcrecpp.h | 700-------------------------------------------------------------------------------
Dpcre-7.4/pcrecpp_internal.h | 68--------------------------------------------------------------------
Dpcre-7.4/pcrecpp_unittest.cc | 1240-------------------------------------------------------------------------------
Dpcre-7.4/pcrecpparg.h.in | 173-------------------------------------------------------------------------------
Dpcre-7.4/pcredemo.c | 325-------------------------------------------------------------------------------
Dpcre-7.4/pcregexp.pas | 783-------------------------------------------------------------------------------
Dpcre-7.4/pcregrep.c | 2106-------------------------------------------------------------------------------
Dpcre-7.4/pcreposix.c | 337-------------------------------------------------------------------------------
Dpcre-7.4/pcreposix.h | 142-------------------------------------------------------------------------------
Dpcre-7.4/pcretest.c | 2396-------------------------------------------------------------------------------
Dpcre-7.4/perltest.pl | 191-------------------------------------------------------------------------------
Dpcre-7.4/ucp.h | 133-------------------------------------------------------------------------------
Dpcre-7.4/ucpinternal.h | 92-------------------------------------------------------------------------------
Dpcre-7.4/ucptable.h | 3068-------------------------------------------------------------------------------
83 files changed, 0 insertions(+), 84961 deletions(-)

diff --git a/pcre-7.4/132html b/pcre-7.4/132html @@ -1,296 +0,0 @@ -#! /usr/bin/perl -w - -# Script to turn PCRE man pages into HTML - - -# Subroutine to handle font changes and other escapes - -sub do_line { -my($s) = $_[0]; - -$s =~ s/</&#60;/g; # Deal with < and > -$s =~ s/>/&#62;/g; -$s =~ s"\\fI(.*?)\\f[RP]"<i>$1</i>"g; -$s =~ s"\\fB(.*?)\\f[RP]"<b>$1</b>"g; -$s =~ s"\\e"\\"g; -$s =~ s/(?<=Copyright )\(c\)/&copy;/g; -$s; -} - -# Subroutine to ensure not in a paragraph - -sub end_para { -if ($inpara) - { - print TEMP "</PRE>\n" if ($inpre); - print TEMP "</P>\n"; - } -$inpara = $inpre = 0; -$wrotetext = 0; -} - -# Subroutine to start a new paragraph - -sub new_para { -&end_para(); -print TEMP "<P>\n"; -$inpara = 1; -} - - -# Main program - -$innf = 0; -$inpara = 0; -$inpre = 0; -$wrotetext = 0; -$toc = 0; -$ref = 1; - -while ($#ARGV >= 0 && $ARGV[0] =~ /^-/) - { - $toc = 1 if $ARGV[0] eq "-toc"; - shift; - } - -# Initial output to STDOUT - -print <<End ; -<html> -<head> -<title>$ARGV[0] specification</title> -</head> -<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB"> -<h1>$ARGV[0] man page</h1> -<p> -Return to the <a href="index.html">PCRE index page</a>. -</p> -<p> -This page is part of the PCRE HTML documentation. It was generated automatically -from the original man page. If there is any nonsense in it, please consult the -man page, in case the conversion went wrong. -<br> -End - -print "<ul>\n" if ($toc); - -open(TEMP, ">/tmp/$$") || die "Can't open /tmp/$$ for output\n"; - -while (<STDIN>) - { - # Handle lines beginning with a dot - - if (/^\./) - { - # Some of the PCRE man pages used to contain instances of .br. However, - # they should have all been removed because they cause trouble in some - # (other) automated systems that translate man pages to HTML. Complain if - # we find .br or .in (another macro that is deprecated). - - if (/^\.br/ || /^\.in/) - { - print STDERR "\n*** Deprecated macro encountered - rewrite needed\n"; - print STDERR "*** $_\n"; - die "*** Processing abandoned\n"; - } - - # Instead of .br, relevent "literal" sections are enclosed in .nf/.fi. - - elsif (/^\.nf/) - { - $innf = 1; - } - - elsif (/^\.fi/) - { - $innf = 0; - } - - # Handling .sp is subtle. If it is inside a literal section, do nothing if - # the next line is a non literal text line; similarly, if not inside a - # literal section, do nothing if a literal follows. The point being that - # the <pre> and </pre> that delimit literal sections will do the spacing. - # Always skip if no previous output. - - elsif (/^\.sp/) - { - if ($wrotetext) - { - $_ = <STDIN>; - if ($inpre) - { - print TEMP "\n" if (/^[\s.]/); - } - else - { - print TEMP "<br>\n<br>\n" if (!/^[\s.]/); - } - redo; # Now process the lookahead line we just read - } - } - elsif (/^\.TP/ || /^\.PP/ || /^\.P/) - { - &new_para(); - } - elsif (/^\.SH\s*("?)(.*)\1/) - { - # Ignore the NAME section - if ($2 =~ /^NAME\b/) - { - <STDIN>; - next; - } - - &end_para(); - my($title) = &do_line($2); - if ($toc) - { - printf("<li><a name=\"TOC%d\" href=\"#SEC%d\">$title</a>\n", - $ref, $ref); - printf TEMP ("<br><a name=\"SEC%d\" href=\"#TOC1\">$title</a><br>\n", - $ref, $ref); - $ref++; - } - else - { - print TEMP "<br><b>\n$title\n</b><br>\n"; - } - } - elsif (/^\.SS\s*("?)(.*)\1/) - { - &end_para(); - my($title) = &do_line($2); - print TEMP "<br><b>\n$title\n</b><br>\n"; - } - elsif (/^\.B\s*(.*)/) - { - &new_para() if (!$inpara); - $_ = &do_line($1); - s/"(.*?)"/$1/g; - print TEMP "<b>$_</b>\n"; - $wrotetext = 1; - } - elsif (/^\.I\s*(.*)/) - { - &new_para() if (!$inpara); - $_ = &do_line($1); - s/"(.*?)"/$1/g; - print TEMP "<i>$_</i>\n"; - $wrotetext = 1; - } - - # A comment that starts "HREF" takes the next line as a name that - # is turned into a hyperlink, using the text given, which might be - # in a special font. If it ends in () or (digits) or punctuation, they - # aren't part of the link. - - elsif (/^\.\\"\s*HREF/) - { - $_=<STDIN>; - chomp; - $_ = &do_line($_); - $_ =~ s/\s+$//; - $_ =~ /^(?:<.>)?([^<(]+)(?:\(\))?(?:<\/.>)?(?:\(\d+\))?[.,;:]?$/; - print TEMP "<a href=\"$1.html\">$_</a>\n"; - } - - # A comment that starts "HTML" inserts literal HTML - - elsif (/^\.\\"\s*HTML\s*(.*)/) - { - print TEMP $1; - } - - # A comment that starts < inserts that HTML at the end of the - # *next* input line - so as not to get a newline between them. - - elsif (/^\.\\"\s*(<.*>)/) - { - my($markup) = $1; - $_=<STDIN>; - chomp; - $_ = &do_line($_); - $_ =~ s/\s+$//; - print TEMP "$_$markup\n"; - } - - # A comment that starts JOIN joins the next two lines together, with one - # space between them. Then that line is processed. This is used in some - # displays where two lines are needed for the "man" version. JOINSH works - # the same, except that it assumes this is a shell command, so removes - # continuation backslashes. - - elsif (/^\.\\"\s*JOIN(SH)?/) - { - my($one,$two); - $one = <STDIN>; - $two = <STDIN>; - $one =~ s/\s*\\e\s*$// if (defined($1)); - chomp($one); - $two =~ s/^\s+//; - $_ = "$one $two"; - redo; # Process the joined lines - } - - # Ignore anything not recognized - - next; - } - - # Line does not begin with a dot. Replace blank lines with new paragraphs - - if (/^\s*$/) - { - &end_para() if ($wrotetext); - next; - } - - # Convert fonts changes and output an ordinary line. Ensure that indented - # lines are marked as literal. - - $_ = &do_line($_); - &new_para() if (!$inpara); - - if (/^\s/) - { - if (!$inpre) - { - print TEMP "<pre>\n"; - $inpre = 1; - } - } - elsif ($inpre) - { - print TEMP "</pre>\n"; - $inpre = 0; - } - - # Add <br> to the end of a non-literal line if we are within .nf/.fi - - $_ .= "<br>\n" if (!$inpre && $innf); - - print TEMP; - $wrotetext = 1; - } - -# The TOC, if present, will have been written - terminate it - -print "</ul>\n" if ($toc); - -# Copy the remainder to the standard output - -close(TEMP); -open(TEMP, "/tmp/$$") || die "Can't open /tmp/$$ for input\n"; - -print while (<TEMP>); - -print <<End ; -<p> -Return to the <a href="index.html">PCRE index page</a>. -</p> -End - -close(TEMP); -unlink("/tmp/$$"); - -# End diff --git a/pcre-7.4/AUTHORS b/pcre-7.4/AUTHORS @@ -1,23 +0,0 @@ -THE MAIN PCRE LIBRARY ---------------------- - -Written by: Philip Hazel -Email local part: ph10 -Email domain: cam.ac.uk - -University of Cambridge Computing Service, -Cambridge, England. - -Copyright (c) 1997-2007 University of Cambridge -All rights reserved - - -THE C++ WRAPPER LIBRARY ------------------------ - -Written by: Google Inc. - -Copyright (c) 2007 Google Inc -All rights reserved - -#### diff --git a/pcre-7.4/CMakeLists.txt b/pcre-7.4/CMakeLists.txt @@ -1,356 +0,0 @@ -# CMakeLists.txt -# -# -# This file allows building PCRE with the CMake configuration and build -# tool. Download CMake in source or binary form from http://www.cmake.org/ -# -# Original listfile by Christian Ehrlicher <Ch.Ehrlicher@gmx.de> -# Refined and expanded by Daniel Richard G. <skunk@iSKUNK.ORG> -# 2007-09-14 mod by Sheri so 7.4 supported configuration options can be entered -# 2007-09-19 Adjusted by PH to retain previous default settings -# - -PROJECT(PCRE C CXX) - -CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6) - -# Configuration checks - -INCLUDE(CheckIncludeFile) -INCLUDE(CheckIncludeFileCXX) -INCLUDE(CheckFunctionExists) -INCLUDE(CheckTypeSize) - -CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H) -CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) -CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) -CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H) - -CHECK_INCLUDE_FILE_CXX(type_traits.h HAVE_TYPE_TRAITS_H) -CHECK_INCLUDE_FILE_CXX(bits/type_traits.h HAVE_BITS_TYPE_TRAITS_H) - -CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY) -CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) -CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR) - -CHECK_TYPE_SIZE("long long" LONG_LONG) -CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) - -# User-configurable options -# -# (Note: CMakeSetup displays these in alphabetical order, regardless of -# the order we use here) - -SET(BUILD_SHARED_LIBS OFF CACHE BOOL - "Build shared libraries instead of static ones.") - -OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON) - -SET(PCRE_EBCDIC OFF CACHE BOOL - "Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems)") - -SET(PCRE_LINK_SIZE "2" CACHE STRING - "Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.") - -SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING - "Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.") - -SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING - "Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.") - -SET(PCRE_NEWLINE "LF" CACHE STRING - "What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).") - -SET(PCRE_NO_RECURSE OFF CACHE BOOL - "If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.") - -SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING - "Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.") - -SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL - "Enable support for Unicode properties. (If set, UTF-8 support will be enabled as well)") - -SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL - "Enable support for the Unicode UTF-8 encoding.") - -SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL - "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks") - -# Prepare build configuration - -SET(pcre_have_type_traits 0) -SET(pcre_have_bits_type_traits 0) - -IF(HAVE_TYPE_TRAITS_H) - SET(pcre_have_type_traits 1) -ENDIF(HAVE_TYPE_TRAITS_H) - -IF(HAVE_BITS_TYPE_TRAITS_H) - SET(pcre_have_bits_type_traits 1) -ENDIF(HAVE_BITS_TYPE_TRAITS_H) - -SET(pcre_have_long_long 0) -SET(pcre_have_ulong_long 0) - -IF(HAVE_LONG_LONG) - SET(pcre_have_long_long 1) -ENDIF(HAVE_LONG_LONG) - -IF(HAVE_UNSIGNED_LONG_LONG) - SET(pcre_have_ulong_long 1) -ENDIF(HAVE_UNSIGNED_LONG_LONG) - -IF(NOT BUILD_SHARED_LIBS) - SET(PCRE_STATIC 1) -ENDIF(NOT BUILD_SHARED_LIBS) - -IF(PCRE_SUPPORT_BSR_ANYCRLF) - SET(BSR_ANYCRLF 1) -ENDIF(PCRE_SUPPORT_BSR_ANYCRLF) - -IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) - SET(SUPPORT_UTF8 1) -ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) - -IF(PCRE_SUPPORT_UNICODE_PROPERTIES) - SET(SUPPORT_UCP 1) -ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES) - -SET(NEWLINE "") - -IF(PCRE_NEWLINE STREQUAL "LF") - SET(NEWLINE "10") -ENDIF(PCRE_NEWLINE STREQUAL "LF") -IF(PCRE_NEWLINE STREQUAL "CR") - SET(NEWLINE "13") -ENDIF(PCRE_NEWLINE STREQUAL "CR") -IF(PCRE_NEWLINE STREQUAL "CRLF") - SET(NEWLINE "3338") -ENDIF(PCRE_NEWLINE STREQUAL "CRLF") -IF(PCRE_NEWLINE STREQUAL "ANY") - SET(NEWLINE "-1") -ENDIF(PCRE_NEWLINE STREQUAL "ANY") -IF(PCRE_NEWLINE STREQUAL "ANYCRLF") - SET(NEWLINE "-2") -ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF") - -IF(NEWLINE STREQUAL "") - MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".") -ENDIF(NEWLINE STREQUAL "") - -IF(PCRE_EBCDIC) - SET(EBCDIC 1) -ENDIF(PCRE_EBCDIC) - -IF(PCRE_NO_RECURSE) - SET(NO_RECURSE 1) -ENDIF(PCRE_NO_RECURSE) - -# Output files - -CONFIGURE_FILE(config-cmake.h.in - ${CMAKE_BINARY_DIR}/config.h - @ONLY) - -CONFIGURE_FILE(pcre.h.generic - ${CMAKE_BINARY_DIR}/pcre.h - COPYONLY) - -# What about pcre-config and libpcre.pc? - -IF(PCRE_BUILD_PCRECPP) - CONFIGURE_FILE(pcre_stringpiece.h.in - ${CMAKE_BINARY_DIR}/pcre_stringpiece.h - @ONLY) - - CONFIGURE_FILE(pcrecpparg.h.in - ${CMAKE_BINARY_DIR}/pcrecpparg.h - @ONLY) -ENDIF(PCRE_BUILD_PCRECPP) - -# Character table generation - -ADD_EXECUTABLE(dftables dftables.c) - -GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION) - -ADD_CUSTOM_COMMAND( - COMMENT "Generating character tables (pcre_chartables.c) for current locale" - DEPENDS dftables - COMMAND ${DFTABLES_EXE} - ARGS ${CMAKE_BINARY_DIR}/pcre_chartables.c - OUTPUT ${CMAKE_BINARY_DIR}/pcre_chartables.c -) - -# Source code - -SET(PCRE_HEADERS ${CMAKE_BINARY_DIR}/pcre.h) - -SET(PCRE_SOURCES - ${CMAKE_BINARY_DIR}/pcre_chartables.c - pcre_compile.c - pcre_config.c - pcre_dfa_exec.c - pcre_exec.c - pcre_fullinfo.c - pcre_get.c - pcre_globals.c - pcre_info.c - pcre_newline.c - pcre_maketables.c - pcre_ord2utf8.c - pcre_refcount.c - pcre_study.c - pcre_tables.c - pcre_try_flipped.c - pcre_ucp_searchfuncs.c - pcre_valid_utf8.c - pcre_version.c - pcre_xclass.c -) - -SET(PCREPOSIX_HEADERS pcreposix.h) - -SET(PCREPOSIX_SOURCES pcreposix.c) - -SET(PCRECPP_HEADERS - pcrecpp.h - pcre_scanner.h - ${CMAKE_BINARY_DIR}/pcrecpparg.h - ${CMAKE_BINARY_DIR}/pcre_stringpiece.h -) - -SET(PCRECPP_SOURCES - pcrecpp.cc - pcre_scanner.cc - pcre_stringpiece.cc -) - -# Build setup - -ADD_DEFINITIONS(-DHAVE_CONFIG_H) - -IF(WIN32) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) -ENDIF(WIN32) - -SET(CMAKE_INCLUDE_CURRENT_DIR 1) - -#SET(CMAKE_DEBUG_POSTFIX "d") - -# Libraries - -ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES}) - -ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES}) -TARGET_LINK_LIBRARIES(pcreposix pcre) - -SET_TARGET_PROPERTIES(pcre pcreposix - PROPERTIES PREFIX "" -) - -IF(PCRE_BUILD_PCRECPP) - ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES}) - TARGET_LINK_LIBRARIES(pcrecpp pcre) - IF(MINGW) - SET_TARGET_PROPERTIES(pcrecpp PROPERTIES PREFIX "mingw-") - ENDIF(MINGW) -ENDIF(PCRE_BUILD_PCRECPP) - -# Executables - -ADD_EXECUTABLE(pcretest pcretest.c) -TARGET_LINK_LIBRARIES(pcretest pcreposix) - -ADD_EXECUTABLE(pcregrep pcregrep.c) -TARGET_LINK_LIBRARIES(pcregrep pcreposix) - -IF(PCRE_BUILD_PCRECPP) - ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc) - TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp) - - ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc) - TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp) - - ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc) - TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp) -ENDIF(PCRE_BUILD_PCRECPP) - -# Testing - -ENABLE_TESTING() - -GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION) -GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION) - -# Write out a CTest configuration file that sets some needed environment -# variables for the test scripts. -# -FILE(WRITE ${CMAKE_BINARY_DIR}/CTestCustom.ctest -"# This is a generated file. -SET(ENV{srcdir} ${CMAKE_SOURCE_DIR}) -SET(ENV{pcregrep} ${PCREGREP_EXE}) -SET(ENV{pcretest} ${PCRETEST_EXE}) -") - -IF(UNIX) - ADD_TEST(pcre_test ${CMAKE_SOURCE_DIR}/RunTest) - ADD_TEST(pcre_grep_test ${CMAKE_SOURCE_DIR}/RunGrepTest) -ENDIF(UNIX) -IF(WIN32) - ADD_TEST(pcre_test cmd /C ${CMAKE_SOURCE_DIR}/RunTest.bat) -ENDIF(WIN32) - -GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE - pcrecpp_unittest - DEBUG_LOCATION) - -GET_TARGET_PROPERTY(PCRE_SCANNER_UNITTEST_EXE - pcre_scanner_unittest - DEBUG_LOCATION) - -GET_TARGET_PROPERTY(PCRE_STRINGPIECE_UNITTEST_EXE - pcre_stringpiece_unittest - DEBUG_LOCATION) - -ADD_TEST(pcrecpp_test ${PCRECPP_UNITTEST_EXE}) -ADD_TEST(pcre_scanner_test ${PCRE_SCANNER_UNITTEST_EXE}) -ADD_TEST(pcre_stringpiece_test ${PCRE_STRINGPIECE_UNITTEST_EXE}) - -# Installation - -SET(CMAKE_INSTALL_ALWAYS 1) - -INSTALL(TARGETS pcre pcreposix pcregrep pcretest - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - -INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include) - -FILE(GLOB html ${CMAKE_SOURCE_DIR}/doc/html/*.html) -FILE(GLOB man1 ${CMAKE_SOURCE_DIR}/doc/*.1) -FILE(GLOB man3 ${CMAKE_SOURCE_DIR}/doc/*.3) - -IF(PCRE_BUILD_PCRECPP) - INSTALL(TARGETS pcrecpp - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include) -ELSE(PCRE_BUILD_PCRECPP) - # Remove pcrecpp.3 - FOREACH(man ${man3}) - GET_FILENAME_COMPONENT(man_tmp ${man} NAME) - IF(NOT man_tmp STREQUAL "pcrecpp.3") - SET(man3_new ${man3} ${man}) - ENDIF(NOT man_tmp STREQUAL "pcrecpp.3") - ENDFOREACH(man ${man3}) - SET(man3 ${man3_new}) -ENDIF(PCRE_BUILD_PCRECPP) - -INSTALL(FILES ${man1} DESTINATION man/man1) -INSTALL(FILES ${man3} DESTINATION man/man3) -INSTALL(FILES ${html} DESTINATION share/doc/pcre/html) - -# end CMakeLists.txt diff --git a/pcre-7.4/COPYING b/pcre-7.4/COPYING @@ -1,5 +0,0 @@ -PCRE LICENCE - -Please see the file LICENCE in the PCRE distribution for licensing details. - -End diff --git a/pcre-7.4/ChangeLog b/pcre-7.4/ChangeLog @@ -1,3015 +0,0 @@ -ChangeLog for PCRE ------------------- - -Version 7.4 21-Sep-07 ---------------------- - -1. Change 7.3/28 was implemented for classes by looking at the bitmap. This - means that a class such as [\s] counted as "explicit reference to CR or - LF". That isn't really right - the whole point of the change was to try to - help when there was an actual mention of one of the two characters. So now - the change happens only if \r or \n (or a literal CR or LF) character is - encountered. - -2. The 32-bit options word was also used for 6 internal flags, but the numbers - of both had grown to the point where there were only 3 bits left. - Fortunately, there was spare space in the data structure, and so I have - moved the internal flags into a new 16-bit field to free up more option - bits. - -3. The appearance of (?J) at the start of a pattern set the DUPNAMES option, - but did not set the internal JCHANGED flag - either of these is enough to - control the way the "get" function works - but the PCRE_INFO_JCHANGED - facility is supposed to tell if (?J) was ever used, so now (?J) at the - start sets both bits. - -4. Added options (at build time, compile time, exec time) to change \R from - matching any Unicode line ending sequence to just matching CR, LF, or CRLF. - -5. doc/pcresyntax.html was missing from the distribution. - -6. Put back the definition of PCRE_ERROR_NULLWSLIMIT, for backward - compatibility, even though it is no longer used. - -7. Added macro for snprintf to pcrecpp_unittest.cc and also for strtoll and - strtoull to pcrecpp.cc to select the available functions in WIN32 when the - windows.h file is present (where different names are used). [This was - reversed later after testing - see 16 below.] - -8. Changed all #include <config.h> to #include "config.h". There were also - some further <pcre.h> cases that I changed to "pcre.h". - -9. When pcregrep was used with the --colour option, it missed the line ending - sequence off the lines that it output. - -10. It was pointed out to me that arrays of string pointers cause lots of - relocations when a shared library is dynamically loaded. A technique of - using a single long string with a table of offsets can drastically reduce - these. I have refactored PCRE in four places to do this. The result is - dramatic: - - Originally: 290 - After changing UCP table: 187 - After changing error message table: 43 - After changing table of "verbs" 36 - After changing table of Posix names 22 - - Thanks to the folks working on Gregex for glib for this insight. - -11. --disable-stack-for-recursion caused compiling to fail unless -enable- - unicode-properties was also set. - -12. Updated the tests so that they work when \R is defaulted to ANYCRLF. - -13. Added checks for ANY and ANYCRLF to pcrecpp.cc where it previously - checked only for CRLF. - -14. Added casts to pcretest.c to avoid compiler warnings. - -15. Added Craig's patch to various pcrecpp modules to avoid compiler warnings. - -16. Added Craig's patch to remove the WINDOWS_H tests, that were not working, - and instead check for _strtoi64 explicitly, and avoid the use of snprintf() - entirely. This removes changes made in 7 above. - -17. The CMake files have been updated, and there is now more information about - building with CMake in the NON-UNIX-USE document. - - -Version 7.3 28-Aug-07 ---------------------- - - 1. In the rejigging of the build system that eventually resulted in 7.1, the - line "#include <pcre.h>" was included in pcre_internal.h. The use of angle - brackets there is not right, since it causes compilers to look for an - installed pcre.h, not the version that is in the source that is being - compiled (which of course may be different). I have changed it back to: - - #include "pcre.h" - - I have a vague recollection that the change was concerned with compiling in - different directories, but in the new build system, that is taken care of - by the VPATH setting the Makefile. - - 2. The pattern .*$ when run in not-DOTALL UTF-8 mode with newline=any failed - when the subject happened to end in the byte 0x85 (e.g. if the last - character was \x{1ec5}). *Character* 0x85 is one of the "any" newline - characters but of course it shouldn't be taken as a newline when it is part - of another character. The bug was that, for an unlimited repeat of . in - not-DOTALL UTF-8 mode, PCRE was advancing by bytes rather than by - characters when looking for a newline. - - 3. A small performance improvement in the DOTALL UTF-8 mode .* case. - - 4. Debugging: adjusted the names of opcodes for different kinds of parentheses - in debug output. - - 5. Arrange to use "%I64d" instead of "%lld" and "%I64u" instead of "%llu" for - long printing in the pcrecpp unittest when running under MinGW. - - 6. ESC_K was left out of the EBCDIC table. - - 7. Change 7.0/38 introduced a new limit on the number of nested non-capturing - parentheses; I made it 1000, which seemed large enough. Unfortunately, the - limit also applies to "virtual nesting" when a pattern is recursive, and in - this case 1000 isn't so big. I have been able to remove this limit at the - expense of backing off one optimization in certain circumstances. Normally, - when pcre_exec() would call its internal match() function recursively and - immediately return the result unconditionally, it uses a "tail recursion" - feature to save stack. However, when a subpattern that can match an empty - string has an unlimited repetition quantifier, it no longer makes this - optimization. That gives it a stack frame in which to save the data for - checking that an empty string has been matched. Previously this was taken - from the 1000-entry workspace that had been reserved. So now there is no - explicit limit, but more stack is used. - - 8. Applied Daniel's patches to solve problems with the import/export magic - syntax that is required for Windows, and which was going wrong for the - pcreposix and pcrecpp parts of the library. These were overlooked when this - problem was solved for the main library. - - 9. There were some crude static tests to avoid integer overflow when computing - the size of patterns that contain repeated groups with explicit upper - limits. As the maximum quantifier is 65535, the maximum group length was - set at 30,000 so that the product of these two numbers did not overflow a - 32-bit integer. However, it turns out that people want to use groups that - are longer than 30,000 bytes (though not repeat them that many times). - Change 7.0/17 (the refactoring of the way the pattern size is computed) has - made it possible to implement the integer overflow checks in a much more - dynamic way, which I have now done. The artificial limitation on group - length has been removed - we now have only the limit on the total length of - the compiled pattern, which depends on the LINK_SIZE setting. - -10. Fixed a bug in the documentation for get/copy named substring when - duplicate names are permitted. If none of the named substrings are set, the - functions return PCRE_ERROR_NOSUBSTRING (7); the doc said they returned an - empty string. - -11. Because Perl interprets \Q...\E at a high level, and ignores orphan \E - instances, patterns such as [\Q\E] or [\E] or even [^\E] cause an error, - because the ] is interpreted as the first data character and the - terminating ] is not found. PCRE has been made compatible with Perl in this - regard. Previously, it interpreted [\Q\E] as an empty class, and [\E] could - cause memory overwriting. - -10. Like Perl, PCRE automatically breaks an unlimited repeat after an empty - string has been matched (to stop an infinite loop). It was not recognizing - a conditional subpattern that could match an empty string if that - subpattern was within another subpattern. For example, it looped when - trying to match (((?(1)X|))*) but it was OK with ((?(1)X|)*) where the - condition was not nested. This bug has been fixed. - -12. A pattern like \X?\d or \P{L}?\d in non-UTF-8 mode could cause a backtrack - past the start of the subject in the presence of bytes with the top bit - set, for example "\x8aBCD". - -13. Added Perl 5.10 experimental backtracking controls (*FAIL), (*F), (*PRUNE), - (*SKIP), (*THEN), (*COMMIT), and (*ACCEPT). - -14. Optimized (?!) to (*FAIL). - -15. Updated the test for a valid UTF-8 string to conform to the later RFC 3629. - This restricts code points to be within the range 0 to 0x10FFFF, excluding - the "low surrogate" sequence 0xD800 to 0xDFFF. Previously, PCRE allowed the - full range 0 to 0x7FFFFFFF, as defined by RFC 2279. Internally, it still - does: it's just the validity check that is more restrictive. - -16. Inserted checks for integer overflows during escape sequence (backslash) - processing, and also fixed erroneous offset values for syntax errors during - backslash processing. - -17. Fixed another case of looking too far back in non-UTF-8 mode (cf 12 above) - for patterns like [\PPP\x8a]{1,}\x80 with the subject "A\x80". - -18. An unterminated class in a pattern like (?1)\c[ with a "forward reference" - caused an overrun. - -19. A pattern like (?:[\PPa*]*){8,} which had an "extended class" (one with - something other than just ASCII characters) inside a group that had an - unlimited repeat caused a loop at compile time (while checking to see - whether the group could match an empty string). - -20. Debugging a pattern containing \p or \P could cause a crash. For example, - [\P{Any}] did so. (Error in the code for printing property names.) - -21. An orphan \E inside a character class could cause a crash. - -22. A repeated capturing bracket such as (A)? could cause a wild memory - reference during compilation. - -23. There are several functions in pcre_compile() that scan along a compiled - expression for various reasons (e.g. to see if it's fixed length for look - behind). There were bugs in these functions when a repeated \p or \P was - present in the pattern. These operators have additional parameters compared - with \d, etc, and these were not being taken into account when moving along - the compiled data. Specifically: - - (a) A item such as \p{Yi}{3} in a lookbehind was not treated as fixed - length. - - (b) An item such as \pL+ within a repeated group could cause crashes or - loops. - - (c) A pattern such as \p{Yi}+(\P{Yi}+)(?1) could give an incorrect - "reference to non-existent subpattern" error. - - (d) A pattern like (\P{Yi}{2}\277)? could loop at compile time. - -24. A repeated \S or \W in UTF-8 mode could give wrong answers when multibyte - characters were involved (for example /\S{2}/8g with "A\x{a3}BC"). - -25. Using pcregrep in multiline, inverted mode (-Mv) caused it to loop. - -26. Patterns such as [\P{Yi}A] which include \p or \P and just one other - character were causing crashes (broken optimization). - -27. Patterns such as (\P{Yi}*\277)* (group with possible zero repeat containing - \p or \P) caused a compile-time loop. - -28. More problems have arisen in unanchored patterns when CRLF is a valid line - break. For example, the unstudied pattern [\r\n]A does not match the string - "\r\nA" because change 7.0/46 below moves the current point on by two - characters after failing to match at the start. However, the pattern \nA - *does* match, because it doesn't start till \n, and if [\r\n]A is studied, - the same is true. There doesn't seem any very clean way out of this, but - what I have chosen to do makes the common cases work: PCRE now takes note - of whether there can be an explicit match for \r or \n anywhere in the - pattern, and if so, 7.0/46 no longer applies. As part of this change, - there's a new PCRE_INFO_HASCRORLF option for finding out whether a compiled - pattern has explicit CR or LF references. - -29. Added (*CR) etc for changing newline setting at start of pattern. - - -Version 7.2 19-Jun-07 ---------------------- - - 1. If the fr_FR locale cannot be found for test 3, try the "french" locale, - which is apparently normally available under Windows. - - 2. Re-jig the pcregrep tests with different newline settings in an attempt - to make them independent of the local environment's newline setting. - - 3. Add code to configure.ac to remove -g from the CFLAGS default settings. - - 4. Some of the "internals" tests were previously cut out when the link size - was not 2, because the output contained actual offsets. The recent new - "Z" feature of pcretest means that these can be cut out, making the tests - usable with all link sizes. - - 5. Implemented Stan Switzer's goto replacement for longjmp() when not using - stack recursion. This gives a massive performance boost under BSD, but just - a small improvement under Linux. However, it saves one field in the frame - in all cases. - - 6. Added more features from the forthcoming Perl 5.10: - - (a) (?-n) (where n is a string of digits) is a relative subroutine or - recursion call. It refers to the nth most recently opened parentheses. - - (b) (?+n) is also a relative subroutine call; it refers to the nth next - to be opened parentheses. - - (c) Conditions that refer to capturing parentheses can be specified - relatively, for example, (?(-2)... or (?(+3)... - - (d) \K resets the start of the current match so that everything before - is not part of it. - - (e) \k{name} is synonymous with \k<name> and \k'name' (.NET compatible). - - (f) \g{name} is another synonym - part of Perl 5.10's unification of - reference syntax. - - (g) (?| introduces a group in which the numbering of parentheses in each - alternative starts with the same number. - - (h) \h, \H, \v, and \V match horizontal and vertical whitespace. - - 7. Added two new calls to pcre_fullinfo(): PCRE_INFO_OKPARTIAL and - PCRE_INFO_JCHANGED. - - 8. A pattern such as (.*(.)?)* caused pcre_exec() to fail by either not - terminating or by crashing. Diagnosed by Viktor Griph; it was in the code - for detecting groups that can match an empty string. - - 9. A pattern with a very large number of alternatives (more than several - hundred) was running out of internal workspace during the pre-compile - phase, where pcre_compile() figures out how much memory will be needed. A - bit of new cunning has reduced the workspace needed for groups with - alternatives. The 1000-alternative test pattern now uses 12 bytes of - workspace instead of running out of the 4096 that are available. - -10. Inserted some missing (unsigned int) casts to get rid of compiler warnings. - -11. Applied patch from Google to remove an optimization that didn't quite work. - The report of the bug said: - - pcrecpp::RE("a*").FullMatch("aaa") matches, while - pcrecpp::RE("a*?").FullMatch("aaa") does not, and - pcrecpp::RE("a*?\\z").FullMatch("aaa") does again. - -12. If \p or \P was used in non-UTF-8 mode on a character greater than 127 - it matched the wrong number of bytes. - - -Version 7.1 24-Apr-07 ---------------------- - - 1. Applied Bob Rossi and Daniel G's patches to convert the build system to one - that is more "standard", making use of automake and other Autotools. There - is some re-arrangement of the files and adjustment of comments consequent - on this. - - 2. Part of the patch fixed a problem with the pcregrep tests. The test of -r - for recursive directory scanning broke on some systems because the files - are not scanned in any specific order and on different systems the order - was different. A call to "sort" has been inserted into RunGrepTest for the - approprate test as a short-term fix. In the longer term there may be an - alternative. - - 3. I had an email from Eric Raymond about problems translating some of PCRE's - man pages to HTML (despite the fact that I distribute HTML pages, some - people do their own conversions for various reasons). The problems - concerned the use of low-level troff macros .br and .in. I have therefore - removed all such uses from the man pages (some were redundant, some could - be replaced by .nf/.fi pairs). The 132html script that I use to generate - HTML has been updated to handle .nf/.fi and to complain if it encounters - .br or .in. - - 4. Updated comments in configure.ac that get placed in config.h.in and also - arranged for config.h to be included in the distribution, with the name - config.h.generic, for the benefit of those who have to compile without - Autotools (compare pcre.h, which is now distributed as pcre.h.generic). - - 5. Updated the support (such as it is) for Virtual Pascal, thanks to Stefan - Weber: (1) pcre_internal.h was missing some function renames; (2) updated - makevp.bat for the current PCRE, using the additional files - makevp_c.txt, makevp_l.txt, and pcregexp.pas. - - 6. A Windows user reported a minor discrepancy with test 2, which turned out - to be caused by a trailing space on an input line that had got lost in his - copy. The trailing space was an accident, so I've just removed it. - - 7. Add -Wl,-R... flags in pcre-config.in for *BSD* systems, as I'm told - that is needed. - - 8. Mark ucp_table (in ucptable.h) and ucp_gentype (in pcre_ucp_searchfuncs.c) - as "const" (a) because they are and (b) because it helps the PHP - maintainers who have recently made a script to detect big data structures - in the php code that should be moved to the .rodata section. I remembered - to update Builducptable as well, so it won't revert if ucptable.h is ever - re-created. - - 9. Added some extra #ifdef SUPPORT_UTF8 conditionals into pcretest.c, - pcre_printint.src, pcre_compile.c, pcre_study.c, and pcre_tables.c, in - order to be able to cut out the UTF-8 tables in the latter when UTF-8 - support is not required. This saves 1.5-2K of code, which is important in - some applications. - - Later: more #ifdefs are needed in pcre_ord2utf8.c and pcre_valid_utf8.c - so as not to refer to the tables, even though these functions will never be - called when UTF-8 support is disabled. Otherwise there are problems with a - shared library. - -10. Fixed two bugs in the emulated memmove() function in pcre_internal.h: - - (a) It was defining its arguments as char * instead of void *. - - (b) It was assuming that all moves were upwards in memory; this was true - a long time ago when I wrote it, but is no longer the case. - - The emulated memove() is provided for those environments that have neither - memmove() nor bcopy(). I didn't think anyone used it these days, but that - is clearly not the case, as these two bugs were recently reported. - -11. The script PrepareRelease is now distributed: it calls 132html, CleanTxt, - and Detrail to create the HTML documentation, the .txt form of the man - pages, and it removes trailing spaces from listed files. It also creates - pcre.h.generic and config.h.generic from pcre.h and config.h. In the latter - case, it wraps all the #defines with #ifndefs. This script should be run - before "make dist". - -12. Fixed two fairly obscure bugs concerned with quantified caseless matching - with Unicode property support. - - (a) For a maximizing quantifier, if the two different cases of the - character were of different lengths in their UTF-8 codings (there are - some cases like this - I found 11), and the matching function had to - back up over a mixture of the two cases, it incorrectly assumed they - were both the same length. - - (b) When PCRE was configured to use the heap rather than the stack for - recursion during matching, it was not correctly preserving the data for - the other case of a UTF-8 character when checking ahead for a match - while processing a minimizing repeat. If the check also involved - matching a wide character, but failed, corruption could cause an - erroneous result when trying to check for a repeat of the original - character. - -13. Some tidying changes to the testing mechanism: - - (a) The RunTest script now detects the internal link size and whether there - is UTF-8 and UCP support by running ./pcretest -C instead of relying on - values substituted by "configure". (The RunGrepTest script already did - this for UTF-8.) The configure.ac script no longer substitutes the - relevant variables. - - (b) The debugging options /B and /D in pcretest show the compiled bytecode - with length and offset values. This means that the output is different - for different internal link sizes. Test 2 is skipped for link sizes - other than 2 because of this, bypassing the problem. Unfortunately, - there was also a test in test 3 (the locale tests) that used /B and - failed for link sizes other than 2. Rather than cut the whole test out, - I have added a new /Z option to pcretest that replaces the length and - offset values with spaces. This is now used to make test 3 independent - of link size. (Test 2 will be tidied up later.) - -14. If erroroffset was passed as NULL to pcre_compile, it provoked a - segmentation fault instead of returning the appropriate error message. - -15. In multiline mode when the newline sequence was set to "any", the pattern - ^$ would give a match between the \r and \n of a subject such as "A\r\nB". - This doesn't seem right; it now treats the CRLF combination as the line - ending, and so does not match in that case. It's only a pattern such as ^$ - that would hit this one: something like ^ABC$ would have failed after \r - and then tried again after \r\n. - -16. Changed the comparison command for RunGrepTest from "diff -u" to "diff -ub" - in an attempt to make files that differ only in their line terminators - compare equal. This works on Linux. - -17. Under certain error circumstances pcregrep might try to free random memory - as it exited. This is now fixed, thanks to valgrind. - -19. In pcretest, if the pattern /(?m)^$/g<any> was matched against the string - "abc\r\n\r\n", it found an unwanted second match after the second \r. This - was because its rules for how to advance for /g after matching an empty - string at the end of a line did not allow for this case. They now check for - it specially. - -20. pcretest is supposed to handle patterns and data of any length, by - extending its buffers when necessary. It was getting this wrong when the - buffer for a data line had to be extended. - -21. Added PCRE_NEWLINE_ANYCRLF which is like ANY, but matches only CR, LF, or - CRLF as a newline sequence. - -22. Code for handling Unicode properties in pcre_dfa_exec() wasn't being cut - out by #ifdef SUPPORT_UCP. This did no harm, as it could never be used, but - I have nevertheless tidied it up. - -23. Added some casts to kill warnings from HP-UX ia64 compiler. - -24. Added a man page for pcre-config. - - -Version 7.0 19-Dec-06 ---------------------- - - 1. Fixed a signed/unsigned compiler warning in pcre_compile.c, shown up by - moving to gcc 4.1.1. - - 2. The -S option for pcretest uses setrlimit(); I had omitted to #include - sys/time.h, which is documented as needed for this function. It doesn't - seem to matter on Linux, but it showed up on some releases of OS X. - - 3. It seems that there are systems where bytes whose values are greater than - 127 match isprint() in the "C" locale. The "C" locale should be the - default when a C program starts up. In most systems, only ASCII printing - characters match isprint(). This difference caused the output from pcretest - to vary, making some of the tests fail. I have changed pcretest so that: - - (a) When it is outputting text in the compiled version of a pattern, bytes - other than 32-126 are always shown as hex escapes. - - (b) When it is outputting text that is a matched part of a subject string, - it does the same, unless a different locale has been set for the match - (using the /L modifier). In this case, it uses isprint() to decide. - - 4. Fixed a major bug that caused incorrect computation of the amount of memory - required for a compiled pattern when options that changed within the - pattern affected the logic of the preliminary scan that determines the - length. The relevant options are -x, and -i in UTF-8 mode. The result was - that the computed length was too small. The symptoms of this bug were - either the PCRE error "internal error: code overflow" from pcre_compile(), - or a glibc crash with a message such as "pcretest: free(): invalid next - size (fast)". Examples of patterns that provoked this bug (shown in - pcretest format) are: - - /(?-x: )/x - /(?x)(?-x: \s*#\s*)/ - /((?i)[\x{c0}])/8 - /(?i:[\x{c0}])/8 - - HOWEVER: Change 17 below makes this fix obsolete as the memory computation - is now done differently. - - 5. Applied patches from Google to: (a) add a QuoteMeta function to the C++ - wrapper classes; (b) implement a new function in the C++ scanner that is - more efficient than the old way of doing things because it avoids levels of - recursion in the regex matching; (c) add a paragraph to the documentation - for the FullMatch() function. - - 6. The escape sequence \n was being treated as whatever was defined as - "newline". Not only was this contrary to the documentation, which states - that \n is character 10 (hex 0A), but it also went horribly wrong when - "newline" was defined as CRLF. This has been fixed. - - 7. In pcre_dfa_exec.c the value of an unsigned integer (the variable called c) - was being set to -1 for the "end of line" case (supposedly a value that no - character can have). Though this value is never used (the check for end of - line is "zero bytes in current character"), it caused compiler complaints. - I've changed it to 0xffffffff. - - 8. In pcre_version.c, the version string was being built by a sequence of - C macros that, in the event of PCRE_PRERELEASE being defined as an empty - string (as it is for production releases) called a macro with an empty - argument. The C standard says the result of this is undefined. The gcc - compiler treats it as an empty string (which was what was wanted) but it is - reported that Visual C gives an error. The source has been hacked around to - avoid this problem. - - 9. On the advice of a Windows user, included <io.h> and <fcntl.h> in Windows - builds of pcretest, and changed the call to _setmode() to use _O_BINARY - instead of 0x8000. Made all the #ifdefs test both _WIN32 and WIN32 (not all - of them did). - -10. Originally, pcretest opened its input and output without "b"; then I was - told that "b" was needed in some environments, so it was added for release - 5.0 to both the input and output. (It makes no difference on Unix-like - systems.) Later I was told that it is wrong for the input on Windows. I've - now abstracted the modes into two macros, to make it easier to fiddle with - them, and removed "b" from the input mode under Windows. - -11. Added pkgconfig support for the C++ wrapper library, libpcrecpp. - -12. Added -help and --help to pcretest as an official way of being reminded - of the options. - -13. Removed some redundant semicolons after macro calls in pcrecpparg.h.in - and pcrecpp.cc because they annoy compilers at high warning levels. - -14. A bit of tidying/refactoring in pcre_exec.c in the main bumpalong loop. - -15. Fixed an occurrence of == in configure.ac that should have been = (shell - scripts are not C programs :-) and which was not noticed because it works - on Linux. - -16. pcretest is supposed to handle any length of pattern and data line (as one - line or as a continued sequence of lines) by extending its input buffer if - necessary. This feature was broken for very long pattern lines, leading to - a string of junk being passed to pcre_compile() if the pattern was longer - than about 50K. - -17. I have done a major re-factoring of the way pcre_compile() computes the - amount of memory needed for a compiled pattern. Previously, there was code - that made a preliminary scan of the pattern in order to do this. That was - OK when PCRE was new, but as the facilities have expanded, it has become - harder and harder to keep it in step with the real compile phase, and there - have been a number of bugs (see for example, 4 above). I have now found a - cunning way of running the real compile function in a "fake" mode that - enables it to compute how much memory it would need, while actually only - ever using a few hundred bytes of working memory and without too many - tests of the mode. This should make future maintenance and development - easier. A side effect of this work is that the limit of 200 on the nesting - depth of parentheses has been removed (though this was never a serious - limitation, I suspect). However, there is a downside: pcre_compile() now - runs more slowly than before (30% or more, depending on the pattern). I - hope this isn't a big issue. There is no effect on runtime performance. - -18. Fixed a minor bug in pcretest: if a pattern line was not terminated by a - newline (only possible for the last line of a file) and it was a - pattern that set a locale (followed by /Lsomething), pcretest crashed. - -19. Added additional timing features to pcretest. (1) The -tm option now times - matching only, not compiling. (2) Both -t and -tm can be followed, as a - separate command line item, by a number that specifies the number of - repeats to use when timing. The default is 50000; this gives better - precision, but takes uncomfortably long for very large patterns. - -20. Extended pcre_study() to be more clever in cases where a branch of a - subpattern has no definite first character. For example, (a*|b*)[cd] would - previously give no result from pcre_study(). Now it recognizes that the - first character must be a, b, c, or d. - -21. There was an incorrect error "recursive call could loop indefinitely" if - a subpattern (or the entire pattern) that was being tested for matching an - empty string contained only one non-empty item after a nested subpattern. - For example, the pattern (?>\x{100}*)\d(?R) provoked this error - incorrectly, because the \d was being skipped in the check. - -22. The pcretest program now has a new pattern option /B and a command line - option -b, which is equivalent to adding /B to every pattern. This causes - it to show the compiled bytecode, without the additional information that - -d shows. The effect of -d is now the same as -b with -i (and similarly, /D - is the same as /B/I). - -23. A new optimization is now able automatically to treat some sequences such - as a*b as a*+b. More specifically, if something simple (such as a character - or a simple class like \d) has an unlimited quantifier, and is followed by - something that cannot possibly match the quantified thing, the quantifier - is automatically "possessified". - -24. A recursive reference to a subpattern whose number was greater than 39 - went wrong under certain circumstances in UTF-8 mode. This bug could also - have affected the operation of pcre_study(). - -25. Realized that a little bit of performance could be had by replacing - (c & 0xc0) == 0xc0 with c >= 0xc0 when processing UTF-8 characters. - -26. Timing data from pcretest is now shown to 4 decimal places instead of 3. - -27. Possessive quantifiers such as a++ were previously implemented by turning - them into atomic groups such as ($>a+). Now they have their own opcodes, - which improves performance. This includes the automatically created ones - from 23 above. - -28. A pattern such as (?=(\w+))\1: which simulates an atomic group using a - lookahead was broken if it was not anchored. PCRE was mistakenly expecting - the first matched character to be a colon. This applied both to named and - numbered groups. - -29. The ucpinternal.h header file was missing its idempotency #ifdef. - -30. I was sent a "project" file called libpcre.a.dev which I understand makes - building PCRE on Windows easier, so I have included it in the distribution. - -31. There is now a check in pcretest against a ridiculously large number being - returned by pcre_exec() or pcre_dfa_exec(). If this happens in a /g or /G - loop, the loop is abandoned. - -32. Forward references to subpatterns in conditions such as (?(2)...) where - subpattern 2 is defined later cause pcre_compile() to search forwards in - the pattern for the relevant set of parentheses. This search went wrong - when there were unescaped parentheses in a character class, parentheses - escaped with \Q...\E, or parentheses in a #-comment in /x mode. - -33. "Subroutine" calls and backreferences were previously restricted to - referencing subpatterns earlier in the regex. This restriction has now - been removed. - -34. Added a number of extra features that are going to be in Perl 5.10. On the - whole, these are just syntactic alternatives for features that PCRE had - previously implemented using the Python syntax or my own invention. The - other formats are all retained for compatibility. - - (a) Named groups can now be defined as (?<name>...) or (?'name'...) as well - as (?P<name>...). The new forms, as well as being in Perl 5.10, are - also .NET compatible. - - (b) A recursion or subroutine call to a named group can now be defined as - (?&name) as well as (?P>name). - - (c) A backreference to a named group can now be defined as \k<name> or - \k'name' as well as (?P=name). The new forms, as well as being in Perl - 5.10, are also .NET compatible. - - (d) A conditional reference to a named group can now use the syntax - (?(<name>) or (?('name') as well as (?(name). - - (e) A "conditional group" of the form (?(DEFINE)...) can be used to define - groups (named and numbered) that are never evaluated inline, but can be - called as "subroutines" from elsewhere. In effect, the DEFINE condition - is always false. There may be only one alternative in such a group. - - (f) A test for recursion can be given as (?(R1).. or (?(R&name)... as well - as the simple (?(R). The condition is true only if the most recent - recursion is that of the given number or name. It does not search out - through the entire recursion stack. - - (g) The escape \gN or \g{N} has been added, where N is a positive or - negative number, specifying an absolute or relative reference. - -35. Tidied to get rid of some further signed/unsigned compiler warnings and - some "unreachable code" warnings. - -36. Updated the Unicode property tables to Unicode version 5.0.0. Amongst other - things, this adds five new scripts. - -37. Perl ignores orphaned \E escapes completely. PCRE now does the same. - There were also incompatibilities regarding the handling of \Q..\E inside - character classes, for example with patterns like [\Qa\E-\Qz\E] where the - hyphen was adjacent to \Q or \E. I hope I've cleared all this up now. - -38. Like Perl, PCRE detects when an indefinitely repeated parenthesized group - matches an empty string, and forcibly breaks the loop. There were bugs in - this code in non-simple cases. For a pattern such as ^(a()*)* matched - against aaaa the result was just "a" rather than "aaaa", for example. Two - separate and independent bugs (that affected different cases) have been - fixed. - -39. Refactored the code to abolish the use of different opcodes for small - capturing bracket numbers. This is a tidy that I avoided doing when I - removed the limit on the number of capturing brackets for 3.5 back in 2001. - The new approach is not only tidier, it makes it possible to reduce the - memory needed to fix the previous bug (38). - -40. Implemented PCRE_NEWLINE_ANY to recognize any of the Unicode newline - sequences (http://unicode.org/unicode/reports/tr18/) as "newline" when - processing dot, circumflex, or dollar metacharacters, or #-comments in /x - mode. - -41. Add \R to match any Unicode newline sequence, as suggested in the Unicode - report. - -42. Applied patch, originally from Ari Pollak, modified by Google, to allow - copy construction and assignment in the C++ wrapper. - -43. Updated pcregrep to support "--newline=any". In the process, I fixed a - couple of bugs that could have given wrong results in the "--newline=crlf" - case. - -44. Added a number of casts and did some reorganization of signed/unsigned int - variables following suggestions from Dair Grant. Also renamed the variable - "this" as "item" because it is a C++ keyword. - -45. Arranged for dftables to add - - #include "pcre_internal.h" - - to pcre_chartables.c because without it, gcc 4.x may remove the array - definition from the final binary if PCRE is built into a static library and - dead code stripping is activated. - -46. For an unanchored pattern, if a match attempt fails at the start of a - newline sequence, and the newline setting is CRLF or ANY, and the next two - characters are CRLF, advance by two characters instead of one. - - -Version 6.7 04-Jul-06 ---------------------- - - 1. In order to handle tests when input lines are enormously long, pcretest has - been re-factored so that it automatically extends its buffers when - necessary. The code is crude, but this _is_ just a test program. The - default size has been increased from 32K to 50K. - - 2. The code in pcre_study() was using the value of the re argument before - testing it for NULL. (Of course, in any sensible call of the function, it - won't be NULL.) - - 3. The memmove() emulation function in pcre_internal.h, which is used on - systems that lack both memmove() and bcopy() - that is, hardly ever - - was missing a "static" storage class specifier. - - 4. When UTF-8 mode was not set, PCRE looped when compiling certain patterns - containing an extended class (one that cannot be represented by a bitmap - because it contains high-valued characters or Unicode property items, e.g. - [\pZ]). Almost always one would set UTF-8 mode when processing such a - pattern, but PCRE should not loop if you do not (it no longer does). - [Detail: two cases were found: (a) a repeated subpattern containing an - extended class; (b) a recursive reference to a subpattern that followed a - previous extended class. It wasn't skipping over the extended class - correctly when UTF-8 mode was not set.] - - 5. A negated single-character class was not being recognized as fixed-length - in lookbehind assertions such as (?<=[^f]), leading to an incorrect - compile error "lookbehind assertion is not fixed length". - - 6. The RunPerlTest auxiliary script was showing an unexpected difference - between PCRE and Perl for UTF-8 tests. It turns out that it is hard to - write a Perl script that can interpret lines of an input file either as - byte characters or as UTF-8, which is what "perltest" was being required to - do for the non-UTF-8 and UTF-8 tests, respectively. Essentially what you - can't do is switch easily at run time between having the "use utf8;" pragma - or not. In the end, I fudged it by using the RunPerlTest script to insert - "use utf8;" explicitly for the UTF-8 tests. - - 7. In multiline (/m) mode, PCRE was matching ^ after a terminating newline at - the end of the subject string, contrary to the documentation and to what - Perl does. This was true of both matching functions. Now it matches only at - the start of the subject and immediately after *internal* newlines. - - 8. A call of pcre_fullinfo() from pcretest to get the option bits was passing - a pointer to an int instead of a pointer to an unsigned long int. This - caused problems on 64-bit systems. - - 9. Applied a patch from the folks at Google to pcrecpp.cc, to fix "another - instance of the 'standard' template library not being so standard". - -10. There was no check on the number of named subpatterns nor the maximum - length of a subpattern name. The product of these values is used to compute - the size of the memory block for a compiled pattern. By supplying a very - long subpattern name and a large number of named subpatterns, the size - computation could be caused to overflow. This is now prevented by limiting - the length of names to 32 characters, and the number of named subpatterns - to 10,000. - -11. Subpatterns that are repeated with specific counts have to be replicated in - the compiled pattern. The size of memory for this was computed from the - length of the subpattern and the repeat count. The latter is limited to - 65535, but there was no limit on the former, meaning that integer overflow - could in principle occur. The compiled length of a repeated subpattern is - now limited to 30,000 bytes in order to prevent this. - -12. Added the optional facility to have named substrings with the same name. - -13. Added the ability to use a named substring as a condition, using the - Python syntax: (?(name)yes|no). This overloads (?(R)... and names that - are numbers (not recommended). Forward references are permitted. - -14. Added forward references in named backreferences (if you see what I mean). - -15. In UTF-8 mode, with the PCRE_DOTALL option set, a quantified dot in the - pattern could run off the end of the subject. For example, the pattern - "(?s)(.{1,5})"8 did this with the subject "ab". - -16. If PCRE_DOTALL or PCRE_MULTILINE were set, pcre_dfa_exec() behaved as if - PCRE_CASELESS was set when matching characters that were quantified with ? - or *. - -17. A character class other than a single negated character that had a minimum - but no maximum quantifier - for example [ab]{6,} - was not handled - correctly by pce_dfa_exec(). It would match only one character. - -18. A valid (though odd) pattern that looked like a POSIX character - class but used an invalid character after [ (for example [[,abc,]]) caused - pcre_compile() to give the error "Failed: internal error: code overflow" or - in some cases to crash with a glibc free() error. This could even happen if - the pattern terminated after [[ but there just happened to be a sequence of - letters, a binary zero, and a closing ] in the memory that followed. - -19. Perl's treatment of octal escapes in the range \400 to \777 has changed - over the years. Originally (before any Unicode support), just the bottom 8 - bits were taken. Thus, for example, \500 really meant \100. Nowadays the - output from "man perlunicode" includes this: - - The regular expression compiler produces polymorphic opcodes. That - is, the pattern adapts to the data and automatically switches to - the Unicode character scheme when presented with Unicode data--or - instead uses a traditional byte scheme when presented with byte - data. - - Sadly, a wide octal escape does not cause a switch, and in a string with - no other multibyte characters, these octal escapes are treated as before. - Thus, in Perl, the pattern /\500/ actually matches \100 but the pattern - /\500|\x{1ff}/ matches \500 or \777 because the whole thing is treated as a - Unicode string. - - I have not perpetrated such confusion in PCRE. Up till now, it took just - the bottom 8 bits, as in old Perl. I have now made octal escapes with - values greater than \377 illegal in non-UTF-8 mode. In UTF-8 mode they - translate to the appropriate multibyte character. - -29. Applied some refactoring to reduce the number of warnings from Microsoft - and Borland compilers. This has included removing the fudge introduced - seven years ago for the OS/2 compiler (see 2.02/2 below) because it caused - a warning about an unused variable. - -21. PCRE has not included VT (character 0x0b) in the set of whitespace - characters since release 4.0, because Perl (from release 5.004) does not. - [Or at least, is documented not to: some releases seem to be in conflict - with the documentation.] However, when a pattern was studied with - pcre_study() and all its branches started with \s, PCRE still included VT - as a possible starting character. Of course, this did no harm; it just - caused an unnecessary match attempt. - -22. Removed a now-redundant internal flag bit that recorded the fact that case - dependency changed within the pattern. This was once needed for "required - byte" processing, but is no longer used. This recovers a now-scarce options - bit. Also moved the least significant internal flag bit to the most- - significant bit of the word, which was not previously used (hangover from - the days when it was an int rather than a uint) to free up another bit for - the future. - -23. Added support for CRLF line endings as well as CR and LF. As well as the - default being selectable at build time, it can now be changed at runtime - via the PCRE_NEWLINE_xxx flags. There are now options for pcregrep to - specify that it is scanning data with non-default line endings. - -24. Changed the definition of CXXLINK to make it agree with the definition of - LINK in the Makefile, by replacing LDFLAGS to CXXFLAGS. - -25. Applied Ian Taylor's patches to avoid using another stack frame for tail - recursions. This makes a big different to stack usage for some patterns. - -26. If a subpattern containing a named recursion or subroutine reference such - as (?P>B) was quantified, for example (xxx(?P>B)){3}, the calculation of - the space required for the compiled pattern went wrong and gave too small a - value. Depending on the environment, this could lead to "Failed: internal - error: code overflow at offset 49" or "glibc detected double free or - corruption" errors. - -27. Applied patches from Google (a) to support the new newline modes and (b) to - advance over multibyte UTF-8 characters in GlobalReplace. - -28. Change free() to pcre_free() in pcredemo.c. Apparently this makes a - difference for some implementation of PCRE in some Windows version. - -29. Added some extra testing facilities to pcretest: - - \q<number> in a data line sets the "match limit" value - \Q<number> in a data line sets the "match recursion limt" value - -S <number> sets the stack size, where <number> is in megabytes - - The -S option isn't available for Windows. - - -Version 6.6 06-Feb-06 ---------------------- - - 1. Change 16(a) for 6.5 broke things, because PCRE_DATA_SCOPE was not defined - in pcreposix.h. I have copied the definition from pcre.h. - - 2. Change 25 for 6.5 broke compilation in a build directory out-of-tree - because pcre.h is no longer a built file. - - 3. Added Jeff Friedl's additional debugging patches to pcregrep. These are - not normally included in the compiled code. - - -Version 6.5 01-Feb-06 ---------------------- - - 1. When using the partial match feature with pcre_dfa_exec(), it was not - anchoring the second and subsequent partial matches at the new starting - point. This could lead to incorrect results. For example, with the pattern - /1234/, partially matching against "123" and then "a4" gave a match. - - 2. Changes to pcregrep: - - (a) All non-match returns from pcre_exec() were being treated as failures - to match the line. Now, unless the error is PCRE_ERROR_NOMATCH, an - error message is output. Some extra information is given for the - PCRE_ERROR_MATCHLIMIT and PCRE_ERROR_RECURSIONLIMIT errors, which are - probably the only errors that are likely to be caused by users (by - specifying a regex that has nested indefinite repeats, for instance). - If there are more than 20 of these errors, pcregrep is abandoned. - - (b) A binary zero was treated as data while matching, but terminated the - output line if it was written out. This has been fixed: binary zeroes - are now no different to any other data bytes. - - (c) Whichever of the LC_ALL or LC_CTYPE environment variables is set is - used to set a locale for matching. The --locale=xxxx long option has - been added (no short equivalent) to specify a locale explicitly on the - pcregrep command, overriding the environment variables. - - (d) When -B was used with -n, some line numbers in the output were one less - than they should have been. - - (e) Added the -o (--only-matching) option. - - (f) If -A or -C was used with -c (count only), some lines of context were - accidentally printed for the final match. - - (g) Added the -H (--with-filename) option. - - (h) The combination of options -rh failed to suppress file names for files - that were found from directory arguments. - - (i) Added the -D (--devices) and -d (--directories) options. - - (j) Added the -F (--fixed-strings) option. - - (k) Allow "-" to be used as a file name for -f as well as for a data file. - - (l) Added the --colo(u)r option. - - (m) Added Jeffrey Friedl's -S testing option, but within #ifdefs so that it - is not present by default. - - 3. A nasty bug was discovered in the handling of recursive patterns, that is, - items such as (?R) or (?1), when the recursion could match a number of - alternatives. If it matched one of the alternatives, but subsequently, - outside the recursion, there was a failure, the code tried to back up into - the recursion. However, because of the way PCRE is implemented, this is not - possible, and the result was an incorrect result from the match. - - In order to prevent this happening, the specification of recursion has - been changed so that all such subpatterns are automatically treated as - atomic groups. Thus, for example, (?R) is treated as if it were (?>(?R)). - - 4. I had overlooked the fact that, in some locales, there are characters for - which isalpha() is true but neither isupper() nor islower() are true. In - the fr_FR locale, for instance, the \xAA and \xBA characters (ordmasculine - and ordfeminine) are like this. This affected the treatment of \w and \W - when they appeared in character classes, but not when they appeared outside - a character class. The bit map for "word" characters is now created - separately from the results of isalnum() instead of just taking it from the - upper, lower, and digit maps. (Plus the underscore character, of course.) - - 5. The above bug also affected the handling of POSIX character classes such as - [[:alpha:]] and [[:alnum:]]. These do not have their own bit maps in PCRE's - permanent tables. Instead, the bit maps for such a class were previously - created as the appropriate unions of the upper, lower, and digit bitmaps. - Now they are created by subtraction from the [[:word:]] class, which has - its own bitmap. - - 6. The [[:blank:]] character class matches horizontal, but not vertical space. - It is created by subtracting the vertical space characters (\x09, \x0a, - \x0b, \x0c) from the [[:space:]] bitmap. Previously, however, the - subtraction was done in the overall bitmap for a character class, meaning - that a class such as [\x0c[:blank:]] was incorrect because \x0c would not - be recognized. This bug has been fixed. - - 7. Patches from the folks at Google: - - (a) pcrecpp.cc: "to handle a corner case that may or may not happen in - real life, but is still worth protecting against". - - (b) pcrecpp.cc: "corrects a bug when negative radixes are used with - regular expressions". - - (c) pcre_scanner.cc: avoid use of std::count() because not all systems - have it. - - (d) Split off pcrecpparg.h from pcrecpp.h and had the former built by - "configure" and the latter not, in order to fix a problem somebody had - with compiling the Arg class on HP-UX. - - (e) Improve the error-handling of the C++ wrapper a little bit. - - (f) New tests for checking recursion limiting. - - 8. The pcre_memmove() function, which is used only if the environment does not - have a standard memmove() function (and is therefore rarely compiled), - contained two bugs: (a) use of int instead of size_t, and (b) it was not - returning a result (though PCRE never actually uses the result). - - 9. In the POSIX regexec() interface, if nmatch is specified as a ridiculously - large number - greater than INT_MAX/(3*sizeof(int)) - REG_ESPACE is - returned instead of calling malloc() with an overflowing number that would - most likely cause subsequent chaos. - -10. The debugging option of pcretest was not showing the NO_AUTO_CAPTURE flag. - -11. The POSIX flag REG_NOSUB is now supported. When a pattern that was compiled - with this option is matched, the nmatch and pmatch options of regexec() are - ignored. - -12. Added REG_UTF8 to the POSIX interface. This is not defined by POSIX, but is - provided in case anyone wants to the the POSIX interface with UTF-8 - strings. - -13. Added CXXLDFLAGS to the Makefile parameters to provide settings only on the - C++ linking (needed for some HP-UX environments). - -14. Avoid compiler warnings in get_ucpname() when compiled without UCP support - (unused parameter) and in the pcre_printint() function (omitted "default" - switch label when the default is to do nothing). - -15. Added some code to make it possible, when PCRE is compiled as a C++ - library, to replace subject pointers for pcre_exec() with a smart pointer - class, thus making it possible to process discontinuous strings. - -16. The two macros PCRE_EXPORT and PCRE_DATA_SCOPE are confusing, and perform - much the same function. They were added by different people who were trying - to make PCRE easy to compile on non-Unix systems. It has been suggested - that PCRE_EXPORT be abolished now that there is more automatic apparatus - for compiling on Windows systems. I have therefore replaced it with - PCRE_DATA_SCOPE. This is set automatically for Windows; if not set it - defaults to "extern" for C or "extern C" for C++, which works fine on - Unix-like systems. It is now possible to override the value of PCRE_DATA_ - SCOPE with something explicit in config.h. In addition: - - (a) pcreposix.h still had just "extern" instead of either of these macros; - I have replaced it with PCRE_DATA_SCOPE. - - (b) Functions such as _pcre_xclass(), which are internal to the library, - but external in the C sense, all had PCRE_EXPORT in their definitions. - This is apparently wrong for the Windows case, so I have removed it. - (It makes no difference on Unix-like systems.) - -17. Added a new limit, MATCH_LIMIT_RECURSION, which limits the depth of nesting - of recursive calls to match(). This is different to MATCH_LIMIT because - that limits the total number of calls to match(), not all of which increase - the depth of recursion. Limiting the recursion depth limits the amount of - stack (or heap if NO_RECURSE is set) that is used. The default can be set - when PCRE is compiled, and changed at run time. A patch from Google adds - this functionality to the C++ interface. - -18. Changes to the handling of Unicode character properties: - - (a) Updated the table to Unicode 4.1.0. - - (b) Recognize characters that are not in the table as "Cn" (undefined). - - (c) I revised the way the table is implemented to a much improved format - which includes recognition of ranges. It now supports the ranges that - are defined in UnicodeData.txt, and it also amalgamates other - characters into ranges. This has reduced the number of entries in the - table from around 16,000 to around 3,000, thus reducing its size - considerably. I realized I did not need to use a tree structure after - all - a binary chop search is just as efficient. Having reduced the - number of entries, I extended their size from 6 bytes to 8 bytes to - allow for more data. - - (d) Added support for Unicode script names via properties such as \p{Han}. - -19. In UTF-8 mode, a backslash followed by a non-Ascii character was not - matching that character. - -20. When matching a repeated Unicode property with a minimum greater than zero, - (for example \pL{2,}), PCRE could look past the end of the subject if it - reached it while seeking the minimum number of characters. This could - happen only if some of the characters were more than one byte long, because - there is a check for at least the minimum number of bytes. - -21. Refactored the implementation of \p and \P so as to be more general, to - allow for more different types of property in future. This has changed the - compiled form incompatibly. Anybody with saved compiled patterns that use - \p or \P will have to recompile them. - -22. Added "Any" and "L&" to the supported property types. - -23. Recognize \x{...} as a code point specifier, even when not in UTF-8 mode, - but give a compile time error if the value is greater than 0xff. - -24. The man pages for pcrepartial, pcreprecompile, and pcre_compile2 were - accidentally not being installed or uninstalled. - -25. The pcre.h file was built from pcre.h.in, but the only changes that were - made were to insert the current release number. This seemed silly, because - it made things harder for people building PCRE on systems that don't run - "configure". I have turned pcre.h into a distributed file, no longer built - by "configure", with the version identification directly included. There is - no longer a pcre.h.in file. - - However, this change necessitated a change to the pcre-config script as - well. It is built from pcre-config.in, and one of the substitutions was the - release number. I have updated configure.ac so that ./configure now finds - the release number by grepping pcre.h. - -26. Added the ability to run the tests under valgrind. - - -Version 6.4 05-Sep-05 ---------------------- - - 1. Change 6.0/10/(l) to pcregrep introduced a bug that caused separator lines - "--" to be printed when multiple files were scanned, even when none of the - -A, -B, or -C options were used. This is not compatible with Gnu grep, so I - consider it to be a bug, and have restored the previous behaviour. - - 2. A couple of code tidies to get rid of compiler warnings. - - 3. The pcretest program used to cheat by referring to symbols in the library - whose names begin with _pcre_. These are internal symbols that are not - really supposed to be visible externally, and in some environments it is - possible to suppress them. The cheating is now confined to including - certain files from the library's source, which is a bit cleaner. - - 4. Renamed pcre.in as pcre.h.in to go with pcrecpp.h.in; it also makes the - file's purpose clearer. - - 5. Reorganized pcre_ucp_findchar(). - - -Version 6.3 15-Aug-05 ---------------------- - - 1. The file libpcre.pc.in did not have general read permission in the tarball. - - 2. There were some problems when building without C++ support: - - (a) If C++ support was not built, "make install" and "make test" still - tried to test it. - - (b) There were problems when the value of CXX was explicitly set. Some - changes have been made to try to fix these, and ... - - (c) --disable-cpp can now be used to explicitly disable C++ support. - - (d) The use of @CPP_OBJ@ directly caused a blank line preceded by a - backslash in a target when C++ was disabled. This confuses some - versions of "make", apparently. Using an intermediate variable solves - this. (Same for CPP_LOBJ.) - - 3. $(LINK_FOR_BUILD) now includes $(CFLAGS_FOR_BUILD) and $(LINK) - (non-Windows) now includes $(CFLAGS) because these flags are sometimes - necessary on certain architectures. - - 4. Added a setting of -export-symbols-regex to the link command to remove - those symbols that are exported in the C sense, but actually are local - within the library, and not documented. Their names all begin with - "_pcre_". This is not a perfect job, because (a) we have to except some - symbols that pcretest ("illegally") uses, and (b) the facility isn't always - available (and never for static libraries). I have made a note to try to - find a way round (a) in the future. - - -Version 6.2 01-Aug-05 ---------------------- - - 1. There was no test for integer overflow of quantifier values. A construction - such as {1111111111111111} would give undefined results. What is worse, if - a minimum quantifier for a parenthesized subpattern overflowed and became - negative, the calculation of the memory size went wrong. This could have - led to memory overwriting. - - 2. Building PCRE using VPATH was broken. Hopefully it is now fixed. - - 3. Added "b" to the 2nd argument of fopen() in dftables.c, for non-Unix-like - operating environments where this matters. - - 4. Applied Giuseppe Maxia's patch to add additional features for controlling - PCRE options from within the C++ wrapper. - - 5. Named capturing subpatterns were not being correctly counted when a pattern - was compiled. This caused two problems: (a) If there were more than 100 - such subpatterns, the calculation of the memory needed for the whole - compiled pattern went wrong, leading to an overflow error. (b) Numerical - back references of the form \12, where the number was greater than 9, were - not recognized as back references, even though there were sufficient - previous subpatterns. - - 6. Two minor patches to pcrecpp.cc in order to allow it to compile on older - versions of gcc, e.g. 2.95.4. - - -Version 6.1 21-Jun-05 ---------------------- - - 1. There was one reference to the variable "posix" in pcretest.c that was not - surrounded by "#if !defined NOPOSIX". - - 2. Make it possible to compile pcretest without DFA support, UTF8 support, or - the cross-check on the old pcre_info() function, for the benefit of the - cut-down version of PCRE that is currently imported into Exim. - - 3. A (silly) pattern starting with (?i)(?-i) caused an internal space - allocation error. I've done the easy fix, which wastes 2 bytes for sensible - patterns that start (?i) but I don't think that matters. The use of (?i) is - just an example; this all applies to the other options as well. - - 4. Since libtool seems to echo the compile commands it is issuing, the output - from "make" can be reduced a bit by putting "@" in front of each libtool - compile command. - - 5. Patch from the folks at Google for configure.in to be a bit more thorough - in checking for a suitable C++ installation before trying to compile the - C++ stuff. This should fix a reported problem when a compiler was present, - but no suitable headers. - - 6. The man pages all had just "PCRE" as their title. I have changed them to - be the relevant file name. I have also arranged that these names are - retained in the file doc/pcre.txt, which is a concatenation in text format - of all the man pages except the little individual ones for each function. - - 7. The NON-UNIX-USE file had not been updated for the different set of source - files that come with release 6. I also added a few comments about the C++ - wrapper. - - -Version 6.0 07-Jun-05 ---------------------- - - 1. Some minor internal re-organization to help with my DFA experiments. - - 2. Some missing #ifdef SUPPORT_UCP conditionals in pcretest and printint that - didn't matter for the library itself when fully configured, but did matter - when compiling without UCP support, or within Exim, where the ucp files are - not imported. - - 3. Refactoring of the library code to split up the various functions into - different source modules. The addition of the new DFA matching code (see - below) to a single monolithic source would have made it really too - unwieldy, quite apart from causing all the code to be include in a - statically linked application, when only some functions are used. This is - relevant even without the DFA addition now that patterns can be compiled in - one application and matched in another. - - The downside of splitting up is that there have to be some external - functions and data tables that are used internally in different modules of - the library but which are not part of the API. These have all had their - names changed to start with "_pcre_" so that they are unlikely to clash - with other external names. - - 4. Added an alternate matching function, pcre_dfa_exec(), which matches using - a different (DFA) algorithm. Although it is slower than the original - function, it does have some advantages for certain types of matching - problem. - - 5. Upgrades to pcretest in order to test the features of pcre_dfa_exec(), - including restarting after a partial match. - - 6. A patch for pcregrep that defines INVALID_FILE_ATTRIBUTES if it is not - defined when compiling for Windows was sent to me. I have put it into the - code, though I have no means of testing or verifying it. - - 7. Added the pcre_refcount() auxiliary function. - - 8. Added the PCRE_FIRSTLINE option. This constrains an unanchored pattern to - match before or at the first newline in the subject string. In pcretest, - the /f option on a pattern can be used to set this. - - 9. A repeated \w when used in UTF-8 mode with characters greater than 256 - would behave wrongly. This has been present in PCRE since release 4.0. - -10. A number of changes to the pcregrep command: - - (a) Refactored how -x works; insert ^(...)$ instead of setting - PCRE_ANCHORED and checking the length, in preparation for adding - something similar for -w. - - (b) Added the -w (match as a word) option. - - (c) Refactored the way lines are read and buffered so as to have more - than one at a time available. - - (d) Implemented a pcregrep test script. - - (e) Added the -M (multiline match) option. This allows patterns to match - over several lines of the subject. The buffering ensures that at least - 8K, or the rest of the document (whichever is the shorter) is available - for matching (and similarly the previous 8K for lookbehind assertions). - - (f) Changed the --help output so that it now says - - -w, --word-regex(p) - - instead of two lines, one with "regex" and the other with "regexp" - because that confused at least one person since the short forms are the - same. (This required a bit of code, as the output is generated - automatically from a table. It wasn't just a text change.) - - (g) -- can be used to terminate pcregrep options if the next thing isn't an - option but starts with a hyphen. Could be a pattern or a path name - starting with a hyphen, for instance. - - (h) "-" can be given as a file name to represent stdin. - - (i) When file names are being printed, "(standard input)" is used for - the standard input, for compatibility with GNU grep. Previously - "<stdin>" was used. - - (j) The option --label=xxx can be used to supply a name to be used for - stdin when file names are being printed. There is no short form. - - (k) Re-factored the options decoding logic because we are going to add - two more options that take data. Such options can now be given in four - different ways, e.g. "-fname", "-f name", "--file=name", "--file name". - - (l) Added the -A, -B, and -C options for requesting that lines of context - around matches be printed. - - (m) Added the -L option to print the names of files that do not contain - any matching lines, that is, the complement of -l. - - (n) The return code is 2 if any file cannot be opened, but pcregrep does - continue to scan other files. - - (o) The -s option was incorrectly implemented. For compatibility with other - greps, it now suppresses the error message for a non-existent or non- - accessible file (but not the return code). There is a new option called - -q that suppresses the output of matching lines, which was what -s was - previously doing. - - (p) Added --include and --exclude options to specify files for inclusion - and exclusion when recursing. - -11. The Makefile was not using the Autoconf-supported LDFLAGS macro properly. - Hopefully, it now does. - -12. Missing cast in pcre_study(). - -13. Added an "uninstall" target to the makefile. - -14. Replaced "extern" in the function prototypes in Makefile.in with - "PCRE_DATA_SCOPE", which defaults to 'extern' or 'extern "C"' in the Unix - world, but is set differently for Windows. - -15. Added a second compiling function called pcre_compile2(). The only - difference is that it has an extra argument, which is a pointer to an - integer error code. When there is a compile-time failure, this is set - non-zero, in addition to the error test pointer being set to point to an - error message. The new argument may be NULL if no error number is required - (but then you may as well call pcre_compile(), which is now just a - wrapper). This facility is provided because some applications need a - numeric error indication, but it has also enabled me to tidy up the way - compile-time errors are handled in the POSIX wrapper. - -16. Added VPATH=.libs to the makefile; this should help when building with one - prefix path and installing with another. (Or so I'm told by someone who - knows more about this stuff than I do.) - -17. Added a new option, REG_DOTALL, to the POSIX function regcomp(). This - passes PCRE_DOTALL to the pcre_compile() function, making the "." character - match everything, including newlines. This is not POSIX-compatible, but - somebody wanted the feature. From pcretest it can be activated by using - both the P and the s flags. - -18. AC_PROG_LIBTOOL appeared twice in Makefile.in. Removed one. - -19. libpcre.pc was being incorrectly installed as executable. - -20. A couple of places in pcretest check for end-of-line by looking for '\n'; - it now also looks for '\r' so that it will work unmodified on Windows. - -21. Added Google's contributed C++ wrapper to the distribution. - -22. Added some untidy missing memory free() calls in pcretest, to keep - Electric Fence happy when testing. - - - -Version 5.0 13-Sep-04 ---------------------- - - 1. Internal change: literal characters are no longer packed up into items - containing multiple characters in a single byte-string. Each character - is now matched using a separate opcode. However, there may be more than one - byte in the character in UTF-8 mode. - - 2. The pcre_callout_block structure has two new fields: pattern_position and - next_item_length. These contain the offset in the pattern to the next match - item, and its length, respectively. - - 3. The PCRE_AUTO_CALLOUT option for pcre_compile() requests the automatic - insertion of callouts before each pattern item. Added the /C option to - pcretest to make use of this. - - 4. On the advice of a Windows user, the lines - - #if defined(_WIN32) || defined(WIN32) - _setmode( _fileno( stdout ), 0x8000 ); - #endif /* defined(_WIN32) || defined(WIN32) */ - - have been added to the source of pcretest. This apparently does useful - magic in relation to line terminators. - - 5. Changed "r" and "w" in the calls to fopen() in pcretest to "rb" and "wb" - for the benefit of those environments where the "b" makes a difference. - - 6. The icc compiler has the same options as gcc, but "configure" doesn't seem - to know about it. I have put a hack into configure.in that adds in code - to set GCC=yes if CC=icc. This seems to end up at a point in the - generated configure script that is early enough to affect the setting of - compiler options, which is what is needed, but I have no means of testing - whether it really works. (The user who reported this had patched the - generated configure script, which of course I cannot do.) - - LATER: After change 22 below (new libtool files), the configure script - seems to know about icc (and also ecc). Therefore, I have commented out - this hack in configure.in. - - 7. Added support for pkg-config (2 patches were sent in). - - 8. Negated POSIX character classes that used a combination of internal tables - were completely broken. These were [[:^alpha:]], [[:^alnum:]], and - [[:^ascii]]. Typically, they would match almost any characters. The other - POSIX classes were not broken in this way. - - 9. Matching the pattern "\b.*?" against "ab cd", starting at offset 1, failed - to find the match, as PCRE was deluded into thinking that the match had to - start at the start point or following a newline. The same bug applied to - patterns with negative forward assertions or any backward assertions - preceding ".*" at the start, unless the pattern required a fixed first - character. This was a failing pattern: "(?!.bcd).*". The bug is now fixed. - -10. In UTF-8 mode, when moving forwards in the subject after a failed match - starting at the last subject character, bytes beyond the end of the subject - string were read. - -11. Renamed the variable "class" as "classbits" to make life easier for C++ - users. (Previously there was a macro definition, but it apparently wasn't - enough.) - -12. Added the new field "tables" to the extra data so that tables can be passed - in at exec time, or the internal tables can be re-selected. This allows - a compiled regex to be saved and re-used at a later time by a different - program that might have everything at different addresses. - -13. Modified the pcre-config script so that, when run on Solaris, it shows a - -R library as well as a -L library. - -14. The debugging options of pcretest (-d on the command line or D on a - pattern) showed incorrect output for anything following an extended class - that contained multibyte characters and which was followed by a quantifier. - -15. Added optional support for general category Unicode character properties - via the \p, \P, and \X escapes. Unicode property support implies UTF-8 - support. It adds about 90K to the size of the library. The meanings of the - inbuilt class escapes such as \d and \s have NOT been changed. - -16. Updated pcredemo.c to include calls to free() to release the memory for the - compiled pattern. - -17. The generated file chartables.c was being created in the source directory - instead of in the building directory. This caused the build to fail if the - source directory was different from the building directory, and was - read-only. - -18. Added some sample Win commands from Mark Tetrode into the NON-UNIX-USE - file. No doubt somebody will tell me if they don't make sense... Also added - Dan Mooney's comments about building on OpenVMS. - -19. Added support for partial matching via the PCRE_PARTIAL option for - pcre_exec() and the \P data escape in pcretest. - -20. Extended pcretest with 3 new pattern features: - - (i) A pattern option of the form ">rest-of-line" causes pcretest to - write the compiled pattern to the file whose name is "rest-of-line". - This is a straight binary dump of the data, with the saved pointer to - the character tables forced to be NULL. The study data, if any, is - written too. After writing, pcretest reads a new pattern. - - (ii) If, instead of a pattern, "<rest-of-line" is given, pcretest reads a - compiled pattern from the given file. There must not be any - occurrences of "<" in the file name (pretty unlikely); if there are, - pcretest will instead treat the initial "<" as a pattern delimiter. - After reading in the pattern, pcretest goes on to read data lines as - usual. - - (iii) The F pattern option causes pcretest to flip the bytes in the 32-bit - and 16-bit fields in a compiled pattern, to simulate a pattern that - was compiled on a host of opposite endianness. - -21. The pcre-exec() function can now cope with patterns that were compiled on - hosts of opposite endianness, with this restriction: - - As for any compiled expression that is saved and used later, the tables - pointer field cannot be preserved; the extra_data field in the arguments - to pcre_exec() should be used to pass in a tables address if a value - other than the default internal tables were used at compile time. - -22. Calling pcre_exec() with a negative value of the "ovecsize" parameter is - now diagnosed as an error. Previously, most of the time, a negative number - would have been treated as zero, but if in addition "ovector" was passed as - NULL, a crash could occur. - -23. Updated the files ltmain.sh, config.sub, config.guess, and aclocal.m4 with - new versions from the libtool 1.5 distribution (the last one is a copy of - a file called libtool.m4). This seems to have fixed the need to patch - "configure" to support Darwin 1.3 (which I used to do). However, I still - had to patch ltmain.sh to ensure that ${SED} is set (it isn't on my - workstation). - -24. Changed the PCRE licence to be the more standard "BSD" licence. - - -Version 4.5 01-Dec-03 ---------------------- - - 1. There has been some re-arrangement of the code for the match() function so - that it can be compiled in a version that does not call itself recursively. - Instead, it keeps those local variables that need separate instances for - each "recursion" in a frame on the heap, and gets/frees frames whenever it - needs to "recurse". Keeping track of where control must go is done by means - of setjmp/longjmp. The whole thing is implemented by a set of macros that - hide most of the details from the main code, and operates only if - NO_RECURSE is defined while compiling pcre.c. If PCRE is built using the - "configure" mechanism, "--disable-stack-for-recursion" turns on this way of - operating. - - To make it easier for callers to provide specially tailored get/free - functions for this usage, two new functions, pcre_stack_malloc, and - pcre_stack_free, are used. They are always called in strict stacking order, - and the size of block requested is always the same. - - The PCRE_CONFIG_STACKRECURSE info parameter can be used to find out whether - PCRE has been compiled to use the stack or the heap for recursion. The - -C option of pcretest uses this to show which version is compiled. - - A new data escape \S, is added to pcretest; it causes the amounts of store - obtained and freed by both kinds of malloc/free at match time to be added - to the output. - - 2. Changed the locale test to use "fr_FR" instead of "fr" because that's - what's available on my current Linux desktop machine. - - 3. When matching a UTF-8 string, the test for a valid string at the start has - been extended. If start_offset is not zero, PCRE now checks that it points - to a byte that is the start of a UTF-8 character. If not, it returns - PCRE_ERROR_BADUTF8_OFFSET (-11). Note: the whole string is still checked; - this is necessary because there may be backward assertions in the pattern. - When matching the same subject several times, it may save resources to use - PCRE_NO_UTF8_CHECK on all but the first call if the string is long. - - 4. The code for checking the validity of UTF-8 strings has been tightened so - that it rejects (a) strings containing 0xfe or 0xff bytes and (b) strings - containing "overlong sequences". - - 5. Fixed a bug (appearing twice) that I could not find any way of exploiting! - I had written "if ((digitab[*p++] && chtab_digit) == 0)" where the "&&" - should have been "&", but it just so happened that all the cases this let - through by mistake were picked up later in the function. - - 6. I had used a variable called "isblank" - this is a C99 function, causing - some compilers to warn. To avoid this, I renamed it (as "blankclass"). - - 7. Cosmetic: (a) only output another newline at the end of pcretest if it is - prompting; (b) run "./pcretest /dev/null" at the start of the test script - so the version is shown; (c) stop "make test" echoing "./RunTest". - - 8. Added patches from David Burgess to enable PCRE to run on EBCDIC systems. - - 9. The prototype for memmove() for systems that don't have it was using - size_t, but the inclusion of the header that defines size_t was later. I've - moved the #includes for the C headers earlier to avoid this. - -10. Added some adjustments to the code to make it easier to compiler on certain - special systems: - - (a) Some "const" qualifiers were missing. - (b) Added the macro EXPORT before all exported functions; by default this - is defined to be empty. - (c) Changed the dftables auxiliary program (that builds chartables.c) so - that it reads its output file name as an argument instead of writing - to the standard output and assuming this can be redirected. - -11. In UTF-8 mode, if a recursive reference (e.g. (?1)) followed a character - class containing characters with values greater than 255, PCRE compilation - went into a loop. - -12. A recursive reference to a subpattern that was within another subpattern - that had a minimum quantifier of zero caused PCRE to crash. For example, - (x(y(?2))z)? provoked this bug with a subject that got as far as the - recursion. If the recursively-called subpattern itself had a zero repeat, - that was OK. - -13. In pcretest, the buffer for reading a data line was set at 30K, but the - buffer into which it was copied (for escape processing) was still set at - 1024, so long lines caused crashes. - -14. A pattern such as /[ab]{1,3}+/ failed to compile, giving the error - "internal error: code overflow...". This applied to any character class - that was followed by a possessive quantifier. - -15. Modified the Makefile to add libpcre.la as a prerequisite for - libpcreposix.la because I was told this is needed for a parallel build to - work. - -16. If a pattern that contained .* following optional items at the start was - studied, the wrong optimizing data was generated, leading to matching - errors. For example, studying /[ab]*.*c/ concluded, erroneously, that any - matching string must start with a or b or c. The correct conclusion for - this pattern is that a match can start with any character. - - -Version 4.4 13-Aug-03 ---------------------- - - 1. In UTF-8 mode, a character class containing characters with values between - 127 and 255 was not handled correctly if the compiled pattern was studied. - In fixing this, I have also improved the studying algorithm for such - classes (slightly). - - 2. Three internal functions had redundant arguments passed to them. Removal - might give a very teeny performance improvement. - - 3. Documentation bug: the value of the capture_top field in a callout is *one - more than* the number of the hightest numbered captured substring. - - 4. The Makefile linked pcretest and pcregrep with -lpcre, which could result - in incorrectly linking with a previously installed version. They now link - explicitly with libpcre.la. - - 5. configure.in no longer needs to recognize Cygwin specially. - - 6. A problem in pcre.in for Windows platforms is fixed. - - 7. If a pattern was successfully studied, and the -d (or /D) flag was given to - pcretest, it used to include the size of the study block as part of its - output. Unfortunately, the structure contains a field that has a different - size on different hardware architectures. This meant that the tests that - showed this size failed. As the block is currently always of a fixed size, - this information isn't actually particularly useful in pcretest output, so - I have just removed it. - - 8. Three pre-processor statements accidentally did not start in column 1. - Sadly, there are *still* compilers around that complain, even though - standard C has not required this for well over a decade. Sigh. - - 9. In pcretest, the code for checking callouts passed small integers in the - callout_data field, which is a void * field. However, some picky compilers - complained about the casts involved for this on 64-bit systems. Now - pcretest passes the address of the small integer instead, which should get - rid of the warnings. - -10. By default, when in UTF-8 mode, PCRE now checks for valid UTF-8 strings at - both compile and run time, and gives an error if an invalid UTF-8 sequence - is found. There is a option for disabling this check in cases where the - string is known to be correct and/or the maximum performance is wanted. - -11. In response to a bug report, I changed one line in Makefile.in from - - -Wl,--out-implib,.libs/lib@WIN_PREFIX@pcreposix.dll.a \ - to - -Wl,--out-implib,.libs/@WIN_PREFIX@libpcreposix.dll.a \ - - to look similar to other lines, but I have no way of telling whether this - is the right thing to do, as I do not use Windows. No doubt I'll get told - if it's wrong... - - -Version 4.3 21-May-03 ---------------------- - -1. Two instances of @WIN_PREFIX@ omitted from the Windows targets in the - Makefile. - -2. Some refactoring to improve the quality of the code: - - (i) The utf8_table... variables are now declared "const". - - (ii) The code for \cx, which used the "case flipping" table to upper case - lower case letters, now just substracts 32. This is ASCII-specific, - but the whole concept of \cx is ASCII-specific, so it seems - reasonable. - - (iii) PCRE was using its character types table to recognize decimal and - hexadecimal digits in the pattern. This is silly, because it handles - only 0-9, a-f, and A-F, but the character types table is locale- - specific, which means strange things might happen. A private - table is now used for this - though it costs 256 bytes, a table is - much faster than multiple explicit tests. Of course, the standard - character types table is still used for matching digits in subject - strings against \d. - - (iv) Strictly, the identifier ESC_t is reserved by POSIX (all identifiers - ending in _t are). So I've renamed it as ESC_tee. - -3. The first argument for regexec() in the POSIX wrapper should have been - defined as "const". - -4. Changed pcretest to use malloc() for its buffers so that they can be - Electric Fenced for debugging. - -5. There were several places in the code where, in UTF-8 mode, PCRE would try - to read one or more bytes before the start of the subject string. Often this - had no effect on PCRE's behaviour, but in some circumstances it could - provoke a segmentation fault. - -6. A lookbehind at the start of a pattern in UTF-8 mode could also cause PCRE - to try to read one or more bytes before the start of the subject string. - -7. A lookbehind in a pattern matched in non-UTF-8 mode on a PCRE compiled with - UTF-8 support could misbehave in various ways if the subject string - contained bytes with the 0x80 bit set and the 0x40 bit unset in a lookbehind - area. (PCRE was not checking for the UTF-8 mode flag, and trying to move - back over UTF-8 characters.) - - -Version 4.2 14-Apr-03 ---------------------- - -1. Typo "#if SUPPORT_UTF8" instead of "#ifdef SUPPORT_UTF8" fixed. - -2. Changes to the building process, supplied by Ronald Landheer-Cieslak - [ON_WINDOWS]: new variable, "#" on non-Windows platforms - [NOT_ON_WINDOWS]: new variable, "#" on Windows platforms - [WIN_PREFIX]: new variable, "cyg" for Cygwin - * Makefile.in: use autoconf substitution for OBJEXT, EXEEXT, BUILD_OBJEXT - and BUILD_EXEEXT - Note: automatic setting of the BUILD variables is not yet working - set CPPFLAGS and BUILD_CPPFLAGS (but don't use yet) - should be used at - compile-time but not at link-time - [LINK]: use for linking executables only - make different versions for Windows and non-Windows - [LINKLIB]: new variable, copy of UNIX-style LINK, used for linking - libraries - [LINK_FOR_BUILD]: new variable - [OBJEXT]: use throughout - [EXEEXT]: use throughout - <winshared>: new target - <wininstall>: new target - <dftables.o>: use native compiler - <dftables>: use native linker - <install>: handle Windows platform correctly - <clean>: ditto - <check>: ditto - copy DLL to top builddir before testing - - As part of these changes, -no-undefined was removed again. This was reported - to give trouble on HP-UX 11.0, so getting rid of it seems like a good idea - in any case. - -3. Some tidies to get rid of compiler warnings: - - . In the match_data structure, match_limit was an unsigned long int, whereas - match_call_count was an int. I've made them both unsigned long ints. - - . In pcretest the fact that a const uschar * doesn't automatically cast to - a void * provoked a warning. - - . Turning on some more compiler warnings threw up some "shadow" variables - and a few more missing casts. - -4. If PCRE was complied with UTF-8 support, but called without the PCRE_UTF8 - option, a class that contained a single character with a value between 128 - and 255 (e.g. /[\xFF]/) caused PCRE to crash. - -5. If PCRE was compiled with UTF-8 support, but called without the PCRE_UTF8 - option, a class that contained several characters, but with at least one - whose value was between 128 and 255 caused PCRE to crash. - - -Version 4.1 12-Mar-03 ---------------------- - -1. Compiling with gcc -pedantic found a couple of places where casts were -needed, and a string in dftables.c that was longer than standard compilers are -required to support. - -2. Compiling with Sun's compiler found a few more places where the code could -be tidied up in order to avoid warnings. - -3. The variables for cross-compiling were called HOST_CC and HOST_CFLAGS; the -first of these names is deprecated in the latest Autoconf in favour of the name -CC_FOR_BUILD, because "host" is typically used to mean the system on which the -compiled code will be run. I can't find a reference for HOST_CFLAGS, but by -analogy I have changed it to CFLAGS_FOR_BUILD. - -4. Added -no-undefined to the linking command in the Makefile, because this is -apparently helpful for Windows. To make it work, also added "-L. -lpcre" to the -linking step for the pcreposix library. - -5. PCRE was failing to diagnose the case of two named groups with the same -name. - -6. A problem with one of PCRE's optimizations was discovered. PCRE remembers a -literal character that is needed in the subject for a match, and scans along to -ensure that it is present before embarking on the full matching process. This -saves time in cases of nested unlimited repeats that are never going to match. -Problem: the scan can take a lot of time if the subject is very long (e.g. -megabytes), thus penalizing straightforward matches. It is now done only if the -amount of subject to be scanned is less than 1000 bytes. - -7. A lesser problem with the same optimization is that it was recording the -first character of an anchored pattern as "needed", thus provoking a search -right along the subject, even when the first match of the pattern was going to -fail. The "needed" character is now not set for anchored patterns, unless it -follows something in the pattern that is of non-fixed length. Thus, it still -fulfils its original purpose of finding quick non-matches in cases of nested -unlimited repeats, but isn't used for simple anchored patterns such as /^abc/. - - -Version 4.0 17-Feb-03 ---------------------- - -1. If a comment in an extended regex that started immediately after a meta-item -extended to the end of string, PCRE compiled incorrect data. This could lead to -all kinds of weird effects. Example: /#/ was bad; /()#/ was bad; /a#/ was not. - -2. Moved to autoconf 2.53 and libtool 1.4.2. - -3. Perl 5.8 no longer needs "use utf8" for doing UTF-8 things. Consequently, -the special perltest8 script is no longer needed - all the tests can be run -from a single perltest script. - -4. From 5.004, Perl has not included the VT character (0x0b) in the set defined -by \s. It has now been removed in PCRE. This means it isn't recognized as -whitespace in /x regexes too, which is the same as Perl. Note that the POSIX -class [:space:] *does* include VT, thereby creating a mess. - -5. Added the class [:blank:] (a GNU extension from Perl 5.8) to match only -space and tab. - -6. Perl 5.005 was a long time ago. It's time to amalgamate the tests that use -its new features into the main test script, reducing the number of scripts. - -7. Perl 5.8 has changed the meaning of patterns like /a(?i)b/. Earlier versions -were backward compatible, and made the (?i) apply to the whole pattern, as if -/i were given. Now it behaves more logically, and applies the option setting -only to what follows. PCRE has been changed to follow suit. However, if it -finds options settings right at the start of the pattern, it extracts them into -the global options, as before. Thus, they show up in the info data. - -8. Added support for the \Q...\E escape sequence. Characters in between are -treated as literals. This is slightly different from Perl in that $ and @ are -also handled as literals inside the quotes. In Perl, they will cause variable -interpolation. Note the following examples: - - Pattern PCRE matches Perl matches - - \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz - \Qabc\$xyz\E abc\$xyz abc\$xyz - \Qabc\E\$\Qxyz\E abc$xyz abc$xyz - -For compatibility with Perl, \Q...\E sequences are recognized inside character -classes as well as outside them. - -9. Re-organized 3 code statements in pcretest to avoid "overflow in -floating-point constant arithmetic" warnings from a Microsoft compiler. Added a -(size_t) cast to one statement in pcretest and one in pcreposix to avoid -signed/unsigned warnings. - -10. SunOS4 doesn't have strtoul(). This was used only for unpicking the -o -option for pcretest, so I've replaced it by a simple function that does just -that job. - -11. pcregrep was ending with code 0 instead of 2 for the commands "pcregrep" or -"pcregrep -". - -12. Added "possessive quantifiers" ?+, *+, ++, and {,}+ which come from Sun's -Java package. This provides some syntactic sugar for simple cases of what my -documentation calls "once-only subpatterns". A pattern such as x*+ is the same -as (?>x*). In other words, if what is inside (?>...) is just a single repeated -item, you can use this simplified notation. Note that only makes sense with -greedy quantifiers. Consequently, the use of the possessive quantifier forces -greediness, whatever the setting of the PCRE_UNGREEDY option. - -13. A change of greediness default within a pattern was not taking effect at -the current level for patterns like /(b+(?U)a+)/. It did apply to parenthesized -subpatterns that followed. Patterns like /b+(?U)a+/ worked because the option -was abstracted outside. - -14. PCRE now supports the \G assertion. It is true when the current matching -position is at the start point of the match. This differs from \A when the -starting offset is non-zero. Used with the /g option of pcretest (or similar -code), it works in the same way as it does for Perl's /g option. If all -alternatives of a regex begin with \G, the expression is anchored to the start -match position, and the "anchored" flag is set in the compiled expression. - -15. Some bugs concerning the handling of certain option changes within patterns -have been fixed. These applied to options other than (?ims). For example, -"a(?x: b c )d" did not match "XabcdY" but did match "Xa b c dY". It should have -been the other way round. Some of this was related to change 7 above. - -16. PCRE now gives errors for /[.x.]/ and /[=x=]/ as unsupported POSIX -features, as Perl does. Previously, PCRE gave the warnings only for /[[.x.]]/ -and /[[=x=]]/. PCRE now also gives an error for /[:name:]/ because it supports -POSIX classes only within a class (e.g. /[[:alpha:]]/). - -17. Added support for Perl's \C escape. This matches one byte, even in UTF8 -mode. Unlike ".", it always matches newline, whatever the setting of -PCRE_DOTALL. However, PCRE does not permit \C to appear in lookbehind -assertions. Perl allows it, but it doesn't (in general) work because it can't -calculate the length of the lookbehind. At least, that's the case for Perl -5.8.0 - I've been told they are going to document that it doesn't work in -future. - -18. Added an error diagnosis for escapes that PCRE does not support: these are -\L, \l, \N, \P, \p, \U, \u, and \X. - -19. Although correctly diagnosing a missing ']' in a character class, PCRE was -reading past the end of the pattern in cases such as /[abcd/. - -20. PCRE was getting more memory than necessary for patterns with classes that -contained both POSIX named classes and other characters, e.g. /[[:space:]abc/. - -21. Added some code, conditional on #ifdef VPCOMPAT, to make life easier for -compiling PCRE for use with Virtual Pascal. - -22. Small fix to the Makefile to make it work properly if the build is done -outside the source tree. - -23. Added a new extension: a condition to go with recursion. If a conditional -subpattern starts with (?(R) the "true" branch is used if recursion has -happened, whereas the "false" branch is used only at the top level. - -24. When there was a very long string of literal characters (over 255 bytes -without UTF support, over 250 bytes with UTF support), the computation of how -much memory was required could be incorrect, leading to segfaults or other -strange effects. - -25. PCRE was incorrectly assuming anchoring (either to start of subject or to -start of line for a non-DOTALL pattern) when a pattern started with (.*) and -there was a subsequent back reference to those brackets. This meant that, for -example, /(.*)\d+\1/ failed to match "abc123bc". Unfortunately, it isn't -possible to check for precisely this case. All we can do is abandon the -optimization if .* occurs inside capturing brackets when there are any back -references whatsoever. (See below for a better fix that came later.) - -26. The handling of the optimization for finding the first character of a -non-anchored pattern, and for finding a character that is required later in the -match were failing in some cases. This didn't break the matching; it just -failed to optimize when it could. The way this is done has been re-implemented. - -27. Fixed typo in error message for invalid (?R item (it said "(?p"). - -28. Added a new feature that provides some of the functionality that Perl -provides with (?{...}). The facility is termed a "callout". The way it is done -in PCRE is for the caller to provide an optional function, by setting -pcre_callout to its entry point. Like pcre_malloc and pcre_free, this is a -global variable. By default it is unset, which disables all calling out. To get -the function called, the regex must include (?C) at appropriate points. This -is, in fact, equivalent to (?C0), and any number <= 255 may be given with (?C). -This provides a means of identifying different callout points. When PCRE -reaches such a point in the regex, if pcre_callout has been set, the external -function is called. It is provided with data in a structure called -pcre_callout_block, which is defined in pcre.h. If the function returns 0, -matching continues; if it returns a non-zero value, the match at the current -point fails. However, backtracking will occur if possible. [This was changed -later and other features added - see item 49 below.] - -29. pcretest is upgraded to test the callout functionality. It provides a -callout function that displays information. By default, it shows the start of -the match and the current position in the text. There are some new data escapes -to vary what happens: - - \C+ in addition, show current contents of captured substrings - \C- do not supply a callout function - \C!n return 1 when callout number n is reached - \C!n!m return 1 when callout number n is reached for the mth time - -30. If pcregrep was called with the -l option and just a single file name, it -output "<stdin>" if a match was found, instead of the file name. - -31. Improve the efficiency of the POSIX API to PCRE. If the number of capturing -slots is less than POSIX_MALLOC_THRESHOLD, use a block on the stack to pass to -pcre_exec(). This saves a malloc/free per call. The default value of -POSIX_MALLOC_THRESHOLD is 10; it can be changed by --with-posix-malloc-threshold -when configuring. - -32. The default maximum size of a compiled pattern is 64K. There have been a -few cases of people hitting this limit. The code now uses macros to handle the -storing of links as offsets within the compiled pattern. It defaults to 2-byte -links, but this can be changed to 3 or 4 bytes by --with-link-size when -configuring. Tests 2 and 5 work only with 2-byte links because they output -debugging information about compiled patterns. - -33. Internal code re-arrangements: - -(a) Moved the debugging function for printing out a compiled regex into - its own source file (printint.c) and used #include to pull it into - pcretest.c and, when DEBUG is defined, into pcre.c, instead of having two - separate copies. - -(b) Defined the list of op-code names for debugging as a macro in - internal.h so that it is next to the definition of the opcodes. - -(c) Defined a table of op-code lengths for simpler skipping along compiled - code. This is again a macro in internal.h so that it is next to the - definition of the opcodes. - -34. Added support for recursive calls to individual subpatterns, along the -lines of Robin Houston's patch (but implemented somewhat differently). - -35. Further mods to the Makefile to help Win32. Also, added code to pcregrep to -allow it to read and process whole directories in Win32. This code was -contributed by Lionel Fourquaux; it has not been tested by me. - -36. Added support for named subpatterns. The Python syntax (?P<name>...) is -used to name a group. Names consist of alphanumerics and underscores, and must -be unique. Back references use the syntax (?P=name) and recursive calls use -(?P>name) which is a PCRE extension to the Python extension. Groups still have -numbers. The function pcre_fullinfo() can be used after compilation to extract -a name/number map. There are three relevant calls: - - PCRE_INFO_NAMEENTRYSIZE yields the size of each entry in the map - PCRE_INFO_NAMECOUNT yields the number of entries - PCRE_INFO_NAMETABLE yields a pointer to the map. - -The map is a vector of fixed-size entries. The size of each entry depends on -the length of the longest name used. The first two bytes of each entry are the -group number, most significant byte first. There follows the corresponding -name, zero terminated. The names are in alphabetical order. - -37. Make the maximum literal string in the compiled code 250 for the non-UTF-8 -case instead of 255. Making it the same both with and without UTF-8 support -means that the same test output works with both. - -38. There was a case of malloc(0) in the POSIX testing code in pcretest. Avoid -calling malloc() with a zero argument. - -39. Change 25 above had to resort to a heavy-handed test for the .* anchoring -optimization. I've improved things by keeping a bitmap of backreferences with -numbers 1-31 so that if .* occurs inside capturing brackets that are not in -fact referenced, the optimization can be applied. It is unlikely that a -relevant occurrence of .* (i.e. one which might indicate anchoring or forcing -the match to follow \n) will appear inside brackets with a number greater than -31, but if it does, any back reference > 31 suppresses the optimization. - -40. Added a new compile-time option PCRE_NO_AUTO_CAPTURE. This has the effect -of disabling numbered capturing parentheses. Any opening parenthesis that is -not followed by ? behaves as if it were followed by ?: but named parentheses -can still be used for capturing (and they will acquire numbers in the usual -way). - -41. Redesigned the return codes from the match() function into yes/no/error so -that errors can be passed back from deep inside the nested calls. A malloc -failure while inside a recursive subpattern call now causes the -PCRE_ERROR_NOMEMORY return instead of quietly going wrong. - -42. It is now possible to set a limit on the number of times the match() -function is called in a call to pcre_exec(). This facility makes it possible to -limit the amount of recursion and backtracking, though not in a directly -obvious way, because the match() function is used in a number of different -circumstances. The count starts from zero for each position in the subject -string (for non-anchored patterns). The default limit is, for compatibility, a -large number, namely 10 000 000. You can change this in two ways: - -(a) When configuring PCRE before making, you can use --with-match-limit=n - to set a default value for the compiled library. - -(b) For each call to pcre_exec(), you can pass a pcre_extra block in which - a different value is set. See 45 below. - -If the limit is exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT. - -43. Added a new function pcre_config(int, void *) to enable run-time extraction -of things that can be changed at compile time. The first argument specifies -what is wanted and the second points to where the information is to be placed. -The current list of available information is: - - PCRE_CONFIG_UTF8 - -The output is an integer that is set to one if UTF-8 support is available; -otherwise it is set to zero. - - PCRE_CONFIG_NEWLINE - -The output is an integer that it set to the value of the code that is used for -newline. It is either LF (10) or CR (13). - - PCRE_CONFIG_LINK_SIZE - -The output is an integer that contains the number of bytes used for internal -linkage in compiled expressions. The value is 2, 3, or 4. See item 32 above. - - PCRE_CONFIG_POSIX_MALLOC_THRESHOLD - -The output is an integer that contains the threshold above which the POSIX -interface uses malloc() for output vectors. See item 31 above. - - PCRE_CONFIG_MATCH_LIMIT - -The output is an unsigned integer that contains the default limit of the number -of match() calls in a pcre_exec() execution. See 42 above. - -44. pcretest has been upgraded by the addition of the -C option. This causes it -to extract all the available output from the new pcre_config() function, and to -output it. The program then exits immediately. - -45. A need has arisen to pass over additional data with calls to pcre_exec() in -order to support additional features. One way would have been to define -pcre_exec2() (for example) with extra arguments, but this would not have been -extensible, and would also have required all calls to the original function to -be mapped to the new one. Instead, I have chosen to extend the mechanism that -is used for passing in "extra" data from pcre_study(). - -The pcre_extra structure is now exposed and defined in pcre.h. It currently -contains the following fields: - - flags a bitmap indicating which of the following fields are set - study_data opaque data from pcre_study() - match_limit a way of specifying a limit on match() calls for a specific - call to pcre_exec() - callout_data data for callouts (see 49 below) - -The flag bits are also defined in pcre.h, and are - - PCRE_EXTRA_STUDY_DATA - PCRE_EXTRA_MATCH_LIMIT - PCRE_EXTRA_CALLOUT_DATA - -The pcre_study() function now returns one of these new pcre_extra blocks, with -the actual study data pointed to by the study_data field, and the -PCRE_EXTRA_STUDY_DATA flag set. This can be passed directly to pcre_exec() as -before. That is, this change is entirely upwards-compatible and requires no -change to existing code. - -If you want to pass in additional data to pcre_exec(), you can either place it -in a pcre_extra block provided by pcre_study(), or create your own pcre_extra -block. - -46. pcretest has been extended to test the PCRE_EXTRA_MATCH_LIMIT feature. If a -data string contains the escape sequence \M, pcretest calls pcre_exec() several -times with different match limits, until it finds the minimum value needed for -pcre_exec() to complete. The value is then output. This can be instructive; for -most simple matches the number is quite small, but for pathological cases it -gets very large very quickly. - -47. There's a new option for pcre_fullinfo() called PCRE_INFO_STUDYSIZE. It -returns the size of the data block pointed to by the study_data field in a -pcre_extra block, that is, the value that was passed as the argument to -pcre_malloc() when PCRE was getting memory in which to place the information -created by pcre_study(). The fourth argument should point to a size_t variable. -pcretest has been extended so that this information is shown after a successful -pcre_study() call when information about the compiled regex is being displayed. - -48. Cosmetic change to Makefile: there's no need to have / after $(DESTDIR) -because what follows is always an absolute path. (Later: it turns out that this -is more than cosmetic for MinGW, because it doesn't like empty path -components.) - -49. Some changes have been made to the callout feature (see 28 above): - -(i) A callout function now has three choices for what it returns: - - 0 => success, carry on matching - > 0 => failure at this point, but backtrack if possible - < 0 => serious error, return this value from pcre_exec() - - Negative values should normally be chosen from the set of PCRE_ERROR_xxx - values. In particular, returning PCRE_ERROR_NOMATCH forces a standard - "match failed" error. The error number PCRE_ERROR_CALLOUT is reserved for - use by callout functions. It will never be used by PCRE itself. - -(ii) The pcre_extra structure (see 45 above) has a void * field called - callout_data, with corresponding flag bit PCRE_EXTRA_CALLOUT_DATA. The - pcre_callout_block structure has a field of the same name. The contents of - the field passed in the pcre_extra structure are passed to the callout - function in the corresponding field in the callout block. This makes it - easier to use the same callout-containing regex from multiple threads. For - testing, the pcretest program has a new data escape - - \C*n pass the number n (may be negative) as callout_data - - If the callout function in pcretest receives a non-zero value as - callout_data, it returns that value. - -50. Makefile wasn't handling CFLAGS properly when compiling dftables. Also, -there were some redundant $(CFLAGS) in commands that are now specified as -$(LINK), which already includes $(CFLAGS). - -51. Extensions to UTF-8 support are listed below. These all apply when (a) PCRE -has been compiled with UTF-8 support *and* pcre_compile() has been compiled -with the PCRE_UTF8 flag. Patterns that are compiled without that flag assume -one-byte characters throughout. Note that case-insensitive matching applies -only to characters whose values are less than 256. PCRE doesn't support the -notion of cases for higher-valued characters. - -(i) A character class whose characters are all within 0-255 is handled as - a bit map, and the map is inverted for negative classes. Previously, a - character > 255 always failed to match such a class; however it should - match if the class was a negative one (e.g. [^ab]). This has been fixed. - -(ii) A negated character class with a single character < 255 is coded as - "not this character" (OP_NOT). This wasn't working properly when the test - character was multibyte, either singly or repeated. - -(iii) Repeats of multibyte characters are now handled correctly in UTF-8 - mode, for example: \x{100}{2,3}. - -(iv) The character escapes \b, \B, \d, \D, \s, \S, \w, and \W (either - singly or repeated) now correctly test multibyte characters. However, - PCRE doesn't recognize any characters with values greater than 255 as - digits, spaces, or word characters. Such characters always match \D, \S, - and \W, and never match \d, \s, or \w. - -(v) Classes may now contain characters and character ranges with values - greater than 255. For example: [ab\x{100}-\x{400}]. - -(vi) pcregrep now has a --utf-8 option (synonym -u) which makes it call - PCRE in UTF-8 mode. - -52. The info request value PCRE_INFO_FIRSTCHAR has been renamed -PCRE_INFO_FIRSTBYTE because it is a byte value. However, the old name is -retained for backwards compatibility. (Note that LASTLITERAL is also a byte -value.) - -53. The single man page has become too large. I have therefore split it up into -a number of separate man pages. These also give rise to individual HTML pages; -these are now put in a separate directory, and there is an index.html page that -lists them all. Some hyperlinking between the pages has been installed. - -54. Added convenience functions for handling named capturing parentheses. - -55. Unknown escapes inside character classes (e.g. [\M]) and escapes that -aren't interpreted therein (e.g. [\C]) are literals in Perl. This is now also -true in PCRE, except when the PCRE_EXTENDED option is set, in which case they -are faulted. - -56. Introduced HOST_CC and HOST_CFLAGS which can be set in the environment when -calling configure. These values are used when compiling the dftables.c program -which is run to generate the source of the default character tables. They -default to the values of CC and CFLAGS. If you are cross-compiling PCRE, -you will need to set these values. - -57. Updated the building process for Windows DLL, as provided by Fred Cox. - - -Version 3.9 02-Jan-02 ---------------------- - -1. A bit of extraneous text had somehow crept into the pcregrep documentation. - -2. If --disable-static was given, the building process failed when trying to -build pcretest and pcregrep. (For some reason it was using libtool to compile -them, which is not right, as they aren't part of the library.) - - -Version 3.8 18-Dec-01 ---------------------- - -1. The experimental UTF-8 code was completely screwed up. It was packing the -bytes in the wrong order. How dumb can you get? - - -Version 3.7 29-Oct-01 ---------------------- - -1. In updating pcretest to check change 1 of version 3.6, I screwed up. -This caused pcretest, when used on the test data, to segfault. Unfortunately, -this didn't happen under Solaris 8, where I normally test things. - -2. The Makefile had to be changed to make it work on BSD systems, where 'make' -doesn't seem to recognize that ./xxx and xxx are the same file. (This entry -isn't in ChangeLog distributed with 3.7 because I forgot when I hastily made -this fix an hour or so after the initial 3.7 release.) - - -Version 3.6 23-Oct-01 ---------------------- - -1. Crashed with /(sens|respons)e and \1ibility/ and "sense and sensibility" if -offsets passed as NULL with zero offset count. - -2. The config.guess and config.sub files had not been updated when I moved to -the latest autoconf. - - -Version 3.5 15-Aug-01 ---------------------- - -1. Added some missing #if !defined NOPOSIX conditionals in pcretest.c that -had been forgotten. - -2. By using declared but undefined structures, we can avoid using "void" -definitions in pcre.h while keeping the internal definitions of the structures -private. - -3. The distribution is now built using autoconf 2.50 and libtool 1.4. From a -user point of view, this means that both static and shared libraries are built -by default, but this can be individually controlled. More of the work of -handling this static/shared cases is now inside libtool instead of PCRE's make -file. - -4. The pcretest utility is now installed along with pcregrep because it is -useful for users (to test regexs) and by doing this, it automatically gets -relinked by libtool. The documentation has been turned into a man page, so -there are now .1, .txt, and .html versions in /doc. - -5. Upgrades to pcregrep: - (i) Added long-form option names like gnu grep. - (ii) Added --help to list all options with an explanatory phrase. - (iii) Added -r, --recursive to recurse into sub-directories. - (iv) Added -f, --file to read patterns from a file. - -6. pcre_exec() was referring to its "code" argument before testing that -argument for NULL (and giving an error if it was NULL). - -7. Upgraded Makefile.in to allow for compiling in a different directory from -the source directory. - -8. Tiny buglet in pcretest: when pcre_fullinfo() was called to retrieve the -options bits, the pointer it was passed was to an int instead of to an unsigned -long int. This mattered only on 64-bit systems. - -9. Fixed typo (3.4/1) in pcre.h again. Sigh. I had changed pcre.h (which is -generated) instead of pcre.in, which it its source. Also made the same change -in several of the .c files. - -10. A new release of gcc defines printf() as a macro, which broke pcretest -because it had an ifdef in the middle of a string argument for printf(). Fixed -by using separate calls to printf(). - -11. Added --enable-newline-is-cr and --enable-newline-is-lf to the configure -script, to force use of CR or LF instead of \n in the source. On non-Unix -systems, the value can be set in config.h. - -12. The limit of 200 on non-capturing parentheses is a _nesting_ limit, not an -absolute limit. Changed the text of the error message to make this clear, and -likewise updated the man page. - -13. The limit of 99 on the number of capturing subpatterns has been removed. -The new limit is 65535, which I hope will not be a "real" limit. - - -Version 3.4 22-Aug-00 ---------------------- - -1. Fixed typo in pcre.h: unsigned const char * changed to const unsigned char *. - -2. Diagnose condition (?(0) as an error instead of crashing on matching. - - -Version 3.3 01-Aug-00 ---------------------- - -1. If an octal character was given, but the value was greater than \377, it -was not getting masked to the least significant bits, as documented. This could -lead to crashes in some systems. - -2. Perl 5.6 (if not earlier versions) accepts classes like [a-\d] and treats -the hyphen as a literal. PCRE used to give an error; it now behaves like Perl. - -3. Added the functions pcre_free_substring() and pcre_free_substring_list(). -These just pass their arguments on to (pcre_free)(), but they are provided -because some uses of PCRE bind it to non-C systems that can call its functions, -but cannot call free() or pcre_free() directly. - -4. Add "make test" as a synonym for "make check". Corrected some comments in -the Makefile. - -5. Add $(DESTDIR)/ in front of all the paths in the "install" target in the -Makefile. - -6. Changed the name of pgrep to pcregrep, because Solaris has introduced a -command called pgrep for grepping around the active processes. - -7. Added the beginnings of support for UTF-8 character strings. - -8. Arranged for the Makefile to pass over the settings of CC, CFLAGS, and -RANLIB to ./ltconfig so that they are used by libtool. I think these are all -the relevant ones. (AR is not passed because ./ltconfig does its own figuring -out for the ar command.) - - -Version 3.2 12-May-00 ---------------------- - -This is purely a bug fixing release. - -1. If the pattern /((Z)+|A)*/ was matched agained ZABCDEFG it matched Z instead -of ZA. This was just one example of several cases that could provoke this bug, -which was introduced by change 9 of version 2.00. The code for breaking -infinite loops after an iteration that matches an empty string was't working -correctly. - -2. The pcretest program was not imitating Perl correctly for the pattern /a*/g -when matched against abbab (for example). After matching an empty string, it -wasn't forcing anchoring when setting PCRE_NOTEMPTY for the next attempt; this -caused it to match further down the string than it should. - -3. The code contained an inclusion of sys/types.h. It isn't clear why this -was there because it doesn't seem to be needed, and it causes trouble on some -systems, as it is not a Standard C header. It has been removed. - -4. Made 4 silly changes to the source to avoid stupid compiler warnings that -were reported on the Macintosh. The changes were from - - while ((c = *(++ptr)) != 0 && c != '\n'); -to - while ((c = *(++ptr)) != 0 && c != '\n') ; - -Totally extraordinary, but if that's what it takes... - -5. PCRE is being used in one environment where neither memmove() nor bcopy() is -available. Added HAVE_BCOPY and an autoconf test for it; if neither -HAVE_MEMMOVE nor HAVE_BCOPY is set, use a built-in emulation function which -assumes the way PCRE uses memmove() (always moving upwards). - -6. PCRE is being used in one environment where strchr() is not available. There -was only one use in pcre.c, and writing it out to avoid strchr() probably gives -faster code anyway. - - -Version 3.1 09-Feb-00 ---------------------- - -The only change in this release is the fixing of some bugs in Makefile.in for -the "install" target: - -(1) It was failing to install pcreposix.h. - -(2) It was overwriting the pcre.3 man page with the pcreposix.3 man page. - - -Version 3.0 01-Feb-00 ---------------------- - -1. Add support for the /+ modifier to perltest (to output $` like it does in -pcretest). - -2. Add support for the /g modifier to perltest. - -3. Fix pcretest so that it behaves even more like Perl for /g when the pattern -matches null strings. - -4. Fix perltest so that it doesn't do unwanted things when fed an empty -pattern. Perl treats empty patterns specially - it reuses the most recent -pattern, which is not what we want. Replace // by /(?#)/ in order to avoid this -effect. - -5. The POSIX interface was broken in that it was just handing over the POSIX -captured string vector to pcre_exec(), but (since release 2.00) PCRE has -required a bigger vector, with some working space on the end. This means that -the POSIX wrapper now has to get and free some memory, and copy the results. - -6. Added some simple autoconf support, placing the test data and the -documentation in separate directories, re-organizing some of the -information files, and making it build pcre-config (a GNU standard). Also added -libtool support for building PCRE as a shared library, which is now the -default. - -7. Got rid of the leading zero in the definition of PCRE_MINOR because 08 and -09 are not valid octal constants. Single digits will be used for minor values -less than 10. - -8. Defined REG_EXTENDED and REG_NOSUB as zero in the POSIX header, so that -existing programs that set these in the POSIX interface can use PCRE without -modification. - -9. Added a new function, pcre_fullinfo() with an extensible interface. It can -return all that pcre_info() returns, plus additional data. The pcre_info() -function is retained for compatibility, but is considered to be obsolete. - -10. Added experimental recursion feature (?R) to handle one common case that -Perl 5.6 will be able to do with (?p{...}). - -11. Added support for POSIX character classes like [:alpha:], which Perl is -adopting. - - -Version 2.08 31-Aug-99 ----------------------- - -1. When startoffset was not zero and the pattern began with ".*", PCRE was not -trying to match at the startoffset position, but instead was moving forward to -the next newline as if a previous match had failed. - -2. pcretest was not making use of PCRE_NOTEMPTY when repeating for /g and /G, -and could get into a loop if a null string was matched other than at the start -of the subject. - -3. Added definitions of PCRE_MAJOR and PCRE_MINOR to pcre.h so the version can -be distinguished at compile time, and for completeness also added PCRE_DATE. - -5. Added Paul Sokolovsky's minor changes to make it easy to compile a Win32 DLL -in GnuWin32 environments. - - -Version 2.07 29-Jul-99 ----------------------- - -1. The documentation is now supplied in plain text form and HTML as well as in -the form of man page sources. - -2. C++ compilers don't like assigning (void *) values to other pointer types. -In particular this affects malloc(). Although there is no problem in Standard -C, I've put in casts to keep C++ compilers happy. - -3. Typo on pcretest.c; a cast of (unsigned char *) in the POSIX regexec() call -should be (const char *). - -4. If NOPOSIX is defined, pcretest.c compiles without POSIX support. This may -be useful for non-Unix systems who don't want to bother with the POSIX stuff. -However, I haven't made this a standard facility. The documentation doesn't -mention it, and the Makefile doesn't support it. - -5. The Makefile now contains an "install" target, with editable destinations at -the top of the file. The pcretest program is not installed. - -6. pgrep -V now gives the PCRE version number and date. - -7. Fixed bug: a zero repetition after a literal string (e.g. /abcde{0}/) was -causing the entire string to be ignored, instead of just the last character. - -8. If a pattern like /"([^\\"]+|\\.)*"/ is applied in the normal way to a -non-matching string, it can take a very, very long time, even for strings of -quite modest length, because of the nested recursion. PCRE now does better in -some of these cases. It does this by remembering the last required literal -character in the pattern, and pre-searching the subject to ensure it is present -before running the real match. In other words, it applies a heuristic to detect -some types of certain failure quickly, and in the above example, if presented -with a string that has no trailing " it gives "no match" very quickly. - -9. A new runtime option PCRE_NOTEMPTY causes null string matches to be ignored; -other alternatives are tried instead. - - -Version 2.06 09-Jun-99 ----------------------- - -1. Change pcretest's output for amount of store used to show just the code -space, because the remainder (the data block) varies in size between 32-bit and -64-bit systems. - -2. Added an extra argument to pcre_exec() to supply an offset in the subject to -start matching at. This allows lookbehinds to work when searching for multiple -occurrences in a string. - -3. Added additional options to pcretest for testing multiple occurrences: - - /+ outputs the rest of the string that follows a match - /g loops for multiple occurrences, using the new startoffset argument - /G loops for multiple occurrences by passing an incremented pointer - -4. PCRE wasn't doing the "first character" optimization for patterns starting -with \b or \B, though it was doing it for other lookbehind assertions. That is, -it wasn't noticing that a match for a pattern such as /\bxyz/ has to start with -the letter 'x'. On long subject strings, this gives a significant speed-up. - - -Version 2.05 21-Apr-99 ----------------------- - -1. Changed the type of magic_number from int to long int so that it works -properly on 16-bit systems. - -2. Fixed a bug which caused patterns starting with .* not to work correctly -when the subject string contained newline characters. PCRE was assuming -anchoring for such patterns in all cases, which is not correct because .* will -not pass a newline unless PCRE_DOTALL is set. It now assumes anchoring only if -DOTALL is set at top level; otherwise it knows that patterns starting with .* -must be retried after every newline in the subject. - - -Version 2.04 18-Feb-99 ----------------------- - -1. For parenthesized subpatterns with repeats whose minimum was zero, the -computation of the store needed to hold the pattern was incorrect (too large). -If such patterns were nested a few deep, this could multiply and become a real -problem. - -2. Added /M option to pcretest to show the memory requirement of a specific -pattern. Made -m a synonym of -s (which does this globally) for compatibility. - -3. Subpatterns of the form (regex){n,m} (i.e. limited maximum) were being -compiled in such a way that the backtracking after subsequent failure was -pessimal. Something like (a){0,3} was compiled as (a)?(a)?(a)? instead of -((a)((a)(a)?)?)? with disastrous performance if the maximum was of any size. - - -Version 2.03 02-Feb-99 ----------------------- - -1. Fixed typo and small mistake in man page. - -2. Added 4th condition (GPL supersedes if conflict) and created separate -LICENCE file containing the conditions. - -3. Updated pcretest so that patterns such as /abc\/def/ work like they do in -Perl, that is the internal \ allows the delimiter to be included in the -pattern. Locked out the use of \ as a delimiter. If \ immediately follows -the final delimiter, add \ to the end of the pattern (to test the error). - -4. Added the convenience functions for extracting substrings after a successful -match. Updated pcretest to make it able to test these functions. - - -Version 2.02 14-Jan-99 ----------------------- - -1. Initialized the working variables associated with each extraction so that -their saving and restoring doesn't refer to uninitialized store. - -2. Put dummy code into study.c in order to trick the optimizer of the IBM C -compiler for OS/2 into generating correct code. Apparently IBM isn't going to -fix the problem. - -3. Pcretest: the timing code wasn't using LOOPREPEAT for timing execution -calls, and wasn't printing the correct value for compiling calls. Increased the -default value of LOOPREPEAT, and the number of significant figures in the -times. - -4. Changed "/bin/rm" in the Makefile to "-rm" so it works on Windows NT. - -5. Renamed "deftables" as "dftables" to get it down to 8 characters, to avoid -a building problem on Windows NT with a FAT file system. - - -Version 2.01 21-Oct-98 ----------------------- - -1. Changed the API for pcre_compile() to allow for the provision of a pointer -to character tables built by pcre_maketables() in the current locale. If NULL -is passed, the default tables are used. - - -Version 2.00 24-Sep-98 ----------------------- - -1. Since the (>?) facility is in Perl 5.005, don't require PCRE_EXTRA to enable -it any more. - -2. Allow quantification of (?>) groups, and make it work correctly. - -3. The first character computation wasn't working for (?>) groups. - -4. Correct the implementation of \Z (it is permitted to match on the \n at the -end of the subject) and add 5.005's \z, which really does match only at the -very end of the subject. - -5. Remove the \X "cut" facility; Perl doesn't have it, and (?> is neater. - -6. Remove the ability to specify CASELESS, MULTILINE, DOTALL, and -DOLLAR_END_ONLY at runtime, to make it possible to implement the Perl 5.005 -localized options. All options to pcre_study() were also removed. - -7. Add other new features from 5.005: - - $(?<= positive lookbehind - $(?<! negative lookbehind - (?imsx-imsx) added the unsetting capability - such a setting is global if at outer level; local otherwise - (?imsx-imsx:) non-capturing groups with option setting - (?(cond)re|re) conditional pattern matching - - A backreference to itself in a repeated group matches the previous - captured string. - -8. General tidying up of studying (both automatic and via "study") -consequential on the addition of new assertions. - -9. As in 5.005, unlimited repeated groups that could match an empty substring -are no longer faulted at compile time. Instead, the loop is forcibly broken at -runtime if any iteration does actually match an empty substring. - -10. Include the RunTest script in the distribution. - -11. Added tests from the Perl 5.005_02 distribution. This showed up a few -discrepancies, some of which were old and were also with respect to 5.004. They -have now been fixed. - - -Version 1.09 28-Apr-98 ----------------------- - -1. A negated single character class followed by a quantifier with a minimum -value of one (e.g. [^x]{1,6} ) was not compiled correctly. This could lead to -program crashes, or just wrong answers. This did not apply to negated classes -containing more than one character, or to minima other than one. - - -Version 1.08 27-Mar-98 ----------------------- - -1. Add PCRE_UNGREEDY to invert the greediness of quantifiers. - -2. Add (?U) and (?X) to set PCRE_UNGREEDY and PCRE_EXTRA respectively. The -latter must appear before anything that relies on it in the pattern. - - -Version 1.07 16-Feb-98 ----------------------- - -1. A pattern such as /((a)*)*/ was not being diagnosed as in error (unlimited -repeat of a potentially empty string). - - -Version 1.06 23-Jan-98 ----------------------- - -1. Added Markus Oberhumer's little patches for C++. - -2. Literal strings longer than 255 characters were broken. - - -Version 1.05 23-Dec-97 ----------------------- - -1. Negated character classes containing more than one character were failing if -PCRE_CASELESS was set at run time. - - -Version 1.04 19-Dec-97 ----------------------- - -1. Corrected the man page, where some "const" qualifiers had been omitted. - -2. Made debugging output print "{0,xxx}" instead of just "{,xxx}" to agree with -input syntax. - -3. Fixed memory leak which occurred when a regex with back references was -matched with an offsets vector that wasn't big enough. The temporary memory -that is used in this case wasn't being freed if the match failed. - -4. Tidied pcretest to ensure it frees memory that it gets. - -5. Temporary memory was being obtained in the case where the passed offsets -vector was exactly big enough. - -6. Corrected definition of offsetof() from change 5 below. - -7. I had screwed up change 6 below and broken the rules for the use of -setjmp(). Now fixed. - - -Version 1.03 18-Dec-97 ----------------------- - -1. A erroneous regex with a missing opening parenthesis was correctly -diagnosed, but PCRE attempted to access brastack[-1], which could cause crashes -on some systems. - -2. Replaced offsetof(real_pcre, code) by offsetof(real_pcre, code[0]) because -it was reported that one broken compiler failed on the former because "code" is -also an independent variable. - -3. The erroneous regex a[]b caused an array overrun reference. - -4. A regex ending with a one-character negative class (e.g. /[^k]$/) did not -fail on data ending with that character. (It was going on too far, and checking -the next character, typically a binary zero.) This was specific to the -optimized code for single-character negative classes. - -5. Added a contributed patch from the TIN world which does the following: - - + Add an undef for memmove, in case the the system defines a macro for it. - - + Add a definition of offsetof(), in case there isn't one. (I don't know - the reason behind this - offsetof() is part of the ANSI standard - but - it does no harm). - - + Reduce the ifdef's in pcre.c using macro DPRINTF, thereby eliminating - most of the places where whitespace preceded '#'. I have given up and - allowed the remaining 2 cases to be at the margin. - - + Rename some variables in pcre to eliminate shadowing. This seems very - pedantic, but does no harm, of course. - -6. Moved the call to setjmp() into its own function, to get rid of warnings -from gcc -Wall, and avoided calling it at all unless PCRE_EXTRA is used. - -7. Constructs such as \d{8,} were compiling into the equivalent of -\d{8}\d{0,65527} instead of \d{8}\d* which didn't make much difference to the -outcome, but in this particular case used more store than had been allocated, -which caused the bug to be discovered because it threw up an internal error. - -8. The debugging code in both pcre and pcretest for outputting the compiled -form of a regex was going wrong in the case of back references followed by -curly-bracketed repeats. - - -Version 1.02 12-Dec-97 ----------------------- - -1. Typos in pcre.3 and comments in the source fixed. - -2. Applied a contributed patch to get rid of places where it used to remove -'const' from variables, and fixed some signed/unsigned and uninitialized -variable warnings. - -3. Added the "runtest" target to Makefile. - -4. Set default compiler flag to -O2 rather than just -O. - - -Version 1.01 19-Nov-97 ----------------------- - -1. PCRE was failing to diagnose unlimited repeat of empty string for patterns -like /([ab]*)*/, that is, for classes with more than one character in them. - -2. Likewise, it wasn't diagnosing patterns with "once-only" subpatterns, such -as /((?>a*))*/ (a PCRE_EXTRA facility). - - -Version 1.00 18-Nov-97 ----------------------- - -1. Added compile-time macros to support systems such as SunOS4 which don't have -memmove() or strerror() but have other things that can be used instead. - -2. Arranged that "make clean" removes the executables. - - -Version 0.99 27-Oct-97 ----------------------- - -1. Fixed bug in code for optimizing classes with only one character. It was -initializing a 32-byte map regardless, which could cause it to run off the end -of the memory it had got. - -2. Added, conditional on PCRE_EXTRA, the proposed (?>REGEX) construction. - - -Version 0.98 22-Oct-97 ----------------------- - -1. Fixed bug in code for handling temporary memory usage when there are more -back references than supplied space in the ovector. This could cause segfaults. - - -Version 0.97 21-Oct-97 ----------------------- - -1. Added the \X "cut" facility, conditional on PCRE_EXTRA. - -2. Optimized negated single characters not to use a bit map. - -3. Brought error texts together as macro definitions; clarified some of them; -fixed one that was wrong - it said "range out of order" when it meant "invalid -escape sequence". - -4. Changed some char * arguments to const char *. - -5. Added PCRE_NOTBOL and PCRE_NOTEOL (from POSIX). - -6. Added the POSIX-style API wrapper in pcreposix.a and testing facilities in -pcretest. - - -Version 0.96 16-Oct-97 ----------------------- - -1. Added a simple "pgrep" utility to the distribution. - -2. Fixed an incompatibility with Perl: "{" is now treated as a normal character -unless it appears in one of the precise forms "{ddd}", "{ddd,}", or "{ddd,ddd}" -where "ddd" means "one or more decimal digits". - -3. Fixed serious bug. If a pattern had a back reference, but the call to -pcre_exec() didn't supply a large enough ovector to record the related -identifying subpattern, the match always failed. PCRE now remembers the number -of the largest back reference, and gets some temporary memory in which to save -the offsets during matching if necessary, in order to ensure that -backreferences always work. - -4. Increased the compatibility with Perl in a number of ways: - - (a) . no longer matches \n by default; an option PCRE_DOTALL is provided - to request this handling. The option can be set at compile or exec time. - - (b) $ matches before a terminating newline by default; an option - PCRE_DOLLAR_ENDONLY is provided to override this (but not in multiline - mode). The option can be set at compile or exec time. - - (c) The handling of \ followed by a digit other than 0 is now supposed to be - the same as Perl's. If the decimal number it represents is less than 10 - or there aren't that many previous left capturing parentheses, an octal - escape is read. Inside a character class, it's always an octal escape, - even if it is a single digit. - - (d) An escaped but undefined alphabetic character is taken as a literal, - unless PCRE_EXTRA is set. Currently this just reserves the remaining - escapes. - - (e) {0} is now permitted. (The previous item is removed from the compiled - pattern). - -5. Changed all the names of code files so that the basic parts are no longer -than 10 characters, and abolished the teeny "globals.c" file. - -6. Changed the handling of character classes; they are now done with a 32-byte -bit map always. - -7. Added the -d and /D options to pcretest to make it possible to look at the -internals of compilation without having to recompile pcre. - - -Version 0.95 23-Sep-97 ----------------------- - -1. Fixed bug in pre-pass concerning escaped "normal" characters such as \x5c or -\x20 at the start of a run of normal characters. These were being treated as -real characters, instead of the source characters being re-checked. - - -Version 0.94 18-Sep-97 ----------------------- - -1. The functions are now thread-safe, with the caveat that the global variables -containing pointers to malloc() and free() or alternative functions are the -same for all threads. - -2. Get pcre_study() to generate a bitmap of initial characters for non- -anchored patterns when this is possible, and use it if passed to pcre_exec(). - - -Version 0.93 15-Sep-97 ----------------------- - -1. /(b)|(:+)/ was computing an incorrect first character. - -2. Add pcre_study() to the API and the passing of pcre_extra to pcre_exec(), -but not actually doing anything yet. - -3. Treat "-" characters in classes that cannot be part of ranges as literals, -as Perl does (e.g. [-az] or [az-]). - -4. Set the anchored flag if a branch starts with .* or .*? because that tests -all possible positions. - -5. Split up into different modules to avoid including unneeded functions in a -compiled binary. However, compile and exec are still in one module. The "study" -function is split off. - -6. The character tables are now in a separate module whose source is generated -by an auxiliary program - but can then be edited by hand if required. There are -now no calls to isalnum(), isspace(), isdigit(), isxdigit(), tolower() or -toupper() in the code. - -7. Turn the malloc/free funtions variables into pcre_malloc and pcre_free and -make them global. Abolish the function for setting them, as the caller can now -set them directly. - - -Version 0.92 11-Sep-97 ----------------------- - -1. A repeat with a fixed maximum and a minimum of 1 for an ordinary character -(e.g. /a{1,3}/) was broken (I mis-optimized it). - -2. Caseless matching was not working in character classes if the characters in -the pattern were in upper case. - -3. Make ranges like [W-c] work in the same way as Perl for caseless matching. - -4. Make PCRE_ANCHORED public and accept as a compile option. - -5. Add an options word to pcre_exec() and accept PCRE_ANCHORED and -PCRE_CASELESS at run time. Add escapes \A and \I to pcretest to cause it to -pass them. - -6. Give an error if bad option bits passed at compile or run time. - -7. Add PCRE_MULTILINE at compile and exec time, and (?m) as well. Add \M to -pcretest to cause it to pass that flag. - -8. Add pcre_info(), to get the number of identifying subpatterns, the stored -options, and the first character, if set. - -9. Recognize C+ or C{n,m} where n >= 1 as providing a fixed starting character. - - -Version 0.91 10-Sep-97 ----------------------- - -1. PCRE was failing to diagnose unlimited repeats of subpatterns that could -match the empty string as in /(a*)*/. It was looping and ultimately crashing. - -2. PCRE was looping on encountering an indefinitely repeated back reference to -a subpattern that had matched an empty string, e.g. /(a|)\1*/. It now does what -Perl does - treats the match as successful. - -**** diff --git a/pcre-7.4/CleanTxt b/pcre-7.4/CleanTxt @@ -1,113 +0,0 @@ -#! /usr/bin/perl -w - -# Script to take the output of nroff -man and remove all the backspacing and -# the page footers and the screen commands etc so that it is more usefully -# readable online. In fact, in the latest nroff, intermediate footers don't -# seem to be generated any more. - -$blankcount = 0; -$lastwascut = 0; -$firstheader = 1; - -# Input on STDIN; output to STDOUT. - -while (<STDIN>) - { - s/\x1b\[\d+m//g; # Remove screen controls "ESC [ number m" - s/.\x8//g; # Remove "char, backspace" - - # Handle header lines. Retain only the first one we encounter, but remove - # the blank line that follows. Any others (e.g. at end of document) and the - # following blank line are dropped. - - if (/^PCRE(\w*)\(([13])\)\s+PCRE\1\(\2\)$/) - { - if ($firstheader) - { - $firstheader = 0; - print; - $lastprinted = $_; - $lastwascut = 0; - } - $_=<STDIN>; # Remove a blank that follows - next; - } - - # Count runs of empty lines - - if (/^\s*$/) - { - $blankcount++; - $lastwascut = 0; - next; - } - - # If a chunk of lines has been cut out (page footer) and the next line - # has a different indentation, put back one blank line. - - if ($lastwascut && $blankcount < 1 && defined($lastprinted)) - { - ($a) = $lastprinted =~ /^(\s*)/; - ($b) = $_ =~ /^(\s*)/; - $blankcount++ if ($a ne $b); - } - - # We get here only when we have a non-blank line in hand. If it was preceded - # by 3 or more blank lines, read the next 3 lines and see if they are blank. - # If so, remove all 7 lines, and remember that we have just done a cut. - - if ($blankcount >= 3) - { - for ($i = 0; $i < 3; $i++) - { - $next[$i] = <STDIN>; - $next[$i] = "" if !defined $next[$i]; - $next[$i] =~ s/\x1b\[\d+m//g; # Remove screen controls "ESC [ number m" - $next[$i] =~ s/.\x8//g; # Remove "char, backspace" - } - - # Cut out chunks of the form <3 blanks><non-blank><3 blanks> - - if ($next[0] =~ /^\s*$/ && - $next[1] =~ /^\s*$/ && - $next[2] =~ /^\s*$/) - { - $blankcount -= 3; - $lastwascut = 1; - } - - # Otherwise output the saved blanks, the current, and the next three - # lines. Remember the last printed line. - - else - { - for ($i = 0; $i < $blankcount; $i++) { print "\n"; } - print; - for ($i = 0; $i < 3; $i++) - { - $next[$i] =~ s/.\x8//g; - print $next[$i]; - $lastprinted = $_; - } - $lastwascut = 0; - $blankcount = 0; - } - } - - # This non-blank line is not preceded by 3 or more blank lines. Output - # any blanks there are, and the line. Remember it. Force two blank lines - # before headings. - - else - { - $blankcount = 2 if /^\S/ && !/^Last updated/ && !/^Copyright/ && - defined($lastprinted); - for ($i = 0; $i < $blankcount; $i++) { print "\n"; } - print; - $lastprinted = $_; - $lastwascut = 0; - $blankcount = 0; - } - } - -# End diff --git a/pcre-7.4/Detrail b/pcre-7.4/Detrail @@ -1,35 +0,0 @@ -#!/usr/bin/perl - -# This is a script for removing trailing whitespace from lines in files that -# are listed on the command line. - -# This subroutine does the work for one file. - -sub detrail { -my($file) = $_[0]; -my($changed) = 0; -open(IN, "$file") || die "Can't open $file for input"; -@lines = <IN>; -close(IN); -foreach (@lines) - { - if (/\s+\n$/) - { - s/\s+\n$/\n/; - $changed = 1; - } - } -if ($changed) - { - open(OUT, ">$file") || die "Can't open $file for output"; - print OUT @lines; - close(OUT); - } -} - -# This is the main program - -$, = ""; # Output field separator -for ($i = 0; $i < @ARGV; $i++) { &detrail($ARGV[$i]); } - -# End diff --git a/pcre-7.4/HACKING b/pcre-7.4/HACKING @@ -1,414 +0,0 @@ -Technical Notes about PCRE --------------------------- - -These are very rough technical notes that record potentially useful information -about PCRE internals. - -Historical note 1 ------------------ - -Many years ago I implemented some regular expression functions to an algorithm -suggested by Martin Richards. These were not Unix-like in form, and were quite -restricted in what they could do by comparison with Perl. The interesting part -about the algorithm was that the amount of space required to hold the compiled -form of an expression was known in advance. The code to apply an expression did -not operate by backtracking, as the original Henry Spencer code and current -Perl code does, but instead checked all possibilities simultaneously by keeping -a list of current states and checking all of them as it advanced through the -subject string. In the terminology of Jeffrey Friedl's book, it was a "DFA -algorithm", though it was not a traditional Finite State Machine (FSM). When -the pattern was all used up, all remaining states were possible matches, and -the one matching the longest subset of the subject string was chosen. This did -not necessarily maximize the individual wild portions of the pattern, as is -expected in Unix and Perl-style regular expressions. - -Historical note 2 ------------------ - -By contrast, the code originally written by Henry Spencer (which was -subsequently heavily modified for Perl) compiles the expression twice: once in -a dummy mode in order to find out how much store will be needed, and then for -real. (The Perl version probably doesn't do this any more; I'm talking about -the original library.) The execution function operates by backtracking and -maximizing (or, optionally, minimizing in Perl) the amount of the subject that -matches individual wild portions of the pattern. This is an "NFA algorithm" in -Friedl's terminology. - -OK, here's the real stuff -------------------------- - -For the set of functions that form the "basic" PCRE library (which are -unrelated to those mentioned above), I tried at first to invent an algorithm -that used an amount of store bounded by a multiple of the number of characters -in the pattern, to save on compiling time. However, because of the greater -complexity in Perl regular expressions, I couldn't do this. In any case, a -first pass through the pattern is helpful for other reasons. - -Computing the memory requirement: how it was --------------------------------------------- - -Up to and including release 6.7, PCRE worked by running a very degenerate first -pass to calculate a maximum store size, and then a second pass to do the real -compile - which might use a bit less than the predicted amount of memory. The -idea was that this would turn out faster than the Henry Spencer code because -the first pass is degenerate and the second pass can just store stuff straight -into the vector, which it knows is big enough. - -Computing the memory requirement: how it is -------------------------------------------- - -By the time I was working on a potential 6.8 release, the degenerate first pass -had become very complicated and hard to maintain. Indeed one of the early -things I did for 6.8 was to fix Yet Another Bug in the memory computation. Then -I had a flash of inspiration as to how I could run the real compile function in -a "fake" mode that enables it to compute how much memory it would need, while -actually only ever using a few hundred bytes of working memory, and without too -many tests of the mode that might slow it down. So I re-factored the compiling -functions to work this way. This got rid of about 600 lines of source. It -should make future maintenance and development easier. As this was such a major -change, I never released 6.8, instead upping the number to 7.0 (other quite -major changes are also present in the 7.0 release). - -A side effect of this work is that the previous limit of 200 on the nesting -depth of parentheses was removed. However, there is a downside: pcre_compile() -runs more slowly than before (30% or more, depending on the pattern) because it -is doing a full analysis of the pattern. My hope is that this is not a big -issue. - -Traditional matching function ------------------------------ - -The "traditional", and original, matching function is called pcre_exec(), and -it implements an NFA algorithm, similar to the original Henry Spencer algorithm -and the way that Perl works. Not surprising, since it is intended to be as -compatible with Perl as possible. This is the function most users of PCRE will -use most of the time. - -Supplementary matching function -------------------------------- - -From PCRE 6.0, there is also a supplementary matching function called -pcre_dfa_exec(). This implements a DFA matching algorithm that searches -simultaneously for all possible matches that start at one point in the subject -string. (Going back to my roots: see Historical Note 1 above.) This function -intreprets the same compiled pattern data as pcre_exec(); however, not all the -facilities are available, and those that are do not always work in quite the -same way. See the user documentation for details. - -The algorithm that is used for pcre_dfa_exec() is not a traditional FSM, -because it may have a number of states active at one time. More work would be -needed at compile time to produce a traditional FSM where only one state is -ever active at once. I believe some other regex matchers work this way. - - -Format of compiled patterns ---------------------------- - -The compiled form of a pattern is a vector of bytes, containing items of -variable length. The first byte in an item is an opcode, and the length of the -item is either implicit in the opcode or contained in the data bytes that -follow it. - -In many cases below LINK_SIZE data values are specified for offsets within the -compiled pattern. The default value for LINK_SIZE is 2, but PCRE can be -compiled to use 3-byte or 4-byte values for these offsets (impairing the -performance). This is necessary only when patterns whose compiled length is -greater than 64K are going to be processed. In this description, we assume the -"normal" compilation options. Data values that are counts (e.g. for -quantifiers) are always just two bytes long. - -A list of the opcodes follows: - -Opcodes with no following data ------------------------------- - -These items are all just one byte long - - OP_END end of pattern - OP_ANY match any character - OP_ANYBYTE match any single byte, even in UTF-8 mode - OP_SOD match start of data: \A - OP_SOM, start of match (subject + offset): \G - OP_SET_SOM, set start of match (\K) - OP_CIRC ^ (start of data, or after \n in multiline) - OP_NOT_WORD_BOUNDARY \W - OP_WORD_BOUNDARY \w - OP_NOT_DIGIT \D - OP_DIGIT \d - OP_NOT_HSPACE \H - OP_HSPACE \h - OP_NOT_WHITESPACE \S - OP_WHITESPACE \s - OP_NOT_VSPACE \V - OP_VSPACE \v - OP_NOT_WORDCHAR \W - OP_WORDCHAR \w - OP_EODN match end of data or \n at end: \Z - OP_EOD match end of data: \z - OP_DOLL $ (end of data, or before \n in multiline) - OP_EXTUNI match an extended Unicode character - OP_ANYNL match any Unicode newline sequence - - OP_ACCEPT ) - OP_COMMIT ) - OP_FAIL ) These are Perl 5.10's "backtracking - OP_PRUNE ) control verbs". - OP_SKIP ) - OP_THEN ) - - -Repeating single characters ---------------------------- - -The common repeats (*, +, ?) when applied to a single character use the -following opcodes: - - OP_STAR - OP_MINSTAR - OP_POSSTAR - OP_PLUS - OP_MINPLUS - OP_POSPLUS - OP_QUERY - OP_MINQUERY - OP_POSQUERY - -In ASCII mode, these are two-byte items; in UTF-8 mode, the length is variable. -Those with "MIN" in their name are the minimizing versions. Those with "POS" in -their names are possessive versions. Each is followed by the character that is -to be repeated. Other repeats make use of - - OP_UPTO - OP_MINUPTO - OP_POSUPTO - OP_EXACT - -which are followed by a two-byte count (most significant first) and the -repeated character. OP_UPTO matches from 0 to the given number. A repeat with a -non-zero minimum and a fixed maximum is coded as an OP_EXACT followed by an -OP_UPTO (or OP_MINUPTO or OPT_POSUPTO). - - -Repeating character types -------------------------- - -Repeats of things like \d are done exactly as for single characters, except -that instead of a character, the opcode for the type is stored in the data -byte. The opcodes are: - - OP_TYPESTAR - OP_TYPEMINSTAR - OP_TYPEPOSSTAR - OP_TYPEPLUS - OP_TYPEMINPLUS - OP_TYPEPOSPLUS - OP_TYPEQUERY - OP_TYPEMINQUERY - OP_TYPEPOSQUERY - OP_TYPEUPTO - OP_TYPEMINUPTO - OP_TYPEPOSUPTO - OP_TYPEEXACT - - -Match by Unicode property -------------------------- - -OP_PROP and OP_NOTPROP are used for positive and negative matches of a -character by testing its Unicode property (the \p and \P escape sequences). -Each is followed by two bytes that encode the desired property as a type and a -value. - -Repeats of these items use the OP_TYPESTAR etc. set of opcodes, followed by -three bytes: OP_PROP or OP_NOTPROP and then the desired property type and -value. - - -Matching literal characters ---------------------------- - -The OP_CHAR opcode is followed by a single character that is to be matched -casefully. For caseless matching, OP_CHARNC is used. In UTF-8 mode, the -character may be more than one byte long. (Earlier versions of PCRE used -multi-character strings, but this was changed to allow some new features to be -added.) - - -Character classes ------------------ - -If there is only one character, OP_CHAR or OP_CHARNC is used for a positive -class, and OP_NOT for a negative one (that is, for something like [^a]). -However, in UTF-8 mode, the use of OP_NOT applies only to characters with -values < 128, because OP_NOT is confined to single bytes. - -Another set of repeating opcodes (OP_NOTSTAR etc.) are used for a repeated, -negated, single-character class. The normal ones (OP_STAR etc.) are used for a -repeated positive single-character class. - -When there's more than one character in a class and all the characters are less -than 256, OP_CLASS is used for a positive class, and OP_NCLASS for a negative -one. In either case, the opcode is followed by a 32-byte bit map containing a 1 -bit for every character that is acceptable. The bits are counted from the least -significant end of each byte. - -The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8 mode, -subject characters with values greater than 256 can be handled correctly. For -OP_CLASS they don't match, whereas for OP_NCLASS they do. - -For classes containing characters with values > 255, OP_XCLASS is used. It -optionally uses a bit map (if any characters lie within it), followed by a list -of pairs and single characters. There is a flag character than indicates -whether it's a positive or a negative class. - - -Back references ---------------- - -OP_REF is followed by two bytes containing the reference number. - - -Repeating character classes and back references ------------------------------------------------ - -Single-character classes are handled specially (see above). This section -applies to OP_CLASS and OP_REF. In both cases, the repeat information follows -the base item. The matching code looks at the following opcode to see if it is -one of - - OP_CRSTAR - OP_CRMINSTAR - OP_CRPLUS - OP_CRMINPLUS - OP_CRQUERY - OP_CRMINQUERY - OP_CRRANGE - OP_CRMINRANGE - -All but the last two are just single-byte items. The others are followed by -four bytes of data, comprising the minimum and maximum repeat counts. There are -no special possessive opcodes for these repeats; a possessive repeat is -compiled into an atomic group. - - -Brackets and alternation ------------------------- - -A pair of non-capturing (round) brackets is wrapped round each expression at -compile time, so alternation always happens in the context of brackets. - -[Note for North Americans: "bracket" to some English speakers, including -myself, can be round, square, curly, or pointy. Hence this usage.] - -Non-capturing brackets use the opcode OP_BRA. Originally PCRE was limited to 99 -capturing brackets and it used a different opcode for each one. From release -3.5, the limit was removed by putting the bracket number into the data for -higher-numbered brackets. From release 7.0 all capturing brackets are handled -this way, using the single opcode OP_CBRA. - -A bracket opcode is followed by LINK_SIZE bytes which give the offset to the -next alternative OP_ALT or, if there aren't any branches, to the matching -OP_KET opcode. Each OP_ALT is followed by LINK_SIZE bytes giving the offset to -the next one, or to the OP_KET opcode. For capturing brackets, the bracket -number immediately follows the offset, always as a 2-byte item. - -OP_KET is used for subpatterns that do not repeat indefinitely, while -OP_KETRMIN and OP_KETRMAX are used for indefinite repetitions, minimally or -maximally respectively. All three are followed by LINK_SIZE bytes giving (as a -positive number) the offset back to the matching bracket opcode. - -If a subpattern is quantified such that it is permitted to match zero times, it -is preceded by one of OP_BRAZERO or OP_BRAMINZERO. These are single-byte -opcodes which tell the matcher that skipping this subpattern entirely is a -valid branch. - -A subpattern with an indefinite maximum repetition is replicated in the -compiled data its minimum number of times (or once with OP_BRAZERO if the -minimum is zero), with the final copy terminating with OP_KETRMIN or OP_KETRMAX -as appropriate. - -A subpattern with a bounded maximum repetition is replicated in a nested -fashion up to the maximum number of times, with OP_BRAZERO or OP_BRAMINZERO -before each replication after the minimum, so that, for example, (abc){2,5} is -compiled as (abc)(abc)((abc)((abc)(abc)?)?)?, except that each bracketed group -has the same number. - -When a repeated subpattern has an unbounded upper limit, it is checked to see -whether it could match an empty string. If this is the case, the opcode in the -final replication is changed to OP_SBRA or OP_SCBRA. This tells the matcher -that it needs to check for matching an empty string when it hits OP_KETRMIN or -OP_KETRMAX, and if so, to break the loop. - - -Assertions ----------- - -Forward assertions are just like other subpatterns, but starting with one of -the opcodes OP_ASSERT or OP_ASSERT_NOT. Backward assertions use the opcodes -OP_ASSERTBACK and OP_ASSERTBACK_NOT, and the first opcode inside the assertion -is OP_REVERSE, followed by a two byte count of the number of characters to move -back the pointer in the subject string. When operating in UTF-8 mode, the count -is a character count rather than a byte count. A separate count is present in -each alternative of a lookbehind assertion, allowing them to have different -fixed lengths. - - -Once-only (atomic) subpatterns ------------------------------- - -These are also just like other subpatterns, but they start with the opcode -OP_ONCE. The check for matching an empty string in an unbounded repeat is -handled entirely at runtime, so there is just this one opcode. - - -Conditional subpatterns ------------------------ - -These are like other subpatterns, but they start with the opcode OP_COND, or -OP_SCOND for one that might match an empty string in an unbounded repeat. If -the condition is a back reference, this is stored at the start of the -subpattern using the opcode OP_CREF followed by two bytes containing the -reference number. If the condition is "in recursion" (coded as "(?(R)"), or "in -recursion of group x" (coded as "(?(Rx)"), the group number is stored at the -start of the subpattern using the opcode OP_RREF, and a value of zero for "the -whole pattern". For a DEFINE condition, just the single byte OP_DEF is used (it -has no associated data). Otherwise, a conditional subpattern always starts with -one of the assertions. - - -Recursion ---------- - -Recursion either matches the current regex, or some subexpression. The opcode -OP_RECURSE is followed by an value which is the offset to the starting bracket -from the start of the whole pattern. From release 6.5, OP_RECURSE is -automatically wrapped inside OP_ONCE brackets (because otherwise some patterns -broke it). OP_RECURSE is also used for "subroutine" calls, even though they -are not strictly a recursion. - - -Callout -------- - -OP_CALLOUT is followed by one byte of data that holds a callout number in the -range 0 to 254 for manual callouts, or 255 for an automatic callout. In both -cases there follows a two-byte value giving the offset in the pattern to the -start of the following item, and another two-byte item giving the length of the -next item. - - -Changing options ----------------- - -If any of the /i, /m, or /s options are changed within a pattern, an OP_OPT -opcode is compiled, followed by one byte containing the new settings of these -flags. If there are several alternatives, there is an occurrence of OP_OPT at -the start of all those following the first options change, to set appropriate -options for the start of the alternative. Immediately after the end of the -group there is another such item to reset the flags to their previous values. A -change of flag right at the very start of the pattern can be handled entirely -at compile time, and so does not cause anything to be put into the compiled -data. - -Philip Hazel -August 2007 diff --git a/pcre-7.4/INSTALL b/pcre-7.4/INSTALL @@ -1,234 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - -Installation Names -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/pcre-7.4/LICENCE b/pcre-7.4/LICENCE @@ -1,68 +0,0 @@ -PCRE LICENCE ------------- - -PCRE is a library of functions to support regular expressions whose syntax -and semantics are as close as possible to those of the Perl 5 language. - -Release 7 of PCRE is distributed under the terms of the "BSD" licence, as -specified below. The documentation for PCRE, supplied in the "doc" -directory, is distributed under the same terms as the software itself. - -The basic library functions are written in C and are freestanding. Also -included in the distribution is a set of C++ wrapper functions. - - -THE BASIC LIBRARY FUNCTIONS ---------------------------- - -Written by: Philip Hazel -Email local part: ph10 -Email domain: cam.ac.uk - -University of Cambridge Computing Service, -Cambridge, England. - -Copyright (c) 1997-2007 University of Cambridge -All rights reserved. - - -THE C++ WRAPPER FUNCTIONS -------------------------- - -Contributed by: Google Inc. - -Copyright (c) 2007, Google Inc. -All rights reserved. - - -THE "BSD" LICENCE ------------------ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the University of Cambridge nor the name of Google - Inc. nor the names of their contributors may be used to endorse or - promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -End diff --git a/pcre-7.4/Makefile.am b/pcre-7.4/Makefile.am @@ -1,364 +0,0 @@ -## Process this file with automake to produce Makefile.in. - -dist_doc_DATA = \ - doc/pcre.txt \ - doc/pcre-config.txt \ - doc/pcregrep.txt \ - doc/pcretest.txt \ - AUTHORS \ - COPYING \ - ChangeLog \ - LICENCE \ - NEWS \ - README - -dist_html_DATA = \ - doc/html/index.html \ - doc/html/pcre.html \ - doc/html/pcre-config.html \ - doc/html/pcre_compile.html \ - doc/html/pcre_compile2.html \ - doc/html/pcre_config.html \ - doc/html/pcre_copy_named_substring.html \ - doc/html/pcre_copy_substring.html \ - doc/html/pcre_dfa_exec.html \ - doc/html/pcre_exec.html \ - doc/html/pcre_free_substring.html \ - doc/html/pcre_free_substring_list.html \ - doc/html/pcre_fullinfo.html \ - doc/html/pcre_get_named_substring.html \ - doc/html/pcre_get_stringnumber.html \ - doc/html/pcre_get_stringtable_entries.html \ - doc/html/pcre_get_substring.html \ - doc/html/pcre_get_substring_list.html \ - doc/html/pcre_info.html \ - doc/html/pcre_maketables.html \ - doc/html/pcre_refcount.html \ - doc/html/pcre_study.html \ - doc/html/pcre_version.html \ - doc/html/pcreapi.html \ - doc/html/pcrebuild.html \ - doc/html/pcrecallout.html \ - doc/html/pcrecompat.html \ - doc/html/pcregrep.html \ - doc/html/pcrematching.html \ - doc/html/pcrepartial.html \ - doc/html/pcrepattern.html \ - doc/html/pcreperform.html \ - doc/html/pcreposix.html \ - doc/html/pcreprecompile.html \ - doc/html/pcresample.html \ - doc/html/pcrestack.html \ - doc/html/pcresyntax.html \ - doc/html/pcretest.html - -pcrecpp_html = doc/html/pcrecpp.html -dist_noinst_DATA = $(pcrecpp_html) - -if WITH_PCRE_CPP -html_DATA = $(pcrecpp_html) -endif - -# The Libtool libraries to install. We'll add to this later. -lib_LTLIBRARIES = - -# Unit tests you want to run when people type 'make check'. -# TESTS is for binary unit tests, check_SCRIPTS for script-based tests -TESTS = -check_SCRIPTS = -dist_noinst_SCRIPTS = - -# Some of the binaries we make are to be installed, and others are -# (non-user-visible) helper programs needed to build libpcre. -bin_PROGRAMS = -noinst_PROGRAMS = - -# Additional files to delete on 'make clean' and 'make maintainer-clean'. -CLEANFILES = -MAINTAINERCLEANFILES = - -# Additional files to bundle with the distribution, over and above what -# the Autotools include by default. -EXTRA_DIST = - -# These files contain maintenance information -EXTRA_DIST += \ - doc/perltest.txt \ - NON-UNIX-USE \ - HACKING - -# These files are used in the preparation of a release -EXTRA_DIST += \ - PrepareRelease \ - CleanTxt \ - Detrail \ - 132html \ - doc/index.html.src - -# These files are to do with building for Virtual Pascal -EXTRA_DIST += \ - makevp.bat \ - makevp_c.txt \ - makevp_l.txt \ - pcregexp.pas - -# These files are usable versions of pcre.h and config.h that are distributed -# for the benefit of people who are building PCRE manually, without the -# Autotools support. -EXTRA_DIST += \ - pcre.h.generic \ - config.h.generic - -pcre.h.generic: configure.ac - rm -f $@ - cp -p pcre.h $@ - -MAINTAINERCLEANFILES += pcre.h.generic - -# These are the header files we'll install. We do not distribute pcre.h because -# it is generated from pcre.h.in. -nodist_include_HEADERS = \ - pcre.h -include_HEADERS = \ - pcreposix.h - -# These additional headers will be be installed if C++ support is enabled. We -# do not distribute pcrecpparg.h or pcre_stringpiece.h, as these are generated -# from corresponding .h.in files (which we do distribute). -if WITH_PCRE_CPP -nodist_include_HEADERS += \ - pcrecpparg.h \ - pcre_stringpiece.h -include_HEADERS += \ - pcrecpp.h \ - pcre_scanner.h -endif # WITH_PCRE_CPP - -bin_SCRIPTS = pcre-config - -## --------------------------------------------------------------- -## The dftables program is used to rebuild character tables before compiling -## PCRE, if --enable-rebuild-chartables is specified. It is not a user-visible -## program. The default (when --enable-rebuild-chartables is not specified) is -## to copy a distributed set of tables that are defined for ASCII code. In this -## case, dftables is not needed. - -if WITH_REBUILD_CHARTABLES - -noinst_PROGRAMS += dftables -dftables_SOURCES = dftables.c - -pcre_chartables.c: dftables$(EXEEXT) - ./dftables$(EXEEXT) $@ -else - -pcre_chartables.c: $(srcdir)/pcre_chartables.c.dist - rm -f $@ - $(LN_S) $(srcdir)/pcre_chartables.c.dist $@ - -endif # WITH_REBUILD_CHARTABLES - - -## The main pcre library -lib_LTLIBRARIES += libpcre.la -libpcre_la_SOURCES = \ - pcre_compile.c \ - pcre_config.c \ - pcre_dfa_exec.c \ - pcre_exec.c \ - pcre_fullinfo.c \ - pcre_get.c \ - pcre_globals.c \ - pcre_info.c \ - pcre_internal.h \ - pcre_maketables.c \ - pcre_newline.c \ - pcre_ord2utf8.c \ - pcre_refcount.c \ - pcre_study.c \ - pcre_tables.c \ - pcre_try_flipped.c \ - pcre_ucp_searchfuncs.c \ - pcre_valid_utf8.c \ - pcre_version.c \ - pcre_xclass.c \ - ucp.h \ - ucpinternal.h \ - ucptable.h - -## This file is generated as part of the building process, so don't distribute. -nodist_libpcre_la_SOURCES = \ - pcre_chartables.c - -# The pcre_printint.src file is #included by some source files, so it must be -# distributed. The pcre_chartables.c.dist file is the default version of -# pcre_chartables.c, used unless --enable-rebuild-chartables is specified. -EXTRA_DIST += pcre_printint.src pcre_chartables.c.dist - -libpcre_la_LDFLAGS = $(EXTRA_LIBPCRE_LDFLAGS) - -CLEANFILES += pcre_chartables.c - -## A version of the main pcre library that has a posix re API. -lib_LTLIBRARIES += libpcreposix.la -libpcreposix_la_SOURCES = \ - pcreposix.c -libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS) -libpcreposix_la_LIBADD = libpcre.la - -## There's a C++ library as well. -if WITH_PCRE_CPP - -lib_LTLIBRARIES += libpcrecpp.la -libpcrecpp_la_SOURCES = \ - pcrecpp_internal.h \ - pcrecpp.cc \ - pcre_scanner.cc \ - pcre_stringpiece.cc -libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS) -libpcrecpp_la_LIBADD = libpcre.la - -TESTS += pcrecpp_unittest -noinst_PROGRAMS += pcrecpp_unittest -pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc -pcrecpp_unittest_LDADD = libpcrecpp.la - -TESTS += pcre_scanner_unittest -noinst_PROGRAMS += pcre_scanner_unittest -pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc -pcre_scanner_unittest_LDADD = libpcrecpp.la - -TESTS += pcre_stringpiece_unittest -noinst_PROGRAMS += pcre_stringpiece_unittest -pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc -pcre_stringpiece_unittest_LDADD = libpcrecpp.la - -endif # WITH_PCRE_CPP - -## The main unit tests - -# Each unit test is a binary plus a script that runs that binary in various -# ways. We install these test binaries in case folks find it helpful. - -TESTS += RunTest -dist_noinst_SCRIPTS += RunTest -EXTRA_DIST += RunTest.bat -bin_PROGRAMS += pcretest -pcretest_SOURCES = pcretest.c -pcretest_LDADD = libpcreposix.la - -TESTS += RunGrepTest -dist_noinst_SCRIPTS += RunGrepTest -bin_PROGRAMS += pcregrep -pcregrep_SOURCES = pcregrep.c -pcregrep_LDADD = libpcreposix.la - -EXTRA_DIST += \ - testdata/grepinput \ - testdata/grepinput8 \ - testdata/grepinputv \ - testdata/grepinputx \ - testdata/greplist \ - testdata/grepoutput \ - testdata/grepoutput8 \ - testdata/grepoutputN \ - testdata/testinput1 \ - testdata/testinput2 \ - testdata/testinput3 \ - testdata/testinput4 \ - testdata/testinput5 \ - testdata/testinput6 \ - testdata/testinput7 \ - testdata/testinput8 \ - testdata/testinput9 \ - testdata/testinput10 \ - testdata/testoutput1 \ - testdata/testoutput2 \ - testdata/testoutput3 \ - testdata/testoutput4 \ - testdata/testoutput5 \ - testdata/testoutput6 \ - testdata/testoutput7 \ - testdata/testoutput8 \ - testdata/testoutput9 \ - testdata/testoutput10 \ - testdata/wintestinput3 \ - testdata/wintestoutput3 \ - perltest.pl - -CLEANFILES += \ - testsavedregex \ - teststderr \ - testtry \ - testNinput - -# PCRE demonstration program -noinst_PROGRAMS += pcredemo -pcredemo_SOURCES = pcredemo.c -pcredemo_LDADD = libpcre.la - -## Utility rules, documentation, etc. - -# A compatibility line, the old build system worked with 'make test' -test: check ; - -# We have .pc files for pkg-config users. -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libpcre.pc -if WITH_PCRE_CPP -pkgconfig_DATA += libpcrecpp.pc -endif - -dist_man_MANS = \ - doc/pcre.3 \ - doc/pcre-config.1 \ - doc/pcre_compile.3 \ - doc/pcre_compile2.3 \ - doc/pcre_config.3 \ - doc/pcre_copy_named_substring.3 \ - doc/pcre_copy_substring.3 \ - doc/pcre_dfa_exec.3 \ - doc/pcre_exec.3 \ - doc/pcre_free_substring.3 \ - doc/pcre_free_substring_list.3 \ - doc/pcre_fullinfo.3 \ - doc/pcre_get_named_substring.3 \ - doc/pcre_get_stringnumber.3 \ - doc/pcre_get_stringtable_entries.3 \ - doc/pcre_get_substring.3 \ - doc/pcre_get_substring_list.3 \ - doc/pcre_info.3 \ - doc/pcre_maketables.3 \ - doc/pcre_refcount.3 \ - doc/pcre_study.3 \ - doc/pcre_version.3 \ - doc/pcreapi.3 \ - doc/pcrebuild.3 \ - doc/pcrecallout.3 \ - doc/pcrecompat.3 \ - doc/pcregrep.1 \ - doc/pcrematching.3 \ - doc/pcrepartial.3 \ - doc/pcrepattern.3 \ - doc/pcreperform.3 \ - doc/pcreposix.3 \ - doc/pcreprecompile.3 \ - doc/pcresample.3 \ - doc/pcrestack.3 \ - doc/pcresyntax.3 \ - doc/pcretest.1 - -pcrecpp_man = doc/pcrecpp.3 -EXTRA_DIST += $(pcrecpp_man) - -if WITH_PCRE_CPP -man_MANS = $(pcrecpp_man) -endif - -## CMake support - -EXTRA_DIST += \ - CMakeLists.txt \ - config-cmake.h.in - -## end Makefile.am diff --git a/pcre-7.4/Makefile.in b/pcre-7.4/Makefile.in @@ -1,1410 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -TESTS = $(am__EXEEXT_2) RunTest RunGrepTest -bin_PROGRAMS = pcretest$(EXEEXT) pcregrep$(EXEEXT) -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) pcredemo$(EXEEXT) - -# These additional headers will be be installed if C++ support is enabled. We -# do not distribute pcrecpparg.h or pcre_stringpiece.h, as these are generated -# from corresponding .h.in files (which we do distribute). -@WITH_PCRE_CPP_TRUE@am__append_1 = \ -@WITH_PCRE_CPP_TRUE@ pcrecpparg.h \ -@WITH_PCRE_CPP_TRUE@ pcre_stringpiece.h - -@WITH_PCRE_CPP_TRUE@am__append_2 = \ -@WITH_PCRE_CPP_TRUE@ pcrecpp.h \ -@WITH_PCRE_CPP_TRUE@ pcre_scanner.h - -@WITH_REBUILD_CHARTABLES_TRUE@am__append_3 = dftables -@WITH_PCRE_CPP_TRUE@am__append_4 = libpcrecpp.la -@WITH_PCRE_CPP_TRUE@am__append_5 = pcrecpp_unittest \ -@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest \ -@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest -@WITH_PCRE_CPP_TRUE@am__append_6 = pcrecpp_unittest \ -@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest \ -@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest -@WITH_PCRE_CPP_TRUE@am__append_7 = libpcrecpp.pc -subdir = . -DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \ - $(dist_doc_DATA) $(dist_html_DATA) $(dist_man_MANS) \ - $(dist_noinst_DATA) $(dist_noinst_SCRIPTS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/libpcre.pc.in \ - $(srcdir)/libpcrecpp.pc.in $(srcdir)/pcre-config.in \ - $(srcdir)/pcre.h.in $(srcdir)/pcre_stringpiece.h.in \ - $(srcdir)/pcrecpparg.h.in $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ - install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libpcre.pc libpcrecpp.pc pcre-config pcre.h \ - pcre_stringpiece.h pcrecpparg.h -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(docdir)" \ - "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)" \ - "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \ - "$(DESTDIR)$(includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libpcre_la_LIBADD = -am_libpcre_la_OBJECTS = pcre_compile.lo pcre_config.lo \ - pcre_dfa_exec.lo pcre_exec.lo pcre_fullinfo.lo pcre_get.lo \ - pcre_globals.lo pcre_info.lo pcre_maketables.lo \ - pcre_newline.lo pcre_ord2utf8.lo pcre_refcount.lo \ - pcre_study.lo pcre_tables.lo pcre_try_flipped.lo \ - pcre_ucp_searchfuncs.lo pcre_valid_utf8.lo pcre_version.lo \ - pcre_xclass.lo -nodist_libpcre_la_OBJECTS = pcre_chartables.lo -libpcre_la_OBJECTS = $(am_libpcre_la_OBJECTS) \ - $(nodist_libpcre_la_OBJECTS) -libpcre_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpcre_la_LDFLAGS) $(LDFLAGS) -o $@ -@WITH_PCRE_CPP_TRUE@libpcrecpp_la_DEPENDENCIES = libpcre.la -am__libpcrecpp_la_SOURCES_DIST = pcrecpp_internal.h pcrecpp.cc \ - pcre_scanner.cc pcre_stringpiece.cc -@WITH_PCRE_CPP_TRUE@am_libpcrecpp_la_OBJECTS = pcrecpp.lo \ -@WITH_PCRE_CPP_TRUE@ pcre_scanner.lo pcre_stringpiece.lo -libpcrecpp_la_OBJECTS = $(am_libpcrecpp_la_OBJECTS) -libpcrecpp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libpcrecpp_la_LDFLAGS) $(LDFLAGS) -o $@ -@WITH_PCRE_CPP_TRUE@am_libpcrecpp_la_rpath = -rpath $(libdir) -libpcreposix_la_DEPENDENCIES = libpcre.la -am_libpcreposix_la_OBJECTS = pcreposix.lo -libpcreposix_la_OBJECTS = $(am_libpcreposix_la_OBJECTS) -libpcreposix_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpcreposix_la_LDFLAGS) $(LDFLAGS) -o $@ -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -@WITH_REBUILD_CHARTABLES_TRUE@am__EXEEXT_1 = dftables$(EXEEXT) -@WITH_PCRE_CPP_TRUE@am__EXEEXT_2 = pcrecpp_unittest$(EXEEXT) \ -@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest$(EXEEXT) \ -@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -am__dftables_SOURCES_DIST = dftables.c -@WITH_REBUILD_CHARTABLES_TRUE@am_dftables_OBJECTS = \ -@WITH_REBUILD_CHARTABLES_TRUE@ dftables.$(OBJEXT) -dftables_OBJECTS = $(am_dftables_OBJECTS) -dftables_LDADD = $(LDADD) -am__pcre_scanner_unittest_SOURCES_DIST = pcre_scanner_unittest.cc -@WITH_PCRE_CPP_TRUE@am_pcre_scanner_unittest_OBJECTS = \ -@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest.$(OBJEXT) -pcre_scanner_unittest_OBJECTS = $(am_pcre_scanner_unittest_OBJECTS) -@WITH_PCRE_CPP_TRUE@pcre_scanner_unittest_DEPENDENCIES = \ -@WITH_PCRE_CPP_TRUE@ libpcrecpp.la -am__pcre_stringpiece_unittest_SOURCES_DIST = \ - pcre_stringpiece_unittest.cc -@WITH_PCRE_CPP_TRUE@am_pcre_stringpiece_unittest_OBJECTS = \ -@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest.$(OBJEXT) -pcre_stringpiece_unittest_OBJECTS = \ - $(am_pcre_stringpiece_unittest_OBJECTS) -@WITH_PCRE_CPP_TRUE@pcre_stringpiece_unittest_DEPENDENCIES = \ -@WITH_PCRE_CPP_TRUE@ libpcrecpp.la -am__pcrecpp_unittest_SOURCES_DIST = pcrecpp_unittest.cc -@WITH_PCRE_CPP_TRUE@am_pcrecpp_unittest_OBJECTS = \ -@WITH_PCRE_CPP_TRUE@ pcrecpp_unittest.$(OBJEXT) -pcrecpp_unittest_OBJECTS = $(am_pcrecpp_unittest_OBJECTS) -@WITH_PCRE_CPP_TRUE@pcrecpp_unittest_DEPENDENCIES = libpcrecpp.la -am_pcredemo_OBJECTS = pcredemo.$(OBJEXT) -pcredemo_OBJECTS = $(am_pcredemo_OBJECTS) -pcredemo_DEPENDENCIES = libpcre.la -am_pcregrep_OBJECTS = pcregrep.$(OBJEXT) -pcregrep_OBJECTS = $(am_pcregrep_OBJECTS) -pcregrep_DEPENDENCIES = libpcreposix.la -am_pcretest_OBJECTS = pcretest.$(OBJEXT) -pcretest_OBJECTS = $(am_pcretest_OBJECTS) -pcretest_DEPENDENCIES = libpcreposix.la -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(bin_SCRIPTS) $(dist_noinst_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libpcre_la_SOURCES) $(nodist_libpcre_la_SOURCES) \ - $(libpcrecpp_la_SOURCES) $(libpcreposix_la_SOURCES) \ - $(dftables_SOURCES) $(pcre_scanner_unittest_SOURCES) \ - $(pcre_stringpiece_unittest_SOURCES) \ - $(pcrecpp_unittest_SOURCES) $(pcredemo_SOURCES) \ - $(pcregrep_SOURCES) $(pcretest_SOURCES) -DIST_SOURCES = $(libpcre_la_SOURCES) $(am__libpcrecpp_la_SOURCES_DIST) \ - $(libpcreposix_la_SOURCES) $(am__dftables_SOURCES_DIST) \ - $(am__pcre_scanner_unittest_SOURCES_DIST) \ - $(am__pcre_stringpiece_unittest_SOURCES_DIST) \ - $(am__pcrecpp_unittest_SOURCES_DIST) $(pcredemo_SOURCES) \ - $(pcregrep_SOURCES) $(pcretest_SOURCES) -man1dir = $(mandir)/man1 -man3dir = $(mandir)/man3 -NROFF = nroff -MANS = $(dist_man_MANS) $(man_MANS) -dist_docDATA_INSTALL = $(INSTALL_DATA) -dist_htmlDATA_INSTALL = $(INSTALL_DATA) -htmlDATA_INSTALL = $(INSTALL_DATA) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(dist_doc_DATA) $(dist_html_DATA) $(dist_noinst_DATA) \ - $(html_DATA) $(pkgconfig_DATA) -am__include_HEADERS_DIST = pcreposix.h pcrecpp.h pcre_scanner.h -includeHEADERS_INSTALL = $(INSTALL_HEADER) -nodist_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ -DLLTOOL = @DLLTOOL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBPCRECPP_LDFLAGS = @EXTRA_LIBPCRECPP_LDFLAGS@ -EXTRA_LIBPCREPOSIX_LDFLAGS = @EXTRA_LIBPCREPOSIX_LDFLAGS@ -EXTRA_LIBPCRE_LDFLAGS = @EXTRA_LIBPCRE_LDFLAGS@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCRE_DATE = @PCRE_DATE@ -PCRE_MAJOR = @PCRE_MAJOR@ -PCRE_MINOR = @PCRE_MINOR@ -PCRE_PRERELEASE = @PCRE_PRERELEASE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pcre_have_bits_type_traits = @pcre_have_bits_type_traits@ -pcre_have_long_long = @pcre_have_long_long@ -pcre_have_type_traits = @pcre_have_type_traits@ -pcre_have_ulong_long = @pcre_have_ulong_long@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -dist_doc_DATA = \ - doc/pcre.txt \ - doc/pcre-config.txt \ - doc/pcregrep.txt \ - doc/pcretest.txt \ - AUTHORS \ - COPYING \ - ChangeLog \ - LICENCE \ - NEWS \ - README - -dist_html_DATA = \ - doc/html/index.html \ - doc/html/pcre.html \ - doc/html/pcre-config.html \ - doc/html/pcre_compile.html \ - doc/html/pcre_compile2.html \ - doc/html/pcre_config.html \ - doc/html/pcre_copy_named_substring.html \ - doc/html/pcre_copy_substring.html \ - doc/html/pcre_dfa_exec.html \ - doc/html/pcre_exec.html \ - doc/html/pcre_free_substring.html \ - doc/html/pcre_free_substring_list.html \ - doc/html/pcre_fullinfo.html \ - doc/html/pcre_get_named_substring.html \ - doc/html/pcre_get_stringnumber.html \ - doc/html/pcre_get_stringtable_entries.html \ - doc/html/pcre_get_substring.html \ - doc/html/pcre_get_substring_list.html \ - doc/html/pcre_info.html \ - doc/html/pcre_maketables.html \ - doc/html/pcre_refcount.html \ - doc/html/pcre_study.html \ - doc/html/pcre_version.html \ - doc/html/pcreapi.html \ - doc/html/pcrebuild.html \ - doc/html/pcrecallout.html \ - doc/html/pcrecompat.html \ - doc/html/pcregrep.html \ - doc/html/pcrematching.html \ - doc/html/pcrepartial.html \ - doc/html/pcrepattern.html \ - doc/html/pcreperform.html \ - doc/html/pcreposix.html \ - doc/html/pcreprecompile.html \ - doc/html/pcresample.html \ - doc/html/pcrestack.html \ - doc/html/pcresyntax.html \ - doc/html/pcretest.html - -pcrecpp_html = doc/html/pcrecpp.html -dist_noinst_DATA = $(pcrecpp_html) -@WITH_PCRE_CPP_TRUE@html_DATA = $(pcrecpp_html) - -# The Libtool libraries to install. We'll add to this later. -lib_LTLIBRARIES = libpcre.la libpcreposix.la $(am__append_4) -check_SCRIPTS = -dist_noinst_SCRIPTS = RunTest RunGrepTest - -# Additional files to delete on 'make clean' and 'make maintainer-clean'. -CLEANFILES = pcre_chartables.c testsavedregex teststderr testtry \ - testNinput -MAINTAINERCLEANFILES = pcre.h.generic - -# Additional files to bundle with the distribution, over and above what -# the Autotools include by default. - -# These files contain maintenance information - -# These files are used in the preparation of a release - -# These files are to do with building for Virtual Pascal - -# These files are usable versions of pcre.h and config.h that are distributed -# for the benefit of people who are building PCRE manually, without the -# Autotools support. - -# The pcre_printint.src file is #included by some source files, so it must be -# distributed. The pcre_chartables.c.dist file is the default version of -# pcre_chartables.c, used unless --enable-rebuild-chartables is specified. -EXTRA_DIST = doc/perltest.txt NON-UNIX-USE HACKING PrepareRelease \ - CleanTxt Detrail 132html doc/index.html.src makevp.bat \ - makevp_c.txt makevp_l.txt pcregexp.pas pcre.h.generic \ - config.h.generic pcre_printint.src pcre_chartables.c.dist \ - RunTest.bat testdata/grepinput testdata/grepinput8 \ - testdata/grepinputv testdata/grepinputx testdata/greplist \ - testdata/grepoutput testdata/grepoutput8 testdata/grepoutputN \ - testdata/testinput1 testdata/testinput2 testdata/testinput3 \ - testdata/testinput4 testdata/testinput5 testdata/testinput6 \ - testdata/testinput7 testdata/testinput8 testdata/testinput9 \ - testdata/testinput10 testdata/testoutput1 testdata/testoutput2 \ - testdata/testoutput3 testdata/testoutput4 testdata/testoutput5 \ - testdata/testoutput6 testdata/testoutput7 testdata/testoutput8 \ - testdata/testoutput9 testdata/testoutput10 \ - testdata/wintestinput3 testdata/wintestoutput3 perltest.pl \ - $(pcrecpp_man) CMakeLists.txt config-cmake.h.in - -# These are the header files we'll install. We do not distribute pcre.h because -# it is generated from pcre.h.in. -nodist_include_HEADERS = pcre.h $(am__append_1) -include_HEADERS = pcreposix.h $(am__append_2) -bin_SCRIPTS = pcre-config -@WITH_REBUILD_CHARTABLES_TRUE@dftables_SOURCES = dftables.c -libpcre_la_SOURCES = \ - pcre_compile.c \ - pcre_config.c \ - pcre_dfa_exec.c \ - pcre_exec.c \ - pcre_fullinfo.c \ - pcre_get.c \ - pcre_globals.c \ - pcre_info.c \ - pcre_internal.h \ - pcre_maketables.c \ - pcre_newline.c \ - pcre_ord2utf8.c \ - pcre_refcount.c \ - pcre_study.c \ - pcre_tables.c \ - pcre_try_flipped.c \ - pcre_ucp_searchfuncs.c \ - pcre_valid_utf8.c \ - pcre_version.c \ - pcre_xclass.c \ - ucp.h \ - ucpinternal.h \ - ucptable.h - -nodist_libpcre_la_SOURCES = \ - pcre_chartables.c - -libpcre_la_LDFLAGS = $(EXTRA_LIBPCRE_LDFLAGS) -libpcreposix_la_SOURCES = \ - pcreposix.c - -libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS) -libpcreposix_la_LIBADD = libpcre.la -@WITH_PCRE_CPP_TRUE@libpcrecpp_la_SOURCES = \ -@WITH_PCRE_CPP_TRUE@ pcrecpp_internal.h \ -@WITH_PCRE_CPP_TRUE@ pcrecpp.cc \ -@WITH_PCRE_CPP_TRUE@ pcre_scanner.cc \ -@WITH_PCRE_CPP_TRUE@ pcre_stringpiece.cc - -@WITH_PCRE_CPP_TRUE@libpcrecpp_la_LDFLAGS = $(EXTRA_LIBPCRECPP_LDFLAGS) -@WITH_PCRE_CPP_TRUE@libpcrecpp_la_LIBADD = libpcre.la -@WITH_PCRE_CPP_TRUE@pcrecpp_unittest_SOURCES = pcrecpp_unittest.cc -@WITH_PCRE_CPP_TRUE@pcrecpp_unittest_LDADD = libpcrecpp.la -@WITH_PCRE_CPP_TRUE@pcre_scanner_unittest_SOURCES = pcre_scanner_unittest.cc -@WITH_PCRE_CPP_TRUE@pcre_scanner_unittest_LDADD = libpcrecpp.la -@WITH_PCRE_CPP_TRUE@pcre_stringpiece_unittest_SOURCES = pcre_stringpiece_unittest.cc -@WITH_PCRE_CPP_TRUE@pcre_stringpiece_unittest_LDADD = libpcrecpp.la -pcretest_SOURCES = pcretest.c -pcretest_LDADD = libpcreposix.la -pcregrep_SOURCES = pcregrep.c -pcregrep_LDADD = libpcreposix.la -pcredemo_SOURCES = pcredemo.c -pcredemo_LDADD = libpcre.la - -# We have .pc files for pkg-config users. -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libpcre.pc $(am__append_7) -dist_man_MANS = \ - doc/pcre.3 \ - doc/pcre-config.1 \ - doc/pcre_compile.3 \ - doc/pcre_compile2.3 \ - doc/pcre_config.3 \ - doc/pcre_copy_named_substring.3 \ - doc/pcre_copy_substring.3 \ - doc/pcre_dfa_exec.3 \ - doc/pcre_exec.3 \ - doc/pcre_free_substring.3 \ - doc/pcre_free_substring_list.3 \ - doc/pcre_fullinfo.3 \ - doc/pcre_get_named_substring.3 \ - doc/pcre_get_stringnumber.3 \ - doc/pcre_get_stringtable_entries.3 \ - doc/pcre_get_substring.3 \ - doc/pcre_get_substring_list.3 \ - doc/pcre_info.3 \ - doc/pcre_maketables.3 \ - doc/pcre_refcount.3 \ - doc/pcre_study.3 \ - doc/pcre_version.3 \ - doc/pcreapi.3 \ - doc/pcrebuild.3 \ - doc/pcrecallout.3 \ - doc/pcrecompat.3 \ - doc/pcregrep.1 \ - doc/pcrematching.3 \ - doc/pcrepartial.3 \ - doc/pcrepattern.3 \ - doc/pcreperform.3 \ - doc/pcreposix.3 \ - doc/pcreprecompile.3 \ - doc/pcresample.3 \ - doc/pcrestack.3 \ - doc/pcresyntax.3 \ - doc/pcretest.1 - -pcrecpp_man = doc/pcrecpp.3 -@WITH_PCRE_CPP_TRUE@man_MANS = $(pcrecpp_man) -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .cc .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -libpcre.pc: $(top_builddir)/config.status $(srcdir)/libpcre.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -libpcrecpp.pc: $(top_builddir)/config.status $(srcdir)/libpcrecpp.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -pcre-config: $(top_builddir)/config.status $(srcdir)/pcre-config.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -pcre.h: $(top_builddir)/config.status $(srcdir)/pcre.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -pcre_stringpiece.h: $(top_builddir)/config.status $(srcdir)/pcre_stringpiece.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -pcrecpparg.h: $(top_builddir)/config.status $(srcdir)/pcrecpparg.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libpcre.la: $(libpcre_la_OBJECTS) $(libpcre_la_DEPENDENCIES) - $(libpcre_la_LINK) -rpath $(libdir) $(libpcre_la_OBJECTS) $(libpcre_la_LIBADD) $(LIBS) -libpcrecpp.la: $(libpcrecpp_la_OBJECTS) $(libpcrecpp_la_DEPENDENCIES) - $(libpcrecpp_la_LINK) $(am_libpcrecpp_la_rpath) $(libpcrecpp_la_OBJECTS) $(libpcrecpp_la_LIBADD) $(LIBS) -libpcreposix.la: $(libpcreposix_la_OBJECTS) $(libpcreposix_la_DEPENDENCIES) - $(libpcreposix_la_LINK) -rpath $(libdir) $(libpcreposix_la_OBJECTS) $(libpcreposix_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -dftables$(EXEEXT): $(dftables_OBJECTS) $(dftables_DEPENDENCIES) - @rm -f dftables$(EXEEXT) - $(LINK) $(dftables_OBJECTS) $(dftables_LDADD) $(LIBS) -pcre_scanner_unittest$(EXEEXT): $(pcre_scanner_unittest_OBJECTS) $(pcre_scanner_unittest_DEPENDENCIES) - @rm -f pcre_scanner_unittest$(EXEEXT) - $(CXXLINK) $(pcre_scanner_unittest_OBJECTS) $(pcre_scanner_unittest_LDADD) $(LIBS) -pcre_stringpiece_unittest$(EXEEXT): $(pcre_stringpiece_unittest_OBJECTS) $(pcre_stringpiece_unittest_DEPENDENCIES) - @rm -f pcre_stringpiece_unittest$(EXEEXT) - $(CXXLINK) $(pcre_stringpiece_unittest_OBJECTS) $(pcre_stringpiece_unittest_LDADD) $(LIBS) -pcrecpp_unittest$(EXEEXT): $(pcrecpp_unittest_OBJECTS) $(pcrecpp_unittest_DEPENDENCIES) - @rm -f pcrecpp_unittest$(EXEEXT) - $(CXXLINK) $(pcrecpp_unittest_OBJECTS) $(pcrecpp_unittest_LDADD) $(LIBS) -pcredemo$(EXEEXT): $(pcredemo_OBJECTS) $(pcredemo_DEPENDENCIES) - @rm -f pcredemo$(EXEEXT) - $(LINK) $(pcredemo_OBJECTS) $(pcredemo_LDADD) $(LIBS) -pcregrep$(EXEEXT): $(pcregrep_OBJECTS) $(pcregrep_DEPENDENCIES) - @rm -f pcregrep$(EXEEXT) - $(LINK) $(pcregrep_OBJECTS) $(pcregrep_LDADD) $(LIBS) -pcretest$(EXEEXT): $(pcretest_OBJECTS) $(pcretest_DEPENDENCIES) - @rm -f pcretest$(EXEEXT) - $(LINK) $(pcretest_OBJECTS) $(pcretest_LDADD) $(LIBS) -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dftables.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_chartables.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_compile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_dfa_exec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_exec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_fullinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_get.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_globals.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_info.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_maketables.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_newline.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_ord2utf8.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_refcount.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_scanner.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_scanner_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_stringpiece.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_stringpiece_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_study.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_tables.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_try_flipped.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_ucp_searchfuncs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_valid_utf8.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcre_xclass.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcrecpp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcrecpp_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcredemo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcregrep.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcreposix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcretest.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -install-man1: $(man1_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done -install-man3: $(man3_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ - done -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ - done -install-dist_docDATA: $(dist_doc_DATA) - @$(NORMAL_INSTALL) - test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" - @list='$(dist_doc_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ - $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ - done - -uninstall-dist_docDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_doc_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ - rm -f "$(DESTDIR)$(docdir)/$$f"; \ - done -install-dist_htmlDATA: $(dist_html_DATA) - @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(dist_html_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_htmlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ - $(dist_htmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ - done - -uninstall-dist_htmlDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_html_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(htmldir)/$$f'"; \ - rm -f "$(DESTDIR)$(htmldir)/$$f"; \ - done -install-htmlDATA: $(html_DATA) - @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(html_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(htmlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ - $(htmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ - done - -uninstall-htmlDATA: - @$(NORMAL_UNINSTALL) - @list='$(html_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(htmldir)/$$f'"; \ - rm -f "$(DESTDIR)$(htmldir)/$$f"; \ - done -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done -install-nodist_includeHEADERS: $(nodist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(nodist_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(nodist_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(nodist_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-nodist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ - ;; \ - *) \ - echo "PASS: $$tst"; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - echo "SKIP: $$tst"; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ - else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ - else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - skipped="($$skip tests were not run)"; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ - $(HEADERS) config.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-dist_docDATA install-dist_htmlDATA \ - install-htmlDATA install-includeHEADERS install-man \ - install-nodist_includeHEADERS install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS install-binSCRIPTS \ - install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: install-man1 install-man3 - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-dist_docDATA uninstall-dist_htmlDATA \ - uninstall-htmlDATA uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-man \ - uninstall-nodist_includeHEADERS uninstall-pkgconfigDATA - -uninstall-man: uninstall-man1 uninstall-man3 - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ - clean clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstPROGRAMS ctags dist dist-all \ - dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-binSCRIPTS \ - install-data install-data-am install-dist_docDATA \ - install-dist_htmlDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-htmlDATA \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man install-man1 install-man3 \ - install-nodist_includeHEADERS install-pdf install-pdf-am \ - install-pkgconfigDATA install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-dist_docDATA \ - uninstall-dist_htmlDATA uninstall-htmlDATA \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-man uninstall-man1 uninstall-man3 \ - uninstall-nodist_includeHEADERS uninstall-pkgconfigDATA - - -pcre.h.generic: configure.ac - rm -f $@ - cp -p pcre.h $@ - -@WITH_REBUILD_CHARTABLES_TRUE@pcre_chartables.c: dftables$(EXEEXT) -@WITH_REBUILD_CHARTABLES_TRUE@ ./dftables$(EXEEXT) $@ - -@WITH_REBUILD_CHARTABLES_FALSE@pcre_chartables.c: $(srcdir)/pcre_chartables.c.dist -@WITH_REBUILD_CHARTABLES_FALSE@ rm -f $@ -@WITH_REBUILD_CHARTABLES_FALSE@ $(LN_S) $(srcdir)/pcre_chartables.c.dist $@ - -# A compatibility line, the old build system worked with 'make test' -test: check ; -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/pcre-7.4/NEWS b/pcre-7.4/NEWS @@ -1,392 +0,0 @@ -News about PCRE releases ------------------------- - - -Release 7.4 21-Sep-07 ---------------------- - -The only change of specification is the addition of options to control whether -\R matches any Unicode line ending (the default) or just CR, LF, and CRLF. -Otherwise, the changes are bug fixes and a refactoring to reduce the number of -relocations needed in a shared library. There have also been some documentation -updates, in particular, some more information about using CMake to build PCRE -has been added to the NON-UNIX-USE file. - - -Release 7.3 28-Aug-07 ---------------------- - -Most changes are bug fixes. Some that are not: - -1. There is some support for Perl 5.10's experimental "backtracking control - verbs" such as (*PRUNE). - -2. UTF-8 checking is now as per RFC 3629 instead of RFC 2279; this is more - restrictive in the strings it accepts. - -3. Checking for potential integer overflow has been made more dynamic, and as a - consequence there is no longer a hard limit on the size of a subpattern that - has a limited repeat count. - -4. When CRLF is a valid line-ending sequence, pcre_exec() and pcre_dfa_exec() - no longer advance by two characters instead of one when an unanchored match - fails at CRLF if there are explicit CR or LF matches within the pattern. - This gets rid of some anomalous effects that previously occurred. - -5. Some PCRE-specific settings for varying the newline options at the start of - a pattern have been added. - - -Release 7.2 19-Jun-07 ---------------------- - -WARNING: saved patterns that were compiled by earlier versions of PCRE must be -recompiled for use with 7.2 (necessitated by the addition of \K, \h, \H, \v, -and \V). - -Correction to the notes for 7.1: the note about shared libraries for Windows is -wrong. Previously, three libraries were built, but each could function -independently. For example, the pcreposix library also included all the -functions from the basic pcre library. The change is that the three libraries -are no longer independent. They are like the Unix libraries. To use the -pcreposix functions, for example, you need to link with both the pcreposix and -the basic pcre library. - -Some more features from Perl 5.10 have been added: - - (?-n) and (?+n) relative references for recursion and subroutines. - - (?(-n) and (?(+n) relative references as conditions. - - \k{name} and \g{name} are synonyms for \k<name>. - - \K to reset the start of the matched string; for example, (foo)\Kbar - matches bar preceded by foo, but only sets bar as the matched string. - - (?| introduces a group where the capturing parentheses in each alternative - start from the same number; for example, (?|(abc)|(xyz)) sets capturing - parentheses number 1 in both cases. - - \h, \H, \v, \V match horizontal and vertical whitespace, respectively. - - -Release 7.1 24-Apr-07 ---------------------- - -There is only one new feature in this release: a linebreak setting of -PCRE_NEWLINE_ANYCRLF. It is a cut-down version of PCRE_NEWLINE_ANY, which -recognizes only CRLF, CR, and LF as linebreaks. - -A few bugs are fixed (see ChangeLog for details), but the major change is a -complete re-implementation of the build system. This now has full Autotools -support and so is now "standard" in some sense. It should help with compiling -PCRE in a wide variety of environments. - -NOTE: when building shared libraries for Windows, three dlls are now built, -called libpcre, libpcreposix, and libpcrecpp. Previously, everything was -included in a single dll. - -Another important change is that the dftables auxiliary program is no longer -compiled and run at "make" time by default. Instead, a default set of character -tables (assuming ASCII coding) is used. If you want to use dftables to generate -the character tables as previously, add --enable-rebuild-chartables to the -"configure" command. You must do this if you are compiling PCRE to run on a -system that uses EBCDIC code. - -There is a discussion about character tables in the README file. The default is -not to use dftables so that that there is no problem when cross-compiling. - - -Release 7.0 19-Dec-06 ---------------------- - -This release has a new major number because there have been some internal -upheavals to facilitate the addition of new optimizations and other facilities, -and to make subsequent maintenance and extension easier. Compilation is likely -to be a bit slower, but there should be no major effect on runtime performance. -Previously compiled patterns are NOT upwards compatible with this release. If -you have saved compiled patterns from a previous release, you will have to -re-compile them. Important changes that are visible to users are: - -1. The Unicode property tables have been updated to Unicode 5.0.0, which adds - some more scripts. - -2. The option PCRE_NEWLINE_ANY causes PCRE to recognize any Unicode newline - sequence as a newline. - -3. The \R escape matches a single Unicode newline sequence as a single unit. - -4. New features that will appear in Perl 5.10 are now in PCRE. These include - alternative Perl syntax for named parentheses, and Perl syntax for - recursion. - -5. The C++ wrapper interface has been extended by the addition of a - QuoteMeta function and the ability to allow copy construction and - assignment. - -For a complete list of changes, see the ChangeLog file. - - -Release 6.7 04-Jul-06 ---------------------- - -The main additions to this release are the ability to use the same name for -multiple sets of parentheses, and support for CRLF line endings in both the -library and pcregrep (and in pcretest for testing). - -Thanks to Ian Taylor, the stack usage for many kinds of pattern has been -significantly reduced for certain subject strings. - - -Release 6.5 01-Feb-06 ---------------------- - -Important changes in this release: - -1. A number of new features have been added to pcregrep. - -2. The Unicode property tables have been updated to Unicode 4.1.0, and the - supported properties have been extended with script names such as "Arabic", - and the derived properties "Any" and "L&". This has necessitated a change to - the interal format of compiled patterns. Any saved compiled patterns that - use \p or \P must be recompiled. - -3. The specification of recursion in patterns has been changed so that all - recursive subpatterns are automatically treated as atomic groups. Thus, for - example, (?R) is treated as if it were (?>(?R)). This is necessary because - otherwise there are situations where recursion does not work. - -See the ChangeLog for a complete list of changes, which include a number of bug -fixes and tidies. - - -Release 6.0 07-Jun-05 ---------------------- - -The release number has been increased to 6.0 because of the addition of several -major new pieces of functionality. - -A new function, pcre_dfa_exec(), which implements pattern matching using a DFA -algorithm, has been added. This has a number of advantages for certain cases, -though it does run more slowly, and lacks the ability to capture substrings. On -the other hand, it does find all matches, not just the first, and it works -better for partial matching. The pcrematching man page discusses the -differences. - -The pcretest program has been enhanced so that it can make use of the new -pcre_dfa_exec() matching function and the extra features it provides. - -The distribution now includes a C++ wrapper library. This is built -automatically if a C++ compiler is found. The pcrecpp man page discusses this -interface. - -The code itself has been re-organized into many more files, one for each -function, so it no longer requires everything to be linked in when static -linkage is used. As a consequence, some internal functions have had to have -their names exposed. These functions all have names starting with _pcre_. They -are undocumented, and are not intended for use by outside callers. - -The pcregrep program has been enhanced with new functionality such as -multiline-matching and options for output more matching context. See the -ChangeLog for a complete list of changes to the library and the utility -programs. - - -Release 5.0 13-Sep-04 ---------------------- - -The licence under which PCRE is released has been changed to the more -conventional "BSD" licence. - -In the code, some bugs have been fixed, and there are also some major changes -in this release (which is why I've increased the number to 5.0). Some changes -are internal rearrangements, and some provide a number of new facilities. The -new features are: - -1. There's an "automatic callout" feature that inserts callouts before every - item in the regex, and there's a new callout field that gives the position - in the pattern - useful for debugging and tracing. - -2. The extra_data structure can now be used to pass in a set of character - tables at exec time. This is useful if compiled regex are saved and re-used - at a later time when the tables may not be at the same address. If the - default internal tables are used, the pointer saved with the compiled - pattern is now set to NULL, which means that you don't need to do anything - special unless you are using custom tables. - -3. It is possible, with some restrictions on the content of the regex, to - request "partial" matching. A special return code is given if all of the - subject string matched part of the regex. This could be useful for testing - an input field as it is being typed. - -4. There is now some optional support for Unicode character properties, which - means that the patterns items such as \p{Lu} and \X can now be used. Only - the general category properties are supported. If PCRE is compiled with this - support, an additional 90K data structure is include, which increases the - size of the library dramatically. - -5. There is support for saving compiled patterns and re-using them later. - -6. There is support for running regular expressions that were compiled on a - different host with the opposite endianness. - -7. The pcretest program has been extended to accommodate the new features. - -The main internal rearrangement is that sequences of literal characters are no -longer handled as strings. Instead, each character is handled on its own. This -makes some UTF-8 handling easier, and makes the support of partial matching -possible. Compiled patterns containing long literal strings will be larger as a -result of this change; I hope that performance will not be much affected. - - -Release 4.5 01-Dec-03 ---------------------- - -Again mainly a bug-fix and tidying release, with only a couple of new features: - -1. It's possible now to compile PCRE so that it does not use recursive -function calls when matching. Instead it gets memory from the heap. This slows -things down, but may be necessary on systems with limited stacks. - -2. UTF-8 string checking has been tightened to reject overlong sequences and to -check that a starting offset points to the start of a character. Failure of the -latter returns a new error code: PCRE_ERROR_BADUTF8_OFFSET. - -3. PCRE can now be compiled for systems that use EBCDIC code. - - -Release 4.4 21-Aug-03 ---------------------- - -This is mainly a bug-fix and tidying release. The only new feature is that PCRE -checks UTF-8 strings for validity by default. There is an option to suppress -this, just in case anybody wants that teeny extra bit of performance. - - -Releases 4.1 - 4.3 ------------------- - -Sorry, I forgot about updating the NEWS file for these releases. Please take a -look at ChangeLog. - - -Release 4.0 17-Feb-03 ---------------------- - -There have been a lot of changes for the 4.0 release, adding additional -functionality and mending bugs. Below is a list of the highlights of the new -functionality. For full details of these features, please consult the -documentation. For a complete list of changes, see the ChangeLog file. - -1. Support for Perl's \Q...\E escapes. - -2. "Possessive quantifiers" ?+, *+, ++, and {,}+ which come from Sun's Java -package. They provide some syntactic sugar for simple cases of "atomic -grouping". - -3. Support for the \G assertion. It is true when the current matching position -is at the start point of the match. - -4. A new feature that provides some of the functionality that Perl provides -with (?{...}). The facility is termed a "callout". The way it is done in PCRE -is for the caller to provide an optional function, by setting pcre_callout to -its entry point. To get the function called, the regex must include (?C) at -appropriate points. - -5. Support for recursive calls to individual subpatterns. This makes it really -easy to get totally confused. - -6. Support for named subpatterns. The Python syntax (?P<name>...) is used to -name a group. - -7. Several extensions to UTF-8 support; it is now fairly complete. There is an -option for pcregrep to make it operate in UTF-8 mode. - -8. The single man page has been split into a number of separate man pages. -These also give rise to individual HTML pages which are put in a separate -directory. There is an index.html page that lists them all. Some hyperlinking -between the pages has been installed. - - -Release 3.5 15-Aug-01 ---------------------- - -1. The configuring system has been upgraded to use later versions of autoconf -and libtool. By default it builds both a shared and a static library if the OS -supports it. You can use --disable-shared or --disable-static on the configure -command if you want only one of them. - -2. The pcretest utility is now installed along with pcregrep because it is -useful for users (to test regexs) and by doing this, it automatically gets -relinked by libtool. The documentation has been turned into a man page, so -there are now .1, .txt, and .html versions in /doc. - -3. Upgrades to pcregrep: - (i) Added long-form option names like gnu grep. - (ii) Added --help to list all options with an explanatory phrase. - (iii) Added -r, --recursive to recurse into sub-directories. - (iv) Added -f, --file to read patterns from a file. - -4. Added --enable-newline-is-cr and --enable-newline-is-lf to the configure -script, to force use of CR or LF instead of \n in the source. On non-Unix -systems, the value can be set in config.h. - -5. The limit of 200 on non-capturing parentheses is a _nesting_ limit, not an -absolute limit. Changed the text of the error message to make this clear, and -likewise updated the man page. - -6. The limit of 99 on the number of capturing subpatterns has been removed. -The new limit is 65535, which I hope will not be a "real" limit. - - -Release 3.3 01-Aug-00 ---------------------- - -There is some support for UTF-8 character strings. This is incomplete and -experimental. The documentation describes what is and what is not implemented. -Otherwise, this is just a bug-fixing release. - - -Release 3.0 01-Feb-00 ---------------------- - -1. A "configure" script is now used to configure PCRE for Unix systems. It -builds a Makefile, a config.h file, and the pcre-config script. - -2. PCRE is built as a shared library by default. - -3. There is support for POSIX classes such as [:alpha:]. - -5. There is an experimental recursion feature. - ----------------------------------------------------------------------------- - IMPORTANT FOR THOSE UPGRADING FROM VERSIONS BEFORE 2.00 - -Please note that there has been a change in the API such that a larger -ovector is required at matching time, to provide some additional workspace. -The new man page has details. This change was necessary in order to support -some of the new functionality in Perl 5.005. - - IMPORTANT FOR THOSE UPGRADING FROM VERSION 2.00 - -Another (I hope this is the last!) change has been made to the API for the -pcre_compile() function. An additional argument has been added to make it -possible to pass over a pointer to character tables built in the current -locale by pcre_maketables(). To use the default tables, this new arguement -should be passed as NULL. - - IMPORTANT FOR THOSE UPGRADING FROM VERSION 2.05 - -Yet another (and again I hope this really is the last) change has been made -to the API for the pcre_exec() function. An additional argument has been -added to make it possible to start the match other than at the start of the -subject string. This is important if there are lookbehinds. The new man -page has the details, but you just want to convert existing programs, all -you need to do is to stick in a new fifth argument to pcre_exec(), with a -value of zero. For example, change - - pcre_exec(pattern, extra, subject, length, options, ovec, ovecsize) -to - pcre_exec(pattern, extra, subject, length, 0, options, ovec, ovecsize) - -**** diff --git a/pcre-7.4/NON-UNIX-USE b/pcre-7.4/NON-UNIX-USE @@ -1,388 +0,0 @@ -Compiling PCRE on non-Unix systems ----------------------------------- - -This document contains the following sections: - - General - Generic instructions for the PCRE C library - The C++ wrapper functions - Building for virtual Pascal - Stack size in Windows environments - Comments about Win32 builds - Building PCRE with CMake - Building under Windows with BCC5.5 - Building PCRE on OpenVMS - - -GENERAL - -I (Philip Hazel) have no experience of Windows or VMS sytems and how their -libraries work. The items in the PCRE distribution and Makefile that relate to -anything other than Unix-like systems are untested by me. - -There are some other comments and files in the Contrib directory on the ftp -site that you may find useful. See - - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib - -If you want to compile PCRE for a non-Unix system (especially for a system that -does not support "configure" and "make" files), note that the basic PCRE -library consists entirely of code written in Standard C, and so should compile -successfully on any system that has a Standard C compiler and library. The C++ -wrapper functions are a separate issue (see below). - -The PCRE distribution includes support for CMake. This support is relatively -new, but has already been used successfully to build PCRE in multiple build -environments on Windows. There are some instructions in the section entitled -"Building PCRE with CMake" below. - - -GENERIC INSTRUCTIONS FOR THE PCRE C LIBRARY - -The following are generic comments about building the PCRE C library "by hand". - - (1) Copy or rename the file config.h.generic as config.h, and edit the macro - settings that it contains to whatever is appropriate for your environment. - In particular, if you want to force a specific value for newline, you can - define the NEWLINE macro. When you compile any of the PCRE modules, you - must specify -DHAVE_CONFIG_H to your compiler so that config.h is included - in the sources. - - An alternative approach is not to edit config.h, but to use -D on the - compiler command line to make any changes that you need to the - configuration options. In this case -DHAVE_CONFIG_H must not be set. - - NOTE: There have been occasions when the way in which certain parameters - in config.h are used has changed between releases. (In the configure/make - world, this is handled automatically.) When upgrading to a new release, - you are strongly advised to review config.h.generic before re-using what - you had previously. - - (2) Copy or rename the file pcre.h.generic as pcre.h. - - (3) EITHER: - Copy or rename file pcre_chartables.c.dist as pcre_chartables.c. - - OR: - Compile dftables.c as a stand-alone program (using -DHAVE_CONFIG_H if - you have set up config.h), and then run it with the single argument - "pcre_chartables.c". This generates a set of standard character tables - and writes them to that file. The tables are generated using the default - C locale for your system. If you want to use a locale that is specified - by LC_xxx environment variables, add the -L option to the dftables - command. You must use this method if you are building on a system that - uses EBCDIC code. - - The tables in pcre_chartables.c are defaults. The caller of PCRE can - specify alternative tables at run time. - - (4) Ensure that you have the following header files: - - pcre_internal.h - ucp.h - ucpinternal.h - ucptable.h - - (5) Also ensure that you have the following file, which is #included as source - when building a debugging version of PCRE and is also used by pcretest. - - pcre_printint.src - - (6) Compile the following source files, setting -DHAVE_CONFIG_H as a compiler - option if you have set up config.h with your configuration, or else use - other -D settings to change the configuration as required. - - pcre_chartables.c - pcre_compile.c - pcre_config.c - pcre_dfa_exec.c - pcre_exec.c - pcre_fullinfo.c - pcre_get.c - pcre_globals.c - pcre_info.c - pcre_maketables.c - pcre_newline.c - pcre_ord2utf8.c - pcre_refcount.c - pcre_study.c - pcre_tables.c - pcre_try_flipped.c - pcre_ucp_searchfuncs.c - pcre_valid_utf8.c - pcre_version.c - pcre_xclass.c - - Make sure that you include -I. in the compiler command (or equivalent for - an unusual compiler) so that all included PCRE header files are first - sought in the current directory. Otherwise you run the risk of picking up - a previously-installed file from somewhere else. - - (7) Now link all the compiled code into an object library in whichever form - your system keeps such libraries. This is the basic PCRE C library. If - your system has static and shared libraries, you may have to do this once - for each type. - - (8) Similarly, compile pcreposix.c (remembering -DHAVE_CONFIG_H if necessary) - and link the result (on its own) as the pcreposix library. - - (9) Compile the test program pcretest.c (again, don't forget -DHAVE_CONFIG_H). - This needs the functions in the pcre and pcreposix libraries when linking. - It also needs the pcre_printint.src source file, which it #includes. - -(10) Run pcretest on the testinput files in the testdata directory, and check - that the output matches the corresponding testoutput files. Note that the - supplied files are in Unix format, with just LF characters as line - terminators. You may need to edit them to change this if your system uses - a different convention. If you are using Windows, you probably should use - the wintestinput3 file instead of testinput3 (and the corresponding output - file). This is a locale test; wintestinput3 sets the locale to "french" - rather than "fr_FR", and there some minor output differences. - -(11) If you want to use the pcregrep command, compile and link pcregrep.c; it - uses only the basic PCRE library (it does not need the pcreposix library). - - -THE C++ WRAPPER FUNCTIONS - -The PCRE distribution also contains some C++ wrapper functions and tests, -contributed by Google Inc. On a system that can use "configure" and "make", -the functions are automatically built into a library called pcrecpp. It should -be straightforward to compile the .cc files manually on other systems. The -files called xxx_unittest.cc are test programs for each of the corresponding -xxx.cc files. - - -BUILDING FOR VIRTUAL PASCAL - -A script for building PCRE using Borland's C++ compiler for use with VPASCAL -was contributed by Alexander Tokarev. Stefan Weber updated the script and added -additional files. The following files in the distribution are for building PCRE -for use with VP/Borland: makevp_c.txt, makevp_l.txt, makevp.bat, pcregexp.pas. - - -STACK SIZE IN WINDOWS ENVIRONMENTS - -The default processor stack size of 1Mb in some Windows environments is too -small for matching patterns that need much recursion. In particular, test 2 may -fail because of this. Normally, running out of stack causes a crash, but there -have been cases where the test program has just died silently. See your linker -documentation for how to increase stack size if you experience problems. The -Linux default of 8Mb is a reasonable choice for the stack, though even that can -be too small for some pattern/subject combinations. - -PCRE has a compile configuration option to disable the use of stack for -recursion so that heap is used instead. However, pattern matching is -significantly slower when this is done. There is more about stack usage in the -"pcrestack" documentation. - - -COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE WITH CMAKE" below) - -There are two ways of building PCRE using the "configure, make, make install" -paradigm on Windows systems: using MinGW or using Cygwin. These are not at all -the same thing; they are completely different from each other. There is also -some experimental, undocumented support for building using "cmake", which you -might like to try if you are familiar with "cmake". However, at the present -time, the "cmake" process builds only a static library (not a dll), and the -tests are not automatically run. - -The MinGW home page (http://www.mingw.org/) says this: - - MinGW: A collection of freely available and freely distributable Windows - specific header files and import libraries combined with GNU toolsets that - allow one to produce native Windows programs that do not rely on any - 3rd-party C runtime DLLs. - -The Cygwin home page (http://www.cygwin.com/) says this: - - Cygwin is a Linux-like environment for Windows. It consists of two parts: - - . A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing - substantial Linux API functionality - - . A collection of tools which provide Linux look and feel. - - The Cygwin DLL currently works with all recent, commercially released x86 32 - bit and 64 bit versions of Windows, with the exception of Windows CE. - -On both MinGW and Cygwin, PCRE should build correctly using: - - ./configure && make && make install - -This should create two libraries called libpcre and libpcreposix, and, if you -have enabled building the C++ wrapper, a third one called libpcrecpp. These are -independent libraries: when you like with libpcreposix or libpcrecpp you must -also link with libpcre, which contains the basic functions. (Some earlier -releases of PCRE included the basic libpcre functions in libpcreposix. This no -longer happens.) - -If you want to statically link your program against a non-dll .a file, you must -define PCRE_STATIC before including pcre.h, otherwise the pcre_malloc() and -pcre_free() exported functions will be declared __declspec(dllimport), with -unwanted results. - -Using Cygwin's compiler generates libraries and executables that depend on -cygwin1.dll. If a library that is generated this way is distributed, -cygwin1.dll has to be distributed as well. Since cygwin1.dll is under the GPL -licence, this forces not only PCRE to be under the GPL, but also the entire -application. A distributor who wants to keep their own code proprietary must -purchase an appropriate Cygwin licence. - -MinGW has no such restrictions. The MinGW compiler generates a library or -executable that can run standalone on Windows without any third party dll or -licensing issues. - -But there is more complication: - -If a Cygwin user uses the -mno-cygwin Cygwin gcc flag, what that really does is -to tell Cygwin's gcc to use the MinGW gcc. Cygwin's gcc is only acting as a -front end to MinGW's gcc (if you install Cygwin's gcc, you get both Cygwin's -gcc and MinGW's gcc). So, a user can: - -. Build native binaries by using MinGW or by getting Cygwin and using - -mno-cygwin. - -. Build binaries that depend on cygwin1.dll by using Cygwin with the normal - compiler flags. - -The test files that are supplied with PCRE are in Unix format, with LF -characters as line terminators. It may be necessary to change the line -terminators in order to get some of the tests to work. We hope to improve -things in this area in future. - - -BUILDING PCRE WITH CMAKE - -CMake is an alternative build facility that can be used instead of the -traditional Unix "configure". CMake version 2.4.7 supports Borland makefiles, -MinGW makefiles, MSYS makefiles, NMake makefiles, UNIX makefiles, Visual Studio -6, Visual Studio 7, Visual Studio 8, and Watcom W8. The following instructions -were contributed by a PCRE user. - -1. Download CMake 2.4.7 or above from http://www.cmake.org/, install and ensure - that cmake\bin is on your path. - -2. Unzip (retaining folder structure) the PCRE source tree into a source - directory such as C:\pcre. - -3. Create a new, empty build directory: C:\pcre\build\ - -4. Run CMakeSetup from the Shell envirornment of your build tool, e.g., Msys - for Msys/MinGW or Visual Studio Command Prompt for VC/VC++ - -5. Enter C:\pcre\pcre-xx and C:\pcre\build for the source and build - directories, respectively - -6. Hit the "Configure" button. - -7. Select the particular IDE / build tool that you are using (Visual Studio, - MSYS makefiles, MinGW makefiles, etc.) - -8. The GUI will then list several configuration options. This is where you can - enable UTF-8 support, etc. - -9. Hit "Configure" again. The adjacent "OK" button should now be active. - -10. Hit "OK". - -11. The build directory should now contain a usable build system, be it a - solution file for Visual Studio, makefiles for MinGW, etc. - -Testing with RunTest.bat - -1. Copy RunTest.bat into the directory where pcretest.exe has been created. - -2. Edit RunTest.bat and insert a line that indentifies the relative location of - the pcre source, e.g.: - - set srcdir=..\pcre-7.4-RC3 - -3. Run RunTest.bat from a command shell environment. Test outputs will - automatically be compared to expected results, and discrepancies will - identified in the console output. - -4. To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and - pcre_scanner_unittest.exe. - - -BUILDING UNDER WINDOWS WITH BCC5.5 - -Michael Roy sent these comments about building PCRE under Windows with BCC5.5: - - Some of the core BCC libraries have a version of PCRE from 1998 built in, - which can lead to pcre_exec() giving an erroneous PCRE_ERROR_NULL from a - version mismatch. I'm including an easy workaround below, if you'd like to - include it in the non-unix instructions: - - When linking a project with BCC5.5, pcre.lib must be included before any of - the libraries cw32.lib, cw32i.lib, cw32mt.lib, and cw32mti.lib on the command - line. - - -BUILDING PCRE ON OPENVMS - -Dan Mooney sent the following comments about building PCRE on OpenVMS. They -relate to an older version of PCRE that used fewer source files, so the exact -commands will need changing. See the current list of source files above. - -"It was quite easy to compile and link the library. I don't have a formal -make file but the attached file [reproduced below] contains the OpenVMS DCL -commands I used to build the library. I had to add #define -POSIX_MALLOC_THRESHOLD 10 to pcre.h since it was not defined anywhere. - -The library was built on: -O/S: HP OpenVMS v7.3-1 -Compiler: Compaq C v6.5-001-48BCD -Linker: vA13-01 - -The test results did not match 100% due to the issues you mention in your -documentation regarding isprint(), iscntrl(), isgraph() and ispunct(). I -modified some of the character tables temporarily and was able to get the -results to match. Tests using the fr locale did not match since I don't have -that locale loaded. The study size was always reported to be 3 less than the -value in the standard test output files." - -========================= -$! This DCL procedure builds PCRE on OpenVMS -$! -$! I followed the instructions in the non-unix-use file in the distribution. -$! -$ COMPILE == "CC/LIST/NOMEMBER_ALIGNMENT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES -$ COMPILE DFTABLES.C -$ LINK/EXE=DFTABLES.EXE DFTABLES.OBJ -$ RUN DFTABLES.EXE/OUTPUT=CHARTABLES.C -$ COMPILE MAKETABLES.C -$ COMPILE GET.C -$ COMPILE STUDY.C -$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol -$! did not seem to be defined anywhere. -$! I edited pcre.h and added #DEFINE SUPPORT_UTF8 to enable UTF8 support. -$ COMPILE PCRE.C -$ LIB/CREATE PCRE MAKETABLES.OBJ, GET.OBJ, STUDY.OBJ, PCRE.OBJ -$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol -$! did not seem to be defined anywhere. -$ COMPILE PCREPOSIX.C -$ LIB/CREATE PCREPOSIX PCREPOSIX.OBJ -$ COMPILE PCRETEST.C -$ LINK/EXE=PCRETEST.EXE PCRETEST.OBJ, PCRE/LIB, PCREPOSIX/LIB -$! C programs that want access to command line arguments must be -$! defined as a symbol -$ PCRETEST :== "$ SYS$ROADSUSERS:[DMOONEY.REGEXP]PCRETEST.EXE" -$! Arguments must be enclosed in quotes. -$ PCRETEST "-C" -$! Test results: -$! -$! The test results did not match 100%. The functions isprint(), iscntrl(), -$! isgraph() and ispunct() on OpenVMS must not produce the same results -$! as the system that built the test output files provided with the -$! distribution. -$! -$! The study size did not match and was always 3 less on OpenVMS. -$! -$! Locale could not be set to fr -$! -========================= - -Last Updated: 21 September 2007 -**** diff --git a/pcre-7.4/PrepareRelease b/pcre-7.4/PrepareRelease @@ -1,214 +0,0 @@ -#/bin/sh - -# Script to prepare the files for building a PCRE release. It does some -# processing of the documentation, detrails files, and creates pcre.h.generic -# and config.h.generic (for use by builders who can't run ./configure). - -# You must run this script before runnning "make dist". It makes use of the -# following files: - -# 132html A Perl script that converts a .1 or .3 man page into HTML. It -# is called from MakeRelease. It "knows" the relevant troff -# constructs that are used in the PCRE man pages. - -# CleanTxt A Perl script that cleans up the output of "nroff -man" by -# removing backspaces and other redundant text so as to produce -# a readable .txt file. - -# Detrail A Perl script that removes trailing spaces from files. - -# doc/index.html.src -# A file that is copied as index.html into the doc/html directory -# when the HTML documentation is built. It works like this so that -# doc/html can be deleted and re-created from scratch. - - -# First, sort out the documentation - -cd doc -echo Processing documentation - -# Make Text form of the documentation. It needs some mangling to make it -# tidy for online reading. Concatenate all the .3 stuff, but omit the -# individual function pages. - -cat <<End >pcre.txt ------------------------------------------------------------------------------ -This file contains a concatenation of the PCRE man pages, converted to plain -text format for ease of searching with a text editor, or for use on systems -that do not have a man page processor. The small individual files that give -synopses of each function in the library have not been included. There are -separate text files for the pcregrep and pcretest commands. ------------------------------------------------------------------------------ - - -End - -echo "Making pcre.txt" -for file in pcre pcrebuild pcrematching pcreapi pcrecallout pcrecompat \ - pcrepattern pcresyntax pcrepartial pcreprecompile \ - pcreperform pcreposix pcrecpp pcresample pcrestack ; do - echo " Processing $file.3" - nroff -c -man $file.3 >$file.rawtxt - ../CleanTxt <$file.rawtxt >>pcre.txt - /bin/rm $file.rawtxt - echo "------------------------------------------------------------------------------" >>pcre.txt - if [ "$file" != "pcresample" ] ; then - echo " " >>pcre.txt - echo " " >>pcre.txt - fi -done - -# The three commands -for file in pcretest pcregrep pcre-config ; do - echo Making $file.txt - nroff -c -man $file.1 >$file.rawtxt - ../CleanTxt <$file.rawtxt >$file.txt - /bin/rm $file.rawtxt -done - - -# Make HTML form of the documentation. - -echo "Making HTML documentation" -/bin/rm html/* -cp index.html.src html/index.html - -for file in *.1 ; do - base=`basename $file .1` - echo " Making $base.html" - ../132html -toc $base <$file >html/$base.html -done - -# Exclude table of contents for function summaries. It seems that expr -# forces an anchored regex. Also exclude them for small pages that have -# only one section. -for file in *.3 ; do - base=`basename $file .3` - toc=-toc - if [ `expr $base : '.*_'` -ne 0 ] ; then toc="" ; fi - if [ "$base" = "pcresample" ] || \ - [ "$base" = "pcrestack" ] || \ - [ "$base" = "pcrecompat" ] || \ - [ "$base" = "pcreperform" ] ; then - toc="" - fi - echo " Making $base.html" - ../132html $toc $base <$file >html/$base.html - if [ $? != 0 ] ; then exit 1; fi -done - -# End of documentation processing - -cd .. -echo Documentation done - -# These files are detrailed; do not detrail the test data because there may be -# significant trailing spaces. The configure files are also omitted from the -# detrailing. - -files="\ - Makefile.am \ - Makefile.in \ - configure.ac \ - README \ - LICENCE \ - COPYING \ - AUTHORS \ - NEWS \ - NON-UNIX-USE \ - INSTALL \ - 132html \ - CleanTxt \ - Detrail \ - ChangeLog \ - CMakeLists.txt \ - RunGrepTest \ - RunTest \ - RunTest.bat \ - pcre-config.in \ - libpcre.pc.in \ - libpcrecpp.pc.in \ - config.h.in \ - pcre_printint.src \ - pcre_chartables.c.dist \ - pcredemo.c \ - pcregrep.c \ - pcretest.c \ - dftables.c \ - pcreposix.c \ - pcreposix.h \ - pcre.h.in \ - pcre_internal.h - pcre_compile.c \ - pcre_config.c \ - pcre_dfa_exec.c \ - pcre_exec.c \ - pcre_fullinfo.c \ - pcre_get.c \ - pcre_globals.c \ - pcre_info.c \ - pcre_maketables.c \ - pcre_newline.c \ - pcre_ord2utf8.c \ - pcre_refcount.c \ - pcre_study.c \ - pcre_tables.c \ - pcre_try_flipped.c \ - pcre_ucp_searchfuncs.c \ - pcre_valid_utf8.c \ - pcre_version.c \ - pcre_xclass.c \ - pcre_scanner.cc \ - pcre_scanner.h \ - pcre_scanner_unittest.cc \ - pcrecpp.cc \ - pcrecpp.h \ - pcrecpparg.h.in \ - pcrecpp_unittest.cc \ - pcre_stringpiece.cc \ - pcre_stringpiece.h.in \ - pcre_stringpiece_unittest.cc \ - perltest.pl \ - ucp.h \ - ucpinternal.h \ - ucptable.h \ - makevp.bat \ - pcre.def \ - libpcre.def \ - libpcreposix.def" - -echo Detrailing -./Detrail $files doc/p* doc/html/* - -echo Doing basic configure to get default pcre.h and config.h -# This is in case the caller has set aliases (as I do - PH) -unset cp ls mv rm -./configure >/dev/null - -echo Converting pcre.h and config.h to generic forms -cp -f pcre.h pcre.h.generic - -perl <<'END' - open(IN, "<config.h") || die "Can't open config.h: $!\n"; - open(OUT, ">config.h.generic") || die "Can't open config.h.generic: $!\n"; - while (<IN>) - { - if (/^#define\s(?!PACKAGE)(\w+)/) - { - print OUT "#ifndef $1\n"; - print OUT; - print OUT "#endif\n"; - } - else - { - print OUT; - } - } - close IN; - close OUT; -END - -echo Done - -#End diff --git a/pcre-7.4/README b/pcre-7.4/README @@ -1,728 +0,0 @@ -README file for PCRE (Perl-compatible regular expression library) ------------------------------------------------------------------ - -The latest release of PCRE is always available from - - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz - -There is a mailing list for discussion about the development of PCRE at - - pcre-dev@exim.org - -Please read the NEWS file if you are upgrading from a previous release. -The contents of this README file are: - - The PCRE APIs - Documentation for PCRE - Contributions by users of PCRE - Building PCRE on non-Unix systems - Building PCRE on Unix-like systems - Retrieving configuration information on Unix-like systems - Shared libraries on Unix-like systems - Cross-compiling on Unix-like systems - Using HP's ANSI C++ compiler (aCC) - Making new tarballs - Testing PCRE - Character tables - File manifest - - -The PCRE APIs -------------- - -PCRE is written in C, and it has its own API. The distribution also includes a -set of C++ wrapper functions (see the pcrecpp man page for details), courtesy -of Google Inc. - -In addition, there is a set of C wrapper functions that are based on the POSIX -regular expression API (see the pcreposix man page). These end up in the -library called libpcreposix. Note that this just provides a POSIX calling -interface to PCRE; the regular expressions themselves still follow Perl syntax -and semantics. The POSIX API is restricted, and does not give full access to -all of PCRE's facilities. - -The header file for the POSIX-style functions is called pcreposix.h. The -official POSIX name is regex.h, but I did not want to risk possible problems -with existing files of that name by distributing it that way. To use PCRE with -an existing program that uses the POSIX API, pcreposix.h will have to be -renamed or pointed at by a link. - -If you are using the POSIX interface to PCRE and there is already a POSIX regex -library installed on your system, as well as worrying about the regex.h header -file (as mentioned above), you must also take care when linking programs to -ensure that they link with PCRE's libpcreposix library. Otherwise they may pick -up the POSIX functions of the same name from the other library. - -One way of avoiding this confusion is to compile PCRE with the addition of --Dregcomp=PCREregcomp (and similarly for the other POSIX functions) to the -compiler flags (CFLAGS if you are using "configure" -- see below). This has the -effect of renaming the functions so that the names no longer clash. Of course, -you have to do the same thing for your applications, or write them using the -new names. - - -Documentation for PCRE ----------------------- - -If you install PCRE in the normal way on a Unix-like system, you will end up -with a set of man pages whose names all start with "pcre". The one that is just -called "pcre" lists all the others. In addition to these man pages, the PCRE -documentation is supplied in two other forms: - - 1. There are files called doc/pcre.txt, doc/pcregrep.txt, and - doc/pcretest.txt in the source distribution. The first of these is a - concatenation of the text forms of all the section 3 man pages except - those that summarize individual functions. The other two are the text - forms of the section 1 man pages for the pcregrep and pcretest commands. - These text forms are provided for ease of scanning with text editors or - similar tools. They are installed in <prefix>/share/doc/pcre, where - <prefix> is the installation prefix (defaulting to /usr/local). - - 2. A set of files containing all the documentation in HTML form, hyperlinked - in various ways, and rooted in a file called index.html, is distributed in - doc/html and installed in <prefix>/share/doc/pcre/html. - - -Contributions by users of PCRE ------------------------------- - -You can find contributions from PCRE users in the directory - - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib - -There is a README file giving brief descriptions of what they are. Some are -complete in themselves; others are pointers to URLs containing relevant files. -Some of this material is likely to be well out-of-date. Several of the earlier -contributions provided support for compiling PCRE on various flavours of -Windows (I myself do not use Windows). Nowadays there is more Windows support -in the standard distribution, so these contibutions have been archived. - - -Building PCRE on non-Unix systems ---------------------------------- - -For a non-Unix system, please read the comments in the file NON-UNIX-USE, -though if your system supports the use of "configure" and "make" you may be -able to build PCRE in the same way as for Unix-like systems. PCRE can also be -configured in many platform environments using the GUI facility of CMake's -CMakeSetup. It creates Makefiles, solution files, etc. - -PCRE has been compiled on many different operating systems. It should be -straightforward to build PCRE on any system that has a Standard C compiler and -library, because it uses only Standard C functions. - - -Building PCRE on Unix-like systems ----------------------------------- - -If you are using HP's ANSI C++ compiler (aCC), please see the special note -in the section entitled "Using HP's ANSI C++ compiler (aCC)" below. - -The following instructions assume the use of the widely used "configure, make, -make install" process. There is also some experimental support for "cmake" in -the PCRE distribution, but it is incomplete and not documented. However, if you -are a "cmake" user, you might want to try it. - -To build PCRE on a Unix-like system, first run the "configure" command from the -PCRE distribution directory, with your current directory set to the directory -where you want the files to be created. This command is a standard GNU -"autoconf" configuration script, for which generic instructions are supplied in -the file INSTALL. - -Most commonly, people build PCRE within its own distribution directory, and in -this case, on many systems, just running "./configure" is sufficient. However, -the usual methods of changing standard defaults are available. For example: - -CFLAGS='-O2 -Wall' ./configure --prefix=/opt/local - -specifies that the C compiler should be run with the flags '-O2 -Wall' instead -of the default, and that "make install" should install PCRE under /opt/local -instead of the default /usr/local. - -If you want to build in a different directory, just run "configure" with that -directory as current. For example, suppose you have unpacked the PCRE source -into /source/pcre/pcre-xxx, but you want to build it in /build/pcre/pcre-xxx: - -cd /build/pcre/pcre-xxx -/source/pcre/pcre-xxx/configure - -PCRE is written in C and is normally compiled as a C library. However, it is -possible to build it as a C++ library, though the provided building apparatus -does not have any features to support this. - -There are some optional features that can be included or omitted from the PCRE -library. You can read more about them in the pcrebuild man page. - -. If you want to suppress the building of the C++ wrapper library, you can add - --disable-cpp to the "configure" command. Otherwise, when "configure" is run, - it will try to find a C++ compiler and C++ header files, and if it succeeds, - it will try to build the C++ wrapper. - -. If you want to make use of the support for UTF-8 character strings in PCRE, - you must add --enable-utf8 to the "configure" command. Without it, the code - for handling UTF-8 is not included in the library. (Even when included, it - still has to be enabled by an option at run time.) - -. If, in addition to support for UTF-8 character strings, you want to include - support for the \P, \p, and \X sequences that recognize Unicode character - properties, you must add --enable-unicode-properties to the "configure" - command. This adds about 30K to the size of the library (in the form of a - property table); only the basic two-letter properties such as Lu are - supported. - -. You can build PCRE to recognize either CR or LF or the sequence CRLF or any - of the preceding, or any of the Unicode newline sequences as indicating the - end of a line. Whatever you specify at build time is the default; the caller - of PCRE can change the selection at run time. The default newline indicator - is a single LF character (the Unix standard). You can specify the default - newline indicator by adding --enable-newline-is-cr or --enable-newline-is-lf - or --enable-newline-is-crlf or --enable-newline-is-anycrlf or - --enable-newline-is-any to the "configure" command, respectively. - - If you specify --enable-newline-is-cr or --enable-newline-is-crlf, some of - the standard tests will fail, because the lines in the test files end with - LF. Even if the files are edited to change the line endings, there are likely - to be some failures. With --enable-newline-is-anycrlf or - --enable-newline-is-any, many tests should succeed, but there may be some - failures. - -. By default, the sequence \R in a pattern matches any Unicode line ending - sequence. This is independent of the option specifying what PCRE considers to - be the end of a line (see above). However, the caller of PCRE can restrict \R - to match only CR, LF, or CRLF. You can make this the default by adding - --enable-bsr-anycrlf to the "configure" command (bsr = "backslash R"). - -. When called via the POSIX interface, PCRE uses malloc() to get additional - storage for processing capturing parentheses if there are more than 10 of - them in a pattern. You can increase this threshold by setting, for example, - - --with-posix-malloc-threshold=20 - - on the "configure" command. - -. PCRE has a counter that can be set to limit the amount of resources it uses. - If the limit is exceeded during a match, the match fails. The default is ten - million. You can change the default by setting, for example, - - --with-match-limit=500000 - - on the "configure" command. This is just the default; individual calls to - pcre_exec() can supply their own value. There is more discussion on the - pcreapi man page. - -. There is a separate counter that limits the depth of recursive function calls - during a matching process. This also has a default of ten million, which is - essentially "unlimited". You can change the default by setting, for example, - - --with-match-limit-recursion=500000 - - Recursive function calls use up the runtime stack; running out of stack can - cause programs to crash in strange ways. There is a discussion about stack - sizes in the pcrestack man page. - -. The default maximum compiled pattern size is around 64K. You can increase - this by adding --with-link-size=3 to the "configure" command. You can - increase it even more by setting --with-link-size=4, but this is unlikely - ever to be necessary. Increasing the internal link size will reduce - performance. - -. You can build PCRE so that its internal match() function that is called from - pcre_exec() does not call itself recursively. Instead, it uses memory blocks - obtained from the heap via the special functions pcre_stack_malloc() and - pcre_stack_free() to save data that would otherwise be saved on the stack. To - build PCRE like this, use - - --disable-stack-for-recursion - - on the "configure" command. PCRE runs more slowly in this mode, but it may be - necessary in environments with limited stack sizes. This applies only to the - pcre_exec() function; it does not apply to pcre_dfa_exec(), which does not - use deeply nested recursion. There is a discussion about stack sizes in the - pcrestack man page. - -. For speed, PCRE uses four tables for manipulating and identifying characters - whose code point values are less than 256. By default, it uses a set of - tables for ASCII encoding that is part of the distribution. If you specify - - --enable-rebuild-chartables - - a program called dftables is compiled and run in the default C locale when - you obey "make". It builds a source file called pcre_chartables.c. If you do - not specify this option, pcre_chartables.c is created as a copy of - pcre_chartables.c.dist. See "Character tables" below for further information. - -. It is possible to compile PCRE for use on systems that use EBCDIC as their - default character code (as opposed to ASCII) by specifying - - --enable-ebcdic - - This automatically implies --enable-rebuild-chartables (see above). - -The "configure" script builds the following files for the basic C library: - -. Makefile is the makefile that builds the library -. config.h contains build-time configuration options for the library -. pcre.h is the public PCRE header file -. pcre-config is a script that shows the settings of "configure" options -. libpcre.pc is data for the pkg-config command -. libtool is a script that builds shared and/or static libraries -. RunTest is a script for running tests on the basic C library -. RunGrepTest is a script for running tests on the pcregrep command - -Versions of config.h and pcre.h are distributed in the PCRE tarballs under -the names config.h.generic and pcre.h.generic. These are provided for the -benefit of those who have to built PCRE without the benefit of "configure". If -you use "configure", the .generic versions are not used. - -If a C++ compiler is found, the following files are also built: - -. libpcrecpp.pc is data for the pkg-config command -. pcrecpparg.h is a header file for programs that call PCRE via the C++ wrapper -. pcre_stringpiece.h is the header for the C++ "stringpiece" functions - -The "configure" script also creates config.status, which is an executable -script that can be run to recreate the configuration, and config.log, which -contains compiler output from tests that "configure" runs. - -Once "configure" has run, you can run "make". It builds two libraries, called -libpcre and libpcreposix, a test program called pcretest, a demonstration -program called pcredemo, and the pcregrep command. If a C++ compiler was found -on your system, "make" also builds the C++ wrapper library, which is called -libpcrecpp, and some test programs called pcrecpp_unittest, -pcre_scanner_unittest, and pcre_stringpiece_unittest. Building the C++ wrapper -can be disabled by adding --disable-cpp to the "configure" command. - -The command "make check" runs all the appropriate tests. Details of the PCRE -tests are given below in a separate section of this document. - -You can use "make install" to install PCRE into live directories on your -system. The following are installed (file names are all relative to the -<prefix> that is set when "configure" is run): - - Commands (bin): - pcretest - pcregrep - pcre-config - - Libraries (lib): - libpcre - libpcreposix - libpcrecpp (if C++ support is enabled) - - Configuration information (lib/pkgconfig): - libpcre.pc - libpcrecpp.pc (if C++ support is enabled) - - Header files (include): - pcre.h - pcreposix.h - pcre_scanner.h ) - pcre_stringpiece.h ) if C++ support is enabled - pcrecpp.h ) - pcrecpparg.h ) - - Man pages (share/man/man{1,3}): - pcregrep.1 - pcretest.1 - pcre.3 - pcre*.3 (lots more pages, all starting "pcre") - - HTML documentation (share/doc/pcre/html): - index.html - *.html (lots more pages, hyperlinked from index.html) - - Text file documentation (share/doc/pcre): - AUTHORS - COPYING - ChangeLog - LICENCE - NEWS - README - pcre.txt (a concatenation of the man(3) pages) - pcretest.txt the pcretest man page - pcregrep.txt the pcregrep man page - -Note that the pcredemo program that is built by "configure" is *not* installed -anywhere. It is a demonstration for programmers wanting to use PCRE. - -If you want to remove PCRE from your system, you can run "make uninstall". -This removes all the files that "make install" installed. However, it does not -remove any directories, because these are often shared with other programs. - - -Retrieving configuration information on Unix-like systems ---------------------------------------------------------- - -Running "make install" installs the command pcre-config, which can be used to -recall information about the PCRE configuration and installation. For example: - - pcre-config --version - -prints the version number, and - - pcre-config --libs - -outputs information about where the library is installed. This command can be -included in makefiles for programs that use PCRE, saving the programmer from -having to remember too many details. - -The pkg-config command is another system for saving and retrieving information -about installed libraries. Instead of separate commands for each library, a -single command is used. For example: - - pkg-config --cflags pcre - -The data is held in *.pc files that are installed in a directory called -<prefix>/lib/pkgconfig. - - -Shared libraries on Unix-like systems -------------------------------------- - -The default distribution builds PCRE as shared libraries and static libraries, -as long as the operating system supports shared libraries. Shared library -support relies on the "libtool" script which is built as part of the -"configure" process. - -The libtool script is used to compile and link both shared and static -libraries. They are placed in a subdirectory called .libs when they are newly -built. The programs pcretest and pcregrep are built to use these uninstalled -libraries (by means of wrapper scripts in the case of shared libraries). When -you use "make install" to install shared libraries, pcregrep and pcretest are -automatically re-built to use the newly installed shared libraries before being -installed themselves. However, the versions left in the build directory still -use the uninstalled libraries. - -To build PCRE using static libraries only you must use --disable-shared when -configuring it. For example: - -./configure --prefix=/usr/gnu --disable-shared - -Then run "make" in the usual way. Similarly, you can use --disable-static to -build only shared libraries. - - -Cross-compiling on Unix-like systems ------------------------------------- - -You can specify CC and CFLAGS in the normal way to the "configure" command, in -order to cross-compile PCRE for some other host. However, you should NOT -specify --enable-rebuild-chartables, because if you do, the dftables.c source -file is compiled and run on the local host, in order to generate the inbuilt -character tables (the pcre_chartables.c file). This will probably not work, -because dftables.c needs to be compiled with the local compiler, not the cross -compiler. - -When --enable-rebuild-chartables is not specified, pcre_chartables.c is created -by making a copy of pcre_chartables.c.dist, which is a default set of tables -that assumes ASCII code. Cross-compiling with the default tables should not be -a problem. - -If you need to modify the character tables when cross-compiling, you should -move pcre_chartables.c.dist out of the way, then compile dftables.c by hand and -run it on the local host to make a new version of pcre_chartables.c.dist. -Then when you cross-compile PCRE this new version of the tables will be used. - - -Using HP's ANSI C++ compiler (aCC) ----------------------------------- - -Unless C++ support is disabled by specifying the "--disable-cpp" option of the -"configure" script, you must include the "-AA" option in the CXXFLAGS -environment variable in order for the C++ components to compile correctly. - -Also, note that the aCC compiler on PA-RISC platforms may have a defect whereby -needed libraries fail to get included when specifying the "-AA" compiler -option. If you experience unresolved symbols when linking the C++ programs, -use the workaround of specifying the following environment variable prior to -running the "configure" script: - - CXXLDFLAGS="-lstd_v2 -lCsup_v2" - - -Making new tarballs -------------------- - -The command "make dist" creates three PCRE tarballs, in tar.gz, tar.bz2, and -zip formats. The command "make distcheck" does the same, but then does a trial -build of the new distribution to ensure that it works. - -If you have modified any of the man page sources in the doc directory, you -should first run the PrepareRelease script before making a distribution. This -script creates the .txt and HTML forms of the documentation from the man pages. - - -Testing PCRE ------------- - -To test the basic PCRE library on a Unix system, run the RunTest script that is -created by the configuring process. There is also a script called RunGrepTest -that tests the options of the pcregrep command. If the C++ wrapper library is -built, three test programs called pcrecpp_unittest, pcre_scanner_unittest, and -pcre_stringpiece_unittest are also built. - -Both the scripts and all the program tests are run if you obey "make check" or -"make test". For other systems, see the instructions in NON-UNIX-USE. - -The RunTest script runs the pcretest test program (which is documented in its -own man page) on each of the testinput files in the testdata directory in -turn, and compares the output with the contents of the corresponding testoutput -files. A file called testtry is used to hold the main output from pcretest -(testsavedregex is also used as a working file). To run pcretest on just one of -the test files, give its number as an argument to RunTest, for example: - - RunTest 2 - -The first test file can also be fed directly into the perltest.pl script to -check that Perl gives the same results. The only difference you should see is -in the first few lines, where the Perl version is given instead of the PCRE -version. - -The second set of tests check pcre_fullinfo(), pcre_info(), pcre_study(), -pcre_copy_substring(), pcre_get_substring(), pcre_get_substring_list(), error -detection, and run-time flags that are specific to PCRE, as well as the POSIX -wrapper API. It also uses the debugging flags to check some of the internals of -pcre_compile(). - -If you build PCRE with a locale setting that is not the standard C locale, the -character tables may be different (see next paragraph). In some cases, this may -cause failures in the second set of tests. For example, in a locale where the -isprint() function yields TRUE for characters in the range 128-255, the use of -[:isascii:] inside a character class defines a different set of characters, and -this shows up in this test as a difference in the compiled code, which is being -listed for checking. Where the comparison test output contains [\x00-\x7f] the -test will contain [\x00-\xff], and similarly in some other cases. This is not a -bug in PCRE. - -The third set of tests checks pcre_maketables(), the facility for building a -set of character tables for a specific locale and using them instead of the -default tables. The tests make use of the "fr_FR" (French) locale. Before -running the test, the script checks for the presence of this locale by running -the "locale" command. If that command fails, or if it doesn't include "fr_FR" -in the list of available locales, the third test cannot be run, and a comment -is output to say why. If running this test produces instances of the error - - ** Failed to set locale "fr_FR" - -in the comparison output, it means that locale is not available on your system, -despite being listed by "locale". This does not mean that PCRE is broken. - -[If you are trying to run this test on Windows, you may be able to get it to -work by changing "fr_FR" to "french" everywhere it occurs. Alternatively, use -RunTest.bat. The version of RunTest.bat included with PCRE 7.4 and above uses -Windows versions of test 2. More info on using RunTest.bat is included in the -document entitled NON-UNIX-USE.] - -The fourth test checks the UTF-8 support. It is not run automatically unless -PCRE is built with UTF-8 support. To do this you must set --enable-utf8 when -running "configure". This file can be also fed directly to the perltest script, -provided you are running Perl 5.8 or higher. (For Perl 5.6, a small patch, -commented in the script, can be be used.) - -The fifth test checks error handling with UTF-8 encoding, and internal UTF-8 -features of PCRE that are not relevant to Perl. - -The sixth test checks the support for Unicode character properties. It it not -run automatically unless PCRE is built with Unicode property support. To to -this you must set --enable-unicode-properties when running "configure". - -The seventh, eighth, and ninth tests check the pcre_dfa_exec() alternative -matching function, in non-UTF-8 mode, UTF-8 mode, and UTF-8 mode with Unicode -property support, respectively. The eighth and ninth tests are not run -automatically unless PCRE is build with the relevant support. - - -Character tables ----------------- - -For speed, PCRE uses four tables for manipulating and identifying characters -whose code point values are less than 256. The final argument of the -pcre_compile() function is a pointer to a block of memory containing the -concatenated tables. A call to pcre_maketables() can be used to generate a set -of tables in the current locale. If the final argument for pcre_compile() is -passed as NULL, a set of default tables that is built into the binary is used. - -The source file called pcre_chartables.c contains the default set of tables. By -default, this is created as a copy of pcre_chartables.c.dist, which contains -tables for ASCII coding. However, if --enable-rebuild-chartables is specified -for ./configure, a different version of pcre_chartables.c is built by the -program dftables (compiled from dftables.c), which uses the ANSI C character -handling functions such as isalnum(), isalpha(), isupper(), islower(), etc. to -build the table sources. This means that the default C locale which is set for -your system will control the contents of these default tables. You can change -the default tables by editing pcre_chartables.c and then re-building PCRE. If -you do this, you should take care to ensure that the file does not get -automatically re-generated. The best way to do this is to move -pcre_chartables.c.dist out of the way and replace it with your customized -tables. - -When the dftables program is run as a result of --enable-rebuild-chartables, -it uses the default C locale that is set on your system. It does not pay -attention to the LC_xxx environment variables. In other words, it uses the -system's default locale rather than whatever the compiling user happens to have -set. If you really do want to build a source set of character tables in a -locale that is specified by the LC_xxx variables, you can run the dftables -program by hand with the -L option. For example: - - ./dftables -L pcre_chartables.c.special - -The first two 256-byte tables provide lower casing and case flipping functions, -respectively. The next table consists of three 32-byte bit maps which identify -digits, "word" characters, and white space, respectively. These are used when -building 32-byte bit maps that represent character classes for code points less -than 256. - -The final 256-byte table has bits indicating various character types, as -follows: - - 1 white space character - 2 letter - 4 decimal digit - 8 hexadecimal digit - 16 alphanumeric or '_' - 128 regular expression metacharacter or binary zero - -You should not alter the set of characters that contain the 128 bit, as that -will cause PCRE to malfunction. - - -File manifest -------------- - -The distribution should contain the following files: - -(A) Source files of the PCRE library functions and their headers: - - dftables.c auxiliary program for building pcre_chartables.c - when --enable-rebuild-chartables is specified - - pcre_chartables.c.dist a default set of character tables that assume ASCII - coding; used, unless --enable-rebuild-chartables is - specified, by copying to pcre_chartables.c - - pcreposix.c ) - pcre_compile.c ) - pcre_config.c ) - pcre_dfa_exec.c ) - pcre_exec.c ) - pcre_fullinfo.c ) - pcre_get.c ) sources for the functions in the library, - pcre_globals.c ) and some internal functions that they use - pcre_info.c ) - pcre_maketables.c ) - pcre_newline.c ) - pcre_ord2utf8.c ) - pcre_refcount.c ) - pcre_study.c ) - pcre_tables.c ) - pcre_try_flipped.c ) - pcre_ucp_searchfuncs.c ) - pcre_valid_utf8.c ) - pcre_version.c ) - pcre_xclass.c ) - pcre_printint.src ) debugging function that is #included in pcretest, - ) and can also be #included in pcre_compile() - pcre.h.in template for pcre.h when built by "configure" - pcreposix.h header for the external POSIX wrapper API - pcre_internal.h header for internal use - ucp.h ) headers concerned with - ucpinternal.h ) Unicode property handling - ucptable.h ) (this one is the data table) - - config.h.in template for config.h, which is built by "configure" - - pcrecpp.h public header file for the C++ wrapper - pcrecpparg.h.in template for another C++ header file - pcre_scanner.h public header file for C++ scanner functions - pcrecpp.cc ) - pcre_scanner.cc ) source for the C++ wrapper library - - pcre_stringpiece.h.in template for pcre_stringpiece.h, the header for the - C++ stringpiece functions - pcre_stringpiece.cc source for the C++ stringpiece functions - -(B) Source files for programs that use PCRE: - - pcredemo.c simple demonstration of coding calls to PCRE - pcregrep.c source of a grep utility that uses PCRE - pcretest.c comprehensive test program - -(C) Auxiliary files: - - 132html script to turn "man" pages into HTML - AUTHORS information about the author of PCRE - ChangeLog log of changes to the code - CleanTxt script to clean nroff output for txt man pages - Detrail script to remove trailing spaces - HACKING some notes about the internals of PCRE - INSTALL generic installation instructions - LICENCE conditions for the use of PCRE - COPYING the same, using GNU's standard name - Makefile.in ) template for Unix Makefile, which is built by - ) "configure" - Makefile.am ) the automake input that was used to create - ) Makefile.in - NEWS important changes in this release - NON-UNIX-USE notes on building PCRE on non-Unix systems - PrepareRelease script to make preparations for "make dist" - README this file - RunTest a Unix shell script for running tests - RunGrepTest a Unix shell script for pcregrep tests - aclocal.m4 m4 macros (generated by "aclocal") - config.guess ) files used by libtool, - config.sub ) used only when building a shared library - configure a configuring shell script (built by autoconf) - configure.ac ) the autoconf input that was used to build - ) "configure" and config.h - depcomp ) script to find program dependencies, generated by - ) automake - doc/*.3 man page sources for the PCRE functions - doc/*.1 man page sources for pcregrep and pcretest - doc/index.html.src the base HTML page - doc/html/* HTML documentation - doc/pcre.txt plain text version of the man pages - doc/pcretest.txt plain text documentation of test program - doc/perltest.txt plain text documentation of Perl test program - install-sh a shell script for installing files - libpcre.pc.in template for libpcre.pc for pkg-config - libpcrecpp.pc.in template for libpcrecpp.pc for pkg-config - ltmain.sh file used to build a libtool script - missing ) common stub for a few missing GNU programs while - ) installing, generated by automake - mkinstalldirs script for making install directories - perltest.pl Perl test program - pcre-config.in source of script which retains PCRE information - pcrecpp_unittest.cc ) - pcre_scanner_unittest.cc ) test programs for the C++ wrapper - pcre_stringpiece_unittest.cc ) - testdata/testinput* test data for main library tests - testdata/testoutput* expected test results - testdata/grep* input and output for pcregrep tests - -(D) Auxiliary files for cmake support - - CMakeLists.txt - config-cmake.h.in - -(E) Auxiliary files for VPASCAL - - makevp.bat - makevp_c.txt - makevp_l.txt - pcregexp.pas - -(F) Auxiliary files for building PCRE "by hand" - - pcre.h.generic ) a version of the public PCRE header file - ) for use in non-"configure" environments - config.h.generic ) a version of config.h for use in non-"configure" - ) environments - -(F) Miscellaneous - - RunTest.bat a script for running tests under Windows - -Philip Hazel -Email local part: ph10 -Email domain: cam.ac.uk -Last updated: 21 September 2007 diff --git a/pcre-7.4/RunGrepTest b/pcre-7.4/RunGrepTest @@ -1,271 +0,0 @@ -#! /bin/sh - -# Run pcregrep tests. The assumption is that the PCRE tests check the library -# itself. What we are checking here is the file handling and options that are -# supported by pcregrep. - -# Set the C locale, so that sort(1) behaves predictably. -LC_ALL=C -export LC_ALL - -pcregrep=`pwd`/pcregrep - -echo " " -echo "Testing pcregrep" -$pcregrep -V - -cf="diff -ub" -valgrind= - -while [ $# -gt 0 ] ; do - case $1 in - valgrind) valgrind="valgrind -q --leak-check=no";; - *) echo "Unknown argument $1"; exit 1;; - esac - shift -done - -# If PCRE has been built in a directory other than the source directory, and -# this test is being run from "make check" as usual, then $(srcdir) will be -# set. If not, set it to the current directory. We then arrange to run the -# pcregrep command in the source directory so that the file names that appear -# in the output are always the same. - -if [ -z "$srcdir" -o ! -d "$srcdir/testdata" ] ; then - srcdir=. -fi - -# Check for the availability of UTF-8 support - -./pcretest -C | ./pcregrep "No UTF-8 support" >/dev/null -utf8=$? - -echo "---------------------------- Test 1 ------------------------------" >testtry -(cd $srcdir; $valgrind $pcregrep PATTERN ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 2 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep '^PATTERN' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 3 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 4 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -ic PATTERN ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 5 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 6 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 7 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 8 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 9 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry -echo "RC=$?" >>testtry - -echo "---------------------------- Test 10 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -q NEVER-PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry -echo "RC=$?" >>testtry - -echo "---------------------------- Test 11 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -vn pattern ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 12 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -ix pattern ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 13 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -f./testdata/greplist ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 14 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 15 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep 'abc^*' ./testdata/grepinput) 2>>testtry >>testtry - -echo "---------------------------- Test 16 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtry >>testtry - -echo "---------------------------- Test 17 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -M 'the\noutput' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 18 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 19 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -Mix 'Pattern' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 20 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 21 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -nA3 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 22 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -nB3 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 23 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -C3 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 24 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -A9 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 25 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -nB9 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 26 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -A9 -B9 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 27 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -A10 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 28 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -nB10 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 29 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -C12 -B10 'four' ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 30 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 31 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 32 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 33 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep 'fox' ./testdata/grepnonexist) >>testtry 2>&1 -echo "RC=$?" >>testtry - -echo "---------------------------- Test 34 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -s 'fox' ./testdata/grepnonexist) >>testtry 2>&1 -echo "RC=$?" >>testtry - -echo "---------------------------- Test 35 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -L -r --include=grepinputx 'fox' ./testdata) >>testtry -echo "RC=$?" >>testtry - -echo "---------------------------- Test 36 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -L -r --include=grepinput --exclude 'grepinput$' 'fox' ./testdata | sort) >>testtry -echo "RC=$?" >>testtry - -echo "---------------------------- Test 37 -----------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep '^(a+)*\d' ./testdata/grepinput) >>testtry 2>teststderr -echo "RC=$?" >>testtry -echo "======== STDERR ========" >>testtry -cat teststderr >>testtry - -echo "---------------------------- Test 38 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep '>\x00<' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 39 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -A1 'before the binary zero' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 40 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -B1 'after the binary zero' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 41 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 41 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 42 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -on 'before|zero|after' ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 43 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -on -e before -e zero -e after ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 44 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 45 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -e abc -e '(unclosed' ./testdata/grepinput) 2>>testtry >>testtry - -echo "---------------------------- Test 46 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -Fx "AB.VE -elephant" ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 47 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -F "AB.VE -elephant" ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 48 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -F -e DATA -e "AB.VE -elephant" ./testdata/grepinput) >>testtry - -echo "---------------------------- Test 49 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtry - -echo "---------------------------- Test 50 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep -Mv "brown\sfox" ./testdata/grepinputv) >>testtry - -echo "---------------------------- Test 51 ------------------------------" >>testtry -(cd $srcdir; $valgrind $pcregrep --colour=always jumps ./testdata/grepinputv) >>testtry - -# Now compare the results. - -$cf $srcdir/testdata/grepoutput testtry -if [ $? != 0 ] ; then exit 1; fi - - -# These tests require UTF-8 support - -if [ $utf8 -ne 0 ] ; then - echo "Testing pcregrep UTF-8 features" - - echo "---------------------------- Test U1 ------------------------------" >testtry - (cd $srcdir; $valgrind $pcregrep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtry - - echo "---------------------------- Test U2 ------------------------------" >>testtry - (cd $srcdir; $valgrind $pcregrep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>testtry - - $cf $srcdir/testdata/grepoutput8 testtry - if [ $? != 0 ] ; then exit 1; fi - -else - echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library" -fi - - -# We go to some contortions to try to ensure that the tests for the various -# newline settings will work in environments where the normal newline sequence -# is not \n. Do not use exported files, whose line endings might be changed. -# Instead, create an input file using printf so that its contents are exactly -# what we want. Note the messy fudge to get printf to write a string that -# starts with a hyphen. - -echo "Testing pcregrep newline settings" -printf "abc\rdef\r\nghi\njkl" >testNinput - -printf "%c--------------------------- Test N1 ------------------------------\r\n" - >testtry -$valgrind $pcregrep -n -N CR "^(abc|def|ghi|jkl)" testNinput >>testtry - -printf "%c--------------------------- Test N2 ------------------------------\r\n" - >>testtry -$valgrind $pcregrep -n --newline=crlf "^(abc|def|ghi|jkl)" testNinput >>testtry - -printf "%c--------------------------- Test N3 ------------------------------\r\n" - >>testtry -pattern=`printf 'def\rjkl'` -$valgrind $pcregrep -n --newline=cr -F "$pattern" testNinput >>testtry - -printf "%c--------------------------- Test N4 ------------------------------\r\n" - >>testtry -pattern=`printf 'xxx\r\njkl'` -$valgrind $pcregrep -n --newline=crlf -F "$pattern" testNinput >>testtry - -printf "%c--------------------------- Test N5 ------------------------------\r\n" - >>testtry -$valgrind $pcregrep -n --newline=any "^(abc|def|ghi|jkl)" testNinput >>testtry - -printf "%c--------------------------- Test N6 ------------------------------\r\n" - >>testtry -$valgrind $pcregrep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinput >>testtry - -$cf $srcdir/testdata/grepoutputN testtry -if [ $? != 0 ] ; then exit 1; fi - -exit 0 - -# End diff --git a/pcre-7.4/RunTest b/pcre-7.4/RunTest @@ -1,279 +0,0 @@ -#! /bin/sh - -# Run PCRE tests - -cf="diff -u" -valgrind= -testdata=testdata - -if [ -n "$srcdir" -a -d "$srcdir" ] ; then - testdata="$srcdir/testdata" -fi - -# Find which optional facilities are available - -case `./pcretest -C | ./pcregrep 'Internal link size'` in - *2) link_size=2;; - *3) link_size=3;; - *4) link_size=4;; - *) echo "Failed to find internal link size"; exit 1;; -esac - -./pcretest -C | ./pcregrep 'No UTF-8 support' >/dev/null -utf8=$? - -./pcretest -C | ./pcregrep 'No Unicode properties support' >/dev/null -ucp=$? - -# Select which tests to run; for those that are explicitly requested, check -# that the necessary optional facilities are available. - -do1=no -do2=no -do3=no -do4=no -do5=no -do6=no -do7=no -do8=no -do9=no -do10=no - -while [ $# -gt 0 ] ; do - case $1 in - 1) do1=yes;; - 2) do2=yes;; - 3) do3=yes;; - 4) do4=yes;; - 5) do5=yes;; - 6) do6=yes;; - 7) do7=yes;; - 8) do8=yes;; - 9) do9=yes;; - 10) do10=yes;; - valgrind) valgrind="valgrind -q";; - *) echo "Unknown test number $1"; exit 1;; - esac - shift -done - -if [ $utf8 -eq 0 ] ; then - if [ $do4 = yes ] ; then - echo "Can't run test 4 because UTF-8 support is not configured" - exit 1 - fi - if [ $do5 = yes ] ; then - echo "Can't run test 5 because UTF-8 support is not configured" - exit 1 - fi - if [ $do8 = yes ] ; then - echo "Can't run test 8 because UTF-8 support is not configured" - exit 1 - fi -fi - -if [ $ucp -eq 0 ] ; then - if [ $do6 = yes ] ; then - echo "Can't run test 6 because Unicode property support is not configured" - exit 1 - fi - if [ $do9 = yes ] ; then - echo "Can't run test 9 because Unicode property support is not configured" - exit 1 - fi - if [ $do10 = yes ] ; then - echo "Can't run test 10 because Unicode property support is not configured" - exit 1 - fi -fi - -if [ $link_size -ne 2 ] ; then - if [ $do10 = yes ] ; then - echo "Can't run test 10 because the link size ($link_size) is not 2" - exit 1 - fi -fi - -# If no specific tests were requested, select all that are relevant. - -if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \ - $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ - $do9 = no -a $do10 = no ] ; then - do1=yes - do2=yes - do3=yes - if [ $utf8 -ne 0 ] ; then do4=yes; fi - if [ $utf8 -ne 0 ] ; then do5=yes; fi - if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do6=yes; fi - do7=yes - if [ $utf8 -ne 0 ] ; then do8=yes; fi - if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do9=yes; fi - if [ $link_size -eq 2 -a $ucp -ne 0 ] ; then do10=yes; fi -fi - -# Show which release - -echo "" -echo PCRE C library tests -./pcretest /dev/null - -# Primary test, Perl-compatible - -if [ $do1 = yes ] ; then - echo "Test 1: main functionality (Perl compatible)" - $valgrind ./pcretest -q $testdata/testinput1 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput1 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -# PCRE tests that are not Perl-compatible - API & error tests, mostly - -if [ $do2 = yes ] ; then - echo "Test 2: API and error handling (not Perl compatible)" - $valgrind ./pcretest -q $testdata/testinput2 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput2 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -# Locale-specific tests, provided that either the "fr_FR" or the "french" -# locale is available. The former is the Unix-like standard; the latter is -# for Windows. - -if [ $do3 = yes ] ; then - locale -a | grep '^fr_FR$' >/dev/null - if [ $? -eq 0 ] ; then - locale=fr_FR - infile=$testdata/testinput3 - outfile=$testdata/testoutput3 - else - locale -a | grep '^french$' >/dev/null - if [ $? -eq 0 ] ; then - locale=french - sed 's/fr_FR/french/' $testdata/testinput3 >test3input - sed 's/fr_FR/french/' $testdata/testoutput3 >test3output - infile=test3input - outfile=test3output - else - locale= - fi - fi - - if [ "$locale" != "" ] ; then - echo "Test 3: locale-specific features (using '$locale' locale)" - $valgrind ./pcretest -q $infile testtry - if [ $? = 0 ] ; then - $cf $outfile testtry - if [ $? != 0 ] ; then - echo " " - echo "Locale test did not run entirely successfully." - echo "This usually means that there is a problem with the locale" - echo "settings rather than a bug in PCRE." - else - echo "OK" - fi - else exit 1 - fi - else - echo "Cannot test locale-specific features - neither the 'fr_FR' nor the" - echo "'french' locale exists, or the \"locale\" command is not available" - echo "to check for them." - echo " " - fi -fi - -# Additional tests for UTF8 support - -if [ $do4 = yes ] ; then - echo "Test 4: UTF-8 support (Perl compatible)" - $valgrind ./pcretest -q $testdata/testinput4 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput4 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -if [ $do5 = yes ] ; then - echo "Test 5: API and internals for UTF-8 support (not Perl compatible)" - $valgrind ./pcretest -q $testdata/testinput5 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput5 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -if [ $do6 = yes ] ; then - echo "Test 6: Unicode property support" - $valgrind ./pcretest -q $testdata/testinput6 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput6 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -# Tests for DFA matching support - -if [ $do7 = yes ] ; then - echo "Test 7: DFA matching" - $valgrind ./pcretest -q -dfa $testdata/testinput7 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput7 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -if [ $do8 = yes ] ; then - echo "Test 8: DFA matching with UTF-8" - $valgrind ./pcretest -q -dfa $testdata/testinput8 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput8 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -if [ $do9 = yes ] ; then - echo "Test 9: DFA matching with Unicode properties" - $valgrind ./pcretest -q -dfa $testdata/testinput9 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput9 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -# Test of internal offsets and code sizes. This test is run only when there -# is Unicode property support and the link size is 2. The actual tests are -# mostly the same as in some of the above, but in this test we inspect some -# offsets and sizes that require a known link size. This is a doublecheck for -# the maintainer, just in case something changes unexpectely. - -if [ $do10 = yes ] ; then - echo "Test 10: Internal offsets and code size tests" - $valgrind ./pcretest -q $testdata/testinput10 testtry - if [ $? = 0 ] ; then - $cf $testdata/testoutput10 testtry - if [ $? != 0 ] ; then exit 1; fi - else exit 1 - fi - echo "OK" -fi - -# End diff --git a/pcre-7.4/RunTest.bat b/pcre-7.4/RunTest.bat @@ -1,39 +0,0 @@ -@rem This file was contributed by Ralf Junker, and touched up by -@rem Daniel Richard G. Test 10 added by Philip H. -@rem Philip H also changed test 3 to use "wintest" files. -@rem -@rem MS Windows batch file to run pcretest on testfiles with the correct -@rem options. -@rem -@rem Output is written to a newly created subfolder named "testdata". - -setlocal - -if [%srcdir%]==[] set srcdir=. -if [%pcretest%]==[] set pcretest=pcretest - -if not exist testout md testout - -%pcretest% -q %srcdir%\testdata\testinput1 > testout\testoutput1 -%pcretest% -q %srcdir%\testdata\testinput2 > testout\testoutput2 -@rem %pcretest% -q %srcdir%\testdata\testinput3 > testout\testoutput3 -%pcretest% -q %srcdir%\testdata\wintestinput3 > testout\wintestoutput3 -%pcretest% -q %srcdir%\testdata\testinput4 > testout\testoutput4 -%pcretest% -q %srcdir%\testdata\testinput5 > testout\testoutput5 -%pcretest% -q %srcdir%\testdata\testinput6 > testout\testoutput6 -%pcretest% -q -dfa %srcdir%\testdata\testinput7 > testout\testoutput7 -%pcretest% -q -dfa %srcdir%\testdata\testinput8 > testout\testoutput8 -%pcretest% -q -dfa %srcdir%\testdata\testinput9 > testout\testoutput9 -%pcretest% -q %srcdir%\testdata\testinput10 > testout\testoutput10 - -fc /n %srcdir%\testdata\testoutput1 testout\testoutput1 -fc /n %srcdir%\testdata\testoutput2 testout\testoutput2 -rem fc /n %srcdir%\testdata\testoutput3 testout\testoutput3 -fc /n %srcdir%\testdata\wintestoutput3 testout\wintestoutput3 -fc /n %srcdir%\testdata\testoutput4 testout\testoutput4 -fc /n %srcdir%\testdata\testoutput5 testout\testoutput5 -fc /n %srcdir%\testdata\testoutput6 testout\testoutput6 -fc /n %srcdir%\testdata\testoutput7 testout\testoutput7 -fc /n %srcdir%\testdata\testoutput8 testout\testoutput8 -fc /n %srcdir%\testdata\testoutput9 testout\testoutput9 -fc /n %srcdir%\testdata\testoutput10 testout\testoutput10 diff --git a/pcre-7.4/aclocal.m4 b/pcre-7.4/aclocal.m4 @@ -1,7471 +0,0 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 50 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] - -# Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Check if we have a version mismatch between libtool.m4 and ltmain.sh. -# -# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. -# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually -# calls AC_LIBTOOL_CONFIG and creates libtool. -# -_LT_VERSION_CHECK - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_VERSION_CHECK -# ----------------- -AC_DEFUN([_LT_VERSION_CHECK], -[AC_MSG_CHECKING([for correct ltmain.sh version]) -if test "x$ltmain" = "x" ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - -*** @<:@Gentoo@:>@ sanity check failed! *** -*** \$ltmain is not defined, please check the patch for consistency! *** -]) -fi -gentoo_lt_version="1.5.23b" -gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"` -if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - -*** @<:@Gentoo@:>@ sanity check failed! *** -*** libtool.m4 and ltmain.sh have a version mismatch! *** -*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** - -Please run: - - libtoolize --copy --force - -if appropriate, please contact the maintainer of this -package (or your distribution) for help. -]) -else - AC_MSG_RESULT(yes) -fi -])# _LT_VERSION_CHECK - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<EOF -[$]* -EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break - ;; - *) - test "$with_gnu_ld" != yes && break - ;; - esac - fi - done - IFS="$lt_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$lt_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -])# AC_PROG_LD - - -# AC_PROG_LD_GNU -# -------------- -AC_DEFUN([AC_PROG_LD_GNU], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac]) -with_gnu_ld=$lt_cv_prog_gnu_ld -])# AC_PROG_LD_GNU - - -# AC_PROG_LD_RELOAD_FLAG -# ---------------------- -# find reload flag for linker -# -- PORTME Some linkers may need a different reload flag. -AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], -[AC_CACHE_CHECK([for $LD option to reload object files], - lt_cv_ld_reload_flag, - [lt_cv_ld_reload_flag='-r']) -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac -])# AC_PROG_LD_RELOAD_FLAG - - -# AC_DEPLIBS_CHECK_METHOD -# ----------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix3*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_ins