]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - configure
Last of the -Wshadow fixes.
[user/henk/code/inspircd.git] / configure
index 72719a4783d2e98321cbd43632c37b9f6b99f084..3470ec24f6c1d9569a28f39c4189ce394d8f5376 100755 (executable)
--- a/configure
+++ b/configure
@@ -1047,16 +1047,16 @@ our $SHARED = "";
 
 sub getosflags {
 
-       $config{LDLIBS} = "-lstdc++";
-       $config{FLAGS}  = "-fPIC -Wall $config{OPTIMISATI}";
-       $config{DEVELOPER} = "-fPIC -Wall -g";
+       $config{LDLIBS} = "-pthread -lstdc++";
+       $config{FLAGS}  = "-fPIC -Wshadow -Wall $config{OPTIMISATI}";
+       $config{DEVELOPER} = "-fPIC -Wshadow -Wall -g";
        $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared" unless defined $opt_disablerpath;
        $config{MAKEPROG} = "make";
 
        if ($config{OSNAME} =~ /darwin/i) {
                $config{FLAGS}  = "-DDARWIN -frtti -fPIC -Wall $config{OPTIMISATI}";
                $SHARED = "-bundle -twolevel_namespace -undefined dynamic_lookup";
-               $config{LDLIBS} = "-ldl -lstdc++";
+               $config{LDLIBS} = "-ldl -pthread -lstdc++";
        }
 
        if ($config{OSNAME} =~ /OpenBSD/i) {
@@ -1074,8 +1074,8 @@ sub getosflags {
        }
 
        if ($config{OSNAME} =~ /Linux/i) {
-               $config{LDLIBS} = "-ldl -lstdc++";
-               $config{FLAGS}  = "-fPIC -Wall $config{OPTIMISATI}";
+               $config{LDLIBS} = "-ldl -lstdc++ -pthread";
+               $config{FLAGS}  = "-fPIC -Wshadow -Wall $config{OPTIMISATI}";
                $config{FLAGS}  .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
                $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS});
                $config{MAKEPROG} = "make";
@@ -1094,7 +1094,7 @@ sub getosflags {
                # rt = POSIX realtime extensions
                # resolv = inet_aton only (why isnt this in nsl?!)
                $config{MAKEPROG} = "gmake";
-               $config{LDLIBS} .= " -lsocket -lnsl -lrt -lresolv";
+               $config{LDLIBS} .= " -lsocket -lnsl -lrt -lresolv -pthread";
                return "Solaris";
        }
        
@@ -1369,14 +1369,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 -export-dynamic -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 -export-dynamic -o m_$i.so m_$i.cpp
 ";
                }
                $install_list = $install_list . "       install -m \$(INSTMODE) src/modules/m_$i.so \$(MODPATH)\n";
@@ -1399,9 +1399,9 @@ m_$i.so: m_$i.cpp ../../include/modules.h ../../include/users.h ../../include/ch
                                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"; 
+                                       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);
@@ -1427,7 +1427,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 -export-dynamic -o $reldpath/$oname -c $reldpath/$fname\n\n";
                        $mobjs = $mobjs . " $reldpath/$oname";
                        $mfcount++;
                }
@@ -1600,13 +1600,13 @@ sub write_dynamic_makefile
        if ($config{IS_DARWIN} eq "YES")
        {
                $libraryext = "dylib";
-               $othercrap = "  ../make/run-cc.pl \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp\n ../make/run-cc.pl \$(CC) -pipe -dynamic -bind_at_load -L. -o inspircd \$(LDLIBS) inspircd.o "
+               $othercrap = "  \@../make/run-cc.pl \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp\n       \@../make/run-cc.pl \$(CC) -pipe -dynamic -bind_at_load -L. -o inspircd \$(LDLIBS) inspircd.o "
        }
        else
        {
                $libraryext = "so";
                $RPATH = "-Wl,--rpath -Wl,$config{LIBRARY_DIR}" unless defined $opt_disablerpath;
-               $othercrap = "  ../make/run-cc.pl \$(CC) -pipe -I../include $RPATH \$(FLAGS) $freebsd4libs -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) ";
+               $othercrap = "  \@../make/run-cc.pl \$(CC) -pipe -I../include $RPATH \$(FLAGS) $freebsd4libs -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) ";
        }
 
        foreach my $cpp (sort keys %filelist)
@@ -1679,15 +1679,15 @@ EOM
                        }
                }
                print FH $thislib . ": $cpp $deps ". (defined($specialdeps{$cpp}) ? $specialdeps{$cpp} : "") . "\n";
-               print FH "      ../make/run-cc.pl \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c $rawcpp\n";
+               print FH "      \@../make/run-cc.pl \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c $rawcpp\n";
                if (exists($extrabuildlines{$cpp}))
                {
                        print FH "      " . $extrabuildlines{$cpp} . "\n";
                }
-               print FH "      ../make/run-cc.pl \$(CC) -pipe $libcrap -o " . $thislib . " " . $objs . "\n\n";
+               print FH "      \@../make/run-cc.pl \$(CC) -pipe $libcrap -o " . $thislib . " " . $objs . "\n\n";
        }
 
-       print FH "moo:\n        \${MAKE} -C \"commands\" DIRNAME=\"src/commands\" CC=\"\$(CC)\" \$(MAKEARGS)\n\n";
+       print FH "moo:\n        \@\${MAKE} -C \"commands\" DIRNAME=\"src/commands\" CC=\"\$(CC)\" \$(MAKEARGS)\n\n";
 
        # close main makefile
        close(FH);
@@ -1713,17 +1713,17 @@ ITEM
        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
-       ../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
-       ../../make/run-cc.pl \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o
+       \@../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
+       \@../../make/run-cc.pl \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o
 
 ITEM
        }
 #try build a .so, no intermediate .o
-#      ../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) -export-dynamic $SHARED -o cmd_$cmd.so
+#      @../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) -export-dynamic $SHARED -o cmd_$cmd.so
 
 #this works for sure
-#      ../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
-#      ../../make/run-cc.pl \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o
+#      @../../make/run-cc.pl \$(CC) -pipe -I../../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
+#      @../../make/run-cc.pl \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o
 }
 
 # Routine to list out the extra/ modules that have been enabled.