From: Junio C Hamano Date: Fri, 28 Oct 2016 16:01:13 +0000 (-0700) Subject: Merge branch 'dp/autoconf-curl-ssl' into maint X-Git-Tag: v2.10.2~20 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c00837c48a577390073d01203becc8ec0b1e700d?ds=inline;hp=-c Merge branch 'dp/autoconf-curl-ssl' into maint The ./configure script generated from configure.ac was taught how to detect support of SSL by libcurl better. * dp/autoconf-curl-ssl: ./configure.ac: detect SSL in libcurl using curl-config --- c00837c48a577390073d01203becc8ec0b1e700d diff --combined configure.ac index 7f39fd029b,5e9ba59d59..0b15f04b10 --- a/configure.ac +++ b/configure.ac @@@ -528,16 -528,6 +528,6 @@@ 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]) @@@ -550,6 -540,17 +540,17 @@@ AC_CHECK_PROG([CURL_CONFIG], [curl-conf 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]) + fi fi fi @@@ -835,10 -836,9 +836,10 @@@ AC_CHECK_TYPE([struct addrinfo], ]) GIT_CONF_SUBST([NO_IPV6]) # -# Define NO_REGEX if you have no or inferior regex support in your C library. -AC_CACHE_CHECK([whether the platform regex can handle null bytes], - [ac_cv_c_excellent_regex], [ +# Define NO_REGEX if your C library lacks regex support with REG_STARTEND +# feature. +AC_CACHE_CHECK([whether the platform regex supports REG_STARTEND], + [ac_cv_c_regex_with_reg_startend], [ AC_EGREP_CPP(yippeeyeswehaveit, AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT #include @@@ -847,10 -847,10 +848,10 @@@ yippeeyeswehaveit #endif ]), - [ac_cv_c_excellent_regex=yes], - [ac_cv_c_excellent_regex=no]) + [ac_cv_c_regex_with_reg_startend=yes], + [ac_cv_c_regex_with_reg_startend=no]) ]) -if test $ac_cv_c_excellent_regex = yes; then +if test $ac_cv_c_regex_with_reg_startend = yes; then NO_REGEX= else NO_REGEX=YesPlease @@@ -1109,19 -1109,14 +1110,19 @@@ GIT_CONF_SUBST([HAVE_BSD_SYSCTL] AC_DEFUN([PTHREADTEST_SRC], [ AC_LANG_PROGRAM([[ #include +static void *noop(void *ignore) { return ignore; } ]], [[ pthread_mutex_t test_mutex; pthread_key_t test_key; + pthread_t th; int retcode = 0; + void *ret = (void *)0; retcode |= pthread_key_create(&test_key, (void *)0); retcode |= pthread_mutex_init(&test_mutex,(void *)0); retcode |= pthread_mutex_lock(&test_mutex); retcode |= pthread_mutex_unlock(&test_mutex); + retcode |= pthread_create(&th, ret, noop, ret); + retcode |= pthread_join(th, &ret); return retcode; ]])])