mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
Update configure to:
-- fixed gethostbyaddr_r/gethostbyname_r compile warnings -- relocated Pthread -mt test to be before -kthread test
This commit is contained in:
parent
4be6bf9e9b
commit
e2d90b3acb
@ -467,8 +467,7 @@ AC_DEFUN(OL_FUNC_GETHOSTBYNAME_R_NARGS,
|
|||||||
[struct hostent hent; char buffer[BUFSIZE];
|
[struct hostent hent; char buffer[BUFSIZE];
|
||||||
int bufsize=BUFSIZE;int h_errno;
|
int bufsize=BUFSIZE;int h_errno;
|
||||||
(void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
|
(void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
|
||||||
buffer, bufsize, &h_errno);
|
buffer, bufsize, &h_errno);],
|
||||||
return 0;],
|
|
||||||
ol_cv_func_gethostbyname_r_nargs=5,
|
ol_cv_func_gethostbyname_r_nargs=5,
|
||||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@ -479,8 +478,7 @@ AC_DEFUN(OL_FUNC_GETHOSTBYNAME_R_NARGS,
|
|||||||
char buffer[BUFSIZE];
|
char buffer[BUFSIZE];
|
||||||
int bufsize=BUFSIZE;int h_errno;
|
int bufsize=BUFSIZE;int h_errno;
|
||||||
(void)gethostbyname_r("localhost", &hent, buffer, bufsize,
|
(void)gethostbyname_r("localhost", &hent, buffer, bufsize,
|
||||||
&rhent, &h_errno);
|
&rhent, &h_errno);],
|
||||||
return 0;],
|
|
||||||
ol_cv_func_gethostbyname_r_nargs=6,
|
ol_cv_func_gethostbyname_r_nargs=6,
|
||||||
ol_cv_func_gethostbyname_r_nargs=0)])])
|
ol_cv_func_gethostbyname_r_nargs=0)])])
|
||||||
if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
|
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>
|
#include <netdb.h>
|
||||||
#define BUFSIZE (sizeof(struct hostent)+10)],
|
#define BUFSIZE (sizeof(struct hostent)+10)],
|
||||||
[struct hostent hent; char buffer[BUFSIZE];
|
[struct hostent hent; char buffer[BUFSIZE];
|
||||||
struct in_addr add={0x70707070};
|
struct in_addr add;
|
||||||
size_t alen=sizeof(struct in_addr);
|
size_t alen=sizeof(struct in_addr);
|
||||||
int bufsize=BUFSIZE;int h_errno;
|
int bufsize=BUFSIZE;int h_errno;
|
||||||
(void)gethostbyaddr_r( (void *)&(add.s_addr),
|
(void)gethostbyaddr_r( (void *)&(add.s_addr),
|
||||||
alen, AF_INET, &hent, buffer, bufsize, &h_errno);
|
alen, AF_INET, &hent, buffer, bufsize, &h_errno);],
|
||||||
return 0;],
|
|
||||||
ol_cv_func_gethostbyaddr_r_nargs=7,
|
ol_cv_func_gethostbyaddr_r_nargs=7,
|
||||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@ -514,13 +511,12 @@ AC_DEFUN(OL_FUNC_GETHOSTBYADDR_R_NARGS,
|
|||||||
#define BUFSIZE (sizeof(struct hostent)+10)],
|
#define BUFSIZE (sizeof(struct hostent)+10)],
|
||||||
[struct hostent hent;
|
[struct hostent hent;
|
||||||
struct hostent *rhent; char buffer[BUFSIZE];
|
struct hostent *rhent; char buffer[BUFSIZE];
|
||||||
struct in_addr add={0x70707070};
|
struct in_addr add;
|
||||||
size_t alen=sizeof(struct in_addr);
|
size_t alen=sizeof(struct in_addr);
|
||||||
int bufsize=BUFSIZE;int h_errno;
|
int bufsize=BUFSIZE;int h_errno;
|
||||||
(void)gethostbyaddr_r( (void *)&(add.s_addr),
|
(void)gethostbyaddr_r( (void *)&(add.s_addr),
|
||||||
alen, AF_INET, &hent, buffer, bufsize,
|
alen, AF_INET, &hent, buffer, bufsize,
|
||||||
&rhent, &h_errno);
|
&rhent, &h_errno);],
|
||||||
return 0;],
|
|
||||||
ol_cv_func_gethostbyaddr_r_nargs=8,
|
ol_cv_func_gethostbyaddr_r_nargs=8,
|
||||||
ol_cv_func_gethostbyaddr_r_nargs=0)])])
|
ol_cv_func_gethostbyaddr_r_nargs=0)])])
|
||||||
if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
|
if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
|
||||||
|
44
configure.in
44
configure.in
@ -434,7 +434,7 @@ des_debug = 1;
|
|||||||
LIBS="$save_LIBS"
|
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,
|
AC_DEFINE(HAVE_DES_DEBUG,1,
|
||||||
[define if you have Kerberos des_debug])
|
[define if you have Kerberos des_debug])
|
||||||
fi
|
fi
|
||||||
@ -585,11 +585,11 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||||||
dnl pthread_create() in $LIBS
|
dnl pthread_create() in $LIBS
|
||||||
dnl
|
dnl
|
||||||
dnl Check special pthread (final) flags
|
dnl Check special pthread (final) flags
|
||||||
|
dnl pthread_create() with -mt (Solaris)
|
||||||
dnl pthread_create() with -kthread (FreeBSD)
|
dnl pthread_create() with -kthread (FreeBSD)
|
||||||
dnl pthread_create() with -pthread (FreeBSD/Digital Unix)
|
dnl pthread_create() with -pthread (FreeBSD/Digital Unix)
|
||||||
dnl pthread_create() with -pthreads (?)
|
dnl pthread_create() with -pthreads (?)
|
||||||
dnl pthread_create() with -thread (?)
|
dnl pthread_create() with -thread (?)
|
||||||
dnl pthread_create() with -mt (Solaris)
|
|
||||||
dnl
|
dnl
|
||||||
dnl Check pthread (final) libraries
|
dnl Check pthread (final) libraries
|
||||||
dnl pthread_mutex_unlock() in -lpthread -lmach -lexc -lc_r (OSF/1)
|
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
|
dnl pthread_create in $LIBS
|
||||||
AC_CHECK_FUNC(pthread_create,[ol_link_threads=yes])
|
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
|
if test $ol_link_threads = no ; then
|
||||||
dnl try -kthread
|
dnl try -kthread
|
||||||
AC_CACHE_CHECK([for pthread_create with -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
|
||||||
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
|
if test $ol_link_threads = no ; then
|
||||||
dnl try DEC Threads -lpthread -lmach -lexc -lc_r
|
dnl try DEC Threads -lpthread -lmach -lexc -lc_r
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
|
@ -549,7 +549,7 @@
|
|||||||
/* Define if you have the socket library (-lsocket). */
|
/* Define if you have the socket library (-lsocket). */
|
||||||
#undef HAVE_LIBSOCKET
|
#undef HAVE_LIBSOCKET
|
||||||
|
|
||||||
/* define if you have -lxtpp */
|
/* define if you have -lxttp */
|
||||||
#undef HAVE_XTPP
|
#undef HAVE_XTPP
|
||||||
|
|
||||||
/* define if you have -ldsap */
|
/* define if you have -ldsap */
|
||||||
@ -567,9 +567,6 @@
|
|||||||
/* define if you have Kerberos */
|
/* define if you have Kerberos */
|
||||||
#undef HAVE_KERBEROS
|
#undef HAVE_KERBEROS
|
||||||
|
|
||||||
/* define if you have -lreadline */
|
|
||||||
#undef HAVE_READLINE
|
|
||||||
|
|
||||||
/* define if you have SSLeay or OpenSSL */
|
/* define if you have SSLeay or OpenSSL */
|
||||||
#undef HAVE_SSLEAY
|
#undef HAVE_SSLEAY
|
||||||
|
|
||||||
@ -642,6 +639,9 @@
|
|||||||
/* define if you have no termcap support */
|
/* define if you have no termcap support */
|
||||||
#undef NO_TERMCAP
|
#undef NO_TERMCAP
|
||||||
|
|
||||||
|
/* define if you have -lreadline */
|
||||||
|
#undef HAVE_READLINE
|
||||||
|
|
||||||
/* Define if TIOCGWINSZ requires sys/ioctl.h */
|
/* Define if TIOCGWINSZ requires sys/ioctl.h */
|
||||||
#undef GWINSZ_IN_SYS_IOCTL
|
#undef GWINSZ_IN_SYS_IOCTL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user