Skip building sk-dummy library if no SK support.

This commit is contained in:
Darren Tucker 2020-05-13 13:56:45 +10:00
parent 102d106bc2
commit 08ce6b2210
2 changed files with 7 additions and 1 deletions

View File

@ -635,6 +635,8 @@ SK_DUMMY_OBJS=\
regress/misc/sk-dummy/fatal.lo \
ed25519.lo hash.lo ge25519.lo fe25519.lo sc25519.lo verify.lo
SK_DUMMY_LIBRARY=@SK_DUMMY_LIBRARY@
.c.lo: Makefile.in config.h
$(CC) $(CFLAGS_NOPIE) $(PICFLAG) $(CPPFLAGS) -c $< -o $@
@ -648,7 +650,7 @@ regress-binaries: regress-prep $(LIBCOMPAT) \
regress/netcat$(EXEEXT) \
regress/check-perm$(EXEEXT) \
regress/mkdtemp$(EXEEXT) \
regress/misc/sk-dummy/sk-dummy.so
$(SK_DUMMY_LIBRARY)
regress-unit-binaries: regress-prep $(REGRESSLIBS) \
regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \

View File

@ -3137,6 +3137,10 @@ AC_MSG_RESULT([$enable_pkcs11])
AC_MSG_CHECKING([whether to enable U2F])
if test "x$enable_sk" = "xyes" ; then
AC_DEFINE([ENABLE_SK], [], [Enable for U2F/FIDO support])
AC_SUBST(SK_DUMMY_LIBRARY, [regress/misc/sk-dummy/sk-dummy.so])
else
# Do not try to build sk-dummy library.
AC_SUBST(SK_DUMMY_LIBRARY, [""])
fi
AC_MSG_RESULT([$enable_sk])