Skip to content

Commit e3601e8

Browse files
spearceJunio C Hamano
authored andcommitted
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>
1 parent d82343b commit e3601e8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,15 @@ ifeq ($(uname_S),Darwin)
223223
NEEDS_SSL_WITH_CRYPTO = YesPlease
224224
NEEDS_LIBICONV = YesPlease
225225
## 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
228230
## 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
231235
endif
232236
ifeq ($(uname_S),SunOS)
233237
NEEDS_SOCKET = YesPlease

0 commit comments

Comments
 (0)