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