diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 22:07:47 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 22:07:47 +0000 |
commit | 1db092e08ecaf03f1080c8d501ab17082040fec6 (patch) | |
tree | 79796a5603a1a0bc484501577f3a1740ded0c665 | |
parent | c8389f594d2f9d84b9ef89902418893dc153b16b (diff) |
This now works properly with $NoPedantic macro.
Question: where did all the 'unused parameter' warnings vanish to???
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8329 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-x | configure | 32 |
1 files changed, 23 insertions, 9 deletions
@@ -1007,13 +1007,13 @@ sub dir_check { sub getosflags { $config{LDLIBS} = "-lstdc++"; - $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}"; - $config{DEVELOPER} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated -g"; + $config{FLAGS} = "-fPIC -W -pedantic $config{OPTIMISATI}"; + $config{DEVELOPER} = "-fPIC -W -pedantic -g"; $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared"; $config{MAKEPROG} = "make"; if ($config{OSNAME} =~ /darwin/i) { - $config{FLAGS} = "-DDARWIN -frtti -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}"; + $config{FLAGS} = "-DDARWIN -frtti -fPIC -W -pedantic $config{OPTIMISATI}"; $SHARED = "-bundle -twolevel_namespace -undefined dynamic_lookup"; $config{LDLIBS} = "-ldl -lstdc++"; } @@ -1034,7 +1034,7 @@ sub getosflags { if ($config{OSNAME} =~ /Linux/i) { $config{LDLIBS} = "-ldl -lstdc++"; - $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}"; + $config{FLAGS} = "-fPIC -W -pedantic $config{OPTIMISATI}"; $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS}); $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS}); $config{MAKEPROG} = "make"; @@ -1289,13 +1289,13 @@ EOF if ($config{OSNAME} =~ /darwin/) { print FILEHANDLE <<EOCHEESE; -PICLDFLAGS = -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle +PICLDFLAGS = -twolevel_namespace -undefined dynamic_lookup -bundle EOCHEESE } else { print FILEHANDLE <<EOCHEESE; -PICLDFLAGS = -fPIC -DPIC -shared \$(FLAGS) +PICLDFLAGS = -fPIC -DPIC -shared EOCHEESE } @@ -1320,10 +1320,24 @@ EOCHEESE #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n"; - print FILEHANDLE <<EOCHEESE; + + $nicerflags = $config{FLAGS}; + $nicerflags =~ s/-pedantic//g; + + if (nopedantic("src/modules/m_".$i.".cpp")) + { + 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 + \$(CC) -pipe -I../../include $nicerflags $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 \$(CC) -pipe -I../../include \$(FLAGS) $cmflags \$(PICLDFLAGS) $liflags -export-dynamic -o m_$i.so m_$i.cpp -EOCHEESE +"; + } $crud = $crud . " install -m \$(INSTMODE) m_$i.so \$(MODPATH)\n"; ### # End Write Entry to the MakeFile @@ -1432,7 +1446,7 @@ sub write_dynamic_makefile if ($name =~ /^cmd_(.+)\.cpp$/) { $cmdlist[$i++] = $1; - $install_list = $install_list . " -install -m \$(INSTMODE) src/commands/cmd_" . $name . ".so \$(LIBPATH)\n"; + $install_list = $install_list . " -install -m \$(INSTMODE) src/commands/cmd_" . $1 . ".so \$(LIBPATH)\n"; } } closedir(DIRHANDLE); |