[PATCH] Add tests for "-R" and "-Wl,-rpath," switches in configure script.
Add tests for "-R" and "-Wl,-rpath," switches in configure script.
Replace NO_R_TO_GCC_LINKER and CC_LD_DYNPATH by USE_RUNPATH and RUNPATH_SWITCH which have different semantics.
Add a warning if user must set LD_LIBRARY_PATH manually.
diff --git a/Makefile b/Makefile
index 90c5a13..aa9a6a5 100644
@@ -111,9 +111,10 @@ all::
# Define NO_DEFLATE_BOUND if your zlib does not have deflateBound.
-# Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib"
-# that tells runtime paths to dynamic libraries;
-# "-Wl,-rpath=/path/lib" is used instead.
+# USE_RUNPATH and RUNPATH_SWITCH define if and how to pass the runtime
+# dynamic library paths to the linker. The default is "-Wl,-rpath,". If
+# you don't use runpath, you will always need to set LD_LIBRARY_PATH
+# manually before running git.
# 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
@@ -217,6 +218,7 @@ GITWEB_SITE_FOOTER =
export prefix bindir sharedir htmldir sysconfdir
+# defaults, possibly overridden by config.mak.autogen
CC = gcc
AR = ar
RM = rm -f
@@ -226,6 +228,8 @@ INSTALL = install
RPMBUILD = rpmbuild
TCL_PATH = tclsh
TCLTK_PATH = wish
+USE_RUNPATH = yes
+RUNPATH_SWITCH = -Wl,-rpath,