xref: /OK3568_Linux_fs/buildroot/package/openldap/0002-fix-bignum.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunconfigure: correctly detect bignum
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunBuilding with bignum is currently not possible, since we're checking
4*4882a593Smuzhiyunol_with_tls against a value it is never assigned in any case.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunSince bignum is from openssl, and openssl is the preferred TLS
7*4882a593Smuzhiyunimplementation, if the bignum headers are found, it means we do have
8*4882a593SmuzhiyunTLS and it is opensl.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSo, keep the check for the bignum header, but check against ol_link_tls
11*4882a593Smuzhiyunwhich means that openssl is enabled when we find the bignum headers.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunSigned-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
14*4882a593Smuzhiyun
15*4882a593Smuzhiyundiff -durN openldap-2.4.40.orig/configure openldap-2.4.40/configure
16*4882a593Smuzhiyun--- openldap-2.4.40.orig/configure	2014-09-19 03:48:49.000000000 +0200
17*4882a593Smuzhiyun+++ openldap-2.4.40/configure	2015-01-25 18:44:54.216879362 +0100
18*4882a593Smuzhiyun@@ -23431,7 +23431,7 @@
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun 	if test "$ac_cv_header_openssl_bn_h" = "yes" &&
21*4882a593Smuzhiyun 		test "$ac_cv_header_openssl_crypto_h" = "yes" &&
22*4882a593Smuzhiyun-		test "$ol_with_tls" = "found" ; then
23*4882a593Smuzhiyun+		test "$ol_link_tls" = "yes" ; then
24*4882a593Smuzhiyun 		ol_with_mp=bignum
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
27*4882a593Smuzhiyundiff -durN openldap-2.4.40.orig/configure.in openldap-2.4.40/configure.in
28*4882a593Smuzhiyun--- openldap-2.4.40.orig/configure.in	2014-09-19 03:48:49.000000000 +0200
29*4882a593Smuzhiyun+++ openldap-2.4.40/configure.in	2015-01-25 18:44:37.628676446 +0100
30*4882a593Smuzhiyun@@ -2383,7 +2383,7 @@
31*4882a593Smuzhiyun 	AC_CHECK_HEADERS(openssl/crypto.h)
32*4882a593Smuzhiyun 	if test "$ac_cv_header_openssl_bn_h" = "yes" &&
33*4882a593Smuzhiyun 		test "$ac_cv_header_openssl_crypto_h" = "yes" &&
34*4882a593Smuzhiyun-		test "$ol_with_tls" = "found" ; then
35*4882a593Smuzhiyun+		test "$ol_link_tls" = "yes" ; then
36*4882a593Smuzhiyun 		ol_with_mp=bignum
37*4882a593Smuzhiyun 		AC_DEFINE(USE_MP_BIGNUM,1,[define to use OpenSSL BIGNUM for MP])
38*4882a593Smuzhiyun 	elif test $ol_with_mp = bignum ; then
39