autotools: tidy-up if expressions

- drop x-hacks for curl internal variables and certain autotools ones
  that do not hold custom values.
- make x-hacks consistently use `"x$var" = "xval"` style.
- add a few x-hacks for input/external variables that may hold custom
  values.
- prefer `-z` and `-n` to test empty/non-empty.
  This also makes some x-hacks unnecessary.
- optimized negated test `-z` and `-n` options.
- prefer `&&` and `||` over `-a` and `-o`.
  For better POSIX compatibility:
  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
- quote variables passed to `test`, where missing.
- quote string literals in comparisons.
- fix some indentation, whitespace.

Note that a few `case` statements also use the x-hack, which looks
unnecessary. This patch does not change them.

Verified by comparing feature detection results with a reference CI run
from before this patch (PR #19922).

Refs:
https://www.shellcheck.net/wiki/SC2268
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
https://www.vidarholen.net/contents/blog/?p=1035
https://mywiki.wooledge.org/BashPitfalls#A.5B_.24foo_.3D_.22bar.22_.5D

Closes #18189
This commit is contained in:
Viktor Szakats 2025-08-05 16:07:21 +02:00
parent cc285649dc
commit 8db0e286b3
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
19 changed files with 478 additions and 477 deletions

View File

@ -190,7 +190,7 @@ AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [
curl_cv_native_windows="no" curl_cv_native_windows="no"
]) ])
]) ])
AM_CONDITIONAL(DOING_NATIVE_WINDOWS, test "x$curl_cv_native_windows" = xyes) AM_CONDITIONAL(DOING_NATIVE_WINDOWS, test "$curl_cv_native_windows" = "yes")
]) ])
@ -910,7 +910,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
curl_func_clock_gettime="yes" curl_func_clock_gettime="yes"
;; ;;
*) *)
if test "x$dontwant_rt" = "xyes" ; then if test "$dontwant_rt" = "yes"; then
AC_MSG_WARN([needs -lrt but asked not to use it, HAVE_CLOCK_GETTIME_MONOTONIC will not be defined]) AC_MSG_WARN([needs -lrt but asked not to use it, HAVE_CLOCK_GETTIME_MONOTONIC will not be defined])
curl_func_clock_gettime="no" curl_func_clock_gettime="no"
else else
@ -926,7 +926,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
esac esac
# #
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$curl_func_clock_gettime" = "yes"; then test "$curl_func_clock_gettime" = "yes"; then
AC_MSG_CHECKING([if monotonic clock_gettime works]) AC_MSG_CHECKING([if monotonic clock_gettime works])
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
@ -1082,7 +1082,7 @@ dnl macro. It must also run AFTER all lib-checking macros are complete.
AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [ AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [
dnl this test is of course not sensible if we are cross-compiling! dnl this test is of course not sensible if we are cross-compiling!
if test "x$cross_compiling" != xyes; then if test "$cross_compiling" != "yes"; then
dnl just run a program to verify that the libs checked for previous to this dnl just run a program to verify that the libs checked for previous to this
dnl point also is available runtime! dnl point also is available runtime!
@ -1149,22 +1149,22 @@ AS_HELP_STRING([--without-ca-path], [Do not use a default CA path]),
capath_warning=" (warning: certs not found)" capath_warning=" (warning: certs not found)"
check_capath="" check_capath=""
if test "x$APPLE_SECTRUST_ENABLED" = "x1"; then if test "$APPLE_SECTRUST_ENABLED" = "1"; then
ca_native="Apple SecTrust" ca_native="Apple SecTrust"
else else
ca_native="no" ca_native="no"
fi fi
if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \ if test "x$want_ca" != "xno" && test "x$want_ca" != "xunset" &&
"x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then test "x$want_capath" != "xno" && test "x$want_capath" != "xunset"; then
dnl both given dnl both given
ca="$want_ca" ca="$want_ca"
capath="$want_capath" capath="$want_capath"
elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then elif test "x$want_ca" != "xno" && test "x$want_ca" != "xunset"; then
dnl --with-ca-bundle given dnl --with-ca-bundle given
ca="$want_ca" ca="$want_ca"
capath="no" capath="no"
elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then elif test "x$want_capath" != "xno" && test "x$want_capath" != "xunset"; then
dnl --with-ca-path given dnl --with-ca-path given
capath="$want_capath" capath="$want_capath"
ca="no" ca="no"
@ -1177,15 +1177,15 @@ AS_HELP_STRING([--without-ca-path], [Do not use a default CA path]),
dnl Both auto-detections can be skipped by --without-ca-* dnl Both auto-detections can be skipped by --without-ca-*
ca="no" ca="no"
capath="no" capath="no"
if test "x$cross_compiling" != "xyes" -a \ if test "$cross_compiling" != "yes" &&
"x$curl_cv_native_windows" != "xyes"; then test "$curl_cv_native_windows" != "yes"; then
dnl NOT cross-compiling and... dnl NOT cross-compiling and...
dnl neither of the --with-ca-* options are provided dnl neither of the --with-ca-* options are provided
if test "x$want_ca" = "xunset"; then if test "x$want_ca" = "xunset"; then
dnl the path we previously would have installed the curl CA bundle dnl the path we previously would have installed the curl CA bundle
dnl to, and thus we now check for an already existing cert in that dnl to, and thus we now check for an already existing cert in that
dnl place in case we find no other dnl place in case we find no other
if test "x$prefix" != xNONE; then if test "x$prefix" != "xNONE"; then
cac="${prefix}/share/curl/curl-ca-bundle.crt" cac="${prefix}/share/curl/curl-ca-bundle.crt"
else else
cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt" cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
@ -1221,7 +1221,7 @@ AS_HELP_STRING([--without-ca-path], [Do not use a default CA path]),
check_capath="$capath" check_capath="$capath"
fi fi
if test ! -z "$check_capath"; then if test -n "$check_capath"; then
for a in "$check_capath"; do for a in "$check_capath"; do
if test -d "$a" && ls "$a"/[[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]].0 >/dev/null 2>/dev/null; then if test -d "$a" && ls "$a"/[[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]].0 >/dev/null 2>/dev/null; then
if test "x$capath" = "xno"; then if test "x$capath" = "xno"; then
@ -1257,14 +1257,14 @@ AS_HELP_STRING([--without-ca-path], [Do not use a default CA path]),
AS_HELP_STRING([--with-ca-fallback], [Use OpenSSL's built-in CA store]) AS_HELP_STRING([--with-ca-fallback], [Use OpenSSL's built-in CA store])
AS_HELP_STRING([--without-ca-fallback], [Do not use OpenSSL's built-in CA store]), AS_HELP_STRING([--without-ca-fallback], [Do not use OpenSSL's built-in CA store]),
[ [
if test "x$with_ca_fallback" != "xyes" -a "x$with_ca_fallback" != "xno"; then if test "x$with_ca_fallback" != "xyes" && test "x$with_ca_fallback" != "xno"; then
AC_MSG_ERROR([--with-ca-fallback only allows yes or no as parameter]) AC_MSG_ERROR([--with-ca-fallback only allows yes or no as parameter])
fi fi
], ],
[ with_ca_fallback="no"]) [ with_ca_fallback="no"])
AC_MSG_RESULT([$with_ca_fallback]) AC_MSG_RESULT([$with_ca_fallback])
if test "x$with_ca_fallback" = "xyes"; then if test "x$with_ca_fallback" = "xyes"; then
if test "x$OPENSSL_ENABLED" != "x1"; then if test "$OPENSSL_ENABLED" != "1"; then
AC_MSG_ERROR([--with-ca-fallback only works with OpenSSL]) AC_MSG_ERROR([--with-ca-fallback only works with OpenSSL])
fi fi
AC_DEFINE_UNQUOTED(CURL_CA_FALLBACK, 1, [define "1" to use OpenSSL's built-in CA store]) AC_DEFINE_UNQUOTED(CURL_CA_FALLBACK, 1, [define "1" to use OpenSSL's built-in CA store])
@ -1293,7 +1293,7 @@ AS_HELP_STRING([--without-ca-embed], [Do not embed a default CA bundle in the cu
[ want_ca_embed="unset" ]) [ want_ca_embed="unset" ])
CURL_CA_EMBED='' CURL_CA_EMBED=''
if test "x$want_ca_embed" != "xno" -a "x$want_ca_embed" != "xunset" -a -f "$want_ca_embed"; then if test "x$want_ca_embed" != "xno" && test "x$want_ca_embed" != "xunset" && test -f "$want_ca_embed"; then
if test -n "$PERL"; then if test -n "$PERL"; then
CURL_CA_EMBED="$want_ca_embed" CURL_CA_EMBED="$want_ca_embed"
AC_SUBST(CURL_CA_EMBED) AC_SUBST(CURL_CA_EMBED)
@ -1315,7 +1315,7 @@ AC_DEFUN([CURL_CHECK_WIN32_CRYPTO], [
AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
AC_MSG_CHECKING([whether build target supports Win32 crypto API]) AC_MSG_CHECKING([whether build target supports Win32 crypto API])
curl_win32_crypto_api="no" curl_win32_crypto_api="no"
if test "$curl_cv_native_windows" = "yes" -a "$curl_cv_winuwp" != "yes"; then if test "$curl_cv_native_windows" = "yes" && test "$curl_cv_winuwp" != "yes"; then
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
#undef inline #undef inline
@ -1382,7 +1382,7 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
[$PATH:/usr/bin:/usr/local/bin]) [$PATH:/usr/bin:/usr/local/bin])
fi fi
if test "x$PKGCONFIG" != "xno"; then if test "$PKGCONFIG" != "no"; then
AC_MSG_CHECKING([for $1 options with pkg-config]) AC_MSG_CHECKING([for $1 options with pkg-config])
dnl ask pkg-config about $1 dnl ask pkg-config about $1
itexists=`CURL_EXPORT_PCDIR([$2]) dnl itexists=`CURL_EXPORT_PCDIR([$2]) dnl
@ -1423,7 +1423,7 @@ dnl Save build info for test runner to pick up and log
AC_DEFUN([CURL_PREPARE_BUILDINFO], [ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
curl_pflags="" curl_pflags=""
if test "$curl_cv_apple" = 'yes'; then if test "$curl_cv_apple" = "yes"; then
curl_pflags="${curl_pflags} APPLE" curl_pflags="${curl_pflags} APPLE"
fi fi
case $host in case $host in
@ -1443,20 +1443,20 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
fi fi
;; ;;
esac esac
if test "$curl_cv_native_windows" = 'yes'; then if test "$curl_cv_native_windows" = "yes"; then
curl_pflags="${curl_pflags} WIN32" curl_pflags="${curl_pflags} WIN32"
fi fi
if test "$curl_cv_winuwp" = 'yes'; then if test "$curl_cv_winuwp" = "yes"; then
curl_pflags="${curl_pflags} UWP" curl_pflags="${curl_pflags} UWP"
fi fi
if test "$curl_cv_cygwin" = 'yes'; then if test "$curl_cv_cygwin" = "yes"; then
curl_pflags="${curl_pflags} CYGWIN" curl_pflags="${curl_pflags} CYGWIN"
fi fi
case $host_os in case $host_os in
msdos*) curl_pflags="${curl_pflags} DOS";; msdos*) curl_pflags="${curl_pflags} DOS";;
amiga*) curl_pflags="${curl_pflags} AMIGA";; amiga*) curl_pflags="${curl_pflags} AMIGA";;
esac esac
if test "x$compiler_id" = 'xGNU_C'; then if test "$compiler_id" = "GNU_C"; then
curl_pflags="${curl_pflags} GCC" curl_pflags="${curl_pflags} GCC"
fi fi
if test "$compiler_id" = "APPLECLANG"; then if test "$compiler_id" = "APPLECLANG"; then
@ -1467,7 +1467,7 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
case $host_os in case $host_os in
mingw*) curl_pflags="${curl_pflags} MINGW";; mingw*) curl_pflags="${curl_pflags} MINGW";;
esac esac
if test "x$cross_compiling" = 'xyes'; then if test "$cross_compiling" = "yes"; then
curl_pflags="${curl_pflags} CROSS" curl_pflags="${curl_pflags} CROSS"
fi fi
squeeze curl_pflags squeeze curl_pflags
@ -1509,7 +1509,7 @@ TEST EINVAL TEST
AC_MSG_RESULT([$cpp]) AC_MSG_RESULT([$cpp])
dnl we need cpp -P so check if it works then dnl we need cpp -P so check if it works then
if test "x$cpp" = "xyes"; then if test "$cpp" = "yes"; then
AC_MSG_CHECKING([if cpp -P works]) AC_MSG_CHECKING([if cpp -P works])
OLDCPPFLAGS=$CPPFLAGS OLDCPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -P" CPPFLAGS="$CPPFLAGS -P"
@ -1519,7 +1519,7 @@ TEST EINVAL TEST
], [cpp_p=yes], [cpp_p=no]) ], [cpp_p=yes], [cpp_p=no])
AC_MSG_RESULT([$cpp_p]) AC_MSG_RESULT([$cpp_p])
if test "x$cpp_p" = "xno"; then if test "$cpp_p" = "no"; then
AC_MSG_WARN([failed to figure out cpp -P alternative]) AC_MSG_WARN([failed to figure out cpp -P alternative])
# without -P # without -P
CPPPFLAG="" CPPPFLAG=""

