X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fhostent.m4;h=36ade7e8aa06e2f7eabb0c7571d296a51920687c;hb=308cae2a36b73ea570af86e904528776a47b6e16;hp=1d386783a3688eaa9cfe85d336466d322d6d3671;hpb=364b8a812d3b1d1a1127456de69a4dee849a0d88;p=gnulib.git diff --git a/m4/hostent.m4 b/m4/hostent.m4 index 1d386783a..36ade7e8a 100644 --- a/m4/hostent.m4 +++ b/m4/hostent.m4 @@ -1,5 +1,5 @@ -# hostent.m4 serial 1 -dnl Copyright (C) 2008 Free Software Foundation, Inc. +# hostent.m4 serial 2 +dnl Copyright (C) 2008, 2010-2011 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. @@ -18,7 +18,7 @@ AC_DEFUN([gl_HOSTENT], gl_saved_libs="$LIBS" AC_SEARCH_LIBS([gethostbyname], [nsl network net], [if test "$ac_cv_search_gethostbyname" != "none required"; then - SERVENT_LIB="$ac_cv_search_gethostbyname" + HOSTENT_LIB="$ac_cv_search_gethostbyname" fi]) LIBS="$gl_saved_libs" if test -z "$HOSTENT_LIB"; then @@ -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