diff options
Diffstat (limited to 'gl/m4/socketlib.m4')
-rw-r--r-- | gl/m4/socketlib.m4 | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4 index a556af1..09f0116 100644 --- a/gl/m4/socketlib.m4 +++ b/gl/m4/socketlib.m4 | |||
@@ -1,5 +1,6 @@ | |||
1 | # socketlib.m4 serial 3 | 1 | # socketlib.m4 |
2 | dnl Copyright (C) 2008-2023 Free Software Foundation, Inc. | 2 | # serial 4 |
3 | dnl Copyright (C) 2008-2024 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
@@ -18,7 +19,7 @@ AC_DEFUN([gl_SOCKETLIB], | |||
18 | dnl defined through -lws2_32), we need to call it. | 19 | dnl defined through -lws2_32), we need to call it. |
19 | AC_CACHE_CHECK([for WSAStartup], | 20 | AC_CACHE_CHECK([for WSAStartup], |
20 | [gl_cv_func_wsastartup], [ | 21 | [gl_cv_func_wsastartup], [ |
21 | gl_save_LIBS="$LIBS" | 22 | gl_saved_LIBS="$LIBS" |
22 | LIBS="$LIBS -lws2_32" | 23 | LIBS="$LIBS -lws2_32" |
23 | AC_LINK_IFELSE( | 24 | AC_LINK_IFELSE( |
24 | [AC_LANG_PROGRAM([[ | 25 | [AC_LANG_PROGRAM([[ |
@@ -33,7 +34,7 @@ AC_DEFUN([gl_SOCKETLIB], | |||
33 | ], | 34 | ], |
34 | [gl_cv_func_wsastartup=yes], | 35 | [gl_cv_func_wsastartup=yes], |
35 | [gl_cv_func_wsastartup=no]) | 36 | [gl_cv_func_wsastartup=no]) |
36 | LIBS="$gl_save_LIBS" | 37 | LIBS="$gl_saved_LIBS" |
37 | ]) | 38 | ]) |
38 | if test "$gl_cv_func_wsastartup" = "yes"; then | 39 | if test "$gl_cv_func_wsastartup" = "yes"; then |
39 | AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.]) | 40 | AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.]) |
@@ -56,8 +57,8 @@ AC_DEFUN([gl_SOCKETLIB], | |||
56 | #endif | 57 | #endif |
57 | char setsockopt();]], [[setsockopt();]])], | 58 | char setsockopt();]], [[setsockopt();]])], |
58 | [], | 59 | [], |
59 | [gl_save_LIBS="$LIBS" | 60 | [gl_saved_LIBS="$LIBS" |
60 | LIBS="$gl_save_LIBS -lsocket" | 61 | LIBS="$gl_saved_LIBS -lsocket" |
61 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern | 62 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern |
62 | #ifdef __cplusplus | 63 | #ifdef __cplusplus |
63 | "C" | 64 | "C" |
@@ -65,7 +66,7 @@ char setsockopt();]], [[setsockopt();]])], | |||
65 | char setsockopt();]], [[setsockopt();]])], | 66 | char setsockopt();]], [[setsockopt();]])], |
66 | [gl_cv_lib_socket="-lsocket"]) | 67 | [gl_cv_lib_socket="-lsocket"]) |
67 | if test -z "$gl_cv_lib_socket"; then | 68 | if test -z "$gl_cv_lib_socket"; then |
68 | LIBS="$gl_save_LIBS -lnetwork" | 69 | LIBS="$gl_saved_LIBS -lnetwork" |
69 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern | 70 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern |
70 | #ifdef __cplusplus | 71 | #ifdef __cplusplus |
71 | "C" | 72 | "C" |
@@ -73,7 +74,7 @@ char setsockopt();]], [[setsockopt();]])], | |||
73 | char setsockopt();]], [[setsockopt();]])], | 74 | char setsockopt();]], [[setsockopt();]])], |
74 | [gl_cv_lib_socket="-lnetwork"]) | 75 | [gl_cv_lib_socket="-lnetwork"]) |
75 | if test -z "$gl_cv_lib_socket"; then | 76 | if test -z "$gl_cv_lib_socket"; then |
76 | LIBS="$gl_save_LIBS -lnet" | 77 | LIBS="$gl_saved_LIBS -lnet" |
77 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern | 78 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern |
78 | #ifdef __cplusplus | 79 | #ifdef __cplusplus |
79 | "C" | 80 | "C" |
@@ -82,7 +83,7 @@ char setsockopt();]], [[setsockopt();]])], | |||
82 | [gl_cv_lib_socket="-lnet"]) | 83 | [gl_cv_lib_socket="-lnet"]) |
83 | fi | 84 | fi |
84 | fi | 85 | fi |
85 | LIBS="$gl_save_LIBS" | 86 | LIBS="$gl_saved_LIBS" |
86 | ]) | 87 | ]) |
87 | if test -z "$gl_cv_lib_socket"; then | 88 | if test -z "$gl_cv_lib_socket"; then |
88 | gl_cv_lib_socket="none needed" | 89 | gl_cv_lib_socket="none needed" |