File diff suppressed because it is too large Load Diff

View File

@ -149,7 +149,7 @@ while test "$#" -gt 0; do
;; ;;
--libs) --libs)
if test "@libdir@" != '/usr/lib' -a "@libdir@" != '/usr/lib64'; then if test "@libdir@" != '/usr/lib' && test "@libdir@" != '/usr/lib64'; then
curllibdir="-L@libdir@ " curllibdir="-L@libdir@ "
else else
curllibdir='' curllibdir=''

View File

@ -86,7 +86,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
AS_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]), AS_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]),
[_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])]) [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
if test "$_libcurl_with" != "no"; then if test "x$_libcurl_with" != "xno"; then
AC_PROG_AWK AC_PROG_AWK
@ -102,7 +102,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH]) AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
fi fi
if test x$_libcurl_config != "x"; then if test -n "$_libcurl_config"; then
AC_CACHE_CHECK([for the version of libcurl], AC_CACHE_CHECK([for the version of libcurl],
[libcurl_cv_lib_curl_version], [libcurl_cv_lib_curl_version],
[libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`]) [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
@ -110,11 +110,11 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
_libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse` _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
_libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse` _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
if test $_libcurl_wanted -gt 0; then if test "$_libcurl_wanted" -gt 0; then
AC_CACHE_CHECK([for libcurl >= version $2], AC_CACHE_CHECK([for libcurl >= version $2],
[libcurl_cv_lib_version_ok], [libcurl_cv_lib_version_ok],
[ [
if test $_libcurl_version -ge $_libcurl_wanted; then if test "$_libcurl_version" -ge "$_libcurl_wanted"; then
libcurl_cv_lib_version_ok=yes libcurl_cv_lib_version_ok=yes
else else
libcurl_cv_lib_version_ok=no libcurl_cv_lib_version_ok=no
@ -122,11 +122,11 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
]) ])
fi fi
if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes; then if test "$_libcurl_wanted" -eq 0 || test "$libcurl_cv_lib_version_ok" = "yes"; then
if test x"$LIBCURL_CPPFLAGS" = "x"; then if test -z "$LIBCURL_CPPFLAGS"; then
LIBCURL_CPPFLAGS=`$_libcurl_config --cflags` LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
fi fi
if test x"$LIBCURL" = "x"; then if test -z "$LIBCURL"; then
LIBCURL=`$_libcurl_config --libs` LIBCURL=`$_libcurl_config --libs`
# This is so silly, but Apple actually has a bug in their # This is so silly, but Apple actually has a bug in their
@ -143,7 +143,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
_libcurl_features=`$_libcurl_config --feature` _libcurl_features=`$_libcurl_config --feature`
# Is it modern enough to have --protocols? (7.12.4) # Is it modern enough to have --protocols? (7.12.4)
if test $_libcurl_version -ge 461828; then if test "$_libcurl_version" -ge 461828; then
_libcurl_protocols=`$_libcurl_config --protocols` _libcurl_protocols=`$_libcurl_config --protocols`
fi fi
else else
@ -153,7 +153,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
unset _libcurl_wanted unset _libcurl_wanted
fi fi
if test $_libcurl_try_link = yes; then if test "$_libcurl_try_link" = "yes"; then
# we did not find curl-config, so let's see if the user-supplied # we did not find curl-config, so let's see if the user-supplied
# link line (or failing that, "-lcurl") is enough. # link line (or failing that, "-lcurl") is enough.
@ -187,7 +187,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
unset _libcurl_save_libs unset _libcurl_save_libs
]) ])
if test $libcurl_cv_lib_curl_usable = yes; then if test "$libcurl_cv_lib_curl_usable" = "yes"; then
# Does curl_free() exist in this version of libcurl? # Does curl_free() exist in this version of libcurl?
# If not, fake it with free() # If not, fake it with free()
@ -217,25 +217,25 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
done done
if test "x$_libcurl_protocols" = "x"; then if test -z "$_libcurl_protocols"; then
# We do not have --protocols, so just assume that all # We do not have --protocols, so just assume that all
# protocols are available # protocols are available
_libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP" _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
if test x$libcurl_feature_SSL = xyes; then if test "$libcurl_feature_SSL" = "yes"; then
_libcurl_protocols="$_libcurl_protocols HTTPS" _libcurl_protocols="$_libcurl_protocols HTTPS"
# FTPS was not standards-compliant until version # FTPS was not standards-compliant until version
# 7.11.0 (0x070b00 == 461568) # 7.11.0 (0x070b00 == 461568)
if test $_libcurl_version -ge 461568; then if test "$_libcurl_version" -ge 461568; then
_libcurl_protocols="$_libcurl_protocols FTPS" _libcurl_protocols="$_libcurl_protocols FTPS"
fi fi
fi fi
# RTSP, IMAP, POP3 and SMTP were added in # RTSP, IMAP, POP3 and SMTP were added in
# 7.20.0 (0x071400 == 463872) # 7.20.0 (0x071400 == 463872)
if test $_libcurl_version -ge 463872; then if test "$_libcurl_version" -ge 463872; then
_libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP" _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
fi fi
fi fi
@ -261,7 +261,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
unset _libcurl_ldflags unset _libcurl_ldflags
fi fi
if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes; then if test "x$_libcurl_with" = "xno" || test "$libcurl_cv_lib_curl_usable" != "yes"; then
# This is the IF-NO path # This is the IF-NO path
ifelse([$4],,:,[$4]) ifelse([$4],,:,[$4])
else else

View File

@ -25,7 +25,7 @@
AC_DEFUN([CURL_WITH_AMISSL], [ AC_DEFUN([CURL_WITH_AMISSL], [
AC_MSG_CHECKING([whether to enable Amiga native SSL/TLS (AmiSSL v5)]) AC_MSG_CHECKING([whether to enable Amiga native SSL/TLS (AmiSSL v5)])
if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
if test "x$OPT_AMISSL" != xno; then if test "x$OPT_AMISSL" != "xno"; then
ssl_msg= ssl_msg=
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
@ -43,7 +43,7 @@ if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
],[ ],[
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
ssl_msg="AmiSSL" ssl_msg="AmiSSL"
test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "amissl" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
AMISSL_ENABLED=1 AMISSL_ENABLED=1
OPENSSL_ENABLED=1 OPENSSL_ENABLED=1
# Use AmiSSL's built-in ca bundle # Use AmiSSL's built-in ca bundle

View File

@ -24,7 +24,7 @@
AC_DEFUN([CURL_WITH_APPLE_SECTRUST], [ AC_DEFUN([CURL_WITH_APPLE_SECTRUST], [
AC_MSG_CHECKING([whether to enable Apple OS native certificate validation]) AC_MSG_CHECKING([whether to enable Apple OS native certificate validation])
if test "x$OPT_APPLE_SECTRUST" = xyes; then if test "x$OPT_APPLE_SECTRUST" = "xyes"; then
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
#include <sys/types.h> #include <sys/types.h>
@ -41,10 +41,10 @@ if test "x$OPT_APPLE_SECTRUST" = xyes; then
],[ ],[
build_for_apple="no" build_for_apple="no"
]) ])
if test "x$build_for_apple" = "xno"; then if test "$build_for_apple" = "no"; then
AC_MSG_ERROR([Apple SecTrust can only be enabled for Apple OS targets]) AC_MSG_ERROR([Apple SecTrust can only be enabled for Apple OS targets])
fi fi
if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1"; then if test "$OPENSSL_ENABLED" = "1" || test "$GNUTLS_ENABLED" = "1"; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(USE_APPLE_SECTRUST, 1, [enable Apple OS certificate validation]) AC_DEFINE(USE_APPLE_SECTRUST, 1, [enable Apple OS certificate validation])
APPLE_SECTRUST_ENABLED=1 APPLE_SECTRUST_ENABLED=1

View File

@ -118,7 +118,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
clangvlo=`echo $clangver | cut -d . -f2` clangvlo=`echo $clangver | cut -d . -f2`
compiler_ver="$clangver" compiler_ver="$clangver"
compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null` compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
if test "$appleclang" = '1' && test "$oldapple" = '0'; then if test "$appleclang" = "1" && test "$oldapple" = "0"; then
dnl Starting with Xcode 7 / clang 3.7, Apple clang does not tell its upstream version dnl Starting with Xcode 7 / clang 3.7, Apple clang does not tell its upstream version
if test "$compiler_num" -ge '1700'; then compiler_num='1901' if test "$compiler_num" -ge '1700'; then compiler_num='1901'
elif test "$compiler_num" -ge '1600'; then compiler_num='1700' elif test "$compiler_num" -ge '1600'; then compiler_num='1700'
@ -396,7 +396,8 @@ AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
AC_REQUIRE([CURL_CHECK_COMPILER])dnl AC_REQUIRE([CURL_CHECK_COMPILER])dnl
AC_MSG_CHECKING([convert -I options to -isystem]) AC_MSG_CHECKING([convert -I options to -isystem])
if test "$compiler_id" = "GNU_C" || if test "$compiler_id" = "GNU_C" ||
test "$compiler_id" = "CLANG" -o "$compiler_id" = "APPLECLANG"; then test "$compiler_id" = "CLANG" ||
test "$compiler_id" = "APPLECLANG"; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
tmp_has_include="no" tmp_has_include="no"
tmp_chg_FLAGS="$CFLAGS" tmp_chg_FLAGS="$CFLAGS"
@ -475,7 +476,7 @@ AC_DEFUN([CURL_COMPILER_WORKS_IFELSE], [
]) ])
fi fi
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$tmp_compiler_works" = "yes"; then test "$tmp_compiler_works" = "yes"; then
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
@ -632,7 +633,7 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
squeeze tmp_CPPFLAGS squeeze tmp_CPPFLAGS
squeeze tmp_CFLAGS squeeze tmp_CFLAGS
# #
if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then if test -n "$tmp_CFLAGS" || test -n "$tmp_CPPFLAGS"; then
AC_MSG_CHECKING([if compiler accepts some basic options]) AC_MSG_CHECKING([if compiler accepts some basic options])
CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS" CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS" CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
@ -972,7 +973,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
# #
dnl Do not enable -pedantic when cross-compiling with a gcc older dnl Do not enable -pedantic when cross-compiling with a gcc older
dnl than 3.0, to avoid warnings from third party system headers. dnl than 3.0, to avoid warnings from third party system headers.
if test "x$cross_compiling" != "xyes" || if test "$cross_compiling" != "yes" ||
test "$compiler_num" -ge "300"; then test "$compiler_num" -ge "300"; then
tmp_CFLAGS="$tmp_CFLAGS -pedantic" tmp_CFLAGS="$tmp_CFLAGS -pedantic"
fi fi
@ -985,7 +986,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
if test "$compiler_num" -ge "104"; then if test "$compiler_num" -ge "104"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings]) CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings])
dnl If not cross-compiling with a gcc older than 3.0 dnl If not cross-compiling with a gcc older than 3.0
if test "x$cross_compiling" != "xyes" || if test "$cross_compiling" != "yes" ||
test "$compiler_num" -ge "300"; then test "$compiler_num" -ge "300"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused shadow]) CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused shadow])
fi fi
@ -995,7 +996,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
if test "$compiler_num" -ge "207"; then if test "$compiler_num" -ge "207"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [nested-externs]) CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [nested-externs])
dnl If not cross-compiling with a gcc older than 3.0 dnl If not cross-compiling with a gcc older than 3.0
if test "x$cross_compiling" != "xyes" || if test "$cross_compiling" != "yes" ||
test "$compiler_num" -ge "300"; then test "$compiler_num" -ge "300"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-declarations]) CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-declarations])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes]) CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes])
@ -1173,7 +1174,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
else else
dnl When cross-compiling with a gcc older than 3.0, disable dnl When cross-compiling with a gcc older than 3.0, disable
dnl some warnings triggered on third party system headers. dnl some warnings triggered on third party system headers.
if test "x$cross_compiling" = "xyes"; then if test "$cross_compiling" = "yes"; then
if test "$compiler_num" -ge "104"; then if test "$compiler_num" -ge "104"; then
dnl gcc 1.4 or later dnl gcc 1.4 or later
tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow" tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
@ -1190,19 +1191,19 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wno-shadow" tmp_CFLAGS="$tmp_CFLAGS -Wno-shadow"
tmp_CFLAGS="$tmp_CFLAGS -Wno-unreachable-code" tmp_CFLAGS="$tmp_CFLAGS -Wno-unreachable-code"
fi fi
if test "$compiler_num" -ge "402" -a "$compiler_num" -lt "406"; then if test "$compiler_num" -ge "402" && test "$compiler_num" -lt "406"; then
dnl GCC <4.6 do not support #pragma to suppress warnings locally. Disable globally instead. dnl GCC <4.6 do not support #pragma to suppress warnings locally. Disable globally instead.
tmp_CFLAGS="$tmp_CFLAGS -Wno-overlength-strings" tmp_CFLAGS="$tmp_CFLAGS -Wno-overlength-strings"
fi fi
if test "$compiler_num" -ge "400" -a "$compiler_num" -lt "407"; then if test "$compiler_num" -ge "400" && test "$compiler_num" -lt "407"; then
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84685 dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84685
tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-field-initializers" tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-field-initializers"
fi fi
if test "$compiler_num" -ge "403" -a "$compiler_num" -lt "408"; then if test "$compiler_num" -ge "403" && test "$compiler_num" -lt "408"; then
dnl Avoid false positives dnl Avoid false positives
tmp_CFLAGS="$tmp_CFLAGS -Wno-type-limits" tmp_CFLAGS="$tmp_CFLAGS -Wno-type-limits"
fi fi
if test "$compiler_num" -ge "501" -a "$compiler_num" -lt "505"; then if test "$compiler_num" -ge "501" && test "$compiler_num" -lt "505"; then
dnl Avoid false positives dnl Avoid false positives
tmp_CFLAGS="$tmp_CFLAGS -Wno-conversion" tmp_CFLAGS="$tmp_CFLAGS -Wno-conversion"
fi fi
@ -1308,7 +1309,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
squeeze tmp_CPPFLAGS squeeze tmp_CPPFLAGS
squeeze tmp_CFLAGS squeeze tmp_CFLAGS
# #
if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then if test -n "$tmp_CFLAGS" || test -n "$tmp_CPPFLAGS"; then
AC_MSG_CHECKING([if compiler accepts strict warning options]) AC_MSG_CHECKING([if compiler accepts strict warning options])
CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS" CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS" CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"

