Testsuite also depends on openssl, use correct variables for linking

This commit is contained in:
Jakub Jelen 2018-06-28 13:40:27 +02:00 committed by Frank Morgner
parent 7c8ed4dc03
commit e9314adf4b
2 changed files with 18 additions and 15 deletions

View File

@ -527,20 +527,6 @@ AC_CHECK_HEADER([cmocka.h],, [have_cmocka="no"],
#include <setjmp.h>
])
if test "${enable_tests}" = "detect"; then
if test "${have_cmocka}" = "yes"; then
enable_tests="yes"
else
enable_tests="no"
fi
fi
if test "${enable_tests}" = "yes"; then
if test "${have_cmocka}" != "yes"; then
AC_MSG_ERROR([Tests required, but cmocka is not available])
fi
fi
AC_ARG_VAR([ZLIB_CFLAGS], [C compiler flags for zlib])
AC_ARG_VAR([ZLIB_LIBS], [linker flags for zlib])
if test -z "${ZLIB_LIBS}"; then
@ -667,6 +653,23 @@ else
OPENSSL_LIBS=""
fi
if test "${enable_tests}" = "detect"; then
if test "${have_cmocka}" = "yes" -a "${have_openssl}" = "yes"; then
enable_tests="yes"
else
enable_tests="no"
fi
fi
if test "${enable_tests}" = "yes"; then
if test "${have_cmocka}" != "yes"; then
AC_MSG_ERROR([Tests required, but cmocka is not available])
fi
if test "${have_openssl}" != "yes"; then
AC_MSG_ERROR([Tests required, but openssl is not available])
fi
fi
PKG_CHECK_EXISTS([libeac], [PKG_CHECK_MODULES([OPENPACE], [libeac >= 0.9])],

View File

@ -23,7 +23,7 @@ p11test_SOURCES = p11test.c p11test_loader.c \
p11test_case_pss_oaep.c \
p11test_helpers.c
p11test_CFLAGS = -DNDEBUG $(CMOCKA_CFLAGS)
p11test_LDADD = -lssl -lcrypto $(CMOCKA_LIBS)
p11test_LDADD = $(OPTIONAL_OPENSSL_LIBS) $(CMOCKA_LIBS)
if WIN32
p11test_SOURCES += $(top_builddir)/win32/versioninfo.rc