From f89158760d5f02ba59f644799abd921e6be22f13 Mon Sep 17 00:00:00 2001 From: Remi Pommarel Date: Wed, 21 Oct 2015 19:10:46 +0200 Subject: Makefile: make curl-config path configurable There are situations, e.g. during cross compilation, where curl-config program is not present in the PATH. Make the makefile use a configurable curl-config program passed through CURL_CONFIG variable which can be set through config.mak. Also make this variable tunable through use of autoconf/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 Signed-off-by: Junio C Hamano --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 14012fad72..01b07ad990 100644 --- a/configure.ac +++ b/configure.ac @@ -525,6 +525,19 @@ GIT_UNSTASH_FLAGS($CURLDIR) GIT_CONF_SUBST([NO_CURL]) +if test -z "$NO_CURL"; then + +AC_CHECK_PROG([CURL_CONFIG], [curl-config], +[curl-config], +[no]) + +if test $CURL_CONFIG != no; then + GIT_CONF_SUBST([CURL_CONFIG]) +fi + +fi + + # # Define NO_EXPAT if you do not have expat installed. git-http-push is # not built, and you cannot push using http:// and https:// transports. -- cgit 1.2.3-korg From 7e91e8d73a757801c0604a03fd2f0fa8003e4ac0 Mon Sep 17 00:00:00 2001 From: Remi Pommarel Date: Thu, 24 Sep 2015 21:14:00 +0200 Subject: configure.ac: detect ssl need with libcurl When libcurl has been statically compiled with openssl support they both need to be linked in everytime libcurl is used. During configuration this can be detected by looking for Curl_ssl_init function symbol in libcurl, which will only be present if libcurl has been compiled statically built with 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 Signed-off-by: Junio C Hamano --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 01b07ad990..fd22d41b2f 100644 --- a/configure.ac +++ b/configure.ac @@ -521,6 +521,16 @@ AC_CHECK_LIB([curl], [curl_global_init], [NO_CURL=], [NO_CURL=YesPlease]) +if test -z "${NO_CURL}" && test -z "${NO_OPENSSL}"; then + +AC_CHECK_LIB([curl], [Curl_ssl_init], +[NEEDS_SSL_WITH_CURL=YesPlease], +[NEEDS_SSL_WITH_CURL=]) + +GIT_CONF_SUBST([NEEDS_SSL_WITH_CURL]) + +fi + GIT_UNSTASH_FLAGS($CURLDIR) GIT_CONF_SUBST([NO_CURL]) -- cgit 1.2.3-korg