View File

@ -93,7 +93,7 @@ AS_HELP_STRING([--disable-ares],[Disable c-ares for DNS lookups]),
*) *)
dnl --enable-ares option used dnl --enable-ares option used
want_ares="yes" want_ares="yes"
if test -n "$enableval" && test "$enableval" != "yes"; then if test -n "$enableval" && test "x$enableval" != "xyes"; then
want_ares_path="$enableval" want_ares_path="$enableval"
fi fi
;; ;;
@ -392,15 +392,15 @@ AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
tst_method="unknown" tst_method="unknown"
AC_MSG_CHECKING([how to set a socket into non-blocking mode]) AC_MSG_CHECKING([how to set a socket into non-blocking mode])
if test "x$curl_cv_func_fcntl_o_nonblock" = "xyes"; then if test "$curl_cv_func_fcntl_o_nonblock" = "yes"; then
tst_method="fcntl O_NONBLOCK" tst_method="fcntl O_NONBLOCK"
elif test "x$curl_cv_func_ioctl_fionbio" = "xyes"; then elif test "$curl_cv_func_ioctl_fionbio" = "yes"; then
tst_method="ioctl FIONBIO" tst_method="ioctl FIONBIO"
elif test "x$curl_cv_func_ioctlsocket_fionbio" = "xyes"; then elif test "$curl_cv_func_ioctlsocket_fionbio" = "yes"; then
tst_method="ioctlsocket FIONBIO" tst_method="ioctlsocket FIONBIO"
elif test "x$curl_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then elif test "$curl_cv_func_ioctlsocket_camel_fionbio" = "yes"; then
tst_method="IoctlSocket FIONBIO" tst_method="IoctlSocket FIONBIO"
elif test "x$curl_cv_func_setsockopt_so_nonblock" = "xyes"; then elif test "$curl_cv_func_setsockopt_so_nonblock" = "yes"; then
tst_method="setsockopt SO_NONBLOCK" tst_method="setsockopt SO_NONBLOCK"
fi fi
AC_MSG_RESULT([$tst_method]) AC_MSG_RESULT([$tst_method])
@ -433,7 +433,7 @@ AC_DEFUN([CURL_CONFIGURE_SYMBOL_HIDING], [
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
AM_CONDITIONAL(DOING_CURL_SYMBOL_HIDING, test x$doing_symbol_hiding = xyes) AM_CONDITIONAL(DOING_CURL_SYMBOL_HIDING, test "$doing_symbol_hiding" = "yes")
AC_SUBST(CFLAG_CURL_SYMBOL_HIDING) AC_SUBST(CFLAG_CURL_SYMBOL_HIDING)
]) ])

