Browse Source

made openssl support optional (in configuration)

pull/410/head
Logan007 4 years ago
parent
commit
13c1e27e0e
  1. 20
      configure.seed

20
configure.seed

@ -16,36 +16,37 @@ fi
N2N_LIBS= N2N_LIBS=
AC_PROG_CC AC_PROG_CC
AC_CHECK_LIB([zstd], [ZSTD_compress])
if test "x$ac_cv_lib_zstd_ZSTD_compress" != xyes; then 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) 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], AC_ARG_WITH([openssl],
[AS_HELP_STRING([--with-openssl], [AS_HELP_STRING([--with-openssl],
[enable support for OpenSSL])], [enable support for OpenSSL])],
[], [],
[with_openssl=no]) [with_openssl=no])
if test "x$with_openssl" != xno; then 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])
@ -55,7 +56,6 @@ if test "x$with_openssl" != xno; 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 fi
AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true) AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)

Loading…
Cancel
Save