summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMichal Ruprich <mruprich@redhat.com>2019-07-11 11:28:15 +0200
committerMichal Ruprich <mruprich@redhat.com>2019-08-08 16:03:20 +0200
commit0513a271535a9351a4e3e5bde7670f197535c76a (patch)
treee5c730f066adef6c6057c6ca090b9151f7073e9f /configure.ac
parentMerge pull request #4497 from opensourcerouting/rcu (diff)
downloadfrr-0513a271535a9351a4e3e5bde7670f197535c76a.tar.xz
frr-0513a271535a9351a4e3e5bde7670f197535c76a.zip
ospfd,ripd: Enabling build with openssl
Enabling openssl library for md5 authentication in RIP and OSPF Signed-off-by: Michal Ruprich <michalruprich@gmail.com>
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 961336fbd..134c8692d 100755
--- a/configure.ac
+++ b/configure.ac
@@ -572,6 +572,20 @@ AC_ARG_ENABLE([thread-sanitizer],
AS_HELP_STRING([--enable-thread-sanitizer], [enable ThreadSanitizer support for detecting data races]))
AC_ARG_ENABLE([memory-sanitizer],
AS_HELP_STRING([--enable-memory-sanitizer], [enable MemorySanitizer support for detecting uninitialized memory reads]))
+AC_ARG_WITH([crypto],
+ AS_HELP_STRING([--with-crypto=<internal|openssl>], [choose between different implementations of cryptographic functions(default value is --with-crypto=internal)]))
+
+#if openssl, else use the internal
+AS_IF([test x"${with_crypto}" = x"openssl"], [
+AC_CHECK_LIB([crypto], [EVP_DigestInit], [LIBS="$LIBS -lcrypto"], [], [])
+if test $ac_cv_lib_crypto_EVP_DigestInit = no; then
+ AC_MSG_ERROR([build with openssl has been specified but openssl library was not found on your system])
+else
+ AC_DEFINE([CRYPTO_OPENSSL], [1], [Compile with openssl support])
+fi
+], [test x"${with_crypto}" = x"internal" || test x"${with_crypto}" = x"" ], [AC_DEFINE([CRYPTO_INTERNAL], [1], [Compile with internal cryptographic implementation])
+], [AC_MSG_ERROR([Unknown value for --with-crypto])]
+)
AS_IF([test "${enable_clippy_only}" != "yes"], [
AC_CHECK_HEADERS([json-c/json.h])