[spice-common v2 11/11] build-sys: Move pixman check to m4 macro

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

 



---
 common/Makefile.am |  1 -
 configure.ac       |  4 +---
 m4/spice-deps.m4   | 12 ++++++++++++
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/common/Makefile.am b/common/Makefile.am
index 5a689fe..b4384e8 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -92,7 +92,6 @@ endif
 AM_CPPFLAGS =				\
 	-I$(top_srcdir)			\
 	$(SPICE_COMMON_CFLAGS)		\
-	$(PIXMAN_CFLAGS)		\
 	$(PROTOCOL_CFLAGS)		\
 	$(NULL)
 
diff --git a/configure.ac b/configure.ac
index ff0e34c..32d4c4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,9 +36,7 @@ AC_CONFIG_SUBDIRS([spice-protocol])
 PROTOCOL_CFLAGS='-I ${top_srcdir}/spice-protocol'
 AC_SUBST(PROTOCOL_CFLAGS)
 
-PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
-AC_SUBST(PIXMAN_CFLAGS)
-
+SPICE_CHECK_PIXMAN(SPICE_COMMON)
 SPICE_CHECK_SMARTCARD(SPICE_COMMON)
 SPICE_CHECK_CELT051(SPICE_COMMON)
 SPICE_CHECK_OPUS(SPICE_COMMON)
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index 80b8eb0..b4eb7fd 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -129,3 +129,15 @@ AC_DEFUN([SPICE_CHECK_OPENGL], [
     AS_VAR_APPEND([$1_CFLAGS], [" $GL_CFLAGS"])
     AS_VAR_APPEND([$1_LIBS], [" $GL_LIBS"])
 ])
+
+
+# SPICE_CHECK_PIXMAN(PREFIX)
+# --------------------------
+# Check for the availability of pixman. If found, it will set the $PREFIX_CFLAGS
+# and $PREFIX_LIBS variables.
+#---------------------------
+AC_DEFUN([SPICE_CHECK_PIXMAN], [
+    PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
+    AS_VAR_APPEND([$1_CFLAGS], [" $PIXMAN_CFLAGS"])
+    AS_VAR_APPEND([$1_LIBS], [" $PIXMAN_LIBS"])
+])
-- 
2.1.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]