View File

@ -1339,7 +1339,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
fi fi
# #
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$tst_compi_getaddrinfo" = "yes"; then test "$tst_compi_getaddrinfo" = "yes"; then
AC_MSG_CHECKING([if getaddrinfo seems to work]) AC_MSG_CHECKING([if getaddrinfo seems to work])
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
@ -1415,7 +1415,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
# #
if test "$curl_cv_func_getaddrinfo" = "yes"; then if test "$curl_cv_func_getaddrinfo" = "yes"; then
AC_MSG_CHECKING([if getaddrinfo is threadsafe]) AC_MSG_CHECKING([if getaddrinfo is threadsafe])
if test "$curl_cv_apple" = 'yes'; then if test "$curl_cv_apple" = "yes"; then
dnl Darwin 6.0 and macOS 10.2.X and newer dnl Darwin 6.0 and macOS 10.2.X and newer
tst_tsafe_getaddrinfo="yes" tst_tsafe_getaddrinfo="yes"
fi fi
@ -2027,7 +2027,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [
fi fi
# #
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$tst_compi_getifaddrs" = "yes"; then test "$tst_compi_getifaddrs" = "yes"; then
AC_MSG_CHECKING([if getifaddrs seems to work]) AC_MSG_CHECKING([if getifaddrs seems to work])
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
@ -2148,7 +2148,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [
fi fi
# #
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$tst_compi_gmtime_r" = "yes"; then test "$tst_compi_gmtime_r" = "yes"; then
AC_MSG_CHECKING([if gmtime_r seems to work]) AC_MSG_CHECKING([if gmtime_r seems to work])
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
@ -2268,7 +2268,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [
fi fi
# #
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$tst_compi_inet_ntop" = "yes"; then test "$tst_compi_inet_ntop" = "yes"; then
AC_MSG_CHECKING([if inet_ntop seems to work]) AC_MSG_CHECKING([if inet_ntop seems to work])
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
@ -2429,7 +2429,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [
fi fi
# #
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$tst_compi_inet_pton" = "yes"; then test "$tst_compi_inet_pton" = "yes"; then
AC_MSG_CHECKING([if inet_pton seems to work]) AC_MSG_CHECKING([if inet_pton seems to work])
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
@ -4016,7 +4016,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
fi fi
# #
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$tst_glibc_strerror_r" = "yes"; then test "$tst_glibc_strerror_r" = "yes"; then
AC_MSG_CHECKING([if strerror_r seems to work]) AC_MSG_CHECKING([if strerror_r seems to work])
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
@ -4079,7 +4079,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
fi fi
# #
dnl only do runtime verification when not cross-compiling dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" && if test "$cross_compiling" != "yes" &&
test "$tst_posix_strerror_r" = "yes"; then test "$tst_posix_strerror_r" = "yes"; then
AC_MSG_CHECKING([if strerror_r seems to work]) AC_MSG_CHECKING([if strerror_r seems to work])
CURL_RUN_IFELSE([ CURL_RUN_IFELSE([
@ -4259,7 +4259,7 @@ dnl CURL_LIBRARY_PATH variable. It keeps the LD_LIBRARY_PATH
dnl changes contained within this macro. dnl changes contained within this macro.
AC_DEFUN([CURL_RUN_IFELSE], [ AC_DEFUN([CURL_RUN_IFELSE], [
if test "$curl_cv_apple" = 'yes'; then if test "$curl_cv_apple" = "yes"; then
AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4) AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
else else
oldcc=$CC oldcc=$CC
@ -4291,7 +4291,7 @@ AC_DEFUN([CURL_COVERAGE],[
coverage="$enableval") coverage="$enableval")
dnl if not gcc or clang switch off again dnl if not gcc or clang switch off again
AS_IF([test "$compiler_id" != "GNU_C" -a "$compiler_id" != "CLANG" -a "$compiler_id" != "APPLECLANG"], coverage="no" ) AS_IF([test "$compiler_id" != "GNU_C" && test "$compiler_id" != "CLANG" && test "$compiler_id" != "APPLECLANG"], coverage="no" )
AC_MSG_RESULT($coverage) AC_MSG_RESULT($coverage)
if test "x$coverage" = "xyes"; then if test "x$coverage" = "xyes"; then
@ -4390,11 +4390,11 @@ AC_DEFUN([CURL_SIZEOF], [
r=0 r=0
]) ])
dnl get out of the loop once matched dnl get out of the loop once matched
if test $r -gt 0; then if test "$r" -gt 0; then
break; break;
fi fi
done done
if test $r -eq 0; then if test "$r" -eq 0; then
AC_MSG_ERROR([Failed to find size of $1]) AC_MSG_ERROR([Failed to find size of $1])
fi fi
AC_MSG_RESULT($r) AC_MSG_RESULT($r)

View File

@ -27,10 +27,10 @@ dnl check for GnuTLS
dnl ---------------------------------------------------- dnl ----------------------------------------------------
AC_DEFUN([CURL_WITH_GNUTLS], [ AC_DEFUN([CURL_WITH_GNUTLS], [
if test "x$OPT_GNUTLS" != xno; then if test "x$OPT_GNUTLS" != "xno"; then
ssl_msg= ssl_msg=
if test X"$OPT_GNUTLS" != Xno; then if test "x$OPT_GNUTLS" != "xno"; then
addld="" addld=""
addlib="" addlib=""
@ -106,7 +106,7 @@ if test "x$OPT_GNUTLS" != xno; then
USE_GNUTLS="yes" USE_GNUTLS="yes"
ssl_msg="GnuTLS" ssl_msg="GnuTLS"
QUIC_ENABLED=yes QUIC_ENABLED=yes
test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "gnutls" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
], ],
[ [
LIBS="$CLEANLIBS" LIBS="$CLEANLIBS"
@ -115,7 +115,7 @@ if test "x$OPT_GNUTLS" != xno; then
LDFLAGSPC="$CLEANLDFLAGSPC" LDFLAGSPC="$CLEANLDFLAGSPC"
]) ])
if test "x$USE_GNUTLS" = "xyes"; then if test "$USE_GNUTLS" = "yes"; then
AC_MSG_NOTICE([detected GnuTLS version $version]) AC_MSG_NOTICE([detected GnuTLS version $version])
check_for_ca_bundle=1 check_for_ca_bundle=1
if test -n "$gtlslib"; then if test -n "$gtlslib"; then
@ -123,7 +123,7 @@ if test "x$OPT_GNUTLS" != xno; then
dnl linker does not search through, we need to add it to dnl linker does not search through, we need to add it to
dnl CURL_LIBRARY_PATH to prevent further configure tests to fail dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
dnl due to this dnl due to this
if test "x$cross_compiling" != "xyes"; then if test "$cross_compiling" != "yes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib" CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
export CURL_LIBRARY_PATH export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH]) AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH])
@ -147,7 +147,7 @@ if test "$GNUTLS_ENABLED" = "1"; then
AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ]) AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
# If not, try linking directly to both of them to see if they are available # If not, try linking directly to both of them to see if they are available
if test "$USE_GNUTLS_NETTLE" = ""; then if test -z "$USE_GNUTLS_NETTLE"; then
dnl this is with no particular path given dnl this is with no particular path given
CURL_CHECK_PKGCONFIG(nettle) CURL_CHECK_PKGCONFIG(nettle)
@ -192,7 +192,7 @@ if test "$GNUTLS_ENABLED" = "1"; then
fi fi
fi fi
fi fi
if test "$USE_GNUTLS_NETTLE" = ""; then if test -z "$USE_GNUTLS_NETTLE"; then
AC_MSG_ERROR([GnuTLS found, but nettle was not found]) AC_MSG_ERROR([GnuTLS found, but nettle was not found])
fi fi
else else

View File

@ -27,15 +27,15 @@ dnl check for mbedTLS
dnl ---------------------------------------------------- dnl ----------------------------------------------------
AC_DEFUN([CURL_WITH_MBEDTLS], [ AC_DEFUN([CURL_WITH_MBEDTLS], [
if test "x$OPT_MBEDTLS" != xno; then if test "x$OPT_MBEDTLS" != "xno"; then
_cppflags=$CPPFLAGS _cppflags=$CPPFLAGS
_ldflags=$LDFLAGS _ldflags=$LDFLAGS
_ldflagspc=$LDFLAGSPC _ldflagspc=$LDFLAGSPC
ssl_msg= ssl_msg=
if test X"$OPT_MBEDTLS" != Xno; then if test "x$OPT_MBEDTLS" != "xno"; then
if test "$OPT_MBEDTLS" = "yes"; then if test "x$OPT_MBEDTLS" = "xyes"; then
OPT_MBEDTLS="" OPT_MBEDTLS=""
fi fi
@ -49,7 +49,7 @@ if test "x$OPT_MBEDTLS" != xno; then
MBEDTLS_ENABLED=1 MBEDTLS_ENABLED=1
USE_MBEDTLS="yes" USE_MBEDTLS="yes"
ssl_msg="mbedTLS" ssl_msg="mbedTLS"
test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "mbedtls" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
], [], -lmbedx509 -lmbedcrypto) ], [], -lmbedx509 -lmbedcrypto)
fi fi
@ -58,7 +58,7 @@ if test "x$OPT_MBEDTLS" != xno; then
addcflags="" addcflags=""
mbedtlslib="" mbedtlslib=""
if test "x$USE_MBEDTLS" != "xyes"; then if test "$USE_MBEDTLS" != "yes"; then
dnl add the path and test again dnl add the path and test again
addld=-L$OPT_MBEDTLS/lib$libsuff addld=-L$OPT_MBEDTLS/lib$libsuff
addcflags=-I$OPT_MBEDTLS/include addcflags=-I$OPT_MBEDTLS/include
@ -76,7 +76,7 @@ if test "x$OPT_MBEDTLS" != xno; then
MBEDTLS_ENABLED=1 MBEDTLS_ENABLED=1
USE_MBEDTLS="yes" USE_MBEDTLS="yes"
ssl_msg="mbedTLS" ssl_msg="mbedTLS"
test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "mbedtls" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
], ],
[ [
CPPFLAGS=$_cppflags CPPFLAGS=$_cppflags
@ -85,7 +85,7 @@ if test "x$OPT_MBEDTLS" != xno; then
], -lmbedx509 -lmbedcrypto) ], -lmbedx509 -lmbedcrypto)
fi fi
if test "x$USE_MBEDTLS" = "xyes"; then if test "$USE_MBEDTLS" = "yes"; then
AC_MSG_NOTICE([detected mbedTLS]) AC_MSG_NOTICE([detected mbedTLS])
check_for_ca_bundle=1 check_for_ca_bundle=1
@ -96,7 +96,7 @@ if test "x$OPT_MBEDTLS" != xno; then
dnl linker does not search through, we need to add it to dnl linker does not search through, we need to add it to
dnl CURL_LIBRARY_PATH to prevent further configure tests to fail dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
dnl due to this dnl due to this
if test "x$cross_compiling" != "xyes"; then if test "$cross_compiling" != "yes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib" CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib"
export CURL_LIBRARY_PATH export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH]) AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH])

