summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2010-01-05 22:40:58 +0200
committerYaniv Kamay <ykamay@redhat.com>2010-01-10 19:45:56 +0200
commit766bd244dc7972166e3d7cf0637721dafc8d5f4b (patch)
tree5c60c7c4799ff9d629ae4b0c5a6ce8088dabb858
parentc8c1837809bfa2d8a2c2d0f5a797fc6c595dd71e (diff)
downloadspice-766bd244dc7972166e3d7cf0637721dafc8d5f4b.tar.gz
spice-766bd244dc7972166e3d7cf0637721dafc8d5f4b.tar.xz
spice-766bd244dc7972166e3d7cf0637721dafc8d5f4b.zip
spice: configure.ac.shared: add option to use spice-common package (subdir config)
Run ./configure --with-spice-common to use spice-common sources from spice-common package, instead of source in spice/common/ directory. This is usefull when building the spice client or spice server out of a "distribution" tarball, when ../common directory does not exist.
-rw-r--r--configure.ac.shared15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac.shared b/configure.ac.shared
index 0cb98593..52b71673 100644
--- a/configure.ac.shared
+++ b/configure.ac.shared
@@ -165,6 +165,21 @@ AC_ARG_ENABLE(static-linkage,
AC_SUBST([SPICEC_STATIC_LINKAGE_BSTATIC])
AC_SUBST([SPICEC_STATIC_LINKAGE_BDYNAMIC])
+#
+# Upon user request (./configure --with-spice-common) to use spice-common package
+# Then check for spice-common package, and overwrite SPICE_COMMON_SRCDIR
+# (with a directory specified in spice-common.pc).
+#
+AC_ARG_WITH(spice-common,
+ [AS_HELP_STRING([--with-spice-common],
+ [use sources found by spice-common.pc (default is no)])],
+ [use_spice_common=$withval],
+ [use_spice_common=no])
+
+if test "x$use_spice_common" != "xno"; then
+ PKG_CHECK_MODULES(SPICE_COMMON, spice-common = 0.4.1)
+ SPICE_COMMON_SRCDIR=$(pkg-config --variable=common_src_dir spice-common)
+fi
dnl ===========================================================================
dnl check compiler flags