Skip to content

Commit 4880377

Browse files
authored
Merge pull request #370 from elms/configure/add_with_wolfssl_flag
2 parents c0ba16f + 35e5a9b commit 4880377

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

configure.ac

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,33 @@ AC_CHECK_SIZEOF([off_t])
5555
AC_CHECK_HEADERS([sys/select.h sys/time.h pty.h util.h termios.h])
5656
AC_CHECK_LIB([network],[socket])
5757
AC_CHECK_LIB([util],[forkpty])
58+
59+
#wolfssl
60+
AC_MSG_CHECKING([for wolfSSL])
61+
if test "x$prefix" = "xNONE"
62+
then
63+
wcpath=$ac_default_prefix
64+
else
65+
wcpath=$prefix
66+
fi
67+
AC_MSG_NOTICE([prefix ${prefix}])
68+
WOLFSSL_URL="http://www.wolfssl.com/download.html"
69+
AC_ARG_WITH(wolfssl,
70+
[AS_HELP_STRING([--with-wolfssl=PATH], [PATH to wolfssl install (default /usr/local)])],
71+
[
72+
if test "x$withval" != "xno" ; then
73+
if test -d "${withval}/lib" && test -d "${withval}/include"; then
74+
wcpath=${withval}
75+
else
76+
AC_MSG_ERROR([wolfSSL path error (${withval}): missing lib and include])
77+
fi
78+
fi
79+
]
80+
)
81+
82+
LDFLAGS="$LDFLAGS -L${wcpath}/lib"
83+
CPPFLAGS="$CPPFLAGS -I${wcpath}/include"
84+
5885
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/ .])])
5986
AC_CHECK_FUNCS([gethostbyname getaddrinfo gettimeofday inet_ntoa memset socket wc_ecc_set_rng])
6087

0 commit comments

Comments
 (0)