Silence iconv warnings on Leopard
authorWincent Colaiuta <win@wincent.com>
Thu, 6 Dec 2007 19:07:03 +0000 (20:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Dec 2007 07:22:25 +0000 (23:22 -0800)
Apple ships a newer version of iconv with Leopard (Mac OS X 10.5/Darwin
9). Ensure that OLD_ICONV is not set on any version of Darwin in the
9.x series; this should be good for at least a couple of years, when
Darwin 10 comes out and we can invert the sense of the test to
specifically check for Darwin 7 or 8.

A more sophisticated and robust check is possible for those who use
autoconf, but not everybody does that.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
index 999391e10b9949ea9c4cb0e71d98bf6d72ee47af..4dda3405bb6d456e8f4910e834affc6a82827f77 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -406,7 +406,9 @@ endif
 ifeq ($(uname_S),Darwin)
        NEEDS_SSL_WITH_CRYPTO = YesPlease
        NEEDS_LIBICONV = YesPlease
-       OLD_ICONV = UnfortunatelyYes
+       ifneq ($(shell expr "$(uname_R)" : '9\.'),2)
+               OLD_ICONV = UnfortunatelyYes
+       endif
        NO_STRLCPY = YesPlease
        NO_MEMMEM = YesPlease
 endif