View File

@ -30,7 +30,7 @@ dnl Check for OpenSSL libraries and headers
dnl ********************************************************************** dnl **********************************************************************
AC_DEFUN([CURL_WITH_OPENSSL], [ AC_DEFUN([CURL_WITH_OPENSSL], [
if test "x$OPT_OPENSSL" != xno; then if test "x$OPT_OPENSSL" != "xno"; then
ssl_msg= ssl_msg=
dnl backup the pre-ssl variables dnl backup the pre-ssl variables
@ -152,7 +152,7 @@ if test "x$OPT_OPENSSL" != xno; then
LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL" LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
LDFLAGSPC="$CLEANLDFLAGSPC -L$LIB_OPENSSL" LDFLAGSPC="$CLEANLDFLAGSPC -L$LIB_OPENSSL"
fi fi
if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then if test "$PKGCONFIG" = "no" && test -n "$PREFIX_OPENSSL"; then
# only set this if pkg-config was not used # only set this if pkg-config was not used
CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include" CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include"
fi fi
@ -203,33 +203,33 @@ if test "x$OPT_OPENSSL" != xno; then
]) ])
]) ])
if test X"$HAVECRYPTO" = X"yes"; then if test "$HAVECRYPTO" = "yes"; then
dnl This is only reasonable to do if crypto actually is there: check for dnl This is only reasonable to do if crypto actually is there: check for
dnl SSL libs NOTE: it is important to do this AFTER the crypto lib dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
AC_CHECK_LIB(ssl, SSL_connect) AC_CHECK_LIB(ssl, SSL_connect)
if test "$ac_cv_lib_ssl_SSL_connect" = yes; then if test "$ac_cv_lib_ssl_SSL_connect" = "yes"; then
dnl Have the libraries--check for OpenSSL headers dnl Have the libraries--check for OpenSSL headers
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \ AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
openssl/pem.h openssl/ssl.h openssl/err.h, openssl/pem.h openssl/ssl.h openssl/err.h,
ssl_msg="OpenSSL" ssl_msg="OpenSSL"
test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "openssl" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
OPENSSL_ENABLED=1 OPENSSL_ENABLED=1
AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use])) AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
fi fi
if test X"$OPENSSL_ENABLED" != X"1"; then if test "$OPENSSL_ENABLED" != "1"; then
LIBS="$CLEANLIBS" LIBS="$CLEANLIBS"
fi fi
if test X"$OPT_OPENSSL" != Xoff && if test "x$OPT_OPENSSL" != "xoff" &&
test "$OPENSSL_ENABLED" != "1"; then test "$OPENSSL_ENABLED" != "1"; then
AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!]) AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
fi fi
fi fi
if test X"$OPENSSL_ENABLED" = X"1"; then if test "$OPENSSL_ENABLED" = "1"; then
dnl These can only exist if OpenSSL exists dnl These can only exist if OpenSSL exists
AC_MSG_CHECKING([for BoringSSL]) AC_MSG_CHECKING([for BoringSSL])
@ -319,7 +319,7 @@ if test "x$OPT_OPENSSL" != xno; then
dnl when the ssl shared libs were found in a path that the runtime dnl when the ssl shared libs were found in a path that the runtime
dnl linker does not search through, we need to add it to CURL_LIBRARY_PATH dnl linker does not search through, we need to add it to CURL_LIBRARY_PATH
dnl to prevent further configure tests to fail due to this dnl to prevent further configure tests to fail due to this
if test "x$cross_compiling" != "xyes"; then if test "$cross_compiling" != "yes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL" CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
export CURL_LIBRARY_PATH export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH]) AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH])
@ -332,7 +332,7 @@ if test "x$OPT_OPENSSL" != xno; then
test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi fi
if test X"$OPT_OPENSSL" != Xno && if test "x$OPT_OPENSSL" != "xno" &&
test "$OPENSSL_ENABLED" != "1"; then test "$OPENSSL_ENABLED" != "1"; then
AC_MSG_NOTICE([OPT_OPENSSL: $OPT_OPENSSL]) AC_MSG_NOTICE([OPT_OPENSSL: $OPT_OPENSSL])
AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED]) AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED])
@ -389,7 +389,7 @@ if test "$OPENSSL_ENABLED" = "1"; then
AC_ARG_ENABLE(openssl-auto-load-config, AC_ARG_ENABLE(openssl-auto-load-config,
AS_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configuration]) AS_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configuration])
AS_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configuration]), AS_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configuration]),
[ if test X"$enableval" = X"no"; then [ if test "x$enableval" = "xno"; then
AC_MSG_NOTICE([automatic loading of OpenSSL configuration disabled]) AC_MSG_NOTICE([automatic loading of OpenSSL configuration disabled])
AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration will not be loaded automatically]) AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration will not be loaded automatically])
fi fi

