| 42 |
(1) Copy or rename the file config.h.generic as config.h, and edit the macro |
(1) Copy or rename the file config.h.generic as config.h, and edit the macro |
| 43 |
settings that it contains to whatever is appropriate for your environment. |
settings that it contains to whatever is appropriate for your environment. |
| 44 |
In particular, if you want to force a specific value for newline, you can |
In particular, if you want to force a specific value for newline, you can |
| 45 |
define the NEWLINE macro. |
define the NEWLINE macro. When you compile any of the PCRE modules, you |
| 46 |
|
must specify -DHAVE_CONFIG_H to your compiler so that config.h is included |
| 47 |
|
in the sources. |
| 48 |
|
|
| 49 |
An alternative approach is not to edit config.h, but to use -D on the |
An alternative approach is not to edit config.h, but to use -D on the |
| 50 |
compiler command line to make any changes that you need. |
compiler command line to make any changes that you need to the |
| 51 |
|
configuration options. In this case -DHAVE_CONFIG_H must not be set. |
| 52 |
|
|
| 53 |
NOTE: There have been occasions when the way in which certain parameters |
NOTE: There have been occasions when the way in which certain parameters |
| 54 |
in config.h are used has changed between releases. (In the configure/make |
in config.h are used has changed between releases. (In the configure/make |
| 62 |
Copy or rename file pcre_chartables.c.dist as pcre_chartables.c. |
Copy or rename file pcre_chartables.c.dist as pcre_chartables.c. |
| 63 |
|
|
| 64 |
OR: |
OR: |
| 65 |
Compile dftables.c as a stand-alone program, and then run it with the |
Compile dftables.c as a stand-alone program (using -DHAVE_CONFIG_H if |
| 66 |
single argument "pcre_chartables.c". This generates a set of standard |
you have set up config.h), and then run it with the single argument |
| 67 |
character tables and writes them to that file. The tables are generated |
"pcre_chartables.c". This generates a set of standard character tables |
| 68 |
using the default C locale for your system. If you want to use a locale |
and writes them to that file. The tables are generated using the default |
| 69 |
that is specified by LC_xxx environment variables, add the -L option to |
C locale for your system. If you want to use a locale that is specified |
| 70 |
the dftables command. You must use this method if you are building on |
by LC_xxx environment variables, add the -L option to the dftables |
| 71 |
a system that uses EBCDIC code. |
command. You must use this method if you are building on a system that |
| 72 |
|
uses EBCDIC code. |
| 73 |
|
|
| 74 |
The tables in pcre_chartables.c are defaults. The caller of PCRE can |
The tables in pcre_chartables.c are defaults. The caller of PCRE can |
| 75 |
specify alternative tables at run time. |
specify alternative tables at run time. |
| 86 |
|
|
| 87 |
pcre_printint.src |
pcre_printint.src |
| 88 |
|
|
| 89 |
(6) Compile the following source files: |
(6) Compile the following source files, setting -DHAVE_CONFIG_H as a compiler |
| 90 |
|
option if you have set up config.h with your configuration, or else use |
| 91 |
|
other -D settings to change the configuration as required. |
| 92 |
|
|
| 93 |
pcre_chartables.c |
pcre_chartables.c |
| 94 |
pcre_compile.c |
pcre_compile.c |
| 121 |
your system has static and shared libraries, you may have to do this once |
your system has static and shared libraries, you may have to do this once |
| 122 |
for each type. |
for each type. |
| 123 |
|
|
| 124 |
(8) Similarly, compile pcreposix.c and link the result (on its own) as the |
(8) Similarly, compile pcreposix.c (remembering -DHAVE_CONFIG_H if necessary) |
| 125 |
pcreposix library. |
and link the result (on its own) as the pcreposix library. |
| 126 |
|
|
| 127 |
(9) Compile the test program pcretest.c. This needs the functions in the |
(9) Compile the test program pcretest.c (again, don't forget -DHAVE_CONFIG_H). |
| 128 |
pcre and pcreposix libraries when linking. It also needs the |
This needs the functions in the pcre and pcreposix libraries when linking. |
| 129 |
pcre_printint.src source file, which it #includes. |
It also needs the pcre_printint.src source file, which it #includes. |
| 130 |
|
|
| 131 |
(10) Run pcretest on the testinput files in the testdata directory, and check |
(10) Run pcretest on the testinput files in the testdata directory, and check |
| 132 |
that the output matches the corresponding testoutput files. Note that the |
that the output matches the corresponding testoutput files. Note that the |
| 321 |
$! |
$! |
| 322 |
========================= |
========================= |
| 323 |
|
|
| 324 |
Last Updated: 01 August 2007 |
Last Updated: 11 September 2007 |
| 325 |
**** |
**** |