HP-UX's X/Open network library requirement check follow-up
This commit is contained in:
parent
b5c599c80c
commit
9b4253fe67
28
acinclude.m4
28
acinclude.m4
@ -156,6 +156,34 @@ int main (void)
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CURL_CHECK_LIB_XNET
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if X/Open network library is required.
|
||||||
|
|
||||||
|
AC_DEFUN([CURL_CHECK_LIB_XNET], [
|
||||||
|
AC_MSG_CHECKING([if X/Open network library is required])
|
||||||
|
tst_lib_xnet_required="no"
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_SOURCE([[
|
||||||
|
int main (void)
|
||||||
|
{
|
||||||
|
#if defined(__hpux) && defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE >= 600)
|
||||||
|
return 0;
|
||||||
|
#if defined(__hpux) && defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
force compilation error
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
tst_lib_xnet_required="yes"
|
||||||
|
LIBS="$LIBS -lxnet"
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT([$tst_lib_xnet_required])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CURL_CHECK_AIX_ALL_SOURCE
|
dnl CURL_CHECK_AIX_ALL_SOURCE
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Provides a replacement of traditional AC_AIX with
|
dnl Provides a replacement of traditional AC_AIX with
|
||||||
|
@ -134,6 +134,34 @@ int main (void)
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_LIB_XNET
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if X/Open network library is required.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_LIB_XNET], [
|
||||||
|
AC_MSG_CHECKING([if X/Open network library is required])
|
||||||
|
tst_lib_xnet_required="no"
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_SOURCE([[
|
||||||
|
int main (void)
|
||||||
|
{
|
||||||
|
#if defined(__hpux) && defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE >= 600)
|
||||||
|
return 0;
|
||||||
|
#if defined(__hpux) && defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
force compilation error
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
tst_lib_xnet_required="yes"
|
||||||
|
LIBS="$LIBS -lxnet"
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT([$tst_lib_xnet_required])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_CHECK_AIX_ALL_SOURCE
|
dnl CARES_CHECK_AIX_ALL_SOURCE
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Provides a replacement of traditional AC_AIX with
|
dnl Provides a replacement of traditional AC_AIX with
|
||||||
|
@ -191,27 +191,7 @@ dnl **********************************************************************
|
|||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
|
|
||||||
tst_lib_xnet_required="no"
|
CARES_CHECK_LIB_XNET
|
||||||
AC_MSG_CHECKING([if X/Open network library is required])
|
|
||||||
CURL_CHECK_DEF([__hpux], [], [silent])
|
|
||||||
CURL_CHECK_DEF_CC([_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?
|
dnl gethostbyname without lib or in the nsl lib?
|
||||||
AC_CHECK_FUNC(gethostbyname,
|
AC_CHECK_FUNC(gethostbyname,
|
||||||
|
22
configure.ac
22
configure.ac
@ -498,27 +498,7 @@ dnl **********************************************************************
|
|||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
|
|
||||||
tst_lib_xnet_required="no"
|
CURL_CHECK_LIB_XNET
|
||||||
AC_MSG_CHECKING([if X/Open network library is required])
|
|
||||||
CURL_CHECK_DEF([__hpux], [], [silent])
|
|
||||||
CURL_CHECK_DEF_CC([_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?
|
dnl gethostbyname without lib or in the nsl lib?
|
||||||
AC_CHECK_FUNC(gethostbyname,
|
AC_CHECK_FUNC(gethostbyname,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user