Skip to content

Commit 0460dba

Browse files
Benabikgitster
authored andcommitted
Makefile: Add NEEDS_CRYPTO_WITH_SSL
The Makefile comment for NEEDS_SSL_WITH_CRYPTO says to define it "if you need -lcrypto with -lssl (Darwin)." However, what it actually does is add -lssl when you use -lcrypto and not the other way around. However, libcrypto contains a majority of the ERR_* functions from OpenSSL (at least on OS X) so we need it both ways. So, add NEEDS_CRYPTO_WITH_SSL which adds -lcrypto to the OpenSSL link flags and clarify the difference between it and NEEDS_SSL_WITH_CRYPTO. Signed-off-by: Brian Gernhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aaa68dd commit 0460dba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ all::
9191
# Define PPC_SHA1 environment variable when running make to make use of
9292
# a bundled SHA1 routine optimized for PowerPC.
9393
#
94-
# Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
94+
# Define NEEDS_CRYPTO_WITH_SSL if you need -lcrypto when using -lssl (Darwin).
95+
#
96+
# Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin).
9597
#
9698
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
9799
#
@@ -704,6 +706,7 @@ ifeq ($(uname_S),SCO_SV)
704706
TAR = gtar
705707
endif
706708
ifeq ($(uname_S),Darwin)
709+
NEEDS_CRYPTO_WITH_SSL = YesPlease
707710
NEEDS_SSL_WITH_CRYPTO = YesPlease
708711
NEEDS_LIBICONV = YesPlease
709712
ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
@@ -1007,6 +1010,9 @@ ifndef NO_OPENSSL
10071010
else
10081011
OPENSSL_LINK =
10091012
endif
1013+
ifdef NEEDS_CRYPTO_WITH_SSL
1014+
OPENSSL_LINK += -lcrypto
1015+
endif
10101016
else
10111017
BASIC_CFLAGS += -DNO_OPENSSL
10121018
BLK_SHA1 = 1

0 commit comments

Comments
 (0)