Compare commits

...

2 Commits

Author SHA1 Message Date
michael-grunder
b652ad61e7 Rework searching for openssl 2023-03-06 12:59:09 -08:00
Victor Polevoy
a88c1da738 Attempt to find the correct path for openssl.
The installation path for openssl may vary depending on the way
used for its installation and the macOS version.

This commit attempts to find the correct path for openssl to use.
2023-03-06 12:59:09 -08:00

View File

@ -92,18 +92,25 @@ ifeq ($(TEST_ASYNC),1)
endif endif
ifeq ($(USE_SSL),1) ifeq ($(USE_SSL),1)
ifeq ($(uname_S),Linux) ifndef OPENSSL_PREFIX
ifdef OPENSSL_PREFIX ifeq ($(uname_S),Darwin)
CFLAGS+=-I$(OPENSSL_PREFIX)/include SEARCH_PATH1=/opt/homebrew/opt/openssl
SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto SEARCH_PATH2=/usr/local/opt/openssl
else
SSL_LDFLAGS=-lssl -lcrypto ifneq ($(wildcard $(SEARCH_PATH1)),)
OPENSSL_PREFIX=$(SEARCH_PATH1)
else ifneq($(wildcard $(SEARCH_PATH2)),)
OPENSSL_PREFIX=$(SEARCH_PATH2)
endif
endif endif
else
OPENSSL_PREFIX?=/usr/local/opt/openssl
CFLAGS+=-I$(OPENSSL_PREFIX)/include
SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto
endif endif
ifdef OPENSSL_PREFIX
CFLAGS+=-I$(OPENSSL_PREFIX)/include
SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib
endif
SSL_LDFLAGS+=-lssl -lcrypto
endif endif
ifeq ($(uname_S),FreeBSD) ifeq ($(uname_S),FreeBSD)