Lets hope that I did this right :)
[ircu2.10.12-pk.git] / config / config-sh.in
1 # @configure_input@
2 #
3 # By Carlo Wood (carlo@runaway.xs4all.nl)
4 #
5 # For a description of the syntax of this configuration file,
6 # see the config/Configure script.
7 #
8 # TO CONFIGURE THE SERVER, TYPE: 'make config' in the top level directory !
9 #
10
11 #### Start of system configuration section. ####
12
13 prefix=@prefix@
14 exec_prefix=@exec_prefix@
15 bindir=@bindir@
16 mandir=@mandir@
17 CC_DEFAULT="@CC@"
18 CFLAGS_DEFAULT="@CFLAGS@"
19 CPPFLAGS_DEFAULT="@CPPFLAGS@"
20 LDFLAGS_DEFAULT="@LDFLAGS@"
21 LIBS="@LIBS@"
22 ac_cv_header_poll_h=@ac_cv_header_poll_h@
23 unet_cv_func_poll_syscall=@unet_cv_func_poll_syscall@
24 ac_cv_header_syslog_h=@ac_cv_header_syslog_h@
25
26 #### End of system configuration section. ####
27
28 if [ -z "$CONFIG_BATCH" ]; then
29   echo "**************************************************************************"
30   echo "Error: Please run 'make config' that resides in the top level directory!"
31   echo "**************************************************************************"
32   exit -1
33 fi
34
35 mainmenu_name "Undernet IRC Daemon Configuration"
36 mainmenu_option next_comment
37   if [ "$CONFIG_BATCH" = "n" ]; then
38     echo "* Welcome to the Undernet IRC Daemon Configuration script."
39     echo "* You can restart this configuration at any time by typing 'make config'."
40     echo "* If you need help with your decision on any question, type a '?'"
41     echo "*"
42     USE_DEFAULT=n
43   else
44     USE_DEFAULT=C
45   fi
46   CHANGE_CONFIG=n
47   if [ "$DEFAULTS" != "none" ]; then
48     bool 'Do you want to change your previous configuration' CHANGE_CONFIG
49     if [ "$CHANGE_CONFIG" = "n" ]; then
50       echo "Ok, I will only prompt you for NEW parameters."
51       USE_DEFAULT=C
52     else
53       USE_DEFAULT=n
54     fi
55   else
56     USE_DEFAULT=n
57   fi
58 endmenu
59
60 mainmenu_option next_comment
61 comment 'Compile stuff'
62   if [ "$prefix" = "NONE" ]; then
63     prefix=/usr/local
64   fi
65   if [ "$exec_prefix" = "NONE" ]; then
66     eval exec_prefix="$prefix"
67   fi
68   string 'Which compiler do you want to use' CC "$CC_DEFAULT"
69   echo "* For the following four questions, specify 'none' when you want it to be empty."
70   if [ -z "$cflags_O3_remark" -a -n "$CFLAGS" ]; then
71     CFLAGS_DEFAULT=`echo "$CFLAGS" | sed -e 's%-O2%-O3%'`
72     if [ "$CFLAGS_DEFAULT" != "$CFLAGS" ]; then
73       echo "You are highly advised to use -O3 instead of -O2 if you're short in cpu cycles!"
74       echo "Please read documentation (press '?'):"
75       CFLAGS=
76     fi
77   fi
78   eval string "'What flags should I pass to $CC [none]'" CFLAGS "'$CFLAGS_DEFAULT'"
79   define_macro cflags_O3_remark done
80   string 'Do you need extra include directories [none]' EXTRA_INCLUDEDIRS none
81   if [ -z "$LDFLAGS_DEFAULT" ]; then
82     LDFLAGS_DEFAULT=none
83   else
84     eval LDFLAGS_DEFAULT="$LDFLAGS_DEFAULT"
85   fi
86   string 'Which linker flags do you need [none]' LDFLAGS "$LDFLAGS_DEFAULT"
87   if [ -z "$LIBS" ]; then
88     LIBS=none
89   fi
90   string 'Which extra libraries do you need [none]' IRCDLIBS "$LIBS"
91   eval bindir="$bindir"
92   string 'In which directory should I install the ircd binary' BINDIR $bindir
93   if [ ! -d "$BINDIR" ]; then
94     echo "$BINDIR : No such directory"
95   fi
96   string 'What should the name of the installed symbolic link to the exectuable be' SYMLINK ircd
97   string 'Which permissions do you want the binary to have' IRCDMODE 711
98   string 'Which owner do you want the binary to have' IRCDOWN "`id | sed -e 's/.*uid=[0-9]*(//' -e 's/).*//' 2> /dev/null`"
99   string 'Which group do you want the binary to have' IRCDGRP "`id | sed -e 's/.*gid=[0-9]*(//' -e 's/).*//' 2> /dev/null`"
100   eval mandir=$mandir
101   string 'Where should I install the man page' MANDIR $mandir
102   if [ "$CFLAGS" = "none" ]; then
103     CFLAGS=""
104   fi
105   if [ "$EXTRA_INCLUDEDIRS" = "none" ]; then
106     EXTRA_INCLUDEDIRS=""
107   fi
108   if [ "$LDFLAGS" = "none" ]; then
109     LDFLAGS=""
110   fi
111   if [ "$IRCDLIBS" = "none" ]; then
112     IRCDLIBS=""
113   fi
114   EXTRA_CPPFLAGS=""
115   if [ -n "$EXTRA_INCLUDEDIRS" ]; then
116     for i in $EXTRA_INCLUDEDIRS; do
117       if [ -z "$EXTRA_CPPFLAGS" ]; then
118         EXTRA_CPPFLAGS=-I$i
119       else
120         EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I$i"
121       fi
122     done
123   fi
124   if [ -z "$EXTRA_CPPFLAGS" ]; then
125     CPPFLAGS=-I../include
126   else
127     CPPFLAGS="-I../include $EXTRA_CPPFLAGS"
128   fi
129   echo "EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >>$CONFIG
130   echo "CPPFLAGS=\"$CPPFLAGS\"" >>$CONFIG
131   bool 'Use inlining for a few crucial functions' FORCEINLINE y
132 endmenu
133
134 if [ "$ac_cv_header_poll_h" = "yes" ]; then
135   if [ "$unet_cv_func_poll_syscall" = "yes" ]; then
136     define_bool USE_POLL y
137   else
138     mainmenu_option next_comment
139     comment 'Operating System specific defines.'
140       bool 'You have poll(), but do you want to use it' USE_POLL n
141     endmenu
142   fi
143 fi
144
145 mainmenu_option next_comment
146 comment 'Host specific defines'
147   if [ -f /etc/resolv.conf ]; then
148     DOMAINNAME_DEFAULT="`awk '/^domain/ { print $2; exit }' /etc/resolv.conf`"
149   fi
150   string 'What is the domain name of your network' DOMAINNAME $DOMAINNAME_DEFAULT
151   if [ -z "$DOMAINNAME" ]; then
152     DOMAINNAME=none
153   fi
154   string 'Please give a random seed of eight characters' RANDOM_SEED 12345678
155   bool 'Does your host have a reliable clock' RELIABLE_CLOCK
156 endmenu
157
158 mainmenu_option next_comment
159 comment 'General defines'
160   bool 'Change root ('/') after start of daemon' CHROOTDIR
161   bool 'Do you want the daemon set its own uid/gid' CONFIG_SETUGID
162   if [ "$CONFIG_SETUGID" = "y" ]; then
163     int '   UID of irc daemon' IRC_UID
164     int '   GID of irc daemon' IRC_GID
165   else
166     define_int IRC_UID $IRC_UID
167     define_int IRC_GID $IRC_GID
168     bool 'Allow to specify configuration file on command line' CMDLINE_CONFIG
169     if [ "$CMDLINE_CONFIG" = "y" ]; then
170       echo "   SECURITY: Then don't install the daemon SUID or SGID !"
171     fi
172   fi
173   bool 'Set up a Unix domain socket to connect clients/servers' UNIXPORT
174   bool 'Do you need virtual hosting' VIRTUAL_HOST
175   PREV_HUB=$HUB
176   bool 'Will you connect to more then one server at a time' HUB
177   if [ "$PREV_HUB" != "$HUB" ]; then
178     BUFFERPOOL=
179   fi
180 endmenu
181
182 mainmenu_option next_comment
183 comment 'Debugging (do not define this on production servers)'
184   bool 'Do you want to enable debugging output' DEBUGMODE
185   bool 'Do you want memory- allocation and/or leak checking' DEBUGMALLOC
186   if [ "$DEBUGMALLOC" = "y" ]; then
187     bool 'Do you want to have boundary checking' MEMMAGICNUMS
188     bool 'Do you want memory leak testing (stats M)' MEMLEAKSTATS y
189     if [ "$MEMLEAKSTATS" = "y" ]; then
190       if [ "$MEMMAGICNUMS" = "y" ]; then
191         echo "You will have extra info on allocated sizes too (MEMSIZESTATS)"
192         define_bool MEMSIZESTATS $MEMSIZESTATS
193       else
194         bool 'Do you want extra info on allocated sizes' MEMSIZESTATS y
195       fi
196       bool 'Do you want support for a time interval with /stats M' MEMTIMESTATS y
197     fi
198   else
199     define_bool MEMMAGICNUMS $MEMMAGICNUMS
200     define_bool MEMLEAKSTATS $MEMLEAKSTATS
201     define_bool MEMSIZESTATS $MEMSIZESTATS
202     define_bool MEMTIMESTATS $MEMTIMESTATS
203   fi
204   bool 'Are you testing on a host without DNS' NODNS
205 endmenu
206
207 mainmenu_option next_comment
208 comment 'Paths and files'
209   eval DPATH_DEFAULT="${prefix}/lib/ircd"
210   string 'Directory where all ircd stuff resides' DPATH $DPATH_DEFAULT
211   define_string SPATH "$BINDIR/ircd"
212   echo "The following filenames are either full paths or files within DPATH"
213   string 'Server configuration file' CPATH 'ircd.conf'
214   string 'Server MOTD file' MPATH 'ircd.motd'
215   string 'Server remote MOTD file (3 lines max)' RPATH 'remote.motd'
216   if [ "$DEBUGMODE" = "y" ]; then
217     string 'Debug file if DEBUGMODE' LPATH '/tmp/ircd.log'
218   else
219     define_string LPATH "$LPATH"
220   fi
221   string 'File for server pid' PPATH 'ircd.pid'
222 endmenu
223
224 mainmenu_option next_comment
225 comment 'Logging (filenames are either full paths or files within DPATH)'
226   bool 'Do you want to log the use of /WHO x% (recommended)' CONFIG_LOG_WHOX y
227     if [ "$CONFIG_LOG_WHOX" = "y" ]; then
228       string '   Give the path and(or) filename of this log file' WPATH 'whox.log'
229     fi
230
231  comment 'Bad Channel G-Lines allow operators to add channel masks to a list which prohibits local clients from being able joining channels which match the mask.  Remote BadChan Glines allow Uworld to add or remove channels from the servers internal list of badchans'
232   WT_BADCHAN=y
233   bool 'Do you want to enable Bad Channel G-lines' WT_BADCHAN
234     if [ "$WT_BADCHAN" = "y" ]; then
235       echo " "
236       echo " WARNING DO _NOT_ USE LOCAL BADCHANNEL GLINES ON UNDERNET"
237       echo " Use of LOCAL BAD Channel G-Lines can be cause for REMOVAL"
238       bool 'Allow LOCAL BAD Channel G-lines' WT_LOCAL_BADCHAN
239     fi
240
241   bool 'Do you want to log G-lines to a separate file' CONFIG_LOG_GLINES
242     if [ "$CONFIG_LOG_GLINES" = "y" ]; then
243       string '   Give the path and(or) filename of this log file' GPATH 'gline.log'
244     fi
245   bool 'Do you want to log connecting users to a separate file' CONFIG_LOG_USERS
246     if [ "$CONFIG_LOG_USERS" = "y" ]; then
247       string '   Give the path and(or) filename of this log file' FNAME_USERLOG $DPATH/users
248     fi
249   bool 'Do you want to log Opers to a separate file' CONFIG_LOG_OPERS
250     if [ "$CONFIG_LOG_OPERS" = "y" ]; then
251       string '   Give the path and(or) filename of this log file' FNAME_OPERLOG $DPATH/opers
252     fi
253   if [ "$ac_cv_header_syslog_h" = "yes" ]; then
254     bool 'Do you want to use syslog' USE_SYSLOG
255   else
256     USE_SYSLOG=n
257   fi
258     if [ "$USE_SYSLOG" = "y" ]; then
259       bool '   Log all operator kills to syslog' SYSLOG_KILL
260       bool '   Log all remote squits for all servers to syslog' SYSLOG_SQUIT
261       bool '   Log remote connect messages for other all servs' SYSLOG_CONNECT
262       bool '   Log all users who successfully become an Oper' SYSLOG_OPER
263       bool '   Send userlog stuff to syslog' SYSLOG_USERS
264       if [ "$SYSLOG_KILL" = "n" -a "$SYSLOG_SQUIT" = "n" -a \
265            "$SYSLOG_CONNECT" = "n" -a "$SYSLOG_OPER" = "n" -a \
266            "$SYSLOG_USERS" = "n" ]; then
267         define_macro LOG_FACILITY $LOG_FACILITY
268         define_bool USE_SYSLOG n
269       else
270         choice '   Log facility' \
271                 "daemon         CONFIG_DAEMON   \
272                 user            CONFIG_USER     \
273                 local0-7        CONFIG_LOCAL" daemon
274         if [ "$CONFIG_DAEMON" = "y" ]; then
275           define_macro LOG_FACILITY LOG_DAEMON
276         else
277           if [ "$CONFIG_USER" = "y" ]; then
278             define_macro LOG_FACILITY LOG_USER
279           else
280             int '      Which local facility (0-7)' INT_LOCAL
281             define_macro LOG_FACILITY LOG_LOCAL$INT_LOCAL
282           fi
283         fi
284         echo "    Using log facility $LOG_FACILITY"
285       fi
286     else
287       define_bool SYSLOG_KILL $SYSLOG_KILL
288       define_bool SYSLOG_SQUIT $SYSLOG_SQUIT
289       define_bool SYSLOG_CONNECT $SYSLOG_CONNECT
290       define_bool SYSLOG_OPER $SYSLOG_OPER
291       define_bool SYSLOG_USERS $SYSLOG_USERS
292       define_macro LOG_FACILITY $LOG_FACILITY
293     fi
294 endmenu
295
296 mainmenu_option next_comment
297 comment 'Configuration'
298   bool 'Use crypted passwords for N: lines' CRYPT_LINK_PASSWORD y
299   bool 'Use crypted passwords for operators' CRYPT_OPER_PASSWORD y
300   DUMMY=`echo "$BUFFERPOOL" | sed -e 's/[0-9]//g'`
301   if [ "$DUMMY" != "" ]; then
302     BUFFERPOOL=
303   fi
304   if [ "$HUB" = "y" ]; then
305     int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 27000000
306   else
307     int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 9000000
308   fi
309   int 'Max receive queue for clients (bytes)' CLIENT_FLOOD 1024
310   int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252
311   int 'Default client listen port' PORTNUM 6667
312   int 'Nickname history length' NICKNAMEHISTORYLENGTH 800
313   bool 'Allow Opers to see (dis)connects of local clients' ALLOW_SNO_CONNEXIT
314   if [ "$ALLOW_SNO_CONNEXIT" = "y" ]; then
315     bool 'Show IP address in client connection notices' SNO_CONNEXIT_IP
316   fi
317   bool 'Do you want to use R: lines in your configuration file' R_LINES
318   if [ "$R_LINES" = "y" ]; then
319     bool 'Process R: lines every rehash' R_LINES_REHASH y
320     bool 'Process R: lines always' R_LINES_OFTEN
321   else
322     define_bool R_LINES_REHASH $R_LINES_REHASH
323     define_bool R_LINES_OFTEN $R_LINES_OFTEN
324   fi
325   bool 'Do you want support for the old I:*:ONE:*:: construct (read help text!)' USEONE n
326   bool 'Send a short message instead of the MOTD to connecting clients' NODEFAULTMOTD y
327 endmenu
328
329 mainmenu_option next_comment
330 comment 'Oper commands'
331   bool 'Allow (local) Opers to see all local invisible users' SHOW_INVISIBLE_USERS y
332   if [ "$SHOW_INVISIBLE_USERS" = "y" ]; then
333     bool 'Allow Opers to see all invisible users' SHOW_ALL_INVISIBLE_USERS y
334   fi
335   bool 'Allow global Opers (O:) to see inside secret channels' OPERS_SEE_IN_SECRET_CHANNELS y
336   if [ "$OPERS_SEE_IN_SECRET_CHANNELS" = "y" ]; then
337     bool 'Allow local Opers (o:) to see inside secret channels' LOCOP_SEE_IN_SECRET_CHANNELS n
338   fi
339   bool 'Do not truncate obnoxiously long /who output for opers' UNLIMIT_OPER_QUERY
340   bool 'Allow Opers to use the KILL command' OPER_KILL y
341   bool 'Allow Opers to use the REHASH command' OPER_REHASH y
342   bool 'Allow Opers to use the RESTART command' OPER_RESTART y
343   bool 'Allow Opers to use the DIE command' OPER_DIE y
344   bool 'Allow Opers to add local G-lines' OPER_LGLINE y
345   bool 'Allow Opers to connect from a remote site' OPER_REMOTE y
346   bool 'Allow local opers to use the REHASH command' LOCOP_REHASH y
347   bool 'Allow local opers to use the RESTART command' LOCOP_RESTART
348   bool 'Allow local opers to use the DIE command' LOCOP_DIE
349   bool 'Allow local opers to add local G-lines' LOCOP_LGLINE y
350 endmenu
351
352 mainmenu_option next_comment
353 comment 'Server characteristics'
354   bool 'Do you want to have a default LIST parameter' CONFIG_LIST y
355   if [ "$CONFIG_LIST" = "y" ]; then
356     string 'Give default LIST parameter' DEFAULT_LIST 'T<10'
357     define_string DEFAULT_LIST_PARAM "$DEFAULT_LIST"
358   else
359     define_string DEFAULT_LIST "$DEFAULT_LIST"
360     define_bool DEFAULT_LIST_PARAM n
361   fi
362   bool 'K: line comments treated as a file by default' COMMENT_IS_FILE y
363   bool 'Only nullify idle-time on PRIVMSG' IDLE_FROM_MSG y
364 endmenu
365
366 mainmenu_option next_comment
367 comment 'Mandatory defines (you should leave these untouched)'
368   int 'Max auto connects per class (1!)' MAXIMUM_LINKS 1
369   echo '* Never define this on a production server:'
370   bool 'Enable message logging' MSGLOG_ENABLED
371   if [ "$MSGLOG_ENABLED" = "y" ]; then
372     int 'Message log size' MSGLOG_SIZE 128
373   fi
374   if [ "$OPER_KILL" = "y" ]; then
375     bool 'Only allow KILLs of local clients' LOCAL_KILL_ONLY
376   else
377     define_bool LOCAL_KILL_ONLY $LOCAL_KILL_ONLY
378   fi
379   int 'KILL nick chase time limit (30)' KILLCHASETIMELIMIT 30
380   int 'Max number of channels per user (recommended: 5)' MAXCHANNELSPERUSER 10
381   int 'Max number of silence masks (15!)' MAXSILES 15
382   int 'Expected average banmask length (40!)' AVBANLEN 40
383   eval define_macro MAXSILELENGTH \'\($AVBANLEN * MAXSILES\)\'
384   echo '* These are default values, used for class 0:'
385   int 'Max server idle time (60)' TIMESEC 60
386   int 'Class 0 ping frequency (120)' PINGFREQUENCY 120
387   int 'Class 0 connect frequency (600)' CONNECTFREQUENCY 600
388   int 'Min time before a link is good (300)' HANGONGOODLINK 300
389   int 'Wait before reconnecting to good link (10!)' HANGONRETRYDELAY 10
390   int 'connect(2) timeout (90!)' CONNECTTIMEOUT 90
391   int 'Max send queue (40000)' DEFAULTMAXSENDQLENGTH 40000
392 endmenu
393