xf86-video-intel: configure.ac

Chris Wilson ickle at kemper.freedesktop.org
Thu Apr 2 16:05:28 PDT 2015


 configure.ac |   23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 8d85793b08c202de7195f384e1698f3045fa70e5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Apr 3 00:01:31 2015 +0100

    configure: Replace hardcoded pkg-config --exists with PKG_CHECK_EXISTS
    
    Suggested by Emil Velikov:
    
    	Normally hard coding pkg-config is considered a bad idea. Please
     	try PKG_CHECK_EXISTS - it would work like a charm when
    	cross-compiling.
    
    	Cheers
    	Emil
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/configure.ac b/configure.ac
index f91e6d1..a705483 100644
--- a/configure.ac
+++ b/configure.ac
@@ -393,14 +393,12 @@ AC_ARG_ENABLE(ums-only,
 required_xorg_server_version=1.6
 required_pixman_version=0.16
 
-if pkg-config --exists 'pixman-1 >= 0.27.1'; then
-	AC_DEFINE([HAS_PIXMAN_GLYPHS], 1, [Enable pixman glyph cache])
-fi
-
-if pkg-config --exists 'pixman-1 >= 0.24.0'; then
-	AC_DEFINE([HAS_PIXMAN_TRIANGLES], 1, [Enable pixman triangle rasterisation])
-fi
-
+PKG_CHECK_EXISTS([pixman-1 >= 0.24.0],
+		 AC_DEFINE([HAS_PIXMAN_TRIANGLES], 1, [Enable pixman triangle rasterisation])
+		 [])
+PKG_CHECK_EXISTS([pixman-1 >= 0.27.1],
+		 [AC_DEFINE([HAS_PIXMAN_GLYPHS], 1, [Enable pixman glyph cache])],
+		 [])
 # Store the list of server defined optional extensions in REQUIRED_MODULES
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
@@ -426,18 +424,15 @@ if test "x$SNA" != "xno"; then
 fi
 
 uxa_requires_libdrm=2.4.52
+uxa_requires_pixman=0.24.0
+
 AC_ARG_ENABLE(uxa,
 	      AS_HELP_STRING([--enable-uxa],
 			     [Enable Unified Acceleration Architecture (UXA) [default=auto]]),
 	      [UXA="$enableval"],
 	      [UXA=auto])
 if test "x$UXA" = "xauto"; then
-	if ! pkg-config --exists "libdrm_intel >= $uxa_requires_libdrm"; then
-		UXA=no
-	fi
-	if ! pkg-config --exists 'pixman-1 >= 0.24.0'; then
-		UXA=no
-	fi
+	PKG_CHECK_EXISTS([libdrm_intel >= $uxa_requires_libdrm pixman-1 >= $uxa_requires_pixman], [], [UXA=no])
 fi
 if test "x$UXA" != "xno"; then
 	AC_DEFINE(USE_UXA, 1, [Enable UXA support])


More information about the xorg-commit mailing list