/[pcre]/code/trunk/README
ViewVC logotype

Diff of /code/trunk/README

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 149 by ph10, Mon Apr 16 15:28:08 2007 UTC revision 338 by ph10, Sun Apr 13 14:58:34 2008 UTC
# Line 103  Building PCRE on non-Unix systems Line 103  Building PCRE on non-Unix systems
103    
104  For a non-Unix system, please read the comments in the file NON-UNIX-USE,  For a non-Unix system, please read the comments in the file NON-UNIX-USE,
105  though if your system supports the use of "configure" and "make" you may be  though if your system supports the use of "configure" and "make" you may be
106  able to build PCRE in the same way as for Unix-like systems.  able to build PCRE in the same way as for Unix-like systems. PCRE can also be
107    configured in many platform environments using the GUI facility of CMake's
108    CMakeSetup. It creates Makefiles, solution files, etc.
109    
110  PCRE has been compiled on many different operating systems. It should be  PCRE has been compiled on many different operating systems. It should be
111  straightforward to build PCRE on any system that has a Standard C compiler and  straightforward to build PCRE on any system that has a Standard C compiler and
# Line 117  If you are using HP's ANSI C++ compiler Line 119  If you are using HP's ANSI C++ compiler
119  in the section entitled "Using HP's ANSI C++ compiler (aCC)" below.  in the section entitled "Using HP's ANSI C++ compiler (aCC)" below.
120    
121  The following instructions assume the use of the widely used "configure, make,  The following instructions assume the use of the widely used "configure, make,
122  make install" process. There is also some experimental support for "cmake" in  make install" process. There is also support for CMake in the PCRE
123  the PCRE distribution, but it is incomplete and not documented. However, if you  distribution; there are some comments about using CMake in the NON-UNIX-USE
124  are a "cmake" user, you might want to try it.  file, though it can also be used in Unix-like systems.
125    
126  To build PCRE on a Unix-like system, first run the "configure" command from the  To build PCRE on a Unix-like system, first run the "configure" command from the
127  PCRE distribution directory, with your current directory set to the directory  PCRE distribution directory, with your current directory set to the directory
# Line 184  library. You can read more about them in Line 186  library. You can read more about them in
186    --enable-newline-is-any, many tests should succeed, but there may be some    --enable-newline-is-any, many tests should succeed, but there may be some
187    failures.    failures.
188    
189    . By default, the sequence \R in a pattern matches any Unicode line ending
190      sequence. This is independent of the option specifying what PCRE considers to
191      be the end of a line (see above). However, the caller of PCRE can restrict \R
192      to match only CR, LF, or CRLF. You can make this the default by adding
193      --enable-bsr-anycrlf to the "configure" command (bsr = "backslash R").
194    
195  . When called via the POSIX interface, PCRE uses malloc() to get additional  . When called via the POSIX interface, PCRE uses malloc() to get additional
196    storage for processing capturing parentheses if there are more than 10 of    storage for processing capturing parentheses if there are more than 10 of
197    them in a pattern. You can increase this threshold by setting, for example,    them in a pattern. You can increase this threshold by setting, for example,
# Line 250  library. You can read more about them in Line 258  library. You can read more about them in
258    
259    This automatically implies --enable-rebuild-chartables (see above).    This automatically implies --enable-rebuild-chartables (see above).
260    
261    . It is possible to compile pcregrep to use libz and/or libbz2, in order to
262      read .gz and .bz2 files (respectively), by specifying one or both of
263    
264      --enable-pcregrep-libz
265      --enable-pcregrep-libbz2
266    
267      Of course, the relevant libraries must be installed on your system.
268    
269    . It is possible to compile pcretest so that it links with the libreadline
270      library, by specifying
271    
272      --enable-pcretest-libreadline
273    
274      If this is done, when pcretest's input is from a terminal, it reads it using
275      the readline() function. This provides line-editing and history facilities.
276      Note that libreadline is GPL-licenced, so if you distribute a binary of
277      pcretest linked in this way, there may be licensing issues.
278    
279      Setting this option causes the -lreadline option to be added to the pcretest
280      build. In many operating environments with a sytem-installed readline
281      library this is sufficient. However, in some environments (e.g. if an
282      unmodified distribution version of readline is in use), it may be necessary
283      to specify something like LIBS="-lncurses" as well. This is because, to quote
284      the readline INSTALL, "Readline uses the termcap functions, but does not link
285      with the termcap or curses library itself, allowing applications which link
286      with readline the to choose an appropriate library."
287    
288  The "configure" script builds the following files for the basic C library:  The "configure" script builds the following files for the basic C library:
289    
290  . Makefile is the makefile that builds the library  . Makefile is the makefile that builds the library
# Line 277  script that can be run to recreate the c Line 312  script that can be run to recreate the c
312  contains compiler output from tests that "configure" runs.  contains compiler output from tests that "configure" runs.
313    
314  Once "configure" has run, you can run "make". It builds two libraries, called  Once "configure" has run, you can run "make". It builds two libraries, called
315  libpcre and libpcreposix, a test program called pcretest, a demonstration  libpcre and libpcreposix, a test program called pcretest, and the pcregrep
316  program called pcredemo, and the pcregrep command. If a C++ compiler was found  command. If a C++ compiler was found on your system, "make" also builds the C++
317  on your system, "make" also builds the C++ wrapper library, which is called  wrapper library, which is called libpcrecpp, and some test programs called
318  libpcrecpp, and some test programs called pcrecpp_unittest,  pcrecpp_unittest, pcre_scanner_unittest, and pcre_stringpiece_unittest.
319  pcre_scanner_unittest, and pcre_stringpiece_unittest. Building the C++ wrapper  Building the C++ wrapper can be disabled by adding --disable-cpp to the
320  can be disabled by adding --disable-cpp to the "configure" command.  "configure" command.
321    
322  The command "make check" runs all the appropriate tests. Details of the PCRE  The command "make check" runs all the appropriate tests. Details of the PCRE
323  tests are given below in a separate section of this document.  tests are given below in a separate section of this document.
# Line 334  system. The following are installed (fil Line 369  system. The following are installed (fil
369      pcretest.txt   the pcretest man page      pcretest.txt   the pcretest man page
370      pcregrep.txt   the pcregrep man page      pcregrep.txt   the pcregrep man page
371    
 Note that the pcredemo program that is built by "configure" is *not* installed  
 anywhere. It is a demonstration for programmers wanting to use PCRE.  
   
