From: Peter Johnson Date: Wed, 5 Apr 2006 02:26:19 +0000 (-0000) Subject: Quiet warnings in Pyrex code by adding "-w" if GCC detected. X-Git-Tag: v0.5.0rc2~2^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a79593f923e3267beb0b89dc7cdb77febfe64512;p=yasm Quiet warnings in Pyrex code by adding "-w" if GCC detected. * configure.ac: Pass GCC value to Makefile * Makefile.inc: Pass GCC value to python-setup.txt * setup.py: Check GCC value and append -w if necessary. svn path=/trunk/yasm/; revision=1460 --- diff --git a/configure.ac b/configure.ac index f6011810..387384fd 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,7 @@ fi # Force x86 architecture only for now. ARCH=x86 AC_SUBST([ARCH]) +AC_SUBST([GCC]) # Require things for --enable-maintainer-mode option. if test "$USE_MAINTAINER_MODE" = "yes"; then diff --git a/tools/python-yasm/Makefile.inc b/tools/python-yasm/Makefile.inc index 128a68e0..2d7c877b 100644 --- a/tools/python-yasm/Makefile.inc +++ b/tools/python-yasm/Makefile.inc @@ -24,6 +24,7 @@ python-setup.txt: Makefile echo "includes=${DEFAULT_INCLUDES} ${INCLUDES} ${DEFS}" > python-setup.txt echo "sources=${libyasm_a_SOURCES}" >> python-setup.txt echo "srcdir=${srcdir}" >> python-setup.txt + echo "gcc=${GCC}" >> python-setup.txt CLEANFILES += python-setup.txt diff --git a/tools/python-yasm/setup.py b/tools/python-yasm/setup.py index 9655aa4d..87f7304c 100644 --- a/tools/python-yasm/setup.py +++ b/tools/python-yasm/setup.py @@ -112,5 +112,7 @@ if __name__ == "__main__": incldir, cppflags = ParseCPPFlags(opts["includes"]) sources = ParseSources(opts["sources"], opts["srcdir"]) sources.append('yasm_python.c') + if opts["gcc"] == "yes": + cppflags.append('-w') RunSetup(incldir, cppflags, sources)