]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - configure
Fix bug #659, #524 and others: Allow operoverride to set +qa. Based on patch by Phoen...
[user/henk/code/inspircd.git] / configure
index 867fc117fcf5d9b26d897074bd98fd11676c1744..8a09f5ec4982ebfe59eedb15ca70bc5dcda913bd 100755 (executable)
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
 ###################################################
 # InspIRCd Configuration Script
 #
-# Copyright 2002-2008 The InspIRCd Development Team
+# Copyright 2002-2009 The InspIRCd Development Team
 #  http://www.inspircd.org/wiki/index.php/Credits
 #
 # Licensed under GPL, please see the COPYING file
@@ -26,7 +26,6 @@ BEGIN {
 };
 
 use File::Copy ();
-
 use Socket;
 use Cwd;
 use Getopt::Long;
@@ -705,7 +704,7 @@ if ($config{OSNAME} =~ /FreeBSD/i)
                {
                        # ICKY ICKY ICK, FREEBSD 4.x! GET AN UPGRADE!
                        $config{CRAQ} = "-L/usr/local/lib -lgnugetopt -DHAVE_DECL_GETOPT=1";
-                       print "yes\n";
+                       print "yes (upgrade ffs, freebsd 4 is *way* out of date)\n";
                }
                else
                {
@@ -888,7 +887,7 @@ should NOT be used. You should probably specify a newer compiler.\n\n";
 
                        if ($config{HAS_OPENSSL} eq "y")
                        {
-                               yesno('USE_OPENSSL', "Would you like to enable SSL with m_openssl?");
+                               yesno('USE_OPENSSL', "Would you like to enable SSL with m_ssl_openssl?");
                                if ($config{USE_OPENSSL} eq "y")
                                {
                                        print "\nUsing OpenSSL SSL module.\nYou will get better performance if you move to GnuTLS in the future.\n";
@@ -1106,7 +1105,7 @@ sub getosflags {
        $config{LDLIBS} = "-pthread -lstdc++";
        $config{FLAGS}  = "-fPIC -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute -Wall $config{OPTIMISATI}";
        $config{DEVELOPER} = "-fPIC -Woverloaded-virtual -Wshadow -Wall -Wformat=2 -Wmissing-format-attribute -g";
-       $SHARED = "-shared";
+       $SHARED = "-shared -export-dynamic";
        $config{MAKEPROG} = "make";
 
        if ($config{OSNAME} =~ /darwin/i) {
@@ -1431,14 +1430,14 @@ EOCHEESE
                {
                        print FILEHANDLE "
 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
-       \@../../make/run-cc.pl \$(CC) -pipe -I../../include \$(NICEFLAGS) $cmflags \$(PICLDFLAGS) $liflags -export-dynamic -o m_$i.so m_$i.cpp
-"
+       \@../../make/run-cc.pl \$(CC) -pipe -I../../include \$(NICEFLAGS) $cmflags \$(PICLDFLAGS) $liflags $SHARED -o m_$i.so m_$i.cpp
+";
                }
                else
                {
                        print FILEHANDLE "
 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
-       \@../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) $cmflags \$(PICLDFLAGS) $liflags -export-dynamic -o m_$i.so m_$i.cpp
+       \@../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) $cmflags \$(PICLDFLAGS) $liflags $SHARED -o m_$i.so m_$i.cpp
 ";
                }
                $install_list = $install_list . "       install -m \$(INSTMODE) src/modules/m_$i.so \$(MODPATH)\n";
@@ -1460,11 +1459,7 @@ m_$i.so: m_$i.cpp ../../include/modules.h ../../include/users.h ../../include/ch
                                read_module_directory("src/modules/$name", $name);
                                print "Composing Makefile rules for directory \e[1;32m$name\e[0m... (\e[1;32m$mfcount files found\e[0m)\n";
                                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 $mobjs\n"; 
-                               if ($config{IS_DARWIN} eq "YES") {
-                                       print FILEHANDLE "      \@../../make/run-cc.pl \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) $mliflags -bundle -o $name.so $mobjs\n"; 
-                               } else {
-                                       print FILEHANDLE "      \@../../make/run-cc.pl \$(CC) -pipe \$(FLAGS) -shared $mliflags -o $name.so $mobjs\n";
-                               }
+                               print FILEHANDLE "      \@../../make/run-cc.pl \$(CC) -pipe \$(FLAGS) $SHARED $mliflags -o $name.so $mobjs\n";
                                print FILEHANDLE "\n$mfrules\n";
                                closedir(MDIRHANDLE);
                                $install_list = $install_list . "       install -m \$(INSTMODE) src/modules/$name.so \$(MODPATH)\n";
@@ -1489,7 +1484,7 @@ sub read_module_directory {
                        my $oname = $fname;
                        $oname =~ s/\.cpp$/.o/g;
                        $mfrules = $mfrules .  "$reldpath/$oname: $reldpath/$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";
-                       $mfrules = $mfrules .  "        \@../../make/run-cc.pl \$(CC) -pipe -I../../include -I. \$(FLAGS) $cmflags -export-dynamic -o $reldpath/$oname -c $reldpath/$fname\n\n";
+                       $mfrules = $mfrules .  "        \@../../make/run-cc.pl \$(CC) -pipe -I../../include -I. \$(FLAGS) $cmflags $SHARED -o $reldpath/$oname -c $reldpath/$fname\n\n";
                        $mobjs = $mobjs . " $reldpath/$oname";
                        $mfcount++;
                }
@@ -1729,12 +1724,12 @@ EOM
 
                if (exists($core_files_list{$cpp}))
                {
-                       # core files are statically linked into the binary and do not require -export-dynamic
+                       # core files are statically linked into the binary and do not require $SHARED shared libs switches
                        $buildstring = $buildstring . " \@../make/run-cc.pl \$(CC) -pipe -I../include \$(FLAGS) -c $rawcpp\n";
                }
                else
                {
-                       $buildstring = $buildstring . " \@../make/run-cc.pl \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c $rawcpp\n";
+                       $buildstring = $buildstring . " \@../make/run-cc.pl \$(CC) -pipe -I../include \$(FLAGS) $SHARED -c $rawcpp\n";
                }
 
                if (exists($extrabuildlines{$cpp}))
@@ -1772,11 +1767,11 @@ all: $cmdobjs
 
 ITEM
 
-       # now print the command file details.
+       # now print the command file detail
        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/inspircd_config.h ../../include/commands/cmd_$cmd.h
-       \@../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) -export-dynamic $SHARED -o cmd_$cmd.so cmd_$cmd.cpp
+       \@../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) $SHARED -o cmd_$cmd.so cmd_$cmd.cpp
 
 ITEM
        }
@@ -1944,3 +1939,4 @@ EXTRA:    for my $extra (@extras) {
                unlink "src/modules/$extra" or print STDERR "Cannot disable \e[32;1m$extra\e[0m : $!\n";
        }
 }
+