summaryrefslogtreecommitdiffstats
path: root/gl/m4/servent.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/servent.m4')
-rw-r--r--gl/m4/servent.m412
1 files changed, 8 insertions, 4 deletions
diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4
index 2ed961a..01c037a 100644
--- a/gl/m4/servent.m4
+++ b/gl/m4/servent.m4
@@ -1,5 +1,5 @@
1# servent.m4 serial 1 1# servent.m4 serial 2
2dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2008, 2010-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -30,12 +30,16 @@ AC_DEFUN([gl_SERVENT],
30 [gl_cv_w32_getservbyname=no 30 [gl_cv_w32_getservbyname=no
31 gl_save_LIBS="$LIBS" 31 gl_save_LIBS="$LIBS"
32 LIBS="$LIBS -lws2_32" 32 LIBS="$LIBS -lws2_32"
33 AC_TRY_LINK([ 33 AC_LINK_IFELSE(
34 [AC_LANG_PROGRAM(
35 [[
34#ifdef HAVE_WINSOCK2_H 36#ifdef HAVE_WINSOCK2_H
35#include <winsock2.h> 37#include <winsock2.h>
36#endif 38#endif
37#include <stddef.h> 39#include <stddef.h>
38], [getservbyname(NULL,NULL);], [gl_cv_w32_getservbyname=yes]) 40 ]],
41 [[getservbyname(NULL,NULL);]])],
42 [gl_cv_w32_getservbyname=yes])
39 LIBS="$gl_save_LIBS" 43 LIBS="$gl_save_LIBS"
40 ]) 44 ])
41 if test "$gl_cv_w32_getservbyname" = "yes"; then 45 if test "$gl_cv_w32_getservbyname" = "yes"; then