Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / config / README
1 This directory contains NOTHING for the admin to configure.
2
3 If you want to configure the IRC server, go to the top level directory and
4 type: 'make config'.
5
6 -------------------------------------------------------------------------------
7
8 If you are a coder and are adding a feature to the server that you need
9 automatic or manual configuration for, then this is where you need to
10 change things.
11
12 If you touch any of the following files, then you need to have 'autoconf'
13 (and 'autoheader') installed - you might also need GNU m4 and perl then:
14
15 configure.in
16 acconfig.h
17 setup.h.top
18
19 Never touch setup.h.in and stamp-h.in.
20 Don't run 'make maintainer-clean' when you don't have autoconf etc. installed.
21
22 If you touch any of the following files, then you need to have GNU make
23 in order to have the Makefiles correctly rebuild automatically:
24
25 parse.none
26 gen.ircd.Makefile
27 ../ircd/Makefile.in
28 ../doc/Makefile.in
29 ../Makefile.in
30
31 Note that after running 'make config' special added code in config/Makefile
32 will remake the Makefiles as needed to allow the admins to use a non-GNU make.
33 But coders should use GNU make.
34
35 Here is a sheme of which files are needed to generate which files:
36
37                                          /> (config.log)
38                                         /-> (config.cache)
39 configure.in  --(autoconf)--> configure --> config.status
40               \
41 acconfig.h    --(autoheader)--> setup.h.in --(config.status)--> setup.h
42 setup.h.top   /                (stamp-h.in)                    (stamp-h)
43
44 config-sh.in  --(config.status)--> config-sh --(Configure)--> config.h
45                                    (.config) -/           \-> (.config)
46                                                            \> (.config.old)
47 Makefile.in --(config.status)--> Makefile
48
49 The exectuable scripts (configure, config.status and Configure) should only be
50 called from Makefile (automatically, when needed, by means of makefile rules).
51
52 Further more, config.status is also used to (re)generate doc/Makefile and
53 ircd/Makefile (from respectively doc/Makefile.in and ircd/Makefile.in).
54 However, ircd/Makefile is not functional then, first also gen.ircd.Makefile
55 must be called.  All of this is done automatically by the Makefile rules
56 inside doc/Makefile and ircd/Makefile respectively.  Finally, gen.ircd.Makefile
57 also calls parse.none.  So:
58
59 ../ircd/Makefile.in  --\
60 gen.ircd.Makefile    ----(config.status)--> ../ircd/Makefile
61 .config              --/
62 parse.none           -/
63
64 ../doc/Makefile.in   --\
65 gen.doc.Makefile     ----(config.status)--> ../doc/Makefile
66 .config              --/
67 parse.none           -/
68
69 ../Makefile.in   ----(config.status)--> ../Makefile
70
71 'Configure' uses the file ../doc/Configure.help for the help texts.
72
73 -------------------------------------------------------------------------------
74
75 Adding an 'autoconf' check.
76
77 1) Install GNU m4, autoconf & autoheader.
78 2) Add your check to configure.in, if needed also add an entry to acconfig.h
79 3) Add the #ifdefs to the source code.
80
81 Adding a manual configuration.
82
83 1) Edit config-sh.in and add the question.
84 2) Edit ../doc/Configure.help and add the help text !
85 3) If necessary, add something to parse.none to allow the use of the
86    value 'none'.
87 4) If necessary edit gen.ircd.Makefile and ../ircd/Makefile to get your
88    variable in ../ircd/Makefile.  (It will already be in config.h).
89 5) Add the #ifdefs to the source code.
90
91 In both cases, all needed files will be automatically (re) generated when
92 you run 'make' from the top level directory (you need GNU make though).
93
94 Carlo Wood