[Pixman] Build system patches for threading.

Soeren Sandmann sandmann at daimi.au.dk
Mon Jul 12 06:55:48 PDT 2010


Hi,

Looks like good improvement overall.

> From 2a6e12df0a6daad604ac1cfadc9f5b9982b35663 Mon Sep 17 00:00:00 2001
> From: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
> Date: Sat, 10 Jul 2010 15:36:41 +0300
> Subject: [PATCH 4/4] Check for specific flags by actually trying to compile and link.
> 
> Instead of relying on preprocessor version checks to see if a
> some compiler flags are supported, actually try to compile and
> link a test program with the flags.
> ---
[...]
> @@ -88,10 +89,55 @@ AC_DEFUN([PIXMAN_LINK_WITH_ENV],[dnl
>  	LDFLAGS=""
>  	LIBS=""
>  	$1
> -	AC_LINK_IFELSE([$2], [$3], [$4])
> -	CFLAGS="$save_CFLAGS"
> -	LDFLAGS="$save_LDFLAGS"
> -	LIBS="$save_LIBS"
> +	AC_LINK_IFELSE(
> +		[$2],
> +		[pixman_cc_stderr=`test -f conftest.err && cat conftest.err`
> +		 pixman_cc_flag=yes],
> +		[pixman_cc_stderr=`test -f conftest.err && cat conftest.err`
> +		 pixman_cc_flag=no])
> +
> +	if test "x$pixman_cc_stderr" != "x"; then
> +		pixman_cc_flag=no
> +	fi
> +
> +	if test "x$pixman_cc_flag" = "xyes"; then
> +		ifelse([$3], , :, [$3])
> +	else
> +		ifelse([$4], , :, [$4])
> +	fi
> +	CFLAGS="$save_cflags"
> +	LDFLAGS="$save_ldflags"
> +	LIBS="$save_libs"
> +])

It looks like there is typo here where "$save_cflags/ldflags/libs" are
restored, but it should be "$save_CFLAGS/LDFLAGS/LIBS".



Thanks,
Soren


More information about the Pixman mailing list