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

Diff of /code/trunk/README

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

revision 65 by nigel, Sat Feb 24 21:40:08 2007 UTC revision 73 by nigel, Sat Feb 24 21:40:30 2007 UTC
# Line 16  regex.h, but I didn't want to risk possi Line 16  regex.h, but I didn't want to risk possi
16  that name by distributing it that way. To use it with an existing program that  that name by distributing it that way. To use it with an existing program that
17  uses the POSIX API, it will have to be renamed or pointed at by a link.  uses the POSIX API, it will have to be renamed or pointed at by a link.
18    
19    If you are using the POSIX interface to PCRE and there is already a POSIX regex
20    library installed on your system, you must take care when linking programs to
21    ensure that they link with PCRE's libpcreposix library. Otherwise they may pick
22    up the "real" POSIX functions of the same name.
23    
24    
25  Contributions by users of PCRE  Contributions by users of PCRE
26  ------------------------------  ------------------------------
# Line 96  library. You can read more about them in Line 101  library. You can read more about them in
101    is a representation of the compiled pattern, and this changes with the link    is a representation of the compiled pattern, and this changes with the link
102    size.    size.
103    
104    . You can build PCRE so that its match() function does not call itself
105      recursively. Instead, it uses blocks of data from the heap via special
106      functions pcre_stack_malloc() and pcre_stack_free() to save data that would
107      otherwise be saved on the stack. To build PCRE like this, use
108    
109      --disable-stack-for-recursion
110    
111      on the "configure" command. PCRE runs more slowly in this mode, but it may be
112      necessary in environments with limited stack sizes.
113    
114  The "configure" script builds five files:  The "configure" script builds five files:
115    
116  . libtool is a script that builds shared and/or static libraries  . libtool is a script that builds shared and/or static libraries
# Line 125  included in makefiles for programs that Line 140  included in makefiles for programs that
140  having to remember too many details.  having to remember too many details.
141    
142    
 Cross-compiling PCRE on a Unix-like system  
 ------------------------------------------  
   
 PCRE needs to compile and run an auxiliary program as part of the building  
 process. Obviously, if the real compilation is for some other system, it can't  
 use the same CC and CFLAGS values when it is doing this. For cross compilation,  
 therefore, you must set CC_FOR_BUILD to the local host's compiler, and you can  
 set flags in CFLAGS_FOR_BUILD if you need to.  
   
   
143  Shared libraries on Unix-like systems  Shared libraries on Unix-like systems
144  -------------------------------------  -------------------------------------
145    
# Line 169  order to cross-compile PCRE for some oth Line 174  order to cross-compile PCRE for some oth
174  process, the dftables.c source file is compiled *and run* on the local host, in  process, the dftables.c source file is compiled *and run* on the local host, in
175  order to generate the default character tables (the chartables.c file). It  order to generate the default character tables (the chartables.c file). It
176  therefore needs to be compiled with the local compiler, not the cross compiler.  therefore needs to be compiled with the local compiler, not the cross compiler.
177  You can do this by specifying HOST_CC (and if necessary HOST_CFLAGS) when  You can do this by specifying CC_FOR_BUILD (and if necessary CFLAGS_FOR_BUILD)
178  calling the "configure" command. If they are not specified, they default to the  when calling the "configure" command. If they are not specified, they default
179  values of CC and CFLAGS.  to the values of CC and CFLAGS.
180    
181    
182  Building on non-Unix systems  Building on non-Unix systems
183  ----------------------------  ----------------------------
184    
185  For a non-Unix system, read the comments in the file NON-UNIX-USE. PCRE has  For a non-Unix system, read the comments in the file NON-UNIX-USE, though if
186  been compiled on Windows systems and on Macintoshes, but I don't know the  the system supports the use of "configure" and "make" you may be able to build
187  details because I don't use those systems. It should be straightforward to  PCRE in the same way as for Unix systems.
188    
189    PCRE has been compiled on Windows systems and on Macintoshes, but I don't know
190    the details because I don't use those systems. It should be straightforward to
191  build PCRE on any system that has a Standard C compiler, because it uses only  build PCRE on any system that has a Standard C compiler, because it uses only
192  Standard C functions.  Standard C functions.
193    
# Line 189  Testing PCRE Line 197  Testing PCRE
197    
198  To test PCRE on a Unix system, run the RunTest script that is created by the  To test PCRE on a Unix system, run the RunTest script that is created by the
199  configuring process. (This can also be run by "make runtest", "make check", or  configuring process. (This can also be run by "make runtest", "make check", or
200  "make test".) For other systems, see the instruction in NON-UNIX-USE.  "make test".) For other systems, see the instructions in NON-UNIX-USE.
201    
202  The script runs the pcretest test program (which is documented in its own man  The script runs the pcretest test program (which is documented in its own man
203  page) on each of the testinput files (in the testdata directory) in turn,  page) on each of the testinput files (in the testdata directory) in turn,
# Line 222  bug in PCRE. Line 230  bug in PCRE.
230    
231  The third set of tests checks pcre_maketables(), the facility for building a  The third set of tests checks pcre_maketables(), the facility for building a
232  set of character tables for a specific locale and using them instead of the  set of character tables for a specific locale and using them instead of the
233  default tables. The tests make use of the "fr" (French) locale. Before running  default tables. The tests make use of the "fr_FR" (French) locale. Before
234  the test, the script checks for the presence of this locale by running the  running the test, the script checks for the presence of this locale by running
235  "locale" command. If that command fails, or if it doesn't include "fr" in the  the "locale" command. If that command fails, or if it doesn't include "fr_FR"
236  list of available locales, the third test cannot be run, and a comment is  in the list of available locales, the third test cannot be run, and a comment
237  output to say why. If running this test produces instances of the error  is output to say why. If running this test produces instances of the error
238    
239    ** Failed to set locale "fr"    ** Failed to set locale "fr_FR"
240    
241  in the comparison output, it means that locale is not available on your system,  in the comparison output, it means that locale is not available on your system,
242  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.
# Line 354  The distribution should contain the foll Line 362  The distribution should contain the foll
362    makevp.bat    makevp.bat
363    
364  Philip Hazel <ph10@cam.ac.uk>  Philip Hazel <ph10@cam.ac.uk>
365  February 2003  December 2003

Legend:
Removed from v.65  
changed lines
  Added in v.73

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12