Hi Yann,
Am 18.03.23 um 17:33 schrieb yla...@apache.org:
Author: ylavic
Date: Sat Mar 18 16:33:08 2023
New Revision: 1908503
URL: http://svn.apache.org/viewvc?rev=1908503&view=rev
Log:
crypto_openssl: Fix configure/detection of OPENSSL_init_crypto()
Modified:
apr/apr/trunk/build/crypto.m4
apr/apr/trunk/crypto/apr_crypto_openssl.c
Modified: apr/apr/trunk/build/crypto.m4
URL:
http://svn.apache.org/viewvc/apr/apr/trunk/build/crypto.m4?rev=1908503&r1=1908502&r2=1908503&view=diff
==============================================================================
--- apr/apr/trunk/build/crypto.m4 (original)
+++ apr/apr/trunk/build/crypto.m4 Sat Mar 18 16:33:08 2023
...
@@ -113,15 +112,13 @@ AC_DEFUN([APU_CHECK_CRYPTO_OPENSSL], [
AC_MSG_NOTICE(checking for openssl in $withval)
AC_CHECK_HEADERS(openssl/x509.h, [openssl_have_headers=1])
AC_CHECK_LIB(crypto, EVP_CIPHER_CTX_new, openssl_have_libs=1)
- if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" !=
"0"; then
+ if test "$openssl_have_headers" = "1" && test "$openssl_have_libs" =
"1"; then
apu_have_openssl=1
- APR_ADDTO(LDFLAGS, [-L$withval/lib])
- APR_ADDTO(INCLUDES, [-I$withval/include])
> fi
> -
> - AC_CHECK_DECLS([EVP_PKEY_CTX_new, OPENSSL_init_crypto], [], [],
> - [#include <openssl/evp.h>])
> -
> + fi
> + if test "$apu_have_openssl" = "1"; then
> + AC_CHECK_LIB(crypto, OPENSSL_init_crypto)
> + AC_CHECK_FUNCS([OPENSSL_init_crypto])
> fi
Hmmm, for me this dropped "APR_ADDTO(INCLUDES,..." breaks the apr trunk
build. The path to the OpenSSL header files gets no longer added to any
INCLUDES variable for the build.
For 1.7.x and 1.6.x you committed it differently:
- APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
- APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
+ APR_ADDTO(APRUTIL_INCLUDES, [$openssl_CPPFLAGS])
+ APR_ADDTO(APRUTIL_LDFLAGS, [$openssl_LDFLAGS])
So maybe adding back APR_ADDTO for INCLUDES (and LDFLAGS?) but with the
new values would be the right thing? Before the change, the addition to
INCLUDES get copied over to EXTRA_INCLUDES and ends up in
build/apr_rules.mk.
Best regards,
Rainer