X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fservent.m4;h=c5df01c9b0cd701b76a529aa9e211960e19a766a;hb=aa4ddc348b91b7d8846e57c004f356a8b7b7da82;hp=2ed961a439c5b624c6b5b33c76bf141e5df5a873;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git diff --git a/m4/servent.m4 b/m4/servent.m4 index 2ed961a43..c5df01c9b 100644 --- a/m4/servent.m4 +++ b/m4/servent.m4 @@ -1,5 +1,5 @@ -# servent.m4 serial 1 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +# servent.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. @@ -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