3 dnl Copyright 1998-2000 The OpenLDAP Foundation. All Rights Reserved.
5 dnl Redistribution and use in source and binary forms are permitted only
6 dnl as authorized by the OpenLDAP Public License. A copy of this
7 dnl license is available at http://www.OpenLDAP.org/license.html or
8 dnl in file LICENSE in the top-level directory of the distribution.
10 dnl ----------------------------------------------------------------
11 dnl Redefine AC_INIT_BINSH to provide RCS IDs and copyright notice
12 dnl at top of generated configure script. Prints simple copyright.
13 define([AC_INIT_BINSH],
16 # from] translit([$OpenLDAP$], $")] [
18 # Copyright 1998-2000 The OpenLDAP Foundation. All Rights Reserved.
20 # Redistribution and use in source and binary forms are permitted only
21 # as authorized by the OpenLDAP Public License. A copy of this
22 # license is available at http://www.OpenLDAP.org/license.html or
23 # in file LICENSE in the top-level directory of the distribution.
25 echo "Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved."
26 echo "Copying restrictions apply, see COPYRIGHT file."
28 dnl ----------------------------------------------------------------
29 dnl Disable config.cache!
30 define([AC_CACHE_LOAD], )dnl
31 define([AC_CACHE_SAVE], )dnl
32 dnl ================================================================
33 dnl Configure.in for OpenLDAP
34 AC_INIT(build/version)dnl
36 # set unset (borrowed from autoconf 2.14a)
37 if (unset FOO) >/dev/null 2>&1; then
43 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
45 AC_CONFIG_AUX_DIR(build)dnl
47 OL_VERSION=`cat $ac_aux_dir/version`
48 if test -z "$OL_VERSION"; then
49 AC_MSG_ERROR([could not determine version])
52 echo "Configuring OpenLDAP $OL_VERSION ..."
54 dnl Determine host platform
55 dnl we try not to use this for much
58 AM_INIT_AUTOMAKE(OpenLDAP,[$OL_VERSION], [no defines])dnl
61 AC_DEFINE_UNQUOTED(OPENLDAP_PACKAGE,"$PACKAGE",Package)
62 AC_DEFINE_UNQUOTED(OPENLDAP_VERSION,"$VERSION",Version)
64 dnl We use autoconf features new to 2.13.
65 dnl aclocal.m4 should be built using aclocal from automake 1.4
66 dnl libtool 1.3.3 should be installed.
67 AC_PREREQ(2.13)dnl Required Autoconf version
69 AC_CONFIG_HEADER(include/portable.h include/ldap_features.h include/lber_types.h)dnl
71 dnl ================================================================
73 AC_MSG_CHECKING(configure arguments)
74 AC_PREFIX_DEFAULT(/usr/local)
77 AC_SUBST(top_builddir)dnl
79 dnl ----------------------------------------------------------------
81 ldap_subdir="/openldap"
84 [ --with-subdir=DIR change default subdirectory used for installs],
91 ldap_subdir="$withval"
94 ldap_subdir="/$withval"
99 AC_SUBST(ldap_subdir)dnl
101 dnl ----------------------------------------------------------------
102 dnl General "enable" options
103 OL_ARG_ENABLE(debug,[ --enable-debug enable debugging], yes)dnl
104 OL_ARG_ENABLE(syslog,[ --enable-syslog enable syslog support], auto)dnl
105 OL_ARG_ENABLE(proctitle,[ --enable-proctitle enable proctitle support], yes)dnl
106 OL_ARG_ENABLE(cache,[ --enable-cache enable caching], yes)dnl
107 OL_ARG_ENABLE(referrals,[ --enable-referrals enable V2 Referrals extension], yes)dnl
108 OL_ARG_ENABLE(kbind,[ --enable-kbind enable V2 Kerberos IV bind], auto)dnl
109 OL_ARG_ENABLE(cldap,[ --enable-cldap enable connectionless ldap], no)dnl
110 OL_ARG_ENABLE(ipv6,[ --enable-ipv6 enable IPv6 support], auto)dnl
111 OL_ARG_ENABLE(unix,[ --enable-unix enable UNIX domain socket support], auto)dnl
112 OL_ARG_ENABLE(x_compile,[ --enable-x-compile enable cross compiling],
115 dnl ----------------------------------------------------------------
116 dnl General "with" options
117 dnl OL_ARG_ENABLE(dmalloc,[ --enable-dmalloc enable debug malloc support], no)dnl
119 OL_ARG_WITH(cyrus_sasl,[ --with-cyrus-sasl with Cyrus SASL support],
120 auto, [auto yes no] )
121 OL_ARG_WITH(fetch,[ --with-fetch with fetch URL support],
122 auto, [auto yes no] )
123 OL_ARG_WITH(kerberos,[ --with-kerberos with support],
124 auto, [auto k5 k5only k425 kth k4 afs yes no])
125 OL_ARG_WITH(readline,[ --with-readline with readline support],
126 auto, [auto yes no] )
127 OL_ARG_WITH(threads,[ --with-threads use threads],
128 auto, [auto nt posix mach pth lwp yes no manual] )
129 OL_ARG_WITH(tls,[ --with-tls with TLS/SSL support],
130 auto, [auto ssleay openssl yes no] )
131 OL_ARG_WITH(yielding_select,[ --with-yielding-select with implicitly yielding select],
132 auto, [auto yes no manual] )
134 dnl ----------------------------------------------------------------
136 dnl ----------------------------------------------------------------
138 dnl ----------------------------------------------------------------
140 AC_ARG_WITH(xxslapdoptions,[SLAPD (Standalone LDAP Daemon) Options:])
141 OL_ARG_ENABLE(slapd,[ --enable-slapd enable building slapd], yes)dnl
142 OL_ARG_ENABLE(cleartext,[ --enable-cleartext enable cleartext passwords], yes)dnl
143 OL_ARG_ENABLE(crypt,[ --enable-crypt enable crypt(3) passwords], auto)dnl
144 OL_ARG_ENABLE(kpasswd,[ --enable-kpasswd enable kerberos password verification], no)dnl
145 OL_ARG_ENABLE(spasswd,[ --enable-spasswd enable (Cyrus) SASL password verification], no)dnl
146 OL_ARG_ENABLE(modules,[ --enable-modules enable dynamic module support], no)dnl
147 OL_ARG_ENABLE(multimaster,[ --enable-multimaster enable multimaster replication], no)dnl
148 OL_ARG_ENABLE(phonetic,[ --enable-phonetic enable phonetic/soundex], no)dnl
149 OL_ARG_ENABLE(quipu,[ --enable-quipu build quipu migration tools], no)dnl
150 OL_ARG_ENABLE(rlookups,[ --enable-rlookups enable reverse lookups], auto)dnl
151 OL_ARG_ENABLE(aci,[ --enable-aci enable per-object ACIs], no)dnl
152 OL_ARG_ENABLE(wrappers,[ --enable-wrappers enable tcp wrapper support], no)dnl
153 OL_ARG_ENABLE(dynamic,[ --enable-dynamic enable linking built binaries with dynamic libs], no)dnl
155 dnl SLAPD Backend options
156 OL_ARG_ENABLE(dnssrv,[ --enable-dnssrv enable dnssrv backend], no)dnl
157 OL_ARG_WITH(dnssrv_module,[ --with-dnssrv-module module type], static,
159 OL_ARG_ENABLE(ldap,[ --enable-ldap enable ldap backend], no)dnl
160 OL_ARG_WITH(ldap_module,[ --with-ldap-module module type], static,
162 OL_ARG_ENABLE(ldbm,[ --enable-ldbm enable ldbm backend], yes)dnl
163 OL_ARG_WITH(ldbm_api,[ --with-ldbm-api use LDBM API], auto,
164 [auto berkeley bcompat mdbm gdbm])
165 OL_ARG_WITH(ldbm_module,[ --with-ldbm-module module type], static,
167 OL_ARG_WITH(ldbm_type,[ --with-ldbm-type use LDBM type], auto,
169 OL_ARG_ENABLE(passwd,[ --enable-passwd enable passwd backend], no)dnl
170 OL_ARG_WITH(passwd_module,[ --with-passwd-module module type], static,
172 OL_ARG_ENABLE(shell,[ --enable-shell enable shell backend], no)dnl
173 OL_ARG_WITH(shell_module,[ --with-shell-module module type], static,
176 dnl ----------------------------------------------------------------
178 AC_ARG_WITH(xxslurpdoptions,[SLURPD (Replication Daemon) Options:])
179 OL_ARG_ENABLE(slurpd,[ --enable-slurpd enable building slurpd], auto)dnl
181 dnl ----------------------------------------------------------------
182 AC_ARG_WITH(xxliboptions,[Library Generation & Linking Options])
184 dnl AC_DISABLE_SHARED
187 dnl ----------------------------------------------------------------
189 dnl General "enable" options
191 if test $ol_enable_slapd = no ; then
192 dnl SLAPD was specificallly disabled
193 if test $ol_enable_dnssrv = yes ; then
194 AC_MSG_WARN([slapd disabled, ignoring --enable-dnssrv argument])
196 if test $ol_enable_ldap = yes ; then
197 AC_MSG_WARN([slapd disabled, ignoring --enable-ldap argument])
199 if test $ol_enable_ldbm = yes ; then
200 AC_MSG_WARN([slapd disabled, ignoring --enable-ldbm argument])
202 if test $ol_enable_passwd = yes ; then
203 AC_MSG_WARN([slapd disabled, ignoring --enable-passwd argument])
205 if test $ol_enable_shell = yes ; then
206 AC_MSG_WARN([slapd disabled, ignoring --enable-shell argument])
208 if test $ol_enable_modules = yes ; then
209 AC_MSG_WARN([slapd disabled, ignoring --enable-modules argument])
211 if test $ol_enable_multimaster = yes ; then
212 AC_MSG_WARN([slapd disabled, ignoring --enable-multimaster argument])
214 if test $ol_enable_wrappers = yes ; then
215 AC_MSG_WARN([slapd disabled, ignoring --enable-wrappers argument])
217 if test $ol_enable_phonetic = yes ; then
218 AC_MSG_WARN([slapd disabled, ignoring --enable-phonetic argument])
220 if test $ol_enable_quipu = yes ; then
221 AC_MSG_WARN([slapd disabled, ignoring --enable-quipu argument])
223 if test $ol_enable_rlookups = yes ; then
224 AC_MSG_WARN([slapd disabled, ignoring --enable-rlookups argument])
226 if test $ol_enable_aci = yes ; then
227 AC_MSG_WARN([slapd disabled, ignoring --enable-aci argument])
229 if test $ol_with_ldbm_api != auto ; then
230 AC_MSG_WARN([slapd disabled, ignoring --with-ldbm-api argument])
232 if test $ol_with_ldbm_type != auto ; then
233 AC_MSG_WARN([slapd disabled, ignoring --with-ldbm-type argument])
235 if test $ol_with_dnssrv_module != static ; then
236 AC_MSG_WARN([slapd disabled, ignoring --with-dnssrv-module argument])
238 if test $ol_with_ldap_module != static ; then
239 AC_MSG_WARN([slapd disabled, ignoring --with-ldap-module argument])
241 if test $ol_with_ldbm_module != static ; then
242 AC_MSG_WARN([slapd disabled, ignoring --with-ldbm-module argument])
244 if test $ol_with_passwd_module != static ; then
245 AC_MSG_WARN([slapd disabled, ignoring --with-passwd-module argument])
247 if test $ol_with_shell_module != static ; then
248 AC_MSG_WARN([slapd disabled, ignoring --with-shell-module argument])
250 if test $ol_enable_slurpd = yes ; then
251 AC_MSG_ERROR([slurpd requires slapd])
254 # force settings to no
262 ol_enable_multimaster=no
263 ol_enable_phonetic=no
265 ol_enable_rlookups=no
267 ol_enable_wrappers=no
273 ol_with_dnssrv_module=static
274 ol_with_ldap_module=static
275 ol_with_ldbm_module=static
276 ol_with_passwd_module=static
277 ol_with_shell_module=static
281 elif test $ol_enable_ldbm = no ; then
282 dnl SLAPD without LDBM
284 if test $ol_with_ldbm_api != auto ; then
285 AC_MSG_WARN([LDBM disabled, ignoring --with-ldbm-api argument])
288 if test $ol_with_ldbm_type != auto ; then
289 AC_MSG_WARN([LDBM disabled, ignoring --with-ldbm-type argument])
292 if test $ol_with_ldbm_module != static ; then
293 AC_MSG_WARN([LDBM disabled, ignoring --with-ldbm-module argument])
296 if test $ol_enable_modules != yes -a \
297 $ol_enable_dnssrv = no -a \
298 $ol_enable_ldap = no -a \
299 $ol_enable_passwd = no -a \
300 $ol_enable_shell = no ; then
301 AC_MSG_ERROR([slapd requires a backend])
306 ol_with_ldbm_module=static
310 if test $ol_with_ldbm_api = gdbm -a \
311 $ol_with_ldbm_type = btree ; then
312 AC_MSG_ERROR([GDBM only supports LDBM type hash])
314 if test $ol_with_ldbm_api = mdbm -a \
315 $ol_with_ldbm_type = btree ; then
316 AC_MSG_ERROR([MDBM only supports LDBM type hash])
318 if test $ol_with_ldbm_api = ndbm -a \
319 $ol_with_ldbm_type = btree ; then
320 AC_MSG_ERROR([NDBM only supports LDBM type hash])
324 if test $ol_enable_slurpd = yes ; then
325 dnl SLURPD was specifically enabled
326 if test $ol_with_threads = no ; then
327 AC_MSG_ERROR([slurpd requires threads])
331 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
332 if test $ol_with_kerberos = no ; then
333 AC_MSG_ERROR([options require --with-kerberos])
335 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
336 if test $ol_with_kerberos != auto ; then
337 AC_MSG_WARN([Kerberos detection enabled unnecessarily]);
343 if test $ol_enable_spasswd = yes ; then
344 if test $ol_with_cyrus_sasl = no ; then
345 AC_MSG_ERROR([options require --with-cyrus-sasl])
352 dnl ----------------------------------------------------------------
376 BUILD_DNSSRV_DYNAMIC=static
377 BUILD_LDAP_DYNAMIC=static
378 BUILD_LDBM_DYNAMIC=static
379 BUILD_PASSWD_DYNAMIC=static
380 BUILD_SHELL_DYNAMIC=static
382 SLAPD_MODULES_LDFLAGS=
383 SLAPD_MODULES_CPPFLAGS=
395 dnl ================================================================
396 dnl Checks for programs
400 AC_DEFINE(HAVE_MKVERSION, 1, [define this if you have mkversion])
402 dnl ----------------------------------------------------------------
404 dnl Determine which C translator to use
407 dnl AIX Thread requires we use cc_r or xlc_r.
408 dnl But only do this IF AIX and CC is not set
409 dnl and threads are auto|yes|posix.
411 dnl If we find cc_r|xlc_r, force pthreads and assume
412 dnl pthread_create is in $LIBS (ie: don't bring in
413 dnl any additional thread libraries)
414 dnl If we do not find cc_r|xlc_r, disable threads
418 *-*-aix*) dnl all AIX is not a good idea.
419 if test -z "$CC" ; then
420 case "$ol_with_threads" in
421 auto | yes | posix) ol_aix_threads=yes ;;
427 if test $ol_aix_threads = yes ; then
428 if test -z "${CC}" ; then
429 AC_CHECK_PROGS(CC,cc_r xlc_r cc)
431 if test "$CC" = cc ; then
432 dnl no CC! don't allow --with-threads
433 if test $ol_with_threads != auto ; then
434 AC_MSG_ERROR([--with-threads requires cc_r (or other suitable compiler) on AIX])
436 AC_MSG_WARN([disabling threads, no cc_r on AIX])
442 if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
443 ol_with_threads=posix
444 ol_cv_pthread_create=yes
448 if test -z "${CC}"; then
449 AC_CHECK_PROGS(CC,cc)
452 dnl The default CFLAGS is empty NOT whatever AC_PROG_CC sets.
453 dnl (for now, let autoconf sort this out)
454 dnl CFLAGS=${CFLAGS-""}
464 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
468 AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail,
469 $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc)
470 AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb)
471 AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb)
475 dnl ----------------------------------------------------------------
476 dnl Cross compiling checks
477 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
478 AC_MSG_WARN([cross compiling.... some functionality will be removed.])
480 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
481 AC_MSG_WARN([programs compiled here do run here...])
482 AC_MSG_ERROR([ if not cross compiling, use --disable-x-compile.])
484 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
485 AC_MSG_WARN([programs compiled here do not run here...])
486 AC_MSG_ERROR([ if cross compiling, add --enable-x-compile.])
489 dnl ----------------------------------------------------------------
490 dnl Checks for UNIX Variants
495 dnl ----------------------------------------------------------------
496 dnl Checks for system services
502 AC_DEFINE_UNQUOTED( EXEEXT, "${EXEEXT}", [defined to be the EXE extension])
504 dnl ----------------------------------------------------------------
505 dnl BeOS requires -lbe -lroot -lnet
506 AC_CHECK_LIB(be, be_app, [LIBS="$LIBS -lbe -lroot -lnet"], :, [-lroot -lnet])
508 dnl ----------------------------------------------------------------
509 dnl OpenLDAP requires STDC features
511 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
512 AC_MSG_ERROR([OpenLDAP requires compiler to support STDC constructs.])
515 dnl ----------------------------------------------------------------
516 dnl Check cc depend flags
518 if test "${ol_cv_mkdep}" = no ; then
519 # this will soon become an error
520 AC_MSG_WARN([do not know how to generate dependencies])
523 dnl ----------------------------------------------------------------
524 dnl Check for AIX security library
525 AC_CHECK_LIB(s, afopen, [
527 AC_DEFINE(HAVE_AIX_SECURITY,1,[define if you have AIX security lib])
531 dnl ----------------------------------------------------------------
532 dnl PF_INET6 support requires getaddrinfo
533 dnl PF_UNIX may use getaddrinfo in available
534 AC_CHECK_FUNCS( getaddrinfo )
536 if test $ac_cv_func_getaddrinfo = no ; then
537 if test $ol_enable_ipv6 = yes ; then
538 AC_MSG_ERROR([IPv6 support requires getaddrinfo()])
543 if test $ol_enable_unix != no ; then
544 AC_CHECK_HEADERS( sys/un.h )
546 if test $ol_enable_unix = auto ; then
547 ol_enable_unix=$ac_cv_header_sys_un_h
548 elif test $ac_cv_header_sys_un_h = no ; then
549 AC_MSG_ERROR([UNIX domain support requires sys/un.h])
553 dnl ----------------------------------------------------------------
554 dnl Check for module support
556 if test $ol_enable_modules != no ; then
557 AC_CHECK_HEADERS(ltdl.h)
559 if test $ac_cv_header_ltdl_h = no ; then
560 AC_MSG_ERROR([could not locate libtool ltdl.h])
563 AC_CHECK_LIB(ltdl, lt_dlinit, [
565 AC_DEFINE(HAVE_LIBLTDL,1,[define if you have libtool -ltdl])
568 if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
569 AC_MSG_ERROR([could not locate libtool -lltdl])
573 ol_with_dnssrv_module=static
574 ol_with_ldap_module=static
575 ol_with_ldbm_module=static
576 ol_with_passwd_module=static
577 ol_with_shell_module=static
580 dnl ----------------------------------------------------------------
581 dnl Checks for header files.
584 if test $ol_cv_header_stdc != yes; then
585 AC_MSG_WARN([could not locate Standard C compliant headers])
590 AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
591 if test $am_cv_sys_posix_termios = yes ; then
592 AC_DEFINE(HAVE_POSIX_TERMIOS,1,
593 [define if you have POSIX termios])
643 dnl ----------------------------------------------------------------
644 dnl Checks for libraries
646 dnl HP-UX requires -lV3
647 AC_CHECK_LIB(V3, sigset)
649 dnl Gotta check for winsock manually
650 if test $ac_cv_header_winsock_h = yes; then
651 AC_CACHE_CHECK([for winsock], [ol_cv_winsock],
652 AC_TRY_LINK([#include <winsock.h>],[
654 select(0,NULL,NULL,NULL,NULL);
657 ],[ol_cv_winsock=yes],[ol_cv_winsock=no])])
659 if test $ol_cv_winsock = yes ; then
660 AC_DEFINE(HAVE_WINSOCK,1,[define if you have winsock])
661 ac_cv_func_socket=yes
662 ac_cv_func_select=yes
663 ac_cv_func_closesocket=yes
664 ac_cv_func_gethostname=yes
669 dnl Likely combinations:
670 dnl -lsocket [ -lnsl_s | -lnsl ]
673 AC_CHECK_FUNC(socket, :, [
674 dnl hopefully we won't include too many libraries
675 AC_CHECK_LIB(socket, main)
676 AC_CHECK_LIB(net, main)
677 AC_CHECK_LIB(nsl_s, main)
678 AC_CHECK_LIB(nsl, main)
679 AC_CHECK_LIB(inet, socket)
680 AC_CHECK_LIB(gen, main)
684 AC_CHECK_FUNC(select, :, AC_MSG_ERROR([select() required.]))
686 if test "${ac_cv_header_winsock_h}" != yes; then
688 dnl (if this detection becomes permenent, it and the select() detection
689 dnl should be done before the yielding select test)
690 AC_FUNC_SELECT_ARGTYPES
693 dnl check to see if system call automatically restart
694 dnl AC_SYS_RESTARTABLE_SYSCALLS
696 dnl ----------------------------------------------------------------
697 dnl require POSIX regex
698 AC_CHECK_HEADERS( regex.h )
699 if test "$ac_cv_header_regex_h" != yes ; then
700 AC_MSG_ERROR([POSIX regex.h required.])
702 AC_CHECK_FUNC(regfree, :, AC_MSG_ERROR([POSIX regex required.]))
705 if test "$ol_cv_c_posix_regex" = no ; then
706 AC_MSG_ERROR([broken POSIX regex!])
709 dnl ----------------------------------------------------------------
710 dnl Check for resolver routines
712 AC_CHECK_FUNC(res_query,:)
713 if test $ac_cv_func_res_query = no ; then
714 AC_CHECK_LIB(bind, res_query)
715 ac_cv_func_res_query=$ac_cv_lib_bind_res_query
718 if test $ac_cv_func_res_query = no ; then
719 AC_CHECK_LIB(bind, __res_query)
720 ac_cv_func_res_query=$ac_cv_lib_bind___res_query
723 if test $ac_cv_func_res_query = no ; then
724 AC_CHECK_LIB(resolv, res_query)
725 ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
728 if test "$ac_cv_func_res_query" = yes ; then
729 AC_DEFINE(HAVE_RES_QUERY,1,
730 [define if you have res_query()])
732 if test $ol_enable_dnssrv != no ; then
737 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
738 AC_MSG_ERROR([DNSSRV requires res_query()])
741 dnl ----------------------------------------------------------------
743 if test $ol_enable_quipu != no ; then
744 AC_CHECK_HEADERS(quipu/commonarg.h)
746 if test $ac_cv_header_quipu_commonarg_h = yes ; then
748 elif test $ol_enable_quipu = auto ; then
749 AC_MSG_WARN([no quipu for --enable-quipu=auto, disabling])
751 AC_MSG_ERROR(no quipu for --enable-quipu=$ol_enable_quipu)
755 dnl ----------------------------------------------------------------
762 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
763 -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
765 AC_CHECK_HEADERS(krb5.h)
767 if test $ac_cv_header_krb5_h = yes ; then
768 dnl lazy check for Heimdal Kerberos
769 AC_CHECK_HEADERS(heim_err.h)
770 if test $ac_cv_header_heim_err_h = yes ; then
776 if test $krb5_impl = mit; then
777 AC_CHECK_LIB(krb5, main,
779 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"],
781 [-lcrypto -lcom_err])
783 elif test $krb5_impl = heimdal; then
784 AC_CHECK_LIB(krb5, main,
786 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"],
788 [-ldes -lasn1 -lroken -lcom_err])
790 AC_DEFINE(HAVE_HEIMDAL_KERBEROS, 1,
791 [define if you have HEIMDAL Kerberos])
794 AC_MSG_WARN([Unrecongized Kerberos5 Implementation])
797 if test $have_krb5 = yes ; then
800 AC_DEFINE(HAVE_KRB5, 1,
801 [define if you have Kerberos V])
803 if test $ol_enable_kpasswd != no ; then
807 if test $ol_with_kerberos = k5only ; then
808 ol_with_kerberos=found
811 elif test $ol_with_kerberos != auto ; then
812 AC_MSG_ERROR([Required Kerberos 5 support not available])
818 if test $ol_link_krb5 = yes -a \
819 \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
821 AC_CHECK_HEADERS(kerberosIV/krb.h kerberosIV/des.h)
823 if test $ac_cv_header_kerberosIV_krb_h = yes ; then
824 if test $krb5_impl = mit; then
825 AC_CHECK_LIB(krb4, main, [have_k425=yes
826 KRB4_LIBS="-lkrb4 -ldes425"], [have_k425=no],
827 [-ldes425 -lkrb5 -lcrypto -lcom_err])
829 elif test $krb5_impl = heimdal; then
830 AC_CHECK_LIB(krb4, main, [have_k425=yes
831 KRB4_LIBS="-lkrb4"], [have_k425=no],
832 [-lkrb5 -ldes -lasn1 -lroken -lcom_err])
836 AC_MSG_WARN([Unrecongized Kerberos5 Implementation])
839 if test $have_k425 = yes ; then
840 ol_with_kerberos=found
843 AC_DEFINE(HAVE_KRB425, 1,
844 [define if you have Kerberos V with IV support])
845 AC_DEFINE(HAVE_KRB4, 1,
846 [define if you have Kerberos IV])
848 AC_CACHE_CHECK([for des_debug in Kerberos libraries],
849 [ol_cv_var_des_debug], [
852 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
854 #include <kerberosIV/krb.h>
855 #include <kerberosIV/des.h>
856 extern int des_debug;
859 ], ol_cv_var_des_debug=yes, ol_cv_var_des_debug=no)
864 if test $ol_cv_var_des_debug = yes ; then
865 AC_DEFINE(HAVE_DES_DEBUG,1,
866 [define if you have Kerberos des_debug])
874 if test $ol_link_krb5 = yes ; then
875 ol_with_kerberos=found
878 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
879 -o $ol_with_kerberos = kth ; then
881 AC_CHECK_HEADERS(krb.h des.h krb-archaeology.h )
883 if test $ac_cv_header_krb_h = yes ; then
884 AC_CHECK_LIB(krb, main, [have_k4=yes], [have_k4=no], [-ldes])
886 if test $have_k4 = yes ; then
887 ol_with_kerberos=found
890 AC_DEFINE(HAVE_KRB4, 1,
891 [define if you have Kerberos IV])
893 KRB4_LIBS="-lkrb -ldes"
895 if test $ac_cv_header_krb_archaeology_h = yes ; then
896 AC_DEFINE(HAVE_KTH_KERBEROS, 1,
897 [define if you have Kth Kerberos])
903 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
907 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
908 AC_DEFINE(HAVE_KERBEROS, 1, [define if you have Kerberos])
910 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
911 AC_MSG_ERROR([Kerberos detection failed.])
914 dnl ----------------------------------------------------------------
917 if test $ol_with_tls != no ; then
919 AC_CHECK_HEADERS(openssl/ssl.h ssl.h)
921 if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
922 AC_CHECK_LIB(ssl, SSLeay_add_ssl_algorithms,
928 if test $have_ssleay = no ; then
929 AC_CHECK_LIB(ssl, SSL_library_init,
931 need_rsaref=no], [have_ssleay=no],
935 if test $have_ssleay = no ; then
936 AC_CHECK_LIB(ssl, ssl3_accept,
938 need_rsaref=yes], [have_ssleay=no],
939 [-lcrypto -lRSAglue -lrsaref])
942 if test $have_ssleay = yes ; then
946 AC_DEFINE(HAVE_SSLEAY, 1,
947 [define if you have SSLeay or OpenSSL])
949 if test $need_rsaref = yes; then
950 AC_DEFINE(HAVE_RSAREF, 1,
951 [define if you have RSAref])
953 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
955 TLS_LIBS="-lssl -lcrypto"
961 if test $ol_link_tls = yes ; then
962 AC_DEFINE(HAVE_TLS, 1, [define if you have TLS])
965 dnl ----------------------------------------------------------------
966 dnl Tests for reentrant functions necessary to build a
967 dnl thread_safe -lldap.
970 gethostbyname_r gethostbyaddr_r \
973 if test "$ac_cv_func_ctime_r" = no ; then
974 ol_cv_func_ctime_r_nargs=0
976 OL_FUNC_CTIME_R_NARGS
977 dnl OL_FUNC_CTIME_R_TYPE
980 if test "$ac_cv_func_gethostbyname_r" = yes ; then
981 OL_FUNC_GETHOSTBYNAME_R_NARGS
983 ol_cv_func_gethostbyname_r_nargs=0
986 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
987 OL_FUNC_GETHOSTBYADDR_R_NARGS
989 ol_cv_func_gethostbyaddr_r_nargs=0
992 if test "$ac_cv_func_ctime_r" = yes \
993 -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
994 -a "$ol_cv_func_ctime_r_nargs" -le 3 \
995 -a "$ac_cv_func_gethostbyname_r" = yes \
996 -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
997 -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
998 -a "$ac_cv_func_gethostbyaddr_r" = yes \
999 -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
1000 -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
1003 AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_REENTRANT,1)
1006 dnl ----------------------------------------------------------------
1010 if test $ol_with_threads = auto -o $ol_with_threads = yes \
1011 -o $ol_with_threads = nt ; then
1015 if test "$ol_cv_nt_threads" = yes ; then
1017 ol_with_threads=found
1018 ol_with_yielding_select=yes
1020 AC_DEFINE(HAVE_NT_SERVICE_MANAGER,1,[if you have NT Service Manager])
1021 AC_DEFINE(HAVE_NT_EVENT_LOG,1,[if you have NT Event Log])
1024 if test $ol_with_threads = nt ; then
1025 AC_MSG_ERROR([could not locate NT Threads])
1029 if test $ol_with_threads = auto -o $ol_with_threads = yes \
1030 -o $ol_with_threads = posix ; then
1032 AC_CHECK_HEADERS(pthread.h)
1034 if test $ac_cv_header_pthread_h = yes ; then
1035 OL_POSIX_THREAD_VERSION
1037 if test $ol_cv_pthread_version = final ; then
1038 AC_DEFINE(HAVE_PTHREADS_FINAL,1,
1039 [define if pthreads API compatible with final spec])
1040 elif test $ol_cv_pthread_version = draft4 ; then
1041 AC_DEFINE(HAVE_PTHREADS_D4,1,
1042 [define if pthreads API compatible with draft4 spec])
1044 AC_MSG_ERROR([unknown pthread version])
1047 # consider threads found
1048 ol_with_threads=found
1050 OL_HEADER_LINUX_THREADS
1051 OL_HEADER_GNU_PTH_PTHREAD_H
1053 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
1054 AC_CHECK_HEADERS(sched.h)
1057 dnl Now the hard part, how to link?
1059 dnl currently supported checks:
1061 dnl Check for no flags
1062 dnl pthread_create() in $LIBS
1064 dnl Check special pthread (final) flags
1065 dnl [skipped] pthread_create() with -mt (Solaris) [disabled]
1066 dnl pthread_create() with -kthread (FreeBSD)
1067 dnl pthread_create() with -pthread (FreeBSD/Digital Unix)
1068 dnl pthread_create() with -pthreads (?)
1069 dnl pthread_create() with -mthreads (AIX)
1070 dnl pthread_create() with -thread (?)
1072 dnl Check pthread (final) libraries
1073 dnl pthread_mutex_unlock() in -lpthread -lmach -lexc -lc_r (OSF/1)
1074 dnl pthread_mutex_lock() in -lpthread -lmach -lexc (OSF/1)
1075 dnl [skipped] pthread_mutex_trylock() in -lpthread -lexc (OSF/1)
1076 dnl pthread_join() -Wl,-woff,85 -lpthread (IRIX)
1077 dnl pthread_create() in -lpthread (many)
1078 dnl pthread_create() in -lc_r (FreeBSD)
1080 dnl Check pthread (draft4) flags (depreciated)
1081 dnl pthread_create() with -threads (OSF/1)
1083 dnl Check pthread (draft4) libraries (depreciated)
1084 dnl pthread_mutex_unlock() in -lpthreads -lmach -lexc -lc_r (OSF/1)
1085 dnl pthread_mutex_lock() in -lpthreads -lmach -lexc (OSF/1)
1086 dnl pthread_mutex_trylock() in -lpthreads -lexc (OSF/1)
1087 dnl pthread_create() in -lpthreads (many)
1090 dnl pthread_create in $LIBS
1091 AC_CACHE_CHECK([for pthread_create in default libraries],
1092 ol_cv_pthread_create,[
1093 AC_TRY_RUN(OL_PTHREAD_TEST_PROGRAM,
1094 [ol_cv_pthread_create=yes],
1095 [ol_cv_pthread_create=no],
1096 [AC_TRY_LINK(OL_PTHREAD_TEST_INCLUDES,OL_PTHREAD_TEST_FUNCTION,
1097 [ol_cv_pthread_create=yes],
1098 [ol_cv_pthread_create=no])])])
1100 if test $ol_cv_pthread_create != no ; then
1101 ol_link_threads=posix
1105 dnl OL_PTHREAD_TRY([-mt], [ol_cv_pthread_mt])
1106 OL_PTHREAD_TRY([-kthread], [ol_cv_pthread_kthread])
1107 OL_PTHREAD_TRY([-pthread], [ol_cv_pthread_pthread])
1108 OL_PTHREAD_TRY([-pthreads], [ol_cv_pthread_pthreads])
1109 OL_PTHREAD_TRY([-mthreads], [ol_cv_pthread_mthreads])
1110 OL_PTHREAD_TRY([-thread], [ol_cv_pthread_thread])
1112 OL_PTHREAD_TRY([-lpthread -lmach -lexc -lc_r],
1113 [ol_cv_pthread_lpthread_lmach_lexc_lc_r])
1114 OL_PTHREAD_TRY([-lpthread -lmach -lexc],
1115 [ol_cv_pthread_lpthread_lmach_lexc])
1116 dnl OL_PTHREAD_TRY([-lpthread -lexc],
1117 dnl [ol_cv_pthread_lpthread_lexc])
1119 OL_PTHREAD_TRY([-lpthread -Wl,-woff,85],
1120 [ol_cv_pthread_lib_lpthread_woff])
1122 OL_PTHREAD_TRY([-lpthread], [ol_cv_pthread_lpthread])
1123 OL_PTHREAD_TRY([-lc_r], [ol_cv_pthread_lc_r])
1125 OL_PTHREAD_TRY([-threads], [ol_cv_pthread_threads])
1127 OL_PTHREAD_TRY([-lpthreads -lmach -lexc -lc_r],
1128 [ol_cv_pthread_lpthreads_lmach_lexc_lc_r])
1129 OL_PTHREAD_TRY([-lpthreads -lmach -lexc],
1130 [ol_cv_pthread_lpthreads_lmach_lexc])
1131 OL_PTHREAD_TRY([-lpthreads -lexc],
1132 [ol_cv_pthread_lpthreads_lexc])
1134 OL_PTHREAD_TRY([-lpthreads],[ol_cv_pthread_lib_lpthreads])
1136 if test $ol_link_threads != no ; then
1137 AC_DEFINE(HAVE_PTHREADS,1,
1138 [define if you have POSIX Threads])
1140 LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
1143 save_CPPFLAGS="$CPPFLAGS"
1145 LIBS="$LTHREAD_LIBS $LIBS"
1147 dnl All POSIX Thread (final) implementations should have
1148 dnl sched_yield instead of pthread yield.
1150 AC_CHECK_FUNCS(sched_yield pthread_yield)
1152 if test $ac_cv_func_sched_yield = no -a \
1153 $ac_cv_func_pthread_yield = no ; then
1154 dnl Digital UNIX has sched_yield() in -lrt
1155 AC_CHECK_LIB(rt, sched_yield,
1156 [LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
1157 AC_DEFINE(HAVE_SCHED_YIELD,1,
1158 [Define if you have the sched_yield function.])
1159 ac_cv_func_sched_yield=yes],
1160 [ac_cv_func_sched_yield=no])
1162 if test $ac_cv_func_sched_yield = no -a \
1163 $ac_cv_func_pthread_yield = no ; then
1164 dnl Solaris has sched_yield() stub in -lposix4
1165 dnl but we'll use thr_yield instead.
1166 AC_CHECK_FUNCS(thr_yield)
1168 if test $ac_cv_func_sched_yield = no -a \
1169 $ac_cv_func_pthread_yield = no -a \
1170 "$ac_cv_func_thr_yield" = no ; then
1171 AC_MSG_WARN([could not locate sched_yield() or pthread_yield()])
1174 dnl Check functions for compatibility
1175 AC_CHECK_FUNCS(pthread_kill pthread_rwlock_destroy)
1177 dnl Check for pthread_detach with <pthread.h> inclusion
1178 dnl as it's symbol may have been mangled.
1179 AC_CACHE_CHECK([for pthread_detach with <pthread.h>],
1180 [ol_cv_func_pthread_detach], [
1183 #include <pthread.h>
1185 #define NULL (void*)0
1188 [pthread_detach(NULL);],
1189 [ol_cv_func_pthread_detach=yes],
1190 [ol_cv_func_pthread_detach=no])
1193 if test $ol_cv_func_pthread_detach = no ; then
1194 AC_MSG_ERROR([could not locate pthread_detach()])
1197 AC_DEFINE(HAVE_PTHREAD_DETACH,1,
1198 [define if you have pthread_detach function])
1200 dnl Check for setconcurreny functions
1202 pthread_setconcurrency \
1203 pthread_getconcurrency \
1204 thr_setconcurrency \
1205 thr_getconcurrency \
1208 OL_SYS_LINUX_THREADS
1211 if test $ol_cv_linux_threads = error; then
1212 AC_MSG_ERROR([LinuxThreads header/library mismatch]);
1215 AC_CACHE_CHECK([if pthread_create() works],
1216 ol_cv_pthread_create_works,[
1217 AC_TRY_RUN(OL_PTHREAD_TEST_PROGRAM,
1218 [ol_cv_pthread_create_works=yes],
1219 [ol_cv_pthread_create_works=no],
1221 ol_cv_pthread_create_works=yes])])
1223 if test $ol_cv_pthread_create_works = no ; then
1224 AC_MSG_ERROR([pthread_create is not usable, check environment settings])
1227 dnl Check if select causes an yield
1228 if test $ol_with_yielding_select = auto ; then
1229 AC_CACHE_CHECK([if select yields when using pthreads],
1230 ol_cv_pthread_select_yields,[
1232 #include <sys/types.h>
1233 #include <sys/time.h>
1235 #include <pthread.h>
1237 #define NULL (void*) 0
1240 static int fildes[2];
1242 static void *task(p)
1254 FD_SET(fildes[0], &rfds);
1256 /* we're not interested in any fds */
1257 i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
1264 exit(0); /* if we exit here, the select blocked the whole process */
1267 int main(argc, argv)
1273 /* create a pipe to select */
1274 if(pipe(&fildes[0])) {
1279 #ifdef HAVE_PTHREAD_SETCONCURRENCY
1280 (void) pthread_setconcurrency(2);
1282 #ifdef HAVE_THR_SETCONCURRENCY
1283 /* Set Solaris LWP concurrency to 2 */
1284 thr_setconcurrency(2);
1288 #if HAVE_PTHREADS_D4
1289 pthread_create(&t, pthread_attr_default, task, NULL);
1291 pthread_create(&t, NULL, task, NULL);
1294 #if HAVE_SCHED_YIELD
1295 sched_yield(); /* make sure task runs first */
1297 #ifdef HAVE_PTHREAD_YIELD
1298 pthread_yield(); /* make sure task runs first */
1304 [ol_cv_pthread_select_yields=no],
1305 [ol_cv_pthread_select_yields=yes],
1306 [ol_cv_pthread_select_yields=cross])])
1308 if test $ol_cv_pthread_select_yields = cross ; then
1309 AC_MSG_ERROR([crossing compiling: use --with-yielding_select=yes|no|manual])
1312 if test $ol_cv_pthread_select_yields = yes ; then
1313 ol_with_yielding_select=yes
1318 CPPFLAGS="$save_CPPFLAGS"
1321 AC_MSG_ERROR([could not link with POSIX Threads])
1325 if test $ol_with_threads = posix ; then
1326 AC_MSG_ERROR([could not locate POSIX Threads])
1330 if test $ol_with_threads = auto -o $ol_with_threads = yes \
1331 -o $ol_with_threads = mach ; then
1333 dnl check for Mach CThreads
1334 AC_CHECK_HEADERS(mach/cthreads.h)
1335 if test $ac_cv_header_mach_cthreads_h = yes ; then
1336 ol_with_threads=found
1338 dnl check for cthread support in current $LIBS
1339 AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
1341 if test $ol_link_threads = no ; then
1343 dnl this test needs work
1344 AC_CACHE_CHECK([for cthread_fork with -all_load],
1345 [ol_cv_cthread_all_load], [
1348 LIBS="-all_load $LIBS"
1349 AC_TRY_LINK([#include <mach/cthreads.h>],[
1350 cthread_fork((void *)0, (void *)0);
1351 ], ol_cv_cthread_all_load=yes, ol_cv_cthread_all_load=no)
1352 dnl restore the LIBS
1356 if test $ol_cv_cthread_all_load = yes ; then
1357 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
1358 ol_link_threads=mach
1362 if test $ol_link_threads != no ; then
1363 : check for cthread specific functionality here
1364 AC_DEFINE(HAVE_MACH_CTHREADS,1,
1365 [define if you have Mach Cthreads])
1367 AC_MSG_ERROR([could not link with Mach CThreads])
1371 if test $ol_with_threads = mach ; then
1372 AC_MSG_ERROR([could not locate Mach CThreads])
1376 if test $ol_with_threads = auto -o $ol_with_threads = yes \
1377 -o $ol_with_threads = pth ; then
1379 AC_CHECK_HEADERS(pth.h)
1381 if test $ac_cv_header_pth_h = yes ; then
1382 AC_CHECK_LIB(pth, pth_version, [have_pth=yes], [have_pth=no])
1384 if test $have_pth = yes ; then
1385 AC_DEFINE(HAVE_GNU_PTH,1,[if you have GNU Pth])
1386 LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
1389 if test $ol_with_yielding_select = auto ; then
1390 ol_with_yielding_select=yes
1396 if test $ol_with_threads = auto -o $ol_with_threads = yes \
1397 -o $ol_with_threads = lwp ; then
1399 dnl check for SunOS5 LWP
1400 AC_CHECK_HEADERS(thread.h synch.h)
1401 if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
1402 AC_CHECK_LIB(thread, thr_create, [have_thr=yes], [have_thr=no])
1404 if test $have_thr = yes ; then
1405 AC_DEFINE(HAVE_THR,1,
1406 [if you have Solaris LWP (thr) package])
1407 LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
1410 if test $ol_with_yielding_select = auto ; then
1411 ol_with_yielding_select=yes
1414 dnl Check for setconcurreny functions
1416 thr_setconcurrency \
1417 thr_getconcurrency \
1422 dnl check for SunOS4 LWP
1423 AC_CHECK_HEADERS(lwp/lwp.h)
1424 if test $ac_cv_header_lwp_lwp_h = yes ; then
1425 AC_CHECK_LIB(lwp, lwp_create, [have_lwp=yes], [have_lwp=no])
1427 if test $have_lwp = yes ; then
1428 AC_DEFINE(HAVE_LWP,1,
1429 [if you have SunOS LWP package])
1430 LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
1433 if test $ol_with_yielding_select = auto ; then
1434 ol_with_yielding_select=no
1440 if test $ol_with_yielding_select = yes ; then
1441 AC_DEFINE(HAVE_YIELDING_SELECT,1,
1442 [define if select implicitly yields])
1445 if test $ol_with_threads = manual ; then
1446 dnl User thinks he can manually configure threads.
1449 AC_MSG_WARN([thread defines and link options must be set manually])
1451 AC_CHECK_HEADERS(pthread.h sched.h)
1452 AC_CHECK_FUNCS(sched_yield pthread_yield)
1453 OL_HEADER_LINUX_THREADS
1455 AC_CHECK_HEADERS(mach/cthreads.h)
1456 AC_CHECK_HEADERS(lwp/lwp.h)
1457 AC_CHECK_HEADERS(thread.h synch.h)
1460 if test $ol_link_threads != no -a $ol_link_threads != nt ; then
1461 dnl needed to get reentrant/threadsafe versions
1463 AC_DEFINE(REENTRANT,1)
1464 AC_DEFINE(_REENTRANT,1)
1465 AC_DEFINE(THREAD_SAFE,1)
1466 AC_DEFINE(_THREAD_SAFE,1)
1467 AC_DEFINE(THREADSAFE,1)
1468 AC_DEFINE(_THREADSAFE,1)
1469 AC_DEFINE(_SGI_MP_SOURCE,1)
1471 dnl The errno declaration may dependent upon _REENTRANT.
1472 dnl If it does, we must link with thread support.
1473 AC_CACHE_CHECK([for thread specific errno],
1474 [ol_cv_errno_thread_specific], [
1475 AC_TRY_LINK([#include <errno.h>], [errno = 0;],
1476 [ol_cv_errno_thread_specific=yes],
1477 [ol_cv_errno_thread_specific=no])
1480 dnl The h_errno declaration may dependent upon _REENTRANT.
1481 dnl If it does, we must link with thread support.
1482 AC_CACHE_CHECK([for thread specific h_errno],
1483 [ol_cv_h_errno_thread_specific], [
1484 AC_TRY_LINK([#include <netdb.h>], [h_errno = 0;],
1485 [ol_cv_h_errno_thread_specific=yes],
1486 [ol_cv_h_errno_thread_specific=no])
1489 if test $ol_cv_errno_thread_specific != yes \
1490 -o $ol_cv_h_errno_thread_specific != yes ; then
1491 LIBS="$LTHREAD_LIBS $LIBS"
1495 dnl When in thread environment, use
1496 dnl #if defined( HAVE_REENTRANT_FUNCTIONS ) \
1497 dnl || defined( HAVE_FUNC_R )
1500 dnl # if defined( HAVE_THREADS )
1504 dnl # if defined( HAVE_THREADS )
1509 dnl HAVE_REENTRANT_FUNCTIONS is derived from:
1510 dnl _POSIX_REENTRANT_FUNCTIONS
1511 dnl _POSIX_THREAD_SAFE_FUNCTIONS
1512 dnl _POSIX_THREADSAFE_FUNCTIONS
1514 dnl and is currently defined in lthread.h
1516 dnl HAVE_THREADS is defined by lthread.h iff -UNO_THREADS
1518 dnl libldap/*.c should only include <lthread.h> iff
1519 dnl LDAP_R_COMPILE is defined. ie:
1520 dnl #ifdef LDAP_R_COMPILE
1521 dnl # include LDAP_R_COMPILE
1524 dnl LDAP_R_COMPILE is defined by libldap_r/Makefile.in
1525 dnl specifically for compiling the threadsafe version of
1526 dnl the ldap library (-lldap_r).
1528 dnl dnl check for reentrant/threadsafe functions
1530 dnl dnl note: these should only be used when linking
1531 dnl dnl with $LTHREAD_LIBS
1533 dnl save_CPPFLAGS="$CPPFLAGS"
1534 dnl save_LIBS="$LIBS"
1535 dnl LIBS="$LTHREAD_LIBS $LIBS"
1536 dnl AC_CHECK_FUNCS( \
1538 dnl gethostbyaddr_r gethostbyname_r \
1539 dnl feof_unlocked unlocked_feof \
1540 dnl putc_unlocked unlocked_putc \
1541 dnl flockfile ftrylockfile \
1543 dnl CPPFLAGS="$save_CPPFLAGS"
1544 dnl LIBS="$save_LIBS"
1547 if test $ol_link_threads = no ; then
1548 if test $ol_with_threads = yes ; then
1549 AC_MSG_ERROR([no suitable thread support])
1552 if test $ol_with_threads = auto ; then
1553 AC_MSG_WARN([no suitable thread support, disabling threads])
1557 AC_DEFINE(NO_THREADS,1,
1558 [define if you have (or want) no threads])
1562 if test $ol_link_threads != no ; then
1563 AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE,1)
1566 dnl ----------------------------------------------------------------
1569 if test $ol_with_ldbm_api = auto \
1570 -o $ol_with_ldbm_api = berkeley \
1571 -o $ol_with_ldbm_api = bcompat ; then
1573 if test $ol_with_ldbm_api = bcompat; then \
1574 OL_BERKELEY_COMPAT_DB
1579 if test $ol_cv_berkeley_db != no ; then
1580 AC_DEFINE(HAVE_BERKELEY_DB,1,
1581 [define this if Berkeley DB is available])
1583 ol_link_ldbm=berkeley
1586 if test $ol_with_ldbm_type = hash ; then
1587 AC_DEFINE(LDBM_USE_DBHASH,1,
1588 [define this to use DBHASH w/ LDBM backend])
1590 AC_DEFINE(LDBM_USE_DBBTREE,1,
1591 [define this to use DBBTREE w/ LDBM backend])
1594 dnl $ol_cv_lib_db should be yes or -ldb
1595 dnl (it could be no, but that would be an error
1596 if test $ol_cv_lib_db != yes ; then
1597 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
1602 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
1603 AC_MSG_WARN(Could not find LDBM with BTREE support)
1604 ol_with_ldbm_api=none
1607 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
1610 if test $ol_cv_mdbm = yes ; then
1612 ol_with_ldbm_api=mdbm
1613 if test $ol_cv_lib_mdbm != yes ; then
1614 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
1619 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
1622 if test $ol_cv_gdbm = yes ; then
1624 ol_with_ldbm_api=gdbm
1626 if test $ol_cv_lib_gdbm != yes ; then
1627 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
1632 if test $ol_with_ldbm_api = ndbm ; then
1635 if test $ol_cv_ndbm = yes ; then
1637 ol_with_ldbm_api=ndbm
1639 if test $ol_cv_lib_ndbm != yes ; then
1640 LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
1645 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
1646 AC_MSG_WARN(could not find suitable LDBM backend)
1647 if test $ol_enable_ldbm = yes ; then
1648 AC_MSG_ERROR(select appropriate LDBM options or disable)
1651 AC_MSG_WARN(disabling LDBM)
1655 dnl ----------------------------------------------------------------
1656 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
1657 LINK_BINS_DYNAMIC="yes"
1659 LINK_BINS_DYNAMIC="no"
1662 dnl ----------------------------------------------------------------
1663 if test $ol_enable_wrappers != no ; then
1664 AC_CHECK_HEADERS(tcpd.h)
1666 if test $ac_cv_header_tcpd_h != yes ; then
1670 int allow_severity = 0;
1671 int deny_severity = 0;
1672 ],[hosts_access()],[have_wrappers=yes],[have_wrappers=no])
1675 if test $have_wrappers = yes ; then
1676 AC_DEFINE(HAVE_TCPD,1, [define if you have -lwrap])
1679 dnl We add another check for -lnsl since some libwrap's
1680 dnl need it, but it isn't always included from above
1681 AC_CHECK_LIB(nsl, main)
1683 AC_MSG_WARN(could not find -lwrap)
1684 if test $ol_enable_wrappers = yes ; then
1685 AC_MSG_ERROR(could not find wrappers, select appropriate options or disable)
1688 AC_MSG_WARN(disabling wrappers support)
1689 ol_enable_wrappers=no
1694 dnl ----------------------------------------------------------------
1695 if test $ol_enable_syslog != no ; then
1696 AC_CHECK_FUNC(openlog)
1697 if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
1698 AC_MSG_ERROR(could not find syslog, select appropriate options or disable)
1700 ol_enable_syslog=$ac_cv_func_openlog
1703 dnl ----------------------------------------------------------------
1704 dnl ud needs termcap (should insert check here)
1706 AC_CHECK_HEADERS(termcap.h ncurses.h)
1708 if test $ol_link_termcap = no ; then
1709 AC_CHECK_LIB(termcap, tputs, [have_termcap=yes], [have_termcap=no])
1710 if test $have_termcap = yes ; then
1711 AC_DEFINE(HAVE_TERMCAP, 1, [define if you have -ltermcap])
1713 TERMCAP_LIBS=-ltermcap
1717 if test $ol_link_termcap = no ; then
1718 AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
1719 if test $have_ncurses = yes ; then
1720 AC_DEFINE(HAVE_NCURSES, 1, [define if you have -lncurses])
1722 TERMCAP_LIBS=-lncurses
1726 if test $ol_link_termcap = no ; then
1727 AC_DEFINE(NO_TERMCAP,1, [define if you have no termcap support])
1731 dnl ----------------------------------------------------------------
1733 dnl Check for Cyrus SASL
1737 if test $ol_with_cyrus_sasl != no ; then
1738 AC_CHECK_HEADER(sasl.h)
1740 if test $ac_cv_header_sasl_h = yes ; then
1741 AC_CHECK_LIB(sasl, sasl_client_init,
1742 [have_cyrus_sasl=yes], [have_cyrus_sasl=no])
1744 if test $have_cyrus_sasl != no ; then
1746 AC_DEFINE(HAVE_CYRUS_SASL,1,[define if you have Cyrus SASL])
1751 if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
1752 AC_MSG_ERROR(no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl)
1756 dnl ----------------------------------------------------------------
1757 dnl Check for entropy sources
1758 if test $cross_compiling != yes ; then
1760 if test -r /dev/urandom ; then
1762 elif test -r /idev/urandom ; then
1763 dev="/idev/urandom";
1764 elif test -r /dev/srandom ; then
1766 elif test -r /dev/random ; then
1768 elif test -r /idev/random ; then
1772 if test $dev != no ; then
1773 AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device])
1777 dnl ----------------------------------------------------------------
1779 dnl Check for fetch URL support
1780 dnl should be extended to support other fetch URL APIs
1783 if test $ol_with_fetch != no ; then
1786 if test $ol_cv_lib_fetch != no ; then
1787 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
1788 ol_link_fetch=freebsd
1790 elif test $ol_with_fetch != auto ; then
1791 AC_MSG_ERROR(no suitable API for --with-fetch=$ol_with_fetch)
1795 dnl ----------------------------------------------------------------
1797 dnl Check for GNU readline
1800 if test $ol_with_readline != no ; then
1801 AC_CHECK_HEADERS(readline/readline.h readline/history.h)
1803 if test $ac_cv_header_readline_readline_h = yes ; then
1805 LIBS="$TERMCAP_LIBS $LIBS"
1806 AC_CHECK_LIB(readline, readline,
1807 [have_readline=yes], [have_readline=no])
1810 if test $have_readline = yes ; then
1811 ol_with_readline=found
1812 ol_link_readline=yes
1814 READLINE_LIBS="-lreadline"
1819 if test $ol_link_readline = yes ; then
1820 AC_DEFINE(HAVE_READLINE, 1, [define if you have -lreadline])
1824 dnl ----------------------------------------------------------------
1825 dnl FreeBSD (and others) have crypt(3) in -lcrypt
1826 if test $ol_enable_crypt != no ; then
1827 AC_CHECK_FUNC(crypt, [have_crypt=yes], [
1828 AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
1829 have_crypt=yes], [have_crypt=no])])
1831 if test $have_crypt = yes ; then
1832 AC_DEFINE(HAVE_CRYPT,1, [define if crypt(3) is available])
1834 AC_MSG_WARN(could not find crypt)
1835 if test $ol_enable_crypt = yes ; then
1836 AC_MSG_ERROR(could not find crypt, select appropriate options or disable)
1839 AC_MSG_WARN(disabling crypt support)
1844 dnl ----------------------------------------------------------------
1845 dnl FreeBSD (and others) have setproctitle(3) in -lutil
1846 if test $ol_enable_proctitle != no ; then
1847 AC_CHECK_FUNC(setproctitle, [have_setproctitle=yes], [
1848 AC_CHECK_LIB(util, setproctitle,
1849 [have_setproctitle=yes
1850 LUTIL_LIBS="$LUTIL_LIBS -lutil"],
1851 [have_setproctitle=no
1852 LIBOBJS="$LIBOBJS setproctitle.o"
1853 LIBSRCS="$LIBSRCS setproctitle.c"])])
1855 if test $have_setproctitle = yes ; then
1856 AC_DEFINE(HAVE_SETPROCTITLE,1,
1857 [define if setproctitle(3) is available])
1861 dnl ----------------------------------------------------------------
1862 dnl Checks for typedefs, structures, and compiler characteristics.
1870 AC_CHECK_TYPE(ssize_t, [signed int])
1871 AC_CHECK_TYPE(caddr_t, [char *])
1874 AC_STRUCT_ST_BLKSIZE
1878 OL_TYPE_SIG_ATOMIC_T
1880 dnl AC_TYPE_GETGROUPS
1882 OL_STRUCT_PASSWD_PW_GECOS
1883 OL_STRUCT_PASSWD_PW_PASSWD
1889 if test $cross_compiling = yes ; then
1890 AC_DEFINE(CROSS_COMPILING, 1, [define if cross compiling])
1895 AC_COMPILE_CHECK_SIZEOF(short)
1896 AC_COMPILE_CHECK_SIZEOF(int)
1897 AC_COMPILE_CHECK_SIZEOF(long)
1899 if test "$ac_cv_sizeof_int" -lt 4 ; then
1900 AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
1902 AC_DEFINE(LBER_INT_T,long)
1904 AC_DEFINE(LBER_INT_T,int)
1907 AC_DEFINE(LBER_LEN_T,long)
1908 AC_DEFINE(LBER_SOCKET_T,int)
1909 AC_DEFINE(LBER_TAG_T,long)
1911 dnl ----------------------------------------------------------------
1912 dnl Checks for library functions.
1914 dnl AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
1920 dnl Check for NT specific routines
1921 AC_CHECK_FUNC(_spawnlp, AC_DEFINE(HAVE_SPAWNLP,1,[if you have spawnlp()]))
1923 AC_CHECK_FUNC(_snprintf, [ac_cv_func_snprintf=yes
1924 AC_DEFINE(snprintf, _snprintf, [define to snprintf routine])
1927 AC_CHECK_FUNC(_vsnprintf, [ac_cv_func_vsnprintf=yes
1928 AC_DEFINE(vsnprintf, _vsnprintf, [define to vsnprintf routine])
1933 if test $ac_cv_func_vprintf = yes ; then
1934 dnl check for vsnprintf
1935 AC_CHECK_FUNCS(vsnprintf vsprintf)
1990 dnl We actually may need to replace more than this.
1991 AC_REPLACE_FUNCS(getopt tempnam)
1993 if test "$ac_cv_func_getopt" != yes; then
1994 LIBSRCS="$LIBSRCS getopt.c"
1997 if test "$ac_cv_func_tempnam" != yes; then
1998 LIBSRCS="$LIBSRCS tempnam.c"
2001 dnl ----------------------------------------------------------------
2002 # Check Configuration
2005 dnl ----------------------------------------------------------------
2006 dnl Sort out defines
2008 if test "$ol_enable_debug" != no ; then
2009 AC_DEFINE(LDAP_DEBUG,1,
2010 [define this to add debugging code])
2012 if test "$ol_enable_syslog" = yes ; then
2013 AC_DEFINE(LDAP_SYSLOG,1,
2014 [define this to add syslog code])
2016 if test "$ol_enable_libui" = yes ; then
2017 AC_DEFINE(LDAP_LIBUI,1,
2018 [define this for LDAP User Interface support])
2020 if test "$ol_enable_cache" = no ; then
2021 AC_DEFINE(LDAP_NOCACHE,1,
2022 [define this to remove -lldap cache support])
2024 if test "$ol_link_kbind" != no ; then
2025 AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND,LDAP_VENDOR_VERSION)
2027 if test "$ol_enable_proctitle" != no ; then
2028 AC_DEFINE(LDAP_PROCTITLE,1,
2029 [define this for LDAP process title support])
2031 if test "$ol_enable_referrals" != no ; then
2032 AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS,LDAP_VENDOR_VERSION)
2034 if test "$ol_enable_cldap" != no ; then
2035 AC_DEFINE(LDAP_CONNECTIONLESS,1,[define to support CLDAP])
2037 if test "$ol_enable_unix" != no; then
2038 AC_DEFINE(LDAP_PF_UNIX,1,[define to support PF_UNIX])
2040 if test "$ol_enable_ipv6" != no; then
2041 AC_DEFINE(LDAP_PF_INET6,1,[define to support PF_INET6])
2043 if test "$ol_enable_cleartext" != no ; then
2044 AC_DEFINE(SLAPD_CLEARTEXT,1,[define to support cleartext passwords])
2046 if test "$ol_enable_crypt" != no ; then
2047 AC_DEFINE(SLAPD_CRYPT,1,[define to support crypt(3) passwords])
2049 if test "$ol_link_kpasswd" != no ; then
2050 AC_DEFINE(SLAPD_KPASSWD,1,[define to support Kerberos passwords])
2052 if test "$ol_link_spasswd" != no ; then
2053 AC_DEFINE(SLAPD_SPASSWD,1,[define to support SASL passwords])
2055 if test "$ol_enable_multimaster" != no ; then
2056 AC_DEFINE(SLAPD_MULTIMASTER,1,[define to support multimaster replication])
2058 if test "$ol_enable_phonetic" != no ; then
2059 AC_DEFINE(SLAPD_PHONETIC,1,[define to support phonetic])
2061 if test "$ol_enable_rlookups" != no ; then
2062 AC_DEFINE(SLAPD_RLOOKUPS,1,[define to support reverse lookups])
2064 if test "$ol_enable_aci" != no ; then
2065 AC_DEFINE(SLAPD_ACI_ENABLED,1,[define to support per-object ACIs])
2068 if test "$ol_link_modules" != no ; then
2069 AC_DEFINE(SLAPD_MODULES,1,[define to support modules])
2071 SLAPD_MODULES_LDFLAGS="-dlopen self"
2074 if test "$ol_link_dnssrv" != no ; then
2075 AC_DEFINE(SLAPD_DNSSRV,1,[define to support DNS SRV backend])
2078 if test "$ol_with_dnssrv_module" != static ; then
2079 AC_DEFINE(SLAPD_DNSSRV_DYNAMIC,1,
2080 [define to support dynamic DNS SRV backend])
2082 BUILD_DNSSRV_DYNAMIC=shared
2083 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
2087 if test "$ol_enable_ldap" != no ; then
2088 AC_DEFINE(SLAPD_LDAP,1,[define to support LDAP backend])
2091 if test "$ol_with_ldap_module" != static ; then
2092 AC_DEFINE(SLAPD_LDAP_DYNAMIC,1,
2093 [define to support dynamic LDAP backend])
2095 BUILD_LDAP_DYNAMIC=shared
2096 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
2100 if test "$ol_link_ldbm" != no ; then
2101 AC_DEFINE(SLAPD_LDBM,1,[define to support LDBM backend])
2104 if test "$ol_with_ldbm_module" != static ; then
2105 AC_DEFINE(SLAPD_LDBM_DYNAMIC,1,
2106 [define to support dynamic LDBM backend])
2108 BUILD_LDBM_DYNAMIC=shared
2109 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
2113 if test "$ol_enable_passwd" != no ; then
2114 AC_DEFINE(SLAPD_PASSWD,1,[define to support PASSWD backend])
2117 if test "$ol_with_passwd_module" != static ; then
2118 AC_DEFINE(SLAPD_PASSWD_DYNAMIC,1,
2119 [define to support dynamic PASSWD backend])
2121 BUILD_PASSWD_DYNAMIC=shared
2122 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
2126 if test "$ol_enable_shell" != no ; then
2127 AC_DEFINE(SLAPD_SHELL,1,[define to support SHELL backend])
2130 if test "$ol_with_shell_module" != static ; then
2131 AC_DEFINE(SLAPD_SHELL_DYNAMIC,1,
2132 [define to support dynamic SHELL backend])
2134 BUILD_SHELL_DYNAMIC=shared
2135 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
2139 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
2140 $BUILD_SLAPD = yes ; then
2144 dnl ----------------------------------------------------------------
2146 if test "$LINK_BINS_DYNAMIC" = yes; then
2148 LT_LIB_LINKAGE=shared
2151 LT_LIB_LINKAGE=static
2154 if test "$ac_cv_mingw32" = yes ; then
2165 AC_SUBST(LIB_LINKAGE)
2166 AC_SUBST(LT_LIB_LINKAGE)
2169 AC_SUBST(BUILD_SLAPD)
2170 AC_SUBST(BUILD_DNSSRV)
2171 AC_SUBST(BUILD_LDAP)
2172 AC_SUBST(BUILD_LDBM)
2173 AC_SUBST(BUILD_PASSWD)
2174 AC_SUBST(BUILD_QUIPU)
2175 AC_SUBST(BUILD_SHELL)
2176 AC_SUBST(BUILD_DNSSRV_DYNAMIC)
2177 AC_SUBST(BUILD_LDAP_DYNAMIC)
2178 AC_SUBST(BUILD_LDBM_DYNAMIC)
2179 AC_SUBST(BUILD_PASSWD_DYNAMIC)
2180 AC_SUBST(BUILD_SHELL_DYNAMIC)
2181 AC_SUBST(BUILD_SLURPD)
2185 AC_SUBST(SLAPD_LIBS)
2186 AC_SUBST(QUIPU_LIBS)
2187 AC_SUBST(SLURPD_LIBS)
2189 AC_SUBST(LTHREAD_LIBS)
2190 AC_SUBST(LUTIL_LIBS)
2192 AC_SUBST(LINK_BINS_DYNAMIC)
2194 AC_SUBST(SLAPD_MODULES_CPPFLAGS)
2195 AC_SUBST(SLAPD_MODULES_LDFLAGS)
2196 AC_SUBST(SLAPD_MODULES_LIST)
2200 AC_SUBST(READLINE_LIBS)
2202 AC_SUBST(TERMCAP_LIBS)
2204 AC_SUBST(MODULES_LIBS)
2207 dnl ----------------------------------------------------------------
2212 Makefile:build/top.mk:Makefile.in:build/dir.mk \
2213 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
2214 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
2215 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
2216 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
2217 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
2218 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
2219 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
2220 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
2221 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
2222 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
2223 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
2224 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
2225 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
2226 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
2227 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
2228 include/Makefile:build/top.mk:include/Makefile.in \
2229 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \
2230 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \
2231 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \
2232 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \
2233 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \
2234 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \
2235 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk \
2236 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk \
2237 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
2238 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
2239 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
2240 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
2241 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
2242 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
2243 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
2244 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
2245 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
2246 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
2247 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
2248 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
2249 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
2250 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
2251 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
2252 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
2255 echo Please \"make depend\" to build dependencies