mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Refactor how libraries are checked for connect() function, follow-up.
This commit is contained in:
parent
1ff4e9008b
commit
e96a9190a3
@ -2208,6 +2208,7 @@ dnl Verify if network connect function is already available
|
|||||||
dnl using current libraries or if another one is required.
|
dnl using current libraries or if another one is required.
|
||||||
|
|
||||||
AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [
|
AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [
|
||||||
|
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
|
||||||
AC_MSG_CHECKING([for connect in libraries])
|
AC_MSG_CHECKING([for connect in libraries])
|
||||||
tst_connect_save_LIBS="$LIBS"
|
tst_connect_save_LIBS="$LIBS"
|
||||||
tst_connect_need_LIBS="unknown"
|
tst_connect_need_LIBS="unknown"
|
||||||
@ -2216,6 +2217,10 @@ AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [
|
|||||||
LIBS="$tst_lib $tst_connect_save_LIBS"
|
LIBS="$tst_lib $tst_connect_save_LIBS"
|
||||||
AC_LINK_IFELSE([
|
AC_LINK_IFELSE([
|
||||||
AC_LANG_PROGRAM([[
|
AC_LANG_PROGRAM([[
|
||||||
|
$curl_includes_winsock2
|
||||||
|
#ifndef HAVE_WINDOWS_H
|
||||||
|
int connect(int, void*, int);
|
||||||
|
#endif
|
||||||
]],[[
|
]],[[
|
||||||
if(0 != connect(0, 0, 0))
|
if(0 != connect(0, 0, 0))
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1676,6 +1676,7 @@ dnl Verify if network connect function is already available
|
|||||||
dnl using current libraries or if another one is required.
|
dnl using current libraries or if another one is required.
|
||||||
|
|
||||||
AC_DEFUN([CARES_CHECK_LIBS_CONNECT], [
|
AC_DEFUN([CARES_CHECK_LIBS_CONNECT], [
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||||
AC_MSG_CHECKING([for connect in libraries])
|
AC_MSG_CHECKING([for connect in libraries])
|
||||||
tst_connect_save_LIBS="$LIBS"
|
tst_connect_save_LIBS="$LIBS"
|
||||||
tst_connect_need_LIBS="unknown"
|
tst_connect_need_LIBS="unknown"
|
||||||
@ -1684,6 +1685,10 @@ AC_DEFUN([CARES_CHECK_LIBS_CONNECT], [
|
|||||||
LIBS="$tst_lib $tst_connect_save_LIBS"
|
LIBS="$tst_lib $tst_connect_save_LIBS"
|
||||||
AC_LINK_IFELSE([
|
AC_LINK_IFELSE([
|
||||||
AC_LANG_PROGRAM([[
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
#ifndef HAVE_WINDOWS_H
|
||||||
|
int connect(int, void*, int);
|
||||||
|
#endif
|
||||||
]],[[
|
]],[[
|
||||||
if(0 != connect(0, 0, 0))
|
if(0 != connect(0, 0, 0))
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user