]> git.sur5r.net Git - openldap/blob - configure.in
Import KRB_LIBS fix from -devel.
[openldap] / configure.in
1 dnl Copyright 1998 The OpenLDAP Foundation.  All Rights Reserved.
2 dnl 
3 dnl Redistribution and use in source and binary forms are permitted only
4 dnl as authorized by the OpenLDAP Public License.  A copy of this
5 dnl license is available at http://www.OpenLDAP.org/license.html or
6 dnl in file LICENSE in the top-level directory of the distribution.
7 dnl ----
8
9 dnl Configure.in for OpenLDAP
10 AC_INIT(include/ldap.h)dnl
11 AC_CONFIG_AUX_DIR(build)dnl
12 AM_INIT_AUTOMAKE(OpenLDAP,[1.1-alpha3], [no ac_define])dnl
13
14 dnl Do not use AutoConf 2.12; it produces a configuration script
15 dnl that causes an "internal 2K buffer" error on HPUX when run
16 dnl with /bin/sh.  Autoconf 2.10 seems to be okay.
17 AC_PREREQ(2.10)dnl Required Autoconf version
18
19 AC_CONFIG_AUX_DIR(build)
20 AC_CONFIG_HEADER(include/portable.h)dnl
21
22 dnl
23 dnl Start Args
24 AC_MSG_CHECKING(configure arguments)
25 AC_PREFIX_DEFAULT(/usr/local)
26
27 top_builddir=`pwd`
28 AC_SUBST(top_builddir)dnl
29
30 OL_ARG_ENABLE(debug,[  --enable-debug   enable debugging], yes)dnl
31 dnl OL_ARG_ENABLE(syslog,[  --enable-syslog     enable syslog support], auto)dnl
32 OL_ARG_ENABLE(proctitle,[  --enable-proctitle   enable proctitle support], yes)dnl
33 OL_ARG_ENABLE(libui,[  --enable-libui   enable library user interface], yes)dnl
34 OL_ARG_ENABLE(cache,[  --enable-cache   enable caching], yes)dnl
35 OL_ARG_ENABLE(dns,[  --enable-dns               enable dns support], no)dnl
36 OL_ARG_ENABLE(referrals,[  --enable-referrals   enable referrals], yes)dnl
37 OL_ARG_ENABLE(cldap,[  --enable-cldap   enable connectionless ldap], no)dnl
38 OL_ARG_ENABLE(x_compile,[  --enable-x-compile   enable cross compiling],
39         no, [yes no])dnl
40
41 dnl General "with" options
42 OL_ARG_WITH(kerberos,[  --with-kerberos use Kerberos],
43         auto, [auto k5 k4 afs yes no])
44 OL_ARG_WITH(threads,[  --with-threads   use threads],
45         auto, [auto posix mach lwp yes no manual] )
46 OL_ARG_WITH(yielding_select,[  --with-yielding-select   with implicitly yielding select],
47         auto, [auto yes no manual] )
48
49 dnl Server options
50
51 dnl LDAPD OPTIONS
52 AC_ARG_WITH(xxldapdoptions,[LDAPD Options:])
53 OL_ARG_ENABLE(ldapd,[  --enable-ldapd   enable building ldapd], no)dnl
54
55 dnl SLAPD OPTIONS
56 AC_ARG_WITH(xxslapdoptions,[SLAPD Options:])
57 OL_ARG_ENABLE(slapd,[  --enable-slapd   enable building slapd], yes)dnl
58 OL_ARG_ENABLE(aclgroups,[    --enable-aclgroups enable ACL group support], auto)dnl
59 OL_ARG_ENABLE(crypt,[    --enable-crypt enable crypt(3) passwords], auto)dnl
60 OL_ARG_ENABLE(md5,[    --enable-md5     enable MD5 passwords], auto)dnl
61 OL_ARG_ENABLE(sha1,[    --enable-sha1   enable SHA1 passwords], auto)dnl
62 OL_ARG_ENABLE(wrappers,[    --enable-wrappers   enable tcp wrapper support], no)dnl
63 OL_ARG_ENABLE(phonetic,[    --enable-phonetic   enable phonetic/soundex], no)dnl
64 OL_ARG_ENABLE(rlookups,[    --enable-rlookups   enable reverse lookups], auto)dnl
65
66 dnl SLAPD Backend options
67 OL_ARG_ENABLE(ldbm,[    --enable-ldbm   enable ldbm backend], yes)dnl
68 OL_ARG_WITH(ldbm_api,[      --with-ldbm-api     use LDBM API], auto,
69         [auto db2 db gdbm ndbm manual])
70 OL_ARG_WITH(ldbm_type,[      --with-ldbm-type   use LDBM type], auto,
71         [auto btree hash])
72
73 OL_ARG_ENABLE(passwd,[    --enable-passwd       enable passwd backend], no)dnl
74 OL_ARG_ENABLE(shell,[    --enable-shell enable shell backend], no)dnl
75
76 dnl SLURPD OPTIONS
77 AC_ARG_WITH(xxslurpdoptions,[SLURPD Options:])
78 OL_ARG_ENABLE(slurpd,[  --enable-slurpd enable building slurpd], auto)dnl
79
80 AC_ARG_WITH(xxliboptions,[Library Generation & Linking Options])
81 AM_ENABLE_STATIC
82 dnl AM_DISABLE_SHARED
83 AM_ENABLE_SHARED
84
85 dnl General "enable" options
86 # validate options
87 if test $ol_enable_referrals = no ; then
88         if test $ol_enable_dns = yes ; then
89                 AC_MSG_WARN([dns disabled, ignoring --enable-dns argument])
90         fi
91         ol_enable_dns=no
92 fi
93
94 if test $ol_enable_slapd = no ; then
95         dnl SLAPD was specificallly disabled
96         if test $ol_enable_ldbm = yes ; then
97                 AC_MSG_WARN([slapd disabled, ignoring --enable_ldbm argument])
98         fi
99         if test $ol_enable_passwd = yes ; then
100                 AC_MSG_WARN([slapd disabled, ignoring --enable_passwd argument])
101         fi
102         if test $ol_enable_shell = yes ; then
103                 AC_MSG_WARN([slapd disabled, ignoring --enable_shell argument])
104         fi
105         if test $ol_enable_aclgroups = yes ; then
106                 AC_MSG_WARN([slapd disabled, ignoring --enable_aclgroups argument])
107         fi
108         if test $ol_enable_crypt = yes ; then
109                 AC_MSG_WARN([slapd disabled, ignoring --enable_crypt argument])
110         fi
111         if test $ol_enable_md5 = yes ; then
112                 AC_MSG_WARN([slapd disabled, ignoring --enable_md5 argument])
113         fi
114         if test $ol_enable_sha1 = yes ; then
115                 AC_MSG_WARN([slapd disabled, ignoring --enable_sha1 argument])
116         fi
117         if test $ol_enable_wrappers = yes ; then
118                 AC_MSG_WARN([slapd disabled, ignoring --enable_wrappers argument])
119         fi
120         if test $ol_enable_phonetic = yes ; then
121                 AC_MSG_WARN([slapd disabled, ignoring --enable_phonetic argument])
122         fi
123         if test $ol_enable_rlookups = yes ; then
124                 AC_MSG_WARN([slapd disabled, ignoring --enable_rlookups argument])
125         fi
126         if test $ol_with_ldbm_api != auto ; then
127                 AC_MSG_WARN([slapd disabled, ignoring --with_ldbm_api argument])
128         fi
129         if test $ol_with_ldbm_type != auto ; then
130                 AC_MSG_WARN([slapd disabled, ignoring --with_ldbm_type argument])
131         fi
132         if test $ol_enable_slurpd = yes ; then
133                 AC_MSG_ERROR([slurpd requires slapd])
134         fi
135
136         # force settings to no
137         ol_enable_ldbm=no
138         ol_enable_shell=no
139         ol_enable_passwd=no
140         ol_enable_aclgroups=no
141         ol_enable_crypt=no
142         ol_enable_md5=no
143         ol_enable_sha1=no
144         ol_enable_wrappers=no
145         ol_enable_phonetic=no
146         ol_enable_rlookups=no
147         ol_with_ldbm_api=no
148         ol_with_ldbm_type=no
149         ol_enable_slurpd=no
150
151 elif test $ol_enable_ldbm = no ; then
152         dnl SLAPD without LDBM
153
154         if test $ol_with_ldbm_api != auto ; then
155                 AC_MSG_WARN([LDBM disabled, ignoring --with_ldbm_api argument])
156         fi
157
158         if test $ol_with_ldbm_type != auto ; then
159                 AC_MSG_WARN([LDBM disabled, ignoring --with_ldbm_type argument])
160         fi
161
162         if test $ol_enable_passwd = no -a $ol_enable_shell = no ; then
163                 AC_MSG_ERROR([slapd requires a backend])
164         fi
165
166         ol_with_ldbm_api=no
167         ol_with_ldbm_type=no
168
169 else
170         dnl SLAPD with LDBM
171
172         if test $ol_with_ldbm_api = gdbm -a \
173                 $ol_with_ldbm_type = btree ; then
174                 AC_MSG_ERROR([GDBM only supports LDBM type hash])
175         fi
176         if test $ol_with_ldbm_api = ndbm -a \
177                 $ol_with_ldbm_type = btree ; then
178                 AC_MSG_ERROR([NDBM only supports LDBM type hash])
179         fi
180 fi
181
182 if test $ol_enable_slurpd = yes ; then
183         dnl SLURPD was specifically enabled
184         if test $ol_with_threads = no ; then
185                 AC_MSG_ERROR([slurpd requires threads])
186         fi
187 fi
188
189 AC_MSG_RESULT(done)
190
191 AC_CANONICAL_HOST
192
193 ## Initialize vars
194 LDAP_LIBS=
195 LDBM_LIBS=
196 LTHREAD_LIBS=
197 LUTIL_LIBS=
198
199 LDAPD_LIBS=
200 SLAPD_LIBS=
201 SLURPD_LIBS=
202
203 BUILD_LDAPD=no
204 BUILD_SLAPD=no
205 BUILD_SLURPD=no
206
207 BUILD_LDBM=no
208 BUILD_PASSWD=no
209 BUILD_SHELL=no
210 BUILD_THREAD=no
211
212 KRB_LIBS=
213 TERMCAP_LIBS=
214
215 dnl ----------------------------------------------------------------
216 dnl Checks for programs
217
218 AC_PROG_INSTALL
219 AM_PROG_LIBTOOL
220 dnl AC_PROG_MAKE_SET
221
222 AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail,
223         $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc)
224 AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb)
225 AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb)
226
227 dnl Checks the compiler and UNIX Variants
228
229 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
230         AC_MSG_WARN([cross compiling....  some functionality will be removed.])
231
232 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
233         AC_MSG_WARN([programs compiled here do run here...])
234         AC_MSG_ERROR([  if not cross compiling, use --disable-x-compile.])
235
236 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
237         AC_MSG_WARN([programs compiled here do not run here...])
238         AC_MSG_ERROR([  if cross compiling,  add --enable-x-compile.])
239 fi
240
241 AC_PROG_CPP
242
243 AC_AIX
244 AC_ISC_POSIX
245 AC_MINIX
246
247 dnl OpenLDAP requires STDC features
248 AM_PROG_CC_STDC
249 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
250         AC_MSG_ERROR([OpenLDAP requires compiler to support STDC prototypes.])
251 fi
252
253 dnl AM_C_PROTOTYPES
254
255 dnl Checks for libraries
256
257 dnl Find socket()
258 dnl Likely combinations:
259 dnl             -lsocket [ -lnsl_s | -lnsl ]
260 dnl             -linet
261
262 AC_CHECK_FUNC(socket, [have_socket=yes], [      
263 dnl
264 dnl hopefully we won't include too many libraries
265 dnl
266         AC_CHECK_LIB(socket, main)
267         AC_CHECK_LIB(net, main)
268         AC_CHECK_LIB(nsl_s, main)
269         AC_CHECK_LIB(nsl, main)
270         AC_CHECK_LIB(inet, socket)
271         AC_CHECK_LIB(gen, main)
272 ])
273
274 dnl Check for resolv
275 AC_CHECK_LIB(resolv, res_search)
276
277 dnl HP-UX requires -lV3
278 AC_CHECK_LIB(V3, sigset)
279
280 # ISODE tests
281 ol_link_isode=no
282 if test $ol_enable_ldapd != no ; then
283         dnl look for ISODE libraries
284         AC_CHECK_LIB(xtpp, main, [
285                 ol_link_isode=yes
286                 AC_DEFINE(HAVE_XTPP,1)
287                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
288                 ],:,[-lxtdsap -lxtisode -losi])
289         AC_CHECK_LIB(dsap, main, [
290                 ol_link_isode=yes
291                 AC_DEFINE(HAVE_DSAP,1)
292                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
293                 ],:,[-lisode])
294         AC_CHECK_LIB(isode, main, [
295                 ol_link_isode=yes
296                 AC_DEFINE(HAVE_ISODE,1)
297                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
298                 ],:)
299 fi
300
301 if test $ol_link_isode != no; then
302         AC_CHECK_LIB(pp, main, [
303                 AC_DEFINE(HAVE_PP,1)
304                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
305                 ],:)
306
307         AC_PATH_PROG(PEPSY, pepsy)
308 fi
309
310 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
311         AC_CHECK_HEADERS(kerberosIV/krb.h kerberosIV/des.h)
312
313         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
314                 AC_CHECK_LIB(krb4, main, [have_k5=yes], [have_k5=no],
315                         [-lkrb5 -ldes425])
316
317                 if test $have_k5 = yes ; then
318                         ol_with_kerberos=found
319                         ol_link_kerberos=yes
320
321                         AC_DEFINE(HAVE_KERBEROS)
322
323                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
324                 fi
325         fi
326 fi
327 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
328         AC_CHECK_HEADERS(krb.h des.h)
329
330         if test $ac_cv_header_krb_h = yes ; then
331                 AC_CHECK_LIB(krb, main, [have_k4=yes], [have_k4=no], [-ldes])
332
333                 if test $have_k4 = yes ; then
334                         ol_with_kerberos=found
335                         ol_link_kerberos=yes
336
337                         AC_DEFINE(HAVE_KERBEROS)
338                         KRB_LIBS="-lkrb -ldes"
339
340                         AC_CHECK_FUNCS(des_string_to_key)
341                 fi
342         fi
343 fi
344
345 ol_link_threads=no
346 if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
347         AC_CHECK_HEADERS(pthread.h sched.h)
348
349         if test $ac_cv_header_pthread_h = yes ; then
350                 OL_POSIX_THREAD_VERSION
351
352                 if test $ol_cv_pthread_version = final ; then
353                         AC_DEFINE(HAVE_PTHREADS_FINAL)
354                 elif test $ol_cv_pthread_version = draft4 ; then
355                         AC_DEFINE(HAVE_PTHREADS_D4)
356                 else
357                         AC_MSG_ERROR([unknown pthread version])
358                 fi
359
360                 # consider threads found
361                 ol_with_threads=found
362
363                 OL_LINUX_THREADS
364
365                 if test $ol_cv_linux_threads = yes ; then
366                         AC_DEFINE(HAVE_LINUX_THREADS,1)
367                 fi
368
369                 dnl Now the hard part, how to link
370
371                 dnl Check for pthread support in current $LIBS
372                 AC_CHECK_FUNC(pthread_create,[ol_link_threads=yes])
373
374                 if test $ol_link_threads = no ; then
375                         dnl try -pthread
376                         AC_CACHE_CHECK([for pthread_create with -pthread],
377                                 [ol_cv_pthread_flag], [
378                                 dnl save the flags
379                                 save_LIBS="$LIBS"
380                                 LIBS="-pthread $LIBS"
381                                 AC_TRY_LINK([char pthread();],[
382                                         pthread_create();
383                                         ], ol_cv_pthread_flag=yes, ol_cv_pthread_flag=no)
384                                 dnl restore the LIBS
385                                 LIBS="$save_LIBS"
386                         ])
387
388                         if test $ol_cv_pthread_flag = yes ; then
389                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
390                                 ol_link_threads=posix
391                         fi
392                 fi
393
394                 if test $ol_link_threads = no ; then
395                         dnl try -thread
396                         AC_CACHE_CHECK([for pthread_create with -thread],
397                                 [ol_cv_thread_flag], [
398                                 dnl save the flags
399                                 save_LIBS="$LIBS"
400                                 LIBS="-thread $LIBS"
401                                 AC_TRY_LINK([char pthread();],[
402                                         pthread_create();
403                                         ], ol_cv_thread_flag=yes, ol_cv_thread_flag=no)
404                                 dnl restore the LIBS
405                                 LIBS="$save_LIBS"
406                         ])
407
408                         if test $ol_cv_thread_flag = yes ; then
409                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
410                                 ol_link_threads=posix
411                         fi
412                 fi
413
414                 if test $ol_link_threads = no ; then
415                         dnl try DEC Threads -lpthread -lexc
416                         save_LIBS="$LIBS"
417                         AC_CHECK_LIB(pthread, pthread_join, [
418                                 ol_link_threads=posix
419                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
420                                 if test $ol_with_yielding_select = auto ; then
421                                         ol_with_yielding_select=yes
422                                 fi
423                                 ],,[-lexc])
424                         LIBS="$save_LIBS"
425                 fi
426
427                 if test $ol_link_threads = no ; then
428                         dnl try DEC Threads -lpthreads -lmach -lexc -lc_r
429                         save_LIBS="$LIBS"
430                         AC_CHECK_LIB(pthreads, pthread_join, [
431                                 ol_link_threads=posix
432                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
433                                 if test $ol_with_yielding_select = auto ; then
434                                         ol_with_yielding_select=yes
435                                 fi
436                                 ],,[-lmach -lexc -lc_r])
437                         LIBS="$save_LIBS"
438                 fi
439
440                 if test $ol_link_threads = no ; then
441                         dnl try -lpthread
442                         save_LIBS="$LIBS"
443                         AC_CHECK_LIB(pthread, pthread_create, [
444                                 ol_link_threads=posix
445                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"])
446                         LIBS="$save_LIBS"
447                 fi
448
449                 if test $ol_link_threads = no ; then
450                         dnl try -lc_r
451                         save_LIBS="$LIBS"
452                         AC_CHECK_LIB(c_r, pthread_create, [
453                                 ol_link_threads=posix
454                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"])
455                         LIBS="$save_LIBS"
456                 fi
457
458                 if test $ol_link_threads != no ; then
459                         AC_DEFINE(HAVE_PTHREADS)
460
461                         dnl save flags
462                         save_CPPFLAGS="$CPPFLAGS"
463                         save_LIBS="$LIBS"
464                         LIBS="$LTHREAD_LIBS $LIBS"
465
466                         dnl All POSIX Thread (final) implementations should have
467                         dnl sched_yield instead of pthread yield.
468                         dnl check for both
469                         AC_CHECK_FUNCS(sched_yield pthread_yield)
470
471                         if test $ac_cv_func_sched_yield = no -a \
472                                 $ac_cv_func_pthread_yield = no ; then
473                                 dnl Digital UNIX has sched_yield() in -lrt
474                                 AC_CHECK_LIB(rt, sched_yield,
475                                         [LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
476                                         AC_DEFINE(HAVE_SCHED_YIELD,1)
477                                         ac_cv_func_sched_yield=yes],
478                                         [ac_cv_func_sched_yield=no])
479                         fi
480                         if test $ac_cv_func_sched_yield = no -a \
481                                 $ac_cv_func_pthread_yield = no ; then
482                                 dnl Solaris has sched_yield() in -lposix4
483                                 AC_CHECK_LIB(posix4, sched_yield,
484                                         [LTHREAD_LIBS="$LTHREAD_LIBS -lposix4"
485                                         AC_DEFINE(HAVE_SCHED_YIELD,1)
486                                         ac_cv_func_sched_yield=yes],
487                                         [ac_cv_func_sched_yield=no])
488                         fi
489                         if test $ac_cv_func_sched_yield = no -a \
490                                 $ac_cv_func_pthread_yield = no ; then
491                                 AC_MSG_WARN([could not locate sched_yield() or pthread_yield()])
492                                 AC_MSG_ERROR([POSIX Threads are not usable])
493                         fi
494
495                         dnl Check functions for compatibility
496                         AC_CHECK_FUNCS(pthread_kill)
497                         AC_CHECK_FUNCS( \
498                                 pthread_attr_create pthread_attr_init \
499                                 pthread_attr_destroy pthread_attr_delete \
500                                 pthread_attr_setdetachstate pthread_attr_setdetach_np \
501                         )
502
503                         dnl Check for setconcurreny functions
504                         AC_CHECK_FUNCS( \
505                                 pthread_setconcurrency \
506                                 thr_setconcurrency \
507                         )
508
509                         dnl Check if select causes an yield
510                         if test $ol_with_yielding_select = auto ; then
511                                 AC_MSG_CHECKING([if select yields])
512                                 AC_TRY_RUN([
513 #include <sys/types.h>
514 #include <sys/time.h>
515 #include <unistd.h>
516 #include <pthread.h>
517 #ifndef NULL
518 #define NULL 0
519 #endif
520
521 int fildes[2];
522
523 int task(arg)
524         int *arg;
525 {
526         int i;
527         struct timeval tv;
528
529         fd_set rfds;
530
531         tv.tv_sec=10;
532         tv.tv_usec=0;
533
534         FD_ZERO(&rfds);
535         FD_SET(fildes[0], &rfds);
536
537         /* we're not interested in any fds */
538         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
539
540         if(i < 0) {
541                 perror("select");
542                 exit(0);
543         }
544
545         exit(1); /* if we exit here, the select blocked the whole process */
546 }
547
548 int main(argc, argv)
549         int argc;
550         char **argv;
551 {
552         pthread_t t;
553
554         /* create a pipe to select */
555         if(pipe(&fildes[0])) {
556                 perror("select");
557                 exit(0);
558         }
559
560 #ifdef HAVE_PTHREAD_SETCONCURRENCY
561         (void) pthread_setconcurrency(2);
562 #else
563 #ifdef HAVE_THR_SETCONCURRENCY
564         /* Set Solaris LWP concurrency to 2 */
565         thr_setconcurrency(2);
566 #endif
567 #endif
568
569         pthread_create(&t, NULL, (void *) task, NULL);
570
571 #if HAVE_SCHED_YIELD
572         sched_yield();  /* make sure task runs first */
573 #else
574 #ifdef HAVE_PTHREAD_YIELD
575         pthread_yield();        /* make sure task runs first */
576 #endif
577 #endif
578         exit(0);
579 }
580                                 ], [ol_pthread_select_yields=yes], [ol_pthread_select_yields=no], [
581                                 AC_MSG_ERROR([crossing compiling: use --with-yielding_select=yes|no|manual])])
582                                 AC_MSG_RESULT($ol_pthread_select_yields)
583
584                                 if test $ol_pthread_select_yields = yes ; then
585                                         ol_with_yielding_select=yes
586                                 fi
587                         fi
588
589 dnl                     dnl check for reentrant/threadsafe functions
590 dnl                     AC_CHECK_FUNCS( \
591 dnl                             feof_unlocked \
592 dnl                             unlocked_feof \
593 dnl                             ftrylockfile \
594 dnl                             flockfile \
595 dnl                             putc_unlocked \
596 dnl                             gmtime_r \
597 dnl                             strtok_r \
598 dnl                     )
599
600                         dnl restore flags
601                         CPPFLAGS="$save_CPPFLAGS"
602                         LIBS="$save_LIBS"
603                 else
604                         AC_MSG_ERROR([could not link with POSIX Threads])
605                 fi
606         fi
607
608         if test $ol_with_threads = posix ; then
609                 AC_MSG_ERROR([could not locate POSIX Threads])
610         fi
611 fi
612
613 if test $ol_with_threads = auto -o $ol_with_threads = mach ; then
614         dnl check for Mach CThreads
615         AC_CHECK_HEADERS(mach/cthreads.h)
616         if test $ac_cv_header_mach_cthreads_h = yes ; then
617                 ol_with_threads=found
618
619                 dnl check for cthread support in current $LIBS
620                 AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
621
622                 if test $ol_link_threads = no ; then
623                         dnl try -all_load
624                         dnl this test needs work
625                         AC_CACHE_CHECK([for cthread_fork with -all_load],
626                                 [ol_cv_cthread_all_load], [
627                                 dnl save the flags
628                                 save_LIBS="$LIBS"
629                                 LIBS="-all_load $LIBS"
630                                 AC_TRY_LINK([#include <mach/cthreads.h>],[
631                                         cthread_fork((void *)0, (void *)0);
632                                         ], ol_cv_cthread_all_load=yes, ol_cv_cthread_all_load=no)
633                                 dnl restore the LIBS
634                                 LIBS="$save_LIBS"
635                         ])
636
637                         if test $ol_cv_cthread_all_load = yes ; then
638                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
639                                 ol_link_threads=mach
640                         fi
641                 fi
642
643                 if test $ol_link_threads != no ; then
644                         : check for cthread specific functionality here
645                         AC_DEFINE(HAVE_MACH_CTHREADS,1)
646                 else
647                         AC_MSG_ERROR([could not link with Mach CThreads])
648                 fi
649         fi
650
651         if test $ol_with_threads = mach ; then
652                 AC_MSG_ERROR([could not locate Mach CThreads])
653         fi
654 fi
655
656 if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then
657         dnl check for SunOS5 LWP
658         AC_CHECK_HEADERS(thread.h synch.h)
659         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
660                 AC_CHECK_LIB(thread, thr_create, [have_thr=yes], [have_thr=no])
661
662                 if test $have_thr = yes ; then
663                         AC_DEFINE(HAVE_THR)
664                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
665                         ol_link_threads=thr
666
667                         if test $ol_with_yielding_select = auto ; then
668                                 ol_with_yielding_select=yes
669                         fi
670                 fi
671         fi
672
673         dnl check for SunOS4 LWP
674         AC_CHECK_HEADERS(lwp/lwp.h)
675         if test $ac_cv_header_lwp_lwp_h = yes ; then
676                 AC_CHECK_LIB(lwp, lwp_create, [have_lwp=yes], [have_lwp=no])
677
678                 if test $have_lwp = yes ; then
679                         AC_DEFINE(HAVE_LWP)
680                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
681                         ol_link_threads=lwp
682
683                         if test $ol_with_yielding_select = auto ; then
684                                 ol_with_yielding_select=no
685                         fi
686                 fi
687         fi
688 fi
689
690 if test $ol_with_yielding_select = yes ; then
691         AC_DEFINE(HAVE_YIELDING_SELECT,1)
692 fi
693
694 if test $ol_with_threads = manual ; then
695         dnl User thinks he can manually configure threads.
696         ol_link_threads=yes
697
698         AC_MSG_WARN([thread defines and link options must be set manually])
699
700         AC_CHECK_HEADERS(pthread.h sched.h)
701         AC_CHECK_FUNCS(sched_yield pthread_yield)
702         OL_LINUX_THREADS
703
704         AC_CHECK_HEADERS(mach/cthreads.h)
705         AC_CHECK_HEADERS(lwp/lwp.h)
706         AC_CHECK_HEADERS(thread.h synch.h)
707 fi
708
709 if test $ol_with_threads != no ; then  
710         dnl needed to get reentrant/threadsafe versions
711         dnl
712         AC_DEFINE(_REENTRANT,1)
713         AC_DEFINE(_THREAD_SAFE,1)
714         AC_DEFINE(_THREADSAFE,1)
715
716         dnl this might cause the errno symbol to be
717         dnl replaced with a function to get a thread specific errno.
718         dnl check to see if everything needs to be compiled
719         dnl with the thread libraries
720         AC_CACHE_CHECK([for thread specific errno],
721                 [ol_cv_errno_thread_specific], [
722                 AC_TRY_LINK([
723 #include <errno.h>
724                         ], [
725 int x = errno;
726                         ],
727                         [ol_cv_errno_thread_specific=yes],
728                         [ol_cv_errno_thread_specific=no])
729         ])
730
731         if test $ol_cv_errno_thread_specific != yes ; then
732                 LIBS="$LTHREAD_LIBS $LIBS"
733                 LTHREAD_LIBS=""
734         fi
735 fi  
736
737 dnl ----------------------------------------------------------------
738
739 if test $ol_link_threads = no ; then
740         if test $ol_with_threads = yes ; then
741                 AC_MSG_ERROR([no suitable thread support])
742         fi
743
744         if test $ol_with_threads = auto ; then
745                 AC_MSG_WARN([no suitable thread support, disabling threads])
746                 ol_with_threads=no
747         fi
748
749         AC_DEFINE(NO_THREADS,1)
750         LTHREAD_LIBS=""
751 fi
752
753 ol_link_ldbm=no 
754 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
755         OL_BERKELEY_DB2
756
757         if test $ol_cv_berkeley_db2 = yes ; then
758                 ol_link_ldbm=db2
759                 ol_with_ldbm_api=db2
760
761                 if test $ol_with_ldbm_type = hash ; then
762                         AC_DEFINE(LDBM_USE_DBHASH,1)
763                 else
764                         AC_DEFINE(LDBM_USE_DBBTREE,1)
765                 fi
766
767                 dnl $ol_cv_lib_db2 should be yes or -ldb
768                 dnl (it could be no, but that would be an error
769                 if test $ol_cv_lib_db2 != yes ; then
770                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
771                 fi
772         fi
773 fi
774
775 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
776         OL_BERKELEY_DB
777
778         if test $ol_cv_berkeley_db = yes ; then
779                 ol_link_ldbm=db
780                 ol_with_ldbm_api=db
781
782                 if test $ol_with_ldbm_type = hash ; then
783                         AC_DEFINE(LDBM_USE_DBHASH,1)
784                 else
785                         AC_DEFINE(LDBM_USE_DBBTREE,1)
786                 fi
787
788                 dnl $ol_cv_lib_db should be yes or -ldb
789                 dnl (it could be no, but that would be an error
790                 if test $ol_cv_lib_db != yes ; then
791                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
792                 fi
793         fi
794 fi
795
796 if test $ol_with_ldbm_api = manual ; then
797         dnl User thinks he can manually configure LDBM api.
798         ol_link_ldbm=yes
799
800         AC_MSG_WARN([LDBM defines and link options must be set manually])
801
802         AC_CHECK_HEADERS(db.h db_185.h gdbm.h ndbm.h)
803 fi
804
805 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
806         AC_MSG_WARN(Could not find LDBM with BTREE support)
807         ol_with_ldbm_api=none
808 fi
809
810 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
811         OL_GDBM
812
813         if test $ol_cv_gdbm = yes ; then
814                 ol_link_ldbm=gdbm
815                 ol_with_ldbm_api=gdbm
816
817                 if test $ol_cv_lib_gdbm != yes ; then
818                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
819                 fi
820         fi
821 fi
822
823 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
824         OL_NDBM
825
826         if test $ol_cv_ndbm = yes ; then
827                 if test $ol_with_ldbm_api = auto ; then
828                         AC_MSG_WARN([Attempting to use NDBM.  Functionality will be limited.])
829                 fi
830
831                 ol_link_ldbm=ndbm
832                 ol_with_ldbm_api=ndbm
833
834                 if test $ol_cv_lib_ndbm != yes ; then
835                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
836                 fi
837         fi
838 fi
839
840 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
841         AC_MSG_WARN(could not find suitable LDBM backend)
842         if test $ol_enable_ldbm = yes ; then
843                 AC_MSG_ERROR(select appropriate LDBM options or disable)
844         fi
845
846         AC_MSG_WARN(disabling LDBM)
847         ol_enable_ldbm=no
848 fi
849
850 if test $ol_enable_wrappers = yes ; then
851         AC_CHECK_LIB(wrap, hosts_access,
852                 [have_wrappers=yes], [have_wrappers=no])
853
854         if test $have_wrappers = yes ; then
855                 AC_DEFINE(HAVE_TCPD)
856                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
857         else
858                 AC_MSG_WARN(could not find -lwrap)
859                 if test $ol_enable_wrappers = yes ; then
860                         AC_MSG_ERROR(could not find wrappers, select appropriate options or disable)
861                 fi
862
863                 AC_MSG_WARN(disabling wrappers support)
864                 ol_enable_wrappers=no
865         fi
866
867 fi
868
869 # ud needs termcap (should insert check here)
870 ol_link_termcap=no
871 AC_CHECK_HEADERS(termcap.h ncurses.h)
872
873 if test $ol_link_termcap = no ; then
874         AC_CHECK_LIB(termcap, tputs, [have_termcap=yes], [have_termcap=no])
875         if test $have_termcap = yes ; then
876                 AC_DEFINE(HAVE_TERMCAP)
877                 ol_link_termcap=yes
878                 TERMCAP_LIBS=-ltermcap
879         fi
880 fi
881
882 if test $ol_link_termcap = no ; then
883         AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
884         if test $have_ncurses = yes ; then
885                 AC_DEFINE(HAVE_NCURSES)
886                 ol_link_termcap=yes
887                 TERMCAP_LIBS=-lncurses
888         fi
889 fi
890
891 if test $ol_link_termcap = no ; then
892         AC_DEFINE(NO_TERMCAP,1)
893         TERMCAP_LIBS=
894 fi
895
896 # FreeBSD (and others) have crypt(3) in -lcrypt
897 if test $ol_enable_crypt != no ; then
898         AC_CHECK_FUNC(crypt, [have_crypt=yes], [
899                 AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
900                         have_crypt=yes], [have_crypt=no])])
901
902         if test $have_crypt = yes ; then
903                 AC_DEFINE(HAVE_CRYPT,1)
904         else
905                 AC_MSG_WARN(could not find crypt)
906                 if test $ol_enable_crypt = yes ; then
907                         AC_MSG_ERROR(could not find crypt, select appropriate options or disable)
908                 fi
909
910                 AC_MSG_WARN(disabling crypt support)
911                 ol_enable_crypt=no
912         fi
913 fi
914
915 # FreeBSD (and others) have setproctitle(3) in -lutil
916 if test $ol_enable_proctitle != no ; then
917         AC_CHECK_FUNC(setproctitle,     [have_setproctitle=yes], [
918                 AC_CHECK_LIB(util, setproctitle,
919                         [have_setproctitle=yes
920                         LUTIL_LIBS="$LUTIL_LIBS -lutil"],
921                         [have_setproctitle=no
922                         LIBOBJS="$LIBOBJS setproctitle.o"])])
923
924         if test $have_setproctitle = yes ; then
925                 AC_DEFINE(HAVE_SETPROCTITLE,1)
926         fi
927 fi
928
929 dnl ----------------------------------------------------------------
930 dnl Checks for header files.
931 AC_HEADER_STDC
932
933 if test $ac_cv_header_stdc != yes; then
934         AC_MSG_WARN([could not Standard C compliant headers])
935 fi
936
937 AC_HEADER_DIRENT
938 AC_HEADER_SYS_WAIT
939 AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
940 if test $am_cv_sys_posix_termios = yes ; then
941         AC_DEFINE(HAVE_POSIX_TERMIOS,1)
942 fi
943
944 AC_CHECK_HEADERS(       \
945         crypt.h                 \
946         errno.h                 \
947         fcntl.h                 \
948         filio.h                 \
949         getopt.h                \
950         libutil.h               \
951         limits.h                \
952         malloc.h                \
953         memory.h                \
954         regex.h                 \
955         psap.h                  \
956         pwd.h                   \
957         sgtty.h                 \
958         stdarg.h                \
959         stddef.h                \
960         string.h                \
961         strings.h               \
962         sys/file.h              \
963         sys/filio.h             \
964         sys/errno.h             \
965         sys/ioctl.h             \
966         sys/param.h             \
967         sys/resource.h  \
968         sys/socket.h    \
969         sys/syslog.h    \
970         sys/time.h              \
971         sys/types.h             \
972         syslog.h                \
973         termios.h               \
974         unistd.h                \
975 )
976
977 dnl ----------------------------------------------------------------
978 dnl Checks for typedefs, structures, and compiler characteristics.
979 AC_TYPE_GETGROUPS dnl requires AC_TYPE_UID_T
980 AC_TYPE_MODE_T
981 AC_TYPE_OFF_T
982 AC_TYPE_PID_T
983 AM_TYPE_PTRDIFF_T
984 AC_TYPE_SIGNAL
985 AC_TYPE_SIZE_T
986 AC_STRUCT_ST_BLKSIZE
987 AC_HEADER_TIME
988 AC_STRUCT_TM
989
990 OL_C_UPPER_LOWER
991 AC_C_CONST
992
993 if test $cross_compiling = yes ; then
994         AC_DEFINE(CROSS_COMPILING, 1)
995 else
996         AC_C_BIGENDIAN
997         AC_CHECK_SIZEOF(short) 
998         AC_CHECK_SIZEOF(int) 
999         AC_CHECK_SIZEOF(long)
1000 fi
1001
1002 dnl ----------------------------------------------------------------
1003 dnl Checks for library functions.
1004 AC_FUNC_MEMCMP
1005 dnl AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
1006 AC_FUNC_STRFTIME
1007 dnl AM_FUNC_STRTOD
1008 AC_FUNC_VPRINTF
1009
1010 if test $ac_cv_func_vprintf = yes ; then
1011         dnl check for vsnprintf
1012         AC_CHECK_FUNCS(vsnprintf)
1013 fi
1014
1015 AC_FUNC_WAIT3
1016
1017 AC_CHECK_FUNCS(         \
1018         bcopy                   \
1019         flock                   \
1020         getdtablesize   \
1021         gethostname             \
1022         getpwuid                \
1023         gettimeofday    \
1024         lockf                   \
1025         memcpy                  \
1026         memmove                 \
1027         mkstemp                 \
1028         res_search              \
1029         select                  \
1030         setpwfile               \
1031         setsid                  \
1032         signal                  \
1033         sigset                  \
1034         snprintf                \
1035         socket                  \
1036         strerror                \
1037         strpbrk                 \
1038         strrchr                 \
1039         strsep                  \
1040         strstr                  \
1041         strtok                  \
1042         strtol                  \
1043         strtoul                 \
1044         sysconf                 \
1045         waitpid                 \
1046 )
1047
1048 dnl We actually may need to replace more than this.
1049 AC_REPLACE_FUNCS(getopt strdup tempnam)
1050
1051 dnl ----------------------------------------------------------------
1052 # Check Configuration
1053 OL_SYS_ERRLIST
1054
1055 dnl ----------------------------------------------------------------
1056 dnl Sort out defines
1057
1058 if test $ol_enable_debug != no ; then
1059         AC_DEFINE(LDAP_DEBUG,1)
1060 fi
1061 dnl     if test $ol_enable_syslog != no ; then
1062 dnl             AC_DEFINE(LDAP_SYSLOG,1)
1063 dnl     fi
1064 if test $ol_enable_libui = yes ; then
1065         AC_DEFINE(LDAP_LIBUI,1)
1066 fi
1067 if test $ol_enable_cache = no ; then
1068         AC_DEFINE(LDAP_NOCACHE,1)
1069 fi
1070 if test $ol_enable_dns != no ; then
1071         AC_DEFINE(LDAP_DNS,1)
1072 fi
1073 if test $ol_enable_proctitle != no ; then
1074         AC_DEFINE(LDAP_PROCTITLE,1)
1075 fi
1076 if test $ol_enable_referrals != no ; then
1077         AC_DEFINE(LDAP_REFERRALS,1)
1078 fi
1079 if test $ol_enable_cldap != no ; then
1080         AC_DEFINE(LDAP_CONNECTIONLESS,1)
1081 fi
1082
1083 if test $ol_enable_aclgroups != no ; then
1084         AC_DEFINE(SLAPD_ACLGROUPS,1)
1085 fi
1086 if test $ol_enable_crypt != no ; then
1087         AC_DEFINE(SLAPD_CRYPT,1)
1088 fi
1089 if test $ol_enable_md5 != no ; then
1090         AC_DEFINE(SLAPD_MD5,1)
1091 fi
1092 if test $ol_enable_sha1 != no ; then
1093         AC_DEFINE(SLAPD_SHA1,1)
1094 fi
1095 if test $ol_enable_phonetic != no ; then
1096         AC_DEFINE(SLAPD_PHONETIC,1)
1097 fi
1098 if test $ol_enable_rlookups != no ; then
1099         AC_DEFINE(SLAPD_RLOOKUPS,1)
1100 fi
1101
1102 if test $ol_link_ldbm != no ; then
1103         AC_DEFINE(SLAPD_LDBM,1)
1104         BUILD_SLAPD=yes
1105         BUILD_LDBM=yes
1106 fi
1107
1108 if test $ol_enable_passwd != no ; then
1109         AC_DEFINE(SLAPD_PASSWD,1)
1110         BUILD_SLAPD=yes
1111         BUILD_PASSWD=yes
1112 fi
1113
1114 if test $ol_enable_shell != no ; then
1115         AC_DEFINE(SLAPD_SHELL,1)
1116         BUILD_SLAPD=yes
1117         BUILD_SHELL=yes
1118 fi
1119
1120 if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
1121         $BUILD_SLAPD = yes ; then
1122         BUILD_SLURPD=yes
1123 fi
1124
1125 if test $ol_link_isode != no ; then
1126         BUILD_LDAPD=yes
1127 fi
1128
1129 dnl ----------------------------------------------------------------
1130
1131 AC_SUBST(BUILD_LDAPD)
1132 AC_SUBST(BUILD_SLAPD)
1133   AC_SUBST(BUILD_LDBM)
1134   AC_SUBST(BUILD_PASSWD)
1135   AC_SUBST(BUILD_SHELL)
1136 AC_SUBST(BUILD_SLURPD)
1137
1138
1139 AC_SUBST(LDAP_LIBS)
1140 AC_SUBST(LDAPD_LIBS)
1141 AC_SUBST(SLAPD_LIBS)
1142 AC_SUBST(SLURPD_LIBS)
1143 AC_SUBST(LDBM_LIBS)
1144 AC_SUBST(LTHREAD_LIBS)
1145 AC_SUBST(LUTIL_LIBS)
1146
1147 AC_SUBST(KRB_LIBS)
1148 AC_SUBST(TERMCAP_LIBS)
1149
1150 dnl ----------------------------------------------------------------
1151 dnl final output
1152 dnl
1153
1154 AC_OUTPUT( \
1155 Makefile:build/top.mk:Makefile.in:build/dir.mk \
1156 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
1157 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
1158 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
1159 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
1160 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
1161 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
1162 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
1163 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
1164 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
1165 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
1166 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
1167 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
1168 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
1169 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
1170 include/Makefile:build/top.mk:include/Makefile.in \
1171 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
1172 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
1173 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
1174 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
1175 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
1176 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
1177 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk:build/lib-static.mk    \
1178 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
1179 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
1180 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
1181 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
1182 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
1183 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
1184 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
1185 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
1186 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
1187 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
1188 tests/Makefile:build/top.mk:tests/Makefile.in \
1189 ,[
1190 date > stamp-h
1191 echo Please \"make depend\" to build dependencies
1192 ])