summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Siegert <bsiegert@gmail.com>2012-10-14 16:28:48 +0200
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-10-17 14:42:56 -0400
commitaf803be17b4ea5f53db9af57b6c6ef06db99ebbd (patch)
tree52eb9e1592a85f805b254d72569db04a8cf93832
parent6e56098c0338ce74228187e4c96fed1a66cb0956 (diff)
configure.ac: PIXMAN_LINK_WITH_ENV fix
(fixes bug #52101) On MirBSD, the compiler produces a (harmless) warning when the compiler is called without the standard CFLAGS: foo.c:0: note: someone does not honour COPTS correctly, passed 0 times However, PIXMAN_LINK_WITH_ENV considers _any_ output on stderr as an error, even if the exit status of the compiler is 0. Furthermore, it resets CFLAGS and LDFLAGS at the start. On MirBSD, this will lead to a warning in each test, making all such tests fail. In particular, the pthread_setspecific test fails, thus pixman is compiled without thread support. This leads to compile errors later on, or at least it did when I tried this on pkgsrc. Re-adding the saved CFLAGS, LDFLAGS and LIBS before the test makes it work. The second hunk inverts the order of the pthread flag checks. On BSD systems (this is true at least on OpenBSD and MirBSD), both -lpthread and -pthread work but the latter is "preferred", whatever this means.
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c069b48..f9c0e02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,9 @@ AC_DEFUN([PIXMAN_LINK_WITH_ENV],[dnl
LDFLAGS=""
LIBS=""
$1
+ CFLAGS="$save_CFLAGS $CFLAGS"
+ LDFLAGS="$save_LDFLAGS $LDFLAGS"
+ LIBS="$save_LIBS $LIBS"
AC_LINK_IFELSE(
[AC_LANG_SOURCE([$2])],
[pixman_cc_stderr=`test -f conftest.err && cat conftest.err`
@@ -921,8 +924,8 @@ if test $ac_cv_tls = none ; then
AC_MSG_CHECKING(for pthread_setspecific)
- PIXMAN_CHECK_PTHREAD([CFLAGS="-D_REENTRANT"; LIBS="-lpthread"])
PIXMAN_CHECK_PTHREAD([CFLAGS="-pthread"; LDFLAGS="-pthread"])
+ PIXMAN_CHECK_PTHREAD([CFLAGS="-D_REENTRANT"; LIBS="-lpthread"])
PIXMAN_CHECK_PTHREAD([CFLAGS="-D_REENTRANT"; LDFLAGS="-lroot"])
if test $support_for_pthread_setspecific = yes; then