1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 14:05:03 -05:00

configure: make AC_TRY_* into AC_*_IFELSE

... as the former versions are deprecated.
This commit is contained in:
Daniel Stenberg 2021-03-15 23:11:29 +01:00
parent a59f046116
commit d2ea5d166e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1321,7 +1321,8 @@ AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
;; ;;
esac ], esac ],
AC_TRY_RUN([ /* are AF_INET6 and sockaddr_in6 available? */ AC_RUN_IFELSE([AC_LANG_SOURCE([[
/* are AF_INET6 and sockaddr_in6 available? */
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_WINSOCK2_H #ifdef HAVE_WINSOCK2_H
#include <winsock2.h> #include <winsock2.h>
@ -1343,6 +1344,7 @@ main()
else else
exit(0); exit(0);
} }
]])
], ],
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
ipv6=yes, ipv6=yes,
@ -1359,7 +1361,7 @@ if test "$ipv6" = yes; then
AC_SUBST(IPV6_ENABLED) AC_SUBST(IPV6_ENABLED)
AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member]) AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_WINSOCK2_H #ifdef HAVE_WINSOCK2_H
#include <winsock2.h> #include <winsock2.h>
@ -1369,14 +1371,16 @@ if test "$ipv6" = yes; then
#if defined (__TANDEM) #if defined (__TANDEM)
# include <netinet/in6.h> # include <netinet/in6.h>
#endif #endif
#endif] , #endif
struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes) ]], [[
if test "$have_sin6_scope_id" = yes; then struct sockaddr_in6 s;
s.sin6_scope_id = 0;
]])], [
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member]) AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
else ], [
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi ])
fi fi
dnl ********************************************************************** dnl **********************************************************************
@ -1751,9 +1755,13 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
AC_MSG_CHECKING([for gdi32]) AC_MSG_CHECKING([for gdi32])
my_ac_save_LIBS=$LIBS my_ac_save_LIBS=$LIBS
LIBS="-lgdi32 $LIBS" LIBS="-lgdi32 $LIBS"
AC_TRY_LINK([#include <windef.h> AC_LINK_IFELSE([ AC_LANG_PROGRAM([[
#include <wingdi.h>], #include <windef.h>
[GdiFlush();], #include <wingdi.h>
]],
[[
GdiFlush();
]])],
[ dnl worked! [ dnl worked!
AC_MSG_RESULT([yes])], AC_MSG_RESULT([yes])],
[ dnl failed, restore LIBS [ dnl failed, restore LIBS
@ -1857,13 +1865,11 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
dnl still no, but what about with -ldl? dnl still no, but what about with -ldl?
AC_MSG_CHECKING([OpenSSL linking with -ldl]) AC_MSG_CHECKING([OpenSSL linking with -ldl])
LIBS="$CLEANLIBS -lcrypto -ldl" LIBS="$CLEANLIBS -lcrypto -ldl"
AC_TRY_LINK( AC_LINK_IFELSE([ AC_LANG_PROGRAM([[
[
#include <openssl/err.h> #include <openssl/err.h>
], ]], [[
[
ERR_clear_error(); ERR_clear_error();
], ]]) ],
[ [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
HAVECRYPTO="yes" HAVECRYPTO="yes"
@ -1875,13 +1881,12 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread]) AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
LIBS="$CLEANLIBS -lcrypto -ldl -lpthread" LIBS="$CLEANLIBS -lcrypto -ldl -lpthread"
AC_TRY_LINK( AC_LINK_IFELSE([
[ AC_LANG_PROGRAM([[
#include <openssl/err.h> #include <openssl/err.h>
], ]], [[
[
ERR_clear_error(); ERR_clear_error();
], ]])],
[ [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
HAVECRYPTO="yes" HAVECRYPTO="yes"