Browse Source

Merge pull request #410 from Logan007/optOpenSsl

made openssl & zstd support optional (in configuration)
pull/418/head
Luca Deri 4 years ago
committed by GitHub
parent
commit
1424d66b4d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      configure.seed

19
configure.seed

@ -16,27 +16,37 @@ fi
N2N_LIBS= N2N_LIBS=
AC_PROG_CC AC_PROG_CC
AC_CHECK_LIB([zstd], [ZSTD_compress])
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 if test "x$ac_cv_lib_zstd_ZSTD_compress" != xyes; then
AC_MSG_RESULT(Building n2n without ZSTD support) AC_MSG_RESULT(Building n2n without ZSTD support)
else else
AC_DEFINE([N2N_HAVE_ZSTD], [], [Have ZSTD support]) AC_DEFINE([N2N_HAVE_ZSTD], [], [Have ZSTD support])
N2N_LIBS="-lzstd ${N2N_LIBS}" N2N_LIBS="-lzstd ${N2N_LIBS}"
fi 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]) AC_CHECK_LIB([crypto], [AES_cbc_encrypt])
if test "x$ac_cv_lib_crypto_AES_cbc_encrypt" != xyes; then if test "x$ac_cv_lib_crypto_AES_cbc_encrypt" != xyes; then
AC_MSG_RESULT(OpenSSL not present) AC_MSG_RESULT(OpenSSL not present)
else else
AC_DEFINE([HAVE_OPENSSL_1_0], [], [OpenSSL 1.0 is present]) AC_DEFINE([HAVE_OPENSSL_1_0], [], [OpenSSL 1.0 is present])
N2N_LIBS="-lcrypto ${N2N_LIBS}" N2N_LIBS="-lcrypto ${N2N_LIBS}"
fi fi
OLD_CFLAGS="${CFLAGS}" OLD_CFLAGS="${CFLAGS}"
OLD_LDFLAGS="${LDFLAGS}" OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -I/usr/local/opt/openssl@1.1/include" CFLAGS="${CFLAGS} -I/usr/local/opt/openssl@1.1/include"
LDFLAGS="${LDFLAGS} -L/usr/local/opt/openssl@1.1/lib/" LDFLAGS="${LDFLAGS} -L/usr/local/opt/openssl@1.1/lib/"
AC_CHECK_LIB([crypto], [EVP_CIPHER_CTX_reset]) AC_CHECK_LIB([crypto], [EVP_CIPHER_CTX_reset])
@ -46,6 +56,7 @@ if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_reset" != xyes; then
else else
AC_DEFINE([HAVE_OPENSSL_1_1], [], [OpenSSL 1.1 is present]) AC_DEFINE([HAVE_OPENSSL_1_1], [], [OpenSSL 1.1 is present])
fi fi
fi
AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true) AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)

Loading…
Cancel
Save