README
1This is a modified version of Henry Spencer's "BSD" regular expression
2library. The original library can be found at
3https://github.com/garyhouston/regex. A description of Spencer's
4various libraries can be found at https://garyhouston.github.io/regex/
5
6The changes in this version are:
7
8* The library name has been changed to rxspencer, the header installs
9 into a directory rxspencer, and the man pages named accordingly, to
10 allow easy installation as a system library on Linux without
11 conflicting with other regex libraries.
12* A CMake build system, which can build either static or shared
13 libraries, maybe even on non-Unix systems.
14* A few code modernizations and changes to improve portabilty, avoid
15 compiler warnings, and improve robustness.
16
17I (Gary Houston) originally made this version with a build system
18based on GNU Automake and Libtool, to allow building a shared library
19for a project where the library needed to be dynamically loaded. The
20CMake scripts were contributed by Stephen Just, modified from LuaDist
21versions.
22
23Spencer's original license can be found in the COPYRIGHT file. The CMake
24scripts are licensed under the MIT license. I release all of my own
25changes to the public domain under the Creative Commons Zero license.
26
27Installation
28============
29
30CMake needs to be installed. To build from a Linux command line, or
31something compatible, within the source directory:
32
33to configure for a static library:
34cmake .
35or
36cmake -Drxshared=0 .
37
38to configure for a shared library:
39cmake -Drxshared=1 .
40
41to disable tests:
42cmake -DBUILD_TESTING=OFF .
43
44to disable manuals/ documentation:
45cmake -DINSTALL_DOCS=OFF .
46
47to build:
48make
49make install
50
51also required on Linux, after installing the shared library:
52ldconfig
53
54to run the tests:
55make test
56
57to run the tests, with output displayed:
58ctest -V
59
60Usage
61=====
62
63Include the following header in a C program:
64
65#include <rxspencer/regex.h>
66
67Link with the library using the -lrxspencer flag, as in:
68gcc test.c -o test -lrxspencer
69
70The library is further described in the supplied man pages: rxspencer.3
71and rxspencer.7, which are formatted at
72https://garyhouston.github.io/regex/regex3.html and
73https://garyhouston.github.io/regex/regex7.html.
74
75--
76Gary Houston, ghouston@arglist.com
77