| 68 |
Building PCRE on a Unix-like system |
Building PCRE on a Unix-like system |
| 69 |
----------------------------------- |
----------------------------------- |
| 70 |
|
|
| 71 |
|
If you are using HP's ANSI C++ compiler (aCC), please see the special note |
| 72 |
|
in the section entitled "Using HP's ANSI C++ compiler (aCC)" below. |
| 73 |
|
|
| 74 |
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 |
| 75 |
PCRE distribution directory, with your current directory set to the directory |
PCRE distribution directory, with your current directory set to the directory |
| 76 |
where you want the files to be created. This command is a standard GNU |
where you want the files to be created. This command is a standard GNU |
| 94 |
cd /build/pcre/pcre-xxx |
cd /build/pcre/pcre-xxx |
| 95 |
/source/pcre/pcre-xxx/configure |
/source/pcre/pcre-xxx/configure |
| 96 |
|
|
| 97 |
|
PCRE is written in C and is normally compiled as a C library. However, it is |
| 98 |
|
possible to build it as a C++ library, though the provided building apparatus |
| 99 |
|
does not have any features to support this. |
| 100 |
|
|
| 101 |
There are some optional features that can be included or omitted from the PCRE |
There are some optional features that can be included or omitted from the PCRE |
| 102 |
library. You can read more about them in the pcrebuild man page. |
library. You can read more about them in the pcrebuild man page. |
| 103 |
|
|
| 118 |
property table); only the basic two-letter properties such as Lu are |
property table); only the basic two-letter properties such as Lu are |
| 119 |
supported. |
supported. |
| 120 |
|
|
| 121 |
. You can build PCRE to recognized CR or NL as the newline character, instead |
. You can build PCRE to recognize either CR or LF as the newline character, |
| 122 |
of whatever your compiler uses for "\n", by adding --newline-is-cr or |
instead of whatever your compiler uses for "\n", by adding --newline-is-cr or |
| 123 |
--newline-is-nl to the "configure" command, respectively. Only do this if you |
--newline-is-lf to the "configure" command, respectively. Only do this if you |
| 124 |
really understand what you are doing. On traditional Unix-like systems, the |
really understand what you are doing. On traditional Unix-like systems, the |
| 125 |
newline character is NL. |
newline character is LF. |
| 126 |
|
|
| 127 |
. When called via the POSIX interface, PCRE uses malloc() to get additional |
. When called via the POSIX interface, PCRE uses malloc() to get additional |
| 128 |
storage for processing capturing parentheses if there are more than 10 of |
storage for processing capturing parentheses if there are more than 10 of |
| 269 |
to the values of CC and CFLAGS. |
to the values of CC and CFLAGS. |
| 270 |
|
|
| 271 |
|
|
| 272 |
|
Using HP's ANSI C++ compiler (aCC) |
| 273 |
|
---------------------------------- |
| 274 |
|
|
| 275 |
|
Unless C++ support is disabled by specifiying the "--disable-cpp" option of the |
| 276 |
|
"configure" script, you *must* include the "-AA" option in the CXXFLAGS |
| 277 |
|
environment variable in order for the C++ components to compile correctly. |
| 278 |
|
|
| 279 |
|
Also, note that the aCC compiler on PA-RISC platforms may have a defect whereby |
| 280 |
|
needed libraries fail to get included when specifying the "-AA" compiler |
| 281 |
|
option. If you experience unresolved symbols when linking the C++ programs, |
| 282 |
|
use the workaround of specifying the following environment variable prior to |
| 283 |
|
running the "configure" script: |
| 284 |
|
|
| 285 |
|
CXXLDFLAGS="-lstd_v2 -lCsup_v2" |
| 286 |
|
|
| 287 |
|
|
| 288 |
Building on non-Unix systems |
Building on non-Unix systems |
| 289 |
---------------------------- |
---------------------------- |
| 290 |
|
|
| 453 |
pcre_internal.h header for internal use |
pcre_internal.h header for internal use |
| 454 |
config.in template for config.h, which is built by configure |
config.in template for config.h, which is built by configure |
| 455 |
|
|
| 456 |
pcrecpp.h.in "source" for the header file for the C++ wrapper |
pcrecpp.h the header file for the C++ wrapper |
| 457 |
|
pcrecpparg.h.in "source" for another C++ header file |
| 458 |
pcrecpp.cc ) |
pcrecpp.cc ) |
| 459 |
pcre_scanner.cc ) source for the C++ wrapper library |
pcre_scanner.cc ) source for the C++ wrapper library |
| 460 |
|
|
| 515 |
Philip Hazel |
Philip Hazel |
| 516 |
Email local part: ph10 |
Email local part: ph10 |
| 517 |
Email domain: cam.ac.uk |
Email domain: cam.ac.uk |
| 518 |
August 2005 |
January 2006 |