Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
b652ad61
Commit
b652ad61
authored
Mar 01, 2023
by
michael-grunder
Browse files
Rework searching for openssl
parent
a88c1da7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
b652ad61
...
@@ -92,29 +92,25 @@ ifeq ($(TEST_ASYNC),1)
...
@@ -92,29 +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)),)
endif
OPENSSL_PREFIX
=
$(SEARCH_PATH1)
else
else
ifneq($(wildcard
$(SEARCH_PATH2)),)
# On old OSX and macOS, MacPort and HomeBrew both used to install openssl
OPENSSL_PREFIX
=
$(SEARCH_PATH2)
# into this directory. On newer machines, homebrew installs into its own
endif
# opt/homebrew/ install prefix.
IS_OLD_PATH
=
$(
shell
sh
-c
'test -d /usr/local/opt/openssl'
)
ifeq
($(IS_OLD_PATH),1)
OPENSSL_PREFIX
?=
/usr/local/opt/openssl
CFLAGS
+=
-I
$(OPENSSL_PREFIX)
/include
SSL_LDFLAGS
+=
-L
$(OPENSSL_PREFIX)
/lib
-lssl
-lcrypto
else
OPENSSL_PREFIX
?=
/opt/homebrew/opt/openssl
CFLAGS
+=
-I
$(OPENSSL_PREFIX)
/include
SSL_LDFLAGS
+=
-L
$(OPENSSL_PREFIX)
/lib
-lssl
-lcrypto
endif
endif
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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment