Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:06:39

Remi Pommarel [off-list ref] 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.
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help