AC_PREPROC_IFELSE([
AC_LANG_SOURCE(
ifelse($2,,,[$2])[[
-#ifdef $1
-CURL_DEF_TOKEN $1
-#endif
+ #ifdef $1
+ CURL_DEF_TOKEN $1
+ #endif
]])
],[
tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
AC_COMPILE_IFELSE([
AC_LANG_SOURCE(
ifelse($2,,,[$2])[[
-int main (void)
-{
-#ifdef $1
- return 0;
-#else
- #error force compilation error
-#endif
-}
+ int main(void)
+ {
+ #ifdef $1
+ return 0;
+ #else
+ #error force compilation error
+ #endif
+ }
]])
],[
tst_symbol_defined="yes"
tst_lib_xnet_required="no"
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([[
-int main (void)
-{
-#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)
- return 0;
-#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
- return 0;
-#else
- #error force compilation error
-#endif
-}
+ int main(void)
+ {
+ #if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)
+ return 0;
+ #elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
+ return 0;
+ #else
+ #error force compilation error
+ #endif
+ }
]])
],[
tst_lib_xnet_required="yes"
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
-#ifdef _WIN32
- int dummy=1;
-#else
- #error Not a native Windows build target.
-#endif
+ #ifdef _WIN32
+ int dummy=1;
+ #else
+ #error Not a native Windows build target.
+ #endif
]])
],[
curl_cv_native_windows="yes"
AC_CACHE_CHECK([for lber.h], [curl_cv_header_lber_h], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#include <lber.h>
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #endif
+ #ifndef NULL
+ #define NULL (void *)0
+ #endif
+ #include <lber.h>
]],[[
BerValue *bvp = NULL;
BerElement *bep = ber_init(bvp);
#
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#include <ldap.h>
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #endif
+ #ifndef NULL
+ #define NULL (void *)0
+ #endif
+ #ifndef LDAP_DEPRECATED
+ #define LDAP_DEPRECATED 1
+ #endif
+ #include <ldap.h>
]],[[
BerValue *bvp = NULL;
BerElement *bep = ber_init(bvp);
AC_CACHE_CHECK([for ldap.h], [curl_cv_header_ldap_h], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#include <ldap.h>
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #endif
+ #ifndef LDAP_DEPRECATED
+ #define LDAP_DEPRECATED 1
+ #endif
+ #ifdef NEED_LBER_H
+ #include <lber.h>
+ #endif
+ #include <ldap.h>
]],[[
LDAP *ldp = ldap_init("0.0.0.0", LDAP_PORT);
int res = ldap_unbind(ldp);
AC_CACHE_CHECK([for ldap_ssl.h], [curl_cv_header_ldap_ssl_h], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#ifdef HAVE_LDAP_H
-#include <ldap.h>
-#endif
-#include <ldap_ssl.h>
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #endif
+ #ifndef LDAP_DEPRECATED
+ #define LDAP_DEPRECATED 1
+ #endif
+ #ifdef NEED_LBER_H
+ #include <lber.h>
+ #endif
+ #ifdef HAVE_LDAP_H
+ #include <ldap.h>
+ #endif
+ #include <ldap_ssl.h>
]],[[
LDAP *ldp = ldapssl_init("0.0.0.0", LDAPS_PORT, 1);
]])
fi
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <winldap.h>
-#ifdef HAVE_WINBER_H
-#include <winber.h>
-#endif
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>
+ #include <winldap.h>
+ #ifdef HAVE_WINBER_H
+ #include <winber.h>
+ #endif
+ #endif
]],[[
BERVAL *bvp = NULL;
BerElement *bep = ber_init(bvp);
fi
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#ifdef HAVE_LDAP_H
-#include <ldap.h>
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #endif
+ #ifndef NULL
+ #define NULL (void *)0
+ #endif
+ #ifndef LDAP_DEPRECATED
+ #define LDAP_DEPRECATED 1
+ #endif
+ #ifdef NEED_LBER_H
+ #include <lber.h>
+ #endif
+ #ifdef HAVE_LDAP_H
+ #include <ldap.h>
+ #endif
]],[[
BerValue *bvp = NULL;
BerElement *bep = ber_init(bvp);
AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
[if struct sockaddr_storage is defined]), ,
[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ #ifdef HAVE_ARPA_INET_H
+ #include <arpa/inet.h>
+ #endif
+ #endif
])
])
AC_MSG_CHECKING([for recv])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#else
-$curl_includes_bsdsocket
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #else
+ $curl_includes_bsdsocket
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #endif
]],[[
recv(0, 0, 0, 0);
]])
AC_MSG_CHECKING([for send])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#else
-$curl_includes_bsdsocket
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #else
+ $curl_includes_bsdsocket
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #endif
]],[[
send(0, 0, 0, 0);
]])
AC_CACHE_CHECK([for MSG_NOSIGNAL], [curl_cv_msg_nosignal], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #endif
]],[[
int flag=MSG_NOSIGNAL;
]])
AC_CACHE_CHECK([for struct timeval], [curl_cv_struct_timeval], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
]],[[
struct timeval ts;
ts.tv_sec = 0;
if test "$curl_cv_in_addr_t_equiv" = "unknown"; then
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ #ifdef HAVE_ARPA_INET_H
+ #include <arpa/inet.h>
+ #endif
+ #endif
]],[[
$t data = inet_addr ("1.2.3.4");
]])
;;
esac
],[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #else
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ #ifdef HAVE_ARPA_INET_H
+ #include <arpa/inet.h>
+ #endif
+ #endif
])
])
if test "x$dontwant_rt" = "xno" ; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
]],[[
struct timespec ts;
(void)clock_gettime(CLOCK_MONOTONIC, &ts);
if test "x$dontwant_rt" = "xno" ; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
]],[[
struct timespec ts;
(void)clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
fi
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
]],[[
struct timespec ts;
(void)clock_gettime(CLOCK_MONOTONIC, &ts);
AC_MSG_CHECKING([if monotonic clock_gettime works])
CURL_RUN_IFELSE([
AC_LANG_PROGRAM([[
-#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
+ #include <stdlib.h>
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
]],[[
struct timespec ts;
if (0 == clock_gettime(CLOCK_MONOTONIC, &ts))
AC_MSG_CHECKING([for select])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-#ifndef _WIN32
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#elif defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-$curl_includes_bsdsocket
-#endif
+ #undef inline
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ #ifndef _WIN32
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #elif defined(HAVE_UNISTD_H)
+ #include <unistd.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ $curl_includes_bsdsocket
+ #endif
]],[[
select(0, 0, 0, 0, 0);
]])
dnl point also is available run-time!
AC_MSG_CHECKING([run-time libs availability])
CURL_RUN_IFELSE([
-int main()
-{
- return 0;
-}
-],
+ int main()
+ {
+ return 0;
+ }
+ ],
AC_MSG_RESULT([fine]),
AC_MSG_RESULT([failed])
AC_MSG_ERROR([one or more libs available at link-time are not available run-time. Libs used at link-time: $LIBS])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
-#if !defined(_WIN32_WCE) && (defined(__MINGW32__) || defined(_MSC_VER))
- int dummy=1;
-#else
- #error Win32 large file API not supported.
-#endif
+ #if !defined(_WIN32_WCE) && (defined(__MINGW32__) || defined(_MSC_VER))
+ int dummy=1;
+ #else
+ #error Win32 large file API not supported.
+ #endif
]])
],[
curl_win32_file_api="win32_large_files"
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
-#if defined(_WIN32_WCE) || defined(__MINGW32__) || defined(_MSC_VER)
- int dummy=1;
-#else
- #error Win32 small file API not supported.
-#endif
+ #if defined(_WIN32_WCE) || defined(__MINGW32__) || defined(_MSC_VER)
+ int dummy=1;
+ #else
+ #error Win32 small file API not supported.
+ #endif
]])
],[
curl_win32_file_api="win32_small_files"
if test "$curl_cv_native_windows" = "yes"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <wincrypt.h>
+ #undef inline
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <windows.h>
+ #include <wincrypt.h>
]],[[
HCRYPTPROV hCryptProv;
if(CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL,
AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#ifdef _WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#endif
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #endif
]],[[
gethostbyname("localhost");
]])
AC_MSG_CHECKING([for gethostbyname for Minix 3])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-/* Older Minix versions may need <net/gen/netdb.h> here instead */
-#include <netdb.h>
+ /* Older Minix versions may need <net/gen/netdb.h> here instead */
+ #include <netdb.h>
]],[[
gethostbyname("localhost");
]])
AC_MSG_CHECKING([for gethostbyname for eCos])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <netdb.h>
+ #include <stdio.h>
+ #include <netdb.h>
]],[[
gethostbyname("localhost");
]])
esac ],
AC_RUN_IFELSE([AC_LANG_SOURCE([[
-/* are AF_INET6 and sockaddr_in6 available? */
-#include <sys/types.h>
-#ifdef _WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#if defined (__TANDEM)
-# include <netinet/in6.h>
-#endif
-#endif
-
-int main(void)
-{
- struct sockaddr_in6 s;
- (void)s;
- return socket(AF_INET6, SOCK_STREAM, 0) < 0;
-}
-]])
-],
+ /* are AF_INET6 and sockaddr_in6 available? */
+ #include <sys/types.h>
+ #ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #else
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #if defined (__TANDEM)
+ # include <netinet/in6.h>
+ #endif
+ #endif
+
+ int main(void)
+ {
+ struct sockaddr_in6 s;
+ (void)s;
+ return socket(AF_INET6, SOCK_STREAM, 0) < 0;
+ }
+ ]])
+ ],
AC_MSG_RESULT(yes)
ipv6=yes,
AC_MSG_RESULT(no)
AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#ifdef _WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#if defined (__TANDEM)
-# include <netinet/in6.h>
-#endif
-#endif
-]], [[
- struct sockaddr_in6 s;
- s.sin6_scope_id = 0;
-]])], [
+ #include <sys/types.h>
+ #ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #else
+ #include <netinet/in.h>
+ #if defined (__TANDEM)
+ # include <netinet/in6.h>
+ #endif
+ #endif
+ ]], [[
+ struct sockaddr_in6 s;
+ s.sin6_scope_id = 0;
+ ]])], [
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])
], [
[],
[not_mit=1],
[
-AC_INCLUDES_DEFAULT
-#ifdef HAVE_GSSAPI_GSSAPI_H
-#include <gssapi/gssapi.h>
-#endif
+ AC_INCLUDES_DEFAULT
+ #ifdef HAVE_GSSAPI_GSSAPI_H
+ #include <gssapi/gssapi.h>
+ #endif
])
if test "x$not_mit" = "x1"; then
dnl MIT not found, check for Heimdal
AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#include <gssapi/gssapi.h>
-#include <gssapi/gssapi_generic.h>
-#include <gssapi/gssapi_krb5.h>
+ #include <gssapi/gssapi.h>
+ #include <gssapi/gssapi_generic.h>
+ #include <gssapi/gssapi_krb5.h>
]],[[
gss_import_name(
(OM_uint32 *)0,
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE quiche",
[],
[
-AC_INCLUDES_DEFAULT
-#include <sys/socket.h>
+ AC_INCLUDES_DEFAULT
+ #include <sys/socket.h>
]
)
],
AC_DEFUN([CURL_CHECK_NEED_REENTRANT_ERRNO], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#include <errno.h>
+ #include <errno.h>
]],[[
if(0 != errno)
return 1;
if test "$tmp_errno" = "yes"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#include <errno.h>
+ #include <errno.h>
]],[[
-#ifdef errno
- int dummy=1;
-#else
- #error force compilation error
-#endif
+ #ifdef errno
+ int dummy=1;
+ #else
+ #error force compilation error
+ #endif
]])
],[
tmp_errno="errno_macro_defined"
],[
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#define _REENTRANT
-#include <errno.h>
+ #define _REENTRANT
+ #include <errno.h>
]],[[
-#ifdef errno
- int dummy=1;
-#else
- #error force compilation error
-#endif
+ #ifdef errno
+ int dummy=1;
+ #else
+ #error force compilation error
+ #endif
]])
],[
tmp_errno="errno_macro_needs_reentrant"
])
if test "$tmp_gmtime_r" = "yes"; then
AC_EGREP_CPP([gmtime_r],[
-#include <sys/types.h>
-#include <time.h>
+ #include <sys/types.h>
+ #include <time.h>
],[
tmp_gmtime_r="proto_declared"
],[
AC_EGREP_CPP([gmtime_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <time.h>
+ #define _REENTRANT
+ #include <sys/types.h>
+ #include <time.h>
],[
tmp_gmtime_r="proto_needs_reentrant"
tmp_need_reentrant="yes"
])
if test "$tmp_localtime_r" = "yes"; then
AC_EGREP_CPP([localtime_r],[
-#include <sys/types.h>
-#include <time.h>
+ #include <sys/types.h>
+ #include <time.h>
],[
tmp_localtime_r="proto_declared"
],[
AC_EGREP_CPP([localtime_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <time.h>
+ #define _REENTRANT
+ #include <sys/types.h>
+ #include <time.h>
],[
tmp_localtime_r="proto_needs_reentrant"
tmp_need_reentrant="yes"
])
if test "$tmp_strerror_r" = "yes"; then
AC_EGREP_CPP([strerror_r],[
-#include <sys/types.h>
-#include <string.h>
+ #include <sys/types.h>
+ #include <string.h>
],[
tmp_strerror_r="proto_declared"
],[
AC_EGREP_CPP([strerror_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <string.h>
+ #define _REENTRANT
+ #include <sys/types.h>
+ #include <string.h>
],[
tmp_strerror_r="proto_needs_reentrant"
tmp_need_reentrant="yes"
])
if test "$tmp_strtok_r" = "yes"; then
AC_EGREP_CPP([strtok_r],[
-#include <sys/types.h>
-#include <string.h>
+ #include <sys/types.h>
+ #include <string.h>
],[
tmp_strtok_r="proto_declared"
],[
AC_EGREP_CPP([strtok_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <string.h>
+ #define _REENTRANT
+ #include <sys/types.h>
+ #include <string.h>
],[
tmp_strtok_r="proto_needs_reentrant"
tmp_need_reentrant="yes"
])
if test "$tmp_gethostbyname_r" = "yes"; then
AC_EGREP_CPP([gethostbyname_r],[
-#include <sys/types.h>
-#include <netdb.h>
+ #include <sys/types.h>
+ #include <netdb.h>
],[
tmp_gethostbyname_r="proto_declared"
],[
AC_EGREP_CPP([gethostbyname_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
+ #define _REENTRANT
+ #include <sys/types.h>
+ #include <netdb.h>
],[
tmp_gethostbyname_r="proto_needs_reentrant"
tmp_need_reentrant="yes"
])
if test "$tmp_getprotobyname_r" = "yes"; then
AC_EGREP_CPP([getprotobyname_r],[
-#include <sys/types.h>
-#include <netdb.h>
+ #include <sys/types.h>
+ #include <netdb.h>
],[
tmp_getprotobyname_r="proto_declared"
],[
AC_EGREP_CPP([getprotobyname_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
+ #define _REENTRANT
+ #include <sys/types.h>
+ #include <netdb.h>
],[
tmp_getprotobyname_r="proto_needs_reentrant"
tmp_need_reentrant="yes"
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
-#ifdef _REENTRANT
- int dummy=1;
-#else
- #error force compilation error
-#endif
+ #ifdef _REENTRANT
+ int dummy=1;
+ #else
+ #error force compilation error
+ #endif
]])
],[
AC_MSG_RESULT([yes])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
-#ifdef _THREAD_SAFE
- int dummy=1;
-#else
- #error force compilation error
-#endif
+ #ifdef _THREAD_SAFE
+ int dummy=1;
+ #else
+ #error force compilation error
+ #endif
]])
],[
AC_MSG_RESULT([yes])