Commit graph

26 commits

Author SHA1 Message Date
Dave Yeo
a7b2c28adf On OS/2, WIFSIGNALED and WTERMSIG are prototyped in sys/wait.h
boilerplate/cairo-boilerplate-pdf.c |    4 ++++
 boilerplate/cairo-boilerplate-ps.c  |    4 ++++
 boilerplate/cairo-boilerplate-svg.c |    4 ++++
 build/configure.ac.system           |    2 +-
 4 files changed, 13 insertions(+), 1 deletions(-)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:50:26 +01:00
Andrea Canciani
6d6bfbd641 Introduce the cairo-missing library
The cairo-missing library provides the functions which are needed in
order to correctly compile cairo (or its utilities) and which were not
found during configuration.

Fixes the build on MacOS X Lion, which failed because of collisons
between the cairo internal getline and strndup and those in libc:

cairo-analyse-trace.c:282: error: static declaration of ‘getline’ follows non-static declaration
/usr/include/stdio.h:449: error: previous declaration of ‘getline’ was here
cairo-analyse-trace.c:307: error: static declaration of ‘strndup’ follows non-static declaration
...
2011-09-02 12:27:13 +02:00
Andrea Canciani
0101a54579 time: Add cairo_time_t type
Add the cairo_time_t type (currently based on cairo_uint64_t) and use
it in cairo-observer and in the perf suite.

Fixes the build on MacOS X (for the src/ subdir) and Win32, whch
failed because they don't provide clock_gettime:

cairo-surface-observer.c:629: error: implicit declaration of function 'clock_gettime'
cairo-surface-observer.c:629: warning: nested extern declaration of 'clock_gettime'
cairo-surface-observer.c:629: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
...
2011-09-02 12:27:13 +02:00
Chris Wilson
59fec48cd6 configure: Test for funlockfile
cairo-trace already depended upon HAVE_FUNLOCKFILE for its
thread-safety.

[This is a candidate for 1.10.]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-15 13:22:52 +00:00
Benjamin Otte
e3b2212bc5 build: Fix pthread detection
Incorporate the pthread detection code from the autoconf archive. Should
fix build on obscure archs that pretend to be UNIXy - like Mac OS X
Tiger.

http://www.gnu.org/software/autoconf-archive/
http://www.gnu.org/software/autoconf-archive/ax_pthread.html
2010-05-13 15:17:27 +02:00
Chris Wilson
9b42b6156d build: Add -pthread to real_pthread_CFLAGS 2009-11-02 12:50:45 +00:00
Sebastian Dröge
56c9b2de7a Use __uint128_t and __int128_t if available
GCC uses a peculiar name for a real 128-bit integer on x86-64.

Speedups, xlib on a gm45
========================
poppler        41246.56 -> 35102.82: 1.18x speedup
swfdec-youtube 12623.01 -> 11936.79: 1.06x speedup

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-15 18:19:08 +01:00
M Joonas Pihlaja
b509b548b1 [trace] Check for __builtin_return_address explicitly.
Some other compilers such as clang and icc support the
__builtin_return_address() intrinsic as well, so we don't
need to check for __GNUC__ >= 3 only.
2009-09-02 04:50:21 +01:00
M Joonas Pihlaja
b5cf24a4fb [build] Remove duplicate invocation of AC_CHECK_HEADERS.
The fenv.h stuff was checked twice.
2009-08-31 16:06:31 +03:00
Chris Wilson
920f59a755 [build] Configure switch to disable atomics
Workaround for my arm toolchain which succeeds in linking the configure
program, only to complain when linking a program (such as cairo-perf)
against libcairo.so. Annoying.
2009-08-06 10:16:33 +01:00
Chris Wilson
758a18b354 [test] Timeout support for tests
Enforce that each test must render within 60 seconds or be considered to
have hit an infinite loop and be reported as a CRASH. The timeout value is
adjustable via CAIRO_TEST_TIMEOUT -- a value of 0 will disable.
2009-06-28 21:10:30 +01:00
Chris Wilson
b82e7740c1 [atomic] Silence compiler warnings by defining an intptr_t
Evaulate the integer sizes during configure to find one of the exact same
size as a void* to use in the conversion of the atomic ptr cmpxchg to an
atomic int cmpxchg.
2009-06-21 22:25:08 +01:00
M Joonas Pihlaja
742b1ad4b0 [test] Fix checking of the fenv.h include.
This adds a configure check for fenv.h and makes
invalid-matrix.c check for it with HAVE_FENV_H instead
of HAVE_FEDISABLEEXCEPT -- turns out Solaris doesn't
have fedisableexcept(), but it does have feclearexcept().

