summaryrefslogtreecommitdiffstats
path: root/configure.ac.shared
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac.shared')
-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