Commit graph

6 commits

Author SHA1 Message Date
Andrea Canciani
d2ea8bd070 build: Respect CFLAGS and LIBS env settings
The build system does not honor the flags set externally and replaces
it with the pthread-only flags when detecting pthread
availability. This breaks the configuration of cairo in some
cross-compilation environments:

conftest.c:1: note: someone does not honour COPTS correctly, passed 0 times

The test for pthread should append the new flags to the old one.
2011-07-29 19:29:53 +02:00
M Joonas Pihlaja
53fcfc781e build: Typos in comments.
Fix inline "dnl" strings left over from a string
substitution "--" -> "dnl".
2010-07-21 22:39:40 +03:00
Hib Eris
fd1e731c9d build: Fix pthread detection code when there isn't one.
The code was testing the output variable $use_pthread rather than
the input variable $enable_pthread when checking that pthreads
were actually found when requested.
2010-07-21 22:34:05 +03:00
M Joonas Pihlaja
f0466ecf7d build: Fix typo in pthread test program.
Missing a semicolon after pthread_cleanup_push.  Incredibly
only openbsd 4.5 minded.
2010-07-11 21:57:40 +03:00
M Joonas Pihlaja
3f1d7de8e1 build: Fix regression provoked by newer autoconf and dodgy configuring.
We're not supposed to be redefining PACKAGE_VERSION, PACKAGE_...
from the configure generated confdefs.h.  This patch rudely adds
paper over the problem.  The compiler warnings are a problem for
us since our checking of various compiler flags assumes that
no news is good news, and that any warning messages are due
to the flags under test.  The regression appears when using
an autoconf >= 2.64, at least, but not with 2.61.

The same issue appears in the pthread test because our conftest
unconditionally #defines _GNU_SOURCE, but autoconf ends up doing
that in the confdefs.h.
2010-07-11 21:40:26 +03: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