View File

@ -27,7 +27,7 @@ dnl ----------------------------------------------------
dnl check for Rustls dnl check for Rustls
dnl ---------------------------------------------------- dnl ----------------------------------------------------
if test "x$OPT_RUSTLS" != xno; then if test "x$OPT_RUSTLS" != "xno"; then
ssl_msg= ssl_msg=
dnl backup the pre-ssl variables dnl backup the pre-ssl variables
@ -83,7 +83,7 @@ if test "x$OPT_RUSTLS" != xno; then
CPPFLAGS="$CPPFLAGS $addcflags" CPPFLAGS="$CPPFLAGS $addcflags"
fi fi
if test "$curl_cv_apple" = 'yes'; then if test "$curl_cv_apple" = "yes"; then
RUSTLS_LDFLAGS="-framework Security -framework Foundation" RUSTLS_LDFLAGS="-framework Security -framework Foundation"
else else
RUSTLS_LDFLAGS="-lpthread -ldl -lm" RUSTLS_LDFLAGS="-lpthread -ldl -lm"
@ -136,7 +136,7 @@ if test "x$OPT_RUSTLS" != xno; then
AC_DEFINE(USE_RUSTLS, 1, [if Rustls is enabled]) AC_DEFINE(USE_RUSTLS, 1, [if Rustls is enabled])
USE_RUSTLS="yes" USE_RUSTLS="yes"
RUSTLS_ENABLED=1 RUSTLS_ENABLED=1
test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "rustls" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
else else
AC_MSG_ERROR([pkg-config: Could not find Rustls]) AC_MSG_ERROR([pkg-config: Could not find Rustls])
fi fi
@ -152,7 +152,7 @@ if test "x$OPT_RUSTLS" != xno; then
LDFLAGS="$CLEANLDFLAGS $SSL_LDFLAGS" LDFLAGS="$CLEANLDFLAGS $SSL_LDFLAGS"
LDFLAGSPC="$CLEANLDFLAGSPC $SSL_LDFLAGS" LDFLAGSPC="$CLEANLDFLAGSPC $SSL_LDFLAGS"
if test "x$USE_RUSTLS" = "xyes"; then if test "$USE_RUSTLS" = "yes"; then
AC_MSG_NOTICE([detected Rustls]) AC_MSG_NOTICE([detected Rustls])
check_for_ca_bundle=1 check_for_ca_bundle=1
@ -161,7 +161,7 @@ if test "x$OPT_RUSTLS" != xno; then
dnl linker does not search through, we need to add it to dnl linker does not search through, we need to add it to
dnl CURL_LIBRARY_PATH so that further configure tests do not dnl CURL_LIBRARY_PATH so that further configure tests do not
dnl fail due to this dnl fail due to this
if test "x$cross_compiling" != "xyes"; then if test "$cross_compiling" != "yes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_RUSTLS" CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_RUSTLS"
export CURL_LIBRARY_PATH export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $LIB_RUSTLS to CURL_LIBRARY_PATH]) AC_MSG_NOTICE([Added $LIB_RUSTLS to CURL_LIBRARY_PATH])
@ -177,7 +177,7 @@ if test "x$OPT_RUSTLS" != xno; then
RUSTLS_ENABLED=1 RUSTLS_ENABLED=1
USE_RUSTLS="yes" USE_RUSTLS="yes"
ssl_msg="Rustls" ssl_msg="Rustls"
test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "rustls" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
], ],
AC_MSG_ERROR([--with-rustls was specified but could not find compatible Rustls.]), AC_MSG_ERROR([--with-rustls was specified but could not find compatible Rustls.]),
$RUSTLS_LDFLAGS) $RUSTLS_LDFLAGS)
@ -185,7 +185,7 @@ if test "x$OPT_RUSTLS" != xno; then
test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
if test X"$OPT_RUSTLS" != Xno && if test "x$OPT_RUSTLS" != "xno" &&
test "$RUSTLS_ENABLED" != "1"; then test "$RUSTLS_ENABLED" != "1"; then
AC_MSG_NOTICE([OPT_RUSTLS: $OPT_RUSTLS]) AC_MSG_NOTICE([OPT_RUSTLS: $OPT_RUSTLS])
AC_MSG_NOTICE([RUSTLS_ENABLED: $RUSTLS_ENABLED]) AC_MSG_NOTICE([RUSTLS_ENABLED: $RUSTLS_ENABLED])

