Update configure to:

-- fixed gethostbyaddr_r/gethostbyname_r compile warnings
  -- relocated Pthread -mt test to be before -kthread test
This commit is contained in:
Kurt Zeilenga 1999-03-10 23:31:06 +00:00
parent 4be6bf9e9b
commit e2d90b3acb
4 changed files with 422 additions and 430 deletions

View File

@ -467,8 +467,7 @@ AC_DEFUN(OL_FUNC_GETHOSTBYNAME_R_NARGS,
[struct hostent hent; char buffer[BUFSIZE];
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
buffer, bufsize, &h_errno);
return 0;],
buffer, bufsize, &h_errno);],
ol_cv_func_gethostbyname_r_nargs=5,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
@ -479,8 +478,7 @@ AC_DEFUN(OL_FUNC_GETHOSTBYNAME_R_NARGS,
char buffer[BUFSIZE];
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyname_r("localhost", &hent, buffer, bufsize,
&rhent, &h_errno);
return 0;],
&rhent, &h_errno);],
ol_cv_func_gethostbyname_r_nargs=6,
ol_cv_func_gethostbyname_r_nargs=0)])])
if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
@ -500,12 +498,11 @@ AC_DEFUN(OL_FUNC_GETHOSTBYADDR_R_NARGS,
#include <netdb.h>
#define BUFSIZE (sizeof(struct hostent)+10)],
[struct hostent hent; char buffer[BUFSIZE];
struct in_addr add={0x70707070};
struct in_addr add;
size_t alen=sizeof(struct in_addr);
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyaddr_r( (void *)&(add.s_addr),
alen, AF_INET, &hent, buffer, bufsize, &h_errno);
return 0;],
alen, AF_INET, &hent, buffer, bufsize, &h_errno);],
ol_cv_func_gethostbyaddr_r_nargs=7,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
@ -514,13 +511,12 @@ AC_DEFUN(OL_FUNC_GETHOSTBYADDR_R_NARGS,
#define BUFSIZE (sizeof(struct hostent)+10)],
[struct hostent hent;
struct hostent *rhent; char buffer[BUFSIZE];
struct in_addr add={0x70707070};
struct in_addr add;
size_t alen=sizeof(struct in_addr);
int bufsize=BUFSIZE;int h_errno;
(void)gethostbyaddr_r( (void *)&(add.s_addr),
alen, AF_INET, &hent, buffer, bufsize,
&rhent, &h_errno);
return 0;],
&rhent, &h_errno);],
ol_cv_func_gethostbyaddr_r_nargs=8,
ol_cv_func_gethostbyaddr_r_nargs=0)])])
if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then

784
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -434,7 +434,7 @@ des_debug = 1;
LIBS="$save_LIBS"
])
if test $ol_cv_var_des_debug= yes ; then
if test $ol_cv_var_des_debug = yes ; then
AC_DEFINE(HAVE_DES_DEBUG,1,
[define if you have Kerberos des_debug])
fi
@ -585,11 +585,11 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
dnl pthread_create() in $LIBS
dnl
dnl Check special pthread (final) flags
dnl pthread_create() with -mt (Solaris)
dnl pthread_create() with -kthread (FreeBSD)
dnl pthread_create() with -pthread (FreeBSD/Digital Unix)
dnl pthread_create() with -pthreads (?)
dnl pthread_create() with -thread (?)
dnl pthread_create() with -mt (Solaris)
dnl
dnl Check pthread (final) libraries
dnl pthread_mutex_unlock() in -lpthread -lmach -lexc -lc_r (OSF/1)
@ -612,6 +612,26 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
dnl pthread_create in $LIBS
AC_CHECK_FUNC(pthread_create,[ol_link_threads=yes])
if test $ol_link_threads = no ; then
dnl try -mt
AC_CACHE_CHECK([for pthread_create with -mt],
[ol_cv_thread_flag], [
dnl save the flags
save_LIBS="$LIBS"
LIBS="-mt $LIBS"
AC_TRY_LINK([char pthread_create();],
[pthread_create();],
[ol_cv_thread_flag=yes], [ol_cv_thread_flag=no])
dnl restore the LIBS
LIBS="$save_LIBS"
])
if test $ol_cv_thread_flag = yes ; then
LTHREAD_LIBS="$LTHREAD_LIBS -mt"
ol_link_threads=posix
fi
fi
if test $ol_link_threads = no ; then
dnl try -kthread
AC_CACHE_CHECK([for pthread_create with -kthread],
@ -707,26 +727,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
fi
fi
if test $ol_link_threads = no ; then
dnl try -mt
AC_CACHE_CHECK([for pthread_create with -mt],
[ol_cv_thread_flag], [
dnl save the flags
save_LIBS="$LIBS"
LIBS="-mt $LIBS"
AC_TRY_LINK([char pthread_create();],
[pthread_create();],
[ol_cv_thread_flag=yes], [ol_cv_thread_flag=no])
dnl restore the LIBS
LIBS="$save_LIBS"
])
if test $ol_cv_thread_flag = yes ; then
LTHREAD_LIBS="$LTHREAD_LIBS -mt"
ol_link_threads=posix
fi
fi
if test $ol_link_threads = no ; then
dnl try DEC Threads -lpthread -lmach -lexc -lc_r
save_LIBS="$LIBS"

View File

@ -549,7 +549,7 @@
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
/* define if you have -lxtpp */
/* define if you have -lxttp */
#undef HAVE_XTPP
/* define if you have -ldsap */
@ -567,9 +567,6 @@
/* define if you have Kerberos */
#undef HAVE_KERBEROS
/* define if you have -lreadline */
#undef HAVE_READLINE
/* define if you have SSLeay or OpenSSL */
#undef HAVE_SSLEAY
@ -642,6 +639,9 @@
/* define if you have no termcap support */
#undef NO_TERMCAP
/* define if you have -lreadline */
#undef HAVE_READLINE
/* Define if TIOCGWINSZ requires sys/ioctl.h */
#undef GWINSZ_IN_SYS_IOCTL