@matheusbsbs / matheus-bagliano / commits / 10861beaa8
Fork 0

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>

Robert Schiele committed Aug 1, 2007 at 06:30 UTC 10861beaa89a4cec61e04dd4954452da24b7a757
2 files changed +17 -5
Makefile
+6 -5
@@ -151,6 +151,7 @@ sysconfdir = /etc
151 else
152 sysconfdir = $(prefix)/etc
153 endif
154 +lib = lib
155 ETC_GITCONFIG = $(sysconfdir)/gitconfig
156 # DESTDIR=
157
@@ -500,9 +501,9 @@ endif
501
502 ifndef NO_CURL
503 ifdef CURLDIR
503 - # Try "-Wl,-rpath=$(CURLDIR)/lib" in such a case.
504 + # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
505 BASIC_CFLAGS += -I$(CURLDIR)/include
505 - CURL_LIBCURL = -L$(CURLDIR)/lib $(CC_LD_DYNPATH)$(CURLDIR)/lib -lcurl
506 + CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl
507 else
508 CURL_LIBCURL = -lcurl
509 endif
@@ -520,7 +521,7 @@ endif
521
522 ifdef ZLIB_PATH
523 BASIC_CFLAGS += -I$(ZLIB_PATH)/include
523 - EXTLIBS += -L$(ZLIB_PATH)/lib $(CC_LD_DYNPATH)$(ZLIB_PATH)/lib
524 + EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)
525 endif
526 EXTLIBS += -lz
527
@@ -528,7 +529,7 @@ ifndef NO_OPENSSL
529 OPENSSL_LIBSSL = -lssl
530 ifdef OPENSSLDIR
531 BASIC_CFLAGS += -I$(OPENSSLDIR)/include
531 - OPENSSL_LINK = -L$(OPENSSLDIR)/lib $(CC_LD_DYNPATH)$(OPENSSLDIR)/lib
532 + OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
533 else
534 OPENSSL_LINK =
535 endif
@@ -545,7 +546,7 @@ endif
546 ifdef NEEDS_LIBICONV
547 ifdef ICONVDIR
548 BASIC_CFLAGS += -I$(ICONVDIR)/include
548 - ICONV_LINK = -L$(ICONVDIR)/lib $(CC_LD_DYNPATH)$(ICONVDIR)/lib
549 + ICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)
550 else
551 ICONV_LINK =
552 endif
configure.ac
+11
@@ -69,6 +69,17 @@ fi \
69 ## Site configuration related to programs (before tests)
70 ## --with-PACKAGE[=ARG] and --without-PACKAGE
71 #
72 +# Set lib to alternative name of lib directory (e.g. lib64)
73 +AC_ARG_WITH([lib],
74 + [AS_HELP_STRING([--with-lib=ARG],
75 + [ARG specifies alternative name for lib directory])],
76 + [if test "$withval" = "no" -o "$withval" = "yes"; then \
77 + AC_MSG_WARN([You should provide name for --with-lib=ARG]); \
78 +else \
79 + GIT_CONF_APPEND_LINE(lib=$withval); \
80 +fi; \
81 +],[])
82 +#
83 # Define SHELL_PATH to provide path to shell.
84 GIT_ARG_SET_PATH(shell)
85 #