The same issue appears on OSX and was fixed in
ab86662ab4. This patch
adds some configure magic.
2009-06-18 16:07:56 +01:00
M Joonas Pihlaja
aafff0b952 [boilerplate] Check for connect() in libsocket.
Solaris requires -lsocket to be able to talk to
the any2ppm daemon over unix domain sockets.
2009-06-18 15:48:59 +01:00
M Joonas Pihlaja
cdd27a8d4c [test] Never use gcc __attribute__ magic for constructors.
The configure test for __attribute__((constructor)) succeeds when
compiling with Sun Studio 12 on OpenSolaris but the attribute
is just ignored and has no actual effect.  This causes the test
suite to not run any tests at all.  With this patch we revert to
always using make-cairo-test-constructors.pl.
2009-06-18 15:39:16 +01:00
Chris Wilson
c092136fe9 [configure] Check for shm_open()
As needed for cairo-test-trace.
2009-06-13 19:07:37 +01:00
Chris Wilson
3aaea453b0 [script] Store fonts inside mmaped files.
As an aide to tiny swapless systems write the rarely used bytes that
define type42 fonts into a deleted file and mmap them back into our
address space.
2009-06-11 22:38:09 +01:00
Chris Wilson
4ccfd474a3 [perf] Switch to using clock_gettime()
Try using clock_gettime() for a high resolution stable time source in
preference to the potentially unstable TSC.
2009-06-06 13:37:00 +01:00
Chris Wilson
477df1f550 [test] Clear expected floating point exceptions
test/invalid-matrix deliberately feeds garbage into the API to test our
error detection. This causes FPE to be raised during the course of the
test - so they are deliberately disable for the duration. However, the
exceptions were not being cleared and so the FPE could be triggered on
the next floating point operation. This was being masked during make check,
by the fact that each test is run in its own forked process and was only
observed when multiple tests were run in foreground mode.
2009-05-15 21:31:03 +01:00
Ginn Chen
e4b1f871e9 [configure] Detect mkdir variant with non-gcc compilers.
It doesn't work for non GCC compiler right now, as "-Werror -Wall" is
an error to non GCC compiler.

I swapped the sequence of build/configure.ac.system and build/
configure.ac.warnings, then WARN_CFLAGS can be used.
2009-03-03 10:27:44 +00:00
Chris Wilson
5e37652362 [skiplist] Check for ffs()
Wine at least does not provide ffs(), so check at configure time and
open-code a replacement.
2008-11-26 17:26:57 +00:00
Chris Wilson
c554f18d78 [util] Add cairo-trace.
This tool can be used to trace all the cairo function calls made by an
applications.  This is useful for either extracting a test case triggering
a bug from an application, or simply to get a general idea of how an
application is using cairo.

After make install, cairo-trace program arguments, will print out all the
cairo calls to the terminal and also capture theme in ./program.$pid.trace

The format of the output is CairoScript, watch this space for more
cairo-script tools!
2008-10-31 15:37:58 +00:00
Chris Wilson
e90073f7dd [test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one
binary from all the sources.

This binary is then given the task of choosing tests to run (based on user
selection and individual test requirement), forking each test into its own
process and accumulating the results.
2008-10-31 12:30:11 +00:00
Behdad Esfahbod
d84752605a Make sure (and check) that all private headers include some cairo header first
The macros CAIRO_BEGIN_DECLS and CAIRO_END_DECLS are declared in two
places: config.h and cairo.h.  On Win32 build there is no config.h.  So,
we can't rely on pulling CAIRO_BEGIN_DECLS from there.  Hence, we now:

  * Not add those declarations to config.h anymore,

  * Test that every cairo private header includes some other cairo
    header before any other includes.

These two are fairly enough to ensure that cairo.h is seen from all
private headers.  There's still the case of headers not including
any header file at all.  I'll fix that later.
2008-09-19 17:19:10 -04:00
Behdad Esfahbod
2b4a26f097 [configure.ac] Add CAIRO_BEGINEND_DECLS 2008-09-11 04:21:29 -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/system.ac (Browse further)