summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJames Knight <james.d.knight@live.com>2018-11-03 05:12:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-05 01:19:25 (GMT)
commit23c4bbe28e61974577164db09cbd1d1c7e568ca4 (patch)
tree9669d56595c17501d83735e1b9043c88b12e7053 /configure.ac
parentd582ea202b626dcc6c3b01e1e11a296d9badd730 (diff)
downloadgit-23c4bbe28e61974577164db09cbd1d1c7e568ca4.zip
git-23c4bbe28e61974577164db09cbd1d1c7e568ca4.tar.gz
git-23c4bbe28e61974577164db09cbd1d1c7e568ca4.tar.bz2
build: link with curl-defined linker flags
Adjusting the build process to rely more on curl-config to populate linker flags instead of manually populating flags based off detected features. Originally, a configure-invoked build would check for SSL-support in the target curl library. If enabled, NEEDS_SSL_WITH_CURL would be set and used in the Makefile to append additional libraries to link against. As for systems building solely with make, the defines NEEDS_IDN_WITH_CURL and NEEDS_SSL_WITH_CURL could be set to indirectly enable respective linker flags. Since both configure.ac and Makefile already rely on curl-config utility to provide curl-related build information, adjusting the respective assets to populate required linker flags using the utility (unless explicitly configured). Signed-off-by: James Knight <james.d.knight@live.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 7 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index e11b797..44e8c03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -600,17 +600,14 @@ AC_CHECK_PROG([CURL_CONFIG], [curl-config],
if test $CURL_CONFIG != no; then
GIT_CONF_SUBST([CURL_CONFIG])
- if test -z "${NO_OPENSSL}"; then
- AC_MSG_CHECKING([if Curl supports SSL])
- if test $(curl-config --features|grep SSL) = SSL; then
- NEEDS_SSL_WITH_CURL=YesPlease
- AC_MSG_RESULT([yes])
- else
- NEEDS_SSL_WITH_CURL=
- AC_MSG_RESULT([no])
- fi
- GIT_CONF_SUBST([NEEDS_SSL_WITH_CURL])
+
+ if test -z "$CURL_CONFIG_OPTS"; then
+ CURL_CONFIG_OPTS="--libs"
fi
+
+ CURL_LDFLAGS=$($CURL_CONFIG $CURL_CONFIG_OPTS)
+ AC_MSG_NOTICE([Setting CURL_LDFLAGS to '$CURL_LDFLAGS'])
+ GIT_CONF_SUBST([CURL_LDFLAGS], [$CURL_LDFLAGS])
fi
fi