Skip to content

Commit

Permalink
Merge pull request #312 from lealem47/libwolfssl_path
Browse files Browse the repository at this point in the history
Fix for --with-libwolfssl-prefix config option
  • Loading branch information
embhorn authored Oct 11, 2022
2 parents f657f8d + d027047 commit 481f4bd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 62 deletions.
30 changes: 29 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,33 @@ AC_CHECK_SIZEOF([long], 4)
AC_CHECK_FUNCS([gethostbyname getaddrinfo gettimeofday inet_ntoa memset socket signal rand])
AC_CHECK_LIB([network],[socket])

#wolfssl
AC_MSG_CHECKING([for wolfSSL])
if test "x$prefix" = "xNONE"
then
wcpath=$ac_default_prefix
else
wcpath=$prefix
fi
AC_MSG_NOTICE([prefix ${prefix}])
WOLFSSL_URL="http://www.wolfssl.com/download.html"
AC_ARG_WITH(libwolfssl-prefix,
[AS_HELP_STRING([--with-libwolfssl-prefix=PATH], [PATH to wolfssl install (default /usr/local)])],
[
if test "x$withval" != "xno" ; then
if test -d "${withval}/lib" && test -d "${withval}/include"; then
wcpath=${withval}
else
AC_MSG_ERROR([wolfSSL path error (${withval}): missing lib and include])
fi
fi
]
)

LDFLAGS="$LDFLAGS -L${wcpath}/lib"
CPPFLAGS="$CPPFLAGS -I${wcpath}/include"


# DEBUG
DEBUG_CFLAGS="-g -O0 -DDEBUG_WOLFMQTT"

Expand Down Expand Up @@ -137,7 +164,8 @@ if test "x$ENABLED_TLS" = "xyes"
then
AM_CFLAGS="$AM_CFLAGS -DENABLE_MQTT_TLS"

TAO_REQUIRE_LIBWOLFSSL
AC_CHECK_LIB([wolfssl],[wolfCrypt_Init],,[AC_MSG_ERROR([libwolfssl is required and wasn't found on the system. It can be obtained from https://www.wolfssl.com/download.html/.])])

fi


Expand Down
61 changes: 0 additions & 61 deletions m4/have_wolfssl.m4

This file was deleted.

0 comments on commit 481f4bd

Please sign in to comment.