From cd9b790e48fabd887a9af855dbd85929ebcbbd62 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 23 Oct 2007 21:36:33 +0000 Subject: Add $NoPedantic build macro, for m_mysql because mysql AB dont know how to code :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8325 e03df62e-2008-0410-955e-edbf42e46eb7 --- configure | 30 ++++++++++++++++++++++-------- make/configure.pm | 14 +++++++++++++- src/modules/extra/m_mysql.cpp | 1 + 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 001cf0dde..a13377b62 100755 --- a/configure +++ b/configure @@ -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} = "-W -pedantic -fPIC $config{OPTIMISATI}"; + $config{DEVELOPER} = "-W -pedantic -fPIC -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} = "-W -pedantic -DDARWIN -frtti -fPIC $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} = "-W -pedantic -fPIC $config{OPTIMISATI}"; $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS}); $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS}); $config{MAKEPROG} = "make"; @@ -1286,16 +1286,21 @@ all: \$(MODULES) EOF +$nicerflags = $options{FLAGS}; +$nicerflags =~ s/\-pedantic//g; + if ($config{OSNAME} =~ /darwin/) { print FILEHANDLE <) { + if ($_ =~ /^\/\* \$NoPedantic \*\/$/) { + close(FLAGS); + return 1; + } + } + close(FLAGS); + return 0; +} sub getmodules { diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index c63ebe7e9..1feb3b02b 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -25,6 +25,7 @@ /* $CompileFlags: exec("mysql_config --include") */ /* $LinkerFlags: exec("mysql_config --libs_r") rpath("mysql_config --libs_r") */ /* $ModDep: m_sqlv2.h */ +/* $NoPedantic */ /* THE NONBLOCKING MYSQL API! * -- cgit v1.2.3