mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
No longer break out of a shell "for" statement from inside
AC_FOO_IFELSE macros, otherwise temp files are not removed. Identation adjustment.
This commit is contained in:
parent
2597020d22
commit
24d41452b0
5
CHANGES
5
CHANGES
@ -6,6 +6,11 @@
|
||||
|
||||
Changelog
|
||||
|
||||
Yang Tse (18 Jun 2008)
|
||||
- Internal configure script improvement. No longer break out of shell "for"
|
||||
statements from inside AC_FOO_IFELSE macros, otherwise temporary macro files
|
||||
are not properly removed.
|
||||
|
||||
Daniel Fandrich (12 Jun 2008)
|
||||
- Fixed curl-config --ca which wasn't being exported by configure.
|
||||
|
||||
|
325
acinclude.m4
325
acinclude.m4
@ -554,13 +554,14 @@ AC_DEFUN([CURL_CHECK_LIBS_WINLDAP], [
|
||||
#
|
||||
for x_nlibs in '' "$u_libs" \
|
||||
'-lwldap32' ; do
|
||||
if test -z "$x_nlibs"; then
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
else
|
||||
LIBS="$x_nlibs $curl_cv_save_LIBS"
|
||||
fi
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_ldap_LIBS" = "unknown"; then
|
||||
if test -z "$x_nlibs"; then
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
else
|
||||
LIBS="$x_nlibs $curl_cv_save_LIBS"
|
||||
fi
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -574,17 +575,17 @@ AC_DEFUN([CURL_CHECK_LIBS_WINLDAP], [
|
||||
#include <winber.h>
|
||||
#endif
|
||||
#endif
|
||||
]],[[
|
||||
BERVAL *bvp = NULL;
|
||||
BerElement *bep = ber_init(bvp);
|
||||
LDAP *ldp = ldap_init("dummy", LDAP_PORT);
|
||||
ULONG res = ldap_unbind(ldp);
|
||||
ber_free(bep, 1);
|
||||
]])
|
||||
],[
|
||||
curl_cv_ldap_LIBS="$x_nlibs"
|
||||
break
|
||||
])
|
||||
]],[[
|
||||
BERVAL *bvp = NULL;
|
||||
BerElement *bep = ber_init(bvp);
|
||||
LDAP *ldp = ldap_init("dummy", LDAP_PORT);
|
||||
ULONG res = ldap_unbind(ldp);
|
||||
ber_free(bep, 1);
|
||||
]])
|
||||
],[
|
||||
curl_cv_ldap_LIBS="$x_nlibs"
|
||||
])
|
||||
fi
|
||||
done
|
||||
#
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
@ -651,13 +652,14 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
|
||||
'-lldap -llber' \
|
||||
'-lldapssl -lldapx -lldapsdk' \
|
||||
'-lldapsdk -lldapx -lldapssl' ; do
|
||||
if test -z "$x_nlibs"; then
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
else
|
||||
LIBS="$x_nlibs $curl_cv_save_LIBS"
|
||||
fi
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_ldap_LIBS" = "unknown"; then
|
||||
if test -z "$x_nlibs"; then
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
else
|
||||
LIBS="$x_nlibs $curl_cv_save_LIBS"
|
||||
fi
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -681,17 +683,17 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
|
||||
#ifdef HAVE_LDAP_H
|
||||
#include <ldap.h>
|
||||
#endif
|
||||
]],[[
|
||||
BerValue *bvp = NULL;
|
||||
BerElement *bep = ber_init(bvp);
|
||||
LDAP *ldp = ldap_init("dummy", LDAP_PORT);
|
||||
int res = ldap_unbind(ldp);
|
||||
ber_free(bep, 1);
|
||||
]])
|
||||
],[
|
||||
curl_cv_ldap_LIBS="$x_nlibs"
|
||||
break
|
||||
])
|
||||
]],[[
|
||||
BerValue *bvp = NULL;
|
||||
BerElement *bep = ber_init(bvp);
|
||||
LDAP *ldp = ldap_init("dummy", LDAP_PORT);
|
||||
int res = ldap_unbind(ldp);
|
||||
ber_free(bep, 1);
|
||||
]])
|
||||
],[
|
||||
curl_cv_ldap_LIBS="$x_nlibs"
|
||||
])
|
||||
fi
|
||||
done
|
||||
#
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
@ -782,8 +784,9 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
||||
for arg1 in 'int' 'SOCKET'; do
|
||||
for arg2 in "struct sockaddr" void; do
|
||||
for t in int size_t unsigned long "unsigned long"; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_socklen_t_equiv" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -807,15 +810,15 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
||||
#endif
|
||||
#define GETPEERNCALLCONV
|
||||
#endif
|
||||
extern int GETPEERNCALLCONV getpeername ($arg1, $arg2 *, $t *);
|
||||
]],[[
|
||||
$t len=0;
|
||||
getpeername(0,0,&len);
|
||||
]])
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
break 3
|
||||
])
|
||||
extern int GETPEERNCALLCONV getpeername($arg1, $arg2 *, $t *);
|
||||
]],[[
|
||||
$t len=0;
|
||||
getpeername(0,0,&len);
|
||||
]])
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
@ -944,8 +947,9 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
|
||||
for gni_arg2 in 'socklen_t' 'size_t' 'int'; do
|
||||
for gni_arg46 in 'size_t' 'int' 'socklen_t' 'unsigned int' 'DWORD'; do
|
||||
for gni_arg7 in 'int' 'unsigned int'; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_func_getnameinfo_args" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -975,21 +979,21 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
|
||||
#endif
|
||||
#define GNICALLCONV
|
||||
#endif
|
||||
extern int GNICALLCONV getnameinfo($gni_arg1, $gni_arg2,
|
||||
char *, $gni_arg46,
|
||||
char *, $gni_arg46,
|
||||
$gni_arg7);
|
||||
]],[[
|
||||
$gni_arg2 salen=0;
|
||||
$gni_arg46 hostlen=0;
|
||||
$gni_arg46 servlen=0;
|
||||
$gni_arg7 flags=0;
|
||||
int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7"
|
||||
break 4
|
||||
])
|
||||
extern int GNICALLCONV getnameinfo($gni_arg1, $gni_arg2,
|
||||
char *, $gni_arg46,
|
||||
char *, $gni_arg46,
|
||||
$gni_arg7);
|
||||
]],[[
|
||||
$gni_arg2 salen=0;
|
||||
$gni_arg46 hostlen=0;
|
||||
$gni_arg46 servlen=0;
|
||||
$gni_arg7 flags=0;
|
||||
int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
@ -1249,8 +1253,9 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
|
||||
for recv_arg2 in 'char *' 'void *'; do
|
||||
for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
|
||||
for recv_arg4 in 'int' 'unsigned int'; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_func_recv_args" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -1274,18 +1279,19 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
|
||||
#endif
|
||||
#define RECVCALLCONV
|
||||
#endif
|
||||
extern $recv_retv RECVCALLCONV recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
|
||||
]],[[
|
||||
$recv_arg1 s=0;
|
||||
$recv_arg2 buf=0;
|
||||
$recv_arg3 len=0;
|
||||
$recv_arg4 flags=0;
|
||||
$recv_retv res = recv(s, buf, len, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
|
||||
break 5
|
||||
])
|
||||
extern $recv_retv RECVCALLCONV
|
||||
recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
|
||||
]],[[
|
||||
$recv_arg1 s=0;
|
||||
$recv_arg2 buf=0;
|
||||
$recv_arg3 len=0;
|
||||
$recv_arg4 flags=0;
|
||||
$recv_retv res = recv(s, buf, len, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
@ -1381,8 +1387,9 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
|
||||
for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do
|
||||
for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
|
||||
for send_arg4 in 'int' 'unsigned int'; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_func_send_args" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -1406,17 +1413,18 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
|
||||
#endif
|
||||
#define SENDCALLCONV
|
||||
#endif
|
||||
extern $send_retv SENDCALLCONV send($send_arg1, $send_arg2, $send_arg3, $send_arg4);
|
||||
]],[[
|
||||
$send_arg1 s=0;
|
||||
$send_arg3 len=0;
|
||||
$send_arg4 flags=0;
|
||||
$send_retv res = send(s, 0, len, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
|
||||
break 5
|
||||
])
|
||||
extern $send_retv SENDCALLCONV
|
||||
send($send_arg1, $send_arg2, $send_arg3, $send_arg4);
|
||||
]],[[
|
||||
$send_arg1 s=0;
|
||||
$send_arg3 len=0;
|
||||
$send_arg4 flags=0;
|
||||
$send_retv res = send(s, 0, len, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
@ -1789,16 +1797,17 @@ dnl TYPE_IN_ADDR_T
|
||||
dnl -------------------------------------------------
|
||||
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
|
||||
dnl and a few other things.
|
||||
AC_DEFUN([TYPE_IN_ADDR_T],
|
||||
[
|
||||
AC_CHECK_TYPE([in_addr_t], ,[
|
||||
AC_MSG_CHECKING([for in_addr_t equivalent])
|
||||
AC_CACHE_VAL([curl_cv_in_addr_t_equiv],
|
||||
[
|
||||
curl_cv_in_addr_t_equiv=
|
||||
for t in "unsigned long" int size_t unsigned long; do
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
|
||||
AC_DEFUN([TYPE_IN_ADDR_T], [
|
||||
AC_CHECK_TYPE([in_addr_t], ,[
|
||||
dnl in_addr_t not available
|
||||
AC_CACHE_CHECK([for in_addr_t equivalent],
|
||||
[curl_cv_in_addr_t_equiv], [
|
||||
curl_cv_in_addr_t_equiv="unknown"
|
||||
for t in "unsigned long" int size_t unsigned long; do
|
||||
if test "$curl_cv_in_addr_t_equiv" = "unknown"; then
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -1826,23 +1835,25 @@ AC_DEFUN([TYPE_IN_ADDR_T],
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#endif
|
||||
]],[[
|
||||
$t data = inet_addr ("1.2.3.4");
|
||||
]])
|
||||
],[
|
||||
curl_cv_in_addr_t_equiv="$t"
|
||||
break
|
||||
])
|
||||
done
|
||||
|
||||
if test "x$curl_cv_in_addr_t_equiv" = x; then
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($curl_cv_in_addr_t_equiv)
|
||||
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
||||
[type to use in place of in_addr_t if not defined])],
|
||||
[
|
||||
]],[[
|
||||
$t data = inet_addr ("1.2.3.4");
|
||||
]])
|
||||
],[
|
||||
curl_cv_in_addr_t_equiv="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
])
|
||||
case "$curl_cv_in_addr_t_equiv" in
|
||||
unknown)
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
||||
[Type to use in place of in_addr_t when system does not provide it.])
|
||||
;;
|
||||
esac
|
||||
],[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -1873,6 +1884,7 @@ AC_DEFUN([TYPE_IN_ADDR_T],
|
||||
]) dnl AC_CHECK_TYPE
|
||||
]) dnl AC_DEFUN
|
||||
|
||||
|
||||
dnl CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC
|
||||
dnl -------------------------------------------------
|
||||
dnl Check if monotonic clock_gettime is available.
|
||||
@ -1911,6 +1923,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
|
||||
dnl postponed until library linking checks for clock_gettime pass.
|
||||
]) dnl AC_DEFUN
|
||||
|
||||
|
||||
dnl CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
|
||||
dnl -------------------------------------------------
|
||||
dnl If monotonic clock_gettime is available then,
|
||||
@ -1927,13 +1940,14 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
curl_cv_gclk_LIBS="unknown"
|
||||
#
|
||||
for x_xlibs in '' '-lrt' '-lposix4' ; do
|
||||
if test -z "$x_xlibs"; then
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
else
|
||||
LIBS="$x_xlibs $curl_cv_save_LIBS"
|
||||
fi
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_gclk_LIBS" = "unknown"; then
|
||||
if test -z "$x_xlibs"; then
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
else
|
||||
LIBS="$x_xlibs $curl_cv_save_LIBS"
|
||||
fi
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@ -1947,14 +1961,14 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
]],[[
|
||||
struct timespec ts;
|
||||
(void)clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
]])
|
||||
],[
|
||||
curl_cv_gclk_LIBS="$x_xlibs"
|
||||
break
|
||||
])
|
||||
]],[[
|
||||
struct timespec ts;
|
||||
(void)clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
]])
|
||||
],[
|
||||
curl_cv_gclk_LIBS="$x_xlibs"
|
||||
])
|
||||
fi
|
||||
done
|
||||
#
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
@ -2065,8 +2079,9 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
|
||||
for sel_arg1 in 'int' 'ssize_t' 'size_t' 'unsigned long int' 'unsigned int'; do
|
||||
for sel_arg234 in 'fd_set *' 'int *' 'void *'; do
|
||||
for sel_arg5 in 'struct timeval *' 'const struct timeval *'; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_func_select_args" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -2105,27 +2120,27 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
|
||||
#define SELECTCALLCONV
|
||||
#endif
|
||||
#ifndef HAVE_STRUCT_TIMEVAL
|
||||
struct timeval {
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
struct timeval {
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
#endif
|
||||
extern $sel_retv SELECTCALLCONV select($sel_arg1,
|
||||
$sel_arg234,
|
||||
$sel_arg234,
|
||||
$sel_arg234,
|
||||
$sel_arg5);
|
||||
]],[[
|
||||
$sel_arg1 nfds=0;
|
||||
$sel_arg234 rfds=0;
|
||||
$sel_arg234 wfds=0;
|
||||
$sel_arg234 efds=0;
|
||||
$sel_retv res = select(nfds, rfds, wfds, efds, 0);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_select_args="$sel_arg1,$sel_arg234,$sel_arg5,$sel_retv"
|
||||
break 4
|
||||
])
|
||||
extern $sel_retv SELECTCALLCONV select($sel_arg1,
|
||||
$sel_arg234,
|
||||
$sel_arg234,
|
||||
$sel_arg234,
|
||||
$sel_arg5);
|
||||
]],[[
|
||||
$sel_arg1 nfds=0;
|
||||
$sel_arg234 rfds=0;
|
||||
$sel_arg234 wfds=0;
|
||||
$sel_arg234 efds=0;
|
||||
$sel_retv res = select(nfds, rfds, wfds, efds, 0);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_select_args="$sel_arg1,$sel_arg234,$sel_arg5,$sel_retv"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
|
@ -251,8 +251,9 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
||||
for arg1 in 'int' 'SOCKET'; do
|
||||
for arg2 in "struct sockaddr" void; do
|
||||
for t in int size_t unsigned long "unsigned long"; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_socklen_t_equiv" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -276,15 +277,15 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
||||
#endif
|
||||
#define GETPEERNCALLCONV
|
||||
#endif
|
||||
extern int GETPEERNCALLCONV getpeername ($arg1, $arg2 *, $t *);
|
||||
]],[[
|
||||
$t len=0;
|
||||
getpeername(0,0,&len);
|
||||
]])
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
break 3
|
||||
])
|
||||
extern int GETPEERNCALLCONV getpeername($arg1, $arg2 *, $t *);
|
||||
]],[[
|
||||
$t len=0;
|
||||
getpeername(0,0,&len);
|
||||
]])
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
@ -413,8 +414,9 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
|
||||
for gni_arg2 in 'socklen_t' 'size_t' 'int'; do
|
||||
for gni_arg46 in 'size_t' 'int' 'socklen_t' 'unsigned int' 'DWORD'; do
|
||||
for gni_arg7 in 'int' 'unsigned int'; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_func_getnameinfo_args" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -444,21 +446,21 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
|
||||
#endif
|
||||
#define GNICALLCONV
|
||||
#endif
|
||||
extern int GNICALLCONV getnameinfo($gni_arg1, $gni_arg2,
|
||||
char *, $gni_arg46,
|
||||
char *, $gni_arg46,
|
||||
$gni_arg7);
|
||||
]],[[
|
||||
$gni_arg2 salen=0;
|
||||
$gni_arg46 hostlen=0;
|
||||
$gni_arg46 servlen=0;
|
||||
$gni_arg7 flags=0;
|
||||
int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7"
|
||||
break 4
|
||||
])
|
||||
extern int GNICALLCONV getnameinfo($gni_arg1, $gni_arg2,
|
||||
char *, $gni_arg46,
|
||||
char *, $gni_arg46,
|
||||
$gni_arg7);
|
||||
]],[[
|
||||
$gni_arg2 salen=0;
|
||||
$gni_arg46 hostlen=0;
|
||||
$gni_arg46 servlen=0;
|
||||
$gni_arg7 flags=0;
|
||||
int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
@ -718,8 +720,9 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
|
||||
for recv_arg2 in 'char *' 'void *'; do
|
||||
for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
|
||||
for recv_arg4 in 'int' 'unsigned int'; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_func_recv_args" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -743,18 +746,19 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
|
||||
#endif
|
||||
#define RECVCALLCONV
|
||||
#endif
|
||||
extern $recv_retv RECVCALLCONV recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
|
||||
]],[[
|
||||
$recv_arg1 s=0;
|
||||
$recv_arg2 buf=0;
|
||||
$recv_arg3 len=0;
|
||||
$recv_arg4 flags=0;
|
||||
$recv_retv res = recv(s, buf, len, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
|
||||
break 5
|
||||
])
|
||||
extern $recv_retv RECVCALLCONV
|
||||
recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
|
||||
]],[[
|
||||
$recv_arg1 s=0;
|
||||
$recv_arg2 buf=0;
|
||||
$recv_arg3 len=0;
|
||||
$recv_arg4 flags=0;
|
||||
$recv_retv res = recv(s, buf, len, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
@ -850,8 +854,9 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
|
||||
for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do
|
||||
for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
|
||||
for send_arg4 in 'int' 'unsigned int'; do
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_func_send_args" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -875,17 +880,18 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
|
||||
#endif
|
||||
#define SENDCALLCONV
|
||||
#endif
|
||||
extern $send_retv SENDCALLCONV send($send_arg1, $send_arg2, $send_arg3, $send_arg4);
|
||||
]],[[
|
||||
$send_arg1 s=0;
|
||||
$send_arg3 len=0;
|
||||
$send_arg4 flags=0;
|
||||
$send_retv res = send(s, 0, len, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
|
||||
break 5
|
||||
])
|
||||
extern $send_retv SENDCALLCONV
|
||||
send($send_arg1, $send_arg2, $send_arg3, $send_arg4);
|
||||
]],[[
|
||||
$send_arg1 s=0;
|
||||
$send_arg3 len=0;
|
||||
$send_arg4 flags=0;
|
||||
$send_retv res = send(s, 0, len, flags);
|
||||
]])
|
||||
],[
|
||||
curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
@ -1258,16 +1264,17 @@ dnl TYPE_IN_ADDR_T
|
||||
dnl -------------------------------------------------
|
||||
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
|
||||
dnl and a few other things.
|
||||
AC_DEFUN([TYPE_IN_ADDR_T],
|
||||
[
|
||||
AC_CHECK_TYPE([in_addr_t], ,[
|
||||
AC_MSG_CHECKING([for in_addr_t equivalent])
|
||||
AC_CACHE_VAL([curl_cv_in_addr_t_equiv],
|
||||
[
|
||||
curl_cv_in_addr_t_equiv=
|
||||
for t in "unsigned long" int size_t unsigned long; do
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
|
||||
AC_DEFUN([TYPE_IN_ADDR_T], [
|
||||
AC_CHECK_TYPE([in_addr_t], ,[
|
||||
dnl in_addr_t not available
|
||||
AC_CACHE_CHECK([for in_addr_t equivalent],
|
||||
[curl_cv_in_addr_t_equiv], [
|
||||
curl_cv_in_addr_t_equiv="unknown"
|
||||
for t in "unsigned long" int size_t unsigned long; do
|
||||
if test "$curl_cv_in_addr_t_equiv" = "unknown"; then
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -1295,23 +1302,25 @@ AC_DEFUN([TYPE_IN_ADDR_T],
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#endif
|
||||
]],[[
|
||||
$t data = inet_addr ("1.2.3.4");
|
||||
]])
|
||||
],[
|
||||
curl_cv_in_addr_t_equiv="$t"
|
||||
break
|
||||
])
|
||||
done
|
||||
|
||||
if test "x$curl_cv_in_addr_t_equiv" = x; then
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($curl_cv_in_addr_t_equiv)
|
||||
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
||||
[type to use in place of in_addr_t if not defined])],
|
||||
[
|
||||
]],[[
|
||||
$t data = inet_addr ("1.2.3.4");
|
||||
]])
|
||||
],[
|
||||
curl_cv_in_addr_t_equiv="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
])
|
||||
case "$curl_cv_in_addr_t_equiv" in
|
||||
unknown)
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
||||
[Type to use in place of in_addr_t when system does not provide it.])
|
||||
;;
|
||||
esac
|
||||
],[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -1342,6 +1351,7 @@ AC_DEFUN([TYPE_IN_ADDR_T],
|
||||
]) dnl AC_CHECK_TYPE
|
||||
]) dnl AC_DEFUN
|
||||
|
||||
|
||||
dnl CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC
|
||||
dnl -------------------------------------------------
|
||||
dnl Check if monotonic clock_gettime is available.
|
||||
@ -1380,6 +1390,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
|
||||
dnl postponed until library linking checks for clock_gettime pass.
|
||||
]) dnl AC_DEFUN
|
||||
|
||||
|
||||
dnl CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
|
||||
dnl -------------------------------------------------
|
||||
dnl If monotonic clock_gettime is available then,
|
||||
@ -1396,13 +1407,14 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
curl_cv_gclk_LIBS="unknown"
|
||||
#
|
||||
for x_xlibs in '' '-lrt' '-lposix4' ; do
|
||||
if test -z "$x_xlibs"; then
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
else
|
||||
LIBS="$x_xlibs $curl_cv_save_LIBS"
|
||||
fi
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
if test "$curl_cv_gclk_LIBS" = "unknown"; then
|
||||
if test -z "$x_xlibs"; then
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
else
|
||||
LIBS="$x_xlibs $curl_cv_save_LIBS"
|
||||
fi
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@ -1416,14 +1428,14 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
]],[[
|
||||
struct timespec ts;
|
||||
(void)clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
]])
|
||||
],[
|
||||
curl_cv_gclk_LIBS="$x_xlibs"
|
||||
break
|
||||
])
|
||||
]],[[
|
||||
struct timespec ts;
|
||||
(void)clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
]])
|
||||
],[
|
||||
curl_cv_gclk_LIBS="$x_xlibs"
|
||||
])
|
||||
fi
|
||||
done
|
||||
#
|
||||
LIBS="$curl_cv_save_LIBS"
|
||||
@ -1460,6 +1472,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
#
|
||||
]) dnl AC_DEFUN
|
||||
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl CURL_DETECT_ICC ([ACTION-IF-YES])
|
||||
dnl
|
||||
|
Loading…
Reference in New Issue
Block a user