summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2022-10-02 09:34:13 +0000
committerViktor Szakats <commit@vsz.me>2022-10-02 09:50:10 +0000
commite604a82cae922bf86403a94f5803ac5e4303ae97 (patch)
treeb3544955067ae5282d83798595398e9a300c6f90 /lib
parent37b3fb1c6a6319b6717885524a52553d0e560a32 (diff)
downloadcurl-e604a82cae922bf86403a94f5803ac5e4303ae97.tar.gz
Makefile.m32: delete legacy component bits [ci skip]
- Drop auto-detection of OpenSSL 1.0.2 and earlier. Now always defaulting to OpenSSL 1.1.0 and later, LibreSSL and BoringSSL. - Drop `Invalid path to OpenSSL package` detection. OpenSSL has been using a standard file layout since 1.1.0, so this seems unnecessary now. - Drop special logic to enable Novell LDAP SDK support. - Drop special logic to enable OpenLDAP LDAP SDK support. This seems to be distinct from native OpenLDAP, with support implemented inside `lib/ldap.c` (vs. `lib/openldap.c`) back when the latter did not exist yet in curl. - Add `-lwldap32` only if there is no other LDAP library (either native OpenLDAP, or SDKs above) present. - Update `doc/INSTALL.md` accordingly. After this patch, it's necessary to make configration changes when using OpenSSL 1.0.2 or earlier, or the two LDAP SDKs. OpenSSL 1.0.2 and earlier: ``` export OPENSSL_INCLUDE = <path-to-openssl>/outinc export OPENSSL_LIBPATH = <path-to-openssl>/out export OPENSSL_LIBS = -lssl32 -leay32 -lgdi32 ``` Novell LDAP SDK, previously enabled via `USE_LDAP_NOVELL=1`: ``` export CURL_CFLAG_EXTRAS = -I<path-to-sdk>/inc -DCURL_HAS_NOVELL_LDAPSDK export CURL_LDFLAG_EXTRAS = -L<path-to-sdk>/lib/mscvc -lldapsdk -lldapssl -lldapx ``` OpenLDAP LDAP SDK, previously enabled via `USE_LDAP_OPENLDAP=1`: ``` export CURL_CFLAG_EXTRAS = -I<path-to-sdk>/include -DCURL_HAS_OPENLDAP_LDAPSDK export CURL_LDFLAG_EXTRAS = -L<path-to-sdk>/lib -lldap -llber ``` I haven't tested these scenarios, and in general we recommend using a recent OpenSSL release. Also, WinLDAP (the Windows default) and OpenLDAP (via `-DUSE_OPENLDAP`) are the LDAP options actively worked on in curl. Closes #9631
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.m3243
1 files changed, 4 insertions, 39 deletions
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 7097ebf00..9a4fecdba 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -61,10 +61,6 @@ endif
ifndef LIBIDN2_PATH
LIBIDN2_PATH = $(PROOT)/../libidn2
endif
-# https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
-ifndef LDAP_SDK
-LDAP_SDK = $(PROOT)/../openldapsdk
-endif
ifndef NGHTTP2_PATH
NGHTTP2_PATH = $(PROOT)/../nghttp2
endif
@@ -283,37 +279,18 @@ ifdef NGHTTP3
endif
ifdef SSL
ifndef OPENSSL_INCLUDE
- ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
- # OpenSSL 1.0.2 and earlier
- OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
- endif
- ifeq "$(wildcard $(OPENSSL_PATH)/include)" "$(OPENSSL_PATH)/include"
- OPENSSL_INCLUDE = $(OPENSSL_PATH)/include
- endif
- endif
- ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h"
- $(error Invalid path to OpenSSL package: $(OPENSSL_PATH))
+ OPENSSL_INCLUDE = $(OPENSSL_PATH)/include
endif
ifndef OPENSSL_LIBPATH
OPENSSL_LIBS = -lssl -lcrypto
- ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
- # OpenSSL 1.0.2 and earlier
- OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
- OPENSSL_LIBS = -lssl32 -leay32
- ifndef DYN
- OPENSSL_LIBS += -lgdi32
- endif
- endif
- ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
- OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
- endif
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
endif
INCLUDES += -I"$(OPENSSL_INCLUDE)"
CFLAGS += -DUSE_OPENSSL
curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
ifdef SRP
ifeq "$(wildcard $(OPENSSL_INCLUDE)/openssl/srp.h)" "$(OPENSSL_INCLUDE)/openssl/srp.h"
- # OpenSSL 1.0.1 and later
+ # OpenSSL 1.0.1 and later, except BoringSSL
CFLAGS += -DHAVE_OPENSSL_SRP -DUSE_TLS_SRP
endif
endif
@@ -374,21 +351,9 @@ endif
ifdef LDAPS
CFLAGS += -DHAVE_LDAP_SSL
endif
-ifdef USE_LDAP_NOVELL
- INCLUDES += -I"$(LDAP_SDK)/inc"
- CFLAGS += -DCURL_HAS_NOVELL_LDAPSDK
- curl_LDADD += -L"$(LDAP_SDK)/lib/mscvc" -lldapsdk -lldapssl -lldapx
-endif
-ifdef USE_LDAP_OPENLDAP
- INCLUDES += -I"$(LDAP_SDK)/include"
- CFLAGS += -DCURL_HAS_OPENLDAP_LDAPSDK
- curl_LDADD += -L"$(LDAP_SDK)/lib" -lldap -llber
-endif
-ifndef USE_LDAP_NOVELL
-ifndef USE_LDAP_OPENLDAP
+ifeq ($(findstring -lldap,$(LDFLAGS)),)
curl_LDADD += -lwldap32
endif
-endif
curl_LDADD += -lws2_32 -lcrypt32 -lbcrypt
# Makefile.inc provides the CSOURCES and HHEADERS defines