summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2013-05-19 06:23:34 -0400
committerJunio C Hamano <gitster@pobox.com>2013-05-20 11:15:53 -0700
commit4dcd7732db071c8e1e0466b98eaf9501f7fe1a7e (patch)
tree4456e056a37e4ad93bdc32b5055af1568ce1d051 /Makefile
parent29de20504e9790785fe1698300755323f74972aa (diff)
downloadgit-4dcd7732db071c8e1e0466b98eaf9501f7fe1a7e.tar.gz
Makefile: add support for Apple CommonCrypto facility
As of Mac OS X 10.7, Apple deprecated all OpenSSL functions due to OpenSSL ABI instability, thus leading to build warnings. As a replacement, Apple encourages developers to migrate to its own (stable) CommonCrypto facility. Introduce boilerplate which controls whether Apple's CommonCrypto facility is employed (enabled by default). Also add a NO_APPLE_COMMON_CRYPTO build flag with which the user can opt out to use OpenSSL instead. [es: extracted CommonCrypto-related Makefile boilerplate into separate introductory patch] Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f698c1a59e..cd24c94224 100644
--- a/Makefile
+++ b/Makefile
@@ -137,6 +137,10 @@ all::
# specify your own (or DarwinPort's) include directories and
# library directories by defining CFLAGS and LDFLAGS appropriately.
#
+# Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
+# and do not want to use Apple's CommonCrypto library. This allows you
+# to provide your own OpenSSL library, for example from MacPorts.
+#
# Define BLK_SHA1 environment variable to make use of the bundled
# optimized C SHA1 routine.
#
@@ -1054,6 +1058,10 @@ ifeq ($(uname_S),Darwin)
BASIC_LDFLAGS += -L/opt/local/lib
endif
endif
+ ifndef NO_APPLE_COMMON_CRYPTO
+ APPLE_COMMON_CRYPTO = YesPlease
+ COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO
+ endif
NO_REGEX = YesPlease
PTHREAD_LIBS =
endif