]> git.sesse.net Git - vlc/blobdiff - configure.ac
- Simplify check for getnameinfo
[vlc] / configure.ac
index b3bad09480cfb911340570ccc9569d3af87b92ad..6b30883a9ff9b16c4261e44bcccbb72af77037d1 100644 (file)
@@ -391,24 +391,10 @@ if test $ac_cv_struct_sockaddr_storage = no; then
   AC_DEFINE(ss_family, sa_family)
 fi
 
-dnl getnameinfo, which implies {get,free}addrinfo, but not gai_strerror,
-dnl not available on win32 and -lresolv NOT needed on Solaris.
-AH_TEMPLATE(HAVE_GETNAMEINFO,
-  [Define to 1 if you have the `getnameinfo' function.])
-AH_TEMPLATE(HAVE_GAI_STRERROR,
-  [Define to 1 if you have the `gai_strerror' function.])
-AC_CACHE_CHECK([for getnameinfo], ac_cv_func_getnameinfo,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([
-[#include <sys/types.h>
-# include <sys/socket.h>
-# include <netdb.h>
-#endif]
-], [[getnameinfo(0,0,0,0,0,0,0);]])],
-ac_cv_func_getnameinfo=yes,
-ac_cv_func_getnameinfo=no)])
-AS_IF([test $ac_cv_func_getnameinfo = yes],
-  [AC_DEFINE(HAVE_GETNAMEINFO)
-   AC_DEFINE(HAVE_GAI_STRERROR)])
+dnl getaddrinfo, getnameinfo and gai_strerror check
+dnl  -lresolv is NOT needed on Solaris
+dnl  we purposedly make the test fail on Windows
+AC_CHECK_FUNCS([getaddrinfo getnameinfo gai_strerror])
 
 dnl Check for va_copy
 AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,