-if test "$ac_cv_func_ctime_r" = yes ; then
- echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
-echo "configure:9498: checking number of arguments of ctime_r" >&5
-if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 9503 "configure"
-#include "confdefs.h"
-#include <time.h>
-int main() {
-time_t ti; char *buffer; ctime_r(&ti,buffer,32);
-; return 0; }
-EOF
-if { (eval echo configure:9510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ol_cv_func_ctime_r_nargs=3
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ol_cv_func_ctime_r_nargs=0
-fi
-rm -f conftest*
- if test $ol_cv_func_ctime_r_nargs = 0 ; then
- cat > conftest.$ac_ext <<EOF
-#line 9522 "configure"
-#include "confdefs.h"
-#include <time.h>
-int main() {
-time_t ti; char *buffer;
- ctime_r(&ti,buffer);
-; return 0; }
-EOF
-if { (eval echo configure:9530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ol_cv_func_ctime_r_nargs=2
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ol_cv_func_ctime_r_nargs=0
-fi
-rm -f conftest*
- fi
-
-fi
-
-echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
- if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
- cat >> confdefs.h <<EOF
-#define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
-EOF
-
- fi
-
- echo $ac_n "checking return type of ctime_r""... $ac_c" 1>&6
-echo "configure:9553: checking return type of ctime_r" >&5
-if eval "test \"`echo '$''{'ol_cv_func_ctime_r_type'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 9558 "configure"
-#include "confdefs.h"
-#include <time.h>
-int main() {
-int ctime_r();
-; return 0; }
-EOF
-if { (eval echo configure:9565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ol_cv_func_ctime_r_type="int"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ol_cv_func_ctime_r_type="charp"
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ol_cv_func_ctime_r_type" 1>&6
- if test $ol_cv_func_ctime_r_type = "int" ; then
- cat >> confdefs.h <<EOF
-#define CTIME_R_RETURNS_INT 1
-EOF
-
- fi
-
-else
- ol_cv_func_ctime_r_nargs=0
-fi
-
-if test "$ac_cv_func_gethostbyname_r" = yes ; then
- echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
-echo "configure:9592: checking number of arguments of gethostbyname_r" >&5
-if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 9597 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
- #define BUFSIZE (sizeof(struct hostent)+10)
-int main() {
-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;
-; return 0; }
-EOF
-if { (eval echo configure:9611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ol_cv_func_gethostbyname_r_nargs=5
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ol_cv_func_gethostbyname_r_nargs=0
-fi
-rm -f conftest*
- if test $ol_cv_func_gethostbyname_r_nargs = 0 ; then
- cat > conftest.$ac_ext <<EOF
-#line 9623 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
- #define BUFSIZE (sizeof(struct hostent)+10)
-int main() {
-struct hostent hent;struct hostent *rhent;
- char buffer[BUFSIZE];
- int bufsize=BUFSIZE;int h_errno;
- (void)gethostbyname_r( "segovia.cs.purdue.edu", &hent, buffer, bufsize, &rhent, &h_errno);
- return 0;
-; return 0; }
-EOF
-if { (eval echo configure:9638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ol_cv_func_gethostbyname_r_nargs=6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ol_cv_func_gethostbyname_r_nargs=0
-fi
-rm -f conftest*
- fi
-
-fi
-
-echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
- if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
- cat >> confdefs.h <<EOF
-#define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
-EOF
-
- fi
-
-else
- ol_cv_func_gethostbyname_r=0
-fi
-
-if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
- echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
-echo "configure:9666: checking number of arguments of gethostbyaddr_r" >&5
-if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 9671 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
- #define BUFSIZE (sizeof(struct hostent)+10)
-int main() {
-struct hostent hent; char buffer[BUFSIZE];
- struct in_addr add={0x70707070};
- 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;
-; return 0; }
-EOF
-if { (eval echo configure:9688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ol_cv_func_gethostbyaddr_r_nargs=7
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ol_cv_func_gethostbyaddr_r_nargs=0
-fi
-rm -f conftest*
- if test $ol_cv_func_gethostbyaddr_r_nargs = 0 ; then
- cat > conftest.$ac_ext <<EOF
-#line 9700 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
- #define BUFSIZE (sizeof(struct hostent)+10)
-int main() {
-struct hostent hent; struct hostent *rhent; char buffer[BUFSIZE];
- struct in_addr add={0x70707070};
- 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;
-; return 0; }
-EOF
-if { (eval echo configure:9718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ol_cv_func_gethostbyaddr_r_nargs=8
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ol_cv_func_gethostbyaddr_r_nargs=0
-fi
-rm -f conftest*
- fi
-
-fi
-
-echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
- if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
- cat >> confdefs.h <<EOF
-#define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
-EOF
-
- fi
-
-else
- ol_cv_func_gethostbyaddr_r=0
-fi
-
-if test "$ac_cv_func_ctime_r" = yes \
- -a "$ol_cv_func_ctime_r_nargs" -ge 2 -a "$ol_cv_func_ctime_r_nargs" -le 3 \
- -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
- -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
- -a "$ac_cv_func_gethostbyaddr_r" = yes \
- -a "$ac_cv_func_gethostbyname_r" = yes \
- ; then
-
- cat >> confdefs.h <<\EOF
-#define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
-EOF
-
-fi
-
-if test $ol_link_threads != no ; then
- cat >> confdefs.h <<\EOF
-#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
-EOF
-
-fi
-