[PATCH v4 1/1] Makefile: make curl-config path configurable

2015-10-21 Thread Remi Pommarel
/configure. Configure will set CURL_CONFIG variable in config.mak.autogen to whatever value has been passed to ac_cv_prog_CURL_CONFIG. Signed-off-by: Remi Pommarel Reviewed-by: Jonathan Nieder --- Changes to v3: - Add Jonathan Nieder's modifications Makefile | 8 ++-- configu

[PATCH v4 1/1] Makefile: link libcurl before zlib

2015-10-21 Thread Remi Pommarel
For static linking especially library order while linking is important. For example, libcurl wants symbols from zlib when building http-push, http-fetch and remote-curl. So for these programs libcurl has to be linked before zlib. Signed-off-by: Remi Pommarel --- Changes to v3

Re: [PATCH v3 1/1] Makefile: link libcurl before libssl

2015-10-21 Thread Remi Pommarel
On Tue, Oct 20, 2015 at 01:20:18PM -0700, Junio C Hamano wrote: > Remi Pommarel writes: > > > On Mon, Oct 05, 2015 at 12:41:34PM -0700, Jonathan Nieder wrote: > > ... > >> To protect against a value that might leak in from the environment, this > >> should

Re: [PATCH v3 1/1] Makefile: make curl-config path configurable

2015-10-05 Thread Remi Pommarel
On Mon, Oct 05, 2015 at 02:11:07PM -0700, Jonathan Nieder wrote: > Remi Pommarel wrote: > > > Do I need to resend a v4 patch with these modifications ? I am not sure > > about the correct workflow here. > > If you like the changes, you can ask Junio to squash them in. >

Re: [PATCH v3 1/1] Makefile: make curl-config path configurable

2015-10-05 Thread Remi Pommarel
On Mon, Oct 05, 2015 at 01:49:09PM -0700, Jonathan Nieder wrote: > Remi Pommarel wrote: > > > Signed-off-by: Remi Pommarel > > For what it's worth, with or without the tweaks below, > > Reviewed-by: Jonathan Nieder Thanks. > > [...] > > --- a/Makefi

[PATCH v3 1/1] Makefile: make curl-config path configurable

2015-10-05 Thread Remi Pommarel
/configure. Configure will set CURL_CONFIG variable in config.mak.autogen to whatever value has been passed to ac_cv_prog_CURL_CONFIG. Signed-off-by: Remi Pommarel --- Makefile | 9 +++-- configure.ac | 13 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a

Re: [PATCH v2 1/1] Makefile: make curl-config path configurable

2015-10-05 Thread Remi Pommarel
On Mon, Oct 05, 2015 at 12:31:27PM -0700, Jonathan Nieder wrote: > Remi Pommarel wrote: > > > There are situations, ie during cross compilation, where curl-config program > > is not present in the PATH. > > s/ie/e.g.,/ Oups sorry about that. > > [...] &

Re: [PATCH v3 1/1] Makefile: link libcurl before libssl

2015-10-05 Thread Remi Pommarel
On Mon, Oct 05, 2015 at 12:41:34PM -0700, Jonathan Nieder wrote: > Remi Pommarel wrote: [...] > Based on this dependency, shouldn't CURL_LIBCURL always include -lssl when > statically linking? How does this relate to NEEDS_SSL_WITH_CURL? In fact libcurl will only need -lssl

[PATCH v3 1/1] Makefile: link libcurl before libssl

2015-10-05 Thread Remi Pommarel
For static linking especially library order while linking is important. For example, libcurl wants symbols for libssl when building http-push, http-fetch and remote-curl. So for these programs libcurl has to be linked before libssl. Signed-off-by: Remi Pommarel --- Makefile | 8 1 file

[PATCH v2 1/1] Makefile: make curl-config path configurable

2015-10-05 Thread Remi Pommarel
/configure. Configure will set CURL_CONFIG variable in config.mak.autogen to whatever value has been passed to ac_cv_prog_CURL_CONFIG. Signed-off-by: Remi Pommarel --- Makefile | 9 +++-- configure.ac | 13 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Makefile

[PATCH 1/1] configure: make curl-config path configurable

2015-09-24 Thread Remi Pommarel
variable to get the target's curl configuration program. Signed-off-by: Remi Pommarel --- Makefile | 5 +++-- configure.ac | 10 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ce0cfe2..81ac5bb 100644 --- a/Makefile +++ b/Mak

[PATCH 1/1] configure.ac: detect ssl need with libcurl

2015-09-24 Thread Remi Pommarel
openssl. configure.ac checks for Curl_ssl_init function in libcurl and if such function exists; it sets NEEDS_SSL_WITH_CURL that is used by the Makefile to include -lssl alongside with -lcurl. Signed-off-by: Remi Pommarel --- configure.ac | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH v2 1/1] Makefile: link libcurl before openssl and crypto

2015-09-24 Thread Remi Pommarel
For static linking especially library order while linking is important. For example libssl contains symbol from libcrypto so the former should be linked before the latter. The global link order should be libcurl then libssl then libcrypto then libintl and finally zlib. Signed-off-by: Remi

Re: [PATCH] Makefile: Change library order for static linking

2015-09-22 Thread Remi Pommarel
On Mon, Sep 21, 2015 at 10:09:52AM -0700, Junio C Hamano wrote: > I think I said this already, but I found these bits from your patch > > - $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) > + $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS) > > that first uses libcurl and then libs (wh

Re: [PATCH] Makefile: Change library order for static linking

2015-09-18 Thread Remi Pommarel
On Thu, Sep 17, 2015 at 03:08:25PM -0700, Junio C Hamano wrote: > That is, for most people, linking with -lcrypto was sufficient, but > some people needed to grab things from -lssl when they need to do > so, because things in -lcrypto referred to what was only in -lssl. Oh I see what you mean, I m

Re: [PATCH] Makefile: Change library order for static linking

2015-09-17 Thread Remi Pommarel
On Thu, Sep 17, 2015 at 12:51:18PM -0700, Junio C Hamano wrote: > IIRC historically the division between ssl and crypto was messy. > Especially, I am not sure if the change to NEEDS_SSL_WITH_CRYPTO > in this patch is correct for platforms that require that macro > defined. I think it is correct as

Re: [PATCH] Makefile: Change library order for static linking

2015-09-17 Thread Remi Pommarel
On Thu, Sep 17, 2015 at 03:25:00PM -0400, Eric Sunshine wrote: > On Thu, Sep 17, 2015 at 5:12 PM, Remi Pommarel wrote: > > For static linking especially library order while linking is important. For > > example libssl contains symbol from libcrypto so the farmer should be linked

[PATCH] Makefile: Change library order for static linking

2015-09-17 Thread Remi Pommarel
For static linking especially library order while linking is important. For example libssl contains symbol from libcrypto so the farmer should be linked before the latter. The global link order should be libcurl then libssl then libcrypto then libintl and finally zlib. Signed-off-by: Remi