[cairo-commit] configure.in src/cairo-backend.pc.in src/Makefile.am

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Jun 26 03:21:19 PDT 2006


 configure.in            |   14 ++++++++------
 src/Makefile.am         |    9 ++++++++-
 src/cairo-backend.pc.in |    4 ++--
 3 files changed, 18 insertions(+), 9 deletions(-)

New commits:
diff-tree 73a0e792b4115a1012c5f618650a6265377cc6e5 (from 5ba974ea0b7974e8c985d7414fcf6a8a5e415c12)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Jun 26 12:21:18 2006 +0200

    More configure foo fixes for .pc files.

diff --git a/configure.in b/configure.in
index b6d030e..157172d 100644
--- a/configure.in
+++ b/configure.in
@@ -154,9 +154,11 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
 	      AC_MSG_NOTICE([creating $outfile])
 	      mkdir -p src
 	      AS_IF([sed \
-			-e "s/@backend_name@/$1/g" \
-			-e "s/@Backend_Name@/$2/g" \
-			-e "s/@BACKEND_REQUIRES@/$$1_REQUIRES/g" \
+			-e "s, at backend_name@,$1,g" \
+			-e "s, at Backend_Name@,$2,g" \
+			-e "s, at BACKEND_REQUIRES@,$$1_REQUIRES,g" \
+			-e "s, at BACKEND_LIBS@,$$1_LIBS,g" \
+			-e "s, at BACKEND_CFLAGS@,$$1_CFLAGS,g" \
 			-e "s, at prefix@,$prefix,g" \
 			-e "s, at exec_prefix@,$exec_prefix,g" \
 			-e "s, at libdir@,$libdir,g" \
@@ -179,12 +181,11 @@ CAIRO_LIBS=""
 dnl ===========================================================================
 
 CAIRO_BACKEND_ENABLE(xlib, Xlib, xlib, XLIB_SURFACE, auto, [
-  dnl Check for Xrender header files if the Xrender package is not installed:
   AC_PATH_XTRA
-  if test "x$X_LIBS" = x; then
+  if test "x$X_CFLAGS$X_PRE_LIBS$X_LIBS$X_EXTRA_LIBS" = x; then
     use_xlib="no (requires Xlib)"
   else
-    xlib_LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
+    xlib_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
     xlib_CFLAGS=$X_CFLAGS
     _CHECK_FUNCS_WITH_FLAGS(XrmFinalize, $xlib_CFLAGS, $xlib_LIBS)
   fi
@@ -193,6 +194,7 @@ CAIRO_BACKEND_ENABLE(xlib, Xlib, xlib, X
 CAIRO_BACKEND_ENABLE(xlib_xrender, Xlib Xrender, xlib-xrender, XLIB_XRENDER_SURFACE, auto, [
   use_xlib_xrender=$use_xlib
   if test "x$use_xlib_xrender" = xyes; then
+    dnl Check for Xrender header files if the Xrender package is not installed:
     xlib_xrender_REQUIRES="xrender >= 0.6"
     PKG_CHECK_MODULES(xlib_xrender, $xlib_xrender_REQUIRES, ,
 		      [xlib_xrender_REQUIRES=""
diff --git a/src/Makefile.am b/src/Makefile.am
index 57d1e80..6611114 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -45,6 +45,11 @@ libcairo_xlib_sources = cairo-xlib-surfa
 backend_pkgconfigs += cairo-xlib.pc
 endif
 
+if CAIRO_HAS_XLIB_XRENDER_SURFACE
+libcairo_xlib_xrender_headers = cairo-xlib-xrender.h
+backend_pkgconfigs += cairo-xlib-xrender.pc
+endif
+
 if CAIRO_HAS_QUARTZ_SURFACE
 libcairo_quartz_headers = cairo-quartz.h
 libcairo_quartz_sources = cairo-quartz-surface.c cairo-quartz-private.h
@@ -147,6 +152,7 @@ cairoinclude_HEADERS =			\
 	$(libcairo_beos_headers)	\
 	$(libcairo_xcb_headers)		\
 	$(libcairo_xlib_headers)	\
+	$(libcairo_xlib_xrender_headers)	\
 	$(libcairo_directfb_headers)
 
 lib_LTLIBRARIES = libcairo.la
@@ -237,7 +243,8 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = cairo.pc $(backend_pkgconfigs)
 DISTCLEANFILES = $(backend_pkgconfigs)
 EXTRA_DIST = cairo-backend.pc.in
-
+$(backend_pkgconfigs): $(top_srcdir)/configure
+	$(top_builddir)/config.status --recheck
 
 $(top_builddir)/config.h: $(top_srcdir)/config.h.in
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) config.h
diff --git a/src/cairo-backend.pc.in b/src/cairo-backend.pc.in
index fa724ec..325a876 100644
--- a/src/cairo-backend.pc.in
+++ b/src/cairo-backend.pc.in
@@ -8,5 +8,5 @@ Description: @Backend_Name@ backend for 
 Version: @VERSION@
 
 Requires: cairo @BACKEND_REQUIRES@
-Libs:
-Cflags: -I${includedir}/cairo
+Libs: @BACKEND_LIBS@
+Cflags: -I${includedir}/cairo @BACKEND_CFLAGS@


More information about the cairo-commit mailing list