[cairo-commit] 4 commits - cairo.pc.in configure.in .gitignore
Makefile.am RELEASING src/cairo-backend.pc.in src/cairoint.h
src/cairo.pc.in src/cairo-wideint.h
src/cairo-wideint-private.h src/.gitignore src/Makefile.am
test/Makefile.am
Carl Worth
cworth at kemper.freedesktop.org
Wed Jun 14 05:09:37 PDT 2006
.gitignore | 1
Makefile.am | 8 +-----
RELEASING | 2 -
configure.in | 58 ++++++++++++++++++++++++++++++++----------------
src/.gitignore | 1
src/Makefile.am | 36 ++++++++++++++++++++++++-----
src/cairo-backend.pc.in | 12 +++++++++
src/cairoint.h | 2 -
test/Makefile.am | 3 +-
9 files changed, 87 insertions(+), 36 deletions(-)
New commits:
diff-tree 7e0be461b595c3561fa75472fdfd5954e4666cfc (from b9cfe941c8e1ae427780117fedfd47d458e29f02)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Jun 13 22:40:50 2006 -0400
Rename cairo-wideint.h to cairo-wideint-private.h.
diff --git a/RELEASING b/RELEASING
index 42260e4..d1e1998 100644
--- a/RELEASING
+++ b/RELEASING
@@ -34,7 +34,7 @@ Here are the steps to follow to create a
the following command will show each patch that has changed a
public header file since the given version:
- find src/ -name '*.h' -not -name '*-private.h' -not -name 'cairoint.h' | \
+ find src/ -name '*.h' -not -name '*-private.h' -not -name '*-test.h' -not -name 'cairoint.h' | \
xargs git log -p X.Y.Z.. --
4) Increment cairo_version_{minor|micro} and LT_{CURRENT|VERSION|AGE}
diff --git a/src/Makefile.am b/src/Makefile.am
index c25911c..4bada6b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -198,7 +198,7 @@ libcairo_la_SOURCES = \
cairo-unicode.c \
cairo-output-stream.c \
cairo-wideint.c \
- cairo-wideint.h \
+ cairo-wideint-private.h \
cairo-meta-surface.c \
cairo-meta-surface-private.h \
cairo-paginated-surface.c \
diff --git a/src/cairo-wideint-private.h b/src/cairo-wideint-private.h
new file mode 100644
index 0000000..1841a44
--- /dev/null
+++ b/src/cairo-wideint-private.h
@@ -0,0 +1,313 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2004 Keith Packard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is Keith Packard
+ *
+ * Contributor(s):
+ * Keith R. Packard <keithp at keithp.com>
+ *
+ */
+
+#ifndef CAIRO_WIDEINT_H
+#define CAIRO_WIDEINT_H
+
+#if HAVE_STDINT_H
+# include <stdint.h>
+#elif HAVE_INTTYPES_H
+# include <inttypes.h>
+#elif HAVE_SYS_INT_TYPES_H
+# include <sys/int_types.h>
+#elif defined(_MSC_VER)
+ typedef __int8 int8_t;
+ typedef unsigned __int8 uint8_t;
+ typedef __int16 int16_t;
+ typedef unsigned __int16 uint16_t;
+ typedef __int32 int32_t;
+ typedef unsigned __int32 uint32_t;
+ typedef __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
+# ifndef HAVE_UINT64_T
+# define HAVE_UINT64_T 1
+# endif
+# ifndef INT16_MIN
+# define INT16_MIN (-32767-1)
+# endif
+# ifndef INT16_MAX
+# define INT16_MAX (32767)
+# endif
+# ifndef UINT16_MAX
+# define UINT16_MAX (65535)
+# endif
+#else
+#error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
+#endif
+
+/*
+ * 64-bit datatypes. Two separate implementations, one using
+ * built-in 64-bit signed/unsigned types another implemented
+ * as a pair of 32-bit ints
+ */
+
+#define I cairo_private
+
+#if !HAVE_UINT64_T
+
+typedef struct _cairo_uint64 {
+ uint32_t lo, hi;
+} cairo_uint64_t, cairo_int64_t;
+
+cairo_uint64_t I _cairo_uint32_to_uint64 (uint32_t i);
+#define _cairo_uint64_to_uint32(a) ((a).lo)
+cairo_uint64_t I _cairo_uint64_add (cairo_uint64_t a, cairo_uint64_t b);
+cairo_uint64_t I _cairo_uint64_sub (cairo_uint64_t a, cairo_uint64_t b);
+cairo_uint64_t I _cairo_uint64_mul (cairo_uint64_t a, cairo_uint64_t b);
+cairo_uint64_t I _cairo_uint32x32_64_mul (uint32_t a, uint32_t b);
+cairo_uint64_t I _cairo_uint64_lsl (cairo_uint64_t a, int shift);
+cairo_uint64_t I _cairo_uint64_rsl (cairo_uint64_t a, int shift);
+cairo_uint64_t I _cairo_uint64_rsa (cairo_uint64_t a, int shift);
+int I _cairo_uint64_lt (cairo_uint64_t a, cairo_uint64_t b);
+int I _cairo_uint64_eq (cairo_uint64_t a, cairo_uint64_t b);
+cairo_uint64_t I _cairo_uint64_negate (cairo_uint64_t a);
+#define _cairo_uint64_negative(a) (((int32_t) ((a).hi)) < 0)
+cairo_uint64_t I _cairo_uint64_not (cairo_uint64_t a);
+
+#define _cairo_uint64_to_int64(i) (i)
+#define _cairo_int64_to_uint64(i) (i)
+
+cairo_int64_t I _cairo_int32_to_int64(int32_t i);
+#define _cairo_int64_to_int32(a) ((int32_t) _cairo_uint64_to_uint32(a))
+#define _cairo_int64_add(a,b) _cairo_uint64_add (a,b)
+#define _cairo_int64_sub(a,b) _cairo_uint64_sub (a,b)
+#define _cairo_int64_mul(a,b) _cairo_uint64_mul (a,b)
+cairo_int64_t I _cairo_int32x32_64_mul (int32_t a, int32_t b);
+int I _cairo_int64_lt (cairo_uint64_t a, cairo_uint64_t b);
+#define _cairo_int64_eq(a,b) _cairo_uint64_eq (a,b)
+#define _cairo_int64_lsl(a,b) _cairo_uint64_lsl (a,b)
+#define _cairo_int64_rsl(a,b) _cairo_uint64_rsl (a,b)
+#define _cairo_int64_rsa(a,b) _cairo_uint64_rsa (a,b)
+#define _cairo_int64_negate(a) _cairo_uint64_negate(a)
+#define _cairo_int64_negative(a) (((int32_t) ((a).hi)) < 0)
+#define _cairo_int64_not(a) _cairo_uint64_not(a)
+
+#else
+
+typedef uint64_t cairo_uint64_t;
+typedef int64_t cairo_int64_t;
+
+#define _cairo_uint32_to_uint64(i) ((uint64_t) (i))
+#define _cairo_uint64_to_uint32(i) ((uint32_t) (i))
+#define _cairo_uint64_add(a,b) ((a) + (b))
+#define _cairo_uint64_sub(a,b) ((a) - (b))
+#define _cairo_uint64_mul(a,b) ((a) * (b))
+#define _cairo_uint32x32_64_mul(a,b) ((uint64_t) (a) * (b))
+#define _cairo_uint64_lsl(a,b) ((a) << (b))
+#define _cairo_uint64_rsl(a,b) ((uint64_t) (a) >> (b))
+#define _cairo_uint64_rsa(a,b) ((uint64_t) ((int64_t) (a) >> (b)))
+#define _cairo_uint64_lt(a,b) ((a) < (b))
+#define _cairo_uint64_eq(a,b) ((a) == (b))
+#define _cairo_uint64_negate(a) ((uint64_t) -((int64_t) (a)))
+#define _cairo_uint64_negative(a) ((int64_t) (a) < 0)
+#define _cairo_uint64_not(a) (~(a))
+
+#define _cairo_uint64_to_int64(i) ((int64_t) (i))
+#define _cairo_int64_to_uint64(i) ((uint64_t) (i))
+
+#define _cairo_int32_to_int64(i) ((int64_t) (i))
+#define _cairo_int64_to_int32(i) ((int32_t) (i))
+#define _cairo_int64_add(a,b) ((a) + (b))
+#define _cairo_int64_sub(a,b) ((a) - (b))
+#define _cairo_int64_mul(a,b) ((a) * (b))
+#define _cairo_int32x32_64_mul(a,b) ((int64_t) (a) * (b))
+#define _cairo_int64_lt(a,b) ((a) < (b))
+#define _cairo_int64_eq(a,b) ((a) == (b))
+#define _cairo_int64_lsl(a,b) ((a) << (b))
+#define _cairo_int64_rsl(a,b) ((int64_t) ((uint64_t) (a) >> (b)))
+#define _cairo_int64_rsa(a,b) ((int64_t) (a) >> (b))
+#define _cairo_int64_negate(a) (-(a))
+#define _cairo_int64_negative(a) ((a) < 0)
+#define _cairo_int64_not(a) (~(a))
+
+#endif
+
+/*
+ * 64-bit comparisions derived from lt or eq
+ */
+#define _cairo_uint64_le(a,b) (!_cairo_uint64_gt(a,b))
+#define _cairo_uint64_ne(a,b) (!_cairo_uint64_eq(a,b))
+#define _cairo_uint64_ge(a,b) (!_cairo_uint64_lt(a,b))
+#define _cairo_uint64_gt(a,b) _cairo_uint64_lt(b,a)
+
+#define _cairo_int64_le(a,b) (!_cairo_int64_gt(a,b))
+#define _cairo_int64_ne(a,b) (!_cairo_int64_eq(a,b))
+#define _cairo_int64_ge(a,b) (!_cairo_int64_lt(a,b))
+#define _cairo_int64_gt(a,b) _cairo_int64_lt(b,a)
+
+/*
+ * As the C implementation always computes both, create
+ * a function which returns both for the 'native' type as well
+ */
+
+typedef struct _cairo_uquorem64 {
+ cairo_uint64_t quo;
+ cairo_uint64_t rem;
+} cairo_uquorem64_t;
+
+typedef struct _cairo_quorem64 {
+ cairo_int64_t quo;
+ cairo_int64_t rem;
+} cairo_quorem64_t;
+
+cairo_uquorem64_t I
+_cairo_uint64_divrem (cairo_uint64_t num, cairo_uint64_t den);
+
+cairo_quorem64_t I
+_cairo_int64_divrem (cairo_int64_t num, cairo_int64_t den);
+
+/*
+ * 128-bit datatypes. Again, provide two implementations in
+ * case the machine has a native 128-bit datatype. GCC supports int128_t
+ * on ia64
+ */
+
+#if !HAVE_UINT128_T
+
+typedef struct cairo_uint128 {
+ cairo_uint64_t lo, hi;
+} cairo_uint128_t, cairo_int128_t;
+
+cairo_uint128_t I _cairo_uint32_to_uint128 (uint32_t i);
+cairo_uint128_t I _cairo_uint64_to_uint128 (cairo_uint64_t i);
+#define _cairo_uint128_to_uint64(a) ((a).lo)
+#define _cairo_uint128_to_uint32(a) _cairo_uint64_to_uint32(_cairo_uint128_to_uint64(a))
+cairo_uint128_t I _cairo_uint128_add (cairo_uint128_t a, cairo_uint128_t b);
+cairo_uint128_t I _cairo_uint128_sub (cairo_uint128_t a, cairo_uint128_t b);
+cairo_uint128_t I _cairo_uint128_mul (cairo_uint128_t a, cairo_uint128_t b);
+cairo_uint128_t I _cairo_uint64x64_128_mul (cairo_uint64_t a, cairo_uint64_t b);
+cairo_uint128_t I _cairo_uint128_lsl (cairo_uint128_t a, int shift);
+cairo_uint128_t I _cairo_uint128_rsl (cairo_uint128_t a, int shift);
+cairo_uint128_t I _cairo_uint128_rsa (cairo_uint128_t a, int shift);
+int I _cairo_uint128_lt (cairo_uint128_t a, cairo_uint128_t b);
+int I _cairo_uint128_eq (cairo_uint128_t a, cairo_uint128_t b);
+cairo_uint128_t I _cairo_uint128_negate (cairo_uint128_t a);
+#define _cairo_uint128_negative(a) (_cairo_uint64_negative(a.hi))
+cairo_uint128_t I _cairo_uint128_not (cairo_uint128_t a);
+
+#define _cairo_uint128_to_int128_(i) (i)
+#define _cairo_int128_to_uint128(i) (i)
+
+cairo_int128_t I _cairo_int32_to_int128 (int32_t i);
+cairo_int128_t I _cairo_int64_to_int128 (cairo_int64_t i);
+#define _cairo_int128_to_int64(a) ((cairo_int64_t) (a).lo)
+#define _cairo_int128_to_int32(a) _cairo_int64_to_int32(_cairo_int128_to_int64(a))
+#define _cairo_int128_add(a,b) _cairo_uint128_add(a,b)
+#define _cairo_int128_sub(a,b) _cairo_uint128_sub(a,b)
+#define _cairo_int128_mul(a,b) _cairo_uint128_mul(a,b)
+cairo_int128_t I _cairo_int64x64_128_mul (cairo_int64_t a, cairo_int64_t b);
+#define _cairo_int128_lsl(a,b) _cairo_uint128_lsl(a,b)
+#define _cairo_int128_rsl(a,b) _cairo_uint128_rsl(a,b)
+#define _cairo_int128_rsa(a,b) _cairo_uint128_rsa(a,b)
+int I _cairo_int128_lt (cairo_int128_t a, cairo_int128_t b);
+#define _cairo_int128_eq(a,b) _cairo_uint128_eq (a,b)
+#define _cairo_int128_negate(a) _cairo_uint128_negate(a)
+#define _cairo_int128_negative(a) (_cairo_uint128_negative(a))
+#define _cairo_int128_not(a) _cairo_uint128_not(a)
+
+#else /* !HAVE_UINT128_T */
+
+typedef uint128_t cairo_uint128_t;
+typedef int128_t cairo_int128_t;
+
+#define _cairo_uint32_to_uint128(i) ((uint128_t) (i))
+#define _cairo_uint64_to_uint128(i) ((uint128_t) (i))
+#define _cairo_uint128_to_uint64(i) ((uint64_t) (i))
+#define _cairo_uint128_to_uint32(i) ((uint32_t) (i))
+#define _cairo_uint128_add(a,b) ((a) + (b))
+#define _cairo_uint128_sub(a,b) ((a) - (b))
+#define _cairo_uint128_mul(a,b) ((a) * (b))
+#define _cairo_uint64x64_128_mul(a,b) ((uint128_t) (a) * (b))
+#define _cairo_uint128_lsl(a,b) ((a) << (b))
+#define _cairo_uint128_rsl(a,b) ((uint128_t) (a) >> (b))
+#define _cairo_uint128_rsa(a,b) ((uint128_t) ((int128_t) (a) >> (b)))
+#define _cairo_uint128_lt(a,b) ((a) < (b))
+#define _cairo_uint128_eq(a,b) ((a) == (b))
+#define _cairo_uint128_negate(a) ((uint128_t) -((int128_t) (a)))
+#define _cairo_uint128_negative(a) ((int128_t) (a) < 0)
+#define _cairo_uint128_not(a) (~(a))
+
+#define _cairo_uint128_to_int128(i) ((int128_t) (i))
+#define _cairo_int128_to_uint128(i) ((uint128_t) (i))
+
+#define _cairo_int32_to_int128(i) ((int128_t) (i))
+#define _cairo_int64_to_int128(i) ((int128_t) (i))
+#define _cairo_int128_to_int64(i) ((int64_t) (i))
+#define _cairo_int128_to_int32(i) ((int32_t) (i))
+#define _cairo_int128_add(a,b) ((a) + (b))
+#define _cairo_int128_sub(a,b) ((a) - (b))
+#define _cairo_int128_mul(a,b) ((a) * (b))
+#define _cairo_int64x64_128_mul(a,b) ((int128_t) (a) * (b))
+#define _cairo_int128_lt(a,b) ((a) < (b))
+#define _cairo_int128_eq(a,b) ((a) == (b))
+#define _cairo_int128_lsl(a,b) ((a) << (b))
+#define _cairo_int128_rsl(a,b) ((int128_t) ((uint128_t) (a) >> (b)))
+#define _cairo_int128_rsa(a,b) ((int128_t) (a) >> (b))
+#define _cairo_int128_negate(a) (-(a))
+#define _cairo_int128_negative(a) ((a) < 0)
+#define _cairo_int128_not(a) (~(a))
+
+#endif /* HAVE_UINT128_T */
+
+typedef struct _cairo_uquorem128 {
+ cairo_uint128_t quo;
+ cairo_uint128_t rem;
+} cairo_uquorem128_t;
+
+typedef struct _cairo_quorem128 {
+ cairo_int128_t quo;
+ cairo_int128_t rem;
+} cairo_quorem128_t;
+
+cairo_uquorem128_t I
+_cairo_uint128_divrem (cairo_uint128_t num, cairo_uint128_t den);
+
+cairo_quorem128_t I
+_cairo_int128_divrem (cairo_int128_t num, cairo_int128_t den);
+
+#define _cairo_uint128_le(a,b) (!_cairo_uint128_gt(a,b))
+#define _cairo_uint128_ne(a,b) (!_cairo_uint128_eq(a,b))
+#define _cairo_uint128_ge(a,b) (!_cairo_uint128_lt(a,b))
+#define _cairo_uint128_gt(a,b) _cairo_uint128_lt(b,a)
+
+#define _cairo_int128_le(a,b) (!_cairo_int128_gt(a,b))
+#define _cairo_int128_ne(a,b) (!_cairo_int128_eq(a,b))
+#define _cairo_int128_ge(a,b) (!_cairo_int128_lt(a,b))
+#define _cairo_int128_gt(a,b) _cairo_int128_lt(b,a)
+
+#undef I
+
+#endif /* CAIRO_WIDEINT_H */
diff --git a/src/cairo-wideint.h b/src/cairo-wideint.h
deleted file mode 100644
index 1841a44..0000000
--- a/src/cairo-wideint.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2004 Keith Packard
- *
- * This library is free software; you can redistribute it and/or
- * modify it either under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation
- * (the "LGPL") or, at your option, under the terms of the Mozilla
- * Public License Version 1.1 (the "MPL"). If you do not alter this
- * notice, a recipient may use your version of this file under either
- * the MPL or the LGPL.
- *
- * You should have received a copy of the LGPL along with this library
- * in the file COPYING-LGPL-2.1; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- * You should have received a copy of the MPL along with this library
- * in the file COPYING-MPL-1.1
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
- * OF ANY KIND, either express or implied. See the LGPL or the MPL for
- * the specific language governing rights and limitations.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Keith Packard
- *
- * Contributor(s):
- * Keith R. Packard <keithp at keithp.com>
- *
- */
-
-#ifndef CAIRO_WIDEINT_H
-#define CAIRO_WIDEINT_H
-
-#if HAVE_STDINT_H
-# include <stdint.h>
-#elif HAVE_INTTYPES_H
-# include <inttypes.h>
-#elif HAVE_SYS_INT_TYPES_H
-# include <sys/int_types.h>
-#elif defined(_MSC_VER)
- typedef __int8 int8_t;
- typedef unsigned __int8 uint8_t;
- typedef __int16 int16_t;
- typedef unsigned __int16 uint16_t;
- typedef __int32 int32_t;
- typedef unsigned __int32 uint32_t;
- typedef __int64 int64_t;
- typedef unsigned __int64 uint64_t;
-# ifndef HAVE_UINT64_T
-# define HAVE_UINT64_T 1
-# endif
-# ifndef INT16_MIN
-# define INT16_MIN (-32767-1)
-# endif
-# ifndef INT16_MAX
-# define INT16_MAX (32767)
-# endif
-# ifndef UINT16_MAX
-# define UINT16_MAX (65535)
-# endif
-#else
-#error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
-#endif
-
-/*
- * 64-bit datatypes. Two separate implementations, one using
- * built-in 64-bit signed/unsigned types another implemented
- * as a pair of 32-bit ints
- */
-
-#define I cairo_private
-
-#if !HAVE_UINT64_T
-
-typedef struct _cairo_uint64 {
- uint32_t lo, hi;
-} cairo_uint64_t, cairo_int64_t;
-
-cairo_uint64_t I _cairo_uint32_to_uint64 (uint32_t i);
-#define _cairo_uint64_to_uint32(a) ((a).lo)
-cairo_uint64_t I _cairo_uint64_add (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint64_t I _cairo_uint64_sub (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint64_t I _cairo_uint64_mul (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint64_t I _cairo_uint32x32_64_mul (uint32_t a, uint32_t b);
-cairo_uint64_t I _cairo_uint64_lsl (cairo_uint64_t a, int shift);
-cairo_uint64_t I _cairo_uint64_rsl (cairo_uint64_t a, int shift);
-cairo_uint64_t I _cairo_uint64_rsa (cairo_uint64_t a, int shift);
-int I _cairo_uint64_lt (cairo_uint64_t a, cairo_uint64_t b);
-int I _cairo_uint64_eq (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint64_t I _cairo_uint64_negate (cairo_uint64_t a);
-#define _cairo_uint64_negative(a) (((int32_t) ((a).hi)) < 0)
-cairo_uint64_t I _cairo_uint64_not (cairo_uint64_t a);
-
-#define _cairo_uint64_to_int64(i) (i)
-#define _cairo_int64_to_uint64(i) (i)
-
-cairo_int64_t I _cairo_int32_to_int64(int32_t i);
-#define _cairo_int64_to_int32(a) ((int32_t) _cairo_uint64_to_uint32(a))
-#define _cairo_int64_add(a,b) _cairo_uint64_add (a,b)
-#define _cairo_int64_sub(a,b) _cairo_uint64_sub (a,b)
-#define _cairo_int64_mul(a,b) _cairo_uint64_mul (a,b)
-cairo_int64_t I _cairo_int32x32_64_mul (int32_t a, int32_t b);
-int I _cairo_int64_lt (cairo_uint64_t a, cairo_uint64_t b);
-#define _cairo_int64_eq(a,b) _cairo_uint64_eq (a,b)
-#define _cairo_int64_lsl(a,b) _cairo_uint64_lsl (a,b)
-#define _cairo_int64_rsl(a,b) _cairo_uint64_rsl (a,b)
-#define _cairo_int64_rsa(a,b) _cairo_uint64_rsa (a,b)
-#define _cairo_int64_negate(a) _cairo_uint64_negate(a)
-#define _cairo_int64_negative(a) (((int32_t) ((a).hi)) < 0)
-#define _cairo_int64_not(a) _cairo_uint64_not(a)
-
-#else
-
-typedef uint64_t cairo_uint64_t;
-typedef int64_t cairo_int64_t;
-
-#define _cairo_uint32_to_uint64(i) ((uint64_t) (i))
-#define _cairo_uint64_to_uint32(i) ((uint32_t) (i))
-#define _cairo_uint64_add(a,b) ((a) + (b))
-#define _cairo_uint64_sub(a,b) ((a) - (b))
-#define _cairo_uint64_mul(a,b) ((a) * (b))
-#define _cairo_uint32x32_64_mul(a,b) ((uint64_t) (a) * (b))
-#define _cairo_uint64_lsl(a,b) ((a) << (b))
-#define _cairo_uint64_rsl(a,b) ((uint64_t) (a) >> (b))
-#define _cairo_uint64_rsa(a,b) ((uint64_t) ((int64_t) (a) >> (b)))
-#define _cairo_uint64_lt(a,b) ((a) < (b))
-#define _cairo_uint64_eq(a,b) ((a) == (b))
-#define _cairo_uint64_negate(a) ((uint64_t) -((int64_t) (a)))
-#define _cairo_uint64_negative(a) ((int64_t) (a) < 0)
-#define _cairo_uint64_not(a) (~(a))
-
-#define _cairo_uint64_to_int64(i) ((int64_t) (i))
-#define _cairo_int64_to_uint64(i) ((uint64_t) (i))
-
-#define _cairo_int32_to_int64(i) ((int64_t) (i))
-#define _cairo_int64_to_int32(i) ((int32_t) (i))
-#define _cairo_int64_add(a,b) ((a) + (b))
-#define _cairo_int64_sub(a,b) ((a) - (b))
-#define _cairo_int64_mul(a,b) ((a) * (b))
-#define _cairo_int32x32_64_mul(a,b) ((int64_t) (a) * (b))
-#define _cairo_int64_lt(a,b) ((a) < (b))
-#define _cairo_int64_eq(a,b) ((a) == (b))
-#define _cairo_int64_lsl(a,b) ((a) << (b))
-#define _cairo_int64_rsl(a,b) ((int64_t) ((uint64_t) (a) >> (b)))
-#define _cairo_int64_rsa(a,b) ((int64_t) (a) >> (b))
-#define _cairo_int64_negate(a) (-(a))
-#define _cairo_int64_negative(a) ((a) < 0)
-#define _cairo_int64_not(a) (~(a))
-
-#endif
-
-/*
- * 64-bit comparisions derived from lt or eq
- */
-#define _cairo_uint64_le(a,b) (!_cairo_uint64_gt(a,b))
-#define _cairo_uint64_ne(a,b) (!_cairo_uint64_eq(a,b))
-#define _cairo_uint64_ge(a,b) (!_cairo_uint64_lt(a,b))
-#define _cairo_uint64_gt(a,b) _cairo_uint64_lt(b,a)
-
-#define _cairo_int64_le(a,b) (!_cairo_int64_gt(a,b))
-#define _cairo_int64_ne(a,b) (!_cairo_int64_eq(a,b))
-#define _cairo_int64_ge(a,b) (!_cairo_int64_lt(a,b))
-#define _cairo_int64_gt(a,b) _cairo_int64_lt(b,a)
-
-/*
- * As the C implementation always computes both, create
- * a function which returns both for the 'native' type as well
- */
-
-typedef struct _cairo_uquorem64 {
- cairo_uint64_t quo;
- cairo_uint64_t rem;
-} cairo_uquorem64_t;
-
-typedef struct _cairo_quorem64 {
- cairo_int64_t quo;
- cairo_int64_t rem;
-} cairo_quorem64_t;
-
-cairo_uquorem64_t I
-_cairo_uint64_divrem (cairo_uint64_t num, cairo_uint64_t den);
-
-cairo_quorem64_t I
-_cairo_int64_divrem (cairo_int64_t num, cairo_int64_t den);
-
-/*
- * 128-bit datatypes. Again, provide two implementations in
- * case the machine has a native 128-bit datatype. GCC supports int128_t
- * on ia64
- */
-
-#if !HAVE_UINT128_T
-
-typedef struct cairo_uint128 {
- cairo_uint64_t lo, hi;
-} cairo_uint128_t, cairo_int128_t;
-
-cairo_uint128_t I _cairo_uint32_to_uint128 (uint32_t i);
-cairo_uint128_t I _cairo_uint64_to_uint128 (cairo_uint64_t i);
-#define _cairo_uint128_to_uint64(a) ((a).lo)
-#define _cairo_uint128_to_uint32(a) _cairo_uint64_to_uint32(_cairo_uint128_to_uint64(a))
-cairo_uint128_t I _cairo_uint128_add (cairo_uint128_t a, cairo_uint128_t b);
-cairo_uint128_t I _cairo_uint128_sub (cairo_uint128_t a, cairo_uint128_t b);
-cairo_uint128_t I _cairo_uint128_mul (cairo_uint128_t a, cairo_uint128_t b);
-cairo_uint128_t I _cairo_uint64x64_128_mul (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint128_t I _cairo_uint128_lsl (cairo_uint128_t a, int shift);
-cairo_uint128_t I _cairo_uint128_rsl (cairo_uint128_t a, int shift);
-cairo_uint128_t I _cairo_uint128_rsa (cairo_uint128_t a, int shift);
-int I _cairo_uint128_lt (cairo_uint128_t a, cairo_uint128_t b);
-int I _cairo_uint128_eq (cairo_uint128_t a, cairo_uint128_t b);
-cairo_uint128_t I _cairo_uint128_negate (cairo_uint128_t a);
-#define _cairo_uint128_negative(a) (_cairo_uint64_negative(a.hi))
-cairo_uint128_t I _cairo_uint128_not (cairo_uint128_t a);
-
-#define _cairo_uint128_to_int128_(i) (i)
-#define _cairo_int128_to_uint128(i) (i)
-
-cairo_int128_t I _cairo_int32_to_int128 (int32_t i);
-cairo_int128_t I _cairo_int64_to_int128 (cairo_int64_t i);
-#define _cairo_int128_to_int64(a) ((cairo_int64_t) (a).lo)
-#define _cairo_int128_to_int32(a) _cairo_int64_to_int32(_cairo_int128_to_int64(a))
-#define _cairo_int128_add(a,b) _cairo_uint128_add(a,b)
-#define _cairo_int128_sub(a,b) _cairo_uint128_sub(a,b)
-#define _cairo_int128_mul(a,b) _cairo_uint128_mul(a,b)
-cairo_int128_t I _cairo_int64x64_128_mul (cairo_int64_t a, cairo_int64_t b);
-#define _cairo_int128_lsl(a,b) _cairo_uint128_lsl(a,b)
-#define _cairo_int128_rsl(a,b) _cairo_uint128_rsl(a,b)
-#define _cairo_int128_rsa(a,b) _cairo_uint128_rsa(a,b)
-int I _cairo_int128_lt (cairo_int128_t a, cairo_int128_t b);
-#define _cairo_int128_eq(a,b) _cairo_uint128_eq (a,b)
-#define _cairo_int128_negate(a) _cairo_uint128_negate(a)
-#define _cairo_int128_negative(a) (_cairo_uint128_negative(a))
-#define _cairo_int128_not(a) _cairo_uint128_not(a)
-
-#else /* !HAVE_UINT128_T */
-
-typedef uint128_t cairo_uint128_t;
-typedef int128_t cairo_int128_t;
-
-#define _cairo_uint32_to_uint128(i) ((uint128_t) (i))
-#define _cairo_uint64_to_uint128(i) ((uint128_t) (i))
-#define _cairo_uint128_to_uint64(i) ((uint64_t) (i))
-#define _cairo_uint128_to_uint32(i) ((uint32_t) (i))
-#define _cairo_uint128_add(a,b) ((a) + (b))
-#define _cairo_uint128_sub(a,b) ((a) - (b))
-#define _cairo_uint128_mul(a,b) ((a) * (b))
-#define _cairo_uint64x64_128_mul(a,b) ((uint128_t) (a) * (b))
-#define _cairo_uint128_lsl(a,b) ((a) << (b))
-#define _cairo_uint128_rsl(a,b) ((uint128_t) (a) >> (b))
-#define _cairo_uint128_rsa(a,b) ((uint128_t) ((int128_t) (a) >> (b)))
-#define _cairo_uint128_lt(a,b) ((a) < (b))
-#define _cairo_uint128_eq(a,b) ((a) == (b))
-#define _cairo_uint128_negate(a) ((uint128_t) -((int128_t) (a)))
-#define _cairo_uint128_negative(a) ((int128_t) (a) < 0)
-#define _cairo_uint128_not(a) (~(a))
-
-#define _cairo_uint128_to_int128(i) ((int128_t) (i))
-#define _cairo_int128_to_uint128(i) ((uint128_t) (i))
-
-#define _cairo_int32_to_int128(i) ((int128_t) (i))
-#define _cairo_int64_to_int128(i) ((int128_t) (i))
-#define _cairo_int128_to_int64(i) ((int64_t) (i))
-#define _cairo_int128_to_int32(i) ((int32_t) (i))
-#define _cairo_int128_add(a,b) ((a) + (b))
-#define _cairo_int128_sub(a,b) ((a) - (b))
-#define _cairo_int128_mul(a,b) ((a) * (b))
-#define _cairo_int64x64_128_mul(a,b) ((int128_t) (a) * (b))
-#define _cairo_int128_lt(a,b) ((a) < (b))
-#define _cairo_int128_eq(a,b) ((a) == (b))
-#define _cairo_int128_lsl(a,b) ((a) << (b))
-#define _cairo_int128_rsl(a,b) ((int128_t) ((uint128_t) (a) >> (b)))
-#define _cairo_int128_rsa(a,b) ((int128_t) (a) >> (b))
-#define _cairo_int128_negate(a) (-(a))
-#define _cairo_int128_negative(a) ((a) < 0)
-#define _cairo_int128_not(a) (~(a))
-
-#endif /* HAVE_UINT128_T */
-
-typedef struct _cairo_uquorem128 {
- cairo_uint128_t quo;
- cairo_uint128_t rem;
-} cairo_uquorem128_t;
-
-typedef struct _cairo_quorem128 {
- cairo_int128_t quo;
- cairo_int128_t rem;
-} cairo_quorem128_t;
-
-cairo_uquorem128_t I
-_cairo_uint128_divrem (cairo_uint128_t num, cairo_uint128_t den);
-
-cairo_quorem128_t I
-_cairo_int128_divrem (cairo_int128_t num, cairo_int128_t den);
-
-#define _cairo_uint128_le(a,b) (!_cairo_uint128_gt(a,b))
-#define _cairo_uint128_ne(a,b) (!_cairo_uint128_eq(a,b))
-#define _cairo_uint128_ge(a,b) (!_cairo_uint128_lt(a,b))
-#define _cairo_uint128_gt(a,b) _cairo_uint128_lt(b,a)
-
-#define _cairo_int128_le(a,b) (!_cairo_int128_gt(a,b))
-#define _cairo_int128_ne(a,b) (!_cairo_int128_eq(a,b))
-#define _cairo_int128_ge(a,b) (!_cairo_int128_lt(a,b))
-#define _cairo_int128_gt(a,b) _cairo_int128_lt(b,a)
-
-#undef I
-
-#endif /* CAIRO_WIDEINT_H */
diff --git a/src/cairoint.h b/src/cairoint.h
index 8f65015..c08bd06 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -192,7 +192,7 @@ do { \
assert (NOT_REACHED); \
} while (0)
-#include "cairo-wideint.h"
+#include "cairo-wideint-private.h"
typedef int32_t cairo_fixed_16_16_t;
typedef cairo_int64_t cairo_fixed_32_32_t;
diff-tree b9cfe941c8e1ae427780117fedfd47d458e29f02 (from 2249fb89ae36859d1d3f6c9d0b72e95e45726170)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Jun 13 22:37:34 2006 -0400
Add backend-specific pkg-config files.
diff --git a/.gitignore b/.gitignore
index f8e50fe..0b1b43a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,6 @@ Makefile
Makefile.in
aclocal.m4
autom4te.cache
-cairo.pc
compile
config.cache
config.guess
diff --git a/configure.in b/configure.in
index 5f92305..9340f65 100644
--- a/configure.in
+++ b/configure.in
@@ -88,11 +88,14 @@ PKG_PROG_PKG_CONFIG
dnl ===========================================================================
dnl
dnl Define a macro to enable backends.
-dnl - Macro: CAIRO_BACKEND_ENABLE (BACKEND-ID, BACKEND-NAME, DEFAULT, COMMANDS-TO-CHECK-IT)
+dnl - Macro: CAIRO_BACKEND_ENABLE (ID, NAME, DEFAULT, NAMESPACE, REQUIRES, COMMANDS-TO-CHECK-IT)
dnl
-dnl Where COMMANDS should set use_BACKEND-ID to something other than yes if the
+dnl Where COMMANDS should set $use_ID to something other than yes if the
dnl backend cannot be built.
dnl
+dnl Check the CAIRO_BACKEND_ENABLE line for fontconfig to understand each
+dnl parameter.
+dnl
AC_DEFUN([CAIRO_BACKEND_ENABLE],
[AC_ARG_ENABLE([$1],
AS_HELP_STRING([--enable-$1=@<:@no/auto/yes@:>@],
@@ -105,7 +108,7 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
[echo
saved_use_$1=$use_$1
use_$1=yes
- $4
+ $6
cairo_cv_use_$1=$use_$1
use_$1=$saved_use_$1
AC_MSG_CHECKING([whether cairo's $1 backend could be enabled])])
@@ -114,21 +117,38 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
if test "x$cairo_cv_use_$1" = xyes; then
use_$1=yes
else
- AC_MSG_ERROR(requested $2 backend could not be enabled)
+ AC_MSG_ERROR([requested $2 backend could not be enabled])
fi
;;
auto)
use_$1=$cairo_cv_use_$1
;;
*)
- AC_MSG_ERROR(invalid argument passed to --enable-$1: $use_$1, should be one of @<:@no/auto/yes@:>@)
+ AC_MSG_ERROR([invalid argument passed to --enable-$1: $use_$1, should be one of @<:@no/auto/yes@:>@])
;;
esac
+ if test "x$use_$1" = xyes; then
+ AC_MSG_NOTICE([creating src/cairo-$4.pc])
+ mkdir src
+ AS_IF([sed \
+ -e "s/@backend_name@/$4/g" \
+ -e "s/@Backend_Name@/$2/g" \
+ -e "s/@BACKEND_REQUIRES@/$5/g" \
+ -e "s, at prefix@,$prefix,g" \
+ -e "s, at exec_prefix@,$exec_prefix,g" \
+ -e "s, at libdir@,$libdir,g" \
+ -e "s, at includedir@,$includedir,g" \
+ -e "s, at VERSION@,$VERSION,g" \
+ $srcdir/src/cairo-backend.pc.in > src/cairo-$4.pc],,[
+ rm -f "src/cairo-$4.pc"
+ AC_MSG_ERROR([failed creating src/cairo-$4.pc])
+ ])
+ fi
fi])
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(xlib, Xlib, auto, [
+CAIRO_BACKEND_ENABLE(xlib, Xlib, auto, xlib, [xrender], [
dnl Check for Xrender header files if the Xrender package is not installed:
PKG_CHECK_MODULES(XRENDER, xrender >= 0.6, [
XRENDER_REQUIRES=xrender], [
@@ -150,7 +170,7 @@ AC_SUBST(XRENDER_REQUIRES)
CAIRO_CFLAGS="$CAIRO_CFLAGS $XRENDER_CFLAGS"
CAIRO_LIBS="$CAIRO_LIBS $XRENDER_LIBS"
-CAIRO_BACKEND_ENABLE(quartz, Quartz, no, [
+CAIRO_BACKEND_ENABLE(quartz, Quartz, no, quartz, [], [
dnl There is no pkgconfig for quartz; lets do a header check
AC_CHECK_HEADER(Carbon/Carbon.h, [use_quartz=yes], [use_quartz="no (Carbon headers not found)"])
])
@@ -165,7 +185,7 @@ CAIRO_LIBS="$CAIRO_LIBS $QUARTZ_LIBS"
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(xcb, XCB, no, [
+CAIRO_BACKEND_ENABLE(xcb, XCB, no, xcb, [xcb xcb-render], [
PKG_CHECK_MODULES(XCB, xcb xcb-render, [use_xcb=yes], [
use_xcb="no (requires XCB http://xcb.freedesktop.org)"])
])
@@ -191,7 +211,7 @@ case "$host" in
;;
esac
-CAIRO_BACKEND_ENABLE(win32, Microsoft Windows, auto, [
+CAIRO_BACKEND_ENABLE(win32, Microsoft Windows, auto, win32, [], [
case "$host" in
*-*-mingw*|*-*-cygwin*)
use_win32=yes
@@ -223,7 +243,7 @@ AC_SUBST(WIN32_FONT_FEATURE)
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(beos, BeOS/Zeta, no, [
+CAIRO_BACKEND_ENABLE(beos, BeOS/Zeta, no, beos, [], [
case "$host" in
*-*-beos)
use_beos=yes
@@ -250,7 +270,7 @@ AC_SUBST(BEOS_SURFACE_FEATURE)
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(png, PNG, yes, [
+CAIRO_BACKEND_ENABLE(png, PNG, yes, png, [], [
use_png=no
# libpng13 is GnuWin32's libpng-1.2.8 :-(
for l in libpng12 libpng13 libpng10 ; do
@@ -284,7 +304,7 @@ AC_SUBST(PNG_REQUIRES)
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(glitz, glitz, no, [
+CAIRO_BACKEND_ENABLE(glitz, glitz, no, glitz, [glitz], [
PKG_CHECK_MODULES(GLITZ, glitz >= 0.5.1, [
GLITZ_REQUIRES=glitz
use_glitz=yes], [use_glitz="no (requires glitz http://freedesktop.org/Software/glitz)"])
@@ -332,7 +352,7 @@ AC_SUBST(GLITZ_REQUIRES)
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(directfb, directfb, no, [
+CAIRO_BACKEND_ENABLE(directfb, directfb, no, directfb, [directfb], [
PKG_CHECK_MODULES(DIRECTFB, directfb, [use_directfb=yes], [
use_directfb="no (requires directfb http://www.directfb.org)"])
])
@@ -348,7 +368,7 @@ CAIRO_LIBS="$CAIRO_LIBS $DIRECTFB_LIBS"
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(freetype, freetype font, auto, [
+CAIRO_BACKEND_ENABLE(freetype, freetype font, auto, ft, [freetype2 fontconfig], [
PKG_CHECK_MODULES(FONTCONFIG, fontconfig,
[use_freetype=yes], [use_freetype=no])
_CHECK_FUNCS_WITH_FLAGS(FcFini, $FONTCONFIG_CFLAGS, $FONTCONFIG_LIBS)
@@ -462,7 +482,7 @@ AM_CONDITIONAL(HAVE_PTHREAD, test "x$hav
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(ps, PostScript, auto, [
+CAIRO_BACKEND_ENABLE(ps, PostScript, auto, ps, [], [
if test x"$have_ft_load_sfnt_table" != "xyes" ; then
use_ps="no (PS backend requires FreeType 2.1.4 or newer)"
fi
@@ -487,7 +507,7 @@ AC_SUBST(PS_LIBS)
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(pdf, PDF, auto, [
+CAIRO_BACKEND_ENABLE(pdf, PDF, auto, pdf, [], [
if test x"$have_ft_load_sfnt_table" != "xyes" ; then
use_pdf="no (PDF backend requires FreeType 2.1.4 or newer)"
fi
@@ -519,7 +539,7 @@ AC_SUBST(PDF_LIBS)
dnl ===========================================================================
-CAIRO_BACKEND_ENABLE(svg, SVG, auto, [
+CAIRO_BACKEND_ENABLE(svg, SVG, auto, svg, [], [
if test x"$have_ft_load_sfnt_table" != "xyes" ; then
use_svg="no (SVG backend requires FreeType 2.1.4 or newer)"
fi
@@ -560,7 +580,7 @@ dnl ====================================
dnl This check should default to 'yes' once we have code to actually
dnl check for the atsui font backend.
-CAIRO_BACKEND_ENABLE(atsui, atsui font, no, [
+CAIRO_BACKEND_ENABLE(atsui, atsui font, no, atsui, [], [
dnl There is no pkgconfig for atsui; lets do a header check
AC_CHECK_HEADER(Carbon/Carbon.h, [use_atsui=yes], [use_atsui=no])
])
diff --git a/src/.gitignore b/src/.gitignore
index abf1f37..82a14e2 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -7,6 +7,7 @@ Makefile.in
*.la
*.lo
*.loT
+*.pc
cairo-features.h
cairo.def
*.o
diff --git a/src/Makefile.am b/src/Makefile.am
index 7756e8a..c25911c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,29 +5,32 @@ font_subset_sources = \
cairo-scaled-font-subsets.c \
cairo-scaled-font-subsets-private.h
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = cairo.pc
+backend_pkgconfigs =
if CAIRO_HAS_PS_SURFACE
libcairo_ps_headers = cairo-ps.h
libcairo_ps_sources = cairo-ps-surface.c cairo-ps-test.h
libcairo_font_subset_sources = $(font_subset_sources)
+backend_pkgconfigs += cairo-ps.pc
endif
if CAIRO_HAS_PDF_SURFACE
libcairo_pdf_headers = cairo-pdf.h
libcairo_pdf_sources = cairo-pdf-surface.c cairo-pdf-test.h
libcairo_font_subset_sources = $(font_subset_sources)
+backend_pkgconfigs += cairo-pdf.pc
endif
if CAIRO_HAS_PNG_FUNCTIONS
libcairo_png_sources = cairo-png.c
+backend_pkgconfigs += cairo-png.pc
endif
if CAIRO_HAS_SVG_SURFACE
libcairo_svg_headers = cairo-svg.h
libcairo_svg_sources = cairo-svg-surface.c cairo-svg-test.h
libcairo_font_subset_sources = $(font_subset_sources)
+backend_pkgconfigs += cairo-svg.pc
endif
if CAIRO_HAS_TEST_SURFACES
@@ -39,16 +42,19 @@ endif
if CAIRO_HAS_XLIB_SURFACE
libcairo_xlib_headers = cairo-xlib.h cairo-xlib-xrender.h
libcairo_xlib_sources = cairo-xlib-surface.c cairo-xlib-screen.c cairo-xlib-private.h cairo-xlib-test.h
+backend_pkgconfigs += cairo-xlib.pc
endif
if CAIRO_HAS_QUARTZ_SURFACE
libcairo_quartz_headers = cairo-quartz.h
libcairo_quartz_sources = cairo-quartz-surface.c cairo-quartz-private.h
+backend_pkgconfigs += cairo-quartz.pc
endif
if CAIRO_HAS_XCB_SURFACE
libcairo_xcb_headers = cairo-xcb.h cairo-xcb-xrender.h
libcairo_xcb_sources = cairo-xcb-surface.c
+backend_pkgconfigs += cairo-xcb.pc
endif
libcairo_win32_sources =
@@ -57,7 +63,9 @@ libcairo_win32_headers = cairo-win32.h
libcairo_win32_sources += cairo-win32-surface.c cairo-win32-private.h
export_symbols = -export-symbols cairo.def
cairo_def_dependency = cairo.def
+backend_pkgconfigs += cairo-win32.pc
endif
+# This is not really a separate conditional. Is TRUE iff the previous one is.
if CAIRO_HAS_WIN32_FONT
libcairo_win32_sources += cairo-win32-font.c
endif
@@ -66,6 +74,7 @@ libcairo_beos_sources =
if CAIRO_HAS_BEOS_SURFACE
libcairo_beos_headers = cairo-beos.h
libcairo_beos_sources += cairo-beos-surface.cpp
+backend_pkgconfigs += cairo-beos.pc
noinst_LTLIBRARIES = libcairo_beos.la
libcairo_beos_la_SOURCES = $(libcairo_beos_sources)
@@ -76,21 +85,25 @@ endif
if CAIRO_HAS_GLITZ_SURFACE
libcairo_glitz_headers = cairo-glitz.h
libcairo_glitz_sources = cairo-glitz-surface.c
+backend_pkgconfigs += cairo-glitz.pc
endif
-if CAIRO_HAS_ATSUI_FONT
-libcairo_atsui_headers = cairo-atsui.h
-libcairo_atsui_sources = cairo-atsui-font.c
+if CAIRO_HAS_DIRECTFB_SURFACE
+libcairo_directfb_headers = cairo-directfb.h
+libcairo_directfb_sources = cairo-directfb-surface.c
+backend_pkgconfigs += cairo-directfb.pc
endif
if CAIRO_HAS_FT_FONT
libcairo_ft_headers = cairo-ft.h
libcairo_ft_sources = cairo-ft-font.c cairo-ft-private.h
+backend_pkgconfigs += cairo-ft.pc
endif
-if CAIRO_HAS_DIRECTFB_SURFACE
-libcairo_directfb_headers = cairo-directfb.h
-libcairo_directfb_sources = cairo-directfb-surface.c
+if CAIRO_HAS_ATSUI_FONT
+libcairo_atsui_headers = cairo-atsui.h
+libcairo_atsui_sources = cairo-atsui-font.c
+backend_pkgconfigs += cairo-atsui.pc
endif
# Headers that declare the functions in the cairo DLL API on Windows
@@ -216,6 +229,12 @@ libcairo_la_LIBADD = $(top_builddir)/pix
libcairo_la_DEPENDENCIES = $(cairo_def_dependency) $(top_builddir)/pixman/src/libpixman.la $(noinst_LTLIBRARIES)
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = cairo.pc $(backend_pkgconfigs)
+DISTCLEANFILES = $(backend_pkgconfigs)
+EXTRA_DIST = cairo-backend.pc.in
+
+
cairo.def: $(cairo_win32_api_headers)
(echo EXPORTS; \
cat $(cairo_win32_api_headers) | \
diff --git a/src/cairo-backend.pc.in b/src/cairo-backend.pc.in
new file mode 100644
index 0000000..fa724ec
--- /dev/null
+++ b/src/cairo-backend.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @backend_name@
+Description: @Backend_Name@ backend for cairo graphics library
+Version: @VERSION@
+
+Requires: cairo @BACKEND_REQUIRES@
+Libs:
+Cflags: -I${includedir}/cairo
diff-tree 2249fb89ae36859d1d3f6c9d0b72e95e45726170 (from e346eca1386e8ec14f9bda7d76662a16706f1e7c)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Jun 13 19:13:05 2006 -0400
Move cairo.pc into src/.
diff --git a/Makefile.am b/Makefile.am
index 6ff72e7..d920d35 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,8 +9,7 @@ endif
EXTRA_DIST = \
COPYING \
COPYING-LGPL-2.1 \
- COPYING-MPL-1.1 \
- cairo.pc.in
+ COPYING-MPL-1.1
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
@@ -27,9 +26,6 @@ MAINTAINERCLEANFILES = \
$(srcdir)/mkinstalldirs \
`find "$(srcdir)" -type f -name Makefile.in -print`
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = cairo.pc
-
check-valgrind: all
$(MAKE) -C test check-valgrind
@@ -97,7 +93,7 @@ $(runtime_zip_file): install
$(developer_zip_file): install
-rm $@
cd $(prefix); \
- zip -r $@ include/cairo lib/libcairo.dll.a lib/cairo.lib lib/pkgconfig/cairo.pc share/gtk-doc/html/cairo
+ zip -r $@ include/cairo lib/libcairo.dll.a lib/cairo.lib lib/pkgconfig/cairo.pc lib/pkgconfig/cairo-*.pc share/gtk-doc/html/cairo
zips: $(runtime_zip_file) $(developer_zip_file)
diff --git a/cairo.pc.in b/cairo.pc.in
deleted file mode 100644
index 7003191..0000000
--- a/cairo.pc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: cairo
-Description: Multi-platform 2D graphics library
-Version: @VERSION@
-
- at PKGCONFIG_REQUIRES@: @FREETYPE_REQUIRES@ @XRENDER_REQUIRES@ @PNG_REQUIRES@ @GLITZ_REQUIRES@
-Libs: @FREETYPE_CONFIG_LIBS@ -L${libdir} -lcairo
-Cflags: @FREETYPE_CONFIG_CFLAGS@ -I${includedir}/cairo
diff --git a/configure.in b/configure.in
index d415008..5f92305 100644
--- a/configure.in
+++ b/configure.in
@@ -722,7 +722,6 @@ fi
dnl ===========================================================================
AC_OUTPUT([
-cairo.pc
Makefile
pixman/Makefile
pixman/src/Makefile
@@ -732,6 +731,7 @@ test/Makefile
doc/Makefile
doc/public/Makefile
doc/public/version.xml
+src/cairo.pc
])
dnl ===========================================================================
diff --git a/src/Makefile.am b/src/Makefile.am
index 2141113..7756e8a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,6 +5,9 @@ font_subset_sources = \
cairo-scaled-font-subsets.c \
cairo-scaled-font-subsets-private.h
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = cairo.pc
+
if CAIRO_HAS_PS_SURFACE
libcairo_ps_headers = cairo-ps.h
libcairo_ps_sources = cairo-ps-surface.c cairo-ps-test.h
diff --git a/src/cairo.pc.in b/src/cairo.pc.in
new file mode 100644
index 0000000..7003191
--- /dev/null
+++ b/src/cairo.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: cairo
+Description: Multi-platform 2D graphics library
+Version: @VERSION@
+
+ at PKGCONFIG_REQUIRES@: @FREETYPE_REQUIRES@ @XRENDER_REQUIRES@ @PNG_REQUIRES@ @GLITZ_REQUIRES@
+Libs: @FREETYPE_CONFIG_LIBS@ -L${libdir} -lcairo
+Cflags: @FREETYPE_CONFIG_CFLAGS@ -I${includedir}/cairo
diff-tree e346eca1386e8ec14f9bda7d76662a16706f1e7c (from 211741cce61075b526edfacd728c9c5de8dd1aac)
Author: Carl Worth <cworth at cworth.org>
Date: Wed Jun 14 04:58:54 2006 -0700
Add zero-alpha reference image to Makefile.am for the sake of make dist
diff --git a/test/Makefile.am b/test/Makefile.am
index df69d0f..d92014f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -252,7 +252,8 @@ trap-clip-rgb24-ref.png \
unantialiased-shapes-ref.png \
unantialiased-shapes-ps-argb32-ref.png \
unbounded-operator-ref.png \
-unbounded-operator-rgb24-ref.png
+unbounded-operator-rgb24-ref.png \
+zero-alpha-ref.png
# Any test for which the code committed to CVS is expected to fail
# should be listed here.
More information about the cairo-commit
mailing list