summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2020-05-13 13:56:45 +1000
committerDarren Tucker <dtucker@dtucker.net>2020-05-13 13:56:45 +1000
commit08ce6b2210f46f795e7db747809f8e587429dfd2 (patch)
treeaa89e1cd8813a3ed289950ebbbd3d1bfc643b5a2
parent102d106bc2e50347d0e545fad6ff5ce408d67247 (diff)
Skip building sk-dummy library if no SK support.
-rw-r--r--Makefile.in4
-rw-r--r--configure.ac4
2 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index 7c5ed0bd..c9e4294d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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) \
diff --git a/configure.ac b/configure.ac
index 003b235e..46038375 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])