12444d8eaf77e9a73ad1748dffd532c2210022bb
[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 'Debugging (do not define this on production servers)'
62   bool 'Do you want to enable debugging output' DEBUGMODE
63   bool 'Do you want to enable asserts and memory allocation checking' CONFIG_NDEBUG
64   EXTRA_CPPFLAGS=""
65   if [ "$CONFIG_NDEBUG" = "n" ]; then
66     if [ -z "$EXTRA_CPPFLAGS" ]; then
67       EXTRA_CPPFLAGS="-DNDEBUG"
68     else
69       EXTRA_CPPFLAGS="-DNDEBUG $EXTRA_CPPFLAGS"
70     fi
71   fi
72   bool 'Are you testing on a host without DNS' NODNS
73 endmenu
74
75 mainmenu_option next_comment
76 comment 'Compile stuff'
77   if [ "$prefix" = "NONE" ]; then
78     prefix=/usr/local
79   fi
80   if [ "$exec_prefix" = "NONE" ]; then
81     eval exec_prefix="$prefix"
82   fi
83   string 'Which compiler do you want to use' CC "$CC_DEFAULT"
84   echo "* For the following four questions, specify 'none' when you want it to be empty."
85   if [ -z "$cflags_O3_remark" -a -n "$CFLAGS" ]; then
86     CFLAGS_DEFAULT=`echo "$CFLAGS" | sed -e 's%-O2%-O3%'`
87     if [ "$CFLAGS_DEFAULT" != "$CFLAGS" ]; then
88       echo "You are highly advised to use -O3 instead of -O2 if you're short in cpu cycles!"
89       echo "Please read documentation (press '?'):"
90       CFLAGS=
91     fi
92   fi
93   eval string "'What flags should I pass to $CC [none]'" CFLAGS "'$CFLAGS_DEFAULT'"
94   define_macro cflags_O3_remark done
95   string 'Do you need extra include directories [none]' EXTRA_INCLUDEDIRS none
96   if [ -z "$LDFLAGS_DEFAULT" ]; then
97     LDFLAGS_DEFAULT=none
98   else
99     eval LDFLAGS_DEFAULT="$LDFLAGS_DEFAULT"
100   fi
101   string 'Which linker flags do you need [none]' LDFLAGS "$LDFLAGS_DEFAULT"
102   if [ -z "$LIBS" ]; then
103     LIBS=none
104   fi
105   string 'Which extra libraries do you need [none]' IRCDLIBS "$LIBS"
106   bool 'Generate debug symbols?' DEBUGSYMBOLS "y"
107   bool 'Compile in profiling support (gcc and maybe SUNpro)?' IRCUPROFILE "n"
108   unset ZSTEMP
109   if [ "$DEBUGSYMBOLS" = "y" ] ; then
110     ZSTEMP="-g"
111   fi
112   if [ "$IRCUPROFILE" = "y" ] ; then
113     ZSTEMP="-pg $ZSTEMP"
114   fi
115   define_string DEBUGFLAGS "$ZSTEMP"
116   eval bindir="$bindir"
117   string 'In which directory should I install the ircd binary' BINDIR $bindir
118   if [ ! -d "$BINDIR" ]; then
119     echo "$BINDIR : No such directory"
120   fi
121   string 'What should the name of the installed symbolic link to the exectuable be' SYMLINK ircd
122   string 'Which permissions do you want the binary to have' IRCDMODE 711
123   string 'Which owner do you want the binary to have' IRCDOWN "`id | sed -e 's/.*uid=[0-9]*(//' -e 's/).*//' 2> /dev/null`"
124   string 'Which group do you want the binary to have' IRCDGRP "`id | sed -e 's/.*gid=[0-9]*(//' -e 's/).*//' 2> /dev/null`"
125   eval mandir=$mandir
126   string 'Where should I install the man page' MANDIR $mandir
127   if [ "$CFLAGS" = "none" ]; then
128     CFLAGS=""
129   fi
130   if [ "$EXTRA_INCLUDEDIRS" = "none" ]; then
131     EXTRA_INCLUDEDIRS=""
132   fi
133   if [ "$LDFLAGS" = "none" ]; then
134     LDFLAGS=""
135   fi
136   if [ "$IRCDLIBS" = "none" ]; then
137     IRCDLIBS=""
138   fi
139   if [ -n "$EXTRA_INCLUDEDIRS" ]; then
140     for i in $EXTRA_INCLUDEDIRS; do
141       if [ -z "$EXTRA_CPPFLAGS" ]; then
142         EXTRA_CPPFLAGS=-I$i
143       else
144         EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I$i"
145       fi
146     done
147   fi
148   if [ -z "$EXTRA_CPPFLAGS" ]; then
149     CPPFLAGS="-I../include -I../config"
150   else
151     CPPFLAGS="-I../include -I../config $EXTRA_CPPFLAGS"
152   fi
153   echo "EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >>$CONFIG
154   echo "CPPFLAGS=\"$CPPFLAGS\"" >>$CONFIG
155   bool 'Use inlining for a few crucial functions' FORCEINLINE y
156 endmenu
157
158 if [ "$ac_cv_header_poll_h" = "yes" ]; then
159   if [ "$unet_cv_func_poll_syscall" = "yes" ]; then
160     define_bool USE_POLL y
161   else
162     mainmenu_option next_comment
163     comment 'Operating System specific defines.'
164       bool 'You have poll(), but do you want to use it' USE_POLL n
165     endmenu
166   fi
167 fi
168
169 mainmenu_option next_comment
170 comment 'Host specific defines'
171   if [ -f /etc/resolv.conf ]; then
172     DOMAINNAME_DEFAULT="`awk '/^domain/ { print $2; exit }' /etc/resolv.conf`"
173   fi
174   string 'What is the domain name of your network' DOMAINNAME $DOMAINNAME_DEFAULT
175   if [ -z "$DOMAINNAME" ]; then
176     DOMAINNAME=none
177   fi
178   string 'Please give a random seed of eight characters' RANDOM_SEED 12345678
179   bool 'Does your host have a reliable clock' RELIABLE_CLOCK
180 endmenu
181
182 mainmenu_option next_comment
183 comment 'General defines'
184   bool 'Do you want the daemon set its own uid/gid (say yes for chroot!)' CONFIG_SETUGID
185   if [ "$CONFIG_SETUGID" = "y" ]; then
186     int '   UID of irc daemon' IRC_UID
187     int '   GID of irc daemon' IRC_GID
188     bool '   Change root ('/') after start of daemon' CHROOTDIR
189   else
190     define_bool CHROOTDIR n
191     define_int IRC_UID $IRC_UID
192     define_int IRC_GID $IRC_GID
193     bool 'Allow to specify configuration file on command line' CMDLINE_CONFIG
194     if [ "$CMDLINE_CONFIG" = "y" ]; then
195       echo "   SECURITY: Then don't install the daemon SUID or SGID !"
196     fi
197   fi
198   bool 'Do you need virtual hosting' VIRTUAL_HOST
199   PREV_HUB=$HUB
200   bool 'Will you connect to more then one server at a time' HUB
201   if [ "$PREV_HUB" != "$HUB" ]; then
202     BUFFERPOOL=
203   fi
204 endmenu
205
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   if [ "$CHROOTDIR" = "y" ] ; then
212     define_string SPATH "/$SYMLINK"
213   else
214     define_string SPATH "$BINDIR/$SYMLINK"
215   fi
216   echo "The following filenames are either full paths or files within DPATH"
217   string 'Server configuration file' CPATH 'ircd.conf'
218   string 'Server MOTD file' MPATH 'ircd.motd'
219   string 'Server remote MOTD file (3 lines max)' RPATH 'remote.motd'
220   if [ "$DEBUGMODE" = "y" ]; then
221     string 'Debug file if DEBUGMODE' LPATH '/tmp/ircd.log'
222   else
223     define_string LPATH "$LPATH"
224   fi
225   string 'File for server pid' PPATH 'ircd.pid'
226 endmenu
227
228 mainmenu_option next_comment
229 comment 'Logging (filenames are either full paths or files within DPATH)'
230   bool 'Do you want to log the use of /WHO x% (recommended)' CONFIG_LOG_WHOX y
231     if [ "$CONFIG_LOG_WHOX" = "y" ]; then
232       string '   Give the path and(or) filename of this log file' WPATH 'whox.log'
233     fi
234
235 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'
236   bool 'Do you want to enable Bad Channel G-lines' BADCHAN y
237     if [ "$BADCHAN" = "y" ]; then
238       echo " "
239       echo " WARNING DO _NOT_ USE LOCAL BADCHANNEL GLINES ON UNDERNET"
240       echo " Use of LOCAL BAD Channel G-Lines can be cause for REMOVAL"
241       bool 'Allow LOCAL BAD Channel G-lines' LOCAL_BADCHAN
242     fi
243
244   bool 'Do you want to log G-lines to a separate file' CONFIG_LOG_GLINES
245     if [ "$CONFIG_LOG_GLINES" = "y" ]; then
246       string '   Give the path and(or) filename of this log file' GPATH 'gline.log'
247     fi
248   bool 'Do you want to log JUPEs to a separate file' CONFIG_LOG_JUPES y
249     if [ "$CONFIG_LOG_JUPES" = "y" ]; then
250       string '   Give the path and(or) filename of this log file' JPATH 'jupe.log'
251     fi
252   bool 'Do you want to log OPMODEs and CLEARMODEs to a separate file' CONFIG_LOG_OPMODES y
253     if [ "$CONFIG_LOG_OPMODES" = "y" ]; then
254       string '   Give the path and(or) filename of this log file' OPATH 'opmode.log'
255     fi
256   bool 'Do you want to log connecting users to a separate file' CONFIG_LOG_USERS
257     if [ "$CONFIG_LOG_USERS" = "y" ]; then
258       string '   Give the path and(or) filename of this log file' FNAME_USERLOG users.log
259     fi
260   bool 'Do you want to log Opers to a separate file' CONFIG_LOG_OPERS
261     if [ "$CONFIG_LOG_OPERS" = "y" ]; then
262       string '   Give the path and(or) filename of this log file' FNAME_OPERLOG opers.log
263     fi
264   if [ "$ac_cv_header_syslog_h" = "yes" ]; then
265     bool 'Do you want to use syslog' USE_SYSLOG
266   else
267     USE_SYSLOG=n
268   fi
269     if [ "$USE_SYSLOG" = "y" ]; then
270       bool '   Log all operator kills to syslog' SYSLOG_KILL
271       bool '   Log all remote squits for all servers to syslog' SYSLOG_SQUIT
272       bool '   Log remote connect messages for other all servs' SYSLOG_CONNECT
273       bool '   Log all users who successfully become an Oper' SYSLOG_OPER
274       bool '   Send userlog stuff to syslog' SYSLOG_USERS
275       if [ "$SYSLOG_KILL" = "n" -a "$SYSLOG_SQUIT" = "n" -a \
276            "$SYSLOG_CONNECT" = "n" -a "$SYSLOG_OPER" = "n" -a \
277            "$SYSLOG_USERS" = "n" ]; then
278         define_macro LOG_FACILITY $LOG_FACILITY
279         define_bool USE_SYSLOG n
280       else
281         choice '   Log facility' \
282                 "daemon         CONFIG_DAEMON   \
283                 user            CONFIG_USER     \
284                 local0-7        CONFIG_LOCAL" daemon
285         if [ "$CONFIG_DAEMON" = "y" ]; then
286           define_macro LOG_FACILITY LOG_DAEMON
287         else
288           if [ "$CONFIG_USER" = "y" ]; then
289             define_macro LOG_FACILITY LOG_USER
290           else
291             int '      Which local facility (0-7)' INT_LOCAL
292             define_macro LOG_FACILITY LOG_LOCAL$INT_LOCAL
293           fi
294         fi
295         echo "    Using log facility $LOG_FACILITY"
296       fi
297     else
298       define_bool SYSLOG_KILL $SYSLOG_KILL
299       define_bool SYSLOG_SQUIT $SYSLOG_SQUIT
300       define_bool SYSLOG_CONNECT $SYSLOG_CONNECT
301       define_bool SYSLOG_OPER $SYSLOG_OPER
302       define_bool SYSLOG_USERS $SYSLOG_USERS
303       define_macro LOG_FACILITY $LOG_FACILITY
304     fi
305 endmenu
306
307 mainmenu_option next_comment
308 comment 'Configuration'
309   bool 'Use crypted passwords for operators' CRYPT_OPER_PASSWORD y
310   DUMMY=`echo "$BUFFERPOOL" | sed -e 's/[0-9]//g'`
311   if [ "$DUMMY" != "" ]; then
312     BUFFERPOOL=
313   fi
314   if [ "$HUB" = "y" ]; then
315     int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 27000000
316   else
317     int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 9000000
318   fi
319   bool 'Aggressively empty the sendqpool (Read Help!)' HAS_FERGUSON_FLUSHER n
320   int 'Max receive queue for clients (bytes)' CLIENT_FLOOD 1024
321   int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252
322   int 'Default port for connections to other servers' SERVER_PORT 4400
323   int 'Nickname history length' NICKNAMEHISTORYLENGTH 800
324   bool 'Do you want to use R: lines in your configuration file' R_LINES
325   if [ "$R_LINES" = "y" ]; then
326     bool 'Process R: lines every rehash' R_LINES_REHASH y
327     bool 'Process R: lines always' R_LINES_OFTEN
328   else
329     define_bool R_LINES_REHASH $R_LINES_REHASH
330     define_bool R_LINES_OFTEN $R_LINES_OFTEN
331   fi
332   bool 'Send a short message instead of the MOTD to connecting clients' NODEFAULTMOTD y
333   bool 'Kill connecting clients when forward and reverse DNS mismatch' KILL_IPMISMATCH n
334 endmenu
335
336 mainmenu_option next_comment
337 comment 'Oper commands'
338   bool 'Allow (local) Opers to see all local invisible users' SHOW_INVISIBLE_USERS y
339   if [ "$SHOW_INVISIBLE_USERS" = "y" ]; then
340     bool 'Allow Opers to see all invisible users' SHOW_ALL_INVISIBLE_USERS y
341   fi
342   bool 'Allow global Opers (O:) to see inside secret channels' OPERS_SEE_IN_SECRET_CHANNELS y
343   if [ "$OPERS_SEE_IN_SECRET_CHANNELS" = "y" ]; then
344     bool 'Allow local Opers (o:) to see inside secret channels' LOCOP_SEE_IN_SECRET_CHANNELS n
345   fi
346   bool 'Do not truncate obnoxiously long /who output for opers' UNLIMIT_OPER_QUERY
347   bool 'Allow Opers to use the KILL command' OPER_KILL y
348   bool 'Allow Opers to use the REHASH command' OPER_REHASH y
349   bool 'Allow Opers to use the RESTART command' OPER_RESTART y
350   bool 'Allow Opers to use the DIE command' OPER_DIE y
351   bool 'Allow Opers to add local G-lines' OPER_LGLINE y
352   bool 'Allow Opers to connect from a remote site' OPER_REMOTE y
353   bool 'Allow local opers to use the REHASH command' LOCOP_REHASH y
354   bool 'Allow local opers to use the RESTART command' LOCOP_RESTART
355   bool 'Allow local opers to use the DIE command' LOCOP_DIE
356   bool 'Allow local opers to add local G-lines' LOCOP_LGLINE y
357   bool 'Allow local/global opers to be on any number of channels' OPER_NO_CHAN_LIMIT y
358   bool 'Allow local/global opers to set modes on local channels' OPER_MODE_LCHAN y
359   bool 'Allow local/global opers to walk through local channels modes' OPER_WALK_THROUGH_LMODES n
360   bool 'Prevent local/global opers from being kicked or deoped on local channels' NO_OPER_DEOP_LCHAN n
361
362 endmenu
363
364 mainmenu_option next_comment
365 comment 'Server characteristics'
366   bool 'Do you want to have a default LIST parameter' CONFIG_LIST y
367   if [ "$CONFIG_LIST" = "y" ]; then
368     string 'Give default LIST parameter' DEFAULT_LIST 'T<10'
369     define_string DEFAULT_LIST_PARAM "$DEFAULT_LIST"
370   else
371     define_string DEFAULT_LIST "$DEFAULT_LIST"
372     define_bool DEFAULT_LIST_PARAM n
373   fi
374   bool 'K: line comments treated as a file by default' COMMENT_IS_FILE y
375   bool 'Only nullify idle-time on PRIVMSG' IDLE_FROM_MSG y
376 endmenu
377
378 mainmenu_option next_comment
379 comment 'Mandatory defines (you should leave these untouched)'
380   int 'Max auto connects per class (1!)' MAXIMUM_LINKS 1
381   if [ "$OPER_KILL" = "y" ]; then
382     bool 'Only allow KILLs of local clients' LOCAL_KILL_ONLY
383   else
384     define_bool LOCAL_KILL_ONLY $LOCAL_KILL_ONLY
385   fi
386   int 'KILL nick chase time limit (30)' KILLCHASETIMELIMIT 30
387   int 'Max number of channels per user' MAXCHANNELSPERUSER 10
388   int 'Max number of silence masks (15!)' MAXSILES 15
389   int 'Expected average banmask length (40!)' AVBANLEN 40
390   eval define_macro MAXSILELENGTH \'\($AVBANLEN * MAXSILES\)\'
391   echo '* These are default values, used for class 0:'
392   int 'Max server idle time (60)' TIMESEC 60
393   int 'Class 0 ping frequency (120)' PINGFREQUENCY 120
394   int 'Class 0 connect frequency (600)' CONNECTFREQUENCY 600
395   int 'Min time before a link is good (300)' HANGONGOODLINK 300
396   int 'Wait before reconnecting to good link (10!)' HANGONRETRYDELAY 10
397   int 'connect(2) timeout (90!)' CONNECTTIMEOUT 90
398   int 'Max send queue (40000)' DEFAULTMAXSENDQLENGTH 40000
399 endmenu
400
401 mainmenu_option next_comment
402 comment 'Experimental options (Do you know what you'\''re doing?)'
403   bool 'Use new MODE implementation' CONFIG_NEW_MODE y
404   bool 'Use new oper commands (JUPE, CLEARMODE, OPMODE, GLINE)' CONFIG_OPERCMDS y
405 endmenu