-dnl ----------------------------------------------------------------
-dnl Tests for reentrant functions necessary to build a
-dnl thread_safe -lldap.
-AC_CHECK_FUNCS( \
- ctime_r \
- gethostbyname_r gethostbyaddr_r \
-)
-
-if test "$ac_cv_func_ctime_r" = no ; then
- ol_cv_func_ctime_r_nargs=0
-else
- OL_FUNC_CTIME_R_NARGS
-dnl OL_FUNC_CTIME_R_TYPE
-fi
-
-if test "$ac_cv_func_gethostbyname_r" = yes ; then
- OL_FUNC_GETHOSTBYNAME_R_NARGS
-else
- ol_cv_func_gethostbyname_r_nargs=0
-fi
-
-if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
- OL_FUNC_GETHOSTBYADDR_R_NARGS
-else
- ol_cv_func_gethostbyaddr_r_nargs=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 "$ac_cv_func_gethostbyname_r" = yes \
- -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
- -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
- -a "$ac_cv_func_gethostbyaddr_r" = yes \
- -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
- -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
- ; then
-
- AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_REENTRANT,1)
-fi
-