]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - configure
Fix problem where in certain cases a \0 would be sent out. Thx to network Hak5IRC...
[user/henk/code/inspircd.git] / configure
index 57eeb61ba458c534a9edfe60158b8915bcb859d9..b20e28da2c01fdcadbacbc85f06321d749eb3b22 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,19 +1,16 @@
 #!/usr/bin/perl
-
+###################################################
 # InspIRCd Configuration Script
 #
-# Copyright 2002-2007 The ChatSpike Development Team
-# <brain@chatspike.net>
-# <Craig@chatspike.net>
+# Copyright 2002-2007 The InspIRCd Development Team
+#  http://www.inspircd.org/wiki/index.php/Credits
 #
 # Licensed under GPL, please see the COPYING file
 # for more information
 #
-# [14:21] Brain: <matrix impression> i know perl-fu!
-#
 # $Id$
 #
-########################################
+###################################################
 
 require 5.6.0;
 use Socket;
@@ -907,6 +904,7 @@ sub getosflags {
                $config{LDLIBS} = "-ldl -lstdc++";
                $config{FLAGS}  = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
                $config{FLAGS}  .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
+               $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS});
                $config{MAKEPROG} = "make";
                if ($config{OSNAME} =~ /CYGWIN/) {
                        $config{FLAGS}  = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
@@ -923,9 +921,13 @@ sub getosflags {
                        $config{STATIC_LINK} = "yes";
                        return "Cygwin-Static";
                }
+       }
+
+       if ($config{OSNAME} =~ /FreeBSD/i) {
                $config{FLAGS}  .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
+               $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS});
        }
-       
+
        if ($config{OSNAME} =~ /SunOS/i)
        {
                # solaris/sunos needs these
@@ -934,7 +936,7 @@ sub getosflags {
                # rt = POSIX realtime extensions
                # resolv = inet_aton only (why isnt this in nsl?!)
                $config{MAKEPROG} = "gmake";
-               $config{LDLIBS} = $config{LDLIBS} . " -lsocket -lnsl -lrt -lresolv";
+               $config{LDLIBS} .= " -lsocket -lnsl -lrt -lresolv";
                return "Solaris";
        }
        
@@ -965,6 +967,10 @@ sub writefiles {
 #ifndef __CONFIGURATION_AUTO__
 #define __CONFIGURATION_AUTO__
 
+/* this is for windows support. */
+#define CoreExport /**/
+#define DllExport /**/
+
 #define CONFIG_FILE "$config{CONFIG_DIR}/inspircd.conf"
 #define MOD_PATH "$config{MODULE_DIR}"
 #define VERSION "$version"