]> mj.ucw.cz Git - libucw.git/blob - ucw/doc/configure.txt
Some sherlock independent docs put into libucw
[libucw.git] / ucw / doc / configure.txt
1 How to Configure Sherlock
2 =========================
3
4 What can be configured
5 ----------------------
6 There are two different levels of configuring/customizing program
7 based on libucw:
8
9   - runtime configuration in configuration files (see doc/config)
10
11   - compile-time configuration: config switches set before compiling, selecting
12     optional features.
13
14   - customization: a set of C declarations and functions, which define word
15     types, attributes and the ways to match them. In most cases, you should
16     use the "free" customization designed for searching in web pages and similar
17     documents. If you want just a simple search engine for indexing databases,
18     the "customs/bare" customization can be better. If you want to extend Sherlock
19     beyond that, you will probably need to write your own customization -- just
20     follow the structure of the "free" customization and the comments there.
21
22
23 How to configure
24 ----------------
25 To set up compilation for a given customization, possibly overriding its default
26 compile-time options, just run
27
28         ./configure <customization> [<option> | -<option> | <option>=<value> ...]
29
30 The default values of feature options are taken from sherlock/default.cfg and modified
31 by <customization>/config. Compiler flags and options dependent on compiler, OS and
32 CPU type are set in ucw/autoconf.cfg. Everything can be overriden by options specified
33 on the configure's command line, which have the highest priority.
34
35 If you want to see the resulting set of options, take a look at obj/config.mk.
36
37 Options specifying compiler/linker/debugger options can be also overriden during
38 compilation by `make <option>=<value>`. While it's also possible to specify the other
39 options in this way, it probably won't have the desired effect, because configure
40 also generates C include files containing the options.
41
42
43 Where to build
44 --------------
45 If you run configure in the source directory, it prepares for compilation inside
46 the source tree. In this case, an `obj` subdirectory is created to hold all generated
47 files (object files, binaries, generated source files etc.) and all final files
48 are linked to the `run` subdirectory. No other parts of the source tree are written into.
49
50 Alternatively, you can compile in a separate object tree (which is useful when you
51 want to build several different configurations from a single source tree). In order
52 to do that, switch to the destination directory and issue `<source-dir>/configure ...`.
53 This way, configure will create the `obj` and `run` directories locally and set up
54 a Makefile which refers to the original source tree.