View File

@ -24,17 +24,17 @@
AC_DEFUN([CURL_WITH_SCHANNEL], [ AC_DEFUN([CURL_WITH_SCHANNEL], [
AC_MSG_CHECKING([whether to enable Windows native SSL/TLS]) AC_MSG_CHECKING([whether to enable Windows native SSL/TLS])
if test "x$OPT_SCHANNEL" != xno; then if test "x$OPT_SCHANNEL" != "xno"; then
ssl_msg= ssl_msg=
if test "x$OPT_SCHANNEL" != "xno" && if test "x$OPT_SCHANNEL" != "xno" &&
test "x$curl_cv_native_windows" = "xyes"; then test "$curl_cv_native_windows" = "yes"; then
if test "$curl_cv_winuwp" = 'yes'; then if test "$curl_cv_winuwp" = "yes"; then
AC_MSG_ERROR([UWP does not support Schannel.]) AC_MSG_ERROR([UWP does not support Schannel.])
fi fi
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support]) AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
ssl_msg="Schannel" ssl_msg="Schannel"
test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "schannel" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
SCHANNEL_ENABLED=1 SCHANNEL_ENABLED=1
# --with-schannel implies --enable-sspi # --with-schannel implies --enable-sspi
AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support]) AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])

View File

@ -40,7 +40,7 @@ AC_MSG_CHECKING([whether to link macOS CoreFoundation, CoreServices, and SystemC
],[ ],[
build_for_macos="no" build_for_macos="no"
]) ])
if test "x$build_for_macos" != xno; then if test "$build_for_macos" != "no"; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
SYSCONFIG_LDFLAGS='-framework CoreFoundation -framework CoreServices -framework SystemConfiguration' SYSCONFIG_LDFLAGS='-framework CoreFoundation -framework CoreServices -framework SystemConfiguration'
LDFLAGS="$LDFLAGS $SYSCONFIG_LDFLAGS" LDFLAGS="$LDFLAGS $SYSCONFIG_LDFLAGS"

View File

@ -36,14 +36,14 @@ case "$OPT_WOLFSSL" in
;; ;;
esac esac
if test "x$OPT_WOLFSSL" != xno; then if test "$OPT_WOLFSSL" != "no"; then
_cppflags=$CPPFLAGS _cppflags=$CPPFLAGS
_ldflags=$LDFLAGS _ldflags=$LDFLAGS
_ldflagspc=$LDFLAGSPC _ldflagspc=$LDFLAGSPC
ssl_msg= ssl_msg=
if test X"$OPT_WOLFSSL" != Xno; then if test "$OPT_WOLFSSL" != "no"; then
if test "$OPT_WOLFSSL" = "yes"; then if test "$OPT_WOLFSSL" = "yes"; then
OPT_WOLFSSL="" OPT_WOLFSSL=""
@ -76,13 +76,13 @@ if test "x$OPT_WOLFSSL" != xno; then
fi fi
fi fi
if test "$curl_cv_apple" = 'yes'; then if test "$curl_cv_apple" = "yes"; then
addlib="$addlib -framework Security -framework CoreFoundation" addlib="$addlib -framework Security -framework CoreFoundation"
else else
addlib="$addlib -lm" addlib="$addlib -lm"
fi fi
if test "x$USE_WOLFSSL" != "xyes"; then if test "$USE_WOLFSSL" != "yes"; then
LDFLAGS="$LDFLAGS $addld" LDFLAGS="$LDFLAGS $addld"
LDFLAGSPC="$LDFLAGSPC $addld" LDFLAGSPC="$LDFLAGSPC $addld"
@ -114,7 +114,7 @@ if test "x$OPT_WOLFSSL" != xno; then
WOLFSSL_ENABLED=1 WOLFSSL_ENABLED=1
USE_WOLFSSL="yes" USE_WOLFSSL="yes"
ssl_msg="wolfSSL" ssl_msg="wolfSSL"
test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes test "wolfssl" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
], ],
[ [
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
@ -126,7 +126,7 @@ if test "x$OPT_WOLFSSL" != xno; then
LIBS="$my_ac_save_LIBS" LIBS="$my_ac_save_LIBS"
fi fi
if test "x$USE_WOLFSSL" = "xyes"; then if test "$USE_WOLFSSL" = "yes"; then
AC_MSG_NOTICE([detected wolfSSL]) AC_MSG_NOTICE([detected wolfSSL])
check_for_ca_bundle=1 check_for_ca_bundle=1
@ -150,12 +150,12 @@ if test "x$OPT_WOLFSSL" != xno; then
dnl if this symbol is present, we want the include path to include the dnl if this symbol is present, we want the include path to include the
dnl OpenSSL API root as well dnl OpenSSL API root as well
if test "x$ac_cv_func_wolfSSL_DES_ecb_encrypt" = 'xyes'; then if test "$ac_cv_func_wolfSSL_DES_ecb_encrypt" = "yes"; then
HAVE_WOLFSSL_DES_ECB_ENCRYPT=1 HAVE_WOLFSSL_DES_ECB_ENCRYPT=1
fi fi
dnl if this symbol is present, we can make use of BIO filter chains dnl if this symbol is present, we can make use of BIO filter chains
if test "x$ac_cv_func_wolfSSL_BIO_new" = 'xyes'; then if test "$ac_cv_func_wolfSSL_BIO_new" = "yes"; then
HAVE_WOLFSSL_BIO_NEW=1 HAVE_WOLFSSL_BIO_NEW=1
fi fi
@ -164,7 +164,7 @@ if test "x$OPT_WOLFSSL" != xno; then
dnl linker does not search through, we need to add it to dnl linker does not search through, we need to add it to
dnl CURL_LIBRARY_PATH to prevent further configure tests to fail dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
dnl due to this dnl due to this
if test "x$cross_compiling" != "xyes"; then if test "$cross_compiling" != "yes"; then
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath" CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath"
export CURL_LIBRARY_PATH export CURL_LIBRARY_PATH
AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH]) AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH])

View File

