aboutsummaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m4206
1 files changed, 0 insertions, 206 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 81c16f9b1..b72839e3a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -960,212 +960,6 @@ AC_DEFUN([CURL_CHECK_HEADER_MEMORY], [
fi
])
-
-dnl CURL_CHECK_FUNC_GETNAMEINFO
-dnl -------------------------------------------------
-dnl Test if the getnameinfo function is available,
-dnl and check the types of five of its arguments.
-dnl If the function succeeds HAVE_GETNAMEINFO will be
-dnl defined, defining the types of the arguments in
-dnl GETNAMEINFO_TYPE_ARG1, GETNAMEINFO_TYPE_ARG2,
-dnl GETNAMEINFO_TYPE_ARG46 and GETNAMEINFO_TYPE_ARG7,
-dnl and also defining the type qualifier of first
-dnl argument in GETNAMEINFO_QUAL_ARG1.
-
-AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
- AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
- AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h)
- #
- AC_MSG_CHECKING([for getnameinfo])
- AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([getnameinfo])
- ],[
- AC_MSG_RESULT([yes])
- curl_cv_getnameinfo="yes"
- ],[
- AC_MSG_RESULT([no])
- curl_cv_getnameinfo="no"
- ])
- #
- if test "$curl_cv_getnameinfo" != "yes"; then
- AC_MSG_CHECKING([deeper for getnameinfo])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
- ]],[[
- getnameinfo();
- ]])
- ],[
- AC_MSG_RESULT([yes])
- curl_cv_getnameinfo="yes"
- ],[
- AC_MSG_RESULT([but still no])
- curl_cv_getnameinfo="no"
- ])
- fi
- #
- if test "$curl_cv_getnameinfo" != "yes"; then
- AC_MSG_CHECKING([deeper and deeper for getnameinfo])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#endif
- ]],[[
- getnameinfo(0, 0, 0, 0, 0, 0, 0);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- curl_cv_getnameinfo="yes"
- ],[
- AC_MSG_RESULT([but still no])
- curl_cv_getnameinfo="no"
- ])
- fi
- #
- if test "$curl_cv_getnameinfo" = "yes"; then
- AC_CACHE_CHECK([types of arguments for getnameinfo],
- [curl_cv_func_getnameinfo_args], [
- curl_cv_func_getnameinfo_args="unknown"
- for gni_arg1 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
- 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
- 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
-#define WIN32_LEAN_AND_MEAN
-#endif
-#if (!defined(_WIN32_WINNT)) || (_WIN32_WINNT < 0x0501)
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-#endif
-#define GNICALLCONV WSAAPI
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#define GNICALLCONV
-#endif
- extern int GNICALLCONV
-#ifdef __ANDROID__
-__attribute__((overloadable))
-#endif
- 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
- done
- ]) # AC-CACHE-CHECK
- if test "$curl_cv_func_getnameinfo_args" = "unknown"; then
- AC_MSG_WARN([Cannot find proper types to use for getnameinfo args])
- AC_MSG_WARN([HAVE_GETNAMEINFO will not be defined])
- else
- gni_prev_IFS=$IFS; IFS=','
- set dummy `echo "$curl_cv_func_getnameinfo_args" | sed 's/\*/\*/g'`
- IFS=$gni_prev_IFS
- shift
- #
- gni_qual_type_arg1=$[1]
- #
- AC_DEFINE_UNQUOTED(GETNAMEINFO_TYPE_ARG2, $[2],
- [Define to the type of arg 2 for getnameinfo.])
- AC_DEFINE_UNQUOTED(GETNAMEINFO_TYPE_ARG46, $[3],
- [Define to the type of args 4 and 6 for getnameinfo.])
- AC_DEFINE_UNQUOTED(GETNAMEINFO_TYPE_ARG7, $[4],
- [Define to the type of arg 7 for getnameinfo.])
- #
- prev_sh_opts=$-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set -f
- ;;
- esac
- #
- case "$gni_qual_type_arg1" in
- const*)
- gni_qual_arg1=const
- gni_type_arg1=`echo $gni_qual_type_arg1 | sed 's/^const //'`
- ;;
- *)
- gni_qual_arg1=
- gni_type_arg1=$gni_qual_type_arg1
- ;;
- esac
- #
- AC_DEFINE_UNQUOTED(GETNAMEINFO_QUAL_ARG1, $gni_qual_arg1,
- [Define to the type qualifier of arg 1 for getnameinfo.])
- AC_DEFINE_UNQUOTED(GETNAMEINFO_TYPE_ARG1, $gni_type_arg1,
- [Define to the type of arg 1 for getnameinfo.])
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set +f
- ;;
- esac
- #
- AC_DEFINE_UNQUOTED(HAVE_GETNAMEINFO, 1,
- [Define to 1 if you have the getnameinfo function.])
- curl_cv_func_getnameinfo="yes"
- fi
- fi
-])
-
-
dnl TYPE_SOCKADDR_STORAGE
dnl -------------------------------------------------
dnl Check for struct sockaddr_storage. Most IPv6-enabled