summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c20b82)
raw | patch | inline | side by side (parent: 7c20b82)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 27 Dec 2006 22:17:35 +0000 (14:17 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 28 Dec 2006 00:44:23 +0000 (16:44 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history |
diff --git a/Makefile b/Makefile
index 775ffaac27d7382df9db84d226603854295045d6..22b8a378c65cdfa7dfc7a6edaa0aae47662461b7 100644 (file)
--- a/Makefile
+++ b/Makefile
#
# Define NO_ICONV if your libc does not properly support iconv.
#
+# Define NO_R_TO_GCC if your gcc does not like "-R/path/lib" that
+# tells runtime paths to dynamic libraries; "-Wl,-rpath=/path/lib"
+# is used instead.
+#
# Define USE_NSEC below if you want git to care about sub-second file mtimes
# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely
endif
endif
+ifdef NO_R_TO_GCC_LINKER
+ # Some gcc does not accept and pass -R to the linker to specify
+ # the runtime dynamic library path.
+ CC_LD_DYNPATH = -Wl,-rpath=
+else
+ CC_LD_DYNPATH = -R
+endif
+
ifndef NO_CURL
ifdef CURLDIR
- # This is still problematic -- gcc does not always want -R.
+ # Try "-Wl,-rpath=$(CURLDIR)/lib" in such a case.
BASIC_CFLAGS += -I$(CURLDIR)/include
- CURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl
+ CURL_LIBCURL = -L$(CURLDIR)/lib $(CC_LD_DYNPATH)$(CURLDIR)/lib -lcurl
else
CURL_LIBCURL = -lcurl
endif
ifndef NO_OPENSSL
OPENSSL_LIBSSL = -lssl
ifdef OPENSSLDIR
- # Again this may be problematic -- gcc does not always want -R.
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
- OPENSSL_LINK = -L$(OPENSSLDIR)/lib -R$(OPENSSLDIR)/lib
+ OPENSSL_LINK = -L$(OPENSSLDIR)/lib $(CC_LD_DYNPATH)$(OPENSSLDIR)/lib
else
OPENSSL_LINK =
endif
endif
ifdef NEEDS_LIBICONV
ifdef ICONVDIR
- # Again this may be problematic -- gcc does not always want -R.
BASIC_CFLAGS += -I$(ICONVDIR)/include
- ICONV_LINK = -L$(ICONVDIR)/lib -R$(ICONVDIR)/lib
+ ICONV_LINK = -L$(ICONVDIR)/lib $(CC_LD_DYNPATH)$(ICONVDIR)/lib
else
ICONV_LINK =
endif