X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fhostent.m4;h=dd8fc0709d1ece5878810470b527d1d33d056dba;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=ca16a741d2d26d7543faaaf5940a398b3a1d5411;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/m4/hostent.m4 b/m4/hostent.m4 index ca16a741d..dd8fc0709 100644 --- a/m4/hostent.m4 +++ b/m4/hostent.m4 @@ -1,5 +1,5 @@ -# hostent.m4 serial 1 -dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# hostent.m4 serial 2 +dnl Copyright (C) 2008, 2010-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -28,12 +28,16 @@ AC_DEFUN([gl_HOSTENT], [gl_cv_w32_gethostbyname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" - AC_TRY_LINK([ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ #ifdef HAVE_WINSOCK2_H #include #endif #include -], [gethostbyname(NULL);], [gl_cv_w32_gethostbyname=yes]) + ]], + [[gethostbyname(NULL);]])], + [gl_cv_w32_gethostbyname=yes]) LIBS="$gl_save_LIBS" ]) if test "$gl_cv_w32_gethostbyname" = "yes"; then