summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-06-05 20:14:29 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-06-05 20:14:29 +0000
commit1a3f8b041f9385fc2cda6fbe97f61112cd191ec5 (patch)
tree92c0912cc02e012192b0531c926547d08038ff22
parent8d9c99533965da07eaec96335b59167b621f0970 (diff)
Update to pixman 0.15.8.
-rw-r--r--lib/pixman/COPYING39
-rw-r--r--lib/pixman/Makefile.am18
-rw-r--r--lib/pixman/Makefile.bsd-wrapper4
-rw-r--r--lib/pixman/Makefile.in41
-rw-r--r--lib/pixman/TODO4
-rw-r--r--lib/pixman/config.h.in19
-rw-r--r--lib/pixman/configure9426
-rw-r--r--lib/pixman/configure.ac170
-rw-r--r--lib/pixman/pixman-1-uninstalled.pc.in8
-rw-r--r--lib/pixman/pixman/Makefile.am93
-rw-r--r--lib/pixman/pixman/Makefile.in309
-rw-r--r--lib/pixman/pixman/Makefile.win321
-rw-r--r--lib/pixman/pixman/combine.h.inc50
-rw-r--r--lib/pixman/pixman/combine.inc524
-rw-r--r--lib/pixman/pixman/combine.pl10
-rw-r--r--lib/pixman/pixman/pixman-access.c97
-rw-r--r--lib/pixman/pixman/pixman-arm-neon.c1550
-rw-r--r--lib/pixman/pixman/pixman-arm-neon.h179
-rw-r--r--lib/pixman/pixman/pixman-arm-simd.c482
-rw-r--r--lib/pixman/pixman/pixman-arm-simd.h106
-rw-r--r--lib/pixman/pixman/pixman-bits-image.c346
-rw-r--r--lib/pixman/pixman/pixman-compose-accessors.c4
-rw-r--r--lib/pixman/pixman/pixman-compose.c596
-rw-r--r--lib/pixman/pixman/pixman-compute-region.c10
-rw-r--r--lib/pixman/pixman/pixman-conical-gradient.c157
-rw-r--r--lib/pixman/pixman/pixman-cpu.c534
-rw-r--r--lib/pixman/pixman/pixman-fast-path.c1350
-rw-r--r--lib/pixman/pixman/pixman-general.c359
-rw-r--r--lib/pixman/pixman/pixman-gradient-walker.c232
-rw-r--r--lib/pixman/pixman/pixman-image.c408
-rw-r--r--lib/pixman/pixman/pixman-implementation.c268
-rw-r--r--lib/pixman/pixman/pixman-linear-gradient.c261
-rw-r--r--lib/pixman/pixman/pixman-matrix.c626
-rw-r--r--lib/pixman/pixman/pixman-mmx.c1059
-rw-r--r--lib/pixman/pixman/pixman-mmx.h320
-rw-r--r--lib/pixman/pixman/pixman-pict.c2104
-rw-r--r--lib/pixman/pixman/pixman-private.h382
-rw-r--r--lib/pixman/pixman/pixman-radial-gradient.c326
-rw-r--r--lib/pixman/pixman/pixman-region.c67
-rw-r--r--lib/pixman/pixman/pixman-region32.c15
-rw-r--r--lib/pixman/pixman/pixman-solid-fill.c85
-rw-r--r--lib/pixman/pixman/pixman-source.c709
-rw-r--r--lib/pixman/pixman/pixman-sse2.c1411
-rw-r--r--lib/pixman/pixman/pixman-transformed.c773
-rw-r--r--lib/pixman/pixman/pixman-utils.c464
-rw-r--r--lib/pixman/pixman/pixman-vmx.c679
-rw-r--r--lib/pixman/pixman/pixman.h165
-rw-r--r--lib/pixman/pixman/solaris-hwcap.mapfile36
-rw-r--r--lib/pixman/test/Makefile.am51
-rw-r--r--lib/pixman/test/Makefile.in173
-rw-r--r--lib/pixman/test/alpha-test.c117
-rw-r--r--lib/pixman/test/clip-in.c50
-rw-r--r--lib/pixman/test/clip-test.c69
-rw-r--r--lib/pixman/test/composite-test.c80
-rw-r--r--lib/pixman/test/fetch-test.c2
-rw-r--r--lib/pixman/test/gradient-test.c102
-rw-r--r--lib/pixman/test/scaling-test.c341
-rw-r--r--lib/pixman/test/trap-crasher.c27
-rw-r--r--lib/pixman/test/trap-test.c49
-rw-r--r--lib/pixman/test/utils.c113
-rw-r--r--lib/pixman/test/utils.h6
61 files changed, 17637 insertions, 10419 deletions
diff --git a/lib/pixman/COPYING b/lib/pixman/COPYING
index e69de29bb..286158f2e 100644
--- a/lib/pixman/COPYING
+++ b/lib/pixman/COPYING
@@ -0,0 +1,39 @@
+The following is the 'standard copyright' agreed upon by most contributors,
+and is currently the canonical license, though a modification is currently
+under discussion. Copyright holders of new code should use this license
+statement where possible, and append their name to this list.
+
+Copyright 1987, 1988, 1989, 1998 The Open Group
+Copyright 1987, 1988, 1989 Digital Equipment Corporation
+Copyright 1999, 2004, 2008 Keith Packard
+Copyright 2000 SuSE, Inc.
+Copyright 2000 Keith Packard, member of The XFree86 Project, Inc.
+Copyright 2004, 2005, 2007, 2008 Red Hat, Inc.
+Copyright 2004 Nicholas Miell
+Copyright 2005 Lars Knoll & Zack Rusin, Trolltech
+Copyright 2005 Trolltech AS
+Copyright 2007 Luca Barbato
+Copyright 2008 Aaron Plattner, NVIDIA Corporation
+Copyright 2008 Rodrigo Kumpera
+Copyright 2008 André Tupinambá
+Copyright 2008 Mozilla Corporation
+Copyright 2008 Frederic Plourde
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/lib/pixman/Makefile.am b/lib/pixman/Makefile.am
index 2cf692d5f..63b08c1fb 100644
--- a/lib/pixman/Makefile.am
+++ b/lib/pixman/Makefile.am
@@ -7,7 +7,7 @@ $(pkgconfig_DATA): pixman-1.pc.in
snapshot:
distdir="$(distdir)-`date '+%Y%m%d'`"; \
- test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git-rev-parse HEAD | cut -c 1-6`; \
+ test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git rev-parse HEAD | cut -c 1-6`; \
$(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" dist
GPGKEY=6FF7C1A8
@@ -48,6 +48,8 @@ $(gpg_file): $(sha1_tgz)
@echo "Please enter your GPG password to sign the checksum."
gpg --armor --sign $^
+HASHFILES = $(sha1_tgz) $(sha1_tbz2) $(md5_tgz) $(md5_tbz2)
+
release-verify-newer:
@echo -n "Checking that no $(VERSION) release already exists at $(RELEASE_XORG_HOST)..."
@ssh $(RELEASE_XORG_HOST) test ! -e $(RELEASE_XORG_DIR)/$(tar_gz) \
@@ -61,16 +63,16 @@ release-verify-newer:
@echo "Good."
release-remove-old:
- $(RM) $(tar_gz) $(tar_bz2) $(sha1_tgz) $(gpg_file)
+ $(RM) $(tar_gz) $(tar_bz2) $(HASHFILES) $(gpg_file)
ensure-prev:
@if [[ "$(PREV)" == "" ]]; then \
echo "" && \
echo "You must set the PREV variable on the make command line to" && \
- echo "the last version." && \
+ echo "the last version." && \
echo "" && \
echo "For example:" && \
- echo " make PREV=0.7.3" && \
+ echo " make PREV=0.7.3" && \
echo "" && \
false; \
fi
@@ -78,15 +80,15 @@ ensure-prev:
release-check: ensure-prev release-verify-newer release-remove-old distcheck
release-tag:
- git-tag -u $(GPGKEY) -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION)
+ git tag -u $(GPGKEY) -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION)
-release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_tgz) $(gpg_file)
+release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_tgz) $(sha1_tbz2) $(md5_tgz) $(gpg_file)
mkdir -p releases
scp $(tar_gz) $(sha1_tgz) $(gpg_file) $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)
scp $(tar_gz) $(tar_bz2) $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)
ssh $(RELEASE_CAIRO_HOST) "rm -f $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_gz) $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
-release-publish-message: $(sha1_tgz) $(md5_tgz) $(sha1_tbz2) $(md5_tbz2) ensure-prev
+release-publish-message: $(HASHFILES) ensure-prev
@echo "Please follow the instructions in RELEASING to push stuff out and"
@echo "send out the announcement mails. Here is the excerpt you need:"
@echo ""
@@ -121,7 +123,7 @@ release-publish-message: $(sha1_tgz) $(md5_tgz) $(sha1_tbz2) $(md5_tbz2) ensure-
@echo " tag: $(PACKAGE)-$(VERSION)"
@echo ""
@echo "Log:"
- @git-log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b1-80
+ @git log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b1-80
@echo "============================== CUT HERE =============================="
@echo ""
diff --git a/lib/pixman/Makefile.bsd-wrapper b/lib/pixman/Makefile.bsd-wrapper
index 1350a7be3..63b440407 100644
--- a/lib/pixman/Makefile.bsd-wrapper
+++ b/lib/pixman/Makefile.bsd-wrapper
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.6 2008/09/23 19:11:40 matthieu Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.7 2009/06/05 20:14:27 matthieu Exp $
-SHARED_LIBS= pixman-1 12.0
+SHARED_LIBS= pixman-1 15.8
.if ${MACHINE} == amd64
CONFIGURE_ARGS += --disable-sse2
diff --git a/lib/pixman/Makefile.in b/lib/pixman/Makefile.in
index 7016a4800..49e307285 100644
--- a/lib/pixman/Makefile.in
+++ b/lib/pixman/Makefile.in
@@ -88,6 +88,8 @@ AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
+ARM_NEON_CFLAGS = @ARM_NEON_CFLAGS@
+ARM_SIMD_CFLAGS = @ARM_SIMD_CFLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -115,6 +117,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
+GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
HAVE_GTK_FALSE = @HAVE_GTK_FALSE@
@@ -132,6 +135,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_VERSION_INFO = @LT_VERSION_INFO@
MAKEINFO = @MAKEINFO@
MMX_CFLAGS = @MMX_CFLAGS@
+MMX_LDFLAGS = @MMX_LDFLAGS@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -151,7 +155,14 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSE2_CFLAGS = @SSE2_CFLAGS@
+SSE2_LDFLAGS = @SSE2_LDFLAGS@
STRIP = @STRIP@
+USE_ARM_NEON_FALSE = @USE_ARM_NEON_FALSE@
+USE_ARM_NEON_TRUE = @USE_ARM_NEON_TRUE@
+USE_ARM_SIMD_FALSE = @USE_ARM_SIMD_FALSE@
+USE_ARM_SIMD_TRUE = @USE_ARM_SIMD_TRUE@
+USE_GCC_INLINE_ASM_FALSE = @USE_GCC_INLINE_ASM_FALSE@
+USE_GCC_INLINE_ASM_TRUE = @USE_GCC_INLINE_ASM_TRUE@
USE_MMX_FALSE = @USE_MMX_FALSE@
USE_MMX_TRUE = @USE_MMX_TRUE@
USE_SSE2_FALSE = @USE_SSE2_FALSE@
@@ -160,15 +171,9 @@ USE_VMX_FALSE = @USE_VMX_FALSE@
USE_VMX_TRUE = @USE_VMX_TRUE@
VERSION = @VERSION@
VMX_CFLAGS = @VMX_CFLAGS@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_NMEDIT = @ac_ct_NMEDIT@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -185,23 +190,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -226,6 +238,7 @@ md5_tgz = $(tar_gz).md5
sha1_tbz2 = $(tar_bz2).sha1
md5_tbz2 = $(tar_bz2).md5
gpg_file = $(sha1_tgz).asc
+HASHFILES = $(sha1_tgz) $(sha1_tbz2) $(md5_tgz) $(md5_tbz2)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -692,7 +705,7 @@ $(pkgconfig_DATA): pixman-1.pc.in
snapshot:
distdir="$(distdir)-`date '+%Y%m%d'`"; \
- test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git-rev-parse HEAD | cut -c 1-6`; \
+ test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git rev-parse HEAD | cut -c 1-6`; \
$(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" dist
$(sha1_tgz): $(tar_gz)
@@ -724,16 +737,16 @@ release-verify-newer:
@echo "Good."
release-remove-old:
- $(RM) $(tar_gz) $(tar_bz2) $(sha1_tgz) $(gpg_file)
+ $(RM) $(tar_gz) $(tar_bz2) $(HASHFILES) $(gpg_file)
ensure-prev:
@if [[ "$(PREV)" == "" ]]; then \
echo "" && \
echo "You must set the PREV variable on the make command line to" && \
- echo "the last version." && \
+ echo "the last version." && \
echo "" && \
echo "For example:" && \
- echo " make PREV=0.7.3" && \
+ echo " make PREV=0.7.3" && \
echo "" && \
false; \
fi
@@ -741,15 +754,15 @@ ensure-prev:
release-check: ensure-prev release-verify-newer release-remove-old distcheck
release-tag:
- git-tag -u $(GPGKEY) -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION)
+ git tag -u $(GPGKEY) -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION)
-release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_tgz) $(gpg_file)
+release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_tgz) $(sha1_tbz2) $(md5_tgz) $(gpg_file)
mkdir -p releases
scp $(tar_gz) $(sha1_tgz) $(gpg_file) $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)
scp $(tar_gz) $(tar_bz2) $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)
ssh $(RELEASE_CAIRO_HOST) "rm -f $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_gz) $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
-release-publish-message: $(sha1_tgz) $(md5_tgz) $(sha1_tbz2) $(md5_tbz2) ensure-prev
+release-publish-message: $(HASHFILES) ensure-prev
@echo "Please follow the instructions in RELEASING to push stuff out and"
@echo "send out the announcement mails. Here is the excerpt you need:"
@echo ""
@@ -784,7 +797,7 @@ release-publish-message: $(sha1_tgz) $(md5_tgz) $(sha1_tbz2) $(md5_tbz2) ensure-
@echo " tag: $(PACKAGE)-$(VERSION)"
@echo ""
@echo "Log:"
- @git-log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b1-80
+ @git log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b1-80
@echo "============================== CUT HERE =============================="
@echo ""
diff --git a/lib/pixman/TODO b/lib/pixman/TODO
index 47b9bc9d0..6abeb0b0d 100644
--- a/lib/pixman/TODO
+++ b/lib/pixman/TODO
@@ -4,8 +4,6 @@
- Use of fbCompositeOver_x888x8x8888sse2()
- - Use pixmanFillsse2 and pixmanBltsse2
-
- Update the RLEASING file
- Things to keep in mind if breaking ABI:
@@ -178,6 +176,8 @@
done:
+- Use pixmanFillsse2 and pixmanBltsse2
+
- Be consistent about calling sse2 sse2
- Rename "SSE" to "MMX_EXTENSIONS". (Deleted mmx extensions).
diff --git a/lib/pixman/config.h.in b/lib/pixman/config.h.in
index 64de572be..da00edb65 100644
--- a/lib/pixman/config.h.in
+++ b/lib/pixman/config.h.in
@@ -54,6 +54,15 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* use ARM NEON compiler intrinsics */
+#undef USE_ARM_NEON
+
+/* use ARM SIMD compiler intrinsics */
+#undef USE_ARM_SIMD
+
+/* use GNU-style inline assembler */
+#undef USE_GCC_INLINE_ASM
+
/* use MMX compiler intrinsics */
#undef USE_MMX
@@ -66,9 +75,13 @@
/* Version number of package */
#undef VERSION
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
+#if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+#elif ! defined __LITTLE_ENDIAN__
+# undef WORDS_BIGENDIAN
+#endif
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
diff --git a/lib/pixman/configure b/lib/pixman/configure
index 462a1934c..ddc0ee92e 100644
--- a/lib/pixman/configure
+++ b/lib/pixman/configure
@@ -1,27 +1,84 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for pixman 0.12.0.
+# Generated by GNU Autoconf 2.62 for pixman 0.15.8.
#
# Report bugs to <"sandmann@daimi.au.dk">.
#
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
-DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -31,33 +88,60 @@ else
fi
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
@@ -65,157 +149,391 @@ fi
# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+# CDPATH.
+$as_unset CDPATH
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
fi
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
+ case $as_dir in
/*)
- if ("$as_dir/$as_base" -c '
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
as_lineno_1=$LINENO
as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-if expr a : '\(a\)' >/dev/null 2>&1; then
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
@@ -224,7 +542,28 @@ else
as_mkdir_p=false
fi
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -233,15 +572,6 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
# Check that we are running under the correct shell.
@@ -397,79 +727,249 @@ tagnames=${tagnames+${tagnames},}CXX
tagnames=${tagnames+${tagnames},}F77
+exec 7<&0 </dev/null 6>&1
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-exec 6>&1
-
#
# Initializations.
#
ac_default_prefix=/usr/local
+ac_clean_files=
ac_config_libobj_dir=.
+LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
# Identity of this package.
PACKAGE_NAME='pixman'
PACKAGE_TARNAME='pixman'
-PACKAGE_VERSION='0.12.0'
-PACKAGE_STRING='pixman 0.12.0'
+PACKAGE_VERSION='0.15.8'
+PACKAGE_STRING='pixman 0.15.8'
PACKAGE_BUGREPORT='"sandmann@daimi.au.dk"'
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PIXMAN_VERSION_MAJOR PIXMAN_VERSION_MINOR PIXMAN_VERSION_MICRO LT_VERSION_INFO PERL USE_MMX_TRUE USE_MMX_FALSE USE_SSE2_TRUE USE_SSE2_FALSE MMX_CFLAGS SSE2_CFLAGS VMX_CFLAGS USE_VMX_TRUE USE_VMX_FALSE PKG_CONFIG ac_pt_PKG_CONFIG GTK_CFLAGS GTK_LIBS HAVE_GTK_TRUE HAVE_GTK_FALSE DEP_CFLAGS DEP_LIBS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+SED
+GREP
+EGREP
+LN_S
+ECHO
+AR
+RANLIB
+DSYMUTIL
+NMEDIT
+CPP
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+CXXCPP
+F77
+FFLAGS
+ac_ct_F77
+LIBTOOL
+PIXMAN_VERSION_MAJOR
+PIXMAN_VERSION_MINOR
+PIXMAN_VERSION_MICRO
+LT_VERSION_INFO
+PERL
+USE_MMX_TRUE
+USE_MMX_FALSE
+USE_SSE2_TRUE
+USE_SSE2_FALSE
+MMX_CFLAGS
+MMX_LDFLAGS
+SSE2_CFLAGS
+SSE2_LDFLAGS
+VMX_CFLAGS
+USE_VMX_TRUE
+USE_VMX_FALSE
+ARM_SIMD_CFLAGS
+ARM_NEON_CFLAGS
+USE_ARM_SIMD_TRUE
+USE_ARM_SIMD_FALSE
+USE_ARM_NEON_TRUE
+USE_ARM_NEON_FALSE
+USE_GCC_INLINE_ASM_TRUE
+USE_GCC_INLINE_ASM_FALSE
+PKG_CONFIG
+GTK_CFLAGS
+GTK_LIBS
+HAVE_GTK_TRUE
+HAVE_GTK_FALSE
+DEP_CFLAGS
+DEP_LIBS
+LIBOBJS
+LTLIBOBJS'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+enable_shared
+enable_static
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+with_pic
+with_tags
+enable_mmx
+enable_sse2
+enable_vmx
+enable_arm_simd
+enable_arm_neon
+enable_gcc_inline_asm
+enable_gtk
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+F77
+FFLAGS
+PKG_CONFIG
+GTK_CFLAGS
+GTK_LIBS'
+
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -492,34 +992,48 @@ x_libraries=NONE
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
ac_prev=
+ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
+ eval $ac_prev=\$ac_option
ac_prev=
continue
fi
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
# Accept the important Cygnus configure options, so we can diagnose typos.
- case $ac_option in
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
@@ -541,33 +1055,61 @@ do
--config-cache | -C)
cache_file=config.cache ;;
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ -datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -594,6 +1136,12 @@ do
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
@@ -618,13 +1166,16 @@ do
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
-localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
+ | --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -689,6 +1240,16 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -739,26 +1300,38 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
esac
- eval "with_$ac_package='$ac_optarg'" ;;
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -778,7 +1351,7 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; }
;;
@@ -787,17 +1360,16 @@ Try \`$0 --help' for more information." >&2
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
+ eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
@@ -806,31 +1378,39 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2
{ (exit 1); exit 1; }; }
fi
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
-done
+fi
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
do
- eval ac_val=$`echo $ac_var`
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
done
# There might be people who depend on the old broken behavior: `$host'
@@ -844,7 +1424,7 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
@@ -857,106 +1437,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { $as_echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
- fi
fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
{ (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-ac_env_CXX_set=${CXX+set}
-ac_env_CXX_value=$CXX
-ac_cv_env_CXX_set=${CXX+set}
-ac_cv_env_CXX_value=$CXX
-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_env_CXXFLAGS_value=$CXXFLAGS
-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
-ac_env_CXXCPP_set=${CXXCPP+set}
-ac_env_CXXCPP_value=$CXXCPP
-ac_cv_env_CXXCPP_set=${CXXCPP+set}
-ac_cv_env_CXXCPP_value=$CXXCPP
-ac_env_F77_set=${F77+set}
-ac_env_F77_value=$F77
-ac_cv_env_F77_set=${F77+set}
-ac_cv_env_F77_value=$F77
-ac_env_FFLAGS_set=${FFLAGS+set}
-ac_env_FFLAGS_value=$FFLAGS
-ac_cv_env_FFLAGS_set=${FFLAGS+set}
-ac_cv_env_FFLAGS_value=$FFLAGS
-ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
-ac_env_PKG_CONFIG_value=$PKG_CONFIG
-ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
-ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
-ac_env_GTK_CFLAGS_set=${GTK_CFLAGS+set}
-ac_env_GTK_CFLAGS_value=$GTK_CFLAGS
-ac_cv_env_GTK_CFLAGS_set=${GTK_CFLAGS+set}
-ac_cv_env_GTK_CFLAGS_value=$GTK_CFLAGS
-ac_env_GTK_LIBS_set=${GTK_LIBS+set}
-ac_env_GTK_LIBS_value=$GTK_LIBS
-ac_cv_env_GTK_LIBS_set=${GTK_LIBS+set}
-ac_cv_env_GTK_LIBS_value=$GTK_LIBS
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
#
# Report the --help message.
@@ -965,7 +1515,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures pixman 0.12.0 to adapt to many kinds of systems.
+\`configure' configures pixman 0.15.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -985,14 +1535,11 @@ Configuration:
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-_ACEOF
-
- cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1002,18 +1549,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/pixman]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -1031,25 +1585,28 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pixman 0.12.0:";;
+ short | recursive ) echo "Configuration of pixman 0.15.8:";;
esac
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared[=PKGS]
- build shared libraries [default=yes]
- --enable-static[=PKGS]
- build static libraries [default=yes]
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-mmx disable MMX fast paths
--disable-sse2 disable SSE2 fast paths
--disable-vmx disable VMX fast paths
+ --disable-arm-simd disable ARM SIMD fast paths
+ --disable-arm-neon disable ARM NEON fast paths
+ --disable-gcc-inline-asm
+ disable GNU-style inline assembler
--enable-gtk enable tests using GTK+ [default=auto]
Optional Packages:
@@ -1058,16 +1615,16 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-pic try to use only PIC/non-PIC objects [default=use
both]
- --with-tags[=TAGS]
- include additional configurations [automatic]
+ --with-tags[=TAGS] include additional configurations [automatic]
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags
@@ -1083,120 +1640,88 @@ it to find libraries and programs with nonstandard names/locations.
Report bugs to <"sandmann@daimi.au.dk">.
_ACEOF
+ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
done
fi
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pixman configure 0.12.0
-generated by GNU Autoconf 2.59
+pixman configure 0.15.8
+generated by GNU Autoconf 2.62
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
- exit 0
+ exit
fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by pixman $as_me 0.12.0, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+It was created by pixman $as_me 0.15.8, which was
+generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
_ACEOF
+exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -1215,7 +1740,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1227,8 +1752,9 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
+ $as_echo "PATH: $as_dir"
done
+IFS=$as_save_IFS
} >&5
@@ -1250,7 +1776,6 @@ _ACEOF
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
-ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1261,8 +1786,8 @@ do
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
@@ -1283,9 +1808,7 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ ac_configure_args="$ac_configure_args '$ac_arg'"
;;
esac
done
@@ -1296,8 +1819,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
@@ -1310,20 +1833,35 @@ trap 'exit_status=$?
_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
(set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
*)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-}
+ esac |
+ sort
+)
echo
cat <<\_ASBOX
@@ -1334,22 +1872,28 @@ _ASBOX
echo
for ac_var in $ac_subst_vars
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
_ASBOX
echo
for ac_var in $ac_subst_files
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
@@ -1361,26 +1905,24 @@ _ASBOX
## ----------- ##
_ASBOX
echo
- sed "/^$/d" confdefs.h | sort
+ cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
- ' 0
+' 0
for ac_signal in 1 2 13 15; do
trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
# Predefined preprocessor variables.
@@ -1410,18 +1952,24 @@ _ACEOF
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
@@ -1431,54 +1979,61 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -1488,19 +2043,13 @@ echo "$as_me: current value: $ac_new_val" >&2;}
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
@@ -1525,33 +2074,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
am__api_version="1.9"
ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
- elif test -f $ac_dir/install.sh; then
+ elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
- elif test -f $ac_dir/shtool; then
+ elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
{ (exit 1); exit 1; }; }
fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -1566,11 +2126,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -1589,7 +2150,7 @@ case $as_dir/ in
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -1599,30 +2160,43 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
done
;;
esac
+
done
+IFS=$as_save_IFS
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
- # removed, or if the path is relative.
+ # removed, or if the value is a relative name.
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -1633,17 +2207,14 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test "$program_prefix" != NONE &&
- program_transform_name="s,^,$program_prefix,;$program_transform_name"
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1654,8 +2225,8 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
@@ -1695,10 +2266,10 @@ for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -1709,54 +2280,58 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
+ { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$AWK" && break
done
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
all:
- @echo 'ac_maketemp="$(MAKE)"'
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
rm -f conftest.make
fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
SET_MAKE=
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -1772,8 +2347,8 @@ rmdir .tst 2>/dev/null
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1789,7 +2364,7 @@ fi
# Define the identity of the package.
PACKAGE='pixman'
- VERSION='0.12.0'
+ VERSION='0.15.8'
cat >>confdefs.h <<_ACEOF
@@ -1827,10 +2402,10 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
@@ -1841,34 +2416,36 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
+ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
@@ -1879,27 +2456,41 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- STRIP=$ac_ct_STRIP
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
else
STRIP="$ac_cv_prog_STRIP"
fi
@@ -1920,7 +2511,91 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
- ac_config_headers="$ac_config_headers config.h"
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
ac_ext=c
@@ -1931,10 +2606,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1945,34 +2620,36 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1983,38 +2660,53 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2025,76 +2717,36 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
+ fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2106,17 +2758,18 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
@@ -2134,24 +2787,25 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2162,38 +2816,40 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2204,58 +2860,92 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$ac_ct_CC" && break
done
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
@@ -2274,111 +2964,146 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link_default") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
break;;
* )
break;;
esac
done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
else
- echo "$as_me: failed program was:" >&5
+ ac_file=''
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
+$as_echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-# Check the compiler produces executables we can run. If not, either
+# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+ { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
+$as_echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
+# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
@@ -2387,32 +3112,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+ { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2430,39 +3154,46 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2483,50 +3214,54 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2542,38 +3277,121 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_prog_cc_g=no
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2589,12 +3407,12 @@ else
CFLAGS=
fi
fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- ac_cv_prog_cc_stdc=no
+ ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2628,12 +3446,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
+ as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
+ that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2648,205 +3471,58 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
return 0;
}
_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
*)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2854,7 +3530,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
DEPDIR="${am__leading_dot}deps"
- ac_config_commands="$ac_config_commands depfiles"
+ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make}
@@ -2864,8 +3540,8 @@ am__doit:
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
_am_result=none
@@ -2892,15 +3568,15 @@ if test "$am__include" = "#"; then
fi
-echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
rm -f confinc confmf
-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+# Check whether --enable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then
- enableval="$enable_dependency_tracking"
+ enableval=$enable_dependency_tracking;
+fi
-fi;
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
@@ -2920,10 +3596,10 @@ fi
depcc="$CC" am_compiler_list=
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
@@ -3010,8 +3686,8 @@ else
fi
fi
-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
@@ -3027,10 +3703,9 @@ else
fi
-# Check whether --enable-shared or --disable-shared was given.
+# Check whether --enable-shared was given.
if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
+ enableval=$enable_shared; p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
@@ -3049,12 +3724,12 @@ if test "${enable_shared+set}" = set; then
esac
else
enable_shared=yes
-fi;
+fi
+
-# Check whether --enable-static or --disable-static was given.
+# Check whether --enable-static was given.
if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
+ enableval=$enable_static; p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
@@ -3073,12 +3748,12 @@ if test "${enable_static+set}" = set; then
esac
else
enable_static=yes
-fi;
+fi
+
-# Check whether --enable-fast-install or --disable-fast-install was given.
+# Check whether --enable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
+ enableval=$enable_fast_install; p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
@@ -3097,66 +3772,13 @@ if test "${enable_fast_install+set}" = set; then
esac
else
enable_fast_install=yes
-fi;
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
if test "${lt_cv_path_SED+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Loop through the user's path and test for sed and gsed.
# Then use that list of sed's as ones to test for truncation.
@@ -3167,7 +3789,7 @@ do
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
@@ -3209,37 +3831,156 @@ fi
SED=$lt_cv_path_SED
-echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
+{ $as_echo "$as_me:$LINENO: result: $SED" >&5
+$as_echo "$SED" >&6; }
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_GREP=$GREP
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi;
+fi
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -3268,14 +4009,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
else
- echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
fi
if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -3305,19 +4046,19 @@ fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
+ { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
@@ -3329,20 +4070,20 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_ld_reload_flag='-r'
fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
reload_flag=$lt_cv_ld_reload_flag
case $reload_flag in
"" | " "*) ;;
@@ -3359,10 +4100,10 @@ case $host_os in
;;
esac
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+$as_echo_n "checking for BSD-compatible nm... " >&6; }
if test "${lt_cv_path_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$NM"; then
# Let the user override the test.
@@ -3408,25 +4149,25 @@ else
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
-echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
NM="$lt_cv_path_NM"
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
+ { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
fi
-echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
-echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
if test "${lt_cv_deplibs_check_method+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -3609,8 +4350,8 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
esac
fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -3628,11 +4369,11 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
compiler=$CC
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
+ enableval=$enable_libtool_lock;
+fi
-fi;
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
@@ -3644,7 +4385,7 @@ ia64-*-hpux*)
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
@@ -3659,11 +4400,11 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3662 "configure"' > conftest.$ac_ext
+ echo '#line 4403 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
@@ -3701,7 +4442,7 @@ s390*-*linux*|sparc*-*linux*)
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.o` in
*32-bit*)
@@ -3751,10 +4492,10 @@ s390*-*linux*|sparc*-*linux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -3778,35 +4519,36 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_cv_cc_needs_belf=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-lt_cv_cc_needs_belf=no
+ lt_cv_cc_needs_belf=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -3815,8 +4557,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
@@ -3828,7 +4570,7 @@ sparc*-*solaris*)
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.o` in
*64-bit*)
@@ -3857,15 +4599,15 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -3892,35 +4634,35 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
+
rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3930,34 +4672,34 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
+
rm -f conftest.err conftest.$ac_ext
done
@@ -3975,8 +4717,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -3999,35 +4741,35 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
+
rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4037,34 +4779,34 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
+
rm -f conftest.err conftest.$ac_ext
done
@@ -4073,9 +4815,9 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+ { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4087,10 +4829,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4112,35 +4854,32 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_header_stdc=no
+ ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
@@ -4196,6 +4935,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ctype.h>
+#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -4215,36 +4955,50 @@ main ()
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
+ return 2;
+ return 0;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+
+
fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -4266,11 +5020,11 @@ fi
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4283,41 +5037,41 @@ $ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -4328,19 +5082,21 @@ done
for ac_header in dlfcn.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4351,41 +5107,38 @@ $ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4394,101 +5147,106 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
+
rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
## ------------------------------------- ##
## Report this to "sandmann@daimi.au.dk" ##
## ------------------------------------- ##
_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
-ac_ext=cc
+ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
@@ -4499,38 +5257,40 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
- echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
+ { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$CXX" && break
done
fi
if test -z "$CXX"; then
ac_ct_CXX=$CXX
- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
@@ -4541,57 +5301,91 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$ac_ct_CXX" && break
done
-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
- CXX=$ac_ct_CXX
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
fi
-
+ fi
+fi
# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
+$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4612,50 +5406,54 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
-GXX=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
if test "${ac_cv_prog_cxx_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4671,160 +5469,137 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cxx_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_prog_cxx_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
+ CXXFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
+
int
main ()
{
-exit (42);
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_declaration
+
int
main ()
{
-exit (42);
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_ext=cc
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -4832,10 +5607,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
depcc="$CXX" am_compiler_list=
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
@@ -4922,8 +5697,8 @@ else
fi
fi
-echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
@@ -4944,16 +5719,16 @@ fi
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
(test "X$CXX" != "Xg++"))) ; then
- ac_ext=cc
+ ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
if test "${ac_cv_prog_CXXCPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
for CXXCPP in "$CXX -E" "/lib/cpp"
@@ -4980,35 +5755,35 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
+
rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5018,34 +5793,34 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
+
rm -f conftest.err conftest.$ac_ext
done
@@ -5063,8 +5838,8 @@ fi
else
ac_cv_prog_CXXCPP=$CXXCPP
fi
-echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6
+{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
@@ -5087,35 +5862,35 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
+
rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5125,34 +5900,34 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
+
rm -f conftest.err conftest.$ac_ext
done
@@ -5161,14 +5936,14 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+ { { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
-ac_ext=cc
+ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -5182,14 +5957,14 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
- for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$F77"; then
ac_cv_prog_F77="$F77" # Let the user override the test.
@@ -5200,38 +5975,40 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
F77=$ac_cv_prog_F77
if test -n "$F77"; then
- echo "$as_me:$LINENO: result: $F77" >&5
-echo "${ECHO_T}$F77" >&6
+ { $as_echo "$as_me:$LINENO: result: $F77" >&5
+$as_echo "$F77" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$F77" && break
done
fi
if test -z "$F77"; then
ac_ct_F77=$F77
- for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+ for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_F77"; then
ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
@@ -5242,50 +6019,84 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_F77="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
ac_ct_F77=$ac_cv_prog_ac_ct_F77
if test -n "$ac_ct_F77"; then
- echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
-echo "${ECHO_T}$ac_ct_F77" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+$as_echo "$ac_ct_F77" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$ac_ct_F77" && break
done
- F77=$ac_ct_F77
+ if test "x$ac_ct_F77" = x; then
+ F77=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ F77=$ac_ct_F77
+ fi
fi
# Provide some information about the compiler.
-echo "$as_me:5272:" \
- "checking for Fortran 77 compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
+$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
rm -f a.out
@@ -5293,10 +6104,10 @@ rm -f a.out
# input file. (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
-echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
if test "${ac_cv_f77_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
program main
@@ -5307,48 +6118,45 @@ else
end
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_f77_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
ac_ext=$ac_save_ext
ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
-echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+$as_echo_n "checking whether $F77 accepts -g... " >&6; }
if test "${ac_cv_prog_f77_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
FFLAGS=-g
cat >conftest.$ac_ext <<_ACEOF
@@ -5357,39 +6165,36 @@ cat >conftest.$ac_ext <<_ACEOF
end
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_f77_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_f77_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_prog_f77_g=no
+ ac_cv_prog_f77_g=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+$as_echo "$ac_cv_prog_f77_g" >&6; }
if test "$ac_test_FFLAGS" = set; then
FFLAGS=$ac_save_FFLAGS
elif test $ac_cv_prog_f77_g = yes; then
@@ -5406,7 +6211,11 @@ else
fi
fi
-G77=`test $ac_compiler_gnu = yes && echo yes`
+if test $ac_compiler_gnu = yes; then
+ G77=yes
+else
+ G77=
+fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5417,10 +6226,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
i=0
teststring="ABCD"
@@ -5529,11 +6338,11 @@ else
fi
if test -n $lt_cv_sys_max_cmd_len ; then
- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+ { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
else
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
+ { $as_echo "$as_me:$LINENO: result: none" >&5
+$as_echo "none" >&6; }
fi
@@ -5541,10 +6350,10 @@ fi
# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# These are sane defaults that work on at least a few old systems.
@@ -5649,14 +6458,14 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Now try to grab the symbols.
nlist=conftest.nm
if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
(eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -5711,7 +6520,7 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -5746,17 +6555,17 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6
+ { $as_echo "$as_me:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
else
- echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
+ { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
fi
-echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
if test "${lt_cv_objdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
@@ -5768,8 +6577,8 @@ else
fi
rmdir .libs 2>/dev/null
fi
-echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
objdir=$lt_cv_objdir
@@ -5820,10 +6629,10 @@ with_gnu_ld="$lt_cv_prog_gnu_ld"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -5834,34 +6643,36 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
+ { $as_echo "$as_me:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -5872,27 +6683,41 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
- test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- AR=$ac_ct_AR
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
else
AR="$ac_cv_prog_AR"
fi
@@ -5900,10 +6725,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -5914,34 +6739,36 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+ { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -5952,27 +6779,41 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- RANLIB=$ac_ct_RANLIB
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
else
RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -5980,10 +6821,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
@@ -5994,34 +6835,36 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
+ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
@@ -6032,27 +6875,41 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- STRIP=$ac_ct_STRIP
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
else
STRIP="$ac_cv_prog_STRIP"
fi
@@ -6111,10 +6968,10 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
@@ -6164,19 +7021,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
+ { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
@@ -6226,11 +7083,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
+ { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
else
@@ -6248,10 +7105,10 @@ esac
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$DSYMUTIL"; then
ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
@@ -6262,34 +7119,36 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
DSYMUTIL=$ac_cv_prog_DSYMUTIL
if test -n "$DSYMUTIL"; then
- echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
-echo "${ECHO_T}$DSYMUTIL" >&6
+ { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_DSYMUTIL"; then
ac_ct_DSYMUTIL=$DSYMUTIL
# Extract the first word of "dsymutil", so it can be a program name with args.
set dummy dsymutil; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_DSYMUTIL"; then
ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
@@ -6300,27 +7159,41 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
- test -z "$ac_cv_prog_ac_ct_DSYMUTIL" && ac_cv_prog_ac_ct_DSYMUTIL=":"
fi
fi
ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
if test -n "$ac_ct_DSYMUTIL"; then
- echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
-echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- DSYMUTIL=$ac_ct_DSYMUTIL
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
else
DSYMUTIL="$ac_cv_prog_DSYMUTIL"
fi
@@ -6328,10 +7201,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_NMEDIT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$NMEDIT"; then
ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
@@ -6342,34 +7215,36 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
NMEDIT=$ac_cv_prog_NMEDIT
if test -n "$NMEDIT"; then
- echo "$as_me:$LINENO: result: $NMEDIT" >&5
-echo "${ECHO_T}$NMEDIT" >&6
+ { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_NMEDIT"; then
ac_ct_NMEDIT=$NMEDIT
# Extract the first word of "nmedit", so it can be a program name with args.
set dummy nmedit; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_NMEDIT"; then
ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
@@ -6380,36 +7255,50 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
- test -z "$ac_cv_prog_ac_ct_NMEDIT" && ac_cv_prog_ac_ct_NMEDIT=":"
fi
fi
ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
if test -n "$ac_ct_NMEDIT"; then
- echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
-echo "${ECHO_T}$ac_ct_NMEDIT" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- NMEDIT=$ac_ct_NMEDIT
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
else
NMEDIT="$ac_cv_prog_NMEDIT"
fi
- echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
-echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
if test "${lt_cv_apple_cc_single_mod+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_apple_cc_single_mod=no
if test -z "${LT_MULTI_MODULE}"; then
@@ -6427,12 +7316,12 @@ else
rm conftest.c
fi
fi
-echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
-echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6
- echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
-echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_ld_exported_symbols_list=no
save_LDFLAGS=$LDFLAGS
@@ -6454,41 +7343,42 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_cv_ld_exported_symbols_list=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-lt_cv_ld_exported_symbols_list=no
+ lt_cv_ld_exported_symbols_list=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
-echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
case $host_os in
rhapsody* | darwin1.[0123])
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
@@ -6528,21 +7418,21 @@ echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6
enable_dlopen=no
enable_win32_dll=no
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
+ enableval=$enable_libtool_lock;
+fi
-fi;
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-# Check whether --with-pic or --without-pic was given.
+# Check whether --with-pic was given.
if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
+ withval=$with_pic; pic_mode="$withval"
else
pic_mode=default
-fi;
+fi
+
test -z "$pic_mode" && pic_mode=default
# Use C for the default configuration in the libtool script
@@ -6600,10 +7490,10 @@ if test "$GCC" = yes; then
lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
@@ -6618,11 +7508,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6621: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7511: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6625: \$? = $ac_status" >&5
+ echo "$as_me:7515: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6635,8 +7525,8 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -6650,8 +7540,8 @@ lt_prog_compiler_wl=
lt_prog_compiler_pic=
lt_prog_compiler_static=
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
@@ -6882,18 +7772,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
@@ -6908,11 +7798,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6911: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7801: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6915: \$? = $ac_status" >&5
+ echo "$as_me:7805: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6925,8 +7815,8 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
case $lt_prog_compiler_pic in
@@ -6953,10 +7843,10 @@ esac
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
if test "${lt_cv_prog_compiler_static_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works=no
save_LDFLAGS="$LDFLAGS"
@@ -6981,8 +7871,8 @@ else
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
if test x"$lt_cv_prog_compiler_static_works" = xyes; then
:
@@ -6991,10 +7881,10 @@ else
fi
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test "${lt_cv_prog_compiler_c_o+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o=no
$rm -r conftest 2>/dev/null
@@ -7012,11 +7902,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7015: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7905: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7019: \$? = $ac_status" >&5
+ echo "$as_me:7909: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7038,34 +7928,34 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
+ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag=
@@ -7490,27 +8380,26 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -7525,11 +8414,14 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -7558,27 +8450,26 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -7593,11 +8484,14 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -8048,8 +8942,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
fi
-echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
test "$ld_shlibs" = no && can_build_shared=no
#
@@ -8069,15 +8963,15 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
$rm conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -8095,7 +8989,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc=no
@@ -8107,16 +9001,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
cat conftest.err 1>&5
fi
$rm conftest*
- echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
;;
esac
fi
;;
esac
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -8717,19 +9611,19 @@ uts4*)
dynamic_linker=no
;;
esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
fi
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
fi
@@ -8741,8 +9635,8 @@ if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \
test -n "$runpath_var" || \
@@ -8766,8 +9660,8 @@ else
# directories.
hardcode_action=unsupported
fi
-echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
if test "$hardcode_action" = relink; then
# Fast installation is not supported
@@ -8780,13 +9674,13 @@ fi
striplib=
old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
@@ -8794,16 +9688,16 @@ else
if test -n "$STRIP" ; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
;;
*)
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
;;
esac
fi
@@ -8835,10 +9729,10 @@ else
darwin*)
# if libdl is installed we need to link against it
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
@@ -8849,56 +9743,57 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char dlopen ();
int
main ()
{
-dlopen ();
+return dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dl_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_dl_dlopen=no
+ ac_cv_lib_dl_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test $ac_cv_lib_dl_dlopen = yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
@@ -8912,10 +9807,10 @@ fi
;;
*)
- echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
+$as_echo_n "checking for shl_load... " >&6; }
if test "${ac_cv_func_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -8940,75 +9835,70 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef shl_load
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char shl_load ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
+#if defined __stub_shl_load || defined __stub___shl_load
choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != shl_load;
+return shl_load ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_shl_load=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_shl_load=no
+ ac_cv_func_shl_load=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+$as_echo "$ac_cv_func_shl_load" >&6; }
if test $ac_cv_func_shl_load = yes; then
lt_cv_dlopen="shl_load"
else
- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
@@ -9019,63 +9909,64 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char shl_load ();
int
main ()
{
-shl_load ();
+return shl_load ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dld_shl_load=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_dld_shl_load=no
+ ac_cv_lib_dld_shl_load=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
if test $ac_cv_lib_dld_shl_load = yes; then
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else
- echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
+$as_echo_n "checking for dlopen... " >&6; }
if test "${ac_cv_func_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -9100,75 +9991,70 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef dlopen
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char dlopen ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
+#if defined __stub_dlopen || defined __stub___dlopen
choke me
-#else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != dlopen;
+return dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_dlopen=no
+ ac_cv_func_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+$as_echo "$ac_cv_func_dlopen" >&6; }
if test $ac_cv_func_dlopen = yes; then
lt_cv_dlopen="dlopen"
else
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
@@ -9179,63 +10065,64 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char dlopen ();
int
main ()
{
-dlopen ();
+return dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dl_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_dl_dlopen=no
+ ac_cv_lib_dl_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test $ac_cv_lib_dl_dlopen = yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
if test "${ac_cv_lib_svld_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
@@ -9246,63 +10133,64 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char dlopen ();
int
main ()
{
-dlopen ();
+return dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_svld_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_svld_dlopen=no
+ ac_cv_lib_svld_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
if test $ac_cv_lib_svld_dlopen = yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
if test "${ac_cv_lib_dld_dld_link+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
@@ -9313,56 +10201,57 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char dld_link ();
int
main ()
{
-dld_link ();
+return dld_link ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_dld_dld_link=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_dld_dld_link=no
+ ac_cv_lib_dld_dld_link=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
if test $ac_cv_lib_dld_dld_link = yes; then
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
fi
@@ -9402,10 +10291,10 @@ fi
save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
if test "${lt_cv_dlopen_self+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self=cross
@@ -9413,7 +10302,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9416 "configure"
+#line 10305 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9479,7 +10368,7 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -9497,15 +10386,15 @@ rm -fr conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
if test "x$lt_cv_dlopen_self" = xyes; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
if test "${lt_cv_dlopen_self_static+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self_static=cross
@@ -9513,7 +10402,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9516 "configure"
+#line 10405 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9579,7 +10468,7 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -9597,8 +10486,8 @@ rm -fr conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
CPPFLAGS="$save_CPPFLAGS"
@@ -9620,13 +10509,13 @@ fi
# Report which library types will actually be built
-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
+{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -9646,15 +10535,15 @@ aix[4-9]*)
fi
;;
esac
-echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
+{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
-echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
+{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
@@ -9747,8 +10636,8 @@ if test -f "$ltmain"; then
cfgfile="${ofile}T"
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
$rm -f "$cfgfile"
- { echo "$as_me:$LINENO: creating $ofile" >&5
-echo "$as_me: creating $ofile" >&6;}
+ { $as_echo "$as_me:$LINENO: creating $ofile" >&5
+$as_echo "$as_me: creating $ofile" >&6;}
cat <<__EOF__ >> "$cfgfile"
#! $SHELL
@@ -10152,26 +11041,26 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
CC="$lt_save_CC"
-# Check whether --with-tags or --without-tags was given.
+# Check whether --with-tags was given.
if test "${with_tags+set}" = set; then
- withval="$with_tags"
- tagnames="$withval"
-fi;
+ withval=$with_tags; tagnames="$withval"
+fi
+
if test -f "$ltmain" && test -n "$tagnames"; then
if test ! -f "${ofile}"; then
- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+$as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
fi
if test -z "$LTCC"; then
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
if test -z "$LTCC"; then
- { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+$as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
else
- { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+$as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
fi
fi
if test -z "$LTCFLAGS"; then
@@ -10188,16 +11077,16 @@ echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
# Check whether tagname contains only valid characters
case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
"") ;;
- *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
-echo "$as_me: error: invalid tag name: $tagname" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+$as_echo "$as_me: error: invalid tag name: $tagname" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
then
- { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+$as_echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -10210,7 +11099,7 @@ echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
(test "X$CXX" != "Xg++"))) ; then
- ac_ext=cc
+ ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -10330,18 +11219,18 @@ if test "$GXX" = yes; then
# Set up default GNU C++ configuration
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
+# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi;
+fi
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -10370,14 +11259,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
else
- echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
fi
if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -10407,19 +11296,19 @@ fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
+ { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
@@ -10431,8 +11320,8 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -10482,8 +11371,8 @@ else
fi
# PORTME: fill in a description of your system's C++ link characteristics
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
ld_shlibs_CXX=yes
case $host_os in
aix3*)
@@ -10595,27 +11484,26 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -10630,11 +11518,14 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -10664,27 +11555,26 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -10699,11 +11589,14 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -11432,8 +12325,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs_CXX=no
;;
esac
-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
test "$ld_shlibs_CXX" = no && can_build_shared=no
GCC_CXX="$GXX"
@@ -11452,7 +12345,7 @@ EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Parse the compiler output and extract the necessary
# objects, libraries and library flags.
@@ -11608,8 +12501,8 @@ lt_prog_compiler_wl_CXX=
lt_prog_compiler_pic_CXX=
lt_prog_compiler_static_CXX=
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
# C++ specific cases for pic, static, wl, etc.
if test "$GXX" = yes; then
@@ -11892,18 +12785,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic_CXX"; then
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
@@ -11918,11 +12811,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11921: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12814: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11925: \$? = $ac_status" >&5
+ echo "$as_me:12818: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11935,8 +12828,8 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
case $lt_prog_compiler_pic_CXX in
@@ -11963,10 +12856,10 @@ esac
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_CXX=no
save_LDFLAGS="$LDFLAGS"
@@ -11991,8 +12884,8 @@ else
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
:
@@ -12001,10 +12894,10 @@ else
fi
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_CXX=no
$rm -r conftest 2>/dev/null
@@ -12022,11 +12915,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12025: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12918: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12029: \$? = $ac_status" >&5
+ echo "$as_me:12922: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12048,34 +12941,34 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
+ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
@@ -12100,8 +12993,8 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
esac
exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
test "$ld_shlibs_CXX" = no && can_build_shared=no
#
@@ -12121,15 +13014,15 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
$rm conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -12147,7 +13040,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc_CXX=no
@@ -12159,16 +13052,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
cat conftest.err 1>&5
fi
$rm conftest*
- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
;;
esac
fi
;;
esac
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -12717,19 +13610,19 @@ uts4*)
dynamic_linker=no
;;
esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
fi
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
fi
@@ -12741,8 +13634,8 @@ if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_CXX=
if test -n "$hardcode_libdir_flag_spec_CXX" || \
test -n "$runpath_var_CXX" || \
@@ -12766,8 +13659,8 @@ else
# directories.
hardcode_action_CXX=unsupported
fi
-echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
if test "$hardcode_action_CXX" = relink; then
# Fast installation is not supported
@@ -13305,13 +14198,13 @@ done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
+{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -13330,15 +14223,15 @@ aix[4-9]*)
fi
;;
esac
-echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
+{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
-echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
+{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
GCC_F77="$G77"
LD_F77="$LD"
@@ -13347,8 +14240,8 @@ lt_prog_compiler_wl_F77=
lt_prog_compiler_pic_F77=
lt_prog_compiler_static_F77=
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
if test "$GCC" = yes; then
lt_prog_compiler_wl_F77='-Wl,'
@@ -13579,18 +14472,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+$as_echo "$lt_prog_compiler_pic_F77" >&6; }
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic_F77"; then
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; }
if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_works_F77=no
ac_outfile=conftest.$ac_objext
@@ -13605,11 +14498,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13608: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14501: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13612: \$? = $ac_status" >&5
+ echo "$as_me:14505: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13622,8 +14515,8 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; }
if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
case $lt_prog_compiler_pic_F77 in
@@ -13650,10 +14543,10 @@ esac
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_F77=no
save_LDFLAGS="$LDFLAGS"
@@ -13678,8 +14571,8 @@ else
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; }
if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
:
@@ -13688,10 +14581,10 @@ else
fi
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_F77=no
$rm -r conftest 2>/dev/null
@@ -13709,11 +14602,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13712: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14605: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13716: \$? = $ac_status" >&5
+ echo "$as_me:14609: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13735,34 +14628,34 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
+ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag_F77=
@@ -14177,27 +15070,26 @@ _LT_EOF
end
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_f77_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -14212,11 +15104,14 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -14235,27 +15130,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
end
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_f77_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -14270,11 +15164,14 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -14725,8 +15622,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
fi
-echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
-echo "${ECHO_T}$ld_shlibs_F77" >&6
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+$as_echo "$ld_shlibs_F77" >&6; }
test "$ld_shlibs_F77" = no && can_build_shared=no
#
@@ -14746,15 +15643,15 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
$rm conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -14772,7 +15669,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc_F77=no
@@ -14784,16 +15681,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
cat conftest.err 1>&5
fi
$rm conftest*
- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+$as_echo "$archive_cmds_need_lc_F77" >&6; }
;;
esac
fi
;;
esac
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -15342,19 +16239,19 @@ uts4*)
dynamic_linker=no
;;
esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
fi
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
fi
@@ -15366,8 +16263,8 @@ if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_F77=
if test -n "$hardcode_libdir_flag_spec_F77" || \
test -n "$runpath_var_F77" || \
@@ -15391,8 +16288,8 @@ else
# directories.
hardcode_action_F77=unsupported
fi
-echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
-echo "${ECHO_T}$hardcode_action_F77" >&6
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+$as_echo "$hardcode_action_F77" >&6; }
if test "$hardcode_action_F77" = relink; then
# Fast installation is not supported
@@ -15835,7 +16732,6 @@ CC="$lt_save_CC"
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-
# Source file extension for Java test sources.
ac_ext=java
@@ -15903,10 +16799,10 @@ if test "$GCC" = yes; then
lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
@@ -15921,11 +16817,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15924: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16820: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15928: \$? = $ac_status" >&5
+ echo "$as_me:16824: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15938,8 +16834,8 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
@@ -15953,8 +16849,8 @@ lt_prog_compiler_wl_GCJ=
lt_prog_compiler_pic_GCJ=
lt_prog_compiler_static_GCJ=
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
if test "$GCC" = yes; then
lt_prog_compiler_wl_GCJ='-Wl,'
@@ -16185,18 +17081,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+$as_echo "$lt_prog_compiler_pic_GCJ" >&6; }
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic_GCJ"; then
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; }
if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_works_GCJ=no
ac_outfile=conftest.$ac_objext
@@ -16211,11 +17107,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16214: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17110: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16218: \$? = $ac_status" >&5
+ echo "$as_me:17114: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16228,8 +17124,8 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; }
if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then
case $lt_prog_compiler_pic_GCJ in
@@ -16256,10 +17152,10 @@ esac
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_GCJ=no
save_LDFLAGS="$LDFLAGS"
@@ -16284,8 +17180,8 @@ else
LDFLAGS="$save_LDFLAGS"
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; }
if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then
:
@@ -16294,10 +17190,10 @@ else
fi
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_GCJ=no
$rm -r conftest 2>/dev/null
@@ -16315,11 +17211,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16318: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17214: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16322: \$? = $ac_status" >&5
+ echo "$as_me:17218: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16341,34 +17237,34 @@ else
$rm conftest*
fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; }
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
+ { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag_GCJ=
@@ -16793,27 +17689,26 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -16828,11 +17723,14 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -16861,27 +17759,26 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -16896,11 +17793,14 @@ if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
@@ -17351,8 +18251,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
fi
-echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
-echo "${ECHO_T}$ld_shlibs_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+$as_echo "$ld_shlibs_GCJ" >&6; }
test "$ld_shlibs_GCJ" = no && can_build_shared=no
#
@@ -17372,15 +18272,15 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
$rm conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -17398,7 +18298,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc_GCJ=no
@@ -17410,16 +18310,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
cat conftest.err 1>&5
fi
$rm conftest*
- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+$as_echo "$archive_cmds_need_lc_GCJ" >&6; }
;;
esac
fi
;;
esac
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -17968,19 +18868,19 @@ uts4*)
dynamic_linker=no
;;
esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
fi
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
fi
@@ -17992,8 +18892,8 @@ if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_GCJ=
if test -n "$hardcode_libdir_flag_spec_GCJ" || \
test -n "$runpath_var_GCJ" || \
@@ -18017,8 +18917,8 @@ else
# directories.
hardcode_action_GCJ=unsupported
fi
-echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
-echo "${ECHO_T}$hardcode_action_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+$as_echo "$hardcode_action_GCJ" >&6; }
if test "$hardcode_action_GCJ" = relink; then
# Fast installation is not supported
@@ -18460,7 +19360,6 @@ CC="$lt_save_CC"
RC)
-
# Source file extension for RC test sources.
ac_ext=rc
@@ -18942,8 +19841,8 @@ CC="$lt_save_CC"
;;
*)
- { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
-echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+$as_echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
@@ -18962,8 +19861,8 @@ echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
chmod +x "$ofile"
else
rm -f "${ofile}T"
- { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
-echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+$as_echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -19000,11 +19899,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
for ac_func in getisax
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -19029,242 +19928,386 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != $ac_func;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+
+ { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_c_bigendian=unknown
+ # See if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if ! (defined __BIG_ENDIAN__ || defined __LITTLE_ENDIAN__)
+ neither is defined;
+ #endif
+ typedef int dummy;
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_bigendian=universal
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/param.h>
+ #include <sys/param.h>
int
main ()
{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
# It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/param.h>
+ #include <sys/param.h>
int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
+ not big endian
+ #endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_c_bigendian=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_c_bigendian=no
+ ac_cv_c_bigendian=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
- # try to guess the endianness by grepping values into an object file
- ac_cv_c_bigendian=unknown
- cat >conftest.$ac_ext <<_ACEOF
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+#include <limits.h>
+
int
main ()
{
- _ascii (); _ebcdic ();
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_c_bigendian=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_bigendian=no
fi
-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then
+ # Try to guess by grepping values from an object file.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -19272,67 +20315,86 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+$ac_includes_default
int
main ()
{
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_bigendian=no
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_c_bigendian=yes
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
- yes)
-cat >>confdefs.h <<\_ACEOF
+
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ cat >>confdefs.h <<\_ACEOF
#define WORDS_BIGENDIAN 1
_ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+;; #(
+ no)
+ ;; #(
+ universal)
+ ;; #(
+ *)
+ { { $as_echo "$as_me:$LINENO: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+$as_echo "$as_me: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
{ (exit 1); exit 1; }; } ;;
-esac
+ esac
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
if test "${ac_cv_c_inline+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
@@ -19350,39 +20412,38 @@ $ac_kw foo_t foo () {return 0; }
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
-else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_inline=$ac_kw
+else
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
done
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
@@ -19400,6 +20461,127 @@ _ACEOF
;;
esac
+
+# Checks for Sun Studio compilers
+{ $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
+$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
+if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __SUNPRO_C
+ (void) __SUNPRO_C;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___SUNPRO_C=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___SUNPRO_C=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
+$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
+if test $ac_cv_have_decl___SUNPRO_C = yes; then
+ SUNCC="yes"
+else
+ SUNCC="no"
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether __amd64 is declared" >&5
+$as_echo_n "checking whether __amd64 is declared... " >&6; }
+if test "${ac_cv_have_decl___amd64+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __amd64
+ (void) __amd64;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___amd64=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___amd64=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___amd64" >&5
+$as_echo "$ac_cv_have_decl___amd64" >&6; }
+if test $ac_cv_have_decl___amd64 = yes; then
+ AMD64_ABI="yes"
+else
+ AMD64_ABI="no"
+fi
+
+
#
# We ignore pixman_major in the version here because the major version should
# always be encoded in the actual library name. Ie., the soname is:
@@ -19410,13 +20592,13 @@ esac
-LT_VERSION_INFO="12:0:12"
+LT_VERSION_INFO="15:8:15"
PIXMAN_VERSION_MAJOR=0
-PIXMAN_VERSION_MINOR=12
+PIXMAN_VERSION_MINOR=15
-PIXMAN_VERSION_MICRO=0
+PIXMAN_VERSION_MICRO=8
@@ -19431,10 +20613,10 @@ if test "x$GCC" = "xyes"; then
esac fi
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PERL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $PERL in
[\\/]* | ?:[\\/]*)
@@ -19447,39 +20629,40 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
;;
esac
fi
PERL=$ac_cv_path_PERL
-
if test -n "$PERL"; then
- echo "$as_me:$LINENO: result: $PERL" >&5
-echo "${ECHO_T}$PERL" >&6
+ { $as_echo "$as_me:$LINENO: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
if test "x$PERL" = xno; then
- { { echo "$as_me:$LINENO: error: Perl is required to build pixman." >&5
-echo "$as_me: error: Perl is required to build pixman." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: Perl is required to build pixman." >&5
+$as_echo "$as_me: error: Perl is required to build pixman." >&2;}
{ (exit 1); exit 1; }; }
fi
have_gcc4=no
-echo "$as_me:$LINENO: checking for -fvisibility" >&5
-echo $ECHO_N "checking for -fvisibility... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for -fvisibility" >&5
+$as_echo_n "checking for -fvisibility... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
#if defined(__GNUC__) && (__GNUC__ >= 4)
@@ -19490,44 +20673,42 @@ int main () { return 0; }
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
have_gcc4=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "x$have_gcc4" = "xyes"; then
CFLAGS="$CFLAGS -fvisibility=hidden"
fi
-echo "$as_me:$LINENO: result: $have_gcc4" >&5
-echo "${ECHO_T}$have_gcc4" >&6
+{ $as_echo "$as_me:$LINENO: result: $have_gcc4" >&5
+$as_echo "$have_gcc4" >&6; }
have_sunstudio8=no
-echo "$as_me:$LINENO: checking for -xldscope (Sun compilers)" >&5
-echo $ECHO_N "checking for -xldscope (Sun compilers)... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for -xldscope (Sun compilers)" >&5
+$as_echo_n "checking for -xldscope (Sun compilers)... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
@@ -19538,53 +20719,62 @@ int main () { return 0; }
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
have_sunstudio8=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "x$have_sunstudio8" = "xyes"; then
CFLAGS="$CFLAGS -xldscope=hidden"
fi
-echo "$as_me:$LINENO: result: $have_sunstudio8" >&5
-echo "${ECHO_T}$have_sunstudio8" >&6
+{ $as_echo "$as_me:$LINENO: result: $have_sunstudio8" >&5
+$as_echo "$have_sunstudio8" >&6; }
-MMX_CFLAGS="-mmmx -Winline"
+if test "x$MMX_CFLAGS" = "x" ; then
+ if test "x$SUNCC" = "xyes"; then
+ # Sun Studio doesn't have an -xarch=mmx flag, so we have to use sse
+ # but if we're building 64-bit, mmx & sse support is on by default and
+ # -xarch=sse throws an error instead
+ if test "$AMD64_ABI" = "no" ; then
+ MMX_CFLAGS="-xarch=sse"
+ fi
+ else
+ MMX_CFLAGS="-mmmx -Winline"
+ fi
+fi
have_mmx_intrinsics=no
-echo "$as_me:$LINENO: checking whether to use MMX intrinsics" >&5
-echo $ECHO_N "checking whether to use MMX intrinsics... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether to use MMX intrinsics" >&5
+$as_echo_n "checking whether to use MMX intrinsics... " >&6; }
xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $MMX_CFLAGS"
+CFLAGS="$MMX_CFLAGS $CFLAGS"
cat >conftest.$ac_ext <<_ACEOF
-#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3))
-error "Need GCC >= 3.3 for MMX intrinsics"
+#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
+error "Need GCC >= 3.4 for MMX intrinsics"
#endif
#include <mmintrin.h>
int main () {
@@ -19593,43 +20783,41 @@ int main () {
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
have_mmx_intrinsics=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS=$xserver_save_CFLAGS
-# Check whether --enable-mmx or --disable-mmx was given.
+# Check whether --enable-mmx was given.
if test "${enable_mmx+set}" = set; then
- enableval="$enable_mmx"
- enable_mmx=$enableval
+ enableval=$enable_mmx; enable_mmx=$enableval
else
enable_mmx=auto
-fi;
+fi
+
if test $enable_mmx = no ; then
have_mmx_intrinsics=disabled
@@ -19645,11 +20833,11 @@ else
MMX_CFLAGS=
fi
-echo "$as_me:$LINENO: result: $have_mmx_intrinsics" >&5
-echo "${ECHO_T}$have_mmx_intrinsics" >&6
+{ $as_echo "$as_me:$LINENO: result: $have_mmx_intrinsics" >&5
+$as_echo "$have_mmx_intrinsics" >&6; }
if test $enable_mmx = yes && test $have_mmx_intrinsics = no ; then
- { { echo "$as_me:$LINENO: error: MMX intrinsics not detected" >&5
-echo "$as_me: error: MMX intrinsics not detected" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: MMX intrinsics not detected" >&5
+$as_echo "$as_me: error: MMX intrinsics not detected" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -19665,13 +20853,22 @@ fi
-SSE2_CFLAGS="-mmmx -msse2 -Winline"
+if test "x$SSE2_CFLAGS" = "x" ; then
+ if test "x$SUNCC" = "xyes"; then
+ # SSE2 is enabled by default in the Sun Studio 64-bit environment
+ if test "$AMD64_ABI" = "no" ; then
+ SSE2_CFLAGS="-xarch=sse2"
+ fi
+ else
+ SSE2_CFLAGS="-mmmx -msse2 -Winline"
+ fi
+fi
have_sse2_intrinsics=no
-echo "$as_me:$LINENO: checking whether to use SSE2 intrinsics" >&5
-echo $ECHO_N "checking whether to use SSE2 intrinsics... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether to use SSE2 intrinsics" >&5
+$as_echo_n "checking whether to use SSE2 intrinsics... " >&6; }
xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -msse2 $SSE2_CFLAGS"
+CFLAGS="$SSE2_CFLAGS $CFLAGS"
cat >conftest.$ac_ext <<_ACEOF
@@ -19690,43 +20887,41 @@ int main () {
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
have_sse2_intrinsics=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS=$xserver_save_CFLAGS
-# Check whether --enable-sse2 or --disable-sse2 was given.
+# Check whether --enable-sse2 was given.
if test "${enable_sse2+set}" = set; then
- enableval="$enable_sse2"
- enable_sse2=$enableval
+ enableval=$enable_sse2; enable_sse2=$enableval
else
enable_sse2=auto
-fi;
+fi
+
if test $enable_sse2 = no ; then
have_sse2_intrinsics=disabled
@@ -19740,11 +20935,11 @@ _ACEOF
fi
-echo "$as_me:$LINENO: result: $have_sse2_intrinsics" >&5
-echo "${ECHO_T}$have_sse2_intrinsics" >&6
+{ $as_echo "$as_me:$LINENO: result: $have_sse2_intrinsics" >&5
+$as_echo "$have_sse2_intrinsics" >&6; }
if test $enable_sse2 = yes && test $have_sse2_intrinsics = no ; then
- { { echo "$as_me:$LINENO: error: SSE2 intrinsics not detected" >&5
-echo "$as_me: error: SSE2 intrinsics not detected" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: SSE2 intrinsics not detected" >&5
+$as_echo "$as_me: error: SSE2 intrinsics not detected" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -19759,6 +20954,25 @@ else
fi
+case $host_os in
+ solaris*)
+ # When building 32-bit binaries, apply a mapfile to ensure that the
+ # binaries aren't flagged as only able to run on MMX+SSE capable CPUs
+ # since they check at runtime before using those instructions
+ if test "$AMD64_ABI" = "no" ; then
+ HWCAP_LDFLAGS='-Wl,-M,$(srcdir)/solaris-hwcap.mapfile'
+ fi
+ if test "x$MMX_LDFLAGS" = "x" ; then
+ MMX_LDFLAGS="$HWCAP_LDFLAGS"
+ fi
+ if test "x$SSE2_LDFLAGS" = "x" ; then
+ SSE2_LDFLAGS="$HWCAP_LDFLAGS"
+ fi
+ ;;
+esac
+
+
+
@@ -19769,8 +20983,8 @@ else
fi
have_vmx_intrinsics=no
-echo "$as_me:$LINENO: checking whether to use VMX/Altivec intrinsics" >&5
-echo $ECHO_N "checking whether to use VMX/Altivec intrinsics... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether to use VMX/Altivec intrinsics" >&5
+$as_echo_n "checking whether to use VMX/Altivec intrinsics... " >&6; }
xserver_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $VMX_CFLAGS"
cat >conftest.$ac_ext <<_ACEOF
@@ -19786,43 +21000,41 @@ int main () {
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
have_vmx_intrinsics=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS=$xserver_save_CFLAGS
-# Check whether --enable-vmx or --disable-vmx was given.
+# Check whether --enable-vmx was given.
if test "${enable_vmx+set}" = set; then
- enableval="$enable_vmx"
- enable_vmx=$enableval
+ enableval=$enable_vmx; enable_vmx=$enableval
else
enable_vmx=auto
-fi;
+fi
+
if test $enable_vmx = no ; then
have_vmx_intrinsics=disabled
@@ -19838,11 +21050,11 @@ else
VMX_CFLAGS=
fi
-echo "$as_me:$LINENO: result: $have_vmx_intrinsics" >&5
-echo "${ECHO_T}$have_vmx_intrinsics" >&6
+{ $as_echo "$as_me:$LINENO: result: $have_vmx_intrinsics" >&5
+$as_echo "$have_vmx_intrinsics" >&6; }
if test $enable_vmx = yes && test $have_vmx_intrinsics = no ; then
- { { echo "$as_me:$LINENO: error: VMX intrinsics not detected" >&5
-echo "$as_me: error: VMX intrinsics not detected" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: VMX intrinsics not detected" >&5
+$as_echo "$as_me: error: VMX intrinsics not detected" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -19859,13 +21071,265 @@ else
fi
-# Check whether --enable-gtk or --disable-gtk was given.
+ARM_SIMD_CFLAGS=""
+
+have_arm_simd=no
+{ $as_echo "$as_me:$LINENO: checking whether to use ARM SIMD assembler" >&5
+$as_echo_n "checking whether to use ARM SIMD assembler... " >&6; }
+xserver_save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS $ARM_SIMD_CFLAGS"
+cat >conftest.$ac_ext <<_ACEOF
+
+int main () {
+ asm("uqadd8 r1, r1, r2");
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ have_arm_simd=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS=$xserver_save_CFLAGS
+
+# Check whether --enable-arm-simd was given.
+if test "${enable_arm_simd+set}" = set; then
+ enableval=$enable_arm_simd; enable_arm_simd=$enableval
+else
+ enable_arm_simd=auto
+fi
+
+
+if test $enable_arm_simd = no ; then
+ have_arm_simd=disabled
+fi
+
+if test $have_arm_simd = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_ARM_SIMD 1
+_ACEOF
+
+else
+ ARM_SIMD_CFLAGS=
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $have_arm_simd" >&5
+$as_echo "$have_arm_simd" >&6; }
+if test $enable_arm_simd = yes && test $have_arm_simd = no ; then
+ { { $as_echo "$as_me:$LINENO: error: ARM SIMD intrinsics not detected" >&5
+$as_echo "$as_me: error: ARM SIMD intrinsics not detected" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ARM_NEON_CFLAGS="-mfpu=neon -mfloat-abi=softfp"
+
+have_arm_neon=no
+{ $as_echo "$as_me:$LINENO: checking whether to use ARM NEON" >&5
+$as_echo_n "checking whether to use ARM NEON... " >&6; }
+xserver_save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS $ARM_NEON_CFLAGS"
+cat >conftest.$ac_ext <<_ACEOF
+
+#include <arm_neon.h>
+int main () {
+ uint8x8_t neon_test=vmov_n_u8(0);
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ have_arm_neon=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS=$xserver_save_CFLAGS
+
+# Check whether --enable-arm-neon was given.
+if test "${enable_arm_neon+set}" = set; then
+ enableval=$enable_arm_neon; enable_arm_neon=$enableval
+else
+ enable_arm_neon=auto
+fi
+
+
+if test $enable_arm_neon = no ; then
+ have_arm_neon=disabled
+fi
+
+if test $have_arm_neon = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_ARM_NEON 1
+_ACEOF
+
+else
+ ARM_NEON_CFLAGS=
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $have_arm_neon" >&5
+$as_echo "$have_arm_neon" >&6; }
+if test $enable_arm_neon = yes && test $have_arm_neon = no ; then
+ { { $as_echo "$as_me:$LINENO: error: ARM NEON intrinsics not detected" >&5
+$as_echo "$as_me: error: ARM NEON intrinsics not detected" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+have_gcc_inline_asm=no
+{ $as_echo "$as_me:$LINENO: checking whether to use GNU-style inline assembler" >&5
+$as_echo_n "checking whether to use GNU-style inline assembler... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+
+int main () {
+ /* Most modern architectures have a NOP instruction, so this is a fairly generic test. */
+ asm volatile ( "\tnop\n" : : : "cc", "memory" );
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ have_gcc_inline_asm=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+# Check whether --enable-gcc-inline-asm was given.
+if test "${enable_gcc_inline_asm+set}" = set; then
+ enableval=$enable_gcc_inline_asm; enable_gcc_inline_asm=$enableval
+else
+ enable_gcc_inline_asm=auto
+fi
+
+
+if test $enable_gcc_inline_asm = no ; then
+ have_gcc_inline_asm=disabled
+fi
+
+if test $have_gcc_inline_asm = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_GCC_INLINE_ASM 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $have_gcc_inline_asm" >&5
+$as_echo "$have_gcc_inline_asm" >&6; }
+if test $enable_gcc_inline_asm = yes && test $have_gcc_inline_asm = no ; then
+ { { $as_echo "$as_me:$LINENO: error: GNU-style inline assembler not detected" >&5
+$as_echo "$as_me: error: GNU-style inline assembler not detected" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+if test $have_arm_simd = yes; then
+ USE_ARM_SIMD_TRUE=
+ USE_ARM_SIMD_FALSE='#'
+else
+ USE_ARM_SIMD_TRUE='#'
+ USE_ARM_SIMD_FALSE=
+fi
+
+
+
+if test $have_arm_neon = yes; then
+ USE_ARM_NEON_TRUE=
+ USE_ARM_NEON_FALSE='#'
+else
+ USE_ARM_NEON_TRUE='#'
+ USE_ARM_NEON_FALSE=
+fi
+
+
+
+if test $have_gcc_inline_asm = yes; then
+ USE_GCC_INLINE_ASM_TRUE=
+ USE_GCC_INLINE_ASM_FALSE='#'
+else
+ USE_GCC_INLINE_ASM_TRUE='#'
+ USE_GCC_INLINE_ASM_FALSE=
+fi
+
+
+
+
+# Check whether --enable-gtk was given.
if test "${enable_gtk+set}" = set; then
- enableval="$enable_gtk"
- enable_gtk=$enableval
+ enableval=$enable_gtk; enable_gtk=$enableval
else
enable_gtk=auto
-fi;
+fi
+
@@ -19873,10 +21337,10 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
@@ -19889,36 +21353,37 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-
if test -n "$PKG_CONFIG"; then
- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
+ { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
@@ -19931,28 +21396,42 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-
if test -n "$ac_pt_PKG_CONFIG"; then
- echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+ { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
- PKG_CONFIG=$ac_pt_PKG_CONFIG
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
@@ -19960,24 +21439,24 @@ fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
- echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6
+ { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
if test $enable_gtk = auto ; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5
($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
enable_gtk=yes
else
@@ -19987,18 +21466,18 @@ fi
if test $enable_gtk = yes ; then
pkg_failed=no
-echo "$as_me:$LINENO: checking for GTK" >&5
-echo $ECHO_N "checking for GTK... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for GTK" >&5
+$as_echo_n "checking for GTK... " >&6; }
if test -n "$PKG_CONFIG"; then
if test -n "$GTK_CFLAGS"; then
pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5
($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null`
else
@@ -20013,10 +21492,10 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_GTK_LIBS="$GTK_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5
($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null`
else
@@ -20044,7 +21523,7 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$GTK_PKG_ERRORS" >&5
- { { echo "$as_me:$LINENO: error: Package requirements (gtk+-2.0) were not met:
+ { { $as_echo "$as_me:$LINENO: error: Package requirements (gtk+-2.0) were not met:
$GTK_PKG_ERRORS
@@ -20055,7 +21534,7 @@ Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
-echo "$as_me: error: Package requirements (gtk+-2.0) were not met:
+$as_echo "$as_me: error: Package requirements (gtk+-2.0) were not met:
$GTK_PKG_ERRORS
@@ -20068,7 +21547,7 @@ See the pkg-config man page for more details.
" >&2;}
{ (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
- { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+ { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -20078,7 +21557,7 @@ See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -20092,8 +21571,8 @@ See \`config.log' for more details." >&2;}
else
GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
GTK_LIBS=$pkg_cv_GTK_LIBS
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
:
fi
fi
@@ -20114,7 +21593,8 @@ fi
- ac_config_files="$ac_config_files pixman-1.pc pixman-1-uninstalled.pc Makefile pixman/Makefile pixman/pixman-version.h test/Makefile"
+ac_config_files="$ac_config_files pixman-1.pc pixman-1-uninstalled.pc Makefile pixman/Makefile pixman/pixman-version.h test/Makefile"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -20133,39 +21613,59 @@ _ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
+ ;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-} |
+ esac |
+ sort
+) |
sed '
+ /^ac_cv_env_/b end
t clear
- : clear
+ :clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
- echo "not updating unwritable cache $cache_file"
+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -20174,32 +21674,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -20207,61 +21693,83 @@ LTLIBOBJS=$ac_ltlibobjs
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${USE_MMX_TRUE}" && test -z "${USE_MMX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"USE_MMX\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"USE_MMX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_MMX\" was never defined.
+$as_echo "$as_me: error: conditional \"USE_MMX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${USE_SSE2_TRUE}" && test -z "${USE_SSE2_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"USE_SSE2\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"USE_SSE2\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_SSE2\" was never defined.
+$as_echo "$as_me: error: conditional \"USE_SSE2\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${USE_VMX_TRUE}" && test -z "${USE_VMX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"USE_VMX\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"USE_VMX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"USE_VMX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${USE_ARM_SIMD_TRUE}" && test -z "${USE_ARM_SIMD_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"USE_ARM_SIMD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"USE_ARM_SIMD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${USE_ARM_NEON_TRUE}" && test -z "${USE_ARM_NEON_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"USE_ARM_NEON\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_VMX\" was never defined.
+$as_echo "$as_me: error: conditional \"USE_ARM_NEON\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${USE_GCC_INLINE_ASM_TRUE}" && test -z "${USE_GCC_INLINE_ASM_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"USE_GCC_INLINE_ASM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"USE_GCC_INLINE_ASM\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_GTK_TRUE}" && test -z "${HAVE_GTK_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_GTK\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_GTK\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_GTK\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_GTK\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -20274,22 +21782,78 @@ ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
-DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -20299,33 +21863,60 @@ else
fi
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
@@ -20333,159 +21924,122 @@ fi
# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
+# CDPATH.
+$as_unset CDPATH
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-if expr a : '\(a\)' >/dev/null 2>&1; then
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
@@ -20494,7 +22048,28 @@ else
as_mkdir_p=false
fi
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -20503,31 +22078,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
exec 6>&1
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by pixman $as_me 0.12.0, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+# values after options handling.
+ac_log="
+This file was extended by pixman $as_me 0.15.8, which was
+generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -20535,30 +22093,20 @@ generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
@@ -20566,14 +22114,14 @@ current configuration.
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
- -V, --version print version number, then exit
+ -V, --version print version number and configuration settings, then exit
-q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -20585,83 +22133,83 @@ Configuration commands:
$config_commands
Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-pixman config.status 0.12.0
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+pixman config.status 0.15.8
+configured by $0, generated by GNU Autoconf 2.62,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2008 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
- -*)
+ *)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; } ;;
- *) ac_config_targets="$ac_config_targets $1" ;;
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
esac
shift
@@ -20675,44 +22223,58 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
fi
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
-# INIT-COMMANDS section.
+# INIT-COMMANDS
#
-
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Handling of arguments.
for ac_config_target in $ac_config_targets
do
- case "$ac_config_target" in
- # Handling of arguments.
- "pixman-1.pc" ) CONFIG_FILES="$CONFIG_FILES pixman-1.pc" ;;
- "pixman-1-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES pixman-1-uninstalled.pc" ;;
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "pixman/Makefile" ) CONFIG_FILES="$CONFIG_FILES pixman/Makefile" ;;
- "pixman/pixman-version.h" ) CONFIG_FILES="$CONFIG_FILES pixman/pixman-version.h" ;;
- "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "pixman-1.pc") CONFIG_FILES="$CONFIG_FILES pixman-1.pc" ;;
+ "pixman-1-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pixman-1-uninstalled.pc" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "pixman/Makefile") CONFIG_FILES="$CONFIG_FILES pixman/Makefile" ;;
+ "pixman/pixman-version.h") CONFIG_FILES="$CONFIG_FILES pixman/pixman-version.h" ;;
+ "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
+
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -20724,766 +22286,634 @@ if $ac_need_defaults; then
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
trap '{ (exit 1); exit 1; }' 1 2 13 15
}
-
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
} ||
{
- echo "$me: cannot create a temporary directory in ." >&2
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# CONFIG_FILES section.
-#
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CYGPATH_W@,$CYGPATH_W,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
-s,@ACLOCAL@,$ACLOCAL,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOMAKE@,$AUTOMAKE,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@MAKEINFO@,$MAKEINFO,;t t
-s,@install_sh@,$install_sh,;t t
-s,@STRIP@,$STRIP,;t t
-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
-s,@mkdir_p@,$mkdir_p,;t t
-s,@AWK@,$AWK,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@am__leading_dot@,$am__leading_dot,;t t
-s,@AMTAR@,$AMTAR,;t t
-s,@am__tar@,$am__tar,;t t
-s,@am__untar@,$am__untar,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@DEPDIR@,$DEPDIR,;t t
-s,@am__include@,$am__include,;t t
-s,@am__quote@,$am__quote,;t t
-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
-s,@CCDEPMODE@,$CCDEPMODE,;t t
-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@SED@,$SED,;t t
-s,@EGREP@,$EGREP,;t t
-s,@LN_S@,$LN_S,;t t
-s,@ECHO@,$ECHO,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@DSYMUTIL@,$DSYMUTIL,;t t
-s,@ac_ct_DSYMUTIL@,$ac_ct_DSYMUTIL,;t t
-s,@NMEDIT@,$NMEDIT,;t t
-s,@ac_ct_NMEDIT@,$ac_ct_NMEDIT,;t t
-s,@CPP@,$CPP,;t t
-s,@CXX@,$CXX,;t t
-s,@CXXFLAGS@,$CXXFLAGS,;t t
-s,@ac_ct_CXX@,$ac_ct_CXX,;t t
-s,@CXXDEPMODE@,$CXXDEPMODE,;t t
-s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
-s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
-s,@CXXCPP@,$CXXCPP,;t t
-s,@F77@,$F77,;t t
-s,@FFLAGS@,$FFLAGS,;t t
-s,@ac_ct_F77@,$ac_ct_F77,;t t
-s,@LIBTOOL@,$LIBTOOL,;t t
-s,@PIXMAN_VERSION_MAJOR@,$PIXMAN_VERSION_MAJOR,;t t
-s,@PIXMAN_VERSION_MINOR@,$PIXMAN_VERSION_MINOR,;t t
-s,@PIXMAN_VERSION_MICRO@,$PIXMAN_VERSION_MICRO,;t t
-s,@LT_VERSION_INFO@,$LT_VERSION_INFO,;t t
-s,@PERL@,$PERL,;t t
-s,@USE_MMX_TRUE@,$USE_MMX_TRUE,;t t
-s,@USE_MMX_FALSE@,$USE_MMX_FALSE,;t t
-s,@USE_SSE2_TRUE@,$USE_SSE2_TRUE,;t t
-s,@USE_SSE2_FALSE@,$USE_SSE2_FALSE,;t t
-s,@MMX_CFLAGS@,$MMX_CFLAGS,;t t
-s,@SSE2_CFLAGS@,$SSE2_CFLAGS,;t t
-s,@VMX_CFLAGS@,$VMX_CFLAGS,;t t
-s,@USE_VMX_TRUE@,$USE_VMX_TRUE,;t t
-s,@USE_VMX_FALSE@,$USE_VMX_FALSE,;t t
-s,@PKG_CONFIG@,$PKG_CONFIG,;t t
-s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
-s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
-s,@GTK_LIBS@,$GTK_LIBS,;t t
-s,@HAVE_GTK_TRUE@,$HAVE_GTK_TRUE,;t t
-s,@HAVE_GTK_FALSE@,$HAVE_GTK_FALSE,;t t
-s,@DEP_CFLAGS@,$DEP_CFLAGS,;t t
-s,@DEP_LIBS@,$DEP_LIBS,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", line, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+ { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
-
ac_builddir=.
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
+_ACEOF
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
-#
-# CONFIG_HEADER section.
-#
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ rm -f "$tmp/stdin"
case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
{ (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
fi
else
- cat $tmp/config.h
- rm -f $tmp/config.h
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+ { (exit 1); exit 1; }; }
fi
-# Compute $ac_file's index in $config_headers.
+# Compute "$ac_file"'s index in $config_headers.
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $ac_file | $ac_file:* )
+ "$ac_file" | "$ac_file":* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X$ac_file |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`/stamp-h$_am_stamp_count
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
+echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
- case $ac_dest in
- depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
@@ -21493,18 +22923,29 @@ echo "$as_me: executing $ac_dest commands" >&6;}
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`(dirname "$mf") 2>/dev/null ||
+ dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
else
continue
fi
@@ -21526,59 +22967,90 @@ echo X"$mf" |
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
- fdir=`(dirname "$file") 2>/dev/null ||
+ fdir=`$as_dirname -- "$file" ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p $dirpart/$fdir
- else
- as_dir=$dirpart/$fdir
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir=$dirpart/$fdir
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
-
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
;;
+
esac
-done
-_ACEOF
+done # for ac_tag
-cat >>$CONFIG_STATUS <<\_ACEOF
{ (exit 0); exit 0; }
_ACEOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -21600,4 +23072,8 @@ if test "$no_create" != yes; then
# would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; }
fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
diff --git a/lib/pixman/configure.ac b/lib/pixman/configure.ac
index eb8879ca0..7352c27e4 100644
--- a/lib/pixman/configure.ac
+++ b/lib/pixman/configure.ac
@@ -53,8 +53,8 @@ AC_PREREQ([2.57])
#
m4_define([pixman_major], 0)
-m4_define([pixman_minor], 12)
-m4_define([pixman_micro], 0)
+m4_define([pixman_minor], 15)
+m4_define([pixman_micro], 8)
m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
@@ -63,11 +63,18 @@ AM_INIT_AUTOMAKE([dist-bzip2])
AM_CONFIG_HEADER(config.h)
+AC_CANONICAL_HOST
+
AC_PROG_CC
AC_PROG_LIBTOOL
AC_CHECK_FUNCS([getisax])
AC_C_BIGENDIAN
AC_C_INLINE
+
+# Checks for Sun Studio compilers
+AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+AC_CHECK_DECL([__amd64], [AMD64_ABI="yes"], [AMD64_ABI="no"])
+
#
# We ignore pixman_major in the version here because the major version should
# always be encoded in the actual library name. Ie., the soname is:
@@ -141,12 +148,23 @@ AC_MSG_RESULT($have_sunstudio8)
dnl ===========================================================================
dnl Check for MMX
-MMX_CFLAGS="-mmmx -Winline"
+if test "x$MMX_CFLAGS" = "x" ; then
+ if test "x$SUNCC" = "xyes"; then
+ # Sun Studio doesn't have an -xarch=mmx flag, so we have to use sse
+ # but if we're building 64-bit, mmx & sse support is on by default and
+ # -xarch=sse throws an error instead
+ if test "$AMD64_ABI" = "no" ; then
+ MMX_CFLAGS="-xarch=sse"
+ fi
+ else
+ MMX_CFLAGS="-mmmx -Winline"
+ fi
+fi
have_mmx_intrinsics=no
AC_MSG_CHECKING(whether to use MMX intrinsics)
xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $MMX_CFLAGS"
+CFLAGS="$MMX_CFLAGS $CFLAGS"
AC_COMPILE_IFELSE([
#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
error "Need GCC >= 3.4 for MMX intrinsics"
@@ -183,12 +201,21 @@ AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes)
dnl ===========================================================================
dnl Check for SSE2
-SSE2_CFLAGS="-mmmx -msse2 -Winline"
+if test "x$SSE2_CFLAGS" = "x" ; then
+ if test "x$SUNCC" = "xyes"; then
+ # SSE2 is enabled by default in the Sun Studio 64-bit environment
+ if test "$AMD64_ABI" = "no" ; then
+ SSE2_CFLAGS="-xarch=sse2"
+ fi
+ else
+ SSE2_CFLAGS="-mmmx -msse2 -Winline"
+ fi
+fi
have_sse2_intrinsics=no
AC_MSG_CHECKING(whether to use SSE2 intrinsics)
xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -msse2 $SSE2_CFLAGS"
+CFLAGS="$SSE2_CFLAGS $CFLAGS"
AC_COMPILE_IFELSE([
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
@@ -226,10 +253,31 @@ fi
AM_CONDITIONAL(USE_SSE2, test $have_sse2_intrinsics = yes)
-dnl ========================================================
+dnl ===========================================================================
+dnl Other special flags needed when building code using MMX or SSE instructions
+case $host_os in
+ solaris*)
+ # When building 32-bit binaries, apply a mapfile to ensure that the
+ # binaries aren't flagged as only able to run on MMX+SSE capable CPUs
+ # since they check at runtime before using those instructions
+ if test "$AMD64_ABI" = "no" ; then
+ HWCAP_LDFLAGS='-Wl,-M,$(srcdir)/solaris-hwcap.mapfile'
+ fi
+ if test "x$MMX_LDFLAGS" = "x" ; then
+ MMX_LDFLAGS="$HWCAP_LDFLAGS"
+ fi
+ if test "x$SSE2_LDFLAGS" = "x" ; then
+ SSE2_LDFLAGS="$HWCAP_LDFLAGS"
+ fi
+ ;;
+esac
+
AC_SUBST(MMX_CFLAGS)
+AC_SUBST(MMX_LDFLAGS)
AC_SUBST(SSE2_CFLAGS)
+AC_SUBST(SSE2_LDFLAGS)
+dnl ===========================================================================
dnl Check for VMX/Altivec
if test -n "`$CC -v 2>&1 | grep version | grep Apple`"; then
VMX_CFLAGS="-faltivec"
@@ -277,6 +325,114 @@ AC_SUBST(VMX_CFLAGS)
AM_CONDITIONAL(USE_VMX, test $have_vmx_intrinsics = yes)
+dnl Check for ARM SIMD instructions
+ARM_SIMD_CFLAGS=""
+
+have_arm_simd=no
+AC_MSG_CHECKING(whether to use ARM SIMD assembler)
+xserver_save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS $ARM_SIMD_CFLAGS"
+AC_COMPILE_IFELSE([
+int main () {
+ asm("uqadd8 r1, r1, r2");
+ return 0;
+}], have_arm_simd=yes)
+CFLAGS=$xserver_save_CFLAGS
+
+AC_ARG_ENABLE(arm-simd,
+ [AC_HELP_STRING([--disable-arm-simd],
+ [disable ARM SIMD fast paths])],
+ [enable_arm_simd=$enableval], [enable_arm_simd=auto])
+
+if test $enable_arm_simd = no ; then
+ have_arm_simd=disabled
+fi
+
+if test $have_arm_simd = yes ; then
+ AC_DEFINE(USE_ARM_SIMD, 1, [use ARM SIMD compiler intrinsics])
+else
+ ARM_SIMD_CFLAGS=
+fi
+
+AC_MSG_RESULT($have_arm_simd)
+if test $enable_arm_simd = yes && test $have_arm_simd = no ; then
+ AC_MSG_ERROR([ARM SIMD intrinsics not detected])
+fi
+
+dnl Check for ARM NEON instructions
+ARM_NEON_CFLAGS="-mfpu=neon -mfloat-abi=softfp"
+
+have_arm_neon=no
+AC_MSG_CHECKING(whether to use ARM NEON)
+xserver_save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS $ARM_NEON_CFLAGS"
+AC_COMPILE_IFELSE([
+#include <arm_neon.h>
+int main () {
+ uint8x8_t neon_test=vmov_n_u8(0);
+ return 0;
+}], have_arm_neon=yes)
+CFLAGS=$xserver_save_CFLAGS
+
+AC_ARG_ENABLE(arm-neon,
+ [AC_HELP_STRING([--disable-arm-neon],
+ [disable ARM NEON fast paths])],
+ [enable_arm_neon=$enableval], [enable_arm_neon=auto])
+
+if test $enable_arm_neon = no ; then
+ have_arm_neon=disabled
+fi
+
+if test $have_arm_neon = yes ; then
+ AC_DEFINE(USE_ARM_NEON, 1, [use ARM NEON compiler intrinsics])
+else
+ ARM_NEON_CFLAGS=
+fi
+
+AC_MSG_RESULT($have_arm_neon)
+if test $enable_arm_neon = yes && test $have_arm_neon = no ; then
+ AC_MSG_ERROR([ARM NEON intrinsics not detected])
+fi
+
+dnl Check for GNU-style inline assembly support
+
+have_gcc_inline_asm=no
+AC_MSG_CHECKING(whether to use GNU-style inline assembler)
+AC_COMPILE_IFELSE([
+int main () {
+ /* Most modern architectures have a NOP instruction, so this is a fairly generic test. */
+ asm volatile ( "\tnop\n" : : : "cc", "memory" );
+ return 0;
+}], have_gcc_inline_asm=yes)
+
+AC_ARG_ENABLE(gcc-inline-asm,
+ [AC_HELP_STRING([--disable-gcc-inline-asm],
+ [disable GNU-style inline assembler])],
+ [enable_gcc_inline_asm=$enableval], [enable_gcc_inline_asm=auto])
+
+if test $enable_gcc_inline_asm = no ; then
+ have_gcc_inline_asm=disabled
+fi
+
+if test $have_gcc_inline_asm = yes ; then
+ AC_DEFINE(USE_GCC_INLINE_ASM, 1, [use GNU-style inline assembler])
+fi
+
+AC_MSG_RESULT($have_gcc_inline_asm)
+if test $enable_gcc_inline_asm = yes && test $have_gcc_inline_asm = no ; then
+ AC_MSG_ERROR([GNU-style inline assembler not detected])
+fi
+
+
+AC_SUBST(ARM_SIMD_CFLAGS)
+AC_SUBST(ARM_NEON_CFLAGS)
+
+AM_CONDITIONAL(USE_ARM_SIMD, test $have_arm_simd = yes)
+AM_CONDITIONAL(USE_ARM_NEON, test $have_arm_neon = yes)
+AM_CONDITIONAL(USE_GCC_INLINE_ASM, test $have_gcc_inline_asm = yes)
+
+
+
AC_ARG_ENABLE(gtk,
[AC_HELP_STRING([--enable-gtk],
[enable tests using GTK+ [default=auto]])],
diff --git a/lib/pixman/pixman-1-uninstalled.pc.in b/lib/pixman/pixman-1-uninstalled.pc.in
index 9a2afa1a5..e0347d010 100644
--- a/lib/pixman/pixman-1-uninstalled.pc.in
+++ b/lib/pixman/pixman-1-uninstalled.pc.in
@@ -1,11 +1,5 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
Name: Pixman
Description: The pixman library (version 1)
Version: @PACKAGE_VERSION@
Cflags: -I${pc_top_builddir}/${pcfiledir}/pixman
-Libs: ${pc_top_builddir}/${pcfiledir}/libpixman-1-so.a
-
+Libs: ${pc_top_builddir}/${pcfiledir}/pixman/libpixman-1.la
diff --git a/lib/pixman/pixman/Makefile.am b/lib/pixman/pixman/Makefile.am
index 399fb7d5d..863caa35f 100644
--- a/lib/pixman/pixman/Makefile.am
+++ b/lib/pixman/pixman/Makefile.am
@@ -2,31 +2,39 @@ lib_LTLIBRARIES = libpixman-1.la
libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined
libpixman_1_la_LIBADD = @DEP_LIBS@ -lm
libpixman_1_la_CFLAGS = -DPIXMAN_DISABLE_DEPRECATED
-libpixman_1_la_SOURCES = \
- pixman.h \
- pixman-access.c \
- pixman-access-accessors.c \
- pixman-region16.c \
- pixman-region32.c \
- pixman-private.h \
- pixman-image.c \
- pixman-combine32.c \
- pixman-combine32.h \
- pixman-combine64.c \
- pixman-combine64.h \
- pixman-compose.c \
- pixman-compose-accessors.c \
- pixman-pict.c \
- pixman-source.c \
- pixman-transformed.c \
- pixman-transformed-accessors.c \
- pixman-utils.c \
- pixman-edge.c \
- pixman-edge-accessors.c \
- pixman-edge-imp.h \
- pixman-trap.c \
- pixman-compute-region.c \
- pixman-timer.c
+libpixman_1_la_SOURCES = \
+ pixman.h \
+ pixman-access.c \
+ pixman-access-accessors.c \
+ pixman-cpu.c \
+ pixman-gradient-walker.c \
+ pixman-region16.c \
+ pixman-region32.c \
+ pixman-private.h \
+ pixman-image.c \
+ pixman-implementation.c \
+ pixman-combine32.c \
+ pixman-combine32.h \
+ pixman-combine64.c \
+ pixman-combine64.h \
+ pixman-general.c \
+ pixman-pict.c \
+ pixman-fast-path.c \
+ pixman-solid-fill.c \
+ pixman-conical-gradient.c \
+ pixman-linear-gradient.c \
+ pixman-radial-gradient.c \
+ pixman-bits-image.c \
+ pixman-transformed.c \
+ pixman-transformed-accessors.c \
+ pixman-utils.c \
+ pixman-edge.c \
+ pixman-edge-accessors.c \
+ pixman-edge-imp.h \
+ pixman-trap.c \
+ pixman-compute-region.c \
+ pixman-timer.c \
+ pixman-matrix.c
libpixmanincludedir = $(includedir)/pixman-1/
libpixmaninclude_HEADERS = pixman.h pixman-version.h
@@ -42,17 +50,18 @@ pixman-combine64.c : combine.inc pixman-combine64.h combine.pl
pixman-combine64.h : combine.h.inc combine.pl
$(PERL) $(srcdir)/combine.pl 16 < $(srcdir)/combine.h.inc > $@ || ($(RM) $@; exit 1)
-EXTRA_DIST = Makefile.win32 combine.inc combine.pl pixman-region.c combine.h.inc
+EXTRA_DIST = Makefile.win32 combine.inc combine.pl pixman-region.c \
+ combine.h.inc solaris-hwcap.mapfile
CLEANFILES = pixman-combine32.c pixman-combine64.c pixman-combine32.h pixman-combine64.h
# mmx code
if USE_MMX
noinst_LTLIBRARIES += libpixman-mmx.la
libpixman_mmx_la_SOURCES = \
- pixman-mmx.c \
- pixman-mmx.h
+ pixman-mmx.c
libpixman_mmx_la_CFLAGS = $(DEP_CFLAGS) $(MMX_CFLAGS)
libpixman_mmx_la_LIBADD = $(DEP_LIBS)
+libpixman_1_la_LDFLAGS += $(MMX_LDFLAGS)
libpixman_1_la_LIBADD += libpixman-mmx.la
endif
@@ -61,7 +70,6 @@ if USE_VMX
noinst_LTLIBRARIES += libpixman-vmx.la
libpixman_vmx_la_SOURCES = \
pixman-vmx.c \
- pixman-vmx.h \
pixman-combine32.h
libpixman_vmx_la_CFLAGS = $(DEP_CFLAGS) $(VMX_CFLAGS)
libpixman_vmx_la_LIBADD = $(DEP_LIBS)
@@ -72,10 +80,33 @@ endif
if USE_SSE2
noinst_LTLIBRARIES += libpixman-sse2.la
libpixman_sse2_la_SOURCES = \
- pixman-sse2.c \
- pixman-sse2.h
+ pixman-sse2.c
libpixman_sse2_la_CFLAGS = $(DEP_CFLAGS) $(SSE2_CFLAGS)
libpixman_sse2_la_LIBADD = $(DEP_LIBS)
+libpixman_1_la_LDFLAGS += $(SSE2_LDFLAGS)
libpixman_1_la_LIBADD += libpixman-sse2.la
endif
+# arm simd code
+if USE_ARM_SIMD
+noinst_LTLIBRARIES += libpixman-arm-simd.la
+libpixman_arm_simd_la_SOURCES = \
+ pixman-arm-simd.c \
+ pixman-arm-simd.h
+libpixman_arm_simd_la_CFLAGS = $(DEP_CFLAGS) $(ARM_SIMD_CFLAGS)
+libpixman_arm_simd_la_LIBADD = $(DEP_LIBS)
+libpixman_1_la_LIBADD += libpixman-arm-simd.la
+endif
+
+# arm neon code
+if USE_ARM_NEON
+noinst_LTLIBRARIES += libpixman-arm-neon.la
+libpixman_arm_neon_la_SOURCES = \
+ pixman-arm-neon.c \
+ pixman-arm-neon.h
+libpixman_arm_neon_la_CFLAGS = $(DEP_CFLAGS) $(ARM_NEON_CFLAGS)
+libpixman_arm_neon_la_LIBADD = $(DEP_LIBS)
+libpixman_1_la_LIBADD += libpixman-arm-neon.la
+endif
+
+
diff --git a/lib/pixman/pixman/Makefile.in b/lib/pixman/pixman/Makefile.in
index 02206f868..7353d1b1a 100644
--- a/lib/pixman/pixman/Makefile.in
+++ b/lib/pixman/pixman/Makefile.in
@@ -40,15 +40,25 @@ host_triplet = @host@
# mmx code
@USE_MMX_TRUE@am__append_1 = libpixman-mmx.la
-@USE_MMX_TRUE@am__append_2 = libpixman-mmx.la
+@USE_MMX_TRUE@am__append_2 = $(MMX_LDFLAGS)
+@USE_MMX_TRUE@am__append_3 = libpixman-mmx.la
# vmx code
-@USE_VMX_TRUE@am__append_3 = libpixman-vmx.la
@USE_VMX_TRUE@am__append_4 = libpixman-vmx.la
+@USE_VMX_TRUE@am__append_5 = libpixman-vmx.la
# sse2 code
-@USE_SSE2_TRUE@am__append_5 = libpixman-sse2.la
@USE_SSE2_TRUE@am__append_6 = libpixman-sse2.la
+@USE_SSE2_TRUE@am__append_7 = $(SSE2_LDFLAGS)
+@USE_SSE2_TRUE@am__append_8 = libpixman-sse2.la
+
+# arm simd code
+@USE_ARM_SIMD_TRUE@am__append_9 = libpixman-arm-simd.la
+@USE_ARM_SIMD_TRUE@am__append_10 = libpixman-arm-simd.la
+
+# arm neon code
+@USE_ARM_NEON_TRUE@am__append_11 = libpixman-arm-neon.la
+@USE_ARM_NEON_TRUE@am__append_12 = libpixman-arm-neon.la
subdir = pixman
DIST_COMMON = $(libpixmaninclude_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/pixman-version.h.in
@@ -72,42 +82,67 @@ LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
@USE_MMX_TRUE@am__DEPENDENCIES_1 = libpixman-mmx.la
@USE_VMX_TRUE@am__DEPENDENCIES_2 = libpixman-vmx.la
@USE_SSE2_TRUE@am__DEPENDENCIES_3 = libpixman-sse2.la
+@USE_ARM_SIMD_TRUE@am__DEPENDENCIES_4 = libpixman-arm-simd.la
+@USE_ARM_NEON_TRUE@am__DEPENDENCIES_5 = libpixman-arm-neon.la
libpixman_1_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
+ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5)
am_libpixman_1_la_OBJECTS = libpixman_1_la-pixman-access.lo \
libpixman_1_la-pixman-access-accessors.lo \
+ libpixman_1_la-pixman-cpu.lo \
+ libpixman_1_la-pixman-gradient-walker.lo \
libpixman_1_la-pixman-region16.lo \
libpixman_1_la-pixman-region32.lo \
libpixman_1_la-pixman-image.lo \
+ libpixman_1_la-pixman-implementation.lo \
libpixman_1_la-pixman-combine32.lo \
libpixman_1_la-pixman-combine64.lo \
- libpixman_1_la-pixman-compose.lo \
- libpixman_1_la-pixman-compose-accessors.lo \
- libpixman_1_la-pixman-pict.lo libpixman_1_la-pixman-source.lo \
+ libpixman_1_la-pixman-general.lo libpixman_1_la-pixman-pict.lo \
+ libpixman_1_la-pixman-fast-path.lo \
+ libpixman_1_la-pixman-solid-fill.lo \
+ libpixman_1_la-pixman-conical-gradient.lo \
+ libpixman_1_la-pixman-linear-gradient.lo \
+ libpixman_1_la-pixman-radial-gradient.lo \
+ libpixman_1_la-pixman-bits-image.lo \
libpixman_1_la-pixman-transformed.lo \
libpixman_1_la-pixman-transformed-accessors.lo \
libpixman_1_la-pixman-utils.lo libpixman_1_la-pixman-edge.lo \
libpixman_1_la-pixman-edge-accessors.lo \
libpixman_1_la-pixman-trap.lo \
libpixman_1_la-pixman-compute-region.lo \
- libpixman_1_la-pixman-timer.lo
+ libpixman_1_la-pixman-timer.lo libpixman_1_la-pixman-matrix.lo
libpixman_1_la_OBJECTS = $(am_libpixman_1_la_OBJECTS)
-am__DEPENDENCIES_4 =
-@USE_MMX_TRUE@libpixman_mmx_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
-am__libpixman_mmx_la_SOURCES_DIST = pixman-mmx.c pixman-mmx.h
+am__DEPENDENCIES_6 =
+@USE_ARM_NEON_TRUE@libpixman_arm_neon_la_DEPENDENCIES = \
+@USE_ARM_NEON_TRUE@ $(am__DEPENDENCIES_6)
+am__libpixman_arm_neon_la_SOURCES_DIST = pixman-arm-neon.c \
+ pixman-arm-neon.h
+@USE_ARM_NEON_TRUE@am_libpixman_arm_neon_la_OBJECTS = \
+@USE_ARM_NEON_TRUE@ libpixman_arm_neon_la-pixman-arm-neon.lo
+libpixman_arm_neon_la_OBJECTS = $(am_libpixman_arm_neon_la_OBJECTS)
+@USE_ARM_NEON_TRUE@am_libpixman_arm_neon_la_rpath =
+@USE_ARM_SIMD_TRUE@libpixman_arm_simd_la_DEPENDENCIES = \
+@USE_ARM_SIMD_TRUE@ $(am__DEPENDENCIES_6)
+am__libpixman_arm_simd_la_SOURCES_DIST = pixman-arm-simd.c \
+ pixman-arm-simd.h
+@USE_ARM_SIMD_TRUE@am_libpixman_arm_simd_la_OBJECTS = \
+@USE_ARM_SIMD_TRUE@ libpixman_arm_simd_la-pixman-arm-simd.lo
+libpixman_arm_simd_la_OBJECTS = $(am_libpixman_arm_simd_la_OBJECTS)
+@USE_ARM_SIMD_TRUE@am_libpixman_arm_simd_la_rpath =
+@USE_MMX_TRUE@libpixman_mmx_la_DEPENDENCIES = $(am__DEPENDENCIES_6)
+am__libpixman_mmx_la_SOURCES_DIST = pixman-mmx.c
@USE_MMX_TRUE@am_libpixman_mmx_la_OBJECTS = \
@USE_MMX_TRUE@ libpixman_mmx_la-pixman-mmx.lo
libpixman_mmx_la_OBJECTS = $(am_libpixman_mmx_la_OBJECTS)
@USE_MMX_TRUE@am_libpixman_mmx_la_rpath =
-@USE_SSE2_TRUE@libpixman_sse2_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
-am__libpixman_sse2_la_SOURCES_DIST = pixman-sse2.c pixman-sse2.h
+@USE_SSE2_TRUE@libpixman_sse2_la_DEPENDENCIES = $(am__DEPENDENCIES_6)
+am__libpixman_sse2_la_SOURCES_DIST = pixman-sse2.c
@USE_SSE2_TRUE@am_libpixman_sse2_la_OBJECTS = \
@USE_SSE2_TRUE@ libpixman_sse2_la-pixman-sse2.lo
libpixman_sse2_la_OBJECTS = $(am_libpixman_sse2_la_OBJECTS)
@USE_SSE2_TRUE@am_libpixman_sse2_la_rpath =
-@USE_VMX_TRUE@libpixman_vmx_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
-am__libpixman_vmx_la_SOURCES_DIST = pixman-vmx.c pixman-vmx.h \
- pixman-combine32.h
+@USE_VMX_TRUE@libpixman_vmx_la_DEPENDENCIES = $(am__DEPENDENCIES_6)
+am__libpixman_vmx_la_SOURCES_DIST = pixman-vmx.c pixman-combine32.h
@USE_VMX_TRUE@am_libpixman_vmx_la_OBJECTS = \
@USE_VMX_TRUE@ libpixman_vmx_la-pixman-vmx.lo
libpixman_vmx_la_OBJECTS = $(am_libpixman_vmx_la_OBJECTS)
@@ -123,9 +158,12 @@ LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libpixman_1_la_SOURCES) $(libpixman_mmx_la_SOURCES) \
+SOURCES = $(libpixman_1_la_SOURCES) $(libpixman_arm_neon_la_SOURCES) \
+ $(libpixman_arm_simd_la_SOURCES) $(libpixman_mmx_la_SOURCES) \
$(libpixman_sse2_la_SOURCES) $(libpixman_vmx_la_SOURCES)
DIST_SOURCES = $(libpixman_1_la_SOURCES) \
+ $(am__libpixman_arm_neon_la_SOURCES_DIST) \
+ $(am__libpixman_arm_simd_la_SOURCES_DIST) \
$(am__libpixman_mmx_la_SOURCES_DIST) \
$(am__libpixman_sse2_la_SOURCES_DIST) \
$(am__libpixman_vmx_la_SOURCES_DIST)
@@ -139,6 +177,8 @@ AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
+ARM_NEON_CFLAGS = @ARM_NEON_CFLAGS@
+ARM_SIMD_CFLAGS = @ARM_SIMD_CFLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -166,6 +206,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
+GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
HAVE_GTK_FALSE = @HAVE_GTK_FALSE@
@@ -183,6 +224,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_VERSION_INFO = @LT_VERSION_INFO@
MAKEINFO = @MAKEINFO@
MMX_CFLAGS = @MMX_CFLAGS@
+MMX_LDFLAGS = @MMX_LDFLAGS@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -202,7 +244,14 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSE2_CFLAGS = @SSE2_CFLAGS@
+SSE2_LDFLAGS = @SSE2_LDFLAGS@
STRIP = @STRIP@
+USE_ARM_NEON_FALSE = @USE_ARM_NEON_FALSE@
+USE_ARM_NEON_TRUE = @USE_ARM_NEON_TRUE@
+USE_ARM_SIMD_FALSE = @USE_ARM_SIMD_FALSE@
+USE_ARM_SIMD_TRUE = @USE_ARM_SIMD_TRUE@
+USE_GCC_INLINE_ASM_FALSE = @USE_GCC_INLINE_ASM_FALSE@
+USE_GCC_INLINE_ASM_TRUE = @USE_GCC_INLINE_ASM_TRUE@
USE_MMX_FALSE = @USE_MMX_FALSE@
USE_MMX_TRUE = @USE_MMX_TRUE@
USE_SSE2_FALSE = @USE_SSE2_FALSE@
@@ -211,15 +260,9 @@ USE_VMX_FALSE = @USE_VMX_FALSE@
USE_VMX_TRUE = @USE_VMX_TRUE@
VERSION = @VERSION@
VMX_CFLAGS = @VMX_CFLAGS@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_NMEDIT = @ac_ct_NMEDIT@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -236,82 +279,110 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
lib_LTLIBRARIES = libpixman-1.la
-libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined
-libpixman_1_la_LIBADD = @DEP_LIBS@ -lm $(am__append_2) $(am__append_4) \
- $(am__append_6)
+libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) \
+ -no-undefined $(am__append_2) $(am__append_7)
+libpixman_1_la_LIBADD = @DEP_LIBS@ -lm $(am__append_3) $(am__append_5) \
+ $(am__append_8) $(am__append_10) $(am__append_12)
libpixman_1_la_CFLAGS = -DPIXMAN_DISABLE_DEPRECATED
libpixman_1_la_SOURCES = \
- pixman.h \
- pixman-access.c \
- pixman-access-accessors.c \
- pixman-region16.c \
- pixman-region32.c \
- pixman-private.h \
- pixman-image.c \
- pixman-combine32.c \
- pixman-combine32.h \
- pixman-combine64.c \
- pixman-combine64.h \
- pixman-compose.c \
- pixman-compose-accessors.c \
- pixman-pict.c \
- pixman-source.c \
- pixman-transformed.c \
- pixman-transformed-accessors.c \
- pixman-utils.c \
- pixman-edge.c \
- pixman-edge-accessors.c \
- pixman-edge-imp.h \
- pixman-trap.c \
- pixman-compute-region.c \
- pixman-timer.c
+ pixman.h \
+ pixman-access.c \
+ pixman-access-accessors.c \
+ pixman-cpu.c \
+ pixman-gradient-walker.c \
+ pixman-region16.c \
+ pixman-region32.c \
+ pixman-private.h \
+ pixman-image.c \
+ pixman-implementation.c \
+ pixman-combine32.c \
+ pixman-combine32.h \
+ pixman-combine64.c \
+ pixman-combine64.h \
+ pixman-general.c \
+ pixman-pict.c \
+ pixman-fast-path.c \
+ pixman-solid-fill.c \
+ pixman-conical-gradient.c \
+ pixman-linear-gradient.c \
+ pixman-radial-gradient.c \
+ pixman-bits-image.c \
+ pixman-transformed.c \
+ pixman-transformed-accessors.c \
+ pixman-utils.c \
+ pixman-edge.c \
+ pixman-edge-accessors.c \
+ pixman-edge-imp.h \
+ pixman-trap.c \
+ pixman-compute-region.c \
+ pixman-timer.c \
+ pixman-matrix.c
libpixmanincludedir = $(includedir)/pixman-1/
libpixmaninclude_HEADERS = pixman.h pixman-version.h
-noinst_LTLIBRARIES = $(am__append_1) $(am__append_3) $(am__append_5)
-EXTRA_DIST = Makefile.win32 combine.inc combine.pl pixman-region.c combine.h.inc
+noinst_LTLIBRARIES = $(am__append_1) $(am__append_4) $(am__append_6) \
+ $(am__append_9) $(am__append_11)
+EXTRA_DIST = Makefile.win32 combine.inc combine.pl pixman-region.c \
+ combine.h.inc solaris-hwcap.mapfile
+
CLEANFILES = pixman-combine32.c pixman-combine64.c pixman-combine32.h pixman-combine64.h
@USE_MMX_TRUE@libpixman_mmx_la_SOURCES = \
-@USE_MMX_TRUE@ pixman-mmx.c \
-@USE_MMX_TRUE@ pixman-mmx.h
+@USE_MMX_TRUE@ pixman-mmx.c
@USE_MMX_TRUE@libpixman_mmx_la_CFLAGS = $(DEP_CFLAGS) $(MMX_CFLAGS)
@USE_MMX_TRUE@libpixman_mmx_la_LIBADD = $(DEP_LIBS)
@USE_VMX_TRUE@libpixman_vmx_la_SOURCES = \
@USE_VMX_TRUE@ pixman-vmx.c \
-@USE_VMX_TRUE@ pixman-vmx.h \
@USE_VMX_TRUE@ pixman-combine32.h
@USE_VMX_TRUE@libpixman_vmx_la_CFLAGS = $(DEP_CFLAGS) $(VMX_CFLAGS)
@USE_VMX_TRUE@libpixman_vmx_la_LIBADD = $(DEP_LIBS)
@USE_SSE2_TRUE@libpixman_sse2_la_SOURCES = \
-@USE_SSE2_TRUE@ pixman-sse2.c \
-@USE_SSE2_TRUE@ pixman-sse2.h
+@USE_SSE2_TRUE@ pixman-sse2.c
@USE_SSE2_TRUE@libpixman_sse2_la_CFLAGS = $(DEP_CFLAGS) $(SSE2_CFLAGS)
@USE_SSE2_TRUE@libpixman_sse2_la_LIBADD = $(DEP_LIBS)
+@USE_ARM_SIMD_TRUE@libpixman_arm_simd_la_SOURCES = \
+@USE_ARM_SIMD_TRUE@ pixman-arm-simd.c \
+@USE_ARM_SIMD_TRUE@ pixman-arm-simd.h
+
+@USE_ARM_SIMD_TRUE@libpixman_arm_simd_la_CFLAGS = $(DEP_CFLAGS) $(ARM_SIMD_CFLAGS)
+@USE_ARM_SIMD_TRUE@libpixman_arm_simd_la_LIBADD = $(DEP_LIBS)
+@USE_ARM_NEON_TRUE@libpixman_arm_neon_la_SOURCES = \
+@USE_ARM_NEON_TRUE@ pixman-arm-neon.c \
+@USE_ARM_NEON_TRUE@ pixman-arm-neon.h
+
+@USE_ARM_NEON_TRUE@libpixman_arm_neon_la_CFLAGS = $(DEP_CFLAGS) $(ARM_NEON_CFLAGS)
+@USE_ARM_NEON_TRUE@libpixman_arm_neon_la_LIBADD = $(DEP_LIBS)
all: all-am
.SUFFIXES:
@@ -385,6 +456,10 @@ clean-noinstLTLIBRARIES:
done
libpixman-1.la: $(libpixman_1_la_OBJECTS) $(libpixman_1_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libpixman_1_la_LDFLAGS) $(libpixman_1_la_OBJECTS) $(libpixman_1_la_LIBADD) $(LIBS)
+libpixman-arm-neon.la: $(libpixman_arm_neon_la_OBJECTS) $(libpixman_arm_neon_la_DEPENDENCIES)
+ $(LINK) $(am_libpixman_arm_neon_la_rpath) $(libpixman_arm_neon_la_LDFLAGS) $(libpixman_arm_neon_la_OBJECTS) $(libpixman_arm_neon_la_LIBADD) $(LIBS)
+libpixman-arm-simd.la: $(libpixman_arm_simd_la_OBJECTS) $(libpixman_arm_simd_la_DEPENDENCIES)
+ $(LINK) $(am_libpixman_arm_simd_la_rpath) $(libpixman_arm_simd_la_LDFLAGS) $(libpixman_arm_simd_la_OBJECTS) $(libpixman_arm_simd_la_LIBADD) $(LIBS)
libpixman-mmx.la: $(libpixman_mmx_la_OBJECTS) $(libpixman_mmx_la_DEPENDENCIES)
$(LINK) $(am_libpixman_mmx_la_rpath) $(libpixman_mmx_la_LDFLAGS) $(libpixman_mmx_la_OBJECTS) $(libpixman_mmx_la_LIBADD) $(LIBS)
libpixman-sse2.la: $(libpixman_sse2_la_OBJECTS) $(libpixman_sse2_la_DEPENDENCIES)
@@ -400,23 +475,33 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-access-accessors.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-access.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-bits-image.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-combine32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-combine64.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-compose-accessors.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-compose.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-compute-region.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-conical-gradient.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-cpu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-edge-accessors.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-edge.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-fast-path.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-general.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-gradient-walker.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-image.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-implementation.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-linear-gradient.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-matrix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-pict.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-radial-gradient.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-region16.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-region32.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-source.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-solid-fill.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-timer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-transformed-accessors.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-transformed.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-trap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_1_la-pixman-utils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_arm_neon_la-pixman-arm-neon.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_arm_simd_la-pixman-arm-simd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_mmx_la-pixman-mmx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_sse2_la-pixman-sse2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpixman_vmx_la-pixman-vmx.Plo@am__quote@
@@ -456,6 +541,20 @@ libpixman_1_la-pixman-access-accessors.lo: pixman-access-accessors.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-access-accessors.lo `test -f 'pixman-access-accessors.c' || echo '$(srcdir)/'`pixman-access-accessors.c
+libpixman_1_la-pixman-cpu.lo: pixman-cpu.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-cpu.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-cpu.Tpo" -c -o libpixman_1_la-pixman-cpu.lo `test -f 'pixman-cpu.c' || echo '$(srcdir)/'`pixman-cpu.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-cpu.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-cpu.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-cpu.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-cpu.c' object='libpixman_1_la-pixman-cpu.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-cpu.lo `test -f 'pixman-cpu.c' || echo '$(srcdir)/'`pixman-cpu.c
+
+libpixman_1_la-pixman-gradient-walker.lo: pixman-gradient-walker.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-gradient-walker.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-gradient-walker.Tpo" -c -o libpixman_1_la-pixman-gradient-walker.lo `test -f 'pixman-gradient-walker.c' || echo '$(srcdir)/'`pixman-gradient-walker.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-gradient-walker.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-gradient-walker.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-gradient-walker.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-gradient-walker.c' object='libpixman_1_la-pixman-gradient-walker.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-gradient-walker.lo `test -f 'pixman-gradient-walker.c' || echo '$(srcdir)/'`pixman-gradient-walker.c
+
libpixman_1_la-pixman-region16.lo: pixman-region16.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-region16.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-region16.Tpo" -c -o libpixman_1_la-pixman-region16.lo `test -f 'pixman-region16.c' || echo '$(srcdir)/'`pixman-region16.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-region16.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-region16.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-region16.Tpo"; exit 1; fi
@@ -477,6 +576,13 @@ libpixman_1_la-pixman-image.lo: pixman-image.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-image.lo `test -f 'pixman-image.c' || echo '$(srcdir)/'`pixman-image.c
+libpixman_1_la-pixman-implementation.lo: pixman-implementation.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-implementation.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-implementation.Tpo" -c -o libpixman_1_la-pixman-implementation.lo `test -f 'pixman-implementation.c' || echo '$(srcdir)/'`pixman-implementation.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-implementation.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-implementation.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-implementation.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-implementation.c' object='libpixman_1_la-pixman-implementation.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-implementation.lo `test -f 'pixman-implementation.c' || echo '$(srcdir)/'`pixman-implementation.c
+
libpixman_1_la-pixman-combine32.lo: pixman-combine32.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-combine32.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-combine32.Tpo" -c -o libpixman_1_la-pixman-combine32.lo `test -f 'pixman-combine32.c' || echo '$(srcdir)/'`pixman-combine32.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-combine32.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-combine32.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-combine32.Tpo"; exit 1; fi
@@ -491,19 +597,12 @@ libpixman_1_la-pixman-combine64.lo: pixman-combine64.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-combine64.lo `test -f 'pixman-combine64.c' || echo '$(srcdir)/'`pixman-combine64.c
-libpixman_1_la-pixman-compose.lo: pixman-compose.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-compose.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-compose.Tpo" -c -o libpixman_1_la-pixman-compose.lo `test -f 'pixman-compose.c' || echo '$(srcdir)/'`pixman-compose.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-compose.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-compose.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-compose.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-compose.c' object='libpixman_1_la-pixman-compose.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-compose.lo `test -f 'pixman-compose.c' || echo '$(srcdir)/'`pixman-compose.c
-
-libpixman_1_la-pixman-compose-accessors.lo: pixman-compose-accessors.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-compose-accessors.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-compose-accessors.Tpo" -c -o libpixman_1_la-pixman-compose-accessors.lo `test -f 'pixman-compose-accessors.c' || echo '$(srcdir)/'`pixman-compose-accessors.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-compose-accessors.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-compose-accessors.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-compose-accessors.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-compose-accessors.c' object='libpixman_1_la-pixman-compose-accessors.lo' libtool=yes @AMDEPBACKSLASH@
+libpixman_1_la-pixman-general.lo: pixman-general.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-general.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-general.Tpo" -c -o libpixman_1_la-pixman-general.lo `test -f 'pixman-general.c' || echo '$(srcdir)/'`pixman-general.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-general.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-general.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-general.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-general.c' object='libpixman_1_la-pixman-general.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-compose-accessors.lo `test -f 'pixman-compose-accessors.c' || echo '$(srcdir)/'`pixman-compose-accessors.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-general.lo `test -f 'pixman-general.c' || echo '$(srcdir)/'`pixman-general.c
libpixman_1_la-pixman-pict.lo: pixman-pict.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-pict.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-pict.Tpo" -c -o libpixman_1_la-pixman-pict.lo `test -f 'pixman-pict.c' || echo '$(srcdir)/'`pixman-pict.c; \
@@ -512,12 +611,47 @@ libpixman_1_la-pixman-pict.lo: pixman-pict.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-pict.lo `test -f 'pixman-pict.c' || echo '$(srcdir)/'`pixman-pict.c
-libpixman_1_la-pixman-source.lo: pixman-source.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-source.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-source.Tpo" -c -o libpixman_1_la-pixman-source.lo `test -f 'pixman-source.c' || echo '$(srcdir)/'`pixman-source.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-source.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-source.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-source.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-source.c' object='libpixman_1_la-pixman-source.lo' libtool=yes @AMDEPBACKSLASH@
+libpixman_1_la-pixman-fast-path.lo: pixman-fast-path.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-fast-path.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-fast-path.Tpo" -c -o libpixman_1_la-pixman-fast-path.lo `test -f 'pixman-fast-path.c' || echo '$(srcdir)/'`pixman-fast-path.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-fast-path.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-fast-path.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-fast-path.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-fast-path.c' object='libpixman_1_la-pixman-fast-path.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-source.lo `test -f 'pixman-source.c' || echo '$(srcdir)/'`pixman-source.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-fast-path.lo `test -f 'pixman-fast-path.c' || echo '$(srcdir)/'`pixman-fast-path.c
+
+libpixman_1_la-pixman-solid-fill.lo: pixman-solid-fill.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-solid-fill.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-solid-fill.Tpo" -c -o libpixman_1_la-pixman-solid-fill.lo `test -f 'pixman-solid-fill.c' || echo '$(srcdir)/'`pixman-solid-fill.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-solid-fill.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-solid-fill.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-solid-fill.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-solid-fill.c' object='libpixman_1_la-pixman-solid-fill.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-solid-fill.lo `test -f 'pixman-solid-fill.c' || echo '$(srcdir)/'`pixman-solid-fill.c
+
+libpixman_1_la-pixman-conical-gradient.lo: pixman-conical-gradient.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-conical-gradient.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-conical-gradient.Tpo" -c -o libpixman_1_la-pixman-conical-gradient.lo `test -f 'pixman-conical-gradient.c' || echo '$(srcdir)/'`pixman-conical-gradient.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-conical-gradient.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-conical-gradient.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-conical-gradient.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-conical-gradient.c' object='libpixman_1_la-pixman-conical-gradient.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-conical-gradient.lo `test -f 'pixman-conical-gradient.c' || echo '$(srcdir)/'`pixman-conical-gradient.c
+
+libpixman_1_la-pixman-linear-gradient.lo: pixman-linear-gradient.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-linear-gradient.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-linear-gradient.Tpo" -c -o libpixman_1_la-pixman-linear-gradient.lo `test -f 'pixman-linear-gradient.c' || echo '$(srcdir)/'`pixman-linear-gradient.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-linear-gradient.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-linear-gradient.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-linear-gradient.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-linear-gradient.c' object='libpixman_1_la-pixman-linear-gradient.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-linear-gradient.lo `test -f 'pixman-linear-gradient.c' || echo '$(srcdir)/'`pixman-linear-gradient.c
+
+libpixman_1_la-pixman-radial-gradient.lo: pixman-radial-gradient.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-radial-gradient.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-radial-gradient.Tpo" -c -o libpixman_1_la-pixman-radial-gradient.lo `test -f 'pixman-radial-gradient.c' || echo '$(srcdir)/'`pixman-radial-gradient.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-radial-gradient.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-radial-gradient.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-radial-gradient.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-radial-gradient.c' object='libpixman_1_la-pixman-radial-gradient.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-radial-gradient.lo `test -f 'pixman-radial-gradient.c' || echo '$(srcdir)/'`pixman-radial-gradient.c
+
+libpixman_1_la-pixman-bits-image.lo: pixman-bits-image.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-bits-image.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-bits-image.Tpo" -c -o libpixman_1_la-pixman-bits-image.lo `test -f 'pixman-bits-image.c' || echo '$(srcdir)/'`pixman-bits-image.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-bits-image.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-bits-image.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-bits-image.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-bits-image.c' object='libpixman_1_la-pixman-bits-image.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-bits-image.lo `test -f 'pixman-bits-image.c' || echo '$(srcdir)/'`pixman-bits-image.c
libpixman_1_la-pixman-transformed.lo: pixman-transformed.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-transformed.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-transformed.Tpo" -c -o libpixman_1_la-pixman-transformed.lo `test -f 'pixman-transformed.c' || echo '$(srcdir)/'`pixman-transformed.c; \
@@ -575,6 +709,27 @@ libpixman_1_la-pixman-timer.lo: pixman-timer.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-timer.lo `test -f 'pixman-timer.c' || echo '$(srcdir)/'`pixman-timer.c
+libpixman_1_la-pixman-matrix.lo: pixman-matrix.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -MT libpixman_1_la-pixman-matrix.lo -MD -MP -MF "$(DEPDIR)/libpixman_1_la-pixman-matrix.Tpo" -c -o libpixman_1_la-pixman-matrix.lo `test -f 'pixman-matrix.c' || echo '$(srcdir)/'`pixman-matrix.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_1_la-pixman-matrix.Tpo" "$(DEPDIR)/libpixman_1_la-pixman-matrix.Plo"; else rm -f "$(DEPDIR)/libpixman_1_la-pixman-matrix.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-matrix.c' object='libpixman_1_la-pixman-matrix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_1_la_CFLAGS) $(CFLAGS) -c -o libpixman_1_la-pixman-matrix.lo `test -f 'pixman-matrix.c' || echo '$(srcdir)/'`pixman-matrix.c
+
+libpixman_arm_neon_la-pixman-arm-neon.lo: pixman-arm-neon.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_arm_neon_la_CFLAGS) $(CFLAGS) -MT libpixman_arm_neon_la-pixman-arm-neon.lo -MD -MP -MF "$(DEPDIR)/libpixman_arm_neon_la-pixman-arm-neon.Tpo" -c -o libpixman_arm_neon_la-pixman-arm-neon.lo `test -f 'pixman-arm-neon.c' || echo '$(srcdir)/'`pixman-arm-neon.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_arm_neon_la-pixman-arm-neon.Tpo" "$(DEPDIR)/libpixman_arm_neon_la-pixman-arm-neon.Plo"; else rm -f "$(DEPDIR)/libpixman_arm_neon_la-pixman-arm-neon.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-arm-neon.c' object='libpixman_arm_neon_la-pixman-arm-neon.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_arm_neon_la_CFLAGS) $(CFLAGS) -c -o libpixman_arm_neon_la-pixman-arm-neon.lo `test -f 'pixman-arm-neon.c' || echo '$(srcdir)/'`pixman-arm-neon.c
+
+libpixman_arm_simd_la-pixman-arm-simd.lo: pixman-arm-simd.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_arm_simd_la_CFLAGS) $(CFLAGS) -MT libpixman_arm_simd_la-pixman-arm-simd.lo -MD -MP -MF "$(DEPDIR)/libpixman_arm_simd_la-pixman-arm-simd.Tpo" -c -o libpixman_arm_simd_la-pixman-arm-simd.lo `test -f 'pixman-arm-simd.c' || echo '$(srcdir)/'`pixman-arm-simd.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_arm_simd_la-pixman-arm-simd.Tpo" "$(DEPDIR)/libpixman_arm_simd_la-pixman-arm-simd.Plo"; else rm -f "$(DEPDIR)/libpixman_arm_simd_la-pixman-arm-simd.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pixman-arm-simd.c' object='libpixman_arm_simd_la-pixman-arm-simd.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_arm_simd_la_CFLAGS) $(CFLAGS) -c -o libpixman_arm_simd_la-pixman-arm-simd.lo `test -f 'pixman-arm-simd.c' || echo '$(srcdir)/'`pixman-arm-simd.c
+
libpixman_mmx_la-pixman-mmx.lo: pixman-mmx.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpixman_mmx_la_CFLAGS) $(CFLAGS) -MT libpixman_mmx_la-pixman-mmx.lo -MD -MP -MF "$(DEPDIR)/libpixman_mmx_la-pixman-mmx.Tpo" -c -o libpixman_mmx_la-pixman-mmx.lo `test -f 'pixman-mmx.c' || echo '$(srcdir)/'`pixman-mmx.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libpixman_mmx_la-pixman-mmx.Tpo" "$(DEPDIR)/libpixman_mmx_la-pixman-mmx.Plo"; else rm -f "$(DEPDIR)/libpixman_mmx_la-pixman-mmx.Tpo"; exit 1; fi
diff --git a/lib/pixman/pixman/Makefile.win32 b/lib/pixman/pixman/Makefile.win32
index ad30f8c46..208bb2e39 100644
--- a/lib/pixman/pixman/Makefile.win32
+++ b/lib/pixman/pixman/Makefile.win32
@@ -49,6 +49,7 @@ SOURCES = \
pixman-trap.c \
pixman-compute-region.c \
pixman-timer.c \
+ pixman-matrix.c \
$(NULL)
# MMX compilation flags
diff --git a/lib/pixman/pixman/combine.h.inc b/lib/pixman/pixman/combine.h.inc
index 8c70cb78d..6ecd30139 100644
--- a/lib/pixman/pixman/combine.h.inc
+++ b/lib/pixman/pixman/combine.h.inc
@@ -3,12 +3,12 @@
#define MASK
#define ONE_HALF
-#define G_SHIFT
-#define B_SHIFT
#define A_SHIFT
-#define G_MASK
-#define B_MASK
+#define R_SHIFT
+#define G_SHIFT
#define A_MASK
+#define R_MASK
+#define G_MASK
#define RB_MASK
#define AG_MASK
@@ -97,55 +97,41 @@
\
t = (x & G_MASK) * a + (y & G_MASK) * b; \
t += (t >> G_SHIFT) + (ONE_HALF << G_SHIFT); \
- t >>= B_SHIFT; \
+ t >>= R_SHIFT; \
\
- t |= r << B_SHIFT; \
+ t |= r << R_SHIFT; \
t |= RB_MASK_PLUS_ONE - ((t >> G_SHIFT) & RB_MASK); \
t &= RB_MASK; \
t <<= G_SHIFT; \
\
- r = ((x >> B_SHIFT) & MASK) * a + \
- ((y >> B_SHIFT) & MASK) * b + ONE_HALF; \
+ r = ((x >> R_SHIFT) & MASK) * a + \
+ ((y >> R_SHIFT) & MASK) * b + ONE_HALF; \
r += (r >> G_SHIFT); \
r >>= G_SHIFT; \
\
x = (x & MASK) * a + (y & MASK) * b + ONE_HALF; \
x += (x >> G_SHIFT); \
x >>= G_SHIFT; \
- x |= r << B_SHIFT; \
+ x |= r << R_SHIFT; \
x |= RB_MASK_PLUS_ONE - ((x >> G_SHIFT) & RB_MASK); \
x &= RB_MASK; \
x |= t; \
} while (0)
/*
- x_c = (x_c * a + y_c *b) / 256
-*/
-#define FbByteAddMul_256(x, a, y, b) do { \
- comp4_t t = (x & RB_MASK) * a + (y & RB_MASK) * b; \
- t >>= G_SHIFT; \
- t &= RB_MASK; \
- \
- x = ((x >> G_SHIFT) & RB_MASK) * a + \
- ((y >> G_SHIFT) & RB_MASK) * b; \
- x &= AG_MASK; \
- x += t; \
- } while (0)
-
-/*
x_c = (x_c * a_c) / 255
*/
#define FbByteMulC(x, a) do { \
comp4_t t; \
comp4_t r = (x & MASK) * (a & MASK); \
- r |= (x & B_MASK) * ((a >> B_SHIFT) & MASK); \
+ r |= (x & R_MASK) * ((a >> R_SHIFT) & MASK); \
r += RB_ONE_HALF; \
r = (r + ((r >> G_SHIFT) & RB_MASK)) >> G_SHIFT; \
r &= RB_MASK; \
\
x >>= G_SHIFT; \
t = (x & MASK) * ((a >> G_SHIFT) & MASK); \
- t |= (x & B_MASK) * (a >> A_SHIFT); \
+ t |= (x & R_MASK) * (a >> A_SHIFT); \
t += RB_ONE_HALF; \
t = t + ((t >> G_SHIFT) & RB_MASK); \
x = r | (t & AG_MASK); \
@@ -157,7 +143,7 @@
#define FbByteMulAddC(x, a, y) do { \
comp4_t t; \
comp4_t r = (x & MASK) * (a & MASK); \
- r |= (x & B_MASK) * ((a >> B_SHIFT) & MASK); \
+ r |= (x & R_MASK) * ((a >> R_SHIFT) & MASK); \
r += RB_ONE_HALF; \
r = (r + ((r >> G_SHIFT) & RB_MASK)) >> G_SHIFT; \
r &= RB_MASK; \
@@ -167,7 +153,7 @@
\
x >>= G_SHIFT; \
t = (x & MASK) * ((a >> G_SHIFT) & MASK); \
- t |= (x & B_MASK) * (a >> A_SHIFT); \
+ t |= (x & R_MASK) * (a >> A_SHIFT); \
t += RB_ONE_HALF; \
t = (t + ((t >> G_SHIFT) & RB_MASK)) >> G_SHIFT; \
t &= RB_MASK; \
@@ -189,22 +175,22 @@
\
t = (x & G_MASK) * ((a >> G_SHIFT) & MASK) + (y & G_MASK) * b; \
t += (t >> G_SHIFT) + (ONE_HALF << G_SHIFT); \
- t >>= B_SHIFT; \
+ t >>= R_SHIFT; \
\
- t |= r << B_SHIFT; \
+ t |= r << R_SHIFT; \
t |= RB_MASK_PLUS_ONE - ((t >> G_SHIFT) & RB_MASK); \
t &= RB_MASK; \
t <<= G_SHIFT; \
\
- r = ((x >> B_SHIFT) & MASK) * ((a >> B_SHIFT) & MASK) + \
- ((y >> B_SHIFT) & MASK) * b + ONE_HALF; \
+ r = ((x >> R_SHIFT) & MASK) * ((a >> R_SHIFT) & MASK) + \
+ ((y >> R_SHIFT) & MASK) * b + ONE_HALF; \
r += (r >> G_SHIFT); \
r >>= G_SHIFT; \
\
x = (x & MASK) * (a & MASK) + (y & MASK) * b + ONE_HALF; \
x += (x >> G_SHIFT); \
x >>= G_SHIFT; \
- x |= r << B_SHIFT; \
+ x |= r << R_SHIFT; \
x |= RB_MASK_PLUS_ONE - ((x >> G_SHIFT) & RB_MASK); \
x &= RB_MASK; \
x |= t; \
diff --git a/lib/pixman/pixman/combine.inc b/lib/pixman/pixman/combine.inc
index 9f88dee15..0d5569400 100644
--- a/lib/pixman/pixman/combine.inc
+++ b/lib/pixman/pixman/combine.inc
@@ -18,43 +18,64 @@
/*
- * Combine src and mask
+ * All of the composing functions
*/
-FASTCALL static void
-pixman_fbCombineMaskU (comp4_t *src, const comp4_t *mask, int width)
+
+static force_inline comp4_t
+combineMask (const comp4_t *src, const comp4_t *mask, int i)
{
- int i;
- for (i = 0; i < width; ++i) {
- comp4_t a = *(mask + i) >> A_SHIFT;
- comp4_t s = *(src + i);
- FbByteMul(s, a);
- *(src + i) = s;
+ comp4_t s, m;
+
+ if (mask)
+ {
+ m = *(mask + i) >> A_SHIFT;
+
+ if (!m)
+ return 0;
}
-}
-/*
- * All of the composing functions
- */
+ s = *(src + i);
+
+ if (mask)
+ FbByteMul (s, m);
+
+ return s;
+}
FASTCALL static void
-fbCombineClear (comp4_t *dest, const comp4_t *src, int width)
+fbCombineClear (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
memset(dest, 0, width*sizeof(comp4_t));
}
FASTCALL static void
-fbCombineSrcU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineSrcU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- memcpy(dest, src, width*sizeof(comp4_t));
+ int i;
+
+ if (!mask)
+ memcpy (dest, src, width * sizeof (comp4_t));
+ else
+ {
+ for (i = 0; i < width; ++i)
+ {
+ comp4_t s = combineMask (src, mask, i);
+
+ *(dest + i) = s;
+ }
+ }
}
/* if the Src is opaque, call fbCombineSrcU */
FASTCALL static void
-fbCombineOverU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineOverU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
comp4_t ia = Alpha(~s);
@@ -65,11 +86,12 @@ fbCombineOverU (comp4_t *dest, const comp4_t *src, int width)
/* if the Dst is opaque, this is a noop */
FASTCALL static void
-fbCombineOverReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineOverReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
comp4_t ia = Alpha(~*(dest + i));
FbByteMulAdd(s, ia, d);
@@ -79,11 +101,12 @@ fbCombineOverReverseU (comp4_t *dest, const comp4_t *src, int width)
/* if the Dst is opaque, call fbCombineSrcU */
FASTCALL static void
-fbCombineInU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineInU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t a = Alpha(*(dest + i));
FbByteMul(s, a);
*(dest + i) = s;
@@ -92,12 +115,14 @@ fbCombineInU (comp4_t *dest, const comp4_t *src, int width)
/* if the Src is opaque, this is a noop */
FASTCALL static void
-fbCombineInReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineInReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t d = *(dest + i);
- comp4_t a = Alpha(*(src + i));
+ comp4_t s = combineMask (src, mask, i);
+ comp4_t d = *(dest + i);
+ comp4_t a = Alpha(s);
FbByteMul(d, a);
*(dest + i) = d;
}
@@ -105,11 +130,12 @@ fbCombineInReverseU (comp4_t *dest, const comp4_t *src, int width)
/* if the Dst is opaque, call fbCombineClear */
FASTCALL static void
-fbCombineOutU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineOutU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t a = Alpha(~*(dest + i));
FbByteMul(s, a);
*(dest + i) = s;
@@ -118,12 +144,14 @@ fbCombineOutU (comp4_t *dest, const comp4_t *src, int width)
/* if the Src is opaque, call fbCombineClear */
FASTCALL static void
-fbCombineOutReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineOutReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
- comp4_t a = Alpha(~*(src + i));
+ comp4_t a = Alpha(~s);
FbByteMul(d, a);
*(dest + i) = d;
}
@@ -133,11 +161,12 @@ fbCombineOutReverseU (comp4_t *dest, const comp4_t *src, int width)
/* if the Dst is opaque, call fbCombineOverU */
/* if both the Src and Dst are opaque, call fbCombineSrcU */
FASTCALL static void
-fbCombineAtopU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineAtopU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
comp4_t dest_a = Alpha(d);
comp4_t src_ia = Alpha(~s);
@@ -151,11 +180,12 @@ fbCombineAtopU (comp4_t *dest, const comp4_t *src, int width)
/* if the Dst is opaque, call fbCombineInReverseU */
/* if both the Src and Dst are opaque, call fbCombineDstU */
FASTCALL static void
-fbCombineAtopReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
comp4_t src_a = Alpha(s);
comp4_t dest_ia = Alpha(~d);
@@ -169,11 +199,12 @@ fbCombineAtopReverseU (comp4_t *dest, const comp4_t *src, int width)
/* if the Dst is opaque, call fbCombineOverReverseU */
/* if both the Src and Dst are opaque, call fbCombineClear */
FASTCALL static void
-fbCombineXorU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineXorU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
comp4_t src_ia = Alpha(~s);
comp4_t dest_ia = Alpha(~d);
@@ -184,11 +215,12 @@ fbCombineXorU (comp4_t *dest, const comp4_t *src, int width)
}
FASTCALL static void
-fbCombineAddU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineAddU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
FbByteAdd(d, s);
*(dest + i) = d;
@@ -199,11 +231,12 @@ fbCombineAddU (comp4_t *dest, const comp4_t *src, int width)
/* if the Dst is opaque, call fbCombineAddU */
/* if both the Src and Dst are opaque, call fbCombineAddU */
FASTCALL static void
-fbCombineSaturateU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineSaturateU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
comp2_t sa, da;
@@ -311,11 +344,11 @@ fbCombineConjointInPart (comp1_t a, comp1_t b)
}
FASTCALL static void
-fbCombineDisjointGeneralU (comp4_t *dest, const comp4_t *src, int width, comp1_t combine)
+fbCombineDisjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
comp4_t m,n,o,p;
comp2_t Fa, Fb, t, u, v;
@@ -353,7 +386,7 @@ fbCombineDisjointGeneralU (comp4_t *dest, const comp4_t *src, int width, comp1_t
}
m = FbGen (s,d,0,Fa,Fb,t, u, v);
n = FbGen (s,d,G_SHIFT,Fa,Fb,t, u, v);
- o = FbGen (s,d,B_SHIFT,Fa,Fb,t, u, v);
+ o = FbGen (s,d,R_SHIFT,Fa,Fb,t, u, v);
p = FbGen (s,d,A_SHIFT,Fa,Fb,t, u, v);
s = m|n|o|p;
*(dest + i) = s;
@@ -361,11 +394,12 @@ fbCombineDisjointGeneralU (comp4_t *dest, const comp4_t *src, int width, comp1_t
}
FASTCALL static void
-fbCombineDisjointOverU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineDisjointOverU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp2_t a = s >> A_SHIFT;
if (a != 0x00)
@@ -383,53 +417,60 @@ fbCombineDisjointOverU (comp4_t *dest, const comp4_t *src, int width)
}
FASTCALL static void
-fbCombineDisjointInU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineDisjointInU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineDisjointGeneralU (dest, src, width, CombineAIn);
+ fbCombineDisjointGeneralU (dest, src, mask, width, CombineAIn);
}
FASTCALL static void
-fbCombineDisjointInReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineDisjointInReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineDisjointGeneralU (dest, src, width, CombineBIn);
+ fbCombineDisjointGeneralU (dest, src, mask, width, CombineBIn);
}
FASTCALL static void
-fbCombineDisjointOutU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineDisjointOutU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineDisjointGeneralU (dest, src, width, CombineAOut);
+ fbCombineDisjointGeneralU (dest, src, mask, width, CombineAOut);
}
FASTCALL static void
-fbCombineDisjointOutReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineDisjointOutReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineDisjointGeneralU (dest, src, width, CombineBOut);
+ fbCombineDisjointGeneralU (dest, src, mask, width, CombineBOut);
}
FASTCALL static void
-fbCombineDisjointAtopU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineDisjointAtopU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineDisjointGeneralU (dest, src, width, CombineAAtop);
+ fbCombineDisjointGeneralU (dest, src, mask, width, CombineAAtop);
}
FASTCALL static void
-fbCombineDisjointAtopReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineDisjointAtopReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineDisjointGeneralU (dest, src, width, CombineBAtop);
+ fbCombineDisjointGeneralU (dest, src, mask, width, CombineBAtop);
}
FASTCALL static void
-fbCombineDisjointXorU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineDisjointXorU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineDisjointGeneralU (dest, src, width, CombineXor);
+ fbCombineDisjointGeneralU (dest, src, mask, width, CombineXor);
}
FASTCALL static void
-fbCombineConjointGeneralU (comp4_t *dest, const comp4_t *src, int width, comp1_t combine)
+fbCombineConjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine)
{
int i;
for (i = 0; i < width; ++i) {
- comp4_t s = *(src + i);
+ comp4_t s = combineMask (src, mask, i);
comp4_t d = *(dest + i);
comp4_t m,n,o,p;
comp2_t Fa, Fb, t, u, v;
@@ -467,7 +508,7 @@ fbCombineConjointGeneralU (comp4_t *dest, const comp4_t *src, int width, comp1_t
}
m = FbGen (s,d,0,Fa,Fb,t, u, v);
n = FbGen (s,d,G_SHIFT,Fa,Fb,t, u, v);
- o = FbGen (s,d,B_SHIFT,Fa,Fb,t, u, v);
+ o = FbGen (s,d,R_SHIFT,Fa,Fb,t, u, v);
p = FbGen (s,d,A_SHIFT,Fa,Fb,t, u, v);
s = m|n|o|p;
*(dest + i) = s;
@@ -475,60 +516,69 @@ fbCombineConjointGeneralU (comp4_t *dest, const comp4_t *src, int width, comp1_t
}
FASTCALL static void
-fbCombineConjointOverU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointOverU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineAOver);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineAOver);
}
FASTCALL static void
-fbCombineConjointOverReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointOverReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineBOver);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineBOver);
}
FASTCALL static void
-fbCombineConjointInU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointInU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineAIn);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineAIn);
}
FASTCALL static void
-fbCombineConjointInReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointInReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineBIn);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineBIn);
}
FASTCALL static void
-fbCombineConjointOutU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointOutU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineAOut);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineAOut);
}
FASTCALL static void
-fbCombineConjointOutReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointOutReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineBOut);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineBOut);
}
FASTCALL static void
-fbCombineConjointAtopU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointAtopU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineAAtop);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineAAtop);
}
FASTCALL static void
-fbCombineConjointAtopReverseU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointAtopReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineBAtop);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineBAtop);
}
FASTCALL static void
-fbCombineConjointXorU (comp4_t *dest, const comp4_t *src, int width)
+fbCombineConjointXorU (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
- fbCombineConjointGeneralU (dest, src, width, CombineXor);
+ fbCombineConjointGeneralU (dest, src, mask, width, CombineXor);
}
/********************************************************************************/
@@ -554,7 +604,7 @@ fbCombineMaskC (comp4_t *src, comp4_t *mask)
{
x = x >> A_SHIFT;
x |= x << G_SHIFT;
- x |= x << B_SHIFT;
+ x |= x << R_SHIFT;
*(mask) = x;
return;
}
@@ -602,7 +652,7 @@ fbCombineMaskAlphaC (const comp4_t *src, comp4_t *mask)
{
x = x >> A_SHIFT;
x |= x << G_SHIFT;
- x |= x << B_SHIFT;
+ x |= x << R_SHIFT;
*(mask) = x;
return;
}
@@ -611,16 +661,16 @@ fbCombineMaskAlphaC (const comp4_t *src, comp4_t *mask)
*(mask) = a;
}
-
-
FASTCALL static void
-fbCombineClearC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineClearC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
memset(dest, 0, width*sizeof(comp4_t));
}
FASTCALL static void
-fbCombineSrcC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineSrcC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -635,7 +685,8 @@ fbCombineSrcC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineOverC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineOverC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -661,7 +712,8 @@ fbCombineOverC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineOverReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -686,7 +738,8 @@ fbCombineOverReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineInC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineInC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -710,7 +763,8 @@ fbCombineInC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineInReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineInReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -736,7 +790,8 @@ fbCombineInReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineOutC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineOutC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -761,7 +816,8 @@ fbCombineOutC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineOutReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -787,7 +843,8 @@ fbCombineOutReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineAtopC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineAtopC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -808,7 +865,8 @@ fbCombineAtopC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineAtopReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -830,7 +888,8 @@ fbCombineAtopReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineXorC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineXorC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -851,7 +910,8 @@ fbCombineXorC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineAddC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineAddC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -868,7 +928,8 @@ fbCombineAddC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineSaturateC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineSaturateC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
int i;
@@ -885,7 +946,7 @@ fbCombineSaturateC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
fbCombineMaskC (&s, &m);
sa = (m >> A_SHIFT);
- sr = (m >> B_SHIFT) & MASK;
+ sr = (m >> R_SHIFT) & MASK;
sg = (m >> G_SHIFT) & MASK;
sb = m & MASK;
da = ~d >> A_SHIFT;
@@ -901,9 +962,9 @@ fbCombineSaturateC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
n = FbGen (s, d, G_SHIFT, (da << G_SHIFT) / sg, MASK, t, u, v);
if (sr <= da)
- o = Add(s,d,B_SHIFT,t);
+ o = Add(s,d,R_SHIFT,t);
else
- o = FbGen (s, d, B_SHIFT, (da << G_SHIFT) / sr, MASK, t, u, v);
+ o = FbGen (s, d, R_SHIFT, (da << G_SHIFT) / sr, MASK, t, u, v);
if (sa <= da)
p = Add(s,d,A_SHIFT,t);
@@ -915,7 +976,7 @@ fbCombineSaturateC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
}
FASTCALL static void
-fbCombineDisjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width, comp1_t combine)
+fbCombineDisjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine)
{
int i;
@@ -943,14 +1004,14 @@ fbCombineDisjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width
case CombineAOut:
m = (comp4_t)fbCombineDisjointOutPart ((comp1_t) (sa >> 0), da);
n = (comp4_t)fbCombineDisjointOutPart ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT;
- o = (comp4_t)fbCombineDisjointOutPart ((comp1_t) (sa >> B_SHIFT), da) << B_SHIFT;
+ o = (comp4_t)fbCombineDisjointOutPart ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT;
p = (comp4_t)fbCombineDisjointOutPart ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT;
Fa = m|n|o|p;
break;
case CombineAIn:
m = (comp4_t)fbCombineDisjointInPart ((comp1_t) (sa >> 0), da);
n = (comp4_t)fbCombineDisjointInPart ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT;
- o = (comp4_t)fbCombineDisjointInPart ((comp1_t) (sa >> B_SHIFT), da) << B_SHIFT;
+ o = (comp4_t)fbCombineDisjointInPart ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT;
p = (comp4_t)fbCombineDisjointInPart ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT;
Fa = m|n|o|p;
break;
@@ -966,14 +1027,14 @@ fbCombineDisjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width
case CombineBOut:
m = (comp4_t)fbCombineDisjointOutPart (da, (comp1_t) (sa >> 0));
n = (comp4_t)fbCombineDisjointOutPart (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT;
- o = (comp4_t)fbCombineDisjointOutPart (da, (comp1_t) (sa >> B_SHIFT)) << B_SHIFT;
+ o = (comp4_t)fbCombineDisjointOutPart (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT;
p = (comp4_t)fbCombineDisjointOutPart (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT;
Fb = m|n|o|p;
break;
case CombineBIn:
m = (comp4_t)fbCombineDisjointInPart (da, (comp1_t) (sa >> 0));
n = (comp4_t)fbCombineDisjointInPart (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT;
- o = (comp4_t)fbCombineDisjointInPart (da, (comp1_t) (sa >> B_SHIFT)) << B_SHIFT;
+ o = (comp4_t)fbCombineDisjointInPart (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT;
p = (comp4_t)fbCombineDisjointInPart (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT;
Fb = m|n|o|p;
break;
@@ -983,7 +1044,7 @@ fbCombineDisjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width
}
m = FbGen (s,d,0,GetComp(Fa,0),GetComp(Fb,0),t, u, v);
n = FbGen (s,d,G_SHIFT,GetComp(Fa,G_SHIFT),GetComp(Fb,G_SHIFT),t, u, v);
- o = FbGen (s,d,B_SHIFT,GetComp(Fa,B_SHIFT),GetComp(Fb,B_SHIFT),t, u, v);
+ o = FbGen (s,d,R_SHIFT,GetComp(Fa,R_SHIFT),GetComp(Fb,R_SHIFT),t, u, v);
p = FbGen (s,d,A_SHIFT,GetComp(Fa,A_SHIFT),GetComp(Fb,A_SHIFT),t, u, v);
s = m|n|o|p;
*(dest + i) = s;
@@ -991,55 +1052,63 @@ fbCombineDisjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width
}
FASTCALL static void
-fbCombineDisjointOverC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineDisjointOverC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineAOver);
}
FASTCALL static void
-fbCombineDisjointInC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineDisjointInC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineAIn);
}
FASTCALL static void
-fbCombineDisjointInReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineDisjointInReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineBIn);
}
FASTCALL static void
-fbCombineDisjointOutC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineDisjointOutC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineAOut);
}
FASTCALL static void
-fbCombineDisjointOutReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineDisjointOutReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineBOut);
}
FASTCALL static void
-fbCombineDisjointAtopC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineDisjointAtopC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineAAtop);
}
FASTCALL static void
-fbCombineDisjointAtopReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineDisjointAtopReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineBAtop);
}
FASTCALL static void
-fbCombineDisjointXorC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineDisjointXorC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineXor);
}
FASTCALL static void
-fbCombineConjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width, comp1_t combine)
+fbCombineConjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine)
{
int i;
@@ -1067,14 +1136,14 @@ fbCombineConjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width
case CombineAOut:
m = (comp4_t)fbCombineConjointOutPart ((comp1_t) (sa >> 0), da);
n = (comp4_t)fbCombineConjointOutPart ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT;
- o = (comp4_t)fbCombineConjointOutPart ((comp1_t) (sa >> B_SHIFT), da) << B_SHIFT;
+ o = (comp4_t)fbCombineConjointOutPart ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT;
p = (comp4_t)fbCombineConjointOutPart ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT;
Fa = m|n|o|p;
break;
case CombineAIn:
m = (comp4_t)fbCombineConjointInPart ((comp1_t) (sa >> 0), da);
n = (comp4_t)fbCombineConjointInPart ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT;
- o = (comp4_t)fbCombineConjointInPart ((comp1_t) (sa >> B_SHIFT), da) << B_SHIFT;
+ o = (comp4_t)fbCombineConjointInPart ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT;
p = (comp4_t)fbCombineConjointInPart ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT;
Fa = m|n|o|p;
break;
@@ -1090,14 +1159,14 @@ fbCombineConjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width
case CombineBOut:
m = (comp4_t)fbCombineConjointOutPart (da, (comp1_t) (sa >> 0));
n = (comp4_t)fbCombineConjointOutPart (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT;
- o = (comp4_t)fbCombineConjointOutPart (da, (comp1_t) (sa >> B_SHIFT)) << B_SHIFT;
+ o = (comp4_t)fbCombineConjointOutPart (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT;
p = (comp4_t)fbCombineConjointOutPart (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT;
Fb = m|n|o|p;
break;
case CombineBIn:
m = (comp4_t)fbCombineConjointInPart (da, (comp1_t) (sa >> 0));
n = (comp4_t)fbCombineConjointInPart (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT;
- o = (comp4_t)fbCombineConjointInPart (da, (comp1_t) (sa >> B_SHIFT)) << B_SHIFT;
+ o = (comp4_t)fbCombineConjointInPart (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT;
p = (comp4_t)fbCombineConjointInPart (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT;
Fb = m|n|o|p;
break;
@@ -1107,7 +1176,7 @@ fbCombineConjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width
}
m = FbGen (s,d,0,GetComp(Fa,0),GetComp(Fb,0),t, u, v);
n = FbGen (s,d,G_SHIFT,GetComp(Fa,G_SHIFT),GetComp(Fb,G_SHIFT),t, u, v);
- o = FbGen (s,d,B_SHIFT,GetComp(Fa,B_SHIFT),GetComp(Fb,B_SHIFT),t, u, v);
+ o = FbGen (s,d,R_SHIFT,GetComp(Fa,R_SHIFT),GetComp(Fb,R_SHIFT),t, u, v);
p = FbGen (s,d,A_SHIFT,GetComp(Fa,A_SHIFT),GetComp(Fb,A_SHIFT),t, u, v);
s = m|n|o|p;
*(dest + i) = s;
@@ -1115,155 +1184,156 @@ fbCombineConjointGeneralC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width
}
FASTCALL static void
-fbCombineConjointOverC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointOverC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineAOver);
}
FASTCALL static void
-fbCombineConjointOverReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointOverReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineBOver);
}
FASTCALL static void
-fbCombineConjointInC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointInC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineAIn);
}
FASTCALL static void
-fbCombineConjointInReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointInReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineBIn);
}
FASTCALL static void
-fbCombineConjointOutC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointOutC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineAOut);
}
FASTCALL static void
-fbCombineConjointOutReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointOutReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineBOut);
}
FASTCALL static void
-fbCombineConjointAtopC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointAtopC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineAAtop);
}
FASTCALL static void
-fbCombineConjointAtopReverseC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointAtopReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineBAtop);
}
FASTCALL static void
-fbCombineConjointXorC (comp4_t *dest, comp4_t *src, comp4_t *mask, int width)
+fbCombineConjointXorC (pixman_implementation_t *imp, pixman_op_t op,
+ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width)
{
fbCombineConjointGeneralC (dest, src, mask, width, CombineXor);
}
-static CombineFuncU pixman_fbCombineFuncU[] = {
- fbCombineClear,
- fbCombineSrcU,
- NULL, /* CombineDst */
- fbCombineOverU,
- fbCombineOverReverseU,
- fbCombineInU,
- fbCombineInReverseU,
- fbCombineOutU,
- fbCombineOutReverseU,
- fbCombineAtopU,
- fbCombineAtopReverseU,
- fbCombineXorU,
- fbCombineAddU,
- fbCombineSaturateU,
- NULL,
- NULL,
- fbCombineClear,
- fbCombineSrcU,
- NULL, /* CombineDst */
- fbCombineDisjointOverU,
- fbCombineSaturateU, /* DisjointOverReverse */
- fbCombineDisjointInU,
- fbCombineDisjointInReverseU,
- fbCombineDisjointOutU,
- fbCombineDisjointOutReverseU,
- fbCombineDisjointAtopU,
- fbCombineDisjointAtopReverseU,
- fbCombineDisjointXorU,
- NULL,
- NULL,
- NULL,
- NULL,
- fbCombineClear,
- fbCombineSrcU,
- NULL, /* CombineDst */
- fbCombineConjointOverU,
- fbCombineConjointOverReverseU,
- fbCombineConjointInU,
- fbCombineConjointInReverseU,
- fbCombineConjointOutU,
- fbCombineConjointOutReverseU,
- fbCombineConjointAtopU,
- fbCombineConjointAtopReverseU,
- fbCombineConjointXorU,
-};
-
-static CombineFuncC pixman_fbCombineFuncC[] = {
- fbCombineClearC,
- fbCombineSrcC,
- NULL, /* Dest */
- fbCombineOverC,
- fbCombineOverReverseC,
- fbCombineInC,
- fbCombineInReverseC,
- fbCombineOutC,
- fbCombineOutReverseC,
- fbCombineAtopC,
- fbCombineAtopReverseC,
- fbCombineXorC,
- fbCombineAddC,
- fbCombineSaturateC,
- NULL,
- NULL,
- fbCombineClearC, /* 0x10 */
- fbCombineSrcC,
- NULL, /* Dest */
- fbCombineDisjointOverC,
- fbCombineSaturateC, /* DisjointOverReverse */
- fbCombineDisjointInC,
- fbCombineDisjointInReverseC,
- fbCombineDisjointOutC,
- fbCombineDisjointOutReverseC,
- fbCombineDisjointAtopC,
- fbCombineDisjointAtopReverseC,
- fbCombineDisjointXorC, /* 0x1b */
- NULL,
- NULL,
- NULL,
- NULL,
- fbCombineClearC,
- fbCombineSrcC,
- NULL, /* Dest */
- fbCombineConjointOverC,
- fbCombineConjointOverReverseC,
- fbCombineConjointInC,
- fbCombineConjointInReverseC,
- fbCombineConjointOutC,
- fbCombineConjointOutReverseC,
- fbCombineConjointAtopC,
- fbCombineConjointAtopReverseC,
- fbCombineConjointXorC,
-};
-
-FbComposeFunctions pixman_composeFunctions = {
- pixman_fbCombineFuncU,
- pixman_fbCombineFuncC,
- pixman_fbCombineMaskU
-};
+void
+_pixman_setup_combiner_functions_width (pixman_implementation_t *imp)
+{
+ /* Unified alpha */
+ imp->combine_width[PIXMAN_OP_CLEAR] = fbCombineClear;
+ imp->combine_width[PIXMAN_OP_SRC] = fbCombineSrcU;
+ /* dest */
+ imp->combine_width[PIXMAN_OP_OVER] = fbCombineOverU;
+ imp->combine_width[PIXMAN_OP_OVER_REVERSE] = fbCombineOverReverseU;
+ imp->combine_width[PIXMAN_OP_IN] = fbCombineInU;
+ imp->combine_width[PIXMAN_OP_IN_REVERSE] = fbCombineInReverseU;
+ imp->combine_width[PIXMAN_OP_OUT] = fbCombineOutU;
+ imp->combine_width[PIXMAN_OP_OUT_REVERSE] = fbCombineOutReverseU;
+ imp->combine_width[PIXMAN_OP_ATOP] = fbCombineAtopU;
+ imp->combine_width[PIXMAN_OP_ATOP_REVERSE] = fbCombineAtopReverseU;
+ imp->combine_width[PIXMAN_OP_XOR] = fbCombineXorU;
+ imp->combine_width[PIXMAN_OP_ADD] = fbCombineAddU;
+ imp->combine_width[PIXMAN_OP_SATURATE] = fbCombineSaturateU;
+
+ /* Disjoint, unified */
+ imp->combine_width[PIXMAN_OP_DISJOINT_CLEAR] = fbCombineClear;
+ imp->combine_width[PIXMAN_OP_DISJOINT_SRC] = fbCombineSrcU;
+ /* dest */
+ imp->combine_width[PIXMAN_OP_DISJOINT_OVER] = fbCombineDisjointOverU;
+ imp->combine_width[PIXMAN_OP_DISJOINT_OVER_REVERSE] = fbCombineSaturateU;
+ imp->combine_width[PIXMAN_OP_DISJOINT_IN] = fbCombineDisjointInU;
+ imp->combine_width[PIXMAN_OP_DISJOINT_IN_REVERSE] = fbCombineDisjointInReverseU;
+ imp->combine_width[PIXMAN_OP_DISJOINT_OUT] = fbCombineDisjointOutU;
+ imp->combine_width[PIXMAN_OP_DISJOINT_OUT_REVERSE] = fbCombineDisjointOutReverseU;
+ imp->combine_width[PIXMAN_OP_DISJOINT_ATOP] = fbCombineDisjointAtopU;
+ imp->combine_width[PIXMAN_OP_DISJOINT_ATOP_REVERSE] = fbCombineDisjointAtopReverseU;
+ imp->combine_width[PIXMAN_OP_DISJOINT_XOR] = fbCombineDisjointXorU;
+
+ /* Conjoint, unified */
+ imp->combine_width[PIXMAN_OP_CONJOINT_CLEAR] = fbCombineClear;
+ imp->combine_width[PIXMAN_OP_CONJOINT_SRC] = fbCombineSrcU;
+ /* dest */
+ imp->combine_width[PIXMAN_OP_CONJOINT_OVER] = fbCombineConjointOverU;
+ imp->combine_width[PIXMAN_OP_CONJOINT_OVER_REVERSE] = fbCombineConjointOverReverseU;
+ imp->combine_width[PIXMAN_OP_CONJOINT_IN] = fbCombineConjointInU;
+ imp->combine_width[PIXMAN_OP_CONJOINT_IN_REVERSE] = fbCombineConjointInReverseU;
+ imp->combine_width[PIXMAN_OP_CONJOINT_OUT] = fbCombineConjointOutU;
+ imp->combine_width[PIXMAN_OP_CONJOINT_OUT_REVERSE] = fbCombineConjointOutReverseU;
+ imp->combine_width[PIXMAN_OP_CONJOINT_ATOP] = fbCombineConjointAtopU;
+ imp->combine_width[PIXMAN_OP_CONJOINT_ATOP_REVERSE] = fbCombineConjointAtopReverseU;
+ imp->combine_width[PIXMAN_OP_CONJOINT_XOR] = fbCombineConjointXorU;
+
+ /* Component alpha combiners */
+ imp->combine_width_ca[PIXMAN_OP_CLEAR] = fbCombineClearC;
+ imp->combine_width_ca[PIXMAN_OP_SRC] = fbCombineSrcC;
+ /* dest */
+ imp->combine_width_ca[PIXMAN_OP_OVER] = fbCombineOverC;
+ imp->combine_width_ca[PIXMAN_OP_OVER_REVERSE] = fbCombineOverReverseC;
+ imp->combine_width_ca[PIXMAN_OP_IN] = fbCombineInC;
+ imp->combine_width_ca[PIXMAN_OP_IN_REVERSE] = fbCombineInReverseC;
+ imp->combine_width_ca[PIXMAN_OP_OUT] = fbCombineOutC;
+ imp->combine_width_ca[PIXMAN_OP_OUT_REVERSE] = fbCombineOutReverseC;
+ imp->combine_width_ca[PIXMAN_OP_ATOP] = fbCombineAtopC;
+ imp->combine_width_ca[PIXMAN_OP_ATOP_REVERSE] = fbCombineAtopReverseC;
+ imp->combine_width_ca[PIXMAN_OP_XOR] = fbCombineXorC;
+ imp->combine_width_ca[PIXMAN_OP_ADD] = fbCombineAddC;
+ imp->combine_width_ca[PIXMAN_OP_SATURATE] = fbCombineSaturateC;
+
+ /* Disjoint CA */
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_CLEAR] = fbCombineClearC;
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_SRC] = fbCombineSrcC;
+ /* dest */
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_OVER] = fbCombineDisjointOverC;
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_OVER_REVERSE] = fbCombineSaturateC,
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_IN] = fbCombineDisjointInC;
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_IN_REVERSE] = fbCombineDisjointInReverseC;
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_OUT] = fbCombineDisjointOutC;
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_OUT_REVERSE] = fbCombineDisjointOutReverseC;
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_ATOP] = fbCombineDisjointAtopC;
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_ATOP_REVERSE] = fbCombineDisjointAtopReverseC;
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_XOR] = fbCombineDisjointXorC;
+
+ /* Conjoint CA */
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_CLEAR] = fbCombineClearC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_SRC] = fbCombineSrcC;
+ /* dest */
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_OVER] = fbCombineConjointOverC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_OVER_REVERSE] = fbCombineConjointOverReverseC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_IN] = fbCombineConjointInC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_IN_REVERSE] = fbCombineConjointInReverseC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_OUT] = fbCombineConjointOutC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_OUT_REVERSE] = fbCombineConjointOutReverseC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_ATOP] = fbCombineConjointAtopC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_ATOP_REVERSE] = fbCombineConjointAtopReverseC;
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_XOR] = fbCombineConjointXorC;
+}
diff --git a/lib/pixman/pixman/combine.pl b/lib/pixman/pixman/combine.pl
index f8df60374..3b7536205 100644
--- a/lib/pixman/pixman/combine.pl
+++ b/lib/pixman/pixman/combine.pl
@@ -47,10 +47,10 @@ while (<STDIN>) {
# Shifts and masks for green, blue, and alpha.
s/#define G_SHIFT\b/$& $size/;
- s/#define B_SHIFT\b/$& $size * 2/;
+ s/#define R_SHIFT\b/$& $size * 2/;
s/#define A_SHIFT\b/$& $size * 3/;
s/#define G_MASK\b/$& $g_mask/;
- s/#define B_MASK\b/$& $b_mask/;
+ s/#define R_MASK\b/$& $b_mask/;
s/#define A_MASK\b/$& $a_mask/;
# Special values for dealing with red + blue at the same time.
@@ -60,10 +60,10 @@ while (<STDIN>) {
s/#define RB_MASK_PLUS_ONE\b/$& $rb_mask_plus_one/;
# Add 32/64 suffix to combining function types.
- s/\bCombineFuncC\b/CombineFuncC$pixel_size/;
- s/\bCombineFuncU\b/CombineFuncU$pixel_size/;
- s/\bCombineMaskU\b/CombineMaskU$pixel_size/;
+ s/\bCombineFunc\b/CombineFunc$pixel_size/;
s/\bFbComposeFunctions\b/FbComposeFunctions$pixel_size/;
+ s/combine_width/combine_$pixel_size/;
+ s/_pixman_setup_combiner_functions_width/_pixman_setup_combiner_functions_$pixel_size/;
# Convert comp*_t values into the appropriate real types.
s/comp1_t/uint${size}_t/g;
diff --git a/lib/pixman/pixman/pixman-access.c b/lib/pixman/pixman/pixman-access.c
index d01f8bd59..6b3ce34fa 100644
--- a/lib/pixman/pixman/pixman-access.c
+++ b/lib/pixman/pixman/pixman-access.c
@@ -51,7 +51,7 @@
int offset1 = stride < 0 ? \
offset0 + ((-stride) >> 1) * ((pict->height) >> 1) : \
offset0 + (offset0 >> 2)
-/* Note n trailing semicolon on the above macro; if it's there, then
+/* Note no trailing semicolon on the above macro; if it's there, then
* the typical usage of YV12_SETUP(pict); will have an extra trailing ;
* that some compilers will interpret as a statement -- and then any further
* variable declarations will cause an error.
@@ -120,6 +120,36 @@ fbFetch_x8b8g8r8 (bits_image_t *pict, int x, int y, int width, uint32_t *buffer)
}
static FASTCALL void
+fbFetch_b8g8r8a8 (bits_image_t *pict, int x, int y, int width, uint32_t *buffer)
+{
+ const uint32_t *bits = pict->bits + y*pict->rowstride;
+ const uint32_t *pixel = (uint32_t *)bits + x;
+ const uint32_t *end = pixel + width;
+ while (pixel < end) {
+ uint32_t p = READ(pict, pixel++);
+ *buffer++ = ((p & 0xff000000) >> 24) |
+ ((p & 0x00ff0000) >> 8) |
+ ((p & 0x0000ff00) << 8) |
+ ((p & 0x000000ff) << 24);
+ }
+}
+
+static FASTCALL void
+fbFetch_b8g8r8x8 (bits_image_t *pict, int x, int y, int width, uint32_t *buffer)
+{
+ const uint32_t *bits = pict->bits + y*pict->rowstride;
+ const uint32_t *pixel = (uint32_t *)bits + x;
+ const uint32_t *end = pixel + width;
+ while (pixel < end) {
+ uint32_t p = READ(pict, pixel++);
+ *buffer++ = 0xff000000 |
+ ((p & 0xff000000) >> 24) |
+ ((p & 0x00ff0000) >> 8) |
+ ((p & 0x0000ff00) << 8);
+ }
+}
+
+static FASTCALL void
fbFetch_a2b10g10r10 (bits_image_t *pict, int x, int y, int width, uint64_t *buffer)
{
const uint32_t *bits = pict->bits + y*pict->rowstride;
@@ -648,10 +678,10 @@ fbFetch_yuy2 (bits_image_t *pict, int x, int line, int width, uint32_t *buffer)
/* B = 1.164(Y - 16) + 2.018(U - 128) */
b = 0x012b27 * y + 0x0206a2 * u;
- WRITE(pict, buffer++, 0xff000000 |
- (r >= 0 ? r < 0x1000000 ? r & 0xff0000 : 0xff0000 : 0) |
- (g >= 0 ? g < 0x1000000 ? (g >> 8) & 0x00ff00 : 0x00ff00 : 0) |
- (b >= 0 ? b < 0x1000000 ? (b >> 16) & 0x0000ff : 0x0000ff : 0));
+ WRITE(pict, buffer++, 0xff000000 |
+ (r >= 0 ? r < 0x1000000 ? r & 0xff0000 : 0xff0000 : 0) |
+ (g >= 0 ? g < 0x1000000 ? (g >> 8) & 0x00ff00 : 0x00ff00 : 0) |
+ (b >= 0 ? b < 0x1000000 ? (b >> 16) & 0x0000ff : 0x0000ff : 0));
}
}
@@ -693,6 +723,8 @@ fetchProc32 ACCESS(pixman_fetchProcForPicture32) (bits_image_t * pict)
case PIXMAN_x8r8g8b8: return fbFetch_x8r8g8b8;
case PIXMAN_a8b8g8r8: return fbFetch_a8b8g8r8;
case PIXMAN_x8b8g8r8: return fbFetch_x8b8g8r8;
+ case PIXMAN_b8g8r8a8: return fbFetch_b8g8r8a8;
+ case PIXMAN_b8g8r8x8: return fbFetch_b8g8r8x8;
/* These two require wide compositing */
case PIXMAN_a2b10g10r10: return NULL;
case PIXMAN_x2b10g10r10: return NULL;
@@ -844,6 +876,30 @@ fbFetchPixel_x8b8g8r8 (bits_image_t *pict, int offset, int line)
}
static FASTCALL uint32_t
+fbFetchPixel_b8g8r8a8 (bits_image_t *pict, int offset, int line)
+{
+ uint32_t *bits = pict->bits + line*pict->rowstride;
+ uint32_t pixel = READ(pict, (uint32_t *)bits + offset);
+
+ return ((pixel & 0xff000000) >> 24 |
+ (pixel & 0x00ff0000) >> 8 |
+ (pixel & 0x0000ff00) << 8 |
+ (pixel & 0x000000ff) << 24);
+}
+
+static FASTCALL uint32_t
+fbFetchPixel_b8g8r8x8 (bits_image_t *pict, int offset, int line)
+{
+ uint32_t *bits = pict->bits + line*pict->rowstride;
+ uint32_t pixel = READ(pict, (uint32_t *)bits + offset);
+
+ return ((0xff000000) |
+ (pixel & 0xff000000) >> 24 |
+ (pixel & 0x00ff0000) >> 8 |
+ (pixel & 0x0000ff00) << 8);
+}
+
+static FASTCALL uint32_t
fbFetchPixel_r8g8b8 (bits_image_t *pict, int offset, int line)
{
uint32_t *bits = pict->bits + line*pict->rowstride;
@@ -1283,6 +1339,8 @@ fetchPixelProc32 ACCESS(pixman_fetchPixelProcForPicture32) (bits_image_t * pict)
case PIXMAN_x8r8g8b8: return fbFetchPixel_x8r8g8b8;
case PIXMAN_a8b8g8r8: return fbFetchPixel_a8b8g8r8;
case PIXMAN_x8b8g8r8: return fbFetchPixel_x8b8g8r8;
+ case PIXMAN_b8g8r8a8: return fbFetchPixel_b8g8r8a8;
+ case PIXMAN_b8g8r8x8: return fbFetchPixel_b8g8r8x8;
/* These two require wide compositing */
case PIXMAN_a2b10g10r10: return fbFetchPixel32_generic_lossy;
case PIXMAN_x2b10g10r10: return fbFetchPixel32_generic_lossy;
@@ -1428,6 +1486,33 @@ fbStore_x8b8g8r8 (pixman_image_t *image,
}
static FASTCALL void
+fbStore_b8g8r8a8 (pixman_image_t *image,
+ uint32_t *bits, const uint32_t *values, int x, int width, const pixman_indexed_t * indexed)
+{
+ int i;
+ uint32_t *pixel = (uint32_t *)bits + x;
+ for (i = 0; i < width; ++i)
+ WRITE(image, pixel++,
+ ((values[i] >> 24) & 0x000000ff) |
+ ((values[i] >> 8) & 0x0000ff00) |
+ ((values[i] << 8) & 0x00ff0000) |
+ ((values[i] << 24) & 0xff000000));
+}
+
+static FASTCALL void
+fbStore_b8g8r8x8 (pixman_image_t *image,
+ uint32_t *bits, const uint32_t *values, int x, int width, const pixman_indexed_t * indexed)
+{
+ int i;
+ uint32_t *pixel = (uint32_t *)bits + x;
+ for (i = 0; i < width; ++i)
+ WRITE(image, pixel++,
+ ((values[i] >> 8) & 0x0000ff00) |
+ ((values[i] << 8) & 0x00ff0000) |
+ ((values[i] << 24) & 0xff000000));
+}
+
+static FASTCALL void
fbStore_r8g8b8 (pixman_image_t *image,
uint32_t *bits, const uint32_t *values, int x, int width,
const pixman_indexed_t * indexed)
@@ -1816,6 +1901,8 @@ storeProc32 ACCESS(pixman_storeProcForPicture32) (bits_image_t * pict)
case PIXMAN_x8r8g8b8: return fbStore_x8r8g8b8;
case PIXMAN_a8b8g8r8: return fbStore_a8b8g8r8;
case PIXMAN_x8b8g8r8: return fbStore_x8b8g8r8;
+ case PIXMAN_b8g8r8a8: return fbStore_b8g8r8a8;
+ case PIXMAN_b8g8r8x8: return fbStore_b8g8r8x8;
/* 24bpp formats */
case PIXMAN_r8g8b8: return fbStore_r8g8b8;
diff --git a/lib/pixman/pixman/pixman-arm-neon.c b/lib/pixman/pixman/pixman-arm-neon.c
new file mode 100644
index 000000000..5453dbbaf
--- /dev/null
+++ b/lib/pixman/pixman/pixman-arm-neon.c
@@ -0,0 +1,1550 @@
+/*
+ * Copyright © 2009 ARM Ltd
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of ARM Ltd not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. ARM Ltd makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Author: Ian Rickards (ian.rickards@arm.com)
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "pixman-arm-neon.h"
+
+#include <arm_neon.h>
+
+
+static force_inline uint8x8x4_t unpack0565(uint16x8_t rgb)
+{
+ uint16x8_t gb, b;
+ uint8x8x4_t res;
+
+ res.val[3] = vdup_n_u8(0);
+ gb = vshrq_n_u16(rgb, 5);
+ b = vshrq_n_u16(rgb, 5+6);
+ res.val[0] = vmovn_u16(rgb); // get low 5 bits
+ res.val[1] = vmovn_u16(gb); // get mid 6 bits
+ res.val[2] = vmovn_u16(b); // get top 5 bits
+
+ res.val[0] = vshl_n_u8(res.val[0], 3); // shift to top
+ res.val[1] = vshl_n_u8(res.val[1], 2); // shift to top
+ res.val[2] = vshl_n_u8(res.val[2], 3); // shift to top
+
+ res.val[0] = vsri_n_u8(res.val[0], res.val[0], 5);
+ res.val[1] = vsri_n_u8(res.val[1], res.val[1], 6);
+ res.val[2] = vsri_n_u8(res.val[2], res.val[2], 5);
+
+ return res;
+}
+
+static force_inline uint16x8_t pack0565(uint8x8x4_t s)
+{
+ uint16x8_t rgb, val_g, val_r;
+
+ rgb = vshll_n_u8(s.val[2],8);
+ val_g = vshll_n_u8(s.val[1],8);
+ val_r = vshll_n_u8(s.val[0],8);
+ rgb = vsriq_n_u16(rgb, val_g, 5);
+ rgb = vsriq_n_u16(rgb, val_r, 5+6);
+
+ return rgb;
+}
+
+static force_inline uint8x8_t neon2mul(uint8x8_t x, uint8x8_t alpha)
+{
+ uint16x8_t tmp,tmp2;
+ uint8x8_t res;
+
+ tmp = vmull_u8(x,alpha);
+ tmp2 = vrshrq_n_u16(tmp,8);
+ res = vraddhn_u16(tmp,tmp2);
+
+ return res;
+}
+
+static force_inline uint8x8x4_t neon8mul(uint8x8x4_t x, uint8x8_t alpha)
+{
+ uint16x8x4_t tmp;
+ uint8x8x4_t res;
+ uint16x8_t qtmp1,qtmp2;
+
+ tmp.val[0] = vmull_u8(x.val[0],alpha);
+ tmp.val[1] = vmull_u8(x.val[1],alpha);
+ tmp.val[2] = vmull_u8(x.val[2],alpha);
+ tmp.val[3] = vmull_u8(x.val[3],alpha);
+
+ qtmp1 = vrshrq_n_u16(tmp.val[0],8);
+ qtmp2 = vrshrq_n_u16(tmp.val[1],8);
+ res.val[0] = vraddhn_u16(tmp.val[0],qtmp1);
+ qtmp1 = vrshrq_n_u16(tmp.val[2],8);
+ res.val[1] = vraddhn_u16(tmp.val[1],qtmp2);
+ qtmp2 = vrshrq_n_u16(tmp.val[3],8);
+ res.val[2] = vraddhn_u16(tmp.val[2],qtmp1);
+ res.val[3] = vraddhn_u16(tmp.val[3],qtmp2);
+
+ return res;
+}
+
+static force_inline uint8x8x4_t neon8qadd(uint8x8x4_t x, uint8x8x4_t y)
+{
+ uint8x8x4_t res;
+
+ res.val[0] = vqadd_u8(x.val[0],y.val[0]);
+ res.val[1] = vqadd_u8(x.val[1],y.val[1]);
+ res.val[2] = vqadd_u8(x.val[2],y.val[2]);
+ res.val[3] = vqadd_u8(x.val[3],y.val[3]);
+
+ return res;
+}
+
+
+void
+fbCompositeSrcAdd_8000x8000neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint8_t *dstLine, *dst;
+ uint8_t *srcLine, *src;
+ int dstStride, srcStride;
+ uint16_t w;
+
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
+ fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
+
+ if (width>=8)
+ {
+ // Use overlapping 8-pixel method
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ uint8_t *keep_dst;
+
+#ifndef USE_GCC_INLINE_ASM
+ uint8x8_t sval,dval,temp;
+
+ sval = vld1_u8((void*)src);
+ dval = vld1_u8((void*)dst);
+ keep_dst = dst;
+
+ temp = vqadd_u8(dval,sval);
+
+ src += (w & 7);
+ dst += (w & 7);
+ w -= (w & 7);
+
+ while (w)
+ {
+ sval = vld1_u8((void*)src);
+ dval = vld1_u8((void*)dst);
+
+ vst1_u8((void*)keep_dst,temp);
+ keep_dst = dst;
+
+ temp = vqadd_u8(dval,sval);
+
+ src+=8;
+ dst+=8;
+ w-=8;
+ }
+ vst1_u8((void*)keep_dst,temp);
+#else
+ asm volatile (
+// avoid using d8-d15 (q4-q7) aapcs callee-save registers
+ "vld1.8 {d0}, [%[src]]\n\t"
+ "vld1.8 {d4}, [%[dst]]\n\t"
+ "mov %[keep_dst], %[dst]\n\t"
+
+ "and ip, %[w], #7\n\t"
+ "add %[src], %[src], ip\n\t"
+ "add %[dst], %[dst], ip\n\t"
+ "subs %[w], %[w], ip\n\t"
+ "b 9f\n\t"
+// LOOP
+ "2:\n\t"
+ "vld1.8 {d0}, [%[src]]!\n\t"
+ "vld1.8 {d4}, [%[dst]]!\n\t"
+ "vst1.8 {d20}, [%[keep_dst]]\n\t"
+ "sub %[keep_dst], %[dst], #8\n\t"
+ "subs %[w], %[w], #8\n\t"
+ "9:\n\t"
+ "vqadd.u8 d20, d0, d4\n\t"
+
+ "bne 2b\n\t"
+
+ "1:\n\t"
+ "vst1.8 {d20}, [%[keep_dst]]\n\t"
+
+ : [w] "+r" (w), [src] "+r" (src), [dst] "+r" (dst), [keep_dst] "=r" (keep_dst)
+ :
+ : "ip", "cc", "memory", "d0","d4",
+ "d20"
+ );
+#endif
+ }
+ }
+ else
+ {
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+ uint8x8_t sval, dval;
+ uint8_t *dst4, *dst2;
+
+ if (w&4)
+ {
+ sval = vreinterpret_u8_u32(vld1_lane_u32((void*)src,vreinterpret_u32_u8(sval),1));
+ dval = vreinterpret_u8_u32(vld1_lane_u32((void*)dst,vreinterpret_u32_u8(dval),1));
+ dst4=dst;
+ src+=4;
+ dst+=4;
+ }
+ if (w&2)
+ {
+ sval = vreinterpret_u8_u16(vld1_lane_u16((void*)src,vreinterpret_u16_u8(sval),1));
+ dval = vreinterpret_u8_u16(vld1_lane_u16((void*)dst,vreinterpret_u16_u8(dval),1));
+ dst2=dst;
+ src+=2;
+ dst+=2;
+ }
+ if (w&1)
+ {
+ sval = vld1_lane_u8(src,sval,1);
+ dval = vld1_lane_u8(dst,dval,1);
+ }
+
+ dval = vqadd_u8(dval,sval);
+
+ if (w&1)
+ vst1_lane_u8(dst,dval,1);
+ if (w&2)
+ vst1_lane_u16((void*)dst2,vreinterpret_u16_u8(dval),1);
+ if (w&4)
+ vst1_lane_u32((void*)dst4,vreinterpret_u32_u8(dval),1);
+ }
+ }
+}
+
+
+void
+fbCompositeSrc_8888x8888neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *dstLine, *dst;
+ uint32_t *srcLine, *src;
+ int dstStride, srcStride;
+ uint32_t w;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+
+ if (width>=8)
+ {
+ // Use overlapping 8-pixel method
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ uint32_t *keep_dst;
+
+#ifndef USE_GCC_INLINE_ASM
+ uint8x8x4_t sval,dval,temp;
+
+ sval = vld4_u8((void*)src);
+ dval = vld4_u8((void*)dst);
+ keep_dst = dst;
+
+ temp = neon8mul(dval,vmvn_u8(sval.val[3]));
+ temp = neon8qadd(sval,temp);
+
+ src += (w & 7);
+ dst += (w & 7);
+ w -= (w & 7);
+
+ while (w)
+ {
+ sval = vld4_u8((void*)src);
+ dval = vld4_u8((void*)dst);
+
+ vst4_u8((void*)keep_dst,temp);
+ keep_dst = dst;
+
+ temp = neon8mul(dval,vmvn_u8(sval.val[3]));
+ temp = neon8qadd(sval,temp);
+
+ src+=8;
+ dst+=8;
+ w-=8;
+ }
+ vst4_u8((void*)keep_dst,temp);
+#else
+ asm volatile (
+// avoid using d8-d15 (q4-q7) aapcs callee-save registers
+ "vld4.8 {d0-d3}, [%[src]]\n\t"
+ "vld4.8 {d4-d7}, [%[dst]]\n\t"
+ "mov %[keep_dst], %[dst]\n\t"
+
+ "and ip, %[w], #7\n\t"
+ "add %[src], %[src], ip, LSL#2\n\t"
+ "add %[dst], %[dst], ip, LSL#2\n\t"
+ "subs %[w], %[w], ip\n\t"
+ "b 9f\n\t"
+// LOOP
+ "2:\n\t"
+ "vld4.8 {d0-d3}, [%[src]]!\n\t"
+ "vld4.8 {d4-d7}, [%[dst]]!\n\t"
+ "vst4.8 {d20-d23}, [%[keep_dst]]\n\t"
+ "sub %[keep_dst], %[dst], #8*4\n\t"
+ "subs %[w], %[w], #8\n\t"
+ "9:\n\t"
+ "vmvn.8 d31, d3\n\t"
+ "vmull.u8 q10, d31, d4\n\t"
+ "vmull.u8 q11, d31, d5\n\t"
+ "vmull.u8 q12, d31, d6\n\t"
+ "vmull.u8 q13, d31, d7\n\t"
+ "vrshr.u16 q8, q10, #8\n\t"
+ "vrshr.u16 q9, q11, #8\n\t"
+ "vraddhn.u16 d20, q10, q8\n\t"
+ "vraddhn.u16 d21, q11, q9\n\t"
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vraddhn.u16 d22, q12, q8\n\t"
+ "vraddhn.u16 d23, q13, q9\n\t"
+// result in d20-d23
+ "vqadd.u8 d20, d0, d20\n\t"
+ "vqadd.u8 d21, d1, d21\n\t"
+ "vqadd.u8 d22, d2, d22\n\t"
+ "vqadd.u8 d23, d3, d23\n\t"
+
+ "bne 2b\n\t"
+
+ "1:\n\t"
+ "vst4.8 {d20-d23}, [%[keep_dst]]\n\t"
+
+ : [w] "+r" (w), [src] "+r" (src), [dst] "+r" (dst), [keep_dst] "=r" (keep_dst)
+ :
+ : "ip", "cc", "memory", "d0","d1","d2","d3","d4","d5","d6","d7",
+ "d16","d17","d18","d19","d20","d21","d22","d23"
+ );
+#endif
+ }
+ }
+ else
+ {
+ uint8x8_t alpha_selector=vreinterpret_u8_u64(vcreate_u64(0x0707070703030303ULL));
+
+ // Handle width<8
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w>=2)
+ {
+ uint8x8_t sval,dval;
+
+ /* two 32-bit pixels packed into D-reg; ad-hoc vectorization */
+ sval = vreinterpret_u8_u32(vld1_u32((void*)src));
+ dval = vreinterpret_u8_u32(vld1_u32((void*)dst));
+ dval = neon2mul(dval,vtbl1_u8(vmvn_u8(sval),alpha_selector));
+ vst1_u8((void*)dst,vqadd_u8(sval,dval));
+
+ src+=2;
+ dst+=2;
+ w-=2;
+ }
+
+ if (w)
+ {
+ uint8x8_t sval,dval;
+
+ /* single 32-bit pixel in lane 0 */
+ sval = vreinterpret_u8_u32(vld1_dup_u32((void*)src)); // only interested in lane 0
+ dval = vreinterpret_u8_u32(vld1_dup_u32((void*)dst)); // only interested in lane 0
+ dval = neon2mul(dval,vtbl1_u8(vmvn_u8(sval),alpha_selector));
+ vst1_lane_u32((void*)dst,vreinterpret_u32_u8(vqadd_u8(sval,dval)),0);
+ }
+ }
+ }
+}
+
+
+
+void
+fbCompositeSrc_x888x0565neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint16_t *dstLine, *dst;
+ uint32_t *srcLine, *src;
+ int dstStride, srcStride;
+ uint32_t w;
+
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+ fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
+
+ if (width>=8)
+ {
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ do {
+ while (w>=8)
+ {
+#ifndef USE_GCC_INLINE_ASM
+ vst1q_u16(dst, pack0565(vld4_u8((void*)src)));
+#else
+ asm volatile (
+ "vld4.8 {d4-d7}, [%[src]]\n\t"
+ "vshll.u8 q0, d6, #8\n\t"
+ "vshll.u8 q1, d5, #8\n\t"
+ "vsriq.u16 q0, q1, #5\t\n"
+ "vshll.u8 q1, d4, #8\n\t"
+ "vsriq.u16 q0, q1, #11\t\n"
+ "vst1.16 {q0}, [%[dst]]\n\t"
+ :
+ : [dst] "r" (dst), [src] "r" (src)
+ : "memory", "d0","d1","d2","d3","d4","d5","d6","d7"
+ );
+#endif
+ src+=8;
+ dst+=8;
+ w-=8;
+ }
+ if (w != 0)
+ {
+ src -= (8-w);
+ dst -= (8-w);
+ w = 8; // do another vector
+ }
+ } while (w!=0);
+ }
+ }
+ else
+ {
+ // Handle width<8
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w>=2)
+ {
+ uint32x2_t sval, rgb, g, b;
+ sval = vld1_u32(src);
+ rgb = vshr_n_u32(sval,8-5); // r (5 bits)
+ g = vshr_n_u32(sval,8+8-6); // g to bottom byte
+ rgb = vsli_n_u32(rgb, g, 5);
+ b = vshr_n_u32(sval,8+8+8-5); // b to bottom byte
+ rgb = vsli_n_u32(rgb, b, 11);
+ vst1_lane_u16(dst++,vreinterpret_u16_u32(rgb),0);
+ vst1_lane_u16(dst++,vreinterpret_u16_u32(rgb),2);
+ src+=2;
+ w-=2;
+ }
+ if (w)
+ {
+ uint32x2_t sval, rgb, g, b;
+ sval = vld1_dup_u32(src);
+ rgb = vshr_n_u32(sval,8-5); // r (5 bits)
+ g = vshr_n_u32(sval,8+8-6); // g to bottom byte
+ rgb = vsli_n_u32(rgb, g, 5);
+ b = vshr_n_u32(sval,8+8+8-5); // b to bottom byte
+ rgb = vsli_n_u32(rgb, b, 11);
+ vst1_lane_u16(dst++,vreinterpret_u16_u32(rgb),0);
+ }
+ }
+ }
+}
+
+
+void
+fbCompositeSrc_8888x8x8888neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *dstLine, *dst;
+ uint32_t *srcLine, *src;
+ uint32_t mask;
+ int dstStride, srcStride;
+ uint32_t w;
+ uint8x8_t mask_alpha;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+
+ fbComposeGetSolid (pMask, mask, pDst->bits.format);
+ mask_alpha = vdup_n_u8((mask) >> 24);
+
+ if (width>=8)
+ {
+ // Use overlapping 8-pixel method
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ uint32_t *keep_dst;
+
+#ifndef USE_GCC_INLINE_ASM
+ uint8x8x4_t sval,dval,temp;
+
+ sval = vld4_u8((void*)src);
+ dval = vld4_u8((void*)dst);
+ keep_dst = dst;
+
+ sval = neon8mul(sval,mask_alpha);
+ temp = neon8mul(dval,vmvn_u8(sval.val[3]));
+ temp = neon8qadd(sval,temp);
+
+ src += (w & 7);
+ dst += (w & 7);
+ w -= (w & 7);
+
+ while (w)
+ {
+ sval = vld4_u8((void*)src);
+ dval = vld4_u8((void*)dst);
+
+ vst4_u8((void*)keep_dst,temp);
+ keep_dst = dst;
+
+ sval = neon8mul(sval,mask_alpha);
+ temp = neon8mul(dval,vmvn_u8(sval.val[3]));
+ temp = neon8qadd(sval,temp);
+
+ src+=8;
+ dst+=8;
+ w-=8;
+ }
+ vst4_u8((void*)keep_dst,temp);
+#else
+ asm volatile (
+// avoid using d8-d15 (q4-q7) aapcs callee-save registers
+ "vdup.32 d30, %[mask]\n\t"
+ "vdup.8 d30, d30[3]\n\t"
+
+ "vld4.8 {d0-d3}, [%[src]]\n\t"
+ "vld4.8 {d4-d7}, [%[dst]]\n\t"
+ "mov %[keep_dst], %[dst]\n\t"
+
+ "and ip, %[w], #7\n\t"
+ "add %[src], %[src], ip, LSL#2\n\t"
+ "add %[dst], %[dst], ip, LSL#2\n\t"
+ "subs %[w], %[w], ip\n\t"
+ "b 9f\n\t"
+// LOOP
+ "2:\n\t"
+ "vld4.8 {d0-d3}, [%[src]]!\n\t"
+ "vld4.8 {d4-d7}, [%[dst]]!\n\t"
+ "vst4.8 {d20-d23}, [%[keep_dst]]\n\t"
+ "sub %[keep_dst], %[dst], #8*4\n\t"
+ "subs %[w], %[w], #8\n\t"
+
+ "9:\n\t"
+ "vmull.u8 q10, d30, d0\n\t"
+ "vmull.u8 q11, d30, d1\n\t"
+ "vmull.u8 q12, d30, d2\n\t"
+ "vmull.u8 q13, d30, d3\n\t"
+ "vrshr.u16 q8, q10, #8\n\t"
+ "vrshr.u16 q9, q11, #8\n\t"
+ "vraddhn.u16 d0, q10, q8\n\t"
+ "vraddhn.u16 d1, q11, q9\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vraddhn.u16 d3, q13, q9\n\t"
+ "vraddhn.u16 d2, q12, q8\n\t"
+
+ "vmvn.8 d31, d3\n\t"
+ "vmull.u8 q10, d31, d4\n\t"
+ "vmull.u8 q11, d31, d5\n\t"
+ "vmull.u8 q12, d31, d6\n\t"
+ "vmull.u8 q13, d31, d7\n\t"
+ "vrshr.u16 q8, q10, #8\n\t"
+ "vrshr.u16 q9, q11, #8\n\t"
+ "vraddhn.u16 d20, q10, q8\n\t"
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vraddhn.u16 d21, q11, q9\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vraddhn.u16 d22, q12, q8\n\t"
+ "vraddhn.u16 d23, q13, q9\n\t"
+// result in d20-d23
+ "vqadd.u8 d20, d0, d20\n\t"
+ "vqadd.u8 d21, d1, d21\n\t"
+ "vqadd.u8 d22, d2, d22\n\t"
+ "vqadd.u8 d23, d3, d23\n\t"
+
+ "bne 2b\n\t"
+
+ "1:\n\t"
+ "vst4.8 {d20-d23}, [%[keep_dst]]\n\t"
+
+ : [w] "+r" (w), [src] "+r" (src), [dst] "+r" (dst), [keep_dst] "=r" (keep_dst)
+ : [mask] "r" (mask)
+ : "ip", "cc", "memory", "d0","d1","d2","d3","d4","d5","d6","d7",
+ "d16","d17","d18","d19","d20","d21","d22","d23","d24","d25","d26","d27",
+ "d30","d31"
+ );
+#endif
+ }
+ }
+ else
+ {
+ uint8x8_t alpha_selector=vreinterpret_u8_u64(vcreate_u64(0x0707070703030303ULL));
+
+ // Handle width<8
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w>=2)
+ {
+ uint8x8_t sval,dval;
+
+ sval = vreinterpret_u8_u32(vld1_u32((void*)src));
+ dval = vreinterpret_u8_u32(vld1_u32((void*)dst));
+
+ /* sval * const alpha_mul */
+ sval = neon2mul(sval,mask_alpha);
+
+ /* dval * 255-(src alpha) */
+ dval = neon2mul(dval,vtbl1_u8(vmvn_u8(sval), alpha_selector));
+
+ vst1_u8((void*)dst,vqadd_u8(sval,dval));
+
+ src+=2;
+ dst+=2;
+ w-=2;
+ }
+
+ if (w)
+ {
+ uint8x8_t sval,dval;
+
+ sval = vreinterpret_u8_u32(vld1_dup_u32((void*)src));
+ dval = vreinterpret_u8_u32(vld1_dup_u32((void*)dst));
+
+ /* sval * const alpha_mul */
+ sval = neon2mul(sval,mask_alpha);
+
+ /* dval * 255-(src alpha) */
+ dval = neon2mul(dval,vtbl1_u8(vmvn_u8(sval), alpha_selector));
+
+ vst1_lane_u32((void*)dst,vreinterpret_u32_u8(vqadd_u8(sval,dval)),0);
+ }
+ }
+ }
+}
+
+
+
+void
+fbCompositeSolidMask_nx8x0565neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint16_t *dstLine, *dst;
+ uint8_t *maskLine, *mask;
+ int dstStride, maskStride;
+ uint32_t w;
+ uint8x8_t sval2;
+ uint8x8x4_t sval8;
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ srca = src >> 24;
+ if (src == 0)
+ return;
+
+ sval2=vreinterpret_u8_u32(vdup_n_u32(src));
+ sval8.val[0]=vdup_lane_u8(sval2,0);
+ sval8.val[1]=vdup_lane_u8(sval2,1);
+ sval8.val[2]=vdup_lane_u8(sval2,2);
+ sval8.val[3]=vdup_lane_u8(sval2,3);
+
+ fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+
+ if (width>=8)
+ {
+ // Use overlapping 8-pixel method, modified to avoid rewritten dest being reused
+ while (height--)
+ {
+ uint16_t *keep_dst;
+
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+#ifndef USE_GCC_INLINE_ASM
+ uint8x8_t alpha;
+ uint16x8_t dval, temp;
+ uint8x8x4_t sval8temp;
+
+ alpha = vld1_u8((void*)mask);
+ dval = vld1q_u16((void*)dst);
+ keep_dst = dst;
+
+ sval8temp = neon8mul(sval8,alpha);
+ temp = pack0565(neon8qadd(sval8temp,neon8mul(unpack0565(dval),vmvn_u8(sval8temp.val[3]))));
+
+ mask += (w & 7);
+ dst += (w & 7);
+ w -= (w & 7);
+
+ while (w)
+ {
+ dval = vld1q_u16((void*)dst);
+ alpha = vld1_u8((void*)mask);
+
+ vst1q_u16((void*)keep_dst,temp);
+ keep_dst = dst;
+
+ sval8temp = neon8mul(sval8,alpha);
+ temp = pack0565(neon8qadd(sval8temp,neon8mul(unpack0565(dval),vmvn_u8(sval8temp.val[3]))));
+
+ mask+=8;
+ dst+=8;
+ w-=8;
+ }
+ vst1q_u16((void*)keep_dst,temp);
+#else
+ asm volatile (
+ "vdup.32 d0, %[src]\n\t"
+ "vdup.8 d1, d0[1]\n\t"
+ "vdup.8 d2, d0[2]\n\t"
+ "vdup.8 d3, d0[3]\n\t"
+ "vdup.8 d0, d0[0]\n\t"
+
+ "vld1.8 {q12}, [%[dst]]\n\t"
+ "vld1.8 {d31}, [%[mask]]\n\t"
+ "mov %[keep_dst], %[dst]\n\t"
+
+ "and ip, %[w], #7\n\t"
+ "add %[mask], %[mask], ip\n\t"
+ "add %[dst], %[dst], ip, LSL#1\n\t"
+ "subs %[w], %[w], ip\n\t"
+ "b 9f\n\t"
+// LOOP
+ "2:\n\t"
+
+ "vld1.16 {q12}, [%[dst]]!\n\t"
+ "vld1.8 {d31}, [%[mask]]!\n\t"
+ "vst1.16 {q10}, [%[keep_dst]]\n\t"
+ "sub %[keep_dst], %[dst], #8*2\n\t"
+ "subs %[w], %[w], #8\n\t"
+ "9:\n\t"
+// expand 0565 q12 to 8888 {d4-d7}
+ "vmovn.u16 d4, q12\t\n"
+ "vshr.u16 q11, q12, #5\t\n"
+ "vshr.u16 q10, q12, #6+5\t\n"
+ "vmovn.u16 d5, q11\t\n"
+ "vmovn.u16 d6, q10\t\n"
+ "vshl.u8 d4, d4, #3\t\n"
+ "vshl.u8 d5, d5, #2\t\n"
+ "vshl.u8 d6, d6, #3\t\n"
+ "vsri.u8 d4, d4, #5\t\n"
+ "vsri.u8 d5, d5, #6\t\n"
+ "vsri.u8 d6, d6, #5\t\n"
+
+ "vmull.u8 q10, d31, d0\n\t"
+ "vmull.u8 q11, d31, d1\n\t"
+ "vmull.u8 q12, d31, d2\n\t"
+ "vmull.u8 q13, d31, d3\n\t"
+ "vrshr.u16 q8, q10, #8\n\t"
+ "vrshr.u16 q9, q11, #8\n\t"
+ "vraddhn.u16 d20, q10, q8\n\t"
+ "vraddhn.u16 d21, q11, q9\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vraddhn.u16 d23, q13, q9\n\t"
+ "vraddhn.u16 d22, q12, q8\n\t"
+
+// duplicate in 4/2/1 & 8pix vsns
+ "vmvn.8 d30, d23\n\t"
+ "vmull.u8 q14, d30, d6\n\t"
+ "vmull.u8 q13, d30, d5\n\t"
+ "vmull.u8 q12, d30, d4\n\t"
+ "vrshr.u16 q8, q14, #8\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vraddhn.u16 d6, q14, q8\n\t"
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vraddhn.u16 d5, q13, q9\n\t"
+ "vqadd.u8 d6, d6, d22\n\t" // moved up
+ "vraddhn.u16 d4, q12, q8\n\t"
+// intentionally don't calculate alpha
+// result in d4-d6
+
+// "vqadd.u8 d6, d6, d22\n\t" ** moved up
+ "vqadd.u8 d5, d5, d21\n\t"
+ "vqadd.u8 d4, d4, d20\n\t"
+
+// pack 8888 {d20-d23} to 0565 q10
+ "vshll.u8 q10, d6, #8\n\t"
+ "vshll.u8 q3, d5, #8\n\t"
+ "vshll.u8 q2, d4, #8\n\t"
+ "vsri.u16 q10, q3, #5\t\n"
+ "vsri.u16 q10, q2, #11\t\n"
+
+ "bne 2b\n\t"
+
+ "1:\n\t"
+ "vst1.16 {q10}, [%[keep_dst]]\n\t"
+
+ : [w] "+r" (w), [dst] "+r" (dst), [mask] "+r" (mask), [keep_dst] "=r" (keep_dst)
+ : [src] "r" (src)
+ : "ip", "cc", "memory", "d0","d1","d2","d3","d4","d5","d6","d7",
+ "d16","d17","d18","d19","d20","d21","d22","d23","d24","d25","d26","d27","d28","d29",
+ "d30","d31"
+ );
+#endif
+ }
+ }
+ else
+ {
+ while (height--)
+ {
+ void *dst4, *dst2;
+
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+
+#ifndef USE_GCC_INLINE_ASM
+ uint8x8_t alpha;
+ uint16x8_t dval, temp;
+ uint8x8x4_t sval8temp;
+
+ if (w&4)
+ {
+ alpha = vreinterpret_u8_u32(vld1_lane_u32((void*)mask,vreinterpret_u32_u8(alpha),1));
+ dval = vreinterpretq_u16_u64(vld1q_lane_u64((void*)dst,vreinterpretq_u64_u16(dval),1));
+ dst4=dst;
+ mask+=4;
+ dst+=4;
+ }
+ if (w&2)
+ {
+ alpha = vreinterpret_u8_u16(vld1_lane_u16((void*)mask,vreinterpret_u16_u8(alpha),1));
+ dval = vreinterpretq_u16_u32(vld1q_lane_u32((void*)dst,vreinterpretq_u32_u16(dval),1));
+ dst2=dst;
+ mask+=2;
+ dst+=2;
+ }
+ if (w&1)
+ {
+ alpha = vld1_lane_u8((void*)mask,alpha,1);
+ dval = vld1q_lane_u16((void*)dst,dval,1);
+ }
+
+ sval8temp = neon8mul(sval8,alpha);
+ temp = pack0565(neon8qadd(sval8temp,neon8mul(unpack0565(dval),vmvn_u8(sval8temp.val[3]))));
+
+ if (w&1)
+ vst1q_lane_u16((void*)dst,temp,1);
+ if (w&2)
+ vst1q_lane_u32((void*)dst2,vreinterpretq_u32_u16(temp),1);
+ if (w&4)
+ vst1q_lane_u64((void*)dst4,vreinterpretq_u64_u16(temp),1);
+#else
+ asm volatile (
+ "vdup.32 d0, %[src]\n\t"
+ "vdup.8 d1, d0[1]\n\t"
+ "vdup.8 d2, d0[2]\n\t"
+ "vdup.8 d3, d0[3]\n\t"
+ "vdup.8 d0, d0[0]\n\t"
+
+ "tst %[w], #4\t\n"
+ "beq skip_load4\t\n"
+
+ "vld1.64 {d25}, [%[dst]]\n\t"
+ "vld1.32 {d31[1]}, [%[mask]]\n\t"
+ "mov %[dst4], %[dst]\t\n"
+ "add %[mask], %[mask], #4\t\n"
+ "add %[dst], %[dst], #4*2\t\n"
+
+ "skip_load4:\t\n"
+ "tst %[w], #2\t\n"
+ "beq skip_load2\t\n"
+ "vld1.32 {d24[1]}, [%[dst]]\n\t"
+ "vld1.16 {d31[1]}, [%[mask]]\n\t"
+ "mov %[dst2], %[dst]\t\n"
+ "add %[mask], %[mask], #2\t\n"
+ "add %[dst], %[dst], #2*2\t\n"
+
+ "skip_load2:\t\n"
+ "tst %[w], #1\t\n"
+ "beq skip_load1\t\n"
+ "vld1.16 {d24[1]}, [%[dst]]\n\t"
+ "vld1.8 {d31[1]}, [%[mask]]\n\t"
+
+ "skip_load1:\t\n"
+// expand 0565 q12 to 8888 {d4-d7}
+ "vmovn.u16 d4, q12\t\n"
+ "vshr.u16 q11, q12, #5\t\n"
+ "vshr.u16 q10, q12, #6+5\t\n"
+ "vmovn.u16 d5, q11\t\n"
+ "vmovn.u16 d6, q10\t\n"
+ "vshl.u8 d4, d4, #3\t\n"
+ "vshl.u8 d5, d5, #2\t\n"
+ "vshl.u8 d6, d6, #3\t\n"
+ "vsri.u8 d4, d4, #5\t\n"
+ "vsri.u8 d5, d5, #6\t\n"
+ "vsri.u8 d6, d6, #5\t\n"
+
+ "vmull.u8 q10, d31, d0\n\t"
+ "vmull.u8 q11, d31, d1\n\t"
+ "vmull.u8 q12, d31, d2\n\t"
+ "vmull.u8 q13, d31, d3\n\t"
+ "vrshr.u16 q8, q10, #8\n\t"
+ "vrshr.u16 q9, q11, #8\n\t"
+ "vraddhn.u16 d20, q10, q8\n\t"
+ "vraddhn.u16 d21, q11, q9\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vraddhn.u16 d23, q13, q9\n\t"
+ "vraddhn.u16 d22, q12, q8\n\t"
+
+// duplicate in 4/2/1 & 8pix vsns
+ "vmvn.8 d30, d23\n\t"
+ "vmull.u8 q14, d30, d6\n\t"
+ "vmull.u8 q13, d30, d5\n\t"
+ "vmull.u8 q12, d30, d4\n\t"
+ "vrshr.u16 q8, q14, #8\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vraddhn.u16 d6, q14, q8\n\t"
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vraddhn.u16 d5, q13, q9\n\t"
+ "vqadd.u8 d6, d6, d22\n\t" // moved up
+ "vraddhn.u16 d4, q12, q8\n\t"
+// intentionally don't calculate alpha
+// result in d4-d6
+
+// "vqadd.u8 d6, d6, d22\n\t" ** moved up
+ "vqadd.u8 d5, d5, d21\n\t"
+ "vqadd.u8 d4, d4, d20\n\t"
+
+// pack 8888 {d20-d23} to 0565 q10
+ "vshll.u8 q10, d6, #8\n\t"
+ "vshll.u8 q3, d5, #8\n\t"
+ "vshll.u8 q2, d4, #8\n\t"
+ "vsri.u16 q10, q3, #5\t\n"
+ "vsri.u16 q10, q2, #11\t\n"
+
+ "tst %[w], #1\n\t"
+ "beq skip_store1\t\n"
+ "vst1.16 {d20[1]}, [%[dst]]\t\n"
+ "skip_store1:\t\n"
+ "tst %[w], #2\n\t"
+ "beq skip_store2\t\n"
+ "vst1.32 {d20[1]}, [%[dst2]]\t\n"
+ "skip_store2:\t\n"
+ "tst %[w], #4\n\t"
+ "beq skip_store4\t\n"
+ "vst1.16 {d21}, [%[dst4]]\t\n"
+ "skip_store4:\t\n"
+
+ : [w] "+r" (w), [dst] "+r" (dst), [mask] "+r" (mask), [dst4] "+r" (dst4), [dst2] "+r" (dst2)
+ : [src] "r" (src)
+ : "ip", "cc", "memory", "d0","d1","d2","d3","d4","d5","d6","d7",
+ "d16","d17","d18","d19","d20","d21","d22","d23","d24","d25","d26","d27","d28","d29",
+ "d30","d31"
+ );
+#endif
+ }
+ }
+}
+
+
+
+void
+fbCompositeSolidMask_nx8x8888neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint32_t *dstLine, *dst;
+ uint8_t *maskLine, *mask;
+ int dstStride, maskStride;
+ uint32_t w;
+ uint8x8_t sval2;
+ uint8x8x4_t sval8;
+ uint8x8_t mask_selector=vreinterpret_u8_u64(vcreate_u64(0x0101010100000000ULL));
+ uint8x8_t alpha_selector=vreinterpret_u8_u64(vcreate_u64(0x0707070703030303ULL));
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ srca = src >> 24;
+ if (src == 0)
+ return;
+
+ sval2=vreinterpret_u8_u32(vdup_n_u32(src));
+ sval8.val[0]=vdup_lane_u8(sval2,0);
+ sval8.val[1]=vdup_lane_u8(sval2,1);
+ sval8.val[2]=vdup_lane_u8(sval2,2);
+ sval8.val[3]=vdup_lane_u8(sval2,3);
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+
+ if (width>=8)
+ {
+ // Use overlapping 8-pixel method, modified to avoid rewritten dest being reused
+ while (height--)
+ {
+ uint32_t *keep_dst;
+
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+#ifndef USE_GCC_INLINE_ASM
+ uint8x8_t alpha;
+ uint8x8x4_t dval, temp;
+
+ alpha = vld1_u8((void*)mask);
+ dval = vld4_u8((void*)dst);
+ keep_dst = dst;
+
+ temp = neon8mul(sval8,alpha);
+ dval = neon8mul(dval,vmvn_u8(temp.val[3]));
+ temp = neon8qadd(temp,dval);
+
+ mask += (w & 7);
+ dst += (w & 7);
+ w -= (w & 7);
+
+ while (w)
+ {
+ alpha = vld1_u8((void*)mask);
+ dval = vld4_u8((void*)dst);
+
+ vst4_u8((void*)keep_dst,temp);
+ keep_dst = dst;
+
+ temp = neon8mul(sval8,alpha);
+ dval = neon8mul(dval,vmvn_u8(temp.val[3]));
+ temp = neon8qadd(temp,dval);
+
+ mask+=8;
+ dst+=8;
+ w-=8;
+ }
+ vst4_u8((void*)keep_dst,temp);
+#else
+ asm volatile (
+ "vdup.32 d0, %[src]\n\t"
+ "vdup.8 d1, d0[1]\n\t"
+ "vdup.8 d2, d0[2]\n\t"
+ "vdup.8 d3, d0[3]\n\t"
+ "vdup.8 d0, d0[0]\n\t"
+
+ "vld4.8 {d4-d7}, [%[dst]]\n\t"
+ "vld1.8 {d31}, [%[mask]]\n\t"
+ "mov %[keep_dst], %[dst]\n\t"
+
+ "and ip, %[w], #7\n\t"
+ "add %[mask], %[mask], ip\n\t"
+ "add %[dst], %[dst], ip, LSL#2\n\t"
+ "subs %[w], %[w], ip\n\t"
+ "b 9f\n\t"
+// LOOP
+ "2:\n\t"
+ "vld4.8 {d4-d7}, [%[dst]]!\n\t"
+ "vld1.8 {d31}, [%[mask]]!\n\t"
+ "vst4.8 {d20-d23}, [%[keep_dst]]\n\t"
+ "sub %[keep_dst], %[dst], #8*4\n\t"
+ "subs %[w], %[w], #8\n\t"
+ "9:\n\t"
+
+ "vmull.u8 q10, d31, d0\n\t"
+ "vmull.u8 q11, d31, d1\n\t"
+ "vmull.u8 q12, d31, d2\n\t"
+ "vmull.u8 q13, d31, d3\n\t"
+ "vrshr.u16 q8, q10, #8\n\t"
+ "vrshr.u16 q9, q11, #8\n\t"
+ "vraddhn.u16 d20, q10, q8\n\t"
+ "vraddhn.u16 d21, q11, q9\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vraddhn.u16 d23, q13, q9\n\t"
+ "vraddhn.u16 d22, q12, q8\n\t"
+
+ "vmvn.8 d30, d23\n\t"
+ "vmull.u8 q12, d30, d4\n\t"
+ "vmull.u8 q13, d30, d5\n\t"
+ "vmull.u8 q14, d30, d6\n\t"
+ "vmull.u8 q15, d30, d7\n\t"
+
+ "vrshr.u16 q8, q12, #8\n\t"
+ "vrshr.u16 q9, q13, #8\n\t"
+ "vraddhn.u16 d4, q12, q8\n\t"
+ "vrshr.u16 q8, q14, #8\n\t"
+ "vraddhn.u16 d5, q13, q9\n\t"
+ "vrshr.u16 q9, q15, #8\n\t"
+ "vraddhn.u16 d6, q14, q8\n\t"
+ "vraddhn.u16 d7, q15, q9\n\t"
+// result in d4-d7
+
+ "vqadd.u8 d20, d4, d20\n\t"
+ "vqadd.u8 d21, d5, d21\n\t"
+ "vqadd.u8 d22, d6, d22\n\t"
+ "vqadd.u8 d23, d7, d23\n\t"
+
+ "bne 2b\n\t"
+
+ "1:\n\t"
+ "vst4.8 {d20-d23}, [%[keep_dst]]\n\t"
+
+ : [w] "+r" (w), [dst] "+r" (dst), [mask] "+r" (mask), [keep_dst] "=r" (keep_dst)
+ : [src] "r" (src)
+ : "ip", "cc", "memory", "d0","d1","d2","d3","d4","d5","d6","d7",
+ "d16","d17","d18","d19","d20","d21","d22","d23","d24","d25","d26","d27","d28","d29",
+ "d30","d31"
+ );
+#endif
+ }
+ }
+ else
+ {
+ while (height--)
+ {
+ uint8x8_t alpha;
+
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w>=2)
+ {
+ uint8x8_t dval, temp, res;
+
+ alpha = vtbl1_u8(vreinterpret_u8_u16(vld1_dup_u16((void*)mask)), mask_selector);
+ dval = vld1_u8((void*)dst);
+
+ temp = neon2mul(sval2,alpha);
+ res = vqadd_u8(temp,neon2mul(dval,vtbl1_u8(vmvn_u8(temp), alpha_selector)));
+
+ vst1_u8((void*)dst,res);
+
+ mask+=2;
+ dst+=2;
+ w-=2;
+ }
+ if (w)
+ {
+ uint8x8_t dval, temp, res;
+
+ alpha = vtbl1_u8(vld1_dup_u8((void*)mask), mask_selector);
+ dval = vreinterpret_u8_u32(vld1_dup_u32((void*)dst));
+
+ temp = neon2mul(sval2,alpha);
+ res = vqadd_u8(temp,neon2mul(dval,vtbl1_u8(vmvn_u8(temp), alpha_selector)));
+
+ vst1_lane_u32((void*)dst,vreinterpret_u32_u8(res),0);
+ }
+ }
+ }
+}
+
+
+void
+fbCompositeSrcAdd_8888x8x8neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint8_t *dstLine, *dst;
+ uint8_t *maskLine, *mask;
+ int dstStride, maskStride;
+ uint32_t w;
+ uint32_t src;
+ uint8x8_t sa;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+ fbComposeGetSolid (pSrc, src, pDst->bits.format);
+ sa = vdup_n_u8((src) >> 24);
+
+ if (width>=8)
+ {
+ // Use overlapping 8-pixel method, modified to avoid rewritten dest being reused
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ uint8x8_t mval, dval, res;
+ uint8_t *keep_dst;
+
+ mval = vld1_u8((void *)mask);
+ dval = vld1_u8((void *)dst);
+ keep_dst = dst;
+
+ res = vqadd_u8(neon2mul(mval,sa),dval);
+
+ mask += (w & 7);
+ dst += (w & 7);
+ w -= w & 7;
+
+ while (w)
+ {
+ mval = vld1_u8((void *)mask);
+ dval = vld1_u8((void *)dst);
+ vst1_u8((void *)keep_dst, res);
+ keep_dst = dst;
+
+ res = vqadd_u8(neon2mul(mval,sa),dval);
+
+ mask += 8;
+ dst += 8;
+ w -= 8;
+ }
+ vst1_u8((void *)keep_dst, res);
+ }
+ }
+ else
+ {
+ // Use 4/2/1 load/store method to handle 1-7 pixels
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ uint8x8_t mval, dval, res;
+ uint8_t *dst4, *dst2;
+
+ if (w&4)
+ {
+ mval = vreinterpret_u8_u32(vld1_lane_u32((void *)mask, vreinterpret_u32_u8(mval), 1));
+ dval = vreinterpret_u8_u32(vld1_lane_u32((void *)dst, vreinterpret_u32_u8(dval), 1));
+
+ dst4 = dst;
+ mask += 4;
+ dst += 4;
+ }
+ if (w&2)
+ {
+ mval = vreinterpret_u8_u16(vld1_lane_u16((void *)mask, vreinterpret_u16_u8(mval), 1));
+ dval = vreinterpret_u8_u16(vld1_lane_u16((void *)dst, vreinterpret_u16_u8(dval), 1));
+ dst2 = dst;
+ mask += 2;
+ dst += 2;
+ }
+ if (w&1)
+ {
+ mval = vld1_lane_u8(mask, mval, 1);
+ dval = vld1_lane_u8(dst, dval, 1);
+ }
+
+ res = vqadd_u8(neon2mul(mval,sa),dval);
+
+ if (w&1)
+ vst1_lane_u8(dst, res, 1);
+ if (w&2)
+ vst1_lane_u16((void *)dst2, vreinterpret_u16_u8(res), 1);
+ if (w&4)
+ vst1_lane_u32((void *)dst4, vreinterpret_u32_u8(res), 1);
+ }
+ }
+}
+
+static const FastPathInfo arm_neon_fast_path_array[] =
+{
+ { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSrcAdd_8888x8x8neon, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcAdd_8000x8000neon, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_x888x0565neon, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_x888x0565neon, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_x888x0565neon, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_x888x0565neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8888neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8888neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8888neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8888neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8x8888neon, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8x8888neon, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8x0565neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8x0565neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8x8888neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8x8888neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8x8888neon, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8x8888neon, 0 },
+ { PIXMAN_OP_NONE },
+};
+
+const FastPathInfo *const arm_neon_fast_paths = arm_neon_fast_path_array;
+
+static void
+arm_neon_composite (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_image_t *dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ if (_pixman_run_fast_path (arm_neon_fast_paths, imp,
+ op, src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height))
+ {
+ return;
+ }
+
+ _pixman_implementation_composite (imp->delegate, op,
+ src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height);
+}
+
+pixman_bool_t
+pixman_blt_neon (
+ void *src_bits,
+ void *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
+{
+
+#if 0 // Relies on code which isn't upstreamed yet
+
+ // accelerate only straight copies
+ if(src_bpp != dst_bpp || (src_bpp & 7) || !width || !height)
+ return FALSE;
+
+ {
+ uint32_t bytes_per_pixel = src_bpp >> 3;
+ uint32_t byte_width = width * bytes_per_pixel;
+ int32_t src_stride_bytes = src_stride * 4; // parameter is in words for some reason
+ int32_t dst_stride_bytes = dst_stride * 4;
+ uint8_t *src_bytes = ((uint8_t*) src_bits) + src_y * src_stride_bytes + src_x * bytes_per_pixel;
+ uint8_t *dst_bytes = ((uint8_t*) dst_bits) + dst_y * dst_stride_bytes + dst_x * bytes_per_pixel;
+ uint32_t quadword_count = byte_width / 16;
+ uint32_t offset = byte_width % 16;
+
+ while(height--) {
+ QuadwordCopy_neon(dst_bytes, src_bytes, quadword_count, offset);
+ src_bytes += src_stride_bytes;
+ dst_bytes += dst_stride_bytes;
+ }
+ }
+
+ return TRUE;
+
+#else /* USE_GCC_INLINE_ASM */
+
+ // TODO: intrinsic version for armcc
+ return FALSE;
+
+#endif
+}
+
+static pixman_bool_t
+arm_neon_blt (pixman_implementation_t *imp,
+ uint32_t *src_bits,
+ uint32_t *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
+{
+ if (pixman_blt_neon (
+ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
+ src_x, src_y, dst_x, dst_y, width, height))
+ return TRUE;
+
+ return _pixman_implementation_blt (
+ imp->delegate,
+ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
+ src_x, src_y, dst_x, dst_y, width, height);
+}
+
+static pixman_bool_t
+arm_neon_fill (pixman_implementation_t *imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ if (pixman_fill_neon (bits, stride, bpp, x, y, width, height, xor))
+ return TRUE;
+
+ return _pixman_implementation_fill (
+ imp->delegate, bits, stride, bpp, x, y, width, height, xor);
+}
+
+pixman_implementation_t *
+_pixman_implementation_create_arm_neon (pixman_implementation_t *toplevel)
+{
+ pixman_implementation_t *simd = _pixman_implementation_create_arm_simd (NULL);
+ pixman_implementation_t *imp = _pixman_implementation_create (toplevel, simd);
+
+ imp->composite = arm_neon_composite;
+// imp->blt = arm_neon_blt;
+// imp->fill = arm_neon_fill; -- Relies on code which is not upstreamed yet
+
+ return imp;
+}
diff --git a/lib/pixman/pixman/pixman-arm-neon.h b/lib/pixman/pixman/pixman-arm-neon.h
new file mode 100644
index 000000000..aed7a4dfd
--- /dev/null
+++ b/lib/pixman/pixman/pixman-arm-neon.h
@@ -0,0 +1,179 @@
+/*
+ * Copyright © 2009 ARM Ltd
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of ARM Ltd not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. ARM Ltd makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Author: Ian Rickards (ian.rickards@arm.com)
+ *
+ */
+
+#include "pixman-private.h"
+
+#ifdef USE_ARM_NEON
+
+pixman_bool_t pixman_have_arm_neon(void);
+
+#else
+#define pixman_have_arm_neon() FALSE
+#endif
+
+#ifdef USE_ARM_NEON
+
+extern const FastPathInfo *const arm_neon_fast_paths;
+
+void
+fbCompositeSrcAdd_8000x8000neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSrc_8888x8888neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSrc_8888x8x8888neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSolidMask_nx8x0565neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSolidMask_nx8x8888neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSrcAdd_8888x8x8neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSrc_16x16neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSrc_24x16neon (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+pixman_bool_t
+pixman_fill_neon (uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t _xor);
+
+#endif /* USE_ARM_NEON */
diff --git a/lib/pixman/pixman/pixman-arm-simd.c b/lib/pixman/pixman/pixman-arm-simd.c
new file mode 100644
index 000000000..42503fc85
--- /dev/null
+++ b/lib/pixman/pixman/pixman-arm-simd.c
@@ -0,0 +1,482 @@
+/*
+ * Copyright © 2008 Mozilla Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Mozilla Corporation not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Mozilla Corporation makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Author: Jeff Muizelaar (jeff@infidigm.net)
+ *
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "pixman-arm-simd.h"
+
+void
+fbCompositeSrcAdd_8000x8000arm (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint8_t *dstLine, *dst;
+ uint8_t *srcLine, *src;
+ int dstStride, srcStride;
+ uint16_t w;
+ uint8_t s, d;
+
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
+ fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ /* ensure both src and dst are properly aligned before doing 32 bit reads
+ * we'll stay in this loop if src and dst have differing alignments */
+ while (w && (((unsigned long)dst & 3) || ((unsigned long)src & 3)))
+ {
+ s = *src;
+ d = *dst;
+ asm("uqadd8 %0, %1, %2" : "+r"(d) : "r"(s));
+ *dst = d;
+
+ dst++;
+ src++;
+ w--;
+ }
+
+ while (w >= 4)
+ {
+ asm("uqadd8 %0, %1, %2" : "=r"(*(uint32_t*)dst) : "r"(*(uint32_t*)src), "r"(*(uint32_t*)dst));
+ dst += 4;
+ src += 4;
+ w -= 4;
+ }
+
+ while (w)
+ {
+ s = *src;
+ d = *dst;
+ asm("uqadd8 %0, %1, %2" : "+r"(d) : "r"(s));
+ *dst = d;
+
+ dst++;
+ src++;
+ w--;
+ }
+ }
+
+}
+
+void
+fbCompositeSrc_8888x8888arm (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *dstLine, *dst;
+ uint32_t *srcLine, *src;
+ int dstStride, srcStride;
+ uint16_t w;
+ uint32_t component_half = 0x800080;
+ uint32_t upper_component_mask = 0xff00ff00;
+ uint32_t alpha_mask = 0xff;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+//#define inner_branch
+ asm volatile (
+ "cmp %[w], #0\n\t"
+ "beq 2f\n\t"
+ "1:\n\t"
+ /* load src */
+ "ldr r5, [%[src]], #4\n\t"
+#ifdef inner_branch
+ /* We can avoid doing the multiplication in two cases: 0x0 or 0xff.
+ * The 0x0 case also allows us to avoid doing an unecessary data
+ * write which is more valuable so we only check for that */
+ "cmp r5, #0\n\t"
+ "beq 3f\n\t"
+
+ /* = 255 - alpha */
+ "sub r8, %[alpha_mask], r5, lsr #24\n\t"
+
+ "ldr r4, [%[dest]] \n\t"
+
+#else
+ "ldr r4, [%[dest]] \n\t"
+
+ /* = 255 - alpha */
+ "sub r8, %[alpha_mask], r5, lsr #24\n\t"
+#endif
+ "uxtb16 r6, r4\n\t"
+ "uxtb16 r7, r4, ror #8\n\t"
+
+ /* multiply by 257 and divide by 65536 */
+ "mla r6, r6, r8, %[component_half]\n\t"
+ "mla r7, r7, r8, %[component_half]\n\t"
+
+ "uxtab16 r6, r6, r6, ror #8\n\t"
+ "uxtab16 r7, r7, r7, ror #8\n\t"
+
+ /* recombine the 0xff00ff00 bytes of r6 and r7 */
+ "and r7, r7, %[upper_component_mask]\n\t"
+ "uxtab16 r6, r7, r6, ror #8\n\t"
+
+ "uqadd8 r5, r6, r5\n\t"
+
+#ifdef inner_branch
+ "3:\n\t"
+
+#endif
+ "str r5, [%[dest]], #4\n\t"
+ /* increment counter and jmp to top */
+ "subs %[w], %[w], #1\n\t"
+ "bne 1b\n\t"
+ "2:\n\t"
+ : [w] "+r" (w), [dest] "+r" (dst), [src] "+r" (src)
+ : [component_half] "r" (component_half), [upper_component_mask] "r" (upper_component_mask),
+ [alpha_mask] "r" (alpha_mask)
+ : "r4", "r5", "r6", "r7", "r8", "cc", "memory"
+ );
+ }
+}
+
+void
+fbCompositeSrc_8888x8x8888arm (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *dstLine, *dst;
+ uint32_t *srcLine, *src;
+ uint32_t mask;
+ int dstStride, srcStride;
+ uint16_t w;
+ uint32_t component_half = 0x800080;
+ uint32_t alpha_mask = 0xff;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+
+ fbComposeGetSolid (pMask, mask, pDst->bits.format);
+ mask = (mask) >> 24;
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+//#define inner_branch
+ asm volatile (
+ "cmp %[w], #0\n\t"
+ "beq 2f\n\t"
+ "1:\n\t"
+ /* load src */
+ "ldr r5, [%[src]], #4\n\t"
+#ifdef inner_branch
+ /* We can avoid doing the multiplication in two cases: 0x0 or 0xff.
+ * The 0x0 case also allows us to avoid doing an unecessary data
+ * write which is more valuable so we only check for that */
+ "cmp r5, #0\n\t"
+ "beq 3f\n\t"
+
+#endif
+ "ldr r4, [%[dest]] \n\t"
+
+ "uxtb16 r6, r5\n\t"
+ "uxtb16 r7, r5, ror #8\n\t"
+
+ /* multiply by alpha (r8) then by 257 and divide by 65536 */
+ "mla r6, r6, %[mask_alpha], %[component_half]\n\t"
+ "mla r7, r7, %[mask_alpha], %[component_half]\n\t"
+
+ "uxtab16 r6, r6, r6, ror #8\n\t"
+ "uxtab16 r7, r7, r7, ror #8\n\t"
+
+ "uxtb16 r6, r6, ror #8\n\t"
+ "uxtb16 r7, r7, ror #8\n\t"
+
+ /* recombine */
+ "orr r5, r6, r7, lsl #8\n\t"
+
+ "uxtb16 r6, r4\n\t"
+ "uxtb16 r7, r4, ror #8\n\t"
+
+ /* 255 - alpha */
+ "sub r8, %[alpha_mask], r5, lsr #24\n\t"
+
+ /* multiply by alpha (r8) then by 257 and divide by 65536 */
+ "mla r6, r6, r8, %[component_half]\n\t"
+ "mla r7, r7, r8, %[component_half]\n\t"
+
+ "uxtab16 r6, r6, r6, ror #8\n\t"
+ "uxtab16 r7, r7, r7, ror #8\n\t"
+
+ "uxtb16 r6, r6, ror #8\n\t"
+ "uxtb16 r7, r7, ror #8\n\t"
+
+ /* recombine */
+ "orr r6, r6, r7, lsl #8\n\t"
+
+ "uqadd8 r5, r6, r5\n\t"
+
+#ifdef inner_branch
+ "3:\n\t"
+
+#endif
+ "str r5, [%[dest]], #4\n\t"
+ /* increment counter and jmp to top */
+ "subs %[w], %[w], #1\n\t"
+ "bne 1b\n\t"
+ "2:\n\t"
+ : [w] "+r" (w), [dest] "+r" (dst), [src] "+r" (src)
+ : [component_half] "r" (component_half), [mask_alpha] "r" (mask),
+ [alpha_mask] "r" (alpha_mask)
+ : "r4", "r5", "r6", "r7", "r8", "r9", "cc", "memory"
+ );
+ }
+}
+
+void
+fbCompositeSolidMask_nx8x8888arm (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint32_t *dstLine, *dst;
+ uint8_t *maskLine, *mask;
+ int dstStride, maskStride;
+ uint16_t w;
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ srca = src >> 24;
+ if (src == 0)
+ return;
+
+ uint32_t component_mask = 0xff00ff;
+ uint32_t component_half = 0x800080;
+
+ uint32_t src_hi = (src >> 8) & component_mask;
+ uint32_t src_lo = src & component_mask;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+//#define inner_branch
+ asm volatile (
+ "cmp %[w], #0\n\t"
+ "beq 2f\n\t"
+ "1:\n\t"
+ /* load mask */
+ "ldrb r5, [%[mask]], #1\n\t"
+#ifdef inner_branch
+ /* We can avoid doing the multiplication in two cases: 0x0 or 0xff.
+ * The 0x0 case also allows us to avoid doing an unecessary data
+ * write which is more valuable so we only check for that */
+ "cmp r5, #0\n\t"
+ "beq 3f\n\t"
+
+#endif
+ "ldr r4, [%[dest]] \n\t"
+
+ /* multiply by alpha (r8) then by 257 and divide by 65536 */
+ "mla r6, %[src_lo], r5, %[component_half]\n\t"
+ "mla r7, %[src_hi], r5, %[component_half]\n\t"
+
+ "uxtab16 r6, r6, r6, ror #8\n\t"
+ "uxtab16 r7, r7, r7, ror #8\n\t"
+
+ "uxtb16 r6, r6, ror #8\n\t"
+ "uxtb16 r7, r7, ror #8\n\t"
+
+ /* recombine */
+ "orr r5, r6, r7, lsl #8\n\t"
+
+ "uxtb16 r6, r4\n\t"
+ "uxtb16 r7, r4, ror #8\n\t"
+
+ /* we could simplify this to use 'sub' if we were
+ * willing to give up a register for alpha_mask */
+ "mvn r8, r5\n\t"
+ "mov r8, r8, lsr #24\n\t"
+
+ /* multiply by alpha (r8) then by 257 and divide by 65536 */
+ "mla r6, r6, r8, %[component_half]\n\t"
+ "mla r7, r7, r8, %[component_half]\n\t"
+
+ "uxtab16 r6, r6, r6, ror #8\n\t"
+ "uxtab16 r7, r7, r7, ror #8\n\t"
+
+ "uxtb16 r6, r6, ror #8\n\t"
+ "uxtb16 r7, r7, ror #8\n\t"
+
+ /* recombine */
+ "orr r6, r6, r7, lsl #8\n\t"
+
+ "uqadd8 r5, r6, r5\n\t"
+
+#ifdef inner_branch
+ "3:\n\t"
+
+#endif
+ "str r5, [%[dest]], #4\n\t"
+ /* increment counter and jmp to top */
+ "subs %[w], %[w], #1\n\t"
+ "bne 1b\n\t"
+ "2:\n\t"
+ : [w] "+r" (w), [dest] "+r" (dst), [src] "+r" (src), [mask] "+r" (mask)
+ : [component_half] "r" (component_half),
+ [src_hi] "r" (src_hi), [src_lo] "r" (src_lo)
+ : "r4", "r5", "r6", "r7", "r8", "cc", "memory"
+ );
+ }
+}
+
+static const FastPathInfo arm_simd_fast_path_array[] =
+{
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8888arm, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8888arm, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8888arm, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8888arm, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8x8888arm, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8x8888arm, NEED_SOLID_MASK },
+
+ { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcAdd_8000x8000arm, 0 },
+
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8x8888arm, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8x8888arm, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8x8888arm, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8x8888arm, 0 },
+
+ { PIXMAN_OP_NONE },
+};
+
+const FastPathInfo *const arm_simd_fast_paths = arm_simd_fast_path_array;
+
+static void
+arm_simd_composite (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_image_t *dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ if (_pixman_run_fast_path (arm_simd_fast_paths, imp,
+ op, src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height))
+ {
+ return;
+ }
+
+ _pixman_implementation_composite (imp->delegate, op,
+ src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height);
+}
+
+pixman_implementation_t *
+_pixman_implementation_create_arm_simd (pixman_implementation_t *toplevel)
+{
+ pixman_implementation_t *general = _pixman_implementation_create_fast_path (NULL);
+ pixman_implementation_t *imp = _pixman_implementation_create (toplevel, general);
+
+ imp->composite = arm_simd_composite;
+
+ return imp;
+}
diff --git a/lib/pixman/pixman/pixman-arm-simd.h b/lib/pixman/pixman/pixman-arm-simd.h
new file mode 100644
index 000000000..8c1f88342
--- /dev/null
+++ b/lib/pixman/pixman/pixman-arm-simd.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright © 2008 Mozilla Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Mozilla Corporation not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Mozilla Corporation makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Author: Jeff Muizelaar (jeff@infidigm.net)
+ *
+ */
+
+#include "pixman-private.h"
+
+#ifdef USE_ARM_SIMD
+
+pixman_bool_t pixman_have_arm_simd(void);
+
+#else
+#define pixman_have_arm_simd() FALSE
+#endif
+
+#ifdef USE_ARM_SIMD
+
+extern const FastPathInfo *const arm_simd_fast_paths;
+
+void
+fbCompositeSrcAdd_8000x8000arm (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSrc_8888x8888arm (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSrc_8888x8x8888arm (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+void
+fbCompositeSolidMask_nx8x8888arm (
+ pixman_implementation_t * impl,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height);
+
+
+#endif /* USE_ARM */
diff --git a/lib/pixman/pixman/pixman-bits-image.c b/lib/pixman/pixman/pixman-bits-image.c
new file mode 100644
index 000000000..888e487e9
--- /dev/null
+++ b/lib/pixman/pixman/pixman-bits-image.c
@@ -0,0 +1,346 @@
+/*
+ * Copyright © 2000 SuSE, Inc.
+ * Copyright © 2007 Red Hat, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include "pixman-private.h"
+
+
+#define READ_ACCESS(f) ((image->common.read_func)? f##_accessors : f)
+#define WRITE_ACCESS(f) ((image->common.write_func)? f##_accessors : f)
+
+static void
+fbFetchSolid(bits_image_t * image,
+ int x, int y, int width,
+ uint32_t *buffer,
+ uint32_t *mask, uint32_t maskBits)
+{
+ uint32_t color;
+ uint32_t *end;
+ fetchPixelProc32 fetch =
+ READ_ACCESS(pixman_fetchPixelProcForPicture32)(image);
+
+ color = fetch(image, 0, 0);
+
+ end = buffer + width;
+ while (buffer < end)
+ *(buffer++) = color;
+}
+
+static void
+fbFetchSolid64(bits_image_t * image,
+ int x, int y, int width,
+ uint64_t *buffer, void *unused, uint32_t unused2)
+{
+ uint64_t color;
+ uint64_t *end;
+ fetchPixelProc64 fetch =
+ READ_ACCESS(pixman_fetchPixelProcForPicture64)(image);
+
+ color = fetch(image, 0, 0);
+
+ end = buffer + width;
+ while (buffer < end)
+ *(buffer++) = color;
+}
+
+static void
+fbFetch(bits_image_t * image,
+ int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
+{
+ fetchProc32 fetch = READ_ACCESS(pixman_fetchProcForPicture32)(image);
+
+ fetch(image, x, y, width, buffer);
+}
+
+static void
+fbFetch64(bits_image_t * image,
+ int x, int y, int width,
+ uint64_t *buffer, void *unused, uint32_t unused2)
+{
+ fetchProc64 fetch = READ_ACCESS(pixman_fetchProcForPicture64)(image);
+
+ fetch(image, x, y, width, buffer);
+}
+
+static void
+fbStore(bits_image_t * image, int x, int y, int width, uint32_t *buffer)
+{
+ uint32_t *bits;
+ int32_t stride;
+ storeProc32 store = WRITE_ACCESS(pixman_storeProcForPicture32)(image);
+ const pixman_indexed_t * indexed = image->indexed;
+
+ bits = image->bits;
+ stride = image->rowstride;
+ bits += y*stride;
+ store((pixman_image_t *)image, bits, buffer, x, width, indexed);
+}
+
+static void
+fbStore64 (bits_image_t * image, int x, int y, int width, uint64_t *buffer)
+{
+ uint32_t *bits;
+ int32_t stride;
+ storeProc64 store = WRITE_ACCESS(pixman_storeProcForPicture64)(image);
+ const pixman_indexed_t * indexed = image->indexed;
+
+ bits = image->bits;
+ stride = image->rowstride;
+ bits += y*stride;
+ store((pixman_image_t *)image, bits, buffer, x, width, indexed);
+}
+
+static void
+fbStoreExternalAlpha (bits_image_t * image, int x, int y, int width,
+ uint32_t *buffer)
+{
+ uint32_t *bits, *alpha_bits;
+ int32_t stride, astride;
+ int ax, ay;
+ storeProc32 store;
+ storeProc32 astore;
+ const pixman_indexed_t * indexed = image->indexed;
+ const pixman_indexed_t * aindexed;
+
+ if (!image->common.alpha_map) {
+ // XXX[AGP]: This should never happen!
+ // fbStore(image, x, y, width, buffer);
+ abort();
+ return;
+ }
+
+ store = WRITE_ACCESS(pixman_storeProcForPicture32)(image);
+ astore = WRITE_ACCESS(pixman_storeProcForPicture32)(image->common.alpha_map);
+ aindexed = image->common.alpha_map->indexed;
+
+ ax = x;
+ ay = y;
+
+ bits = image->bits;
+ stride = image->rowstride;
+
+ alpha_bits = image->common.alpha_map->bits;
+ astride = image->common.alpha_map->rowstride;
+
+ bits += y*stride;
+ alpha_bits += (ay - image->common.alpha_origin.y)*astride;
+
+
+ store((pixman_image_t *)image, bits, buffer, x, width, indexed);
+ astore((pixman_image_t *)image->common.alpha_map,
+ alpha_bits, buffer, ax - image->common.alpha_origin.x, width, aindexed);
+}
+
+static void
+fbStoreExternalAlpha64 (bits_image_t * image, int x, int y, int width,
+ uint64_t *buffer)
+{
+ uint32_t *bits, *alpha_bits;
+ int32_t stride, astride;
+ int ax, ay;
+ storeProc64 store;
+ storeProc64 astore;
+ const pixman_indexed_t * indexed = image->indexed;
+ const pixman_indexed_t * aindexed;
+
+ store = ACCESS(pixman_storeProcForPicture64)(image);
+ astore = ACCESS(pixman_storeProcForPicture64)(image->common.alpha_map);
+ aindexed = image->common.alpha_map->indexed;
+
+ ax = x;
+ ay = y;
+
+ bits = image->bits;
+ stride = image->rowstride;
+
+ alpha_bits = image->common.alpha_map->bits;
+ astride = image->common.alpha_map->rowstride;
+
+ bits += y*stride;
+ alpha_bits += (ay - image->common.alpha_origin.y)*astride;
+
+
+ store((pixman_image_t *)image, bits, buffer, x, width, indexed);
+ astore((pixman_image_t *)image->common.alpha_map,
+ alpha_bits, buffer, ax - image->common.alpha_origin.x, width, aindexed);
+}
+
+static void
+bits_image_property_changed (pixman_image_t *image)
+{
+ bits_image_t *bits = (bits_image_t *)image;
+
+ if (bits->common.alpha_map)
+ {
+ image->common.get_scanline_64 =
+ (scanFetchProc)_pixman_image_get_scanline_64_generic;
+ image->common.get_scanline_32 =
+ (scanFetchProc)READ_ACCESS(fbFetchExternalAlpha);
+ }
+ else if ((bits->common.repeat != PIXMAN_REPEAT_NONE) &&
+ bits->width == 1 &&
+ bits->height == 1)
+ {
+ image->common.get_scanline_64 = (scanFetchProc)fbFetchSolid64;
+ image->common.get_scanline_32 = (scanFetchProc)fbFetchSolid;
+ }
+ else if (!bits->common.transform &&
+ bits->common.filter != PIXMAN_FILTER_CONVOLUTION &&
+ bits->common.repeat != PIXMAN_REPEAT_PAD &&
+ bits->common.repeat != PIXMAN_REPEAT_REFLECT)
+ {
+ image->common.get_scanline_64 = (scanFetchProc)fbFetch64;
+ image->common.get_scanline_32 = (scanFetchProc)fbFetch;
+ }
+ else
+ {
+ image->common.get_scanline_64 =
+ (scanFetchProc)_pixman_image_get_scanline_64_generic;
+ image->common.get_scanline_32 =
+ (scanFetchProc)READ_ACCESS(fbFetchTransformed);
+ }
+
+ if (bits->common.alpha_map)
+ {
+ bits->store_scanline_64 = (scanStoreProc)fbStoreExternalAlpha64;
+ bits->store_scanline_32 = fbStoreExternalAlpha;
+ }
+ else
+ {
+ bits->store_scanline_64 = (scanStoreProc)fbStore64;
+ bits->store_scanline_32 = fbStore;
+ }
+}
+
+void
+_pixman_image_store_scanline_32 (bits_image_t *image, int x, int y, int width,
+ uint32_t *buffer)
+{
+ image->store_scanline_32 (image, x, y, width, buffer);
+}
+
+void
+_pixman_image_store_scanline_64 (bits_image_t *image, int x, int y, int width,
+ uint32_t *buffer)
+{
+ image->store_scanline_64 (image, x, y, width, buffer);
+}
+
+static uint32_t *
+create_bits (pixman_format_code_t format,
+ int width,
+ int height,
+ int *rowstride_bytes)
+{
+ int stride;
+ int buf_size;
+ int bpp;
+
+ /* what follows is a long-winded way, avoiding any possibility of integer
+ * overflows, of saying:
+ * stride = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (uint32_t);
+ */
+
+ bpp = PIXMAN_FORMAT_BPP (format);
+ if (pixman_multiply_overflows_int (width, bpp))
+ return NULL;
+
+ stride = width * bpp;
+ if (pixman_addition_overflows_int (stride, FB_MASK))
+ return NULL;
+
+ stride += FB_MASK;
+ stride >>= FB_SHIFT;
+
+#if FB_SHIFT < 2
+ if (pixman_multiply_overflows_int (stride, sizeof (uint32_t)))
+ return NULL;
+#endif
+ stride *= sizeof (uint32_t);
+
+ if (pixman_multiply_overflows_int (height, stride))
+ return NULL;
+
+ buf_size = height * stride;
+
+ if (rowstride_bytes)
+ *rowstride_bytes = stride;
+
+ return calloc (buf_size, 1);
+}
+
+PIXMAN_EXPORT pixman_image_t *
+pixman_image_create_bits (pixman_format_code_t format,
+ int width,
+ int height,
+ uint32_t *bits,
+ int rowstride_bytes)
+{
+ pixman_image_t *image;
+ uint32_t *free_me = NULL;
+
+ /* must be a whole number of uint32_t's
+ */
+ return_val_if_fail (bits == NULL ||
+ (rowstride_bytes % sizeof (uint32_t)) == 0, NULL);
+
+ if (!bits && width && height)
+ {
+ free_me = bits = create_bits (format, width, height, &rowstride_bytes);
+ if (!bits)
+ return NULL;
+ }
+
+ image = _pixman_image_allocate();
+
+ if (!image) {
+ if (free_me)
+ free (free_me);
+ return NULL;
+ }
+
+ image->type = BITS;
+ image->bits.format = format;
+ image->bits.width = width;
+ image->bits.height = height;
+ image->bits.bits = bits;
+ image->bits.free_me = free_me;
+
+ image->bits.rowstride = rowstride_bytes / (int) sizeof (uint32_t); /* we store it in number
+ * of uint32_t's
+ */
+ image->bits.indexed = NULL;
+
+ pixman_region32_fini (&image->common.full_region);
+ pixman_region32_init_rect (&image->common.full_region, 0, 0,
+ image->bits.width, image->bits.height);
+
+ image->common.property_changed = bits_image_property_changed;
+
+ bits_image_property_changed (image);
+
+ _pixman_image_reset_clip_region (image);
+
+ return image;
+}
diff --git a/lib/pixman/pixman/pixman-compose-accessors.c b/lib/pixman/pixman/pixman-compose-accessors.c
deleted file mode 100644
index 5393cf409..000000000
--- a/lib/pixman/pixman/pixman-compose-accessors.c
+++ /dev/null
@@ -1,4 +0,0 @@
-
-#define PIXMAN_FB_ACCESSORS
-
-#include "pixman-compose.c"
diff --git a/lib/pixman/pixman/pixman-compose.c b/lib/pixman/pixman/pixman-compose.c
deleted file mode 100644
index c583ea60e..000000000
--- a/lib/pixman/pixman/pixman-compose.c
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- * 2005 Lars Knoll & Zack Rusin, Trolltech
- * 2008 Aaron Plattner, NVIDIA Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <assert.h>
-#include <limits.h>
-
-#include "pixman-private.h"
-
-#ifdef PIXMAN_FB_ACCESSORS
-#define PIXMAN_COMPOSITE_RECT_GENERAL pixman_composite_rect_general_accessors
-#else
-#define PIXMAN_COMPOSITE_RECT_GENERAL pixman_composite_rect_general_no_accessors
-#endif
-
-static unsigned int
-SourcePictureClassify (source_image_t *pict,
- int x,
- int y,
- int width,
- int height)
-{
- if (pict->common.type == SOLID)
- {
- pict->class = SOURCE_IMAGE_CLASS_HORIZONTAL;
- }
- else if (pict->common.type == LINEAR)
- {
- linear_gradient_t *linear = (linear_gradient_t *)pict;
- pixman_vector_t v;
- pixman_fixed_32_32_t l;
- pixman_fixed_48_16_t dx, dy, a, b, off;
- pixman_fixed_48_16_t factors[4];
- int i;
-
- dx = linear->p2.x - linear->p1.x;
- dy = linear->p2.y - linear->p1.y;
- l = dx * dx + dy * dy;
- if (l)
- {
- a = (dx << 32) / l;
- b = (dy << 32) / l;
- }
- else
- {
- a = b = 0;
- }
-
- off = (-a * linear->p1.x
- -b * linear->p1.y) >> 16;
-
- for (i = 0; i < 3; i++)
- {
- v.vector[0] = pixman_int_to_fixed ((i % 2) * (width - 1) + x);
- v.vector[1] = pixman_int_to_fixed ((i / 2) * (height - 1) + y);
- v.vector[2] = pixman_fixed_1;
-
- if (pict->common.transform)
- {
- if (!pixman_transform_point_3d (pict->common.transform, &v))
- return SOURCE_IMAGE_CLASS_UNKNOWN;
- }
-
- factors[i] = ((a * v.vector[0] + b * v.vector[1]) >> 16) + off;
- }
-
- if (factors[2] == factors[0])
- pict->class = SOURCE_IMAGE_CLASS_HORIZONTAL;
- else if (factors[1] == factors[0])
- pict->class = SOURCE_IMAGE_CLASS_VERTICAL;
- }
-
- return pict->class;
-}
-
-static void fbFetchSolid(bits_image_t * pict, int x, int y, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
-{
- uint32_t color;
- uint32_t *end;
- fetchPixelProc32 fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
-
- color = fetch(pict, 0, 0);
-
- end = buffer + width;
- while (buffer < end)
- *(buffer++) = color;
-}
-
-static void fbFetchSolid64(bits_image_t * pict, int x, int y, int width, uint64_t *buffer, void *unused, uint32_t unused2)
-{
- uint64_t color;
- uint64_t *end;
- fetchPixelProc64 fetch = ACCESS(pixman_fetchPixelProcForPicture64)(pict);
-
- color = fetch(pict, 0, 0);
-
- end = buffer + width;
- while (buffer < end)
- *(buffer++) = color;
-}
-
-static void fbFetch(bits_image_t * pict, int x, int y, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
-{
- fetchProc32 fetch = ACCESS(pixman_fetchProcForPicture32)(pict);
-
- fetch(pict, x, y, width, buffer);
-}
-
-static void fbFetch64(bits_image_t * pict, int x, int y, int width, uint64_t *buffer, void *unused, uint32_t unused2)
-{
- fetchProc64 fetch = ACCESS(pixman_fetchProcForPicture64)(pict);
-
- fetch(pict, x, y, width, buffer);
-}
-
-static void
-fbStore(bits_image_t * pict, int x, int y, int width, uint32_t *buffer)
-{
- uint32_t *bits;
- int32_t stride;
- storeProc32 store = ACCESS(pixman_storeProcForPicture32)(pict);
- const pixman_indexed_t * indexed = pict->indexed;
-
- bits = pict->bits;
- stride = pict->rowstride;
- bits += y*stride;
- store((pixman_image_t *)pict, bits, buffer, x, width, indexed);
-}
-
-static void
-fbStore64(bits_image_t * pict, int x, int y, int width, uint64_t *buffer)
-{
- uint32_t *bits;
- int32_t stride;
- storeProc64 store = ACCESS(pixman_storeProcForPicture64)(pict);
- const pixman_indexed_t * indexed = pict->indexed;
-
- bits = pict->bits;
- stride = pict->rowstride;
- bits += y*stride;
- store((pixman_image_t *)pict, bits, buffer, x, width, indexed);
-}
-
-typedef void (*scanStoreProc)(pixman_image_t *, int, int, int, uint32_t *);
-typedef void (*scanFetchProc)(pixman_image_t *, int, int, int, uint32_t *,
- uint32_t *, uint32_t);
-
-static inline scanFetchProc get_fetch_source_pict(const int wide)
-{
- if (wide)
- return (scanFetchProc)pixmanFetchSourcePict64;
- else
- return (scanFetchProc)pixmanFetchSourcePict;
-}
-
-static inline scanFetchProc get_fetch_solid(const int wide)
-{
- if (wide)
- return (scanFetchProc)fbFetchSolid64;
- else
- return (scanFetchProc)fbFetchSolid;
-}
-
-static inline scanFetchProc get_fetch(const int wide)
-{
- if (wide)
- return (scanFetchProc)fbFetch64;
- else
- return (scanFetchProc)fbFetch;
-}
-
-static inline scanFetchProc get_fetch_external_alpha(const int wide)
-{
- if (wide)
- return (scanFetchProc)ACCESS(fbFetchExternalAlpha64);
- else
- return (scanFetchProc)ACCESS(fbFetchExternalAlpha);
-}
-
-static inline scanFetchProc get_fetch_transformed(const int wide)
-{
- if (wide)
- return (scanFetchProc)ACCESS(fbFetchTransformed64);
- else
- return (scanFetchProc)ACCESS(fbFetchTransformed);
-}
-
-static inline scanStoreProc get_store(const int wide)
-{
- if (wide)
- return (scanStoreProc)fbStore64;
- else
- return (scanStoreProc)fbStore;
-}
-
-static inline scanStoreProc get_store_external_alpha(const int wide)
-{
- if (wide)
- return (scanStoreProc)ACCESS(fbStoreExternalAlpha64);
- else
- return (scanStoreProc)ACCESS(fbStoreExternalAlpha);
-}
-
-#ifndef PIXMAN_FB_ACCESSORS
-static
-#endif
-void
-PIXMAN_COMPOSITE_RECT_GENERAL (const FbComposeData *data,
- void *src_buffer, void *mask_buffer,
- void *dest_buffer, const int wide)
-{
- int i;
- scanStoreProc store;
- scanFetchProc fetchSrc = NULL, fetchMask = NULL, fetchDest = NULL;
- unsigned int srcClass = SOURCE_IMAGE_CLASS_UNKNOWN;
- unsigned int maskClass = SOURCE_IMAGE_CLASS_UNKNOWN;
- uint32_t *bits;
- int32_t stride;
- int xoff, yoff;
-
- if (data->op == PIXMAN_OP_CLEAR)
- fetchSrc = NULL;
- else if (IS_SOURCE_IMAGE (data->src))
- {
- fetchSrc = get_fetch_source_pict(wide);
- srcClass = SourcePictureClassify ((source_image_t *)data->src,
- data->xSrc, data->ySrc,
- data->width, data->height);
- }
- else
- {
- bits_image_t *bits = (bits_image_t *)data->src;
-
- if (bits->common.alpha_map)
- {
- fetchSrc = get_fetch_external_alpha(wide);
- }
- else if ((bits->common.repeat == PIXMAN_REPEAT_NORMAL || bits->common.repeat == PIXMAN_REPEAT_PAD) &&
- bits->width == 1 &&
- bits->height == 1)
- {
- fetchSrc = get_fetch_solid(wide);
- srcClass = SOURCE_IMAGE_CLASS_HORIZONTAL;
- }
- else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION
- && bits->common.repeat != PIXMAN_REPEAT_PAD)
- {
- fetchSrc = get_fetch(wide);
- }
- else
- {
- fetchSrc = get_fetch_transformed(wide);
- }
- }
-
- if (!data->mask || data->op == PIXMAN_OP_CLEAR)
- {
- fetchMask = NULL;
- }
- else
- {
- if (IS_SOURCE_IMAGE (data->mask))
- {
- fetchMask = (scanFetchProc)pixmanFetchSourcePict;
- maskClass = SourcePictureClassify ((source_image_t *)data->mask,
- data->xMask, data->yMask,
- data->width, data->height);
- }
- else
- {
- bits_image_t *bits = (bits_image_t *)data->mask;
-
- if (bits->common.alpha_map)
- {
- fetchMask = get_fetch_external_alpha(wide);
- }
- else if ((bits->common.repeat == PIXMAN_REPEAT_NORMAL || bits->common.repeat == PIXMAN_REPEAT_PAD) &&
- bits->width == 1 && bits->height == 1)
- {
- fetchMask = get_fetch_solid(wide);
- maskClass = SOURCE_IMAGE_CLASS_HORIZONTAL;
- }
- else if (!bits->common.transform && bits->common.filter != PIXMAN_FILTER_CONVOLUTION
- && bits->common.repeat != PIXMAN_REPEAT_PAD)
- fetchMask = get_fetch(wide);
- else
- fetchMask = get_fetch_transformed(wide);
- }
- }
-
- if (data->dest->common.alpha_map)
- {
- fetchDest = get_fetch_external_alpha(wide);
- store = get_store_external_alpha(wide);
-
- if (data->op == PIXMAN_OP_CLEAR || data->op == PIXMAN_OP_SRC)
- fetchDest = NULL;
- }
- else
- {
- fetchDest = get_fetch(wide);
- store = get_store(wide);
-
- switch (data->op)
- {
- case PIXMAN_OP_CLEAR:
- case PIXMAN_OP_SRC:
- fetchDest = NULL;
-#ifndef PIXMAN_FB_ACCESSORS
- /* fall-through */
- case PIXMAN_OP_ADD:
- case PIXMAN_OP_OVER:
- switch (data->dest->bits.format) {
- case PIXMAN_a8r8g8b8:
- case PIXMAN_x8r8g8b8:
- // Skip the store step and composite directly into the
- // destination if the output format of the compose func matches
- // the destination format.
- if (!wide)
- store = NULL;
- break;
- default:
- break;
- }
-#endif
- break;
- }
- }
-
- if (!store)
- {
- bits = data->dest->bits.bits;
- stride = data->dest->bits.rowstride;
- xoff = yoff = 0;
- }
- else
- {
- bits = NULL;
- stride = 0;
- xoff = yoff = 0;
- }
-
- if (fetchSrc &&
- fetchMask &&
- data->mask &&
- data->mask->common.type == BITS &&
- data->mask->common.component_alpha &&
- PIXMAN_FORMAT_RGB (data->mask->bits.format))
- {
- CombineFuncC32 compose =
- wide ? (CombineFuncC32)pixman_composeFunctions64.combineC[data->op] :
- pixman_composeFunctions.combineC[data->op];
- if (!compose)
- return;
-
- for (i = 0; i < data->height; ++i) {
- /* fill first half of scanline with source */
- if (fetchSrc)
- {
- if (fetchMask)
- {
- /* fetch mask before source so that fetching of
- source can be optimized */
- fetchMask (data->mask, data->xMask, data->yMask + i,
- data->width, mask_buffer, 0, 0);
-
- if (maskClass == SOURCE_IMAGE_CLASS_HORIZONTAL)
- fetchMask = NULL;
- }
-
- if (srcClass == SOURCE_IMAGE_CLASS_HORIZONTAL)
- {
- fetchSrc (data->src, data->xSrc, data->ySrc + i,
- data->width, src_buffer, 0, 0);
- fetchSrc = NULL;
- }
- else
- {
- fetchSrc (data->src, data->xSrc, data->ySrc + i,
- data->width, src_buffer, mask_buffer,
- 0xffffffff);
- }
- }
- else if (fetchMask)
- {
- fetchMask (data->mask, data->xMask, data->yMask + i,
- data->width, mask_buffer, 0, 0);
- }
-
- if (store)
- {
- /* fill dest into second half of scanline */
- if (fetchDest)
- fetchDest (data->dest, data->xDest, data->yDest + i,
- data->width, dest_buffer, 0, 0);
-
- /* blend */
- compose (dest_buffer, src_buffer, mask_buffer, data->width);
-
- /* write back */
- store (data->dest, data->xDest, data->yDest + i, data->width,
- dest_buffer);
- }
- else
- {
- /* blend */
- compose (bits + (data->yDest + i+ yoff) * stride +
- data->xDest + xoff,
- src_buffer, mask_buffer, data->width);
- }
- }
- }
- else
- {
- void *src_mask_buffer = 0;
- const int useMask = (fetchMask != NULL);
- CombineFuncU32 compose =
- wide ? (CombineFuncU32)pixman_composeFunctions64.combineU[data->op] :
- pixman_composeFunctions.combineU[data->op];
- if (!compose)
- return;
-
- for (i = 0; i < data->height; ++i) {
- /* fill first half of scanline with source */
- if (fetchSrc)
- {
- if (fetchMask)
- {
- /* fetch mask before source so that fetching of
- source can be optimized */
- fetchMask (data->mask, data->xMask, data->yMask + i,
- data->width, mask_buffer, 0, 0);
-
- if (maskClass == SOURCE_IMAGE_CLASS_HORIZONTAL)
- fetchMask = NULL;
- }
-
- if (srcClass == SOURCE_IMAGE_CLASS_HORIZONTAL)
- {
- fetchSrc (data->src, data->xSrc, data->ySrc + i,
- data->width, src_buffer, 0, 0);
-
- if (useMask)
- {
- if (wide)
- pixman_composeFunctions64.combineU[PIXMAN_OP_IN] (mask_buffer, src_buffer, data->width);
- else
- pixman_composeFunctions.combineU[PIXMAN_OP_IN] (mask_buffer, src_buffer, data->width);
-
- src_mask_buffer = mask_buffer;
- }
- else
- src_mask_buffer = src_buffer;
-
- fetchSrc = NULL;
- }
- else
- {
- fetchSrc (data->src, data->xSrc, data->ySrc + i,
- data->width, src_buffer,
- useMask ? mask_buffer : NULL, 0xff000000);
-
- if (useMask) {
- if (wide)
- pixman_composeFunctions64.combineMaskU (src_buffer,
- mask_buffer,
- data->width);
- else
- pixman_composeFunctions.combineMaskU (src_buffer,
- mask_buffer,
- data->width);
- }
-
- src_mask_buffer = src_buffer;
- }
- }
- else if (fetchMask)
- {
- fetchMask (data->mask, data->xMask, data->yMask + i,
- data->width, mask_buffer, 0, 0);
-
- if (wide)
- pixman_composeFunctions64.combineU[PIXMAN_OP_IN] (mask_buffer, src_buffer, data->width);
- else
- pixman_composeFunctions.combineU[PIXMAN_OP_IN] (mask_buffer, src_buffer, data->width);
-
- src_mask_buffer = mask_buffer;
- }
-
- if (store)
- {
- /* fill dest into second half of scanline */
- if (fetchDest)
- fetchDest (data->dest, data->xDest, data->yDest + i,
- data->width, dest_buffer, 0, 0);
-
- /* blend */
- compose (dest_buffer, src_mask_buffer, data->width);
-
- /* write back */
- store (data->dest, data->xDest, data->yDest + i, data->width,
- dest_buffer);
- }
- else
- {
- /* blend */
- compose (bits + (data->yDest + i+ yoff) * stride +
- data->xDest + xoff,
- src_mask_buffer, data->width);
- }
- }
- }
-}
-
-#ifndef PIXMAN_FB_ACCESSORS
-
-#define SCANLINE_BUFFER_LENGTH 2048
-
-void
-pixman_composite_rect_general (const FbComposeData *data)
-{
- uint32_t _scanline_buffer[SCANLINE_BUFFER_LENGTH * 3];
- const pixman_format_code_t srcFormat = data->src->type == BITS ? data->src->bits.format : 0;
- const pixman_format_code_t maskFormat = data->mask && data->mask->type == BITS ? data->mask->bits.format : 0;
- const pixman_format_code_t destFormat = data->dest->type == BITS ? data->dest->bits.format : 0;
- const int srcWide = PIXMAN_FORMAT_16BPC(srcFormat);
- const int maskWide = data->mask && PIXMAN_FORMAT_16BPC(maskFormat);
- const int destWide = PIXMAN_FORMAT_16BPC(destFormat);
- const int wide = srcWide || maskWide || destWide;
- const int Bpp = wide ? 8 : 4;
- uint8_t *scanline_buffer = (uint8_t*)_scanline_buffer;
- uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-
- if (data->width * Bpp > SCANLINE_BUFFER_LENGTH * sizeof(uint32_t))
- {
- scanline_buffer = pixman_malloc_abc (data->width, 3, Bpp);
-
- if (!scanline_buffer)
- return;
- }
-
- src_buffer = scanline_buffer;
- mask_buffer = src_buffer + data->width * Bpp;
- dest_buffer = mask_buffer + data->width * Bpp;
-
- if (data->src->common.read_func ||
- data->src->common.write_func ||
- (data->mask && data->mask->common.read_func) ||
- (data->mask && data->mask->common.write_func) ||
- data->dest->common.read_func ||
- data->dest->common.write_func)
- {
- pixman_composite_rect_general_accessors (data, src_buffer, mask_buffer,
- dest_buffer, wide);
- }
- else
- {
- pixman_composite_rect_general_no_accessors (data, src_buffer,
- mask_buffer, dest_buffer,
- wide);
- }
-
- if ((void*)scanline_buffer != (void*)_scanline_buffer)
- free (scanline_buffer);
-}
-
-#endif
diff --git a/lib/pixman/pixman/pixman-compute-region.c b/lib/pixman/pixman/pixman-compute-region.c
index a93cee0ba..31eaee8e3 100644
--- a/lib/pixman/pixman/pixman-compute-region.c
+++ b/lib/pixman/pixman/pixman-compute-region.c
@@ -98,7 +98,7 @@ miClipPictureSrc (pixman_region32_t * pRegion,
*/
if (pPicture->common.has_client_clip)
{
- pixman_region32_translate ( pRegion, dx, dy);
+ pixman_region32_translate (pRegion, dx, dy);
if (!pixman_region32_intersect (pRegion, pRegion,
pPicture->common.src_clip))
@@ -178,8 +178,8 @@ pixman_compute_composite_region32 (pixman_region32_t * pRegion,
if (pSrc->common.alpha_map)
{
if (!miClipPictureSrc (pRegion, (pixman_image_t *)pSrc->common.alpha_map,
- xDst - (xSrc + pSrc->common.alpha_origin.x),
- yDst - (ySrc + pSrc->common.alpha_origin.y)))
+ xDst - (xSrc - pSrc->common.alpha_origin.x),
+ yDst - (ySrc - pSrc->common.alpha_origin.y)))
{
pixman_region32_fini (pRegion);
return FALSE;
@@ -196,8 +196,8 @@ pixman_compute_composite_region32 (pixman_region32_t * pRegion,
if (pMask->common.alpha_map)
{
if (!miClipPictureSrc (pRegion, (pixman_image_t *)pMask->common.alpha_map,
- xDst - (xMask + pMask->common.alpha_origin.x),
- yDst - (yMask + pMask->common.alpha_origin.y)))
+ xDst - (xMask - pMask->common.alpha_origin.x),
+ yDst - (yMask - pMask->common.alpha_origin.y)))
{
pixman_region32_fini (pRegion);
return FALSE;
diff --git a/lib/pixman/pixman/pixman-conical-gradient.c b/lib/pixman/pixman/pixman-conical-gradient.c
new file mode 100644
index 000000000..023256aae
--- /dev/null
+++ b/lib/pixman/pixman/pixman-conical-gradient.c
@@ -0,0 +1,157 @@
+/*
+ * Copyright © 2000 SuSE, Inc.
+ * Copyright © 2007 Red Hat, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * 2005 Lars Knoll & Zack Rusin, Trolltech
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+#include <config.h>
+#include <stdlib.h>
+#include <math.h>
+#include "pixman-private.h"
+
+static void
+conical_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
+{
+ source_image_t *source = (source_image_t *)image;
+ gradient_t *gradient = (gradient_t *)source;
+ conical_gradient_t *conical = (conical_gradient_t *)image;
+ uint32_t *end = buffer + width;
+ GradientWalker walker;
+ pixman_bool_t affine = TRUE;
+ double cx = 1.;
+ double cy = 0.;
+ double cz = 0.;
+ double rx = x + 0.5;
+ double ry = y + 0.5;
+ double rz = 1.;
+ double a = conical->angle/(180.*65536);
+
+ _pixman_gradient_walker_init (&walker, gradient, source->common.repeat);
+
+ if (source->common.transform) {
+ pixman_vector_t v;
+ /* reference point is the center of the pixel */
+ v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1/2;
+ v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1/2;
+ v.vector[2] = pixman_fixed_1;
+ if (!pixman_transform_point_3d (source->common.transform, &v))
+ return;
+
+ cx = source->common.transform->matrix[0][0]/65536.;
+ cy = source->common.transform->matrix[1][0]/65536.;
+ cz = source->common.transform->matrix[2][0]/65536.;
+ rx = v.vector[0]/65536.;
+ ry = v.vector[1]/65536.;
+ rz = v.vector[2]/65536.;
+ affine = source->common.transform->matrix[2][0] == 0 && v.vector[2] == pixman_fixed_1;
+ }
+
+ if (affine) {
+ rx -= conical->center.x/65536.;
+ ry -= conical->center.y/65536.;
+
+ while (buffer < end) {
+ double angle;
+
+ if (!mask || *mask++ & maskBits)
+ {
+ pixman_fixed_48_16_t t;
+
+ angle = atan2(ry, rx) + a;
+ t = (pixman_fixed_48_16_t) (angle * (65536. / (2*M_PI)));
+
+ *(buffer) = _pixman_gradient_walker_pixel (&walker, t);
+ }
+
+ ++buffer;
+ rx += cx;
+ ry += cy;
+ }
+ } else {
+ while (buffer < end) {
+ double x, y;
+ double angle;
+
+ if (!mask || *mask++ & maskBits)
+ {
+ pixman_fixed_48_16_t t;
+
+ if (rz != 0) {
+ x = rx/rz;
+ y = ry/rz;
+ } else {
+ x = y = 0.;
+ }
+ x -= conical->center.x/65536.;
+ y -= conical->center.y/65536.;
+ angle = atan2(y, x) + a;
+ t = (pixman_fixed_48_16_t) (angle * (65536. / (2*M_PI)));
+
+ *(buffer) = _pixman_gradient_walker_pixel (&walker, t);
+ }
+
+ ++buffer;
+ rx += cx;
+ ry += cy;
+ rz += cz;
+ }
+ }
+}
+
+static void
+conical_gradient_property_changed (pixman_image_t *image)
+{
+ image->common.get_scanline_32 = (scanFetchProc)conical_gradient_get_scanline_32;
+ image->common.get_scanline_64 = (scanFetchProc)_pixman_image_get_scanline_64_generic;
+}
+
+PIXMAN_EXPORT pixman_image_t *
+pixman_image_create_conical_gradient (pixman_point_fixed_t *center,
+ pixman_fixed_t angle,
+ const pixman_gradient_stop_t *stops,
+ int n_stops)
+{
+ pixman_image_t *image = _pixman_image_allocate();
+ conical_gradient_t *conical;
+
+ if (!image)
+ return NULL;
+
+ conical = &image->conical;
+
+ if (!_pixman_init_gradient (&conical->common, stops, n_stops))
+ {
+ free (image);
+ return NULL;
+ }
+
+ image->type = CONICAL;
+ conical->center = *center;
+ conical->angle = angle;
+
+ image->common.property_changed = conical_gradient_property_changed;
+
+ conical_gradient_property_changed (image);
+
+ return image;
+}
diff --git a/lib/pixman/pixman/pixman-cpu.c b/lib/pixman/pixman/pixman-cpu.c
new file mode 100644
index 000000000..057c13418
--- /dev/null
+++ b/lib/pixman/pixman/pixman-cpu.c
@@ -0,0 +1,534 @@
+/*
+ * Copyright © 2000 SuSE, Inc.
+ * Copyright © 2007 Red Hat, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#if defined(USE_ARM_SIMD) && defined(_MSC_VER)
+/* Needed for EXCEPTION_ILLEGAL_INSTRUCTION */
+#include <windows.h>
+#endif
+
+#include "pixman-private.h"
+
+#ifdef USE_VMX
+
+/* The CPU detection code needs to be in a file not compiled with
+ * "-maltivec -mabi=altivec", as gcc would try to save vector register
+ * across function calls causing SIGILL on cpus without Altivec/vmx.
+ */
+static pixman_bool_t initialized = FALSE;
+static volatile pixman_bool_t have_vmx = TRUE;
+
+#ifdef __APPLE__
+#include <sys/sysctl.h>
+
+static pixman_bool_t
+pixman_have_vmx (void)
+{
+ if(!initialized) {
+ size_t length = sizeof(have_vmx);
+ int error =
+ sysctlbyname("hw.optional.altivec", &have_vmx, &length, NULL, 0);
+ if(error) have_vmx = FALSE;
+ initialized = TRUE;
+ }
+ return have_vmx;
+}
+
+#elif defined (__linux__)
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <linux/auxvec.h>
+#include <asm/cputable.h>
+
+static pixman_bool_t
+pixman_have_vmx (void)
+{
+ if (!initialized) {
+ char fname[64];
+ unsigned long buf[64];
+ ssize_t count = 0;
+ pid_t pid;
+ int fd, i;
+
+ pid = getpid();
+ snprintf(fname, sizeof(fname)-1, "/proc/%d/auxv", pid);
+
+ fd = open(fname, O_RDONLY);
+ if (fd >= 0) {
+ for (i = 0; i <= (count / sizeof(unsigned long)); i += 2) {
+ /* Read more if buf is empty... */
+ if (i == (count / sizeof(unsigned long))) {
+ count = read(fd, buf, sizeof(buf));
+ if (count <= 0)
+ break;
+ i = 0;
+ }
+
+ if (buf[i] == AT_HWCAP) {
+ have_vmx = !!(buf[i+1] & PPC_FEATURE_HAS_ALTIVEC);
+ initialized = TRUE;
+ break;
+ } else if (buf[i] == AT_NULL) {
+ break;
+ }
+ }
+ close(fd);
+ }
+ }
+ if (!initialized) {
+ /* Something went wrong. Assume 'no' rather than playing
+ fragile tricks with catching SIGILL. */
+ have_vmx = FALSE;
+ initialized = TRUE;
+ }
+
+ return have_vmx;
+}
+#else /* !__APPLE__ && !__linux__ */
+#include <signal.h>
+#include <setjmp.h>
+
+static jmp_buf jump_env;
+
+static void vmx_test(int sig, siginfo_t *si, void *unused) {
+ longjmp (jump_env, 1);
+}
+
+static pixman_bool_t
+pixman_have_vmx (void) {
+ struct sigaction sa, osa;
+ int jmp_result;
+ if (!initialized) {
+ sa.sa_flags = SA_SIGINFO;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_sigaction = vmx_test;
+ sigaction(SIGILL, &sa, &osa);
+ jmp_result = setjmp (jump_env);
+ if (jmp_result == 0) {
+ asm volatile ( "vor 0, 0, 0" );
+ }
+ sigaction(SIGILL, &osa, NULL);
+ have_vmx = (jmp_result == 0);
+ initialized = TRUE;
+ }
+ return have_vmx;
+}
+#endif /* __APPLE__ */
+#endif /* USE_VMX */
+
+#if defined(USE_ARM_SIMD) || defined(USE_ARM_NEON)
+
+#if defined(_MSC_VER)
+
+#if defined(USE_ARM_SIMD)
+extern int pixman_msvc_try_arm_simd_op();
+
+pixman_bool_t
+pixman_have_arm_simd (void)
+{
+ static pixman_bool_t initialized = FALSE;
+ static pixman_bool_t have_arm_simd = FALSE;
+
+ if (!initialized) {
+ __try {
+ pixman_msvc_try_arm_simd_op();
+ have_arm_simd = TRUE;
+ } __except(GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) {
+ have_arm_simd = FALSE;
+ }
+ initialized = TRUE;
+ }
+
+ return have_arm_simd;
+}
+#endif /* USE_ARM_SIMD */
+
+#if defined(USE_ARM_NEON)
+extern int pixman_msvc_try_arm_neon_op();
+
+pixman_bool_t
+pixman_have_arm_neon (void)
+{
+ static pixman_bool_t initialized = FALSE;
+ static pixman_bool_t have_arm_neon = FALSE;
+
+ if (!initialized) {
+ __try {
+ pixman_msvc_try_arm_neon_op();
+ have_arm_neon = TRUE;
+ } __except(GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) {
+ have_arm_neon = FALSE;
+ }
+ initialized = TRUE;
+ }
+
+ return have_arm_neon;
+}
+#endif /* USE_ARM_NEON */
+
+#else /* linux ELF */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <string.h>
+#include <elf.h>
+
+static pixman_bool_t arm_has_v7 = FALSE;
+static pixman_bool_t arm_has_v6 = FALSE;
+static pixman_bool_t arm_has_vfp = FALSE;
+static pixman_bool_t arm_has_neon = FALSE;
+static pixman_bool_t arm_has_iwmmxt = FALSE;
+static pixman_bool_t arm_tests_initialized = FALSE;
+
+static void
+pixman_arm_read_auxv() {
+ int fd;
+ Elf32_auxv_t aux;
+
+ fd = open("/proc/self/auxv", O_RDONLY);
+ if (fd >= 0) {
+ while (read(fd, &aux, sizeof(Elf32_auxv_t)) == sizeof(Elf32_auxv_t)) {
+ if (aux.a_type == AT_HWCAP) {
+ uint32_t hwcap = aux.a_un.a_val;
+ if (getenv("ARM_FORCE_HWCAP"))
+ hwcap = strtoul(getenv("ARM_FORCE_HWCAP"), NULL, 0);
+ // hardcode these values to avoid depending on specific versions
+ // of the hwcap header, e.g. HWCAP_NEON
+ arm_has_vfp = (hwcap & 64) != 0;
+ arm_has_iwmmxt = (hwcap & 512) != 0;
+ // this flag is only present on kernel 2.6.29
+ arm_has_neon = (hwcap & 4096) != 0;
+ } else if (aux.a_type == AT_PLATFORM) {
+ const char *plat = (const char*) aux.a_un.a_val;
+ if (getenv("ARM_FORCE_PLATFORM"))
+ plat = getenv("ARM_FORCE_PLATFORM");
+ if (strncmp(plat, "v7l", 3) == 0) {
+ arm_has_v7 = TRUE;
+ arm_has_v6 = TRUE;
+ } else if (strncmp(plat, "v6l", 3) == 0) {
+ arm_has_v6 = TRUE;
+ }
+ }
+ }
+ close (fd);
+
+ // if we don't have 2.6.29, we have to do this hack; set
+ // the env var to trust HWCAP.
+ if (!getenv("ARM_TRUST_HWCAP") && arm_has_v7)
+ arm_has_neon = TRUE;
+ }
+
+ arm_tests_initialized = TRUE;
+}
+
+#if defined(USE_ARM_SIMD)
+pixman_bool_t
+pixman_have_arm_simd (void)
+{
+ if (!arm_tests_initialized)
+ pixman_arm_read_auxv();
+
+ return arm_has_v6;
+}
+#endif /* USE_ARM_SIMD */
+
+#if defined(USE_ARM_NEON)
+pixman_bool_t
+pixman_have_arm_neon (void)
+{
+ if (!arm_tests_initialized)
+ pixman_arm_read_auxv();
+
+ return arm_has_neon;
+}
+#endif /* USE_ARM_NEON */
+
+#endif /* linux */
+
+#endif /* USE_ARM_SIMD || USE_ARM_NEON */
+
+#ifdef USE_MMX
+/* The CPU detection code needs to be in a file not compiled with
+ * "-mmmx -msse", as gcc would generate CMOV instructions otherwise
+ * that would lead to SIGILL instructions on old CPUs that don't have
+ * it.
+ */
+#if !defined(__amd64__) && !defined(__x86_64__)
+
+#ifdef HAVE_GETISAX
+#include <sys/auxv.h>
+#endif
+
+enum CPUFeatures {
+ NoFeatures = 0,
+ MMX = 0x1,
+ MMX_Extensions = 0x2,
+ SSE = 0x6,
+ SSE2 = 0x8,
+ CMOV = 0x10
+};
+
+static unsigned int detectCPUFeatures(void) {
+ unsigned int features = 0;
+ unsigned int result = 0;
+
+#ifdef HAVE_GETISAX
+ if (getisax(&result, 1)) {
+ if (result & AV_386_CMOV)
+ features |= CMOV;
+ if (result & AV_386_MMX)
+ features |= MMX;
+ if (result & AV_386_AMD_MMX)
+ features |= MMX_Extensions;
+ if (result & AV_386_SSE)
+ features |= SSE;
+ if (result & AV_386_SSE2)
+ features |= SSE2;
+ }
+#else
+ char vendor[13];
+#ifdef _MSC_VER
+ int vendor0 = 0, vendor1, vendor2;
+#endif
+ vendor[0] = 0;
+ vendor[12] = 0;
+
+#ifdef __GNUC__
+ /* see p. 118 of amd64 instruction set manual Vol3 */
+ /* We need to be careful about the handling of %ebx and
+ * %esp here. We can't declare either one as clobbered
+ * since they are special registers (%ebx is the "PIC
+ * register" holding an offset to global data, %esp the
+ * stack pointer), so we need to make sure they have their
+ * original values when we access the output operands.
+ */
+ __asm__ (
+ "pushf\n"
+ "pop %%eax\n"
+ "mov %%eax, %%ecx\n"
+ "xor $0x00200000, %%eax\n"
+ "push %%eax\n"
+ "popf\n"
+ "pushf\n"
+ "pop %%eax\n"
+ "mov $0x0, %%edx\n"
+ "xor %%ecx, %%eax\n"
+ "jz 1f\n"
+
+ "mov $0x00000000, %%eax\n"
+ "push %%ebx\n"
+ "cpuid\n"
+ "mov %%ebx, %%eax\n"
+ "pop %%ebx\n"
+ "mov %%eax, %1\n"
+ "mov %%edx, %2\n"
+ "mov %%ecx, %3\n"
+ "mov $0x00000001, %%eax\n"
+ "push %%ebx\n"
+ "cpuid\n"
+ "pop %%ebx\n"
+ "1:\n"
+ "mov %%edx, %0\n"
+ : "=r" (result),
+ "=m" (vendor[0]),
+ "=m" (vendor[4]),
+ "=m" (vendor[8])
+ :
+ : "%eax", "%ecx", "%edx"
+ );
+
+#elif defined (_MSC_VER)
+
+ _asm {
+ pushfd
+ pop eax
+ mov ecx, eax
+ xor eax, 00200000h
+ push eax
+ popfd
+ pushfd
+ pop eax
+ mov edx, 0
+ xor eax, ecx
+ jz nocpuid
+
+ mov eax, 0
+ push ebx
+ cpuid
+ mov eax, ebx
+ pop ebx
+ mov vendor0, eax
+ mov vendor1, edx
+ mov vendor2, ecx
+ mov eax, 1
+ push ebx
+ cpuid
+ pop ebx
+ nocpuid:
+ mov result, edx
+ }
+ memmove (vendor+0, &vendor0, 4);
+ memmove (vendor+4, &vendor1, 4);
+ memmove (vendor+8, &vendor2, 4);
+
+#else
+# error unsupported compiler
+#endif
+
+ features = 0;
+ if (result) {
+ /* result now contains the standard feature bits */
+ if (result & (1 << 15))
+ features |= CMOV;
+ if (result & (1 << 23))
+ features |= MMX;
+ if (result & (1 << 25))
+ features |= SSE;
+ if (result & (1 << 26))
+ features |= SSE2;
+ if ((features & MMX) && !(features & SSE) &&
+ (strcmp(vendor, "AuthenticAMD") == 0 ||
+ strcmp(vendor, "Geode by NSC") == 0)) {
+ /* check for AMD MMX extensions */
+#ifdef __GNUC__
+ __asm__(
+ " push %%ebx\n"
+ " mov $0x80000000, %%eax\n"
+ " cpuid\n"
+ " xor %%edx, %%edx\n"
+ " cmp $0x1, %%eax\n"
+ " jge 2f\n"
+ " mov $0x80000001, %%eax\n"
+ " cpuid\n"
+ "2:\n"
+ " pop %%ebx\n"
+ " mov %%edx, %0\n"
+ : "=r" (result)
+ :
+ : "%eax", "%ecx", "%edx"
+ );
+#elif defined _MSC_VER
+ _asm {
+ push ebx
+ mov eax, 80000000h
+ cpuid
+ xor edx, edx
+ cmp eax, 1
+ jge notamd
+ mov eax, 80000001h
+ cpuid
+ notamd:
+ pop ebx
+ mov result, edx
+ }
+#endif
+ if (result & (1<<22))
+ features |= MMX_Extensions;
+ }
+ }
+#endif /* HAVE_GETISAX */
+
+ return features;
+}
+
+static pixman_bool_t
+pixman_have_mmx (void)
+{
+ static pixman_bool_t initialized = FALSE;
+ static pixman_bool_t mmx_present;
+
+ if (!initialized)
+ {
+ unsigned int features = detectCPUFeatures();
+ mmx_present = (features & (MMX|MMX_Extensions)) == (MMX|MMX_Extensions);
+ initialized = TRUE;
+ }
+
+ return mmx_present;
+}
+
+#ifdef USE_SSE2
+static pixman_bool_t
+pixman_have_sse2 (void)
+{
+ static pixman_bool_t initialized = FALSE;
+ static pixman_bool_t sse2_present;
+
+ if (!initialized)
+ {
+ unsigned int features = detectCPUFeatures();
+ sse2_present = (features & (MMX|MMX_Extensions|SSE|SSE2)) == (MMX|MMX_Extensions|SSE|SSE2);
+ initialized = TRUE;
+ }
+
+ return sse2_present;
+}
+#endif
+
+#else /* __amd64__ */
+#ifdef USE_MMX
+#define pixman_have_mmx() TRUE
+#endif
+#ifdef USE_SSE2
+#define pixman_have_sse2() TRUE
+#endif
+#endif /* __amd64__ */
+#endif
+
+pixman_implementation_t *
+_pixman_choose_implementation (void)
+{
+#ifdef USE_SSE2
+ if (pixman_have_sse2 ())
+ return _pixman_implementation_create_sse2 (NULL);
+#endif
+#ifdef USE_MMX
+ if (pixman_have_mmx())
+ return _pixman_implementation_create_mmx (NULL);
+#endif
+
+#ifdef USE_ARM_NEON
+ if (pixman_have_arm_neon())
+ return _pixman_implementation_create_arm_neon (NULL);
+#endif
+#ifdef USE_ARM_SIMD
+ if (pixman_have_arm_simd())
+ return _pixman_implementation_create_arm_simd (NULL);
+#endif
+#ifdef USE_VMX
+ if (pixman_have_vmx())
+ return _pixman_implementation_create_vmx (NULL);
+#endif
+
+ return _pixman_implementation_create_fast_path (NULL);
+}
diff --git a/lib/pixman/pixman/pixman-fast-path.c b/lib/pixman/pixman/pixman-fast-path.c
new file mode 100644
index 000000000..5f78bc335
--- /dev/null
+++ b/lib/pixman/pixman/pixman-fast-path.c
@@ -0,0 +1,1350 @@
+/* -*- Mode: c; c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- */
+/*
+ * Copyright © 2000 SuSE, Inc.
+ * Copyright © 2007 Red Hat, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#include <config.h>
+#include <string.h>
+#include "pixman-private.h"
+#include "pixman-combine32.h"
+#define FbFullMask(n) ((n) == 32 ? (uint32_t)-1 : ((((uint32_t) 1) << n) - 1))
+
+#undef READ
+#undef WRITE
+#define READ(img,x) (*(x))
+#define WRITE(img,ptr,v) ((*(ptr)) = (v))
+
+static force_inline uint32_t
+fbOver (uint32_t src, uint32_t dest)
+{
+ // dest = (dest * (255 - alpha)) / 255 + src
+ uint32_t a = ~src >> 24; // 255 - alpha == 255 + (~alpha + 1) == ~alpha
+ FbByteMulAdd(dest, a, src);
+
+ return dest;
+}
+
+static uint32_t
+fbOver24 (uint32_t x, uint32_t y)
+{
+ uint16_t a = ~x >> 24;
+ uint16_t t;
+ uint32_t m,n,o;
+
+ m = FbOverU(x,y,0,a,t);
+ n = FbOverU(x,y,8,a,t);
+ o = FbOverU(x,y,16,a,t);
+ return m|n|o;
+}
+
+static uint32_t
+fbIn (uint32_t x, uint8_t y)
+{
+ uint16_t a = y;
+ uint16_t t;
+ uint32_t m,n,o,p;
+
+ m = FbInU(x,0,a,t);
+ n = FbInU(x,8,a,t);
+ o = FbInU(x,16,a,t);
+ p = FbInU(x,24,a,t);
+ return m|n|o|p;
+}
+
+/*
+ * Naming convention:
+ *
+ * opSRCxMASKxDST
+ */
+
+static void
+fbCompositeOver_x888x8x8888 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *src, *srcLine;
+ uint32_t *dst, *dstLine;
+ uint8_t *mask, *maskLine;
+ int srcStride, maskStride, dstStride;
+ uint8_t m;
+ uint32_t s, d;
+ uint16_t w;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+
+ while (height--)
+ {
+ src = srcLine;
+ srcLine += srcStride;
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+
+ w = width;
+ while (w--)
+ {
+ m = READ(pMask, mask++);
+ if (m)
+ {
+ s = READ(pSrc, src) | 0xff000000;
+
+ if (m == 0xff)
+ WRITE(pDst, dst, s);
+ else
+ {
+ d = fbIn (s, m);
+ WRITE(pDst, dst, fbOver (d, READ(pDst, dst)));
+ }
+ }
+ src++;
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSolidMaskIn_nx8x8 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *iSrc,
+ pixman_image_t *iMask,
+ pixman_image_t *iDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint8_t *dstLine, *dst, dstMask;
+ uint8_t *maskLine, *mask, m;
+ int dstStride, maskStride;
+ uint16_t w;
+ uint16_t t;
+
+ fbComposeGetSolid(iSrc, src, iDst->bits.format);
+
+ dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (iDst->bits.format));
+ srca = src >> 24;
+
+ fbComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
+ fbComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+
+ if (srca == 0xff) {
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w--)
+ {
+ m = *mask++;
+ if (m == 0)
+ {
+ *dst = 0;
+ }
+ else if (m != 0xff)
+ {
+ *dst = FbIntMult(m, *dst, t);
+ }
+ dst++;
+ }
+ }
+ }
+ else
+ {
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w--)
+ {
+ m = *mask++;
+ m = FbIntMult(m, srca, t);
+ if (m == 0)
+ {
+ *dst = 0;
+ }
+ else if (m != 0xff)
+ {
+ *dst = FbIntMult(m, *dst, t);
+ }
+ dst++;
+ }
+ }
+ }
+}
+
+
+static void
+fbCompositeSrcIn_8x8 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *iSrc,
+ pixman_image_t *iMask,
+ pixman_image_t *iDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint8_t *dstLine, *dst;
+ uint8_t *srcLine, *src;
+ int dstStride, srcStride;
+ uint16_t w;
+ uint8_t s;
+ uint16_t t;
+
+ fbComposeGetStart (iSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
+ fbComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w--)
+ {
+ s = *src++;
+ if (s == 0)
+ {
+ *dst = 0;
+ }
+ else if (s != 0xff)
+ {
+ *dst = FbIntMult(s, *dst, t);
+ }
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSolidMask_nx8x8888 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint32_t *dstLine, *dst, d, dstMask;
+ uint8_t *maskLine, *mask, m;
+ int dstStride, maskStride;
+ uint16_t w;
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
+ srca = src >> 24;
+ if (src == 0)
+ return;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w--)
+ {
+ m = READ(pMask, mask++);
+ if (m == 0xff)
+ {
+ if (srca == 0xff)
+ WRITE(pDst, dst, src & dstMask);
+ else
+ WRITE(pDst, dst, fbOver (src, READ(pDst, dst)) & dstMask);
+ }
+ else if (m)
+ {
+ d = fbIn (src, m);
+ WRITE(pDst, dst, fbOver (d, READ(pDst, dst)) & dstMask);
+ }
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSolidMask_nx8888x8888C (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint32_t *dstLine, *dst, d, dstMask;
+ uint32_t *maskLine, *mask, ma;
+ int dstStride, maskStride;
+ uint16_t w;
+ uint32_t m, n, o, p;
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
+ srca = src >> 24;
+ if (src == 0)
+ return;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w--)
+ {
+ ma = READ(pMask, mask++);
+ if (ma == 0xffffffff)
+ {
+ if (srca == 0xff)
+ WRITE(pDst, dst, src & dstMask);
+ else
+ WRITE(pDst, dst, fbOver (src, READ(pDst, dst)) & dstMask);
+ }
+ else if (ma)
+ {
+ d = READ(pDst, dst);
+#define FbInOverC(src,srca,msk,dst,i,result) { \
+ uint16_t __a = FbGet8(msk,i); \
+ uint32_t __t, __ta; \
+ uint32_t __i; \
+ __t = FbIntMult (FbGet8(src,i), __a,__i); \
+ __ta = (uint8_t) ~FbIntMult (srca, __a,__i); \
+ __t = __t + FbIntMult(FbGet8(dst,i),__ta,__i); \
+ __t = (uint32_t) (uint8_t) (__t | (-(__t >> 8))); \
+ result = __t << (i); \
+}
+ FbInOverC (src, srca, ma, d, 0, m);
+ FbInOverC (src, srca, ma, d, 8, n);
+ FbInOverC (src, srca, ma, d, 16, o);
+ FbInOverC (src, srca, ma, d, 24, p);
+ WRITE(pDst, dst, m|n|o|p);
+ }
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSolidMask_nx8x0888 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint8_t *dstLine, *dst;
+ uint32_t d;
+ uint8_t *maskLine, *mask, m;
+ int dstStride, maskStride;
+ uint16_t w;
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ srca = src >> 24;
+ if (src == 0)
+ return;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w--)
+ {
+ m = READ(pMask, mask++);
+ if (m == 0xff)
+ {
+ if (srca == 0xff)
+ d = src;
+ else
+ {
+ d = Fetch24(pDst, dst);
+ d = fbOver24 (src, d);
+ }
+ Store24(pDst, dst,d);
+ }
+ else if (m)
+ {
+ d = fbOver24 (fbIn(src,m), Fetch24(pDst, dst));
+ Store24(pDst, dst, d);
+ }
+ dst += 3;
+ }
+ }
+}
+
+static void
+fbCompositeSolidMask_nx8x0565 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint16_t *dstLine, *dst;
+ uint32_t d;
+ uint8_t *maskLine, *mask, m;
+ int dstStride, maskStride;
+ uint16_t w;
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ srca = src >> 24;
+ if (src == 0)
+ return;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w--)
+ {
+ m = READ(pMask, mask++);
+ if (m == 0xff)
+ {
+ if (srca == 0xff)
+ d = src;
+ else
+ {
+ d = READ(pDst, dst);
+ d = fbOver24 (src, cvt0565to0888(d));
+ }
+ WRITE(pDst, dst, cvt8888to0565(d));
+ }
+ else if (m)
+ {
+ d = READ(pDst, dst);
+ d = fbOver24 (fbIn(src,m), cvt0565to0888(d));
+ WRITE(pDst, dst, cvt8888to0565(d));
+ }
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSolidMask_nx8888x0565C (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src, srca;
+ uint16_t src16;
+ uint16_t *dstLine, *dst;
+ uint32_t d;
+ uint32_t *maskLine, *mask, ma;
+ int dstStride, maskStride;
+ uint16_t w;
+ uint32_t m, n, o;
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ srca = src >> 24;
+ if (src == 0)
+ return;
+
+ src16 = cvt8888to0565(src);
+
+ fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w--)
+ {
+ ma = READ(pMask, mask++);
+ if (ma == 0xffffffff)
+ {
+ if (srca == 0xff)
+ {
+ WRITE(pDst, dst, src16);
+ }
+ else
+ {
+ d = READ(pDst, dst);
+ d = fbOver24 (src, cvt0565to0888(d));
+ WRITE(pDst, dst, cvt8888to0565(d));
+ }
+ }
+ else if (ma)
+ {
+ d = READ(pDst, dst);
+ d = cvt0565to0888(d);
+ FbInOverC (src, srca, ma, d, 0, m);
+ FbInOverC (src, srca, ma, d, 8, n);
+ FbInOverC (src, srca, ma, d, 16, o);
+ d = m|n|o;
+ WRITE(pDst, dst, cvt8888to0565(d));
+ }
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSrc_8888x8888 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *dstLine, *dst, dstMask;
+ uint32_t *srcLine, *src, s;
+ int dstStride, srcStride;
+ uint8_t a;
+ uint16_t w;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+
+ dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w--)
+ {
+ s = READ(pSrc, src++);
+ a = s >> 24;
+ if (a == 0xff)
+ WRITE(pDst, dst, s & dstMask);
+ else if (s)
+ WRITE(pDst, dst, fbOver (s, READ(pDst, dst)) & dstMask);
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSrc_8888x0888 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint8_t *dstLine, *dst;
+ uint32_t d;
+ uint32_t *srcLine, *src, s;
+ uint8_t a;
+ int dstStride, srcStride;
+ uint16_t w;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w--)
+ {
+ s = READ(pSrc, src++);
+ a = s >> 24;
+ if (a)
+ {
+ if (a == 0xff)
+ d = s;
+ else
+ d = fbOver24 (s, Fetch24(pDst, dst));
+ Store24(pDst, dst, d);
+ }
+ dst += 3;
+ }
+ }
+}
+
+static void
+fbCompositeSrc_8888x0565 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint16_t *dstLine, *dst;
+ uint32_t d;
+ uint32_t *srcLine, *src, s;
+ uint8_t a;
+ int dstStride, srcStride;
+ uint16_t w;
+
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+ fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w--)
+ {
+ s = READ(pSrc, src++);
+ a = s >> 24;
+ if (s)
+ {
+ if (a == 0xff)
+ d = s;
+ else
+ {
+ d = READ(pDst, dst);
+ d = fbOver24 (s, cvt0565to0888(d));
+ }
+ WRITE(pDst, dst, cvt8888to0565(d));
+ }
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSrc_x888x0565 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint16_t *dstLine, *dst;
+ uint32_t *srcLine, *src, s;
+ int dstStride, srcStride;
+ uint16_t w;
+
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+ fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w--)
+ {
+ s = READ(pSrc, src++);
+ WRITE(pDst, dst, cvt8888to0565(s));
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSrcAdd_8000x8000 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint8_t *dstLine, *dst;
+ uint8_t *srcLine, *src;
+ int dstStride, srcStride;
+ uint16_t w;
+ uint8_t s, d;
+ uint16_t t;
+
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
+ fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w--)
+ {
+ s = READ(pSrc, src++);
+ if (s)
+ {
+ if (s != 0xff)
+ {
+ d = READ(pDst, dst);
+ t = d + s;
+ s = t | (0 - (t >> 8));
+ }
+ WRITE(pDst, dst, s);
+ }
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSrcAdd_8888x8888 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *dstLine, *dst;
+ uint32_t *srcLine, *src;
+ int dstStride, srcStride;
+ uint16_t w;
+ uint32_t s, d;
+ uint16_t t;
+ uint32_t m,n,o,p;
+
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ src = srcLine;
+ srcLine += srcStride;
+ w = width;
+
+ while (w--)
+ {
+ s = READ(pSrc, src++);
+ if (s)
+ {
+ if (s != 0xffffffff)
+ {
+ d = READ(pDst, dst);
+ if (d)
+ {
+ m = FbAdd(s,d,0,t);
+ n = FbAdd(s,d,8,t);
+ o = FbAdd(s,d,16,t);
+ p = FbAdd(s,d,24,t);
+ s = m|n|o|p;
+ }
+ }
+ WRITE(pDst, dst, s);
+ }
+ dst++;
+ }
+ }
+}
+
+static void
+fbCompositeSrcAdd_8888x8x8 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint8_t *dstLine, *dst;
+ uint8_t *maskLine, *mask;
+ int dstStride, maskStride;
+ uint16_t w;
+ uint32_t src;
+ uint8_t sa;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
+ fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
+ fbComposeGetSolid (pSrc, src, pDst->bits.format);
+ sa = (src >> 24);
+
+ while (height--)
+ {
+ dst = dstLine;
+ dstLine += dstStride;
+ mask = maskLine;
+ maskLine += maskStride;
+ w = width;
+
+ while (w--)
+ {
+ uint16_t tmp;
+ uint16_t a;
+ uint32_t m, d;
+ uint32_t r;
+
+ a = READ(pMask, mask++);
+ d = READ(pDst, dst);
+
+ m = FbInU (sa, 0, a, tmp);
+ r = FbAdd (m, d, 0, tmp);
+
+ WRITE(pDst, dst++, r);
+ }
+ }
+}
+
+/*
+ * Simple bitblt
+ */
+
+static void
+fbCompositeSolidFill (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t src;
+
+ fbComposeGetSolid(pSrc, src, pDst->bits.format);
+
+ if (pDst->bits.format == PIXMAN_a8)
+ src = src >> 24;
+ else if (pDst->bits.format == PIXMAN_r5g6b5 ||
+ pDst->bits.format == PIXMAN_b5g6r5)
+ src = cvt8888to0565 (src);
+
+ pixman_fill (pDst->bits.bits, pDst->bits.rowstride,
+ PIXMAN_FORMAT_BPP (pDst->bits.format),
+ xDst, yDst,
+ width, height,
+ src);
+}
+
+static void
+fbCompositeSrc_8888xx888 (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *dst;
+ uint32_t *src;
+ int dstStride, srcStride;
+ uint32_t n_bytes = width * sizeof (uint32_t);
+
+ fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, src, 1);
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dst, 1);
+
+ while (height--)
+ {
+ memcpy (dst, src, n_bytes);
+
+ dst += dstStride;
+ src += srcStride;
+ }
+}
+
+static const FastPathInfo c_fast_paths[] =
+{
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8x0565, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8x0565, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r8g8b8, fbCompositeSolidMask_nx8x0888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b8g8r8, fbCompositeSolidMask_nx8x0888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8888x8888C, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8888x8888C, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8888x0565C, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8888x8888C, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8888x8888C, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8888x0565C, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeOver_x888x8x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeOver_x888x8x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeOver_x888x8x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_8888x0565, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8888, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_8888x0565, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrcAdd_8888x8888, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrcAdd_8888x8888, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcAdd_8000x8000, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSrcAdd_8888x8x8, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSolidFill, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSolidFill, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSolidFill, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSolidFill, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8, fbCompositeSolidFill, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSolidFill, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888xx888, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888xx888, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888xx888, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888xx888, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_x888x0565, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_x888x0565, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_x888x0565, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_x888x0565, 0 },
+ { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcIn_8x8, 0 },
+ { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSolidMaskIn_nx8x8, 0 },
+ { PIXMAN_OP_NONE },
+};
+
+static void
+fbCompositeSrcScaleNearest (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *pSrc,
+ pixman_image_t *pMask,
+ pixman_image_t *pDst,
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
+{
+ uint32_t *dst;
+ uint32_t *src;
+ int dstStride, srcStride;
+ int i, j;
+ pixman_vector_t v;
+
+ fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dst, 1);
+ /* pass in 0 instead of xSrc and ySrc because xSrc and ySrc need to be
+ * transformed from destination space to source space */
+ fbComposeGetStart (pSrc, 0, 0, uint32_t, srcStride, src, 1);
+
+ /* reference point is the center of the pixel */
+ v.vector[0] = pixman_int_to_fixed(xSrc) + pixman_fixed_1 / 2;
+ v.vector[1] = pixman_int_to_fixed(ySrc) + pixman_fixed_1 / 2;
+ v.vector[2] = pixman_fixed_1;
+
+ if (!pixman_transform_point_3d (pSrc->common.transform, &v))
+ return;
+
+ /* Round down to closest integer, ensuring that 0.5 rounds to 0, not 1 */
+ v.vector[0] -= pixman_fixed_e;
+ v.vector[1] -= pixman_fixed_e;
+
+ for (j = 0; j < height; j++) {
+ pixman_fixed_t vx = v.vector[0];
+ pixman_fixed_t vy = v.vector[1];
+ for (i = 0; i < width; ++i) {
+ pixman_bool_t inside_bounds;
+ uint32_t result;
+ int x, y;
+ x = vx >> 16;
+ y = vy >> 16;
+
+ /* apply the repeat function */
+ switch (pSrc->common.repeat) {
+ case PIXMAN_REPEAT_NORMAL:
+ x = MOD (x, pSrc->bits.width);
+ y = MOD (y, pSrc->bits.height);
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_PAD:
+ x = CLIP (x, 0, pSrc->bits.width-1);
+ y = CLIP (y, 0, pSrc->bits.height-1);
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_REFLECT:
+ x = MOD (x, pSrc->bits.width * 2);
+ if (x >= pSrc->bits.width)
+ x = pSrc->bits.width * 2 - x - 1;
+ y = MOD (y, pSrc->bits.height * 2);
+ if (y >= pSrc->bits.height)
+ y = pSrc->bits.height * 2 - y - 1;
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_NONE:
+ default:
+ inside_bounds = (x >= 0 && x < pSrc->bits.width && y >= 0 && y < pSrc->bits.height);
+ break;
+ }
+
+ if (inside_bounds) {
+ //XXX: we should move this multiplication out of the loop
+ result = READ(pSrc, src + y * srcStride + x);
+ } else {
+ result = 0;
+ }
+ WRITE(pDst, dst + i, result);
+
+ /* adjust the x location by a unit vector in the x direction:
+ * this is equivalent to transforming x+1 of the destination point to source space */
+ vx += pSrc->common.transform->matrix[0][0];
+ }
+ /* adjust the y location by a unit vector in the y direction
+ * this is equivalent to transforming y+1 of the destination point to source space */
+ v.vector[1] += pSrc->common.transform->matrix[1][1];
+ dst += dstStride;
+ }
+}
+
+static void
+fast_path_composite (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_image_t *dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ if (src->type == BITS
+ && src->common.transform
+ && !mask
+ && op == PIXMAN_OP_SRC
+ && !src->common.alpha_map && !dest->common.alpha_map
+ && (src->common.filter == PIXMAN_FILTER_NEAREST)
+ && PIXMAN_FORMAT_BPP(dest->bits.format) == 32
+ && src->bits.format == dest->bits.format
+ && src->common.src_clip == &(src->common.full_region)
+ && !src->common.read_func && !src->common.write_func
+ && !dest->common.read_func && !dest->common.write_func)
+ {
+ /* ensure that the transform matrix only has a scale */
+ if (src->common.transform->matrix[0][1] == 0 &&
+ src->common.transform->matrix[1][0] == 0 &&
+ src->common.transform->matrix[2][0] == 0 &&
+ src->common.transform->matrix[2][1] == 0 &&
+ src->common.transform->matrix[2][2] == pixman_fixed_1)
+ {
+ _pixman_walk_composite_region (imp, op,
+ src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height,
+ FALSE, FALSE,
+ fbCompositeSrcScaleNearest);
+ return;
+ }
+ }
+
+ if (_pixman_run_fast_path (c_fast_paths, imp,
+ op, src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height))
+ {
+ return;
+ }
+
+ _pixman_implementation_composite (imp->delegate, op,
+ src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height);
+}
+
+static void
+pixman_fill8 (uint32_t *bits,
+ int stride,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ int byte_stride = stride * (int) sizeof (uint32_t);
+ uint8_t *dst = (uint8_t *) bits;
+ uint8_t v = xor & 0xff;
+ int i;
+
+ dst = dst + y * byte_stride + x;
+
+ while (height--)
+ {
+ for (i = 0; i < width; ++i)
+ dst[i] = v;
+
+ dst += byte_stride;
+ }
+}
+
+static void
+pixman_fill16 (uint32_t *bits,
+ int stride,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ int short_stride = (stride * (int) sizeof (uint32_t)) / (int) sizeof (uint16_t);
+ uint16_t *dst = (uint16_t *)bits;
+ uint16_t v = xor & 0xffff;
+ int i;
+
+ dst = dst + y * short_stride + x;
+
+ while (height--)
+ {
+ for (i = 0; i < width; ++i)
+ dst[i] = v;
+
+ dst += short_stride;
+ }
+}
+
+static void
+pixman_fill32 (uint32_t *bits,
+ int stride,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ int i;
+
+ bits = bits + y * stride + x;
+
+ while (height--)
+ {
+ for (i = 0; i < width; ++i)
+ bits[i] = xor;
+
+ bits += stride;
+ }
+}
+
+static pixman_bool_t
+fast_path_fill (pixman_implementation_t *imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ switch (bpp)
+ {
+ case 8:
+ pixman_fill8 (bits, stride, x, y, width, height, xor);
+ break;
+
+ case 16:
+ pixman_fill16 (bits, stride, x, y, width, height, xor);
+ break;
+
+ case 32:
+ pixman_fill32 (bits, stride, x, y, width, height, xor);
+ break;
+
+ default:
+ return _pixman_implementation_fill (
+ imp->delegate, bits, stride, bpp, x, y, width, height, xor);
+ break;
+ }
+
+ return TRUE;
+}
+
+pixman_implementation_t *
+_pixman_implementation_create_fast_path (pixman_implementation_t *toplevel)
+{
+ pixman_implementation_t *general = _pixman_implementation_create_general (NULL);
+ pixman_implementation_t *imp = _pixman_implementation_create (toplevel, general);
+
+ imp->composite = fast_path_composite;
+ imp->fill = fast_path_fill;
+
+ return imp;
+}
diff --git a/lib/pixman/pixman/pixman-general.c b/lib/pixman/pixman/pixman-general.c
new file mode 100644
index 000000000..ed858fed5
--- /dev/null
+++ b/lib/pixman/pixman/pixman-general.c
@@ -0,0 +1,359 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ * Copyright © 2000 SuSE, Inc.
+ * Copyright © 2007 Red Hat, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * 2005 Lars Knoll & Zack Rusin, Trolltech
+ * 2008 Aaron Plattner, NVIDIA Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Red Hat not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. Red Hat makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+#include <config.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <assert.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "pixman-private.h"
+#include "pixman-combine32.h"
+#include "pixman-private.h"
+
+#define SCANLINE_BUFFER_LENGTH 8192
+
+static void
+general_composite_rect (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_image_t *dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ return_if_fail (src != NULL);
+ return_if_fail (dest != NULL);
+
+ uint8_t stack_scanline_buffer[SCANLINE_BUFFER_LENGTH * 3];
+ const pixman_format_code_t srcFormat = src->type == BITS ? src->bits.format : 0;
+ const pixman_format_code_t maskFormat = mask && mask->type == BITS ? mask->bits.format : 0;
+ const pixman_format_code_t destFormat = dest->type == BITS ? dest->bits.format : 0;
+ const int srcWide = PIXMAN_FORMAT_16BPC(srcFormat);
+ const int maskWide = mask && PIXMAN_FORMAT_16BPC(maskFormat);
+ const int destWide = PIXMAN_FORMAT_16BPC(destFormat);
+ const int wide = srcWide || maskWide || destWide;
+ const int Bpp = wide ? 8 : 4;
+ uint8_t *scanline_buffer = stack_scanline_buffer;
+ uint8_t *src_buffer, *mask_buffer, *dest_buffer;
+ scanFetchProc fetchSrc = NULL, fetchMask = NULL, fetchDest = NULL;
+ pixman_combine_32_func_t compose;
+ scanStoreProc store;
+ source_pict_class_t srcClass, maskClass;
+ pixman_bool_t component_alpha;
+ uint32_t *bits;
+ int32_t stride;
+ int i;
+
+ if (width * Bpp > SCANLINE_BUFFER_LENGTH)
+ {
+ scanline_buffer = pixman_malloc_abc (width, 3, Bpp);
+
+ if (!scanline_buffer)
+ return;
+ }
+
+ src_buffer = scanline_buffer;
+ mask_buffer = src_buffer + width * Bpp;
+ dest_buffer = mask_buffer + width * Bpp;
+
+ srcClass = _pixman_image_classify (src,
+ src_x, src_y,
+ width, height);
+
+ maskClass = SOURCE_IMAGE_CLASS_UNKNOWN;
+ if (mask)
+ {
+ maskClass = _pixman_image_classify (mask,
+ src_x, src_y,
+ width, height);
+ }
+
+ if (op == PIXMAN_OP_CLEAR)
+ fetchSrc = NULL;
+ else if (wide)
+ fetchSrc = _pixman_image_get_scanline_64;
+ else
+ fetchSrc = _pixman_image_get_scanline_32;
+
+ if (!mask || op == PIXMAN_OP_CLEAR)
+ fetchMask = NULL;
+ else if (wide)
+ fetchMask = _pixman_image_get_scanline_64;
+ else
+ fetchMask = _pixman_image_get_scanline_32;
+
+ if (op == PIXMAN_OP_CLEAR || op == PIXMAN_OP_SRC)
+ fetchDest = NULL;
+ else if (wide)
+ fetchDest = _pixman_image_get_scanline_64;
+ else
+ fetchDest = _pixman_image_get_scanline_32;
+
+ if (wide)
+ store = _pixman_image_store_scanline_64;
+ else
+ store = _pixman_image_store_scanline_32;
+
+ /* Skip the store step and composite directly into the
+ * destination if the output format of the compose func matches
+ * the destination format.
+ */
+ if (!wide &&
+ !dest->common.alpha_map &&
+ !dest->common.write_func &&
+ (op == PIXMAN_OP_ADD || op == PIXMAN_OP_OVER) &&
+ (dest->bits.format == PIXMAN_a8r8g8b8 ||
+ dest->bits.format == PIXMAN_x8r8g8b8))
+ {
+ store = NULL;
+ }
+
+ if (!store)
+ {
+ bits = dest->bits.bits;
+ stride = dest->bits.rowstride;
+ }
+ else
+ {
+ bits = NULL;
+ stride = 0;
+ }
+
+ component_alpha =
+ fetchSrc &&
+ fetchMask &&
+ mask &&
+ mask->common.type == BITS &&
+ mask->common.component_alpha &&
+ PIXMAN_FORMAT_RGB (mask->bits.format);
+
+ if (wide)
+ {
+ if (component_alpha)
+ compose = (pixman_combine_32_func_t)_pixman_implementation_combine_64_ca;
+ else
+ compose = (pixman_combine_32_func_t)_pixman_implementation_combine_64;
+ }
+ else
+ {
+ if (component_alpha)
+ compose = _pixman_implementation_combine_32_ca;
+ else
+ compose = _pixman_implementation_combine_32;
+ }
+
+ if (!compose)
+ return;
+
+ if (!fetchMask)
+ mask_buffer = NULL;
+
+ for (i = 0; i < height; ++i)
+ {
+ /* fill first half of scanline with source */
+ if (fetchSrc)
+ {
+ if (fetchMask)
+ {
+ /* fetch mask before source so that fetching of
+ source can be optimized */
+ fetchMask (mask, mask_x, mask_y + i,
+ width, (void *)mask_buffer, 0, 0);
+
+ if (maskClass == SOURCE_IMAGE_CLASS_HORIZONTAL)
+ fetchMask = NULL;
+ }
+
+ if (srcClass == SOURCE_IMAGE_CLASS_HORIZONTAL)
+ {
+ fetchSrc (src, src_x, src_y + i,
+ width, (void *)src_buffer, 0, 0);
+ fetchSrc = NULL;
+ }
+ else
+ {
+ fetchSrc (src, src_x, src_y + i,
+ width, (void *)src_buffer, (void *)mask_buffer,
+ 0xffffffff);
+ }
+ }
+ else if (fetchMask)
+ {
+ fetchMask (mask, mask_x, mask_y + i,
+ width, (void *)mask_buffer, 0, 0);
+ }
+
+ if (store)
+ {
+ /* fill dest into second half of scanline */
+ if (fetchDest)
+ fetchDest (dest, dest_x, dest_y + i,
+ width, (void *)dest_buffer, 0, 0);
+
+ /* blend */
+ compose (imp->toplevel, op, (void *)dest_buffer, (void *)src_buffer, (void *)mask_buffer, width);
+
+ /* write back */
+ store (&(dest->bits), dest_x, dest_y + i, width,
+ (void *)dest_buffer);
+ }
+ else
+ {
+ /* blend */
+ compose (imp->toplevel, op, bits + (dest_y + i) * stride +
+ dest_x,
+ (void *)src_buffer, (void *)mask_buffer, width);
+ }
+ }
+
+ if (scanline_buffer != stack_scanline_buffer)
+ free (scanline_buffer);
+}
+
+static void
+general_composite (pixman_implementation_t * imp,
+ pixman_op_t op,
+ pixman_image_t * src,
+ pixman_image_t * mask,
+ pixman_image_t * dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ pixman_bool_t srcRepeat = src->type == BITS && src->common.repeat == PIXMAN_REPEAT_NORMAL;
+ pixman_bool_t maskRepeat = FALSE;
+ pixman_bool_t srcTransform = src->common.transform != NULL;
+ pixman_bool_t maskTransform = FALSE;
+
+ if (srcRepeat && srcTransform &&
+ src->bits.width == 1 &&
+ src->bits.height == 1)
+ {
+ srcTransform = FALSE;
+ }
+
+ if (mask && mask->type == BITS)
+ {
+ maskRepeat = mask->common.repeat == PIXMAN_REPEAT_NORMAL;
+
+ maskTransform = mask->common.transform != 0;
+ if (mask->common.filter == PIXMAN_FILTER_CONVOLUTION)
+ maskTransform = TRUE;
+
+ if (maskRepeat && maskTransform &&
+ mask->bits.width == 1 &&
+ mask->bits.height == 1)
+ {
+ maskTransform = FALSE;
+ }
+ }
+
+ /* CompositeGeneral optimizes 1x1 repeating images itself */
+ if (src->type == BITS &&
+ src->bits.width == 1 && src->bits.height == 1)
+ {
+ srcRepeat = FALSE;
+ }
+
+ if (mask && mask->type == BITS &&
+ mask->bits.width == 1 && mask->bits.height == 1)
+ {
+ maskRepeat = FALSE;
+ }
+
+ /* if we are transforming, repeats are handled in fbFetchTransformed */
+ if (srcTransform)
+ srcRepeat = FALSE;
+
+ if (maskTransform)
+ maskRepeat = FALSE;
+
+ _pixman_walk_composite_region (imp, op, src, mask, dest, src_x, src_y,
+ mask_x, mask_y, dest_x, dest_y, width, height,
+ srcRepeat, maskRepeat, general_composite_rect);
+}
+
+static pixman_bool_t
+general_blt (pixman_implementation_t *imp,
+ uint32_t *src_bits,
+ uint32_t *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
+{
+ /* We can't blit unless we have sse2 or mmx */
+
+ return FALSE;
+}
+
+static pixman_bool_t
+general_fill (pixman_implementation_t *imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ return FALSE;
+}
+
+pixman_implementation_t *
+_pixman_implementation_create_general (pixman_implementation_t *toplevel)
+{
+ pixman_implementation_t *imp = _pixman_implementation_create (toplevel, NULL);
+
+ _pixman_setup_combiner_functions_32 (imp);
+ _pixman_setup_combiner_functions_64 (imp);
+
+ imp->composite = general_composite;
+ imp->blt = general_blt;
+ imp->fill = general_fill;
+
+ return imp;
+}
diff --git a/lib/pixman/pixman/pixman-gradient-walker.c b/lib/pixman/pixman/pixman-gradient-walker.c
new file mode 100644
index 000000000..6a47a8ea3
--- /dev/null
+++ b/lib/pixman/pixman/pixman-gradient-walker.c
@@ -0,0 +1,232 @@
+/*
+ *
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * 2005 Lars Knoll & Zack Rusin, Trolltech
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#include <config.h>
+#include "pixman-private.h"
+
+void
+_pixman_gradient_walker_init (GradientWalker *walker,
+ gradient_t *gradient,
+ unsigned int spread)
+{
+ walker->num_stops = gradient->n_stops;
+ walker->stops = gradient->stops;
+ walker->left_x = 0;
+ walker->right_x = 0x10000;
+ walker->stepper = 0;
+ walker->left_ag = 0;
+ walker->left_rb = 0;
+ walker->right_ag = 0;
+ walker->right_rb = 0;
+ walker->spread = spread;
+
+ walker->need_reset = TRUE;
+}
+
+void
+_pixman_gradient_walker_reset (GradientWalker *walker,
+ pixman_fixed_32_32_t pos)
+{
+ int32_t x, left_x, right_x;
+ pixman_color_t *left_c, *right_c;
+ int n, count = walker->num_stops;
+ pixman_gradient_stop_t * stops = walker->stops;
+
+ static const pixman_color_t transparent_black = { 0, 0, 0, 0 };
+
+ switch (walker->spread)
+ {
+ case PIXMAN_REPEAT_NORMAL:
+ x = (int32_t)pos & 0xFFFF;
+ for (n = 0; n < count; n++)
+ if (x < stops[n].x)
+ break;
+ if (n == 0) {
+ left_x = stops[count-1].x - 0x10000;
+ left_c = &stops[count-1].color;
+ } else {
+ left_x = stops[n-1].x;
+ left_c = &stops[n-1].color;
+ }
+
+ if (n == count) {
+ right_x = stops[0].x + 0x10000;
+ right_c = &stops[0].color;
+ } else {
+ right_x = stops[n].x;
+ right_c = &stops[n].color;
+ }
+ left_x += (pos - x);
+ right_x += (pos - x);
+ break;
+
+ case PIXMAN_REPEAT_PAD:
+ for (n = 0; n < count; n++)
+ if (pos < stops[n].x)
+ break;
+
+ if (n == 0) {
+ left_x = INT32_MIN;
+ left_c = &stops[0].color;
+ } else {
+ left_x = stops[n-1].x;
+ left_c = &stops[n-1].color;
+ }
+
+ if (n == count) {
+ right_x = INT32_MAX;
+ right_c = &stops[n-1].color;
+ } else {
+ right_x = stops[n].x;
+ right_c = &stops[n].color;
+ }
+ break;
+
+ case PIXMAN_REPEAT_REFLECT:
+ x = (int32_t)pos & 0xFFFF;
+ if ((int32_t)pos & 0x10000)
+ x = 0x10000 - x;
+ for (n = 0; n < count; n++)
+ if (x < stops[n].x)
+ break;
+
+ if (n == 0) {
+ left_x = -stops[0].x;
+ left_c = &stops[0].color;
+ } else {
+ left_x = stops[n-1].x;
+ left_c = &stops[n-1].color;
+ }
+
+ if (n == count) {
+ right_x = 0x20000 - stops[n-1].x;
+ right_c = &stops[n-1].color;
+ } else {
+ right_x = stops[n].x;
+ right_c = &stops[n].color;
+ }
+
+ if ((int32_t)pos & 0x10000) {
+ pixman_color_t *tmp_c;
+ int32_t tmp_x;
+
+ tmp_x = 0x10000 - right_x;
+ right_x = 0x10000 - left_x;
+ left_x = tmp_x;
+
+ tmp_c = right_c;
+ right_c = left_c;
+ left_c = tmp_c;
+
+ x = 0x10000 - x;
+ }
+ left_x += (pos - x);
+ right_x += (pos - x);
+ break;
+
+ default: /* RepeatNone */
+ for (n = 0; n < count; n++)
+ if (pos < stops[n].x)
+ break;
+
+ if (n == 0)
+ {
+ left_x = INT32_MIN;
+ right_x = stops[0].x;
+ left_c = right_c = (pixman_color_t*) &transparent_black;
+ }
+ else if (n == count)
+ {
+ left_x = stops[n-1].x;
+ right_x = INT32_MAX;
+ left_c = right_c = (pixman_color_t*) &transparent_black;
+ }
+ else
+ {
+ left_x = stops[n-1].x;
+ right_x = stops[n].x;
+ left_c = &stops[n-1].color;
+ right_c = &stops[n].color;
+ }
+ }
+
+ walker->left_x = left_x;
+ walker->right_x = right_x;
+ walker->left_ag = ((left_c->alpha >> 8) << 16) | (left_c->green >> 8);
+ walker->left_rb = ((left_c->red & 0xff00) << 8) | (left_c->blue >> 8);
+ walker->right_ag = ((right_c->alpha >> 8) << 16) | (right_c->green >> 8);
+ walker->right_rb = ((right_c->red & 0xff00) << 8) | (right_c->blue >> 8);
+
+ if ( walker->left_x == walker->right_x ||
+ ( walker->left_ag == walker->right_ag &&
+ walker->left_rb == walker->right_rb ) )
+ {
+ walker->stepper = 0;
+ }
+ else
+ {
+ int32_t width = right_x - left_x;
+ walker->stepper = ((1 << 24) + width/2)/width;
+ }
+
+ walker->need_reset = FALSE;
+}
+
+#define PIXMAN_GRADIENT_WALKER_NEED_RESET(w,x) \
+ ( (w)->need_reset || (x) < (w)->left_x || (x) >= (w)->right_x)
+
+
+/* the following assumes that PIXMAN_GRADIENT_WALKER_NEED_RESET(w,x) is FALSE */
+uint32_t
+_pixman_gradient_walker_pixel (GradientWalker *walker,
+ pixman_fixed_32_32_t x)
+{
+ int dist, idist;
+ uint32_t t1, t2, a, color;
+
+ if (PIXMAN_GRADIENT_WALKER_NEED_RESET (walker, x))
+ _pixman_gradient_walker_reset (walker, x);
+
+ dist = ((int)(x - walker->left_x)*walker->stepper) >> 16;
+ idist = 256 - dist;
+
+ /* combined INTERPOLATE and premultiply */
+ t1 = walker->left_rb*idist + walker->right_rb*dist;
+ t1 = (t1 >> 8) & 0xff00ff;
+
+ t2 = walker->left_ag*idist + walker->right_ag*dist;
+ t2 &= 0xff00ff00;
+
+ color = t2 & 0xff000000;
+ a = t2 >> 24;
+
+ t1 = t1*a + 0x800080;
+ t1 = (t1 + ((t1 >> 8) & 0xff00ff)) >> 8;
+
+ t2 = (t2 >> 8)*a + 0x800080;
+ t2 = (t2 + ((t2 >> 8) & 0xff00ff));
+
+ return (color | (t1 & 0xff00ff) | (t2 & 0xff00));
+}
diff --git a/lib/pixman/pixman/pixman-image.c b/lib/pixman/pixman/pixman-image.c
index e80c47935..c8295f882 100644
--- a/lib/pixman/pixman/pixman-image.c
+++ b/lib/pixman/pixman/pixman-image.c
@@ -27,26 +27,19 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <assert.h>
#include "pixman-private.h"
#define Alpha(x) ((x) >> 24)
-static void
-init_source_image (source_image_t *image)
-{
- image->class = SOURCE_IMAGE_CLASS_UNKNOWN;
-}
-
-static pixman_bool_t
-init_gradient (gradient_t *gradient,
- const pixman_gradient_stop_t *stops,
- int n_stops)
+pixman_bool_t
+_pixman_init_gradient (gradient_t *gradient,
+ const pixman_gradient_stop_t *stops,
+ int n_stops)
{
return_val_if_fail (n_stops > 0, FALSE);
- init_source_image (&gradient->common);
-
gradient->stops = pixman_malloc_ab (n_stops, sizeof (pixman_gradient_stop_t));
if (!gradient->stops)
return FALSE;
@@ -58,22 +51,45 @@ init_gradient (gradient_t *gradient,
gradient->stop_range = 0xffff;
gradient->color_table = NULL;
gradient->color_table_size = 0;
+ gradient->common.class = SOURCE_IMAGE_CLASS_UNKNOWN;
return TRUE;
}
-static uint32_t
-color_to_uint32 (const pixman_color_t *color)
-{
- return
- (color->alpha >> 8 << 24) |
- (color->red >> 8 << 16) |
- (color->green & 0xff00) |
- (color->blue >> 8);
+/*
+ * By default, just evaluate the image at 32bpp and expand. Individual image
+ * types can plug in a better scanline getter if they want to. For example
+ * we could produce smoother gradients by evaluating them at higher color depth, but
+ * that's a project for the future.
+ */
+void
+_pixman_image_get_scanline_64_generic (pixman_image_t * pict, int x, int y, int width,
+ uint64_t *buffer, uint64_t *mask, uint32_t maskBits)
+{
+ uint32_t *mask8 = NULL;
+
+ // Contract the mask image, if one exists, so that the 32-bit fetch function
+ // can use it.
+ if (mask) {
+ mask8 = pixman_malloc_ab(width, sizeof(uint32_t));
+ if (!mask8)
+ return;
+
+ pixman_contract(mask8, mask, width);
+ }
+
+ // Fetch the source image into the first half of buffer.
+ _pixman_image_get_scanline_32 (pict, x, y, width, (uint32_t*)buffer, mask8,
+ maskBits);
+
+ // Expand from 32bpp to 64bpp in place.
+ pixman_expand(buffer, (uint32_t*)buffer, PIXMAN_a8r8g8b8, width);
+
+ free(mask8);
}
-static pixman_image_t *
-allocate_image (void)
+pixman_image_t *
+_pixman_image_allocate (void)
{
pixman_image_t *image = malloc (sizeof (pixman_image_t));
@@ -95,11 +111,66 @@ allocate_image (void)
common->ref_count = 1;
common->read_func = NULL;
common->write_func = NULL;
+ common->classify = NULL;
}
return image;
}
+source_pict_class_t
+_pixman_image_classify (pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height)
+{
+ if (image->common.classify)
+ return image->common.classify (image, x, y, width, height);
+ else
+ return SOURCE_IMAGE_CLASS_UNKNOWN;
+}
+
+void
+_pixman_image_get_scanline_32 (pixman_image_t *image, int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask, uint32_t mask_bits)
+{
+ image->common.get_scanline_32 (image, x, y, width, buffer, mask, mask_bits);
+}
+
+void
+_pixman_image_get_scanline_64 (pixman_image_t *image, int x, int y, int width,
+ uint32_t *buffer, uint32_t *unused, uint32_t unused2)
+{
+ image->common.get_scanline_64 (image, x, y, width, buffer, unused, unused2);
+}
+
+/* Even thought the type of buffer is uint32_t *, the function actually expects
+ * a uint64_t *buffer.
+ */
+
+scanFetchProc
+_pixman_image_get_fetcher (pixman_image_t *image,
+ int wide)
+{
+ assert (image->common.get_scanline_64);
+ assert (image->common.get_scanline_32);
+
+ if (wide)
+ return image->common.get_scanline_64;
+ else
+ return image->common.get_scanline_32;
+}
+
+#define WRITE_ACCESS(f) ((image->common.write_func)? f##_accessors : f)
+
+static void
+image_property_changed (pixman_image_t *image)
+{
+
+
+ image->common.property_changed (image);
+}
+
/* Ref Counting */
PIXMAN_EXPORT pixman_image_t *
pixman_image_ref (pixman_image_t *image)
@@ -158,170 +229,9 @@ pixman_image_unref (pixman_image_t *image)
}
/* Constructors */
-PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_solid_fill (pixman_color_t *color)
-{
- pixman_image_t *img = allocate_image();
- if (!img)
- return NULL;
-
- init_source_image (&img->solid.common);
-
- img->type = SOLID;
- img->solid.color = color_to_uint32 (color);
-
- return img;
-}
-
-PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_linear_gradient (pixman_point_fixed_t *p1,
- pixman_point_fixed_t *p2,
- const pixman_gradient_stop_t *stops,
- int n_stops)
-{
- pixman_image_t *image;
- linear_gradient_t *linear;
-
- return_val_if_fail (n_stops >= 2, NULL);
-
- image = allocate_image();
-
- if (!image)
- return NULL;
-
- linear = &image->linear;
-
- if (!init_gradient (&linear->common, stops, n_stops))
- {
- free (image);
- return NULL;
- }
-
- linear->p1 = *p1;
- linear->p2 = *p2;
-
- image->type = LINEAR;
-
- return image;
-}
-
-
-PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_radial_gradient (pixman_point_fixed_t *inner,
- pixman_point_fixed_t *outer,
- pixman_fixed_t inner_radius,
- pixman_fixed_t outer_radius,
- const pixman_gradient_stop_t *stops,
- int n_stops)
-{
- pixman_image_t *image;
- radial_gradient_t *radial;
-
- return_val_if_fail (n_stops >= 2, NULL);
-
- image = allocate_image();
-
- if (!image)
- return NULL;
-
- radial = &image->radial;
-
- if (!init_gradient (&radial->common, stops, n_stops))
- {
- free (image);
- return NULL;
- }
-
- image->type = RADIAL;
-
- radial->c1.x = inner->x;
- radial->c1.y = inner->y;
- radial->c1.radius = inner_radius;
- radial->c2.x = outer->x;
- radial->c2.y = outer->y;
- radial->c2.radius = outer_radius;
- radial->cdx = pixman_fixed_to_double (radial->c2.x - radial->c1.x);
- radial->cdy = pixman_fixed_to_double (radial->c2.y - radial->c1.y);
- radial->dr = pixman_fixed_to_double (radial->c2.radius - radial->c1.radius);
- radial->A = (radial->cdx * radial->cdx
- + radial->cdy * radial->cdy
- - radial->dr * radial->dr);
-
- return image;
-}
-
-PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_conical_gradient (pixman_point_fixed_t *center,
- pixman_fixed_t angle,
- const pixman_gradient_stop_t *stops,
- int n_stops)
-{
- pixman_image_t *image = allocate_image();
- conical_gradient_t *conical;
-
- if (!image)
- return NULL;
-
- conical = &image->conical;
- if (!init_gradient (&conical->common, stops, n_stops))
- {
- free (image);
- return NULL;
- }
-
- image->type = CONICAL;
- conical->center = *center;
- conical->angle = angle;
-
- return image;
-}
-
-static uint32_t *
-create_bits (pixman_format_code_t format,
- int width,
- int height,
- int *rowstride_bytes)
-{
- int stride;
- int buf_size;
- int bpp;
-
- /* what follows is a long-winded way, avoiding any possibility of integer
- * overflows, of saying:
- * stride = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (uint32_t);
- */
-
- bpp = PIXMAN_FORMAT_BPP (format);
- if (pixman_multiply_overflows_int (width, bpp))
- return NULL;
-
- stride = width * bpp;
- if (pixman_addition_overflows_int (stride, FB_MASK))
- return NULL;
-
- stride += FB_MASK;
- stride >>= FB_SHIFT;
-
-#if FB_SHIFT < 2
- if (pixman_multiply_overflows_int (stride, sizeof (uint32_t)))
- return NULL;
-#endif
- stride *= sizeof (uint32_t);
-
- if (pixman_multiply_overflows_int (height, stride))
- return NULL;
-
- buf_size = height * stride;
-
- if (rowstride_bytes)
- *rowstride_bytes = stride;
-
- return calloc (buf_size, 1);
-}
-
-static void
-reset_clip_region (pixman_image_t *image)
+void
+_pixman_image_reset_clip_region (pixman_image_t *image)
{
pixman_region32_fini (&image->common.clip_region);
@@ -336,72 +246,27 @@ reset_clip_region (pixman_image_t *image)
}
}
-PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_bits (pixman_format_code_t format,
- int width,
- int height,
- uint32_t *bits,
- int rowstride_bytes)
-{
- pixman_image_t *image;
- uint32_t *free_me = NULL;
-
- /* must be a whole number of uint32_t's
- */
- return_val_if_fail (bits == NULL ||
- (rowstride_bytes % sizeof (uint32_t)) == 0, NULL);
-
- if (!bits && width && height)
- {
- free_me = bits = create_bits (format, width, height, &rowstride_bytes);
- if (!bits)
- return NULL;
- }
-
- image = allocate_image();
-
- if (!image) {
- if (free_me)
- free (free_me);
- return NULL;
- }
-
- image->type = BITS;
- image->bits.format = format;
- image->bits.width = width;
- image->bits.height = height;
- image->bits.bits = bits;
- image->bits.free_me = free_me;
-
- image->bits.rowstride = rowstride_bytes / (int) sizeof (uint32_t); /* we store it in number
- * of uint32_t's
- */
- image->bits.indexed = NULL;
-
- pixman_region32_fini (&image->common.full_region);
- pixman_region32_init_rect (&image->common.full_region, 0, 0,
- image->bits.width, image->bits.height);
-
- reset_clip_region (image);
- return image;
-}
-
PIXMAN_EXPORT pixman_bool_t
pixman_image_set_clip_region32 (pixman_image_t *image,
pixman_region32_t *region)
{
image_common_t *common = (image_common_t *)image;
+ pixman_bool_t result;
if (region)
{
- return pixman_region32_copy (&common->clip_region, region);
+ result = pixman_region32_copy (&common->clip_region, region);
}
else
{
- reset_clip_region (image);
+ _pixman_image_reset_clip_region (image);
- return TRUE;
+ result = TRUE;
}
+
+ image_property_changed (image);
+
+ return result;
}
@@ -410,17 +275,22 @@ pixman_image_set_clip_region (pixman_image_t *image,
pixman_region16_t *region)
{
image_common_t *common = (image_common_t *)image;
+ pixman_bool_t result;
if (region)
{
- return pixman_region32_copy_from_region16 (&common->clip_region, region);
+ result = pixman_region32_copy_from_region16 (&common->clip_region, region);
}
else
{
- reset_clip_region (image);
+ _pixman_image_reset_clip_region (image);
- return TRUE;
+ result = TRUE;
}
+
+ image_property_changed (image);
+
+ return result;
}
/* Sets whether the clip region includes a clip region set by the client
@@ -430,6 +300,8 @@ pixman_image_set_has_client_clip (pixman_image_t *image,
pixman_bool_t client_clip)
{
image->common.has_client_clip = client_clip;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT pixman_bool_t
@@ -445,6 +317,7 @@ pixman_image_set_transform (pixman_image_t *image,
};
image_common_t *common = (image_common_t *)image;
+ pixman_bool_t result;
if (common->transform == transform)
return TRUE;
@@ -453,16 +326,24 @@ pixman_image_set_transform (pixman_image_t *image,
{
free(common->transform);
common->transform = NULL;
- return TRUE;
+ result = TRUE;
+ goto out;
}
if (common->transform == NULL)
common->transform = malloc (sizeof (pixman_transform_t));
+
if (common->transform == NULL)
- return FALSE;
+ {
+ result = FALSE;
+ goto out;
+ }
memcpy(common->transform, transform, sizeof(pixman_transform_t));
+out:
+ image_property_changed (image);
+
return TRUE;
}
@@ -471,6 +352,8 @@ pixman_image_set_repeat (pixman_image_t *image,
pixman_repeat_t repeat)
{
image->common.repeat = repeat;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT pixman_bool_t
@@ -503,6 +386,8 @@ pixman_image_set_filter (pixman_image_t *image,
common->filter_params = new_params;
common->n_filter_params = n_params;
+
+ image_property_changed (image);
return TRUE;
}
@@ -516,6 +401,8 @@ pixman_image_set_source_clipping (pixman_image_t *image,
common->src_clip = &common->clip_region;
else
common->src_clip = &common->full_region;
+
+ image_property_changed (image);
}
/* Unlike all the other property setters, this function does not
@@ -529,6 +416,8 @@ pixman_image_set_indexed (pixman_image_t *image,
bits_image_t *bits = (bits_image_t *)image;
bits->indexed = indexed;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT void
@@ -554,6 +443,8 @@ pixman_image_set_alpha_map (pixman_image_t *image,
common->alpha_origin.x = x;
common->alpha_origin.y = y;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT void
@@ -561,6 +452,8 @@ pixman_image_set_component_alpha (pixman_image_t *image,
pixman_bool_t component_alpha)
{
image->common.component_alpha = component_alpha;
+
+ image_property_changed (image);
}
@@ -573,6 +466,8 @@ pixman_image_set_accessors (pixman_image_t *image,
image->common.read_func = read_func;
image->common.write_func = write_func;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT uint32_t *
@@ -620,6 +515,16 @@ pixman_image_get_depth (pixman_image_t *image)
return 0;
}
+static uint32_t
+color_to_uint32 (const pixman_color_t *color)
+{
+ return
+ (color->alpha >> 8 << 24) |
+ (color->red >> 8 << 16) |
+ (color->green & 0xff00) |
+ (color->blue >> 8);
+}
+
static pixman_bool_t
color_to_pixel (pixman_color_t *color,
uint32_t *pixel,
@@ -631,6 +536,8 @@ color_to_pixel (pixman_color_t *color,
format == PIXMAN_x8r8g8b8 ||
format == PIXMAN_a8b8g8r8 ||
format == PIXMAN_x8b8g8r8 ||
+ format == PIXMAN_b8g8r8a8 ||
+ format == PIXMAN_b8g8r8x8 ||
format == PIXMAN_r5g6b5 ||
format == PIXMAN_b5g6r5 ||
format == PIXMAN_a8))
@@ -645,6 +552,13 @@ color_to_pixel (pixman_color_t *color,
((c & 0x0000ff00) >> 0) |
((c & 0x000000ff) << 16);
}
+ if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_BGRA)
+ {
+ c = ((c & 0xff000000) >> 24) |
+ ((c & 0x00ff0000) >> 8) |
+ ((c & 0x0000ff00) << 8) |
+ ((c & 0x000000ff) << 24);
+ }
if (format == PIXMAN_a8)
c = c >> 24;
@@ -703,7 +617,11 @@ pixman_image_fill_rectangles (pixman_op_t op,
pixman_box32_t *boxes;
pixman_region32_init_rect (&fill_region, rects[i].x, rects[i].y, rects[i].width, rects[i].height);
- pixman_region32_intersect (&fill_region, &fill_region, &dest->common.clip_region);
+ if (!pixman_region32_intersect (&fill_region,
+ &fill_region,
+ &dest->common.clip_region))
+ return FALSE;
+
boxes = pixman_region32_rectangles (&fill_region, &n_boxes);
for (j = 0; j < n_boxes; ++j)
@@ -761,6 +679,8 @@ pixman_image_can_get_solid (pixman_image_t *image)
case PIXMAN_x8r8g8b8:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
+ case PIXMAN_b8g8r8a8:
+ case PIXMAN_b8g8r8x8:
case PIXMAN_r8g8b8:
case PIXMAN_b8g8r8:
case PIXMAN_r5g6b5:
diff --git a/lib/pixman/pixman/pixman-implementation.c b/lib/pixman/pixman/pixman-implementation.c
new file mode 100644
index 000000000..86c2f3773
--- /dev/null
+++ b/lib/pixman/pixman/pixman-implementation.c
@@ -0,0 +1,268 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Red Hat not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. Red Hat makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include "pixman-private.h"
+
+static void
+delegate_composite (pixman_implementation_t * imp,
+ pixman_op_t op,
+ pixman_image_t * src,
+ pixman_image_t * mask,
+ pixman_image_t * dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ _pixman_implementation_composite (imp->delegate,
+ op,
+ src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height);
+}
+
+static void
+delegate_combine_32 (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint32_t * dest,
+ const uint32_t * src,
+ const uint32_t * mask,
+ int width)
+{
+ _pixman_implementation_combine_32 (imp->delegate,
+ op, dest, src, mask, width);
+}
+
+static void
+delegate_combine_64 (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint64_t * dest,
+ const uint64_t * src,
+ const uint64_t * mask,
+ int width)
+{
+ _pixman_implementation_combine_64 (imp->delegate,
+ op, dest, src, mask, width);
+}
+
+static void
+delegate_combine_32_ca (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint32_t * dest,
+ const uint32_t * src,
+ const uint32_t * mask,
+ int width)
+{
+ _pixman_implementation_combine_32_ca (imp->delegate,
+ op, dest, src, mask, width);
+}
+
+static void
+delegate_combine_64_ca (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint64_t * dest,
+ const uint64_t * src,
+ const uint64_t * mask,
+ int width)
+{
+ _pixman_implementation_combine_64_ca (imp->delegate,
+ op, dest, src, mask, width);
+}
+
+static pixman_bool_t
+delegate_blt (pixman_implementation_t * imp,
+ uint32_t * src_bits,
+ uint32_t * dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x,
+ int src_y,
+ int dst_x,
+ int dst_y,
+ int width,
+ int height)
+{
+ return _pixman_implementation_blt (imp->delegate, src_bits, dst_bits, src_stride, dst_stride,
+ src_bpp, dst_bpp, src_x, src_y, dst_x, dst_y,
+ width, height);
+}
+
+static pixman_bool_t
+delegate_fill (pixman_implementation_t *imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ return _pixman_implementation_fill (imp->delegate, bits, stride, bpp, x, y, width, height, xor);
+}
+
+pixman_implementation_t *
+_pixman_implementation_create (pixman_implementation_t *toplevel,
+ pixman_implementation_t *delegate)
+{
+ pixman_implementation_t *imp = malloc (sizeof (pixman_implementation_t));
+ int i;
+
+ if (!imp)
+ return NULL;
+
+ if (toplevel)
+ imp->toplevel = toplevel;
+ else
+ imp->toplevel = imp;
+
+ if (delegate)
+ delegate->toplevel = imp->toplevel;
+
+ imp->delegate = delegate;
+
+ /* Fill out function pointers with ones that just delegate
+ */
+ imp->composite = delegate_composite;
+ imp->blt = delegate_blt;
+ imp->fill = delegate_fill;
+
+ for (i = 0; i < PIXMAN_OP_LAST; ++i)
+ {
+ imp->combine_32[i] = delegate_combine_32;
+ imp->combine_64[i] = delegate_combine_64;
+ imp->combine_32_ca[i] = delegate_combine_32_ca;
+ imp->combine_64_ca[i] = delegate_combine_64_ca;
+ }
+
+ return imp;
+}
+
+void
+_pixman_implementation_combine_32 (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint32_t * dest,
+ const uint32_t * src,
+ const uint32_t * mask,
+ int width)
+{
+ (* imp->combine_32[op]) (imp, op, dest, src, mask, width);
+}
+
+void
+_pixman_implementation_combine_64 (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint64_t * dest,
+ const uint64_t * src,
+ const uint64_t * mask,
+ int width)
+{
+ (* imp->combine_64[op]) (imp, op, dest, src, mask, width);
+}
+
+void
+_pixman_implementation_combine_32_ca (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint32_t * dest,
+ const uint32_t * src,
+ const uint32_t * mask,
+ int width)
+{
+ (* imp->combine_32_ca[op]) (imp, op, dest, src, mask, width);
+}
+
+void
+_pixman_implementation_combine_64_ca (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint64_t * dest,
+ const uint64_t * src,
+ const uint64_t * mask,
+ int width)
+{
+ (* imp->combine_64_ca[op]) (imp, op, dest, src, mask, width);
+}
+
+void
+_pixman_implementation_composite (pixman_implementation_t * imp,
+ pixman_op_t op,
+ pixman_image_t * src,
+ pixman_image_t * mask,
+ pixman_image_t * dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ (* imp->composite) (imp, op,
+ src, mask, dest,
+ src_x, src_y, mask_x, mask_y, dest_x, dest_y,
+ width, height);
+}
+
+pixman_bool_t
+_pixman_implementation_blt (pixman_implementation_t * imp,
+ uint32_t * src_bits,
+ uint32_t * dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x,
+ int src_y,
+ int dst_x,
+ int dst_y,
+ int width,
+ int height)
+{
+ return (* imp->blt) (imp, src_bits, dst_bits, src_stride, dst_stride,
+ src_bpp, dst_bpp, src_x, src_y, dst_x, dst_y,
+ width, height);
+}
+
+pixman_bool_t
+_pixman_implementation_fill (pixman_implementation_t *imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ return (* imp->fill) (imp, bits, stride, bpp, x, y, width, height, xor);
+}
diff --git a/lib/pixman/pixman/pixman-linear-gradient.c b/lib/pixman/pixman/pixman-linear-gradient.c
new file mode 100644
index 000000000..ea2975036
--- /dev/null
+++ b/lib/pixman/pixman/pixman-linear-gradient.c
@@ -0,0 +1,261 @@
+/*
+ * Copyright © 2000 SuSE, Inc.
+ * Copyright © 2007 Red Hat, Inc.
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * 2005 Lars Knoll & Zack Rusin, Trolltech
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include "pixman-private.h"
+
+static source_pict_class_t
+linear_gradient_classify (pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height)
+{
+ linear_gradient_t *linear = (linear_gradient_t *)image;
+ pixman_vector_t v;
+ pixman_fixed_32_32_t l;
+ pixman_fixed_48_16_t dx, dy, a, b, off;
+ pixman_fixed_48_16_t factors[4];
+ int i;
+
+ image->source.class = SOURCE_IMAGE_CLASS_UNKNOWN;
+
+ dx = linear->p2.x - linear->p1.x;
+ dy = linear->p2.y - linear->p1.y;
+ l = dx * dx + dy * dy;
+ if (l)
+ {
+ a = (dx << 32) / l;
+ b = (dy << 32) / l;
+ }
+ else
+ {
+ a = b = 0;
+ }
+
+ off = (-a * linear->p1.x
+ -b * linear->p1.y) >> 16;
+
+ for (i = 0; i < 3; i++)
+ {
+ v.vector[0] = pixman_int_to_fixed ((i % 2) * (width - 1) + x);
+ v.vector[1] = pixman_int_to_fixed ((i / 2) * (height - 1) + y);
+ v.vector[2] = pixman_fixed_1;
+
+ if (image->common.transform)
+ {
+ if (!pixman_transform_point_3d (image->common.transform, &v))
+ {
+ image->source.class = SOURCE_IMAGE_CLASS_UNKNOWN;
+
+ return image->source.class;
+ }
+ }
+
+ factors[i] = ((a * v.vector[0] + b * v.vector[1]) >> 16) + off;
+ }
+
+ if (factors[2] == factors[0])
+ image->source.class = SOURCE_IMAGE_CLASS_HORIZONTAL;
+ else if (factors[1] == factors[0])
+ image->source.class = SOURCE_IMAGE_CLASS_VERTICAL;
+
+ return image->source.class;
+}
+
+static void
+linear_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
+{
+ pixman_vector_t v, unit;
+ pixman_fixed_32_32_t l;
+ pixman_fixed_48_16_t dx, dy, a, b, off;
+ gradient_t *gradient = (gradient_t *)image;
+ source_image_t *source = (source_image_t *)image;
+ linear_gradient_t *linear = (linear_gradient_t *)image;
+ uint32_t *end = buffer + width;
+ GradientWalker walker;
+
+ _pixman_gradient_walker_init (&walker, gradient, source->common.repeat);
+
+ /* reference point is the center of the pixel */
+ v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1/2;
+ v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1/2;
+ v.vector[2] = pixman_fixed_1;
+ if (source->common.transform) {
+ if (!pixman_transform_point_3d (source->common.transform, &v))
+ return;
+ unit.vector[0] = source->common.transform->matrix[0][0];
+ unit.vector[1] = source->common.transform->matrix[1][0];
+ unit.vector[2] = source->common.transform->matrix[2][0];
+ } else {
+ unit.vector[0] = pixman_fixed_1;
+ unit.vector[1] = 0;
+ unit.vector[2] = 0;
+ }
+
+ dx = linear->p2.x - linear->p1.x;
+ dy = linear->p2.y - linear->p1.y;
+ l = dx*dx + dy*dy;
+ if (l != 0) {
+ a = (dx << 32) / l;
+ b = (dy << 32) / l;
+ off = (-a*linear->p1.x - b*linear->p1.y)>>16;
+ }
+ if (l == 0 || (unit.vector[2] == 0 && v.vector[2] == pixman_fixed_1)) {
+ pixman_fixed_48_16_t inc, t;
+ /* affine transformation only */
+ if (l == 0) {
+ t = 0;
+ inc = 0;
+ } else {
+ t = ((a*v.vector[0] + b*v.vector[1]) >> 16) + off;
+ inc = (a * unit.vector[0] + b * unit.vector[1]) >> 16;
+ }
+
+ if (source->class == SOURCE_IMAGE_CLASS_VERTICAL)
+ {
+ register uint32_t color;
+
+ color = _pixman_gradient_walker_pixel( &walker, t );
+ while (buffer < end)
+ *(buffer++) = color;
+ }
+ else
+ {
+ if (!mask) {
+ while (buffer < end)
+ {
+ *(buffer) = _pixman_gradient_walker_pixel (&walker, t);
+ buffer += 1;
+ t += inc;
+ }
+ } else {
+ while (buffer < end) {
+ if (*mask++ & maskBits)
+ {
+ *(buffer) = _pixman_gradient_walker_pixel (&walker, t);
+ }
+ buffer += 1;
+ t += inc;
+ }
+ }
+ }
+ }
+ else /* projective transformation */
+ {
+ pixman_fixed_48_16_t t;
+
+ if (source->class == SOURCE_IMAGE_CLASS_VERTICAL)
+ {
+ register uint32_t color;
+
+ if (v.vector[2] == 0)
+ {
+ t = 0;
+ }
+ else
+ {
+ pixman_fixed_48_16_t x, y;
+
+ x = ((pixman_fixed_48_16_t) v.vector[0] << 16) / v.vector[2];
+ y = ((pixman_fixed_48_16_t) v.vector[1] << 16) / v.vector[2];
+ t = ((a * x + b * y) >> 16) + off;
+ }
+
+ color = _pixman_gradient_walker_pixel( &walker, t );
+ while (buffer < end)
+ *(buffer++) = color;
+ }
+ else
+ {
+ while (buffer < end)
+ {
+ if (!mask || *mask++ & maskBits)
+ {
+ if (v.vector[2] == 0) {
+ t = 0;
+ } else {
+ pixman_fixed_48_16_t x, y;
+ x = ((pixman_fixed_48_16_t)v.vector[0] << 16) / v.vector[2];
+ y = ((pixman_fixed_48_16_t)v.vector[1] << 16) / v.vector[2];
+ t = ((a*x + b*y) >> 16) + off;
+ }
+ *(buffer) = _pixman_gradient_walker_pixel (&walker, t);
+ }
+ ++buffer;
+ v.vector[0] += unit.vector[0];
+ v.vector[1] += unit.vector[1];
+ v.vector[2] += unit.vector[2];
+ }
+ }
+ }
+}
+
+static void
+linear_gradient_property_changed (pixman_image_t *image)
+{
+ image->common.get_scanline_32 = (scanFetchProc)linear_gradient_get_scanline_32;
+ image->common.get_scanline_64 = (scanFetchProc)_pixman_image_get_scanline_64_generic;
+}
+
+PIXMAN_EXPORT pixman_image_t *
+pixman_image_create_linear_gradient (pixman_point_fixed_t *p1,
+ pixman_point_fixed_t *p2,
+ const pixman_gradient_stop_t *stops,
+ int n_stops)
+{
+ pixman_image_t *image;
+ linear_gradient_t *linear;
+
+ return_val_if_fail (n_stops >= 2, NULL);
+
+ image = _pixman_image_allocate();
+
+ if (!image)
+ return NULL;
+
+ linear = &image->linear;
+
+ if (!_pixman_init_gradient (&linear->common, stops, n_stops))
+ {
+ free (image);
+ return NULL;
+ }
+
+ linear->p1 = *p1;
+ linear->p2 = *p2;
+
+ image->type = LINEAR;
+ image->source.class = SOURCE_IMAGE_CLASS_UNKNOWN;
+ image->common.classify = linear_gradient_classify;
+ image->common.property_changed = linear_gradient_property_changed;
+
+ linear_gradient_property_changed (image);
+
+ return image;
+}
diff --git a/lib/pixman/pixman/pixman-matrix.c b/lib/pixman/pixman/pixman-matrix.c
new file mode 100644
index 000000000..79dae8de1
--- /dev/null
+++ b/lib/pixman/pixman/pixman-matrix.c
@@ -0,0 +1,626 @@
+/*
+ * Copyright © 2008 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * Matrix interfaces
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+#include "pixman-private.h"
+
+#define F(x) pixman_int_to_fixed(x)
+
+PIXMAN_EXPORT void
+pixman_transform_init_identity(struct pixman_transform *matrix)
+{
+ int i;
+
+ memset(matrix, '\0', sizeof (struct pixman_transform));
+ for (i = 0; i < 3; i++)
+ matrix->matrix[i][i] = F(1);
+}
+
+typedef pixman_fixed_32_32_t pixman_fixed_34_30_t;
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_point_3d(const struct pixman_transform *transform,
+ struct pixman_vector *vector)
+{
+ struct pixman_vector result;
+ pixman_fixed_32_32_t partial;
+ pixman_fixed_48_16_t v;
+ int i, j;
+
+ for (j = 0; j < 3; j++)
+ {
+ v = 0;
+ for (i = 0; i < 3; i++)
+ {
+ partial = ((pixman_fixed_48_16_t) transform->matrix[j][i] *
+ (pixman_fixed_48_16_t) vector->vector[i]);
+ v += partial >> 16;
+ }
+ if (v > pixman_max_fixed_48_16 || v < pixman_min_fixed_48_16)
+ return FALSE;
+ result.vector[j] = (pixman_fixed_t) v;
+ }
+ *vector = result;
+ if (!result.vector[2])
+ return FALSE;
+ return TRUE;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_point(const struct pixman_transform *transform,
+ struct pixman_vector *vector)
+{
+ pixman_fixed_32_32_t partial;
+ pixman_fixed_34_30_t v[3];
+ pixman_fixed_48_16_t quo;
+ int i, j;
+
+ for (j = 0; j < 3; j++)
+ {
+ v[j] = 0;
+ for (i = 0; i < 3; i++)
+ {
+ partial = ((pixman_fixed_32_32_t) transform->matrix[j][i] *
+ (pixman_fixed_32_32_t) vector->vector[i]);
+ v[j] += partial >> 2;
+ }
+ }
+ if (!(v[2] >> 16))
+ return FALSE;
+ for (j = 0; j < 2; j++)
+ {
+ quo = v[j] / (v[2] >> 16);
+ if (quo > pixman_max_fixed_48_16 || quo < pixman_min_fixed_48_16)
+ return FALSE;
+ vector->vector[j] = (pixman_fixed_t) quo;
+ }
+ vector->vector[2] = pixman_fixed_1;
+ return TRUE;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_multiply (struct pixman_transform *dst,
+ const struct pixman_transform *l,
+ const struct pixman_transform *r)
+{
+ struct pixman_transform d;
+ int dx, dy;
+ int o;
+
+ for (dy = 0; dy < 3; dy++)
+ for (dx = 0; dx < 3; dx++) {
+ pixman_fixed_48_16_t v;
+ pixman_fixed_32_32_t partial;
+ v = 0;
+ for (o = 0; o < 3; o++) {
+ partial = (pixman_fixed_32_32_t) l->matrix[dy][o] * (pixman_fixed_32_32_t) r->matrix[o][dx];
+ v += partial >> 16;
+ }
+ if (v > pixman_max_fixed_48_16 || v < pixman_min_fixed_48_16)
+ return FALSE;
+ d.matrix[dy][dx] = (pixman_fixed_t) v;
+ }
+ *dst = d;
+ return TRUE;
+}
+
+PIXMAN_EXPORT void
+pixman_transform_init_scale (struct pixman_transform *t,
+ pixman_fixed_t sx,
+ pixman_fixed_t sy)
+{
+ memset (t, '\0', sizeof (struct pixman_transform));
+ t->matrix[0][0] = sx;
+ t->matrix[1][1] = sy;
+ t->matrix[2][2] = F (1);
+}
+
+static pixman_fixed_t
+fixed_inverse(pixman_fixed_t x)
+{
+ return (pixman_fixed_t) ((((pixman_fixed_48_16_t) F(1)) * F(1)) / x);
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_scale(struct pixman_transform *forward,
+ struct pixman_transform *reverse,
+ pixman_fixed_t sx, pixman_fixed_t sy)
+{
+ struct pixman_transform t;
+
+ if (sx == 0 || sy == 0)
+ return FALSE;
+
+ if (forward) {
+ pixman_transform_init_scale (&t, sx, sy);
+ if (!pixman_transform_multiply (forward, &t, forward))
+ return FALSE;
+ }
+ if (reverse) {
+ pixman_transform_init_scale (&t, fixed_inverse (sx),
+ fixed_inverse (sy));
+ if (!pixman_transform_multiply (reverse, reverse, &t))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT void
+pixman_transform_init_rotate(struct pixman_transform *t,
+ pixman_fixed_t c,
+ pixman_fixed_t s)
+{
+ memset(t, '\0', sizeof (struct pixman_transform));
+ t->matrix[0][0] = c;
+ t->matrix[0][1] = -s;
+ t->matrix[1][0] = s;
+ t->matrix[1][1] = c;
+ t->matrix[2][2] = F (1);
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_rotate(struct pixman_transform *forward,
+ struct pixman_transform *reverse,
+ pixman_fixed_t c, pixman_fixed_t s)
+{
+ struct pixman_transform t;
+
+ if (forward) {
+ pixman_transform_init_rotate(&t, c, s);
+ if (!pixman_transform_multiply(forward, &t, forward))
+ return FALSE;
+ }
+
+ if (reverse) {
+ pixman_transform_init_rotate(&t, c, -s);
+ if (!pixman_transform_multiply (reverse, reverse, &t))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT void
+pixman_transform_init_translate(struct pixman_transform *t,
+ pixman_fixed_t tx, pixman_fixed_t ty)
+{
+ memset(t, '\0', sizeof (struct pixman_transform));
+ t->matrix[0][0] = F (1);
+ t->matrix[0][2] = tx;
+ t->matrix[1][1] = F (1);
+ t->matrix[1][2] = ty;
+ t->matrix[2][2] = F (1);
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_translate(struct pixman_transform *forward,
+ struct pixman_transform *reverse,
+ pixman_fixed_t tx, pixman_fixed_t ty)
+{
+ struct pixman_transform t;
+
+ if (forward) {
+ pixman_transform_init_translate(&t, tx, ty);
+ if (!pixman_transform_multiply(forward, &t, forward))
+ return FALSE;
+ }
+
+ if (reverse) {
+ pixman_transform_init_translate(&t, -tx, -ty);
+ if (!pixman_transform_multiply(reverse, reverse, &t))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_bounds(const struct pixman_transform *matrix,
+ struct pixman_box16 *b)
+
+{
+ struct pixman_vector v[4];
+ int i;
+ int x1, y1, x2, y2;
+
+ v[0].vector[0] = F (b->x1); v[0].vector[1] = F (b->y1); v[0].vector[2] = F(1);
+ v[1].vector[0] = F (b->x2); v[1].vector[1] = F (b->y1); v[1].vector[2] = F(1);
+ v[2].vector[0] = F (b->x2); v[2].vector[1] = F (b->y2); v[2].vector[2] = F(1);
+ v[3].vector[0] = F (b->x1); v[3].vector[1] = F (b->y2); v[3].vector[2] = F(1);
+ for (i = 0; i < 4; i++)
+ {
+ if (!pixman_transform_point(matrix, &v[i]))
+ return FALSE;
+ x1 = pixman_fixed_to_int(v[i].vector[0]);
+ y1 = pixman_fixed_to_int(v[i].vector[1]);
+ x2 = pixman_fixed_to_int(pixman_fixed_ceil (v[i].vector[0]));
+ y2 = pixman_fixed_to_int(pixman_fixed_ceil (v[i].vector[1]));
+ if (i == 0)
+ {
+ b->x1 = x1; b->y1 = y1;
+ b->x2 = x2; b->y2 = y2;
+ }
+ else
+ {
+ if (x1 < b->x1) b->x1 = x1;
+ if (y1 < b->y1) b->y1 = y1;
+ if (x2 > b->x2) b->x2 = x2;
+ if (y2 > b->y2) b->y2 = y2;
+ }
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_invert (struct pixman_transform *dst,
+ const struct pixman_transform *src)
+{
+ struct pixman_f_transform m, r;
+
+ pixman_f_transform_from_pixman_transform (&m, src);
+ if (!pixman_f_transform_invert (&r, &m))
+ return FALSE;
+ if (!pixman_transform_from_pixman_f_transform (dst, &r))
+ return FALSE;
+ return TRUE;
+}
+
+static pixman_bool_t
+within_epsilon(pixman_fixed_t a, pixman_fixed_t b, pixman_fixed_t epsilon)
+{
+ pixman_fixed_t t = a - b;
+ if (t < 0) t = -t;
+ return t <= epsilon;
+}
+
+#define epsilon (pixman_fixed_t) (2)
+
+#define is_same(a,b) (within_epsilon(a, b, epsilon))
+#define is_zero(a) (within_epsilon(a, 0, epsilon))
+#define is_one(a) (within_epsilon(a, F(1), epsilon))
+#define is_unit(a) (within_epsilon(a, F( 1), epsilon) || \
+ within_epsilon(a, F(-1), epsilon) || \
+ is_zero(a))
+#define is_int(a) (is_zero(pixman_fixed_frac(a)))
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_is_identity(const struct pixman_transform *t)
+{
+ return ( is_same(t->matrix[0][0], t->matrix[1][1]) &&
+ is_same(t->matrix[0][0], t->matrix[2][2]) &&
+ !is_zero(t->matrix[0][0]) &&
+ is_zero(t->matrix[0][1]) &&
+ is_zero(t->matrix[0][2]) &&
+ is_zero(t->matrix[1][0]) &&
+ is_zero(t->matrix[1][2]) &&
+ is_zero(t->matrix[2][0]) &&
+ is_zero(t->matrix[2][1]));
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_is_scale(const struct pixman_transform *t)
+{
+ return (!is_zero(t->matrix[0][0]) &&
+ is_zero(t->matrix[0][1]) &&
+ is_zero(t->matrix[0][2]) &&
+
+ is_zero(t->matrix[1][0]) &&
+ !is_zero(t->matrix[1][1]) &&
+ is_zero(t->matrix[1][2]) &&
+
+ is_zero(t->matrix[2][0]) &&
+ is_zero(t->matrix[2][1]) &&
+ !is_zero(t->matrix[2][2]));
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_is_int_translate(const struct pixman_transform *t)
+{
+ return (is_one (t->matrix[0][0]) &&
+ is_zero(t->matrix[0][1]) &&
+ is_int (t->matrix[0][2]) &&
+
+ is_zero(t->matrix[1][0]) &&
+ is_one (t->matrix[1][1]) &&
+ is_int (t->matrix[1][2]) &&
+
+ is_zero(t->matrix[2][0]) &&
+ is_zero(t->matrix[2][1]) &&
+ is_one (t->matrix[2][2]));
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_is_inverse(const struct pixman_transform *a,
+ const struct pixman_transform *b)
+{
+ struct pixman_transform t;
+
+ pixman_transform_multiply(&t, a, b);
+ return pixman_transform_is_identity(&t);
+}
+
+PIXMAN_EXPORT void
+pixman_f_transform_from_pixman_transform (struct pixman_f_transform *ft,
+ const struct pixman_transform *t)
+{
+ int i, j;
+
+ for (j = 0; j < 3; j++)
+ for (i = 0; i < 3; i++)
+ ft->m[j][i] = pixman_fixed_to_double (t->matrix[j][i]);
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_transform_from_pixman_f_transform (struct pixman_transform *t,
+ const struct pixman_f_transform *ft)
+{
+ int i, j;
+
+ for (j = 0; j < 3; j++)
+ for (i = 0; i < 3; i++)
+ {
+ double d = ft->m[j][i];
+ if (d < -32767.0 || d > 32767.0)
+ return FALSE;
+ d = d * 65536.0 + 0.5;
+ t->matrix[j][i] = (pixman_fixed_t) floor (d);
+ }
+ return TRUE;
+}
+
+static const int a[3] = { 3, 3, 2 };
+static const int b[3] = { 2, 1, 1 };
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_f_transform_invert(struct pixman_f_transform *dst,
+ const struct pixman_f_transform *src)
+{
+ double det;
+ int i, j;
+ static int a[3] = { 2, 2, 1 };
+ static int b[3] = { 1, 0, 0 };
+
+ det = 0;
+ for (i = 0; i < 3; i++) {
+ double p;
+ int ai = a[i];
+ int bi = b[i];
+ p = src->m[i][0] * (src->m[ai][2] * src->m[bi][1] -
+ src->m[ai][1] * src->m[bi][2]);
+ if (i == 1)
+ p = -p;
+ det += p;
+ }
+ if (det == 0)
+ return FALSE;
+ det = 1/det;
+ for (j = 0; j < 3; j++) {
+ for (i = 0; i < 3; i++) {
+ double p;
+ int ai = a[i];
+ int aj = a[j];
+ int bi = b[i];
+ int bj = b[j];
+
+ p = (src->m[ai][aj] * src->m[bi][bj] -
+ src->m[ai][bj] * src->m[bi][aj]);
+ if (((i + j) & 1) != 0)
+ p = -p;
+ dst->m[j][i] = det * p;
+ }
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_f_transform_point(const struct pixman_f_transform *t,
+ struct pixman_f_vector *v)
+{
+ struct pixman_f_vector result;
+ int i, j;
+ double a;
+
+ for (j = 0; j < 3; j++)
+ {
+ a = 0;
+ for (i = 0; i < 3; i++)
+ a += t->m[j][i] * v->v[i];
+ result.v[j] = a;
+ }
+ if (!result.v[2])
+ return FALSE;
+ for (j = 0; j < 2; j++)
+ v->v[j] = result.v[j] / result.v[2];
+ v->v[2] = 1;
+ return TRUE;
+}
+
+PIXMAN_EXPORT void
+pixman_f_transform_point_3d(const struct pixman_f_transform *t,
+ struct pixman_f_vector *v)
+{
+ struct pixman_f_vector result;
+ int i, j;
+ double a;
+
+ for (j = 0; j < 3; j++)
+ {
+ a = 0;
+ for (i = 0; i < 3; i++)
+ a += t->m[j][i] * v->v[i];
+ result.v[j] = a;
+ }
+ *v = result;
+}
+
+PIXMAN_EXPORT void
+pixman_f_transform_multiply(struct pixman_f_transform *dst,
+ const struct pixman_f_transform *l,
+ const struct pixman_f_transform *r)
+{
+ struct pixman_f_transform d;
+ int dx, dy;
+ int o;
+
+ for (dy = 0; dy < 3; dy++)
+ for (dx = 0; dx < 3; dx++)
+ {
+ double v = 0;
+ for (o = 0; o < 3; o++)
+ v += l->m[dy][o] * r->m[o][dx];
+ d.m[dy][dx] = v;
+ }
+ *dst = d;
+}
+
+PIXMAN_EXPORT void
+pixman_f_transform_init_scale (struct pixman_f_transform *t, double sx, double sy)
+{
+ t->m[0][0] = sx; t->m[0][1] = 0; t->m[0][2] = 0;
+ t->m[1][0] = 0; t->m[1][1] = sy; t->m[1][2] = 0;
+ t->m[2][0] = 0; t->m[2][1] = 0; t->m[2][2] = 1;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_f_transform_scale (struct pixman_f_transform *forward,
+ struct pixman_f_transform *reverse,
+ double sx, double sy)
+{
+ struct pixman_f_transform t;
+
+ if (sx == 0 || sy == 0)
+ return FALSE;
+
+ if (forward) {
+ pixman_f_transform_init_scale (&t, sx, sy);
+ pixman_f_transform_multiply (forward, &t, forward);
+ }
+ if (reverse) {
+ pixman_f_transform_init_scale (&t, 1/sx, 1/sy);
+ pixman_f_transform_multiply (reverse, reverse, &t);
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT void
+pixman_f_transform_init_rotate (struct pixman_f_transform *t, double c, double s)
+{
+ t->m[0][0] = c; t->m[0][1] = -s; t->m[0][2] = 0;
+ t->m[1][0] = s; t->m[1][1] = c; t->m[1][2] = 0;
+ t->m[2][0] = 0; t->m[2][1] = 0; t->m[2][2] = 1;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_f_transform_rotate (struct pixman_f_transform *forward,
+ struct pixman_f_transform *reverse,
+ double c, double s)
+{
+ struct pixman_f_transform t;
+
+ if (forward) {
+ pixman_f_transform_init_rotate (&t, c, s);
+ pixman_f_transform_multiply (forward, &t, forward);
+ }
+ if (reverse) {
+ pixman_f_transform_init_rotate (&t, c, -s);
+ pixman_f_transform_multiply (reverse, reverse, &t);
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT void
+pixman_f_transform_init_translate (struct pixman_f_transform *t, double tx, double ty)
+{
+ t->m[0][0] = 1; t->m[0][1] = 0; t->m[0][2] = tx;
+ t->m[1][0] = 0; t->m[1][1] = 1; t->m[1][2] = ty;
+ t->m[2][0] = 0; t->m[2][1] = 0; t->m[2][2] = 1;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_f_transform_translate (struct pixman_f_transform *forward,
+ struct pixman_f_transform *reverse,
+ double tx, double ty)
+{
+ struct pixman_f_transform t;
+
+ if (forward) {
+ pixman_f_transform_init_translate (&t, tx, ty);
+ pixman_f_transform_multiply (forward, &t, forward);
+ }
+ if (reverse) {
+ pixman_f_transform_init_translate (&t, -tx, -ty);
+ pixman_f_transform_multiply (reverse, reverse, &t);
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_f_transform_bounds(const struct pixman_f_transform *t, struct pixman_box16 *b)
+{
+ struct pixman_f_vector v[4];
+ int i;
+ int x1, y1, x2, y2;
+
+ v[0].v[0] = b->x1; v[0].v[1] = b->y1; v[0].v[2] = 1;
+ v[1].v[0] = b->x2; v[1].v[1] = b->y1; v[1].v[2] = 1;
+ v[2].v[0] = b->x2; v[2].v[1] = b->y2; v[2].v[2] = 1;
+ v[3].v[0] = b->x1; v[3].v[1] = b->y2; v[3].v[2] = 1;
+ for (i = 0; i < 4; i++)
+ {
+ if (!pixman_f_transform_point (t, &v[i]))
+ return FALSE;
+ x1 = floor (v[i].v[0]);
+ y1 = floor (v[i].v[1]);
+ x2 = ceil (v[i].v[0]);
+ y2 = ceil (v[i].v[1]);
+ if (i == 0)
+ {
+ b->x1 = x1; b->y1 = y1;
+ b->x2 = x2; b->y2 = y2;
+ }
+ else
+ {
+ if (x1 < b->x1) b->x1 = x1;
+ if (y1 < b->y1) b->y1 = y1;
+ if (x2 > b->x2) b->x2 = x2;
+ if (y2 > b->y2) b->y2 = y2;
+ }
+ }
+ return TRUE;
+}
+
+PIXMAN_EXPORT void
+pixman_f_transform_init_identity (struct pixman_f_transform *t)
+{
+ int i, j;
+
+ for (j = 0; j < 3; j++)
+ for (i = 0; i < 3; i++)
+ t->m[j][i] = i == j ? 1 : 0;
+}
diff --git a/lib/pixman/pixman/pixman-mmx.c b/lib/pixman/pixman/pixman-mmx.c
index a856fe4ef..db87b1987 100644
--- a/lib/pixman/pixman/pixman-mmx.c
+++ b/lib/pixman/pixman/pixman-mmx.c
@@ -36,13 +36,7 @@
#ifdef USE_MMX
#include <mmintrin.h>
-
-#include "pixman-mmx.h"
-
-#undef READ
-#undef WRITE
-#define READ(img,x) *(x)
-#define WRITE(img,ptr,v) (*(ptr) = (v));
+#include "pixman-private.h"
#define noVERBOSE
@@ -71,15 +65,19 @@
* possible.
*/
-/* --------------- MMX primitivess ------------------------------------ */
+/* --------------- MMX primitives ------------------------------------- */
#ifdef __GNUC__
-typedef unsigned long long ullong;
-typedef ullong mmxdatafield;
-#endif
-#ifdef _MSC_VER
-typedef unsigned __int64 ullong;
+typedef uint64_t mmxdatafield;
+#else
typedef __m64 mmxdatafield;
+/* If __m64 is defined as a struct or union, define M64_MEMBER to be the
+ name of the member used to access the data */
+# ifdef _MSC_VER
+# define M64_MEMBER m64_u64
+# elif defined(__SUNPRO_C)
+# define M64_MEMBER l_
+# endif
#endif
typedef struct
@@ -101,42 +99,31 @@ typedef struct
mmxdatafield mmx_000000000000ffff;
} MMXData;
+#if defined(_MSC_VER)
+# define MMXDATA_INIT(field, val) { val##UI64 }
+#elif defined(M64_MEMBER) /* __m64 is a struct, not an integral type */
+# define MMXDATA_INIT(field, val) field = { val##ULL }
+#else /* __m64 is an integral type */
+# define MMXDATA_INIT(field, val) field = val##ULL
+#endif
+
static const MMXData c =
{
-#ifdef __GNUC__
- .mmx_4x00ff = 0x00ff00ff00ff00ffULL,
- .mmx_4x0080 = 0x0080008000800080ULL,
- .mmx_565_rgb = 0x000001f0003f001fULL,
- .mmx_565_unpack_multiplier = 0x0000008404100840ULL,
- .mmx_565_r = 0x000000f800000000ULL,
- .mmx_565_g = 0x0000000000fc0000ULL,
- .mmx_565_b = 0x00000000000000f8ULL,
- .mmx_mask_0 = 0xffffffffffff0000ULL,
- .mmx_mask_1 = 0xffffffff0000ffffULL,
- .mmx_mask_2 = 0xffff0000ffffffffULL,
- .mmx_mask_3 = 0x0000ffffffffffffULL,
- .mmx_full_alpha = 0x00ff000000000000ULL,
- .mmx_ffff0000ffff0000 = 0xffff0000ffff0000ULL,
- .mmx_0000ffff00000000 = 0x0000ffff00000000ULL,
- .mmx_000000000000ffff = 0x000000000000ffffULL,
-#endif
-#ifdef _MSC_VER
- { 0x00ff00ff00ff00ffUI64 },
- { 0x0080008000800080UI64 },
- { 0x000001f0003f001fUI64 },
- { 0x0000008404100840UI64 },
- { 0x000000f800000000UI64 },
- { 0x0000000000fc0000UI64 },
- { 0x00000000000000f8UI64 },
- { 0xffffffffffff0000UI64 },
- { 0xffffffff0000ffffUI64 },
- { 0xffff0000ffffffffUI64 },
- { 0x0000ffffffffffffUI64 },
- { 0x00ff000000000000UI64 },
- { 0xffff0000ffff0000UI64 },
- { 0x0000ffff00000000UI64 },
- { 0x000000000000ffffUI64 },
-#endif
+ MMXDATA_INIT(.mmx_4x00ff, 0x00ff00ff00ff00ff),
+ MMXDATA_INIT(.mmx_4x0080, 0x0080008000800080),
+ MMXDATA_INIT(.mmx_565_rgb, 0x000001f0003f001f),
+ MMXDATA_INIT(.mmx_565_unpack_multiplier, 0x0000008404100840),
+ MMXDATA_INIT(.mmx_565_r, 0x000000f800000000),
+ MMXDATA_INIT(.mmx_565_g, 0x0000000000fc0000),
+ MMXDATA_INIT(.mmx_565_b, 0x00000000000000f8),
+ MMXDATA_INIT(.mmx_mask_0, 0xffffffffffff0000),
+ MMXDATA_INIT(.mmx_mask_1, 0xffffffff0000ffff),
+ MMXDATA_INIT(.mmx_mask_2, 0xffff0000ffffffff),
+ MMXDATA_INIT(.mmx_mask_3, 0x0000ffffffffffff),
+ MMXDATA_INIT(.mmx_full_alpha, 0x00ff000000000000),
+ MMXDATA_INIT(.mmx_ffff0000ffff0000, 0xffff0000ffff0000),
+ MMXDATA_INIT(.mmx_0000ffff00000000, 0x0000ffff00000000),
+ MMXDATA_INIT(.mmx_000000000000ffff, 0x000000000000ffff),
};
#ifdef __GNUC__
@@ -145,50 +132,39 @@ static const MMXData c =
# else
# define MC(x) ((__m64)c.mmx_##x)
# endif
-# define inline __inline__ __attribute__ ((__always_inline__))
-#endif
-
-#ifdef _MSC_VER
+#else
# define MC(x) c.mmx_##x
-# undef inline
-# define inline __forceinline
#endif
-static inline __m64
-M64 (ullong x)
+static force_inline __m64
+M64 (uint64_t x)
{
#ifdef __ICC
return _mm_cvtsi64_m64 (x);
-#elif defined (__GNUC__)
- return (__m64)x;
-#endif
-
-#ifdef _MSC_VER
+#elif defined M64_MEMBER /* __m64 is a struct, not an integral type */
__m64 res;
- res.m64_u64 = x;
+ res.M64_MEMBER = x;
return res;
+#else /* __m64 is an integral type */
+ return (__m64)x;
#endif
}
-static inline ullong
-ULLONG (__m64 x)
+static force_inline uint64_t
+UINT64 (__m64 x)
{
#ifdef __ICC
return _mm_cvtm64_si64 (x);
-#elif defined (__GNUC__)
- return (ullong)x;
-#endif
-
-#ifdef _MSC_VER
- ullong res;
-
- res = x.m64_u64;
+#elif defined M64_MEMBER /* __m64 is a struct, not an integral type */
+ uint64_t res = x.M64_MEMBER;
return res;
+#else /* __m64 is an integral type */
+ return (uint64_t)x;
#endif
}
-static inline __m64
+static force_inline __m64
shift (__m64 v, int s)
{
if (s > 0)
@@ -199,13 +175,13 @@ shift (__m64 v, int s)
return v;
}
-static inline __m64
+static force_inline __m64
negate (__m64 mask)
{
return _mm_xor_si64 (mask, MC(4x00ff));
}
-static inline __m64
+static force_inline __m64
pix_multiply (__m64 a, __m64 b)
{
__m64 res;
@@ -218,13 +194,13 @@ pix_multiply (__m64 a, __m64 b)
return res;
}
-static inline __m64
+static force_inline __m64
pix_add (__m64 a, __m64 b)
{
return _mm_adds_pu8 (a, b);
}
-static inline __m64
+static force_inline __m64
expand_alpha (__m64 pixel)
{
__m64 t1, t2;
@@ -238,7 +214,7 @@ expand_alpha (__m64 pixel)
return t1;
}
-static inline __m64
+static force_inline __m64
expand_alpha_rev (__m64 pixel)
{
__m64 t1, t2;
@@ -255,7 +231,7 @@ expand_alpha_rev (__m64 pixel)
return t1;
}
-static inline __m64
+static force_inline __m64
invert_colors (__m64 pixel)
{
__m64 x, y, z;
@@ -275,13 +251,13 @@ invert_colors (__m64 pixel)
return x;
}
-static inline __m64
+static force_inline __m64
over (__m64 src, __m64 srca, __m64 dest)
{
return _mm_adds_pu8 (src, pix_multiply(dest, negate(srca)));
}
-static inline __m64
+static force_inline __m64
over_rev_non_pre (__m64 src, __m64 dest)
{
__m64 srca = expand_alpha (src);
@@ -290,14 +266,14 @@ over_rev_non_pre (__m64 src, __m64 dest)
return over(pix_multiply(invert_colors(src), srcfaaa), srca, dest);
}
-static inline __m64
+static force_inline __m64
in (__m64 src,
__m64 mask)
{
return pix_multiply (src, mask);
}
-static inline __m64
+static force_inline __m64
in_over_full_src_alpha (__m64 src, __m64 mask, __m64 dest)
{
src = _mm_or_si64 (src, MC(full_alpha));
@@ -306,7 +282,7 @@ in_over_full_src_alpha (__m64 src, __m64 mask, __m64 dest)
}
#ifndef _MSC_VER
-static inline __m64
+static force_inline __m64
in_over (__m64 src,
__m64 srca,
__m64 mask,
@@ -318,19 +294,19 @@ in_over (__m64 src,
#define in_over(src, srca, mask, dest) over(in(src, mask), pix_multiply(srca, mask), dest)
#endif
-static inline __m64
+static force_inline __m64
load8888 (uint32_t v)
{
return _mm_unpacklo_pi8 (_mm_cvtsi32_si64 (v), _mm_setzero_si64());
}
-static inline __m64
+static force_inline __m64
pack8888 (__m64 lo, __m64 hi)
{
return _mm_packs_pu16 (lo, hi);
}
-static inline uint32_t
+static force_inline uint32_t
store8888 (__m64 v)
{
return _mm_cvtsi64_si32(pack8888(v, _mm_setzero_si64()));
@@ -350,7 +326,7 @@ store8888 (__m64 v)
* Note the trick here - the top word is shifted by another nibble to
* avoid it bumping into the middle word
*/
-static inline __m64
+static force_inline __m64
expand565 (__m64 pixel, int pos)
{
__m64 p = pixel;
@@ -370,7 +346,7 @@ expand565 (__m64 pixel, int pos)
return _mm_srli_pi16 (pixel, 8);
}
-static inline __m64
+static force_inline __m64
expand8888 (__m64 in, int pos)
{
if (pos == 0)
@@ -379,13 +355,13 @@ expand8888 (__m64 in, int pos)
return _mm_unpackhi_pi8 (in, _mm_setzero_si64());
}
-static inline __m64
+static force_inline __m64
expandx888 (__m64 in, int pos)
{
return _mm_or_si64 (expand8888 (in, pos), MC(full_alpha));
}
-static inline __m64
+static force_inline __m64
pack565 (__m64 pixel, __m64 target, int pos)
{
__m64 p = pixel;
@@ -416,7 +392,7 @@ pack565 (__m64 pixel, __m64 target, int pos)
}
#ifndef _MSC_VER
-static inline __m64
+static force_inline __m64
pix_add_mul (__m64 x, __m64 a, __m64 y, __m64 b)
{
x = _mm_mullo_pi16 (x, a);
@@ -440,40 +416,37 @@ pix_add_mul (__m64 x, __m64 a, __m64 y, __m64 b)
/* --------------- MMX code patch for fbcompose.c --------------------- */
-static FASTCALL void
-mmxCombineMaskU (uint32_t *src, const uint32_t *mask, int width)
-{
- const uint32_t *end = mask + width;
- while (mask < end) {
- uint32_t mmask = *mask;
- uint32_t maska = mmask >> 24;
- if (maska == 0) {
- *src = 0;
- } else if (maska != 0xff) {
- __m64 a = load8888(mmask);
- __m64 s = load8888(*src);
- a = expand_alpha(a);
- s = pix_multiply(s, a);
- *src = store8888(s);
- }
- ++src;
- ++mask;
+static force_inline uint32_t
+combine (const uint32_t *src, const uint32_t *mask)
+{
+ uint32_t ssrc = *src;
+
+ if (mask)
+ {
+ __m64 m = load8888 (*mask);
+ __m64 s = load8888 (ssrc);
+
+ m = expand_alpha (m);
+ s = pix_multiply (s, m);
+
+ ssrc = store8888 (s);
}
- _mm_empty();
-}
+ return ssrc;
+}
static FASTCALL void
-mmxCombineOverU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineOverU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
- uint32_t ssrc = *src;
+ uint32_t ssrc = combine (src, mask);
uint32_t a = ssrc >> 24;
if (a == 0xff) {
*dest = ssrc;
- } else if (a) {
+ } else if (ssrc) {
__m64 s, sa;
s = load8888(ssrc);
sa = expand_alpha(s);
@@ -481,70 +454,83 @@ mmxCombineOverU (uint32_t *dest, const uint32_t *src, int width)
}
++dest;
++src;
+ if (mask)
+ ++mask;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineOverReverseU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineOverReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
__m64 d, da;
+ uint32_t s = combine (src, mask);
d = load8888(*dest);
da = expand_alpha(d);
- *dest = store8888(over (d, da, load8888(*src)));
+ *dest = store8888(over (d, da, load8888(s)));
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineInU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineInU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
__m64 x, a;
- x = load8888(*src);
+ x = load8888 (combine (src, mask));
a = load8888(*dest);
a = expand_alpha(a);
x = pix_multiply(x, a);
*dest = store8888(x);
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineInReverseU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineInReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
__m64 x, a;
x = load8888(*dest);
- a = load8888(*src);
+ a = load8888(combine (src, mask));
a = expand_alpha(a);
x = pix_multiply(x, a);
*dest = store8888(x);
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineOutU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineOutU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
__m64 x, a;
- x = load8888(*src);
+ x = load8888(combine (src, mask));
a = load8888(*dest);
a = expand_alpha(a);
a = negate(a);
@@ -552,37 +538,43 @@ mmxCombineOutU (uint32_t *dest, const uint32_t *src, int width)
*dest = store8888(x);
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineOutReverseU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineOutReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
__m64 x, a;
x = load8888(*dest);
- a = load8888(*src);
+ a = load8888(combine (src, mask));
a = expand_alpha(a);
a = negate(a);
x = pix_multiply(x, a);
*dest = store8888(x);
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineAtopU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineAtopU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
__m64 s, da, d, sia;
- s = load8888(*src);
+ s = load8888(combine (src, mask));
d = load8888(*dest);
sia = expand_alpha(s);
sia = negate(sia);
@@ -591,12 +583,15 @@ mmxCombineAtopU (uint32_t *dest, const uint32_t *src, int width)
*dest = store8888(s);
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineAtopReverseU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end;
@@ -604,7 +599,7 @@ mmxCombineAtopReverseU (uint32_t *dest, const uint32_t *src, int width)
while (dest < end) {
__m64 s, dia, d, sa;
- s = load8888(*src);
+ s = load8888(combine(src, mask));
d = load8888(*dest);
sa = expand_alpha(s);
dia = expand_alpha(d);
@@ -613,18 +608,21 @@ mmxCombineAtopReverseU (uint32_t *dest, const uint32_t *src, int width)
*dest = store8888(s);
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineXorU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineXorU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
__m64 s, dia, d, sia;
- s = load8888(*src);
+ s = load8888(combine(src, mask));
d = load8888(*dest);
sia = expand_alpha(s);
dia = expand_alpha(d);
@@ -634,32 +632,38 @@ mmxCombineXorU (uint32_t *dest, const uint32_t *src, int width)
*dest = store8888(s);
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineAddU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineAddU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
__m64 s, d;
- s = load8888(*src);
+ s = load8888(combine(src,mask));
d = load8888(*dest);
s = pix_add(s, d);
*dest = store8888(s);
++dest;
++src;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineSaturateU (uint32_t *dest, const uint32_t *src, int width)
+mmxCombineSaturateU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = dest + width;
while (dest < end) {
- uint32_t s = *src;
+ uint32_t s = combine(src,mask);
uint32_t d = *dest;
__m64 ms = load8888(s);
__m64 md = load8888(d);
@@ -675,13 +679,16 @@ mmxCombineSaturateU (uint32_t *dest, const uint32_t *src, int width)
*dest = store8888(md);
++src;
++dest;
+ if (mask)
+ mask++;
}
_mm_empty();
}
static FASTCALL void
-mmxCombineSrcC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineSrcC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -697,7 +704,8 @@ mmxCombineSrcC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-mmxCombineOverC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineOverC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -716,7 +724,8 @@ mmxCombineOverC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-mmxCombineOverReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -736,7 +745,8 @@ mmxCombineOverReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width
static FASTCALL void
-mmxCombineInC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineInC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -755,7 +765,8 @@ mmxCombineInC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-mmxCombineInReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineInReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -774,7 +785,8 @@ mmxCombineInReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-mmxCombineOutC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineOutC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -794,7 +806,8 @@ mmxCombineOutC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-mmxCombineOutReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -814,7 +827,8 @@ mmxCombineOutReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-mmxCombineAtopC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineAtopC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -836,7 +850,8 @@ mmxCombineAtopC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-mmxCombineAtopReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -858,7 +873,8 @@ mmxCombineAtopReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width
}
static FASTCALL void
-mmxCombineXorC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineXorC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -881,7 +897,8 @@ mmxCombineXorC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-mmxCombineAddC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+mmxCombineAddC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
const uint32_t *end = src + width;
while (src < end) {
@@ -898,63 +915,22 @@ mmxCombineAddC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
_mm_empty();
}
-void
-fbComposeSetupMMX(void)
-{
- static pixman_bool_t initialized = FALSE;
-
- if (initialized)
- return;
-
- /* check if we have MMX support and initialize accordingly */
- if (pixman_have_mmx())
- {
- pixman_composeFunctions.combineU[PIXMAN_OP_OVER] = mmxCombineOverU;
- pixman_composeFunctions.combineU[PIXMAN_OP_OVER_REVERSE] = mmxCombineOverReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_IN] = mmxCombineInU;
- pixman_composeFunctions.combineU[PIXMAN_OP_IN_REVERSE] = mmxCombineInReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_OUT] = mmxCombineOutU;
- pixman_composeFunctions.combineU[PIXMAN_OP_OUT_REVERSE] = mmxCombineOutReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ATOP] = mmxCombineAtopU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ATOP_REVERSE] = mmxCombineAtopReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_XOR] = mmxCombineXorU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ADD] = mmxCombineAddU;
- pixman_composeFunctions.combineU[PIXMAN_OP_SATURATE] = mmxCombineSaturateU;
-
- pixman_composeFunctions.combineC[PIXMAN_OP_SRC] = mmxCombineSrcC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OVER] = mmxCombineOverC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OVER_REVERSE] = mmxCombineOverReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_IN] = mmxCombineInC;
- pixman_composeFunctions.combineC[PIXMAN_OP_IN_REVERSE] = mmxCombineInReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OUT] = mmxCombineOutC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OUT_REVERSE] = mmxCombineOutReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ATOP] = mmxCombineAtopC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ATOP_REVERSE] = mmxCombineAtopReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_XOR] = mmxCombineXorC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ADD] = mmxCombineAddC;
-
- pixman_composeFunctions.combineMaskU = mmxCombineMaskU;
- }
-
- initialized = TRUE;
-}
-
-
/* ------------------ MMX code paths called from fbpict.c ----------------------- */
-void
-fbCompositeSolid_nx8888mmx (pixman_op_t op,
+static void
+fbCompositeSolid_nx8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src;
uint32_t *dstLine, *dst;
@@ -1020,19 +996,20 @@ fbCompositeSolid_nx8888mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSolid_nx0565mmx (pixman_op_t op,
+static void
+fbCompositeSolid_nx0565mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src;
uint16_t *dstLine, *dst;
@@ -1062,10 +1039,10 @@ fbCompositeSolid_nx0565mmx (pixman_op_t op,
while (w && (unsigned long)dst & 7)
{
- ullong d = *dst;
+ uint64_t d = *dst;
__m64 vdest = expand565 (M64(d), 0);
vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0);
- *dst = ULLONG(vdest);
+ *dst = UINT64(vdest);
w--;
dst++;
@@ -1092,10 +1069,10 @@ fbCompositeSolid_nx0565mmx (pixman_op_t op,
while (w)
{
- ullong d = *dst;
+ uint64_t d = *dst;
__m64 vdest = expand565 (M64(d), 0);
vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0);
- *dst = ULLONG(vdest);
+ *dst = UINT64(vdest);
w--;
dst++;
@@ -1105,19 +1082,20 @@ fbCompositeSolid_nx0565mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSolidMask_nx8888x8888Cmmx (pixman_op_t op,
+static void
+fbCompositeSolidMask_nx8888x8888Cmmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src, srca;
uint32_t *dstLine;
@@ -1208,19 +1186,20 @@ fbCompositeSolidMask_nx8888x8888Cmmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSrc_8888x8x8888mmx (pixman_op_t op,
+static void
+fbCompositeSrc_8888x8x8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -1292,19 +1271,20 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSrc_x888xnx8888mmx (pixman_op_t op,
+static void
+fbCompositeSrc_x888xnx8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -1426,19 +1406,20 @@ fbCompositeSrc_x888xnx8888mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSrc_8888x8888mmx (pixman_op_t op,
+static void
+fbCompositeSrc_8888x8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -1466,7 +1447,7 @@ fbCompositeSrc_8888x8888mmx (pixman_op_t op,
a = s >> 24;
if (a == 0xff)
*dst = s;
- else if (a) {
+ else if (s) {
__m64 ms, sa;
ms = load8888(s);
sa = expand_alpha(ms);
@@ -1478,19 +1459,20 @@ fbCompositeSrc_8888x8888mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSrc_8888x0565mmx (pixman_op_t op,
+static void
+fbCompositeSrc_8888x0565mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint16_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -1520,12 +1502,12 @@ fbCompositeSrc_8888x0565mmx (pixman_op_t op,
while (w && (unsigned long)dst & 7)
{
__m64 vsrc = load8888 (*src);
- ullong d = *dst;
+ uint64_t d = *dst;
__m64 vdest = expand565 (M64(d), 0);
vdest = pack565(over(vsrc, expand_alpha(vsrc), vdest), vdest, 0);
- *dst = ULLONG(vdest);
+ *dst = UINT64(vdest);
w--;
dst++;
@@ -1563,12 +1545,12 @@ fbCompositeSrc_8888x0565mmx (pixman_op_t op,
while (w)
{
__m64 vsrc = load8888 (*src);
- ullong d = *dst;
+ uint64_t d = *dst;
__m64 vdest = expand565 (M64(d), 0);
vdest = pack565(over(vsrc, expand_alpha(vsrc), vdest), vdest, 0);
- *dst = ULLONG(vdest);
+ *dst = UINT64(vdest);
w--;
dst++;
@@ -1579,19 +1561,20 @@ fbCompositeSrc_8888x0565mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
+static void
+fbCompositeSolidMask_nx8x8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src, srca;
uint32_t *dstLine, *dst;
@@ -1599,7 +1582,7 @@ fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
int dstStride, maskStride;
uint16_t w;
__m64 vsrc, vsrca;
- ullong srcsrc;
+ uint64_t srcsrc;
CHECKPOINT();
@@ -1609,7 +1592,7 @@ fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
if (srca == 0)
return;
- srcsrc = (ullong)src << 32 | src;
+ srcsrc = (uint64_t)src << 32 | src;
fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
@@ -1629,7 +1612,7 @@ fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
while (w && (unsigned long)dst & 7)
{
- ullong m = *mask;
+ uint64_t m = *mask;
if (m)
{
@@ -1646,13 +1629,13 @@ fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
while (w >= 2)
{
- ullong m0, m1;
+ uint64_t m0, m1;
m0 = *mask;
m1 = *(mask + 1);
if (srca == 0xff && (m0 & m1) == 0xff)
{
- *(ullong *)dst = srcsrc;
+ *(uint64_t *)dst = srcsrc;
}
else if (m0 | m1)
{
@@ -1676,7 +1659,7 @@ fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
while (w)
{
- ullong m = *mask;
+ uint64_t m = *mask;
if (m)
{
@@ -1704,7 +1687,7 @@ pixman_fill_mmx (uint32_t *bits,
int height,
uint32_t xor)
{
- ullong fill;
+ uint64_t fill;
__m64 vfill;
uint32_t byte_width;
uint8_t *byte_line;
@@ -1747,7 +1730,7 @@ pixman_fill_mmx (uint32_t *bits,
stride *= 4;
}
- fill = ((ullong)xor << 32) | xor;
+ fill = ((uint64_t)xor << 32) | xor;
vfill = M64(fill);
#ifdef __GNUC__
@@ -1850,19 +1833,20 @@ pixman_fill_mmx (uint32_t *bits,
return TRUE;
}
-void
-fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
+static void
+fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src, srca;
uint32_t *dstLine, *dst;
@@ -1870,7 +1854,7 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
int dstStride, maskStride;
uint16_t w;
__m64 vsrc, vsrca;
- ullong srcsrc;
+ uint64_t srcsrc;
CHECKPOINT();
@@ -1884,7 +1868,7 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
return;
}
- srcsrc = (ullong)src << 32 | src;
+ srcsrc = (uint64_t)src << 32 | src;
fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
@@ -1904,7 +1888,7 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
while (w && (unsigned long)dst & 7)
{
- ullong m = *mask;
+ uint64_t m = *mask;
if (m)
{
@@ -1925,13 +1909,13 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
while (w >= 2)
{
- ullong m0, m1;
+ uint64_t m0, m1;
m0 = *mask;
m1 = *(mask + 1);
if (srca == 0xff && (m0 & m1) == 0xff)
{
- *(ullong *)dst = srcsrc;
+ *(uint64_t *)dst = srcsrc;
}
else if (m0 | m1)
{
@@ -1947,7 +1931,7 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
}
else
{
- *(ullong *)dst = 0;
+ *(uint64_t *)dst = 0;
}
mask += 2;
@@ -1959,7 +1943,7 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
while (w)
{
- ullong m = *mask;
+ uint64_t m = *mask;
if (m)
{
@@ -1981,19 +1965,20 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
+static void
+fbCompositeSolidMask_nx8x0565mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src, srca;
uint16_t *dstLine, *dst;
@@ -2001,7 +1986,7 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
int dstStride, maskStride;
uint16_t w;
__m64 vsrc, vsrca, tmp;
- ullong srcsrcsrcsrc, src16;
+ uint64_t srcsrcsrcsrc, src16;
CHECKPOINT();
@@ -2018,10 +2003,10 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
vsrca = expand_alpha (vsrc);
tmp = pack565(vsrc, _mm_setzero_si64(), 0);
- src16 = ULLONG(tmp);
+ src16 = UINT64(tmp);
- srcsrcsrcsrc = (ullong)src16 << 48 | (ullong)src16 << 32 |
- (ullong)src16 << 16 | (ullong)src16;
+ srcsrcsrcsrc = (uint64_t)src16 << 48 | (uint64_t)src16 << 32 |
+ (uint64_t)src16 << 16 | (uint64_t)src16;
while (height--)
{
@@ -2035,15 +2020,15 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
while (w && (unsigned long)dst & 7)
{
- ullong m = *mask;
+ uint64_t m = *mask;
if (m)
{
- ullong d = *dst;
+ uint64_t d = *dst;
__m64 vd = M64(d);
__m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev (M64 (m)), expand565(vd, 0));
vd = pack565(vdest, _mm_setzero_si64(), 0);
- *dst = ULLONG(vd);
+ *dst = UINT64(vd);
}
w--;
@@ -2055,7 +2040,7 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
while (w >= 4)
{
- ullong m0, m1, m2, m3;
+ uint64_t m0, m1, m2, m3;
m0 = *mask;
m1 = *(mask + 1);
m2 = *(mask + 2);
@@ -2063,7 +2048,7 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
if (srca == 0xff && (m0 & m1 & m2 & m3) == 0xff)
{
- *(ullong *)dst = srcsrcsrcsrc;
+ *(uint64_t *)dst = srcsrcsrcsrc;
}
else if (m0 | m1 | m2 | m3)
{
@@ -2093,15 +2078,15 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
while (w)
{
- ullong m = *mask;
+ uint64_t m = *mask;
if (m)
{
- ullong d = *dst;
+ uint64_t d = *dst;
__m64 vd = M64(d);
__m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev (M64(m)), expand565(vd, 0));
vd = pack565(vdest, _mm_setzero_si64(), 0);
- *dst = ULLONG(vd);
+ *dst = UINT64(vd);
}
w--;
@@ -2113,19 +2098,20 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSrc_8888RevNPx0565mmx (pixman_op_t op,
+static void
+fbCompositeSrc_8888RevNPx0565mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint16_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -2155,12 +2141,12 @@ fbCompositeSrc_8888RevNPx0565mmx (pixman_op_t op,
while (w && (unsigned long)dst & 7)
{
__m64 vsrc = load8888 (*src);
- ullong d = *dst;
+ uint64_t d = *dst;
__m64 vdest = expand565 (M64(d), 0);
vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0);
- *dst = ULLONG(vdest);
+ *dst = UINT64(vdest);
w--;
dst++;
@@ -2194,7 +2180,7 @@ fbCompositeSrc_8888RevNPx0565mmx (pixman_op_t op,
*(__m64 *)dst = vdest;
}
- else if (a0 | a1 | a2 | a3)
+ else if (s0 | s1 | s2 | s3)
{
__m64 vdest = *(__m64 *)dst;
@@ -2216,12 +2202,12 @@ fbCompositeSrc_8888RevNPx0565mmx (pixman_op_t op,
while (w)
{
__m64 vsrc = load8888 (*src);
- ullong d = *dst;
+ uint64_t d = *dst;
__m64 vdest = expand565 (M64(d), 0);
vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0);
- *dst = ULLONG(vdest);
+ *dst = UINT64(vdest);
w--;
dst++;
@@ -2234,19 +2220,20 @@ fbCompositeSrc_8888RevNPx0565mmx (pixman_op_t op,
/* "8888RevNP" is GdkPixbuf's format: ABGR, non premultiplied */
-void
-fbCompositeSrc_8888RevNPx8888mmx (pixman_op_t op,
+static void
+fbCompositeSrc_8888RevNPx8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -2285,7 +2272,7 @@ fbCompositeSrc_8888RevNPx8888mmx (pixman_op_t op,
while (w >= 2)
{
- ullong s0, s1;
+ uint64_t s0, s1;
unsigned char a0, a1;
__m64 d0, d1;
@@ -2302,7 +2289,7 @@ fbCompositeSrc_8888RevNPx8888mmx (pixman_op_t op,
*(__m64 *)dst = pack8888 (d0, d1);
}
- else if (a0 | a1)
+ else if (s0 | s1)
{
__m64 vdest = *(__m64 *)dst;
@@ -2333,19 +2320,20 @@ fbCompositeSrc_8888RevNPx8888mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSolidMask_nx8888x0565Cmmx (pixman_op_t op,
+static void
+fbCompositeSolidMask_nx8888x0565Cmmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src, srca;
uint16_t *dstLine;
@@ -2379,10 +2367,10 @@ fbCompositeSolidMask_nx8888x0565Cmmx (pixman_op_t op,
if (m)
{
- ullong d = *q;
+ uint64_t d = *q;
__m64 vdest = expand565 (M64(d), 0);
vdest = pack565 (in_over (vsrc, vsrca, load8888 (m), vdest), vdest, 0);
- *q = ULLONG(vdest);
+ *q = UINT64(vdest);
}
twidth--;
@@ -2422,10 +2410,10 @@ fbCompositeSolidMask_nx8888x0565Cmmx (pixman_op_t op,
m = *(uint32_t *)p;
if (m)
{
- ullong d = *q;
+ uint64_t d = *q;
__m64 vdest = expand565(M64(d), 0);
vdest = pack565 (in_over(vsrc, vsrca, load8888(m), vdest), vdest, 0);
- *q = ULLONG(vdest);
+ *q = UINT64(vdest);
}
twidth--;
@@ -2440,19 +2428,20 @@ fbCompositeSolidMask_nx8888x0565Cmmx (pixman_op_t op,
_mm_empty ();
}
-void
-fbCompositeIn_nx8x8mmx (pixman_op_t op,
+static void
+fbCompositeIn_nx8x8mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint8_t *dstLine, *dst;
uint8_t *maskLine, *mask;
@@ -2524,19 +2513,20 @@ fbCompositeIn_nx8x8mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeIn_8x8mmx (pixman_op_t op,
+static void
+fbCompositeIn_8x8mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint8_t *dstLine, *dst;
uint8_t *srcLine, *src;
@@ -2588,19 +2578,20 @@ fbCompositeIn_8x8mmx (pixman_op_t op,
_mm_empty ();
}
-void
-fbCompositeSrcAdd_8888x8x8mmx (pixman_op_t op,
+static void
+fbCompositeSrcAdd_8888x8x8mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint8_t *dstLine, *dst;
uint8_t *maskLine, *mask;
@@ -2666,19 +2657,20 @@ fbCompositeSrcAdd_8888x8x8mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSrcAdd_8000x8000mmx (pixman_op_t op,
+static void
+fbCompositeSrcAdd_8000x8000mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint8_t *dstLine, *dst;
uint8_t *srcLine, *src;
@@ -2738,19 +2730,20 @@ fbCompositeSrcAdd_8000x8000mmx (pixman_op_t op,
_mm_empty();
}
-void
-fbCompositeSrcAdd_8888x8888mmx (pixman_op_t op,
+static void
+fbCompositeSrcAdd_8888x8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
__m64 dst64;
uint32_t *dstLine, *dst;
@@ -2783,7 +2776,7 @@ fbCompositeSrcAdd_8888x8888mmx (pixman_op_t op,
while (w >= 2)
{
dst64 = _mm_adds_pu8(*(__m64*)src, *(__m64*)dst);
- *(ullong*)dst = ULLONG(dst64);
+ *(uint64_t*)dst = UINT64(dst64);
dst += 2;
src += 2;
w -= 2;
@@ -2800,7 +2793,7 @@ fbCompositeSrcAdd_8888x8888mmx (pixman_op_t op,
_mm_empty();
}
-pixman_bool_t
+static pixman_bool_t
pixman_blt_mmx (uint32_t *src_bits,
uint32_t *dst_bits,
int src_stride,
@@ -2867,7 +2860,7 @@ pixman_blt_mmx (uint32_t *src_bits,
while (w >= 64)
{
-#ifdef __GNUC__
+#if defined (__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
__asm__ (
"movq (%1), %%mm0\n"
"movq 8(%1), %%mm1\n"
@@ -2936,19 +2929,20 @@ pixman_blt_mmx (uint32_t *src_bits,
return TRUE;
}
-void
-fbCompositeCopyAreammx (pixman_op_t op,
+static void
+fbCompositeCopyAreammx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
pixman_blt_mmx (pSrc->bits.bits,
pDst->bits.bits,
@@ -2959,19 +2953,20 @@ fbCompositeCopyAreammx (pixman_op_t op,
xSrc, ySrc, xDst, yDst, width, height);
}
-void
-fbCompositeOver_x888x8x8888mmx (pixman_op_t op,
+static void
+fbCompositeOver_x888x8x8888mmx (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *src, *srcLine;
uint32_t *dst, *dstLine;
@@ -2996,7 +2991,7 @@ fbCompositeOver_x888x8x8888mmx (pixman_op_t op,
while (w--)
{
- ullong m = *mask;
+ uint64_t m = *mask;
if (m)
{
@@ -3023,6 +3018,194 @@ fbCompositeOver_x888x8x8888mmx (pixman_op_t op,
_mm_empty();
}
+static const FastPathInfo mmx_fast_paths[] =
+{
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8x0565mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8x0565mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8888x8888Cmmx, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8888x8888Cmmx, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8888x0565Cmmx, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8888x8888Cmmx, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8888x8888Cmmx, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8888x0565Cmmx, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSrc_8888RevNPx0565mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_r5g6b5, fbCompositeSrc_8888RevNPx0565mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_b5g6r5, fbCompositeSrc_8888RevNPx0565mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSrc_8888RevNPx0565mmx, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_x888xnx8888mmx, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_x888xnx8888mmx, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSrc_x888xnx8888mmx, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSrc_x888xnx8888mmx, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8x8888mmx, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8x8888mmx, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8x8888mmx, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8x8888mmx, NEED_SOLID_MASK },
+#if 0
+ /* FIXME: This code is commented out since it's apparently not actually faster than the generic code. */
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeOver_x888x8x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeOver_x888x8x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888mmx, 0 },
+#endif
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSolid_nx8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSolid_nx8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSolid_nx0565mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreammx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreammx, 0 },
+
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_8888x0565mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8888mmx, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_8888x0565mmx, 0 },
+
+ { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrcAdd_8888x8888mmx, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrcAdd_8888x8888mmx, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcAdd_8000x8000mmx, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSrcAdd_8888x8x8mmx, 0 },
+
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMaskSrc_nx8x8888mmx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMaskSrc_nx8x8888mmx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMaskSrc_nx8x8888mmx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMaskSrc_nx8x8888mmx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeCopyAreammx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeCopyAreammx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreammx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreammx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreammx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreammx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeCopyAreammx, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeCopyAreammx, 0 },
+
+ { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeIn_8x8mmx, 0 },
+ { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeIn_nx8x8mmx, 0 },
+
+ { PIXMAN_OP_NONE },
+};
+
+static void
+mmx_composite (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_image_t *dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ if (_pixman_run_fast_path (mmx_fast_paths, imp,
+ op, src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height))
+ return;
+ _pixman_implementation_composite (imp->delegate,
+ op, src, mask, dest, src_x, src_y,
+ mask_x, mask_y, dest_x, dest_y,
+ width, height);
+}
+
+static pixman_bool_t
+mmx_blt (pixman_implementation_t *imp,
+ uint32_t *src_bits,
+ uint32_t *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
+{
+ if (!pixman_blt_mmx (
+ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
+ src_x, src_y, dst_x, dst_y, width, height))
+
+ {
+ return _pixman_implementation_blt (
+ imp->delegate,
+ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
+ src_x, src_y, dst_x, dst_y, width, height);
+ }
+
+ return TRUE;
+}
+
+static pixman_bool_t
+mmx_fill (pixman_implementation_t *imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ if (!pixman_fill_mmx (bits, stride, bpp, x, y, width, height, xor))
+ {
+ return _pixman_implementation_fill (
+ imp->delegate, bits, stride, bpp, x, y, width, height, xor);
+ }
+
+ return TRUE;
+}
+
+pixman_implementation_t *
+_pixman_implementation_create_mmx (pixman_implementation_t *toplevel)
+{
+ pixman_implementation_t *general = _pixman_implementation_create_fast_path (NULL);
+ pixman_implementation_t *imp = _pixman_implementation_create (toplevel, general);
+
+ imp->combine_32[PIXMAN_OP_OVER] = mmxCombineOverU;
+ imp->combine_32[PIXMAN_OP_OVER_REVERSE] = mmxCombineOverReverseU;
+ imp->combine_32[PIXMAN_OP_IN] = mmxCombineInU;
+ imp->combine_32[PIXMAN_OP_IN_REVERSE] = mmxCombineInReverseU;
+ imp->combine_32[PIXMAN_OP_OUT] = mmxCombineOutU;
+ imp->combine_32[PIXMAN_OP_OUT_REVERSE] = mmxCombineOutReverseU;
+ imp->combine_32[PIXMAN_OP_ATOP] = mmxCombineAtopU;
+ imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = mmxCombineAtopReverseU;
+ imp->combine_32[PIXMAN_OP_XOR] = mmxCombineXorU;
+ imp->combine_32[PIXMAN_OP_ADD] = mmxCombineAddU;
+ imp->combine_32[PIXMAN_OP_SATURATE] = mmxCombineSaturateU;
+
+ imp->combine_32_ca[PIXMAN_OP_SRC] = mmxCombineSrcC;
+ imp->combine_32_ca[PIXMAN_OP_OVER] = mmxCombineOverC;
+ imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = mmxCombineOverReverseC;
+ imp->combine_32_ca[PIXMAN_OP_IN] = mmxCombineInC;
+ imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = mmxCombineInReverseC;
+ imp->combine_32_ca[PIXMAN_OP_OUT] = mmxCombineOutC;
+ imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = mmxCombineOutReverseC;
+ imp->combine_32_ca[PIXMAN_OP_ATOP] = mmxCombineAtopC;
+ imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = mmxCombineAtopReverseC;
+ imp->combine_32_ca[PIXMAN_OP_XOR] = mmxCombineXorC;
+ imp->combine_32_ca[PIXMAN_OP_ADD] = mmxCombineAddC;
+
+ imp->composite = mmx_composite;
+ imp->blt = mmx_blt;
+ imp->fill = mmx_fill;
+
+ return imp;
+}
#endif /* USE_MMX */
diff --git a/lib/pixman/pixman/pixman-mmx.h b/lib/pixman/pixman/pixman-mmx.h
deleted file mode 100644
index 611e1ad8b..000000000
--- a/lib/pixman/pixman/pixman-mmx.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright © 2004 Red Hat, Inc.
- * Copyright © 2005 Trolltech AS
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Red Hat not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. Red Hat makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Søren Sandmann (sandmann@redhat.com)
- * Lars Knoll (lars@trolltech.com)
- *
- * Based on work by Owen Taylor
- */
-#ifndef _PIXMAN_MMX_H_
-#define _PIXMAN_MMX_H_
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "pixman-private.h"
-
-#ifdef USE_MMX
-
-#if !defined(__amd64__) && !defined(__x86_64__)
-pixman_bool_t pixman_have_mmx(void);
-#else
-#define pixman_have_mmx() TRUE
-#endif
-
-#else
-#define pixman_have_mmx() FALSE
-#endif
-
-#ifdef USE_MMX
-
-pixman_bool_t
-pixman_blt_mmx (uint32_t *src_bits,
- uint32_t *dst_bits,
- int src_stride,
- int dst_stride,
- int src_bpp,
- int dst_bpp,
- int src_x, int src_y,
- int dst_x, int dst_y,
- int width, int height);
-pixman_bool_t
-pixman_fill_mmx (uint32_t *bits,
- int stride,
- int bpp,
- int x,
- int y,
- int width,
- int height,
- uint32_t xor);
-
-void fbComposeSetupMMX(void);
-
-void fbCompositeSolidMask_nx8888x0565Cmmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSrcAdd_8888x8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSrc_8888x8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void
-fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void
-fbCompositeSrc_x888xnx8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSolidMask_nx8888x8888Cmmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeIn_nx8x8mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeIn_8x8mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSrcAdd_8888x8x8mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSrcAdd_8000x8000mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSrc_8888RevNPx8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSrc_8888x0565mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSrc_8888RevNPx0565mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSolid_nx8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSolid_nx0565mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeSrc_8888x8x8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void fbCompositeCopyAreammx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-void
-fbCompositeOver_x888x8x8888mmx (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-#endif /* USE_MMX */
-
-#endif /* _PIXMAN_MMX_H_ */
diff --git a/lib/pixman/pixman/pixman-pict.c b/lib/pixman/pixman/pixman-pict.c
index 193ea287c..17bd566e2 100644
--- a/lib/pixman/pixman/pixman-pict.c
+++ b/lib/pixman/pixman/pixman-pict.c
@@ -26,1608 +26,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include "pixman-private.h"
-#include "pixman-mmx.h"
-#include "pixman-vmx.h"
-#include "pixman-sse2.h"
-#include "pixman-combine32.h"
-
-#ifdef __GNUC__
-# define inline __inline__ __attribute__ ((__always_inline__))
-#endif
-
-#define FbFullMask(n) ((n) == 32 ? (uint32_t)-1 : ((((uint32_t) 1) << n) - 1))
-
-#undef READ
-#undef WRITE
-#define READ(img,x) (*(x))
-#define WRITE(img,ptr,v) ((*(ptr)) = (v))
-
-typedef void (* CompositeFunc) (pixman_op_t,
- pixman_image_t *, pixman_image_t *, pixman_image_t *,
- int16_t, int16_t, int16_t, int16_t, int16_t, int16_t,
- uint16_t, uint16_t);
-
-static inline uint32_t
-fbOver (uint32_t src, uint32_t dest)
-{
- // dest = (dest * (255 - alpha)) / 255 + src
- uint32_t a = ~src >> 24; // 255 - alpha == 255 + (~alpha + 1) == ~alpha
- FbByteMulAdd(dest, a, src);
-
- return dest;
-}
-
-static uint32_t
-fbOver24 (uint32_t x, uint32_t y)
-{
- uint16_t a = ~x >> 24;
- uint16_t t;
- uint32_t m,n,o;
-
- m = FbOverU(x,y,0,a,t);
- n = FbOverU(x,y,8,a,t);
- o = FbOverU(x,y,16,a,t);
- return m|n|o;
-}
-
-static uint32_t
-fbIn (uint32_t x, uint8_t y)
-{
- uint16_t a = y;
- uint16_t t;
- uint32_t m,n,o,p;
-
- m = FbInU(x,0,a,t);
- n = FbInU(x,8,a,t);
- o = FbInU(x,16,a,t);
- p = FbInU(x,24,a,t);
- return m|n|o|p;
-}
-
-/*
- * Naming convention:
- *
- * opSRCxMASKxDST
- */
-
-static void
-fbCompositeOver_x888x8x8888 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t *src, *srcLine;
- uint32_t *dst, *dstLine;
- uint8_t *mask, *maskLine;
- int srcStride, maskStride, dstStride;
- uint8_t m;
- uint32_t s, d;
- uint16_t w;
-
- fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
- fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
- fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
-
- while (height--)
- {
- src = srcLine;
- srcLine += srcStride;
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
-
- w = width;
- while (w--)
- {
- m = READ(pMask, mask++);
- if (m)
- {
- s = READ(pSrc, src) | 0xff000000;
-
- if (m == 0xff)
- WRITE(pDst, dst, s);
- else
- {
- d = fbIn (s, m);
- WRITE(pDst, dst, fbOver (d, READ(pDst, dst)));
- }
- }
- src++;
- dst++;
- }
- }
-}
-
-static void
-fbCompositeSolidMaskIn_nx8x8 (pixman_op_t op,
- pixman_image_t *iSrc,
- pixman_image_t *iMask,
- pixman_image_t *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t src, srca;
- uint8_t *dstLine, *dst, dstMask;
- uint8_t *maskLine, *mask, m;
- int dstStride, maskStride;
- uint16_t w;
- uint16_t t;
-
- fbComposeGetSolid(iSrc, src, iDst->bits.format);
-
- dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (iDst->bits.format));
- srca = src >> 24;
-
- fbComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
- fbComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
-
- if (srca == 0xff) {
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
- w = width;
-
- while (w--)
- {
- m = *mask++;
- if (m == 0)
- {
- *dst = 0;
- }
- else if (m != 0xff)
- {
- *dst = FbIntMult(m, *dst, t);
- }
- dst++;
- }
- }
- }
- else
- {
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
- w = width;
-
- while (w--)
- {
- m = *mask++;
- m = FbIntMult(m, srca, t);
- if (m == 0)
- {
- *dst = 0;
- }
- else if (m != 0xff)
- {
- *dst = FbIntMult(m, *dst, t);
- }
- dst++;
- }
- }
- }
-}
-
-
-static void
-fbCompositeSrcIn_8x8 (pixman_op_t op,
- pixman_image_t *iSrc,
- pixman_image_t *iMask,
- pixman_image_t *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint8_t *dstLine, *dst;
- uint8_t *srcLine, *src;
- int dstStride, srcStride;
- uint16_t w;
- uint8_t s;
- uint16_t t;
-
- fbComposeGetStart (iSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
- fbComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- src = srcLine;
- srcLine += srcStride;
- w = width;
-
- while (w--)
- {
- s = *src++;
- if (s == 0)
- {
- *dst = 0;
- }
- else if (s != 0xff)
- {
- *dst = FbIntMult(s, *dst, t);
- }
- dst++;
- }
- }
-}
-
-void
-fbCompositeSolidMask_nx8x8888 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t src, srca;
- uint32_t *dstLine, *dst, d, dstMask;
- uint8_t *maskLine, *mask, m;
- int dstStride, maskStride;
- uint16_t w;
-
- fbComposeGetSolid(pSrc, src, pDst->bits.format);
-
- dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
- srca = src >> 24;
- if (src == 0)
- return;
-
- fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
- fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
- w = width;
-
- while (w--)
- {
- m = READ(pMask, mask++);
- if (m == 0xff)
- {
- if (srca == 0xff)
- WRITE(pDst, dst, src & dstMask);
- else
- WRITE(pDst, dst, fbOver (src, READ(pDst, dst)) & dstMask);
- }
- else if (m)
- {
- d = fbIn (src, m);
- WRITE(pDst, dst, fbOver (d, READ(pDst, dst)) & dstMask);
- }
- dst++;
- }
- }
-}
-
-void
-fbCompositeSolidMask_nx8888x8888C (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t src, srca;
- uint32_t *dstLine, *dst, d, dstMask;
- uint32_t *maskLine, *mask, ma;
- int dstStride, maskStride;
- uint16_t w;
- uint32_t m, n, o, p;
-
- fbComposeGetSolid(pSrc, src, pDst->bits.format);
-
- dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
- srca = src >> 24;
- if (src == 0)
- return;
-
- fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
- fbComposeGetStart (pMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
- w = width;
-
- while (w--)
- {
- ma = READ(pMask, mask++);
- if (ma == 0xffffffff)
- {
- if (srca == 0xff)
- WRITE(pDst, dst, src & dstMask);
- else
- WRITE(pDst, dst, fbOver (src, READ(pDst, dst)) & dstMask);
- }
- else if (ma)
- {
- d = READ(pDst, dst);
-#define FbInOverC(src,srca,msk,dst,i,result) { \
- uint16_t __a = FbGet8(msk,i); \
- uint32_t __t, __ta; \
- uint32_t __i; \
- __t = FbIntMult (FbGet8(src,i), __a,__i); \
- __ta = (uint8_t) ~FbIntMult (srca, __a,__i); \
- __t = __t + FbIntMult(FbGet8(dst,i),__ta,__i); \
- __t = (uint32_t) (uint8_t) (__t | (-(__t >> 8))); \
- result = __t << (i); \
-}
- FbInOverC (src, srca, ma, d, 0, m);
- FbInOverC (src, srca, ma, d, 8, n);
- FbInOverC (src, srca, ma, d, 16, o);
- FbInOverC (src, srca, ma, d, 24, p);
- WRITE(pDst, dst, m|n|o|p);
- }
- dst++;
- }
- }
-}
-
-void
-fbCompositeSolidMask_nx8x0888 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t src, srca;
- uint8_t *dstLine, *dst;
- uint32_t d;
- uint8_t *maskLine, *mask, m;
- int dstStride, maskStride;
- uint16_t w;
-
- fbComposeGetSolid(pSrc, src, pDst->bits.format);
-
- srca = src >> 24;
- if (src == 0)
- return;
-
- fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
- fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
- w = width;
-
- while (w--)
- {
- m = READ(pMask, mask++);
- if (m == 0xff)
- {
- if (srca == 0xff)
- d = src;
- else
- {
- d = Fetch24(pDst, dst);
- d = fbOver24 (src, d);
- }
- Store24(pDst, dst,d);
- }
- else if (m)
- {
- d = fbOver24 (fbIn(src,m), Fetch24(pDst, dst));
- Store24(pDst, dst, d);
- }
- dst += 3;
- }
- }
-}
-
-void
-fbCompositeSolidMask_nx8x0565 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t src, srca;
- uint16_t *dstLine, *dst;
- uint32_t d;
- uint8_t *maskLine, *mask, m;
- int dstStride, maskStride;
- uint16_t w;
-
- fbComposeGetSolid(pSrc, src, pDst->bits.format);
-
- srca = src >> 24;
- if (src == 0)
- return;
-
- fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
- fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
- w = width;
-
- while (w--)
- {
- m = READ(pMask, mask++);
- if (m == 0xff)
- {
- if (srca == 0xff)
- d = src;
- else
- {
- d = READ(pDst, dst);
- d = fbOver24 (src, cvt0565to0888(d));
- }
- WRITE(pDst, dst, cvt8888to0565(d));
- }
- else if (m)
- {
- d = READ(pDst, dst);
- d = fbOver24 (fbIn(src,m), cvt0565to0888(d));
- WRITE(pDst, dst, cvt8888to0565(d));
- }
- dst++;
- }
- }
-}
-
-void
-fbCompositeSolidMask_nx8888x0565C (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t src, srca;
- uint16_t src16;
- uint16_t *dstLine, *dst;
- uint32_t d;
- uint32_t *maskLine, *mask, ma;
- int dstStride, maskStride;
- uint16_t w;
- uint32_t m, n, o;
-
- fbComposeGetSolid(pSrc, src, pDst->bits.format);
-
- srca = src >> 24;
- if (src == 0)
- return;
-
- src16 = cvt8888to0565(src);
-
- fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
- fbComposeGetStart (pMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
- w = width;
-
- while (w--)
- {
- ma = READ(pMask, mask++);
- if (ma == 0xffffffff)
- {
- if (srca == 0xff)
- {
- WRITE(pDst, dst, src16);
- }
- else
- {
- d = READ(pDst, dst);
- d = fbOver24 (src, cvt0565to0888(d));
- WRITE(pDst, dst, cvt8888to0565(d));
- }
- }
- else if (ma)
- {
- d = READ(pDst, dst);
- d = cvt0565to0888(d);
- FbInOverC (src, srca, ma, d, 0, m);
- FbInOverC (src, srca, ma, d, 8, n);
- FbInOverC (src, srca, ma, d, 16, o);
- d = m|n|o;
- WRITE(pDst, dst, cvt8888to0565(d));
- }
- dst++;
- }
- }
-}
-
-void
-fbCompositeSrc_8888x8888 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t *dstLine, *dst, dstMask;
- uint32_t *srcLine, *src, s;
- int dstStride, srcStride;
- uint8_t a;
- uint16_t w;
-
- fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
- fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
-
- dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- src = srcLine;
- srcLine += srcStride;
- w = width;
-
- while (w--)
- {
- s = READ(pSrc, src++);
- a = s >> 24;
- if (a == 0xff)
- WRITE(pDst, dst, s & dstMask);
- else if (a)
- WRITE(pDst, dst, fbOver (s, READ(pDst, dst)) & dstMask);
- dst++;
- }
- }
-}
-
-void
-fbCompositeSrc_8888x0888 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint8_t *dstLine, *dst;
- uint32_t d;
- uint32_t *srcLine, *src, s;
- uint8_t a;
- int dstStride, srcStride;
- uint16_t w;
-
- fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
- fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- src = srcLine;
- srcLine += srcStride;
- w = width;
-
- while (w--)
- {
- s = READ(pSrc, src++);
- a = s >> 24;
- if (a)
- {
- if (a == 0xff)
- d = s;
- else
- d = fbOver24 (s, Fetch24(pDst, dst));
- Store24(pDst, dst, d);
- }
- dst += 3;
- }
- }
-}
-
-void
-fbCompositeSrc_8888x0565 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint16_t *dstLine, *dst;
- uint32_t d;
- uint32_t *srcLine, *src, s;
- uint8_t a;
- int dstStride, srcStride;
- uint16_t w;
-
- fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
- fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- src = srcLine;
- srcLine += srcStride;
- w = width;
-
- while (w--)
- {
- s = READ(pSrc, src++);
- a = s >> 24;
- if (a)
- {
- if (a == 0xff)
- d = s;
- else
- {
- d = READ(pDst, dst);
- d = fbOver24 (s, cvt0565to0888(d));
- }
- WRITE(pDst, dst, cvt8888to0565(d));
- }
- dst++;
- }
- }
-}
-
-void
-fbCompositeSrcAdd_8000x8000 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint8_t *dstLine, *dst;
- uint8_t *srcLine, *src;
- int dstStride, srcStride;
- uint16_t w;
- uint8_t s, d;
- uint16_t t;
-
- fbComposeGetStart (pSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
- fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- src = srcLine;
- srcLine += srcStride;
- w = width;
-
- while (w--)
- {
- s = READ(pSrc, src++);
- if (s)
- {
- if (s != 0xff)
- {
- d = READ(pDst, dst);
- t = d + s;
- s = t | (0 - (t >> 8));
- }
- WRITE(pDst, dst, s);
- }
- dst++;
- }
- }
-}
-
-void
-fbCompositeSrcAdd_8888x8888 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t *dstLine, *dst;
- uint32_t *srcLine, *src;
- int dstStride, srcStride;
- uint16_t w;
- uint32_t s, d;
- uint16_t t;
- uint32_t m,n,o,p;
-
- fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
- fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- src = srcLine;
- srcLine += srcStride;
- w = width;
-
- while (w--)
- {
- s = READ(pSrc, src++);
- if (s)
- {
- if (s != 0xffffffff)
- {
- d = READ(pDst, dst);
- if (d)
- {
- m = FbAdd(s,d,0,t);
- n = FbAdd(s,d,8,t);
- o = FbAdd(s,d,16,t);
- p = FbAdd(s,d,24,t);
- s = m|n|o|p;
- }
- }
- WRITE(pDst, dst, s);
- }
- dst++;
- }
- }
-}
-
-static void
-fbCompositeSrcAdd_8888x8x8 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint8_t *dstLine, *dst;
- uint8_t *maskLine, *mask;
- int dstStride, maskStride;
- uint16_t w;
- uint32_t src;
- uint8_t sa;
-
- fbComposeGetStart (pDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
- fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
- fbComposeGetSolid (pSrc, src, pDst->bits.format);
- sa = (src >> 24);
-
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- mask = maskLine;
- maskLine += maskStride;
- w = width;
-
- while (w--)
- {
- uint16_t tmp;
- uint16_t a;
- uint32_t m, d;
- uint32_t r;
-
- a = READ(pMask, mask++);
- d = READ(pDst, dst);
-
- m = FbInU (sa, 0, a, tmp);
- r = FbAdd (m, d, 0, tmp);
-
- WRITE(pDst, dst++, r);
- }
- }
-}
-
-void
-fbCompositeSrcAdd_1000x1000 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- /* FIXME */
-#if 0
-
- uint32_t *dstBits, *srcBits;
- int dstStride, srcStride;
- int dstBpp, srcBpp;
- int dstXoff, dstYoff;
- int srcXoff, srcYoff;
-
- fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
-
- fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
-
- fbBlt (srcBits + srcStride * (ySrc + srcYoff),
- srcStride,
- xSrc + srcXoff,
-
- dstBits + dstStride * (yDst + dstYoff),
- dstStride,
- xDst + dstXoff,
-
- width,
- height,
-
- GXor,
- FB_ALLONES,
- srcBpp,
-
- FALSE,
- FALSE);
-
-#endif
-}
-
-void
-fbCompositeSolidMask_nx1xn (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- /* FIXME */
-#if 0
- uint32_t *dstBits;
- uint32_t *maskBits;
- int dstStride, maskStride;
- int dstBpp, maskBpp;
- int dstXoff, dstYoff;
- int maskXoff, maskYoff;
- uint32_t src;
-
- fbComposeGetSolid(pSrc, src, pDst->bits.format);
- fbGetStipDrawable (pMask->pDrawable, maskBits, maskStride, maskBpp, maskXoff, maskYoff);
- fbGetDrawable (pDst->pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
-
- switch (dstBpp) {
- case 32:
- break;
- case 24:
- break;
- case 16:
- src = cvt8888to0565(src);
- break;
- }
-
- src = fbReplicatePixel (src, dstBpp);
-
- fbBltOne (maskBits + maskStride * (yMask + maskYoff),
- maskStride,
- xMask + maskXoff,
-
- dstBits + dstStride * (yDst + dstYoff),
- dstStride,
- (xDst + dstXoff) * dstBpp,
- dstBpp,
-
- width * dstBpp,
- height,
-
- 0x0,
- src,
- FB_ALLONES,
- 0x0);
-
-#endif
-}
-
-/*
- * Apply a constant alpha value in an over computation
- */
-static void
-fbCompositeSrcSrc_nxn (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-/*
- * Simple bitblt
- */
-
-static void
-fbCompositeSrcSrc_nxn (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- /* FIXME */
-#if 0
- uint32_t *dst;
- uint32_t *src;
- int dstStride, srcStride;
- int srcXoff, srcYoff;
- int dstXoff, dstYoff;
- int srcBpp;
- int dstBpp;
- pixman_bool_t reverse = FALSE;
- pixman_bool_t upsidedown = FALSE;
-
- fbGetDrawable(pSrc->pDrawable,src,srcStride,srcBpp,srcXoff,srcYoff);
- fbGetDrawable(pDst->pDrawable,dst,dstStride,dstBpp,dstXoff,dstYoff);
-
- fbBlt (src + (ySrc + srcYoff) * srcStride,
- srcStride,
- (xSrc + srcXoff) * srcBpp,
-
- dst + (yDst + dstYoff) * dstStride,
- dstStride,
- (xDst + dstXoff) * dstBpp,
-
- (width) * dstBpp,
- (height),
-
- GXcopy,
- FB_ALLONES,
- dstBpp,
-
- reverse,
- upsidedown);
-#endif
-}
-
-static void
-pixman_image_composite_rect (pixman_op_t op,
- pixman_image_t *src,
- pixman_image_t *mask,
- pixman_image_t *dest,
- int16_t src_x,
- int16_t src_y,
- int16_t mask_x,
- int16_t mask_y,
- int16_t dest_x,
- int16_t dest_y,
- uint16_t width,
- uint16_t height);
-static void
-fbCompositeSolidFill (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t src;
-
- fbComposeGetSolid(pSrc, src, pDst->bits.format);
-
- if (pDst->bits.format == PIXMAN_a8)
- src = src >> 24;
- else if (pDst->bits.format == PIXMAN_r5g6b5 ||
- pDst->bits.format == PIXMAN_b5g6r5)
- src = cvt8888to0565 (src);
-
- pixman_fill (pDst->bits.bits, pDst->bits.rowstride,
- PIXMAN_FORMAT_BPP (pDst->bits.format),
- xDst, yDst,
- width, height,
- src);
-}
-
-static void
-fbCompositeSrc_8888xx888 (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
-{
- uint32_t *dst;
- uint32_t *src;
- int dstStride, srcStride;
- uint32_t n_bytes = width * sizeof (uint32_t);
-
- fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, src, 1);
- fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dst, 1);
-
- while (height--)
- {
- memcpy (dst, src, n_bytes);
-
- dst += dstStride;
- src += srcStride;
- }
-}
-
-static void
-pixman_walk_composite_region (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height,
- pixman_bool_t srcRepeat,
- pixman_bool_t maskRepeat,
- CompositeFunc compositeRect)
-{
- int n;
- const pixman_box32_t *pbox;
- int w, h, w_this, h_this;
- int x_msk, y_msk, x_src, y_src, x_dst, y_dst;
- pixman_region32_t reg;
- pixman_region32_t *region;
-
- pixman_region32_init (&reg);
- if (!pixman_compute_composite_region32 (&reg, pSrc, pMask, pDst,
- xSrc, ySrc, xMask, yMask, xDst, yDst, width, height))
- {
- return;
- }
-
- region = &reg;
-
- pbox = pixman_region32_rectangles (region, &n);
- while (n--)
- {
- h = pbox->y2 - pbox->y1;
- y_src = pbox->y1 - yDst + ySrc;
- y_msk = pbox->y1 - yDst + yMask;
- y_dst = pbox->y1;
- while (h)
- {
- h_this = h;
- w = pbox->x2 - pbox->x1;
- x_src = pbox->x1 - xDst + xSrc;
- x_msk = pbox->x1 - xDst + xMask;
- x_dst = pbox->x1;
- if (maskRepeat)
- {
- y_msk = MOD (y_msk, pMask->bits.height);
- if (h_this > pMask->bits.height - y_msk)
- h_this = pMask->bits.height - y_msk;
- }
- if (srcRepeat)
- {
- y_src = MOD (y_src, pSrc->bits.height);
- if (h_this > pSrc->bits.height - y_src)
- h_this = pSrc->bits.height - y_src;
- }
- while (w)
- {
- w_this = w;
- if (maskRepeat)
- {
- x_msk = MOD (x_msk, pMask->bits.width);
- if (w_this > pMask->bits.width - x_msk)
- w_this = pMask->bits.width - x_msk;
- }
- if (srcRepeat)
- {
- x_src = MOD (x_src, pSrc->bits.width);
- if (w_this > pSrc->bits.width - x_src)
- w_this = pSrc->bits.width - x_src;
- }
- (*compositeRect) (op, pSrc, pMask, pDst,
- x_src, y_src, x_msk, y_msk, x_dst, y_dst,
- w_this, h_this);
- w -= w_this;
- x_src += w_this;
- x_msk += w_this;
- x_dst += w_this;
- }
- h -= h_this;
- y_src += h_this;
- y_msk += h_this;
- y_dst += h_this;
- }
- pbox++;
- }
- pixman_region32_fini (&reg);
-}
-
-static void
-pixman_image_composite_rect (pixman_op_t op,
- pixman_image_t *src,
- pixman_image_t *mask,
- pixman_image_t *dest,
- int16_t src_x,
- int16_t src_y,
- int16_t mask_x,
- int16_t mask_y,
- int16_t dest_x,
- int16_t dest_y,
- uint16_t width,
- uint16_t height)
-{
- FbComposeData compose_data;
-
- return_if_fail (src != NULL);
- return_if_fail (dest != NULL);
-
- compose_data.op = op;
- compose_data.src = src;
- compose_data.mask = mask;
- compose_data.dest = dest;
- compose_data.xSrc = src_x;
- compose_data.ySrc = src_y;
- compose_data.xMask = mask_x;
- compose_data.yMask = mask_y;
- compose_data.xDest = dest_x;
- compose_data.yDest = dest_y;
- compose_data.width = width;
- compose_data.height = height;
-
- pixman_composite_rect_general (&compose_data);
-}
-
-/* These "formats" both have depth 0, so they
- * will never clash with any real ones
- */
-#define PIXMAN_null PIXMAN_FORMAT(0,0,0,0,0,0)
-#define PIXMAN_solid PIXMAN_FORMAT(0,1,0,0,0,0)
-
-#define NEED_COMPONENT_ALPHA (1 << 0)
-#define NEED_PIXBUF (1 << 1)
-#define NEED_SOLID_MASK (1 << 2)
-
-typedef struct
-{
- pixman_op_t op;
- pixman_format_code_t src_format;
- pixman_format_code_t mask_format;
- pixman_format_code_t dest_format;
- CompositeFunc func;
- uint32_t flags;
-} FastPathInfo;
-
-#ifdef USE_MMX
-static const FastPathInfo mmx_fast_paths[] =
-{
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8x0565mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8x0565mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8888x8888Cmmx, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8888x8888Cmmx, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8888x0565Cmmx, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8888x8888Cmmx, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8888x8888Cmmx, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8888x0565Cmmx, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSrc_8888RevNPx0565mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_r5g6b5, fbCompositeSrc_8888RevNPx0565mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888RevNPx8888mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_b5g6r5, fbCompositeSrc_8888RevNPx0565mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSrc_8888RevNPx0565mmx, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_x888xnx8888mmx, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_x888xnx8888mmx, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSrc_x888xnx8888mmx, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSrc_x888xnx8888mmx, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8x8888mmx, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8x8888mmx, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8x8888mmx, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8x8888mmx, NEED_SOLID_MASK },
-#if 0
- /* FIXME: This code is commented out since it's apparently not actually faster than the generic code. */
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeOver_x888x8x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeOver_x888x8x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888mmx, 0 },
-#endif
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSolid_nx8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSolid_nx8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSolid_nx0565mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_8888x0565mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8888mmx, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_8888x0565mmx, 0 },
-
- { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrcAdd_8888x8888mmx, 0 },
- { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrcAdd_8888x8888mmx, 0 },
- { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcAdd_8000x8000mmx, 0 },
- { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSrcAdd_8888x8x8mmx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMaskSrc_nx8x8888mmx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMaskSrc_nx8x8888mmx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMaskSrc_nx8x8888mmx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMaskSrc_nx8x8888mmx, 0 },
-
- { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeCopyAreammx, 0 },
- { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeIn_8x8mmx, 0 },
- { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeIn_nx8x8mmx, 0 },
- { PIXMAN_OP_NONE },
-};
-#endif
-
-#ifdef USE_SSE2
-static const FastPathInfo sse2_fast_paths[] =
-{
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8x0565sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8x0565sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSolid_nx8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSolid_nx8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSolid_nx0565sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_8888x0565sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_8888x0565sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8x8888sse2, 0 },
-#if 0
- /* FIXME: This code are buggy in MMX version, now the bug was translated to SSE2 version */
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeOver_x888x8x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeOver_x888x8x8888sse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888sse2, 0 },
-#endif
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_x888xnx8888sse2, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_x888xnx8888sse2, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSrc_x888xnx8888sse2, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSrc_x888xnx8888sse2, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8x8888sse2, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8x8888sse2, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8x8888sse2, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8x8888sse2, NEED_SOLID_MASK },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8888x8888Csse2, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8888x8888Csse2, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8888x8888Csse2, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8888x8888Csse2, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8888x0565Csse2, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8888x0565Csse2, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSrc_8888RevNPx0565sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_r5g6b5, fbCompositeSrc_8888RevNPx0565sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_b5g6r5, fbCompositeSrc_8888RevNPx0565sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSrc_8888RevNPx0565sse2, NEED_PIXBUF },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreasse2, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreasse2, 0 },
-
- { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcAdd_8000x8000sse2, 0 },
- { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrcAdd_8888x8888sse2, 0 },
- { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrcAdd_8888x8888sse2, 0 },
- { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSrcAdd_8888x8x8sse2, 0 },
-
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMaskSrc_nx8x8888sse2, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMaskSrc_nx8x8888sse2, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMaskSrc_nx8x8888sse2, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMaskSrc_nx8x8888sse2, 0 },
-
- { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeCopyAreasse2, 0 },
- { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeCopyAreasse2, 0 },
- { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreasse2, 0 },
- { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreasse2, 0 },
- { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeCopyAreasse2, 0 },
- { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeCopyAreasse2, 0 },
-
- { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeIn_8x8sse2, 0 },
- { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeIn_nx8x8sse2, 0 },
-
- { PIXMAN_OP_NONE },
-};
-#endif
-
-#ifdef USE_VMX
-static const FastPathInfo vmx_fast_paths[] =
-{
- { PIXMAN_OP_NONE },
-};
-#endif
-
-
-static const FastPathInfo c_fast_paths[] =
-{
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8x0565, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8x0565, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r8g8b8, fbCompositeSolidMask_nx8x0888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b8g8r8, fbCompositeSolidMask_nx8x0888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8888x8888C, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8888x8888C, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8888x0565C, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8888x8888C, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8888x8888C, NEED_COMPONENT_ALPHA },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8888x0565C, NEED_COMPONENT_ALPHA },
-#if 0
- /* FIXME: This code is commented out since it's apparently not actually faster than the generic code */
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeOver_x888x8x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeOver_x888x8x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888, 0 },
-#endif
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_8888x0565, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8888, 0 },
- { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_8888x0565, 0 },
-#if 0
- /* FIXME */
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a1, PIXMAN_r5g6b5, fbCompositeSolidMask_nx1xn, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a1, PIXMAN_b5g6r5, fbCompositeSolidMask_nx1xn, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a1, PIXMAN_r8g8b8, fbCompositeSolidMask_nx1xn, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a1, PIXMAN_b8g8r8, fbCompositeSolidMask_nx1xn, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a1, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx1xn, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a1, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx1xn, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a1, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx1xn, 0 },
- { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a1, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx1xn, 0 },
-#endif
- { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrcAdd_8888x8888, 0 },
- { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrcAdd_8888x8888, 0 },
- { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcAdd_8000x8000, 0 },
-#if 0
- /* FIXME */
- { PIXMAN_OP_ADD, PIXMAN_a1, PIXMAN_null, PIXMAN_a1, fbCompositeSrcAdd_1000x1000, 0 },
-#endif
- { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSrcAdd_8888x8x8, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSolidFill, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSolidFill, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSolidFill, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSolidFill, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8, fbCompositeSolidFill, 0 },
- { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSolidFill, 0 },
- { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888xx888, 0 },
- { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888xx888, 0 },
- { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888xx888, 0 },
- { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888xx888, 0 },
-#if 0
- /* FIXME */
- { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrcSrc_nxn, 0 },
- { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrcSrc_nxn, 0 },
- { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrcSrc_nxn, 0 },
- { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrcSrc_nxn, 0 },
- { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrcSrc_nxn, 0 },
- { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrcSrc_nxn, 0 },
-#endif
- { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcIn_8x8, 0 },
- { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSolidMaskIn_nx8x8, 0 },
- { PIXMAN_OP_NONE },
-};
-
-static pixman_bool_t
-mask_is_solid (pixman_image_t *mask)
-{
- if (mask->type == SOLID)
- return TRUE;
-
- if (mask->type == BITS &&
- mask->common.repeat == PIXMAN_REPEAT_NORMAL &&
- mask->bits.width == 1 &&
- mask->bits.height == 1)
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
-static const FastPathInfo *
-get_fast_path (const FastPathInfo *fast_paths,
- pixman_op_t op,
- pixman_image_t *pSrc,
- pixman_image_t *pMask,
- pixman_image_t *pDst,
- pixman_bool_t is_pixbuf)
-{
- const FastPathInfo *info;
-
- for (info = fast_paths; info->op != PIXMAN_OP_NONE; info++)
- {
- pixman_bool_t valid_src = FALSE;
- pixman_bool_t valid_mask = FALSE;
-
- if (info->op != op)
- continue;
-
- if ((info->src_format == PIXMAN_solid && pixman_image_can_get_solid (pSrc)) ||
- (pSrc->type == BITS && info->src_format == pSrc->bits.format))
- {
- valid_src = TRUE;
- }
-
- if (!valid_src)
- continue;
-
- if ((info->mask_format == PIXMAN_null && !pMask) ||
- (pMask && pMask->type == BITS && info->mask_format == pMask->bits.format))
- {
- valid_mask = TRUE;
-
- if (info->flags & NEED_SOLID_MASK)
- {
- if (!pMask || !mask_is_solid (pMask))
- valid_mask = FALSE;
- }
-
- if (info->flags & NEED_COMPONENT_ALPHA)
- {
- if (!pMask || !pMask->common.component_alpha)
- valid_mask = FALSE;
- }
- }
-
- if (!valid_mask)
- continue;
-
- if (info->dest_format != pDst->bits.format)
- continue;
-
- if ((info->flags & NEED_PIXBUF) && !is_pixbuf)
- continue;
-
- return info;
- }
-
- return NULL;
-}
/*
* Operator optimizations based on source or destination opacity
@@ -1703,467 +102,74 @@ pixman_optimize_operator(pixman_op_t op, pixman_image_t *pSrc, pixman_image_t *p
}
-#if defined(USE_SSE2) && defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
+static pixman_implementation_t *imp;
-/*
- * Work around GCC bug causing crashes in Mozilla with SSE2
- *
- * When using SSE2 intrinsics, gcc assumes that the stack is 16 byte
- * aligned. Unfortunately some code, such as Mozilla and Mono contain
- * code that aligns the stack to 4 bytes.
- *
- * The __force_align_arg_pointer__ makes gcc generate a prologue that
- * realigns the stack pointer to 16 bytes.
- *
- * On x86-64 this is not necessary because the standard ABI already
- * calls for a 16 byte aligned stack.
- *
- * See https://bugs.freedesktop.org/show_bug.cgi?id=15693
- */
-
-__attribute__((__force_align_arg_pointer__))
-#endif
PIXMAN_EXPORT void
pixman_image_composite (pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
+ pixman_image_t * src,
+ pixman_image_t * mask,
+ pixman_image_t * dest,
+ int16_t src_x,
+ int16_t src_y,
+ int16_t mask_x,
+ int16_t mask_y,
+ int16_t dest_x,
+ int16_t dest_y,
uint16_t width,
uint16_t height)
{
- pixman_bool_t srcRepeat = pSrc->type == BITS && pSrc->common.repeat == PIXMAN_REPEAT_NORMAL;
- pixman_bool_t maskRepeat = FALSE;
- pixman_bool_t srcTransform = pSrc->common.transform != NULL;
- pixman_bool_t maskTransform = FALSE;
- pixman_bool_t srcAlphaMap = pSrc->common.alpha_map != NULL;
- pixman_bool_t maskAlphaMap = FALSE;
- pixman_bool_t dstAlphaMap = pDst->common.alpha_map != NULL;
- CompositeFunc func = NULL;
-
-#ifdef USE_MMX
- fbComposeSetupMMX();
-#endif
-
-#ifdef USE_VMX
- fbComposeSetupVMX();
-#endif
-
-#ifdef USE_SSE2
- fbComposeSetupSSE2();
-#endif
-
- if (srcRepeat && srcTransform &&
- pSrc->bits.width == 1 &&
- pSrc->bits.height == 1)
- {
- srcTransform = FALSE;
- }
-
- if (pMask && pMask->type == BITS)
- {
- maskRepeat = pMask->common.repeat == PIXMAN_REPEAT_NORMAL;
-
- maskTransform = pMask->common.transform != 0;
- if (pMask->common.filter == PIXMAN_FILTER_CONVOLUTION)
- maskTransform = TRUE;
-
- maskAlphaMap = pMask->common.alpha_map != 0;
-
- if (maskRepeat && maskTransform &&
- pMask->bits.width == 1 &&
- pMask->bits.height == 1)
- {
- maskTransform = FALSE;
- }
- }
-
/*
- * Check if we can replace our operator by a simpler one if the src or dest are opaque
- * The output operator should be mathematically equivalent to the source.
- */
- op = pixman_optimize_operator(op, pSrc, pMask, pDst);
+ * Check if we can replace our operator by a simpler one if the src or dest are opaque
+ * The output operator should be mathematically equivalent to the source.
+ */
+ op = pixman_optimize_operator(op, src, mask, dest);
if(op == PIXMAN_OP_DST)
return;
- if ((pSrc->type == BITS || pixman_image_can_get_solid (pSrc)) && (!pMask || pMask->type == BITS)
- && !srcTransform && !maskTransform
- && !maskAlphaMap && !srcAlphaMap && !dstAlphaMap
- && (pSrc->common.filter != PIXMAN_FILTER_CONVOLUTION)
- && (pSrc->common.repeat != PIXMAN_REPEAT_PAD)
- && (!pMask || (pMask->common.filter != PIXMAN_FILTER_CONVOLUTION && pMask->common.repeat != PIXMAN_REPEAT_PAD))
- && !pSrc->common.read_func && !pSrc->common.write_func
- && !(pMask && pMask->common.read_func) && !(pMask && pMask->common.write_func)
- && !pDst->common.read_func && !pDst->common.write_func)
- {
- const FastPathInfo *info;
- pixman_bool_t pixbuf;
-
- pixbuf =
- pSrc && pSrc->type == BITS &&
- pMask && pMask->type == BITS &&
- pSrc->bits.bits == pMask->bits.bits &&
- xSrc == xMask &&
- ySrc == yMask &&
- !pMask->common.component_alpha &&
- !maskRepeat;
- info = NULL;
-
-#ifdef USE_SSE2
- if (pixman_have_sse2 ())
- info = get_fast_path (sse2_fast_paths, op, pSrc, pMask, pDst, pixbuf);
-#endif
-
-#ifdef USE_MMX
- if (!info && pixman_have_mmx())
- info = get_fast_path (mmx_fast_paths, op, pSrc, pMask, pDst, pixbuf);
-#endif
-
-#ifdef USE_VMX
-
- if (!info && pixman_have_vmx())
- info = get_fast_path (vmx_fast_paths, op, pSrc, pMask, pDst, pixbuf);
-#endif
- if (!info)
- info = get_fast_path (c_fast_paths, op, pSrc, pMask, pDst, pixbuf);
-
- if (info)
- {
- func = info->func;
-
- if (info->src_format == PIXMAN_solid)
- srcRepeat = FALSE;
-
- if (info->mask_format == PIXMAN_solid ||
- info->flags & NEED_SOLID_MASK)
- {
- maskRepeat = FALSE;
- }
- }
- }
+ if (!imp)
+ imp = _pixman_choose_implementation();
+
+ _pixman_implementation_composite (imp, op,
+ src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height);
+}
+
+PIXMAN_EXPORT pixman_bool_t
+pixman_blt (uint32_t *src_bits,
+ uint32_t *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
+{
+ if (!imp)
+ imp = _pixman_choose_implementation();
- if ((srcRepeat &&
- pSrc->bits.width == 1 &&
- pSrc->bits.height == 1) ||
- (maskRepeat &&
- pMask->bits.width == 1 &&
- pMask->bits.height == 1))
- {
- /* If src or mask are repeating 1x1 images and srcRepeat or
- * maskRepeat are still TRUE, it means the fast path we
- * selected does not actually handle repeating images.
- *
- * So rather than call the "fast path" with a zillion
- * 1x1 requests, we just use the general code (which does
- * do something sensible with 1x1 repeating images).
- */
- func = NULL;
- }
-
- if (!func)
- {
- func = pixman_image_composite_rect;
-
- /* CompositeGeneral optimizes 1x1 repeating images itself */
- if (pSrc->type == BITS &&
- pSrc->bits.width == 1 && pSrc->bits.height == 1)
- {
- srcRepeat = FALSE;
- }
-
- if (pMask && pMask->type == BITS &&
- pMask->bits.width == 1 && pMask->bits.height == 1)
- {
- maskRepeat = FALSE;
- }
-
- /* if we are transforming, repeats are handled in fbFetchTransformed */
- if (srcTransform)
- srcRepeat = FALSE;
-
- if (maskTransform)
- maskRepeat = FALSE;
- }
-
- pixman_walk_composite_region (op, pSrc, pMask, pDst, xSrc, ySrc,
- xMask, yMask, xDst, yDst, width, height,
- srcRepeat, maskRepeat, func);
+ return _pixman_implementation_blt (imp, src_bits, dst_bits, src_stride, dst_stride,
+ src_bpp, dst_bpp,
+ src_x, src_y,
+ dst_x, dst_y,
+ width, height);
}
-
-#ifdef USE_VMX
-/* The CPU detection code needs to be in a file not compiled with
- * "-maltivec -mabi=altivec", as gcc would try to save vector register
- * across function calls causing SIGILL on cpus without Altivec/vmx.
- */
-static pixman_bool_t initialized = FALSE;
-static volatile pixman_bool_t have_vmx = TRUE;
-
-#ifdef __APPLE__
-#include <sys/sysctl.h>
-
-pixman_bool_t pixman_have_vmx (void) {
- if(!initialized) {
- size_t length = sizeof(have_vmx);
- int error =
- sysctlbyname("hw.optional.altivec", &have_vmx, &length, NULL, 0);
- if(error) have_vmx = FALSE;
- initialized = TRUE;
- }
- return have_vmx;
-}
-
-#else
-#include <signal.h>
-#include <setjmp.h>
-
-static jmp_buf jump_env;
-
-static void vmx_test(int sig, siginfo_t *si, void *unused) {
- longjmp (jump_env, 1);
-}
-
-pixman_bool_t pixman_have_vmx (void) {
- struct sigaction sa, osa;
- int jmp_result;
- if (!initialized) {
- sa.sa_flags = SA_SIGINFO;
- sigemptyset(&sa.sa_mask);
- sa.sa_sigaction = vmx_test;
- sigaction(SIGILL, &sa, &osa);
- jmp_result = setjmp (jump_env);
- if (jmp_result == 0) {
- asm volatile ( "vor 0, 0, 0" );
- }
- sigaction(SIGILL, &osa, NULL);
- have_vmx = (jmp_result == 0);
- initialized = TRUE;
- }
- return have_vmx;
-}
-#endif /* __APPLE__ */
-#endif /* USE_VMX */
-
-#ifdef USE_MMX
-/* The CPU detection code needs to be in a file not compiled with
- * "-mmmx -msse", as gcc would generate CMOV instructions otherwise
- * that would lead to SIGILL instructions on old CPUs that don't have
- * it.
- */
-#if !defined(__amd64__) && !defined(__x86_64__)
-
-#ifdef HAVE_GETISAX
-#include <sys/auxv.h>
-#endif
-
-enum CPUFeatures {
- NoFeatures = 0,
- MMX = 0x1,
- MMX_Extensions = 0x2,
- SSE = 0x6,
- SSE2 = 0x8,
- CMOV = 0x10
-};
-
-static unsigned int detectCPUFeatures(void) {
- unsigned int features = 0;
- unsigned int result = 0;
-
-#ifdef HAVE_GETISAX
- if (getisax(&result, 1)) {
- if (result & AV_386_CMOV)
- features |= CMOV;
- if (result & AV_386_MMX)
- features |= MMX;
- if (result & AV_386_AMD_MMX)
- features |= MMX_Extensions;
- if (result & AV_386_SSE)
- features |= SSE;
- if (result & AV_386_SSE2)
- features |= SSE2;
- }
-#else
- char vendor[13];
-#ifdef _MSC_VER
- int vendor0 = 0, vendor1, vendor2;
-#endif
- vendor[0] = 0;
- vendor[12] = 0;
-
-#ifdef __GNUC__
- /* see p. 118 of amd64 instruction set manual Vol3 */
- /* We need to be careful about the handling of %ebx and
- * %esp here. We can't declare either one as clobbered
- * since they are special registers (%ebx is the "PIC
- * register" holding an offset to global data, %esp the
- * stack pointer), so we need to make sure they have their
- * original values when we access the output operands.
- */
- __asm__ ("pushf\n"
- "pop %%eax\n"
- "mov %%eax, %%ecx\n"
- "xor $0x00200000, %%eax\n"
- "push %%eax\n"
- "popf\n"
- "pushf\n"
- "pop %%eax\n"
- "mov $0x0, %%edx\n"
- "xor %%ecx, %%eax\n"
- "jz 1f\n"
-
- "mov $0x00000000, %%eax\n"
- "push %%ebx\n"
- "cpuid\n"
- "mov %%ebx, %%eax\n"
- "pop %%ebx\n"
- "mov %%eax, %1\n"
- "mov %%edx, %2\n"
- "mov %%ecx, %3\n"
- "mov $0x00000001, %%eax\n"
- "push %%ebx\n"
- "cpuid\n"
- "pop %%ebx\n"
- "1:\n"
- "mov %%edx, %0\n"
- : "=r" (result),
- "=m" (vendor[0]),
- "=m" (vendor[4]),
- "=m" (vendor[8])
- :
- : "%eax", "%ecx", "%edx"
- );
-
-#elif defined (_MSC_VER)
-
- _asm {
- pushfd
- pop eax
- mov ecx, eax
- xor eax, 00200000h
- push eax
- popfd
- pushfd
- pop eax
- mov edx, 0
- xor eax, ecx
- jz nocpuid
-
- mov eax, 0
- push ebx
- cpuid
- mov eax, ebx
- pop ebx
- mov vendor0, eax
- mov vendor1, edx
- mov vendor2, ecx
- mov eax, 1
- push ebx
- cpuid
- pop ebx
- nocpuid:
- mov result, edx
- }
- memmove (vendor+0, &vendor0, 4);
- memmove (vendor+4, &vendor1, 4);
- memmove (vendor+8, &vendor2, 4);
-
-#else
-# error unsupported compiler
-#endif
-
- features = 0;
- if (result) {
- /* result now contains the standard feature bits */
- if (result & (1 << 15))
- features |= CMOV;
- if (result & (1 << 23))
- features |= MMX;
- if (result & (1 << 25))
- features |= SSE;
- if (result & (1 << 26))
- features |= SSE2;
- if ((features & MMX) && !(features & SSE) &&
- (strcmp(vendor, "AuthenticAMD") == 0 ||
- strcmp(vendor, "Geode by NSC") == 0)) {
- /* check for AMD MMX extensions */
-#ifdef __GNUC__
- __asm__("push %%ebx\n"
- "mov $0x80000000, %%eax\n"
- "cpuid\n"
- "xor %%edx, %%edx\n"
- "cmp $0x1, %%eax\n"
- "jge 2f\n"
- "mov $0x80000001, %%eax\n"
- "cpuid\n"
- "2:\n"
- "pop %%ebx\n"
- "mov %%edx, %0\n"
- : "=r" (result)
- :
- : "%eax", "%ecx", "%edx"
- );
-#elif defined _MSC_VER
- _asm {
- push ebx
- mov eax, 80000000h
- cpuid
- xor edx, edx
- cmp eax, 1
- jge notamd
- mov eax, 80000001h
- cpuid
- notamd:
- pop ebx
- mov result, edx
- }
-#endif
- if (result & (1<<22))
- features |= MMX_Extensions;
- }
- }
-#endif /* HAVE_GETISAX */
-
- return features;
-}
-
-pixman_bool_t
-pixman_have_mmx (void)
-{
- static pixman_bool_t initialized = FALSE;
- static pixman_bool_t mmx_present;
-
- if (!initialized)
- {
- unsigned int features = detectCPUFeatures();
- mmx_present = (features & (MMX|MMX_Extensions)) == (MMX|MMX_Extensions);
- initialized = TRUE;
- }
-
- return mmx_present;
-}
-
-#ifdef USE_SSE2
-pixman_bool_t
-pixman_have_sse2 (void)
+PIXMAN_EXPORT pixman_bool_t
+pixman_fill (uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
{
- static pixman_bool_t initialized = FALSE;
- static pixman_bool_t sse2_present;
+ if (!imp)
+ imp = _pixman_choose_implementation();
- if (!initialized)
- {
- unsigned int features = detectCPUFeatures();
- sse2_present = (features & (MMX|MMX_Extensions|SSE|SSE2)) == (MMX|MMX_Extensions|SSE|SSE2);
- initialized = TRUE;
- }
-
- return sse2_present;
+ return _pixman_implementation_fill (imp, bits, stride, bpp, x, y, width, height, xor);
}
-#endif
-
-#endif /* __amd64__ */
-#endif
diff --git a/lib/pixman/pixman/pixman-private.h b/lib/pixman/pixman/pixman-private.h
index e26a0c3de..9e770f6f5 100644
--- a/lib/pixman/pixman/pixman-private.h
+++ b/lib/pixman/pixman/pixman-private.h
@@ -7,6 +7,7 @@
#include "pixman.h"
#include <time.h>
+#include <assert.h>
#ifndef FALSE
#define FALSE 0
@@ -67,7 +68,16 @@
#endif
#ifdef _MSC_VER
-#define inline __inline
+/* 'inline' is available only in C++ in MSVC */
+# define inline __inline
+# define force_inline __forceinline
+#elif defined __GNUC__ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define inline __inline__
+# define force_inline __inline__ __attribute__ ((__always_inline__))
+#else
+# ifndef force_inline
+# define force_inline inline
+# endif
#endif
#define FB_SHIFT 5
@@ -143,9 +153,7 @@ typedef struct point point_t;
*/
#define FASTCALL
-typedef FASTCALL void (*CombineMaskU32) (uint32_t *src, const uint32_t *mask, int width);
-typedef FASTCALL void (*CombineFuncU32) (uint32_t *dest, const uint32_t *src, int width);
-typedef FASTCALL void (*CombineFuncC32) (uint32_t *dest, uint32_t *src, uint32_t *mask, int width);
+typedef FASTCALL void (*CombineFunc32) (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width);
typedef FASTCALL void (*fetchProc32)(bits_image_t *pict, int x, int y, int width,
uint32_t *buffer);
typedef FASTCALL uint32_t (*fetchPixelProc32)(bits_image_t *pict, int offset, int line);
@@ -153,9 +161,7 @@ typedef FASTCALL void (*storeProc32)(pixman_image_t *, uint32_t *bits,
const uint32_t *values, int x, int width,
const pixman_indexed_t *);
-typedef FASTCALL void (*CombineMaskU64) (uint64_t *src, const uint64_t *mask, int width);
-typedef FASTCALL void (*CombineFuncU64) (uint64_t *dest, const uint64_t *src, int width);
-typedef FASTCALL void (*CombineFuncC64) (uint64_t *dest, uint64_t *src, uint64_t *mask, int width);
+typedef FASTCALL void (*CombineFunc64) (uint64_t *dest, const uint64_t *src, const uint64_t *mask, int width);
typedef FASTCALL void (*fetchProc64)(bits_image_t *pict, int x, int y, int width,
uint64_t *buffer);
typedef FASTCALL uint64_t (*fetchPixelProc64)(bits_image_t *pict, int offset, int line);
@@ -178,21 +184,6 @@ typedef struct _FbComposeData {
uint16_t height;
} FbComposeData;
-typedef struct _FbComposeFunctions32 {
- CombineFuncU32 *combineU;
- CombineFuncC32 *combineC;
- CombineMaskU32 combineMaskU;
-} FbComposeFunctions32;
-
-typedef struct _FbComposeFunctions64 {
- CombineFuncU64 *combineU;
- CombineFuncC64 *combineC;
- CombineMaskU64 combineMaskU;
-} FbComposeFunctions64;
-
-extern FbComposeFunctions32 pixman_composeFunctions;
-extern FbComposeFunctions64 pixman_composeFunctions64;
-
void pixman_composite_rect_general_accessors (const FbComposeData *data,
void *src_buffer,
void *mask_buffer,
@@ -217,15 +208,12 @@ storeProc64 pixman_storeProcForPicture64_accessors (bits_image_t *);
void pixman_expand(uint64_t *dst, const uint32_t *src, pixman_format_code_t, int width);
void pixman_contract(uint32_t *dst, const uint64_t *src, int width);
-void pixmanFetchSourcePict(source_image_t *, int x, int y, int width,
+void pixmanFetchGradient (gradient_t *, int x, int y, int width,
uint32_t *buffer, uint32_t *mask, uint32_t maskBits);
-void pixmanFetchSourcePict64(source_image_t *, int x, int y, int width,
- uint64_t *buffer, uint64_t *mask, uint32_t maskBits);
-
+void _pixman_image_get_scanline_64_generic (pixman_image_t * pict, int x, int y, int width,
+ uint64_t *buffer, uint64_t *mask, uint32_t maskBits);
void fbFetchTransformed(bits_image_t *, int x, int y, int width,
uint32_t *buffer, uint32_t *mask, uint32_t maskBits);
-void fbStoreExternalAlpha(bits_image_t *, int x, int y, int width,
- uint32_t *buffer);
void fbFetchExternalAlpha(bits_image_t *, int x, int y, int width,
uint32_t *buffer, uint32_t *mask, uint32_t maskBits);
@@ -238,22 +226,6 @@ void fbFetchExternalAlpha_accessors(bits_image_t *, int x, int y, int width,
uint32_t *buffer, uint32_t *mask,
uint32_t maskBits);
-void fbFetchTransformed64(bits_image_t *, int x, int y, int width,
- uint64_t *buffer, uint64_t *mask, uint32_t maskBits);
-void fbStoreExternalAlpha64(bits_image_t *, int x, int y, int width,
- uint64_t *buffer);
-void fbFetchExternalAlpha64(bits_image_t *, int x, int y, int width,
- uint64_t *buffer, uint64_t *mask, uint32_t maskBits);
-
-void fbFetchTransformed64_accessors(bits_image_t *, int x, int y, int width,
- uint64_t *buffer, uint64_t *mask,
- uint32_t maskBits);
-void fbStoreExternalAlpha64_accessors(bits_image_t *, int x, int y, int width,
- uint64_t *buffer);
-void fbFetchExternalAlpha64_accessors(bits_image_t *, int x, int y, int width,
- uint64_t *buffer, uint64_t *mask,
- uint32_t maskBits);
-
/* end */
typedef enum
@@ -271,14 +243,62 @@ typedef enum
{
SOURCE_IMAGE_CLASS_UNKNOWN,
SOURCE_IMAGE_CLASS_HORIZONTAL,
- SOURCE_IMAGE_CLASS_VERTICAL
+ SOURCE_IMAGE_CLASS_VERTICAL,
} source_pict_class_t;
+typedef void (*scanStoreProc)(bits_image_t *img, int x, int y, int width, uint32_t *buffer);
+typedef void (*scanFetchProc)(pixman_image_t *, int, int, int, uint32_t *,
+ uint32_t *, uint32_t);
+
+source_pict_class_t _pixman_image_classify (pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height);
+
+void
+_pixman_image_get_scanline_32 (pixman_image_t *image, int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask, uint32_t mask_bits);
+
+/* Even thought the type of buffer is uint32_t *, the function actually expects
+ * a uint64_t *buffer.
+ */
+void
+_pixman_image_get_scanline_64 (pixman_image_t *image, int x, int y, int width,
+ uint32_t *buffer, uint32_t *unused, uint32_t unused2);
+
+void
+_pixman_image_store_scanline_32 (bits_image_t *image, int x, int y, int width,
+ uint32_t *buffer);
+/* Even thought the type of buffer is uint32_t *, the function actually expects
+ * a uint64_t *buffer.
+ */
+void
+_pixman_image_store_scanline_64 (bits_image_t *image, int x, int y, int width,
+ uint32_t *buffer);
+
+pixman_image_t *
+_pixman_image_allocate (void);
+
+pixman_bool_t
+_pixman_init_gradient (gradient_t *gradient,
+ const pixman_gradient_stop_t *stops,
+ int n_stops);
+void
+_pixman_image_reset_clip_region (pixman_image_t *image);
+
struct point
{
int16_t x, y;
};
+typedef source_pict_class_t (* classify_func_t) (pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height);
+typedef void (* property_changed_func_t) (pixman_image_t *image);
+
struct image_common
{
image_type_t type;
@@ -297,6 +317,10 @@ struct image_common
pixman_bool_t component_alpha;
pixman_read_memory_func_t read_func;
pixman_write_memory_func_t write_func;
+ classify_func_t classify;
+ property_changed_func_t property_changed;
+ scanFetchProc get_scanline_32;
+ scanFetchProc get_scanline_64;
};
struct source_image
@@ -364,6 +388,9 @@ struct bits_image
uint32_t * bits;
uint32_t * free_me;
int rowstride; /* in number of uint32_t's */
+
+ scanStoreProc store_scanline_32;
+ scanStoreProc store_scanline_64;
};
union pixman_image
@@ -371,6 +398,7 @@ union pixman_image
image_type_t type;
image_common_t common;
bits_image_t bits;
+ source_image_t source;
gradient_t gradient;
linear_gradient_t linear;
conical_gradient_t conical;
@@ -378,6 +406,39 @@ union pixman_image
solid_fill_t solid;
};
+/* Gradient walker
+ */
+typedef struct
+{
+ uint32_t left_ag;
+ uint32_t left_rb;
+ uint32_t right_ag;
+ uint32_t right_rb;
+ int32_t left_x;
+ int32_t right_x;
+ int32_t stepper;
+
+ pixman_gradient_stop_t *stops;
+ int num_stops;
+ unsigned int spread;
+
+ int need_reset;
+} GradientWalker;
+
+void
+_pixman_gradient_walker_init (GradientWalker *walker,
+ gradient_t *gradient,
+ unsigned int spread);
+
+void
+_pixman_gradient_walker_reset (GradientWalker *walker,
+ pixman_fixed_32_32_t pos);
+
+uint32_t
+_pixman_gradient_walker_pixel (GradientWalker *walker,
+ pixman_fixed_32_32_t x);
+
+
#define LOG2_BITMAP_PAD 5
#define FB_STIP_SHIFT LOG2_BITMAP_PAD
@@ -573,9 +634,9 @@ union pixman_image
#define READ(img, ptr) (*(ptr))
#define WRITE(img, ptr, val) (*(ptr) = (val))
-#define MEMCPY_WRAPPED(img, dst, src, size) \
+#define MEMCPY_WRAPPED(img, dst, src, size) \
memcpy(dst, src, size)
-#define MEMSET_WRAPPED(img, dst, val, size) \
+#define MEMSET_WRAPPED(img, dst, val, size) \
memset(dst, val, size)
#endif
@@ -600,7 +661,7 @@ union pixman_image
(res) = READ(img, (uint32_t *)bits__); \
break; \
case 24: \
- (res) = Fetch24(img, (uint8_t *) bits__); \
+ (res) = Fetch24(img, (uint8_t *) bits__); \
break; \
case 16: \
(res) = READ(img, (uint16_t *) bits__); \
@@ -792,4 +853,229 @@ void pixman_timer_register (PixmanTimer *timer);
#endif /* PIXMAN_TIMING */
+typedef struct pixman_implementation_t pixman_implementation_t;
+
+typedef void (* pixman_combine_32_func_t) (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint32_t * dest,
+ const uint32_t * src,
+ const uint32_t * mask,
+ int width);
+
+typedef void (* pixman_combine_64_func_t) (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint64_t * dest,
+ const uint64_t * src,
+ const uint64_t * mask,
+ int width);
+
+typedef void (* pixman_composite_func_t) (pixman_implementation_t * imp,
+ pixman_op_t op,
+ pixman_image_t * src,
+ pixman_image_t * mask,
+ pixman_image_t * dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height);
+typedef pixman_bool_t (* pixman_blt_func_t) (pixman_implementation_t * imp,
+ uint32_t * src_bits,
+ uint32_t * dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x,
+ int src_y,
+ int dst_x,
+ int dst_y,
+ int width,
+ int height);
+typedef pixman_bool_t (* pixman_fill_func_t) (pixman_implementation_t *imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor);
+
+void
+_pixman_walk_composite_region (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height,
+ pixman_bool_t srcRepeat,
+ pixman_bool_t maskRepeat,
+ pixman_composite_func_t compositeRect);
+
+void _pixman_setup_combiner_functions_32 (pixman_implementation_t *imp);
+void _pixman_setup_combiner_functions_64 (pixman_implementation_t *imp);
+
+/* These "formats" both have depth 0, so they
+ * will never clash with any real ones
+ */
+#define PIXMAN_null PIXMAN_FORMAT(0,0,0,0,0,0)
+#define PIXMAN_solid PIXMAN_FORMAT(0,1,0,0,0,0)
+
+#define NEED_COMPONENT_ALPHA (1 << 0)
+#define NEED_PIXBUF (1 << 1)
+#define NEED_SOLID_MASK (1 << 2)
+
+typedef struct
+{
+ pixman_op_t op;
+ pixman_format_code_t src_format;
+ pixman_format_code_t mask_format;
+ pixman_format_code_t dest_format;
+ pixman_composite_func_t func;
+ uint32_t flags;
+} FastPathInfo;
+
+struct pixman_implementation_t
+{
+ pixman_implementation_t * toplevel;
+ pixman_implementation_t * delegate;
+
+ pixman_composite_func_t composite;
+ pixman_blt_func_t blt;
+ pixman_fill_func_t fill;
+
+ pixman_combine_32_func_t combine_32[PIXMAN_OP_LAST];
+ pixman_combine_32_func_t combine_32_ca[PIXMAN_OP_LAST];
+ pixman_combine_64_func_t combine_64[PIXMAN_OP_LAST];
+ pixman_combine_64_func_t combine_64_ca[PIXMAN_OP_LAST];
+};
+
+pixman_implementation_t *
+_pixman_implementation_create (pixman_implementation_t *toplevel,
+ pixman_implementation_t *delegate);
+
+void
+_pixman_implementation_combine_32 (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint32_t * dest,
+ const uint32_t * src,
+ const uint32_t * mask,
+ int width);
+void
+_pixman_implementation_combine_64 (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint64_t * dest,
+ const uint64_t * src,
+ const uint64_t * mask,
+ int width);
+void
+_pixman_implementation_combine_32_ca (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint32_t * dest,
+ const uint32_t * src,
+ const uint32_t * mask,
+ int width);
+void
+_pixman_implementation_combine_64_ca (pixman_implementation_t * imp,
+ pixman_op_t op,
+ uint64_t * dest,
+ const uint64_t * src,
+ const uint64_t * mask,
+ int width);
+void
+_pixman_implementation_composite (pixman_implementation_t * imp,
+ pixman_op_t op,
+ pixman_image_t * src,
+ pixman_image_t * mask,
+ pixman_image_t * dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height);
+
+pixman_bool_t
+_pixman_implementation_blt (pixman_implementation_t * imp,
+ uint32_t * src_bits,
+ uint32_t * dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x,
+ int src_y,
+ int dst_x,
+ int dst_y,
+ int width,
+ int height);
+pixman_bool_t
+_pixman_implementation_fill (pixman_implementation_t * imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor);
+
+/* Specific implementations */
+pixman_implementation_t *
+_pixman_implementation_create_general (pixman_implementation_t *toplevel);
+pixman_implementation_t *
+_pixman_implementation_create_fast_path (pixman_implementation_t *toplevel);
+#ifdef USE_MMX
+pixman_implementation_t *
+_pixman_implementation_create_mmx (pixman_implementation_t *toplevel);
+#endif
+#ifdef USE_SSE2
+pixman_implementation_t *
+_pixman_implementation_create_sse2 (pixman_implementation_t *toplevel);
+#endif
+#ifdef USE_ARM_SIMD
+pixman_implementation_t *
+_pixman_implementation_create_arm_simd (pixman_implementation_t *toplevel);
+#endif
+#ifdef USE_ARM_NEON
+pixman_implementation_t *
+_pixman_implementation_create_arm_neon (pixman_implementation_t *toplevel);
+#endif
+#ifdef USE_VMX
+pixman_implementation_t *
+_pixman_implementation_create_vmx (pixman_implementation_t *toplevel);
+#endif
+
+pixman_bool_t
+_pixman_run_fast_path (const FastPathInfo *paths,
+ pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_image_t *dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height);
+
+pixman_implementation_t *
+_pixman_choose_implementation (void);
+
#endif /* PIXMAN_PRIVATE_H */
diff --git a/lib/pixman/pixman/pixman-radial-gradient.c b/lib/pixman/pixman/pixman-radial-gradient.c
new file mode 100644
index 000000000..4a4543001
--- /dev/null
+++ b/lib/pixman/pixman/pixman-radial-gradient.c
@@ -0,0 +1,326 @@
+/*
+ *
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 SuSE, Inc.
+ * 2005 Lars Knoll & Zack Rusin, Trolltech
+ * Copyright © 2007 Red Hat, Inc.
+ *
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <math.h>
+#include "pixman-private.h"
+
+static void
+radial_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
+{
+ /*
+ * In the radial gradient problem we are given two circles (c₁,r₁) and
+ * (c₂,r₂) that define the gradient itself. Then, for any point p, we
+ * must compute the value(s) of t within [0.0, 1.0] representing the
+ * circle(s) that would color the point.
+ *
+ * There are potentially two values of t since the point p can be
+ * colored by both sides of the circle, (which happens whenever one
+ * circle is not entirely contained within the other).
+ *
+ * If we solve for a value of t that is outside of [0.0, 1.0] then we
+ * use the extend mode (NONE, REPEAT, REFLECT, or PAD) to map to a
+ * value within [0.0, 1.0].
+ *
+ * Here is an illustration of the problem:
+ *
+ * p₂
+ * p •
+ * • ╲
+ * · ╲r₂
+ * p₁ · ╲
+ * • θ╲
+ * ╲ ╌╌•
+ * ╲r₁ · c₂
+ * θ╲ ·
+ * ╌╌•
+ * c₁
+ *
+ * Given (c₁,r₁), (c₂,r₂) and p, we must find an angle θ such that two
+ * points p₁ and p₂ on the two circles are collinear with p. Then, the
+ * desired value of t is the ratio of the length of p₁p to the length
+ * of p₁p₂.
+ *
+ * So, we have six unknown values: (p₁x, p₁y), (p₂x, p₂y), θ and t.
+ * We can also write six equations that constrain the problem:
+ *
+ * Point p₁ is a distance r₁ from c₁ at an angle of θ:
+ *
+ * 1. p₁x = c₁x + r₁·cos θ
+ * 2. p₁y = c₁y + r₁·sin θ
+ *
+ * Point p₂ is a distance r₂ from c₂ at an angle of θ:
+ *
+ * 3. p₂x = c₂x + r2·cos θ
+ * 4. p₂y = c₂y + r2·sin θ
+ *
+ * Point p lies at a fraction t along the line segment p₁p₂:
+ *
+ * 5. px = t·p₂x + (1-t)·p₁x
+ * 6. py = t·p₂y + (1-t)·p₁y
+ *
+ * To solve, first subtitute 1-4 into 5 and 6:
+ *
+ * px = t·(c₂x + r₂·cos θ) + (1-t)·(c₁x + r₁·cos θ)
+ * py = t·(c₂y + r₂·sin θ) + (1-t)·(c₁y + r₁·sin θ)
+ *
+ * Then solve each for cos θ and sin θ expressed as a function of t:
+ *
+ * cos θ = (-(c₂x - c₁x)·t + (px - c₁x)) / ((r₂-r₁)·t + r₁)
+ * sin θ = (-(c₂y - c₁y)·t + (py - c₁y)) / ((r₂-r₁)·t + r₁)
+ *
+ * To simplify this a bit, we define new variables for several of the
+ * common terms as shown below:
+ *
+ * p₂
+ * p •
+ * • ╲
+ * · ┆ ╲r₂
+ * p₁ · ┆ ╲
+ * • pdy┆ ╲
+ * ╲ ┆ •c₂
+ * ╲r₁ ┆ · ┆
+ * ╲ ·┆ ┆cdy
+ * •╌╌╌╌┴╌╌╌╌╌╌╌┘
+ * c₁ pdx cdx
+ *
+ * cdx = (c₂x - c₁x)
+ * cdy = (c₂y - c₁y)
+ * dr = r₂-r₁
+ * pdx = px - c₁x
+ * pdy = py - c₁y
+ *
+ * Note that cdx, cdy, and dr do not depend on point p at all, so can
+ * be pre-computed for the entire gradient. The simplifed equations
+ * are now:
+ *
+ * cos θ = (-cdx·t + pdx) / (dr·t + r₁)
+ * sin θ = (-cdy·t + pdy) / (dr·t + r₁)
+ *
+ * Finally, to get a single function of t and eliminate the last
+ * unknown θ, we use the identity sin²θ + cos²θ = 1. First, square
+ * each equation, (we knew a quadratic was coming since it must be
+ * possible to obtain two solutions in some cases):
+ *
+ * cos²θ = (cdx²t² - 2·cdx·pdx·t + pdx²) / (dr²·t² + 2·r₁·dr·t + r₁²)
+ * sin²θ = (cdy²t² - 2·cdy·pdy·t + pdy²) / (dr²·t² + 2·r₁·dr·t + r₁²)
+ *
+ * Then add both together, set the result equal to 1, and express as a
+ * standard quadratic equation in t of the form At² + Bt + C = 0
+ *
+ * (cdx² + cdy² - dr²)·t² - 2·(cdx·pdx + cdy·pdy + r₁·dr)·t + (pdx² + pdy² - r₁²) = 0
+ *
+ * In other words:
+ *
+ * A = cdx² + cdy² - dr²
+ * B = -2·(pdx·cdx + pdy·cdy + r₁·dr)
+ * C = pdx² + pdy² - r₁²
+ *
+ * And again, notice that A does not depend on p, so can be
+ * precomputed. From here we just use the quadratic formula to solve
+ * for t:
+ *
+ * t = (-2·B ± ⎷(B² - 4·A·C)) / 2·A
+ */
+
+ gradient_t *gradient = (gradient_t *)image;
+ source_image_t *source = (source_image_t *)image;
+ radial_gradient_t *radial = (radial_gradient_t *)image;
+ uint32_t *end = buffer + width;
+ GradientWalker walker;
+ pixman_bool_t affine = TRUE;
+ double cx = 1.;
+ double cy = 0.;
+ double cz = 0.;
+ double rx = x + 0.5;
+ double ry = y + 0.5;
+ double rz = 1.;
+
+ _pixman_gradient_walker_init (&walker, gradient, source->common.repeat);
+
+ if (source->common.transform) {
+ pixman_vector_t v;
+ /* reference point is the center of the pixel */
+ v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1/2;
+ v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1/2;
+ v.vector[2] = pixman_fixed_1;
+ if (!pixman_transform_point_3d (source->common.transform, &v))
+ return;
+
+ cx = source->common.transform->matrix[0][0]/65536.;
+ cy = source->common.transform->matrix[1][0]/65536.;
+ cz = source->common.transform->matrix[2][0]/65536.;
+ rx = v.vector[0]/65536.;
+ ry = v.vector[1]/65536.;
+ rz = v.vector[2]/65536.;
+ affine = source->common.transform->matrix[2][0] == 0 && v.vector[2] == pixman_fixed_1;
+ }
+
+ if (affine) {
+ while (buffer < end) {
+ if (!mask || *mask++ & maskBits)
+ {
+ double pdx, pdy;
+ double B, C;
+ double det;
+ double c1x = radial->c1.x / 65536.0;
+ double c1y = radial->c1.y / 65536.0;
+ double r1 = radial->c1.radius / 65536.0;
+ pixman_fixed_48_16_t t;
+
+ pdx = rx - c1x;
+ pdy = ry - c1y;
+
+ B = -2 * ( pdx * radial->cdx
+ + pdy * radial->cdy
+ + r1 * radial->dr);
+ C = (pdx * pdx + pdy * pdy - r1 * r1);
+
+ det = (B * B) - (4 * radial->A * C);
+ if (det < 0.0)
+ det = 0.0;
+
+ if (radial->A < 0)
+ t = (pixman_fixed_48_16_t) ((- B - sqrt(det)) / (2.0 * radial->A) * 65536);
+ else
+ t = (pixman_fixed_48_16_t) ((- B + sqrt(det)) / (2.0 * radial->A) * 65536);
+
+ *(buffer) = _pixman_gradient_walker_pixel (&walker, t);
+ }
+ ++buffer;
+
+ rx += cx;
+ ry += cy;
+ }
+ } else {
+ /* projective */
+ while (buffer < end) {
+ if (!mask || *mask++ & maskBits)
+ {
+ double pdx, pdy;
+ double B, C;
+ double det;
+ double c1x = radial->c1.x / 65536.0;
+ double c1y = radial->c1.y / 65536.0;
+ double r1 = radial->c1.radius / 65536.0;
+ pixman_fixed_48_16_t t;
+ double x, y;
+
+ if (rz != 0) {
+ x = rx/rz;
+ y = ry/rz;
+ } else {
+ x = y = 0.;
+ }
+
+ pdx = x - c1x;
+ pdy = y - c1y;
+
+ B = -2 * ( pdx * radial->cdx
+ + pdy * radial->cdy
+ + r1 * radial->dr);
+ C = (pdx * pdx + pdy * pdy - r1 * r1);
+
+ det = (B * B) - (4 * radial->A * C);
+ if (det < 0.0)
+ det = 0.0;
+
+ if (radial->A < 0)
+ t = (pixman_fixed_48_16_t) ((- B - sqrt(det)) / (2.0 * radial->A) * 65536);
+ else
+ t = (pixman_fixed_48_16_t) ((- B + sqrt(det)) / (2.0 * radial->A) * 65536);
+
+ *(buffer) = _pixman_gradient_walker_pixel (&walker, t);
+ }
+ ++buffer;
+
+ rx += cx;
+ ry += cy;
+ rz += cz;
+ }
+ }
+
+}
+
+static void
+radial_gradient_property_changed (pixman_image_t *image)
+{
+ image->common.get_scanline_32 = (scanFetchProc)radial_gradient_get_scanline_32;
+ image->common.get_scanline_64 = (scanFetchProc)_pixman_image_get_scanline_64_generic;
+}
+
+PIXMAN_EXPORT pixman_image_t *
+pixman_image_create_radial_gradient (pixman_point_fixed_t *inner,
+ pixman_point_fixed_t *outer,
+ pixman_fixed_t inner_radius,
+ pixman_fixed_t outer_radius,
+ const pixman_gradient_stop_t *stops,
+ int n_stops)
+{
+ pixman_image_t *image;
+ radial_gradient_t *radial;
+
+ return_val_if_fail (n_stops >= 2, NULL);
+
+ image = _pixman_image_allocate();
+
+ if (!image)
+ return NULL;
+
+ radial = &image->radial;
+
+ if (!_pixman_init_gradient (&radial->common, stops, n_stops))
+ {
+ free (image);
+ return NULL;
+ }
+
+ image->type = RADIAL;
+
+ radial->c1.x = inner->x;
+ radial->c1.y = inner->y;
+ radial->c1.radius = inner_radius;
+ radial->c2.x = outer->x;
+ radial->c2.y = outer->y;
+ radial->c2.radius = outer_radius;
+ radial->cdx = pixman_fixed_to_double (radial->c2.x - radial->c1.x);
+ radial->cdy = pixman_fixed_to_double (radial->c2.y - radial->c1.y);
+ radial->dr = pixman_fixed_to_double (radial->c2.radius - radial->c1.radius);
+ radial->A = (radial->cdx * radial->cdx
+ + radial->cdy * radial->cdy
+ - radial->dr * radial->dr);
+
+ image->common.property_changed = radial_gradient_property_changed;
+
+ radial_gradient_property_changed (image);
+
+ return image;
+}
+
diff --git a/lib/pixman/pixman/pixman-region.c b/lib/pixman/pixman/pixman-region.c
index 559454a7e..dec2c9de3 100644
--- a/lib/pixman/pixman/pixman-region.c
+++ b/lib/pixman/pixman/pixman-region.c
@@ -572,7 +572,7 @@ pixman_region_appendNonO (
{ \
int newRects; \
if ((newRects = rEnd - r)) { \
- RECTALLOC(newReg, newRects); \
+ RECTALLOC_BAIL(newReg, newRects, bail); \
memmove((char *)PIXREGION_TOP(newReg),(char *)r, \
newRects * sizeof(box_type_t)); \
newReg->data->numRects += newRects; \
@@ -752,7 +752,8 @@ pixman_op(
bot = MIN(r1->y2, r2y1);
if (top != bot) {
curBand = newReg->data->numRects;
- pixman_region_appendNonO(newReg, r1, r1BandEnd, top, bot);
+ if (!pixman_region_appendNonO(newReg, r1, r1BandEnd, top, bot))
+ goto bail;
Coalesce(newReg, prevBand, curBand);
}
}
@@ -763,7 +764,8 @@ pixman_op(
bot = MIN(r2->y2, r1y1);
if (top != bot) {
curBand = newReg->data->numRects;
- pixman_region_appendNonO(newReg, r2, r2BandEnd, top, bot);
+ if (!pixman_region_appendNonO(newReg, r2, r2BandEnd, top, bot))
+ goto bail;
Coalesce(newReg, prevBand, curBand);
}
}
@@ -779,8 +781,12 @@ pixman_op(
ybot = MIN(r1->y2, r2->y2);
if (ybot > ytop) {
curBand = newReg->data->numRects;
- (* overlapFunc)(newReg, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot,
- pOverlap);
+ if (!(* overlapFunc)(newReg,
+ r1, r1BandEnd,
+ r2, r2BandEnd,
+ ytop, ybot,
+ pOverlap))
+ goto bail;
Coalesce(newReg, prevBand, curBand);
}
@@ -805,7 +811,10 @@ pixman_op(
/* Do first nonOverlap1Func call, which may be able to coalesce */
FindBand(r1, r1BandEnd, r1End, r1y1);
curBand = newReg->data->numRects;
- pixman_region_appendNonO(newReg, r1, r1BandEnd, MAX(r1y1, ybot), r1->y2);
+ if (!pixman_region_appendNonO(newReg,
+ r1, r1BandEnd,
+ MAX(r1y1, ybot), r1->y2))
+ goto bail;
Coalesce(newReg, prevBand, curBand);
/* Just append the rest of the boxes */
AppendRegions(newReg, r1BandEnd, r1End);
@@ -814,7 +823,10 @@ pixman_op(
/* Do first nonOverlap2Func call, which may be able to coalesce */
FindBand(r2, r2BandEnd, r2End, r2y1);
curBand = newReg->data->numRects;
- pixman_region_appendNonO(newReg, r2, r2BandEnd, MAX(r2y1, ybot), r2->y2);
+ if (!pixman_region_appendNonO(newReg,
+ r2, r2BandEnd,
+ MAX(r2y1, ybot), r2->y2))
+ goto bail;
Coalesce(newReg, prevBand, curBand);
/* Append rest of boxes */
AppendRegions(newReg, r2BandEnd, r2End);
@@ -840,6 +852,11 @@ pixman_op(
}
return TRUE;
+
+bail:
+ if (oldData)
+ free(oldData);
+ return pixman_break (newReg);
}
/*-
@@ -1330,6 +1347,8 @@ validate (region_type_t * badreg,
int curBand;
} RegionInfo;
+ RegionInfo stack_regions[64];
+
int numRects; /* Original numRects for badreg */
RegionInfo *ri; /* Array of current regions */
int numRI; /* Number of entries used in ri */
@@ -1379,10 +1398,8 @@ validate (region_type_t * badreg,
/* Set up the first region to be the first rectangle in badreg */
/* Note that step 2 code will never overflow the ri[0].reg rects array */
- ri = (RegionInfo *) pixman_malloc_ab (4, sizeof(RegionInfo));
- if (!ri)
- return pixman_break (badreg);
- sizeRI = 4;
+ ri = stack_regions;
+ sizeRI = sizeof (stack_regions) / sizeof (stack_regions[0]);
numRI = 1;
ri[0].prevBand = 0;
ri[0].curBand = 0;
@@ -1451,9 +1468,16 @@ validate (region_type_t * badreg,
data_size = sizeRI * sizeof(RegionInfo);
if (data_size / sizeRI != sizeof(RegionInfo))
goto bail;
- rit = (RegionInfo *) realloc(ri, data_size);
- if (!rit)
- goto bail;
+ if (ri == stack_regions) {
+ rit = malloc (data_size);
+ if (!rit)
+ goto bail;
+ memcpy (rit, ri, numRI * sizeof (RegionInfo));
+ } else {
+ rit = (RegionInfo *) realloc(ri, data_size);
+ if (!rit)
+ goto bail;
+ }
ri = rit;
rit = &ri[numRI];
}
@@ -1509,13 +1533,15 @@ NextRect: ;
goto bail;
}
*badreg = ri[0].reg;
- free(ri);
+ if (ri != stack_regions)
+ free(ri);
good(badreg);
return ret;
bail:
for (i = 0; i < numRI; i++)
freeData(&ri[i].reg);
- free (ri);
+ if (ri != stack_regions)
+ free (ri);
return pixman_break (badreg);
}
@@ -1998,7 +2024,9 @@ PREFIX(_contains_point) (region_type_t * region,
return(FALSE);
if (numRects == 1)
{
- *box = region->extents;
+ if (box)
+ *box = region->extents;
+
return(TRUE);
}
for (pbox = PIXREGION_BOXPTR(region), pboxEnd = pbox + numRects;
@@ -2011,7 +2039,10 @@ PREFIX(_contains_point) (region_type_t * region,
break; /* missed it */
if (x >= pbox->x2)
continue; /* not there yet */
- *box = *pbox;
+
+ if (box)
+ *box = *pbox;
+
return(TRUE);
}
return(FALSE);
diff --git a/lib/pixman/pixman/pixman-region32.c b/lib/pixman/pixman/pixman-region32.c
index 8a30d1dc7..aac74f68f 100644
--- a/lib/pixman/pixman/pixman-region32.c
+++ b/lib/pixman/pixman/pixman-region32.c
@@ -40,6 +40,8 @@ typedef struct {
#define PREFIX(x) pixman_region32##x
+#define N_TMP_BOXES (16)
+
pixman_bool_t
pixman_region32_copy_from_region16 (pixman_region32_t *dst,
pixman_region16_t *src)
@@ -47,12 +49,16 @@ pixman_region32_copy_from_region16 (pixman_region32_t *dst,
int n_boxes, i;
pixman_box16_t *boxes16;
pixman_box32_t *boxes32;
+ pixman_box32_t tmp_boxes[N_TMP_BOXES];
pixman_bool_t retval;
boxes16 = pixman_region_rectangles (src, &n_boxes);
- boxes32 = pixman_malloc_ab (n_boxes, sizeof (pixman_box32_t));
-
+ if (n_boxes > N_TMP_BOXES)
+ boxes32 = pixman_malloc_ab (n_boxes, sizeof (pixman_box32_t));
+ else
+ boxes32 = tmp_boxes;
+
if (!boxes32)
return FALSE;
@@ -66,7 +72,10 @@ pixman_region32_copy_from_region16 (pixman_region32_t *dst,
pixman_region32_fini (dst);
retval = pixman_region32_init_rects (dst, boxes32, n_boxes);
- free (boxes32);
+
+ if (boxes32 != tmp_boxes)
+ free (boxes32);
+
return retval;
}
diff --git a/lib/pixman/pixman/pixman-solid-fill.c b/lib/pixman/pixman/pixman-solid-fill.c
new file mode 100644
index 000000000..1805600d8
--- /dev/null
+++ b/lib/pixman/pixman/pixman-solid-fill.c
@@ -0,0 +1,85 @@
+/*
+ * Copyright © 2000 SuSE, Inc.
+ * Copyright © 2007, 2009 Red Hat, Inc.
+ * Copyright © 2009 Soren Sandmann
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+#include "pixman-private.h"
+
+static void
+solid_fill_get_scanline_32 (pixman_image_t *image, int x, int y, int width,
+ uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
+{
+ uint32_t *end = buffer + width;
+ register uint32_t color = ((solid_fill_t *)image)->color;
+
+ while (buffer < end)
+ *(buffer++) = color;
+
+ return;
+}
+
+static source_pict_class_t
+solid_fill_classify (pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height)
+{
+ return (image->source.class = SOURCE_IMAGE_CLASS_HORIZONTAL);
+}
+
+static void
+solid_fill_property_changed (pixman_image_t *image)
+{
+ image->common.get_scanline_32 = (scanFetchProc)solid_fill_get_scanline_32;
+ image->common.get_scanline_64 = (scanFetchProc)_pixman_image_get_scanline_64_generic;
+}
+
+static uint32_t
+color_to_uint32 (const pixman_color_t *color)
+{
+ return
+ (color->alpha >> 8 << 24) |
+ (color->red >> 8 << 16) |
+ (color->green & 0xff00) |
+ (color->blue >> 8);
+}
+
+PIXMAN_EXPORT pixman_image_t *
+pixman_image_create_solid_fill (pixman_color_t *color)
+{
+ pixman_image_t *img = _pixman_image_allocate();
+
+ if (!img)
+ return NULL;
+
+ img->type = SOLID;
+ img->solid.color = color_to_uint32 (color);
+
+ img->source.class = SOURCE_IMAGE_CLASS_UNKNOWN;
+ img->common.classify = solid_fill_classify;
+ img->common.property_changed = solid_fill_property_changed;
+
+ solid_fill_property_changed (img);
+
+ return img;
+}
diff --git a/lib/pixman/pixman/pixman-source.c b/lib/pixman/pixman/pixman-source.c
deleted file mode 100644
index 6a640fa67..000000000
--- a/lib/pixman/pixman/pixman-source.c
+++ /dev/null
@@ -1,709 +0,0 @@
-/*
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- * 2005 Lars Knoll & Zack Rusin, Trolltech
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <math.h>
-
-#include "pixman-private.h"
-
-typedef struct
-{
- uint32_t left_ag;
- uint32_t left_rb;
- uint32_t right_ag;
- uint32_t right_rb;
- int32_t left_x;
- int32_t right_x;
- int32_t stepper;
-
- pixman_gradient_stop_t *stops;
- int num_stops;
- unsigned int spread;
-
- int need_reset;
-} GradientWalker;
-
-static void
-_gradient_walker_init (GradientWalker *walker,
- gradient_t *gradient,
- unsigned int spread)
-{
- walker->num_stops = gradient->n_stops;
- walker->stops = gradient->stops;
- walker->left_x = 0;
- walker->right_x = 0x10000;
- walker->stepper = 0;
- walker->left_ag = 0;
- walker->left_rb = 0;
- walker->right_ag = 0;
- walker->right_rb = 0;
- walker->spread = spread;
-
- walker->need_reset = TRUE;
-}
-
-static void
-_gradient_walker_reset (GradientWalker *walker,
- pixman_fixed_32_32_t pos)
-{
- int32_t x, left_x, right_x;
- pixman_color_t *left_c, *right_c;
- int n, count = walker->num_stops;
- pixman_gradient_stop_t * stops = walker->stops;
-
- static const pixman_color_t transparent_black = { 0, 0, 0, 0 };
-
- switch (walker->spread)
- {
- case PIXMAN_REPEAT_NORMAL:
- x = (int32_t)pos & 0xFFFF;
- for (n = 0; n < count; n++)
- if (x < stops[n].x)
- break;
- if (n == 0) {
- left_x = stops[count-1].x - 0x10000;
- left_c = &stops[count-1].color;
- } else {
- left_x = stops[n-1].x;
- left_c = &stops[n-1].color;
- }
-
- if (n == count) {
- right_x = stops[0].x + 0x10000;
- right_c = &stops[0].color;
- } else {
- right_x = stops[n].x;
- right_c = &stops[n].color;
- }
- left_x += (pos - x);
- right_x += (pos - x);
- break;
-
- case PIXMAN_REPEAT_PAD:
- for (n = 0; n < count; n++)
- if (pos < stops[n].x)
- break;
-
- if (n == 0) {
- left_x = INT32_MIN;
- left_c = &stops[0].color;
- } else {
- left_x = stops[n-1].x;
- left_c = &stops[n-1].color;
- }
-
- if (n == count) {
- right_x = INT32_MAX;
- right_c = &stops[n-1].color;
- } else {
- right_x = stops[n].x;
- right_c = &stops[n].color;
- }
- break;
-
- case PIXMAN_REPEAT_REFLECT:
- x = (int32_t)pos & 0xFFFF;
- if ((int32_t)pos & 0x10000)
- x = 0x10000 - x;
- for (n = 0; n < count; n++)
- if (x < stops[n].x)
- break;
-
- if (n == 0) {
- left_x = -stops[0].x;
- left_c = &stops[0].color;
- } else {
- left_x = stops[n-1].x;
- left_c = &stops[n-1].color;
- }
-
- if (n == count) {
- right_x = 0x20000 - stops[n-1].x;
- right_c = &stops[n-1].color;
- } else {
- right_x = stops[n].x;
- right_c = &stops[n].color;
- }
-
- if ((int32_t)pos & 0x10000) {
- pixman_color_t *tmp_c;
- int32_t tmp_x;
-
- tmp_x = 0x10000 - right_x;
- right_x = 0x10000 - left_x;
- left_x = tmp_x;
-
- tmp_c = right_c;
- right_c = left_c;
- left_c = tmp_c;
-
- x = 0x10000 - x;
- }
- left_x += (pos - x);
- right_x += (pos - x);
- break;
-
- default: /* RepeatNone */
- for (n = 0; n < count; n++)
- if (pos < stops[n].x)
- break;
-
- if (n == 0)
- {
- left_x = INT32_MIN;
- right_x = stops[0].x;
- left_c = right_c = (pixman_color_t*) &transparent_black;
- }
- else if (n == count)
- {
- left_x = stops[n-1].x;
- right_x = INT32_MAX;
- left_c = right_c = (pixman_color_t*) &transparent_black;
- }
- else
- {
- left_x = stops[n-1].x;
- right_x = stops[n].x;
- left_c = &stops[n-1].color;
- right_c = &stops[n].color;
- }
- }
-
- walker->left_x = left_x;
- walker->right_x = right_x;
- walker->left_ag = ((left_c->alpha >> 8) << 16) | (left_c->green >> 8);
- walker->left_rb = ((left_c->red & 0xff00) << 8) | (left_c->blue >> 8);
- walker->right_ag = ((right_c->alpha >> 8) << 16) | (right_c->green >> 8);
- walker->right_rb = ((right_c->red & 0xff00) << 8) | (right_c->blue >> 8);
-
- if ( walker->left_x == walker->right_x ||
- ( walker->left_ag == walker->right_ag &&
- walker->left_rb == walker->right_rb ) )
- {
- walker->stepper = 0;
- }
- else
- {
- int32_t width = right_x - left_x;
- walker->stepper = ((1 << 24) + width/2)/width;
- }
-
- walker->need_reset = FALSE;
-}
-
-#define GRADIENT_WALKER_NEED_RESET(w,x) \
- ( (w)->need_reset || (x) < (w)->left_x || (x) >= (w)->right_x)
-
-
-/* the following assumes that GRADIENT_WALKER_NEED_RESET(w,x) is FALSE */
-static uint32_t
-_gradient_walker_pixel (GradientWalker *walker,
- pixman_fixed_32_32_t x)
-{
- int dist, idist;
- uint32_t t1, t2, a, color;
-
- if (GRADIENT_WALKER_NEED_RESET (walker, x))
- _gradient_walker_reset (walker, x);
-
- dist = ((int)(x - walker->left_x)*walker->stepper) >> 16;
- idist = 256 - dist;
-
- /* combined INTERPOLATE and premultiply */
- t1 = walker->left_rb*idist + walker->right_rb*dist;
- t1 = (t1 >> 8) & 0xff00ff;
-
- t2 = walker->left_ag*idist + walker->right_ag*dist;
- t2 &= 0xff00ff00;
-
- color = t2 & 0xff000000;
- a = t2 >> 24;
-
- t1 = t1*a + 0x800080;
- t1 = (t1 + ((t1 >> 8) & 0xff00ff)) >> 8;
-
- t2 = (t2 >> 8)*a + 0x800080;
- t2 = (t2 + ((t2 >> 8) & 0xff00ff));
-
- return (color | (t1 & 0xff00ff) | (t2 & 0xff00));
-}
-
-void pixmanFetchSourcePict(source_image_t * pict, int x, int y, int width,
- uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
-{
-#if 0
- SourcePictPtr pGradient = pict->pSourcePict;
-#endif
- GradientWalker walker;
- uint32_t *end = buffer + width;
- gradient_t *gradient;
-
- if (pict->common.type == SOLID)
- {
- register uint32_t color = ((solid_fill_t *)pict)->color;
-
- while (buffer < end)
- *(buffer++) = color;
-
- return;
- }
-
- gradient = (gradient_t *)pict;
-
- _gradient_walker_init (&walker, gradient, pict->common.repeat);
-
- if (pict->common.type == LINEAR) {
- pixman_vector_t v, unit;
- pixman_fixed_32_32_t l;
- pixman_fixed_48_16_t dx, dy, a, b, off;
- linear_gradient_t *linear = (linear_gradient_t *)pict;
-
- /* reference point is the center of the pixel */
- v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1/2;
- v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1/2;
- v.vector[2] = pixman_fixed_1;
- if (pict->common.transform) {
- if (!pixman_transform_point_3d (pict->common.transform, &v))
- return;
- unit.vector[0] = pict->common.transform->matrix[0][0];
- unit.vector[1] = pict->common.transform->matrix[1][0];
- unit.vector[2] = pict->common.transform->matrix[2][0];
- } else {
- unit.vector[0] = pixman_fixed_1;
- unit.vector[1] = 0;
- unit.vector[2] = 0;
- }
-
- dx = linear->p2.x - linear->p1.x;
- dy = linear->p2.y - linear->p1.y;
- l = dx*dx + dy*dy;
- if (l != 0) {
- a = (dx << 32) / l;
- b = (dy << 32) / l;
- off = (-a*linear->p1.x - b*linear->p1.y)>>16;
- }
- if (l == 0 || (unit.vector[2] == 0 && v.vector[2] == pixman_fixed_1)) {
- pixman_fixed_48_16_t inc, t;
- /* affine transformation only */
- if (l == 0) {
- t = 0;
- inc = 0;
- } else {
- t = ((a*v.vector[0] + b*v.vector[1]) >> 16) + off;
- inc = (a * unit.vector[0] + b * unit.vector[1]) >> 16;
- }
-
- if (pict->class == SOURCE_IMAGE_CLASS_VERTICAL)
- {
- register uint32_t color;
-
- color = _gradient_walker_pixel( &walker, t );
- while (buffer < end)
- *(buffer++) = color;
- }
- else
- {
- if (!mask) {
- while (buffer < end)
- {
- *(buffer) = _gradient_walker_pixel (&walker, t);
- buffer += 1;
- t += inc;
- }
- } else {
- while (buffer < end) {
- if (*mask++ & maskBits)
- {
- *(buffer) = _gradient_walker_pixel (&walker, t);
- }
- buffer += 1;
- t += inc;
- }
- }
- }
- }
- else /* projective transformation */
- {
- pixman_fixed_48_16_t t;
-
- if (pict->class == SOURCE_IMAGE_CLASS_VERTICAL)
- {
- register uint32_t color;
-
- if (v.vector[2] == 0)
- {
- t = 0;
- }
- else
- {
- pixman_fixed_48_16_t x, y;
-
- x = ((pixman_fixed_48_16_t) v.vector[0] << 16) / v.vector[2];
- y = ((pixman_fixed_48_16_t) v.vector[1] << 16) / v.vector[2];
- t = ((a * x + b * y) >> 16) + off;
- }
-
- color = _gradient_walker_pixel( &walker, t );
- while (buffer < end)
- *(buffer++) = color;
- }
- else
- {
- while (buffer < end)
- {
- if (!mask || *mask++ & maskBits)
- {
- if (v.vector[2] == 0) {
- t = 0;
- } else {
- pixman_fixed_48_16_t x, y;
- x = ((pixman_fixed_48_16_t)v.vector[0] << 16) / v.vector[2];
- y = ((pixman_fixed_48_16_t)v.vector[1] << 16) / v.vector[2];
- t = ((a*x + b*y) >> 16) + off;
- }
- *(buffer) = _gradient_walker_pixel (&walker, t);
- }
- ++buffer;
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
- }
- }
- }
- } else {
-
-/*
- * In the radial gradient problem we are given two circles (c₁,r₁) and
- * (c₂,r₂) that define the gradient itself. Then, for any point p, we
- * must compute the value(s) of t within [0.0, 1.0] representing the
- * circle(s) that would color the point.
- *
- * There are potentially two values of t since the point p can be
- * colored by both sides of the circle, (which happens whenever one
- * circle is not entirely contained within the other).
- *
- * If we solve for a value of t that is outside of [0.0, 1.0] then we
- * use the extend mode (NONE, REPEAT, REFLECT, or PAD) to map to a
- * value within [0.0, 1.0].
- *
- * Here is an illustration of the problem:
- *
- * p₂
- * p •
- * • ╲
- * · ╲r₂
- * p₁ · ╲
- * • θ╲
- * ╲ ╌╌•
- * ╲r₁ · c₂
- * θ╲ ·
- * ╌╌•
- * c₁
- *
- * Given (c₁,r₁), (c₂,r₂) and p, we must find an angle θ such that two
- * points p₁ and p₂ on the two circles are collinear with p. Then, the
- * desired value of t is the ratio of the length of p₁p to the length
- * of p₁p₂.
- *
- * So, we have six unknown values: (p₁x, p₁y), (p₂x, p₂y), θ and t.
- * We can also write six equations that constrain the problem:
- *
- * Point p₁ is a distance r₁ from c₁ at an angle of θ:
- *
- * 1. p₁x = c₁x + r₁·cos θ
- * 2. p₁y = c₁y + r₁·sin θ
- *
- * Point p₂ is a distance r₂ from c₂ at an angle of θ:
- *
- * 3. p₂x = c₂x + r2·cos θ
- * 4. p₂y = c₂y + r2·sin θ
- *
- * Point p lies at a fraction t along the line segment p₁p₂:
- *
- * 5. px = t·p₂x + (1-t)·p₁x
- * 6. py = t·p₂y + (1-t)·p₁y
- *
- * To solve, first subtitute 1-4 into 5 and 6:
- *
- * px = t·(c₂x + r₂·cos θ) + (1-t)·(c₁x + r₁·cos θ)
- * py = t·(c₂y + r₂·sin θ) + (1-t)·(c₁y + r₁·sin θ)
- *
- * Then solve each for cos θ and sin θ expressed as a function of t:
- *
- * cos θ = (-(c₂x - c₁x)·t + (px - c₁x)) / ((r₂-r₁)·t + r₁)
- * sin θ = (-(c₂y - c₁y)·t + (py - c₁y)) / ((r₂-r₁)·t + r₁)
- *
- * To simplify this a bit, we define new variables for several of the
- * common terms as shown below:
- *
- * p₂
- * p •
- * • ╲
- * · ┆ ╲r₂
- * p₁ · ┆ ╲
- * • pdy┆ ╲
- * ╲ ┆ •c₂
- * ╲r₁ ┆ · ┆
- * ╲ ·┆ ┆cdy
- * •╌╌╌╌┴╌╌╌╌╌╌╌┘
- * c₁ pdx cdx
- *
- * cdx = (c₂x - c₁x)
- * cdy = (c₂y - c₁y)
- * dr = r₂-r₁
- * pdx = px - c₁x
- * pdy = py - c₁y
- *
- * Note that cdx, cdy, and dr do not depend on point p at all, so can
- * be pre-computed for the entire gradient. The simplifed equations
- * are now:
- *
- * cos θ = (-cdx·t + pdx) / (dr·t + r₁)
- * sin θ = (-cdy·t + pdy) / (dr·t + r₁)
- *
- * Finally, to get a single function of t and eliminate the last
- * unknown θ, we use the identity sin²θ + cos²θ = 1. First, square
- * each equation, (we knew a quadratic was coming since it must be
- * possible to obtain two solutions in some cases):
- *
- * cos²θ = (cdx²t² - 2·cdx·pdx·t + pdx²) / (dr²·t² + 2·r₁·dr·t + r₁²)
- * sin²θ = (cdy²t² - 2·cdy·pdy·t + pdy²) / (dr²·t² + 2·r₁·dr·t + r₁²)
- *
- * Then add both together, set the result equal to 1, and express as a
- * standard quadratic equation in t of the form At² + Bt + C = 0
- *
- * (cdx² + cdy² - dr²)·t² - 2·(cdx·pdx + cdy·pdy + r₁·dr)·t + (pdx² + pdy² - r₁²) = 0
- *
- * In other words:
- *
- * A = cdx² + cdy² - dr²
- * B = -2·(pdx·cdx + pdy·cdy + r₁·dr)
- * C = pdx² + pdy² - r₁²
- *
- * And again, notice that A does not depend on p, so can be
- * precomputed. From here we just use the quadratic formula to solve
- * for t:
- *
- * t = (-2·B ± ⎷(B² - 4·A·C)) / 2·A
- */
- /* radial or conical */
- pixman_bool_t affine = TRUE;
- double cx = 1.;
- double cy = 0.;
- double cz = 0.;
- double rx = x + 0.5;
- double ry = y + 0.5;
- double rz = 1.;
-
- if (pict->common.transform) {
- pixman_vector_t v;
- /* reference point is the center of the pixel */
- v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1/2;
- v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1/2;
- v.vector[2] = pixman_fixed_1;
- if (!pixman_transform_point_3d (pict->common.transform, &v))
- return;
-
- cx = pict->common.transform->matrix[0][0]/65536.;
- cy = pict->common.transform->matrix[1][0]/65536.;
- cz = pict->common.transform->matrix[2][0]/65536.;
- rx = v.vector[0]/65536.;
- ry = v.vector[1]/65536.;
- rz = v.vector[2]/65536.;
- affine = pict->common.transform->matrix[2][0] == 0 && v.vector[2] == pixman_fixed_1;
- }
-
- if (pict->common.type == RADIAL) {
- radial_gradient_t *radial = (radial_gradient_t *)pict;
- if (affine) {
- while (buffer < end) {
- if (!mask || *mask++ & maskBits)
- {
- double pdx, pdy;
- double B, C;
- double det;
- double c1x = radial->c1.x / 65536.0;
- double c1y = radial->c1.y / 65536.0;
- double r1 = radial->c1.radius / 65536.0;
- pixman_fixed_48_16_t t;
-
- pdx = rx - c1x;
- pdy = ry - c1y;
-
- B = -2 * ( pdx * radial->cdx
- + pdy * radial->cdy
- + r1 * radial->dr);
- C = (pdx * pdx + pdy * pdy - r1 * r1);
-
- det = (B * B) - (4 * radial->A * C);
- if (det < 0.0)
- det = 0.0;
-
- if (radial->A < 0)
- t = (pixman_fixed_48_16_t) ((- B - sqrt(det)) / (2.0 * radial->A) * 65536);
- else
- t = (pixman_fixed_48_16_t) ((- B + sqrt(det)) / (2.0 * radial->A) * 65536);
-
- *(buffer) = _gradient_walker_pixel (&walker, t);
- }
- ++buffer;
-
- rx += cx;
- ry += cy;
- }
- } else {
- /* projective */
- while (buffer < end) {
- if (!mask || *mask++ & maskBits)
- {
- double pdx, pdy;
- double B, C;
- double det;
- double c1x = radial->c1.x / 65536.0;
- double c1y = radial->c1.y / 65536.0;
- double r1 = radial->c1.radius / 65536.0;
- pixman_fixed_48_16_t t;
- double x, y;
-
- if (rz != 0) {
- x = rx/rz;
- y = ry/rz;
- } else {
- x = y = 0.;
- }
-
- pdx = x - c1x;
- pdy = y - c1y;
-
- B = -2 * ( pdx * radial->cdx
- + pdy * radial->cdy
- + r1 * radial->dr);
- C = (pdx * pdx + pdy * pdy - r1 * r1);
-
- det = (B * B) - (4 * radial->A * C);
- if (det < 0.0)
- det = 0.0;
-
- if (radial->A < 0)
- t = (pixman_fixed_48_16_t) ((- B - sqrt(det)) / (2.0 * radial->A) * 65536);
- else
- t = (pixman_fixed_48_16_t) ((- B + sqrt(det)) / (2.0 * radial->A) * 65536);
-
- *(buffer) = _gradient_walker_pixel (&walker, t);
- }
- ++buffer;
-
- rx += cx;
- ry += cy;
- rz += cz;
- }
- }
- } else /* SourcePictTypeConical */ {
- conical_gradient_t *conical = (conical_gradient_t *)pict;
- double a = conical->angle/(180.*65536);
- if (affine) {
- rx -= conical->center.x/65536.;
- ry -= conical->center.y/65536.;
-
- while (buffer < end) {
- double angle;
-
- if (!mask || *mask++ & maskBits)
- {
- pixman_fixed_48_16_t t;
-
- angle = atan2(ry, rx) + a;
- t = (pixman_fixed_48_16_t) (angle * (65536. / (2*M_PI)));
-
- *(buffer) = _gradient_walker_pixel (&walker, t);
- }
-
- ++buffer;
- rx += cx;
- ry += cy;
- }
- } else {
- while (buffer < end) {
- double x, y;
- double angle;
-
- if (!mask || *mask++ & maskBits)
- {
- pixman_fixed_48_16_t t;
-
- if (rz != 0) {
- x = rx/rz;
- y = ry/rz;
- } else {
- x = y = 0.;
- }
- x -= conical->center.x/65536.;
- y -= conical->center.y/65536.;
- angle = atan2(y, x) + a;
- t = (pixman_fixed_48_16_t) (angle * (65536. / (2*M_PI)));
-
- *(buffer) = _gradient_walker_pixel (&walker, t);
- }
-
- ++buffer;
- rx += cx;
- ry += cy;
- rz += cz;
- }
- }
- }
- }
-}
-
-/*
- * For now, just evaluate the source picture at 32bpp and expand. We could
- * produce smoother gradients by evaluating them at higher color depth, but
- * that's a project for the future.
- */
-void pixmanFetchSourcePict64(source_image_t * pict, int x, int y, int width,
- uint64_t *buffer, uint64_t *mask, uint32_t maskBits)
-{
- uint32_t *mask8 = NULL;
-
- // Contract the mask image, if one exists, so that the 32-bit fetch function
- // can use it.
- if (mask) {
- mask8 = pixman_malloc_ab(width, sizeof(uint32_t));
- pixman_contract(mask8, mask, width);
- }
-
- // Fetch the source image into the first half of buffer.
- pixmanFetchSourcePict(pict, x, y, width, (uint32_t*)buffer, mask8,
- maskBits);
-
- // Expand from 32bpp to 64bpp in place.
- pixman_expand(buffer, (uint32_t*)buffer, PIXMAN_a8r8g8b8, width);
-
- free(mask8);
-}
diff --git a/lib/pixman/pixman/pixman-sse2.c b/lib/pixman/pixman/pixman-sse2.c
index 0f36436b6..40e222893 100644
--- a/lib/pixman/pixman/pixman-sse2.c
+++ b/lib/pixman/pixman/pixman-sse2.c
@@ -33,20 +33,10 @@
#include <mmintrin.h>
#include <xmmintrin.h> /* for _mm_shuffle_pi16 and _MM_SHUFFLE */
#include <emmintrin.h> /* for SSE2 intrinsics */
-
-#include "pixman-sse2.h"
+#include "pixman-private.h"
#ifdef USE_SSE2
-#ifdef _MSC_VER
-#undef inline
-#define inline __forceinline
-#endif
-
-#ifdef __GNUC__
-# define inline __inline__ __attribute__ ((__always_inline__))
-#endif
-
/* -------------------------------------------------------------------------------------------------
* Locals
*/
@@ -79,20 +69,20 @@ static __m128i Mask565FixG;
/* -------------------------------------------------------------------------------------------------
* SSE2 Inlines
*/
-static inline __m128i
+static force_inline __m128i
unpack_32_1x128 (uint32_t data)
{
return _mm_unpacklo_epi8 (_mm_cvtsi32_si128 (data), _mm_setzero_si128());
}
-static inline void
+static force_inline void
unpack_128_2x128 (__m128i data, __m128i* dataLo, __m128i* dataHi)
{
*dataLo = _mm_unpacklo_epi8 (data, _mm_setzero_si128 ());
*dataHi = _mm_unpackhi_epi8 (data, _mm_setzero_si128 ());
}
-static inline __m128i
+static force_inline __m128i
unpack565to8888 (__m128i lo)
{
__m128i r, g, b, rb, t;
@@ -113,7 +103,7 @@ unpack565to8888 (__m128i lo)
return _mm_or_si128 (rb, g);
}
-static inline void
+static force_inline void
unpack565_128_4x128 (__m128i data, __m128i* data0, __m128i* data1, __m128i* data2, __m128i* data3)
{
__m128i lo, hi;
@@ -128,19 +118,19 @@ unpack565_128_4x128 (__m128i data, __m128i* data0, __m128i* data1, __m128i* data
unpack_128_2x128 (hi, data2, data3);
}
-static inline uint16_t
+static force_inline uint16_t
pack565_32_16 (uint32_t pixel)
{
return (uint16_t) (((pixel>>8) & 0xf800) | ((pixel>>5) & 0x07e0) | ((pixel>>3) & 0x001f));
}
-static inline __m128i
+static force_inline __m128i
pack_2x128_128 (__m128i lo, __m128i hi)
{
return _mm_packus_epi16 (lo, hi);
}
-static inline __m128i
+static force_inline __m128i
pack565_2x128_128 (__m128i lo, __m128i hi)
{
__m128i data;
@@ -156,33 +146,44 @@ pack565_2x128_128 (__m128i lo, __m128i hi)
return _mm_or_si128 (_mm_or_si128 (_mm_or_si128 (r, g1), g2), b);
}
-static inline __m128i
+static force_inline __m128i
pack565_4x128_128 (__m128i* xmm0, __m128i* xmm1, __m128i* xmm2, __m128i* xmm3)
{
return _mm_packus_epi16 (pack565_2x128_128 (*xmm0, *xmm1), pack565_2x128_128 (*xmm2, *xmm3));
}
-static inline uint32_t
-packAlpha (__m128i x)
+static force_inline int
+isOpaque (__m128i x)
+{
+ __m128i ffs = _mm_cmpeq_epi8 (x, x);
+ return (_mm_movemask_epi8 (_mm_cmpeq_epi8 (x, ffs)) & 0x8888) == 0x8888;
+}
+
+static force_inline int
+isZero (__m128i x)
+{
+ return _mm_movemask_epi8 (_mm_cmpeq_epi8 (x, _mm_setzero_si128())) == 0xffff;
+}
+
+static force_inline int
+isTransparent (__m128i x)
{
- return _mm_cvtsi128_si32 (_mm_packus_epi16 (_mm_packus_epi16 (_mm_srli_epi32 (x, 24),
- _mm_setzero_si128 ()),
- _mm_setzero_si128 ()));
+ return (_mm_movemask_epi8 (_mm_cmpeq_epi8 (x, _mm_setzero_si128())) & 0x8888) == 0x8888;
}
-static inline __m128i
+static force_inline __m128i
expandPixel_32_1x128 (uint32_t data)
{
return _mm_shuffle_epi32 (unpack_32_1x128 (data), _MM_SHUFFLE(1, 0, 1, 0));
}
-static inline __m128i
+static force_inline __m128i
expandAlpha_1x128 (__m128i data)
{
return _mm_shufflehi_epi16 (_mm_shufflelo_epi16 (data, _MM_SHUFFLE(3, 3, 3, 3)), _MM_SHUFFLE(3, 3, 3, 3));
}
-static inline void
+static force_inline void
expandAlpha_2x128 (__m128i dataLo, __m128i dataHi, __m128i* alphaLo, __m128i* alphaHi)
{
__m128i lo, hi;
@@ -193,7 +194,7 @@ expandAlpha_2x128 (__m128i dataLo, __m128i dataHi, __m128i* alphaLo, __m128i* al
*alphaHi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(3, 3, 3, 3));
}
-static inline void
+static force_inline void
expandAlphaRev_2x128 (__m128i dataLo, __m128i dataHi, __m128i* alphaLo, __m128i* alphaHi)
{
__m128i lo, hi;
@@ -204,7 +205,7 @@ expandAlphaRev_2x128 (__m128i dataLo, __m128i dataHi, __m128i* alphaLo, __m128i*
*alphaHi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(0, 0, 0, 0));
}
-static inline void
+static force_inline void
pixMultiply_2x128 (__m128i* dataLo, __m128i* dataHi, __m128i* alphaLo, __m128i* alphaHi, __m128i* retLo, __m128i* retHi)
{
__m128i lo, hi;
@@ -217,7 +218,7 @@ pixMultiply_2x128 (__m128i* dataLo, __m128i* dataHi, __m128i* alphaLo, __m128i*
*retHi = _mm_mulhi_epu16 (hi, Mask0101);
}
-static inline void
+static force_inline void
pixAddMultiply_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaDstLo, __m128i* alphaDstHi,
__m128i* dstLo, __m128i* dstHi, __m128i* alphaSrcLo, __m128i* alphaSrcHi,
__m128i* retLo, __m128i* retHi)
@@ -237,14 +238,14 @@ pixAddMultiply_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaDstLo, __m12
*retHi = _mm_mulhi_epu16 (hi, Mask0101);
}
-static inline void
+static force_inline void
negate_2x128 (__m128i dataLo, __m128i dataHi, __m128i* negLo, __m128i* negHi)
{
*negLo = _mm_xor_si128 (dataLo, Mask00ff);
*negHi = _mm_xor_si128 (dataHi, Mask00ff);
}
-static inline void
+static force_inline void
invertColors_2x128 (__m128i dataLo, __m128i dataHi, __m128i* invLo, __m128i* invHi)
{
__m128i lo, hi;
@@ -255,7 +256,7 @@ invertColors_2x128 (__m128i dataLo, __m128i dataHi, __m128i* invLo, __m128i* inv
*invHi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(3, 0, 1, 2));
}
-static inline void
+static force_inline void
over_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaLo, __m128i* alphaHi, __m128i* dstLo, __m128i* dstHi)
{
__m128i t1, t2;
@@ -268,7 +269,7 @@ over_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaLo, __m128i* alphaHi,
*dstHi = _mm_adds_epu8 (*srcHi, *dstHi);
}
-static inline void
+static force_inline void
overRevNonPre_2x128 (__m128i srcLo, __m128i srcHi, __m128i* dstLo, __m128i* dstHi)
{
__m128i lo, hi;
@@ -286,7 +287,7 @@ overRevNonPre_2x128 (__m128i srcLo, __m128i srcHi, __m128i* dstLo, __m128i* dstH
over_2x128 (&lo, &hi, &alphaLo, &alphaHi, dstLo, dstHi);
}
-static inline void
+static force_inline void
inOver_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaLo, __m128i* alphaHi,
__m128i* maskLo, __m128i* maskHi, __m128i* dstLo, __m128i* dstHi)
{
@@ -299,48 +300,48 @@ inOver_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaLo, __m128i* alp
over_2x128 (&sLo, &sHi, &aLo, &aHi, dstLo, dstHi);
}
-static inline void
+static force_inline void
cachePrefetch (__m128i* addr)
{
_mm_prefetch (addr, _MM_HINT_T0);
}
-static inline void
+static force_inline void
cachePrefetchNext (__m128i* addr)
{
_mm_prefetch (addr + 4, _MM_HINT_T0); // 64 bytes ahead
}
/* load 4 pixels from a 16-byte boundary aligned address */
-static inline __m128i
+static force_inline __m128i
load128Aligned (__m128i* src)
{
return _mm_load_si128 (src);
}
/* load 4 pixels from a unaligned address */
-static inline __m128i
-load128Unaligned (__m128i* src)
+static force_inline __m128i
+load128Unaligned (const __m128i* src)
{
return _mm_loadu_si128 (src);
}
/* save 4 pixels using Write Combining memory on a 16-byte boundary aligned address */
-static inline void
+static force_inline void
save128WriteCombining (__m128i* dst, __m128i data)
{
_mm_stream_si128 (dst, data);
}
/* save 4 pixels on a 16-byte boundary aligned address */
-static inline void
+static force_inline void
save128Aligned (__m128i* dst, __m128i data)
{
_mm_store_si128 (dst, data);
}
/* save 4 pixels on a unaligned address */
-static inline void
+static force_inline void
save128Unaligned (__m128i* dst, __m128i data)
{
_mm_storeu_si128 (dst, data);
@@ -350,31 +351,31 @@ save128Unaligned (__m128i* dst, __m128i data)
* MMX inlines
*/
-static inline __m64
+static force_inline __m64
unpack_32_1x64 (uint32_t data)
{
return _mm_unpacklo_pi8 (_mm_cvtsi32_si64 (data), _mm_setzero_si64());
}
-static inline __m64
+static force_inline __m64
expandAlpha_1x64 (__m64 data)
{
return _mm_shuffle_pi16 (data, _MM_SHUFFLE(3, 3, 3, 3));
}
-static inline __m64
+static force_inline __m64
expandAlphaRev_1x64 (__m64 data)
{
return _mm_shuffle_pi16 (data, _MM_SHUFFLE(0, 0, 0, 0));
}
-static inline __m64
+static force_inline __m64
expandPixel_8_1x64 (uint8_t data)
{
return _mm_shuffle_pi16 (unpack_32_1x64 ((uint32_t)data), _MM_SHUFFLE(0, 0, 0, 0));
}
-static inline __m64
+static force_inline __m64
pixMultiply_1x64 (__m64 data, __m64 alpha)
{
return _mm_mulhi_pu16 (_mm_adds_pu16 (_mm_mullo_pi16 (data, alpha),
@@ -382,7 +383,7 @@ pixMultiply_1x64 (__m64 data, __m64 alpha)
xMask0101);
}
-static inline __m64
+static force_inline __m64
pixAddMultiply_1x64 (__m64* src, __m64* alphaDst, __m64* dst, __m64* alphaSrc)
{
return _mm_mulhi_pu16 (_mm_adds_pu16 (_mm_adds_pu16 (_mm_mullo_pi16 (*src, *alphaDst),
@@ -391,25 +392,25 @@ pixAddMultiply_1x64 (__m64* src, __m64* alphaDst, __m64* dst, __m64* alphaSrc)
xMask0101);
}
-static inline __m64
+static force_inline __m64
negate_1x64 (__m64 data)
{
return _mm_xor_si64 (data, xMask00ff);
}
-static inline __m64
+static force_inline __m64
invertColors_1x64 (__m64 data)
{
return _mm_shuffle_pi16 (data, _MM_SHUFFLE(3, 0, 1, 2));
}
-static inline __m64
+static force_inline __m64
over_1x64 (__m64 src, __m64 alpha, __m64 dst)
{
return _mm_adds_pu8 (src, pixMultiply_1x64 (dst, negate_1x64 (alpha)));
}
-static inline __m64
+static force_inline __m64
inOver_1x64 (__m64* src, __m64* alpha, __m64* mask, __m64* dst)
{
return over_1x64 (pixMultiply_1x64 (*src, *mask),
@@ -417,7 +418,7 @@ inOver_1x64 (__m64* src, __m64* alpha, __m64* mask, __m64* dst)
*dst);
}
-static inline __m64
+static force_inline __m64
overRevNonPre_1x64 (__m64 src, __m64 dst)
{
__m64 alpha = expandAlpha_1x64 (src);
@@ -428,7 +429,7 @@ overRevNonPre_1x64 (__m64 src, __m64 dst)
dst);
}
-static inline uint32_t
+static force_inline uint32_t
pack_1x64_32( __m64 data )
{
return _mm_cvtsi64_si32 (_mm_packs_pu16 (data, _mm_setzero_si64()));
@@ -448,7 +449,7 @@ pack_1x64_32( __m64 data )
* Note the trick here - the top word is shifted by another nibble to
* avoid it bumping into the middle word
*/
-static inline __m64
+static force_inline __m64
expand565_16_1x64 (uint16_t pixel)
{
__m64 p;
@@ -470,7 +471,7 @@ expand565_16_1x64 (uint16_t pixel)
/* -------------------------------------------------------------------------------------------------
* Compose Core transformations
*/
-static inline uint32_t
+static force_inline uint32_t
coreCombineOverUPixelsse2 (uint32_t src, uint32_t dst)
{
uint8_t a;
@@ -482,7 +483,7 @@ coreCombineOverUPixelsse2 (uint32_t src, uint32_t dst)
{
return src;
}
- else if (a)
+ else if (src)
{
ms = unpack_32_1x64 (src);
return pack_1x64_32 (over_1x64 (ms, expandAlpha_1x64 (ms), unpack_32_1x64 (dst)));
@@ -491,10 +492,62 @@ coreCombineOverUPixelsse2 (uint32_t src, uint32_t dst)
return dst;
}
-static inline void
-coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, int w)
+static force_inline uint32_t
+combine1 (const uint32_t *ps, const uint32_t *pm)
+{
+ uint32_t s = *ps;
+
+ if (pm)
+ {
+ __m64 ms, mm;
+
+ mm = unpack_32_1x64 (*pm);
+ mm = expandAlpha_1x64 (mm);
+
+ ms = unpack_32_1x64 (s);
+ ms = pixMultiply_1x64 (ms, mm);
+
+ s = pack_1x64_32 (ms);
+ }
+
+ return s;
+}
+
+static force_inline __m128i
+combine4 (const __m128i *ps, const __m128i *pm)
+{
+ __m128i xmmSrcLo, xmmSrcHi;
+ __m128i xmmMskLo, xmmMskHi;
+ __m128i s;
+
+ if (pm)
+ {
+ xmmMskLo = load128Unaligned (pm);
+
+ if (isTransparent (xmmMskLo))
+ return _mm_setzero_si128 ();
+ }
+
+ s = load128Unaligned (ps);
+
+ if (pm)
+ {
+ unpack_128_2x128 (s, &xmmSrcLo, &xmmSrcHi);
+ unpack_128_2x128 (xmmMskLo, &xmmMskLo, &xmmMskHi);
+
+ expandAlpha_2x128 (xmmMskLo, xmmMskHi, &xmmMskLo, &xmmMskHi);
+
+ pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMskLo, &xmmMskHi, &xmmSrcLo, &xmmSrcHi);
+
+ s = pack_2x128_128 (xmmSrcLo, xmmSrcHi);
+ }
+
+ return s;
+}
+
+static force_inline void
+coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w)
{
- uint32_t pa;
uint32_t s, d;
__m128i xmmDstLo, xmmDstHi;
@@ -504,39 +557,42 @@ coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, int w)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
/* Align dst on a 16-byte boundary */
while (w &&
((unsigned long)pd & 15))
{
d = *pd;
- s = *ps++;
+ s = combine1 (ps, pm);
*pd++ = coreCombineOverUPixelsse2 (s, d);
+ ps++;
+ if (pm)
+ pm++;
w--;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
/* I'm loading unaligned because I'm not sure about the address alignment. */
- xmmSrcHi = load128Unaligned ((__m128i*) ps);
-
- /* Check the alpha channel */
- pa = packAlpha (xmmSrcHi);
+ xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm);
- if (pa == 0xffffffff)
+ if (isOpaque (xmmSrcHi))
{
save128Aligned ((__m128i*)pd, xmmSrcHi);
}
- else if (pa)
+ else if (!isZero (xmmSrcHi))
{
xmmDstHi = load128Aligned ((__m128i*) pd);
@@ -554,20 +610,25 @@ coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, int w)
w -= 4;
ps += 4;
pd += 4;
+ if (pm)
+ pm += 4;
}
while (w)
{
d = *pd;
- s = *ps++;
+ s = combine1 (ps, pm);
*pd++ = coreCombineOverUPixelsse2 (s, d);
+ ps++;
+ if (pm)
+ pm++;
w--;
}
}
-static inline void
-coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, int w)
+static force_inline void
+coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w)
{
uint32_t s, d;
@@ -578,30 +639,36 @@ coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, int w)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
/* Align dst on a 16-byte boundary */
while (w &&
((unsigned long)pd & 15))
{
d = *pd;
- s = *ps++;
+ s = combine1 (ps, pm);
*pd++ = coreCombineOverUPixelsse2 (d, s);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
/* I'm loading unaligned because I'm not sure about the address alignment. */
- xmmSrcHi = load128Unaligned ((__m128i*) ps);
+ xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm);
xmmDstHi = load128Aligned ((__m128i*) pd);
unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi);
@@ -617,19 +684,24 @@ coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, int w)
w -= 4;
ps += 4;
pd += 4;
+ if (pm)
+ pm += 4;
}
while (w)
{
d = *pd;
- s = *ps++;
+ s = combine1 (ps, pm);
*pd++ = coreCombineOverUPixelsse2 (d, s);
+ ps++;
w--;
+ if (pm)
+ pm++;
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineInUPixelsse2 (uint32_t src, uint32_t dst)
{
uint32_t maska = src >> 24;
@@ -646,8 +718,8 @@ coreCombineInUPixelsse2 (uint32_t src, uint32_t dst)
return dst;
}
-static inline void
-coreCombineInUsse2 (uint32_t* pd, const uint32_t* ps, int w)
+static force_inline void
+coreCombineInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w)
{
uint32_t s, d;
@@ -657,28 +729,34 @@ coreCombineInUsse2 (uint32_t* pd, const uint32_t* ps, int w)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && ((unsigned long) pd & 15))
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineInUPixelsse2 (d, s);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
xmmDstHi = load128Aligned ((__m128i*) pd);
- xmmSrcHi = load128Unaligned ((__m128i*) ps);
+ xmmSrcHi = combine4 ((__m128i*) ps, (__m128i*) pm);
unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi);
expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmDstLo, &xmmDstHi);
@@ -691,20 +769,25 @@ coreCombineInUsse2 (uint32_t* pd, const uint32_t* ps, int w)
ps += 4;
pd += 4;
w -= 4;
+ if (pm)
+ pm += 4;
}
while (w)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineInUPixelsse2 (d, s);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
}
-static inline void
-coreCombineReverseInUsse2 (uint32_t* pd, const uint32_t* ps, int w)
+static force_inline void
+coreCombineReverseInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w)
{
uint32_t s, d;
@@ -714,28 +797,34 @@ coreCombineReverseInUsse2 (uint32_t* pd, const uint32_t* ps, int w)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && ((unsigned long) pd & 15))
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineInUPixelsse2 (s, d);
+ ps++;
w--;
+ if (pm)
+ pm++;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
xmmDstHi = load128Aligned ((__m128i*) pd);
- xmmSrcHi = load128Unaligned ((__m128i*) ps);
+ xmmSrcHi = combine4 ((__m128i*) ps, (__m128i*)pm);
unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi);
expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmSrcLo, &xmmSrcHi);
@@ -748,37 +837,47 @@ coreCombineReverseInUsse2 (uint32_t* pd, const uint32_t* ps, int w)
ps += 4;
pd += 4;
w -= 4;
+ if (pm)
+ pm += 4;
}
while (w)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineInUPixelsse2 (s, d);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
}
-static inline void
-coreCombineReverseOutUsse2 (uint32_t* pd, const uint32_t* ps, int w)
+static force_inline void
+coreCombineReverseOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w)
{
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && ((unsigned long) pd & 15))
{
- uint32_t s = *ps++;
+ uint32_t s = combine1 (ps, pm);
uint32_t d = *pd;
*pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (d), negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (s)))));
+ if (pm)
+ pm++;
+ ps++;
w--;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
@@ -788,8 +887,9 @@ coreCombineReverseOutUsse2 (uint32_t* pd, const uint32_t* ps, int w)
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
- xmmSrcHi = load128Unaligned ((__m128i*) ps);
+ xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm);
xmmDstHi = load128Aligned ((__m128i*) pd);
unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi);
@@ -804,38 +904,48 @@ coreCombineReverseOutUsse2 (uint32_t* pd, const uint32_t* ps, int w)
ps += 4;
pd += 4;
+ if (pm)
+ pm += 4;
w -= 4;
}
while (w)
{
- uint32_t s = *ps++;
+ uint32_t s = combine1 (ps, pm);
uint32_t d = *pd;
*pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (d), negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (s)))));
+ ps++;
+ if (pm)
+ pm++;
w--;
}
}
-static inline void
-coreCombineOutUsse2 (uint32_t* pd, const uint32_t* ps, int w)
+static force_inline void
+coreCombineOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w)
{
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && ((unsigned long) pd & 15))
{
- uint32_t s = *ps++;
+ uint32_t s = combine1 (ps, pm);
uint32_t d = *pd;
*pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (s), negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (d)))));
w--;
+ ps++;
+ if (pm)
+ pm++;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
@@ -845,8 +955,9 @@ coreCombineOutUsse2 (uint32_t* pd, const uint32_t* ps, int w)
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
- xmmSrcHi = load128Unaligned ((__m128i*) ps);
+ xmmSrcHi = combine4 ((__m128i*) ps, (__m128i*)pm);
xmmDstHi = load128Aligned ((__m128i*) pd);
unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi);
@@ -862,19 +973,24 @@ coreCombineOutUsse2 (uint32_t* pd, const uint32_t* ps, int w)
ps += 4;
pd += 4;
w -= 4;
+ if (pm)
+ pm += 4;
}
while (w)
{
- uint32_t s = *ps++;
+ uint32_t s = combine1 (ps, pm);
uint32_t d = *pd;
*pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (s), negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (d)))));
w--;
+ ps++;
+ if (pm)
+ pm++;
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineAtopUPixelsse2 (uint32_t src, uint32_t dst)
{
__m64 s = unpack_32_1x64 (src);
@@ -886,8 +1002,8 @@ coreCombineAtopUPixelsse2 (uint32_t src, uint32_t dst)
return pack_1x64_32 (pixAddMultiply_1x64 (&s, &da, &d, &sa));
}
-static inline void
-coreCombineAtopUsse2 (uint32_t* pd, const uint32_t* ps, int w)
+static force_inline void
+coreCombineAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w)
{
uint32_t s, d;
@@ -899,27 +1015,33 @@ coreCombineAtopUsse2 (uint32_t* pd, const uint32_t* ps, int w)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && ((unsigned long) pd & 15))
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineAtopUPixelsse2 (s, d);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
- xmmSrcHi = load128Unaligned ((__m128i*) ps);
+ xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm);
xmmDstHi = load128Aligned ((__m128i*) pd);
unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi);
@@ -939,19 +1061,24 @@ coreCombineAtopUsse2 (uint32_t* pd, const uint32_t* ps, int w)
ps += 4;
pd += 4;
w -= 4;
+ if (pm)
+ pm += 4;
}
while (w)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineAtopUPixelsse2 (s, d);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineReverseAtopUPixelsse2 (uint32_t src, uint32_t dst)
{
__m64 s = unpack_32_1x64 (src);
@@ -963,8 +1090,8 @@ coreCombineReverseAtopUPixelsse2 (uint32_t src, uint32_t dst)
return pack_1x64_32 (pixAddMultiply_1x64 (&s, &da, &d, &sa));
}
-static inline void
-coreCombineReverseAtopUsse2 (uint32_t* pd, const uint32_t* ps, int w)
+static force_inline void
+coreCombineReverseAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w)
{
uint32_t s, d;
@@ -976,27 +1103,33 @@ coreCombineReverseAtopUsse2 (uint32_t* pd, const uint32_t* ps, int w)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && ((unsigned long) pd & 15))
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineReverseAtopUPixelsse2 (s, d);
+ ps++;
w--;
+ if (pm)
+ pm++;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
- xmmSrcHi = load128Unaligned ((__m128i*) ps);
+ xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm);
xmmDstHi = load128Aligned ((__m128i*) pd);
unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi);
@@ -1016,19 +1149,24 @@ coreCombineReverseAtopUsse2 (uint32_t* pd, const uint32_t* ps, int w)
ps += 4;
pd += 4;
w -= 4;
+ if (pm)
+ pm += 4;
}
while (w)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineReverseAtopUPixelsse2 (s, d);
+ ps++;
w--;
+ if (pm)
+ pm++;
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineXorUPixelsse2 (uint32_t src, uint32_t dst)
{
__m64 s = unpack_32_1x64 (src);
@@ -1040,14 +1178,15 @@ coreCombineXorUPixelsse2 (uint32_t src, uint32_t dst)
return pack_1x64_32 (pixAddMultiply_1x64 (&s, &negD, &d, &negS));
}
-static inline void
-coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, int width)
+static force_inline void
+coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t *mask, int width)
{
int w = width;
uint32_t s, d;
uint32_t* pd = dst;
const uint32_t* ps = src;
-
+ const uint32_t* pm = mask;
+
__m128i xmmSrc, xmmSrcLo, xmmSrcHi;
__m128i xmmDst, xmmDstLo, xmmDstHi;
__m128i xmmAlphaSrcLo, xmmAlphaSrcHi;
@@ -1056,27 +1195,33 @@ coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, int width)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && ((unsigned long) pd & 15))
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineXorUPixelsse2 (s, d);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
- xmmSrc = load128Unaligned ((__m128i*) ps);
+ xmmSrc = combine4 ((__m128i*) ps, (__m128i*) pm);
xmmDst = load128Aligned ((__m128i*) pd);
unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi);
@@ -1097,34 +1242,44 @@ coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, int width)
ps += 4;
pd += 4;
w -= 4;
+ if (pm)
+ pm += 4;
}
while (w)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineXorUPixelsse2 (s, d);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
}
-static inline void
-coreCombineAddUsse2 (uint32_t* dst, const uint32_t* src, int width)
+static force_inline void
+coreCombineAddUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t* mask, int width)
{
int w = width;
uint32_t s,d;
uint32_t* pd = dst;
const uint32_t* ps = src;
+ const uint32_t* pm = mask;
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && (unsigned long)pd & 15)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
+ ps++;
+ if (pm)
+ pm++;
*pd++ = _mm_cvtsi64_si32 (_mm_adds_pu8 (_mm_cvtsi32_si64 (s), _mm_cvtsi32_si64 (d)));
w--;
}
@@ -1132,30 +1287,40 @@ coreCombineAddUsse2 (uint32_t* dst, const uint32_t* src, int width)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
+ __m128i s;
+
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
+ s = combine4((__m128i*)ps,(__m128i*)pm);
+
save128Aligned( (__m128i*)pd,
- _mm_adds_epu8( load128Unaligned((__m128i*)ps),
- load128Aligned ((__m128i*)pd)) );
+ _mm_adds_epu8( s, load128Aligned ((__m128i*)pd)) );
pd += 4;
ps += 4;
+ if (pm)
+ pm += 4;
w -= 4;
}
while (w--)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
+ ps++;
*pd++ = _mm_cvtsi64_si32 (_mm_adds_pu8 (_mm_cvtsi32_si64 (s), _mm_cvtsi32_si64 (d)));
+ if (pm)
+ pm++;
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineSaturateUPixelsse2 (uint32_t src, uint32_t dst)
{
__m64 ms = unpack_32_1x64 (src);
@@ -1171,8 +1336,8 @@ coreCombineSaturateUPixelsse2 (uint32_t src, uint32_t dst)
return pack_1x64_32 (_mm_adds_pu16 (md, ms));
}
-static inline void
-coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, int w)
+static force_inline void
+coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s,d;
@@ -1182,27 +1347,33 @@ coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, int w)
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w && (unsigned long)pd & 15)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineSaturateUPixelsse2 (s, d);
w--;
+ ps++;
+ if (pm)
+ pm++;
}
/* call prefetch hint to optimize cache load*/
cachePrefetch ((__m128i*)ps);
cachePrefetch ((__m128i*)pd);
+ cachePrefetch ((__m128i*)pm);
while (w >= 4)
{
/* fill cache line with next memory */
cachePrefetchNext ((__m128i*)ps);
cachePrefetchNext ((__m128i*)pd);
+ cachePrefetchNext ((__m128i*)pm);
xmmDst = load128Aligned ((__m128i*)pd);
- xmmSrc = load128Unaligned((__m128i*)ps);
+ xmmSrc = combine4 ((__m128i*)ps, (__m128i*)pm);
packCmp = _mm_movemask_epi8 (_mm_cmpgt_epi32 (_mm_srli_epi32 (xmmSrc, 24),
_mm_srli_epi32 (_mm_xor_si128 (xmmDst, Maskff000000), 24)));
@@ -1210,21 +1381,29 @@ coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, int w)
/* if some alpha src is grater than respective ~alpha dst */
if (packCmp)
{
- s = *ps++;
+ s = combine1 (ps++, pm);
d = *pd;
*pd++ = coreCombineSaturateUPixelsse2 (s, d);
+ if (pm)
+ pm++;
- s = *ps++;
+ s = combine1 (ps++, pm);
d = *pd;
*pd++ = coreCombineSaturateUPixelsse2 (s, d);
+ if (pm)
+ pm++;
- s = *ps++;
+ s = combine1 (ps++, pm);
d = *pd;
*pd++ = coreCombineSaturateUPixelsse2 (s, d);
+ if (pm)
+ pm++;
- s = *ps++;
+ s = combine1 (ps++, pm);
d = *pd;
*pd++ = coreCombineSaturateUPixelsse2 (s, d);
+ if (pm)
+ pm++;
}
else
{
@@ -1232,6 +1411,8 @@ coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, int w)
pd += 4;
ps += 4;
+ if (pm)
+ pm += 4;
}
w -= 4;
@@ -1239,13 +1420,16 @@ coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, int w)
while (w--)
{
- s = *ps++;
+ s = combine1 (ps, pm);
d = *pd;
*pd++ = coreCombineSaturateUPixelsse2 (s, d);
+ ps++;
+ if (pm)
+ pm++;
}
}
-static inline void
+static force_inline void
coreCombineSrcCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w)
{
uint32_t s, m;
@@ -1304,7 +1488,7 @@ coreCombineSrcCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineOverCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
{
__m64 s = unpack_32_1x64 (src);
@@ -1315,7 +1499,7 @@ coreCombineOverCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
return pack_1x64_32 (inOver_1x64 (&s, &expAlpha, &unpkMask, &unpkDst));
}
-static inline void
+static force_inline void
coreCombineOverCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -1383,7 +1567,7 @@ coreCombineOverCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineOverReverseCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
{
__m64 d = unpack_32_1x64 (dst);
@@ -1391,7 +1575,7 @@ coreCombineOverReverseCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
return pack_1x64_32(over_1x64 (d, expandAlpha_1x64 (d), pixMultiply_1x64 (unpack_32_1x64 (src), unpack_32_1x64 (mask))));
}
-static inline void
+static force_inline void
coreCombineOverReverseCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -1460,8 +1644,8 @@ coreCombineOverReverseCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *p
}
}
-static inline void
-coreCombineInCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
+static force_inline void
+coreCombineInCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -1531,8 +1715,8 @@ coreCombineInCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
}
}
-static inline void
-coreCombineInReverseCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
+static force_inline void
+coreCombineInReverseCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -1604,8 +1788,8 @@ coreCombineInReverseCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
}
}
-static inline void
-coreCombineOutCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
+static force_inline void
+coreCombineOutCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -1676,8 +1860,8 @@ coreCombineOutCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
}
}
-static inline void
-coreCombineOutReverseCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
+static force_inline void
+coreCombineOutReverseCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -1752,7 +1936,7 @@ coreCombineOutReverseCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineAtopCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
{
__m64 m = unpack_32_1x64 (mask);
@@ -1767,8 +1951,8 @@ coreCombineAtopCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
return pack_1x64_32 (pixAddMultiply_1x64 (&d, &m, &s, &da));
}
-static inline void
-coreCombineAtopCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
+static force_inline void
+coreCombineAtopCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -1844,7 +2028,7 @@ coreCombineAtopCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineReverseAtopCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
{
__m64 m = unpack_32_1x64 (mask);
@@ -1860,8 +2044,8 @@ coreCombineReverseAtopCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
return pack_1x64_32 (pixAddMultiply_1x64 (&d, &m, &s, &da));
}
-static inline void
-coreCombineReverseAtopCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
+static force_inline void
+coreCombineReverseAtopCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -1937,7 +2121,7 @@ coreCombineReverseAtopCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
}
}
-static inline uint32_t
+static force_inline uint32_t
coreCombineXorCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
{
__m64 a = unpack_32_1x64 (mask);
@@ -1954,8 +2138,8 @@ coreCombineXorCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst)
&alphaSrc));
}
-static inline void
-coreCombineXorCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
+static force_inline void
+coreCombineXorCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -2032,8 +2216,8 @@ coreCombineXorCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
}
}
-static inline void
-coreCombineAddCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
+static force_inline void
+coreCombineAddCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w)
{
uint32_t s, m, d;
@@ -2105,25 +2289,25 @@ coreCombineAddCsse2 (uint32_t *pd, uint32_t *ps, uint32_t *pm, int w)
/* -------------------------------------------------------------------------------------------------
* fbComposeSetupSSE2
*/
-static inline __m64
+static force_inline __m64
createMask_16_64 (uint16_t mask)
{
return _mm_set1_pi16 (mask);
}
-static inline __m128i
+static force_inline __m128i
createMask_16_128 (uint16_t mask)
{
return _mm_set1_epi16 (mask);
}
-static inline __m64
+static force_inline __m64
createMask_2x32_64 (uint32_t mask0, uint32_t mask1)
{
return _mm_set_pi32 (mask0, mask1);
}
-static inline __m128i
+static force_inline __m128i
createMask_2x32_128 (uint32_t mask0, uint32_t mask1)
{
return _mm_set_epi32 (mask0, mask1, mask0, mask1);
@@ -2132,256 +2316,199 @@ createMask_2x32_128 (uint32_t mask0, uint32_t mask1)
/* SSE2 code patch for fbcompose.c */
static FASTCALL void
-sse2CombineMaskU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineOverU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineReverseInUsse2 (dst, src, width);
+ coreCombineOverUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineOverU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineOverReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineOverUsse2 (dst, src, width);
+ coreCombineOverReverseUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineOverReverseU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineInU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineOverReverseUsse2 (dst, src, width);
+ coreCombineInUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineInU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineInReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineInUsse2 (dst, src, width);
+ coreCombineReverseInUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineInReverseU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineOutU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineReverseInUsse2 (dst, src, width);
+ coreCombineOutUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineOutU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineOutReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineOutUsse2 (dst, src, width);
+ coreCombineReverseOutUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineOutReverseU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineAtopU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineReverseOutUsse2 (dst, src, width);
+ coreCombineAtopUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineAtopU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineAtopUsse2 (dst, src, width);
+ coreCombineReverseAtopUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineAtopReverseU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineXorU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineReverseAtopUsse2 (dst, src, width);
+ coreCombineXorUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineXorU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineAddU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineXorUsse2 (dst, src, width);
+ coreCombineAddUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineAddU (uint32_t *dst, const uint32_t *src, int width)
+sse2CombineSaturateU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
- coreCombineAddUsse2 (dst, src, width);
+ coreCombineSaturateUsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineSaturateU (uint32_t *dst, const uint32_t *src, int width)
-{
- coreCombineSaturateUsse2 (dst, src, width);
- _mm_empty();
-}
-
-static FASTCALL void
-sse2CombineSrcC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineSrcC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineSrcCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineOverC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineOverC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineOverCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineOverReverseC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineOverReverseCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineInC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineInC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineInCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineInReverseC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineInReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineInReverseCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineOutC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineOutC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineOutCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineOutReverseC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineOutReverseCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineAtopC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineAtopC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineAtopCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineAtopReverseC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineReverseAtopCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineXorC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineXorC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineXorCsse2 (dst, src, mask, width);
_mm_empty();
}
static FASTCALL void
-sse2CombineAddC (uint32_t *dst, uint32_t *src, uint32_t *mask, int width)
+sse2CombineAddC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width)
{
coreCombineAddCsse2 (dst, src, mask, width);
_mm_empty();
}
-void
-fbComposeSetupSSE2(void)
-{
- static pixman_bool_t initialized = FALSE;
-
- if (initialized)
- return;
-
- /* check if we have SSE2 support and initialize accordingly */
- if (pixman_have_sse2())
- {
- /* SSE2 constants */
- Mask565r = createMask_2x32_128 (0x00f80000, 0x00f80000);
- Mask565g1 = createMask_2x32_128 (0x00070000, 0x00070000);
- Mask565g2 = createMask_2x32_128 (0x000000e0, 0x000000e0);
- Mask565b = createMask_2x32_128 (0x0000001f, 0x0000001f);
- MaskRed = createMask_2x32_128 (0x00f80000, 0x00f80000);
- MaskGreen = createMask_2x32_128 (0x0000fc00, 0x0000fc00);
- MaskBlue = createMask_2x32_128 (0x000000f8, 0x000000f8);
- Mask565FixRB = createMask_2x32_128 (0x00e000e0, 0x00e000e0);
- Mask565FixG = createMask_2x32_128 (0x0000c000, 0x0000c000);
- Mask0080 = createMask_16_128 (0x0080);
- Mask00ff = createMask_16_128 (0x00ff);
- Mask0101 = createMask_16_128 (0x0101);
- Maskffff = createMask_16_128 (0xffff);
- Maskff000000 = createMask_2x32_128 (0xff000000, 0xff000000);
- MaskAlpha = createMask_2x32_128 (0x00ff0000, 0x00000000);
-
- /* MMX constants */
- xMask565rgb = createMask_2x32_64 (0x000001f0, 0x003f001f);
- xMask565Unpack = createMask_2x32_64 (0x00000084, 0x04100840);
-
- xMask0080 = createMask_16_64 (0x0080);
- xMask00ff = createMask_16_64 (0x00ff);
- xMask0101 = createMask_16_64 (0x0101);
- xMaskAlpha = createMask_2x32_64 (0x00ff0000, 0x00000000);
-
- /* SSE code patch for fbcompose.c */
- pixman_composeFunctions.combineU[PIXMAN_OP_OVER] = sse2CombineOverU;
- pixman_composeFunctions.combineU[PIXMAN_OP_OVER_REVERSE] = sse2CombineOverReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_IN] = sse2CombineInU;
- pixman_composeFunctions.combineU[PIXMAN_OP_IN_REVERSE] = sse2CombineInReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_OUT] = sse2CombineOutU;
-
- pixman_composeFunctions.combineU[PIXMAN_OP_OUT_REVERSE] = sse2CombineOutReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ATOP] = sse2CombineAtopU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ATOP_REVERSE] = sse2CombineAtopReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_XOR] = sse2CombineXorU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ADD] = sse2CombineAddU;
-
- pixman_composeFunctions.combineU[PIXMAN_OP_SATURATE] = sse2CombineSaturateU;
-
- pixman_composeFunctions.combineC[PIXMAN_OP_SRC] = sse2CombineSrcC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OVER] = sse2CombineOverC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OVER_REVERSE] = sse2CombineOverReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_IN] = sse2CombineInC;
- pixman_composeFunctions.combineC[PIXMAN_OP_IN_REVERSE] = sse2CombineInReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OUT] = sse2CombineOutC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OUT_REVERSE] = sse2CombineOutReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ATOP] = sse2CombineAtopC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ATOP_REVERSE] = sse2CombineAtopReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_XOR] = sse2CombineXorC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ADD] = sse2CombineAddC;
-
- pixman_composeFunctions.combineMaskU = sse2CombineMaskU;
- }
-
- initialized = TRUE;
-
- _mm_empty();
-}
-
-
/* -------------------------------------------------------------------------------------------------
* fbCompositeSolid_nx8888
*/
-void
-fbCompositeSolid_nx8888sse2 (pixman_op_t op,
+static void
+fbCompositeSolid_nx8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src;
uint32_t *dstLine, *dst, d;
@@ -2392,7 +2519,7 @@ fbCompositeSolid_nx8888sse2 (pixman_op_t op,
fbComposeGetSolid(pSrc, src, pDst->bits.format);
- if (src >> 24 == 0)
+ if (src == 0)
return;
fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
@@ -2455,19 +2582,20 @@ fbCompositeSolid_nx8888sse2 (pixman_op_t op,
/* -------------------------------------------------------------------------------------------------
* fbCompositeSolid_nx0565
*/
-void
-fbCompositeSolid_nx0565sse2 (pixman_op_t op,
+static void
+fbCompositeSolid_nx0565sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src;
uint16_t *dstLine, *dst, d;
@@ -2478,7 +2606,7 @@ fbCompositeSolid_nx0565sse2 (pixman_op_t op,
fbComposeGetSolid(pSrc, src, pDst->bits.format);
- if (src >> 24 == 0)
+ if (src == 0)
return;
fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
@@ -2544,21 +2672,22 @@ fbCompositeSolid_nx0565sse2 (pixman_op_t op,
* fbCompositeSolidMask_nx8888x8888C
*/
-void
-fbCompositeSolidMask_nx8888x8888Csse2 (pixman_op_t op,
+static void
+fbCompositeSolidMask_nx8888x8888Csse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
- uint32_t src, srca;
+ uint32_t src;
uint32_t *dstLine, d;
uint32_t *maskLine, m;
uint32_t packCmp;
@@ -2572,8 +2701,7 @@ fbCompositeSolidMask_nx8888x8888Csse2 (pixman_op_t op,
fbComposeGetSolid(pSrc, src, pDst->bits.format);
- srca = src >> 24;
- if (srca == 0)
+ if (src == 0)
return;
fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
@@ -2587,7 +2715,7 @@ fbCompositeSolidMask_nx8888x8888Csse2 (pixman_op_t op,
while (height--)
{
int w = width;
- uint32_t *pm = (uint32_t *)maskLine;
+ const uint32_t *pm = (uint32_t *)maskLine;
uint32_t *pd = (uint32_t *)dstLine;
dstLine += dstStride;
@@ -2678,19 +2806,20 @@ fbCompositeSolidMask_nx8888x8888Csse2 (pixman_op_t op,
* fbCompositeSrc_8888x8x8888
*/
-void
-fbCompositeSrc_8888x8x8888sse2 (pixman_op_t op,
+static void
+fbCompositeSrc_8888x8x8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -2790,19 +2919,20 @@ fbCompositeSrc_8888x8x8888sse2 (pixman_op_t op,
/* -------------------------------------------------------------------------------------------------
* fbCompositeSrc_x888xnx8888
*/
-void
-fbCompositeSrc_x888xnx8888sse2 (pixman_op_t op,
+static void
+fbCompositeSrc_x888xnx8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -2902,19 +3032,20 @@ fbCompositeSrc_x888xnx8888sse2 (pixman_op_t op,
/* -------------------------------------------------------------------------------------------------
* fbCompositeSrc_8888x8888
*/
-void
-fbCompositeSrc_8888x8888sse2 (pixman_op_t op,
+static void
+fbCompositeSrc_8888x8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
int dstStride, srcStride;
uint32_t *dstLine, *dst;
@@ -2928,7 +3059,7 @@ fbCompositeSrc_8888x8888sse2 (pixman_op_t op,
while (height--)
{
- coreCombineOverUsse2 (dst, src, width);
+ coreCombineOverUsse2 (dst, src, NULL, width);
dst += dstStride;
src += srcStride;
@@ -2939,7 +3070,7 @@ fbCompositeSrc_8888x8888sse2 (pixman_op_t op,
/* -------------------------------------------------------------------------------------------------
* fbCompositeSrc_8888x0565
*/
-static inline uint16_t
+static force_inline uint16_t
fbCompositeSrc_8888x0565pixel (uint32_t src, uint16_t dst)
{
__m64 ms;
@@ -2950,19 +3081,20 @@ fbCompositeSrc_8888x0565pixel (uint32_t src, uint16_t dst)
expand565_16_1x64 (dst))));
}
-void
-fbCompositeSrc_8888x0565sse2 (pixman_op_t op,
+static void
+fbCompositeSrc_8888x0565sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint16_t *dstLine, *dst, d;
uint32_t *srcLine, *src, s;
@@ -3063,19 +3195,20 @@ fbCompositeSrc_8888x0565sse2 (pixman_op_t op,
* fbCompositeSolidMask_nx8x8888
*/
-void
-fbCompositeSolidMask_nx8x8888sse2 (pixman_op_t op,
+static void
+fbCompositeSolidMask_nx8x8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src, srca;
uint32_t *dstLine, *dst;
@@ -3093,7 +3226,7 @@ fbCompositeSolidMask_nx8x8888sse2 (pixman_op_t op,
fbComposeGetSolid(pSrc, src, pDst->bits.format);
srca = src >> 24;
- if (srca == 0)
+ if (src == 0)
return;
fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
@@ -3340,19 +3473,20 @@ pixmanFillsse2 (uint32_t *bits,
return TRUE;
}
-void
-fbCompositeSolidMaskSrc_nx8x8888sse2 (pixman_op_t op,
+static void
+fbCompositeSolidMaskSrc_nx8x8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src, srca;
uint32_t *dstLine, *dst;
@@ -3367,7 +3501,7 @@ fbCompositeSolidMaskSrc_nx8x8888sse2 (pixman_op_t op,
fbComposeGetSolid(pSrc, src, pDst->bits.format);
srca = src >> 24;
- if (srca == 0)
+ if (src == 0)
{
pixmanFillsse2 (pDst->bits.bits, pDst->bits.rowstride,
PIXMAN_FORMAT_BPP (pDst->bits.format),
@@ -3475,19 +3609,20 @@ fbCompositeSolidMaskSrc_nx8x8888sse2 (pixman_op_t op,
* fbCompositeSolidMask_nx8x0565
*/
-void
-fbCompositeSolidMask_nx8x0565sse2 (pixman_op_t op,
+static void
+fbCompositeSolidMask_nx8x0565sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t src, srca;
uint16_t *dstLine, *dst, d;
@@ -3504,7 +3639,7 @@ fbCompositeSolidMask_nx8x0565sse2 (pixman_op_t op,
fbComposeGetSolid(pSrc, src, pDst->bits.format);
srca = src >> 24;
- if (srca == 0)
+ if (src == 0)
return;
fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
@@ -3624,25 +3759,26 @@ fbCompositeSolidMask_nx8x0565sse2 (pixman_op_t op,
* fbCompositeSrc_8888RevNPx0565
*/
-void
-fbCompositeSrc_8888RevNPx0565sse2 (pixman_op_t op,
+static void
+fbCompositeSrc_8888RevNPx0565sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint16_t *dstLine, *dst, d;
uint32_t *srcLine, *src, s;
- int dstStride, srcStride;
+ int dstStride, srcStride;
uint16_t w;
- uint32_t packCmp;
+ uint32_t opaque, zero;
__m64 ms;
__m128i xmmSrc, xmmSrcLo, xmmSrcHi;
@@ -3697,34 +3833,35 @@ fbCompositeSrc_8888RevNPx0565sse2 (pixman_op_t op,
xmmSrc = load128Unaligned((__m128i*)src);
xmmDst = load128Aligned ((__m128i*)dst);
- packCmp = packAlpha (xmmSrc);
+ opaque = isOpaque (xmmSrc);
+ zero = isZero (xmmSrc);
- unpack565_128_4x128 (xmmDst, &xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3);
+ unpack565_128_4x128 (xmmDst, &xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3);
unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi);
/* preload next round*/
xmmSrc = load128Unaligned((__m128i*)(src+4));
- /* preload next round*/
-
- if (packCmp == 0xffffffff)
+
+ if (opaque)
{
invertColors_2x128 (xmmSrcLo, xmmSrcHi, &xmmDst0, &xmmDst1);
}
- else if (packCmp)
+ else if (!zero)
{
overRevNonPre_2x128 (xmmSrcLo, xmmSrcHi, &xmmDst0, &xmmDst1);
}
/* Second round */
- packCmp = packAlpha (xmmSrc);
+ opaque = isOpaque (xmmSrc);
+ zero = isZero (xmmSrc);
unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi);
- if (packCmp == 0xffffffff)
+ if (opaque)
{
invertColors_2x128 (xmmSrcLo, xmmSrcHi, &xmmDst2, &xmmDst3);
}
- else if (packCmp)
+ else if (zero)
{
overRevNonPre_2x128 (xmmSrcLo, xmmSrcHi, &xmmDst2, &xmmDst3);
}
@@ -3757,25 +3894,26 @@ fbCompositeSrc_8888RevNPx0565sse2 (pixman_op_t op,
* fbCompositeSrc_8888RevNPx8888
*/
-void
-fbCompositeSrc_8888RevNPx8888sse2 (pixman_op_t op,
+static void
+fbCompositeSrc_8888RevNPx8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *dstLine, *dst, d;
uint32_t *srcLine, *src, s;
int dstStride, srcStride;
uint16_t w;
- uint32_t packCmp;
+ uint32_t opaque, zero;
__m128i xmmSrcLo, xmmSrcHi;
__m128i xmmDstLo, xmmDstHi;
@@ -3826,17 +3964,18 @@ fbCompositeSrc_8888RevNPx8888sse2 (pixman_op_t op,
xmmSrcHi = load128Unaligned((__m128i*)src);
- packCmp = packAlpha (xmmSrcHi);
+ opaque = isOpaque (xmmSrcHi);
+ zero = isZero (xmmSrcHi);
unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi);
- if (packCmp == 0xffffffff)
+ if (opaque)
{
invertColors_2x128( xmmSrcLo, xmmSrcHi, &xmmDstLo, &xmmDstHi);
save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi));
}
- else if (packCmp)
+ else if (!zero)
{
xmmDstHi = load128Aligned ((__m128i*)dst);
@@ -3870,21 +4009,22 @@ fbCompositeSrc_8888RevNPx8888sse2 (pixman_op_t op,
* fbCompositeSolidMask_nx8888x0565C
*/
-void
-fbCompositeSolidMask_nx8888x0565Csse2 (pixman_op_t op,
+static void
+fbCompositeSolidMask_nx8888x0565Csse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
- uint32_t src, srca;
+ uint32_t src;
uint16_t *dstLine, *dst, d;
uint32_t *maskLine, *mask, m;
int dstStride, maskStride;
@@ -3899,8 +4039,7 @@ fbCompositeSolidMask_nx8888x0565Csse2 (pixman_op_t op,
fbComposeGetSolid(pSrc, src, pDst->bits.format);
- srca = src >> 24;
- if (srca == 0)
+ if (src == 0)
return;
fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
@@ -4018,19 +4157,20 @@ fbCompositeSolidMask_nx8888x0565Csse2 (pixman_op_t op,
* fbCompositeIn_nx8x8
*/
-void
-fbCompositeIn_nx8x8sse2 (pixman_op_t op,
+static void
+fbCompositeIn_nx8x8sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint8_t *dstLine, *dst;
uint8_t *maskLine, *mask;
@@ -4120,19 +4260,20 @@ fbCompositeIn_nx8x8sse2 (pixman_op_t op,
* fbCompositeIn_8x8
*/
-void
-fbCompositeIn_8x8sse2 (pixman_op_t op,
+static void
+fbCompositeIn_8x8sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint8_t *dstLine, *dst;
uint8_t *srcLine, *src;
@@ -4209,19 +4350,20 @@ fbCompositeIn_8x8sse2 (pixman_op_t op,
* fbCompositeSrcAdd_8888x8x8
*/
-void
-fbCompositeSrcAdd_8888x8x8sse2 (pixman_op_t op,
+static void
+fbCompositeSrcAdd_8888x8x8sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint8_t *dstLine, *dst;
uint8_t *maskLine, *mask;
@@ -4314,19 +4456,20 @@ fbCompositeSrcAdd_8888x8x8sse2 (pixman_op_t op,
* fbCompositeSrcAdd_8000x8000
*/
-void
-fbCompositeSrcAdd_8000x8000sse2 (pixman_op_t op,
+static void
+fbCompositeSrcAdd_8000x8000sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint8_t *dstLine, *dst;
uint8_t *srcLine, *src;
@@ -4358,7 +4501,7 @@ fbCompositeSrcAdd_8000x8000sse2 (pixman_op_t op,
w--;
}
- coreCombineAddUsse2 ((uint32_t*)dst, (uint32_t*)src, w >> 2);
+ coreCombineAddUsse2 ((uint32_t*)dst, (uint32_t*)src, NULL, w >> 2);
/* Small tail */
dst += w & 0xfffc;
@@ -4380,19 +4523,20 @@ fbCompositeSrcAdd_8000x8000sse2 (pixman_op_t op,
/* -------------------------------------------------------------------------------------------------
* fbCompositeSrcAdd_8888x8888
*/
-void
-fbCompositeSrcAdd_8888x8888sse2 (pixman_op_t op,
+static void
+fbCompositeSrcAdd_8888x8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *dstLine, *dst;
uint32_t *srcLine, *src;
@@ -4408,7 +4552,7 @@ fbCompositeSrcAdd_8888x8888sse2 (pixman_op_t op,
src = srcLine;
srcLine += srcStride;
- coreCombineAddUsse2 (dst, src, width);
+ coreCombineAddUsse2 (dst, src, NULL, width);
}
_mm_empty();
@@ -4418,16 +4562,16 @@ fbCompositeSrcAdd_8888x8888sse2 (pixman_op_t op,
* fbCompositeCopyAreasse2
*/
-pixman_bool_t
+static pixman_bool_t
pixmanBltsse2 (uint32_t *src_bits,
- uint32_t *dst_bits,
- int src_stride,
- int dst_stride,
- int src_bpp,
- int dst_bpp,
- int src_x, int src_y,
- int dst_x, int dst_y,
- int width, int height)
+ uint32_t *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
{
uint8_t * src_bytes;
uint8_t * dst_bytes;
@@ -4557,19 +4701,20 @@ pixmanBltsse2 (uint32_t *src_bits,
return TRUE;
}
-void
-fbCompositeCopyAreasse2 (pixman_op_t op,
+static void
+fbCompositeCopyAreasse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
pixmanBltsse2 (pSrc->bits.bits,
pDst->bits.bits,
@@ -4583,18 +4728,19 @@ fbCompositeCopyAreasse2 (pixman_op_t op,
#if 0
/* This code are buggy in MMX version, now the bug was translated to SSE2 version */
void
-fbCompositeOver_x888x8x8888sse2 (pixman_op_t op,
+fbCompositeOver_x888x8x8888sse2 (pixman_implementation_t *imp,
+ pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height)
+ int32_t xSrc,
+ int32_t ySrc,
+ int32_t xMask,
+ int32_t yMask,
+ int32_t xDst,
+ int32_t yDst,
+ int32_t width,
+ int32_t height)
{
uint32_t *src, *srcLine, s;
uint32_t *dst, *dstLine, d;
@@ -4721,6 +4867,249 @@ fbCompositeOver_x888x8x8888sse2 (pixman_op_t op,
_mm_empty();
}
-#endif /* #if 0 */
+#endif
+
+static const FastPathInfo sse2_fast_paths[] =
+{
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8x0565sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8x0565sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSolid_nx8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSolid_nx8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSolid_nx0565sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeSrc_8888x0565sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeSrc_8888x0565sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8x8888sse2, 0 },
+#if 0
+ /* FIXME: This code are buggy in MMX version, now the bug was translated to SSE2 version */
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeOver_x888x8x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeOver_x888x8x8888sse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeOver_x888x8x8888sse2, 0 },
+#endif
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_x888xnx8888sse2, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_x888xnx8888sse2, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSrc_x888xnx8888sse2, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSrc_x888xnx8888sse2, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888x8x8888sse2, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888x8x8888sse2, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888x8x8888sse2, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888x8x8888sse2, NEED_SOLID_MASK },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSolidMask_nx8888x8888Csse2, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSolidMask_nx8888x8888Csse2, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSolidMask_nx8888x8888Csse2, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSolidMask_nx8888x8888Csse2, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSolidMask_nx8888x0565Csse2, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSolidMask_nx8888x0565Csse2, NEED_COMPONENT_ALPHA },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_a8r8g8b8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fbCompositeSrc_8888RevNPx8888sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fbCompositeSrc_8888RevNPx0565sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_r5g6b5, fbCompositeSrc_8888RevNPx0565sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_b5g6r5, fbCompositeSrc_8888RevNPx0565sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fbCompositeSrc_8888RevNPx0565sse2, NEED_PIXBUF },
+ { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreasse2, 0 },
+ { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreasse2, 0 },
+
+ { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeSrcAdd_8000x8000sse2, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeSrcAdd_8888x8888sse2, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeSrcAdd_8888x8888sse2, 0 },
+ { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeSrcAdd_8888x8x8sse2, 0 },
+
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fbCompositeSolidMaskSrc_nx8x8888sse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fbCompositeSolidMaskSrc_nx8x8888sse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fbCompositeSolidMaskSrc_nx8x8888sse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fbCompositeSolidMaskSrc_nx8x8888sse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fbCompositeCopyAreasse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fbCompositeCopyAreasse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreasse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreasse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fbCompositeCopyAreasse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fbCompositeCopyAreasse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, fbCompositeCopyAreasse2, 0 },
+ { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, fbCompositeCopyAreasse2, 0 },
+
+ { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fbCompositeIn_8x8sse2, 0 },
+ { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fbCompositeIn_nx8x8sse2, 0 },
+
+ { PIXMAN_OP_NONE },
+};
+
+/*
+ * Work around GCC bug causing crashes in Mozilla with SSE2
+ *
+ * When using SSE2 intrinsics, gcc assumes that the stack is 16 byte
+ * aligned. Unfortunately some code, such as Mozilla and Mono contain
+ * code that aligns the stack to 4 bytes.
+ *
+ * The __force_align_arg_pointer__ makes gcc generate a prologue that
+ * realigns the stack pointer to 16 bytes.
+ *
+ * On x86-64 this is not necessary because the standard ABI already
+ * calls for a 16 byte aligned stack.
+ *
+ * See https://bugs.freedesktop.org/show_bug.cgi?id=15693
+ */
+__attribute__((__force_align_arg_pointer__))
+static void
+sse2_composite (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_image_t *dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ if (_pixman_run_fast_path (sse2_fast_paths, imp,
+ op, src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height))
+ {
+ return;
+ }
+
+ _pixman_implementation_composite (imp->delegate, op,
+ src, mask, dest,
+ src_x, src_y,
+ mask_x, mask_y,
+ dest_x, dest_y,
+ width, height);
+}
+
+__attribute__((__force_align_arg_pointer__))
+static pixman_bool_t
+sse2_blt (pixman_implementation_t *imp,
+ uint32_t *src_bits,
+ uint32_t *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
+{
+ if (!pixmanBltsse2 (
+ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
+ src_x, src_y, dst_x, dst_y, width, height))
+
+ {
+ return _pixman_implementation_blt (
+ imp->delegate,
+ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
+ src_x, src_y, dst_x, dst_y, width, height);
+ }
+
+ return TRUE;
+}
+
+__attribute__((__force_align_arg_pointer__))
+static pixman_bool_t
+sse2_fill (pixman_implementation_t *imp,
+ uint32_t *bits,
+ int stride,
+ int bpp,
+ int x,
+ int y,
+ int width,
+ int height,
+ uint32_t xor)
+{
+ if (!pixmanFillsse2 (bits, stride, bpp, x, y, width, height, xor))
+ {
+ return _pixman_implementation_fill (
+ imp->delegate, bits, stride, bpp, x, y, width, height, xor);
+ }
+
+ return TRUE;
+}
+
+pixman_implementation_t *
+_pixman_implementation_create_sse2 (pixman_implementation_t *toplevel)
+{
+ pixman_implementation_t *mmx = _pixman_implementation_create_mmx (NULL);
+ pixman_implementation_t *imp = _pixman_implementation_create (toplevel, mmx);
+
+ /* SSE2 constants */
+ Mask565r = createMask_2x32_128 (0x00f80000, 0x00f80000);
+ Mask565g1 = createMask_2x32_128 (0x00070000, 0x00070000);
+ Mask565g2 = createMask_2x32_128 (0x000000e0, 0x000000e0);
+ Mask565b = createMask_2x32_128 (0x0000001f, 0x0000001f);
+ MaskRed = createMask_2x32_128 (0x00f80000, 0x00f80000);
+ MaskGreen = createMask_2x32_128 (0x0000fc00, 0x0000fc00);
+ MaskBlue = createMask_2x32_128 (0x000000f8, 0x000000f8);
+ Mask565FixRB = createMask_2x32_128 (0x00e000e0, 0x00e000e0);
+ Mask565FixG = createMask_2x32_128 (0x0000c000, 0x0000c000);
+ Mask0080 = createMask_16_128 (0x0080);
+ Mask00ff = createMask_16_128 (0x00ff);
+ Mask0101 = createMask_16_128 (0x0101);
+ Maskffff = createMask_16_128 (0xffff);
+ Maskff000000 = createMask_2x32_128 (0xff000000, 0xff000000);
+ MaskAlpha = createMask_2x32_128 (0x00ff0000, 0x00000000);
+
+ /* MMX constants */
+ xMask565rgb = createMask_2x32_64 (0x000001f0, 0x003f001f);
+ xMask565Unpack = createMask_2x32_64 (0x00000084, 0x04100840);
+
+ xMask0080 = createMask_16_64 (0x0080);
+ xMask00ff = createMask_16_64 (0x00ff);
+ xMask0101 = createMask_16_64 (0x0101);
+ xMaskAlpha = createMask_2x32_64 (0x00ff0000, 0x00000000);
+
+ _mm_empty();
+
+ /* Set up function pointers */
+
+ /* SSE code patch for fbcompose.c */
+ imp->combine_32[PIXMAN_OP_OVER] = sse2CombineOverU;
+ imp->combine_32[PIXMAN_OP_OVER_REVERSE] = sse2CombineOverReverseU;
+ imp->combine_32[PIXMAN_OP_IN] = sse2CombineInU;
+ imp->combine_32[PIXMAN_OP_IN_REVERSE] = sse2CombineInReverseU;
+ imp->combine_32[PIXMAN_OP_OUT] = sse2CombineOutU;
+ imp->combine_32[PIXMAN_OP_OUT_REVERSE] = sse2CombineOutReverseU;
+ imp->combine_32[PIXMAN_OP_ATOP] = sse2CombineAtopU;
+ imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = sse2CombineAtopReverseU;
+ imp->combine_32[PIXMAN_OP_XOR] = sse2CombineXorU;
+ imp->combine_32[PIXMAN_OP_ADD] = sse2CombineAddU;
+
+ imp->combine_32[PIXMAN_OP_SATURATE] = sse2CombineSaturateU;
+
+ imp->combine_32_ca[PIXMAN_OP_SRC] = sse2CombineSrcC;
+ imp->combine_32_ca[PIXMAN_OP_OVER] = sse2CombineOverC;
+ imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = sse2CombineOverReverseC;
+ imp->combine_32_ca[PIXMAN_OP_IN] = sse2CombineInC;
+ imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = sse2CombineInReverseC;
+ imp->combine_32_ca[PIXMAN_OP_OUT] = sse2CombineOutC;
+ imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = sse2CombineOutReverseC;
+ imp->combine_32_ca[PIXMAN_OP_ATOP] = sse2CombineAtopC;
+ imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = sse2CombineAtopReverseC;
+ imp->combine_32_ca[PIXMAN_OP_XOR] = sse2CombineXorC;
+ imp->combine_32_ca[PIXMAN_OP_ADD] = sse2CombineAddC;
+
+ imp->composite = sse2_composite;
+ imp->blt = sse2_blt;
+ imp->fill = sse2_fill;
+
+ return imp;
+}
#endif /* USE_SSE2 */
diff --git a/lib/pixman/pixman/pixman-transformed.c b/lib/pixman/pixman/pixman-transformed.c
index 5ad92ae9f..d721b35a2 100644
--- a/lib/pixman/pixman/pixman-transformed.c
+++ b/lib/pixman/pixman/pixman-transformed.c
@@ -47,406 +47,220 @@
*/
typedef FASTCALL uint32_t (*fetchFromRegionProc)(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc32 fetch, pixman_box32_t *box);
-static inline uint32_t
-fbFetchFromNoRegion(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc32 fetch, pixman_box32_t *box)
-{
- return fetch (pict, x, y);
-}
-
-static uint32_t
-fbFetchFromNRectangles(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc32 fetch, pixman_box32_t *box)
-{
- pixman_box32_t box2;
- if (pixman_region32_contains_point (pict->common.src_clip, x, y, &box2))
- return fbFetchFromNoRegion(pict, x, y, buffer, fetch, box);
- else
- return 0;
-}
-
-static uint32_t
-fbFetchFromOneRectangle(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc32 fetch, pixman_box32_t *box)
-{
- pixman_box32_t box2 = *box;
- return ((x < box2.x1) | (x >= box2.x2) | (y < box2.y1) | (y >= box2.y2)) ?
- 0 : fbFetchFromNoRegion(pict, x, y, buffer, fetch, box);
-}
-
/*
- * Fetching Algorithms
+ * There are two properties we can make use of when fetching pixels
+ *
+ * (a) Is the source clip just the image itself?
+ *
+ * (b) Do we know the coordinates of the pixel to fetch are
+ * within the image boundaries;
+ *
+ * Source clips are almost never used, so the important case to optimize
+ * for is when src_clip is false. Since inside_bounds is statically known,
+ * the last part of the if statement will normally be optimized away.
*/
-static void
-fbFetchTransformed_Nearest_Normal(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
+static force_inline uint32_t
+do_fetch (bits_image_t *pict, int x, int y, fetchPixelProc32 fetch,
+ pixman_bool_t src_clip,
+ pixman_bool_t inside_bounds)
{
- pixman_box32_t* box = NULL;
- fetchPixelProc32 fetch;
- fetchFromRegionProc fetchFromRegion;
- int x, y, i;
-
- /* initialize the two function pointers */
- fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
-
- if(pixman_region32_n_rects (pict->common.src_clip) == 1)
- fetchFromRegion = fbFetchFromNoRegion;
- else
- fetchFromRegion = fbFetchFromNRectangles;
-
- for ( i = 0; i < width; ++i)
+ if (src_clip)
{
- if (!mask || mask[i] & maskBits)
- {
- if (!v.vector[2])
- {
- *(buffer + i) = 0;
- }
- else
- {
- if (!affine)
- {
- y = MOD(DIV(v.vector[1],v.vector[2]), pict->height);
- x = MOD(DIV(v.vector[0],v.vector[2]), pict->width);
- }
- else
- {
- y = MOD(v.vector[1]>>16, pict->height);
- x = MOD(v.vector[0]>>16, pict->width);
- }
- *(buffer + i) = fetchFromRegion(pict, x, y, buffer, fetch, box);
- }
- }
-
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
+ if (pixman_region32_contains_point (pict->common.src_clip, x, y,NULL))
+ return fetch (pict, x, y);
+ else
+ return 0;
+ }
+ else if (inside_bounds)
+ {
+ return fetch (pict, x, y);
}
-}
-
-static void
-fbFetchTransformed_Nearest_Pad(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
-{
- pixman_box32_t *box = NULL;
- fetchPixelProc32 fetch;
- fetchFromRegionProc fetchFromRegion;
- int x, y, i;
-
- /* initialize the two function pointers */
- fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
-
- if(pixman_region32_n_rects (pict->common.src_clip) == 1)
- fetchFromRegion = fbFetchFromNoRegion;
else
- fetchFromRegion = fbFetchFromNRectangles;
-
- for (i = 0; i < width; ++i)
{
- if (!mask || mask[i] & maskBits)
- {
- if (!v.vector[2])
- {
- *(buffer + i) = 0;
- }
- else
- {
- if (!affine)
- {
- y = CLIP(DIV(v.vector[1], v.vector[2]), 0, pict->height-1);
- x = CLIP(DIV(v.vector[0], v.vector[2]), 0, pict->width-1);
- }
- else
- {
- y = CLIP(v.vector[1]>>16, 0, pict->height-1);
- x = CLIP(v.vector[0]>>16, 0, pict->width-1);
- }
-
- *(buffer + i) = fetchFromRegion(pict, x, y, buffer, fetch, box);
- }
- }
-
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
+ if (x >= 0 && x < pict->width && y >= 0 && y < pict->height)
+ return fetch (pict, x, y);
+ else
+ return 0;
}
}
-static void
-fbFetchTransformed_Nearest_General(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
+/*
+ * Fetching Algorithms
+ */
+static inline uint32_t
+fetch_nearest (bits_image_t *pict,
+ fetchPixelProc32 fetch,
+ pixman_bool_t affine,
+ pixman_repeat_t repeat,
+ pixman_bool_t has_src_clip,
+ const pixman_vector_t *v)
{
- pixman_box32_t *box = NULL;
- fetchPixelProc32 fetch;
- fetchFromRegionProc fetchFromRegion;
- int x, y, i;
-
- /* initialize the two function pointers */
- fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
-
- if(pixman_region32_n_rects (pict->common.src_clip) == 1)
+ if (!v->vector[2])
{
- box = &(pict->common.src_clip->extents);
- fetchFromRegion = fbFetchFromOneRectangle;
+ return 0;
}
else
{
- fetchFromRegion = fbFetchFromNRectangles;
- }
-
- for (i = 0; i < width; ++i) {
- if (!mask || mask[i] & maskBits)
- {
- if (!v.vector[2]) {
- *(buffer + i) = 0;
- } else {
- if (!affine) {
- y = DIV(v.vector[1],v.vector[2]);
- x = DIV(v.vector[0],v.vector[2]);
- } else {
- y = v.vector[1]>>16;
- x = v.vector[0]>>16;
- }
- *(buffer + i) = fetchFromRegion(pict, x, y, buffer, fetch, box);
- }
- }
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
- }
-}
-
-static void
-fbFetchTransformed_Bilinear_Normal(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
-{
- pixman_box32_t *box = NULL;
- fetchPixelProc32 fetch;
- fetchFromRegionProc fetchFromRegion;
- int i;
-
- /* initialize the two function pointers */
- fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
-
- if(pixman_region32_n_rects (pict->common.src_clip) == 1)
- fetchFromRegion = fbFetchFromNoRegion;
- else
- fetchFromRegion = fbFetchFromNRectangles;
+ int x, y;
+ pixman_bool_t inside_bounds;
- for (i = 0; i < width; ++i) {
- if (!mask || mask[i] & maskBits)
- {
- if (!v.vector[2]) {
- *(buffer + i) = 0;
- } else {
- int x1, x2, y1, y2, distx, idistx, disty, idisty;
- uint32_t tl, tr, bl, br, r;
- uint32_t ft, fb;
-
- if (!affine) {
- pixman_fixed_48_16_t div;
- div = ((pixman_fixed_48_16_t)v.vector[0] << 16)/v.vector[2];
- x1 = div >> 16;
- distx = ((pixman_fixed_t)div >> 8) & 0xff;
- div = ((pixman_fixed_48_16_t)v.vector[1] << 16)/v.vector[2];
- y1 = div >> 16;
- disty = ((pixman_fixed_t)div >> 8) & 0xff;
- } else {
- x1 = v.vector[0] >> 16;
- distx = (v.vector[0] >> 8) & 0xff;
- y1 = v.vector[1] >> 16;
- disty = (v.vector[1] >> 8) & 0xff;
- }
- x2 = x1 + 1;
- y2 = y1 + 1;
-
- idistx = 256 - distx;
- idisty = 256 - disty;
-
- x1 = MOD (x1, pict->width);
- x2 = MOD (x2, pict->width);
- y1 = MOD (y1, pict->height);
- y2 = MOD (y2, pict->height);
-
- tl = fetchFromRegion(pict, x1, y1, buffer, fetch, box);
- tr = fetchFromRegion(pict, x2, y1, buffer, fetch, box);
- bl = fetchFromRegion(pict, x1, y2, buffer, fetch, box);
- br = fetchFromRegion(pict, x2, y2, buffer, fetch, box);
-
- ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
- fb = FbGet8(bl,0) * idistx + FbGet8(br,0) * distx;
- r = (((ft * idisty + fb * disty) >> 16) & 0xff);
- ft = FbGet8(tl,8) * idistx + FbGet8(tr,8) * distx;
- fb = FbGet8(bl,8) * idistx + FbGet8(br,8) * distx;
- r |= (((ft * idisty + fb * disty) >> 8) & 0xff00);
- ft = FbGet8(tl,16) * idistx + FbGet8(tr,16) * distx;
- fb = FbGet8(bl,16) * idistx + FbGet8(br,16) * distx;
- r |= (((ft * idisty + fb * disty)) & 0xff0000);
- ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
- fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
- r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
- *(buffer + i) = r;
- }
- }
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
- }
-}
-
-static void
-fbFetchTransformed_Bilinear_Pad(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
-{
- pixman_box32_t *box = NULL;
- fetchPixelProc32 fetch;
- fetchFromRegionProc fetchFromRegion;
- int i;
-
- /* initialize the two function pointers */
- fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
-
- if(pixman_region32_n_rects (pict->common.src_clip) == 1)
- fetchFromRegion = fbFetchFromNoRegion;
- else
- fetchFromRegion = fbFetchFromNRectangles;
+ if (!affine)
+ {
+ x = DIV(v->vector[0], v->vector[2]);
+ y = DIV(v->vector[1], v->vector[2]);
+ }
+ else
+ {
+ x = v->vector[0]>>16;
+ y = v->vector[1]>>16;
+ }
- for (i = 0; i < width; ++i) {
- if (!mask || mask[i] & maskBits)
- {
- if (!v.vector[2]) {
- *(buffer + i) = 0;
- } else {
- int x1, x2, y1, y2, distx, idistx, disty, idisty;
- uint32_t tl, tr, bl, br, r;
- uint32_t ft, fb;
+ switch (repeat)
+ {
+ case PIXMAN_REPEAT_NORMAL:
+ x = MOD (x, pict->width);
+ y = MOD (y, pict->height);
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_PAD:
+ x = CLIP (x, 0, pict->width-1);
+ y = CLIP (y, 0, pict->height-1);
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_REFLECT:
+ x = MOD (x, pict->width * 2);
+ if (x >= pict->width)
+ x = pict->width * 2 - x - 1;
+ y = MOD (y, pict->height * 2);
+ if (y >= pict->height)
+ y = pict->height * 2 - y - 1;
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_NONE:
+ inside_bounds = FALSE;
+ break;
+
+ default:
+ return 0;
+ }
- if (!affine) {
- pixman_fixed_48_16_t div;
- div = ((pixman_fixed_48_16_t)v.vector[0] << 16)/v.vector[2];
- x1 = div >> 16;
- distx = ((pixman_fixed_t)div >> 8) & 0xff;
- div = ((pixman_fixed_48_16_t)v.vector[1] << 16)/v.vector[2];
- y1 = div >> 16;
- disty = ((pixman_fixed_t)div >> 8) & 0xff;
- } else {
- x1 = v.vector[0] >> 16;
- distx = (v.vector[0] >> 8) & 0xff;
- y1 = v.vector[1] >> 16;
- disty = (v.vector[1] >> 8) & 0xff;
- }
- x2 = x1 + 1;
- y2 = y1 + 1;
-
- idistx = 256 - distx;
- idisty = 256 - disty;
-
- x1 = CLIP (x1, 0, pict->width-1);
- x2 = CLIP (x2, 0, pict->width-1);
- y1 = CLIP (y1, 0, pict->height-1);
- y2 = CLIP (y2, 0, pict->height-1);
-
- tl = fetchFromRegion(pict, x1, y1, buffer, fetch, box);
- tr = fetchFromRegion(pict, x2, y1, buffer, fetch, box);
- bl = fetchFromRegion(pict, x1, y2, buffer, fetch, box);
- br = fetchFromRegion(pict, x2, y2, buffer, fetch, box);
-
- ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
- fb = FbGet8(bl,0) * idistx + FbGet8(br,0) * distx;
- r = (((ft * idisty + fb * disty) >> 16) & 0xff);
- ft = FbGet8(tl,8) * idistx + FbGet8(tr,8) * distx;
- fb = FbGet8(bl,8) * idistx + FbGet8(br,8) * distx;
- r |= (((ft * idisty + fb * disty) >> 8) & 0xff00);
- ft = FbGet8(tl,16) * idistx + FbGet8(tr,16) * distx;
- fb = FbGet8(bl,16) * idistx + FbGet8(br,16) * distx;
- r |= (((ft * idisty + fb * disty)) & 0xff0000);
- ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
- fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
- r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
- *(buffer + i) = r;
- }
- }
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
+ return do_fetch (pict, x, y, fetch, has_src_clip, inside_bounds);
}
}
-static void
-fbFetchTransformed_Bilinear_General(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
+static inline uint32_t
+fetch_bilinear (bits_image_t *pict,
+ fetchPixelProc32 fetch,
+ pixman_bool_t affine,
+ pixman_repeat_t repeat,
+ pixman_bool_t has_src_clip,
+ const pixman_vector_t *v)
{
- pixman_box32_t *box = NULL;
- fetchPixelProc32 fetch;
- fetchFromRegionProc fetchFromRegion;
- int i;
-
- /* initialize the two function pointers */
- fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
-
- if(pixman_region32_n_rects (pict->common.src_clip) == 1)
+ if (!v->vector[2])
{
- box = &(pict->common.src_clip->extents);
- fetchFromRegion = fbFetchFromOneRectangle;
+ return 0;
}
else
{
- fetchFromRegion = fbFetchFromNRectangles;
- }
-
- for (i = 0; i < width; ++i)
- {
- if (!mask || mask[i] & maskBits)
- {
- if (!v.vector[2]) {
- *(buffer + i) = 0;
- } else {
- int x1, x2, y1, y2, distx, idistx, disty, idisty;
- uint32_t tl, tr, bl, br, r;
- uint32_t ft, fb;
-
- if (!affine) {
- pixman_fixed_48_16_t div;
- div = ((pixman_fixed_48_16_t)v.vector[0] << 16)/v.vector[2];
- x1 = div >> 16;
- distx = ((pixman_fixed_t)div >> 8) & 0xff;
- div = ((pixman_fixed_48_16_t)v.vector[1] << 16)/v.vector[2];
- y1 = div >> 16;
- disty = ((pixman_fixed_t)div >> 8) & 0xff;
- } else {
- x1 = v.vector[0] >> 16;
- distx = (v.vector[0] >> 8) & 0xff;
- y1 = v.vector[1] >> 16;
- disty = (v.vector[1] >> 8) & 0xff;
- }
- x2 = x1 + 1;
- y2 = y1 + 1;
-
- idistx = 256 - distx;
- idisty = 256 - disty;
-
- tl = fetchFromRegion(pict, x1, y1, buffer, fetch, box);
- tr = fetchFromRegion(pict, x2, y1, buffer, fetch, box);
- bl = fetchFromRegion(pict, x1, y2, buffer, fetch, box);
- br = fetchFromRegion(pict, x2, y2, buffer, fetch, box);
-
- ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
- fb = FbGet8(bl,0) * idistx + FbGet8(br,0) * distx;
- r = (((ft * idisty + fb * disty) >> 16) & 0xff);
- ft = FbGet8(tl,8) * idistx + FbGet8(tr,8) * distx;
- fb = FbGet8(bl,8) * idistx + FbGet8(br,8) * distx;
- r |= (((ft * idisty + fb * disty) >> 8) & 0xff00);
- ft = FbGet8(tl,16) * idistx + FbGet8(tr,16) * distx;
- fb = FbGet8(bl,16) * idistx + FbGet8(br,16) * distx;
- r |= (((ft * idisty + fb * disty)) & 0xff0000);
- ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
- fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
- r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
- *(buffer + i) = r;
- }
- }
+ int x1, x2, y1, y2, distx, idistx, disty, idisty;
+ uint32_t tl, tr, bl, br, r;
+ uint32_t ft, fb;
+ pixman_bool_t inside_bounds;
+
+ if (!affine)
+ {
+ pixman_fixed_48_16_t div;
+ div = ((pixman_fixed_48_16_t)v->vector[0] << 16)/v->vector[2];
+ x1 = div >> 16;
+ distx = ((pixman_fixed_t)div >> 8) & 0xff;
+ div = ((pixman_fixed_48_16_t)v->vector[1] << 16)/v->vector[2];
+ y1 = div >> 16;
+ disty = ((pixman_fixed_t)div >> 8) & 0xff;
+ }
+ else
+ {
+ x1 = v->vector[0] >> 16;
+ distx = (v->vector[0] >> 8) & 0xff;
+ y1 = v->vector[1] >> 16;
+ disty = (v->vector[1] >> 8) & 0xff;
+ }
+ x2 = x1 + 1;
+ y2 = y1 + 1;
+
+ idistx = 256 - distx;
+ idisty = 256 - disty;
- v.vector[0] += unit.vector[0];
- v.vector[1] += unit.vector[1];
- v.vector[2] += unit.vector[2];
+ switch (repeat)
+ {
+ case PIXMAN_REPEAT_NORMAL:
+ x1 = MOD (x1, pict->width);
+ x2 = MOD (x2, pict->width);
+ y1 = MOD (y1, pict->height);
+ y2 = MOD (y2, pict->height);
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_PAD:
+ x1 = CLIP (x1, 0, pict->width-1);
+ x2 = CLIP (x2, 0, pict->width-1);
+ y1 = CLIP (y1, 0, pict->height-1);
+ y2 = CLIP (y2, 0, pict->height-1);
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_REFLECT:
+ x1 = MOD (x1, pict->width * 2);
+ if (x1 >= pict->width)
+ x1 = pict->width * 2 - x1 - 1;
+ x2 = MOD (x2, pict->width * 2);
+ if (x2 >= pict->width)
+ x2 = pict->width * 2 - x2 - 1;
+ y1 = MOD (y1, pict->height * 2);
+ if (y1 >= pict->height)
+ y1 = pict->height * 2 - y1 - 1;
+ y2 = MOD (y2, pict->height * 2);
+ if (y2 >= pict->height)
+ y2 = pict->height * 2 - y2 - 1;
+ inside_bounds = TRUE;
+ break;
+
+ case PIXMAN_REPEAT_NONE:
+ inside_bounds = FALSE;
+ break;
+
+ default:
+ return 0;
+ }
+
+ tl = do_fetch(pict, x1, y1, fetch, has_src_clip, inside_bounds);
+ tr = do_fetch(pict, x2, y1, fetch, has_src_clip, inside_bounds);
+ bl = do_fetch(pict, x1, y2, fetch, has_src_clip, inside_bounds);
+ br = do_fetch(pict, x2, y2, fetch, has_src_clip, inside_bounds);
+
+ ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
+ fb = FbGet8(bl,0) * idistx + FbGet8(br,0) * distx;
+ r = (((ft * idisty + fb * disty) >> 16) & 0xff);
+ ft = FbGet8(tl,8) * idistx + FbGet8(tr,8) * distx;
+ fb = FbGet8(bl,8) * idistx + FbGet8(br,8) * distx;
+ r |= (((ft * idisty + fb * disty) >> 8) & 0xff00);
+ ft = FbGet8(tl,16) * idistx + FbGet8(tr,16) * distx;
+ fb = FbGet8(bl,16) * idistx + FbGet8(br,16) * distx;
+ r |= (((ft * idisty + fb * disty)) & 0xff0000);
+ ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
+ fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
+ r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
+
+ return r;
}
}
static void
-fbFetchTransformed_Convolution(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
+fbFetchTransformed_Convolution(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits,
+ pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
{
- pixman_box32_t dummy;
fetchPixelProc32 fetch;
int i;
@@ -492,6 +306,11 @@ fbFetchTransformed_Convolution(bits_image_t * pict, int width, uint32_t *buffer,
case PIXMAN_REPEAT_PAD:
ty = CLIP (y, 0, pict->height-1);
break;
+ case PIXMAN_REPEAT_REFLECT:
+ ty = MOD (y, pict->height * 2);
+ if (ty >= pict->height)
+ ty = pict->height * 2 - ty - 1;
+ break;
default:
ty = y;
}
@@ -505,10 +324,15 @@ fbFetchTransformed_Convolution(bits_image_t * pict, int width, uint32_t *buffer,
case PIXMAN_REPEAT_PAD:
tx = CLIP (x, 0, pict->width-1);
break;
+ case PIXMAN_REPEAT_REFLECT:
+ tx = MOD (x, pict->width * 2);
+ if (tx >= pict->width)
+ tx = pict->width * 2 - tx - 1;
+ break;
default:
tx = x;
}
- if (pixman_region32_contains_point (pict->common.src_clip, tx, ty, &dummy)) {
+ if (pixman_region32_contains_point (pict->common.src_clip, tx, ty, NULL)) {
uint32_t c = fetch(pict, tx, ty);
srtot += Red(c) * *p;
@@ -582,7 +406,8 @@ ACCESS(fbFetchTransformed)(bits_image_t * pict, int x, int y, int width,
unit.vector[0] = pict->common.transform->matrix[0][0];
unit.vector[1] = pict->common.transform->matrix[1][0];
unit.vector[2] = pict->common.transform->matrix[2][0];
- affine = v.vector[2] == pixman_fixed_1 && unit.vector[2] == 0;
+
+ affine = (v.vector[2] == pixman_fixed_1 && unit.vector[2] == 0);
}
else
{
@@ -591,76 +416,62 @@ ACCESS(fbFetchTransformed)(bits_image_t * pict, int x, int y, int width,
unit.vector[2] = 0;
}
- /* This allows filtering code to pretend that pixels are located at integer coordinates */
- adjust (&v, &unit, -(pixman_fixed_1 / 2));
-
if (pict->common.filter == PIXMAN_FILTER_NEAREST || pict->common.filter == PIXMAN_FILTER_FAST)
{
+ fetchPixelProc32 fetch;
+ pixman_bool_t src_clip;
+ int i;
+
/* Round down to closest integer, ensuring that 0.5 rounds to 0, not 1 */
- adjust (&v, &unit, pixman_fixed_1 / 2 - pixman_fixed_e);
+ adjust (&v, &unit, - pixman_fixed_e);
+
+ fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
- if (pict->common.repeat == PIXMAN_REPEAT_NORMAL)
- {
- fbFetchTransformed_Nearest_Normal(pict, width, buffer, mask, maskBits, affine, v, unit);
- }
- else if (pict->common.repeat == PIXMAN_REPEAT_PAD)
- {
- fbFetchTransformed_Nearest_Pad(pict, width, buffer, mask, maskBits, affine, v, unit);
- }
- else
- {
- fbFetchTransformed_Nearest_General(pict, width, buffer, mask, maskBits, affine, v, unit);
- }
- } else if (pict->common.filter == PIXMAN_FILTER_BILINEAR ||
+ src_clip = pict->common.src_clip != &(pict->common.full_region);
+
+ for ( i = 0; i < width; ++i)
+ {
+ if (!mask || mask[i] & maskBits)
+ *(buffer + i) = fetch_nearest (pict, fetch, affine, pict->common.repeat, src_clip, &v);
+
+ v.vector[0] += unit.vector[0];
+ v.vector[1] += unit.vector[1];
+ v.vector[2] += unit.vector[2];
+ }
+ }
+ else if (pict->common.filter == PIXMAN_FILTER_BILINEAR ||
pict->common.filter == PIXMAN_FILTER_GOOD ||
pict->common.filter == PIXMAN_FILTER_BEST)
{
- if (pict->common.repeat == PIXMAN_REPEAT_NORMAL)
- {
- fbFetchTransformed_Bilinear_Normal(pict, width, buffer, mask, maskBits, affine, v, unit);
- }
- else if (pict->common.repeat == PIXMAN_REPEAT_PAD)
- {
- fbFetchTransformed_Bilinear_Pad(pict, width, buffer, mask, maskBits, affine, v, unit);
- }
- else
- {
- fbFetchTransformed_Bilinear_General(pict, width, buffer, mask, maskBits, affine, v, unit);
- }
+ pixman_bool_t src_clip;
+ fetchPixelProc32 fetch;
+ int i;
+
+ /* Let the bilinear code pretend that pixels fall on integer coordinaters */
+ adjust (&v, &unit, -(pixman_fixed_1 / 2));
+
+ fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
+ src_clip = pict->common.src_clip != &(pict->common.full_region);
+
+ for (i = 0; i < width; ++i)
+ {
+ if (!mask || mask[i] & maskBits)
+ *(buffer + i) = fetch_bilinear (pict, fetch, affine, pict->common.repeat, src_clip, &v);
+
+ v.vector[0] += unit.vector[0];
+ v.vector[1] += unit.vector[1];
+ v.vector[2] += unit.vector[2];
+ }
}
else if (pict->common.filter == PIXMAN_FILTER_CONVOLUTION)
{
/* Round to closest integer, ensuring that 0.5 rounds to 0, not 1 */
- adjust (&v, &unit, pixman_fixed_1 / 2 - pixman_fixed_e);
+ adjust (&v, &unit, - pixman_fixed_e);
fbFetchTransformed_Convolution(pict, width, buffer, mask, maskBits, affine, v, unit);
}
}
-void
-ACCESS(fbFetchTransformed64)(bits_image_t * pict, int x, int y, int width,
- uint64_t *buffer, uint64_t *mask, uint32_t maskBits)
-{
- // TODO: Don't lose precision for wide pictures!
- uint32_t *mask8 = NULL;
-
- // Contract the mask image, if one exists, so that the 32-bit fetch function
- // can use it.
- if (mask) {
- mask8 = pixman_malloc_ab(width, sizeof(uint32_t));
- pixman_contract(mask8, mask, width);
- }
-
- // Fetch the image into the first half of buffer.
- ACCESS(fbFetchTransformed)(pict, x, y, width, (uint32_t*)buffer, mask8,
- maskBits);
-
- // Expand from 32bpp to 64bpp in place.
- pixman_expand(buffer, (uint32_t*)buffer, PIXMAN_a8r8g8b8, width);
-
- free(mask8);
-}
-
#define SCANLINE_BUFFER_LENGTH 2048
void
@@ -697,117 +508,3 @@ ACCESS(fbFetchExternalAlpha)(bits_image_t * pict, int x, int y, int width,
if (alpha_buffer != _alpha_buffer)
free(alpha_buffer);
}
-
-void
-ACCESS(fbFetchExternalAlpha64)(bits_image_t * pict, int x, int y, int width,
- uint64_t *buffer, uint64_t *mask,
- uint32_t maskBits)
-{
- int i;
- uint64_t _alpha_buffer[SCANLINE_BUFFER_LENGTH];
- uint64_t *alpha_buffer = _alpha_buffer;
- uint64_t maskBits64;
-
- if (!pict->common.alpha_map) {
- ACCESS(fbFetchTransformed64) (pict, x, y, width, buffer, mask, maskBits);
- return;
- }
- if (width > SCANLINE_BUFFER_LENGTH)
- alpha_buffer = (uint64_t *) pixman_malloc_ab (width, sizeof(uint64_t));
-
- ACCESS(fbFetchTransformed64)(pict, x, y, width, buffer, mask, maskBits);
- ACCESS(fbFetchTransformed64)((bits_image_t *)pict->common.alpha_map, x - pict->common.alpha_origin.x,
- y - pict->common.alpha_origin.y, width,
- alpha_buffer, mask, maskBits);
-
- pixman_expand(&maskBits64, &maskBits, PIXMAN_a8r8g8b8, 1);
-
- for (i = 0; i < width; ++i) {
- if (!mask || mask[i] & maskBits64)
- {
- int64_t a = alpha_buffer[i]>>48;
- *(buffer + i) = (a << 48)
- | (div_65535(Red64(*(buffer + i)) * a) << 32)
- | (div_65535(Green64(*(buffer + i)) * a) << 16)
- | (div_65535(Blue64(*(buffer + i)) * a));
- }
- }
-
- if (alpha_buffer != _alpha_buffer)
- free(alpha_buffer);
-}
-
-void
-ACCESS(fbStoreExternalAlpha)(bits_image_t * pict, int x, int y, int width,
- uint32_t *buffer)
-{
- uint32_t *bits, *alpha_bits;
- int32_t stride, astride;
- int ax, ay;
- storeProc32 store;
- storeProc32 astore;
- const pixman_indexed_t * indexed = pict->indexed;
- const pixman_indexed_t * aindexed;
-
- if (!pict->common.alpha_map) {
- // XXX[AGP]: This should never happen!
- // fbStore(pict, x, y, width, buffer);
- abort();
- return;
- }
-
- store = ACCESS(pixman_storeProcForPicture32)(pict);
- astore = ACCESS(pixman_storeProcForPicture32)(pict->common.alpha_map);
- aindexed = pict->common.alpha_map->indexed;
-
- ax = x;
- ay = y;
-
- bits = pict->bits;
- stride = pict->rowstride;
-
- alpha_bits = pict->common.alpha_map->bits;
- astride = pict->common.alpha_map->rowstride;
-
- bits += y*stride;
- alpha_bits += (ay - pict->common.alpha_origin.y)*astride;
-
-
- store((pixman_image_t *)pict, bits, buffer, x, width, indexed);
- astore((pixman_image_t *)pict->common.alpha_map,
- alpha_bits, buffer, ax - pict->common.alpha_origin.x, width, aindexed);
-}
-
-void
-ACCESS(fbStoreExternalAlpha64)(bits_image_t * pict, int x, int y, int width,
- uint64_t *buffer)
-{
- uint32_t *bits, *alpha_bits;
- int32_t stride, astride;
- int ax, ay;
- storeProc64 store;
- storeProc64 astore;
- const pixman_indexed_t * indexed = pict->indexed;
- const pixman_indexed_t * aindexed;
-
- store = ACCESS(pixman_storeProcForPicture64)(pict);
- astore = ACCESS(pixman_storeProcForPicture64)(pict->common.alpha_map);
- aindexed = pict->common.alpha_map->indexed;
-
- ax = x;
- ay = y;
-
- bits = pict->bits;
- stride = pict->rowstride;
-
- alpha_bits = pict->common.alpha_map->bits;
- astride = pict->common.alpha_map->rowstride;
-
- bits += y*stride;
- alpha_bits += (ay - pict->common.alpha_origin.y)*astride;
-
-
- store((pixman_image_t *)pict, bits, buffer, x, width, indexed);
- astore((pixman_image_t *)pict->common.alpha_map,
- alpha_bits, buffer, ax - pict->common.alpha_origin.x, width, aindexed);
-}
diff --git a/lib/pixman/pixman/pixman-utils.c b/lib/pixman/pixman/pixman-utils.c
index 21d9a2fd2..ffb14445e 100644
--- a/lib/pixman/pixman/pixman-utils.c
+++ b/lib/pixman/pixman/pixman-utils.c
@@ -28,176 +28,6 @@
#include <stdlib.h>
#include "pixman-private.h"
-#include "pixman-mmx.h"
-
-PIXMAN_EXPORT pixman_bool_t
-pixman_transform_point_3d (pixman_transform_t *transform,
- pixman_vector_t *vector)
-{
- pixman_vector_t result;
- int i, j;
- pixman_fixed_32_32_t partial;
- pixman_fixed_48_16_t v;
-
- for (j = 0; j < 3; j++)
- {
- v = 0;
- for (i = 0; i < 3; i++)
- {
- partial = ((pixman_fixed_48_16_t) transform->matrix[j][i] *
- (pixman_fixed_48_16_t) vector->vector[i]);
- v += partial >> 16;
- }
-
- if (v > pixman_max_fixed_48_16 || v < pixman_min_fixed_48_16)
- return FALSE;
-
- result.vector[j] = (pixman_fixed_48_16_t) v;
- }
-
- if (!result.vector[2])
- return FALSE;
-
- *vector = result;
- return TRUE;
-}
-
-PIXMAN_EXPORT pixman_bool_t
-pixman_blt (uint32_t *src_bits,
- uint32_t *dst_bits,
- int src_stride,
- int dst_stride,
- int src_bpp,
- int dst_bpp,
- int src_x, int src_y,
- int dst_x, int dst_y,
- int width, int height)
-{
-#ifdef USE_MMX
- if (pixman_have_mmx())
- {
- return pixman_blt_mmx (src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
- src_x, src_y, dst_x, dst_y, width, height);
- }
- else
-#endif
- return FALSE;
-}
-
-static void
-pixman_fill8 (uint32_t *bits,
- int stride,
- int x,
- int y,
- int width,
- int height,
- uint32_t xor)
-{
- int byte_stride = stride * (int) sizeof (uint32_t);
- uint8_t *dst = (uint8_t *) bits;
- uint8_t v = xor & 0xff;
- int i;
-
- dst = dst + y * byte_stride + x;
-
- while (height--)
- {
- for (i = 0; i < width; ++i)
- dst[i] = v;
-
- dst += byte_stride;
- }
-}
-
-static void
-pixman_fill16 (uint32_t *bits,
- int stride,
- int x,
- int y,
- int width,
- int height,
- uint32_t xor)
-{
- int short_stride = (stride * (int) sizeof (uint32_t)) / (int) sizeof (uint16_t);
- uint16_t *dst = (uint16_t *)bits;
- uint16_t v = xor & 0xffff;
- int i;
-
- dst = dst + y * short_stride + x;
-
- while (height--)
- {
- for (i = 0; i < width; ++i)
- dst[i] = v;
-
- dst += short_stride;
- }
-}
-
-static void
-pixman_fill32 (uint32_t *bits,
- int stride,
- int x,
- int y,
- int width,
- int height,
- uint32_t xor)
-{
- int i;
-
- bits = bits + y * stride + x;
-
- while (height--)
- {
- for (i = 0; i < width; ++i)
- bits[i] = xor;
-
- bits += stride;
- }
-}
-
-PIXMAN_EXPORT pixman_bool_t
-pixman_fill (uint32_t *bits,
- int stride,
- int bpp,
- int x,
- int y,
- int width,
- int height,
- uint32_t xor)
-{
-#if 0
- printf ("filling: %d %d %d %d (stride: %d, bpp: %d) pixel: %x\n",
- x, y, width, height, stride, bpp, xor);
-#endif
-
-#ifdef USE_MMX
- if (!pixman_have_mmx() || !pixman_fill_mmx (bits, stride, bpp, x, y, width, height, xor))
-#endif
- {
- switch (bpp)
- {
- case 8:
- pixman_fill8 (bits, stride, x, y, width, height, xor);
- break;
-
- case 16:
- pixman_fill16 (bits, stride, x, y, width, height, xor);
- break;
-
- case 32:
- pixman_fill32 (bits, stride, x, y, width, height, xor);
- break;
-
- default:
- return FALSE;
- break;
- }
- }
-
- return TRUE;
-}
-
/*
* Compute the smallest value no less than y which is on a
@@ -213,8 +43,13 @@ pixman_sample_ceil_y (pixman_fixed_t y, int n)
f = ((f + Y_FRAC_FIRST(n)) / STEP_Y_SMALL(n)) * STEP_Y_SMALL(n) + Y_FRAC_FIRST(n);
if (f > Y_FRAC_LAST(n))
{
- f = Y_FRAC_FIRST(n);
- i += pixman_fixed_1;
+ if (pixman_fixed_to_int(i) == 0x7fff)
+ {
+ f = 0xffff; /* saturate */
+ } else {
+ f = Y_FRAC_FIRST(n);
+ i += pixman_fixed_1;
+ }
}
return (i | f);
}
@@ -234,8 +69,13 @@ pixman_sample_floor_y (pixman_fixed_t y, int n)
f = _div(f - Y_FRAC_FIRST(n), STEP_Y_SMALL(n)) * STEP_Y_SMALL(n) + Y_FRAC_FIRST(n);
if (f < Y_FRAC_FIRST(n))
{
- f = Y_FRAC_LAST(n);
- i -= pixman_fixed_1;
+ if (pixman_fixed_to_int(i) == 0x8000)
+ {
+ f = 0; /* saturate */
+ } else {
+ f = Y_FRAC_LAST(n);
+ i -= pixman_fixed_1;
+ }
}
return (i | f);
}
@@ -277,7 +117,7 @@ pixman_edge_step (pixman_edge_t *e, int n)
* elements of an edge structure
*/
static void
-_pixman_edge_tMultiInit (pixman_edge_t *e, int n, pixman_fixed_t *stepx_p, pixman_fixed_t *dx_p)
+_pixman_edge_multi_init (pixman_edge_t *e, int n, pixman_fixed_t *stepx_p, pixman_fixed_t *dx_p)
{
pixman_fixed_t stepx;
pixman_fixed_48_16_t ne;
@@ -332,8 +172,8 @@ pixman_edge_init (pixman_edge_t *e,
e->e = 0;
}
- _pixman_edge_tMultiInit (e, STEP_Y_SMALL(n), &e->stepx_small, &e->dx_small);
- _pixman_edge_tMultiInit (e, STEP_Y_BIG(n), &e->stepx_big, &e->dx_big);
+ _pixman_edge_multi_init (e, STEP_Y_SMALL(n), &e->stepx_small, &e->dx_small);
+ _pixman_edge_multi_init (e, STEP_Y_BIG(n), &e->stepx_big, &e->dx_big);
}
pixman_edge_step (e, y_start - y_top);
}
@@ -473,6 +313,8 @@ pixman_format_supported_destination (pixman_format_code_t format)
case PIXMAN_x8r8g8b8:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
+ case PIXMAN_b8g8r8a8:
+ case PIXMAN_b8g8r8x8:
case PIXMAN_r8g8b8:
case PIXMAN_b8g8r8:
case PIXMAN_r5g6b5:
@@ -543,6 +385,8 @@ pixman_format_supported_source (pixman_format_code_t format)
case PIXMAN_x8r8g8b8:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
+ case PIXMAN_b8g8r8a8:
+ case PIXMAN_b8g8r8x8:
case PIXMAN_r8g8b8:
case PIXMAN_b8g8r8:
case PIXMAN_r5g6b5:
@@ -591,3 +435,269 @@ pixman_format_supported_source (pixman_format_code_t format)
return FALSE;
}
}
+
+void
+_pixman_walk_composite_region (pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t * pSrc,
+ pixman_image_t * pMask,
+ pixman_image_t * pDst,
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height,
+ pixman_bool_t srcRepeat,
+ pixman_bool_t maskRepeat,
+ pixman_composite_func_t compositeRect)
+{
+ int n;
+ const pixman_box32_t *pbox;
+ int w, h, w_this, h_this;
+ int x_msk, y_msk, x_src, y_src, x_dst, y_dst;
+ pixman_region32_t reg;
+ pixman_region32_t *region;
+
+ pixman_region32_init (&reg);
+ if (!pixman_compute_composite_region32 (&reg, pSrc, pMask, pDst,
+ xSrc, ySrc, xMask, yMask, xDst, yDst, width, height))
+ {
+ return;
+ }
+
+ region = &reg;
+
+ pbox = pixman_region32_rectangles (region, &n);
+ while (n--)
+ {
+ h = pbox->y2 - pbox->y1;
+ y_src = pbox->y1 - yDst + ySrc;
+ y_msk = pbox->y1 - yDst + yMask;
+ y_dst = pbox->y1;
+ while (h)
+ {
+ h_this = h;
+ w = pbox->x2 - pbox->x1;
+ x_src = pbox->x1 - xDst + xSrc;
+ x_msk = pbox->x1 - xDst + xMask;
+ x_dst = pbox->x1;
+ if (maskRepeat)
+ {
+ y_msk = MOD (y_msk, pMask->bits.height);
+ if (h_this > pMask->bits.height - y_msk)
+ h_this = pMask->bits.height - y_msk;
+ }
+ if (srcRepeat)
+ {
+ y_src = MOD (y_src, pSrc->bits.height);
+ if (h_this > pSrc->bits.height - y_src)
+ h_this = pSrc->bits.height - y_src;
+ }
+ while (w)
+ {
+ w_this = w;
+ if (maskRepeat)
+ {
+ x_msk = MOD (x_msk, pMask->bits.width);
+ if (w_this > pMask->bits.width - x_msk)
+ w_this = pMask->bits.width - x_msk;
+ }
+ if (srcRepeat)
+ {
+ x_src = MOD (x_src, pSrc->bits.width);
+ if (w_this > pSrc->bits.width - x_src)
+ w_this = pSrc->bits.width - x_src;
+ }
+ (*compositeRect) (imp,
+ op, pSrc, pMask, pDst,
+ x_src, y_src, x_msk, y_msk, x_dst, y_dst,
+ w_this, h_this);
+ w -= w_this;
+ x_src += w_this;
+ x_msk += w_this;
+ x_dst += w_this;
+ }
+ h -= h_this;
+ y_src += h_this;
+ y_msk += h_this;
+ y_dst += h_this;
+ }
+ pbox++;
+ }
+ pixman_region32_fini (&reg);
+}
+
+static pixman_bool_t
+mask_is_solid (pixman_image_t *mask)
+{
+ if (mask->type == SOLID)
+ return TRUE;
+
+ if (mask->type == BITS &&
+ mask->common.repeat == PIXMAN_REPEAT_NORMAL &&
+ mask->bits.width == 1 &&
+ mask->bits.height == 1)
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static const FastPathInfo *
+get_fast_path (const FastPathInfo *fast_paths,
+ pixman_op_t op,
+ pixman_image_t *pSrc,
+ pixman_image_t *pMask,
+ pixman_image_t *pDst,
+ pixman_bool_t is_pixbuf)
+{
+ const FastPathInfo *info;
+
+ for (info = fast_paths; info->op != PIXMAN_OP_NONE; info++)
+ {
+ pixman_bool_t valid_src = FALSE;
+ pixman_bool_t valid_mask = FALSE;
+
+ if (info->op != op)
+ continue;
+
+ if ((info->src_format == PIXMAN_solid && pixman_image_can_get_solid (pSrc)) ||
+ (pSrc->type == BITS && info->src_format == pSrc->bits.format))
+ {
+ valid_src = TRUE;
+ }
+
+ if (!valid_src)
+ continue;
+
+ if ((info->mask_format == PIXMAN_null && !pMask) ||
+ (pMask && pMask->type == BITS && info->mask_format == pMask->bits.format))
+ {
+ valid_mask = TRUE;
+
+ if (info->flags & NEED_SOLID_MASK)
+ {
+ if (!pMask || !mask_is_solid (pMask))
+ valid_mask = FALSE;
+ }
+
+ if (info->flags & NEED_COMPONENT_ALPHA)
+ {
+ if (!pMask || !pMask->common.component_alpha)
+ valid_mask = FALSE;
+ }
+ }
+
+ if (!valid_mask)
+ continue;
+
+ if (info->dest_format != pDst->bits.format)
+ continue;
+
+ if ((info->flags & NEED_PIXBUF) && !is_pixbuf)
+ continue;
+
+ return info;
+ }
+
+ return NULL;
+}
+
+pixman_bool_t
+_pixman_run_fast_path (const FastPathInfo *paths,
+ pixman_implementation_t *imp,
+ pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_image_t *dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
+{
+ pixman_composite_func_t func = NULL;
+ pixman_bool_t src_repeat = src->common.repeat == PIXMAN_REPEAT_NORMAL;
+ pixman_bool_t mask_repeat = mask && mask->common.repeat == PIXMAN_REPEAT_NORMAL;
+
+ if ((src->type == BITS || pixman_image_can_get_solid (src)) &&
+ (!mask || mask->type == BITS)
+ && !src->common.transform && !(mask && mask->common.transform)
+ && !(mask && mask->common.alpha_map) && !src->common.alpha_map && !dest->common.alpha_map
+ && (src->common.filter != PIXMAN_FILTER_CONVOLUTION)
+ && (src->common.repeat != PIXMAN_REPEAT_PAD)
+ && (src->common.repeat != PIXMAN_REPEAT_REFLECT)
+ && (!mask || (mask->common.filter != PIXMAN_FILTER_CONVOLUTION &&
+ mask->common.repeat != PIXMAN_REPEAT_PAD &&
+ mask->common.repeat != PIXMAN_REPEAT_REFLECT))
+ && !src->common.read_func && !src->common.write_func
+ && !(mask && mask->common.read_func)
+ && !(mask && mask->common.write_func)
+ && !dest->common.read_func
+ && !dest->common.write_func)
+ {
+ const FastPathInfo *info;
+ pixman_bool_t pixbuf;
+
+ pixbuf =
+ src && src->type == BITS &&
+ mask && mask->type == BITS &&
+ src->bits.bits == mask->bits.bits &&
+ src_x == mask_x &&
+ src_y == mask_y &&
+ !mask->common.component_alpha &&
+ !mask_repeat;
+
+ info = get_fast_path (paths, op, src, mask, dest, pixbuf);
+
+ if (info)
+ {
+ func = info->func;
+
+ if (info->src_format == PIXMAN_solid)
+ src_repeat = FALSE;
+
+ if (info->mask_format == PIXMAN_solid || info->flags & NEED_SOLID_MASK)
+ mask_repeat = FALSE;
+
+ if ((src_repeat &&
+ src->bits.width == 1 &&
+ src->bits.height == 1) ||
+ (mask_repeat &&
+ mask->bits.width == 1 &&
+ mask->bits.height == 1))
+ {
+ /* If src or mask are repeating 1x1 images and src_repeat or
+ * mask_repeat are still TRUE, it means the fast path we
+ * selected does not actually handle repeating images.
+ *
+ * So rather than call the "fast path" with a zillion
+ * 1x1 requests, we just fall back to the general code (which
+ * does do something sensible with 1x1 repeating images).
+ */
+ func = NULL;
+ }
+ }
+ }
+
+ if (func)
+ {
+ _pixman_walk_composite_region (imp, op,
+ src, mask, dest,
+ src_x, src_y, mask_x, mask_y,
+ dest_x, dest_y,
+ width, height,
+ src_repeat, mask_repeat,
+ func);
+ return TRUE;
+ }
+
+ return FALSE;
+}
diff --git a/lib/pixman/pixman/pixman-vmx.c b/lib/pixman/pixman/pixman-vmx.c
index 8c8a2a364..e371f7f52 100644
--- a/lib/pixman/pixman/pixman-vmx.c
+++ b/lib/pixman/pixman/pixman-vmx.c
@@ -26,22 +26,20 @@
*/
#include <config.h>
-#include "pixman-vmx.h"
+#include "pixman-private.h"
#include "pixman-combine32.h"
#include <altivec.h>
-#ifdef __GNUC__
-# define inline __inline__ __attribute__ ((__always_inline__))
-#endif
+#define AVV(x...) {x}
-static inline vector unsigned int
+static force_inline vector unsigned int
splat_alpha (vector unsigned int pix) {
return vec_perm (pix, pix,
(vector unsigned char)AVV(0x00,0x00,0x00,0x00, 0x04,0x04,0x04,0x04,
0x08,0x08,0x08,0x08, 0x0C,0x0C,0x0C,0x0C));
}
-static inline vector unsigned int
+static force_inline vector unsigned int
pix_multiply (vector unsigned int p, vector unsigned int a)
{
vector unsigned short hi, lo, mod;
@@ -80,14 +78,14 @@ pix_multiply (vector unsigned int p, vector unsigned int a)
return (vector unsigned int)vec_packsu (hi, lo);
}
-static inline vector unsigned int
+static force_inline vector unsigned int
pix_add (vector unsigned int a, vector unsigned int b)
{
return (vector unsigned int)vec_adds ((vector unsigned char)a,
(vector unsigned char)b);
}
-static inline vector unsigned int
+static force_inline vector unsigned int
pix_add_mul (vector unsigned int x, vector unsigned int a,
vector unsigned int y, vector unsigned int b)
{
@@ -143,13 +141,13 @@ pix_add_mul (vector unsigned int x, vector unsigned int a,
return (vector unsigned int)vec_packsu (hi, lo);
}
-static inline vector unsigned int
+static force_inline vector unsigned int
negate (vector unsigned int src)
{
return vec_nor (src, src);
}
/* dest*~srca + src */
-static inline vector unsigned int
+static force_inline vector unsigned int
over (vector unsigned int src, vector unsigned int srca,
vector unsigned int dest)
{
@@ -205,6 +203,12 @@ over (vector unsigned int src, vector unsigned int srca,
tmp2 = (typeof(tmp2))vec_ld(15, mask); \
v ## mask = (typeof(v ## mask)) \
vec_perm(tmp1, tmp2, mask ## _mask);
+
+#define LOAD_VECTORSM(dest, source, mask) \
+ LOAD_VECTORSC(dest, source, mask) \
+ v ## source = pix_multiply(v ## source, \
+ splat_alpha (v ## mask));
+
#define STORE_VECTOR(dest) \
edges = vec_perm (tmp4, tmp3, dest ## _mask); \
tmp3 = vec_perm ((vector unsigned char)v ## dest, edges, store_mask); \
@@ -213,50 +217,55 @@ over (vector unsigned int src, vector unsigned int srca,
vec_st ((vector unsigned int) tmp1, 0, dest );
static FASTCALL void
-vmxCombineMaskU (uint32_t *src, const uint32_t *msk, int width)
+vmxCombineOverUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
- vector unsigned int vsrc, vmsk;
+ vector unsigned int vdest, vsrc;
vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
- src_mask, msk_mask, store_mask;
+ dest_mask, src_mask, store_mask;
- COMPUTE_SHIFT_MASKS(src, msk)
+ COMPUTE_SHIFT_MASKS(dest, src)
/* printf ("%s\n",__PRETTY_FUNCTION__); */
for (i = width/4; i > 0; i--) {
- LOAD_VECTORS(src, msk)
+ LOAD_VECTORS(dest, src)
- vsrc = pix_multiply (vsrc, splat_alpha (vmsk));
+ vdest = over (vsrc, splat_alpha (vsrc), vdest);
- STORE_VECTOR(src)
+ STORE_VECTOR(dest)
- msk+=4;
src+=4;
+ dest+=4;
}
- for (i = width%4; --i >= 0;) {
- uint32_t a = msk[i] >> 24;
+ for (i = width%4; --i >=0;) {
uint32_t s = src[i];
- FbByteMul (s, a);
- src[i] = s;
+ uint32_t d = dest[i];
+ uint32_t ia = Alpha (~s);
+
+ FbByteMulAdd (d, ia, s);
+ dest[i] = d;
}
}
static FASTCALL void
-vmxCombineOverU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineOverUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
{
int i;
- vector unsigned int vdest, vsrc;
+ vector unsigned int vdest, vsrc, vmask;
vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
- dest_mask, src_mask, store_mask;
+ dest_mask, src_mask, mask_mask, store_mask;
- COMPUTE_SHIFT_MASKS(dest, src)
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
/* printf ("%s\n",__PRETTY_FUNCTION__); */
for (i = width/4; i > 0; i--) {
- LOAD_VECTORS(dest, src)
+ LOAD_VECTORSM(dest, src, mask);
vdest = over (vsrc, splat_alpha (vsrc), vdest);
@@ -264,21 +273,37 @@ vmxCombineOverU (uint32_t *dest, const uint32_t *src, int width)
src+=4;
dest+=4;
+ mask+=4;
}
for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
uint32_t s = src[i];
uint32_t d = dest[i];
- uint32_t ia = Alpha (~s);
+ uint32_t ia;
+
+ FbByteMul (s, m);
+
+ ia = Alpha (~s);
FbByteMulAdd (d, ia, s);
dest[i] = d;
}
}
+static FASTCALL void
+vmxCombineOverU(pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask,
+ int width)
+{
+ if (mask)
+ vmxCombineOverUmask(dest, src, mask, width);
+ else
+ vmxCombineOverUnomask(dest, src, width);
+}
static FASTCALL void
-vmxCombineOverReverseU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineOverReverseUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -311,7 +336,58 @@ vmxCombineOverReverseU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineInU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineOverReverseUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = over (vdest, splat_alpha (vdest) , vsrc);
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t s = src[i];
+ uint32_t d = dest[i];
+ uint32_t ia = Alpha (~dest[i]);
+
+ FbByteMul (s, m);
+
+ FbByteMulAdd (s, ia, d);
+ dest[i] = s;
+ }
+}
+
+static FASTCALL void
+vmxCombineOverReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src,
+ const uint32_t *mask, int width)
+{
+ if (mask)
+ vmxCombineOverReverseUmask(dest, src, mask, width);
+ else
+ vmxCombineOverReverseUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineInUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -343,7 +419,57 @@ vmxCombineInU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineInReverseU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineInUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = pix_multiply (vsrc, splat_alpha (vdest));
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t s = src[i];
+ uint32_t a = Alpha (dest[i]);
+
+ FbByteMul (s, m);
+
+ FbByteMul (s, a);
+ dest[i] = s;
+ }
+}
+
+static FASTCALL void
+vmxCombineInU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask,
+ int width)
+{
+ if (mask)
+ vmxCombineInUmask(dest, src, mask, width);
+ else
+ vmxCombineInUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineInReverseUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -374,7 +500,58 @@ vmxCombineInReverseU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineOutU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineInReverseUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = pix_multiply (vdest, splat_alpha (vsrc));
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t d = dest[i];
+ uint32_t a = src[i];
+
+ FbByteMul (a, m);
+
+ a = Alpha (a);
+ FbByteMul (d, a);
+ dest[i] = d;
+ }
+}
+
+static FASTCALL void
+vmxCombineInReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src,
+ const uint32_t *mask, int width)
+{
+ if (mask)
+ vmxCombineInReverseUmask(dest, src, mask, width);
+ else
+ vmxCombineInReverseUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineOutUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -405,7 +582,57 @@ vmxCombineOutU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineOutReverseU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineOutUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = pix_multiply (vsrc, splat_alpha (negate (vdest)));
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t s = src[i];
+ uint32_t a = Alpha (~dest[i]);
+
+ FbByteMul (s, m);
+
+ FbByteMul (s, a);
+ dest[i] = s;
+ }
+}
+
+static FASTCALL void
+vmxCombineOutU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask,
+ int width)
+{
+ if (mask)
+ vmxCombineOutUmask(dest, src, mask, width);
+ else
+ vmxCombineOutUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineOutReverseUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -436,7 +663,60 @@ vmxCombineOutReverseU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineAtopU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineOutReverseUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = pix_multiply (vdest, splat_alpha (negate (vsrc)));
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t d = dest[i];
+ uint32_t a = src[i];
+
+ FbByteMul (a, m);
+
+ a = Alpha (~a);
+ FbByteMul (d, a);
+ dest[i] = d;
+ }
+}
+
+static FASTCALL void
+vmxCombineOutReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ if (mask)
+ vmxCombineOutReverseUmask(dest, src, mask, width);
+ else
+ vmxCombineOutReverseUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineAtopUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -471,7 +751,64 @@ vmxCombineAtopU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineAtopReverseU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineAtopUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = pix_add_mul (vsrc, splat_alpha (vdest),
+ vdest, splat_alpha (negate (vsrc)));
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t s = src[i];
+ uint32_t d = dest[i];
+ uint32_t dest_a = Alpha (d);
+ uint32_t src_ia;
+
+ FbByteMul (s, m);
+
+ src_ia = Alpha (~s);
+
+ FbByteAddMul (s, dest_a, d, src_ia);
+ dest[i] = s;
+ }
+}
+
+static FASTCALL void
+vmxCombineAtopU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ if (mask)
+ vmxCombineAtopUmask(dest, src, mask, width);
+ else
+ vmxCombineAtopUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineAtopReverseUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -506,7 +843,64 @@ vmxCombineAtopReverseU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineXorU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineAtopReverseUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = pix_add_mul (vdest, splat_alpha (vsrc),
+ vsrc, splat_alpha (negate (vdest)));
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t s = src[i];
+ uint32_t d = dest[i];
+ uint32_t src_a;
+ uint32_t dest_ia = Alpha (~d);
+
+ FbByteMul (s, m);
+
+ src_a = Alpha (s);
+
+ FbByteAddMul (s, dest_ia, d, src_a);
+ dest[i] = s;
+ }
+}
+
+static FASTCALL void
+vmxCombineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ if (mask)
+ vmxCombineAtopReverseUmask(dest, src, mask, width);
+ else
+ vmxCombineAtopReverseUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineXorUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -541,7 +935,64 @@ vmxCombineXorU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineAddU (uint32_t *dest, const uint32_t *src, int width)
+vmxCombineXorUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = pix_add_mul (vsrc, splat_alpha (negate (vdest)),
+ vdest, splat_alpha (negate (vsrc)));
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t s = src[i];
+ uint32_t d = dest[i];
+ uint32_t src_ia;
+ uint32_t dest_ia = Alpha (~d);
+
+ FbByteMul (s, m);
+
+ src_ia = Alpha (~s);
+
+ FbByteAddMul (s, dest_ia, d, src_ia);
+ dest[i] = s;
+ }
+}
+
+static FASTCALL void
+vmxCombineXorU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ if (mask)
+ vmxCombineXorUmask(dest, src, mask, width);
+ else
+ vmxCombineXorUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineAddUnomask (uint32_t *dest, const uint32_t *src, int width)
{
int i;
vector unsigned int vdest, vsrc;
@@ -571,7 +1022,60 @@ vmxCombineAddU (uint32_t *dest, const uint32_t *src, int width)
}
static FASTCALL void
-vmxCombineSrcC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineAddUmask (uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ int i;
+ vector unsigned int vdest, vsrc, vmask;
+ vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
+ dest_mask, src_mask, mask_mask, store_mask;
+
+ COMPUTE_SHIFT_MASKC(dest, src, mask)
+
+ /* printf ("%s\n",__PRETTY_FUNCTION__); */
+ for (i = width/4; i > 0; i--) {
+
+ LOAD_VECTORSM(dest, src, mask)
+
+ vdest = pix_add (vsrc, vdest);
+
+ STORE_VECTOR(dest)
+
+ src+=4;
+ dest+=4;
+ mask+=4;
+ }
+
+ for (i = width%4; --i >=0;) {
+ uint32_t m = Alpha (mask[i]);
+ uint32_t s = src[i];
+ uint32_t d = dest[i];
+
+ FbByteMul (s, m);
+
+ FbByteAdd (d, s);
+ dest[i] = d;
+ }
+}
+
+static FASTCALL void
+vmxCombineAddU (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest,
+ const uint32_t *src,
+ const uint32_t *mask,
+ int width)
+{
+ if (mask)
+ vmxCombineAddUmask(dest, src, mask, width);
+ else
+ vmxCombineAddUnomask(dest, src, width);
+}
+
+static FASTCALL void
+vmxCombineSrcC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -602,7 +1106,8 @@ vmxCombineSrcC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-vmxCombineOverC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineOverC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -635,7 +1140,8 @@ vmxCombineOverC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-vmxCombineOverReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -669,7 +1175,8 @@ vmxCombineOverReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width
}
static FASTCALL void
-vmxCombineInC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineInC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -703,7 +1210,8 @@ vmxCombineInC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-vmxCombineInReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineInReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -737,7 +1245,8 @@ vmxCombineInReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-vmxCombineOutC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineOutC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -772,7 +1281,8 @@ vmxCombineOutC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-vmxCombineOutReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -808,7 +1318,8 @@ vmxCombineOutReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-vmxCombineAtopC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineAtopC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -849,7 +1360,8 @@ vmxCombineAtopC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-vmxCombineAtopReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -890,7 +1402,8 @@ vmxCombineAtopReverseC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width
}
static FASTCALL void
-vmxCombineXorC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineXorC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -931,7 +1444,8 @@ vmxCombineXorC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
}
static FASTCALL void
-vmxCombineAddC (uint32_t *dest, uint32_t *src, uint32_t *mask, int width)
+vmxCombineAddC (pixman_implementation_t *imp, pixman_op_t op,
+ uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
{
int i;
vector unsigned int vdest, vsrc, vmask;
@@ -1034,35 +1548,48 @@ fbCompositeSolid_nx0565vmx (pixman_operator_t op,
}
}
+static const FastPathInfo vmx_fast_path_array[] =
+{
+ { PIXMAN_OP_NONE },
+};
+
+const FastPathInfo *const vmx_fast_paths = vmx_fast_path_array;
+
#endif
-void fbComposeSetupVMX (void)
+pixman_implementation_t *
+_pixman_implementation_create_vmx (pixman_implementation_t *toplevel)
{
- /* check if we have VMX support and initialize accordingly */
- if (pixman_have_vmx ()) {
- pixman_composeFunctions.combineU[PIXMAN_OP_OVER] = vmxCombineOverU;
- pixman_composeFunctions.combineU[PIXMAN_OP_OVER_REVERSE] = vmxCombineOverReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_IN] = vmxCombineInU;
- pixman_composeFunctions.combineU[PIXMAN_OP_IN_REVERSE] = vmxCombineInReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_OUT] = vmxCombineOutU;
- pixman_composeFunctions.combineU[PIXMAN_OP_OUT_REVERSE] = vmxCombineOutReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ATOP] = vmxCombineAtopU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ATOP_REVERSE] = vmxCombineAtopReverseU;
- pixman_composeFunctions.combineU[PIXMAN_OP_XOR] = vmxCombineXorU;
- pixman_composeFunctions.combineU[PIXMAN_OP_ADD] = vmxCombineAddU;
-
- pixman_composeFunctions.combineC[PIXMAN_OP_SRC] = vmxCombineSrcC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OVER] = vmxCombineOverC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OVER_REVERSE] = vmxCombineOverReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_IN] = vmxCombineInC;
- pixman_composeFunctions.combineC[PIXMAN_OP_IN_REVERSE] = vmxCombineInReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OUT] = vmxCombineOutC;
- pixman_composeFunctions.combineC[PIXMAN_OP_OUT_REVERSE] = vmxCombineOutReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ATOP] = vmxCombineAtopC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ATOP_REVERSE] = vmxCombineAtopReverseC;
- pixman_composeFunctions.combineC[PIXMAN_OP_XOR] = vmxCombineXorC;
- pixman_composeFunctions.combineC[PIXMAN_OP_ADD] = vmxCombineAddC;
-
- pixman_composeFunctions.combineMaskU = vmxCombineMaskU;
- }
+ pixman_implementation_t *fast = _pixman_implementation_create_fast_path (NULL);
+ pixman_implementation_t *imp = _pixman_implementation_create (toplevel, fast);
+
+ /* Set up function pointers */
+
+ /* SSE code patch for fbcompose.c */
+ imp->combine_32[PIXMAN_OP_OVER] = vmxCombineOverU;
+ imp->combine_32[PIXMAN_OP_OVER_REVERSE] = vmxCombineOverReverseU;
+ imp->combine_32[PIXMAN_OP_IN] = vmxCombineInU;
+ imp->combine_32[PIXMAN_OP_IN_REVERSE] = vmxCombineInReverseU;
+ imp->combine_32[PIXMAN_OP_OUT] = vmxCombineOutU;
+ imp->combine_32[PIXMAN_OP_OUT_REVERSE] = vmxCombineOutReverseU;
+ imp->combine_32[PIXMAN_OP_ATOP] = vmxCombineAtopU;
+ imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = vmxCombineAtopReverseU;
+ imp->combine_32[PIXMAN_OP_XOR] = vmxCombineXorU;
+
+ imp->combine_32[PIXMAN_OP_ADD] = vmxCombineAddU;
+
+ imp->combine_32_ca[PIXMAN_OP_SRC] = vmxCombineSrcC;
+ imp->combine_32_ca[PIXMAN_OP_OVER] = vmxCombineOverC;
+ imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = vmxCombineOverReverseC;
+ imp->combine_32_ca[PIXMAN_OP_IN] = vmxCombineInC;
+ imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = vmxCombineInReverseC;
+ imp->combine_32_ca[PIXMAN_OP_OUT] = vmxCombineOutC;
+ imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = vmxCombineOutReverseC;
+ imp->combine_32_ca[PIXMAN_OP_ATOP] = vmxCombineAtopC;
+ imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = vmxCombineAtopReverseC;
+ imp->combine_32_ca[PIXMAN_OP_XOR] = vmxCombineXorC;
+ imp->combine_32_ca[PIXMAN_OP_ADD] = vmxCombineAddC;
+
+ return imp;
}
+
diff --git a/lib/pixman/pixman/pixman.h b/lib/pixman/pixman/pixman.h
index 36d91a900..29c054a6f 100644
--- a/lib/pixman/pixman/pixman.h
+++ b/lib/pixman/pixman/pixman.h
@@ -74,7 +74,7 @@ SOFTWARE.
/*
* Standard integers
*/
-#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun)
+#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
# include <inttypes.h>
#elif defined (_MSC_VER)
typedef __int8 int8_t;
@@ -149,6 +149,10 @@ struct pixman_line_fixed
pixman_point_fixed_t p1, p2;
};
+/*
+ * Fixed point matrices
+ */
+
struct pixman_vector
{
pixman_fixed_t vector[3];
@@ -159,6 +163,149 @@ struct pixman_transform
pixman_fixed_t matrix[3][3];
};
+/* forward declaration (sorry) */
+struct pixman_box16;
+
+void
+pixman_transform_init_identity(struct pixman_transform *matrix);
+
+pixman_bool_t
+pixman_transform_point_3d (const struct pixman_transform *transform,
+ struct pixman_vector *vector);
+
+pixman_bool_t
+pixman_transform_point(const struct pixman_transform *transform,
+ struct pixman_vector *vector);
+
+pixman_bool_t
+pixman_transform_multiply (struct pixman_transform *dst,
+ const struct pixman_transform *l,
+ const struct pixman_transform *r);
+
+void
+pixman_transform_init_scale (struct pixman_transform *t,
+ pixman_fixed_t sx,
+ pixman_fixed_t sy);
+
+pixman_bool_t
+pixman_transform_scale(struct pixman_transform *forward,
+ struct pixman_transform *reverse,
+ pixman_fixed_t sx, pixman_fixed_t sy);
+
+void
+pixman_transform_init_rotate(struct pixman_transform *t,
+ pixman_fixed_t cos,
+ pixman_fixed_t sin);
+
+pixman_bool_t
+pixman_transform_rotate(struct pixman_transform *forward,
+ struct pixman_transform *reverse,
+ pixman_fixed_t c, pixman_fixed_t s);
+
+void
+pixman_transform_init_translate(struct pixman_transform *t,
+ pixman_fixed_t tx, pixman_fixed_t ty);
+
+
+pixman_bool_t
+pixman_transform_translate(struct pixman_transform *forward,
+ struct pixman_transform *reverse,
+ pixman_fixed_t tx, pixman_fixed_t ty);
+
+pixman_bool_t
+pixman_transform_bounds(const struct pixman_transform *matrix,
+ struct pixman_box16 *b);
+
+
+pixman_bool_t
+pixman_transform_invert (struct pixman_transform *dst,
+ const struct pixman_transform *src);
+
+pixman_bool_t
+pixman_transform_is_identity(const struct pixman_transform *t);
+
+pixman_bool_t
+pixman_transform_is_scale(const struct pixman_transform *t);
+
+pixman_bool_t
+pixman_transform_is_int_translate(const struct pixman_transform *t);
+
+pixman_bool_t
+pixman_transform_is_inverse (const struct pixman_transform *a,
+ const struct pixman_transform *b);
+
+
+/*
+ * Floating point matrices
+ */
+struct pixman_f_vector {
+ double v[3];
+};
+
+struct pixman_f_transform {
+ double m[3][3];
+};
+
+pixman_bool_t
+pixman_transform_from_pixman_f_transform (struct pixman_transform *t,
+ const struct pixman_f_transform *ft);
+
+void
+pixman_f_transform_from_pixman_transform (struct pixman_f_transform *ft,
+ const struct pixman_transform *t);
+
+pixman_bool_t
+pixman_transform_from_pixman_f_transform (struct pixman_transform *t,
+ const struct pixman_f_transform *ft);
+
+pixman_bool_t
+pixman_f_transform_invert (struct pixman_f_transform *dst,
+ const struct pixman_f_transform *src);
+
+pixman_bool_t
+pixman_f_transform_point (const struct pixman_f_transform *t,
+ struct pixman_f_vector *v);
+
+void
+pixman_f_transform_point_3d (const struct pixman_f_transform *t,
+ struct pixman_f_vector *v);
+
+
+void
+pixman_f_transform_multiply (struct pixman_f_transform *dst,
+ const struct pixman_f_transform *l,
+ const struct pixman_f_transform *r);
+
+void
+pixman_f_transform_init_scale (struct pixman_f_transform *t, double sx, double sy);
+
+pixman_bool_t
+pixman_f_transform_scale (struct pixman_f_transform *forward,
+ struct pixman_f_transform *reverse,
+ double sx, double sy);
+
+void
+pixman_f_transform_init_rotate (struct pixman_f_transform *t, double cos, double sin);
+
+pixman_bool_t
+pixman_f_transform_rotate (struct pixman_f_transform *forward,
+ struct pixman_f_transform *reverse,
+ double c, double s);
+
+void
+pixman_f_transform_init_translate (struct pixman_f_transform *t, double tx, double ty);
+
+pixman_bool_t
+pixman_f_transform_translate (struct pixman_f_transform *forward,
+ struct pixman_f_transform *reverse,
+ double tx, double ty);
+
+pixman_bool_t
+pixman_f_transform_bounds (const struct pixman_f_transform *t, struct pixman_box16 *b);
+
+void
+pixman_f_transform_init_identity (struct pixman_f_transform *t);
+
/* Don't blame me, blame XRender */
typedef enum
{
@@ -221,7 +368,8 @@ typedef enum
PIXMAN_OP_CONJOINT_ATOP_REVERSE = 0x2a,
PIXMAN_OP_CONJOINT_XOR = 0x2b,
- PIXMAN_OP_NONE
+ PIXMAN_OP_NONE,
+ PIXMAN_OP_LAST = PIXMAN_OP_NONE
} pixman_op_t;
/*
@@ -436,9 +584,6 @@ pixman_bool_t pixman_fill (uint32_t *bits,
int height,
uint32_t _xor);
-pixman_bool_t pixman_transform_point_3d (pixman_transform_t *transform,
- pixman_vector_t *vector);
-
int pixman_version (void);
const char* pixman_version_string (void);
@@ -503,8 +648,12 @@ struct pixman_indexed
#define PIXMAN_TYPE_GRAY 5
#define PIXMAN_TYPE_YUY2 6
#define PIXMAN_TYPE_YV12 7
+#define PIXMAN_TYPE_BGRA 8
-#define PIXMAN_FORMAT_COLOR(f) (PIXMAN_FORMAT_TYPE(f) & 2)
+#define PIXMAN_FORMAT_COLOR(f) \
+ (PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB || \
+ PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ABGR || \
+ PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_BGRA)
/* 32bpp formats */
typedef enum {
@@ -512,6 +661,8 @@ typedef enum {
PIXMAN_x8r8g8b8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,8,8,8),
PIXMAN_a8b8g8r8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,8,8,8,8),
PIXMAN_x8b8g8r8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,8,8,8),
+ PIXMAN_b8g8r8a8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,8,8,8,8),
+ PIXMAN_b8g8r8x8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,0,8,8,8),
PIXMAN_x2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,10,10,10),
PIXMAN_a2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,2,10,10,10),
@@ -629,7 +780,7 @@ void pixman_image_set_indexed (pixman_image_t *image,
uint32_t *pixman_image_get_data (pixman_image_t *image);
int pixman_image_get_width (pixman_image_t *image);
int pixman_image_get_height (pixman_image_t *image);
-int pixman_image_get_stride (pixman_image_t *image);
+int pixman_image_get_stride (pixman_image_t *image); /* in bytes */
int pixman_image_get_depth (pixman_image_t *image);
pixman_bool_t pixman_image_fill_rectangles (pixman_op_t op,
pixman_image_t *image,
diff --git a/lib/pixman/pixman/solaris-hwcap.mapfile b/lib/pixman/pixman/solaris-hwcap.mapfile
new file mode 100644
index 000000000..7f439a95a
--- /dev/null
+++ b/lib/pixman/pixman/solaris-hwcap.mapfile
@@ -0,0 +1,36 @@
+###############################################################################
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###############################################################################
+#
+# Override the linker's detection of CMOV/MMX/SSE instructions so this
+# library isn't flagged as only usable on CPU's with those ISA's, since it
+# checks at runtime for availability before calling them
+
+hwcap_1 = V0x0 FPU OVERRIDE;
diff --git a/lib/pixman/test/Makefile.am b/lib/pixman/test/Makefile.am
index 33e2200db..be76dc814 100644
--- a/lib/pixman/test/Makefile.am
+++ b/lib/pixman/test/Makefile.am
@@ -1,19 +1,52 @@
-if HAVE_GTK
+TEST_LDADD = $(top_builddir)/pixman/libpixman-1.la
+INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman
+
TESTPROGRAMS = \
+ region-test \
+ scaling-test \
+ fetch-test \
+ trap-crasher
+
+fetch_test_LDADD = $(TEST_LDADD)
+region_test_LDADD = $(TEST_LDADD)
+scaling_test_LDADD = $(TEST_LDADD)
+trap_crasher_LDADD = $(TEST_LDADD)
+
+# GTK using test programs
+
+if HAVE_GTK
+
+GTK_LDADD = $(TEST_LDADD) $(GTK_LIBS)
+
+TESTPROGRAMS += \
clip-test \
+ clip-in \
composite-test \
gradient-test \
- region-test \
- fetch-test
+ alpha-test \
+ trap-test
noinst_PROGRAMS = $(TESTPROGRAMS)
-INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(GTK_CFLAGS)
+INCLUDES += $(GTK_CFLAGS)
+
+gradient_test_LDADD = $(GTK_LDADD)
+gradient_test_SOURCES = gradient-test.c utils.c utils.h
+
+alpha_test_LDADD = $(GTK_LDADD)
+alpha_test_SOURCES = alpha-test.c utils.c utils.h
-composite_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
-gradient_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
-fetch_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
-region_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
-clip_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
+composite_test_LDADD = $(GTK_LDADD)
+composite_test_SOURCES = composite-test.c utils.c utils.h
+
+clip_test_LDADD = $(GTK_LDADD)
+clip_test_SOURCES = clip-test.c utils.c utils.h
+
+clip_in_LDADD = $(GTK_LDADD)
+clip_in_SOURCES = clip-in.c utils.c utils.h
+
+trap_test_LDADD = $(GTK_LDADD)
+trap_test_SOURCES = trap-test.c utils.c utils.h
endif
+
diff --git a/lib/pixman/test/Makefile.in b/lib/pixman/test/Makefile.in
index c58c3688a..265f5d0df 100644
--- a/lib/pixman/test/Makefile.in
+++ b/lib/pixman/test/Makefile.in
@@ -36,7 +36,16 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@HAVE_GTK_TRUE@noinst_PROGRAMS = $(am__EXEEXT_1)
+@HAVE_GTK_TRUE@am__append_1 = \
+@HAVE_GTK_TRUE@ clip-test \
+@HAVE_GTK_TRUE@ clip-in \
+@HAVE_GTK_TRUE@ composite-test \
+@HAVE_GTK_TRUE@ gradient-test \
+@HAVE_GTK_TRUE@ alpha-test \
+@HAVE_GTK_TRUE@ trap-test
+
+@HAVE_GTK_TRUE@noinst_PROGRAMS = $(am__EXEEXT_2)
+@HAVE_GTK_TRUE@am__append_2 = $(GTK_CFLAGS)
subdir = test
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -46,34 +55,57 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(SHELL) $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
-@HAVE_GTK_TRUE@am__EXEEXT_1 = clip-test$(EXEEXT) \
+@HAVE_GTK_TRUE@am__EXEEXT_1 = clip-test$(EXEEXT) clip-in$(EXEEXT) \
@HAVE_GTK_TRUE@ composite-test$(EXEEXT) gradient-test$(EXEEXT) \
-@HAVE_GTK_TRUE@ region-test$(EXEEXT) fetch-test$(EXEEXT)
+@HAVE_GTK_TRUE@ alpha-test$(EXEEXT) trap-test$(EXEEXT)
+am__EXEEXT_2 = region-test$(EXEEXT) scaling-test$(EXEEXT) \
+ fetch-test$(EXEEXT) trap-crasher$(EXEEXT) $(am__EXEEXT_1)
PROGRAMS = $(noinst_PROGRAMS)
-clip_test_SOURCES = clip-test.c
-clip_test_OBJECTS = clip-test.$(OBJEXT)
-am__DEPENDENCIES_1 =
-@HAVE_GTK_TRUE@clip_test_DEPENDENCIES = \
-@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la \
-@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1)
-composite_test_SOURCES = composite-test.c
-composite_test_OBJECTS = composite-test.$(OBJEXT)
-@HAVE_GTK_TRUE@composite_test_DEPENDENCIES = \
-@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la \
-@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1)
+am__alpha_test_SOURCES_DIST = alpha-test.c utils.c utils.h
+@HAVE_GTK_TRUE@am_alpha_test_OBJECTS = alpha-test.$(OBJEXT) \
+@HAVE_GTK_TRUE@ utils.$(OBJEXT)
+alpha_test_OBJECTS = $(am_alpha_test_OBJECTS)
+am__DEPENDENCIES_1 = $(top_builddir)/pixman/libpixman-1.la
+am__DEPENDENCIES_2 =
+@HAVE_GTK_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) \
+@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_2)
+@HAVE_GTK_TRUE@alpha_test_DEPENDENCIES = $(am__DEPENDENCIES_3)
+am__clip_in_SOURCES_DIST = clip-in.c utils.c utils.h
+@HAVE_GTK_TRUE@am_clip_in_OBJECTS = clip-in.$(OBJEXT) utils.$(OBJEXT)
+clip_in_OBJECTS = $(am_clip_in_OBJECTS)
+@HAVE_GTK_TRUE@clip_in_DEPENDENCIES = $(am__DEPENDENCIES_3)
+am__clip_test_SOURCES_DIST = clip-test.c utils.c utils.h
+@HAVE_GTK_TRUE@am_clip_test_OBJECTS = clip-test.$(OBJEXT) \
+@HAVE_GTK_TRUE@ utils.$(OBJEXT)
+clip_test_OBJECTS = $(am_clip_test_OBJECTS)
+@HAVE_GTK_TRUE@clip_test_DEPENDENCIES = $(am__DEPENDENCIES_3)
+am__composite_test_SOURCES_DIST = composite-test.c utils.c utils.h
+@HAVE_GTK_TRUE@am_composite_test_OBJECTS = composite-test.$(OBJEXT) \
+@HAVE_GTK_TRUE@ utils.$(OBJEXT)
+composite_test_OBJECTS = $(am_composite_test_OBJECTS)
+@HAVE_GTK_TRUE@composite_test_DEPENDENCIES = $(am__DEPENDENCIES_3)
fetch_test_SOURCES = fetch-test.c
fetch_test_OBJECTS = fetch-test.$(OBJEXT)
-@HAVE_GTK_TRUE@fetch_test_DEPENDENCIES = \
-@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la
-gradient_test_SOURCES = gradient-test.c
-gradient_test_OBJECTS = gradient-test.$(OBJEXT)
-@HAVE_GTK_TRUE@gradient_test_DEPENDENCIES = \
-@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la \
-@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1)
+fetch_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__gradient_test_SOURCES_DIST = gradient-test.c utils.c utils.h
+@HAVE_GTK_TRUE@am_gradient_test_OBJECTS = gradient-test.$(OBJEXT) \
+@HAVE_GTK_TRUE@ utils.$(OBJEXT)
+gradient_test_OBJECTS = $(am_gradient_test_OBJECTS)
+@HAVE_GTK_TRUE@gradient_test_DEPENDENCIES = $(am__DEPENDENCIES_3)
region_test_SOURCES = region-test.c
region_test_OBJECTS = region-test.$(OBJEXT)
-@HAVE_GTK_TRUE@region_test_DEPENDENCIES = \
-@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la
+region_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+scaling_test_SOURCES = scaling-test.c
+scaling_test_OBJECTS = scaling-test.$(OBJEXT)
+scaling_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+trap_crasher_SOURCES = trap-crasher.c
+trap_crasher_OBJECTS = trap-crasher.$(OBJEXT)
+trap_crasher_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__trap_test_SOURCES_DIST = trap-test.c utils.c utils.h
+@HAVE_GTK_TRUE@am_trap_test_OBJECTS = trap-test.$(OBJEXT) \
+@HAVE_GTK_TRUE@ utils.$(OBJEXT)
+trap_test_OBJECTS = $(am_trap_test_OBJECTS)
+@HAVE_GTK_TRUE@trap_test_DEPENDENCIES = $(am__DEPENDENCIES_3)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -85,10 +117,15 @@ LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = clip-test.c composite-test.c fetch-test.c gradient-test.c \
- region-test.c
-DIST_SOURCES = clip-test.c composite-test.c fetch-test.c \
- gradient-test.c region-test.c
+SOURCES = $(alpha_test_SOURCES) $(clip_in_SOURCES) \
+ $(clip_test_SOURCES) $(composite_test_SOURCES) fetch-test.c \
+ $(gradient_test_SOURCES) region-test.c scaling-test.c \
+ trap-crasher.c $(trap_test_SOURCES)
+DIST_SOURCES = $(am__alpha_test_SOURCES_DIST) \
+ $(am__clip_in_SOURCES_DIST) $(am__clip_test_SOURCES_DIST) \
+ $(am__composite_test_SOURCES_DIST) fetch-test.c \
+ $(am__gradient_test_SOURCES_DIST) region-test.c scaling-test.c \
+ trap-crasher.c $(am__trap_test_SOURCES_DIST)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -97,6 +134,8 @@ AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
+ARM_NEON_CFLAGS = @ARM_NEON_CFLAGS@
+ARM_SIMD_CFLAGS = @ARM_SIMD_CFLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -124,6 +163,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
+GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
HAVE_GTK_FALSE = @HAVE_GTK_FALSE@
@@ -141,6 +181,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_VERSION_INFO = @LT_VERSION_INFO@
MAKEINFO = @MAKEINFO@
MMX_CFLAGS = @MMX_CFLAGS@
+MMX_LDFLAGS = @MMX_LDFLAGS@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -160,7 +201,14 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSE2_CFLAGS = @SSE2_CFLAGS@
+SSE2_LDFLAGS = @SSE2_LDFLAGS@
STRIP = @STRIP@
+USE_ARM_NEON_FALSE = @USE_ARM_NEON_FALSE@
+USE_ARM_NEON_TRUE = @USE_ARM_NEON_TRUE@
+USE_ARM_SIMD_FALSE = @USE_ARM_SIMD_FALSE@
+USE_ARM_SIMD_TRUE = @USE_ARM_SIMD_TRUE@
+USE_GCC_INLINE_ASM_FALSE = @USE_GCC_INLINE_ASM_FALSE@
+USE_GCC_INLINE_ASM_TRUE = @USE_GCC_INLINE_ASM_TRUE@
USE_MMX_FALSE = @USE_MMX_FALSE@
USE_MMX_TRUE = @USE_MMX_TRUE@
USE_SSE2_FALSE = @USE_SSE2_FALSE@
@@ -169,15 +217,9 @@ USE_VMX_FALSE = @USE_VMX_FALSE@
USE_VMX_TRUE = @USE_VMX_TRUE@
VERSION = @VERSION@
VMX_CFLAGS = @VMX_CFLAGS@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_NMEDIT = @ac_ct_NMEDIT@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -194,40 +236,58 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-@HAVE_GTK_TRUE@TESTPROGRAMS = \
-@HAVE_GTK_TRUE@ clip-test \
-@HAVE_GTK_TRUE@ composite-test \
-@HAVE_GTK_TRUE@ gradient-test \
-@HAVE_GTK_TRUE@ region-test \
-@HAVE_GTK_TRUE@ fetch-test
-
-@HAVE_GTK_TRUE@INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(GTK_CFLAGS)
-@HAVE_GTK_TRUE@composite_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
-@HAVE_GTK_TRUE@gradient_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
-@HAVE_GTK_TRUE@fetch_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
-@HAVE_GTK_TRUE@region_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
-@HAVE_GTK_TRUE@clip_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
+TEST_LDADD = $(top_builddir)/pixman/libpixman-1.la
+INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman \
+ $(am__append_2)
+TESTPROGRAMS = region-test scaling-test fetch-test trap-crasher \
+ $(am__append_1)
+fetch_test_LDADD = $(TEST_LDADD)
+region_test_LDADD = $(TEST_LDADD)
+scaling_test_LDADD = $(TEST_LDADD)
+trap_crasher_LDADD = $(TEST_LDADD)
+
+# GTK using test programs
+@HAVE_GTK_TRUE@GTK_LDADD = $(TEST_LDADD) $(GTK_LIBS)
+@HAVE_GTK_TRUE@gradient_test_LDADD = $(GTK_LDADD)
+@HAVE_GTK_TRUE@gradient_test_SOURCES = gradient-test.c utils.c utils.h
+@HAVE_GTK_TRUE@alpha_test_LDADD = $(GTK_LDADD)
+@HAVE_GTK_TRUE@alpha_test_SOURCES = alpha-test.c utils.c utils.h
+@HAVE_GTK_TRUE@composite_test_LDADD = $(GTK_LDADD)
+@HAVE_GTK_TRUE@composite_test_SOURCES = composite-test.c utils.c utils.h
+@HAVE_GTK_TRUE@clip_test_LDADD = $(GTK_LDADD)
+@HAVE_GTK_TRUE@clip_test_SOURCES = clip-test.c utils.c utils.h
+@HAVE_GTK_TRUE@clip_in_LDADD = $(GTK_LDADD)
+@HAVE_GTK_TRUE@clip_in_SOURCES = clip-in.c utils.c utils.h
+@HAVE_GTK_TRUE@trap_test_LDADD = $(GTK_LDADD)
+@HAVE_GTK_TRUE@trap_test_SOURCES = trap-test.c utils.c utils.h
all: all-am
.SUFFIXES:
@@ -268,6 +328,12 @@ clean-noinstPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
+alpha-test$(EXEEXT): $(alpha_test_OBJECTS) $(alpha_test_DEPENDENCIES)
+ @rm -f alpha-test$(EXEEXT)
+ $(LINK) $(alpha_test_LDFLAGS) $(alpha_test_OBJECTS) $(alpha_test_LDADD) $(LIBS)
+clip-in$(EXEEXT): $(clip_in_OBJECTS) $(clip_in_DEPENDENCIES)
+ @rm -f clip-in$(EXEEXT)
+ $(LINK) $(clip_in_LDFLAGS) $(clip_in_OBJECTS) $(clip_in_LDADD) $(LIBS)
clip-test$(EXEEXT): $(clip_test_OBJECTS) $(clip_test_DEPENDENCIES)
@rm -f clip-test$(EXEEXT)
$(LINK) $(clip_test_LDFLAGS) $(clip_test_OBJECTS) $(clip_test_LDADD) $(LIBS)
@@ -283,6 +349,15 @@ gradient-test$(EXEEXT): $(gradient_test_OBJECTS) $(gradient_test_DEPENDENCIES)
region-test$(EXEEXT): $(region_test_OBJECTS) $(region_test_DEPENDENCIES)
@rm -f region-test$(EXEEXT)
$(LINK) $(region_test_LDFLAGS) $(region_test_OBJECTS) $(region_test_LDADD) $(LIBS)
+scaling-test$(EXEEXT): $(scaling_test_OBJECTS) $(scaling_test_DEPENDENCIES)
+ @rm -f scaling-test$(EXEEXT)
+ $(LINK) $(scaling_test_LDFLAGS) $(scaling_test_OBJECTS) $(scaling_test_LDADD) $(LIBS)
+trap-crasher$(EXEEXT): $(trap_crasher_OBJECTS) $(trap_crasher_DEPENDENCIES)
+ @rm -f trap-crasher$(EXEEXT)
+ $(LINK) $(trap_crasher_LDFLAGS) $(trap_crasher_OBJECTS) $(trap_crasher_LDADD) $(LIBS)
+trap-test$(EXEEXT): $(trap_test_OBJECTS) $(trap_test_DEPENDENCIES)
+ @rm -f trap-test$(EXEEXT)
+ $(LINK) $(trap_test_LDFLAGS) $(trap_test_OBJECTS) $(trap_test_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -290,11 +365,17 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alpha-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clip-in.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clip-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/composite-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fetch-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gradient-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/region-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scaling-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trap-crasher.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trap-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
diff --git a/lib/pixman/test/alpha-test.c b/lib/pixman/test/alpha-test.c
new file mode 100644
index 000000000..e2b97c789
--- /dev/null
+++ b/lib/pixman/test/alpha-test.c
@@ -0,0 +1,117 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "pixman.h"
+#include "utils.h"
+
+int
+main (int argc, char **argv)
+{
+#define WIDTH 400
+#define HEIGHT 200
+
+ uint32_t *alpha = malloc (WIDTH * HEIGHT * 4);
+ uint32_t *dest = malloc (WIDTH * HEIGHT * 4);
+ uint32_t *src = malloc (WIDTH * HEIGHT * 4);
+ pixman_image_t *grad_img;
+ pixman_image_t *alpha_img;
+ pixman_image_t *solid_img;
+ pixman_image_t *dest_img;
+ pixman_image_t *src_img;
+ int i;
+ pixman_gradient_stop_t stops[2] =
+ {
+ { pixman_int_to_fixed (0), { 0x0000, 0x0000, 0x0000, 0x0000 } },
+ { pixman_int_to_fixed (1), { 0xffff, 0x0000, 0x1111, 0xffff } }
+ };
+ pixman_point_fixed_t p1 = { pixman_double_to_fixed (0), 0 };
+ pixman_point_fixed_t p2 = { pixman_double_to_fixed (WIDTH),
+ pixman_int_to_fixed (0) };
+ pixman_transform_t trans = {
+ { { pixman_double_to_fixed (2), pixman_double_to_fixed (0.5), pixman_double_to_fixed (-100), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (3), pixman_double_to_fixed (0), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (0.000), pixman_double_to_fixed (1.0) }
+ }
+ };
+
+ pixman_transform_t id = {
+ { { pixman_fixed_1, 0, 0 },
+ { 0, pixman_fixed_1, 0 },
+ { 0, 0, pixman_fixed_1 } }
+ };
+
+ pixman_point_fixed_t c_inner;
+ pixman_point_fixed_t c_outer;
+ pixman_fixed_t r_inner;
+ pixman_fixed_t r_outer;
+ pixman_color_t red = { 0xffff, 0x0000, 0x0000, 0xffff };
+
+ for (i = 0; i < WIDTH * HEIGHT; ++i)
+ alpha[i] = 0x4f00004f; /* pale blue */
+
+ alpha_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ WIDTH, HEIGHT,
+ alpha,
+ WIDTH * 4);
+
+ for (i = 0; i < WIDTH * HEIGHT; ++i)
+ dest[i] = 0xffffff00; /* yellow */
+
+ dest_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ WIDTH, HEIGHT,
+ dest,
+ WIDTH * 4);
+
+ for (i = 0; i < WIDTH * HEIGHT; ++i)
+ src[i] = 0xffff0000;
+
+ src_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ WIDTH, HEIGHT,
+ src,
+ WIDTH * 4);
+
+ c_inner.x = pixman_double_to_fixed (50.0);
+ c_inner.y = pixman_double_to_fixed (50.0);
+ c_outer.x = pixman_double_to_fixed (50.0);
+ c_outer.y = pixman_double_to_fixed (50.0);
+ r_inner = 0;
+ r_outer = pixman_double_to_fixed (50.0);
+
+#if 0
+ grad_img = pixman_image_create_conical_gradient (&c_inner, r_inner,
+ stops, 2);
+#endif
+#if 0
+ grad_img = pixman_image_create_conical_gradient (&c_inner, r_inner,
+ stops, 2);
+ grad_img = pixman_image_create_linear_gradient (&c_inner, &c_outer,
+ r_inner, r_outer,
+ stops, 2);
+#endif
+
+ grad_img = pixman_image_create_linear_gradient (&p1, &p2,
+ stops, 2);
+
+ pixman_image_set_transform (grad_img, &id);
+ pixman_image_set_repeat (grad_img, PIXMAN_REPEAT_PAD);
+
+ pixman_image_composite (PIXMAN_OP_OVER, grad_img, NULL, alpha_img,
+ 0, 0, 0, 0, 0, 0, 10 * WIDTH, HEIGHT);
+
+ pixman_image_set_alpha_map (src_img, alpha_img, 10, 10);
+
+ pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dest_img,
+ 0, 0, 0, 0, 0, 0, 10 * WIDTH, HEIGHT);
+
+ printf ("0, 0: %x\n", dest[0]);
+ printf ("10, 10: %x\n", dest[10 * 10 + 10]);
+ printf ("w, h: %x\n", dest[(HEIGHT - 1) * 100 + (WIDTH - 1)]);
+
+ show_image (dest_img);
+
+ pixman_image_unref (src_img);
+ pixman_image_unref (grad_img);
+ pixman_image_unref (alpha_img);
+ free (dest);
+
+ return 0;
+}
diff --git a/lib/pixman/test/clip-in.c b/lib/pixman/test/clip-in.c
new file mode 100644
index 000000000..55459b204
--- /dev/null
+++ b/lib/pixman/test/clip-in.c
@@ -0,0 +1,50 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "pixman.h"
+#include "utils.h"
+
+/* This test demonstrates that clipping is done totally different depending
+ * on whether the source is transformed or not.
+ */
+int
+main (int argc, char **argv)
+{
+#define WIDTH 200
+#define HEIGHT 200
+
+#define SMALL 25
+
+ uint32_t *sbits = malloc (SMALL * SMALL * 4);
+ uint32_t *bits = malloc (WIDTH * HEIGHT * 4);
+ pixman_transform_t trans = {
+ {
+ { pixman_double_to_fixed (1.0), pixman_double_to_fixed (0), pixman_double_to_fixed (-0.1), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (1), pixman_double_to_fixed (-0.1), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (0), pixman_double_to_fixed (1.0) }
+ } };
+
+ pixman_image_t *src_img = pixman_image_create_bits (PIXMAN_a8r8g8b8, SMALL, SMALL, sbits, 4 * SMALL);
+ pixman_image_t *dest_img = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, bits, 4 * WIDTH);
+
+ memset (bits, 0xff, WIDTH * HEIGHT * 4);
+ memset (sbits, 0x00, SMALL * SMALL * 4);
+
+ pixman_image_composite (PIXMAN_OP_IN,
+ src_img, NULL, dest_img,
+ 0, 0, 0, 0, SMALL, SMALL, 200, 200);
+
+ pixman_image_set_transform (src_img, &trans);
+
+ pixman_image_composite (PIXMAN_OP_IN,
+ src_img, NULL, dest_img,
+ 0, 0, 0, 0, SMALL * 2, SMALL * 2, 200, 200);
+
+ show_image (dest_img);
+
+ pixman_image_unref (src_img);
+ pixman_image_unref (dest_img);
+ free (bits);
+
+ return 0;
+}
diff --git a/lib/pixman/test/clip-test.c b/lib/pixman/test/clip-test.c
index 457e97a2b..90310f415 100644
--- a/lib/pixman/test/clip-test.c
+++ b/lib/pixman/test/clip-test.c
@@ -1,70 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <gtk/gtk.h>
#include "pixman.h"
-
-GdkPixbuf *
-pixbuf_from_argb32 (uint32_t *bits,
- int width,
- int height,
- int stride)
-{
- GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE,
- 8, width, height);
- int p_stride = gdk_pixbuf_get_rowstride (pixbuf);
- guint32 *p_bits = (guint32 *)gdk_pixbuf_get_pixels (pixbuf);
- int w, h;
-
- for (h = 0; h < height; ++h)
- {
- for (w = 0; w < width; ++w)
- {
- uint32_t argb = bits[h * stride + w];
- guint32 abgr;
-
- abgr = (argb & 0xff000000) |
- (argb & 0xff) << 16 |
- (argb & 0x00ff00) |
- (argb & 0xff0000) >> 16;
-
- p_bits[h * (p_stride / 4) + w] = abgr;
- }
- }
-
- return pixbuf;
-}
-
-static gboolean
-on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
-{
- GdkPixbuf *pixbuf = data;
-
- gdk_draw_pixbuf (widget->window, NULL,
- pixbuf, 0, 0, 0, 0,
- gdk_pixbuf_get_width (pixbuf),
- gdk_pixbuf_get_height (pixbuf),
- GDK_RGB_DITHER_NONE,
- 0, 0);
-
- return TRUE;
-}
-
-static void
-show_window (pixman_image_t *img, int w, int h, int stride)
-{
- GdkPixbuf *pixbuf;
-
- GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- pixbuf = pixbuf_from_argb32 (pixman_image_get_data (img), w, h, stride);
-
- g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), pixbuf);
- g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
-
- gtk_widget_show (window);
-
- gtk_main ();
-}
+#include "utils.h"
#define WIDTH 200
#define HEIGHT 200
@@ -109,8 +46,6 @@ main (int argc, char **argv)
}
};
- gtk_init (&argc, &argv);
-
src_img = create_solid_bits (0xff0000ff);
c_inner.x = pixman_double_to_fixed (100.0);
@@ -150,7 +85,7 @@ main (int argc, char **argv)
printf ("w, h: %x\n", src[(HEIGHT - 1) * 100 + (WIDTH - 1)]);
#endif
- show_window (dst_img, WIDTH, HEIGHT, WIDTH);
+ show_image (dst_img);
pixman_image_unref (gradient_img);
pixman_image_unref (src_img);
diff --git a/lib/pixman/test/composite-test.c b/lib/pixman/test/composite-test.c
index d6596f496..393e15d8f 100644
--- a/lib/pixman/test/composite-test.c
+++ b/lib/pixman/test/composite-test.c
@@ -1,67 +1,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "pixman.h"
-
-#include <gtk/gtk.h>
-
-static GdkPixbuf *
-pixbuf_from_argb32 (uint32_t *bits,
- int width,
- int height,
- int stride)
-{
- GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE,
- 8, width, height);
- int p_stride = gdk_pixbuf_get_rowstride (pixbuf);
- guint32 *p_bits = (guint32 *)gdk_pixbuf_get_pixels (pixbuf);
- int w, h;
-
- for (h = 0; h < height; ++h)
- {
- for (w = 0; w < width; ++w)
- {
- uint32_t argb = bits[h * stride + w];
- guint32 rgba;
-
- rgba = (argb << 8) | (argb >> 24);
-
- p_bits[h * (p_stride / 4) + w] = rgba;
- }
- }
-
- return pixbuf;
-}
-
-static gboolean
-on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
-{
- GdkPixbuf *pixbuf = data;
-
- gdk_draw_pixbuf (widget->window, NULL,
- pixbuf, 0, 0, 0, 0,
- gdk_pixbuf_get_width (pixbuf),
- gdk_pixbuf_get_height (pixbuf),
- GDK_RGB_DITHER_NONE,
- 0, 0);
-
- return TRUE;
-}
-
-static void
-show_window (uint32_t *bits, int w, int h, int stride)
-{
- GdkPixbuf *pixbuf;
-
- GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- pixbuf = pixbuf_from_argb32 (bits, w, h, stride);
-
- g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), pixbuf);
-
- gtk_widget_show (window);
-
- gtk_main ();
-}
+#include "utils.h"
#define WIDTH 100
#define HEIGHT 100
@@ -108,14 +48,13 @@ main (int argc, char **argv)
uint32_t *dest = malloc (WIDTH * HEIGHT * 4);
pixman_image_t *src_img;
pixman_image_t *dest_img;
- int i, j;
- gtk_init (&argc, &argv);
+ int i;
for (i = 0; i < WIDTH * HEIGHT; ++i)
src[i] = 0x7f7f0000; /* red */
for (i = 0; i < WIDTH * HEIGHT; ++i)
- dest[i] = 0x7f0000ff; /* blue */
+ dest[i] = 0x7f00007f; /* blue */
src_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
WIDTH, HEIGHT,
@@ -133,23 +72,12 @@ main (int argc, char **argv)
pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dest_img,
0, 0, 0, 0, 0, 0, WIDTH, HEIGHT);
-#if 0
- for (i = 0; i < WIDTH; ++i)
- {
- for (j = 0; j < HEIGHT; ++j)
- g_print ("%x, ", dest[i * WIDTH + j]);
- g_print ("\n");
- }
-#endif
-
- show_window (dest, WIDTH, HEIGHT, WIDTH);
+ show_image (dest_img);
pixman_image_unref (src_img);
pixman_image_unref (dest_img);
free (src);
free (dest);
-
-
return 0;
}
diff --git a/lib/pixman/test/fetch-test.c b/lib/pixman/test/fetch-test.c
index 717f6d4fd..c41f1a63e 100644
--- a/lib/pixman/test/fetch-test.c
+++ b/lib/pixman/test/fetch-test.c
@@ -3,10 +3,8 @@
#include <stdio.h>
#include "pixman.h"
-
#define SIZE 1024
-
pixman_indexed_t mono_pallete = {
.rgba = { 0x00000000, 0x00ffffff },
};
diff --git a/lib/pixman/test/gradient-test.c b/lib/pixman/test/gradient-test.c
index 8a99ff0e6..2593ee38a 100644
--- a/lib/pixman/test/gradient-test.c
+++ b/lib/pixman/test/gradient-test.c
@@ -1,75 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
-#include <gtk/gtk.h>
#include "pixman.h"
-
-GdkPixbuf *
-pixbuf_from_argb32 (uint32_t *bits,
- int width,
- int height,
- int stride)
-{
- GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE,
- 8, width, height);
- int p_stride = gdk_pixbuf_get_rowstride (pixbuf);
- guint32 *p_bits = (guint32 *)gdk_pixbuf_get_pixels (pixbuf);
- int w, h;
-
- for (h = 0; h < height; ++h)
- {
- for (w = 0; w < width; ++w)
- {
- uint32_t argb = bits[h * stride + w];
- guint32 abgr;
-
- abgr = (argb & 0xff000000) |
- (argb & 0xff) << 16 |
- (argb & 0x00ff00) |
- (argb & 0xff0000) >> 16;
-
- p_bits[h * (p_stride / 4) + w] = abgr;
- }
- }
-
- return pixbuf;
-}
-
-static gboolean
-on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
-{
- GdkPixbuf *pixbuf = data;
-
- gdk_draw_pixbuf (widget->window, NULL,
- pixbuf, 0, 0, 0, 0,
- gdk_pixbuf_get_width (pixbuf),
- gdk_pixbuf_get_height (pixbuf),
- GDK_RGB_DITHER_NONE,
- 0, 0);
-
- return TRUE;
-}
-
-static void
-show_window (uint32_t *bits, int w, int h, int stride)
-{
- GdkPixbuf *pixbuf;
-
- GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- pixbuf = pixbuf_from_argb32 (bits, w, h, stride);
-
- g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), pixbuf);
- g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
-
- gtk_widget_show (window);
-
- gtk_main ();
-}
+#include "utils.h"
int
main (int argc, char **argv)
{
-#define WIDTH 200
+#define WIDTH 400
#define HEIGHT 200
uint32_t *dest = malloc (WIDTH * HEIGHT * 4);
@@ -78,16 +15,16 @@ main (int argc, char **argv)
int i;
pixman_gradient_stop_t stops[2] =
{
- { pixman_int_to_fixed (0), { 0xffff, 0x0000, 0x0000, 0xffff } },
- { pixman_int_to_fixed (1), { 0xffff, 0xffff, 0x0000, 0xffff } }
+ { pixman_int_to_fixed (0), { 0xffff, 0xeeee, 0xeeee, 0xeeee } },
+ { pixman_int_to_fixed (1), { 0xffff, 0x1111, 0x1111, 0x1111 } }
};
- pixman_point_fixed_t p1 = { 0, 0 };
- pixman_point_fixed_t p2 = { pixman_int_to_fixed (WIDTH),
- pixman_int_to_fixed (HEIGHT) };
+ pixman_point_fixed_t p1 = { pixman_double_to_fixed (0), 0 };
+ pixman_point_fixed_t p2 = { pixman_double_to_fixed (WIDTH / 8.),
+ pixman_int_to_fixed (0) };
pixman_transform_t trans = {
{ { pixman_double_to_fixed (2), pixman_double_to_fixed (0.5), pixman_double_to_fixed (-100), },
- { pixman_double_to_fixed (0), pixman_double_to_fixed (2), pixman_double_to_fixed (0), },
- { pixman_double_to_fixed (0), pixman_double_to_fixed (0.004990), pixman_double_to_fixed (1.0) }
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (3), pixman_double_to_fixed (0), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (0.000), pixman_double_to_fixed (1.0) }
}
};
@@ -102,10 +39,8 @@ main (int argc, char **argv)
pixman_fixed_t r_inner;
pixman_fixed_t r_outer;
- gtk_init (&argc, &argv);
-
for (i = 0; i < WIDTH * HEIGHT; ++i)
- dest[i] = 0x3f0000ff; /* pale blue */
+ dest[i] = 0x4f00004f; /* pale blue */
dest_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
WIDTH, HEIGHT,
@@ -119,25 +54,30 @@ main (int argc, char **argv)
r_inner = 0;
r_outer = pixman_double_to_fixed (50.0);
- src_img = pixman_image_create_radial_gradient (&c_inner, &c_outer,
+ src_img = pixman_image_create_conical_gradient (&c_inner, r_inner,
+ stops, 2);
+#if 0
+ src_img = pixman_image_create_conical_gradient (&c_inner, r_inner,
+ stops, 2);
+ src_img = pixman_image_create_linear_gradient (&c_inner, &c_outer,
r_inner, r_outer,
stops, 2);
+#endif
-#if 0
src_img = pixman_image_create_linear_gradient (&p1, &p2,
stops, 2);
-#endif
- pixman_image_set_transform (src_img, &trans);
+ pixman_image_set_transform (src_img, &id);
+ pixman_image_set_repeat (src_img, PIXMAN_REPEAT_PAD);
pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dest_img,
- 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT);
+ 0, 0, 0, 0, 0, 0, 10 * WIDTH, HEIGHT);
printf ("0, 0: %x\n", dest[0]);
printf ("10, 10: %x\n", dest[10 * 10 + 10]);
printf ("w, h: %x\n", dest[(HEIGHT - 1) * 100 + (WIDTH - 1)]);
- show_window (dest, WIDTH, HEIGHT, WIDTH);
+ show_image (dest_img);
pixman_image_unref (src_img);
pixman_image_unref (dest_img);
diff --git a/lib/pixman/test/scaling-test.c b/lib/pixman/test/scaling-test.c
new file mode 100644
index 000000000..c85908ddc
--- /dev/null
+++ b/lib/pixman/test/scaling-test.c
@@ -0,0 +1,341 @@
+/*
+ * Test program, which can detect problems with nearest neighbout scaling
+ * implementation. Also SRC and OVER opetations tested for 16bpp and 32bpp
+ * images.
+ *
+ * Just run it without any command line arguments, and it will report either
+ * "scaling test passed" - everything is ok
+ * "scaling test failed!" - there is some problem
+ *
+ * In the case of failure, finding the problem involves the following steps:
+ * 1. Get the reference 'scaling-test' binary. It makes sense to disable all
+ * the cpu specific optimizations in pixman and also configure it with
+ * '--disable-shared' option. Those who are paranoid can also tweak the
+ * sources to disable all fastpath functions. The resulting binary
+ * can be renamed to something like 'scaling-test.ref'.
+ * 2. Compile the buggy binary (also with the '--disable-shared' option).
+ * 3. Run 'ruby scaling-test-bisect.rb ./scaling-test.ref ./scaling-test'
+ * 4. Look at the information about failed case (destination buffer content
+ * will be shown) and try to figure out what is wrong. It is possible
+ * to use debugging print to stderr in pixman to get more information,
+ * this does not interfere with the testing script.
+ */
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "pixman.h"
+
+/* A primitive pseudorandom number generator, taken from POSIX.1-2001 example */
+
+static uint32_t lcg_seed;
+
+uint32_t lcg_rand(void)
+{
+ lcg_seed = lcg_seed * 1103515245 + 12345;
+ return ((uint32_t)(lcg_seed / 65536) % 32768);
+}
+
+void lcg_srand(uint32_t seed)
+{
+ lcg_seed = seed;
+}
+
+uint32_t lcg_rand_n(int max)
+{
+ return lcg_rand() % max;
+}
+
+/*----------------------------------------------------------------------------*\
+ * CRC-32 version 2.0.0 by Craig Bruce, 2006-04-29.
+ *
+ * This program generates the CRC-32 values for the files named in the
+ * command-line arguments. These are the same CRC-32 values used by GZIP,
+ * PKZIP, and ZMODEM. The Crc32_ComputeBuf() can also be detached and
+ * used independently.
+ *
+ * THIS PROGRAM IS PUBLIC-DOMAIN SOFTWARE.
+ *
+ * Based on the byte-oriented implementation "File Verification Using CRC"
+ * by Mark R. Nelson in Dr. Dobb's Journal, May 1992, pp. 64-67.
+ *
+ * v1.0.0: original release.
+ * v1.0.1: fixed printf formats.
+ * v1.0.2: fixed something else.
+ * v1.0.3: replaced CRC constant table by generator function.
+ * v1.0.4: reformatted code, made ANSI C. 1994-12-05.
+ * v2.0.0: rewrote to use memory buffer & static table, 2006-04-29.
+\*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*\
+ * NAME:
+ * Crc32_ComputeBuf() - computes the CRC-32 value of a memory buffer
+ * DESCRIPTION:
+ * Computes or accumulates the CRC-32 value for a memory buffer.
+ * The 'inCrc32' gives a previously accumulated CRC-32 value to allow
+ * a CRC to be generated for multiple sequential buffer-fuls of data.
+ * The 'inCrc32' for the first buffer must be zero.
+ * ARGUMENTS:
+ * inCrc32 - accumulated CRC-32 value, must be 0 on first call
+ * buf - buffer to compute CRC-32 value for
+ * bufLen - number of bytes in buffer
+ * RETURNS:
+ * crc32 - computed CRC-32 value
+ * ERRORS:
+ * (no errors are possible)
+\*----------------------------------------------------------------------------*/
+
+static uint32_t Crc32_ComputeBuf( uint32_t inCrc32, const void *buf,
+ size_t bufLen )
+{
+ static const uint32_t crcTable[256] = {
+ 0x00000000,0x77073096,0xEE0E612C,0x990951BA,0x076DC419,0x706AF48F,0xE963A535,
+ 0x9E6495A3,0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988,0x09B64C2B,0x7EB17CBD,
+ 0xE7B82D07,0x90BF1D91,0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE,0x1ADAD47D,
+ 0x6DDDE4EB,0xF4D4B551,0x83D385C7,0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC,
+ 0x14015C4F,0x63066CD9,0xFA0F3D63,0x8D080DF5,0x3B6E20C8,0x4C69105E,0xD56041E4,
+ 0xA2677172,0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B,0x35B5A8FA,0x42B2986C,
+ 0xDBBBC9D6,0xACBCF940,0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59,0x26D930AC,
+ 0x51DE003A,0xC8D75180,0xBFD06116,0x21B4F4B5,0x56B3C423,0xCFBA9599,0xB8BDA50F,
+ 0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924,0x2F6F7C87,0x58684C11,0xC1611DAB,
+ 0xB6662D3D,0x76DC4190,0x01DB7106,0x98D220BC,0xEFD5102A,0x71B18589,0x06B6B51F,
+ 0x9FBFE4A5,0xE8B8D433,0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818,0x7F6A0DBB,
+ 0x086D3D2D,0x91646C97,0xE6635C01,0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E,
+ 0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457,0x65B0D9C6,0x12B7E950,0x8BBEB8EA,
+ 0xFCB9887C,0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65,0x4DB26158,0x3AB551CE,
+ 0xA3BC0074,0xD4BB30E2,0x4ADFA541,0x3DD895D7,0xA4D1C46D,0xD3D6F4FB,0x4369E96A,
+ 0x346ED9FC,0xAD678846,0xDA60B8D0,0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9,
+ 0x5005713C,0x270241AA,0xBE0B1010,0xC90C2086,0x5768B525,0x206F85B3,0xB966D409,
+ 0xCE61E49F,0x5EDEF90E,0x29D9C998,0xB0D09822,0xC7D7A8B4,0x59B33D17,0x2EB40D81,
+ 0xB7BD5C3B,0xC0BA6CAD,0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A,0xEAD54739,
+ 0x9DD277AF,0x04DB2615,0x73DC1683,0xE3630B12,0x94643B84,0x0D6D6A3E,0x7A6A5AA8,
+ 0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1,0xF00F9344,0x8708A3D2,0x1E01F268,
+ 0x6906C2FE,0xF762575D,0x806567CB,0x196C3671,0x6E6B06E7,0xFED41B76,0x89D32BE0,
+ 0x10DA7A5A,0x67DD4ACC,0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5,0xD6D6A3E8,
+ 0xA1D1937E,0x38D8C2C4,0x4FDFF252,0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B,
+ 0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60,0xDF60EFC3,0xA867DF55,0x316E8EEF,
+ 0x4669BE79,0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236,0xCC0C7795,0xBB0B4703,
+ 0x220216B9,0x5505262F,0xC5BA3BBE,0xB2BD0B28,0x2BB45A92,0x5CB36A04,0xC2D7FFA7,
+ 0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D,0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A,
+ 0x9C0906A9,0xEB0E363F,0x72076785,0x05005713,0x95BF4A82,0xE2B87A14,0x7BB12BAE,
+ 0x0CB61B38,0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21,0x86D3D2D4,0xF1D4E242,
+ 0x68DDB3F8,0x1FDA836E,0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777,0x88085AE6,
+ 0xFF0F6A70,0x66063BCA,0x11010B5C,0x8F659EFF,0xF862AE69,0x616BFFD3,0x166CCF45,
+ 0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2,0xA7672661,0xD06016F7,0x4969474D,
+ 0x3E6E77DB,0xAED16A4A,0xD9D65ADC,0x40DF0B66,0x37D83BF0,0xA9BCAE53,0xDEBB9EC5,
+ 0x47B2CF7F,0x30B5FFE9,0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6,0xBAD03605,
+ 0xCDD70693,0x54DE5729,0x23D967BF,0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94,
+ 0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D };
+ uint32_t crc32;
+ unsigned char *byteBuf;
+ size_t i;
+
+ /** accumulate crc32 for buffer **/
+ crc32 = inCrc32 ^ 0xFFFFFFFF;
+ byteBuf = (unsigned char*) buf;
+ for (i=0; i < bufLen; i++) {
+ crc32 = (crc32 >> 8) ^ crcTable[ (crc32 ^ byteBuf[i]) & 0xFF ];
+ }
+ return( crc32 ^ 0xFFFFFFFF );
+}
+
+
+#define MAX_SRC_WIDTH 10
+#define MAX_SRC_HEIGHT 10
+#define MAX_DST_WIDTH 10
+#define MAX_DST_HEIGHT 10
+#define MAX_STRIDE 4
+
+/*
+ * Composite operation with pseudorandom images
+ */
+uint32_t test_composite(uint32_t initcrc, int testnum, int verbose)
+{
+ int i;
+ pixman_image_t *src_img;
+ pixman_image_t *dst_img;
+ pixman_transform_t transform;
+ pixman_region16_t clip;
+ int src_width, src_height;
+ int dst_width, dst_height;
+ int src_stride, dst_stride;
+ int src_x, src_y;
+ int dst_x, dst_y;
+ int src_bpp;
+ int dst_bpp;
+ int w, h;
+ int scale_x = 32768, scale_y = 32768;
+ int op;
+ int repeat = 0;
+ int src_fmt, dst_fmt;
+ uint32_t *srcbuf;
+ uint32_t *dstbuf;
+ uint32_t crc32;
+
+ lcg_srand(testnum);
+
+ src_bpp = (lcg_rand_n(2) == 0) ? 2 : 4;
+ dst_bpp = (lcg_rand_n(2) == 0) ? 2 : 4;
+ op = (lcg_rand_n(2) == 0) ? PIXMAN_OP_SRC : PIXMAN_OP_OVER;
+
+ src_width = lcg_rand_n(MAX_SRC_WIDTH) + 1;
+ src_height = lcg_rand_n(MAX_SRC_HEIGHT) + 1;
+ dst_width = lcg_rand_n(MAX_DST_WIDTH) + 1;
+ dst_height = lcg_rand_n(MAX_DST_HEIGHT) + 1;
+ src_stride = src_width * src_bpp + lcg_rand_n(MAX_STRIDE) * src_bpp;
+ dst_stride = dst_width * dst_bpp + lcg_rand_n(MAX_STRIDE) * dst_bpp;
+ if (src_stride & 3) src_stride += 2;
+ if (dst_stride & 3) dst_stride += 2;
+
+ src_x = -(src_width / 4) + lcg_rand_n(src_width * 3 / 2);
+ src_y = -(src_height / 4) + lcg_rand_n(src_height * 3 / 2);
+ dst_x = -(dst_width / 4) + lcg_rand_n(dst_width * 3 / 2);
+ dst_y = -(dst_height / 4) + lcg_rand_n(dst_height * 3 / 2);
+ w = lcg_rand_n(dst_width * 3 / 2 - dst_x);
+ h = lcg_rand_n(dst_height * 3 / 2 - dst_y);
+
+ srcbuf = (uint32_t *)malloc(src_stride * src_height);
+ dstbuf = (uint32_t *)malloc(dst_stride * dst_height);
+ for (i = 0; i < src_stride * src_height; i++)
+ *((uint8_t *)srcbuf + i) = lcg_rand_n(256);
+ for (i = 0; i < dst_stride * dst_height; i++)
+ *((uint8_t *)dstbuf + i) = lcg_rand_n(256);
+
+ src_fmt = src_bpp == 4 ? (lcg_rand_n(2) == 0 ?
+ PIXMAN_a8r8g8b8 : PIXMAN_x8r8g8b8) : PIXMAN_r5g6b5;
+
+ dst_fmt = dst_bpp == 4 ? (lcg_rand_n(2) == 0 ?
+ PIXMAN_a8r8g8b8 : PIXMAN_x8r8g8b8) : PIXMAN_r5g6b5;
+
+ src_img = pixman_image_create_bits(
+ src_fmt, src_width, src_height, srcbuf, src_stride);
+
+ dst_img = pixman_image_create_bits(
+ dst_fmt, dst_width, dst_height, dstbuf, dst_stride);
+
+ if (lcg_rand_n(8) > 0) {
+ scale_x = 32768 + lcg_rand_n(65536);
+ scale_y = 32768 + lcg_rand_n(65536);
+ pixman_transform_init_scale(&transform, scale_x, scale_y);
+ pixman_image_set_transform(src_img, &transform);
+ }
+
+ switch (lcg_rand_n(4)) {
+ case 0: repeat = PIXMAN_REPEAT_NONE; break;
+ case 1: repeat = PIXMAN_REPEAT_NORMAL; break;
+ case 2: repeat = PIXMAN_REPEAT_PAD; break;
+ case 3: repeat = PIXMAN_REPEAT_REFLECT; break;
+ }
+ pixman_image_set_repeat(src_img, repeat);
+
+ if (verbose) {
+ printf("src_fmt=%08X, dst_fmt=%08X\n", src_fmt, dst_fmt);
+ printf("op=%d, scale_x=%d, scale_y=%d, repeat=%d\n",
+ op, scale_x, scale_y, repeat);
+ printf("src_width=%d, src_height=%d, dst_width=%d, dst_height=%d\n",
+ src_width, src_height, dst_width, dst_height);
+ printf("src_x=%d, src_y=%d, dst_x=%d, dst_y=%d\n",
+ src_x, src_y, dst_x, dst_y);
+ printf("w=%d, h=%d\n", w, h);
+ }
+
+ if (lcg_rand_n(8) == 0) {
+ pixman_box16_t clip_boxes[2];
+ int n = lcg_rand_n(2) + 1;
+ for (i = 0; i < n; i++) {
+ clip_boxes[i].x1 = lcg_rand_n(src_width);
+ clip_boxes[i].y1 = lcg_rand_n(src_height);
+ clip_boxes[i].x2 = clip_boxes[i].x1 + lcg_rand_n(src_width - clip_boxes[i].x1);
+ clip_boxes[i].y2 = clip_boxes[i].y1 + lcg_rand_n(src_height - clip_boxes[i].y1);
+ if (verbose) {
+ printf("source clip box: [%d,%d-%d,%d]\n",
+ clip_boxes[i].x1, clip_boxes[i].y1,
+ clip_boxes[i].x2, clip_boxes[i].y2);
+ }
+ }
+ pixman_region_init_rects(&clip, clip_boxes, n);
+ pixman_image_set_clip_region(src_img, &clip);
+ pixman_image_set_source_clipping(src_img, 1);
+ pixman_region_fini(&clip);
+ }
+
+ if (lcg_rand_n(8) == 0) {
+ pixman_box16_t clip_boxes[2];
+ int n = lcg_rand_n(2) + 1;
+ for (i = 0; i < n; i++) {
+ clip_boxes[i].x1 = lcg_rand_n(dst_width);
+ clip_boxes[i].y1 = lcg_rand_n(dst_height);
+ clip_boxes[i].x2 = clip_boxes[i].x1 + lcg_rand_n(dst_width - clip_boxes[i].x1);
+ clip_boxes[i].y2 = clip_boxes[i].y1 + lcg_rand_n(dst_height - clip_boxes[i].y1);
+ if (verbose) {
+ printf("destination clip box: [%d,%d-%d,%d]\n",
+ clip_boxes[i].x1, clip_boxes[i].y1,
+ clip_boxes[i].x2, clip_boxes[i].y2);
+ }
+ }
+ pixman_region_init_rects(&clip, clip_boxes, n);
+ pixman_image_set_clip_region(dst_img, &clip);
+ pixman_region_fini(&clip);
+ }
+
+ pixman_image_composite (op, src_img, NULL, dst_img,
+ src_x, src_y, 0, 0, dst_x, dst_y, w, h);
+
+ if (dst_fmt == PIXMAN_x8r8g8b8) {
+ /* ignore unused part */
+ for (i = 0; i < dst_stride * dst_height / 4; i++)
+ dstbuf[i] &= 0xFFFFFF;
+ }
+
+ if (verbose) {
+ int j;
+ for (i = 0; i < dst_height; i++) {
+ for (j = 0; j < dst_stride; j++) {
+ printf("%02X ", *((uint8_t *)dstbuf + i * dst_stride + j));
+ }
+ printf("\n");
+ }
+ }
+
+ pixman_image_unref (src_img);
+ pixman_image_unref (dst_img);
+
+ crc32 = Crc32_ComputeBuf(initcrc, dstbuf, dst_stride * dst_height);
+ free(srcbuf);
+ free(dstbuf);
+ return crc32;
+}
+
+int main(int argc, char *argv[])
+{
+ int i, n = 0;
+ uint32_t crc = 0;
+
+ if (argc >= 2)
+ n = atoi(argv[1]);
+
+ if (n == 0) n = 3000000;
+
+ if (n < 0) {
+ crc = test_composite(0, -n, 1);
+ printf("crc32=%08X\n", crc);
+ }
+ else {
+ for (i = 1; i <= n; i++)
+ {
+ crc = test_composite(crc, i, 0);
+ }
+ printf("crc32=%08X\n", crc);
+#ifdef LITTLE_ENDIAN
+ if (n == 3000000) {
+ /* predefined value for running with all the fastpath functions disabled */
+ /* it needs to be updated every time changes are introduced to this program! */
+ if (crc == 0xC950E5BB) {
+ printf("scaling test passed\n");
+ } else {
+ printf("scaling test failed!\n");
+ }
+ }
+#endif
+ }
+ return 0;
+}
diff --git a/lib/pixman/test/trap-crasher.c b/lib/pixman/test/trap-crasher.c
new file mode 100644
index 000000000..42b82f674
--- /dev/null
+++ b/lib/pixman/test/trap-crasher.c
@@ -0,0 +1,27 @@
+#include <stdlib.h>
+#include <pixman.h>
+
+int
+main()
+{
+ pixman_image_t *dst;
+ pixman_trapezoid_t traps[1] = {
+ {
+ .top = 2147483646,
+ .bottom = 2147483647,
+ .left = {
+ .p1 = { .x = 0, .y = 0 },
+ .p2 = { .x = 0, .y = 2147483647 }
+ },
+ .right = {
+ .p1 = { .x = 65536, .y = 0 },
+ .p2 = { .x = 0, .y = 2147483647 }
+ }
+ },
+ };
+
+ dst = pixman_image_create_bits (PIXMAN_a8, 1, 1, NULL, -1);
+
+ pixman_add_trapezoids (dst, 0, 0, sizeof (traps)/sizeof (traps[0]), traps);
+ return (0);
+}
diff --git a/lib/pixman/test/trap-test.c b/lib/pixman/test/trap-test.c
new file mode 100644
index 000000000..1da439bd6
--- /dev/null
+++ b/lib/pixman/test/trap-test.c
@@ -0,0 +1,49 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "pixman.h"
+#include "utils.h"
+
+int
+main (int argc, char **argv)
+{
+#define WIDTH 200
+#define HEIGHT 200
+
+ pixman_image_t *src_img;
+ pixman_image_t *mask_img;
+ pixman_image_t *dest_img;
+ pixman_trap_t trap;
+ pixman_color_t white = { 0x0000, 0xffff, 0x0000, 0xffff };
+ uint32_t *bits = malloc (WIDTH * HEIGHT * 4);
+ uint32_t *mbits = malloc (WIDTH * HEIGHT);
+
+ memset (mbits, 0, WIDTH * HEIGHT);
+ memset (bits, 0xff, WIDTH * HEIGHT * 4);
+
+ trap.top.l = pixman_int_to_fixed (50) + 0x8000;
+ trap.top.r = pixman_int_to_fixed (150) + 0x8000;
+ trap.top.y = pixman_int_to_fixed (30);
+
+ trap.bot.l = pixman_int_to_fixed (50) + 0x8000;
+ trap.bot.r = pixman_int_to_fixed (150) + 0x8000;
+ trap.bot.y = pixman_int_to_fixed (150);
+
+ mask_img = pixman_image_create_bits (PIXMAN_a8, WIDTH, HEIGHT, mbits, WIDTH);
+ src_img = pixman_image_create_solid_fill (&white);
+ dest_img = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, bits, WIDTH * 4);
+
+ pixman_add_traps (mask_img, 0, 0, 1, &trap);
+
+ pixman_image_composite (PIXMAN_OP_OVER,
+ src_img, mask_img, dest_img,
+ 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT);
+
+ show_image (dest_img);
+
+ pixman_image_unref (src_img);
+ pixman_image_unref (dest_img);
+ free (bits);
+
+ return 0;
+}
diff --git a/lib/pixman/test/utils.c b/lib/pixman/test/utils.c
new file mode 100644
index 000000000..a609315c5
--- /dev/null
+++ b/lib/pixman/test/utils.c
@@ -0,0 +1,113 @@
+#include <gtk/gtk.h>
+#include <config.h>
+#include "pixman-private.h" /* For image->bits.format
+ * FIXME: there should probably be public API for this
+ */
+#include "utils.h"
+
+GdkPixbuf *
+pixbuf_from_argb32 (uint32_t *bits,
+ gboolean has_alpha,
+ int width,
+ int height,
+ int stride)
+{
+ GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE,
+ 8, width, height);
+ int p_stride = gdk_pixbuf_get_rowstride (pixbuf);
+ guint32 *p_bits = (guint32 *)gdk_pixbuf_get_pixels (pixbuf);
+ int w, h;
+
+ for (h = 0; h < height; ++h)
+ {
+ for (w = 0; w < width; ++w)
+ {
+ uint32_t argb = bits[h * (stride / 4) + w];
+ guint r, g, b, a;
+ char *pb = (char *)p_bits;
+
+ pb += h * p_stride + w * 4;
+
+ r = (argb & 0x00ff0000) >> 16;
+ g = (argb & 0x0000ff00) >> 8;
+ b = (argb & 0x000000ff) >> 0;
+ a = has_alpha? (argb & 0xff000000) >> 24 : 0xff;
+
+ if (a)
+ {
+ r = (r * 255) / a;
+ g = (g * 255) / a;
+ b = (b * 255) / a;
+ }
+
+ if (r > 255) r = 255;
+ if (g > 255) g = 255;
+ if (b > 255) b = 255;
+
+ pb[0] = r;
+ pb[1] = g;
+ pb[2] = b;
+ pb[3] = a;
+ }
+ }
+
+ return pixbuf;
+}
+
+
+static gboolean
+on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
+{
+ GdkPixbuf *pixbuf = data;
+
+ gdk_draw_pixbuf (widget->window, NULL,
+ pixbuf, 0, 0, 0, 0,
+ gdk_pixbuf_get_width (pixbuf),
+ gdk_pixbuf_get_height (pixbuf),
+ GDK_RGB_DITHER_NONE,
+ 0, 0);
+
+ return TRUE;
+}
+
+void
+show_image (pixman_image_t *image)
+{
+ GtkWidget *window;
+ GdkPixbuf *pixbuf;
+ int width, height, stride;
+ int argc;
+ char **argv;
+ char *arg0 = g_strdup ("pixman-test-program");
+ gboolean has_alpha;
+ pixman_format_code_t format;
+
+ argc = 1;
+ argv = (char **)&arg0;
+
+ gtk_init (&argc, &argv);
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ width = pixman_image_get_width (image);
+ height = pixman_image_get_height (image);
+ stride = pixman_image_get_stride (image);
+
+ format = image->bits.format;
+
+ if (format == PIXMAN_a8r8g8b8)
+ has_alpha = TRUE;
+ else if (format == PIXMAN_x8r8g8b8)
+ has_alpha = FALSE;
+ else
+ g_error ("Can't deal with this format: %x\n", format);
+
+ pixbuf = pixbuf_from_argb32 (pixman_image_get_data (image), has_alpha,
+ width, height, stride);
+
+ g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), pixbuf);
+ g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
+
+ gtk_widget_show (window);
+
+ gtk_main ();
+}
diff --git a/lib/pixman/test/utils.h b/lib/pixman/test/utils.h
new file mode 100644
index 000000000..bc110d847
--- /dev/null
+++ b/lib/pixman/test/utils.h
@@ -0,0 +1,6 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <glib.h>
+#include "pixman.h"
+
+void show_image (pixman_image_t *image);