]> git.sur5r.net Git - openldap/blobdiff - configure.in
ud should be installed with mode 755 not 775.
[openldap] / configure.in
index 8b21ceaa507dc163d4cb40834673aa18ecceace3..626b4387145b7eed01b27c0e7cb6db8c4e570a13 100644 (file)
@@ -10,9 +10,18 @@ dnl
 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
 
@@ -58,7 +67,7 @@ OL_ARG_ENABLE(dmalloc,[  --enable-dmalloc     enable debug malloc support], no)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] )
 
@@ -290,14 +299,18 @@ dnl Check for resolver routines
 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
@@ -969,6 +982,28 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
        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
 
@@ -1160,9 +1195,7 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; 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
@@ -1376,6 +1409,8 @@ AC_CHECK_FUNCS(           \
        bcopy                   \
        closesocket             \
        flock                   \
+       getpass                 \
+       getpassphrase   \
        getdtablesize   \
        gethostname             \
        getpwuid                \