X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fhostent.m4;h=51347755c66c3c8bd73ecab3351d2458e6adcba0;hb=6a2bdd8e10abd669186bf2d618bfb1f106c8fcb7;hp=1111041129181fd30693fd6d8ceb783030b88bf3;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/m4/hostent.m4 b/m4/hostent.m4 index 111104112..51347755c 100644 --- a/m4/hostent.m4 +++ b/m4/hostent.m4 @@ -1,5 +1,5 @@ -# hostent.m4 serial 1 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +# hostent.m4 serial 2 +dnl Copyright (C) 2008, 2010-2012 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