mirror of https://github.com/wolfSSL/wolfTPM.git
Fix `--prefix` without also needing `--with-wolfcrypt`
During addition of `--with-wolfcrypt` prefix option was ignored for include and link paths unless also specified via `--with-wolfcrypt`. Use prefix as default and set flags in `enable-wolfcrypt` sectionpull/177/head
parent
dd766417f0
commit
ce94c4d30b
|
@ -129,7 +129,7 @@ fi
|
||||||
# wolfSSL/wolfCrypt
|
# wolfSSL/wolfCrypt
|
||||||
AC_MSG_CHECKING([for wolfSSL/wolfCrypt
|
AC_MSG_CHECKING([for wolfSSL/wolfCrypt
|
||||||
])
|
])
|
||||||
wcpath="/usr/local/"
|
wcpath=$prefix
|
||||||
WOLFSSL_URL="http://www.wolfssl.com/download.html"
|
WOLFSSL_URL="http://www.wolfssl.com/download.html"
|
||||||
AC_ARG_WITH(wolfcrypt,
|
AC_ARG_WITH(wolfcrypt,
|
||||||
[AC_HELP_STRING([--with-wolfcrypt=PATH], [PATH to wolfssl install (default /usr/local)])],
|
[AC_HELP_STRING([--with-wolfcrypt=PATH], [PATH to wolfssl install (default /usr/local)])],
|
||||||
|
@ -141,8 +141,6 @@ AC_ARG_WITH(wolfcrypt,
|
||||||
AC_MSG_ERROR([wolfCrypt path error (${withval}): missing lib and include])
|
AC_MSG_ERROR([wolfCrypt path error (${withval}): missing lib and include])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
LDFLAGS="$LDFLAGS -L${wcpath}/lib"
|
|
||||||
CPPFLAGS="$CPPFLAGS -I${wcpath}/include"
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -155,6 +153,8 @@ AC_ARG_ENABLE([wolfcrypt],
|
||||||
if test "x$ENABLED_WOLFCRYPT" = "xyes"
|
if test "x$ENABLED_WOLFCRYPT" = "xyes"
|
||||||
then
|
then
|
||||||
LIBS="$LIBS -lwolfssl"
|
LIBS="$LIBS -lwolfssl"
|
||||||
|
LDFLAGS="$LDFLAGS -L${wcpath}/lib"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I${wcpath}/include"
|
||||||
|
|
||||||
AC_LIB_HAVE_LINKFLAGS(wolfssl,,
|
AC_LIB_HAVE_LINKFLAGS(wolfssl,,
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue