[Mesa-dev] [PATCH 1/6] mesa: Add Pixman library to configure.ac

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Wed Jun 25 05:38:44 PDT 2014


Added '--enable-pixman' (default=no) parameter for autogen
and corresponding behaviour to include paths and Pixman
library for Mesa if Pixman found.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 configure.ac | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/configure.ac b/configure.ac
index e4cfb07..fc090c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,7 @@ XCBDRI2_REQUIRED=1.8
 XCBGLX_REQUIRED=1.8.1
 XSHMFENCE_REQUIRED=1.1
 XVMC_REQUIRED=1.0.6
+LIBPIXMAN_REQUIRED=0.16.6
 
 dnl Check for progs
 AC_PROG_CPP
@@ -713,6 +714,12 @@ AC_ARG_ENABLE([gallium-tests],
     [enable_gallium_tests="$enableval"],
     [enable_gallium_tests=no])
 
+AC_ARG_ENABLE([pixman],
+    [AS_HELP_STRING([--enable-pixman],
+        [Enable Pixman) @<:@default=disable@:>@])],
+    [enable_pixman="$enableval"],
+    [enable_pixman=no])
+
 # Option for Gallium drivers
 
 # Keep this in sync with the --with-gallium-drivers help string default value
@@ -984,6 +991,25 @@ if test "$have_sysfs" = yes; then
     have_pci_id=yes
 fi
 
+#Pixman
+if test "x$enable_pixman" = xyes; then
+    PKG_CHECK_MODULES([PIXMAN], [pixman-1], [have_libpixman=yes],
+                        [have_libpixman=no])
+
+    CFLAGS="$CFLAGS $PIXMAN_CFLAGS"
+    LIBS="$LIBS $PIXMAN_LIBS"
+
+    if test "x$have_libpixman" = "xyes"; then
+        DEFINES="$DEFINES -DHAVE_PIXMAN"
+    fi
+
+    AC_CHECK_HEADERS([pixman.h],
+	    [found_pixman_header=yes; break;])
+
+    AS_IF([test "x$found_pixman_header" != "xyes"],
+        [AC_MSG_ERROR([Unable to find pixman.h])])
+fi
+
 # This is outside the case (above) so that it is invoked even for non-GLX
 # builds.
 AM_CONDITIONAL(HAVE_XF86VIDMODE, test "x$HAVE_XF86VIDMODE" = xyes)
@@ -2379,6 +2405,12 @@ else
     echo "        Gallium:         no"
 fi
 
+echo ""
+if test "x$enable_pixman" = xyes; then
+    echo "        Pixman:          yes"
+else
+    echo "        Pixman:          no"
+fi
 
 dnl Libraries
 echo ""
-- 
1.8.1.2



More information about the mesa-dev mailing list