]>
jfr.im git - irc/unrealircd/unrealircd.git/blob - Config
3 # Config script for UnrealIRCd
4 # (C) 2001 The UnrealIRCd Team
6 # This configure script is free software; the UnrealIRCd Team gives
7 # unlimited permission to copy, distribute and modify as long as the
8 # copyright headers stay intact
11 # Rewritten completely to be an interface to autoconf by codemastr
12 # This was inspired by the config by Michael Graff (explorer@flame.org)
13 # but was written from scratch
15 # In order to be faster than the old Config, this assumes that all information
16 # in the cache file is valid and therefore doesn't check it, so if you messed with
17 # default values thats your problem :P
19 # some bits edited by baafie on March 17 2004, every change marked.
24 # Do this even if we're not in advanced mode
25 if [ "$SHOWLISTMODES" = "1" ] ; then
26 ARG
="$ARG--with-showlistmodes "
28 if [ "$ADVANCED" = "1" ] ; then
29 if [ "$TOPICNICKISNUH" = "1" ] ; then
30 ARG
="$ARG--with-topicisnuhost "
32 if [ "$SHUNNOTICES" = "1" ] ; then
33 ARG
="$ARG--with-shunnotices "
35 if [ "$NOOPEROVERRIDE" = "1" ] ; then
36 ARG
="$ARG--with-no-operoverride "
38 if [ "$DISABLEUSERMOD" = "1" ] ; then
39 ARG
="$ARG--with-disableusermod "
41 if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
42 ARG
="$ARG--with-operoverride-verify "
44 if [ "$DISABLEEXTBANSTACKING" = "1" ]; then
45 ARG
="$ARG--with-disable-extendedban-stacking ";
47 ARG
="$ARG--with-moduleswhich=$MODULESWHICH "
49 if [ "$NOSPOOF" = "1" ] ; then
50 ARG
="$ARG--enable-nospoof "
52 if [ -n "$HUB" ] ; then
53 ARG
="$ARG--enable-hub "
55 if [ "$CRYPTOIRCD" = "1" ] ; then
56 if test x
"$SSLDIR" = "x" ; then
57 ARG
="$ARG--enable-ssl "
59 ARG
="$ARG--enable-ssl=$SSLDIR "
62 if [ "$ZIPLINKS" = "1" ] ; then
63 if test x
"$ZIPLINKSDIR" = "x" ; then
64 ARG
="$ARG--enable-ziplinks "
66 ARG
="$ARG--enable-ziplinks=$ZIPLINKSDIR "
69 if [ "$REMOTEINC" = "1" ] ; then
70 ARG
="$ARG--enable-libcurl=$CURLDIR "
72 if [ "$INET6" = "1" ] ; then
73 ARG
="$ARG--enable-inet6 "
75 if [ "$PREFIXAQ" = "1" ]; then
76 ARG
="$ARG--enable-prefixaq "
78 ARG
="$ARG--with-listen=$LISTEN_SIZE "
79 ARG
="$ARG--with-dpath=$DPATH "
80 ARG
="$ARG--with-spath=$SPATH "
81 ARG
="$ARG--with-nick-history=$NICKNAMEHISTORYLENGTH "
82 ARG
="$ARG--with-sendq=$MAXSENDQLENGTH "
83 ARG
="$ARG--with-bufferpool=$BUFFERPOOL "
84 ARG
="$ARG--with-permissions=$DEFPERM "
85 ARG
="$ARG--with-fd-setsize=$MAXCONNECTIONS "
86 ARG
="$ARG--enable-dynamic-linking "
87 ARG
="$ARG $EXTRAPARA "
88 CONF
="./configure $ARG"
92 if [ "$CRYPTOIRCD" = "1" ] ; then
93 if [ ! -f server.req.pem
]; then
99 echo "SSL certificate already existing, no need to regenerate"
106 while [ -z "$TEST" ] ; do
107 if [ "$SHOWLISTMODES" = "1" ] ; then
113 echo "Do you want to show the modes a channel has set in the /list output?"
114 echo $n "[$TEST] -> $c"
116 if [ -z "$cc" ] ; then
128 echo "You must enter either Yes or No"
135 while [ -z "$TEST" ] ; do
136 if [ "$TOPICNICKISNUH" = "1" ] ; then
142 echo "Do you want the /topic command to show the nick!user@host of the person"
143 echo "who set the topic, rather than just the nickname?"
144 echo $n "[$TEST] -> $c"
146 if [ -z "$cc" ] ; then
158 echo "You must enter either Yes or No"
165 while [ -z "$TEST" ] ; do
166 if [ "$SHUNNOTICES" = "1" ] ; then
172 echo "Should Unreal notify a user when they are no longer shunned?"
173 echo $n "[$TEST] -> $c"
175 if [ -z "$cc" ] ; then
187 echo "You must enter either Yes or No"
194 while [ -z "$TEST" ] ; do
195 if [ "$NOOPEROVERRIDE" = "1" ] ; then
201 echo "Do you want to disable oper override?"
202 echo $n "[$TEST] -> $c"
204 if [ -z "$cc" ] ; then
216 echo "You must enter either Yes or No"
223 while [ -z "$TEST" ] ; do
224 if [ "$DISABLEUSERMOD" = "1" ] ; then
230 echo "Do you want to disable /sethost, /setident, /chgname,"
231 echo "/chghost, and /chgident?"
232 echo $n "[$TEST] -> $c"
234 if [ -z "$cc" ] ; then
246 echo "You must enter either Yes or No"
253 while [ -z "$TEST" ] ; do
254 if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
260 echo "Do you want to require opers to /invite themselves into a +s or +p channel?"
261 echo $n "[$TEST] -> $c"
263 if [ -z "$cc" ] ; then
268 OPEROVERRIDEVERIFY
="1"
271 OPEROVERRIDEVERIFY
=""
275 echo "You must enter either Yes or No"
282 while [ -z "$TEST" ] ; do
283 if [ "$DISABLEEXTBANSTACKING" = "1" ] ; then
289 echo "Do you want to disable extended ban stacking (~q:~c:#test, etc) support?"
290 echo $n "[$TEST] -> $c"
292 if [ -z "$cc" ] ; then
297 DISABLEEXTBANSTACKING
="1"
300 DISABLEEXTBANSTACKING
="0"
304 echo "You must enter either Yes or No"
311 while [ -z "$TEST" ]; do
312 if [ "$MODULESWHICH" = "onlycommands" ]; then
314 elif [ "$MODULESWHICH" = "onlymodules" ]; then
320 echo "Do you wish to compile commands.so, the m_*.so modules, or both?"
321 echo $n "[$TEST] -> $c"
323 if [ -z "$cc" ]; then
327 commands
|commands.so
|onlycommands
|commandsonly
)
328 MODULESWHICH
="onlycommands"
330 modules
|m_\
*.so
|onlymodules
|modulesonly
)
331 MODULESWHICH
="onlymodules"
333 both
|commandsandmodules
|modulesandcommands
)
334 MODULESWHICH
="commandsandmodules"
338 echo "Unrecognized response"
356 NICKNAMEHISTORYLENGTH
="2000"
357 MAXSENDQLENGTH
="3000000"
359 MAXCONNECTIONS
="1024"
369 OPEROVERRIDEVERIFY
=""
370 DISABLEEXTBANSTACKING
=""
373 if [ "`eval echo -n 'a'`" = "-n a" ] ; then
385 while [ $# -ge 1 ] ; do
386 if [ $1 = "--help" ] ; then
387 echo "Config utility for UnrealIRCd"
388 echo "-----------------------------"
389 echo "Syntax: ./Config [options]"
390 echo "-nocache Ignore settings saved in config.settings"
391 echo "-nointro Skip intro (release notes, etc)"
392 echo "-quick Skip questions, go straight to configure"
393 echo "-advanced Include additional advanced questions"
394 echo "-clean Clean ./configure cache"
396 elif [ $1 = "-nocache" ] ; then
398 elif [ $1 = "-nointro" ] ; then
400 elif [ $1 = "-quick" -o $1 = "-q" ] ; then
401 echo "running quick config"
402 if [ -f "config.settings" ] ; then
408 elif [ $1 = "-clean" -o $1 = "-C" ] ; then
410 elif [ $1 = "-advanced" ] ; then
416 if [ -f "config.settings" -a -z "$NOCACHE" ] ; then
420 if [ "$PREADVANCED" = "1" ] ; then
422 elif [ "$ADVANCED" = "1" ]; then
426 if [ -n "$CLEAN" ] ; then
432 if [ -f ".CHANGES.NEW" -a -z "$NOINTRO" ] ; then
434 echo $n "[Enter to continue]"
438 if [ -f ".RELEASE.NOTES" -a -z "$NOINTRO" ] ; then
440 echo $n "[Enter to continue]"
446 while [ -z "$TEST" ] ; do
447 if [ "$NOSPOOF" = "1" ] ; then
453 echo "Many older operating systems have an insecure TCP/IP stack"
454 echo "which may be vulnerable to IP spoofing attacks, if you run"
455 echo "an operating system that is vulnerable to such attacks"
456 echo "enable this option. This option can also be useful to prevent"
457 echo "blind proxies from connecting (eg: HTTP POST proxies)."
459 echo "Do you want to enable the server anti-spoof protection?"
460 echo $n "[$TEST] -> $c"
462 if [ -z "$cc" ] ; then
474 echo "You must enter either Yes or No"
482 echo "Where do you want to install the server configuration files?"
483 echo $n "[$TEST] -> $c"
485 if [ -z "$cc" ] ; then
488 DPATH
=`eval echo $cc` # modified
493 echo "Where do you want to install the server binary?"
494 echo $n "[$TEST] -> $c"
496 if [ -z "$cc" ] ; then
499 SPATH
=`eval echo $cc` # modified
503 while [ -z "$TEST" ] ; do
504 if [ "$HUB" = "1" ] ; then
510 echo "Would you like to compile as a hub or as a leaf?"
511 echo "Type Hub to select hub and Leaf to select leaf."
512 echo $n "[$TEST] -> $c"
514 if [ -z "$cc" ] ; then
526 echo "You must enter either Hub or Leaf"
533 while [ -z "$TEST" ] ; do
536 echo "What should the default permissions for your configuration files be? (Set this to 0 to disable)"
537 echo "It is strongly recommended that you use 0600 to prevent unwanted reading of the file"
538 echo $n "[$TEST] -> $c"
540 if [ -z "$cc" ] ; then
550 echo "You must enter a number"
558 while [ -z "$TEST" ] ; do
559 if [ "$CRYPTOIRCD" = "1" ] ; then
565 echo "Do you want to support SSL (Secure Sockets Layer) connections?"
566 echo $n "[$TEST] -> $c"
568 if [ -z "$cc" ] ; then
580 echo "You must enter either Yes or No"
586 if [ "$CRYPTOIRCD" = "1" ] ; then
589 echo "If you know the path to OpenSSL on your system, enter it here. If not"
590 echo "leave this blank"
591 echo $n "[$TEST] -> $c"
593 if [ -z "$cc" ] ; then
596 SSLDIR
=`eval echo $cc` # modified
601 while [ -z "$TEST" ] ; do
602 if [ "$INET6" = "1" ] ; then
608 echo "Do you want to enable IPv6 support?"
609 echo $n "[$TEST] -> $c"
611 if [ -z "$cc" ] ; then
623 echo "You must enter either Yes or No"
630 while [ -z "$TEST" ] ; do
631 if [ "$ZIPLINKS" = "1" ] ; then
637 echo "Do you want to enable ziplinks support?"
638 echo $n "[$TEST] -> $c"
640 if [ -z "$cc" ] ; then
652 echo "You must enter either Yes or No"
658 if [ "$ZIPLINKS" = "1" ] ; then
661 echo "If you know the path to zlib on your system, enter it here. If not"
662 echo "leave this blank"
663 echo $n "[$TEST] -> $c"
665 if [ -z "$cc" ] ; then
668 ZIPLINKSDIR
=`eval echo $cc` # modified
673 while [ -z "$TEST" ] ; do
674 if [ "$REMOTEINC" = "1" ] ; then
680 echo "Do you want to enable remote includes?"
681 echo $n "[$TEST] -> $c"
683 if [ -z "$cc" ] ; then
696 echo "You must enter either Yes or No"
702 if [ "$REMOTEINC" = "1" ] ; then
704 while [ -z "$TEST" ] ; do
707 echo "Specify the directory you installed libcurl to"
708 echo $n "[$TEST] -> $c"
710 if [ -z "$cc" ] ; then
714 CURLDIR
=`eval echo $cc` # modified
721 while [ -z "$TEST" ] ; do
722 if [ "$PREFIXAQ" = "1" ] ; then
728 echo "Do you want to enable prefixes for chanadmin and chanowner?"
729 echo "This will give +a the & prefix and ~ for +q (just like +o is @)"
730 echo "Supported by the major clients (mIRC, xchat, epic, eggdrop, Klient,"
731 echo "PJIRC, irssi, CGI:IRC, etc.)"
732 echo "This feature should be enabled/disabled network-wide."
733 echo $n "[$TEST] -> $c"
735 if [ -z "$cc" ] ; then
747 echo "You must enter either Yes or No"
755 while [ -z "$TEST" ] ; do
758 echo "What listen() backlog value do you wish to use? Some older servers"
759 echo "have problems with more than 5, others work fine with many more."
760 echo $n "[$TEST] -> $c"
762 if [ -z "$cc" ] ; then
772 echo "You must enter a number"
779 while [ -z "$TEST" ] ; do
780 TEST
="$NICKNAMEHISTORYLENGTH"
782 echo "How far back do you want to keep the nickname history?"
783 echo $n "[$TEST] -> $c"
785 if [ -z "$cc" ] ; then
786 NICKNAMEHISTORYLENGTH
=$TEST
791 NICKNAMEHISTORYLENGTH
="$cc"
795 echo "You must enter a number"
802 while [ -z "$TEST" ] ; do
803 TEST
="$MAXSENDQLENGTH"
805 echo "What is the maximum sendq length you wish to have?"
806 echo $n "[$TEST] -> $c"
808 if [ -z "$cc" ] ; then
813 [1-9][0-9][0-9][0-9]*)
818 echo "You must enter a number greater than or equal to 1000"
825 while [ -z "$TEST" ] ; do
828 echo "How many buffer pools would you like?"
829 echo "This number will be multiplied by MAXSENDQLENGTH."
830 echo $n "[$TEST] -> $c"
832 if [ -z "$cc" ] ; then
842 echo "You must enter a number"
851 while [ -z "$TEST" ] ; do
852 TEST
="$MAXCONNECTIONS"
854 echo "How many file descriptors (or sockets) can the IRCd use?"
855 echo $n "[$TEST] -> $c"
857 if [ -z "$cc" ] ; then
867 echo "You must to enter a number greater than or equal to 100"
872 if [ -n "$ADVANCED" ] ; then
876 echo "Would you like any more parameters to configure?"
877 echo "Write them here:"
881 rm -f config.settings
882 cat > config.settings
<< __EOF__
889 LISTEN_SIZE="$LISTEN_SIZE"
890 MAXSENDQLENGTH="$MAXSENDQLENGTH"
891 BUFFERPOOL="$BUFFERPOOL"
892 MAXCONNECTIONS="$MAXCONNECTIONS"
893 NICKNAMEHISTORYLENGTH="$NICKNAMEHISTORYLENGTH"
896 CRYPTOIRCD="$CRYPTOIRCD"
899 ZIPLINKSDIR="$ZIPLINKSDIR"
900 REMOTEINC="$REMOTEINC"
902 SHOWLISTMODES="$SHOWLISTMODES"
903 TOPICNICKISNUH="$TOPICNICKISNUH"
904 SHUNNOTICES="$SHUNNOTICES"
905 NOOPEROVERRIDE="$NOOPEROVERRIDE"
906 DISABLEUSERMOD="$DISABLEUSERMOD"
907 OPEROVERRIDEVERIFY="$OPEROVERRIDEVERIFY"
908 DISABLEEXTBANSTACKING="$DISABLEEXTBANSTACKING"
909 MODULESWHICH="$MODULESWHICH"
910 EXTRAPARA="$EXTRAPARA"
917 _______________________________________________________________________
919 | UnrealIRCd Compile-Time Config |
920 |_______________________________________________________________________|
921 |_______________________________________________________________________|
923 | Now all you have to do is type 'make' and let it compile. When that's |
924 | done, you will receive other instructions on what to do next. |
926 |_______________________________________________________________________|
927 |_______________________________________________________________________|
928 | - The UnrealIRCd Team - |
930 | * Stskeeps stskeeps@unrealircd.com |
931 | * codemastr codemastr@unrealircd.com |
932 | * Syzop syzop@unrealircd.com |
933 |_______________________________________________________________________|