X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fnetdb_h.m4;h=5a12251f9a1cdb1dcd9333fb4957654867af1bbc;hb=2f23fbb2ce253697930e8f769e13134f9be81363;hp=8e8ff4aa72f6ed7940fd21587974fcbd01785675;hpb=3cdd75d6d78830ecc5633df781baaf2be2c4a7e9;p=gnulib.git diff --git a/m4/netdb_h.m4 b/m4/netdb_h.m4 index 8e8ff4aa7..5a12251f9 100644 --- a/m4/netdb_h.m4 +++ b/m4/netdb_h.m4 @@ -1,4 +1,4 @@ -# netdb_h.m4 serial 2 +# netdb_h.m4 serial 5 dnl Copyright (C) 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,7 +9,14 @@ AC_DEFUN([gl_HEADER_NETDB], AC_REQUIRE([gl_NETDB_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([netdb.h]) if test $ac_cv_header_netdb_h = yes; then - NETDB_H='' + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include + struct addrinfo a; + int b = EAI_OVERFLOW; + int c = AI_NUMERICSERV; + ]])], + [NETDB_H=''], [NETDB_H='netdb.h']) HAVE_NETDB_H=1 else NETDB_H='netdb.h' @@ -28,5 +35,11 @@ AC_DEFUN([gl_NETDB_MODULE_INDICATOR], AC_DEFUN([gl_NETDB_H_DEFAULTS], [ - : + GNULIB_GETADDRINFO=0; AC_SUBST([GNULIB_GETADDRINFO]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_STRUCT_ADDRINFO=1; AC_SUBST([HAVE_STRUCT_ADDRINFO]) + HAVE_DECL_FREEADDRINFO=1; AC_SUBST([HAVE_DECL_FREEADDRINFO]) + HAVE_DECL_GAI_STRERROR=1; AC_SUBST([HAVE_DECL_GAI_STRERROR]) + HAVE_DECL_GETADDRINFO=1; AC_SUBST([HAVE_DECL_GETADDRINFO]) + HAVE_DECL_GETNAMEINFO=1; AC_SUBST([HAVE_DECL_GETNAMEINFO]) ])