3 # By Carlo Wood (carlo@runaway.xs4all.nl)
5 # For a description of the syntax of this configuration file,
6 # see the config/Configure script.
8 # TO CONFIGURE THE SERVER, TYPE: 'make config' in the top level directory !
11 #### Start of system configuration section. ####
14 exec_prefix=@exec_prefix@
18 CFLAGS_DEFAULT="@CFLAGS@"
19 CPPFLAGS_DEFAULT="@CPPFLAGS@"
20 LDFLAGS_DEFAULT="@LDFLAGS@"
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@
26 #### End of system configuration section. ####
28 if [ -z "$CONFIG_BATCH" ]; then
29 echo "**************************************************************************"
30 echo "Error: Please run 'make config' that resides in the top level directory!"
31 echo "**************************************************************************"
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 '?'"
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."
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
65 if [ "$CONFIG_NDEBUG" = "n" ]; then
66 if [ -z "$EXTRA_CPPFLAGS" ]; then
67 EXTRA_CPPFLAGS="-DNDEBUG"
69 EXTRA_CPPFLAGS="-DNDEBUG $EXTRA_CPPFLAGS"
72 bool 'Are you testing on a host without DNS' NODNS
75 mainmenu_option next_comment
76 comment 'Compile stuff'
77 if [ "$prefix" = "NONE" ]; then
80 if [ "$exec_prefix" = "NONE" ]; then
81 eval exec_prefix="$prefix"
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 '?'):"
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
99 eval LDFLAGS_DEFAULT="$LDFLAGS_DEFAULT"
101 string 'Which linker flags do you need [none]' LDFLAGS "$LDFLAGS_DEFAULT"
102 if [ -z "$LIBS" ]; then
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"
109 if [ "$DEBUGSYMBOLS" = "y" ] ; then
112 if [ "$IRCUPROFILE" = "y" ] ; then
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"
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`"
126 string 'Where should I install the man page' MANDIR $mandir
127 if [ "$CFLAGS" = "none" ]; then
130 if [ "$EXTRA_INCLUDEDIRS" = "none" ]; then
133 if [ "$LDFLAGS" = "none" ]; then
136 if [ "$IRCDLIBS" = "none" ]; then
139 if [ -n "$EXTRA_INCLUDEDIRS" ]; then
140 for i in $EXTRA_INCLUDEDIRS; do
141 if [ -z "$EXTRA_CPPFLAGS" ]; then
144 EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I$i"
148 if [ -z "$EXTRA_CPPFLAGS" ]; then
149 CPPFLAGS="-I../include -I../config"
151 CPPFLAGS="-I../include -I../config $EXTRA_CPPFLAGS"
153 echo "EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >>$CONFIG
154 echo "CPPFLAGS=\"$CPPFLAGS\"" >>$CONFIG
155 bool 'Use inlining for a few crucial functions' FORCEINLINE y
158 if [ "$ac_cv_header_poll_h" = "yes" ]; then
159 if [ "$unet_cv_func_poll_syscall" = "yes" ]; then
160 define_bool USE_POLL y
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
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`"
174 if [ -z "$DOMAINNAME_DEFAULT" ]; then
175 DOMAINNAME_DEFAULT="`awk '/^search/ { print "*" $2; exit }' /etc/resolv.conf`"
177 if [ -z "$DOMAINNAME_DEFAULT" ]; then
178 DOMAINNAME_DEFAULT=none
180 define_string DOMAINNAME $DOMAINNAME_DEFAULT
182 string 'Please give a random seed of eight characters' RANDOM_SEED 12345678
185 mainmenu_option next_comment
186 comment 'General defines'
187 bool 'Do you want the daemon set its own uid/gid (say yes for chroot!)' CONFIG_SETUGID
188 if [ "$CONFIG_SETUGID" = "y" ]; then
189 int ' UID of irc daemon' IRC_UID
190 int ' GID of irc daemon' IRC_GID
191 bool ' Change root ('/') after start of daemon' CHROOTDIR
193 define_bool CHROOTDIR n
194 define_int IRC_UID $IRC_UID
195 define_int IRC_GID $IRC_GID
196 bool 'Allow to specify configuration file on command line' CMDLINE_CONFIG
197 if [ "$CMDLINE_CONFIG" = "y" ]; then
198 echo " SECURITY: Then don't install the daemon SUID or SGID !"
204 mainmenu_option next_comment
205 comment 'Paths and files'
206 eval DPATH_DEFAULT="${prefix}/lib/ircd"
207 string 'Directory where all ircd stuff resides' DPATH $DPATH_DEFAULT
208 if [ "$CHROOTDIR" = "y" ] ; then
209 define_string SPATH "/$SYMLINK"
211 define_string SPATH "$BINDIR/$SYMLINK"
213 echo "The following filenames are either full paths or files within DPATH"
214 string 'Server configuration file' CPATH 'ircd.conf'
215 if [ "$DEBUGMODE" = "y" ]; then
216 string 'Debug file if DEBUGMODE' LPATH '/tmp/ircd.log'
218 define_string LPATH "$LPATH"
222 mainmenu_option next_comment
223 comment 'Configuration'
224 int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252
225 int 'Nickname history length' NICKNAMEHISTORYLENGTH 800
228 mainmenu_option next_comment
229 comment 'Server characteristics'
230 bool 'Do you want to have a default LIST parameter' CONFIG_LIST y
231 if [ "$CONFIG_LIST" = "y" ]; then
232 string 'Give default LIST parameter' DEFAULT_LIST 'T<10'
233 define_string DEFAULT_LIST_PARAM "$DEFAULT_LIST"
235 define_string DEFAULT_LIST "$DEFAULT_LIST"
236 define_bool DEFAULT_LIST_PARAM n
240 mainmenu_option next_comment
241 comment 'Mandatory defines (you should leave these untouched)'
242 int 'Max auto connects per class (1!)' MAXIMUM_LINKS 1
243 int 'KILL nick chase time limit (30)' KILLCHASETIMELIMIT 30
244 int 'Max number of channels per user' MAXCHANNELSPERUSER 10
245 int 'Max number of silence masks (15!)' MAXSILES 15
246 int 'Expected average banmask length (40!)' AVBANLEN 40
247 eval define_macro MAXSILELENGTH \'\($AVBANLEN * MAXSILES\)\'
248 echo '* These are default values, used for class 0:'
249 int 'Max server idle time (60)' TIMESEC 60
250 int 'Class 0 ping frequency (120)' PINGFREQUENCY 120
251 int 'Class 0 connect frequency (600)' CONNECTFREQUENCY 600
252 int 'Min time before a link is good (300)' HANGONGOODLINK 300
253 int 'Wait before reconnecting to good link (10!)' HANGONRETRYDELAY 10
254 int 'connect(2) timeout (90!)' CONNECTTIMEOUT 90
255 int 'Max send queue (40000)' DEFAULTMAXSENDQLENGTH 40000