Commit graph

117 commits

Author SHA1 Message Date
Andrea Canciani
f71a618bd2 Fix configuration if gobject is absent
Autodetect gobject and only use it if present.
Its absence is not to be considered a failure since it's not required.
2010-08-07 21:32:09 +02:00
Benjamin Otte
661f4859cd Add cairo-gobject library
This library is supposed to contain GType declarations for Cairo types.
It is also meant to support gobject-introspection binding creation.
2010-08-07 20:19:27 +02:00
Benjamin Otte
142df6f963 configure: Disable xml backend by default
We don't want to enable it by default when nobody uses it.
2010-07-30 22:27:28 +02:00
Benjamin Otte
9f33f8453b configure: Disable tee backend by default
We don't want to enable it by default when nobody uses it.
2010-07-30 22:27:27 +02:00
M Joonas Pihlaja
fca8977219 build: Rework pthread detection.
Use two levels of pthread support: a minimal level used to
build cairo itself, and a full level to build threaded apps
which want to use cairo.  The minimal level tries to use
pthread stubs from libc if possible, but falls back to the
full level if that's not possible.  We use CFLAGS=-D_REENTRANT
LIBS=-lpthread to find a real pthread library since that seems
to work on every unix-like test box we can get our hands on.
2010-07-11 21:40:26 +03:00
Benjamin Otte
bf117e4ea7 build: fix glew include
Currently wether internal glew is built is dependant on wether the
tarball in use was built with internal glew or not. And that's not how
it should be.
2010-07-09 18:43:38 +02:00
Benjamin Otte
f7fc8569a7 build: Fix C++ issues with automake
This is an attempt to fix the broken situation we've been in where
automake links libcairo.la with c++ because it might potentially maybe
include C++ files.

Those potential files only exist in Chris' throwaway backends (skia, qt)
and the BeOS backend, so for 99.99% of cases, these backends are not
needed and linking with c++ is overkill. Also, no one wants to have
libcairo.so link to libstdc++.

This patch fixes that in mutliple steps:
1) Add build infrastructure to distinguish between C and C++ backends.
   This is done by allowing to specify backend_sources as well as
   backend_cxx_sources variables in Makefile.sources.
2) Optionally build a libcairo_cxx.la noinst library
   This intermediate library is built for C++ backends only and therefor
   linked using c++. It is then linked into the final libcairo.la. This
   does not require c++, so the linking of libcairo.la is done with cc.

