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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 22, 2015, 21:30 UTC
Message-ID
<xmqqlhby16sh.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20150922203759.GB9793@cruxbox>
Remi Pommarel <repk@triplefau.lt> writes:
> I have one last question thought. Wouldn't it be nice if we had
> configure to autodetect the need for -lssl with libcurl?
Sure.  I do not think anybody tried, but it would be nice.
Show 11 quoted lines
> We could make
> configure to check for Curl_ssl_init function symbol in libcurl,
> which is only present if libcurl has been compiled with openssl support,
> by adding something like that in configure.ac:
>
> AC_CHECK_LIB([curl], [Curl_ssl_init],
> 	[NEEDS_SSL_WITH_CURL=YesPlease],
> 	[NEEDS_SSL_WITH_CURL=])
>
> The thing that I'm afraid of is that checking a function that is not part
> of official libcurl API could be not very reliable, don't you think ?
That is true.

To be bluntly honest, use of autoconf (and configure generated by it) in this project is optional, so I would not worry too much if you misidentify a version of cURL that does not need -lssl as needing one (or vice versa). As long as other parts of the resulting ./configure keeps working (read: emitting a syntactically broken shell script is not an OK offence) and if there is a way to work around the result of misidentification made by ./configure (read: config.mak can cure all gotchas made by config.mak.autogen), it would be fine to use something like the above snippet you gave us as the starting point and it will help some positive number of people. We have to start from somewhere if we want to get there.

People who find versions of libcURL that gets misidentified will send in fixes if it matters to them.

Thanks.
Previous: Remi Pommarel
Message 10 of 10 in “Makefile: Change library order for static linking”
  1. Makefile: Change library order for static linkingRemi Pommarel, Sep 17, 2015
  2. Eric SunshineSep 17, 2015
  3. Remi PommarelSep 17, 2015
  4. Junio C HamanoSep 17, 2015
  5. Remi PommarelSep 17, 2015
  6. Junio C HamanoSep 17, 2015
  7. Remi PommarelSep 18, 2015
  8. Junio C HamanoSep 21, 2015
  9. Remi PommarelSep 22, 2015
  10. Junio C HamanoSep 22, 2015

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.