]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - configure
Remove unused /usr/local/lib from helperfuncs.cpp include dirs etc, its not been...
[user/henk/code/inspircd.git] / configure
index 643ad3bda56152e3cf60fff664be2f821d74439f..dc6e655ef8c94fa95bc366d8c3ef225525f41acd 100755 (executable)
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
 
 # InspIRCd Configuration Script
 #
-# Copyright 2003 The ChatSpike Development Team
+# Copyright 2002-2006 The ChatSpike Development Team
 # <brain@chatspike.net>
 # <Craig@chatspike.net>
 #
 #
 ########################################
 
+
+require 5.6.0;
 use Cwd;
 use Getopt::Long;
 
 GetOptions (
        'enable-gnutls' => \$opt_use_gnutls,
        'enable-openssl' => \$opt_use_openssl,
+       'disable-interactive' => \$opt_nointeractive,
        'with-nick-length=i' => \$opt_nick_length,
        'with-channel-length=i' => \$opt_chan_length,
        'with-max-channels=i' => \$opt_maxchans,
        'with-max-oper-channels=i' => \$opt_opermaxchans,
        'with-max-clients' => \$opt_maxclients,
-       'enable-optimization' => \$opt_optimise,
        'enable-epoll' => \$opt_epoll,
        'enable-kqueue' => \$opt_kqueue,
        'disable-epoll' => \$opt_noepoll,
@@ -44,9 +46,10 @@ GetOptions (
        'module-dir=s' => \$opt_module_dir,
        'binary-dir=s' => \$opt_binary_dir,
        'library-dir=s' => \$opt_library_dir,
+       'disable-debuginfo' => sub { $opt_disable_debug = 1 },
        'help'  => sub { showhelp(); },
-       'modupdate' => sub { update(); },
-       'update' => sub { modupdate(); },
+       'modupdate' => sub { modupdate(); },
+       'update' => sub { update(); },
        'svnupdate' => sub { svnupdate(); },
        'clean' => sub { clean(); },
 );
@@ -58,6 +61,7 @@ my $non_interactive = (
        (defined $opt_module_dir) ||
        (defined $opt_base_dir) ||
        (defined $opt_binary_dir) ||
+       (defined $opt_nointeractive) ||
        (defined $opt_away) ||
        (defined $opt_gecos) ||
        (defined $opt_kick) ||
@@ -76,7 +80,6 @@ my $non_interactive = (
        (defined $opt_opermaxchans) ||
        (defined $opt_chan_length) ||
        (defined $opt_nick_length) ||
-       (defined $opt_optimise) ||
        (defined $opt_use_openssl) ||
        (defined $opt_nokqueue) ||
        (defined $opt_noepoll) ||
@@ -131,13 +134,18 @@ if (defined $opt_use_openssl)
 {
        $config{USE_OPENSSL} = "y";
 }
+
+# no, let's not change these.
 $config{OPTIMITEMP}         = "0";                                             # Default Optimisation Value
-$config{OPTIMISATI}         = "-g";                                            # Optimisation Flag
-if (defined $opt_optimise)
+if (!defined $opt_disable_debug)
 {
-       $config{OPTIMISATI} = "-O" . $opt_optimise;
-       $config{OPTIMITEMP} = $opt_optimise;
+       $config{OPTIMISATI}         = "-g";                                     # Optimisation Flag
 }
+else
+{
+       $config{OPTIMISATI}         = "";                                       # DEBUGGING OFF!
+}
+
 $config{NICK_LENGT}         = "31";                                            # Default Nick Length
 if (defined $opt_nick_length)
 {
@@ -244,7 +252,7 @@ if (defined $opt_away)
 
 $no_svn = 0;
 
-$config{HAS_OPENSSL} =~ /OpenSSL ([-[:digit:].]+)([a-z])? (\w{3}|[0-9]+) (\w{3}|[0-9]+) [0-9]{4}/;
+$config{HAS_OPENSSL} =~ /OpenSSL ([-[:digit:].]+)([a-z])?(\-[a-z][0-9])? (\w{3}|[0-9]+) (\w{3}|[0-9]+) [0-9]{4}/;
 $config{HAS_OPENSSL} = $1;
 
 if ($config{GCCVER} eq "") {
@@ -291,6 +299,9 @@ sub clean
 
 sub update
 {
+       chomp($topdir = getcwd());
+       $this = resolve_directory($topdir);                                             # PWD, Regardless.
+       getmodules();
        # Does the cache file exist?
        if (!getcache()) {
                # No, No it doesn't.. *BASH*
@@ -300,6 +311,12 @@ sub update
                # We've Loaded the cache file and all our variables..
                print "Updating Files..\n";
                getosflags();
+               if ($opt_disable_debug == 1)
+               {
+                       print "Disabling debug information (-g).\n";
+                       $config{OPTIMISATI} = "";
+                       getosflags();
+               }
                $has_epoll = $config{HAS_EPOLL};
                $has_kqueue = $config{HAS_KQUEUE};
                writefiles(1);
@@ -310,6 +327,9 @@ sub update
 
 sub modupdate
 {
+       chomp($topdir = getcwd());
+       $this = resolve_directory($topdir);                                             # PWD, Regardless.
+       getmodules();
         # Does the cache file exist?
         if (!getcache()) {
                 # No, No it doesn't.. *BASH*
@@ -346,11 +366,10 @@ sub svnupdate
 }
 
 print "Running non-interactive configure...\n" unless $interactive;
-
-print "Checking for cache from previous configure...\n";
-getcache();
-print "Checking operating system version...\n";
-getosflags();
+print "Checking for cache from previous configure... ";
+print ((getcache() eq "true") ? "found\n" : "not found\n");
+print "Checking operating system version... ";
+print getosflags() . "\n";
 
 if (defined $opt_maxclients)
 {
@@ -462,26 +481,24 @@ if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPE
 if ($interactive)
 {
        system("clear");
-       # Display Splash Logo..
-       show_splash();
-       chomp($wholeos = `uname -mnr`);
+       chomp($wholeos = `uname -sr`);
 
        my $rev = getrevision();
        # Display Introduction Message..
        print "
-Welcome to the InspIRCd Configuration program!
+Welcome to the \033[1mInspIRCd\033[0m Configuration program! (\033[1minteractive mode\033[0m)
+\033[1mPackage maintainers: Type ./configure --help for non-interactive help\033[0m
 
 *** If you are unsure of any of these values, leave it blank for    ***
 *** standard settings that will work, and your server will run      ***
-*** using them. If you are running this server as part of a         ***
-*** larger network, you must consult with your network admins       ***
-*** for the proper values to use, or server links will be unstable! ***
+*** using them. Please consult your IRC network admin if in doubt.  ***
 
 Press \033[1m<RETURN>\033[0m to accept the default for any option, or enter
 a new value. Please note: You will \033[1mHAVE\033[0m to read the docs
 dir, otherwise you won't have a config file!
 
-Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos), fdmax: $config{MAX_CLIENT_T}
+Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos)
+Maximum file descriptors: \033[1;32m$config{MAX_CLIENT_T}\033[0m
 Your InspIRCd revision ID is \033[1;32mr$rev\033[0m";
        if ($rev eq "r0") {
                print " (Non-SVN build)";
@@ -595,7 +612,7 @@ should NOT be used. You should probably specify a newer compiler.\n\n";
                        $var = $config{MAX_CLIENT};
                }
                if ($var =~ /^\d+$/) {
-                       if (($var > $config{MAX_CLIENT_T}) && ($fd_scan_failed ne true)) {
+                       if (($var > $config{MAX_CLIENT_T}) && ($fd_scan_fail ne "true")) {
                                # Client has entered a larger number than the 'discovered' value
                                # Confirm.
                                print "WARNING: Our scans have indicated that you are attempting
@@ -614,6 +631,7 @@ you wish to do this? It may cause the IRCd to malfunction [y/n]
                }
                # If we get here, we should be good to go.
                $config{MAX_CLIENT} = $var;
+               $config{MAX_DESCRIPTORS} = $var;
                $continue = 1;
                print "\n";
        }
@@ -813,37 +831,6 @@ you wish to do this? It may cause the IRCd to malfunction [y/n]
                        print "You must enter a number in this field. Please try again.\n\n";
                }
        }
-
-       # Code Optimisation
-       print "Enter the Level Of Binary optimisation. This is a number between 0 and 3.
-The InspIRCd Team will NOT support any bug reports above 0. Also note,
-the IRCd behaviour will be different depending on this value. Please
-read the documentation for more information.
-
-The higher the number, the more optimised your binary will be. This
-value will default to 0 if you either don't enter a number, or enter
-a value outside the range.
-
-As always, if you are unsure, just press enter and accept the default.\n\n";
-       print "[\033[1;32m$config{OPTIMITEMP}\033[0m] -> ";
-       chomp($var = <STDIN>);
-       if ($var eq "") {
-               $var = $config{OPTIMITEMP};
-       }
-
-       if ($var eq "1") {
-               $config{OPTIMITEMP} = 1;
-               $config{OPTIMISATI} = "-O";
-       } elsif ($var eq "2") {
-               $config{OPTIMITEMP} = 2;
-               $config{OPTIMISATI} = "-O2";
-       } elsif ($var eq "3") {
-               $config{OPTIMITEMP} = 3;
-               $config{OPTIMISATI} = "-O3";
-       } else {
-               $config{OPTIMITEMP} = 0;
-               $config{OPTIMISATI} = "-g";
-       }
 }
 
 print "\n\033[1;32mPre-build configuration is complete!\033[0m\n\n";
@@ -864,7 +851,8 @@ print "\033[0mMax kick length:\033[1;32m\t\t$config{MAX_KICK}\033[0m\n";
 print "\033[0mMax name length:\033[1;32m\t\t$config{MAX_GECOS}\033[0m\n";
 print "\033[0mMax away length:\033[1;32m\t\t$config{MAX_AWAY}\033[0m\n";
 print "\033[0mGCC Version Found:\033[1;32m\t\t$config{GCCVER}.x\033[0m\n";
-print "\033[0mOptimization Flag:\033[1;32m\t\t$config{OPTIMISATI}\033[0m\n";
+# and not echo it out so we don't get some ricer fuck complaining
+#print "\033[0mOptimization Flag:\033[1;32m\t\t$config{OPTIMISATI}\033[0m\n";
 print "\033[0mCompiler program:\033[1;32m\t\t$config{CC}\033[0m\n";
 print "\033[0mStatic modules:\033[1;32m\t\t\t$config{STATIC_LINK}\033[0m\n";
 print "\033[0mIPv6 Support:\033[1;32m\t\t\t$config{IPV6}\033[0m\n";
@@ -872,6 +860,17 @@ print "\033[0mIPv6 to IPv4 Links:\033[1;32m\t\t$config{SUPPORT_IP6LINKS}\033[0m\
 print "\033[0mGnuTLS Support:\033[1;32m\t\t\t$config{USE_GNUTLS}\033[0m\n";
 print "\033[0mOpenSSL Support:\033[1;32m\t\t$config{USE_OPENSSL}\033[0m\n\n";
 
+if (($config{USE_GNUTLS} eq "y") && ($config{HAS_GNUTLS} ne "y"))
+{
+       print "Sorry, but i couldn't detect gnutls. Make sure gnutls-config is in your path.\n";
+       exit(0);
+}
+if (($config{USE_OPENSSL} eq "y") && ($config{HAS_OPENSSL} ne "y"))
+{
+       print "Sorry, but i couldn't detect openssl. Make sure openssl is in your path.\n";
+       exit(0);
+}
+
 if ($config{USE_GNUTLS} eq "y") {
        $failed = 0;
        open(TMP, "<src/modules/m_ssl_gnutls.cpp") or $failed = 1;
@@ -1072,7 +1071,8 @@ sub dir_check {
 sub getosflags {
        if ($config{OSNAME} =~ /BSD$/) {
                $config{LDLIBS} = "-lstdc++";
-               $config{FLAGS}  = "-fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
+               $config{FLAGS}  = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
+               $config{FLAGS}  .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
                $config{MAKEPROG} = "gmake";
                if ($config{OSNAME} eq "OpenBSD") {
                        chomp($foo = `eg++ -dumpversion | cut -c 1`);
@@ -1083,24 +1083,30 @@ sub getosflags {
                                $config{CC} = "eg++";
                                chomp($config{GCCVER}       = `eg++ -dumpversion | cut -c 1`); # we must redo these if we change the compiler path
                        }
+                       return "OpenBSD";
                }
+               return $config{OSNAME};
        } else {
                $config{LDLIBS} = "-ldl -lstdc++";
-               $config{FLAGS}  = "-fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
+               $config{FLAGS}  = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
+               $config{FLAGS}  .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
                $config{MAKEPROG} = "make";
                if ($config{OSNAME} =~ /CYGWIN/) {
-                       $config{FLAGS}  = "-Wall -Woverloaded-virtual $config{OPTIMISATI}";
+                       $config{FLAGS}  = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
                        $config{LDLIBS} = "";
                        $config{MAKEPROG} = "/usr/bin/make";
                        $config{MAKEORDER} = "ircd mods";
+                       return "Cygwin";
                } elsif ($config{OSNAME} eq "CYG-STATIC") {
-                       $config{FLAGS} = "-Wall -Woverloaded-virtual $config{OPTIMISATI}";
+                       $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
                        $config{LDLIBS} = "";
                        $config{MAKEPROG} = "/usr/bin/make";
                        $config{MAKEORDER} = "mods ircd";
                        $config{STATICLIBS} = "modules/mods.a";
                        $config{STATIC_LINK} = "yes";
+                       return "Cygwin-Static";
                }
+               return "Linux";
        }
        
        if ($config{OSNAME} =~ /SunOS/)
@@ -1111,12 +1117,14 @@ sub getosflags {
                # rt = POSIX realtime extensions
                # resolv = inet_aton only (why isnt this in nsl?!)
                $config{LDLIBS} = $config{LDLIBS} . " -lsocket -lnsl -lrt -lresolv";
+               return "Solaris";
        }
        
        if($config{OSNAME} eq "MINGW32")
        {
                # All code is position-independent on windows
                $config{FLAGS} =~ s/-fPIC //;
+               return "MinGW";
        }
 }
 
@@ -1379,15 +1387,17 @@ sub getlinkerflags {
        return undef;
 }
 
-sub show_splash {
-  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";
-  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";
-  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";
-  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";
-  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";
-  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";
-  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";
-  print "\033[0m\033[0m....::..::::..:::......:::..:::::::::....::..:::::..:::......:::........:::\n\n";
+sub getdependencies {
+       my ($file) = @_;
+       open(FLAGS, $file);
+       while (<FLAGS>) {
+               if ($_ =~ /^\/\* \$ModDep: (.+) \*\/$/) {
+                       close(FLAGS);
+                       return $1;
+               }
+       }
+       close(FLAGS);
+       return undef;
 }
 
 sub resolve_directory {
@@ -1470,12 +1480,13 @@ HEADER
                if ($i !~ /_static$/) {
                        $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
                        $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
+                       $deps = getdependencies("src/modules/m_".$i.".cpp");
 
                        ###
                        # Write Entry to the Makefile
                        ###
                        print FILEHANDLE <<EOCHEESE;
-m_$i.o: .m_$i\_static.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h
+m_$i.o: .m_$i\_static.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h $deps
        \$(CC) -pipe -I../../include \$(FLAGS) $flags -export-dynamic -c .m_$i\_static.cpp
        mv .m_$i\_static.o ../m_$i.o
 
@@ -1543,10 +1554,11 @@ EOF
        ###
        $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
        $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
+       $deps = getdependencies("src/modules/m_".$i.".cpp");
        print FILEHANDLE <<EOCHEESE;
-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
+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
        \$(CC) -pipe -I../../include \$(FLAGS) $cmflags -export-dynamic -c m_$i.cpp
-       \$(CC) \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o $extra
+       \$(CC) -pipe \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o $extra
 
 EOCHEESE
        $crud = $crud . "       install -m 0700 m_$i.so \$(MODPATH)\n";
@@ -1647,8 +1659,8 @@ socketengine.o: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h
 hashcomp.o: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
 
-helperfuncs.o: helperfuncs.cpp ../include/base.h ../include/helperfuncs.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-       \$(CC) -pipe -I/usr/local/include -L/usr/local/lib -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
+helperfuncs.o: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+       \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
 
 channels.o: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
@@ -1672,7 +1684,7 @@ base.o: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_conf
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
 
-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
+commands.o: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h $srcobjs
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp $cmdobjs
 
 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
@@ -1754,107 +1766,107 @@ RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//
 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
 
 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
-       \$(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
+       \$(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 libIRCDaes.so libIRCDtimer.so libIRCDsnomasks.so
 
 libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocketengine.so socketengine.o $se.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocketengine.so socketengine.o $se.o
 
 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
-        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
-         \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsnomasks.so snomasks.o
+       \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsnomasks.so snomasks.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommand_parse.so command_parse.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommand_parse.so command_parse.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcull_list.so cull_list.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcull_list.so cull_list.o
 
 libIRCDuserprocess.so: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserprocess.so userprocess.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserprocess.so userprocess.o
 
 libIRCDhash.so: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhash.so hashcomp.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhash.so hashcomp.o
 
-libIRCDhelper.so: helperfuncs.cpp ../include/base.h ../include/helperfuncs.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
-       \$(CC) -pipe -I/usr/local/include -L/usr/local/lib -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhelper.so helperfuncs.o
+libIRCDhelper.so: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
+       \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhelper.so helperfuncs.o
 
 libIRCDchannels.so: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o
 
 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)
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
        \${MAKE} -C "modes" DIRNAME="src/modes" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDxline.so xline.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDxline.so xline.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDstring.so inspstring.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDstring.so inspstring.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDasyncdns.so dns.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDasyncdns.so dns.o
 
 libIRCDbase.so: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDbase.so base.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDbase.so base.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o
 
-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
+libIRCDcommands.so: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDdynamic.so dynamic.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDdynamic.so dynamic.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDusers.so users.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDusers.so users.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmodules.so modules.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmodules.so modules.o
 
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDwildcard.so wildcard.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDwildcard.so wildcard.o
 
 libIRCDsocket.so: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocket.so socket.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocket.so socket.o
 
 libIRCDinspsocket.so: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDinspsocket.so inspsocket.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDinspsocket.so inspsocket.o
 
 libIRCDaes.so: aes.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c aes.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDaes.so aes.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDaes.so aes.o
 
 libIRCDtimer.so: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o
 
 EOM
        foreach my $cmd (@cmdlist) {
                print FH <<ITEM;
 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
        \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
-       \$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o cmd_$cmd.so cmd_$cmd.o
+       \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o cmd_$cmd.so cmd_$cmd.o
 
 ITEM
        }
@@ -1863,7 +1875,13 @@ ITEM
 
 sub showhelp
 {
+       chomp($PWD = `pwd`);
        print "Usage: configure [options]
+
+*** NOTE: NON-INTERACTIVE CONFIGURE IS *NOT* SUPPORTED BY THE ***
+*** INSPIRCD DEVELOPMENT TEAM. DO NOT ASK FOR HELP REGARDING  ***
+***     NON-INTERACTIVE CONFIGURE ON THE FORUMS OR ON IRC!    ***
+
 Options: [defaults in brackets after descriptions]
 
 When no options are specified, interactive
@@ -1875,16 +1893,17 @@ is started, and any omitted values are defaulted.
 Arguments with a single \"-\" symbol, as in
 InspIRCd 1.0.x, are also allowed.
 
-  --update                     Update makefiles
-  --modupdate                  Detect new modules
-  --svnupdate {rebuild}        Update working copy
-                               {and optionally rebuild}
-  --clean                      Remove .config.cache
+  --disable-interactive        Sets no options intself, but
+                               will disable any interactive prompting.
+  --update                     Update makefiles and dependencies
+  --modupdate                  Detect new modules and write makefiles
+  --svnupdate {rebuild}        Update working copy via subversion
+                               {and optionally rebuild it}
+  --clean                      Remove .config.cache file and go interactive
   --enable-gnutls              Enable GnuTLS module [no]
   --enable-openssl             Enable OpenSSL module [no]
   --with-nick-length=[n]       Specify max. nick length [32]
-  --with-channel-length=[n]    Specify max. channel length
-                               [64]
+  --with-channel-length=[n]    Specify max. channel length [64]
   --with-max-channels=[n]      Specify max. number of channels
                                a normal user may join [20]
   --with-max-oper-channels=[n] Specify max. number of channels
@@ -1892,10 +1911,8 @@ InspIRCd 1.0.x, are also allowed.
   --with-max-clients=[n]       Specify maximum number of users
                                which may connect locally
   --enable-optimization=[n]    Optimize using -O[n] gcc flag
-  --enable-epoll               Enable epoll() where supported
-                               [set]
-  --enable-kqueue              Enable kqueue() where supported
-                               [set]
+  --enable-epoll               Enable epoll() where supported [set]
+  --enable-kqueue              Enable kqueue() where supported [set]
   --disable-epoll              Do not enable epoll(), fall back
                                to select() [not set]
   --disable-kqueue             Do not enable kqueue(), fall back
@@ -1903,8 +1920,7 @@ InspIRCd 1.0.x, are also allowed.
   --enable-ipv6                Build ipv6 native InspIRCd [no]
   --enable-remote-ipv6         Build with ipv6 support for remote
                                servers on the network [yes]
-  --disable-remote-ipv6        Do not allow remote ipv6 servers
-                               [not set]
+  --disable-remote-ipv6        Do not allow remote ipv6 servers [not set]
   --with-cc=[filename]         Use an alternative g++ binary to
                                build InspIRCd [g++]
   --with-ident-length=[n]      Specify max length of ident [12]
@@ -1915,13 +1931,19 @@ InspIRCd 1.0.x, are also allowed.
   --with-away-length=[n]       Specify max length of away [150]
   --with-max-modes=[n]         Specify max modes per line which
                                have parameters [20]
-  --prefix=[directory]         Base directory to install into
-                               [current directory]
-  --config-dir=[directory]     Config file directory [prefix/conf]
-  --module-dir=[directory]     Modules directory [prefix/modules]
-  --binary-dir=[directory]     Binaries directory [prefix/bin]
-  --library-dir=[directory]    Library directory [prefix/lib]
-  --help                       Show this help text
+  --prefix=[directory]         Base directory to install into (if defined,
+                               can automatically define config, module, bin
+                              and library dirs as subdirectories of prefix)
+                               [$PWD]
+  --config-dir=[directory]     Config file directory for config and SSL certs
+                               [$PWD/conf]
+  --module-dir=[directory]     Modules directory for loadable modules
+                               [$PWD/modules]
+  --binary-dir=[directory]     Binaries directory for core binary
+                               [$PWD/bin]
+  --library-dir=[directory]    Library directory for core libraries
+                               [$PWD/lib]
+  --help                       Show this help text and exit
 
 ";
        exit(0);