$NetBSD: patch-configure.ac,v 1.2 2020/01/07 13:35:13 sborrill Exp $ - compat for OpenSSL 1.1 https://sourceforge.net/p/opendkim/patches/37/ - fix == bashism --- configure.ac.orig 2015-05-12 19:43:09.000000000 +0100 +++ configure.ac 2020-01-07 13:30:01.000000000 +0000 @@ -860,26 +860,28 @@ AC_SEARCH_LIBS([ERR_peek_error], [crypto], , AC_MSG_ERROR([libcrypto not found])) - AC_SEARCH_LIBS([SSL_library_init], [ssl], , - [ - if test x"$enable_shared" = x"yes" - then - AC_MSG_ERROR([Cannot build shared opendkim - against static openssl libraries. - Configure with --disable-shared - to get this working or obtain a - shared libssl library for - opendkim to use.]) - fi - # avoid caching issue - last result of SSL_library_init - # shouldn't be cached for this next check - unset ac_cv_search_SSL_library_init - LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" - AC_SEARCH_LIBS([SSL_library_init], [ssl], , - AC_MSG_ERROR([libssl not found]), [-ldl]) - ] - ) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[SSL_library_init();]])], + [od_have_ossl="yes";], + [od_have_ossl="no";]) + if test x"$od_have_ossl" = x"no" + then + if test x"$enable_shared" = x"yes" + then + AC_MSG_ERROR([Cannot build shared opendkim + against static openssl libraries. + Configure with --disable-shared + to get this working or obtain a + shared libssl library for + opendkim to use.]) + fi + + LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" + AC_SEARCH_LIBS([SSL_library_init], [ssl], , + AC_MSG_ERROR([libssl not found]), [-ldl]) + fi AC_CHECK_DECL([SHA256_DIGEST_LENGTH], AC_DEFINE([HAVE_SHA256], 1, @@ -2184,7 +2186,7 @@ AC_MSG_ERROR([reputation requires libjansson]) fi -if test x"$jansson_found" == x"yes" +if test x"$jansson_found" = x"yes" then AC_DEFINE(USE_JANSSON, 1, [use libjansson to parse REPUTE replies]) fi