Merge pull request #3767 from TomHarkness/fix/macos-openssl-brew-prefix
tools: find brew OpenSSL via installed keg, not the alias
This commit is contained in:
2 files changed
+12
-2
No files matched your search
@@ -39,7 +39,12 @@ endif
|
||||
|
||||
# OS X needs linking to openssl
|
||||
ifeq ($(USE_BREW),1)
|
||||
OPENSSL_PREFIX := $(shell brew --prefix openssl)
|
||||
# brew's openssl alias can point at an uninstalled major (e.g. openssl@4);
|
||||
# pick the newest keg that actually has the headers.
|
||||
OPENSSL_PREFIX := $(shell for f in openssl openssl@3 openssl@1.1; do \
|
||||
p=$$(brew --prefix $$f 2>/dev/null); \
|
||||
[ -f "$$p/include/openssl/evp.h" ] && { echo $$p; break; }; \
|
||||
done)
|
||||
MYCFLAGS += -I$(OPENSSL_PREFIX)/include
|
||||
MYLDFLAGS += -L$(OPENSSL_PREFIX)/lib
|
||||
endif
|
||||
|
||||
@@ -15,7 +15,12 @@ endif
|
||||
|
||||
# OS X needs linking to openssl
|
||||
ifeq ($(USE_BREW),1)
|
||||
OPENSSL_PREFIX := $(shell brew --prefix openssl)
|
||||
# brew's openssl alias can point at an uninstalled major (e.g. openssl@4);
|
||||
# pick the newest keg that actually has the headers.
|
||||
OPENSSL_PREFIX := $(shell for f in openssl openssl@3 openssl@1.1; do \
|
||||
p=$$(brew --prefix $$f 2>/dev/null); \
|
||||
[ -f "$$p/include/openssl/evp.h" ] && { echo $$p; break; }; \
|
||||
done)
|
||||
MYCFLAGS += -I$(OPENSSL_PREFIX)/include
|
||||
MYLDFLAGS += -L$(OPENSSL_PREFIX)/lib
|
||||
endif
|
||||
|
||||
Reference in new issue
Block a user