@ -59,8 +59,8 @@ case "x$enable_static" in @%:@ (
xc_lt_want_enable_static='no' xc_lt_want_enable_static='no'
;; ;;
esac esac
if test "x$xc_lt_want_enable_shared" = 'xno' && if test "$xc_lt_want_enable_shared" = "no" &&
test "x$xc_lt_want_enable_static" = 'xno'; then test "$xc_lt_want_enable_static" = "no"; then
AC_MSG_ERROR([can not disable shared and static libraries simultaneously]) AC_MSG_ERROR([can not disable shared and static libraries simultaneously])
fi fi
@ -71,8 +71,8 @@ fi
# must be used in order to build a proper static library. # must be used in order to build a proper static library.
# #
if test "x$xc_lt_want_enable_shared" = 'xyes' && if test "$xc_lt_want_enable_shared" = "yes" &&
test "x$xc_lt_want_enable_static" = 'xyes'; then test "$xc_lt_want_enable_static" = "yes"; then
case $host_os in @%:@ ( case $host_os in @%:@ (
os2* | aix*) os2* | aix*)
xc_lt_want_enable_static='no' xc_lt_want_enable_static='no'
@ -117,7 +117,7 @@ esac
# be overridden using 'configure --disable-shared --without-pic'. # be overridden using 'configure --disable-shared --without-pic'.
# #
if test "x$xc_lt_want_with_pic" = 'xdefault'; then if test "$xc_lt_want_with_pic" = "default"; then
case $host_cpu in @%:@ ( case $host_cpu in @%:@ (
x86_64 | amd64 | ia64) x86_64 | amd64 | ia64)
case $host_os in @%:@ ( case $host_os in @%:@ (
@ -229,7 +229,7 @@ m4_define([_XC_CHECK_LT_SHLIB_USE_VERSION_INFO],
AC_MSG_CHECKING([whether to build shared libraries with -version-info]) AC_MSG_CHECKING([whether to build shared libraries with -version-info])
xc_lt_shlib_use_version_info='yes' xc_lt_shlib_use_version_info='yes'
if test "x$version_type" = 'xnone'; then if test "$version_type" = "none"; then
xc_lt_shlib_use_version_info='no' xc_lt_shlib_use_version_info='no'
fi fi
case $host_os in @%:@ ( case $host_os in @%:@ (
@ -259,9 +259,9 @@ m4_define([_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED],
AC_MSG_CHECKING([whether to build shared libraries with -no-undefined]) AC_MSG_CHECKING([whether to build shared libraries with -no-undefined])
xc_lt_shlib_use_no_undefined='no' xc_lt_shlib_use_no_undefined='no'
if test "x$allow_undefined" = 'xno'; then if test "x$allow_undefined" = "xno"; then
xc_lt_shlib_use_no_undefined='yes' xc_lt_shlib_use_no_undefined='yes'
elif test "x$allow_undefined_flag" = 'xunsupported'; then elif test "x$allow_undefined_flag" = "xunsupported"; then
xc_lt_shlib_use_no_undefined='yes' xc_lt_shlib_use_no_undefined='yes'
fi fi
case $host_os in @%:@ ( case $host_os in @%:@ (
@ -293,7 +293,7 @@ AC_MSG_CHECKING([whether to build shared libraries with -mimpure-text])
xc_lt_shlib_use_mimpure_text='no' xc_lt_shlib_use_mimpure_text='no'
case $host_os in @%:@ ( case $host_os in @%:@ (
solaris2*) solaris2*)
if test "x$GCC" = 'xyes'; then if test "x$GCC" = "xyes"; then
xc_lt_shlib_use_mimpure_text='yes' xc_lt_shlib_use_mimpure_text='yes'
fi fi
;; ;;
@ -367,8 +367,8 @@ m4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION],
# #
AC_MSG_CHECKING([whether to build shared libraries only]) AC_MSG_CHECKING([whether to build shared libraries only])
if test "$xc_lt_build_shared" = 'yes' && if test "$xc_lt_build_shared" = "yes" &&
test "$xc_lt_build_static" = 'no'; then test "$xc_lt_build_static" = "no"; then
xc_lt_build_shared_only='yes' xc_lt_build_shared_only='yes'
else else
xc_lt_build_shared_only='no' xc_lt_build_shared_only='no'
@ -380,8 +380,8 @@ AC_MSG_RESULT([$xc_lt_build_shared_only])
# #
AC_MSG_CHECKING([whether to build static libraries only]) AC_MSG_CHECKING([whether to build static libraries only])
if test "$xc_lt_build_static" = 'yes' && if test "$xc_lt_build_static" = "yes" &&
test "$xc_lt_build_shared" = 'no'; then test "$xc_lt_build_shared" = "no"; then
xc_lt_build_static_only='yes' xc_lt_build_static_only='yes'
else else
xc_lt_build_static_only='no' xc_lt_build_static_only='no'

View File

@ -39,7 +39,7 @@ AC_DEFUN([_XC_CHECK_VAR_LIBS], [
;; ;;
esac esac
done done
if test $xc_bad_var_libs = yes; then if test "$xc_bad_var_libs" = "yes"; then
AC_MSG_NOTICE([using LIBS: $LIBS]) AC_MSG_NOTICE([using LIBS: $LIBS])
AC_MSG_NOTICE([LIBS note: LIBS should only be used to specify libraries (-lname).]) AC_MSG_NOTICE([LIBS note: LIBS should only be used to specify libraries (-lname).])
fi fi
@ -68,7 +68,7 @@ AC_DEFUN([_XC_CHECK_VAR_LDFLAGS], [
;; ;;
esac esac
done done
if test $xc_bad_var_ldflags = yes; then if test "$xc_bad_var_ldflags" = "yes"; then
AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS]) AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS])
xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not" xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not"
for xc_word in $LDFLAGS; do for xc_word in $LDFLAGS; do
@ -110,7 +110,7 @@ AC_DEFUN([_XC_CHECK_VAR_CPPFLAGS], [
;; ;;
esac esac
done done
if test $xc_bad_var_cppflags = yes; then if test "$xc_bad_var_cppflags" = "yes"; then
AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS]) AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS])
xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not" xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not"
for xc_word in $CPPFLAGS; do for xc_word in $CPPFLAGS; do
@ -158,7 +158,7 @@ AC_DEFUN([_XC_CHECK_VAR_CFLAGS], [
;; ;;
esac esac
done done
if test $xc_bad_var_cflags = yes; then if test "$xc_bad_var_cflags" = "yes"; then
AC_MSG_NOTICE([using CFLAGS: $CFLAGS]) AC_MSG_NOTICE([using CFLAGS: $CFLAGS])
xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not" xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not"
for xc_word in $CFLAGS; do for xc_word in $CFLAGS; do
@ -207,10 +207,10 @@ AC_DEFUN([XC_CHECK_USER_FLAGS], [
_XC_CHECK_VAR_LDFLAGS _XC_CHECK_VAR_LDFLAGS
_XC_CHECK_VAR_CPPFLAGS _XC_CHECK_VAR_CPPFLAGS
_XC_CHECK_VAR_CFLAGS _XC_CHECK_VAR_CFLAGS
if test $xc_bad_var_libs = yes || if test "$xc_bad_var_libs" = "yes" ||
test $xc_bad_var_cflags = yes || test "$xc_bad_var_cflags" = "yes" ||
test $xc_bad_var_ldflags = yes || test "$xc_bad_var_ldflags" = "yes" ||
test $xc_bad_var_cppflags = yes; then test "$xc_bad_var_cppflags" = "yes"; then
AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.]) AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.])
fi fi
]) ])
@ -235,10 +235,10 @@ AC_DEFUN([XC_CHECK_BUILD_FLAGS], [
_XC_CHECK_VAR_LDFLAGS _XC_CHECK_VAR_LDFLAGS
_XC_CHECK_VAR_CPPFLAGS _XC_CHECK_VAR_CPPFLAGS
_XC_CHECK_VAR_CFLAGS _XC_CHECK_VAR_CFLAGS
if test $xc_bad_var_libs = yes || if test "$xc_bad_var_libs" = "yes" ||
test $xc_bad_var_cflags = yes || test "$xc_bad_var_cflags" = "yes" ||
test $xc_bad_var_ldflags = yes || test "$xc_bad_var_ldflags" = "yes" ||
test $xc_bad_var_cppflags = yes; then test "$xc_bad_var_cppflags" = "yes"; then
AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.]) AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.])
fi fi
]) ])

View File

@ -393,7 +393,7 @@ done
IFS=$xc_tst_prev_IFS IFS=$xc_tst_prev_IFS
xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'` xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'`
if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then if test "$xc_tst_dirs_sem" -eq "$xc_tst_dirs_col"; then
# When both counting methods give the same result we do not want to # When both counting methods give the same result we do not want to
# chose one over the other, and consider auto-detection not possible. # chose one over the other, and consider auto-detection not possible.
if test -z "$PATH_SEPARATOR"; then if test -z "$PATH_SEPARATOR"; then
@ -404,7 +404,7 @@ if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then
fi fi
else else
# Separator with the greater directory count is the auto-detected one. # Separator with the greater directory count is the auto-detected one.
if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then if test "$xc_tst_dirs_sem" -gt "$xc_tst_dirs_col"; then
xc_tst_auto_separator=';' xc_tst_auto_separator=';'
else else
xc_tst_auto_separator=':' xc_tst_auto_separator=':'