From 766bd244dc7972166e3d7cf0637721dafc8d5f4b Mon Sep 17 00:00:00 2001 From: Uri Lublin Date: Tue, 5 Jan 2010 22:40:58 +0200 Subject: 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. --- configure.ac.shared | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- cgit