Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update libwolfssl search for older tools and static library #665

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ AC_ARG_WITH([liboqs],
)

#wolfssl
AC_MSG_CHECKING([for wolfSSL])
if test "x$prefix" = "xNONE"
then
wcpath=$ac_default_prefix
Expand All @@ -125,7 +124,25 @@ AC_ARG_WITH(wolfssl,
]
)

AC_CHECK_LIB([wolfssl],[wolfCrypt_Init],,[AC_MSG_ERROR([libwolfssl is required for ${PACKAGE}. It can be obtained from https://www.wolfssl.com/download.html/ .])])
HAVE_WOLFSSL="0"
AC_CHECK_LIB([wolfssl],[wolfCrypt_Init],[HAVE_WOLFSSL="1"],)

# Double check if is a static library
if test ${HAVE_WOLFSSL} = "0" ; then
AC_MSG_CHECKING([for libwolfssl.a])
if test -f "${wcpath}/lib/libwolfssl.a"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([libwolfssl is required for ${PACKAGE}. It can be obtained from https://www.wolfssl.com/download.html/ .])
fi
fi

if test ${HAVE_WOLFSSL} = "1" ; then
LIBS="-lwolfssl ${LIBS}"
AC_DEFINE(HAVE_LIBWOLFSSL,[1],[libwolfssl was found and linked with])
fi

AC_CHECK_FUNCS([gethostbyname getaddrinfo gettimeofday inet_ntoa memset socket wc_ecc_set_rng])
AC_CHECK_DECLS([[pread],[pwrite]],,[unistd.h])

Expand Down
Loading