3 # InspIRCd Configuration Script
5 # Copyright 2003 The ChatSpike Development Team
6 # <brain@chatspike.net>
7 # <Craig@chatspike.net>
9 # [14:21] Brain: <matrix impression> i know perl-fu!
13 ########################################
17 chomp($topdir = getcwd());
18 $this = resolve_directory($topdir); # PWD, Regardless.
19 @modlist = (); # Declare for Module List..
20 %config = (); # Initiate Configuration Hash..
21 $config{ME} = resolve_directory($topdir); # Present Working Directory
22 $config{BASE_DIR} = $config{ME}; # Use CWD as 'Base' Directory.
23 $config{CONFIG_DIR} = resolve_directory($config{ME}."/conf"); # Configuration Directory
24 $config{MODULE_DIR} = resolve_directory($config{ME}."/modules"); # Modules Directory
25 $config{BINARY_DIR} = resolve_directory($config{ME}."/bin"); # Binary Directory
26 $config{LIBRARY_DIR} = resolve_directory($config{ME}."/lib"); # Library Directory
27 chomp($config{HAS_GNUTLS} = `libgnutls-config --version 2>/dev/null | cut -c 1,2,3`); # GNUTLS Version.
28 chomp($config{HAS_OPENSSL} = `openssl version 2>/dev/null`); # Openssl version
29 $config{USE_GNUTLS} = "n"; # Use gnutls.
30 $config{USE_OPENSSL} = "n"; # Use openssl.
31 $config{OPTIMITEMP} = "0"; # Default Optimisation Value
32 $config{OPTIMISATI} = "-g"; # Optimisation Flag
33 $config{NICK_LENGT} = "31"; # Default Nick Length
34 $config{CHAN_LENGT} = "64"; # Default Channel Name Length
35 $config{MAX_CHANNE} = "20"; # Default Max. Channels per user
36 $config{MAX_OPERCH} = "60"; # Default Max. Channels per oper
37 $config{MAXI_MODES} = "20"; # Default Max. Number of Modes set at once.
38 $config{HAS_STRLCPY} = "false"; # strlcpy Check.
39 $config{HAS_STDINT} = "false"; # stdint.h check
40 $config{HAS_EXECINFO} = "0"; # execinfo.h Check.
41 $config{USE_KQUEUE} = "y"; # kqueue enabled
42 $config{USE_EPOLL} = "y"; # epoll enabled
43 $config{THREADED_DNS} = "n"; # threaded dns
44 $config{IPV6} = "n"; # IPv6 support (experimental)
45 $config{SUPPORT_IP6LINKS} = "y"; # IPv4 supporting IPv6 links (experimental)
46 $config{STATIC_LINK} = "no"; # are doing static modules?
47 chomp($config{MAX_CLIENT_T} = `sh -c \"ulimit -n\"`); # FD Limit
48 chomp($config{MAX_DESCRIPTORS} = `sh -c \"ulimit -n\"`); # Hard FD Limit
49 chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Version
50 chomp($config{OSNAME} = `/bin/uname`); # Operating System Name
51 $config{CC} = "g++"; # C++ compiler
52 $config{MAKEORDER} = "ircd mods"; # build order
53 $config{STATICLIBS} = ""; # library archive path
54 $config{MAX_IDENT} = "12"; # max ident size
55 $config{MAX_QUIT} = "255"; # max quit message size
56 $config{MAX_TOPIC} = "307"; # max topic size
57 $config{MAX_KICK} = "255"; # max kick message size
58 $config{MAX_GECOS} = "128"; # max GECOS size
59 $config{MAX_AWAY} = "200"; # max AWAY size
63 $config{HAS_OPENSSL} =~ /OpenSSL (\S+) \d+ \S+ \d{4}/;
64 $config{HAS_OPENSSL} = $1;
66 if ($config{GCCVER} eq "") {
67 print "g++ was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n";
71 # Minihack! Convert Cygwin to 'Cyg-Static' so i can
72 # Keep my dynamic module experiments here for later
75 if ($config{OSNAME} =~ /CYGWIN/)
77 $config{OSNAME} = "CYG-STATIC";
79 elsif($config{OSNAME} =~ /^MINGW32/)
81 $config{OSNAME} = "MINGW32";
83 elsif ((!$config{OSNAME}) || ($config{OSNAME} eq ""))
85 chomp($config{OSNAME} = `/usr/bin/uname`);
87 if((!$config{OSNAME}) || ($config{OSNAME} eq ""))
89 $config{OSNAME} = "Unknown";
93 if (!$config{MAX_CLIENT_T}) {
94 $config{MAX_CLIENT_T} = 1024; # Set a reasonable 'Default'
95 $fd_scan_fail = "true"; # Used Later
98 # Get and Set some important vars..
101 my $arg = $ARGV[0]; # Do Some Argument Checks..
102 if ($arg eq "-clean") {
103 system("rm -rf .config.cache");
104 } # Remove the config.cache file.
106 if ($arg eq "-update") {
107 # Does the cache file exist?
109 # No, No it doesn't.. *BASH*
110 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
113 # We've Loaded the cache file and all our variables..
114 print "Updating Files..\n";
116 $has_epoll = $config{HAS_EPOLL};
117 $has_kqueue = $config{HAS_KQUEUE};
124 if ($arg eq "-modupdate") {
125 # Does the cache file exist?
127 # No, No it doesn't.. *BASH*
128 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
131 # We've Loaded the cache file and all our variables..
132 print "Updating Files..\n";
134 $has_epoll = $config{HAS_EPOLL};
135 $has_kqueue = $config{HAS_KQUEUE};
144 if ($arg eq "-svnupdate") {
146 open(FH,"<.svn/entries") or $fail = 1;
148 print "This is not an SVN copy of InspIRCd.\n";
151 system("svn update");
152 system("perl configure -update");
153 if ($ARGV[1] eq "rebuild") {
154 system("make install");
159 print "Checking for cache from previous configure...\n";
161 print "Checking operating system version...\n";
164 if (!$config{MAX_CLIENT}) {
165 # If the cache hasn't set the max clients, copy the variable of MAX_CLIENT_T, this
166 # allows us to keep _T for testing purposes. (ie. "Are you sure you want to go
167 # higher than the found value" :))
168 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
171 printf "Checking if stdint.h exists... ";
172 $config{HAS_STDINT} = "true";
174 open(STDINT, "</usr/include/stdint.h") or $config{HAS_STDINT} = "false";
175 if ($config{HAS_STDINT} eq "true") {
178 print "yes\n" if $config{HAS_STDINT} eq "true";
179 print "no\n" if $config{HAS_STDINT} eq "false";
182 printf "Checking if strlcpy exists... ";
183 # Perform the strlcpy() test..
184 $config{HAS_STRLCPY} = "false";
186 open(STRLCPY, "</usr/include/string.h") or $fail = 1;
188 while (chomp($line = <STRLCPY>)) {
189 # try and find the delcaration of:
190 # size_t strlcpy(...)
191 if ($line =~ /size_t(\0x9|\s)+strlcpy/) {
192 $config{HAS_STRLCPY} = "true";
197 print "yes\n" if $config{HAS_STRLCPY} eq "true";
198 print "no\n" if $config{HAS_STRLCPY} eq "false";
200 printf "Checking if execinfo.h exists... ";
201 $config{HAS_EXECINFO} = "0";
203 open(EXECINFO, "</usr/include/execinfo.h") or $fail = 1;
206 open(EXECINFO, "</usr/local/include/execinfo.h") or $fail = 1;
208 printf "/usr/local/include/execinfo.h\n";
209 $config{HAS_EXECINFO} = "1";
213 printf "Not found!\n";
217 printf "/usr/include/execinfo.h\n";
218 $config{HAS_EXECINFO} = "1";
222 printf "Checking if kqueue exists... ";
225 open(KQUEUE, "</usr/include/sys/event.h") or $fail = 1;
227 while (chomp($line = <KQUEUE>)) {
228 # try and find the delcaration of:
230 if ($line =~ /int(\0x9|\s)+kqueue/) {
236 print "yes\n" if $has_kqueue == 1;
237 print "no\n" if $has_kqueue == 0;
239 printf "Checking if epoll exists... ";
242 open(EPOLL, "</usr/include/sys/epoll.h") or $fail = 1;
248 my $kernel = `uname -r`;
250 if (($kernel =~ /2\.0/) || ($kernel =~ /2\.2/) || ($kernel =~ /2\.4/)) {
254 print "yes\n" if $has_epoll == 1;
255 print "no\n" if $has_epoll == 0;
257 if (($config{OSNAME} =~ /CYGWIN/) || ($config{OSNAME} eq "CYG-STATIC")) {
258 $config{HAS_STRLCPY} = "true";
261 $config{HAS_EPOLL} = $has_epoll;
262 $config{HAS_KQUEUE} = $has_kqueue;
264 printf "Checking for libgnutls... ";
265 if (($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS} >= 1.2) || ($config{HAS_GNUTLS} eq "y"))) {
267 $config{HAS_GNUTLS} = "y";
270 $config{HAS_GNUTLS} = "n";
273 printf "Checking for openssl... ";
274 if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPENSSL} eq "y"))) {
276 $config{HAS_OPENSSL} = "y";
279 $config{HAS_OPENSSL} = "n";
282 ################################################################################
283 # BEGIN INTERACTIVE PART #
284 ################################################################################
288 # Display Splash Logo..
290 chomp($wholeos = `uname -mnr`);
292 my $rev = getrevision();
293 # Display Introduction Message..
295 Welcome to the InspIRCd Configuration program!
297 *** If you are unsure of any of these values, leave it blank for ***
298 *** standard settings that will work, and your server will run ***
299 *** using them. If you are running this server as part of a ***
300 *** larger network, you must consult with your network admins ***
301 *** for the proper values to use, or server links will be unstable! ***
303 Press \033[1m<RETURN>\033[0m to accept the default for any option, or enter
304 a new value. Please note: You will \033[1mHAVE\033[0m to read the docs
305 dir, otherwise you won't have a config file!
307 Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos), fdmax: $config{MAX_CLIENT_T}
308 Your InspIRCd revision ID is \033[1;32mr$rev\033[0m";
310 print " (Non-SVN build)";
314 $config{CHANGE_COMPILER} = "n";
315 print "I have detected the following compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
317 while (($config{GCCVER} < 3) || ($config{GCCVER} eq "")) {
318 print "\033[1;32mIMPORTANT!\033[0m A GCC 2.x compiler has been detected, and
319 should NOT be used. You should probably specify a newer compiler.\n\n";
320 yesno(CHANGE_COMPILER,"Do you want to change the compiler?");
321 if ($config{CHANGE_COMPILER} =~ /y/i) {
322 print "What command do you want to use to invoke your compiler?\n";
323 print "[\033[1;32m$config{CC}\033[0m] -> ";
324 chomp($config{CC} = <STDIN>);
325 if ($config{CC} eq "") {
328 chomp($foo = `$config{CC} -dumpversion | cut -c 1`);
330 chomp($config{GCCVER} = `$config{CC} -dumpversion | cut -c 1`); # we must redo these if we change compilers
331 print "Queried compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
332 if ($config{GCCVER} < 3) {
333 print "\033[1;32mGCC 2.x WILL NOT WORK!\033[0m. Let's try that again, shall we?\n";
337 print "\033[1;32mWARNING!\033[0m Could not execute the compiler you specified. You may want to try again.\n";
344 # Directory Settings..
345 my $tmpbase = $config{BASE_DIR};
346 dir_check("do you wish to install the InspIRCd base", "BASE_DIR");
347 if ($tmpbase ne $config{BASE_DIR}) {
348 $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Directory
349 $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory
350 $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory
351 $config{LIBRARY_DIR} = resolve_directory($config{BASE_DIR}."/lib"); # Library Directory
354 dir_check("are the configuration files", "CONFIG_DIR");
355 dir_check("are the modules to be compiled to", "MODULE_DIR");
356 dir_check("is the IRCd binary to be placed", "BINARY_DIR");
357 dir_check("are the IRCd libraries to be placed", "LIBRARY_DIR");
360 yesno(USE_KQUEUE,"You are running a BSD operating system, and kqueue\nwas detected. Would you like to enable kqueue support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable kqueue?");
364 yesno(USE_EPOLL,"You are running a Linux 2.6+ operating system, and epoll\nwas detected. Would you like to enable epoll support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable epoll?");
367 $chose_hiperf = (($config{USE_EPOLL} eq "y") || ($config{USE_KQUEUE} eq "y"));
368 if (!$chose_hiperf) {
369 print "No high-performance socket engines are available, or you chose\n";
370 print "not to enable one. Defaulting to select() engine.\n\n";
373 yesno(IPV6,"Would you like to build InspIRCd with IPv6 support?");
376 if ($config{IPV6} eq "y") {
377 print "You have chosen to build an \033[1;32mIPV6-only\033[0m server.\nTo accept IPV4 users, you must use the '::ffff:' notation of addresses.\n\n";
378 $config{SUPPORT_IP6LINKS} = "y";
380 yesno(SUPPORT_IP6LINKS,"You have chosen to build an \033[1;32mIPV4-only\033[0m server.\nWould you like to enable support for linking to IPV6-enabled\nInspIRCd servers which are using '::ffff:' notation?\nIf you are using a recent operating\nsystem and are unsure, answer yes.");
384 if (($config{HAS_GNUTLS} eq "y") && ($config{HAS_OPENSSL} eq "y")) {
385 print "I have detected both GnuTLS and OpenSSL on your system.\n";
386 print "I will default to GnuTLS. If you wish to use OpenSSL\n";
387 print "instead, you should enable the OpenSSL module yourself\n";
388 print "by copying it from src/modules/extra to src/modules.\n\n";
391 if ($config{HAS_GNUTLS} eq "y") {
392 yesno(USE_GNUTLS, "Would you like to enable SSL Support?");
393 if ($config{USE_GNUTLS} eq "y") {
394 print "\nUsing GnuTLS SSL module.\n";
396 } elsif ($config{HAS_OPENSSL} eq "y") {
397 yesno(USE_OPENSSL, "Would you like to enable SSL Support?");
398 if ($config{USE_OPENSSL} eq "y") {
399 print "\nUsing OpenSSL SSL module.\nYou will get better performance if you move to GnuTLS in the future.\n";
403 print "\nThe following questions will ask you for various figures relating\n";
404 print "To your IRCd install. Please note that these should usually be left\n";
405 print "as defaults unless you have a real reason to change them. If they\n";
406 print "changed, then the values must be identical on all servers on your\n";
407 print "network, or malfunctions and/or crashes may occur, with the exception\n";
408 print "of the 'maximum number of clients' setting which may be different on\n";
409 print "different servers on the network.\n\n";
411 # File Descriptor Settings..
414 print "Maximum number of clients at any one time ($config{MAX_CLIENT_T})\n";
415 print "[\033[1;32m$config{MAX_CLIENT}\033[0m] -> ";
416 chomp($var = <STDIN>);
418 $var = $config{MAX_CLIENT};
420 if ($var =~ /^\d+$/) {
421 if (($var > $config{MAX_CLIENT_T}) && ($fd_scan_failed ne true)) {
422 # Client has entered a larger number than the 'discovered' value
424 print "WARNING: Our scans have indicated that you are attempting
425 to use more sockets than there are avaliable. Are you sure
426 you wish to do this? It may cause the IRCd to malfunction [y/n]
427 [\033[1;32mn\033[0m] -> $c";
428 chomp($tmp = <STDIN>);
430 print "Please enter the correct value.\n\n";
435 print "You must enter a number in this field. Please try again.\n\n";
438 # If we get here, we should be good to go.
439 $config{MAX_CLIENT} = $var;
446 print "What is the maximum length of nicknames?\n";
447 print "[\033[1;32m$config{NICK_LENGT}\033[0m] -> ";
448 chomp($var = <STDIN>);
450 $var = $config{NICK_LENGT};
452 if ($var =~ /^\d+$/) {
453 # We don't care what the number is, set it and be on our way.
454 $config{NICK_LENGT} = $var;
458 print "You must enter a number in this field. Please try again.\n\n";
464 print "What is the maximum length of channel names?\n";
465 print "[\033[1;32m$config{CHAN_LENGT}\033[0m] -> ";
466 chomp($var = <STDIN>);
468 $var = $config{CHAN_LENGT};
470 if ($var =~ /^\d+$/) {
471 # We don't care what the number is, set it and be on our way.
472 $config{CHAN_LENGT} = $var;
476 print "You must enter a number in this field. Please try again.\n\n";
482 print "What is the maximum number of channels a normal user may join at any one time?\n";
483 print "[\033[1;32m$config{MAX_CHANNE}\033[0m] -> ";
484 chomp($var = <STDIN>);
486 $var = $config{MAX_CHANNE};
488 if ($var =~ /^\d+$/) {
489 # We don't care what the number is, set it and be on our way.
490 $config{MAX_CHANNE} = $var;
494 print "You must enter a number in this field. Please try again.\n\n";
500 print "What is the maximum number of channels an oper may join at any one time?\n";
501 print "[\033[1;32m$config{MAX_OPERCH}\033[0m] -> ";
502 chomp($var = <STDIN>);
504 $var = $config{MAX_OPERCH};
506 if ($var =~ /^\d+$/) {
507 # We don't care what the number is, set it and be on our way.
508 $config{MAX_OPERCH} = $var;
516 print "What is the maximum number of mode changes in one line?\n";
517 print "[\033[1;32m$config{MAXI_MODES}\033[0m] -> ";
518 chomp($var = <STDIN>);
520 $var = $config{MAXI_MODES};
522 if ($var =~ /^\d+$/) {
523 # We don't care what the number is, set it and be on our way.
524 $config{MAXI_MODES} = $var;
528 print "You must enter a number in this field. Please try again.\n\n";
534 print "What is the maximum length of an ident (username)?\n";
535 print "[\033[1;32m$config{MAX_IDENT}\033[0m] -> ";
536 chomp($var = <STDIN>);
538 $var = $config{MAX_IDENT};
540 if ($var =~ /^\d+$/) {
541 # We don't care what the number is, set it and be on our way.
542 $config{MAX_IDENT} = $var;
546 print "You must enter a number in this field. Please try again.\n\n";
552 print "What is the maximum length of a quit message?\n";
553 print "[\033[1;32m$config{MAX_QUIT}\033[0m] -> ";
554 chomp($var = <STDIN>);
556 $var = $config{MAX_QUIT};
558 if ($var =~ /^\d+$/) {
559 # We don't care what the number is, set it and be on our way.
560 $config{MAX_QUIT} = $var;
564 print "You must enter a number in this field. Please try again.\n\n";
570 print "What is the maximum length of a channel topic?\n";
571 print "[\033[1;32m$config{MAX_TOPIC}\033[0m] -> ";
572 chomp($var = <STDIN>);
574 $var = $config{MAX_TOPIC};
576 if ($var =~ /^\d+$/) {
577 # We don't care what the number is, set it and be on our way.
578 $config{MAX_TOPIC} = $var;
582 print "You must enter a number in this field. Please try again.\n\n";
588 print "What is the maximum length of a kick message?\n";
589 print "[\033[1;32m$config{MAX_KICK}\033[0m] -> ";
590 chomp($var = <STDIN>);
592 $var = $config{MAX_KICK};
594 if ($var =~ /^\d+$/) {
595 # We don't care what the number is, set it and be on our way.
596 $config{MAX_KICK} = $var;
600 print "You must enter a number in this field. Please try again.\n\n";
606 print "What is the maximum length of a GECOS (real name) field?\n";
607 print "[\033[1;32m$config{MAX_GECOS}\033[0m] -> ";
608 chomp($var = <STDIN>);
610 $var = $config{MAX_GECOS};
612 if ($var =~ /^\d+$/) {
613 # We don't care what the number is, set it and be on our way.
614 $config{MAX_GECOS} = $var;
618 print "You must enter a number in this field. Please try again.\n\n";
624 print "What is the maximum length of an away message?\n";
625 print "[\033[1;32m$config{MAX_AWAY}\033[0m] -> ";
626 chomp($var = <STDIN>);
628 $var = $config{MAX_AWAY};
630 if ($var =~ /^\d+$/) {
631 # We don't care what the number is, set it and be on our way.
632 $config{MAX_AWAY} = $var;
636 print "You must enter a number in this field. Please try again.\n\n";
641 print "Enter the Level Of Binary optimisation. This is a number between 0 and 3.
642 The InspIRCd Team will NOT support any bug reports above 0. Also note,
643 the IRCd behaviour will be different depending on this value. Please
644 read the documentation for more information.
646 The higher the number, the more optimised your binary will be. This
647 value will default to 0 if you either don't enter a number, or enter
648 a value outside the range.
650 As always, if you are unsure, just press enter and accept the default.\n\n";
651 print "[\033[1;32m$config{OPTIMITEMP}\033[0m] -> ";
652 chomp($var = <STDIN>);
654 $var = $config{OPTIMITEMP};
658 $config{OPTIMITEMP} = 1;
659 $config{OPTIMISATI} = "-O";
660 } elsif ($var eq "2") {
661 $config{OPTIMITEMP} = 2;
662 $config{OPTIMISATI} = "-O2";
663 } elsif ($var eq "3") {
664 $config{OPTIMITEMP} = 3;
665 $config{OPTIMISATI} = "-O3";
667 $config{OPTIMITEMP} = 0;
668 $config{OPTIMISATI} = "-g";
671 print "\n\033[1;32mPre-build configuration is complete!\033[0m\n\n";
672 print "\033[0mBase install path:\033[1;32m\t\t$config{BASE_DIR}\033[0m\n";
673 print "\033[0mConfig path:\033[1;32m\t\t\t$config{CONFIG_DIR}\033[0m\n";
674 print "\033[0mModule path:\033[1;32m\t\t\t$config{MODULE_DIR}\033[0m\n";
675 print "\033[0mLibrary path:\033[1;32m\t\t\t$config{LIBRARY_DIR}\033[0m\n";
676 print "\033[0mMax connections:\033[1;32m\t\t$config{MAX_CLIENT}\033[0m\n";
677 print "\033[0mMax User Channels:\033[1;32m\t\t$config{MAX_CHANNE}\033[0m\n";
678 print "\033[0mMax Oper Channels:\033[1;32m\t\t$config{MAX_OPERCH}\033[0m\n";
679 print "\033[0mMax nickname length:\033[1;32m\t\t$config{NICK_LENGT}\033[0m\n";
680 print "\033[0mMax channel length:\033[1;32m\t\t$config{CHAN_LENGT}\033[0m\n";
681 print "\033[0mMax mode length:\033[1;32m\t\t$config{MAXI_MODES}\033[0m\n";
682 print "\033[0mMax ident length:\033[1;32m\t\t$config{MAX_IDENT}\033[0m\n";
683 print "\033[0mMax quit length:\033[1;32m\t\t$config{MAX_QUIT}\033[0m\n";
684 print "\033[0mMax topic length:\033[1;32m\t\t$config{MAX_TOPIC}\033[0m\n";
685 print "\033[0mMax kick length:\033[1;32m\t\t$config{MAX_KICK}\033[0m\n";
686 print "\033[0mMax name length:\033[1;32m\t\t$config{MAX_GECOS}\033[0m\n";
687 print "\033[0mMax away length:\033[1;32m\t\t$config{MAX_AWAY}\033[0m\n";
688 print "\033[0mGCC Version Found:\033[1;32m\t\t$config{GCCVER}.x\033[0m\n";
689 print "\033[0mOptimization Flag:\033[1;32m\t\t$config{OPTIMISATI}\033[0m\n";
690 print "\033[0mCompiler program:\033[1;32m\t\t$config{CC}\033[0m\n";
691 print "\033[0mStatic modules:\033[1;32m\t\t\t$config{STATIC_LINK}\033[0m\n";
692 print "\033[0mMultithread DNS:\033[1;32m\t\t$config{THREADED_DNS}\033[0m\n";
693 print "\033[0mIPv6 Support:\033[1;32m\t\t\t$config{IPV6}\033[0m\n";
694 print "\033[0mIPv6 to IPv4 Links:\033[1;32m\t\t$config{SUPPORT_IP6LINKS}\033[0m\n";
695 print "\033[0mGnuTLS Support:\033[1;32m\t\t\t$config{USE_GNUTLS}\033[0m\n";
696 print "\033[0mOpenSSL Support:\033[1;32m\t\t$config{USE_OPENSSL}\033[0m\n\n";
698 if ($config{USE_GNUTLS} eq "y") {
700 open(TMP, "<src/modules/m_ssl_gnutls.cpp") or $failed = 1;
703 print "Symlinking src/modules/m_ssl_gnutls.cpp from extra/\n";
704 chdir("src/modules");
705 system("ln -s extra/m_ssl_gnutls.cpp");
710 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
712 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
715 print "SSL Certificates Not found, Generating.. \n\n
716 *************************************************************
717 * Generating the Private Key may take some time, go grab a *
718 * Coffee. Even better, to generate some more entropy if it *
719 * is taking a while, open another console and type du / a *
720 * few times and get that HD going :) Then answer the *
721 * Questions which follow. If you are unsure, just hit enter *
722 *************************************************************\n\n";
723 system("certtool --generate-privkey --outfile key.pem");
724 system("certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem");
725 print "\nCertificate generation complete, copying to config directory... ";
726 system("mv key.pem $config{CONFIG_DIR}/key.pem");
727 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
730 print "SSL Certificates found, skipping.\n\n"
732 } elsif ($config{USE_OPENSSL} eq "y") {
734 open(TMP, "<src/modules/m_ssl_openssl.cpp") or $failed = 1;
737 print "Symlinking src/modules/m_ssl_openssl.cpp from extra/\n";
738 chdir("src/modules");
739 system("ln -s extra/m_ssl_openssl.cpp");
744 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
746 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
749 print "SSL Certificates Not found, Generating.. \n\n
750 *************************************************************
751 * Generating the certificates may take some time, go grab a *
752 * coffee, or something. *
753 *************************************************************\n\n";
754 system("openssl req -x509 -nodes -newkey rsa:1024 -keyout key.pem -out cert.pem");
755 system("openssl dhparam -out dhparams.pem 1024");
756 print "\nCertificate generation complete, copying to config directory... ";
757 system("mv key.pem $config{CONFIG_DIR}/key.pem");
758 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
759 system("mv dhparams.pem $config{CONFIG_DIR}/dhparams.pem");
762 print "SSL Certificates found, skipping.\n\n"
765 if (($config{USE_GNUTLS} eq "n") && ($config{USE_OPENSSL} eq "n")) {
766 print "Skipping SSL Certificate generation, SSL support is not available.\n\n";
774 print "To build your server with these settings, please type '\033[1;32m$config{MAKEPROG}\033[0m' now.\n";
775 if (($config{USE_GNUTLS} eq "y") || ($config{USE_OPENSSL} eq "y")) {
776 print "Please remember that to enable \033[1;32mSSL support\033[0m you must\n";
777 print "load the required modules in your config. This configure process\n";
778 print "has just prepared these modules to be compiled for you, and has not\n";
779 print "configured them to be compiled into the core of the ircd.\n";
781 print "*** \033[1;32mRemember to edit your configuration files!!!\033[0m ***\n\n\n";
782 if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) {
783 print "\033[1;32mWARNING!\033[0m You are running OpenBSD but you are using the base gcc package\nrather than eg++. This compile will most likely fail, but i'm letting you\ngo ahead with it anyway, just in case i'm wrong :-)\n";
786 if ($config{GCCVER} < "3") {
788 \033[1;32mWARNING!\033[0m You are attempting to compile InspIRCd on GCC 2.x!
789 GCC 2.x series compilers only had partial (read as broken) C++ support, and
790 your compile will most likely fail horribly! If you have any problems, do NOT
791 report them to the bugtracker or forums without first upgrading your compiler
792 to a newer 3.x or 4.x (or whatever is available currently) version.
796 ################################################################################
798 ################################################################################
800 # Retrieves the .config.cache file, and loads values into the main config hash.
801 open(CACHE, ".config.cache") or return undef;
804 # Ignore Blank lines, and comments..
807 my ($key, $value) = split("=", $_);
808 $value =~ /^\"(.*)\"$/;
809 # Do something with data here!
817 # Dump the contents of %config
818 print "Writing \033[1;32mcache file\033[0m for future ./configures ...\n";
819 open(FILEHANDLE, ">.config.cache");
820 foreach $key (keys %config) {
821 print FILEHANDLE "$key=\"$config{$key}\"\n";
827 my ($desc, $hash_key) = @_;
830 print "In what directory $desc?\n";
831 print "[\033[1;32m$config{$hash_key}\033[0m] -> ";
832 chomp($var = <STDIN>);
834 $var = $config{$hash_key};
836 if ($var =~ /^\~\/(.+)$/) {
837 # Convert it to a full path..
838 $var = resolve_directory($ENV{HOME} . "/" . $1);
840 elsif ((($config{OSNAME} == "MINGW32") and ($var !~ /^[A-Z]{1}:\\.*/)) and (substr($var,0,1) ne "/"))
842 # Assume relative Path was given.. fill in the rest.
843 $var = $this . "/$var";
846 $var = resolve_directory($var);
848 print "$var does not exist. Create it?\n[\033[1;32my\033[0m] ";
849 chomp($tmp = <STDIN>);
850 if (($tmp eq "") || ($tmp =~ /^y/i)) {
851 # Attempt to Create the Dir..
853 print("mkdir -p \"$var\" >> /dev/null 2>&1");
854 $chk = system("mkdir -p \"$var\" >> /dev/null 2>&1") / 256;
856 print "Unable to create directory. ($var)\n\n";
861 # They said they don't want to create, and we can't install there.
867 # Target exists, but is not a directory.
868 print "File $var exists, but is not a directory.\n\n";
872 # Either Dir Exists, or was created fine.
873 $config{$hash_key} = $var;
880 if ($config{OSNAME} =~ /BSD$/) {
881 $config{LDLIBS} = "-Ldl -lstdc++";
882 $config{FLAGS} = "-fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
883 $config{MAKEPROG} = "gmake";
884 if ($config{OSNAME} eq "OpenBSD") {
885 chomp($foo = `eg++ -dumpversion | cut -c 1`);
886 # theyre running the package version of gcc (eg++)... detect it and set up its version numbers.
887 # if theyre not running this, configure lets the build continue but they probably wont manage to
888 # compile as this standard version is 2.95.3!
890 $config{CC} = "eg++";
891 chomp($config{GCCVER} = `eg++ -dumpversion | cut -c 1`); # we must redo these if we change the compiler path
895 $config{LDLIBS} = "-ldl -lstdc++";
896 $config{FLAGS} = "-fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
897 $config{MAKEPROG} = "make";
898 if ($config{OSNAME} =~ /CYGWIN/) {
899 $config{FLAGS} = "-Wall -Woverloaded-virtual $config{OPTIMISATI}";
900 $config{LDLIBS} = "";
901 $config{MAKEPROG} = "/usr/bin/make";
902 $config{MAKEORDER} = "ircd mods";
903 } elsif ($config{OSNAME} eq "CYG-STATIC") {
904 $config{FLAGS} = "-Wall -Woverloaded-virtual $config{OPTIMISATI}";
905 $config{LDLIBS} = "";
906 $config{MAKEPROG} = "/usr/bin/make";
907 $config{MAKEORDER} = "mods ircd";
908 $config{STATICLIBS} = "modules/mods.a";
909 $config{STATIC_LINK} = "yes";
913 if ($config{OSNAME} =~ /SunOS/)
915 # solaris/sunos needs these
916 # socket = bsd sockets api
918 # rt = POSIX realtime extensions
919 # resolv = inet_aton only (why isnt this in nsl?!)
920 $config{LDLIBS} = $config{LDLIBS} . " -lsocket -lnsl -lrt -lresolv";
923 if($config{OSNAME} eq "MINGW32")
925 # All code is position-independent on windows
926 $config{FLAGS} =~ s/-fPIC //;
944 print "Detecting modules ";
945 opendir(DIRHANDLE, "src/modules");
946 foreach $name (sort readdir(DIRHANDLE)) {
947 if ($name =~ /^m_(.+)\.cpp$/)
950 if ($mod !~ /_static$/) {
951 $modlist[$i++] = $mod;
957 print "\nOk, $i modules.\n";
964 my $data = `svn info`;
971 $data =~ /Revision: (\d+)/;
973 if (!defined($rev)) {
980 my($writeheader) = @_;
981 # First File.. inspircd_config.h
982 chomp(my $incos = `uname -n -s -r`);
983 chomp(my $version = `sh ./src/version.sh`);
984 chomp(my $revision = getrevision());
985 $version = "$version(r$revision)";
986 chomp(my $revision2 = getrevision());
987 if ($writeheader == 1)
989 print "Writing \033[1;32minspircd_config.h\033[0m\n";
990 open(FILEHANDLE, ">include/inspircd_config.h");
991 my $NL = $config{NICK_LENGT}+1;
992 my $CL = $config{CHAN_LENGT}+1;
993 print FILEHANDLE <<EOF;
994 /* Auto generated by configure, do not modify! */
995 #ifndef __CONFIGURATION_AUTO__
996 #define __CONFIGURATION_AUTO__
998 #define CONFIG_FILE "$config{CONFIG_DIR}/inspircd.conf"
999 #define MOD_PATH "$config{MODULE_DIR}"
1000 #define VERSION "$version"
1001 #define REVISION "$revision2"
1002 #define MAXCLIENTS $config{MAX_CLIENT}
1003 #define MAX_DESCRIPTORS $config{MAX_DESCRIPTORS}
1006 #define MAXCHANS $config{MAX_CHANNE}
1007 #define OPERMAXCHANS $config{MAX_OPERCH}
1008 #define MAXMODES $config{MAXI_MODES}
1009 #define IDENTMAX $config{MAX_IDENT}
1010 #define MAXQUIT $config{MAX_QUIT}
1011 #define MAXTOPIC $config{MAX_TOPIC}
1012 #define MAXKICK $config{MAX_KICK}
1013 #define MAXGECOS $config{MAX_GECOS}
1014 #define MAXAWAY $config{MAX_AWAY}
1015 #define OPTIMISATION $config{OPTIMITEMP}
1016 #define LIBRARYDIR "$config{LIBRARY_DIR}"
1017 #define SYSTEM "$incos"
1020 if ($config{OSNAME} =~ /SunOS/) {
1021 print FILEHANDLE "#define IS_SOLARIS\n";
1023 if ($config{OSNAME} =~ /CYGWIN/) {
1024 print FILEHANDLE "#define IS_CYGWIN\n";
1025 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
1027 if ($config{OSNAME} eq "MINGW32") {
1028 print FILEHANDLE "#define IS_MINGW\n";
1030 if ($config{OSNAME} eq "CYG-STATIC") {
1031 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
1033 if ($config{HAS_EXECINFO} eq "1") {
1034 print FILEHANDLE "#define HAS_EXECINFO\n";
1036 if ($config{STATIC_LINK} eq "yes") {
1037 print FILEHANDLE "#define STATIC_LINK\n";
1039 if ($config{GCCVER} >= 3) {
1040 print FILEHANDLE "#define GCC3\n";
1042 if ($config{HAS_STRLCPY} eq "true") {
1043 print FILEHANDLE "#define HAS_STRLCPY\n";
1045 if ($config{HAS_STDINT} eq "true") {
1046 print FILEHANDLE "#define HAS_STDINT\n";
1048 if ($config{THREADED_DNS} =~ /y/i) {
1049 print FILEHANDLE "#define THREADED_DNS\n";
1051 if ($config{IPV6} =~ /y/i) {
1052 print FILEHANDLE "#define IPV6\n";
1054 if ($config{SUPPORT_IP6LINKS} =~ /y/i) {
1055 print FILEHANDLE "#define SUPPORT_IP6LINKS\n";
1058 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1059 print FILEHANDLE "#define USE_KQUEUE\n";
1060 $se = "socketengine_kqueue";
1063 if (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1064 print FILEHANDLE "#define USE_EPOLL\n";
1065 $se = "socketengine_epoll";
1068 # user didn't choose either epoll or select for their OS.
1069 # default them to USE_SELECT (ewwy puke puke)
1071 print FILEHANDLE "#define USE_SELECT\n";
1072 $se = "socketengine_select";
1074 print FILEHANDLE "\n#endif\n";
1080 open(FILEHANDLE, ">include/inspircd_se_config.h");
1081 print FILEHANDLE <<EOF;
1082 /* Auto generated by configure, do not modify or commit to svn! */
1083 #ifndef __CONFIGURATION_SOCKETENGINE__
1084 #define __CONFIGURATION_SOCKETENGINE__
1094 # Create a Modules List..
1096 foreach $i (@modlist)
1098 if ($config{STATIC_LINK} eq "yes") {
1099 $modules .= "m_".$i.".o ";
1102 $modules .= "m_".$i.".so ";
1105 chomp($modules); # Remove Redundant whitespace..
1108 # Write all .in files.
1111 my $exe = "inspircd";
1113 if ($config{OSNAME} =~ /CYGWIN/) {
1114 $exe = "inspircd.exe";
1117 opendir(DIRHANDLE, $this);
1118 if ($config{THREADED_DNS} =~ /y/i) {
1119 $config{LDLIBS} = $config{LDLIBS} . " -pthread";
1121 foreach $name (sort readdir(DIRHANDLE)) {
1122 if ($name =~ /^\.(.+)\.inc$/) {
1124 # All .name.inc files need parsing!
1126 open(FILEHANDLE, ".$file.inc");
1127 while (<FILEHANDLE>) {
1132 $tmp =~ s/\@CC\@/$config{CC}/;
1133 $tmp =~ s/\@MAKEPROG\@/$config{MAKEPROG}/;
1134 $tmp =~ s/\@FLAGS\@/$config{FLAGS}/;
1135 $tmp =~ s/\@LDLIBS\@/$config{LDLIBS}/;
1136 $tmp =~ s/\@BASE_DIR\@/$config{BASE_DIR}/;
1137 $tmp =~ s/\@CONFIG_DIR\@/$config{CONFIG_DIR}/;
1138 $tmp =~ s/\@MODULE_DIR\@/$config{MODULE_DIR}/;
1139 $tmp =~ s/\@BINARY_DIR\@/$config{BINARY_DIR}/;
1140 $tmp =~ s/\@LIBRARY_DIR\@/$config{LIBRARY_DIR}/;
1141 $tmp =~ s/\@MODULES\@/$modules/;
1142 $tmp =~ s/\@EXECUTABLE\@/$exe/;
1143 $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/;
1144 $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/;
1146 print "Writing \033[1;32m$file\033[0m\n";
1147 open(FILEHANDLE, ">$file");
1148 print FILEHANDLE $tmp;
1151 closedir(DIRHANDLE);
1153 # Make inspircd executable!
1154 chmod 0744, 'inspircd';
1156 if ($config{STATIC_LINK} eq "yes") {
1157 print "Writing static-build \033[1;32msrc/Makefile\033[0m\n";
1158 write_static_makefile();
1159 write_static_modules_makefile();
1160 } elsif ($config{OSNAME} =~ /CYGWIN/) {
1161 print "Writing cygwin-build \033[1;32msrc/Makefile\033[0m\n";
1162 write_static_makefile();
1163 write_dynamic_modules_makefile();
1165 print "Writing dynamic-build \033[1;32msrc/Makefile\033[0m\n";
1166 write_dynamic_makefile();
1167 write_dynamic_modules_makefile();
1171 sub getcompilerflags {
1175 if ($_ =~ /^\/\* \$CompileFlags: (.+) \*\/$/) {
1184 sub getlinkerflags {
1188 if ($_ =~ /^\/\* \$LinkerFlags: (.+) \*\/$/) {
1198 print "'\033[1;33m####\033[0m:'\033[1;33m##\033[0m::: \033[1;33m##\033[0m::'\033[1;33m######\033[0m::'\033[1;33m########\033[0m::'\033[1;33m####\033[0m:'\033[1;33m########\033[0m:::'\033[1;33m######\033[0m::'\033[1;33m########\033[0m::\n";
1199 print ". \033[1;33m##\033[0m:: \033[1;33m###\033[0m:: \033[1;33m##\033[0m:'\033[1;33m##\033[0m... \033[1;33m##\033[0m: \033[1;33m##\033[0m.... \033[1;33m##\033[0m:. \033[1;33m##\033[0m:: \033[1;33m##\033[0m.... \033[1;33m##\033[0m:'\033[1;33m##\033[0m... \033[1;33m##\033[0m: \033[1;33m##\033[0m.... \033[1;33m##\033[0m:\n";
1200 print ": \033[1;33m##\033[0m:: \033[1;33m####\033[0m: \033[1;33m##\033[0m: \033[1;33m##\033[0m:::..:: \033[1;33m##\033[0m:::: \033[1;33m##\033[0m:: \033[1;33m##\033[0m:: \033[1;33m##\033[0m:::: \033[1;33m##\033[0m: \033[1;33m##\033[0m:::..:: \033[1;33m##\033[0m:::: \033[1;33m##\033[0m:\n";
1201 print ": \033[1;33m##\033[0m:: \033[1;33m##\033[0m \033[1;33m##\033[0m \033[1;33m##\033[0m:. \033[1;33m######\033[0m:: \033[1;33m########\033[0m::: \033[1;33m##\033[0m:: \033[1;33m########\033[0m:: \033[1;33m##\033[0m::::::: \033[1;33m##\033[0m:::: \033[1;33m##\033[0m:\n";
1202 print ": \033[1;33m##\033[0m:: \033[1;33m##\033[0m. \033[1;33m####\033[0m::..... \033[1;33m##\033[0m: \033[1;33m##\033[0m.....:::: \033[1;33m##\033[0m:: \033[1;33m##\033[0m.. \033[1;33m##\033[0m::: \033[1;33m##\033[0m::::::: \033[1;33m##\033[0m:::: \033[1;33m##\033[0m:\n";
1203 print ": \033[1;33m##\033[0m:: \033[1;33m##\033[0m:. \033[1;33m###\033[0m:'\033[1;33m##\033[0m::: \033[1;33m##\033[0m: \033[1;33m##\033[0m::::::::: \033[1;33m##\033[0m:: \033[1;33m##\033[0m::. \033[1;33m##\033[0m:: \033[1;33m##\033[0m::: \033[1;33m##\033[0m: \033[1;33m##\033[0m:::: \033[1;33m##\033[0m:\n";
1204 print "'\033[1;33m####\033[0m: \033[1;33m##\033[0m::. \033[1;33m##\033[0m:. \033[1;33m######\033[0m:: \033[1;33m##\033[0m::::::::'\033[1;33m####\033[0m: \033[1;33m##\033[0m:::. \033[1;33m##\033[0m:. \033[1;33m######\033[0m:: \033[1;33m########\033[0m::\n";
1205 print "\033[0m\033[0m....::..::::..:::......:::..:::::::::....::..:::::..:::......:::........:::\n\n";
1208 sub resolve_directory {
1210 return File::Spec->rel2abs($_[0]);
1214 my ($flag,$prompt) = @_;
1215 print "$prompt [\033[1;32m$config{$flag}\033[0m] -> ";
1216 chomp($tmp = <STDIN>);
1217 if ($tmp eq "") { $tmp = $config{$flag} }
1219 if (($tmp eq "") || ($tmp =~ /^y/i)) {
1220 $config{$flag} = "y";
1222 $config{$flag} = "n";
1227 sub write_static_modules_makefile {
1228 # Modules Makefile..
1229 print "Writing \033[1;32msrc/modules/Makefile\033[0m\n";
1230 open(FILEHANDLE, ">src/modules/Makefile");
1233 # Module Makefile Header
1235 print FILEHANDLE <<EOF;
1236 # (C) ChatSpike development team
1237 # Makefile by <Craig\@ChatSpike.net>
1238 # Many Thanks to Andrew Church <achurch\@achurch.org>
1239 # for assisting with making this work right.
1241 # Automatically Generated by ./configure to add a modules
1242 # please run ./configure --update
1248 # End Module Makefile Header
1251 # Create a Modules List..
1256 open(MODLIST,">include/modlist.h");
1259 # Include File Header
1261 print MODLIST <<HEADER;
1262 // Generated automatically by configure. DO NOT EDIT!
1264 #ifndef __SYMBOLS__H_CONFIGURED__
1265 #define __SYMBOLS__H_CONFIGURED__
1269 # End Include File Header
1272 # Place Module List into Include
1273 foreach $i (@modlist) {
1274 if ($i !~ /_static$/) {
1275 print MODLIST "extern \"C\" void * $i\_init (void);\n";
1278 print MODLIST "\nstruct {const char *name; initfunc *value; } modsyms[] = {\n";
1283 foreach $i (@modlist)
1285 if ($i !~ /_static$/) {
1286 $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
1287 $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
1290 # Write Entry to the Makefile
1292 print FILEHANDLE <<EOCHEESE;
1293 m_$i.o: .m_$i\_static.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h
1294 \$(CC) -pipe -I../../include \$(FLAGS) $flags -export-dynamic -c .m_$i\_static.cpp
1295 mv .m_$i\_static.o ../m_$i.o
1299 # End Write Entry to the MakeFile
1301 print "Configuring module [\033[1;32mm_$i.so\033[0m] for static linking... ";
1302 open(MODULE,"<src/modules/m_".$i.".cpp") or die("Could not open m_".$i.".cpp");
1303 open(MUNGED,">src/modules/.m_".$i."_static.cpp") or die("Could not create .m_".$i."_static.cpp");
1304 while (chomp($a = <MODULE>)) {
1305 $a =~ s/init_module/$i\_init/g;
1306 print MUNGED "$a\n";
1310 print MODLIST <<EOENT;
1311 {"m_$i.so",\&$i\_init},
1316 print MODLIST "{0}};\n\n#endif\n";
1320 sub write_dynamic_modules_makefile {
1321 # Modules Makefile..
1322 print "Writing \033[1;32msrc/modules/Makefile\033[0m\n";
1323 open(FILEHANDLE, ">src/modules/Makefile");
1326 if ($config{OSNAME} =~ /CYGWIN/) {
1327 $extra = "../inspircd.dll.a";
1331 # Module Makefile Header
1333 print FILEHANDLE <<EOF;
1334 # (C) ChatSpike development team
1335 # Makefile by <Craig\@ChatSpike.net>
1336 # Many Thanks to Andrew Church <achurch\@achurch.org>
1337 # for assisting with making this work right.
1339 # Automatically Generated by ./configure to add a modules
1340 # please run ./configure -update or ./configure -modupdate
1346 # End Module Makefile Header
1349 # Create a Modules List..
1355 foreach $i (@modlist) {
1357 # Write Entry to the MakeFile
1359 $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
1360 $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
1361 print FILEHANDLE <<EOCHEESE;
1362 m_$i.so: m_$i.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h
1363 \$(CC) -pipe -I../../include \$(FLAGS) $cmflags -export-dynamic -c m_$i.cpp
1364 \$(CC) \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o $extra
1367 $crud = $crud . " install -m 0700 m_$i.so \$(MODPATH)\n";
1369 # End Write Entry to the MakeFile
1372 print FILEHANDLE "modinst:\n \@echo \"Installing modules...\"\n" . $crud;
1376 sub write_static_makefile {
1377 open(FH,">src/Makefile") or die("Could not write src/Makefile!");
1380 opendir(DIRHANDLE, "src");
1381 foreach $name (sort readdir(DIRHANDLE)) {
1382 if ($name =~ /^cmd_(.+)\.cpp$/) {
1383 $cmdlist[$i++] = $1;
1386 closedir(DIRHANDLE);
1389 foreach my $cmd (@cmdlist) {
1390 $cmdobjs = $cmdobjs . "cmd_$cmd.o ";
1391 $srcobjs = $srcobjs . "cmd_$cmd.cpp ";
1396 # (C) ChatSpike development team
1397 # Makefile by <Craig\@ChatSpike.net>
1398 # Makefile version 2 (statically linked core) by <brain\@inspircd.org>
1401 CC = im a cheezeball
1403 CXXFLAGS = -I../include \${FLAGS}
1404 CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
1405 RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
1409 $se = "socketengine_select";
1410 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1411 $se = "socketengine_kqueue";
1413 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1414 $se = "socketengine_epoll";
1418 # This next section is for cygwin dynamic module builds.
1419 # Basically, what we do, is build the inspircd core as a library
1420 # then the main executable uses that. the library is capable of
1421 # loading / unloading the modules dynamically :)
1422 # Massive thanks to the guys on #cygwin @ irc.freenode.net for helping
1426 if ($config{OSNAME} =~ /CYGWIN/) {
1428 all: timer.o aes.o command_parse.o cull_list.o userprocess.o socketengine.o socket.o hashcomp.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o snomasks.o inspircd.exe
1430 inspircd.exe: inspircd.dll.a
1433 inspircd.dll inspircd.dll.a: inspircd.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o hashcomp.o socket.o socketengine.o userprocess.o cull_list.o command_parse.o aes.o timer.o snomasks.o
1434 \$(CC) -shared -Wl,--out-implib=inspircd.dll.a -o inspircd.dll \$^
1438 all: timer.o aes.o command_parse.o cull_list.o userprocess.o socketengine.o socket.o hashcomp.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o snomasks.o \$(MODULES) inspircd.exe
1440 inspircd.exe: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/base.h
1441 \$(CC) -I../include \$(FLAGS) inspircd.cpp -o inspircd.exe \$(LDLIBS) channels.o mode.o xline.o inspstring.o dns.o base.o inspsocket.o configreader.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o hashcomp.o socket.o socketengine.o userprocess.o cull_list.o command_parse.o aes.o timer.o snomasks.o modes/modeclasses.a \$(MODULES)
1447 cull_list.o: cull_list.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/users.h ../include/channels.h
1448 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1450 snomasks.o: snomasks.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/channels.h
1451 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1453 command_parse.o: command_parse.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1454 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1456 userprocess.o: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1457 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1459 socketengine.o: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1460 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1462 hashcomp.o: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1463 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1465 helperfuncs.o: helperfuncs.cpp ../include/base.h ../include/helperfuncs.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1466 \$(CC) -pipe -I/usr/local/include -L/usr/local/lib -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1468 channels.o: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1469 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1471 mode.o: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h \$(RELCPPFILES) modes/modeclasses.a
1472 \${MAKE} -C "modes" DIRNAME="src/modes" \$(MAKEARGS)
1473 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1475 xline.o: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1476 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1478 inspstring.o: inspstring.cpp ../include/base.h ../include/inspstring.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1479 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1481 dns.o: dns.cpp ../include/base.h ../include/dns.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1482 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1484 base.o: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1485 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1487 configreader.o: configreader.cpp ../include/base.h ../include/configreader.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1488 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1490 commands.o: commands.cpp ../include/base.h ../include/commands.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h $srcobjs
1491 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp $cmdobjs
1493 dynamic.o: dynamic.cpp ../include/base.h ../include/dynamic.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1494 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1496 users.o: users.cpp ../include/base.h ../include/users.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1497 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1499 modules.o: modules.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1500 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1502 wildcard.o: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1503 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1505 socket.o: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1506 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1508 inspsocket.o: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1509 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1511 aes.o: aes.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1512 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c aes.cpp
1514 timer.o: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1515 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1518 foreach my $cmd (@cmdlist) {
1520 cmd_$cmd.o: cmd_$cmd.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/commands/cmd_$cmd.h
1521 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1527 sub write_dynamic_makefile {
1531 opendir(DIRHANDLE, "src");
1532 foreach $name (sort readdir(DIRHANDLE)) {
1533 if ($name =~ /^cmd_(.+)\.cpp$/) {
1534 $cmdlist[$i++] = $1;
1537 closedir(DIRHANDLE);
1541 foreach my $cmd (@cmdlist) {
1542 $cmdobjs = $cmdobjs . "cmd_$cmd.so ";
1543 $srcobjs = $srcobjs . "cmd_$cmd.cpp ";
1546 if (($config{OSNAME} !~ /Linux/i) && ($config{HAS_EXECINFO} eq "1")) {
1547 $extra = "-L/usr/local/lib -lexecinfo";
1552 $se = "socketengine_select";
1553 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1554 $se = "socketengine_kqueue";
1556 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1557 $se = "socketengine_epoll";
1560 open(FH,">src/Makefile") or die("Could not write src/Makefile");
1564 # (C) ChatSpike development team
1565 # Makefile by <Craig\@ChatSpike.net>
1566 # Makefile version 2 (dynamically linked core) by <brain\@inspircd.org>
1569 CC = im a cheezeball
1571 CXXFLAGS = -I../include \${FLAGS}
1572 CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
1573 RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
1575 all: libIRCDtimer.so libIRCDaes.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so $cmdobjs libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so libIRCDsnomasks.so inspircd
1577 inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h libIRCDtimer.so libIRCDaes.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so $cmdobjs libIRCDsnomasks.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so
1578 \$(CC) -I../include $extra -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,$config{LIBRARY_DIR} \$(FLAGS) -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDhash.so libIRCDsocket.so libIRCDsocketengine.so libIRCDuserprocess.so libIRCDcull_list.so libIRCDcommand_parse.so libIRCDaes.so libIRCDtimer.so libIRCDsnomasks.so
1580 libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1581 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1582 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocketengine.so socketengine.o $se.o
1584 libIRCDsnomasks.so: snomasks.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/channels.h
1585 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1586 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsnomasks.so snomasks.o
1588 libIRCDcommand_parse.so: command_parse.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1589 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1590 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommand_parse.so command_parse.o
1592 libIRCDcull_list.so: cull_list.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/users.h ../include/channels.h
1593 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1594 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcull_list.so cull_list.o
1596 libIRCDuserprocess.so: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1597 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1598 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserprocess.so userprocess.o
1600 libIRCDhash.so: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1601 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1602 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhash.so hashcomp.o
1604 libIRCDhelper.so: helperfuncs.cpp ../include/base.h ../include/helperfuncs.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1605 \$(CC) -pipe -I/usr/local/include -L/usr/local/lib -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1606 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhelper.so helperfuncs.o
1608 libIRCDchannels.so: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1609 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1610 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o
1612 libIRCDmode.so: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h \$(RELCPPFILES)
1613 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1614 \${MAKE} -C "modes" DIRNAME="src/modes" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1615 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a
1617 libIRCDxline.so: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1618 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1619 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDxline.so xline.o
1621 libIRCDstring.so: inspstring.cpp ../include/base.h ../include/inspstring.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1622 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1623 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDstring.so inspstring.o
1625 libIRCDasyncdns.so: dns.cpp ../include/base.h ../include/dns.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1626 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1627 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDasyncdns.so dns.o
1629 libIRCDbase.so: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1630 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1631 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDbase.so base.o
1633 libIRCDconfigreader.so: configreader.cpp ../include/base.h ../include/configreader.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1634 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1635 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o
1637 libIRCDcommands.so: commands.cpp ../include/base.h ../include/commands.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1638 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1639 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o
1641 libIRCDdynamic.so: dynamic.cpp ../include/base.h ../include/dynamic.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1642 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1643 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDdynamic.so dynamic.o
1645 libIRCDusers.so: users.cpp ../include/base.h ../include/users.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1646 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1647 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDusers.so users.o
1649 libIRCDmodules.so: modules.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1650 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1651 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmodules.so modules.o
1653 libIRCDwildcard.so: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1654 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1655 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDwildcard.so wildcard.o
1657 libIRCDsocket.so: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1658 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1659 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocket.so socket.o
1661 libIRCDinspsocket.so: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1662 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1663 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDinspsocket.so inspsocket.o
1665 libIRCDaes.so: aes.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1666 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c aes.cpp
1667 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDaes.so aes.o
1669 libIRCDtimer.so: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1670 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1671 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o
1674 foreach my $cmd (@cmdlist) {
1676 cmd_$cmd.so: cmd_$cmd.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/commands/cmd_$cmd.h
1677 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1678 \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o cmd_$cmd.so cmd_$cmd.o