Replace AC_TRY_COMPILE obsoleted in autoconf 2.70.

Replace with the equivalent AC_COMPILE_IFELSE.
This commit is contained in:
Darren Tucker 2020-11-06 13:56:41 +11:00
parent 771b7795c0
commit a019e353df
1 changed files with 9 additions and 8 deletions

View File

@ -171,14 +171,15 @@ AC_DEFUN([TYPE_SOCKLEN_T],
curl_cv_socklen_t_equiv= curl_cv_socklen_t_equiv=
for arg2 in "struct sockaddr" void; do for arg2 in "struct sockaddr" void; do
for t in int size_t unsigned long "unsigned long"; do for t in int size_t unsigned long "unsigned long"; do
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([
#include <sys/types.h> AC_LANG_PROGRAM([[
#include <sys/socket.h> #include <sys/types.h>
#include <sys/socket.h>
int getpeername (int, $arg2 *, $t *); int getpeername (int, $arg2 *, $t *);
],[ ]], [[
$t len; $t len;
getpeername(0,0,&len); getpeername(0,0,&len);
]])
],[ ],[
curl_cv_socklen_t_equiv="$t" curl_cv_socklen_t_equiv="$t"
break break