dnl Disable config.cache!
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl
-
dnl Configure.in for OpenLDAP
AC_INIT(include/ldap.h)dnl
+
+# set unset (borrowed from autoconf 2.14a)
+if (unset FOO) >/dev/null 2>&1; then
+ ol_unset=unset
+else
+ ol_unset=false
+fi
+# unset CDPATH
+$ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
+
AC_CONFIG_AUX_DIR(build)dnl
AM_INIT_AUTOMAKE(openldap,[1.2], [no ac_define])dnl
OL_ARG_WITH(kerberos,[ --with-kerberos use Kerberos],
auto, [auto k5 k4 afs yes no])
OL_ARG_WITH(threads,[ --with-threads use threads],
- auto, [auto posix mach lwp yes no manual] )
+ auto, [auto posix mach pth lwp yes no manual] )
OL_ARG_WITH(yielding_select,[ --with-yielding-select with implicitly yielding select],
auto, [auto yes no manual] )
AC_CHECK_FUNCS(res_search)
if test $ac_cv_func_res_search = "no" ; then
AC_CHECK_LIB(bind, res_search)
- if test "$ac_cv_lib_bind_res_search" = "yes" ; then
- AC_DEFINE(HAVE_RES_SEARCH,1)
- else
- AC_CHECK_LIB(resolv, res_search)
- if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
- AC_DEFINE(HAVE_RES_SEARCH,1)
- fi
- fi
+ ac_cv_func_res_search=$ac_cv_lib_bind_res_search
+fi
+if test $ac_cv_func_res_search = "no" ; then
+ AC_CHECK_LIB(bind, __res_search)
+ ac_cv_func_res_search=$ac_cv_lib_bind___res_search
+fi
+if test $ac_cv_func_res_search = "no" ; then
+ AC_CHECK_LIB(resolv, res_search)
+ ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
+fi
+if test $ac_cv_func_res_search = "yes" ; then
+ AC_DEFINE(HAVE_RES_SEARCH,1)
fi
dnl HP-UX requires -lV3
fi
fi
+if test $ol_with_threads = auto -o $ol_with_threads = yes \
+ -o $ol_with_threads = pth ; then
+
+ dnl check for GNU Pth
+ AC_CHECK_HEADERS(pth.h)
+ if test $ac_cv_header_pth_h = yes ; then
+
+ dnl check for pth lib
+ AC_CHECK_LIB(pth,pth_version,[have_pth=yes],[have_pth=no])
+
+ if test $have_pth = yes ; then
+ AC_DEFINE(HAVE_GNU_PTH,1,[if you have GNU Pth])
+ LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
+ ol_link_threads=pth
+ fi
+
+ if test $ol_with_yielding_select = auto ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+fi
+
if test $ol_with_threads = auto -o $ol_with_threads = yes \
-o $ol_with_threads = lwp ; then
fi
fi
-if test $ol_with_ldbm_api = auto ; then
- AC_MSG_WARN([skipping automatic checking for NDBM, must be manually enabled.])
-elif test $ol_with_ldbm_api = ndbm ; then
+if test $ol_with_ldbm_api = ndbm ; then
OL_NDBM
if test $ol_cv_ndbm = yes ; then
bcopy \
closesocket \
flock \
+ getpass \
+ getpassphrase \
getdtablesize \
gethostname \
getpwuid \