summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gernhardt <brian@gernhardtsoftware.com>2009-09-08 09:54:38 -0400
committerJunio C Hamano <gitster@pobox.com>2009-09-10 10:22:05 -0700
commit0460dba4b4c47ac0b11ccb85b319792280422bc9 (patch)
treeb0ed8423d5fe6966b70b2f9732a993e8fb8cb341
parentaaa68dd50f7b4226fdfdfbbe8bbb2dfd9a9e6d66 (diff)
downloadgit-0460dba4b4c47ac0b11ccb85b319792280422bc9.tar.gz
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 <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a614347568..1cc9a4183a 100644
--- a/Makefile
+++ b/Makefile
@@ -91,7 +91,9 @@ all::
# Define PPC_SHA1 environment variable when running make to make use of
# a bundled SHA1 routine optimized for PowerPC.
#
-# Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
+# Define NEEDS_CRYPTO_WITH_SSL if you need -lcrypto when using -lssl (Darwin).
+#
+# Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin).
#
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
#
@@ -704,6 +706,7 @@ ifeq ($(uname_S),SCO_SV)
TAR = gtar
endif
ifeq ($(uname_S),Darwin)
+ NEEDS_CRYPTO_WITH_SSL = YesPlease
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
@@ -1007,6 +1010,9 @@ ifndef NO_OPENSSL
else
OPENSSL_LINK =
endif
+ ifdef NEEDS_CRYPTO_WITH_SSL
+ OPENSSL_LINK += -lcrypto
+ endif
else
BASIC_CFLAGS += -DNO_OPENSSL
BLK_SHA1 = 1