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

View file

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