зеркало из https://github.com/microsoft/git.git
make the name of the library directory a config option
Introduce new makefile variable lib to hold the name of the lib directory ("lib" by default). Also introduce a switch for configure to specify this name with --with-lib=ARG. This is useful for systems that use a different name than "lib" (like "lib64" on some 64 bit Linux architectures). Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
4b7f59af2a
Коммит
10861beaa8
11
Makefile
11
Makefile
|
@ -151,6 +151,7 @@ sysconfdir = /etc
|
||||||
else
|
else
|
||||||
sysconfdir = $(prefix)/etc
|
sysconfdir = $(prefix)/etc
|
||||||
endif
|
endif
|
||||||
|
lib = lib
|
||||||
ETC_GITCONFIG = $(sysconfdir)/gitconfig
|
ETC_GITCONFIG = $(sysconfdir)/gitconfig
|
||||||
# DESTDIR=
|
# DESTDIR=
|
||||||
|
|
||||||
|
@ -500,9 +501,9 @@ endif
|
||||||
|
|
||||||
ifndef NO_CURL
|
ifndef NO_CURL
|
||||||
ifdef CURLDIR
|
ifdef CURLDIR
|
||||||
# Try "-Wl,-rpath=$(CURLDIR)/lib" in such a case.
|
# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
|
||||||
BASIC_CFLAGS += -I$(CURLDIR)/include
|
BASIC_CFLAGS += -I$(CURLDIR)/include
|
||||||
CURL_LIBCURL = -L$(CURLDIR)/lib $(CC_LD_DYNPATH)$(CURLDIR)/lib -lcurl
|
CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl
|
||||||
else
|
else
|
||||||
CURL_LIBCURL = -lcurl
|
CURL_LIBCURL = -lcurl
|
||||||
endif
|
endif
|
||||||
|
@ -520,7 +521,7 @@ endif
|
||||||
|
|
||||||
ifdef ZLIB_PATH
|
ifdef ZLIB_PATH
|
||||||
BASIC_CFLAGS += -I$(ZLIB_PATH)/include
|
BASIC_CFLAGS += -I$(ZLIB_PATH)/include
|
||||||
EXTLIBS += -L$(ZLIB_PATH)/lib $(CC_LD_DYNPATH)$(ZLIB_PATH)/lib
|
EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)
|
||||||
endif
|
endif
|
||||||
EXTLIBS += -lz
|
EXTLIBS += -lz
|
||||||
|
|
||||||
|
@ -528,7 +529,7 @@ ifndef NO_OPENSSL
|
||||||
OPENSSL_LIBSSL = -lssl
|
OPENSSL_LIBSSL = -lssl
|
||||||
ifdef OPENSSLDIR
|
ifdef OPENSSLDIR
|
||||||
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
|
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
|
||||||
OPENSSL_LINK = -L$(OPENSSLDIR)/lib $(CC_LD_DYNPATH)$(OPENSSLDIR)/lib
|
OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
|
||||||
else
|
else
|
||||||
OPENSSL_LINK =
|
OPENSSL_LINK =
|
||||||
endif
|
endif
|
||||||
|
@ -545,7 +546,7 @@ endif
|
||||||
ifdef NEEDS_LIBICONV
|
ifdef NEEDS_LIBICONV
|
||||||
ifdef ICONVDIR
|
ifdef ICONVDIR
|
||||||
BASIC_CFLAGS += -I$(ICONVDIR)/include
|
BASIC_CFLAGS += -I$(ICONVDIR)/include
|
||||||
ICONV_LINK = -L$(ICONVDIR)/lib $(CC_LD_DYNPATH)$(ICONVDIR)/lib
|
ICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)
|
||||||
else
|
else
|
||||||
ICONV_LINK =
|
ICONV_LINK =
|
||||||
endif
|
endif
|
||||||
|
|
11
configure.ac
11
configure.ac
|
@ -69,6 +69,17 @@ fi \
|
||||||
## Site configuration related to programs (before tests)
|
## Site configuration related to programs (before tests)
|
||||||
## --with-PACKAGE[=ARG] and --without-PACKAGE
|
## --with-PACKAGE[=ARG] and --without-PACKAGE
|
||||||
#
|
#
|
||||||
|
# Set lib to alternative name of lib directory (e.g. lib64)
|
||||||
|
AC_ARG_WITH([lib],
|
||||||
|
[AS_HELP_STRING([--with-lib=ARG],
|
||||||
|
[ARG specifies alternative name for lib directory])],
|
||||||
|
[if test "$withval" = "no" -o "$withval" = "yes"; then \
|
||||||
|
AC_MSG_WARN([You should provide name for --with-lib=ARG]); \
|
||||||
|
else \
|
||||||
|
GIT_CONF_APPEND_LINE(lib=$withval); \
|
||||||
|
fi; \
|
||||||
|
],[])
|
||||||
|
#
|
||||||
# Define SHELL_PATH to provide path to shell.
|
# Define SHELL_PATH to provide path to shell.
|
||||||
GIT_ARG_SET_PATH(shell)
|
GIT_ARG_SET_PATH(shell)
|
||||||
#
|
#
|
||||||
|
|
Загрузка…
Ссылка в новой задаче