@matheusbsbs / matheus-bagliano / commits / 8eb38cad44
Fork 0

Disable linking with Fink or DarwinPorts.

It may be desirable for the compiler to disable linking against Fink or DarwinPorts, especially if both are installed on the system and the user wants GIT to be linked specifically to only one of them. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn Pearce committed Jul 24, 2006 at 00:28 UTC 8eb38cad440d8d51d8737d546a067a88361f6c3d
1 file changed +22 -8
Makefile
+22 -8
@@ -37,6 +37,18 @@ all:
37 # tests. These tests take up a significant amount of the total test time
38 # but are not needed unless you plan to talk to SVN repos.
39 #
40 +# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink
41 +# installed in /sw, but don't want GIT to link against any libraries
42 +# installed there. If defined you may specify your own (or Fink's)
43 +# include directories and library directories by defining CFLAGS
44 +# and LDFLAGS appropriately.
45 +#
46 +# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,
47 +# have DarwinPorts installed in /opt/local, but don't want GIT to
48 +# link against any libraries installed there. If defined you may
49 +# specify your own (or DarwinPort's) include directories and
50 +# library directories by defining CFLAGS and LDFLAGS appropriately.
51 +#
52 # Define PPC_SHA1 environment variable when running make to make use of
53 # a bundled SHA1 routine optimized for PowerPC.
54 #
@@ -254,15 +266,17 @@ ifeq ($(uname_S),Darwin)
266 NEEDS_SSL_WITH_CRYPTO = YesPlease
267 NEEDS_LIBICONV = YesPlease
268 NO_STRLCPY = YesPlease
257 - ## fink
258 - ifeq ($(shell test -d /sw/lib && echo y),y)
259 - ALL_CFLAGS += -I/sw/include
260 - ALL_LDFLAGS += -L/sw/lib
269 + ifndef NO_FINK
270 + ifeq ($(shell test -d /sw/lib && echo y),y)
271 + ALL_CFLAGS += -I/sw/include
272 + ALL_LDFLAGS += -L/sw/lib
273 + endif
274 endif
262 - ## darwinports
263 - ifeq ($(shell test -d /opt/local/lib && echo y),y)
264 - ALL_CFLAGS += -I/opt/local/include
265 - ALL_LDFLAGS += -L/opt/local/lib
275 + ifndef NO_DARWIN_PORTS
276 + ifeq ($(shell test -d /opt/local/lib && echo y),y)
277 + ALL_CFLAGS += -I/opt/local/include
278 + ALL_LDFLAGS += -L/opt/local/lib
279 + endif
280 endif
281 endif
282 ifeq ($(uname_S),SunOS)