Patchwork [6/6] ccid: configure: add --enable-smartcard and --disable-smartcard

login
register
mail settings
Submitter Alon Levy
Date Jan. 11, 2011, 8:42 a.m.
Message ID <1294735359-4009-8-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/78317/
State New
Headers show

Comments

Alon Levy - Jan. 11, 2011, 8:42 a.m.
---
 configure |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

Patch

diff --git a/configure b/configure
index 4567057..ebc8250 100755
--- a/configure
+++ b/configure
@@ -748,6 +748,10 @@  for opt do
   ;;
   --enable-rbd) rbd="yes"
   ;;
+  --disable-smartcard) smartcard="no"
+  ;;
+  --enable-smartcard) smartcard="yes"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -942,6 +946,8 @@  echo "                           Default:trace-<pid>"
 echo "  --disable-spice          disable spice"
 echo "  --enable-spice           enable spice"
 echo "  --enable-rbd             enable building the rados block device (rbd)"
+echo "  --disable-smartcard      disable smartcard support"
+echo "  --enable-smartcard       enable smartcard support"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -2210,16 +2216,18 @@  EOF
 fi
 
 # check for libcacard for smartcard support
-smartcard_cflags="-I\$(SRC_PATH)/libcacard"
-libcacard_libs=$($pkgconfig --libs nss 2>/dev/null)
-libcacard_cflags=$($pkgconfig --cflags nss)
-# TODO - what's the minimal nss version we support?
-if $pkgconfig --atleast-version=3.12.8 nss; then
-    smartcard="yes"
-    QEMU_CFLAGS="$QEMU_CFLAGS $smartcard_cflags $libcacard_cflags"
-    LIBS="$libcacard_libs $LIBS"
-else
-    smartcard="no"
+if test "$smartcard" != "no" ; then
+    smartcard_cflags="-I\$(SRC_PATH)/libcacard"
+    libcacard_libs=$($pkgconfig --libs nss 2>/dev/null)
+    libcacard_cflags=$($pkgconfig --cflags nss)
+    # TODO - what's the minimal nss version we support?
+    if $pkgconfig --atleast-version=3.12.8 nss; then
+        smartcard="yes"
+        QEMU_CFLAGS="$QEMU_CFLAGS $smartcard_cflags $libcacard_cflags"
+        LIBS="$libcacard_libs $LIBS"
+    else
+        smartcard="no"
+    fi
 fi
 
 ##########################################