source: trunk/third/pcre/NON-UNIX-USE @ 19309

Revision 19309, 2.4 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r19308, which included commits to RCS files with non-trunk default branches.
Line 
1Compiling PCRE on non-Unix systems
2----------------------------------
3
4If you want to compile PCRE for a non-Unix system, note that it consists
5entirely of code written in Standard C, and so should compile successfully
6on any machine with a Standard C compiler and library, using normal compiling
7commands to do the following:
8
9(1) Copy or rename the file config.in as config.h, and change the macros that
10define HAVE_STRERROR and HAVE_MEMMOVE to define them as 1 rather than 0.
11Unfortunately, because of the way Unix autoconf works, the default setting has
12to be 0. You may also want to make changes to other macros in config.h. In
13particular, if you want to force a specific value for newline, you can define
14the NEWLINE macro. The default is to use '\n', thereby using whatever value
15your compiler gives to '\n'.
16
17(2) Copy or rename the file pcre.in as pcre.h, and change the macro definitions
18for PCRE_MAJOR, PCRE_MINOR, and PCRE_DATE near its start to the values set in
19configure.in.
20
21(3) Compile dftables.c as a stand-alone program, and then run it with
22the standard output sent to chartables.c. This generates a set of standard
23character tables.
24
25(4) Compile maketables.c, get.c, study.c and pcre.c and link them all
26together into an object library in whichever form your system keeps such
27libraries. This is the pcre library (chartables.c gets included by means of an
28#include directive).
29
30(5) Similarly, compile pcreposix.c and link it as the pcreposix library.
31
32(6) Compile the test program pcretest.c. This needs the functions in the
33pcre and pcreposix libraries when linking.
34
35(7) Run pcretest on the testinput files in the testdata directory, and check
36that the output matches the corresponding testoutput files. You must use the
37-i option when checking testinput2.
38
39If you have a system without "configure" but where you can use a Makefile, edit
40Makefile.in to create Makefile, substituting suitable values for the variables
41at the head of the file.
42
43Some help in building a Win32 DLL of PCRE in GnuWin32 environments was
44contributed by Paul.Sokolovsky@technologist.com. These environments are
45Mingw32 (http://www.xraylith.wisc.edu/~khan/software/gnu-win32/) and
46CygWin  (http://sourceware.cygnus.com/cygwin/). Paul comments:
47
48  For CygWin, set CFLAGS=-mno-cygwin, and do 'make dll'. You'll get
49  pcre.dll (containing pcreposix also), libpcre.dll.a, and dynamically
50  linked pgrep and pcretest. If you have /bin/sh, run RunTest (three
51  main test go ok, locale not supported).
52
53****
Note: See TracBrowser for help on using the repository browser.