Cleanup socket() detection.

Move select() detection forward, error if not available.
Move select() args type check forward so it can be used in subsequent tests.
This commit is contained in:
Kurt Zeilenga 1999-04-04 20:36:35 +00:00
parent 2032577773
commit b4658cbe24
3 changed files with 563 additions and 735 deletions

1263
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -349,7 +349,7 @@ dnl Likely combinations:
dnl -lsocket [ -lnsl_s | -lnsl ]
dnl -linet
AC_CHECK_FUNC(socket, [have_socket=yes], [
AC_CHECK_FUNC(socket, :, [
dnl
dnl hopefully we won't include too many libraries
dnl
@ -378,6 +378,13 @@ fi
dnl HP-UX requires -lV3
AC_CHECK_LIB(V3, sigset)
AC_CHECK_FUNC(select, :, AC_MSG_ERROR([select() required.]))
dnl Select arg types
dnl (if this detection becomes permenent, it and the select() detection
dnl should be done before the yielding select test)
AC_FUNC_SELECT_ARGTYPES
# ISODE tests
ol_link_isode=no
if test $ol_enable_ldapd != no ; then
@ -1250,13 +1257,11 @@ if test $ol_link_threads != no ; then
AC_DEFINE(THREADSAFE,1)
AC_DEFINE(_THREADSAFE,1)
dnl this might cause the errno symbol to be
dnl replaced with a function to get a thread specific errno.
dnl check to see if everything needs to be compiled
dnl with the thread libraries
dnl The errno declaration may dependent upon _REENTRANT.
dnl If it does, we must link with thread support.
AC_CACHE_CHECK([for thread specific errno],
[ol_cv_errno_thread_specific], [
AC_TRY_LINK([#include <errno.h>], [int x = errno;],
AC_TRY_LINK([#include <errno.h>], [errno = 0;],
[ol_cv_errno_thread_specific=yes],
[ol_cv_errno_thread_specific=no])
])
@ -1699,7 +1704,7 @@ AC_FUNC_MEMCMP
dnl AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
AC_FUNC_STRFTIME
dnl AM_FUNC_STRTOD
AC_FUNC_VFORK
dnl AC_FUNC_VFORK
AC_FUNC_VPRINTF
if test $ac_cv_func_vprintf = yes ; then
@ -1724,13 +1729,11 @@ AC_CHECK_FUNCS( \
mkstemp \
recv \
recvfrom \
select \
setpwfile \
setsid \
signal \
sigset \
snprintf \
socket \
strdup \
strerror \
strpbrk \
@ -1745,11 +1748,6 @@ AC_CHECK_FUNCS( \
wait4 \
)
dnl Select arg types
dnl (if this detection becomes permenent, it and the select() detection
dnl should be done before the yielding select test)
AC_FUNC_SELECT_ARGTYPES
dnl We actually may need to replace more than this.
AC_REPLACE_FUNCS(getopt tempnam)

View File

@ -43,9 +43,6 @@
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define if you have <vfork.h>. */
#undef HAVE_VFORK_H
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
@ -95,9 +92,6 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Define vfork as fork if vfork does not work. */
#undef vfork
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
@ -300,9 +294,6 @@
/* Define if you have the sched_yield function. */
#undef HAVE_SCHED_YIELD
/* Define if you have the select function. */
#undef HAVE_SELECT
/* Define if you have the setpwfile function. */
#undef HAVE_SETPWFILE