[Spice-devel] [spice-common 08/13] build-sys: Move pixman check to m4 macro
Christophe Fergeau
cfergeau at redhat.com
Wed Dec 3 09:15:23 PST 2014
---
common/Makefile.am | 1 -
configure.ac | 4 +---
m4/pixman.m4 | 5 +++++
3 files changed, 6 insertions(+), 4 deletions(-)
create mode 100644 m4/pixman.m4
diff --git a/common/Makefile.am b/common/Makefile.am
index 1066b1b..3b0be44 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -93,7 +93,6 @@ endif
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(SPICE_COMMON_CFLAGS) \
- $(PIXMAN_CFLAGS) \
$(PROTOCOL_CFLAGS) \
$(VISIBILITY_HIDDEN_CFLAGS) \
$(WARN_CFLAGS) \
diff --git a/configure.ac b/configure.ac
index b8b9a5a..98e0a23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,9 +32,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/pixman.m4 b/m4/pixman.m4
new file mode 100644
index 0000000..4074297
--- /dev/null
+++ b/m4/pixman.m4
@@ -0,0 +1,5 @@
+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
More information about the Spice-devel
mailing list