updated socket library detection in configure.ac
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
35e8edd783
commit
58c5fe9682
45
configure
vendored
45
configure
vendored
@ -21318,6 +21318,51 @@ then :
|
||||
SOCKET_LIBS="$SOCKET_LIBS -lsocket"
|
||||
printf "%s\n" "#define HAVE_CONNECT 1" >>confdefs.h
|
||||
|
||||
else $as_nop
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
|
||||
printf %s "checking for connect in -lsocket... " >&6; }
|
||||
if test ${ac_cv_lib_socket_connect+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lsocket $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char connect ();
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return connect ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"
|
||||
then :
|
||||
ac_cv_lib_socket_connect=yes
|
||||
else $as_nop
|
||||
ac_cv_lib_socket_connect=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
|
||||
printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
|
||||
if test "x$ac_cv_lib_socket_connect" = xyes
|
||||
then :
|
||||
|
||||
SOCKET_LIBS="$SOCKET_LIBS -lnetwork"
|
||||
printf "%s\n" "#define HAVE_CONNECT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
@ -347,7 +347,10 @@ if test "x$ac_cv_func_connect" = "xno"
|
||||
then
|
||||
AC_CHECK_LIB([socket], [connect], [
|
||||
SOCKET_LIBS="$SOCKET_LIBS -lsocket"
|
||||
AC_DEFINE(HAVE_CONNECT, 1)
|
||||
AC_DEFINE(HAVE_CONNECT, 1) ], [
|
||||
AC_CHECK_LIB([socket], [connect], [
|
||||
SOCKET_LIBS="$SOCKET_LIBS -lnetwork"
|
||||
AC_DEFINE(HAVE_CONNECT, 1) ])
|
||||
])
|
||||
fi
|
||||
if test "x${platform_win32}" = "xyes"
|
||||
|
Loading…
Reference in New Issue
Block a user