mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
Check if X/Open network library is required
This commit is contained in:
parent
96ea49870c
commit
c76e538231
@ -191,6 +191,28 @@ dnl **********************************************************************
|
||||
dnl Checks for libraries.
|
||||
dnl **********************************************************************
|
||||
|
||||
tst_lib_xnet_required="no"
|
||||
AC_MSG_CHECKING([if X/Open network library is required])
|
||||
CURL_CHECK_DEF([__hpux], [], [silent])
|
||||
CURL_CHECK_DEF([_XOPEN_SOURCE_EXTENDED], [], [silent])
|
||||
if test "$curl_cv_have_def__XOPEN_SOURCE_EXTENDED" = "yes" &&
|
||||
test "$curl_cv_have_def___hpux" = "yes"; then
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lxnet $LIBS"
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
if(0 != getpeername(0, 0, 0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
tst_lib_xnet_required="yes"
|
||||
],[
|
||||
LIBS=$my_ac_save_LIBS
|
||||
])
|
||||
fi
|
||||
AC_MSG_RESULT([$tst_lib_xnet_required])
|
||||
|
||||
dnl gethostbyname without lib or in the nsl lib?
|
||||
AC_CHECK_FUNC(gethostbyname,
|
||||
[HAVE_GETHOSTBYNAME="1"
|
||||
|
22
configure.ac
22
configure.ac
@ -498,6 +498,28 @@ dnl **********************************************************************
|
||||
dnl Checks for libraries.
|
||||
dnl **********************************************************************
|
||||
|
||||
tst_lib_xnet_required="no"
|
||||
AC_MSG_CHECKING([if X/Open network library is required])
|
||||
CURL_CHECK_DEF([__hpux], [], [silent])
|
||||
CURL_CHECK_DEF([_XOPEN_SOURCE_EXTENDED], [], [silent])
|
||||
if test "$curl_cv_have_def__XOPEN_SOURCE_EXTENDED" = "yes" &&
|
||||
test "$curl_cv_have_def___hpux" = "yes"; then
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lxnet $LIBS"
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
if(0 != getpeername(0, 0, 0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
tst_lib_xnet_required="yes"
|
||||
],[
|
||||
LIBS=$my_ac_save_LIBS
|
||||
])
|
||||
fi
|
||||
AC_MSG_RESULT([$tst_lib_xnet_required])
|
||||
|
||||
dnl gethostbyname without lib or in the nsl lib?
|
||||
AC_CHECK_FUNC(gethostbyname,
|
||||
[HAVE_GETHOSTBYNAME="1"
|
||||
|
Loading…
Reference in New Issue
Block a user