mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
check if unistd.h declares fd_set
This commit is contained in:
42
configure.in
42
configure.in
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
|
||||
AC_REVISION($Revision: 1.216 $)
|
||||
AC_REVISION($Revision: 1.217 $)
|
||||
|
||||
AC_INIT(lib/dns/name.c)
|
||||
AC_PREREQ(2.13)
|
||||
@@ -318,13 +318,51 @@ AC_PROG_YACC
|
||||
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h)
|
||||
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h)
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
|
||||
#
|
||||
# check if we need to #include sys/select.h explicitly
|
||||
#
|
||||
case $ac_cv_header_unistd_h in
|
||||
yes)
|
||||
AC_MSG_CHECKING(if unistd.h defines fd_set)
|
||||
AC_TRY_COMPILE([
|
||||
#include <unistd.h>],
|
||||
[fd_set read_set; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
|
||||
LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"],
|
||||
[AC_MSG_RESULT(no)
|
||||
case ac_cv_header_sys_select_h in
|
||||
yes)
|
||||
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
|
||||
LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
|
||||
;;
|
||||
no)
|
||||
AC_MSG_ERROR(["need either working unistd.h or sys/select.h"])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
;;
|
||||
no)
|
||||
case ac_cv_header_sys_select_h in
|
||||
yes)
|
||||
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
|
||||
LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
|
||||
;;
|
||||
no)
|
||||
AC_MSG_ERROR(["need either unistd.h or sys/select.h"])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
|
||||
AC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH)
|
||||
#
|
||||
# Begin pthreads checking.
|
||||
#
|
||||
|
Reference in New Issue
Block a user