@matheusbsbs / matheus-bagliano / commits / e3601e8bb7
Fork 0

Darwin: Ignore missing /sw/lib

When on Darwin platforms don't include Fink or DarwinPorts into the link path unless the related library directory is actually present. The linker on MacOS 10.4 complains if it is given a directory which does not exist. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn Pearce committed Feb 28, 2006 at 09:03 UTC e3601e8bb76e46745d4919c3f30b1dddae040eb2
1 file changed +8 -4
Makefile
+8 -4
@@ -223,11 +223,15 @@ ifeq ($(uname_S),Darwin)
223 NEEDS_SSL_WITH_CRYPTO = YesPlease
224 NEEDS_LIBICONV = YesPlease
225 ## fink
226 - ALL_CFLAGS += -I/sw/include
227 - ALL_LDFLAGS += -L/sw/lib
226 + ifeq ($(shell test -d /sw/lib && echo y),y)
227 + ALL_CFLAGS += -I/sw/include
228 + ALL_LDFLAGS += -L/sw/lib
229 + endif
230 ## darwinports
229 - ALL_CFLAGS += -I/opt/local/include
230 - ALL_LDFLAGS += -L/opt/local/lib
231 + ifeq ($(shell test -d /opt/local/lib && echo y),y)
232 + ALL_CFLAGS += -I/opt/local/include
233 + ALL_LDFLAGS += -L/opt/local/lib
234 + endif
235 endif
236 ifeq ($(uname_S),SunOS)
237 NEEDS_SOCKET = YesPlease