Revision afd347ab configure

b/configure
214 214
trace_file="trace"
215 215
spice=""
216 216
rbd=""
217
smartcard=""
218 217
smartcard_nss=""
219 218
usb_redir=""
220 219
opengl=""
......
861 860
  ;;
862 861
  --enable-xfsctl) xfs="yes"
863 862
  ;;
864
  --disable-smartcard) smartcard="no"
865
  ;;
866
  --enable-smartcard) smartcard="yes"
867
  ;;
868 863
  --disable-smartcard-nss) smartcard_nss="no"
869 864
  ;;
870 865
  --enable-smartcard-nss) smartcard_nss="yes"
......
1128 1123
echo "  --enable-rbd             enable building the rados block device (rbd)"
1129 1124
echo "  --disable-libiscsi       disable iscsi support"
1130 1125
echo "  --enable-libiscsi        enable iscsi support"
1131
echo "  --disable-smartcard      disable smartcard support"
1132
echo "  --enable-smartcard       enable smartcard support"
1133 1126
echo "  --disable-smartcard-nss  disable smartcard nss support"
1134 1127
echo "  --enable-smartcard-nss   enable smartcard nss support"
1135 1128
echo "  --disable-usb-redir      disable usb network redirection support"
......
2813 2806
fi
2814 2807

  
2815 2808
# check for libcacard for smartcard support
2816
if test "$smartcard" != "no" ; then
2817
    smartcard="yes"
2818
    smartcard_cflags=""
2819
    # TODO - what's the minimal nss version we support?
2820
    if test "$smartcard_nss" != "no"; then
2821
      cat > $TMPC << EOF
2809
smartcard_cflags=""
2810
# TODO - what's the minimal nss version we support?
2811
if test "$smartcard_nss" != "no"; then
2812
  cat > $TMPC << EOF
2822 2813
#include <pk11pub.h>
2823 2814
int main(void) { PK11_FreeSlot(0); return 0; }
2824 2815
EOF
2825
        smartcard_includes="-I\$(SRC_PATH)/libcacard"
2826
        libcacard_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs"
2827
        libcacard_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags"
2828
        test_cflags="$libcacard_cflags"
2829
        # The header files in nss < 3.13.3 have a bug which causes them to
2830
        # emit a warning. If we're going to compile QEMU with -Werror, then
2831
        # test that the headers don't have this bug. Otherwise we would pass
2832
        # the configure test but fail to compile QEMU later.
2833
        if test "$werror" = "yes"; then
2834
            test_cflags="-Werror $test_cflags"
2835
        fi
2836
        if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \
2837
          compile_prog "$test_cflags" "$libcacard_libs"; then
2838
            smartcard_nss="yes"
2839
            QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags"
2840
            QEMU_INCLUDES="$QEMU_INCLUDES $smartcard_includes"
2841
            libs_softmmu="$libcacard_libs $libs_softmmu"
2842
        else
2843
            if test "$smartcard_nss" = "yes"; then
2844
                feature_not_found "nss"
2845
            fi
2846
            smartcard_nss="no"
2816
    smartcard_includes="-I\$(SRC_PATH)/libcacard"
2817
    libcacard_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs"
2818
    libcacard_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags"
2819
    test_cflags="$libcacard_cflags"
2820
    # The header files in nss < 3.13.3 have a bug which causes them to
2821
    # emit a warning. If we're going to compile QEMU with -Werror, then
2822
    # test that the headers don't have this bug. Otherwise we would pass
2823
    # the configure test but fail to compile QEMU later.
2824
    if test "$werror" = "yes"; then
2825
        test_cflags="-Werror $test_cflags"
2826
    fi
2827
    if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \
2828
      compile_prog "$test_cflags" "$libcacard_libs"; then
2829
        smartcard_nss="yes"
2830
        QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags"
2831
        QEMU_INCLUDES="$QEMU_INCLUDES $smartcard_includes"
2832
        libs_softmmu="$libcacard_libs $libs_softmmu"
2833
    else
2834
        if test "$smartcard_nss" = "yes"; then
2835
            feature_not_found "nss"
2847 2836
        fi
2837
        smartcard_nss="no"
2848 2838
    fi
2849 2839
fi
2850
if test "$smartcard" = "no" ; then
2851
    smartcard_nss="no"
2852
fi
2853 2840

  
2854 2841
# check for usbredirparser for usb network redirection support
2855 2842
if test "$usb_redir" != "no" ; then
......
3594 3581
  echo "CONFIG_SPICE=y" >> $config_host_mak
3595 3582
fi
3596 3583

  
3597
if test "$smartcard" = "yes" ; then
3598
  echo "CONFIG_SMARTCARD=y" >> $config_host_mak
3599
fi
3600

  
3601 3584
if test "$smartcard_nss" = "yes" ; then
3602 3585
  echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak
3603 3586
  echo "libcacard_libs=$libcacard_libs" >> $config_host_mak

Also available in: Unified diff