X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=m4%2Fopenssl.m4;h=bf5ce9fcaae010fdef98cff8e61c5ec7fd60629a;hp=d933b23bb59b505c84f3c47fb6d5675ff74f5a24;hb=c5c02a0861bf540e07fe64704cb97aae29c4cacf;hpb=9ddb37cee0f754ef88a55f692a508010fe18c782 diff --git a/m4/openssl.m4 b/m4/openssl.m4 index d933b23b..bf5ce9fc 100644 --- a/m4/openssl.m4 +++ b/m4/openssl.m4 @@ -1,81 +1,31 @@ dnl Check to find the OpenSSL headers/libraries - AC_DEFUN(tinc_OPENSSL, [ - AC_ARG_WITH(openssl, - [ --with-openssl=DIR OpenSSL library and headers prefix], - [openssl_lib="$withval/lib" - openssl_include="$withval/include"] - ) - AC_CACHE_CHECK([for openssl headers], tinc_cv_openssl_include, - [ - AC_ARG_WITH(openssl-include, - [ --with-openssl-include=DIR OpenSSL headers directory], - [tinc_cv_openssl_include="$withval"], - [if test "x$openssl_include" = "x" ; then - tinc_cv_openssl_include="none given" - else - tinc_cv_openssl_include=$openssl_include - fi] - ) - ]) - AC_CACHE_CHECK([for openssl libraries], tinc_cv_openssl_lib, - [ - AC_ARG_WITH(openssl-lib, - [ --with-openssl-lib=DIR OpenSSL library directory], - [tinc_cv_openssl_lib="$withval"], - [if test "x$openssl_lib" = "x" ; then - tinc_cv_openssl_lib="none given" - else - tinc_cv_openssl_lib=$openssl_lib - fi] - ) - ]) - -if test "$openssl_lib" != "none given" ; then - LIBS="$LIBS -L$tinc_cv_openssl_lib" -fi -if test "$openssl_include" != "none given" ; then - INCLUDES="$INCLUDES -I$tinc_cv_openssl_include" -fi - -osi=none -AC_CHECK_HEADERS(evp.h rsa.h, -[osi=found - break]) - -if test "$osi" = "none" ; then - AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h, - [osi=found - break]) -fi - - -libcrypto=none + tinc_ac_save_CPPFLAGS="$CPPFLAGS" -if test "$osi" = "found" ; then - AC_CHECK_LIB(crypto, SHA1_version, [ - libcrypto=yes - ]) -fi - -if test $libcrypto = none; then -cat <