mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
detect, but don't use, Solaris' /dev/poll
This commit is contained in:
parent
c0c089f4a4
commit
35622ec494
3 changed files with 243 additions and 14 deletions
212
configure
vendored
212
configure
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.635 2006/07/26 00:55:07 hyc Exp .
|
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.636 2006/09/05 23:54:54 ando Exp .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.59.
|
# Generated by GNU Autoconf 2.59.
|
||||||
#
|
#
|
||||||
|
|
@ -15966,9 +15966,9 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if test "${ac_cv_header_sys_epoll_h}" = yes; then
|
if test "${ac_cv_header_sys_epoll_h}" = yes; then
|
||||||
echo "$as_me:$LINENO: checking for epoll system call" >&5
|
echo "$as_me:$LINENO: checking for epoll system call" >&5
|
||||||
echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
|
echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
|
||||||
if test "$cross_compiling" = yes; then
|
if test "$cross_compiling" = yes; then
|
||||||
echo "$as_me:$LINENO: result: no" >&5
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
echo "${ECHO_T}no" >&6
|
echo "${ECHO_T}no" >&6
|
||||||
else
|
else
|
||||||
|
|
@ -15978,7 +15978,7 @@ _ACEOF
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
int main(int argc, char *argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int epfd = epoll_create(256);
|
int epfd = epoll_create(256);
|
||||||
exit (epfd == -1 ? 1 : 0);
|
exit (epfd == -1 ? 1 : 0);
|
||||||
|
|
@ -16015,6 +16015,208 @@ rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftes
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
for ac_header in sys/devpoll.h
|
||||||
|
do
|
||||||
|
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||||
|
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||||
|
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||||
|
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||||||
|
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||||||
|
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||||||
|
else
|
||||||
|
# Is the header compilable?
|
||||||
|
echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
||||||
|
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
$ac_includes_default
|
||||||
|
#include <$ac_header>
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
|
(eval $ac_compile) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag"
|
||||||
|
|| test ! -s conftest.err'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; } &&
|
||||||
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_header_compiler=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_header_compiler=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||||||
|
echo "${ECHO_T}$ac_header_compiler" >&6
|
||||||
|
|
||||||
|
# Is the header present?
|
||||||
|
echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
||||||
|
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <$ac_header>
|
||||||
|
_ACEOF
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||||
|
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } >/dev/null; then
|
||||||
|
if test -s conftest.err; then
|
||||||
|
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||||
|
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||||
|
else
|
||||||
|
ac_cpp_err=
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ac_cpp_err=yes
|
||||||
|
fi
|
||||||
|
if test -z "$ac_cpp_err"; then
|
||||||
|
ac_header_preproc=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_header_preproc=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_ext
|
||||||
|
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||||||
|
echo "${ECHO_T}$ac_header_preproc" >&6
|
||||||
|
|
||||||
|
# So? What about this header?
|
||||||
|
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||||||
|
yes:no: )
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||||
|
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
||||||
|
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
||||||
|
ac_header_preproc=yes
|
||||||
|
;;
|
||||||
|
no:yes:* )
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
||||||
|
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
||||||
|
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
||||||
|
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
||||||
|
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
||||||
|
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
||||||
|
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
||||||
|
(
|
||||||
|
cat <<\_ASBOX
|
||||||
|
## --------------------------------------------- ##
|
||||||
|
## Report this to <http://www.openldap.org/its/> ##
|
||||||
|
## --------------------------------------------- ##
|
||||||
|
_ASBOX
|
||||||
|
) |
|
||||||
|
sed "s/^/$as_me: WARNING: /" >&2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||||
|
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||||||
|
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
eval "$as_ac_Header=\$ac_header_preproc"
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||||||
|
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||||||
|
|
||||||
|
fi
|
||||||
|
if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
if test "${ac_cv_header_sys_devpoll_h}" = yes \
|
||||||
|
-a "${ac_cv_header_poll_h}" = yes ; \
|
||||||
|
then
|
||||||
|
echo "$as_me:$LINENO: checking for /dev/poll" >&5
|
||||||
|
echo $ECHO_N "checking for /dev/poll... $ECHO_C" >&6
|
||||||
|
if test "$cross_compiling" = yes; then
|
||||||
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
|
echo "${ECHO_T}no" >&6
|
||||||
|
else
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
|
||||||
|
exit (devpollfd == -1 ? 1 : 0);
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest$ac_exeext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||||
|
(eval $ac_link) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
echo "$as_me:$LINENO: result: yes" >&5
|
||||||
|
echo "${ECHO_T}yes" >&6
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define HAVE_DEVPOLL 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "$as_me: program exited with status $ac_status" >&5
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
( exit $ac_status )
|
||||||
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
|
echo "${ECHO_T}no" >&6
|
||||||
|
fi
|
||||||
|
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# strerror checks
|
# strerror checks
|
||||||
echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
|
echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
|
||||||
echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
|
echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
|
||||||
|
|
@ -39085,6 +39287,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_func in \
|
for ac_func in \
|
||||||
|
|
@ -39107,6 +39310,7 @@ for ac_func in \
|
||||||
gettimeofday \
|
gettimeofday \
|
||||||
initgroups \
|
initgroups \
|
||||||
inet_ntoa_b \
|
inet_ntoa_b \
|
||||||
|
ioctl \
|
||||||
lockf \
|
lockf \
|
||||||
memcpy \
|
memcpy \
|
||||||
memmove \
|
memmove \
|
||||||
|
|
|
||||||
22
configure.in
22
configure.in
|
|
@ -955,13 +955,28 @@ AC_CHECK_HEADERS( poll.h )
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
AC_CHECK_HEADERS( sys/epoll.h )
|
AC_CHECK_HEADERS( sys/epoll.h )
|
||||||
if test "${ac_cv_header_sys_epoll_h}" = yes; then
|
if test "${ac_cv_header_sys_epoll_h}" = yes; then
|
||||||
AC_MSG_CHECKING(for epoll system call)
|
AC_MSG_CHECKING(for epoll system call)
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int argc, char *argv)
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int epfd = epoll_create(256);
|
int epfd = epoll_create(256);
|
||||||
exit (epfd == -1 ? 1 : 0);
|
exit (epfd == -1 ? 1 : 0);
|
||||||
}]])],[AC_MSG_RESULT(yes)
|
}]])],[AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_EPOLL,1, [define if your system supports epoll])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
|
AC_DEFINE(HAVE_EPOLL,1, [define if your system supports epoll])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl ----------------------------------------------------------------
|
||||||
|
AC_CHECK_HEADERS( sys/devpoll.h )
|
||||||
|
dnl "/dev/poll" needs <sys/poll.h> as well...
|
||||||
|
if test "${ac_cv_header_sys_devpoll_h}" = yes \
|
||||||
|
-a "${ac_cv_header_poll_h}" = yes ; \
|
||||||
|
then
|
||||||
|
AC_MSG_CHECKING(for /dev/poll)
|
||||||
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
|
||||||
|
exit (devpollfd == -1 ? 1 : 0);
|
||||||
|
}]])],[AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_DEVPOLL,1, [define if your system supports /dev/poll])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
|
|
@ -2396,6 +2411,7 @@ AC_CHECK_FUNCS( \
|
||||||
gettimeofday \
|
gettimeofday \
|
||||||
initgroups \
|
initgroups \
|
||||||
inet_ntoa_b \
|
inet_ntoa_b \
|
||||||
|
ioctl \
|
||||||
lockf \
|
lockf \
|
||||||
memcpy \
|
memcpy \
|
||||||
memmove \
|
memmove \
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,9 @@
|
||||||
/* Define to 1 if you have the <des.h> header file. */
|
/* Define to 1 if you have the <des.h> header file. */
|
||||||
#undef HAVE_DES_H
|
#undef HAVE_DES_H
|
||||||
|
|
||||||
|
/* define if your system supports /dev/poll */
|
||||||
|
#undef HAVE_DEVPOLL
|
||||||
|
|
||||||
/* Define to 1 if you have the <direct.h> header file. */
|
/* Define to 1 if you have the <direct.h> header file. */
|
||||||
#undef HAVE_DIRECT_H
|
#undef HAVE_DIRECT_H
|
||||||
|
|
||||||
|
|
@ -274,6 +277,9 @@
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
#undef HAVE_INTTYPES_H
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ioctl' function. */
|
||||||
|
#undef HAVE_IOCTL
|
||||||
|
|
||||||
/* Define to 1 if you have the <io.h> header file. */
|
/* Define to 1 if you have the <io.h> header file. */
|
||||||
#undef HAVE_IO_H
|
#undef HAVE_IO_H
|
||||||
|
|
||||||
|
|
@ -658,6 +664,9 @@
|
||||||
/* Define to 1 if you have the <syslog.h> header file. */
|
/* Define to 1 if you have the <syslog.h> header file. */
|
||||||
#undef HAVE_SYSLOG_H
|
#undef HAVE_SYSLOG_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/devpoll.h> header file. */
|
||||||
|
#undef HAVE_SYS_DEVPOLL_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||||
*/
|
*/
|
||||||
#undef HAVE_SYS_DIR_H
|
#undef HAVE_SYS_DIR_H
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue