mirror of
https://github.com/curl/curl.git
synced 2026-01-18 17:21:26 +01:00
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:
52
acinclude.m4
52
acinclude.m4
@@ -190,7 +190,7 @@ AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [
|
||||
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"
|
||||
;;
|
||||
*)
|
||||
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])
|
||||
curl_func_clock_gettime="no"
|
||||
else
|
||||
@@ -926,7 +926,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
esac
|
||||
#
|
||||
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
|
||||
AC_MSG_CHECKING([if monotonic clock_gettime works])
|
||||
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], [
|
||||
|
||||
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 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)"
|
||||
check_capath=""
|
||||
|
||||
if test "x$APPLE_SECTRUST_ENABLED" = "x1"; then
|
||||
if test "$APPLE_SECTRUST_ENABLED" = "1"; then
|
||||
ca_native="Apple SecTrust"
|
||||
else
|
||||
ca_native="no"
|
||||
fi
|
||||
|
||||
if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
|
||||
"x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
|
||||
if test "x$want_ca" != "xno" && test "x$want_ca" != "xunset" &&
|
||||
test "x$want_capath" != "xno" && test "x$want_capath" != "xunset"; then
|
||||
dnl both given
|
||||
ca="$want_ca"
|
||||
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
|
||||
ca="$want_ca"
|
||||
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
|
||||
capath="$want_capath"
|
||||
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-*
|
||||
ca="no"
|
||||
capath="no"
|
||||
if test "x$cross_compiling" != "xyes" -a \
|
||||
"x$curl_cv_native_windows" != "xyes"; then
|
||||
if test "$cross_compiling" != "yes" &&
|
||||
test "$curl_cv_native_windows" != "yes"; then
|
||||
dnl NOT cross-compiling and...
|
||||
dnl neither of the --with-ca-* options are provided
|
||||
if test "x$want_ca" = "xunset"; then
|
||||
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 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"
|
||||
else
|
||||
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"
|
||||
fi
|
||||
|
||||
if test ! -z "$check_capath"; then
|
||||
if test -n "$check_capath"; then
|
||||
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 "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([--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])
|
||||
fi
|
||||
],
|
||||
[ with_ca_fallback="no"])
|
||||
AC_MSG_RESULT([$with_ca_fallback])
|
||||
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])
|
||||
fi
|
||||
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" ])
|
||||
|
||||
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
|
||||
CURL_CA_EMBED="$want_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_MSG_CHECKING([whether build target supports Win32 crypto API])
|
||||
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_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
@@ -1382,7 +1382,7 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
fi
|
||||
|
||||
if test "x$PKGCONFIG" != "xno"; then
|
||||
if test "$PKGCONFIG" != "no"; then
|
||||
AC_MSG_CHECKING([for $1 options with pkg-config])
|
||||
dnl ask pkg-config about $1
|
||||
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], [
|
||||
curl_pflags=""
|
||||
if test "$curl_cv_apple" = 'yes'; then
|
||||
if test "$curl_cv_apple" = "yes"; then
|
||||
curl_pflags="${curl_pflags} APPLE"
|
||||
fi
|
||||
case $host in
|
||||
@@ -1443,20 +1443,20 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$curl_cv_native_windows" = 'yes'; then
|
||||
if test "$curl_cv_native_windows" = "yes"; then
|
||||
curl_pflags="${curl_pflags} WIN32"
|
||||
fi
|
||||
if test "$curl_cv_winuwp" = 'yes'; then
|
||||
if test "$curl_cv_winuwp" = "yes"; then
|
||||
curl_pflags="${curl_pflags} UWP"
|
||||
fi
|
||||
if test "$curl_cv_cygwin" = 'yes'; then
|
||||
if test "$curl_cv_cygwin" = "yes"; then
|
||||
curl_pflags="${curl_pflags} CYGWIN"
|
||||
fi
|
||||
case $host_os in
|
||||
msdos*) curl_pflags="${curl_pflags} DOS";;
|
||||
amiga*) curl_pflags="${curl_pflags} AMIGA";;
|
||||
esac
|
||||
if test "x$compiler_id" = 'xGNU_C'; then
|
||||
if test "$compiler_id" = "GNU_C"; then
|
||||
curl_pflags="${curl_pflags} GCC"
|
||||
fi
|
||||
if test "$compiler_id" = "APPLECLANG"; then
|
||||
@@ -1467,7 +1467,7 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
|
||||
case $host_os in
|
||||
mingw*) curl_pflags="${curl_pflags} MINGW";;
|
||||
esac
|
||||
if test "x$cross_compiling" = 'xyes'; then
|
||||
if test "$cross_compiling" = "yes"; then
|
||||
curl_pflags="${curl_pflags} CROSS"
|
||||
fi
|
||||
squeeze curl_pflags
|
||||
@@ -1509,7 +1509,7 @@ TEST EINVAL TEST
|
||||
AC_MSG_RESULT([$cpp])
|
||||
|
||||
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])
|
||||
OLDCPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS -P"
|
||||
@@ -1519,7 +1519,7 @@ TEST EINVAL TEST
|
||||
], [cpp_p=yes], [cpp_p=no])
|
||||
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])
|
||||
# without -P
|
||||
CPPPFLAG=""
|
||||
|
||||
618
configure.ac
618
configure.ac
File diff suppressed because it is too large
Load Diff
@@ -149,7 +149,7 @@ while test "$#" -gt 0; do
|
||||
;;
|
||||
|
||||
--libs)
|
||||
if test "@libdir@" != '/usr/lib' -a "@libdir@" != '/usr/lib64'; then
|
||||
if test "@libdir@" != '/usr/lib' && test "@libdir@" != '/usr/lib64'; then
|
||||
curllibdir="-L@libdir@ "
|
||||
else
|
||||
curllibdir=''
|
||||
|
||||
@@ -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]),
|
||||
[_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
|
||||
|
||||
@@ -102,7 +102,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||
AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
|
||||
fi
|
||||
|
||||
if test x$_libcurl_config != "x"; then
|
||||
if test -n "$_libcurl_config"; then
|
||||
AC_CACHE_CHECK([for the version of libcurl],
|
||||
[libcurl_cv_lib_curl_version],
|
||||
[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_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],
|
||||
[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
|
||||
else
|
||||
libcurl_cv_lib_version_ok=no
|
||||
@@ -122,11 +122,11 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||
])
|
||||
fi
|
||||
|
||||
if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes; then
|
||||
if test x"$LIBCURL_CPPFLAGS" = "x"; then
|
||||
if test "$_libcurl_wanted" -eq 0 || test "$libcurl_cv_lib_version_ok" = "yes"; then
|
||||
if test -z "$LIBCURL_CPPFLAGS"; then
|
||||
LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
|
||||
fi
|
||||
if test x"$LIBCURL" = "x"; then
|
||||
if test -z "$LIBCURL"; then
|
||||
LIBCURL=`$_libcurl_config --libs`
|
||||
|
||||
# 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`
|
||||
|
||||
# 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`
|
||||
fi
|
||||
else
|
||||
@@ -153,7 +153,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||
unset _libcurl_wanted
|
||||
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
|
||||
# link line (or failing that, "-lcurl") is enough.
|
||||
@@ -187,7 +187,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||
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?
|
||||
# If not, fake it with free()
|
||||
@@ -217,25 +217,25 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||
eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
|
||||
done
|
||||
|
||||
if test "x$_libcurl_protocols" = "x"; then
|
||||
if test -z "$_libcurl_protocols"; then
|
||||
|
||||
# We do not have --protocols, so just assume that all
|
||||
# protocols are available
|
||||
_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"
|
||||
|
||||
# FTPS was not standards-compliant until version
|
||||
# 7.11.0 (0x070b00 == 461568)
|
||||
if test $_libcurl_version -ge 461568; then
|
||||
if test "$_libcurl_version" -ge 461568; then
|
||||
_libcurl_protocols="$_libcurl_protocols FTPS"
|
||||
fi
|
||||
fi
|
||||
|
||||
# RTSP, IMAP, POP3 and SMTP were added in
|
||||
# 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"
|
||||
fi
|
||||
fi
|
||||
@@ -261,7 +261,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||
unset _libcurl_ldflags
|
||||
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
|
||||
ifelse([$4],,:,[$4])
|
||||
else
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
AC_DEFUN([CURL_WITH_AMISSL], [
|
||||
AC_MSG_CHECKING([whether to enable Amiga native SSL/TLS (AmiSSL v5)])
|
||||
if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
|
||||
if test "x$OPT_AMISSL" != xno; then
|
||||
if test "x$OPT_AMISSL" != "xno"; then
|
||||
ssl_msg=
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
@@ -43,7 +43,7 @@ if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
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
|
||||
OPENSSL_ENABLED=1
|
||||
# Use AmiSSL's built-in ca bundle
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
AC_DEFUN([CURL_WITH_APPLE_SECTRUST], [
|
||||
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_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
@@ -41,10 +41,10 @@ if test "x$OPT_APPLE_SECTRUST" = xyes; then
|
||||
],[
|
||||
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])
|
||||
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_DEFINE(USE_APPLE_SECTRUST, 1, [enable Apple OS certificate validation])
|
||||
APPLE_SECTRUST_ENABLED=1
|
||||
|
||||
@@ -88,7 +88,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([if compiler is xlclang])
|
||||
CURL_CHECK_DEF([__ibmxl__], [], [silent])
|
||||
if test "$curl_cv_have_def___ibmxl__" = "yes" ; then
|
||||
if test "$curl_cv_have_def___ibmxl__" = "yes"; then
|
||||
dnl IBM's almost-compatible clang version
|
||||
AC_MSG_RESULT([yes])
|
||||
compiler_id="XLCLANG"
|
||||
@@ -118,7 +118,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
|
||||
clangvlo=`echo $clangver | cut -d . -f2`
|
||||
compiler_ver="$clangver"
|
||||
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
|
||||
if test "$compiler_num" -ge '1700'; then compiler_num='1901'
|
||||
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_MSG_CHECKING([convert -I options to -isystem])
|
||||
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])
|
||||
tmp_has_include="no"
|
||||
tmp_chg_FLAGS="$CFLAGS"
|
||||
@@ -475,7 +476,7 @@ AC_DEFUN([CURL_COMPILER_WORKS_IFELSE], [
|
||||
])
|
||||
fi
|
||||
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
|
||||
CURL_RUN_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
@@ -632,7 +633,7 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
|
||||
squeeze tmp_CPPFLAGS
|
||||
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])
|
||||
CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
|
||||
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 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
|
||||
tmp_CFLAGS="$tmp_CFLAGS -pedantic"
|
||||
fi
|
||||
@@ -985,7 +986,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
||||
if test "$compiler_num" -ge "104"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings])
|
||||
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
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused shadow])
|
||||
fi
|
||||
@@ -995,7 +996,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
||||
if test "$compiler_num" -ge "207"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [nested-externs])
|
||||
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
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-declarations])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes])
|
||||
@@ -1173,7 +1174,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
||||
else
|
||||
dnl When cross-compiling with a gcc older than 3.0, disable
|
||||
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
|
||||
dnl gcc 1.4 or later
|
||||
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-unreachable-code"
|
||||
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.
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-overlength-strings"
|
||||
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
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-field-initializers"
|
||||
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
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-type-limits"
|
||||
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
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-conversion"
|
||||
fi
|
||||
@@ -1308,7 +1309,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
||||
squeeze tmp_CPPFLAGS
|
||||
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])
|
||||
CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
|
||||
CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
|
||||
@@ -1491,7 +1492,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
|
||||
GNU_C)
|
||||
dnl Only gcc 3.4 or later
|
||||
if test "$compiler_num" -ge "304"; then
|
||||
if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null ; then
|
||||
if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null; then
|
||||
tmp_EXTERN="__attribute__((__visibility__(\"default\")))"
|
||||
tmp_CFLAGS="-fvisibility=hidden"
|
||||
supports_symbol_hiding="yes"
|
||||
@@ -1501,7 +1502,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
|
||||
INTEL_UNIX_C)
|
||||
dnl Only icc 9.0 or later
|
||||
if test "$compiler_num" -ge "900"; then
|
||||
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
|
||||
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null; then
|
||||
tmp_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||
AC_LINK_IFELSE([
|
||||
@@ -1520,7 +1521,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
|
||||
fi
|
||||
;;
|
||||
SUNPRO_C)
|
||||
if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
|
||||
if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null; then
|
||||
tmp_EXTERN="__global"
|
||||
tmp_CFLAGS="-xldscope=hidden"
|
||||
supports_symbol_hiding="yes"
|
||||
|
||||
@@ -93,7 +93,7 @@ AS_HELP_STRING([--disable-ares],[Disable c-ares for DNS lookups]),
|
||||
*)
|
||||
dnl --enable-ares option used
|
||||
want_ares="yes"
|
||||
if test -n "$enableval" && test "$enableval" != "yes"; then
|
||||
if test -n "$enableval" && test "x$enableval" != "xyes"; then
|
||||
want_ares_path="$enableval"
|
||||
fi
|
||||
;;
|
||||
@@ -392,15 +392,15 @@ AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
|
||||
tst_method="unknown"
|
||||
|
||||
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"
|
||||
elif test "x$curl_cv_func_ioctl_fionbio" = "xyes"; then
|
||||
elif test "$curl_cv_func_ioctl_fionbio" = "yes"; then
|
||||
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"
|
||||
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"
|
||||
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"
|
||||
fi
|
||||
AC_MSG_RESULT([$tst_method])
|
||||
@@ -433,7 +433,7 @@ AC_DEFUN([CURL_CONFIGURE_SYMBOL_HIDING], [
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
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)
|
||||
])
|
||||
|
||||
@@ -456,7 +456,7 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
|
||||
dnl c-ares library path has been specified
|
||||
ARES_PCDIR="$want_ares_path/lib/pkgconfig"
|
||||
CURL_CHECK_PKGCONFIG(libcares, [$ARES_PCDIR])
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
if test "$PKGCONFIG" != "no"; then
|
||||
ares_LIBS=`CURL_EXPORT_PCDIR([$ARES_PCDIR])
|
||||
$PKGCONFIG --libs-only-l libcares`
|
||||
ares_LDFLAGS=`CURL_EXPORT_PCDIR([$ARES_PCDIR])
|
||||
@@ -475,7 +475,7 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
|
||||
else
|
||||
dnl c-ares path not specified, use defaults
|
||||
CURL_CHECK_PKGCONFIG(libcares)
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
if test "$PKGCONFIG" != "no"; then
|
||||
ares_LIBS=`$PKGCONFIG --libs-only-l libcares`
|
||||
ares_LDFLAGS=`$PKGCONFIG --libs-only-L libcares`
|
||||
ares_CPPFLAGS=`$PKGCONFIG --cflags-only-I libcares`
|
||||
|
||||
@@ -1339,7 +1339,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
|
||||
fi
|
||||
#
|
||||
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
|
||||
AC_MSG_CHECKING([if getaddrinfo seems to work])
|
||||
CURL_RUN_IFELSE([
|
||||
@@ -1415,7 +1415,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
|
||||
#
|
||||
if test "$curl_cv_func_getaddrinfo" = "yes"; then
|
||||
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
|
||||
tst_tsafe_getaddrinfo="yes"
|
||||
fi
|
||||
@@ -2027,7 +2027,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [
|
||||
fi
|
||||
#
|
||||
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
|
||||
AC_MSG_CHECKING([if getifaddrs seems to work])
|
||||
CURL_RUN_IFELSE([
|
||||
@@ -2148,7 +2148,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [
|
||||
fi
|
||||
#
|
||||
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
|
||||
AC_MSG_CHECKING([if gmtime_r seems to work])
|
||||
CURL_RUN_IFELSE([
|
||||
@@ -2268,7 +2268,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [
|
||||
fi
|
||||
#
|
||||
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
|
||||
AC_MSG_CHECKING([if inet_ntop seems to work])
|
||||
CURL_RUN_IFELSE([
|
||||
@@ -2429,7 +2429,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [
|
||||
fi
|
||||
#
|
||||
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
|
||||
AC_MSG_CHECKING([if inet_pton seems to work])
|
||||
CURL_RUN_IFELSE([
|
||||
@@ -4016,7 +4016,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
|
||||
fi
|
||||
#
|
||||
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
|
||||
AC_MSG_CHECKING([if strerror_r seems to work])
|
||||
CURL_RUN_IFELSE([
|
||||
@@ -4079,7 +4079,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
|
||||
fi
|
||||
#
|
||||
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
|
||||
AC_MSG_CHECKING([if strerror_r seems to work])
|
||||
CURL_RUN_IFELSE([
|
||||
@@ -4259,7 +4259,7 @@ dnl CURL_LIBRARY_PATH variable. It keeps the LD_LIBRARY_PATH
|
||||
dnl changes contained within this macro.
|
||||
|
||||
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)
|
||||
else
|
||||
oldcc=$CC
|
||||
@@ -4291,7 +4291,7 @@ AC_DEFUN([CURL_COVERAGE],[
|
||||
coverage="$enableval")
|
||||
|
||||
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)
|
||||
|
||||
if test "x$coverage" = "xyes"; then
|
||||
@@ -4390,11 +4390,11 @@ AC_DEFUN([CURL_SIZEOF], [
|
||||
r=0
|
||||
])
|
||||
dnl get out of the loop once matched
|
||||
if test $r -gt 0; then
|
||||
if test "$r" -gt 0; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test $r -eq 0; then
|
||||
if test "$r" -eq 0; then
|
||||
AC_MSG_ERROR([Failed to find size of $1])
|
||||
fi
|
||||
AC_MSG_RESULT($r)
|
||||
|
||||
@@ -27,10 +27,10 @@ dnl check for GnuTLS
|
||||
dnl ----------------------------------------------------
|
||||
|
||||
AC_DEFUN([CURL_WITH_GNUTLS], [
|
||||
if test "x$OPT_GNUTLS" != xno; then
|
||||
if test "x$OPT_GNUTLS" != "xno"; then
|
||||
ssl_msg=
|
||||
|
||||
if test X"$OPT_GNUTLS" != Xno; then
|
||||
if test "x$OPT_GNUTLS" != "xno"; then
|
||||
|
||||
addld=""
|
||||
addlib=""
|
||||
@@ -42,7 +42,7 @@ if test "x$OPT_GNUTLS" != xno; then
|
||||
dnl this is with no particular path given
|
||||
CURL_CHECK_PKGCONFIG(gnutls)
|
||||
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
if test "$PKGCONFIG" != "no"; then
|
||||
addlib=`$PKGCONFIG --libs-only-l gnutls`
|
||||
addld=`$PKGCONFIG --libs-only-L gnutls`
|
||||
addcflags=`$PKGCONFIG --cflags-only-I gnutls`
|
||||
@@ -106,7 +106,7 @@ if test "x$OPT_GNUTLS" != xno; then
|
||||
USE_GNUTLS="yes"
|
||||
ssl_msg="GnuTLS"
|
||||
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"
|
||||
@@ -115,7 +115,7 @@ if test "x$OPT_GNUTLS" != xno; then
|
||||
LDFLAGSPC="$CLEANLDFLAGSPC"
|
||||
])
|
||||
|
||||
if test "x$USE_GNUTLS" = "xyes"; then
|
||||
if test "$USE_GNUTLS" = "yes"; then
|
||||
AC_MSG_NOTICE([detected GnuTLS version $version])
|
||||
check_for_ca_bundle=1
|
||||
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 CURL_LIBRARY_PATH to prevent further configure tests to fail
|
||||
dnl due to this
|
||||
if test "x$cross_compiling" != "xyes"; then
|
||||
if test "$cross_compiling" != "yes"; then
|
||||
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
|
||||
export CURL_LIBRARY_PATH
|
||||
AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH])
|
||||
@@ -147,12 +147,12 @@ if test "$GNUTLS_ENABLED" = "1"; then
|
||||
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 test "$USE_GNUTLS_NETTLE" = ""; then
|
||||
if test -z "$USE_GNUTLS_NETTLE"; then
|
||||
|
||||
dnl this is with no particular path given
|
||||
CURL_CHECK_PKGCONFIG(nettle)
|
||||
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
if test "$PKGCONFIG" != "no"; then
|
||||
addlib=`$PKGCONFIG --libs-only-l nettle`
|
||||
addld=`$PKGCONFIG --libs-only-L nettle`
|
||||
addcflags=`$PKGCONFIG --cflags-only-I nettle`
|
||||
@@ -192,7 +192,7 @@ if test "$GNUTLS_ENABLED" = "1"; then
|
||||
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])
|
||||
fi
|
||||
else
|
||||
|
||||
@@ -27,19 +27,19 @@ dnl check for mbedTLS
|
||||
dnl ----------------------------------------------------
|
||||
AC_DEFUN([CURL_WITH_MBEDTLS], [
|
||||
|
||||
if test "x$OPT_MBEDTLS" != xno; then
|
||||
if test "x$OPT_MBEDTLS" != "xno"; then
|
||||
_cppflags=$CPPFLAGS
|
||||
_ldflags=$LDFLAGS
|
||||
_ldflagspc=$LDFLAGSPC
|
||||
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=""
|
||||
fi
|
||||
|
||||
if test -z "$OPT_MBEDTLS" ; then
|
||||
if test -z "$OPT_MBEDTLS"; then
|
||||
dnl check for lib first without setting any new path
|
||||
|
||||
AC_CHECK_LIB(mbedtls, mbedtls_havege_init,
|
||||
@@ -49,7 +49,7 @@ if test "x$OPT_MBEDTLS" != xno; then
|
||||
MBEDTLS_ENABLED=1
|
||||
USE_MBEDTLS="yes"
|
||||
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)
|
||||
fi
|
||||
|
||||
@@ -58,7 +58,7 @@ if test "x$OPT_MBEDTLS" != xno; then
|
||||
addcflags=""
|
||||
mbedtlslib=""
|
||||
|
||||
if test "x$USE_MBEDTLS" != "xyes"; then
|
||||
if test "$USE_MBEDTLS" != "yes"; then
|
||||
dnl add the path and test again
|
||||
addld=-L$OPT_MBEDTLS/lib$libsuff
|
||||
addcflags=-I$OPT_MBEDTLS/include
|
||||
@@ -76,7 +76,7 @@ if test "x$OPT_MBEDTLS" != xno; then
|
||||
MBEDTLS_ENABLED=1
|
||||
USE_MBEDTLS="yes"
|
||||
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
|
||||
@@ -85,7 +85,7 @@ if test "x$OPT_MBEDTLS" != xno; then
|
||||
], -lmbedx509 -lmbedcrypto)
|
||||
fi
|
||||
|
||||
if test "x$USE_MBEDTLS" = "xyes"; then
|
||||
if test "$USE_MBEDTLS" = "yes"; then
|
||||
AC_MSG_NOTICE([detected mbedTLS])
|
||||
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 CURL_LIBRARY_PATH to prevent further configure tests to fail
|
||||
dnl due to this
|
||||
if test "x$cross_compiling" != "xyes"; then
|
||||
if test "$cross_compiling" != "yes"; then
|
||||
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib"
|
||||
export CURL_LIBRARY_PATH
|
||||
AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH])
|
||||
|
||||
@@ -30,7 +30,7 @@ dnl Check for OpenSSL libraries and headers
|
||||
dnl **********************************************************************
|
||||
|
||||
AC_DEFUN([CURL_WITH_OPENSSL], [
|
||||
if test "x$OPT_OPENSSL" != xno; then
|
||||
if test "x$OPT_OPENSSL" != "xno"; then
|
||||
ssl_msg=
|
||||
|
||||
dnl backup the pre-ssl variables
|
||||
@@ -102,7 +102,7 @@ if test "x$OPT_OPENSSL" != xno; then
|
||||
dnl in case pkg-config comes up empty, use what we got
|
||||
dnl via --with-openssl
|
||||
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
|
||||
if test "$PREFIX_OPENSSL" != "/usr" ; then
|
||||
if test "$PREFIX_OPENSSL" != "/usr"; then
|
||||
SSL_LDFLAGS="-L$LIB_OPENSSL"
|
||||
SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
|
||||
fi
|
||||
@@ -113,7 +113,7 @@ if test "x$OPT_OPENSSL" != xno; then
|
||||
|
||||
CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
|
||||
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
if test "$PKGCONFIG" != "no"; then
|
||||
SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
|
||||
$PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
|
||||
|
||||
@@ -148,11 +148,11 @@ if test "x$OPT_OPENSSL" != xno; then
|
||||
HAVECRYPTO="yes"
|
||||
LIBS="-lcrypto $LIBS"
|
||||
],[
|
||||
if test -n "$LIB_OPENSSL" ; then
|
||||
if test -n "$LIB_OPENSSL"; then
|
||||
LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
|
||||
LDFLAGSPC="$CLEANLDFLAGSPC -L$LIB_OPENSSL"
|
||||
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
|
||||
CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include"
|
||||
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 SSL libs NOTE: it is important to do this AFTER the crypto lib
|
||||
|
||||
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
|
||||
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
|
||||
openssl/pem.h openssl/ssl.h openssl/err.h,
|
||||
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
|
||||
AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
|
||||
fi
|
||||
|
||||
if test X"$OPENSSL_ENABLED" != X"1"; then
|
||||
if test "$OPENSSL_ENABLED" != "1"; then
|
||||
LIBS="$CLEANLIBS"
|
||||
fi
|
||||
|
||||
if test X"$OPT_OPENSSL" != Xoff &&
|
||||
if test "x$OPT_OPENSSL" != "xoff" &&
|
||||
test "$OPENSSL_ENABLED" != "1"; then
|
||||
AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test X"$OPENSSL_ENABLED" = X"1"; then
|
||||
if test "$OPENSSL_ENABLED" = "1"; then
|
||||
dnl These can only exist if OpenSSL exists
|
||||
|
||||
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 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
|
||||
if test "x$cross_compiling" != "xyes"; then
|
||||
if test "$cross_compiling" != "yes"; then
|
||||
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
|
||||
export 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"
|
||||
fi
|
||||
|
||||
if test X"$OPT_OPENSSL" != Xno &&
|
||||
if test "x$OPT_OPENSSL" != "xno" &&
|
||||
test "$OPENSSL_ENABLED" != "1"; then
|
||||
AC_MSG_NOTICE([OPT_OPENSSL: $OPT_OPENSSL])
|
||||
AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED])
|
||||
@@ -389,7 +389,7 @@ if test "$OPENSSL_ENABLED" = "1"; then
|
||||
AC_ARG_ENABLE(openssl-auto-load-config,
|
||||
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]),
|
||||
[ if test X"$enableval" = X"no"; then
|
||||
[ if test "x$enableval" = "xno"; then
|
||||
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])
|
||||
fi
|
||||
|
||||
@@ -27,7 +27,7 @@ dnl ----------------------------------------------------
|
||||
dnl check for Rustls
|
||||
dnl ----------------------------------------------------
|
||||
|
||||
if test "x$OPT_RUSTLS" != xno; then
|
||||
if test "x$OPT_RUSTLS" != "xno"; then
|
||||
ssl_msg=
|
||||
|
||||
dnl backup the pre-ssl variables
|
||||
@@ -83,14 +83,14 @@ if test "x$OPT_RUSTLS" != xno; then
|
||||
CPPFLAGS="$CPPFLAGS $addcflags"
|
||||
fi
|
||||
|
||||
if test "$curl_cv_apple" = 'yes'; then
|
||||
if test "$curl_cv_apple" = "yes"; then
|
||||
RUSTLS_LDFLAGS="-framework Security -framework Foundation"
|
||||
else
|
||||
RUSTLS_LDFLAGS="-lpthread -ldl -lm"
|
||||
fi
|
||||
|
||||
LIB_RUSTLS="$PREFIX_RUSTLS/lib$libsuff"
|
||||
if test "$PREFIX_RUSTLS" != "/usr" ; then
|
||||
if test "$PREFIX_RUSTLS" != "/usr"; then
|
||||
SSL_LDFLAGS="-L$LIB_RUSTLS $RUSTLS_LDFLAGS"
|
||||
SSL_CPPFLAGS="-I$PREFIX_RUSTLS/include"
|
||||
fi
|
||||
@@ -108,7 +108,7 @@ if test "x$OPT_RUSTLS" != xno; then
|
||||
|
||||
CURL_CHECK_PKGCONFIG(rustls, [$RUSTLS_PCDIR])
|
||||
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
if test "$PKGCONFIG" != "no"; then
|
||||
SSL_LIBS=`CURL_EXPORT_PCDIR([$RUSTLS_PCDIR]) dnl
|
||||
$PKGCONFIG --libs-only-l --libs-only-other rustls 2>/dev/null`
|
||||
|
||||
@@ -136,7 +136,7 @@ if test "x$OPT_RUSTLS" != xno; then
|
||||
AC_DEFINE(USE_RUSTLS, 1, [if Rustls is enabled])
|
||||
USE_RUSTLS="yes"
|
||||
RUSTLS_ENABLED=1
|
||||
test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
|
||||
test "rustls" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
|
||||
else
|
||||
AC_MSG_ERROR([pkg-config: Could not find Rustls])
|
||||
fi
|
||||
@@ -152,7 +152,7 @@ if test "x$OPT_RUSTLS" != xno; then
|
||||
LDFLAGS="$CLEANLDFLAGS $SSL_LDFLAGS"
|
||||
LDFLAGSPC="$CLEANLDFLAGSPC $SSL_LDFLAGS"
|
||||
|
||||
if test "x$USE_RUSTLS" = "xyes"; then
|
||||
if test "$USE_RUSTLS" = "yes"; then
|
||||
AC_MSG_NOTICE([detected Rustls])
|
||||
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 CURL_LIBRARY_PATH so that further configure tests do not
|
||||
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"
|
||||
export 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
|
||||
USE_RUSTLS="yes"
|
||||
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.]),
|
||||
$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"
|
||||
|
||||
if test X"$OPT_RUSTLS" != Xno &&
|
||||
if test "x$OPT_RUSTLS" != "xno" &&
|
||||
test "$RUSTLS_ENABLED" != "1"; then
|
||||
AC_MSG_NOTICE([OPT_RUSTLS: $OPT_RUSTLS])
|
||||
AC_MSG_NOTICE([RUSTLS_ENABLED: $RUSTLS_ENABLED])
|
||||
|
||||
@@ -24,17 +24,17 @@
|
||||
|
||||
AC_DEFUN([CURL_WITH_SCHANNEL], [
|
||||
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=
|
||||
if test "x$OPT_SCHANNEL" != "xno" &&
|
||||
test "x$curl_cv_native_windows" = "xyes"; then
|
||||
if test "$curl_cv_winuwp" = 'yes'; then
|
||||
test "$curl_cv_native_windows" = "yes"; then
|
||||
if test "$curl_cv_winuwp" = "yes"; then
|
||||
AC_MSG_ERROR([UWP does not support Schannel.])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
|
||||
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
|
||||
# --with-schannel implies --enable-sspi
|
||||
AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
|
||||
|
||||
@@ -40,7 +40,7 @@ AC_MSG_CHECKING([whether to link macOS CoreFoundation, CoreServices, and SystemC
|
||||
],[
|
||||
build_for_macos="no"
|
||||
])
|
||||
if test "x$build_for_macos" != xno; then
|
||||
if test "$build_for_macos" != "no"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
SYSCONFIG_LDFLAGS='-framework CoreFoundation -framework CoreServices -framework SystemConfiguration'
|
||||
LDFLAGS="$LDFLAGS $SYSCONFIG_LDFLAGS"
|
||||
|
||||
@@ -36,14 +36,14 @@ case "$OPT_WOLFSSL" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x$OPT_WOLFSSL" != xno; then
|
||||
if test "$OPT_WOLFSSL" != "no"; then
|
||||
_cppflags=$CPPFLAGS
|
||||
_ldflags=$LDFLAGS
|
||||
_ldflagspc=$LDFLAGSPC
|
||||
|
||||
ssl_msg=
|
||||
|
||||
if test X"$OPT_WOLFSSL" != Xno; then
|
||||
if test "$OPT_WOLFSSL" != "no"; then
|
||||
|
||||
if test "$OPT_WOLFSSL" = "yes"; then
|
||||
OPT_WOLFSSL=""
|
||||
@@ -56,7 +56,7 @@ if test "x$OPT_WOLFSSL" != xno; then
|
||||
addld=""
|
||||
addlib=""
|
||||
addcflags=""
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
if test "$PKGCONFIG" != "no"; then
|
||||
addlib=`CURL_EXPORT_PCDIR([$wolfpkg])
|
||||
$PKGCONFIG --libs-only-l wolfssl`
|
||||
addld=`CURL_EXPORT_PCDIR([$wolfpkg])
|
||||
@@ -76,13 +76,13 @@ if test "x$OPT_WOLFSSL" != xno; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$curl_cv_apple" = 'yes'; then
|
||||
if test "$curl_cv_apple" = "yes"; then
|
||||
addlib="$addlib -framework Security -framework CoreFoundation"
|
||||
else
|
||||
addlib="$addlib -lm"
|
||||
fi
|
||||
|
||||
if test "x$USE_WOLFSSL" != "xyes"; then
|
||||
if test "$USE_WOLFSSL" != "yes"; then
|
||||
|
||||
LDFLAGS="$LDFLAGS $addld"
|
||||
LDFLAGSPC="$LDFLAGSPC $addld"
|
||||
@@ -114,7 +114,7 @@ if test "x$OPT_WOLFSSL" != xno; then
|
||||
WOLFSSL_ENABLED=1
|
||||
USE_WOLFSSL="yes"
|
||||
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)
|
||||
@@ -126,7 +126,7 @@ if test "x$OPT_WOLFSSL" != xno; then
|
||||
LIBS="$my_ac_save_LIBS"
|
||||
fi
|
||||
|
||||
if test "x$USE_WOLFSSL" = "xyes"; then
|
||||
if test "$USE_WOLFSSL" = "yes"; then
|
||||
AC_MSG_NOTICE([detected wolfSSL])
|
||||
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 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
|
||||
fi
|
||||
|
||||
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
|
||||
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 CURL_LIBRARY_PATH to prevent further configure tests to fail
|
||||
dnl due to this
|
||||
if test "x$cross_compiling" != "xyes"; then
|
||||
if test "$cross_compiling" != "yes"; then
|
||||
CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath"
|
||||
export CURL_LIBRARY_PATH
|
||||
AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH])
|
||||
|
||||
@@ -59,8 +59,8 @@ case "x$enable_static" in @%:@ (
|
||||
xc_lt_want_enable_static='no'
|
||||
;;
|
||||
esac
|
||||
if test "x$xc_lt_want_enable_shared" = 'xno' &&
|
||||
test "x$xc_lt_want_enable_static" = 'xno'; then
|
||||
if test "$xc_lt_want_enable_shared" = "no" &&
|
||||
test "$xc_lt_want_enable_static" = "no"; then
|
||||
AC_MSG_ERROR([can not disable shared and static libraries simultaneously])
|
||||
fi
|
||||
|
||||
@@ -71,8 +71,8 @@ fi
|
||||
# must be used in order to build a proper static library.
|
||||
#
|
||||
|
||||
if test "x$xc_lt_want_enable_shared" = 'xyes' &&
|
||||
test "x$xc_lt_want_enable_static" = 'xyes'; then
|
||||
if test "$xc_lt_want_enable_shared" = "yes" &&
|
||||
test "$xc_lt_want_enable_static" = "yes"; then
|
||||
case $host_os in @%:@ (
|
||||
os2* | aix*)
|
||||
xc_lt_want_enable_static='no'
|
||||
@@ -117,7 +117,7 @@ esac
|
||||
# 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 @%:@ (
|
||||
x86_64 | amd64 | ia64)
|
||||
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])
|
||||
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'
|
||||
fi
|
||||
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])
|
||||
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'
|
||||
elif test "x$allow_undefined_flag" = 'xunsupported'; then
|
||||
elif test "x$allow_undefined_flag" = "xunsupported"; then
|
||||
xc_lt_shlib_use_no_undefined='yes'
|
||||
fi
|
||||
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'
|
||||
case $host_os in @%:@ (
|
||||
solaris2*)
|
||||
if test "x$GCC" = 'xyes'; then
|
||||
if test "x$GCC" = "xyes"; then
|
||||
xc_lt_shlib_use_mimpure_text='yes'
|
||||
fi
|
||||
;;
|
||||
@@ -367,8 +367,8 @@ m4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION],
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([whether to build shared libraries only])
|
||||
if test "$xc_lt_build_shared" = 'yes' &&
|
||||
test "$xc_lt_build_static" = 'no'; then
|
||||
if test "$xc_lt_build_shared" = "yes" &&
|
||||
test "$xc_lt_build_static" = "no"; then
|
||||
xc_lt_build_shared_only='yes'
|
||||
else
|
||||
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])
|
||||
if test "$xc_lt_build_static" = 'yes' &&
|
||||
test "$xc_lt_build_shared" = 'no'; then
|
||||
if test "$xc_lt_build_static" = "yes" &&
|
||||
test "$xc_lt_build_shared" = "no"; then
|
||||
xc_lt_build_static_only='yes'
|
||||
else
|
||||
xc_lt_build_static_only='no'
|
||||
|
||||
@@ -39,7 +39,7 @@ AC_DEFUN([_XC_CHECK_VAR_LIBS], [
|
||||
;;
|
||||
esac
|
||||
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([LIBS note: LIBS should only be used to specify libraries (-lname).])
|
||||
fi
|
||||
@@ -68,7 +68,7 @@ AC_DEFUN([_XC_CHECK_VAR_LDFLAGS], [
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if test $xc_bad_var_ldflags = yes; then
|
||||
if test "$xc_bad_var_ldflags" = "yes"; then
|
||||
AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS])
|
||||
xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not"
|
||||
for xc_word in $LDFLAGS; do
|
||||
@@ -110,7 +110,7 @@ AC_DEFUN([_XC_CHECK_VAR_CPPFLAGS], [
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if test $xc_bad_var_cppflags = yes; then
|
||||
if test "$xc_bad_var_cppflags" = "yes"; then
|
||||
AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS])
|
||||
xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not"
|
||||
for xc_word in $CPPFLAGS; do
|
||||
@@ -158,7 +158,7 @@ AC_DEFUN([_XC_CHECK_VAR_CFLAGS], [
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if test $xc_bad_var_cflags = yes; then
|
||||
if test "$xc_bad_var_cflags" = "yes"; then
|
||||
AC_MSG_NOTICE([using CFLAGS: $CFLAGS])
|
||||
xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not"
|
||||
for xc_word in $CFLAGS; do
|
||||
@@ -207,10 +207,10 @@ AC_DEFUN([XC_CHECK_USER_FLAGS], [
|
||||
_XC_CHECK_VAR_LDFLAGS
|
||||
_XC_CHECK_VAR_CPPFLAGS
|
||||
_XC_CHECK_VAR_CFLAGS
|
||||
if test $xc_bad_var_libs = yes ||
|
||||
test $xc_bad_var_cflags = yes ||
|
||||
test $xc_bad_var_ldflags = yes ||
|
||||
test $xc_bad_var_cppflags = yes; then
|
||||
if test "$xc_bad_var_libs" = "yes" ||
|
||||
test "$xc_bad_var_cflags" = "yes" ||
|
||||
test "$xc_bad_var_ldflags" = "yes" ||
|
||||
test "$xc_bad_var_cppflags" = "yes"; then
|
||||
AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.])
|
||||
fi
|
||||
])
|
||||
@@ -235,10 +235,10 @@ AC_DEFUN([XC_CHECK_BUILD_FLAGS], [
|
||||
_XC_CHECK_VAR_LDFLAGS
|
||||
_XC_CHECK_VAR_CPPFLAGS
|
||||
_XC_CHECK_VAR_CFLAGS
|
||||
if test $xc_bad_var_libs = yes ||
|
||||
test $xc_bad_var_cflags = yes ||
|
||||
test $xc_bad_var_ldflags = yes ||
|
||||
test $xc_bad_var_cppflags = yes; then
|
||||
if test "$xc_bad_var_libs" = "yes" ||
|
||||
test "$xc_bad_var_cflags" = "yes" ||
|
||||
test "$xc_bad_var_ldflags" = "yes" ||
|
||||
test "$xc_bad_var_cppflags" = "yes"; then
|
||||
AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -393,7 +393,7 @@ done
|
||||
IFS=$xc_tst_prev_IFS
|
||||
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
|
||||
# chose one over the other, and consider auto-detection not possible.
|
||||
if test -z "$PATH_SEPARATOR"; then
|
||||
@@ -404,7 +404,7 @@ if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then
|
||||
fi
|
||||
else
|
||||
# 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=';'
|
||||
else
|
||||
xc_tst_auto_separator=':'
|
||||
|
||||
Reference in New Issue
Block a user