{"thread":{"id":"9336","subject":"[PATCH] make the name of the library directory a config option","startedAt":"2007-08-01T04:30:35Z","lastAt":"2007-08-01T05:36:39Z","messageCount":2,"participants":["Robert Schiele","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"49278","messageId":"20070801043035.GH29424@schiele.dyndns.org","threadId":"9336","inReplyTo":null,"subject":"[PATCH] make the name of the library directory a config option","fromName":"Robert Schiele","fromEmail":"rschiele@gmail.com","sentAt":"2007-08-01T04:30:35Z","receivedAt":"2007-08-01T04:30:35Z","isPatch":true,"sender":{"key":"rschiele@gmail.com","avatar":"https://gravatar.com/avatar/409473567eb2287d5f0157b51f5b703994b347f24f92172e3a0588741c27a492?d=mp&s=160"},"body":"Introduce new makefile variable lib to hold the name of the lib\ndirectory (\"lib\" by default).  Also introduce a switch for configure\nto specify this name with --with-lib=ARG.  This is useful for systems\nthat use a different name than \"lib\" (like \"lib64\" on some 64 bit\nLinux architectures).\n\nSigned-off-by: Robert Schiele <rschiele@gmail.com>\n---\nYou can also fetch this patch as e58a07b30a879228b9090a0c8ac6c690d77fcde8 from\ngit://schiele.dyndns.org/git\n\nIt requires that my zlib patch was applied before.\n\n Makefile     |   11 ++++++-----\n configure.ac |   11 +++++++++++\n 2 files changed, 17 insertions(+), 5 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex ca1247d..ff5fc5f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -151,6 +151,7 @@ sysconfdir = /etc\n else\n sysconfdir = $(prefix)/etc\n endif\n+lib = lib\n ETC_GITCONFIG = $(sysconfdir)/gitconfig\n # DESTDIR=\n \n@@ -500,9 +501,9 @@ endif\n \n ifndef NO_CURL\n \tifdef CURLDIR\n-\t\t# Try \"-Wl,-rpath=$(CURLDIR)/lib\" in such a case.\n+\t\t# Try \"-Wl,-rpath=$(CURLDIR)/$(lib)\" in such a case.\n \t\tBASIC_CFLAGS += -I$(CURLDIR)/include\n-\t\tCURL_LIBCURL = -L$(CURLDIR)/lib $(CC_LD_DYNPATH)$(CURLDIR)/lib -lcurl\n+\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl\n \telse\n \t\tCURL_LIBCURL = -lcurl\n \tendif\n@@ -520,7 +521,7 @@ endif\n \n ifdef ZLIB_PATH\n \tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n-\tEXTLIBS += -L$(ZLIB_PATH)/lib $(CC_LD_DYNPATH)$(ZLIB_PATH)/lib\n+\tEXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)\n endif\n EXTLIBS += -lz\n \n@@ -528,7 +529,7 @@ ifndef NO_OPENSSL\n \tOPENSSL_LIBSSL = -lssl\n \tifdef OPENSSLDIR\n \t\tBASIC_CFLAGS += -I$(OPENSSLDIR)/include\n-\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/lib $(CC_LD_DYNPATH)$(OPENSSLDIR)/lib\n+\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)\n \telse\n \t\tOPENSSL_LINK =\n \tendif\n@@ -545,7 +546,7 @@ endif\n ifdef NEEDS_LIBICONV\n \tifdef ICONVDIR\n \t\tBASIC_CFLAGS += -I$(ICONVDIR)/include\n-\t\tICONV_LINK = -L$(ICONVDIR)/lib $(CC_LD_DYNPATH)$(ICONVDIR)/lib\n+\t\tICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)\n \telse\n \t\tICONV_LINK =\n \tendif\ndiff --git a/configure.ac b/configure.ac\nindex b2f1965..84fd7f1 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -69,6 +69,17 @@ fi \\\n ## Site configuration related to programs (before tests)\n ## --with-PACKAGE[=ARG] and --without-PACKAGE\n #\n+# Set lib to alternative name of lib directory (e.g. lib64)\n+AC_ARG_WITH([lib],\n+ [AS_HELP_STRING([--with-lib=ARG],\n+                 [ARG specifies alternative name for lib directory])],\n+ [if test \"$withval\" = \"no\" -o \"$withval\" = \"yes\"; then \\\n+\tAC_MSG_WARN([You should provide name for --with-lib=ARG]); \\\n+else \\\n+\tGIT_CONF_APPEND_LINE(lib=$withval); \\\n+fi; \\\n+],[])\n+#\n # Define SHELL_PATH to provide path to shell.\n GIT_ARG_SET_PATH(shell)\n #\n-- \n1.5.2.3\n"},{"id":"49282","messageId":"7vsl73byu0.fsf@assigned-by-dhcp.cox.net","threadId":"9336","inReplyTo":"20070801043035.GH29424@schiele.dyndns.org","subject":"Re: [PATCH] make the name of the library directory a config option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-01T05:36:39Z","receivedAt":"2007-08-01T05:36:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The patch is obvious and trivial so I'll swallow, but as a\ngeneral rule I'd like to avoid changes to the build procedure\nthis late in the game.\n\nThanks for the patch, will apply.\n"}]}