[clutter/wip/apocalypses/apocalypse-3: 25/35] build: Check for gdk-pixbuf



commit f8a365fa6b99dfab07e3f842a727fc3dda82dc8a
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Fri Mar 9 14:56:58 2012 +0000

    build: Check for gdk-pixbuf
    
    Some tests may need to load image data without going through
    ClutterTexture or Cogl, so let's add a configure switch and a
    conditional for gdk-pibxuf.

 configure.ac |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0505e43..f5a0632 100644
--- a/configure.ac
+++ b/configure.ac
@@ -761,6 +761,33 @@ X11_EXTS=${X11_EXTS#* }
 
 AC_CACHE_SAVE
 
+dnl === Enable GDK-Pixbuf in tests ============================================
+
+m4_define([pixbuf_default], [yes])
+AC_ARG_ENABLE([gdk-pixbuf],
+              [AS_HELP_STRING([--enable-gdk-pixbuf=@<:@no/yes@:>@],
+                              [Enable tests using GDK-Pixbuf @<:@default=]pixbuf_default[@:>@])],
+              [enable_pixbuf=$enable_val],
+              [enable_pixbuf=pixbuf_default])
+
+AS_CASE([$enable_pixbuf],
+
+        [yes],
+        [
+          PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0])
+          AC_SUBST(GDK_PIXBUF_CFLAGS)
+          AC_SUBST(GDK_PIXBUF_LIBS)
+          pixbuf_tests=yes
+        ],
+
+        [no],
+        [
+          pixbuf_tests=no
+        ]
+)
+
+AM_CONDITIONAL([PIXBUF_TESTS], [test "x$pixbuf_tests" = "xyes"])
+
 dnl === Enable debug level ====================================================
 
 m4_define([debug_default], [m4_if(m4_eval(clutter_minor_version % 2), [1], [yes], [minimum])])
@@ -1125,6 +1152,7 @@ echo " â Extra:"
 echo "        Build introspection data: ${enable_introspection}"
 echo "        Build conformance test suite: ${enable_conformance}"
 echo "        Build X11-specific tests: ${x11_tests}"
+echo "        Build tests using GDK-Pixbuf: ${pixbuf_tests}"
 
 # Clutter backend related flags
 echo ""
@@ -1146,7 +1174,6 @@ if test "x$SUPPORT_X11" = "x1"; then
 echo ""
 echo "     - X11 backend options:"
 echo "        Enabled extensions: ${X11_EXTS}"
-echo "        Build X11-specific tests: ${x11_tests}"
 fi
 
 if test "x$SUPPORT_CEX100" = "x1"; then



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]