[Commit] Xc Xc.pc.in,1.1,1.2 configure.in,1.3,1.4
Noah Levitt
commit@keithp.com
Thu, 08 May 2003 14:04:26 -0700
Committed by: nlevitt
Update of /local/src/CVS/Xc
In directory home.keithp.com:/tmp/cvs-serv7178
Modified Files:
Xc.pc.in configure.in
Log Message:
Xc depends on Xrender.
Index: Xc.pc.in
===================================================================
RCS file: /local/src/CVS/Xc/Xc.pc.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Xc.pc.in 17 Apr 2003 15:55:43 -0000 1.1
+++ Xc.pc.in 8 May 2003 21:04:24 -0000 1.2
@@ -2,10 +2,12 @@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
+xrenderlibs=@XRENDER_LIBS@
+xrendercflags=@XRENDER_CFLAGS@
Name: Xc
Description: X Compositing library
Version: @VERSION@
Requires: libic
-Libs: -L${libdir} -lX11 -lXrender -lXc
-Cflags: -I${includedir}
+Libs: -L${libdir} -lX11 @XRENDER_LIBS@ -lXc
+Cflags: -I${includedir} @XRENDER_CFLAGS@
Index: configure.in
===================================================================
RCS file: /local/src/CVS/Xc/configure.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- configure.in 25 Apr 2003 20:24:35 -0000 1.3
+++ configure.in 8 May 2003 21:04:24 -0000 1.4
@@ -44,9 +44,48 @@
dnl ===========================================================================
-PKG_CHECK_MODULES(XC, libic >= $LIBIC_REQUIRED)
-AC_SUBST(XC_CFLAGS)
-AC_SUBST(XC_LIBS)
+#
+# Check for Xrender
+#
+PKG_CHECK_MODULES(XRENDER, xrender >= 0.8.2, [xrender_found_with_pkgconfig=yes],
+ [xrender_found_with_pkgconfig=no])
+case "$xrender_found_with_pkgconfig" in
+no)
+ PKG_CHECK_MODULES(XRENDER, xrender >= 0, [old_xrender_found_with_pkgconfig=yes],
+ [old_xrender_found_with_pkgconfig=no])
+ case "$old_xrender_found_with_pkgconfig" in
+ yes)
+ XRENDER_LIBS="$XRENDER_LIBS -lXext -lX11"
+ ;;
+ *)
+ # checks for X
+ AC_PATH_X
+
+ XRENDER_CFLAGS="-I$x_includes"
+ XRENDER_LIBS="-L$x_libraries -lXrender -lXext -lX11"
+
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
+ AC_CHECK_HEADERS([X11/extensions/Xrender.h], [], [AC_MSG_ERROR([Xrender.h not found.])])
+ CPPFLAGS="$saved_CPPFLAGS"
+
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $XRENDER_LIBS"
+ AC_CHECK_FUNCS([XRenderFindStandardFormat], [], [AC_MSG_ERROR([libXrender not found or too old.])])
+ LIBS="$saved_LIBS"
+ ;;
+ esac
+ ;;
+esac
+
+AC_SUBST(XRENDER_CFLAGS)
+AC_SUBST(XRENDER_LIBS)
+
+dnl ===========================================================================
+
+PKG_CHECK_MODULES(LIBIC, libic >= $LIBIC_REQUIRED)
+AC_SUBST(LIBIC_CFLAGS)
+AC_SUBST(LIBIC_LIBS)
dnl ===========================================================================