summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2015-06-17 18:15:24 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-06-22 19:47:58 +0200
commitfe2ca14fc2c1b505ca3b6689994e7cde9acd4c4f (patch)
tree54640e6be246bedad186fd506a2cabab85d76972
parent55bc82f07011c59058597ae0d894640820e94216 (diff)
build-sys: Use spice-common m4 macro for smartcard
Besides the code factorization, this will allow smartcard support to be automatically enabled if libcacard is present and --disable-smartcard is not used.
-rw-r--r--configure.ac24
1 files changed, 6 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 1802ff15..76226838 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ fi
SPICE_SERVER_VERSION=`printf "0x%02x%02x%02x" $major $minor $micro`
AC_SUBST(SPICE_SERVER_VERSION)
-AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIRS([m4 spice-common/m4])
AM_CONFIG_HEADER([config.h])
AC_CONFIG_AUX_DIR(.)
@@ -83,14 +83,8 @@ AC_ARG_ENABLE([lz4],
AS_IF([test x"$enable_lz4" != "xno"], [enable_lz4="yes"])
AM_CONDITIONAL(SUPPORT_LZ4, test "x$enable_lz4" = "xyes")
-AC_ARG_ENABLE([smartcard],
- AS_HELP_STRING([--enable-smartcard], [Enable network redirection]),,
- [enable_smartcard="no"])
-AS_IF([test x"$enable_smartcard" != "xno"], [enable_smartcard="yes"])
-AM_CONDITIONAL(SUPPORT_SMARTCARD, test "x$enable_smartcard" != "xno")
-if test "x$enable_smartcard" = "xyes"; then
- AC_DEFINE([USE_SMARTCARD], [1], [Define if supporting smartcard proxying])
-fi
+SPICE_CHECK_SMARTCARD([SMARTCARD])
+AM_CONDITIONAL(SUPPORT_SMARTCARD, test "x$have_smartcard" = "xyes")
AC_ARG_ENABLE([automated_tests],
AS_HELP_STRING([--enable-automated-tests], [Enable automated tests using spicy-screenshot (part of spice--gtk)]),,
@@ -119,15 +113,9 @@ AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" -pthread $LIBM $LIBRT"])
SPICE_REQUIRES=""
-if test "x$enable_smartcard" = "xyes"; then
- PKG_CHECK_MODULES(CAC_CARD, libcacard >= 0.1.2)
- SMARTCARD_LIBS="$CAC_CARD_LIBS"
- SMARTCARD_CFLAGS="$CAC_CARD_CFLAGS"
- AC_SUBST(SMARTCARD_LIBS)
- AC_SUBST(SMARTCARD_CFLAGS)
+AS_IF([test x"$have_smartcard" = "xyes"], [
AS_VAR_APPEND([SPICE_REQUIRES], [" libcacard >= 0.1.2"])
-fi
-
+])
PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.22])
AS_VAR_APPEND([SPICE_REQUIRES], [" glib-2.0 >= 2.22"])
@@ -358,7 +346,7 @@ echo "
LZ4 support: ${enable_lz4}
- Smartcard: ${enable_smartcard}
+ Smartcard: ${have_smartcard}
SASL support: ${enable_sasl}