Commit graph

113 commits

Author SHA1 Message Date
Behdad Esfahbod
6778a5f67a [.gitignore] Update 2008-12-17 16:20:18 -05:00
Chris Wilson
43edb4dd7b Fix compilation with gcov
We need to add --coverage to LDFLAGS, so create CAIRO_LDFLAGS and use that
to populate AM_LDFLAGS.
2008-12-14 16:44:03 +00:00
Chris Wilson
1c2eba92c1 [RELEASING] Update Makefile for git-1.6
Git moved all the subcommands out of the PATH, so we need to update our
usage.
2008-12-14 16:41:01 +00:00
Behdad Esfahbod
aff32019a7 [Makefile.am] Use top_srcdir instead of srcdir
Doesn't make much difference here, but makes our intention clear.
2008-11-30 23:28:59 -05: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
997fa6a772 [configure] Remove old line for CairoScript testing.
CairoScript testing should now be unconditional so remove the surplus
message.
2008-11-16 17:43:40 +00:00
Chris Wilson
a856371bef Add CairoScript backend.
A new meta-surface backend for serialising drawing operations to a
CairoScript file. The principal use (as currently envisaged) is to provide
a round-trip testing mechanism for CairoScript - i.e. we can generate
script files for every test in the suite and check that we can replay them
with perfect fidelity. (Obviously this does not provide complete coverage
of CairoScript's syntax, but should give reasonable coverage over the
operators.)
2008-11-13 11:36:54 +00:00
Behdad Esfahbod
310026ab42 [aclocal.dolt.m4] Fix build with bash versions <= 3.0 (bug #18363) 2008-11-04 01:51:06 -05: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
b146130841 [Makefile.am.releasing] Symlink /manual and /cairo-manual.tar.gz only for releases
And not for snapshots.  Also symlink /cairo-manual-X.Y.Z.tar.gz for all
versions.
2008-10-30 14:35:51 -04:00
Chris Wilson
cf072c7203 [sdl] Add new backend.
Add a new backend to allow easy interoperability with the Simple
DirectMedia Layer.
2008-10-30 17:04:53 +00:00
Carl Worth
b598dcd1b1 Fix release-publish to also update the current manual.
That is, the vesion that appears as:

	http://cairographics.org/manual
and:
	http://cairographics.org/cairo-manual.tar.gz

It was silly that we previously required a manual step to
upload the documentation (which we regularly forgot to do)
and that it uploaded with a date in the name rather than a
version. So we just drop the old doc-publish Makefile target
now as it's just not useful anymore.
2008-10-30 08:29:51 -07:00
Behdad Esfahbod
1522805f39 [Makefile.am.releasing] Fix typo 2008-10-27 20:57:56 -04:00
Carl Worth
3386794d96 Add creation of a versioned manual to the release-publish target.
This arranges so that a versioned manual will be available of the form:

	http://cairographics.org/manual-X.Y.Z

for all future releases and snapshots. We're going through the process
of manually doing all former releases, such as:

	http://cairographics.org/manual-1.2.0/

which the LSB folks wanted to reference.
2008-10-27 14:09:19 -07: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
Behdad Esfahbod
9d4262ebe0 [build] Use dolt
Dolt is a hack to speed up libtool-based build systems:

	http://dolt.freedesktop.org/

It's completely transparent to the user.  Brings make time
of cairo from 70s down to 20s.  Yay!
2008-10-21 17:45:54 -04:00
Chris Wilson
fd1f3c27e0 [configure] Check for atomic xchg.
Bug 18140 identifies a case where we have an atomic increment, but not an
atomic exchange. We need both to implement atomic reference counting, so
add a second check to detect whether __sync_val_compare_and_swap
generates a non-atomic instruction.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18140.
2008-10-21 09:23:15 +01:00
Chris Wilson
4ba9ccc6ab [configure.ac.analysis] s/safe/_save/
Rename the temporary variable in line with the convention used by the rest
of the build system.
2008-10-20 23:07:38 +01:00
Chris Wilson
bccfdf7d93 [test] Add support for memfault.
Add the core support to cairo-test for running the test-suite under a
malloc fault injector. This commit contains the adjustments to
cairo_test_run() to repeat the test if it detects a failure due to fault
injection and complains if it detects unreported faults or memory leaks.
2008-10-17 22:52:47 +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
5beae8f530 [Makefile.am.releasing] Make 'make snapshot' print a banner when done
Copied from "make distcheck" implementation.  Prints something like:

=============================================================
cairo-1.8.1-20081006-38de89 archives ready for distribution:
cairo-1.8.1-20081006-38de89.tar.gz
=============================================================
2008-10-06 12:46:41 -04:00
Behdad Esfahbod
2fb7753903 [Makefile.am.releasing] Exclude uid/gid from tarball
By setting GNU tar options --owner=0 --group=0
2008-10-06 11:40:34 -04:00
Behdad Esfahbod
e76432f754 [win32] Use -MDd and -LDd instead of -MD and -LD for debug build
As reported by Damian Frank:

"I ran into a hitch with the Makefile.win32 infrastructure.  It uses -MD and
-LD when linking regardless of the config, but it should be using -MDd and
-LDd for the debug config.  I believe both the Makefile.win32.common and
src/Makefile.win32 files include erroneous declarations.  This produces
warnings at link time about a mismatch when linking against properly created
debug libs (for instance, I had a zlib built as "LIB ASM Debug" that linked
properly against the debug runtime).

This problem applies to pixman too; can you pass this along to the
maintainer?"

Would be delighted to if someone commits a fix to pixman reading this
commit message.
2008-10-04 00:35:43 -04:00
Behdad Esfahbod
d5a998387b Add an internal font face
The font data and rendering is adapted from Keith Packard's Twin
window system.  The hinting stuff is not ported yet, but hey, it renders!

The implementation uses user fonts, and the user font backend is modified
to use this font face (which we call "twin" font face internally) when
a toy font is needed.

The font face layer is then modified to use this font if:

  - The toy font face "cairo" is asked for, or

  - No native font backend is available, or

  - The preferred native font backend fails to return a font with
    STATUS_UNSUPPORTED.  No font backend does this right now but
    the idea is to change FreeType to return it if no fonts found
    on the system.

We also allow building with no font backends now!

The new doc/tutorial/src/twin.c file tests the twin face at various
sizes.
2008-09-25 19:25:11 -04:00
Carl Worth
9335ad313f Ignore generated files.
I know that I didn't create these Makefile.win32.features files,
so I assume that they are the result of Behdad's build magic and
that he just forgot to add them to .gitignore.
2008-09-24 16:20:35 -07:00
Behdad Esfahbod
9fc745ae9f Revert "[build] Use mkdir -p portability macros"
This reverts commit 03c37f56b2.

The AC_PROG_MKDIR_P is also one of those autoconf macros defined
in newer versions only.  Since we use mkdir -p in releasing scripts
only, it's not a big deal if it's not portable.
2008-09-24 13:18:12 -04:00
Behdad Esfahbod
03c37f56b2 [build] Use mkdir -p portability macros 2008-09-23 17:15:07 -04:00
Behdad Esfahbod
5a3f03623c [Makefile.win32] Add comments about where to edit for customization 2008-09-23 04:11:48 -04:00
Behdad Esfahbod
fba0211ed6 [Makefile.win32] Add makefile rules to generate cairo-features.h 2008-09-22 23:41:07 -04:00
Behdad Esfahbod
0bedbe78fe [Makefile.win32] Misc cleanup 2008-09-22 22:46:05 -04:00
Behdad Esfahbod
ebb5eb57b7 Generate build/Makefile.win32.features 2008-09-22 22:24:38 -04:00
Behdad Esfahbod
fd5cef50a7 [aclocal] Add support for automake-only or win32-only makefiles 2008-09-22 20:48:14 -04:00
Behdad Esfahbod
42e4103015 [aclocal] Don't do automake conditionals for builtin features 2008-09-22 20:33:23 -04:00
Behdad Esfahbod
79bc967a0d [build] Make including Makefile.win32.features files more robust
By using top_srcdir if available.  Make's include is relative to
current dir, not the Makefile being processed.  That makes it hard
to include Makefile's relatively.
2008-09-22 20:20:02 -04:00
Behdad Esfahbod
e686a00da8 [build] Add CAIRO_CONFIG_MAKEFILE_PRIVATE 2008-09-22 20:11:39 -04:00
Behdad Esfahbod
0ac7a242f8 [build] Add Makefile.win32.common 2008-09-22 20:11:38 -04:00
Behdad Esfahbod
984320dff1 [build] Don't define feature variables in Makefile.win32.features
This is not the right place to do that as one also needs to adjust
cairo-features.h.  Working on a proper fix.
2008-09-22 20:11:32 -04:00
Behdad Esfahbod
eb9ce58059 [build] Don't generate Makefile conditionals for default=always features 2008-09-22 19:23:41 -04:00
Behdad Esfahbod
caa3dbd61b [build] Make Makefile.*.features files more readable
By inserting a new line before each feature entry.
2008-09-22 19:15:05 -04:00
Behdad Esfahbod
23b9767bb3 Rename Makefile.*.config to Makefile.*.features as they should not be modified
The .config naming was giving people the impression that they can modify it.
That's not the case.
2008-09-22 17:34:36 -04:00
Behdad Esfahbod
9c27323959 [aclocal] In generated Makefile.win32.config, don't overwrite feature vars
When I designed this first I thought people can define make vars on the
command line to override default features.  That works.  However, it's
natural to want to define the list of features in the toplevel Makefile
and not on command line.  So, we don't override user's var now.  They
can set a make feature var to 0 to disable it.
2008-09-20 18:26:19 -04: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
Behdad Esfahbod
54b60dadb9 [Makefile.am.common] Remove gcc precompiled headers in "make clean"
Stale gcc precompiled headers can cause bugs very tricky to pin down.
2008-09-19 18:42:54 -04: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
eb89bf049a Check for _MSC_VER in mutex implementation code
Previously I made the mutex implementation code to use Windows mutexes
conditional on HAVE_WINDOWS_H.  This was suppposed to be a more wine-friendly
version of checking for a Windows platform.  However, it also meant that
when compiling without config.h, one had to stuff a #define for HAVE_WINDOWS_H
somewhere.  Traditionally it was put in cairo-features-win32.h, and that
practice was carried over even after my build system rewrite.

Somewhere along the road I also decided that the mutex implementation header
does not need to include anything other than config.h.  So the hacked up
HAVE_WINDOWS_H in cairo-features-win32.h was not being seen by its lone
user.

We now condition on any of HAVE_WINDOWS_H and _MSC_VER.  So the hack can be
removed altogether.
2008-09-19 16:57:42 -04:00
Behdad Esfahbod
b9c432862a [Makefile.am.releasing] Make release-publish work with parallel build
Carl had this confusing problem today making the snapshot, which was
"make release-publish" erring.  This commit reworks the release-publish
machinery to enforce serialization of some of the tasks such that it
works with make -j.  Don't expect any speedup though as "make distcheck"
is inherently sequential.
2008-09-18 19:35:28 -04:00
Behdad Esfahbod
9eee0e9358 [Makefile.am] Move sticky-bit clearing to dist-hook
It's a more natural place.  It also means that we just change permissions
on the dist directory, not the user's source directory.
2008-09-18 18:33:56 -04:00
Behdad Esfahbod
567be443a2 [configure.ac] Make sure version information do not end up in config.h
By introducing $(top_srcdir)/cairo-version.h I tried to make it
unnecessary to rebuild the entire library when the version changes.
That comes handy around releases and when bisecting.

However this was not working as the version info was also ending
up in config.h and hence forcing a full rebuild upon change.
I now undefine the PACKAGE_VERSION* macros that autoconf defines,
so config.h does not change when cairo-version.h changes.
2008-09-18 16:27:02 -04:00
Behdad Esfahbod
24c51ee177 [acinclude.m4] Add compat macros for autoconf 2.59 2008-09-18 03:12:03 -04:00