372  If you want to remove PCRE from your system, you can run "make uninstall".  If you want to remove PCRE from your system, you can run "make uninstall".
373  This removes all the files that "make install" installed. However, it does not  This removes all the files that "make install" installed. However, it does not
374  remove any directories, because these are often shared with other programs.  remove any directories, because these are often shared with other programs.
# Line 436  Making new tarballs Line 468  Making new tarballs
468  -------------------  -------------------
469    
470  The command "make dist" creates three PCRE tarballs, in tar.gz, tar.bz2, and  The command "make dist" creates three PCRE tarballs, in tar.gz, tar.bz2, and
471  zip formats. However, if you have modified any of the man page sources in the  zip formats. The command "make distcheck" does the same, but then does a trial
472  doc directory, you should first run the PrepareRelease script. This re-creates  build of the new distribution to ensure that it works.
473  the .txt and HTML forms of the documentation from the man pages.  
474    If you have modified any of the man page sources in the doc directory, you
475    should first run the PrepareRelease script before making a distribution. This
476    script creates the .txt and HTML forms of the documentation from the man pages.
477    
478    
479  Testing PCRE  Testing PCRE
# Line 497  in the comparison output, it means that Line 532  in the comparison output, it means that
532  despite being listed by "locale". This does not mean that PCRE is broken.  despite being listed by "locale". This does not mean that PCRE is broken.
533    
534  [If you are trying to run this test on Windows, you may be able to get it to  [If you are trying to run this test on Windows, you may be able to get it to
535  work by changing "fr_FR" to "french" everywhere it occurs.]  work by changing "fr_FR" to "french" everywhere it occurs. Alternatively, use
536    RunTest.bat. The version of RunTest.bat included with PCRE 7.4 and above uses
537    Windows versions of test 2. More info on using RunTest.bat is included in the
538    document entitled NON-UNIX-USE.]
539    
540  The fourth test checks the UTF-8 support. It is not run automatically unless  The fourth test checks the UTF-8 support. It is not run automatically unless
541  PCRE is built with UTF-8 support. To do this you must set --enable-utf8 when  PCRE is built with UTF-8 support. To do this you must set --enable-utf8 when
# Line 711  The distribution should contain the foll Line 749  The distribution should contain the foll
749  Philip Hazel  Philip Hazel
750  Email local part: ph10  Email local part: ph10
751  Email domain: cam.ac.uk  Email domain: cam.ac.uk
752  Last updated: 16 April 2007  Last updated: 13 April 2008

Legend:
Removed from v.149  
changed lines
  Added in v.338

  ViewVC Help
Powered by ViewVC 1.1.5