[Spice-devel] [spice-common 09/13] build-sys: Remove spice-protocol submodule
Christophe Fergeau
cfergeau at redhat.com
Wed Dec 3 09:15:24 PST 2014
As it has releases, it makes more sense to treat it as an external
module rather than bundling it with spice-common.
---
.gitmodules | 3 ---
Makefile.am | 1 -
common/Makefile.am | 1 -
configure.ac | 5 +----
m4/spice-protocol.m4 | 5 +++++
spice-protocol | 1 -
6 files changed, 6 insertions(+), 10 deletions(-)
delete mode 100644 .gitmodules
create mode 100644 m4/spice-protocol.m4
delete mode 160000 spice-protocol
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index f7de75d..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "spice-protocol"]
- path = spice-protocol
- url = ../spice-protocol
diff --git a/Makefile.am b/Makefile.am
index 380bf24..e39273d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,6 @@ NULL =
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = python_modules common
-DIST_SUBDIRS = spice-protocol $(SUBDIRS)
EXTRA_DIST = \
spice_codegen.py \
diff --git a/common/Makefile.am b/common/Makefile.am
index 3b0be44..4abd89c 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -93,7 +93,6 @@ endif
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(SPICE_COMMON_CFLAGS) \
- $(PROTOCOL_CFLAGS) \
$(VISIBILITY_HIDDEN_CFLAGS) \
$(WARN_CFLAGS) \
-std=gnu99 \
diff --git a/configure.ac b/configure.ac
index 98e0a23..e5c4021 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,10 +28,7 @@ AM_PROG_CC_C_O
SPICE_CHECK_SYSDEPS
# Checks for libraries
-AC_CONFIG_SUBDIRS([spice-protocol])
-PROTOCOL_CFLAGS='-I ${top_srcdir}/spice-protocol'
-AC_SUBST(PROTOCOL_CFLAGS)
-
+SPICE_CHECK_PROTOCOL(SPICE_COMMON)
SPICE_CHECK_PIXMAN(SPICE_COMMON)
SPICE_CHECK_SMARTCARD(SPICE_COMMON)
SPICE_CHECK_CELT051(SPICE_COMMON)
diff --git a/m4/spice-protocol.m4 b/m4/spice-protocol.m4
new file mode 100644
index 0000000..e4adeed
--- /dev/null
+++ b/m4/spice-protocol.m4
@@ -0,0 +1,5 @@
+AC_DEFUN([SPICE_CHECK_PROTOCOL], [
+ PKG_CHECK_MODULES(PROTOCOL, spice-protocol >= 0.12.7)
+ AS_VAR_APPEND([$1_CFLAGS], [" $PROTOCOL_CFLAGS"])
+ AS_VAR_APPEND([$1_LIBS], [" $PROTOCOL_LIBS"])
+])
diff --git a/spice-protocol b/spice-protocol
deleted file mode 160000
index 7566c5b..0000000
--- a/spice-protocol
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7566c5b3ad47b0b487e15b58d72e151882d05541
--
2.1.0
More information about the Spice-devel
mailing list