X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fservent.m4;h=4dc7a9f7061ef9e411d6e17271492d2bbbea4007;hb=7422b7ede18016dea87d207cbb7535428afba3ec;hp=3ddc6107e5d1b2f2de8a631f17d64d309b960bce;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/m4/servent.m4 b/m4/servent.m4 index 3ddc6107e..4dc7a9f70 100644 --- a/m4/servent.m4 +++ b/m4/servent.m4 @@ -1,5 +1,5 @@ -# servent.m4 serial 1 -dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# servent.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. @@ -30,12 +30,16 @@ AC_DEFUN([gl_SERVENT], [gl_cv_w32_getservbyname=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 -], [getservbyname(NULL,NULL);], [gl_cv_w32_getservbyname=yes]) + ]], + [[getservbyname(NULL,NULL);]])], + [gl_cv_w32_getservbyname=yes]) LIBS="$gl_save_LIBS" ]) if test "$gl_cv_w32_getservbyname" = "yes"; then