summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2015-06-18 11:51:09 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-06-22 19:46:39 +0200
commite1dfac38bdae1adeb601f9c5582ad0afef566aa2 (patch)
treeab9e4d7ddb3f02788a8a2f438c95e4c95dbb1147
parent93b213ebcee162d41227fcc9ab268f2ebb17e7b4 (diff)
build-sys: Use SPICE_CHECK_SMARTCARD
spice-common has an m4 macro adding a --enable-smartcard option and doing the needed checks, so we can use it in configure.ac rather than duplicating it here.
-rw-r--r--configure.ac19
1 files changed, 2 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 4b0af64..5732c95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.57])
AC_INIT([spice-gtk], [m4_esyscmd(build-aux/git-version-gen .tarball-version)],
[spice-devel@lists.freedesktop.org])
-AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIRS([m4 spice-common/m4])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_AUX_DIR([build-aux])
@@ -352,22 +352,7 @@ AC_SUBST(JPEG_LIBS)
AC_CHECK_LIB(z, deflate, Z_LIBS='-lz', AC_MSG_ERROR([zlib not found]))
AC_SUBST(Z_LIBS)
-AC_ARG_ENABLE([smartcard],
- AS_HELP_STRING([--enable-smartcard=@<:@auto/yes/no@:>@],
- [Enable smartcard support @<:@default=auto@:>@]),
- [],
- [enable_smartcard="auto"])
-
-have_smartcard=no
-if test "x$enable_smartcard" != "xno"; then
- PKG_CHECK_MODULES(SMARTCARD, libcacard >= 0.1.2, [have_smartcard=yes], [have_smartcard=no])
- if test "x$enable_smartcard" != "xauto" && test "x$have_smartcard" = "xno"; then
- AC_MSG_ERROR("Smartcard support requested but libcacard could not be found")
- fi
- if test "x$have_smartcard" = "xyes"; then
- AC_DEFINE([USE_SMARTCARD], [1], [Define if supporting smartcard proxying])
- fi
-fi
+SPICE_CHECK_SMARTCARD([SMARTCARD])
AM_CONDITIONAL([WITH_SMARTCARD], [test "x$have_smartcard" = "xyes"])
AC_ARG_ENABLE([usbredir],