git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: /bin/sh portability question

From
Junio C Hamano <junkio@cox.net>
Date
Sep 23, 2005, 09:07 UTC
Message-ID
<7vmzm4duf8.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050923075058.GA25473@bohr.gbar.dtu.dk>
"Peter Eriksen" <s022018@student.dtu.dk> writes:
> It seems things are progressing nicely with regard to
> Solaris portability.

Good to have a Solaris user. I have one patch that I've been keeping in the proposed updates branch, waiting for a comfirmation or 'not-good-enough-for-me' answer from people that have cURL installed in nonstandard places.

------------
Subject: [PATCH] CURLDIR in Makefile
From: Patrick Mauritz <oxygene@studentenbude.ath.cx>
Date: 1127139079 +0200

Support systems that do not install curl headers and libraries in /usr/{include,lib}.

Signed-off-by: Patrick Mauritz <oxygene@studentenbude.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 Makefile |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
a5ebfc164f8380eb4c1c2ff92082687c3cb0b39d
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,9 @@
 # Define NO_CURL if you do not have curl installed.  git-http-pull is not
 # built, and you cannot use http:// and https:// transports.
 #
+# Define CURLDIR=/foo/bar if your curl header and library files are in
+# /foo/bar/include and /foo/bar/lib directories.
+#
 # Define NO_STRCASESTR if you don't have strcasestr.
 #
 # Define PPC_SHA1 environment variable when running make to make use of
@@ -131,6 +134,13 @@ ifdef WITH_SEND_EMAIL
 endif
 
 ifndef NO_CURL
+	ifdef CURLDIR
+		# This is still problematic -- gcc does not want -R.
+		CFLAGS += -I$(CURLDIR)/include
+		CURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl
+	else
+		CURL_LIBCURL = -lcurl
+	endif
 	PROGRAMS += git-http-fetch
 endif
 
@@ -285,7 +295,7 @@ git-ssh-upload: rsh.o
 git-ssh-pull: rsh.o fetch.o
 git-ssh-push: rsh.o
 
-git-http-fetch: LIBS += -lcurl
+git-http-fetch: LIBS += $(CURL_LIBCURL)
 git-rev-list: LIBS += $(OPENSSL_LIBSSL)
 
 init-db.o: init-db.c
Previous: SeanNext: Peter Eriksen
Message 6 of 16 in “/bin/sh portability question”
  1. Peter EriksenSep 23, 2005
  2. Junio C HamanoSep 23, 2005
  3. SeanSep 23, 2005
  4. Junio C HamanoSep 23, 2005
  5. SeanSep 23, 2005
  6. Junio C HamanoSep 23, 2005
  7. Peter EriksenSep 23, 2005
  8. Junio C HamanoSep 24, 2005
  9. Patrick MauritzSep 24, 2005
  10. H. Peter AnvinSep 23, 2005
  11. Morten WelinderSep 23, 2005
  12. Joel BeckerSep 23, 2005
  13. H. Peter AnvinSep 23, 2005
  14. Junio C HamanoSep 24, 2005
  15. Nico -telmich- SchotteliusSep 25, 2005
  16. SeanSep 25, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.