This also works around various weirdnesses that the current build system
exposes, where it assumes cisms when in fact using c++ semantics, like
not detecting c++ properly or:
https://bugzilla.redhat.com/show_bug.cgi?id=606523
2010-07-09 12:38:37 +02:00
Benjamin Otte
9de25a0297 configure: remove dolt
libtool should be fast by now
2010-07-05 18:38:33 +02:00
Benjamin Otte
eb63284fc3 configure: Use automake silent rules
This replaces shave usage.
If silent rules are not available, don't use them.
2010-07-05 18:29:58 +02:00
Benjamin Otte
68bbb6b4a0 configure: remove shave 2010-07-05 00:35:39 +02:00
Chris Wilson
e2220a1f3a configure: Try an alternate name for system glew. 2010-06-15 11:45:54 +01:00
Chris Wilson
25ec0c1e9b build: Enable system GLEW on non-UNIX platforms 2010-06-15 10:59:01 +01:00
Zoxc
505a0456d2 gl: Added WGL context and surface. 2010-06-14 12:46:26 +01:00
Chris Wilson
14d6c3e054 configure: Include PTHREAD_CFLAGS in CAIRO_LDFLAGS
Required for successful linking of our programs. I am not sure what the
impact this has upon other users of Cairo yet, I think we need to export
the PTHREAD_CFLAGS via cairo.pc as well.
2010-05-16 10:07:07 +01: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
bd672d080c drm: code dump, sorry.
Lots upon lots of tiny fixes mixed in with experimental code. :(
2010-05-12 20:54:49 +01:00
Carlos Garcia Campos
41fecf8e66 [configure] Bump poppler dependency to 0.13.3 2010-04-30 21:20:11 +02:00
Chris Wilson
e0306da1d7 configure: typo in check for xcb-shm 2010-04-21 22:52:16 +01:00
Benjamin Otte
b648365cfa Require pixman 0.17.5
We want pixman_image_composite32() and pixman_image_fill_boxes()
2010-04-15 18:31:01 +02:00
Chris Wilson
00101fa716 configure: check -lrt for shm_open()
OS/X includes shm_open() in libc, and fails to link if -lrt is
specified. So perform the appropriate configure time magic.
2010-03-31 16:20:13 +01:00
Chris Wilson
b101c7dab8 gl: Add EGL interface
Enable the EGL backend for GL.
2010-03-11 01:49:18 +00:00
M Joonas Pihlaja
1a7ba1a806 xcb: Update minimum required versions of libxcb.
The new xcb surface uses xcb_writev() and xcb_take_socket()
which were introduced in libxcb 1.1.92.  The boilerplate
in turn uses the major_code and minor_code fields in
xcb_generic_error_t, which were introduced in 1.4.
2010-03-01 01:23:17 +02:00
Chris Wilson
22b5f78c1c gl: Remove eagle support
Eagle is no more, Kristian has superseded it with true EGL support. He
is so happy...
2010-02-11 10:38:51 +00:00
Andrea Canciani
11a120fb84 Silence autoconf on Mac OS X
Autoconf was complaining that AC_COMPILE_IFELSE and AC_RUN_IFELSE
were called before AC_GNU_SOURCE. Moving AC_GNU_SOURCE right after
AC_INIT solves this.
2010-01-29 14:25:15 +01:00
Chris Wilson
c82ff8cbcf configure: Enable AC_SYS_LARGEFILE for drm
drm makes use of 64bit offsets when mmaping, and so we require the
64bit file interfaces. I had presumed that it would be pulled in with
AC_GNU_SOURCE, but no.
2010-01-27 18:48:32 +00:00
Benjamin Otte
58980b4ad6 build: Remove glitz surface
glitz is unmaintained and the GL surface is far superior anyway.
2010-01-27 09:56:14 +01:00
Benjamin Otte
bac513a85d build: Fix pthread detection
THe pthread.h detection code didn't pass -lpthread or -pthread to Cairo.
2010-01-25 20:13:48 +01:00
Chris Wilson
123bdb086a xcb: Make shm optional
Trying to build xcb on a system without SHM wrapped by xcb. The right
answer would be to build libxcb-shm. The quick answer is to compile out
shm support.
2010-01-25 16:45:03 +00:00
Chris Wilson
e1b3330376 configure: dri2 is only required for xcb-drm
Move the optional dependency on dri2 to the xcb-drm integration where it
is required.
2010-01-25 14:48:44 +00:00
Chris Wilson
1236c41072 xcb: Refresh.
Still an experimental backend, it's now a little too late to stabilise
for 1.10, but this should represent a major step forward in its feature
set and an attempt to catch up with all the bug fixes that have been
performed on xlib. Notably not tested yet (and expected to be broken)
are mixed-endian connections and low bitdepth servers (the dithering
support has not been copied over for instance). However, it seems robust
enough for daily use...

Of particular note in this update is that the xcb surface is now capable
of subverting the xlib surface through the ./configure --enable-xlib-xcb
option. This replaces the xlib surface with a proxy that forwards all
operations to an equivalent xcb surface whilst preserving the cairo-xlib
API that is required for compatibility with the existing applications,
for instance GTK+ and Mozilla. Also you can experiment with enabling a
DRM bypass, though you need to be extremely foolhardy to do so.
2010-01-22 23:01:52 +00:00
Chris Wilson
d2f251f84b configure: Globally define AC_GNU_SOURCE
We were using _GNU_SOURCE throughout the codebase, so simply define it
once during configure. This is the easiest method to enable recursive
mutexes using pthreads, as required in a pending patch.
2010-01-22 23:01:50 +00:00
Andrea Canciani
1ce096657b Fix compilation on MacOS X
Enable "ld_preload" (DYLD_INSERT_LIBRARIES + DYLD_FORCE_FLAT_NAMESPACE)
and build cairo-trace as a library instead of a module to make it
work also on MacOS X.
2009-11-09 16:59:31 +00:00
Chris Wilson
9b42b6156d build: Add -pthread to real_pthread_CFLAGS 2009-11-02 12:50:45 +00:00
Benjamin Otte
3eecf2f60c sphinx: Add required pthread libs
Try again, this time for real hopefully.
2009-11-02 13:20:25 +01:00
Chris Wilson
837eb577b4 sphinx: Add required pthread libs
Switching to pthread-stubs broke the build for sphinx on unbroken
platforms [those that do not unnecessarily link against -lpthreads].
2009-11-02 12:01:45 +00:00
M Joonas Pihlaja
43a775f60d [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t.
The new name is more descriptive than the rather opaque meta surface.
Discussed with vigour on the mailing list and #cairo:

http://lists.cairographics.org/archives/cairo/2009-July/017571.html
2009-10-22 02:29:47 +03:00
Chris Wilson
dac73d260a [build] Link against pthread-stubs
Avoid pulling in the real pthread library if the application is single
threaded and not using pthreads, by linking against pthread-stubs
instead.
2009-10-15 13:05:47 +01:00
M Joonas Pihlaja
cf0fed2191 [build] Check for dlsym in both libdl and libc.
The BSDs have dlsym() in libc rather than libdl.
2009-09-14 13:32:18 +03:00
Chris Wilson
12470fd701 [configure] Setup GL CFLAGS before checking for GLX 2009-09-14 10:36:08 +01:00
Chris Wilson
9c2790ccc4 [build] Add a default message for when GLEW isn't built
And it appears I touched the build system again and autoregenerated the
feature headers.
2009-09-14 10:10:45 +01:00
Chris Wilson
6d4f3c40ef Add a private copy of GLEW
This appears to be the simplest mechanism to build libglew at the moment -
should a system copy be unavailable.  Fortunately libglew is now distributed
under a permissive licence.

If you want to pass 'make -C src check' you have to use the system copy,
or spend quite a bit of time cairo-fying libglew.
2009-09-14 09:26:02 +01:00
Chris Wilson
9ad26f74b0 [configure] Fallback to detect OpenGL headers
When not using mesa, we can not rely on a pkgconfig file, so just rely on
the presence of the OpenGL headers instead.
2009-09-13 23:16:57 +01:00
M Joonas Pihlaja
f5bcb2f36e [build] Enable building cairo-trace on Solaris.
Solaris supports LD_PRELOAD too!
2009-09-13 20:30:55 +03:00
M Joonas Pihlaja
ce8c842a70 [trace] Make cairo-trace and its symbol-lookup automatically configured.
The build shouldn't fail if we can't make our optional performance
tools.
2009-09-13 20:30:55 +03:00
Chris Wilson
6cb3ff9c19 [configure] --enable-symbol-lookup
There you go Joonas, I don't always ignore your suggestions! This is
simple patch to allow the user to disable symbol loops in case the
auto-detection fails on some obscure (perhaps OpenBSD) platform. Or in
case the user really wants to trim a few bytes from a library only used
during tracing!
2009-09-13 10:52:14 +01:00
Chris Wilson
34778a883a [configure] Typo in test
The have_dl clause was meant to have been removed from the requirements
test for cairo-script-interpreter. Instead we left the test broken.
2009-09-09 01:16:08 +01:00
Chris Wilson
9389cb78a8 [build] Improve handling of missing test apparatus
Improve detection, reporting and disabling of test backends when we lack
the required libraries and utilities.
2009-09-08 17:51:33 +01:00
Chris Wilson
310cebf194 [configure] Add option to disable trace.
Some environments may be broken beyond our capabilities to detect, or
maybe the user is just insane and doesn't want to build my nice shiny
cairo-trace. Whatever, give them the option to choose:

  $ ./configure --disable-trace
2009-09-05 15:21:50 +01:00
Carlos Garcia Campos
687462be89 [build] Fix a typo in configure.ac 2009-08-30 12:07:28 +02:00
Chris Wilson
8078cd194e [boilerplate] Runtime library check
For the purposes of benchmarking it is useful to run cairo-perf against a
different library from the one it was compiled against. In order to do so,
we need to check that the runtime library contains the required entry
points for our targets - which we can check by using dlsym.
2009-08-29 17:07:38 +01:00