[Commit] Xcursor configure.ac,1.1,1.2

Keith Packard commit@keithp.com
Tue, 06 May 2003 11:00:54 -0700


Committed by: keithp

Update of /local/src/CVS/Xcursor
In directory home.keithp.com:/tmp/cvs-serv14440

Modified Files:
	configure.ac 
Log Message:
replace Xrender test with fragment from Xft


Index: configure.ac
===================================================================
RCS file: /local/src/CVS/Xcursor/configure.ac,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- configure.ac	6 May 2003 17:49:08 -0000	1.1
+++ configure.ac	6 May 2003 18:00:52 -0000	1.2
@@ -62,29 +62,36 @@
         AC_MSG_ERROR([X is required, but it was either disabled or not found.])
 fi
 
-# Check render configuration, strip extra digits from package version to
-# find the required protocol version
-
-PKG_CHECK_MODULES(XRENDER, xrender >= 0.8, [render_found_with_pkgconfig=yes], 
-                  [render_found_with_pkgconfig=no])
-case "$render_found_with_pkgconfig" in
+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)
-        RENDER_CFLAGS="-I$x_includes"
+	PKG_CHECK_MODULES(XRENDER, xrender >= 0.8, [old_xrender_found_with_pkgconfig=yes], 
+			  [old_xrender_found_with_pkgconfig=no])
+	case "$old_xrender_found_with_pkgconfig" in
+	no)
+	        # checks for X
+	        AC_PATH_X
 
-        saved_CPPFLAGS="$CPPFLAGS"
-        CPPFLAGS="$CPPFLAGS $RENDER_CFLAGS"
+	        XRENDER_CFLAGS="-I$x_includes"
+	        XRENDER_LIBS="-L$x_libraries -lXrender -lXext -lX11"
 
-        AC_CHECK_HEADERS([X11/extensions/render.h X11/extensions/renderproto.h],
-                         [], [AC_MSG_ERROR([Render headers not found.])])
-        AC_CHECK_TYPES([xAnimCursorElt], [], 
-                       [AC_MSG_ERROR([Render headers too old. Version $RENDER_VERSION or later is required.])], 
-                       [#include <X11/extensions/render.h> 
-                        #include <X11/extensions/renderproto.h>])
+	        saved_CPPFLAGS="$CPPFLAGS"
+	        CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
+	        AC_CHECK_HEADERS([X11/extensions/Xrender.h], [], [AC_MSG_ERROR([Xrender.h not found.])])
+	        CPPFLAGS="$saved_CPPFLAGS"
 
-        CPPFLAGS="$saved_CPPFLAGS"
+	        saved_LIBS="$LIBS"
+	        LIBS="$LIBS $XRENDER_LIBS"
+	        AC_CHECK_FUNCS([XRenderCreateAnimCursor], [], [AC_MSG_ERROR([libXrender not found.])])
+	        LIBS="$saved_LIBS"
+		;;
+	yes)
+		XRENDER_LIBS="$XRENDER_LIBS -lXext -lX11"
+		;;
+	esac
         ;;
 esac
-
 
 AC_SUBST(RENDER_CFLAGS)