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
redis
Commits
6a014af7
Unverified
Commit
6a014af7
authored
Jul 10, 2020
by
James Hilliard
Committed by
GitHub
Jul 10, 2020
Browse files
Use pkg-config to properly detect libssl and libcrypto libraries (#7452)
parent
d9f970d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Makefile
View file @
6a014af7
...
@@ -192,9 +192,21 @@ ifeq ($(MALLOC),jemalloc)
...
@@ -192,9 +192,21 @@ ifeq ($(MALLOC),jemalloc)
endif
endif
ifeq
($(BUILD_TLS),yes)
ifeq
($(BUILD_TLS),yes)
FINAL_CFLAGS
+=
-DUSE_OPENSSL
$(OPENSSL_CFLAGS)
FINAL_CFLAGS
+=
-DUSE_OPENSSL
$(OPENSSL_CFLAGS)
FINAL_LDFLAGS
+=
$(OPENSSL_LDFLAGS)
FINAL_LDFLAGS
+=
$(OPENSSL_LDFLAGS)
FINAL_LIBS
+=
../deps/hiredis/libhiredis_ssl.a
-lssl
-lcrypto
LIBSSL_PKGCONFIG
:=
$(
shell
$(PKG_CONFIG)
--exists
libssl
&&
echo
$$
?
)
ifeq
($(LIBSSL_PKGCONFIG),0)
LIBSSL_LIBS
=
$(
shell
$(PKG_CONFIG)
--libs
libssl
)
else
LIBSSL_LIBS
=
-lssl
endif
LIBCRYPTO_PKGCONFIG
:=
$(
shell
$(PKG_CONFIG)
--exists
libcrypto
&&
echo
$$
?
)
ifeq
($(LIBCRYPTO_PKGCONFIG),0)
LIBCRYPTO_LIBS
=
$(
shell
$(PKG_CONFIG)
--libs
libcrypto
)
else
LIBCRYPTO_LIBS
=
-lcrypto
endif
FINAL_LIBS
+=
../deps/hiredis/libhiredis_ssl.a
$(LIBSSL_LIBS)
$(LIBCRYPTO_LIBS)
endif
endif
REDIS_CC
=
$(QUIET_CC)$(CC)
$(FINAL_CFLAGS)
REDIS_CC
=
$(QUIET_CC)$(CC)
$(FINAL_CFLAGS)
...
...
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