Commit graph

15 commits

Author SHA1 Message Date
Benjamin Otte
d11b39ea27 build: Use $GREP -e instead of plain grep -e
https://bugs.freedesktop.org/show_bug.cgi?id=37388
2011-05-20 20:59:13 +02:00
Chris Wilson
253374d6ad configure: Remove noisy -Wlogical-op
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-10-29 15:00:03 +01:00
M Joonas Pihlaja
47c35e5e86 build: Purge CAIRO_CC_TRY_LINK_FLAG.
Use CAIRO_CC_TRY_FLAG instead in the one place where we used
CAIRO_CC_TRY_LINK_FLAG and make the build system one macro
smaller.
2010-07-11 21:40:26 +03:00
Chris Wilson
0870c6fb5b gcc-4.5 warnings and optimisation flags. 2010-05-12 20:54:49 +01:00
Benjamin Otte
ed4a30b383 build: Add -Wdeclaration-after-statement
... and fix the compile errors from it I get on my build.

It's Cairo style to put declarations before the code, so better warn
about it.
Besides, it eases porting to old compilers like MSVC.
2010-02-10 22:13:33 +01:00
M Joonas Pihlaja
f5df38ca5e [build] Fix typos in prototype warnings.
The -Wstrict-prototypes and -Wmissing-prototypes warnings
weren't actually in use due to typos.
2009-09-02 06:40:35 +03:00
M Joonas Pihlaja
c086b40a93 [build] Hush the Solaris compiler about enum abuse.
Sun Studio 12 doesn't like it when we mix our
enum values and types.  We do that a lot on purpose
so the warnings from compiles were very verbose.
2009-09-02 06:38:15 +03:00
M Joonas Pihlaja
f081a5ff55 [build] Refine the -Wno-attribute test to check our use cases.
We don't actually check that -Wno-attribute does what
we think it does.  On clang it doesn't since it happily
seems to recognize but ignore the attribute.

This patch factors out a silent version of CAIRO_CC_TRY_FLAG
which accepts an optional program argument and actually tests
that the compiler doesn't produce any warning messages.  It
is then used to check that -Wno-attribute doesn't complain
when the __warn_unused_result__ attribute is applied to
void functions or variables.
2009-09-02 06:35:14 +03:00
Chris Wilson
f99e184144 [build] Remove -Wcast-align
Use -Wcast-align simply generates too much noise due to false-positive
reports when casting pixels to uint32_t.
2009-08-29 17:07:35 +01:00
Chris Wilson
eba6b5126a [build] Add options for warning about bad casts
-Wbad-function-cast in particular. Triggers quite a few warnings where we
have explicitly cast to an integer.
2009-08-29 08:08:38 +01:00
Chris Wilson
195fd27cc6 [build] Use AC_LINK_IFELSE for testing linker flags.
Richard Hult reported that -Wl,--allow-shlib-undefined was incorrectly
being identified as supported by gcc under Mac OS/X:

configure:25103: checking whether gcc supports -Wl,--allow-shlib-undefined
configure:25117: gcc -c -Werror -Wl,--allow-shlib-undefined  conftest.c
>&5
i686-apple-darwin9-gcc-4.0.1: --allow-shlib-undefined: linker input file
unused because linking not done

So instead of just checking whether the compiler accepts the flag, check
that we can actually link a dummy file.
2008-10-23 11:16:40 +01:00
Chris Wilson
91b0dc92c8 [build] Add -fno-common.
Generate a warning if two files define a global variable with the same
name, instead of silently merging them to reference the same location.
2008-10-15 23:12:22 +01:00
Behdad Esfahbod
8ae8189327 [configure.ac.warnings] Add -Wp,-D_FORTIFY_SOURCE=2 to warning flags
It enables various checks in glibc and gcc preprocessor.
2008-09-19 18:43:43 -04:00
Chris Wilson
85a4f0dcee Workaround undefined functions required by rsvg & poppler.
If the native windowing system is disable (e.g. --disable-xlib) then the
test suite fails to build since the vector converters typically depend
upon gdk-pixbuf-2.0, which in turn depends upon a native gdk which
requires cairo to be built with support for the native windowing system. A
mess that should be resolved by separating rsvg and poppler into core and
higher-level libraries, but which we can workaround by simply ignoring
errors from undefined functions at link time.
2008-09-17 15:25:18 -04:00
Behdad Esfahbod
4edfdb4b15 Rename build/*.ac to build/configure.ac.*.
Also rename configure.in to configure.ac (finally)

	configure.in		-> configure.ac
	build/analysis.ac	-> build/configure.ac.analysis
	build/enable.ac		-> build/configure.ac.enable
	build/system.ac		-> build/configure.ac.system
	build/tools.ac		-> build/configure.ac.tools
	build/version.ac	-> build/configure.ac.version
	build/warnings.ac	-> build/configure.ac.warnings
2008-09-04 22:33:52 -04:00
Renamed from build/warnings.ac (Browse further)