2 ###################################################
3 # InspIRCd Configuration Script
5 # Copyright 2002-2007 The InspIRCd Development Team
6 # http://www.inspircd.org/wiki/index.php/Credits
8 # Licensed under GPL, please see the COPYING file
13 ###################################################
20 # Utility functions for our buildsystem
24 use make::opensslcert;
27 'enable-gnutls' => \$opt_use_gnutls,
28 'rebuild' => \$opt_rebuild,
29 'enable-openssl' => \$opt_use_openssl,
30 'disable-interactive' => \$opt_nointeractive,
31 'with-nick-length=i' => \$opt_nick_length,
32 'with-channel-length=i' => \$opt_chan_length,
33 'with-max-clients=i' => \$opt_maxclients,
34 'enable-ports' => \$opt_ports,
35 'enable-epoll' => \$opt_epoll,
36 'enable-kqueue' => \$opt_kqueue,
37 'disable-ports' => \$opt_noports,
38 'disable-epoll' => \$opt_noepoll,
39 'disable-kqueue' => \$opt_nokqueue,
40 'enable-ipv6' => \$opt_ipv6,
41 'enable-remote-ipv6' => \$opt_ipv6links,
42 'disable-remote-ipv6' => \$opt_noipv6links,
43 'with-cc=s' => \$opt_cc,
44 'with-ident-length=i' => \$opt_ident,
45 'with-quit-length=i' => \$opt_quit,
46 'with-topic-length=i' => \$opt_topic,
47 'with-maxbuf=i' => \$opt_maxbuf,
48 'with-kick-length=i' => \$opt_kick,
49 'with-gecos-length=i' => \$opt_gecos,
50 'with-away-length=i' => \$opt_away,
51 'with-max-modes=i' => \$opt_modes,
52 'prefix=s' => \$opt_base_dir,
53 'config-dir=s' => \$opt_config_dir,
54 'module-dir=s' => \$opt_module_dir,
55 'binary-dir=s' => \$opt_binary_dir,
56 'library-dir=s' => \$opt_library_dir,
57 'disable-debuginfo' => sub { $opt_disable_debug = 1 },
58 'help' => sub { showhelp(); },
59 'modupdate' => sub { modupdate(); },
60 'update' => sub { update(); },
61 'svnupdate' => sub { svnupdate(); },
62 'clean' => sub { clean(); },
65 my $non_interactive = (
66 (defined $opt_library_dir) ||
67 (defined $opt_base_dir) ||
68 (defined $opt_config_dir) ||
69 (defined $opt_module_dir) ||
70 (defined $opt_base_dir) ||
71 (defined $opt_binary_dir) ||
72 (defined $opt_nointeractive) ||
73 (defined $opt_away) ||
74 (defined $opt_gecos) ||
75 (defined $opt_kick) ||
76 (defined $opt_maxclients) ||
77 (defined $opt_modes) ||
78 (defined $opt_topic) ||
79 (defined $opt_quit) ||
80 (defined $opt_ident) ||
82 (defined $opt_ipv6) ||
83 (defined $opt_ipv6links) ||
84 (defined $opt_noipv6links) ||
85 (defined $opt_kqueue) ||
86 (defined $opt_epoll) ||
87 (defined $opt_ports) ||
88 (defined $opt_maxchans) ||
89 (defined $opt_opermaxchans) ||
90 (defined $opt_chan_length) ||
91 (defined $opt_nick_length) ||
92 (defined $opt_use_openssl) ||
93 (defined $opt_nokqueue) ||
94 (defined $opt_noepoll) ||
95 (defined $opt_noports) ||
96 (defined $opt_maxbuf) ||
97 (defined $opt_use_gnutls)
99 my $interactive = !$non_interactive;
102 chomp($topdir = getcwd());
103 $this = resolve_directory($topdir); # PWD, Regardless.
104 @modlist = (); # Declare for Module List..
105 %config = (); # Initiate Configuration Hash..
106 $config{ME} = resolve_directory($topdir); # Present Working Directory
108 $config{BASE_DIR} = $config{ME};
110 if (defined $opt_base_dir)
112 $config{BASE_DIR} = $opt_base_dir;
115 $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Directory
116 $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory
117 $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory
118 $config{LIBRARY_DIR} = resolve_directory($config{BASE_DIR}."/lib"); # Library Directory
120 if (defined $opt_config_dir)
122 $config{CONFIG_DIR} = $opt_config_dir;
124 if (defined $opt_module_dir)
126 $config{MODULE_DIR} = $opt_module_dir;
128 if (defined $opt_binary_dir)
130 $config{BINARY_DIR} = $opt_binary_dir;
132 if (defined $opt_library_dir)
134 $config{LIBRARY_DIR} = $opt_library_dir;
136 chomp($config{HAS_GNUTLS} = `libgnutls-config --version 2>/dev/null | cut -c 1,2,3`); # GNUTLS Version.
137 chomp($config{HAS_OPENSSL} = `pkg-config --modversion openssl 2>/dev/null`); # Openssl version
138 chomp($gnutls_ver = $config{HAS_GNUTLS});
139 chomp($openssl_ver = $config{HAS_OPENSSL});
140 $config{USE_GNUTLS} = "n";
141 if (defined $opt_use_gnutls)
143 $config{USE_GNUTLS} = "y"; # Use gnutls.
145 $config{USE_OPENSSL} = "n"; # Use openssl.
146 if (defined $opt_use_openssl)
148 $config{USE_OPENSSL} = "y";
151 # no, let's not change these.
152 $config{OPTIMITEMP} = "0"; # Default Optimisation Value
153 if (!defined $opt_disable_debug)
155 $config{OPTIMISATI} = "-g1"; # Optimisation Flag
159 $config{OPTIMISATI} = "-O2"; # DEBUGGING OFF!
162 $config{NICK_LENGT} = "31"; # Default Nick Length
163 if (defined $opt_nick_length)
165 $config{NICK_LENGT} = $opt_nick_length;
167 $config{CHAN_LENGT} = "64"; # Default Channel Name Length
168 if (defined $opt_chan_length)
170 $config{CHAN_LENGT} = $opt_chan_length;
172 $config{MAXI_MODES} = "20"; # Default Max. Number of Modes set at once.
173 if (defined $opt_modes)
175 $config{MAXI_MODES} = $opt_modes;
177 $config{HAS_STRLCPY} = "false"; # strlcpy Check.
178 $config{HAS_STDINT} = "false"; # stdint.h check
179 $config{USE_KQUEUE} = "y"; # kqueue enabled
180 if (defined $opt_kqueue)
182 $config{USE_KQUEUE} = "y";
184 if (defined $opt_nokqueue)
186 $config{USE_KQUEUE} = "n";
188 $config{USE_EPOLL} = "y"; # epoll enabled
189 if (defined $opt_epoll)
191 $config{USE_EPOLL} = "y";
193 if (defined $opt_noepoll)
195 $config{USE_EPOLL} = "n";
197 $config{USE_PORTS} = "y"; # epoll enabled
198 if (defined $opt_ports)
200 $config{USE_PORTS} = "y";
202 if (defined $opt_noports)
204 $config{USE_PORTS} = "n";
206 $config{IPV6} = "n"; # IPv6 support (experimental)
207 if (defined $opt_ipv6)
211 $config{SUPPORT_IP6LINKS} = "y"; # IPv4 supporting IPv6 links (experimental)
212 if (defined $opt_ipv6links)
214 $config{SUPPORT_IP6LINKS} = "y";
216 if (defined $opt_noipv6links)
218 $config{SUPPORT_IP6LINKS} = "n";
220 $config{STATIC_LINK} = "no"; # are doing static modules?
221 chomp($config{MAX_CLIENT_T} = `sh -c \"ulimit -n\"`); # FD Limit
222 chomp($config{MAX_DESCRIPTORS} = `sh -c \"ulimit -n\"`); # Hard FD Limit
223 chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Version
224 $config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue
225 $config{OSNAME} = $^O; # Operating System Name
226 $config{IS_DARWIN} = "NO"; # Is OSX?
227 $config{STARTSCRIPT} = "inspircd"; # start script?
228 $config{DESTINATION} = "BASE"; # Is target path.
229 $config{EXTRA_DIR} = ""; # Is empty.
230 if ($config{OSNAME} =~ /darwin/i)
232 $config{IS_DARWIN} = "YES";
233 $config{STARTSCRIPT} = "org.inspircd.plist"; # start script for OSX.
234 $config{DESTINATION} = "LAUNCHDPATH"; # Is OSX target.
235 $config{EXTRA_DIR} = " launchd_dir"; # Is OSX specific path.
237 $config{CC} = "g++"; # C++ compiler
240 $config{CC} = $opt_cc;
242 $exec = $config{CC} . " -dumpversion | cut -c 1";
243 chomp($config{GCCVER} = `$exec`); # Major GCC Version
244 $config{MAKEORDER} = "ircd mods"; # build order
245 $config{STATICLIBS} = ""; # library archive path
246 $config{MAX_IDENT} = "12"; # max ident size
247 $config{MAX_QUIT} = "255"; # max quit message size
248 $config{MAX_TOPIC} = "307"; # max topic size
249 $config{MAX_KICK} = "255"; # max kick message size
250 $config{MAX_GECOS} = "128"; # max GECOS size
251 $config{MAX_AWAY} = "200"; # max AWAY size
252 $config{MAXBUF} = "512"; # Max buffer size
253 if (defined $opt_ident)
255 $config{MAX_IDENT} = $opt_ident;
257 if (defined $opt_quit)
259 $config{MAX_QUIT} = $opt_quit;
261 if (defined $opt_topic)
263 $config{MAX_TOPIC} = $opt_topic;
265 if (defined $opt_kick)
267 $config{MAX_KICK} = $opt_kick;
269 if (defined $opt_gecos)
271 $config{MAX_GECOS} = $opt_gecos;
273 if (defined $opt_away)
275 $config{MAX_AWAY} = $opt_away;
278 $config{HAS_OPENSSL} =~ /^([-[:digit:].]+)([a-z])?(\-[a-z][0-9])?$/;
279 $config{HAS_OPENSSL} = $1;
281 if ($config{GCCVER} eq "") {
282 print $config{CC} . " was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n";
286 # Minihack! Convert Cygwin to 'Cyg-Static' so i can
287 # Keep my dynamic module experiments here for later
290 if ($config{OSNAME} =~ /CYGWIN/i)
292 $config{OSNAME} = "CYG-STATIC";
295 if (!$config{MAX_CLIENT_T}) {
296 $config{MAX_CLIENT_T} = 1024; # Set a reasonable 'Default'
297 $fd_scan_fail = "true"; # Used Later
300 # Get and Set some important vars..
305 system("rm -rf .config.cache");
311 chomp($topdir = getcwd());
312 $this = resolve_directory($topdir); # PWD, Regardless.
314 # Does the cache file exist?
316 # No, No it doesn't.. *BASH*
317 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
320 # We've Loaded the cache file and all our variables..
321 print "Updating Files..\n";
323 if ($opt_disable_debug == 1)
325 print "Disabling debug information (-g).\n";
326 $config{OPTIMISATI} = "";
329 $has_epoll = $config{HAS_EPOLL};
330 $has_ports = $config{HAS_PORTS};
331 $has_kqueue = $config{HAS_KQUEUE};
340 print "Configure update failed: $@\n";
348 chomp($topdir = getcwd());
349 $this = resolve_directory($topdir); # PWD, Regardless.
351 # Does the cache file exist?
353 # No, No it doesn't.. *BASH*
354 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
357 # We've Loaded the cache file and all our variables..
358 print "Updating Files..\n";
360 $has_epoll = $config{HAS_EPOLL};
361 $has_ports = $config{HAS_PORTS};
362 $has_kqueue = $config{HAS_KQUEUE};
371 print "Module update failed: $@\n";
381 open(FH,"<.svn/entries") or $fail = 1;
383 print "This is not an SVN copy of InspIRCd.\n";
390 system("svn update");
391 system("perl configure -update");
392 if (defined $opt_rebuild) {
393 system("make install");
398 print "Running non-interactive configure...\n" unless $interactive;
399 print "Checking for cache from previous configure... ";
400 print ((getcache() eq "true") ? "found\n" : "not found\n");
401 print "Checking operating system version... ";
402 print getosflags() . "\n";
404 if (defined $opt_maxclients)
406 $config{MAX_CLIENT} = $opt_maxclients;
409 if (!$config{MAX_CLIENT}) {
410 # If the cache hasn't set the max clients, copy the variable of MAX_CLIENT_T, this
411 # allows us to keep _T for testing purposes. (ie. "Are you sure you want to go
412 # higher than the found value" :))
413 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
416 printf "Checking if stdint.h exists... ";
417 $config{HAS_STDINT} = "true";
419 open(STDINT, "</usr/include/stdint.h") or $config{HAS_STDINT} = "false";
420 if ($config{HAS_STDINT} eq "true") {
423 print "yes\n" if $config{HAS_STDINT} eq "true";
424 print "no\n" if $config{HAS_STDINT} eq "false";
427 printf "Checking if strlcpy exists... ";
428 # Perform the strlcpy() test..
429 $config{HAS_STRLCPY} = "false";
431 open(STRLCPY, "</usr/include/string.h") or $fail = 1;
433 while (chomp($line = <STRLCPY>)) {
434 # try and find the delcaration of:
435 # size_t strlcpy(...)
436 if ($line =~ /size_t(\0x9|\s)+strlcpy/) {
437 $config{HAS_STRLCPY} = "true";
442 print "yes\n" if $config{HAS_STRLCPY} eq "true";
443 print "no\n" if $config{HAS_STRLCPY} eq "false";
446 printf "Checking if kqueue exists... ";
449 open(KQUEUE, "</usr/include/sys/event.h") or $fail = 1;
451 while (chomp($line = <KQUEUE>)) {
452 # try and find the delcaration of:
454 if ($line =~ /int(\0x9|\s)+kqueue/) {
460 print "yes\n" if $has_kqueue == 1;
461 print "no\n" if $has_kqueue == 0;
463 printf "Checking if epoll exists... ";
466 open(EPOLL, "</usr/include/sys/epoll.h") or $fail = 1;
472 my $kernel = `uname -r`;
474 if (($kernel =~ /^2\.0\./) || ($kernel =~ /^2\.2\./) || ($kernel =~ /^2\.4\./)) {
478 print "yes\n" if $has_epoll == 1;
479 print "no\n" if $has_epoll == 0;
481 printf "Checking if Solaris I/O completion ports are available... ";
483 my $system = `uname -s`;
485 $has_ports = 1 if ($system eq "SunOS");
488 my $kernel = `uname -r`;
490 if (($kernel !~ /^5\.1./)) {
494 print "yes\n" if $has_ports == 1;
495 print "no\n" if $has_ports == 0;
497 if (($config{OSNAME} =~ /CYGWIN/) || ($config{OSNAME} eq "CYG-STATIC")) {
498 $config{HAS_STRLCPY} = "true";
501 $config{HAS_EPOLL} = $has_epoll;
502 $config{HAS_KQUEUE} = $has_kqueue;
504 printf "Checking for libgnutls... ";
505 if (($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS} >= 1.2) || ($config{HAS_GNUTLS} eq "y"))) {
507 $config{HAS_GNUTLS} = "y";
510 $config{HAS_GNUTLS} = "n";
513 printf "Checking for openssl... ";
514 if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPENSSL} eq "y"))) {
516 $config{HAS_OPENSSL} = "y";
519 $config{HAS_OPENSSL} = "n";
522 ################################################################################
523 # BEGIN INTERACTIVE PART #
524 ################################################################################
532 my $rev = getrevision();
533 # Display Introduction Message..
535 Welcome to the \033[1mInspIRCd\033[0m Configuration program! (\033[1minteractive mode\033[0m)
536 \033[1mPackage maintainers: Type ./configure --help for non-interactive help\033[0m
538 *** If you are unsure of any of these values, leave it blank for ***
539 *** standard settings that will work, and your server will run ***
540 *** using them. Please consult your IRC network admin if in doubt. ***
542 Press \033[1m<RETURN>\033[0m to accept the default for any option, or enter
543 a new value. Please note: You will \033[1mHAVE\033[0m to read the docs
544 dir, otherwise you won't have a config file!
546 Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos)
547 Maximum file descriptors: \033[1;32m$config{MAX_CLIENT_T}\033[0m
548 Your InspIRCd revision ID is \033[1;32mr$rev\033[0m";
550 print " (Non-SVN build)";
554 $config{CHANGE_COMPILER} = "n";
555 print "I have detected the following compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
557 while (($config{GCCVER} < 3) || ($config{GCCVER} eq "")) {
558 print "\033[1;32mIMPORTANT!\033[0m A GCC 2.x compiler has been detected, and
559 should NOT be used. You should probably specify a newer compiler.\n\n";
560 yesno(CHANGE_COMPILER,"Do you want to change the compiler?");
561 if ($config{CHANGE_COMPILER} =~ /y/i) {
562 print "What command do you want to use to invoke your compiler?\n";
563 print "[\033[1;32m$config{CC}\033[0m] -> ";
564 chomp($config{CC} = <STDIN>);
565 if ($config{CC} eq "") {
568 chomp($foo = `$config{CC} -dumpversion | cut -c 1`);
570 chomp($config{GCCVER} = `$config{CC} -dumpversion | cut -c 1`); # we must redo these if we change compilers
571 print "Queried compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
572 if ($config{GCCVER} < 3) {
573 print "\033[1;32mGCC 2.x WILL NOT WORK!\033[0m. Let's try that again, shall we?\n";
577 print "\033[1;32mWARNING!\033[0m Could not execute the compiler you specified. You may want to try again.\n";
584 # Directory Settings..
585 my $tmpbase = $config{BASE_DIR};
586 dir_check("do you wish to install the InspIRCd base", "BASE_DIR");
587 if ($tmpbase ne $config{BASE_DIR}) {
588 $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Dir
589 $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory
590 $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory
591 $config{LIBRARY_DIR} = resolve_directory($config{BASE_DIR}."/lib"); # Library Directory
594 dir_check("are the configuration files", "CONFIG_DIR");
595 dir_check("are the modules to be compiled to", "MODULE_DIR");
596 dir_check("is the IRCd binary to be placed", "BINARY_DIR");
597 dir_check("are the IRCd libraries to be placed", "LIBRARY_DIR");
600 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?");
604 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?");
608 yesno(USE_PORTS,"You are running Solaris 10.\nWould you like to enable I/O completion ports support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable support for I/O completion ports?");
611 $chose_hiperf = (($config{USE_EPOLL} eq "y") || ($config{USE_KQUEUE} eq "y") || ($config{USE_PORTS} eq "y"));
612 if (!$chose_hiperf) {
613 print "No high-performance socket engines are available, or you chose\n";
614 print "not to enable one. Defaulting to select() engine.\n\n";
617 yesno(IPV6,"Would you like to build InspIRCd with IPv6 support?");
620 if ($config{IPV6} eq "y") {
621 print "You have chosen to build an \033[1;32mIPV6-enabled\033[0m server.\nTo accept IPV4 users, you can still use IPV4 addresses\nin your port bindings..\n\n";
622 $config{SUPPORT_IP6LINKS} = "y";
624 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?\nIf you are using a recent operating\nsystem and are unsure, answer yes.\nIf you answer 'no' here, your InspIRCd server will be unable\nto parse IPV6 addresses (e.g. for CIDR bans)");
628 if (($config{HAS_GNUTLS} eq "y") && ($config{HAS_OPENSSL} eq "y")) {
629 print "I have detected both \033[1;32mGnuTLS\033[0m and \033[1;32mOpenSSL\033[0m on your system.\n";
630 print "I will default to GnuTLS. If you wish to use OpenSSL\n";
631 print "instead, you should enable the OpenSSL module yourself\n";
632 print "by copying it from src/modules/extra to src/modules.\n\n";
633 print "Detected GnuTLS version: \033[1;32m" . $gnutls_ver . "\033[0m\n";
634 print "Detected OpenSSL version: \033[1;32m" . $openssl_ver . "\033[0m\n\n";
637 if ($config{HAS_GNUTLS} eq "y") {
638 yesno(USE_GNUTLS, "Would you like to enable SSL Support?");
639 if ($config{USE_GNUTLS} eq "y") {
640 print "\nUsing GnuTLS SSL module.\n";
642 } elsif ($config{HAS_OPENSSL} eq "y") {
643 yesno(USE_OPENSSL, "Would you like to enable SSL Support?");
644 if ($config{USE_OPENSSL} eq "y") {
645 print "\nUsing OpenSSL SSL module.\nYou will get better performance if you move to GnuTLS in the future.\n";
649 print "\nCould not detect OpenSSL or GnuTLS. Make sure pkg-config is installed if\nyou intend to use OpenSSL, or that GnuTLS is in your path if you intend\nto use GnuTLS.\n\n";
652 print "\nThe following questions will ask you for various figures relating\n";
653 print "To your IRCd install. Please note that these should usually be left\n";
654 print "as defaults unless you have a real reason to change them. If they\n";
655 print "changed, then the values must be identical on all servers on your\n";
656 print "network, or malfunctions and/or crashes may occur, with the exception\n";
657 print "of the 'maximum number of clients' setting which may be different on\n";
658 print "different servers on the network.\n\n";
660 # File Descriptor Settings..
661 promptnumeric("number of clients at any one time", "MAX_CLIENT_T");
662 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
663 $config{MAX_DESCRIPTORS} = $config{MAX_CLIENT_T};
665 promptnumeric("length of nicknames", "NICK_LENGT");
666 promptnumeric("length of channel names", "CHAN_LENGT");
667 promptnumeric("number of mode changes in one line", "MAXI_MODES");
668 promptnumeric("length of an ident (username)", "MAX_IDENT");
669 promptnumeric("length of a quit message", "MAX_QUIT");
670 promptnumeric("length of a channel topic", "MAX_TOPIC");
671 promptnumeric("length of a kick message", "MAX_KICK");
672 promptnumeric("length of a GECOS (real name)", "MAX_GECOS");
673 promptnumeric("length of an away message", "MAX_AWAY");
678 if (($config{USE_GNUTLS} eq "y") && ($config{HAS_GNUTLS} ne "y"))
680 print "Sorry, but i couldn't detect gnutls. Make sure gnutls-config is in your path.\n";
683 if (($config{USE_OPENSSL} eq "y") && ($config{HAS_OPENSSL} ne "y"))
685 print "Sorry, but i couldn't detect openssl. Make sure openssl is in your path.\n";
689 if ($config{USE_GNUTLS} eq "y") {
691 open(TMP, "<src/modules/m_ssl_gnutls.cpp") or $failed = 1;
694 print "Symlinking src/modules/m_ssl_gnutls.cpp from extra/\n";
695 chdir("src/modules");
696 system("ln -s extra/m_ssl_gnutls.cpp");
703 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
705 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
708 print "SSL Certificates Not found, Generating.. \n\n
709 *************************************************************
710 * Generating the Private Key may take some time, go grab a *
711 * Coffee. Even better, to generate some more entropy if it *
712 * is taking a while, open another console and type du / a *
713 * few times and get that HD going :) Then answer the *
714 * Questions which follow. If you are unsure, just hit enter *
715 *************************************************************\n\n";
716 make_gnutls_cert() or $failed = 1;
718 print "\nCertificate generation complete, copying to config directory... ";
719 system("mv key.pem $config{CONFIG_DIR}/key.pem");
720 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
723 print "\n\033[1;32mCertificate generation failed!\033[0m\n\n";
727 print "SSL Certificates found, skipping.\n\n";
732 print "Skipping SSL certificate generation\nin non-interactive mode.\n\n";
734 } elsif ($config{USE_OPENSSL} eq "y") {
736 open(TMP, "<src/modules/m_ssl_openssl.cpp") or $failed = 1;
739 print "Symlinking src/modules/m_ssl_openssl.cpp from extra/\n";
740 chdir("src/modules");
741 system("ln -s extra/m_ssl_openssl.cpp");
748 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
750 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
753 print "SSL Certificates Not found, Generating.. \n\n
754 *************************************************************
755 * Generating the certificates may take some time, go grab a *
756 * coffee, or something. *
757 *************************************************************\n\n";
759 print "\nCertificate generation complete, copying to config directory... ";
760 system("mv key.pem $config{CONFIG_DIR}/key.pem");
761 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
762 system("mv dhparams.pem $config{CONFIG_DIR}/dhparams.pem");
765 print "SSL Certificates found, skipping.\n\n"
770 print "Skipping SSL certificate generation\nin non-interactive mode.\n\n";
773 if (($config{USE_GNUTLS} eq "n") && ($config{USE_OPENSSL} eq "n")) {
774 print "Skipping SSL Certificate generation, SSL support is not available.\n\n";
782 print "To build your server with these settings, please type '\033[1;32m$config{MAKEPROG}\033[0m' now.\n";
783 if (($config{USE_GNUTLS} eq "y") || ($config{USE_OPENSSL} eq "y")) {
784 print "Please remember that to enable \033[1;32mSSL support\033[0m you must\n";
785 print "load the required modules in your config. This configure process\n";
786 print "has just prepared these modules to be compiled for you, and has not\n";
787 print "configured them to be compiled into the core of the ircd.\n";
789 print "*** \033[1;32mRemember to edit your configuration files!!!\033[0m ***\n\n\n";
790 if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) {
791 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";
794 if ($config{GCCVER} < "3") {
796 \033[1;32mWARNING!\033[0m You are attempting to compile InspIRCd on GCC 2.x!
797 GCC 2.x series compilers only had partial (read as broken) C++ support, and
798 your compile will most likely fail horribly! If you have any problems, do NOT
799 report them to the bugtracker or forums without first upgrading your compiler
800 to a newer 3.x or 4.x (or whatever is available currently) version.
804 ################################################################################
806 ################################################################################
808 # Retrieves the .config.cache file, and loads values into the main config hash.
809 open(CACHE, ".config.cache") or return undef;
812 # Ignore Blank lines, and comments..
815 my ($key, $value) = split("=", $_, 2);
816 $value =~ /^\"(.*)\"$/;
817 # Do something with data here!
825 # Dump the contents of %config
826 print "Writing \033[1;32mcache file\033[0m for future ./configures ...\n";
827 open(FILEHANDLE, ">.config.cache");
828 foreach $key (keys %config) {
829 print FILEHANDLE "$key=\"$config{$key}\"\n";
835 my ($desc, $hash_key) = @_;
838 print "In what directory $desc?\n";
839 print "[\033[1;32m$config{$hash_key}\033[0m] -> ";
840 chomp($var = <STDIN>);
842 $var = $config{$hash_key};
844 if ($var =~ /^\~\/(.+)$/) {
845 # Convert it to a full path..
846 $var = resolve_directory($ENV{HOME} . "/" . $1);
848 elsif ((($config{OSNAME} =~ /MINGW32/i) and ($var !~ /^[A-Z]{1}:\\.*/)) and (substr($var,0,1) ne "/"))
850 # Assume relative Path was given.. fill in the rest.
851 $var = $this . "/$var";
854 $var = resolve_directory($var);
856 print "$var does not exist. Create it?\n[\033[1;32my\033[0m] ";
857 chomp($tmp = <STDIN>);
858 if (($tmp eq "") || ($tmp =~ /^y/i)) {
859 # Attempt to Create the Dir..
861 system("mkdir -p \"$var\" >> /dev/null 2>&1");
862 $chk = system("mkdir -p \"$var\" >> /dev/null 2>&1") / 256;
864 print "Unable to create directory. ($var)\n\n";
869 # They said they don't want to create, and we can't install there.
875 # Target exists, but is not a directory.
876 print "File $var exists, but is not a directory.\n\n";
880 # Either Dir Exists, or was created fine.
881 $config{$hash_key} = $var;
889 $config{LDLIBS} = "-lstdc++";
890 $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}";
891 $config{DEVELOPER} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated -g";
892 $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared";
893 $config{MAKEPROG} = "make";
895 if ($config{OSNAME} =~ /darwin/i) {
896 $config{FLAGS} = "-DDARWIN -frtti -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}";
897 $SHARED = "-bundle -twolevel_namespace -undefined dynamic_lookup";
898 $config{LDLIBS} = "-ldl -lstdc++";
901 if ($config{OSNAME} =~ /OpenBSD/i) {
902 $config{MAKEPROG} = "gmake";
903 chomp($foo = `eg++ -dumpversion | cut -c 1`);
904 # theyre running the package version of gcc (eg++)... detect it and set up its version numbers.
905 # if theyre not running this, configure lets the build continue but they probably wont manage to
906 # compile as this standard version is 2.95.3!
908 $config{CC} = "eg++";
909 chomp($config{GCCVER} = `eg++ -dumpversion | cut -c 1`); # we must redo these if we change the compiler path
914 if ($config{OSNAME} =~ /Linux/i) {
915 $config{LDLIBS} = "-ldl -lstdc++";
916 $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}";
917 $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
918 $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS});
919 $config{MAKEPROG} = "make";
920 if ($config{OSNAME} =~ /CYGWIN/) {
921 $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}";
922 $config{LDLIBS} = "";
923 $config{MAKEPROG} = "/usr/bin/make";
924 $config{MAKEORDER} = "ircd mods";
926 } elsif ($config{OSNAME} eq "CYG-STATIC") {
927 $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}";
928 $config{LDLIBS} = "";
929 $config{MAKEPROG} = "/usr/bin/make";
930 $config{MAKEORDER} = "mods ircd";
931 $config{STATICLIBS} = "modules/mods.a";
932 $config{STATIC_LINK} = "yes";
933 return "Cygwin-Static";
937 if ($config{OSNAME} =~ /FreeBSD/i) {
938 $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
939 $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS});
942 if ($config{OSNAME} =~ /SunOS/i or $config{OSNAME} =~ /solaris/i)
944 # solaris/sunos needs these
945 # socket = bsd sockets api
947 # rt = POSIX realtime extensions
948 # resolv = inet_aton only (why isnt this in nsl?!)
949 $config{MAKEPROG} = "gmake";
950 $config{LDLIBS} .= " -lsocket -lnsl -lrt -lresolv";
954 if($config{OSNAME} =~ /MINGW32/i)
956 # All code is position-independent on windows
957 $config{FLAGS} =~ s/-fPIC //;
961 return $config{OSNAME};
965 my($writeheader) = @_;
966 # First File.. inspircd_config.h
967 chomp(my $incos = `uname -n -s -r`);
968 chomp($version = `sh src/version.sh`);
969 chomp(my $revision2 = getrevision());
970 if ($writeheader == 1)
972 print "Writing \033[1;32minspircd_config.h\033[0m\n";
973 open(FILEHANDLE, ">include/inspircd_config.h");
974 my $NL = $config{NICK_LENGT}+1;
975 my $CL = $config{CHAN_LENGT}+1;
976 print FILEHANDLE <<EOF;
977 /* Auto generated by configure, do not modify! */
978 #ifndef __CONFIGURATION_AUTO__
979 #define __CONFIGURATION_AUTO__
981 /* this is for windows support. */
982 #define CoreExport /**/
983 #define DllExport /**/
985 #define CONFIG_FILE "$config{CONFIG_DIR}/inspircd.conf"
986 #define MOD_PATH "$config{MODULE_DIR}"
987 #define VERSION "$version"
988 #define REVISION "$revision2"
989 #define MAXCLIENTS $config{MAX_CLIENT}
990 #define MAXCLIENTS_S "$config{MAX_CLIENT}"
991 #define SOMAXCONN_S "$config{_SOMAXCONN}"
992 #define MAX_DESCRIPTORS $config{MAX_DESCRIPTORS}
995 #define MAXMODES $config{MAXI_MODES}
996 #define IDENTMAX $config{MAX_IDENT}
997 #define MAXQUIT $config{MAX_QUIT}
998 #define MAXTOPIC $config{MAX_TOPIC}
999 #define MAXKICK $config{MAX_KICK}
1000 #define MAXGECOS $config{MAX_GECOS}
1001 #define MAXAWAY $config{MAX_AWAY}
1002 #define OPTIMISATION $config{OPTIMITEMP}
1003 #define LIBRARYDIR "$config{LIBRARY_DIR}"
1004 #define SYSTEM "$incos"
1006 print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n";
1008 if ($config{OSNAME} =~ /SunOS/i) {
1009 print FILEHANDLE "#define IS_SOLARIS\n";
1011 if ($config{OSNAME} =~ /CYGWIN/i) {
1012 print FILEHANDLE "#define IS_CYGWIN\n";
1013 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
1015 if ($config{OSNAME} =~ /MINGW32/i) {
1016 print FILEHANDLE "#define IS_MINGW\n";
1018 if ($config{OSNAME} =~ /CYG-STATIC/i) {
1019 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
1021 if ($config{STATIC_LINK} eq "yes") {
1022 print FILEHANDLE "#define STATIC_LINK\n";
1024 if ($config{GCCVER} >= 3) {
1025 print FILEHANDLE "#define GCC3\n";
1027 if ($config{HAS_STRLCPY} eq "true") {
1028 print FILEHANDLE "#define HAS_STRLCPY\n";
1030 if ($config{HAS_STDINT} eq "true") {
1031 print FILEHANDLE "#define HAS_STDINT\n";
1033 if ($config{IPV6} =~ /y/i) {
1034 print FILEHANDLE "#define IPV6\n";
1036 if ($config{SUPPORT_IP6LINKS} =~ /y/i) {
1037 print FILEHANDLE "#define SUPPORT_IP6LINKS\n";
1040 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1041 print FILEHANDLE "#define USE_KQUEUE\n";
1042 $se = "socketengine_kqueue";
1045 if (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1046 print FILEHANDLE "#define USE_EPOLL\n";
1047 $se = "socketengine_epoll";
1050 if (($has_ports) && ($config{USE_PORTS} eq "y")) {
1051 print FILEHANDLE "#define USE_PORTS\n";
1052 $se = "socketengine_ports";
1055 # user didn't choose either epoll or select for their OS.
1056 # default them to USE_SELECT (ewwy puke puke)
1058 print FILEHANDLE "#define USE_SELECT\n";
1059 $se = "socketengine_select";
1061 print FILEHANDLE "\n#endif\n";
1067 open(FILEHANDLE, ">include/inspircd_se_config.h");
1068 print FILEHANDLE <<EOF;
1069 /* Auto generated by configure, do not modify or commit to svn! */
1070 #ifndef __CONFIGURATION_SOCKETENGINE__
1071 #define __CONFIGURATION_SOCKETENGINE__
1081 # Create a Modules List..
1083 foreach $i (@modlist)
1085 if ($config{STATIC_LINK} eq "yes") {
1086 $modules .= "m_".$i.".o ";
1089 $modules .= "m_".$i.".so ";
1092 chomp($modules); # Remove Redundant whitespace..
1094 opendir(DIRHANDLE, "src/modules");
1095 foreach $name (sort readdir(DIRHANDLE)) {
1096 if ($name =~ /^m_(.+?)$/) {
1097 if (opendir(MDIRHANDLE, "src/modules/$name") != 0) {
1098 closedir(MDIRHANDLE);
1099 $modules .= "$name.so ";
1103 closedir(DIRHANDLE);
1106 # Write all .in files.
1109 my $exe = "inspircd";
1111 if ($config{OSNAME} =~ /CYGWIN/i) {
1112 $exe = "inspircd.exe";
1115 opendir(DIRHANDLE, $this);
1117 # Do this once here, and cache it in the .*.inc files,
1118 # rather than attempting to read src/version.sh from
1119 # compiled code -- we might not have the source to hand.
1120 # Fix for bug#177 by Brain.
1122 chomp(my $version = `sh ./src/version.sh`);
1123 chomp(my $revision = getrevision());
1124 $version = "$version(r$revision)";
1127 if ($config{IS_DARWIN} eq "YES")
1131 # We can actually parse any file starting with . and ending with .inc,
1132 # but right now we only parse .inspircd.inc to form './inspircd'
1134 foreach $name (sort readdir(DIRHANDLE)) {
1135 if ($name =~ /^\.(.+)\.inc$/) {
1137 # All .name.inc files need parsing!
1139 open(FILEHANDLE, ".$file.inc");
1140 while (<FILEHANDLE>) {
1145 $tmp =~ s/\@CC\@/$config{CC}/;
1146 $tmp =~ s/\@MAKEPROG\@/$config{MAKEPROG}/;
1147 $tmp =~ s/\@FLAGS\@/$config{FLAGS}/;
1148 $tmp =~ s/\@DEVELOPER\@/$config{DEVELOPER}/;
1149 $tmp =~ s/\@LDLIBS\@/$config{LDLIBS}/;
1150 $tmp =~ s/\@BASE_DIR\@/$config{BASE_DIR}/;
1151 $tmp =~ s/\@CONFIG_DIR\@/$config{CONFIG_DIR}/;
1152 $tmp =~ s/\@MODULE_DIR\@/$config{MODULE_DIR}/;
1153 $tmp =~ s/\@BINARY_DIR\@/$config{BINARY_DIR}/;
1154 $tmp =~ s/\@LIBRARY_DIR\@/$config{LIBRARY_DIR}/;
1155 $tmp =~ s/\@LIBRARY_EXT\@/$LIBEXT/;
1156 $tmp =~ s/\@MODULES\@/$modules/;
1157 $tmp =~ s/\@STARTSCRIPT\@/$config{STARTSCRIPT}/;
1158 $tmp =~ s/\@DESTINATION\@/$config{DESTINATION}/;
1159 $tmp =~ s/\@EXTRA_DIR\@/$config{EXTRA_DIR}/;
1160 $tmp =~ s/\@EXECUTABLE\@/$exe/;
1161 $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/;
1162 $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/;
1163 $tmp =~ s/\@VERSION\@/$version/;
1165 print "Writing \033[1;32m$file\033[0m\n";
1166 open(FILEHANDLE, ">$file");
1167 print FILEHANDLE $tmp;
1170 closedir(DIRHANDLE);
1172 # Make inspircd executable!
1173 chmod 0744, 'inspircd';
1175 if ($config{STATIC_LINK} eq "yes") {
1176 print "Writing static-build \033[1;32msrc/Makefile\033[0m\n";
1177 write_static_makefile();
1178 write_static_modules_makefile();
1179 } elsif ($config{OSNAME} =~ /CYGWIN/i) {
1180 print "Writing cygwin-build \033[1;32msrc/Makefile\033[0m\n";
1181 write_static_makefile();
1182 write_dynamic_modules_makefile();
1184 print "Writing dynamic-build \033[1;32msrc/Makefile\033[0m\n";
1185 write_dynamic_makefile();
1186 write_dynamic_modules_makefile();
1190 sub write_static_modules_makefile {
1191 # Modules Makefile..
1192 print "Writing \033[1;32msrc/modules/Makefile\033[0m\n";
1193 open(FILEHANDLE, ">src/modules/Makefile");
1196 # Module Makefile Header
1198 print FILEHANDLE <<EOF;
1199 ###################################################
1200 # Copyright 2002-2007 The InspIRCd Development Team
1201 # http://www.inspircd.org/wiki/index.php/Credits
1203 # Thanks to Andrew Church <achurch\@achurch.org>
1204 # for assisting with making this work right.
1206 # Automatically Generated by ./configure to add a
1207 # modules please run ./configure --modupdate
1208 ###################################################
1214 # End Module Makefile Header
1217 # Create a Modules List..
1222 open(MODLIST,">include/modlist.h");
1225 # Include File Header
1227 print MODLIST <<HEADER;
1228 // Generated automatically by configure. DO NOT EDIT!
1230 #ifndef __SYMBOLS__H_CONFIGURED__
1231 #define __SYMBOLS__H_CONFIGURED__
1235 # End Include File Header
1238 # Place Module List into Include
1239 foreach $i (@modlist) {
1240 if ($i !~ /_static$/) {
1241 print MODLIST "extern \"C\" void * $i\_init (void);\n";
1244 print MODLIST "\nstruct {const char *name; initfunc *value; } modsyms[] = {\n";
1249 foreach $i (@modlist)
1251 if ($i !~ /_static$/) {
1252 $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
1253 $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
1254 $deps = getdependencies("src/modules/m_".$i.".cpp");
1256 #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n";
1259 # Write Entry to the Makefile
1261 print FILEHANDLE <<EOCHEESE;
1262 m_$i.o: .m_$i\_static.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h $deps
1263 \$(CC) -pipe -I../../include \$(FLAGS) $flags -export-dynamic -c .m_$i\_static.cpp
1264 mv .m_$i\_static.o ../m_$i.o
1268 # End Write Entry to the MakeFile
1270 print "Configuring module [\033[1;32mm_$i.so\033[0m] for static linking... ";
1271 open(MODULE,"<src/modules/m_".$i.".cpp") or die("Could not open m_".$i.".cpp");
1272 open(MUNGED,">src/modules/.m_".$i."_static.cpp") or die("Could not create .m_".$i."_static.cpp");
1273 while (chomp($a = <MODULE>)) {
1274 $a =~ s/init_module/$i\_init/g;
1275 print MUNGED "$a\n";
1279 print MODLIST <<EOENT;
1280 {"m_$i.so",\&$i\_init},
1286 print MODLIST "{0}};\n\n#endif\n";
1290 sub write_dynamic_modules_makefile {
1291 # Modules Makefile..
1292 print "Writing \033[1;32msrc/modules/Makefile\033[0m\n";
1293 open(FILEHANDLE, ">src/modules/Makefile");
1296 if ($config{OSNAME} =~ /CYGWIN/i) {
1297 $extra = "../inspircd.dll.a";
1301 # Module Makefile Header
1303 print FILEHANDLE <<EOF;
1304 ###################################################
1305 # Copyright 2002-2007 The InspIRCd Development Team
1306 # http://www.inspircd.org/wiki/index.php/Credits
1308 # Thanks to Andrew Church <achurch\@achurch.org>
1309 # for assisting with making this work right.
1311 # Automatically Generated by ./configure to add a
1312 # modules please run ./configure -modupdate
1313 ###################################################
1319 # End Module Makefile Header
1322 # Create a Modules List..
1328 foreach $i (@modlist) {
1330 # Write Entry to the MakeFile
1332 $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
1333 $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
1334 $deps = getdependencies("src/modules/m_".$i.".cpp");
1336 #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n";
1338 print FILEHANDLE <<EOCHEESE;
1339 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 $deps
1340 \$(CC) -pipe -I../../include \$(FLAGS) $cmflags -export-dynamic -c m_$i.cpp
1343 if ($config{OSNAME} =~ /darwin/) {
1344 print FILEHANDLE <<EOCHEESE;
1345 \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle $liflags -o m_$i.so m_$i.o $extra
1349 print FILEHANDLE <<EOCHEESE;
1350 \$(CC) -pipe \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o $extra
1354 $crud = $crud . " install -m \$(INSTMODE) m_$i.so \$(MODPATH)\n";
1356 # End Write Entry to the MakeFile
1360 opendir(DIRHANDLE, "src/modules");
1361 foreach $name (sort readdir(DIRHANDLE)) {
1362 if ($name =~ /^m_(.+?)$/) {
1366 # A module made of multiple files, in a dir, e.g. src/modules/m_spanningtree/
1367 if (opendir(MDIRHANDLE, "src/modules/$name") != 0) {
1369 print FILEHANDLE "$name.so: ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h";
1370 foreach $fname (sort readdir(MDIRHANDLE)) {
1371 if ($fname =~ /\.cpp$/) {
1372 $cmflags = getcompilerflags("src/modules/$name/$fname");
1373 $mliflags = $mliflags . " " . getlinkerflags("src/modules/$name/$fname");
1374 $deps = getdependencies("src/modules/$name/$fname");
1376 $oname =~ s/\.cpp$/.o/g;
1377 print FILEHANDLE " $name/$oname";
1378 $crapola = $crapola . "$name/$oname: $name/$fname ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h $deps\n";
1379 $crapola = $crapola . " \$(CC) -pipe -I../../include -I. \$(FLAGS) $cmflags -export-dynamic -o $name/$oname -c $name/$fname\n\n";
1380 $crap3 = $crap3 . " $name/$oname";
1384 print "Composing Makefile rules for directory \033[1;32m$name\033[0m... (\033[1;32m$i files found\033[0m)\n";
1385 if ($config{IS_DARWIN} eq "YES") {
1386 print FILEHANDLE "\n \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle -o $name.so $crap3\n";
1388 print FILEHANDLE "\n \$(CC) -pipe \$(FLAGS) -shared $mliflags -o $name.so $crap3\n";
1390 print FILEHANDLE "\n$crapola\n";
1391 closedir(MDIRHANDLE);
1392 $crud = $crud . " install -m \$(INSTMODE) $name.so \$(MODPATH)\n";
1396 closedir(DIRHANDLE);
1398 print FILEHANDLE "modinst:\n \@echo \"Installing modules...\"\n" . $crud;
1402 sub write_static_makefile {
1403 open(FH,">src/Makefile") or die("Could not write src/Makefile!");
1406 opendir(DIRHANDLE, "src");
1407 foreach $name (sort readdir(DIRHANDLE)) {
1408 if ($name =~ /^cmd_(.+)\.cpp$/) {
1409 $cmdlist[$i++] = $1;
1412 closedir(DIRHANDLE);
1415 foreach my $cmd (@cmdlist) {
1416 $cmdobjs = $cmdobjs . "cmd_$cmd.o ";
1417 $srcobjs = $srcobjs . "cmd_$cmd.cpp ";
1420 ###################################################
1421 # Copyright 2002-2007 The InspIRCd Development Team
1422 # http://www.inspircd.org/wiki/index.php/Credits
1424 # Thanks to Andrew Church <achurch\@achurch.org>
1425 # for assisting with making this work right.
1427 # This file is automagically generated by configure
1428 # Any changes made will be lost on ./configure
1429 ###################################################
1431 CC = im a cheezeball
1433 CXXFLAGS = -I../include \${FLAGS}
1434 CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
1435 RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
1439 $se = "socketengine_select";
1440 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1441 $se = "socketengine_kqueue";
1443 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1444 $se = "socketengine_epoll";
1446 elsif (($has_ports) && ($config{USE_PORTS} eq "y")) {
1447 $se = "socketengine_ports";
1451 # This next section is for cygwin dynamic module builds.
1452 # Basically, what we do, is build the inspircd core as a library
1453 # then the main executable uses that. the library is capable of
1454 # loading / unloading the modules dynamically :)
1455 # Massive thanks to the guys on #cygwin @ irc.freenode.net for helping
1459 if ($config{OSNAME} =~ /CYGWIN/i) {
1461 all: timer.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
1463 inspircd.exe: inspircd.dll.a
1466 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 timer.o snomasks.o
1467 \$(CC) -shared -Wl,--out-implib=inspircd.dll.a -o inspircd.dll \$^
1471 all: timer.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
1473 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
1474 \$(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 timer.o snomasks.o modes/modeclasses.a \$(MODULES)
1480 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
1481 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1483 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
1484 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1486 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
1487 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1489 userprocess.o: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1490 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1492 socketengine.o: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1493 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1495 hashcomp.o: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1496 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1498 helperfuncs.o: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1499 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1501 channels.o: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1502 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1504 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
1505 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS)
1506 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1508 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
1509 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1511 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
1512 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1514 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 ../include/timer.h
1515 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1517 base.o: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1518 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1520 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
1521 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1523 commands.o: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h $srcobjs
1524 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp $cmdobjs
1526 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
1527 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1529 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 ../include/timer.h
1530 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1532 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 ../include/timer.h
1533 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1535 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
1536 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1538 socket.o: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1539 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1541 inspsocket.o: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1542 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1544 timer.o: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1545 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1548 foreach my $cmd (@cmdlist) {
1550 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
1551 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1557 sub write_dynamic_makefile {
1561 opendir(DIRHANDLE, "src");
1562 foreach $name (sort readdir(DIRHANDLE)) {
1563 if ($name =~ /^cmd_(.+)\.cpp$/) {
1564 $cmdlist[$i++] = $1;
1567 closedir(DIRHANDLE);
1571 foreach my $cmd (@cmdlist) {
1572 $cmdobjs = $cmdobjs . "cmd_$cmd.so ";
1573 $srcobjs = $srcobjs . "cmd_$cmd.cpp ";
1576 $se = "socketengine_select";
1577 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1578 $se = "socketengine_kqueue";
1580 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1581 $se = "socketengine_epoll";
1583 elsif (($has_ports) && ($config{USE_PORTS} eq "y")) {
1584 $se = "socketengine_ports";
1587 open(FH,">src/Makefile") or die("Could not write src/Makefile");
1589 ###################################################
1590 # Copyright 2002-2007 The InspIRCd Development Team
1591 # http://www.inspircd.org/wiki/index.php/Credits
1593 # Thanks to Andrew Church <achurch\@achurch.org>
1594 # for assisting with making this work right.
1596 # This file is automagically generated by configure
1597 # Any changes made will be lost on ./configure
1598 ###################################################
1600 CC = im a cheezeball
1602 CXXFLAGS = -I../include \${FLAGS}
1603 CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
1604 RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
1608 if ($config{IS_DARWIN} eq "YES") {
1610 all: libIRCDtimer.dylib libIRCDcull_list.dylib libIRCDuserprocess.dylib libIRCDsocketengine.dylib libIRCDsocket.dylib libIRCDhash.dylib libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDcommand_parse.dylib libIRCDsnomasks.dylib inspircd
1612 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 $cmdobjs libIRCDtimer.dylib libIRCDcull_list.dylib libIRCDuserprocess.dylib libIRCDsocketengine.dylib libIRCDsocket.dylib libIRCDhash.dylib libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDsnomasks.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDcommand_parse.dylib
1613 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp
1614 \$(CC) -pipe -dynamic -bind_at_load -L. -o inspircd \$(LDLIBS) inspircd.o libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDhash.dylib libIRCDsocket.dylib libIRCDsocketengine.dylib libIRCDuserprocess.dylib libIRCDcull_list.dylib libIRCDcommand_parse.dylib libIRCDtimer.dylib libIRCDsnomasks.dylib
1616 libIRCDsocketengine.dylib: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1617 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp
1618 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c $se.cpp
1619 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocketengine.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocketengine.dylib socketengine.o $se.o
1621 libIRCDsnomasks.dylib: snomasks.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/channels.h
1622 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1623 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsnomasks.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsnomasks.dylib snomasks.o
1625 libIRCDcommand_parse.dylib: command_parse.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1626 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1627 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommand_parse.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommand_parse.dylib command_parse.o
1629 libIRCDcull_list.dylib: cull_list.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/users.h ../include/channels.h
1630 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1631 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcull_list.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcull_list.dylib cull_list.o
1633 libIRCDuserprocess.dylib: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1634 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1635 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDuserprocess.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDuserprocess.dylib userprocess.o
1637 libIRCDhash.dylib: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1638 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1639 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhash.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhash.dylib hashcomp.o
1641 libIRCDhelper.dylib: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1642 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1643 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhelper.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhelper.dylib helperfuncs.o
1645 libIRCDchannels.dylib: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1646 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1647 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDchannels.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDchannels.dylib channels.o
1649 libIRCDmode.dylib: 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)
1650 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1651 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1652 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmode.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmode.dylib mode.o modes/modeclasses.a
1654 libIRCDxline.dylib: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1655 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1656 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDxline.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDxline.dylib xline.o
1658 libIRCDstring.dylib: inspstring.cpp ../include/base.h ../include/inspstring.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1659 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1660 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDstring.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDstring.dylib inspstring.o
1662 libIRCDasyncdns.dylib: dns.cpp ../include/base.h ../include/dns.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1663 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1664 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDasyncdns.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDasyncdns.dylib dns.o
1666 libIRCDbase.dylib: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1667 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1668 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDbase.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDbase.dylib base.o
1670 libIRCDconfigreader.dylib: configreader.cpp ../include/base.h ../include/configreader.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1671 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1672 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDconfigreader.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDconfigreader.dylib configreader.o
1674 libIRCDcommands.dylib: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1675 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1676 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommands.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommands.dylib commands.o
1678 libIRCDdynamic.dylib: dynamic.cpp ../include/base.h ../include/dynamic.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1679 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1680 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDdynamic.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDdynamic.dylib dynamic.o
1682 libIRCDusers.dylib: users.cpp ../include/base.h ../include/users.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1683 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1684 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDusers.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDusers.dylib users.o
1686 libIRCDmodules.dylib: modules.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1687 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1688 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmodules.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmodules.dylib modules.o
1690 libIRCDwildcard.dylib: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1691 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1692 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDwildcard.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDwildcard.dylib wildcard.o
1694 libIRCDsocket.dylib: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1695 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1696 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocket.dylib socket.o
1698 libIRCDinspsocket.dylib: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1699 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1700 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDinspsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDinspsocket.dylib inspsocket.o
1702 libIRCDtimer.dylib: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1703 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1704 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDtimer.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDtimer.dylib timer.o
1711 all: libIRCDtimer.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
1713 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 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
1714 \$(CC) -pipe -I../include $extra -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 libIRCDtimer.so libIRCDsnomasks.so
1716 libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1717 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1718 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocketengine.so socketengine.o $se.o
1720 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
1721 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1722 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsnomasks.so snomasks.o
1724 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
1725 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1726 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommand_parse.so command_parse.o
1728 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
1729 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1730 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcull_list.so cull_list.o
1732 libIRCDuserprocess.so: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1733 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1734 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserprocess.so userprocess.o
1736 libIRCDhash.so: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1737 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1738 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhash.so hashcomp.o
1740 libIRCDhelper.so: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1741 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1742 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhelper.so helperfuncs.o
1744 libIRCDchannels.so: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1745 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1746 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o
1748 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)
1749 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1750 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1751 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a
1753 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 ../include/timer.h
1754 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1755 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDxline.so xline.o
1757 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
1758 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1759 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDstring.so inspstring.o
1761 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 ../include/timer.h
1762 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1763 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDasyncdns.so dns.o
1765 libIRCDbase.so: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1766 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1767 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDbase.so base.o
1769 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
1770 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1771 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o
1773 libIRCDcommands.so: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1774 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1775 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o
1777 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
1778 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1779 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDdynamic.so dynamic.o
1781 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 ../include/timer.h
1782 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1783 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDusers.so users.o
1785 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 ../include/timer.h
1786 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1787 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmodules.so modules.o
1789 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
1790 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1791 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDwildcard.so wildcard.o
1793 libIRCDsocket.so: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1794 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1795 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocket.so socket.o
1797 libIRCDinspsocket.so: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1798 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1799 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDinspsocket.so inspsocket.o
1801 libIRCDtimer.so: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1802 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1803 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o
1807 foreach my $cmd (@cmdlist) {
1809 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
1810 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1811 \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o