From 13c1e27e0e99551f881e98f89b077425645c872c Mon Sep 17 00:00:00 2001 From: Logan007 Date: Thu, 10 Sep 2020 13:35:19 +0545 Subject: [PATCH] made openssl support optional (in configuration) --- configure.seed | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/configure.seed b/configure.seed index 79027c0..17a97e4 100644 --- a/configure.seed +++ b/configure.seed @@ -16,36 +16,37 @@ fi N2N_LIBS= AC_PROG_CC -AC_CHECK_LIB([zstd], [ZSTD_compress]) -if test "x$ac_cv_lib_zstd_ZSTD_compress" != xyes; then - AC_MSG_RESULT(Building n2n without ZSTD support) -else - AC_DEFINE([N2N_HAVE_ZSTD], [], [Have ZSTD support]) - N2N_LIBS="-lzstd ${N2N_LIBS}" +AC_ARG_WITH([zstd], + [AS_HELP_STRING([--with-zstd], + [enable support for zstd])], + [], + [with_zstd=no]) +if test "x$with_zstd" != xno; then + AC_CHECK_LIB([zstd], [ZSTD_compress]) + if test "x$ac_cv_lib_zstd_ZSTD_compress" != xyes; then + AC_MSG_RESULT(Building n2n without ZSTD support) + else + AC_DEFINE([N2N_HAVE_ZSTD], [], [Have ZSTD support]) + N2N_LIBS="-lzstd ${N2N_LIBS}" + fi fi - AC_ARG_WITH([openssl], [AS_HELP_STRING([--with-openssl], [enable support for OpenSSL])], [], [with_openssl=no]) - if test "x$with_openssl" != xno; then - AC_CHECK_LIB([crypto], [AES_cbc_encrypt]) - if test "x$ac_cv_lib_crypto_AES_cbc_encrypt" != xyes; then AC_MSG_RESULT(OpenSSL not present) else AC_DEFINE([HAVE_OPENSSL_1_0], [], [OpenSSL 1.0 is present]) N2N_LIBS="-lcrypto ${N2N_LIBS}" fi - OLD_CFLAGS="${CFLAGS}" OLD_LDFLAGS="${LDFLAGS}" - CFLAGS="${CFLAGS} -I/usr/local/opt/openssl@1.1/include" LDFLAGS="${LDFLAGS} -L/usr/local/opt/openssl@1.1/lib/" AC_CHECK_LIB([crypto], [EVP_CIPHER_CTX_reset]) @@ -55,7 +56,6 @@ if test "x$with_openssl" != xno; then else AC_DEFINE([HAVE_OPENSSL_1_1], [], [OpenSSL 1.1 is present]) fi - fi AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)