{"thread":{"id":"40489","subject":"[PATCH v3 1/1] Makefile: make curl-config path configurable","startedAt":"2015-10-05T20:32:39Z","lastAt":"2015-10-05T21:19:49Z","messageCount":5,"participants":["Remi Pommarel","Jonathan Nieder"],"isPatch":true,"patchVersion":3,"patchTotal":1},"messages":[{"id":"271167","messageId":"1444077159-3268-1-git-send-email-repk@triplefau.lt","threadId":"40489","inReplyTo":null,"subject":"[PATCH v3 1/1] Makefile: make curl-config path configurable","fromName":"Remi Pommarel","fromEmail":"repk@triplefau.lt","sentAt":"2015-10-05T20:32:39Z","receivedAt":"2015-10-05T20:32:39Z","isPatch":true,"sender":{"key":"repk@triplefau.lt","avatar":"https://avatars.githubusercontent.com/u/6833759?v=4"},"body":"There are situations, e.g. during cross compilation, where curl-config\nprogram is not present in the PATH.\n\nMake the makefile use a configurable curl-config program passed through\nCURL_CONFIG variable which can be set through config.mak.\n\nAlso make this variable tunable through use of autoconf/configure. Configure\nwill set CURL_CONFIG variable in config.mak.autogen to whatever value has been\npassed to ac_cv_prog_CURL_CONFIG.\n\nSigned-off-by: Remi Pommarel <repk@triplefau.lt>\n---\n Makefile     |  9 +++++++--\n configure.ac | 13 +++++++++++++\n 2 files changed, 20 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex ce0cfe2..3cba678 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -39,6 +39,10 @@ all::\n # Define CURLDIR=/foo/bar if your curl header and library files are in\n # /foo/bar/include and /foo/bar/lib directories.\n #\n+# Define CURL_CONFIG to curl's configuration program that gives informations\n+# about the library (ie curl's version, cflags, ...) . If not set it defaults\n+# to 'curl-config'.\n+#\n # Define NO_EXPAT if you do not have expat installed.  git-http-push is\n # not built, and you cannot push using http:// and https:// transports (dumb).\n #\n@@ -425,6 +429,7 @@ TCL_PATH = tclsh\n TCLTK_PATH = wish\n XGETTEXT = xgettext\n MSGFMT = msgfmt\n+CURL_CONFIG = curl-config\n PTHREAD_LIBS = -lpthread\n PTHREAD_CFLAGS =\n GCOV = gcov\n@@ -1059,13 +1064,13 @@ else\n \tREMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)\n \tPROGRAM_OBJS += http-fetch.o\n \tPROGRAMS += $(REMOTE_CURL_NAMES)\n-\tcurl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)\n+\tcurl_check := $(shell (echo 070908; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)\n \tifeq \"$(curl_check)\" \"070908\"\n \t\tifndef NO_EXPAT\n \t\t\tPROGRAM_OBJS += http-push.o\n \t\tendif\n \tendif\n-\tcurl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)\n+\tcurl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)\n \tifeq \"$(curl_check)\" \"072200\"\n \t\tUSE_CURL_FOR_IMAP_SEND = YesPlease\n \tendif\ndiff --git a/configure.ac b/configure.ac\nindex 14012fa..01b07ad 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -525,6 +525,19 @@ GIT_UNSTASH_FLAGS($CURLDIR)\n \n GIT_CONF_SUBST([NO_CURL])\n \n+if test -z \"$NO_CURL\"; then\n+\n+AC_CHECK_PROG([CURL_CONFIG], [curl-config],\n+[curl-config],\n+[no])\n+\n+if test $CURL_CONFIG != no; then\n+    GIT_CONF_SUBST([CURL_CONFIG])\n+fi\n+\n+fi\n+\n+\n #\n # Define NO_EXPAT if you do not have expat installed.  git-http-push is\n # not built, and you cannot push using http:// and https:// transports.\n-- \n2.0.1\n"},{"id":"271176","messageId":"20151005204909.GE11993@google.com","threadId":"40489","inReplyTo":"1444077159-3268-1-git-send-email-repk@triplefau.lt","subject":"Re: [PATCH v3 1/1] Makefile: make curl-config path configurable","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2015-10-05T20:49:09Z","receivedAt":"2015-10-05T20:49:09Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Remi Pommarel wrote:\n\n> Signed-off-by: Remi Pommarel <repk@triplefau.lt>\n\nFor what it's worth, with or without the tweaks below,\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\n[...]\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -39,6 +39,10 @@ all::\n>  # Define CURLDIR=/foo/bar if your curl header and library files are in\n>  # /foo/bar/include and /foo/bar/lib directories.\n>  #\n> +# Define CURL_CONFIG to curl's configuration program that gives informations\n> +# about the library (ie curl's version, cflags, ...) . If not set it defaults\n> +# to 'curl-config'.\n\nExtra spaces, some wording tweaks:\n\ns/gives informations about the library/prints information about the library/\ns/(ie curl's version, cflags, .../) /(e.g., its version number)/\ns/If not set it defaults to/The default is/\n\nThanks.\n\ndiff --git i/Makefile w/Makefile\nindex 5a94434..4a870a4 100644\n--- i/Makefile\n+++ w/Makefile\n@@ -39,9 +39,8 @@ all::\n # Define CURLDIR=/foo/bar if your curl header and library files are in\n # /foo/bar/include and /foo/bar/lib directories.\n #\n-# Define CURL_CONFIG to curl's configuration program that gives informations\n-# about the library (ie curl's version, cflags, ...) . If not set it defaults\n-# to 'curl-config'.\n+# Define CURL_CONFIG to curl's configuration program that prints information\n+# about the library (e.g., its version number).  The default is 'curl-config'.\n #\n # Define NO_EXPAT if you do not have expat installed.  git-http-push is\n # not built, and you cannot push using http:// and https:// transports (dumb).\n"},{"id":"271180","messageId":"20151005210545.GC386@cruxbox","threadId":"40489","inReplyTo":"20151005204909.GE11993@google.com","subject":"Re: [PATCH v3 1/1] Makefile: make curl-config path configurable","fromName":"Remi Pommarel","fromEmail":"repk@triplefau.lt","sentAt":"2015-10-05T21:05:45Z","receivedAt":"2015-10-05T21:05:45Z","isPatch":true,"sender":{"key":"repk@triplefau.lt","avatar":"https://avatars.githubusercontent.com/u/6833759?v=4"},"body":"On Mon, Oct 05, 2015 at 01:49:09PM -0700, Jonathan Nieder wrote:\n> Remi Pommarel wrote:\n> \n> > Signed-off-by: Remi Pommarel <repk@triplefau.lt>\n> \n> For what it's worth, with or without the tweaks below,\n> \n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n\n> \n> [...]\n> > --- a/Makefile\n> > +++ b/Makefile\n> > @@ -39,6 +39,10 @@ all::\n> >  # Define CURLDIR=/foo/bar if your curl header and library files are in\n> >  # /foo/bar/include and /foo/bar/lib directories.\n> >  #\n> > +# Define CURL_CONFIG to curl's configuration program that gives informations\n> > +# about the library (ie curl's version, cflags, ...) . If not set it defaults\n> > +# to 'curl-config'.\n> \n> Extra spaces, some wording tweaks:\n> \n> s/gives informations about the library/prints information about the library/\n> s/(ie curl's version, cflags, .../) /(e.g., its version number)/\n> s/If not set it defaults to/The default is/\n> \n\nDo I need to resend a v4 patch with these modifications ? I am not sure\nabout the correct workflow here.\n\n-- \nRémi\n"},{"id":"271181","messageId":"20151005211107.GF11993@google.com","threadId":"40489","inReplyTo":"20151005210545.GC386@cruxbox","subject":"Re: [PATCH v3 1/1] Makefile: make curl-config path configurable","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2015-10-05T21:11:07Z","receivedAt":"2015-10-05T21:11:07Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Remi Pommarel wrote:\n\n> Do I need to resend a v4 patch with these modifications ? I am not sure\n> about the correct workflow here.\n\nIf you like the changes, you can ask Junio to squash them in.\n\nIf you don't like them, that's also fine and you can just say so.\n"},{"id":"271182","messageId":"20151005211949.GD386@cruxbox","threadId":"40489","inReplyTo":"20151005211107.GF11993@google.com","subject":"Re: [PATCH v3 1/1] Makefile: make curl-config path configurable","fromName":"Remi Pommarel","fromEmail":"repk@triplefau.lt","sentAt":"2015-10-05T21:19:49Z","receivedAt":"2015-10-05T21:19:49Z","isPatch":true,"sender":{"key":"repk@triplefau.lt","avatar":"https://avatars.githubusercontent.com/u/6833759?v=4"},"body":"On Mon, Oct 05, 2015 at 02:11:07PM -0700, Jonathan Nieder wrote:\n> Remi Pommarel wrote:\n> \n> > Do I need to resend a v4 patch with these modifications ? I am not sure\n> > about the correct workflow here.\n> \n> If you like the changes, you can ask Junio to squash them in.\n> \n> If you don't like them, that's also fine and you can just say so.\n\nThese modifications are very fine with me and can be squash in.\n\nThanks a lot.\n"}]}