- fi
- done
- done
- done
- done
- ]) # AC_CACHE_CHECK
- if test "$curl_cv_func_select_args" = "unknown"; then
- AC_MSG_WARN([Cannot find proper types to use for select args])
- AC_MSG_WARN([HAVE_SELECT will not be defined])
- else
- select_prev_IFS=$IFS; IFS=','
- set dummy `echo "$curl_cv_func_select_args" | sed 's/\*/\*/g'`
- IFS=$select_prev_IFS
- shift
- #
- sel_qual_type_arg5=$[3]
- #
- AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1],
- [Define to the type of arg 1 for select.])
- AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234, $[2],
- [Define to the type of args 2, 3 and 4 for select.])
- AC_DEFINE_UNQUOTED(SELECT_TYPE_RETV, $[4],
- [Define to the function return type for select.])
- #
- prev_sh_opts=$-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set -f
- ;;
- esac
- #
- case "$sel_qual_type_arg5" in
- const*)
- sel_qual_arg5=const
- sel_type_arg5=`echo $sel_qual_type_arg5 | sed 's/^const //'`
- ;;
- *)
- sel_qual_arg5=
- sel_type_arg5=$sel_qual_type_arg5
- ;;
- esac
- #
- AC_DEFINE_UNQUOTED(SELECT_QUAL_ARG5, $sel_qual_arg5,
- [Define to the type qualifier of arg 5 for select.])
- AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5, $sel_type_arg5,
- [Define to the type of arg 5 for select.])
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set +f
- ;;
- esac
- #
- AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
- [Define to 1 if you have the select function.])
- ac_cv_func_select="yes"
- fi
- fi
-]) # AC_DEFUN
-
-
-dnl ************************************************************
-dnl check for "localhost", if it doesn't exist, we can't do the
-dnl gethostbyname_r tests!
-dnl
-
-AC_DEFUN([CURL_CHECK_WORKING_RESOLVER],[
-AC_MSG_CHECKING([if "localhost" resolves])
-AC_TRY_RUN([
-#include <string.h>
-#include <sys/types.h>
-#include <netdb.h>
-#ifndef NULL
-#define NULL (void *)0
-#endif
-
-int
-main () {
-struct hostent *h;
-h = gethostbyname("localhost");
-exit (h == NULL ? 1 : 0); }],[
- AC_MSG_RESULT(yes)],[
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([can't figure out gethostbyname_r() since localhost doesn't resolve])
-
- ]
-)
-])
-
-dnl ************************************************************
-dnl check for working getaddrinfo() that works with AI_NUMERICHOST
-dnl
-AC_DEFUN([CURL_CHECK_WORKING_GETADDRINFO],[
- AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
- AC_TRY_RUN( [
-#include <netdb.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-int main(void)
-{
- struct addrinfo hints, *ai;
- int error;
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_flags = AI_NUMERICHOST;
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
- error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
- if (error) {
- return 1;
- }
- return 0;
-}
-],[
- ac_cv_working_getaddrinfo="yes"
-],[
- ac_cv_working_getaddrinfo="no"
-],[
- ac_cv_working_getaddrinfo="yes"
-])])
-if test "$ac_cv_working_getaddrinfo" = "yes"; then
- AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works])
- AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
-
- IPV6_ENABLED=1
- AC_SUBST(IPV6_ENABLED)
-fi
-])
-
-
-AC_DEFUN([CURL_CHECK_LOCALTIME_R],
-[
- dnl check for localtime_r
- AC_CHECK_FUNCS(localtime_r,[
- AC_MSG_CHECKING(whether localtime_r is declared)
- AC_EGREP_CPP(localtime_r,[
-#undef _REENTRANT
-#include <time.h>],[
- AC_MSG_RESULT(yes)],[
- AC_MSG_RESULT(no)
- AC_MSG_CHECKING(whether localtime_r with -D_REENTRANT is declared)
- AC_EGREP_CPP(localtime_r,[
-#undef _REENTRANT
-#define _REENTRANT
-#include <time.h>],[
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT defined])
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))])])
-])
-
-dnl
-dnl This function checks for strerror_r(). If it isn't found at first, it
-dnl retries with _THREAD_SAFE defined, as that is what AIX seems to require
-dnl in order to find this function.
-dnl
-dnl If the function is found, it will then proceed to check how the function
-dnl actually works: glibc-style or POSIX-style.
-dnl
-dnl glibc:
-dnl char *strerror_r(int errnum, char *buf, size_t n);
-dnl
-dnl What this one does is to return the error string (no surprises there),
-dnl but it doesn't usually copy anything into buf! The 'buf' and 'n'
-dnl parameters are only meant as an optional working area, in case strerror_r
-dnl needs it. A quick test on a few systems shows that it's generally not
-dnl touched at all.
-dnl
-dnl POSIX:
-dnl int strerror_r(int errnum, char *buf, size_t n);
-dnl
-AC_DEFUN([CURL_CHECK_STRERROR_R],
-[
- AC_CHECK_FUNCS(strerror_r)
-
- if test "x$ac_cv_func_strerror_r" = "xyes"; then
-
- AC_MSG_CHECKING(whether strerror_r is declared)
- AC_EGREP_CPP(strerror_r,[
-#undef _REENTRANT
-#include <string.h>],[
- AC_MSG_RESULT(yes)],[
- AC_MSG_RESULT(no)
- AC_MSG_CHECKING(whether strerror_r with -D_REENTRANT is declared)
- AC_EGREP_CPP(strerror_r,[
-#undef _REENTRANT
-#define _REENTRANT
-#include <string.h>],[
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT defined])
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no)
- AC_DEFINE(HAVE_NO_STRERROR_R_DECL, 1, [we have no strerror_r() proto])
- ) dnl with _THREAD_SAFE
- ]) dnl plain cpp for it
-
- dnl determine if this strerror_r() is glibc or POSIX
- AC_MSG_CHECKING([for a glibc strerror_r API])
- AC_TRY_RUN([
-#include <string.h>
-#include <errno.h>
-int
-main () {
- char buffer[1024]; /* big enough to play with */
- char *string =
- strerror_r(EACCES, buffer, sizeof(buffer));
- /* this should've returned a string */
- if(!string || !string[0])
- return 99;
- return 0;
-}
-],
- GLIBC_STRERROR_R="1"
- AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no]),
-
- dnl Use an inferior method of strerror_r detection while cross-compiling
- AC_EGREP_CPP(yes, [
-#include <features.h>
-#ifdef __GLIBC__
-yes
-#endif
-],
- dnl looks like glibc, so assume a glibc-style strerror_r()
- GLIBC_STRERROR_R="1"
- AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()])
- AC_MSG_RESULT([yes]),
- AC_MSG_NOTICE([cannot determine strerror_r() style: edit lib/config.h manually!])
- ) dnl while cross-compiling
- )
-
- if test -z "$GLIBC_STRERROR_R"; then
-
- AC_MSG_CHECKING([for a POSIX strerror_r API])
- AC_TRY_RUN([
-#include <string.h>
-#include <errno.h>
-int
-main () {
- char buffer[1024]; /* big enough to play with */
- int error =
- strerror_r(EACCES, buffer, sizeof(buffer));
- /* This should've returned zero, and written an error string in the
- buffer.*/
- if(!buffer[0] || error)
- return 99;
- return 0;
-}
-],
- AC_DEFINE(HAVE_POSIX_STRERROR_R, 1, [we have a POSIX-style strerror_r()])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no]) ,
- dnl cross-compiling!
- AC_MSG_NOTICE([cannot determine strerror_r() style: edit lib/config.h manually!])
- )
-
- fi dnl if not using glibc API
-
- fi dnl we have a strerror_r
-
-])
-
-AC_DEFUN([CURL_CHECK_INET_NTOA_R],
-[
- dnl determine if function definition for inet_ntoa_r exists.
- AC_CHECK_FUNCS(inet_ntoa_r,[
- AC_MSG_CHECKING(whether inet_ntoa_r is declared)
- AC_EGREP_CPP(inet_ntoa_r,[
-#undef _REENTRANT
-#include <arpa/inet.h>],[
- AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared])
- AC_MSG_RESULT(yes)],[
- AC_MSG_RESULT(no)
- AC_MSG_CHECKING(whether inet_ntoa_r with -D_REENTRANT is declared)
- AC_EGREP_CPP(inet_ntoa_r,[
-#undef _REENTRANT
-#define _REENTRANT
-#include <arpa/inet.h>],[
- AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared])
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT defined])
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))])])
-])
-
-
-dnl CURL_CHECK_GETHOSTBYADDR_R
-dnl -------------------------------------------------
-dnl check number of arguments for gethostbyaddr_r, it
-dnl might take either 5, 7, or 8 arguments.
-
-AC_DEFUN([CURL_CHECK_GETHOSTBYADDR_R], [
- #
- AC_MSG_CHECKING([for gethostbyaddr_r])
- AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r])
- ],[
- AC_MSG_RESULT([yes])
- tmp_cv_gethostbyaddr_r="yes"
- ],[
- AC_MSG_RESULT([no])
- tmp_cv_gethostbyaddr_r="no"
- ])
- #
- if test "$tmp_cv_gethostbyaddr_r" != "yes"; then
- AC_MSG_CHECKING([deeper for gethostbyaddr_r])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
- ]],[[
- gethostbyaddr_r();
- ]])
- ],[
- AC_MSG_RESULT([yes])
- tmp_cv_gethostbyaddr_r="yes"
- ],[
- AC_MSG_RESULT([but still no])
- tmp_cv_gethostbyaddr_r="no"
- ])
- fi
- #
- if test "$tmp_cv_gethostbyaddr_r" = "yes"; then
-
- ac_cv_gethostbyaddr_r_args="unknown"
-
- AC_MSG_CHECKING([if gethostbyaddr_r takes 5 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
- ]],[[
- char * address;
- int length;
- int type;
- struct hostent h;
- struct hostent_data hdata;
- int rc;
- rc = gethostbyaddr_r(address, length, type, &h, &hdata);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args])
- ac_cv_gethostbyaddr_r_args="5"
- ],[
- AC_MSG_RESULT([no])
- ])
-
- if test "$ac_cv_gethostbyaddr_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyaddr_r with -D_REENTRANT takes 5 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
- ]],[[
- char * address;
- int length;
- int type;
- struct hostent h;
- struct hostent_data hdata;
- int rc;
- rc = gethostbyaddr_r(address, length, type, &h, &hdata);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args])
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT])
- ac_cv_gethostbyaddr_r_args="5"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyaddr_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyaddr_r takes 7 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
- ]],[[
- char * address;
- int length;
- int type;
- struct hostent h;
- char buffer[8192];
- int h_errnop;
- struct hostent * hp;
- hp = gethostbyaddr_r(address, length, type, &h,
- buffer, 8192, &h_errnop);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYADDR_R_7, 1, [gethostbyaddr_r() takes 7 args])
- ac_cv_gethostbyaddr_r_args="7"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyaddr_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyaddr_r with -D_REENTRANT takes 7 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
- ]],[[
- char * address;
- int length;
- int type;
- struct hostent h;
- char buffer[8192];
- int h_errnop;
- struct hostent * hp;
- hp = gethostbyaddr_r(address, length, type, &h,
- buffer, 8192, &h_errnop);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYADDR_R_7, 1, [gethostbyaddr_r() takes 7 args])
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT])
- ac_cv_gethostbyaddr_r_args="7"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyaddr_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyaddr_r takes 8 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
- ]],[[
- char * address;
- int length;
- int type;
- struct hostent h;
- char buffer[8192];
- int h_errnop;
- struct hostent * hp;
- int rc;
- rc = gethostbyaddr_r(address, length, type, &h,
- buffer, 8192, &hp, &h_errnop);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYADDR_R_8, 1, [gethostbyaddr_r() takes 8 args])
- ac_cv_gethostbyaddr_r_args="8"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyaddr_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyaddr_r with -D_REENTRANT takes 8 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
- ]],[[
- char * address;
- int length;
- int type;
- struct hostent h;
- char buffer[8192];
- int h_errnop;
- struct hostent * hp;
- int rc;
- rc = gethostbyaddr_r(address, length, type, &h,
- buffer, 8192, &hp, &h_errnop);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYADDR_R_8, 1, [gethostbyaddr_r() takes 8 args])
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT])
- ac_cv_gethostbyaddr_r_args="8"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyaddr_r_args" = "unknown"; then
- AC_MSG_WARN([Cannot find out how to use gethostbyaddr_r])
- AC_MSG_WARN([HAVE_GETHOSTBYADDR_R will not be defined])
- ac_cv_func_gethostbyaddr_r="no"
- else
- AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYADDR_R, 1,
- [Define to 1 if you have the gethostbyaddr_r function.])
- ac_cv_func_gethostbyaddr_r="yes"
- fi
-
- else
- ac_cv_func_gethostbyaddr_r="no"
- fi
-])
-
-
-dnl CURL_CHECK_GETHOSTBYNAME_R
-dnl -------------------------------------------------
-dnl check number of arguments for gethostbyname_r, it
-dnl might take either 3, 5, or 6 arguments.
-
-AC_DEFUN([CURL_CHECK_GETHOSTBYNAME_R], [
- #
- AC_MSG_CHECKING([for gethostbyname_r])
- AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([gethostbyname_r])
- ],[
- AC_MSG_RESULT([yes])
- tmp_cv_gethostbyname_r="yes"
- ],[
- AC_MSG_RESULT([no])
- tmp_cv_gethostbyname_r="no"
- ])
- #
- if test "$tmp_cv_gethostbyname_r" != "yes"; then
- AC_MSG_CHECKING([deeper for gethostbyname_r])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
- ]],[[
- gethostbyname_r();
- ]])
- ],[
- AC_MSG_RESULT([yes])
- tmp_cv_gethostbyname_r="yes"
- ],[
- AC_MSG_RESULT([but still no])
- tmp_cv_gethostbyname_r="no"
- ])
- fi
- #
- if test "$tmp_cv_gethostbyname_r" = "yes"; then
-
- ac_cv_gethostbyname_r_args="unknown"
-
- AC_MSG_CHECKING([if gethostbyname_r takes 3 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#include <string.h>
-#include <sys/types.h>
-#include <netdb.h>
-#undef NULL
-#define NULL (void *)0
- int
- gethostbyname_r(const char *, struct hostent *,
- struct hostent_data *);
- ]],[[
- struct hostent_data data;
- gethostbyname_r(NULL, NULL, NULL);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args])
- ac_cv_gethostbyname_r_args="3"
- ],[
- AC_MSG_RESULT([no])
- ])
-
- if test "$ac_cv_gethostbyname_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyname_r with -D_REENTRANT takes 3 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#define _REENTRANT
-#include <string.h>
-#include <sys/types.h>
-#include <netdb.h>
-#undef NULL
-#define NULL (void *)0
- int
- gethostbyname_r(const char *, struct hostent *,
- struct hostent_data *);
- ]],[[
- struct hostent_data data;
- gethostbyname_r(NULL, NULL, NULL);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args])
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT])
- ac_cv_gethostbyname_r_args="3"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyname_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyname_r takes 5 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-#undef NULL
-#define NULL (void *)0
- struct hostent *
- gethostbyname_r(const char *, struct hostent *,
- char *, int, int *);
- ]],[[
- gethostbyname_r(NULL, NULL, NULL, 0, NULL);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYNAME_R_5, 1, [gethostbyname_r() takes 5 args])
- ac_cv_gethostbyname_r_args="5"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyname_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyname_r with -D_REENTRANT takes 5 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-#undef NULL
-#define NULL (void *)0
- struct hostent *
- gethostbyname_r(const char *, struct hostent *,
- char *, int, int *);
- ]],[[
- gethostbyname_r(NULL, NULL, NULL, 0, NULL);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYNAME_R_5, 1, [gethostbyname_r() takes 5 args])
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT])
- ac_cv_gethostbyname_r_args="5"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyname_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyname_r takes 6 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-#undef NULL
-#define NULL (void *)0
- int
- gethostbyname_r(const char *, struct hostent *,
- char *, size_t, struct hostent **, int *);
- ]],[[
- gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYNAME_R_6, 1, [gethostbyname_r() takes 6 args])
- ac_cv_gethostbyname_r_args="6"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyname_r_args" = "unknown"; then
- AC_MSG_CHECKING([if gethostbyname_r with -D_REENTRANT takes 6 arguments])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef _REENTRANT
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-#undef NULL
-#define NULL (void *)0
- int
- gethostbyname_r(const char *, struct hostent *,
- char *, size_t, struct hostent **, int *);
- ]],[[
- gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GETHOSTBYNAME_R_6, 1, [gethostbyname_r() takes 6 args])
- AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT])
- ac_cv_gethostbyname_r_args="6"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$ac_cv_gethostbyname_r_args" = "unknown"; then
- AC_MSG_WARN([Cannot find out how to use gethostbyname_r])
- AC_MSG_WARN([HAVE_GETHOSTBYNAME_R will not be defined])
- ac_cv_func_gethostbyname_r="no"