]> granicus.if.org Git - php/commitdiff
More restrictive getaddrinfo check, better not find it than breaking builds
authorStig Venaas <venaas@php.net>
Sat, 9 Sep 2000 12:09:43 +0000 (12:09 +0000)
committerStig Venaas <venaas@php.net>
Sat, 9 Sep 2000 12:09:43 +0000 (12:09 +0000)
configure.in

index c9b731849469ba936944a14b26d803387b3190c6..f17d3a191fceb4f7078ee782fbb5e20ac8ff1876 100644 (file)
@@ -347,7 +347,6 @@ ctime_r \
 cuserid \
 flock \
 gcvt \
-getaddrinfo \
 getlogin \
 gethostbyaddr \
 getrusage \
@@ -394,6 +393,14 @@ utime \
 vsnprintf \
 )
 
+dnl Check for getaddrinfo, should be a better way, but...
+AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
+[AC_TRY_COMPILE([#include <netdb.h>], [getaddrinfo(NULL,NULL,NULL,NULL);],
+  ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no)])
+if test "$ac_cv_func_getaddrinfo" = yes; then
+  AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function])
+fi
+
 AC_REPLACE_FUNCS(strlcat strlcpy getopt)
 AC_FUNC_UTIME_NULL
 AC_FUNC_ALLOCA