]> git.sur5r.net Git - openldap/blob - configure
2178735689bbcf2ed59f3877f905d088bb35cd78
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --enable-debug        enable debugging (yes)"
17 ac_help="$ac_help
18   --enable-syslog       enable syslog support (no)"
19 ac_help="$ac_help
20   --enable-libui        enable library user interface (yes)"
21 ac_help="$ac_help
22   --enable-cache        enable caching (yes)"
23 ac_help="$ac_help
24   --enable-dns  enable dns support (no)"
25 ac_help="$ac_help
26   --enable-referrals    enable referrals (yes)"
27 ac_help="$ac_help
28   --enable-clapd        enable connectionless ldap (no)"
29 ac_help="$ac_help
30   --with-kerberos       use Kerberos (no)"
31 ac_help="$ac_help
32   --with-kerberos-afs   use AFS Kerberos (no)"
33 ac_help="$ac_help
34   --with-threads        use threads (yes)"
35 ac_help="$ac_help
36   --enable-ldapd        enable building ldapd (no)"
37 ac_help="$ac_help
38   --enable-slapd        enable building slapd (yes)"
39 ac_help="$ac_help
40     --enable-aclgroup   enable ACL group support (yes)"
41 ac_help="$ac_help
42     --enable-crypt      enable crypt(3) passwords (yes)"
43 ac_help="$ac_help
44     --enable-md5        enable MD5 passwords (yes)"
45 ac_help="$ac_help
46     --enable-sha1       enable SHA1 passwords (yes)"
47 ac_help="$ac_help
48     --enable-wrappers   enable tcp wrapper support (no)"
49 ac_help="$ac_help
50     --enable-phonetic   enable phonetic/soundex  (no)"
51 ac_help="$ac_help
52     --enable-rlookups   enable reverse lookups (yes)"
53 ac_help="$ac_help
54     --enable-ldbm       enable ldbm backend (yes)"
55 ac_help="$ac_help
56     --enable-passwd     enable passwd backend (yes)"
57 ac_help="$ac_help
58     --enable-shell      enable shell backend (yes)"
59 ac_help="$ac_help
60     --with-ndbm         use NDB for LDBM backend (any)"
61 ac_help="$ac_help
62     --with-gdbm         use GDBM for LDBM backend (any)"
63 ac_help="$ac_help
64     --with-dbhash       use Berkeley DB Hash for LDBM backend (any)"
65 ac_help="$ac_help
66     --with-dbbtree      use Berkeley DB Btrees for LDBM backend (any)"
67 ac_help="$ac_help
68     --with-db2          use Berkeley DB2 API (any)"
69 ac_help="$ac_help
70   --enable-slurpd       enable building slurpd (yes)"
71
72 # Initialize some variables set by options.
73 # The variables have the same names as the options, with
74 # dashes changed to underlines.
75 build=NONE
76 cache_file=./config.cache
77 exec_prefix=NONE
78 host=NONE
79 no_create=
80 nonopt=NONE
81 no_recursion=
82 prefix=NONE
83 program_prefix=NONE
84 program_suffix=NONE
85 program_transform_name=s,x,x,
86 silent=
87 site=
88 srcdir=
89 target=NONE
90 verbose=
91 x_includes=NONE
92 x_libraries=NONE
93 bindir='${exec_prefix}/bin'
94 sbindir='${exec_prefix}/sbin'
95 libexecdir='${exec_prefix}/libexec'
96 datadir='${prefix}/share'
97 sysconfdir='${prefix}/etc'
98 sharedstatedir='${prefix}/com'
99 localstatedir='${prefix}/var'
100 libdir='${exec_prefix}/lib'
101 includedir='${prefix}/include'
102 oldincludedir='/usr/include'
103 infodir='${prefix}/info'
104 mandir='${prefix}/man'
105
106 # Initialize some other variables.
107 subdirs=
108 MFLAGS= MAKEFLAGS=
109 # Maximum number of lines to put in a shell here document.
110 ac_max_here_lines=12
111
112 ac_prev=
113 for ac_option
114 do
115
116   # If the previous option needs an argument, assign it.
117   if test -n "$ac_prev"; then
118     eval "$ac_prev=\$ac_option"
119     ac_prev=
120     continue
121   fi
122
123   case "$ac_option" in
124   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
125   *) ac_optarg= ;;
126   esac
127
128   # Accept the important Cygnus configure options, so we can diagnose typos.
129
130   case "$ac_option" in
131
132   -bindir | --bindir | --bindi | --bind | --bin | --bi)
133     ac_prev=bindir ;;
134   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
135     bindir="$ac_optarg" ;;
136
137   -build | --build | --buil | --bui | --bu)
138     ac_prev=build ;;
139   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
140     build="$ac_optarg" ;;
141
142   -cache-file | --cache-file | --cache-fil | --cache-fi \
143   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
144     ac_prev=cache_file ;;
145   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
146   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
147     cache_file="$ac_optarg" ;;
148
149   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
150     ac_prev=datadir ;;
151   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
152   | --da=*)
153     datadir="$ac_optarg" ;;
154
155   -disable-* | --disable-*)
156     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
157     # Reject names that are not valid shell variable names.
158     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
159       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
160     fi
161     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162     eval "enable_${ac_feature}=no" ;;
163
164   -enable-* | --enable-*)
165     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
166     # Reject names that are not valid shell variable names.
167     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
168       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
169     fi
170     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
171     case "$ac_option" in
172       *=*) ;;
173       *) ac_optarg=yes ;;
174     esac
175     eval "enable_${ac_feature}='$ac_optarg'" ;;
176
177   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
178   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
179   | --exec | --exe | --ex)
180     ac_prev=exec_prefix ;;
181   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
182   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
183   | --exec=* | --exe=* | --ex=*)
184     exec_prefix="$ac_optarg" ;;
185
186   -gas | --gas | --ga | --g)
187     # Obsolete; use --with-gas.
188     with_gas=yes ;;
189
190   -help | --help | --hel | --he)
191     # Omit some internal or obsolete options to make the list less imposing.
192     # This message is too long to be a string in the A/UX 3.1 sh.
193     cat << EOF
194 Usage: configure [options] [host]
195 Options: [defaults in brackets after descriptions]
196 Configuration:
197   --cache-file=FILE       cache test results in FILE
198   --help                  print this message
199   --no-create             do not create output files
200   --quiet, --silent       do not print \`checking...' messages
201   --version               print the version of autoconf that created configure
202 Directory and file names:
203   --prefix=PREFIX         install architecture-independent files in PREFIX
204                           [$ac_default_prefix]
205   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
206                           [same as prefix]
207   --bindir=DIR            user executables in DIR [EPREFIX/bin]
208   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
209   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
210   --datadir=DIR           read-only architecture-independent data in DIR
211                           [PREFIX/share]
212   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
213   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
214                           [PREFIX/com]
215   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
216   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
217   --includedir=DIR        C header files in DIR [PREFIX/include]
218   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
219   --infodir=DIR           info documentation in DIR [PREFIX/info]
220   --mandir=DIR            man documentation in DIR [PREFIX/man]
221   --srcdir=DIR            find the sources in DIR [configure dir or ..]
222   --program-prefix=PREFIX prepend PREFIX to installed program names
223   --program-suffix=SUFFIX append SUFFIX to installed program names
224   --program-transform-name=PROGRAM
225                           run sed PROGRAM on installed program names
226 EOF
227     cat << EOF
228 Host type:
229   --build=BUILD           configure for building on BUILD [BUILD=HOST]
230   --host=HOST             configure for HOST [guessed]
231   --target=TARGET         configure for TARGET [TARGET=HOST]
232 Features and packages:
233   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
234   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
235   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
236   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
237   --x-includes=DIR        X include files are in DIR
238   --x-libraries=DIR       X library files are in DIR
239 EOF
240     if test -n "$ac_help"; then
241       echo "--enable and --with options recognized:$ac_help"
242     fi
243     exit 0 ;;
244
245   -host | --host | --hos | --ho)
246     ac_prev=host ;;
247   -host=* | --host=* | --hos=* | --ho=*)
248     host="$ac_optarg" ;;
249
250   -includedir | --includedir | --includedi | --included | --include \
251   | --includ | --inclu | --incl | --inc)
252     ac_prev=includedir ;;
253   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
254   | --includ=* | --inclu=* | --incl=* | --inc=*)
255     includedir="$ac_optarg" ;;
256
257   -infodir | --infodir | --infodi | --infod | --info | --inf)
258     ac_prev=infodir ;;
259   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
260     infodir="$ac_optarg" ;;
261
262   -libdir | --libdir | --libdi | --libd)
263     ac_prev=libdir ;;
264   -libdir=* | --libdir=* | --libdi=* | --libd=*)
265     libdir="$ac_optarg" ;;
266
267   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
268   | --libexe | --libex | --libe)
269     ac_prev=libexecdir ;;
270   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
271   | --libexe=* | --libex=* | --libe=*)
272     libexecdir="$ac_optarg" ;;
273
274   -localstatedir | --localstatedir | --localstatedi | --localstated \
275   | --localstate | --localstat | --localsta | --localst \
276   | --locals | --local | --loca | --loc | --lo)
277     ac_prev=localstatedir ;;
278   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
279   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
280   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
281     localstatedir="$ac_optarg" ;;
282
283   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
284     ac_prev=mandir ;;
285   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
286     mandir="$ac_optarg" ;;
287
288   -nfp | --nfp | --nf)
289     # Obsolete; use --without-fp.
290     with_fp=no ;;
291
292   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
293   | --no-cr | --no-c)
294     no_create=yes ;;
295
296   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
297   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
298     no_recursion=yes ;;
299
300   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
301   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
302   | --oldin | --oldi | --old | --ol | --o)
303     ac_prev=oldincludedir ;;
304   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
305   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
306   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
307     oldincludedir="$ac_optarg" ;;
308
309   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
310     ac_prev=prefix ;;
311   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
312     prefix="$ac_optarg" ;;
313
314   -program-prefix | --program-prefix | --program-prefi | --program-pref \
315   | --program-pre | --program-pr | --program-p)
316     ac_prev=program_prefix ;;
317   -program-prefix=* | --program-prefix=* | --program-prefi=* \
318   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
319     program_prefix="$ac_optarg" ;;
320
321   -program-suffix | --program-suffix | --program-suffi | --program-suff \
322   | --program-suf | --program-su | --program-s)
323     ac_prev=program_suffix ;;
324   -program-suffix=* | --program-suffix=* | --program-suffi=* \
325   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
326     program_suffix="$ac_optarg" ;;
327
328   -program-transform-name | --program-transform-name \
329   | --program-transform-nam | --program-transform-na \
330   | --program-transform-n | --program-transform- \
331   | --program-transform | --program-transfor \
332   | --program-transfo | --program-transf \
333   | --program-trans | --program-tran \
334   | --progr-tra | --program-tr | --program-t)
335     ac_prev=program_transform_name ;;
336   -program-transform-name=* | --program-transform-name=* \
337   | --program-transform-nam=* | --program-transform-na=* \
338   | --program-transform-n=* | --program-transform-=* \
339   | --program-transform=* | --program-transfor=* \
340   | --program-transfo=* | --program-transf=* \
341   | --program-trans=* | --program-tran=* \
342   | --progr-tra=* | --program-tr=* | --program-t=*)
343     program_transform_name="$ac_optarg" ;;
344
345   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
346   | -silent | --silent | --silen | --sile | --sil)
347     silent=yes ;;
348
349   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
350     ac_prev=sbindir ;;
351   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
352   | --sbi=* | --sb=*)
353     sbindir="$ac_optarg" ;;
354
355   -sharedstatedir | --sharedstatedir | --sharedstatedi \
356   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
357   | --sharedst | --shareds | --shared | --share | --shar \
358   | --sha | --sh)
359     ac_prev=sharedstatedir ;;
360   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
361   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
362   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
363   | --sha=* | --sh=*)
364     sharedstatedir="$ac_optarg" ;;
365
366   -site | --site | --sit)
367     ac_prev=site ;;
368   -site=* | --site=* | --sit=*)
369     site="$ac_optarg" ;;
370
371   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
372     ac_prev=srcdir ;;
373   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
374     srcdir="$ac_optarg" ;;
375
376   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
377   | --syscon | --sysco | --sysc | --sys | --sy)
378     ac_prev=sysconfdir ;;
379   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
380   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
381     sysconfdir="$ac_optarg" ;;
382
383   -target | --target | --targe | --targ | --tar | --ta | --t)
384     ac_prev=target ;;
385   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
386     target="$ac_optarg" ;;
387
388   -v | -verbose | --verbose | --verbos | --verbo | --verb)
389     verbose=yes ;;
390
391   -version | --version | --versio | --versi | --vers)
392     echo "configure generated by autoconf version 2.12"
393     exit 0 ;;
394
395   -with-* | --with-*)
396     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
397     # Reject names that are not valid shell variable names.
398     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
399       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
400     fi
401     ac_package=`echo $ac_package| sed 's/-/_/g'`
402     case "$ac_option" in
403       *=*) ;;
404       *) ac_optarg=yes ;;
405     esac
406     eval "with_${ac_package}='$ac_optarg'" ;;
407
408   -without-* | --without-*)
409     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
410     # Reject names that are not valid shell variable names.
411     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
412       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
413     fi
414     ac_package=`echo $ac_package| sed 's/-/_/g'`
415     eval "with_${ac_package}=no" ;;
416
417   --x)
418     # Obsolete; use --with-x.
419     with_x=yes ;;
420
421   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422   | --x-incl | --x-inc | --x-in | --x-i)
423     ac_prev=x_includes ;;
424   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426     x_includes="$ac_optarg" ;;
427
428   -x-libraries | --x-libraries | --x-librarie | --x-librari \
429   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430     ac_prev=x_libraries ;;
431   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433     x_libraries="$ac_optarg" ;;
434
435   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
436     ;;
437
438   *)
439     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
440       echo "configure: warning: $ac_option: invalid host type" 1>&2
441     fi
442     if test "x$nonopt" != xNONE; then
443       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
444     fi
445     nonopt="$ac_option"
446     ;;
447
448   esac
449 done
450
451 if test -n "$ac_prev"; then
452   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
453 fi
454
455 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
456
457 # File descriptor usage:
458 # 0 standard input
459 # 1 file creation
460 # 2 errors and warnings
461 # 3 some systems may open it to /dev/tty
462 # 4 used on the Kubota Titan
463 # 6 checking for... messages and results
464 # 5 compiler messages saved in config.log
465 if test "$silent" = yes; then
466   exec 6>/dev/null
467 else
468   exec 6>&1
469 fi
470 exec 5>./config.log
471
472 echo "\
473 This file contains any messages produced by compilers while
474 running configure, to aid debugging if configure makes a mistake.
475 " 1>&5
476
477 # Strip out --no-create and --no-recursion so they do not pile up.
478 # Also quote any args containing shell metacharacters.
479 ac_configure_args=
480 for ac_arg
481 do
482   case "$ac_arg" in
483   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484   | --no-cr | --no-c) ;;
485   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
486   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
487   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
488   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
489   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
490   esac
491 done
492
493 # NLS nuisances.
494 # Only set these to C if already set.  These must not be set unconditionally
495 # because not all systems understand e.g. LANG=C (notably SCO).
496 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
497 # Non-C LC_CTYPE values break the ctype check.
498 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
499 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
500 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
501 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
502
503 # confdefs.h avoids OS command line length limits that DEFS can exceed.
504 rm -rf conftest* confdefs.h
505 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
506 echo > confdefs.h
507
508 # A filename unique to this package, relative to the directory that
509 # configure is in, which we can look for to find out if srcdir is correct.
510 ac_unique_file=include/ldap.h
511
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514   ac_srcdir_defaulted=yes
515   # Try the directory containing this script, then its parent.
516   ac_prog=$0
517   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
518   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
519   srcdir=$ac_confdir
520   if test ! -r $srcdir/$ac_unique_file; then
521     srcdir=..
522   fi
523 else
524   ac_srcdir_defaulted=no
525 fi
526 if test ! -r $srcdir/$ac_unique_file; then
527   if test "$ac_srcdir_defaulted" = yes; then
528     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
529   else
530     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
531   fi
532 fi
533 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
534
535 # Prefer explicitly selected file to automatically selected ones.
536 if test -z "$CONFIG_SITE"; then
537   if test "x$prefix" != xNONE; then
538     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
539   else
540     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
541   fi
542 fi
543 for ac_site_file in $CONFIG_SITE; do
544   if test -r "$ac_site_file"; then
545     echo "loading site script $ac_site_file"
546     . "$ac_site_file"
547   fi
548 done
549
550 if test -r "$cache_file"; then
551   echo "loading cache $cache_file"
552   . $cache_file
553 else
554   echo "creating cache $cache_file"
555   > $cache_file
556 fi
557
558 ac_ext=c
559 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
560 ac_cpp='$CPP $CPPFLAGS'
561 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
562 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
563 cross_compiling=$ac_cv_prog_cc_cross
564
565 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
566   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
567   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
568     ac_n= ac_c='
569 ' ac_t='        '
570   else
571     ac_n=-n ac_c= ac_t=
572   fi
573 else
574   ac_n= ac_c='\c' ac_t=
575 fi
576
577
578 ac_aux_dir=
579 for ac_dir in build $srcdir/build; do
580   if test -f $ac_dir/install-sh; then
581     ac_aux_dir=$ac_dir
582     ac_install_sh="$ac_aux_dir/install-sh -c"
583     break
584   elif test -f $ac_dir/install.sh; then
585     ac_aux_dir=$ac_dir
586     ac_install_sh="$ac_aux_dir/install.sh -c"
587     break
588   fi
589 done
590 if test -z "$ac_aux_dir"; then
591   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
592 fi
593 ac_config_guess=$ac_aux_dir/config.guess
594 ac_config_sub=$ac_aux_dir/config.sub
595 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
596
597 echo $ac_n "checking arguments""... $ac_c" 1>&6
598 echo "configure:599: checking arguments" >&5
599
600
601 # Check whether --enable-debug or --disable-debug was given.
602 if test "${enable_debug+set}" = set; then
603   enableval="$enable_debug"
604   test "$enableval" != no && enableval=yes
605   if test "$enableval" != "yes" ; then
606     
607         LDAP_DEBUG=no 
608   else
609     LDAP_DEBUG=yes
610   fi
611 else
612   enableval=yes 
613   LDAP_DEBUG=yes
614   
615 fi
616 # Check whether --enable-syslog or --disable-syslog was given.
617 if test "${enable_syslog+set}" = set; then
618   enableval="$enable_syslog"
619   test "$enableval" != yes && enableval=no
620   if test "$enableval" != "no" ; then
621     
622         LDAP_CLDAP=yes 
623   else
624     LDAP_CLDAP=no
625   fi
626 else
627   enableval=no 
628   LDAP_CLDAP=no
629   
630 fi
631 # Check whether --enable-libui or --disable-libui was given.
632 if test "${enable_libui+set}" = set; then
633   enableval="$enable_libui"
634   test "$enableval" != no && enableval=yes
635   if test "$enableval" != "yes" ; then
636     
637         LDAP_LIBUI=no 
638   else
639     LDAP_LIBUI=yes
640   fi
641 else
642   enableval=yes 
643   LDAP_LIBUI=yes
644   
645 fi
646 # Check whether --enable-cache or --disable-cache was given.
647 if test "${enable_cache+set}" = set; then
648   enableval="$enable_cache"
649   test "$enableval" != no && enableval=yes
650   if test "$enableval" != "yes" ; then
651     
652         LDAP_CACHE=no 
653   else
654     LDAP_CACHE=yes
655   fi
656 else
657   enableval=yes 
658   LDAP_CACHE=yes
659   
660 fi
661 # Check whether --enable-dns or --disable-dns was given.
662 if test "${enable_dns+set}" = set; then
663   enableval="$enable_dns"
664   test "$enableval" != yes && enableval=no
665   if test "$enableval" != "no" ; then
666     
667         LDAP_DNS=yes 
668   else
669     LDAP_DNS=no
670   fi
671 else
672   enableval=no 
673   LDAP_DNS=no
674   
675 fi
676 # Check whether --enable-referrals or --disable-referrals was given.
677 if test "${enable_referrals+set}" = set; then
678   enableval="$enable_referrals"
679   test "$enableval" != no && enableval=yes
680   if test "$enableval" != "yes" ; then
681     
682         LDAP_REFERRALS=no 
683   else
684     LDAP_REFERRALS=yes
685   fi
686 else
687   enableval=yes 
688   LDAP_REFERRALS=yes
689   
690 fi
691
692 # Check whether --enable-cldap or --disable-cldap was given.
693 if test "${enable_cldap+set}" = set; then
694   enableval="$enable_cldap"
695   test "$enableval" != yes && enableval=no
696   if test "$enableval" != "no" ; then
697     
698         LDAP_CLDAP=yes 
699   else
700     LDAP_CLDAP=no
701   fi
702 else
703   enableval=no 
704   LDAP_CLDAP=no
705   
706 fi
707
708 # Check whether --with-kerberos or --without-kerberos was given.
709 if test "${with_kerberos+set}" = set; then
710   withval="$with_kerberos"
711   
712         opt_kerberos=yes
713 else
714   opt_kerberos=no
715 fi
716
717 # Check whether --with-kerberos-afs or --without-kerberos-afs was given.
718 if test "${with_kerberos_afs+set}" = set; then
719   withval="$with_kerberos_afs"
720   
721         opt_kerberos_afs=yes
722 else
723   opt_kerberos_afs=no
724 fi
725
726 # Check whether --with-threads or --without-threads was given.
727 if test "${with_threads+set}" = set; then
728   withval="$with_threads"
729   
730         opt_threads=yes
731 else
732   opt_threads=no
733 fi
734
735
736
737 # Check whether --enable-ldapd or --disable-ldapd was given.
738 if test "${enable_ldapd+set}" = set; then
739   enableval="$enable_ldapd"
740   test "$enableval" != yes && enableval=no
741   if test "$enableval" != "no" ; then
742     
743         BUILD_LDAPD=yes 
744   else
745     BUILD_LDAPD=no
746   fi
747 else
748   enableval=no 
749   BUILD_LDAPD=no
750   
751 fi
752
753 # Check whether --enable-slapd or --disable-slapd was given.
754 if test "${enable_slapd+set}" = set; then
755   enableval="$enable_slapd"
756   test "$enableval" != no && enableval=yes
757   if test "$enableval" != "yes" ; then
758     
759         BUILD_SLAPD=no 
760   else
761     BUILD_SLAPD=yes
762   fi
763 else
764   enableval=yes 
765   BUILD_SLAPD=yes
766   
767 fi
768 # Check whether --enable-aclgroup or --disable-aclgroup was given.
769 if test "${enable_aclgroup+set}" = set; then
770   enableval="$enable_aclgroup"
771   test "$enableval" != no && enableval=yes
772   if test "$enableval" != "yes" ; then
773     
774         SLAPD_ACLGROUP=no 
775   else
776     SLAPD_ALCGROUP=yes
777   fi
778 else
779   enableval=yes 
780   SLAPD_ALCGROUP=yes
781   
782 fi
783 # Check whether --enable-crypt or --disable-crypt was given.
784 if test "${enable_crypt+set}" = set; then
785   enableval="$enable_crypt"
786   test "$enableval" != no && enableval=yes
787   if test "$enableval" != "yes" ; then
788     
789         SLAPD_CRYPT=no 
790   else
791     SLAPD_CRYPT=yes
792   fi
793 else
794   enableval=yes 
795   SLAPD_CRYPT=yes
796   
797 fi
798 # Check whether --enable-md5 or --disable-md5 was given.
799 if test "${enable_md5+set}" = set; then
800   enableval="$enable_md5"
801   test "$enableval" != no && enableval=yes
802   if test "$enableval" != "yes" ; then
803     
804         SLAPD_MD5=no 
805   else
806     SLAPD_MD5=yes
807   fi
808 else
809   enableval=yes 
810   SLAPD_MD5=yes
811   
812 fi
813 # Check whether --enable-sha1 or --disable-sha1 was given.
814 if test "${enable_sha1+set}" = set; then
815   enableval="$enable_sha1"
816   test "$enableval" != no && enableval=yes
817   if test "$enableval" != "yes" ; then
818     
819         SLAPD_SHA1=no 
820   else
821     SLAPD_SHA1=yes
822   fi
823 else
824   enableval=yes 
825   SLAPD_SHA1=yes
826   
827 fi
828 # Check whether --enable-wrappers or --disable-wrappers was given.
829 if test "${enable_wrappers+set}" = set; then
830   enableval="$enable_wrappers"
831   test "$enableval" != yes && enableval=no
832   if test "$enableval" != "no" ; then
833     
834         SLAPD_TCP_WRAPPERS=yes 
835   else
836     SLAPD_TCP_WRAPPERS=no
837   fi
838 else
839   enableval=no 
840   SLAPD_TCP_WRAPPERS=no
841   
842 fi
843 # Check whether --enable-phonetic or --disable-phonetic was given.
844 if test "${enable_phonetic+set}" = set; then
845   enableval="$enable_phonetic"
846   test "$enableval" != yes && enableval=no
847   if test "$enableval" != "no" ; then
848     
849         SLAPD_PHONETIC=yes 
850   else
851     SLAPD_PHONETIC=no
852   fi
853 else
854   enableval=no 
855   SLAPD_PHONETIC=no
856   
857 fi
858 # Check whether --enable-rlookups or --disable-rlookups was given.
859 if test "${enable_rlookups+set}" = set; then
860   enableval="$enable_rlookups"
861   test "$enableval" != no && enableval=yes
862   if test "$enableval" != "yes" ; then
863     
864         SLAPD_RLOOKUP=no 
865   else
866     SLAPD_RLOOKUP=yes
867   fi
868 else
869   enableval=yes 
870   SLAPD_RLOOKUP=yes
871   
872 fi
873
874 # Check whether --enable-ldbm or --disable-ldbm was given.
875 if test "${enable_ldbm+set}" = set; then
876   enableval="$enable_ldbm"
877   test "$enableval" != no && enableval=yes
878   if test "$enableval" != "yes" ; then
879     
880         SLAPD_LDBM=no 
881   else
882     SLAPD_LDBM=yes
883   fi
884 else
885   enableval=yes 
886   SLAPD_LDBM=yes
887   
888 fi
889 # Check whether --enable-passwd or --disable-passwd was given.
890 if test "${enable_passwd+set}" = set; then
891   enableval="$enable_passwd"
892   test "$enableval" != no && enableval=yes
893   if test "$enableval" != "yes" ; then
894     
895         SLAPD_PASSWD=no 
896   else
897     SLAPD_PASSWD=yes
898   fi
899 else
900   enableval=yes 
901   SLAPD_PASSWD=yes
902   
903 fi
904 # Check whether --enable-shell or --disable-shell was given.
905 if test "${enable_shell+set}" = set; then
906   enableval="$enable_shell"
907   test "$enableval" != no && enableval=yes
908   if test "$enableval" != "yes" ; then
909     
910         SLAPD_SHELL=no 
911   else
912     SLAPD_SHELL=yes
913   fi
914 else
915   enableval=yes 
916   SLAPD_SHELL=yes
917   
918 fi
919
920 # Check whether --with-ndbm or --without-ndbm was given.
921 if test "${with_ndbm+set}" = set; then
922   withval="$with_ndbm"
923   
924         opt_ndbm=yes
925 else
926   opt_ndbm=no
927 fi
928
929 # Check whether --with-gdbm or --without-gdbm was given.
930 if test "${with_gdbm+set}" = set; then
931   withval="$with_gdbm"
932   
933         opt_gdbm=yes
934 else
935   opt_gdbm=no
936 fi
937
938 # Check whether --with-dbhash or --without-dbhash was given.
939 if test "${with_dbhash+set}" = set; then
940   withval="$with_dbhash"
941   
942         opt_dbhash=yes
943 else
944   opt_dbhash=no
945 fi
946
947 # Check whether --with-dbbtree or --without-dbbtree was given.
948 if test "${with_dbbtree+set}" = set; then
949   withval="$with_dbbtree"
950   
951         opt_dbbtree=yes
952 else
953   opt_dbbtree=no
954 fi
955
956 # Check whether --with-db2 or --without-db2 was given.
957 if test "${with_db2+set}" = set; then
958   withval="$with_db2"
959   
960         opt_db2=yes
961 else
962   opt_db2=no
963 fi
964
965
966 # Check whether --enable-slurpd or --disable-slurpd was given.
967 if test "${enable_slurpd+set}" = set; then
968   enableval="$enable_slurpd"
969   test "$enableval" != no && enableval=yes
970   if test "$enableval" != "yes" ; then
971     
972         BUILD_SLURPD=no 
973   else
974     BUILD_SLURPD=yes
975   fi
976 else
977   enableval=yes 
978   BUILD_SLURPD=yes
979   
980 fi
981
982 echo "$ac_t""done" 1>&6
983
984 echo $ac_n "checking LDBM preferences""... $ac_c" 1>&6
985 echo "configure:986: checking LDBM preferences" >&5
986 ldbm_prefer=any
987
988 if test "$opt_ndbm" = yes ; then
989         ldbm_prefer=ndbm
990 fi
991 if test "$opt_gdbm" = yes ; then
992         ldbm_prefer=gdbm
993 fi
994 if test "$opt_dbhash" = yes ; then
995         ldbm_prefer=dbhash
996 fi
997 if test "$opt_dbbtree" = yes ; then
998         ldbm_prefer=dbbtree
999 fi
1000 echo "$ac_t""$ldbm_prefer" 1>&6
1001
1002 if test "$BUILD_SLAPD" != "yes" ; then
1003         BUILD_SLURPD="no"
1004         SLAPD_LDBM="no"
1005         SLAPD_PASSWD="no"
1006         SLAPD_SHELL="no"
1007         ldbm_prefer="none"
1008 fi
1009
1010 ## general LDAP arguments
1011 LDAP_DEFS=
1012 LDAP_LIBS=
1013 LDBM_DEFS=
1014 LDBM_LIBS=
1015 LUTIL_DEFS=
1016 LUTIL_LIBS=
1017
1018 if test "$LDAP_DEBUG" = "yes" ; then
1019         LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG"
1020 fi
1021 if test "$LDAP_SYSLOG" = "yes" ; then
1022         LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG"
1023 fi
1024 if test "$LDAP_DNS" = "yes" ; then
1025         LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS"
1026 fi
1027 if test "$LDAP_REFERRALS" = "yes" ; then
1028         LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS"
1029 fi
1030 if test "$LDAP_CACHE" = "no" ; then
1031         cat >> confdefs.h <<\EOF
1032 #define LDAP_NOCACHE 1
1033 EOF
1034
1035         LDAP_DEFS="$LDAP_DEFS -DNO_CACHE"
1036 fi
1037 if test "$LDAP_CLDAP" = "yes" ; then
1038         cat >> confdefs.h <<\EOF
1039 #define LDAP_CONNECTIONLESS 1
1040 EOF
1041
1042         LDAP_DEFS="$LDAP_DEFS -DCLDAP"
1043 fi
1044
1045 ## ldapd arguments
1046 LDAPD_DEFS=
1047 LDAPD_LIBS=
1048
1049 ## slapd arguments
1050 SLAPD_DEFS=
1051 SLAPD_LIBS=
1052 if test "$SLAPD_PHONETIC" = "yes" ; then
1053         cat >> confdefs.h <<\EOF
1054 #define SLAPD_PHONETIC 1
1055 EOF
1056
1057         SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX"
1058 fi
1059
1060 if test "$SLAPD_MD5" = "yes" ; then
1061         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5"
1062 fi
1063
1064 if test "$SLAPD_SHA1" = "yes" ; then
1065         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1"
1066 fi
1067
1068 BUILD_LDBM=no
1069 if test "$SLAPD_LDBM" = "yes" ; then
1070         BUILD_LDBM=yes
1071         LDBM_DEFS="$LDBM_DEFS -DLDAP_LDBM"
1072 fi
1073 if test "$SLAPD_PASSWD" = "yes" ; then
1074         SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD"
1075 fi
1076 if test "$SLAPD_SHELL" = "yes" ; then
1077         SLAPD_DEFS="$SLAPD_DEFS -DLDAP_SHELL"
1078 fi
1079
1080 SLURPD_DEFS=
1081 SLURPD_LIBS=
1082
1083
1084 # Extract the first word of "gcc", so it can be a program name with args.
1085 set dummy gcc; ac_word=$2
1086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1087 echo "configure:1088: checking for $ac_word" >&5
1088 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1089   echo $ac_n "(cached) $ac_c" 1>&6
1090 else
1091   if test -n "$CC"; then
1092   ac_cv_prog_CC="$CC" # Let the user override the test.
1093 else
1094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1095   for ac_dir in $PATH; do
1096     test -z "$ac_dir" && ac_dir=.
1097     if test -f $ac_dir/$ac_word; then
1098       ac_cv_prog_CC="gcc"
1099       break
1100     fi
1101   done
1102   IFS="$ac_save_ifs"
1103 fi
1104 fi
1105 CC="$ac_cv_prog_CC"
1106 if test -n "$CC"; then
1107   echo "$ac_t""$CC" 1>&6
1108 else
1109   echo "$ac_t""no" 1>&6
1110 fi
1111
1112 if test -z "$CC"; then
1113   # Extract the first word of "cc", so it can be a program name with args.
1114 set dummy cc; ac_word=$2
1115 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1116 echo "configure:1117: checking for $ac_word" >&5
1117 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1118   echo $ac_n "(cached) $ac_c" 1>&6
1119 else
1120   if test -n "$CC"; then
1121   ac_cv_prog_CC="$CC" # Let the user override the test.
1122 else
1123   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1124   ac_prog_rejected=no
1125   for ac_dir in $PATH; do
1126     test -z "$ac_dir" && ac_dir=.
1127     if test -f $ac_dir/$ac_word; then
1128       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1129         ac_prog_rejected=yes
1130         continue
1131       fi
1132       ac_cv_prog_CC="cc"
1133       break
1134     fi
1135   done
1136   IFS="$ac_save_ifs"
1137 if test $ac_prog_rejected = yes; then
1138   # We found a bogon in the path, so make sure we never use it.
1139   set dummy $ac_cv_prog_CC
1140   shift
1141   if test $# -gt 0; then
1142     # We chose a different compiler from the bogus one.
1143     # However, it has the same basename, so the bogon will be chosen
1144     # first if we set CC to just the basename; use the full file name.
1145     shift
1146     set dummy "$ac_dir/$ac_word" "$@"
1147     shift
1148     ac_cv_prog_CC="$@"
1149   fi
1150 fi
1151 fi
1152 fi
1153 CC="$ac_cv_prog_CC"
1154 if test -n "$CC"; then
1155   echo "$ac_t""$CC" 1>&6
1156 else
1157   echo "$ac_t""no" 1>&6
1158 fi
1159
1160   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1161 fi
1162
1163 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1164 echo "configure:1165: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1165
1166 ac_ext=c
1167 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1168 ac_cpp='$CPP $CPPFLAGS'
1169 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1170 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1171 cross_compiling=$ac_cv_prog_cc_cross
1172
1173 cat > conftest.$ac_ext <<EOF
1174 #line 1175 "configure"
1175 #include "confdefs.h"
1176 main(){return(0);}
1177 EOF
1178 if { (eval echo configure:1179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1179   ac_cv_prog_cc_works=yes
1180   # If we can't run a trivial program, we are probably using a cross compiler.
1181   if (./conftest; exit) 2>/dev/null; then
1182     ac_cv_prog_cc_cross=no
1183   else
1184     ac_cv_prog_cc_cross=yes
1185   fi
1186 else
1187   echo "configure: failed program was:" >&5
1188   cat conftest.$ac_ext >&5
1189   ac_cv_prog_cc_works=no
1190 fi
1191 rm -fr conftest*
1192
1193 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1194 if test $ac_cv_prog_cc_works = no; then
1195   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1196 fi
1197 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1198 echo "configure:1199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1199 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1200 cross_compiling=$ac_cv_prog_cc_cross
1201
1202 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1203 echo "configure:1204: checking whether we are using GNU C" >&5
1204 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1205   echo $ac_n "(cached) $ac_c" 1>&6
1206 else
1207   cat > conftest.c <<EOF
1208 #ifdef __GNUC__
1209   yes;
1210 #endif
1211 EOF
1212 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1213   ac_cv_prog_gcc=yes
1214 else
1215   ac_cv_prog_gcc=no
1216 fi
1217 fi
1218
1219 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1220
1221 if test $ac_cv_prog_gcc = yes; then
1222   GCC=yes
1223   ac_test_CFLAGS="${CFLAGS+set}"
1224   ac_save_CFLAGS="$CFLAGS"
1225   CFLAGS=
1226   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1227 echo "configure:1228: checking whether ${CC-cc} accepts -g" >&5
1228 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1229   echo $ac_n "(cached) $ac_c" 1>&6
1230 else
1231   echo 'void f(){}' > conftest.c
1232 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1233   ac_cv_prog_cc_g=yes
1234 else
1235   ac_cv_prog_cc_g=no
1236 fi
1237 rm -f conftest*
1238
1239 fi
1240
1241 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1242   if test "$ac_test_CFLAGS" = set; then
1243     CFLAGS="$ac_save_CFLAGS"
1244   elif test $ac_cv_prog_cc_g = yes; then
1245     CFLAGS="-g -O2"
1246   else
1247     CFLAGS="-O2"
1248   fi
1249 else
1250   GCC=
1251   test "${CFLAGS+set}" = set || CFLAGS="-g"
1252 fi
1253
1254 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1255 echo "configure:1256: checking how to run the C preprocessor" >&5
1256 # On Suns, sometimes $CPP names a directory.
1257 if test -n "$CPP" && test -d "$CPP"; then
1258   CPP=
1259 fi
1260 if test -z "$CPP"; then
1261 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1262   echo $ac_n "(cached) $ac_c" 1>&6
1263 else
1264     # This must be in double quotes, not single quotes, because CPP may get
1265   # substituted into the Makefile and "${CC-cc}" will confuse make.
1266   CPP="${CC-cc} -E"
1267   # On the NeXT, cc -E runs the code through the compiler's parser,
1268   # not just through cpp.
1269   cat > conftest.$ac_ext <<EOF
1270 #line 1271 "configure"
1271 #include "confdefs.h"
1272 #include <assert.h>
1273 Syntax Error
1274 EOF
1275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1276 { (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1277 ac_err=`grep -v '^ *+' conftest.out`
1278 if test -z "$ac_err"; then
1279   :
1280 else
1281   echo "$ac_err" >&5
1282   echo "configure: failed program was:" >&5
1283   cat conftest.$ac_ext >&5
1284   rm -rf conftest*
1285   CPP="${CC-cc} -E -traditional-cpp"
1286   cat > conftest.$ac_ext <<EOF
1287 #line 1288 "configure"
1288 #include "confdefs.h"
1289 #include <assert.h>
1290 Syntax Error
1291 EOF
1292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1293 { (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1294 ac_err=`grep -v '^ *+' conftest.out`
1295 if test -z "$ac_err"; then
1296   :
1297 else
1298   echo "$ac_err" >&5
1299   echo "configure: failed program was:" >&5
1300   cat conftest.$ac_ext >&5
1301   rm -rf conftest*
1302   CPP=/lib/cpp
1303 fi
1304 rm -f conftest*
1305 fi
1306 rm -f conftest*
1307   ac_cv_prog_CPP="$CPP"
1308 fi
1309   CPP="$ac_cv_prog_CPP"
1310 else
1311   ac_cv_prog_CPP="$CPP"
1312 fi
1313 echo "$ac_t""$CPP" 1>&6
1314
1315 if test $ac_cv_prog_gcc = yes; then
1316     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1317 echo "configure:1318: checking whether ${CC-cc} needs -traditional" >&5
1318 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1319   echo $ac_n "(cached) $ac_c" 1>&6
1320 else
1321     ac_pattern="Autoconf.*'x'"
1322   cat > conftest.$ac_ext <<EOF
1323 #line 1324 "configure"
1324 #include "confdefs.h"
1325 #include <sgtty.h>
1326 Autoconf TIOCGETP
1327 EOF
1328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1329   egrep "$ac_pattern" >/dev/null 2>&1; then
1330   rm -rf conftest*
1331   ac_cv_prog_gcc_traditional=yes
1332 else
1333   rm -rf conftest*
1334   ac_cv_prog_gcc_traditional=no
1335 fi
1336 rm -f conftest*
1337
1338
1339   if test $ac_cv_prog_gcc_traditional = no; then
1340     cat > conftest.$ac_ext <<EOF
1341 #line 1342 "configure"
1342 #include "confdefs.h"
1343 #include <termio.h>
1344 Autoconf TCGETA
1345 EOF
1346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1347   egrep "$ac_pattern" >/dev/null 2>&1; then
1348   rm -rf conftest*
1349   ac_cv_prog_gcc_traditional=yes
1350 fi
1351 rm -f conftest*
1352
1353   fi
1354 fi
1355
1356 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1357   if test $ac_cv_prog_gcc_traditional = yes; then
1358     CC="$CC -traditional"
1359   fi
1360 fi
1361
1362
1363 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1364 echo "configure:1365: checking whether ln -s works" >&5
1365 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1366   echo $ac_n "(cached) $ac_c" 1>&6
1367 else
1368   rm -f conftestdata
1369 if ln -s X conftestdata 2>/dev/null
1370 then
1371   rm -f conftestdata
1372   ac_cv_prog_LN_S="ln -s"
1373 else
1374   ac_cv_prog_LN_S=ln
1375 fi
1376 fi
1377 LN_S="$ac_cv_prog_LN_S"
1378 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1379   echo "$ac_t""yes" 1>&6
1380 else
1381   echo "$ac_t""no" 1>&6
1382 fi
1383
1384 # Find a good install program.  We prefer a C program (faster),
1385 # so one script is as good as another.  But avoid the broken or
1386 # incompatible versions:
1387 # SysV /etc/install, /usr/sbin/install
1388 # SunOS /usr/etc/install
1389 # IRIX /sbin/install
1390 # AIX /bin/install
1391 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1392 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1393 # ./install, which can be erroneously created by make from ./install.sh.
1394 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1395 echo "configure:1396: checking for a BSD compatible install" >&5
1396 if test -z "$INSTALL"; then
1397 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1398   echo $ac_n "(cached) $ac_c" 1>&6
1399 else
1400     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1401   for ac_dir in $PATH; do
1402     # Account for people who put trailing slashes in PATH elements.
1403     case "$ac_dir/" in
1404     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1405     *)
1406       # OSF1 and SCO ODT 3.0 have their own names for install.
1407       for ac_prog in ginstall installbsd scoinst install; do
1408         if test -f $ac_dir/$ac_prog; then
1409           if test $ac_prog = install &&
1410             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1411             # AIX install.  It has an incompatible calling convention.
1412             # OSF/1 installbsd also uses dspmsg, but is usable.
1413             :
1414           else
1415             ac_cv_path_install="$ac_dir/$ac_prog -c"
1416             break 2
1417           fi
1418         fi
1419       done
1420       ;;
1421     esac
1422   done
1423   IFS="$ac_save_IFS"
1424
1425 fi
1426   if test "${ac_cv_path_install+set}" = set; then
1427     INSTALL="$ac_cv_path_install"
1428   else
1429     # As a last resort, use the slow shell script.  We don't cache a
1430     # path for INSTALL within a source directory, because that will
1431     # break other packages using the cache if that directory is
1432     # removed, or if the path is relative.
1433     INSTALL="$ac_install_sh"
1434   fi
1435 fi
1436 echo "$ac_t""$INSTALL" 1>&6
1437
1438 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1439 # It thinks the first close brace ends the variable substitution.
1440 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1441
1442 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1443
1444 # Extract the first word of "ranlib", so it can be a program name with args.
1445 set dummy ranlib; ac_word=$2
1446 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1447 echo "configure:1448: checking for $ac_word" >&5
1448 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1449   echo $ac_n "(cached) $ac_c" 1>&6
1450 else
1451   if test -n "$RANLIB"; then
1452   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1453 else
1454   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1455   for ac_dir in $PATH; do
1456     test -z "$ac_dir" && ac_dir=.
1457     if test -f $ac_dir/$ac_word; then
1458       ac_cv_prog_RANLIB="ranlib"
1459       break
1460     fi
1461   done
1462   IFS="$ac_save_ifs"
1463   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1464 fi
1465 fi
1466 RANLIB="$ac_cv_prog_RANLIB"
1467 if test -n "$RANLIB"; then
1468   echo "$ac_t""$RANLIB" 1>&6
1469 else
1470   echo "$ac_t""no" 1>&6
1471 fi
1472
1473 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1474 echo "configure:1475: checking whether ${MAKE-make} sets \${MAKE}" >&5
1475 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1476 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1477   echo $ac_n "(cached) $ac_c" 1>&6
1478 else
1479   cat > conftestmake <<\EOF
1480 all:
1481         @echo 'ac_maketemp="${MAKE}"'
1482 EOF
1483 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1484 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1485 if test -n "$ac_maketemp"; then
1486   eval ac_cv_prog_make_${ac_make}_set=yes
1487 else
1488   eval ac_cv_prog_make_${ac_make}_set=no
1489 fi
1490 rm -f conftestmake
1491 fi
1492 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1493   echo "$ac_t""yes" 1>&6
1494   SET_MAKE=
1495 else
1496   echo "$ac_t""no" 1>&6
1497   SET_MAKE="MAKE=${MAKE-make}"
1498 fi
1499
1500
1501 # Extract the first word of "sendmail", so it can be a program name with args.
1502 set dummy sendmail; ac_word=$2
1503 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1504 echo "configure:1505: checking for $ac_word" >&5
1505 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
1506   echo $ac_n "(cached) $ac_c" 1>&6
1507 else
1508   case "$SENDMAIL" in
1509   /*)
1510   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
1511   ;;
1512   *)
1513   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1514   for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do
1515     test -z "$ac_dir" && ac_dir=.
1516     if test -f $ac_dir/$ac_word; then
1517       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
1518       break
1519     fi
1520   done
1521   IFS="$ac_save_ifs"
1522   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
1523   ;;
1524 esac
1525 fi
1526 SENDMAIL="$ac_cv_path_SENDMAIL"
1527 if test -n "$SENDMAIL"; then
1528   echo "$ac_t""$SENDMAIL" 1>&6
1529 else
1530   echo "$ac_t""no" 1>&6
1531 fi
1532
1533 # Extract the first word of "vi", so it can be a program name with args.
1534 set dummy vi; ac_word=$2
1535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1536 echo "configure:1537: checking for $ac_word" >&5
1537 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
1538   echo $ac_n "(cached) $ac_c" 1>&6
1539 else
1540   case "$EDITOR" in
1541   /*)
1542   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
1543   ;;
1544   *)
1545   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1546   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1547     test -z "$ac_dir" && ac_dir=.
1548     if test -f $ac_dir/$ac_word; then
1549       ac_cv_path_EDITOR="$ac_dir/$ac_word"
1550       break
1551     fi
1552   done
1553   IFS="$ac_save_ifs"
1554   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
1555   ;;
1556 esac
1557 fi
1558 EDITOR="$ac_cv_path_EDITOR"
1559 if test -n "$EDITOR"; then
1560   echo "$ac_t""$EDITOR" 1>&6
1561 else
1562   echo "$ac_t""no" 1>&6
1563 fi
1564
1565 # Extract the first word of "finger", so it can be a program name with args.
1566 set dummy finger; ac_word=$2
1567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1568 echo "configure:1569: checking for $ac_word" >&5
1569 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
1570   echo $ac_n "(cached) $ac_c" 1>&6
1571 else
1572   case "$FINGER" in
1573   /*)
1574   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
1575   ;;
1576   *)
1577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1578   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1579     test -z "$ac_dir" && ac_dir=.
1580     if test -f $ac_dir/$ac_word; then
1581       ac_cv_path_FINGER="$ac_dir/$ac_word"
1582       break
1583     fi
1584   done
1585   IFS="$ac_save_ifs"
1586   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
1587   ;;
1588 esac
1589 fi
1590 FINGER="$ac_cv_path_FINGER"
1591 if test -n "$FINGER"; then
1592   echo "$ac_t""$FINGER" 1>&6
1593 else
1594   echo "$ac_t""no" 1>&6
1595 fi
1596
1597
1598
1599 LTHREAD_LIBS=
1600 if test "$opt_thread" = "no" ; then
1601         LTHREAD_DEFS="-DNO_THREADS"
1602         BUILD_SLURPD=no
1603 else
1604         for ac_hdr in pthread.h sched.h
1605 do
1606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1608 echo "configure:1609: checking for $ac_hdr" >&5
1609 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1610   echo $ac_n "(cached) $ac_c" 1>&6
1611 else
1612   cat > conftest.$ac_ext <<EOF
1613 #line 1614 "configure"
1614 #include "confdefs.h"
1615 #include <$ac_hdr>
1616 EOF
1617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1618 { (eval echo configure:1619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1619 ac_err=`grep -v '^ *+' conftest.out`
1620 if test -z "$ac_err"; then
1621   rm -rf conftest*
1622   eval "ac_cv_header_$ac_safe=yes"
1623 else
1624   echo "$ac_err" >&5
1625   echo "configure: failed program was:" >&5
1626   cat conftest.$ac_ext >&5
1627   rm -rf conftest*
1628   eval "ac_cv_header_$ac_safe=no"
1629 fi
1630 rm -f conftest*
1631 fi
1632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1633   echo "$ac_t""yes" 1>&6
1634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1635   cat >> confdefs.h <<EOF
1636 #define $ac_tr_hdr 1
1637 EOF
1638  
1639 else
1640   echo "$ac_t""no" 1>&6
1641 fi
1642 done
1643
1644
1645         if test "$ac_cv_header_pthread_h" = yes ; then
1646                                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
1647 echo "configure:1648: checking POSIX thread version" >&5
1648 if eval "test \"`echo '$''{'cf_cv_pthread_version'+set}'`\" = set"; then
1649   echo $ac_n "(cached) $ac_c" 1>&6
1650 else
1651   
1652                         cat > conftest.$ac_ext <<EOF
1653 #line 1654 "configure"
1654 #include "confdefs.h"
1655
1656 #include <pthread.h>
1657 /* this check could be improved */
1658 #ifdef PTHREAD_ONCE_INIT
1659         final
1660 #endif
1661                         
1662 EOF
1663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1664   egrep "final" >/dev/null 2>&1; then
1665   rm -rf conftest*
1666   pthread_final=yes
1667 else
1668   rm -rf conftest*
1669   pthread_final=no
1670 fi
1671 rm -f conftest*
1672
1673
1674                         cat > conftest.$ac_ext <<EOF
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677
1678 #include <pthread.h>
1679 /* this check could be improved */
1680 #ifdef pthread_once_init
1681         draft4
1682 #endif
1683                         
1684 EOF
1685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1686   egrep "draft4" >/dev/null 2>&1; then
1687   rm -rf conftest*
1688   pthread_draft4=yes
1689 else
1690   rm -rf conftest*
1691   pthread_draft4=no
1692 fi
1693 rm -f conftest*
1694
1695
1696                         if test $pthread_final = yes -a $pthread_draft4 = no; then
1697                                 cf_cv_pthread_version=final
1698                         elif test $pthread_final = no -a $pthread_draft4 = yes; then
1699                                 cf_cv_pthread_version=draft4
1700                         else
1701                                 cf_cv_pthread_version=unknown
1702                         fi
1703                 
1704 fi
1705
1706 echo "$ac_t""$cf_cv_pthread_version" 1>&6
1707                 
1708                 if test $cf_cv_pthread_version = final ; then
1709                         LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS"
1710                 elif test $cf_cv_pthread_version = draft4 ; then
1711                         LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS"
1712                 else
1713                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
1714                 fi
1715
1716                 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
1717 echo "configure:1718: checking for LinuxThreads" >&5
1718 if eval "test \"`echo '$''{'cf_cv_linux_threads'+set}'`\" = set"; then
1719   echo $ac_n "(cached) $ac_c" 1>&6
1720 else
1721   
1722                         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
1723                         if test "$res" -gt 0 ; then
1724                                 cf_cv_linux_threads=yes
1725                         else
1726                                 cf_cv_linux_threads=no
1727                         fi
1728                 
1729 fi
1730
1731 echo "$ac_t""$cf_cv_linux_threads" 1>&6
1732
1733                 if test $cf_cv_linux_threads = yes ; then
1734                         LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS"
1735                 fi
1736
1737                 
1738                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
1739 echo "configure:1740: checking for pthread_create" >&5
1740 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
1741   echo $ac_n "(cached) $ac_c" 1>&6
1742 else
1743   cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746 /* System header to define __stub macros and hopefully few prototypes,
1747     which can conflict with char pthread_create(); below.  */
1748 #include <assert.h>
1749 /* Override any gcc2 internal prototype to avoid an error.  */
1750 /* We use char because int might match the return type of a gcc2
1751     builtin and then its argument prototype would still apply.  */
1752 char pthread_create();
1753
1754 int main() {
1755
1756 /* The GNU C library defines this for functions which it implements
1757     to always fail with ENOSYS.  Some functions are actually named
1758     something starting with __ and the normal name is an alias.  */
1759 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
1760 choke me
1761 #else
1762 pthread_create();
1763 #endif
1764
1765 ; return 0; }
1766 EOF
1767 if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1768   rm -rf conftest*
1769   eval "ac_cv_func_pthread_create=yes"
1770 else
1771   echo "configure: failed program was:" >&5
1772   cat conftest.$ac_ext >&5
1773   rm -rf conftest*
1774   eval "ac_cv_func_pthread_create=no"
1775 fi
1776 rm -f conftest*
1777 fi
1778
1779 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
1780   echo "$ac_t""yes" 1>&6
1781   pthread_link=yes
1782 else
1783   echo "$ac_t""no" 1>&6
1784 pthread_link=no
1785 fi
1786
1787
1788                 if test $pthread_link = no ; then
1789                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
1790 echo "configure:1791: checking for pthread_create with -pthread" >&5
1791 if eval "test \"`echo '$''{'cf_cv_pthread_flag'+set}'`\" = set"; then
1792   echo $ac_n "(cached) $ac_c" 1>&6
1793 else
1794   
1795                                                                 save_LIBS="$LIBS"
1796                                 LIBS="-pthread $LIBS"
1797                                 cat > conftest.$ac_ext <<EOF
1798 #line 1799 "configure"
1799 #include "confdefs.h"
1800 #include <pthread.h>
1801 int main() {
1802
1803                                         pthread_create((pthread_t*) 0,
1804                                                 (pthread_attr_t*) 0, 0, 0);
1805                                         
1806 ; return 0; }
1807 EOF
1808 if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1809   rm -rf conftest*
1810   cf_cv_pthread_flag=yes
1811 else
1812   echo "configure: failed program was:" >&5
1813   cat conftest.$ac_ext >&5
1814   rm -rf conftest*
1815   cf_cv_pthread_flag=no
1816 fi
1817 rm -f conftest*
1818                                                                 LIBS="$save_LIBS"
1819                         
1820 fi
1821
1822 echo "$ac_t""$cf_cv_pthread_flag" 1>&6
1823
1824                         if test $cf_cv_pthread_flag = yes ; then
1825                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
1826                                 pthread_link=yes
1827                         fi
1828                 fi
1829
1830                 if test $pthread_link = no ; then
1831                                                 save_LIBS="$LIBS"
1832                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
1833 echo "configure:1834: checking for pthread_create in -lpthread" >&5
1834 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
1835 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1836   echo $ac_n "(cached) $ac_c" 1>&6
1837 else
1838   ac_save_LIBS="$LIBS"
1839 LIBS="-lpthread  $LIBS"
1840 cat > conftest.$ac_ext <<EOF
1841 #line 1842 "configure"
1842 #include "confdefs.h"
1843 /* Override any gcc2 internal prototype to avoid an error.  */
1844 /* We use char because int might match the return type of a gcc2
1845     builtin and then its argument prototype would still apply.  */
1846 char pthread_create();
1847
1848 int main() {
1849 pthread_create()
1850 ; return 0; }
1851 EOF
1852 if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1853   rm -rf conftest*
1854   eval "ac_cv_lib_$ac_lib_var=yes"
1855 else
1856   echo "configure: failed program was:" >&5
1857   cat conftest.$ac_ext >&5
1858   rm -rf conftest*
1859   eval "ac_cv_lib_$ac_lib_var=no"
1860 fi
1861 rm -f conftest*
1862 LIBS="$ac_save_LIBS"
1863
1864 fi
1865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1866   echo "$ac_t""yes" 1>&6
1867   
1868                                 pthread_link=yes
1869                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
1870 else
1871   echo "$ac_t""no" 1>&6
1872 fi
1873
1874                         LIBS="$save_LIBS"
1875                 fi
1876
1877                 if test $pthread_link = no ; then
1878                                                 save_LIBS="$LIBS"
1879                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
1880 echo "configure:1881: checking for pthread_create in -lc_r" >&5
1881 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
1882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1883   echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885   ac_save_LIBS="$LIBS"
1886 LIBS="-lc_r  $LIBS"
1887 cat > conftest.$ac_ext <<EOF
1888 #line 1889 "configure"
1889 #include "confdefs.h"
1890 /* Override any gcc2 internal prototype to avoid an error.  */
1891 /* We use char because int might match the return type of a gcc2
1892     builtin and then its argument prototype would still apply.  */
1893 char pthread_create();
1894
1895 int main() {
1896 pthread_create()
1897 ; return 0; }
1898 EOF
1899 if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1900   rm -rf conftest*
1901   eval "ac_cv_lib_$ac_lib_var=yes"
1902 else
1903   echo "configure: failed program was:" >&5
1904   cat conftest.$ac_ext >&5
1905   rm -rf conftest*
1906   eval "ac_cv_lib_$ac_lib_var=no"
1907 fi
1908 rm -f conftest*
1909 LIBS="$ac_save_LIBS"
1910
1911 fi
1912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1913   echo "$ac_t""yes" 1>&6
1914   
1915                                 pthread_link=yes
1916                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
1917 else
1918   echo "$ac_t""no" 1>&6
1919 fi
1920
1921                         LIBS="$save_LIBS"
1922                 fi
1923
1924                 if test $pthread_link = no ; then
1925                                                 save_LIBS="$LIBS"
1926                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
1927 echo "configure:1928: checking for pthread_create in -lpthread" >&5
1928 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
1929 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1930   echo $ac_n "(cached) $ac_c" 1>&6
1931 else
1932   ac_save_LIBS="$LIBS"
1933 LIBS="-lpthread -lmach -lexc -lc $LIBS"
1934 cat > conftest.$ac_ext <<EOF
1935 #line 1936 "configure"
1936 #include "confdefs.h"
1937 /* Override any gcc2 internal prototype to avoid an error.  */
1938 /* We use char because int might match the return type of a gcc2
1939     builtin and then its argument prototype would still apply.  */
1940 char pthread_create();
1941
1942 int main() {
1943 pthread_create()
1944 ; return 0; }
1945 EOF
1946 if { (eval echo configure:1947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1947   rm -rf conftest*
1948   eval "ac_cv_lib_$ac_lib_var=yes"
1949 else
1950   echo "configure: failed program was:" >&5
1951   cat conftest.$ac_ext >&5
1952   rm -rf conftest*
1953   eval "ac_cv_lib_$ac_lib_var=no"
1954 fi
1955 rm -f conftest*
1956 LIBS="$ac_save_LIBS"
1957
1958 fi
1959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1960   echo "$ac_t""yes" 1>&6
1961   
1962                                 pthread_link=yes
1963                                 LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS"
1964                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"
1965 else
1966   echo "$ac_t""no" 1>&6
1967 fi
1968
1969                         LIBS="$save_LIBS"
1970                 fi
1971
1972         else
1973                 LTHREAD_DEFS="-DNO_THREADS"
1974         fi
1975 fi
1976
1977 # check for strtok_r (and presumely other reentrant functions)
1978 save_LIBS="$LIBS"
1979 LIBS="$save_LIBS $LTHREAD_LIBS"
1980 echo $ac_n "checking for strtok_r in -lpthread""... $ac_c" 1>&6
1981 echo "configure:1982: checking for strtok_r in -lpthread" >&5
1982 ac_lib_var=`echo pthread'_'strtok_r | sed 'y%./+-%__p_%'`
1983 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1984   echo $ac_n "(cached) $ac_c" 1>&6
1985 else
1986   ac_save_LIBS="$LIBS"
1987 LIBS="-lpthread  $LIBS"
1988 cat > conftest.$ac_ext <<EOF
1989 #line 1990 "configure"
1990 #include "confdefs.h"
1991 /* Override any gcc2 internal prototype to avoid an error.  */
1992 /* We use char because int might match the return type of a gcc2
1993     builtin and then its argument prototype would still apply.  */
1994 char strtok_r();
1995
1996 int main() {
1997 strtok_r()
1998 ; return 0; }
1999 EOF
2000 if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2001   rm -rf conftest*
2002   eval "ac_cv_lib_$ac_lib_var=yes"
2003 else
2004   echo "configure: failed program was:" >&5
2005   cat conftest.$ac_ext >&5
2006   rm -rf conftest*
2007   eval "ac_cv_lib_$ac_lib_var=no"
2008 fi
2009 rm -f conftest*
2010 LIBS="$ac_save_LIBS"
2011
2012 fi
2013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2014   echo "$ac_t""yes" 1>&6
2015     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2016     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2017   cat >> confdefs.h <<EOF
2018 #define $ac_tr_lib 1
2019 EOF
2020
2021   LIBS="-lpthread $LIBS"
2022
2023 else
2024   echo "$ac_t""no" 1>&6
2025 fi
2026
2027
2028 if test $ac_cv_lib_pthread_strtok_r = no ; then
2029         LIBS="$save_LIBS $LTHREAD_LIBS"
2030         echo $ac_n "checking for strtok_r in -lc_r""... $ac_c" 1>&6
2031 echo "configure:2032: checking for strtok_r in -lc_r" >&5
2032 ac_lib_var=`echo c_r'_'strtok_r | sed 'y%./+-%__p_%'`
2033 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2034   echo $ac_n "(cached) $ac_c" 1>&6
2035 else
2036   ac_save_LIBS="$LIBS"
2037 LIBS="-lc_r  $LIBS"
2038 cat > conftest.$ac_ext <<EOF
2039 #line 2040 "configure"
2040 #include "confdefs.h"
2041 /* Override any gcc2 internal prototype to avoid an error.  */
2042 /* We use char because int might match the return type of a gcc2
2043     builtin and then its argument prototype would still apply.  */
2044 char strtok_r();
2045
2046 int main() {
2047 strtok_r()
2048 ; return 0; }
2049 EOF
2050 if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2051   rm -rf conftest*
2052   eval "ac_cv_lib_$ac_lib_var=yes"
2053 else
2054   echo "configure: failed program was:" >&5
2055   cat conftest.$ac_ext >&5
2056   rm -rf conftest*
2057   eval "ac_cv_lib_$ac_lib_var=no"
2058 fi
2059 rm -f conftest*
2060 LIBS="$ac_save_LIBS"
2061
2062 fi
2063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2064   echo "$ac_t""yes" 1>&6
2065     ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2066     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2067   cat >> confdefs.h <<EOF
2068 #define $ac_tr_lib 1
2069 EOF
2070
2071   LIBS="-lc_r $LIBS"
2072
2073 else
2074   echo "$ac_t""no" 1>&6
2075 fi
2076
2077         for ac_func in strtok_r sched_yield
2078 do
2079 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2080 echo "configure:2081: checking for $ac_func" >&5
2081 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2082   echo $ac_n "(cached) $ac_c" 1>&6
2083 else
2084   cat > conftest.$ac_ext <<EOF
2085 #line 2086 "configure"
2086 #include "confdefs.h"
2087 /* System header to define __stub macros and hopefully few prototypes,
2088     which can conflict with char $ac_func(); below.  */
2089 #include <assert.h>
2090 /* Override any gcc2 internal prototype to avoid an error.  */
2091 /* We use char because int might match the return type of a gcc2
2092     builtin and then its argument prototype would still apply.  */
2093 char $ac_func();
2094
2095 int main() {
2096
2097 /* The GNU C library defines this for functions which it implements
2098     to always fail with ENOSYS.  Some functions are actually named
2099     something starting with __ and the normal name is an alias.  */
2100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2101 choke me
2102 #else
2103 $ac_func();
2104 #endif
2105
2106 ; return 0; }
2107 EOF
2108 if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2109   rm -rf conftest*
2110   eval "ac_cv_func_$ac_func=yes"
2111 else
2112   echo "configure: failed program was:" >&5
2113   cat conftest.$ac_ext >&5
2114   rm -rf conftest*
2115   eval "ac_cv_func_$ac_func=no"
2116 fi
2117 rm -f conftest*
2118 fi
2119
2120 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2121   echo "$ac_t""yes" 1>&6
2122     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2123   cat >> confdefs.h <<EOF
2124 #define $ac_tr_func 1
2125 EOF
2126  
2127 else
2128   echo "$ac_t""no" 1>&6
2129 fi
2130 done
2131
2132         if test $ac_cv_lib_c_r_strtok_r = yes ; then
2133                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
2134         fi
2135 else
2136         for ac_func in strtok_r sched_yield
2137 do
2138 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2139 echo "configure:2140: checking for $ac_func" >&5
2140 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2141   echo $ac_n "(cached) $ac_c" 1>&6
2142 else
2143   cat > conftest.$ac_ext <<EOF
2144 #line 2145 "configure"
2145 #include "confdefs.h"
2146 /* System header to define __stub macros and hopefully few prototypes,
2147     which can conflict with char $ac_func(); below.  */
2148 #include <assert.h>
2149 /* Override any gcc2 internal prototype to avoid an error.  */
2150 /* We use char because int might match the return type of a gcc2
2151     builtin and then its argument prototype would still apply.  */
2152 char $ac_func();
2153
2154 int main() {
2155
2156 /* The GNU C library defines this for functions which it implements
2157     to always fail with ENOSYS.  Some functions are actually named
2158     something starting with __ and the normal name is an alias.  */
2159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2160 choke me
2161 #else
2162 $ac_func();
2163 #endif
2164
2165 ; return 0; }
2166 EOF
2167 if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2168   rm -rf conftest*
2169   eval "ac_cv_func_$ac_func=yes"
2170 else
2171   echo "configure: failed program was:" >&5
2172   cat conftest.$ac_ext >&5
2173   rm -rf conftest*
2174   eval "ac_cv_func_$ac_func=no"
2175 fi
2176 rm -f conftest*
2177 fi
2178
2179 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2180   echo "$ac_t""yes" 1>&6
2181     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2182   cat >> confdefs.h <<EOF
2183 #define $ac_tr_func 1
2184 EOF
2185  
2186 else
2187   echo "$ac_t""no" 1>&6
2188 fi
2189 done
2190
2191 fi
2192
2193 LIBS="$save_LIBS"
2194
2195
2196 ldbm_use="none"
2197 if test "$SLAPD_LDBM" = "yes" ; then
2198         if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \
2199                         -o $ldbm_prefer = dbhash ; then
2200                 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
2201 echo "configure:2202: checking for dbopen" >&5
2202 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
2203   echo $ac_n "(cached) $ac_c" 1>&6
2204 else
2205   cat > conftest.$ac_ext <<EOF
2206 #line 2207 "configure"
2207 #include "confdefs.h"
2208 /* System header to define __stub macros and hopefully few prototypes,
2209     which can conflict with char dbopen(); below.  */
2210 #include <assert.h>
2211 /* Override any gcc2 internal prototype to avoid an error.  */
2212 /* We use char because int might match the return type of a gcc2
2213     builtin and then its argument prototype would still apply.  */
2214 char dbopen();
2215
2216 int main() {
2217
2218 /* The GNU C library defines this for functions which it implements
2219     to always fail with ENOSYS.  Some functions are actually named
2220     something starting with __ and the normal name is an alias.  */
2221 #if defined (__stub_dbopen) || defined (__stub___dbopen)
2222 choke me
2223 #else
2224 dbopen();
2225 #endif
2226
2227 ; return 0; }
2228 EOF
2229 if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2230   rm -rf conftest*
2231   eval "ac_cv_func_dbopen=yes"
2232 else
2233   echo "configure: failed program was:" >&5
2234   cat conftest.$ac_ext >&5
2235   rm -rf conftest*
2236   eval "ac_cv_func_dbopen=no"
2237 fi
2238 rm -f conftest*
2239 fi
2240
2241 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
2242   echo "$ac_t""yes" 1>&6
2243   
2244                         ldbm_use=$ldbm_prefer
2245                         ldbm_prefer=found
2246 else
2247   echo "$ac_t""no" 1>&6
2248
2249                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
2250 echo "configure:2251: checking for dbopen in -ldb" >&5
2251 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
2252 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2253   echo $ac_n "(cached) $ac_c" 1>&6
2254 else
2255   ac_save_LIBS="$LIBS"
2256 LIBS="-ldb  $LIBS"
2257 cat > conftest.$ac_ext <<EOF
2258 #line 2259 "configure"
2259 #include "confdefs.h"
2260 /* Override any gcc2 internal prototype to avoid an error.  */
2261 /* We use char because int might match the return type of a gcc2
2262     builtin and then its argument prototype would still apply.  */
2263 char dbopen();
2264
2265 int main() {
2266 dbopen()
2267 ; return 0; }
2268 EOF
2269 if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2270   rm -rf conftest*
2271   eval "ac_cv_lib_$ac_lib_var=yes"
2272 else
2273   echo "configure: failed program was:" >&5
2274   cat conftest.$ac_ext >&5
2275   rm -rf conftest*
2276   eval "ac_cv_lib_$ac_lib_var=no"
2277 fi
2278 rm -f conftest*
2279 LIBS="$ac_save_LIBS"
2280
2281 fi
2282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2283   echo "$ac_t""yes" 1>&6
2284   
2285                                 ldbm_use=$ldbm_prefer
2286                                 ldbm_prefer=found
2287                                 LDBM_LIBS="$LDBM_LIBS -ldb"
2288                         
2289 else
2290   echo "$ac_t""no" 1>&6
2291 fi
2292  
2293                 
2294 fi
2295
2296
2297                 if test $ldbm_prefer = found ; then
2298                         if test $ldbm_use = dbhash ; then
2299                                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
2300                         else
2301                                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
2302                         fi
2303                 fi
2304
2305                 echo $ac_n "checking for db2""... $ac_c" 1>&6
2306 echo "configure:2307: checking for db2" >&5
2307 if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then
2308   echo $ac_n "(cached) $ac_c" 1>&6
2309 else
2310   
2311                         cat > conftest.$ac_ext <<EOF
2312 #line 2313 "configure"
2313 #include "confdefs.h"
2314
2315 #include <db.h>
2316 /* this check could be improved */
2317 #ifdef DB_VERSION_MAJOR
2318 #if DB_VERSION_MAJOR == 2
2319         __db_version_2
2320 #endif
2321 #endif
2322                         
2323 EOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "__db_version_2" >/dev/null 2>&1; then
2326   rm -rf conftest*
2327   cf_cv_db2=yes
2328 else
2329   rm -rf conftest*
2330   cf_cv_db2=no
2331 fi
2332 rm -f conftest*
2333
2334 fi
2335
2336 echo "$ac_t""$cf_cv_db2" 1>&6
2337
2338                 if test $cf_cv_db2 = yes ; then
2339                         if test $opt_db2 = yes ; then
2340                                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2"
2341                         else
2342                                 for ac_hdr in db_185.h
2343 do
2344 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2345 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2346 echo "configure:2347: checking for $ac_hdr" >&5
2347 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2348   echo $ac_n "(cached) $ac_c" 1>&6
2349 else
2350   cat > conftest.$ac_ext <<EOF
2351 #line 2352 "configure"
2352 #include "confdefs.h"
2353 #include <$ac_hdr>
2354 EOF
2355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2356 { (eval echo configure:2357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2357 ac_err=`grep -v '^ *+' conftest.out`
2358 if test -z "$ac_err"; then
2359   rm -rf conftest*
2360   eval "ac_cv_header_$ac_safe=yes"
2361 else
2362   echo "$ac_err" >&5
2363   echo "configure: failed program was:" >&5
2364   cat conftest.$ac_ext >&5
2365   rm -rf conftest*
2366   eval "ac_cv_header_$ac_safe=no"
2367 fi
2368 rm -f conftest*
2369 fi
2370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2371   echo "$ac_t""yes" 1>&6
2372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2373   cat >> confdefs.h <<EOF
2374 #define $ac_tr_hdr 1
2375 EOF
2376  
2377 else
2378   echo "$ac_t""no" 1>&6
2379 fi
2380 done
2381
2382                                 if test $ac_cv_header_db_185_h = no ; then
2383                                         { echo "configure: error: select --with-db2 or install db2 with 1.85 compatibility" 1>&2; exit 1; }
2384                                 fi
2385
2386                                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185"
2387                         fi
2388                 else
2389                         if test $opt_db2 = yes ; then
2390                                 { echo "configure: error: could not local DB2" 1>&2; exit 1; }
2391                         fi
2392                 fi
2393         fi
2394
2395         if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then
2396                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
2397 echo "configure:2398: checking for gdbm_open in -lgdbm" >&5
2398 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
2399 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2400   echo $ac_n "(cached) $ac_c" 1>&6
2401 else
2402   ac_save_LIBS="$LIBS"
2403 LIBS="-lgdbm  $LIBS"
2404 cat > conftest.$ac_ext <<EOF
2405 #line 2406 "configure"
2406 #include "confdefs.h"
2407 /* Override any gcc2 internal prototype to avoid an error.  */
2408 /* We use char because int might match the return type of a gcc2
2409     builtin and then its argument prototype would still apply.  */
2410 char gdbm_open();
2411
2412 int main() {
2413 gdbm_open()
2414 ; return 0; }
2415 EOF
2416 if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2417   rm -rf conftest*
2418   eval "ac_cv_lib_$ac_lib_var=yes"
2419 else
2420   echo "configure: failed program was:" >&5
2421   cat conftest.$ac_ext >&5
2422   rm -rf conftest*
2423   eval "ac_cv_lib_$ac_lib_var=no"
2424 fi
2425 rm -f conftest*
2426 LIBS="$ac_save_LIBS"
2427
2428 fi
2429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2430   echo "$ac_t""yes" 1>&6
2431   
2432                         ldbm_use=$ldbm_prefer
2433                         ldbm_prefer=found
2434                         LDBM_LIBS="$LDBM_LIBS -lgdbm"
2435                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM"
2436                 
2437 else
2438   echo "$ac_t""no" 1>&6
2439 fi
2440  
2441         fi
2442         if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then
2443                 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
2444 echo "configure:2445: checking for dbm_open in -ldbm" >&5
2445 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
2446 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2447   echo $ac_n "(cached) $ac_c" 1>&6
2448 else
2449   ac_save_LIBS="$LIBS"
2450 LIBS="-ldbm  $LIBS"
2451 cat > conftest.$ac_ext <<EOF
2452 #line 2453 "configure"
2453 #include "confdefs.h"
2454 /* Override any gcc2 internal prototype to avoid an error.  */
2455 /* We use char because int might match the return type of a gcc2
2456     builtin and then its argument prototype would still apply.  */
2457 char dbm_open();
2458
2459 int main() {
2460 dbm_open()
2461 ; return 0; }
2462 EOF
2463 if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2464   rm -rf conftest*
2465   eval "ac_cv_lib_$ac_lib_var=yes"
2466 else
2467   echo "configure: failed program was:" >&5
2468   cat conftest.$ac_ext >&5
2469   rm -rf conftest*
2470   eval "ac_cv_lib_$ac_lib_var=no"
2471 fi
2472 rm -f conftest*
2473 LIBS="$ac_save_LIBS"
2474
2475 fi
2476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2477   echo "$ac_t""yes" 1>&6
2478   
2479                         ldbm_use=ndbm
2480                         ldbm_prefer=found
2481                         LDBM_LIBS="$LDBM_LIBS -ldbm"
2482                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM"
2483                 
2484 else
2485   echo "$ac_t""no" 1>&6
2486 fi
2487  
2488         fi
2489
2490         if test $ldbm_prefer != found ; then
2491                 { echo "configure: error: could not find suitable db for $ldbm_prefer backend" 1>&2; exit 1; }
2492         fi
2493
2494         if test $ldbm_use = ndbm ; then
2495                 echo "configure: warning: LDBM using NDBM" 1>&2
2496         fi
2497 fi
2498
2499 if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then
2500         echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6
2501 echo "configure:2502: checking for hosts_access in -lwrap" >&5
2502 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'`
2503 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2504   echo $ac_n "(cached) $ac_c" 1>&6
2505 else
2506   ac_save_LIBS="$LIBS"
2507 LIBS="-lwrap  $LIBS"
2508 cat > conftest.$ac_ext <<EOF
2509 #line 2510 "configure"
2510 #include "confdefs.h"
2511 /* Override any gcc2 internal prototype to avoid an error.  */
2512 /* We use char because int might match the return type of a gcc2
2513     builtin and then its argument prototype would still apply.  */
2514 char hosts_access();
2515
2516 int main() {
2517 hosts_access()
2518 ; return 0; }
2519 EOF
2520 if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2521   rm -rf conftest*
2522   eval "ac_cv_lib_$ac_lib_var=yes"
2523 else
2524   echo "configure: failed program was:" >&5
2525   cat conftest.$ac_ext >&5
2526   rm -rf conftest*
2527   eval "ac_cv_lib_$ac_lib_var=no"
2528 fi
2529 rm -f conftest*
2530 LIBS="$ac_save_LIBS"
2531
2532 fi
2533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2534   echo "$ac_t""yes" 1>&6
2535   
2536                 SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS"
2537                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
2538         
2539 else
2540   echo "$ac_t""no" 1>&6
2541 fi
2542
2543 fi
2544
2545 # ud needs termcap (should insert check here)
2546 LIBTERMCAP="-ltermcap"
2547
2548
2549 # FreeBSD (and others) have crypt(3) in -lcrypt
2550 if test "$SLAPD_CRYPT" = "yes" ; then
2551         echo $ac_n "checking for crypt""... $ac_c" 1>&6
2552 echo "configure:2553: checking for crypt" >&5
2553 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
2554   echo $ac_n "(cached) $ac_c" 1>&6
2555 else
2556   cat > conftest.$ac_ext <<EOF
2557 #line 2558 "configure"
2558 #include "confdefs.h"
2559 /* System header to define __stub macros and hopefully few prototypes,
2560     which can conflict with char crypt(); below.  */
2561 #include <assert.h>
2562 /* Override any gcc2 internal prototype to avoid an error.  */
2563 /* We use char because int might match the return type of a gcc2
2564     builtin and then its argument prototype would still apply.  */
2565 char crypt();
2566
2567 int main() {
2568
2569 /* The GNU C library defines this for functions which it implements
2570     to always fail with ENOSYS.  Some functions are actually named
2571     something starting with __ and the normal name is an alias.  */
2572 #if defined (__stub_crypt) || defined (__stub___crypt)
2573 choke me
2574 #else
2575 crypt();
2576 #endif
2577
2578 ; return 0; }
2579 EOF
2580 if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2581   rm -rf conftest*
2582   eval "ac_cv_func_crypt=yes"
2583 else
2584   echo "configure: failed program was:" >&5
2585   cat conftest.$ac_ext >&5
2586   rm -rf conftest*
2587   eval "ac_cv_func_crypt=no"
2588 fi
2589 rm -f conftest*
2590 fi
2591
2592 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
2593   echo "$ac_t""yes" 1>&6
2594   have_crypt=yes
2595 else
2596   echo "$ac_t""no" 1>&6
2597
2598                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
2599 echo "configure:2600: checking for crypt in -lcrypt" >&5
2600 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
2601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2602   echo $ac_n "(cached) $ac_c" 1>&6
2603 else
2604   ac_save_LIBS="$LIBS"
2605 LIBS="-lcrypt  $LIBS"
2606 cat > conftest.$ac_ext <<EOF
2607 #line 2608 "configure"
2608 #include "confdefs.h"
2609 /* Override any gcc2 internal prototype to avoid an error.  */
2610 /* We use char because int might match the return type of a gcc2
2611     builtin and then its argument prototype would still apply.  */
2612 char crypt();
2613
2614 int main() {
2615 crypt()
2616 ; return 0; }
2617 EOF
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2619   rm -rf conftest*
2620   eval "ac_cv_lib_$ac_lib_var=yes"
2621 else
2622   echo "configure: failed program was:" >&5
2623   cat conftest.$ac_ext >&5
2624   rm -rf conftest*
2625   eval "ac_cv_lib_$ac_lib_var=no"
2626 fi
2627 rm -f conftest*
2628 LIBS="$ac_save_LIBS"
2629
2630 fi
2631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2632   echo "$ac_t""yes" 1>&6
2633   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
2634                         have_crypt=yes
2635 else
2636   echo "$ac_t""no" 1>&6
2637 have_crypt=no
2638 fi
2639
2640 fi
2641
2642
2643         if test $have_crypt = yes ; then
2644                 LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT"
2645         else
2646                 echo "configure: warning: could not find crypt" 1>&2
2647         fi
2648 fi
2649
2650 ac_header_dirent=no
2651 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2652 do
2653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2654 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2655 echo "configure:2656: checking for $ac_hdr that defines DIR" >&5
2656 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2657   echo $ac_n "(cached) $ac_c" 1>&6
2658 else
2659   cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2662 #include <sys/types.h>
2663 #include <$ac_hdr>
2664 int main() {
2665 DIR *dirp = 0;
2666 ; return 0; }
2667 EOF
2668 if { (eval echo configure:2669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2669   rm -rf conftest*
2670   eval "ac_cv_header_dirent_$ac_safe=yes"
2671 else
2672   echo "configure: failed program was:" >&5
2673   cat conftest.$ac_ext >&5
2674   rm -rf conftest*
2675   eval "ac_cv_header_dirent_$ac_safe=no"
2676 fi
2677 rm -f conftest*
2678 fi
2679 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2680   echo "$ac_t""yes" 1>&6
2681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2682   cat >> confdefs.h <<EOF
2683 #define $ac_tr_hdr 1
2684 EOF
2685  ac_header_dirent=$ac_hdr; break
2686 else
2687   echo "$ac_t""no" 1>&6
2688 fi
2689 done
2690 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2691 if test $ac_header_dirent = dirent.h; then
2692 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2693 echo "configure:2694: checking for opendir in -ldir" >&5
2694 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2695 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2696   echo $ac_n "(cached) $ac_c" 1>&6
2697 else
2698   ac_save_LIBS="$LIBS"
2699 LIBS="-ldir  $LIBS"
2700 cat > conftest.$ac_ext <<EOF
2701 #line 2702 "configure"
2702 #include "confdefs.h"
2703 /* Override any gcc2 internal prototype to avoid an error.  */
2704 /* We use char because int might match the return type of a gcc2
2705     builtin and then its argument prototype would still apply.  */
2706 char opendir();
2707
2708 int main() {
2709 opendir()
2710 ; return 0; }
2711 EOF
2712 if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2713   rm -rf conftest*
2714   eval "ac_cv_lib_$ac_lib_var=yes"
2715 else
2716   echo "configure: failed program was:" >&5
2717   cat conftest.$ac_ext >&5
2718   rm -rf conftest*
2719   eval "ac_cv_lib_$ac_lib_var=no"
2720 fi
2721 rm -f conftest*
2722 LIBS="$ac_save_LIBS"
2723
2724 fi
2725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2726   echo "$ac_t""yes" 1>&6
2727   LIBS="$LIBS -ldir"
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731
2732 else
2733 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2734 echo "configure:2735: checking for opendir in -lx" >&5
2735 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2737   echo $ac_n "(cached) $ac_c" 1>&6
2738 else
2739   ac_save_LIBS="$LIBS"
2740 LIBS="-lx  $LIBS"
2741 cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 /* Override any gcc2 internal prototype to avoid an error.  */
2745 /* We use char because int might match the return type of a gcc2
2746     builtin and then its argument prototype would still apply.  */
2747 char opendir();
2748
2749 int main() {
2750 opendir()
2751 ; return 0; }
2752 EOF
2753 if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2754   rm -rf conftest*
2755   eval "ac_cv_lib_$ac_lib_var=yes"
2756 else
2757   echo "configure: failed program was:" >&5
2758   cat conftest.$ac_ext >&5
2759   rm -rf conftest*
2760   eval "ac_cv_lib_$ac_lib_var=no"
2761 fi
2762 rm -f conftest*
2763 LIBS="$ac_save_LIBS"
2764
2765 fi
2766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2767   echo "$ac_t""yes" 1>&6
2768   LIBS="$LIBS -lx"
2769 else
2770   echo "$ac_t""no" 1>&6
2771 fi
2772
2773 fi
2774
2775 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2776 echo "configure:2777: checking for ANSI C header files" >&5
2777 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2778   echo $ac_n "(cached) $ac_c" 1>&6
2779 else
2780   cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2783 #include <stdlib.h>
2784 #include <stdarg.h>
2785 #include <string.h>
2786 #include <float.h>
2787 EOF
2788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2789 { (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2790 ac_err=`grep -v '^ *+' conftest.out`
2791 if test -z "$ac_err"; then
2792   rm -rf conftest*
2793   ac_cv_header_stdc=yes
2794 else
2795   echo "$ac_err" >&5
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798   rm -rf conftest*
2799   ac_cv_header_stdc=no
2800 fi
2801 rm -f conftest*
2802
2803 if test $ac_cv_header_stdc = yes; then
2804   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2805 cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 #include <string.h>
2809 EOF
2810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2811   egrep "memchr" >/dev/null 2>&1; then
2812   :
2813 else
2814   rm -rf conftest*
2815   ac_cv_header_stdc=no
2816 fi
2817 rm -f conftest*
2818
2819 fi
2820
2821 if test $ac_cv_header_stdc = yes; then
2822   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2823 cat > conftest.$ac_ext <<EOF
2824 #line 2825 "configure"
2825 #include "confdefs.h"
2826 #include <stdlib.h>
2827 EOF
2828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2829   egrep "free" >/dev/null 2>&1; then
2830   :
2831 else
2832   rm -rf conftest*
2833   ac_cv_header_stdc=no
2834 fi
2835 rm -f conftest*
2836
2837 fi
2838
2839 if test $ac_cv_header_stdc = yes; then
2840   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2841 if test "$cross_compiling" = yes; then
2842   :
2843 else
2844   cat > conftest.$ac_ext <<EOF
2845 #line 2846 "configure"
2846 #include "confdefs.h"
2847 #include <ctype.h>
2848 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2849 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2850 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2851 int main () { int i; for (i = 0; i < 256; i++)
2852 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2853 exit (0); }
2854
2855 EOF
2856 if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2857 then
2858   :
2859 else
2860   echo "configure: failed program was:" >&5
2861   cat conftest.$ac_ext >&5
2862   rm -fr conftest*
2863   ac_cv_header_stdc=no
2864 fi
2865 rm -fr conftest*
2866 fi
2867
2868 fi
2869 fi
2870
2871 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2872 if test $ac_cv_header_stdc = yes; then
2873   cat >> confdefs.h <<\EOF
2874 #define STDC_HEADERS 1
2875 EOF
2876
2877 fi
2878
2879 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2880 echo "configure:2881: checking for sys/wait.h that is POSIX.1 compatible" >&5
2881 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2882   echo $ac_n "(cached) $ac_c" 1>&6
2883 else
2884   cat > conftest.$ac_ext <<EOF
2885 #line 2886 "configure"
2886 #include "confdefs.h"
2887 #include <sys/types.h>
2888 #include <sys/wait.h>
2889 #ifndef WEXITSTATUS
2890 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2891 #endif
2892 #ifndef WIFEXITED
2893 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2894 #endif
2895 int main() {
2896 int s;
2897 wait (&s);
2898 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2899 ; return 0; }
2900 EOF
2901 if { (eval echo configure:2902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2902   rm -rf conftest*
2903   ac_cv_header_sys_wait_h=yes
2904 else
2905   echo "configure: failed program was:" >&5
2906   cat conftest.$ac_ext >&5
2907   rm -rf conftest*
2908   ac_cv_header_sys_wait_h=no
2909 fi
2910 rm -f conftest*
2911 fi
2912
2913 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2914 if test $ac_cv_header_sys_wait_h = yes; then
2915   cat >> confdefs.h <<\EOF
2916 #define HAVE_SYS_WAIT_H 1
2917 EOF
2918
2919 fi
2920
2921 for ac_hdr in \
2922         stddef.h        \
2923         fcntl.h         \
2924         limits.h        \
2925         malloc.h        \
2926         sgtty.h         \
2927         sys/file.h      \
2928         sys/ioctl.h     \
2929         sys/time.h      \
2930         syslog.h        \
2931         termio.h        \
2932         unistd.h        \
2933
2934 do
2935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2937 echo "configure:2938: checking for $ac_hdr" >&5
2938 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2939   echo $ac_n "(cached) $ac_c" 1>&6
2940 else
2941   cat > conftest.$ac_ext <<EOF
2942 #line 2943 "configure"
2943 #include "confdefs.h"
2944 #include <$ac_hdr>
2945 EOF
2946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2947 { (eval echo configure:2948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2948 ac_err=`grep -v '^ *+' conftest.out`
2949 if test -z "$ac_err"; then
2950   rm -rf conftest*
2951   eval "ac_cv_header_$ac_safe=yes"
2952 else
2953   echo "$ac_err" >&5
2954   echo "configure: failed program was:" >&5
2955   cat conftest.$ac_ext >&5
2956   rm -rf conftest*
2957   eval "ac_cv_header_$ac_safe=no"
2958 fi
2959 rm -f conftest*
2960 fi
2961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2962   echo "$ac_t""yes" 1>&6
2963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2964   cat >> confdefs.h <<EOF
2965 #define $ac_tr_hdr 1
2966 EOF
2967  
2968 else
2969   echo "$ac_t""no" 1>&6
2970 fi
2971 done
2972
2973
2974 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2975 echo "configure:2976: checking for uid_t in sys/types.h" >&5
2976 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2977   echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979   cat > conftest.$ac_ext <<EOF
2980 #line 2981 "configure"
2981 #include "confdefs.h"
2982 #include <sys/types.h>
2983 EOF
2984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2985   egrep "uid_t" >/dev/null 2>&1; then
2986   rm -rf conftest*
2987   ac_cv_type_uid_t=yes
2988 else
2989   rm -rf conftest*
2990   ac_cv_type_uid_t=no
2991 fi
2992 rm -f conftest*
2993
2994 fi
2995
2996 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2997 if test $ac_cv_type_uid_t = no; then
2998   cat >> confdefs.h <<\EOF
2999 #define uid_t int
3000 EOF
3001
3002   cat >> confdefs.h <<\EOF
3003 #define gid_t int
3004 EOF
3005
3006 fi
3007
3008 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3009 echo "configure:3010: checking type of array argument to getgroups" >&5
3010 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3011   echo $ac_n "(cached) $ac_c" 1>&6
3012 else
3013   if test "$cross_compiling" = yes; then
3014   ac_cv_type_getgroups=cross
3015 else
3016   cat > conftest.$ac_ext <<EOF
3017 #line 3018 "configure"
3018 #include "confdefs.h"
3019
3020 /* Thanks to Mike Rendell for this test.  */
3021 #include <sys/types.h>
3022 #define NGID 256
3023 #undef MAX
3024 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3025 main()
3026 {
3027   gid_t gidset[NGID];
3028   int i, n;
3029   union { gid_t gval; long lval; }  val;
3030
3031   val.lval = -1;
3032   for (i = 0; i < NGID; i++)
3033     gidset[i] = val.gval;
3034   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3035                  gidset);
3036   /* Exit non-zero if getgroups seems to require an array of ints.  This
3037      happens when gid_t is short but getgroups modifies an array of ints.  */
3038   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3039 }
3040
3041 EOF
3042 if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3043 then
3044     ac_cv_type_getgroups=gid_t
3045 else
3046   echo "configure: failed program was:" >&5
3047   cat conftest.$ac_ext >&5
3048   rm -fr conftest*
3049   ac_cv_type_getgroups=int
3050 fi
3051 rm -fr conftest*
3052 fi
3053
3054 if test $ac_cv_type_getgroups = cross; then
3055         cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058 #include <unistd.h>
3059 EOF
3060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3061   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3062   rm -rf conftest*
3063   ac_cv_type_getgroups=gid_t
3064 else
3065   rm -rf conftest*
3066   ac_cv_type_getgroups=int
3067 fi
3068 rm -f conftest*
3069
3070 fi
3071 fi
3072
3073 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3074 cat >> confdefs.h <<EOF
3075 #define GETGROUPS_T $ac_cv_type_getgroups
3076 EOF
3077
3078
3079 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3080 echo "configure:3081: checking for mode_t" >&5
3081 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087 #include <sys/types.h>
3088 #if STDC_HEADERS
3089 #include <stdlib.h>
3090 #include <stddef.h>
3091 #endif
3092 EOF
3093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3094   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3095   rm -rf conftest*
3096   ac_cv_type_mode_t=yes
3097 else
3098   rm -rf conftest*
3099   ac_cv_type_mode_t=no
3100 fi
3101 rm -f conftest*
3102
3103 fi
3104 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3105 if test $ac_cv_type_mode_t = no; then
3106   cat >> confdefs.h <<\EOF
3107 #define mode_t int
3108 EOF
3109
3110 fi
3111
3112 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3113 echo "configure:3114: checking for off_t" >&5
3114 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117   cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <sys/types.h>
3121 #if STDC_HEADERS
3122 #include <stdlib.h>
3123 #include <stddef.h>
3124 #endif
3125 EOF
3126 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3127   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3128   rm -rf conftest*
3129   ac_cv_type_off_t=yes
3130 else
3131   rm -rf conftest*
3132   ac_cv_type_off_t=no
3133 fi
3134 rm -f conftest*
3135
3136 fi
3137 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3138 if test $ac_cv_type_off_t = no; then
3139   cat >> confdefs.h <<\EOF
3140 #define off_t long
3141 EOF
3142
3143 fi
3144
3145 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3146 echo "configure:3147: checking for pid_t" >&5
3147 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153 #include <sys/types.h>
3154 #if STDC_HEADERS
3155 #include <stdlib.h>
3156 #include <stddef.h>
3157 #endif
3158 EOF
3159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3160   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3161   rm -rf conftest*
3162   ac_cv_type_pid_t=yes
3163 else
3164   rm -rf conftest*
3165   ac_cv_type_pid_t=no
3166 fi
3167 rm -f conftest*
3168
3169 fi
3170 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3171 if test $ac_cv_type_pid_t = no; then
3172   cat >> confdefs.h <<\EOF
3173 #define pid_t int
3174 EOF
3175
3176 fi
3177
3178 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3179 echo "configure:3180: checking return type of signal handlers" >&5
3180 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3181   echo $ac_n "(cached) $ac_c" 1>&6
3182 else
3183   cat > conftest.$ac_ext <<EOF
3184 #line 3185 "configure"
3185 #include "confdefs.h"
3186 #include <sys/types.h>
3187 #include <signal.h>
3188 #ifdef signal
3189 #undef signal
3190 #endif
3191 #ifdef __cplusplus
3192 extern "C" void (*signal (int, void (*)(int)))(int);
3193 #else
3194 void (*signal ()) ();
3195 #endif
3196
3197 int main() {
3198 int i;
3199 ; return 0; }
3200 EOF
3201 if { (eval echo configure:3202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3202   rm -rf conftest*
3203   ac_cv_type_signal=void
3204 else
3205   echo "configure: failed program was:" >&5
3206   cat conftest.$ac_ext >&5
3207   rm -rf conftest*
3208   ac_cv_type_signal=int
3209 fi
3210 rm -f conftest*
3211 fi
3212
3213 echo "$ac_t""$ac_cv_type_signal" 1>&6
3214 cat >> confdefs.h <<EOF
3215 #define RETSIGTYPE $ac_cv_type_signal
3216 EOF
3217
3218
3219 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3220 echo "configure:3221: checking for size_t" >&5
3221 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3222   echo $ac_n "(cached) $ac_c" 1>&6
3223 else
3224   cat > conftest.$ac_ext <<EOF
3225 #line 3226 "configure"
3226 #include "confdefs.h"
3227 #include <sys/types.h>
3228 #if STDC_HEADERS
3229 #include <stdlib.h>
3230 #include <stddef.h>
3231 #endif
3232 EOF
3233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3234   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3235   rm -rf conftest*
3236   ac_cv_type_size_t=yes
3237 else
3238   rm -rf conftest*
3239   ac_cv_type_size_t=no
3240 fi
3241 rm -f conftest*
3242
3243 fi
3244 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3245 if test $ac_cv_type_size_t = no; then
3246   cat >> confdefs.h <<\EOF
3247 #define size_t unsigned
3248 EOF
3249
3250 fi
3251
3252 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3253 echo "configure:3254: checking for uid_t in sys/types.h" >&5
3254 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3255   echo $ac_n "(cached) $ac_c" 1>&6
3256 else
3257   cat > conftest.$ac_ext <<EOF
3258 #line 3259 "configure"
3259 #include "confdefs.h"
3260 #include <sys/types.h>
3261 EOF
3262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3263   egrep "uid_t" >/dev/null 2>&1; then
3264   rm -rf conftest*
3265   ac_cv_type_uid_t=yes
3266 else
3267   rm -rf conftest*
3268   ac_cv_type_uid_t=no
3269 fi
3270 rm -f conftest*
3271
3272 fi
3273
3274 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3275 if test $ac_cv_type_uid_t = no; then
3276   cat >> confdefs.h <<\EOF
3277 #define uid_t int
3278 EOF
3279
3280   cat >> confdefs.h <<\EOF
3281 #define gid_t int
3282 EOF
3283
3284 fi
3285
3286 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
3287 echo "configure:3288: checking for st_blksize in struct stat" >&5
3288 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <sys/types.h>
3295 #include <sys/stat.h>
3296 int main() {
3297 struct stat s; s.st_blksize;
3298 ; return 0; }
3299 EOF
3300 if { (eval echo configure:3301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3301   rm -rf conftest*
3302   ac_cv_struct_st_blksize=yes
3303 else
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   ac_cv_struct_st_blksize=no
3308 fi
3309 rm -f conftest*
3310 fi
3311
3312 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
3313 if test $ac_cv_struct_st_blksize = yes; then
3314   cat >> confdefs.h <<\EOF
3315 #define HAVE_ST_BLKSIZE 1
3316 EOF
3317
3318 fi
3319
3320 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3321 echo "configure:3322: checking whether time.h and sys/time.h may both be included" >&5
3322 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3323   echo $ac_n "(cached) $ac_c" 1>&6
3324 else
3325   cat > conftest.$ac_ext <<EOF
3326 #line 3327 "configure"
3327 #include "confdefs.h"
3328 #include <sys/types.h>
3329 #include <sys/time.h>
3330 #include <time.h>
3331 int main() {
3332 struct tm *tp;
3333 ; return 0; }
3334 EOF
3335 if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3336   rm -rf conftest*
3337   ac_cv_header_time=yes
3338 else
3339   echo "configure: failed program was:" >&5
3340   cat conftest.$ac_ext >&5
3341   rm -rf conftest*
3342   ac_cv_header_time=no
3343 fi
3344 rm -f conftest*
3345 fi
3346
3347 echo "$ac_t""$ac_cv_header_time" 1>&6
3348 if test $ac_cv_header_time = yes; then
3349   cat >> confdefs.h <<\EOF
3350 #define TIME_WITH_SYS_TIME 1
3351 EOF
3352
3353 fi
3354
3355 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3356 echo "configure:3357: checking whether struct tm is in sys/time.h or time.h" >&5
3357 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3358   echo $ac_n "(cached) $ac_c" 1>&6
3359 else
3360   cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 #include <sys/types.h>
3364 #include <time.h>
3365 int main() {
3366 struct tm *tp; tp->tm_sec;
3367 ; return 0; }
3368 EOF
3369 if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3370   rm -rf conftest*
3371   ac_cv_struct_tm=time.h
3372 else
3373   echo "configure: failed program was:" >&5
3374   cat conftest.$ac_ext >&5
3375   rm -rf conftest*
3376   ac_cv_struct_tm=sys/time.h
3377 fi
3378 rm -f conftest*
3379 fi
3380
3381 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3382 if test $ac_cv_struct_tm = sys/time.h; then
3383   cat >> confdefs.h <<\EOF
3384 #define TM_IN_SYS_TIME 1
3385 EOF
3386
3387 fi
3388
3389
3390 echo $ac_n "checking for working const""... $ac_c" 1>&6
3391 echo "configure:3392: checking for working const" >&5
3392 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3393   echo $ac_n "(cached) $ac_c" 1>&6
3394 else
3395   cat > conftest.$ac_ext <<EOF
3396 #line 3397 "configure"
3397 #include "confdefs.h"
3398
3399 int main() {
3400
3401 /* Ultrix mips cc rejects this.  */
3402 typedef int charset[2]; const charset x;
3403 /* SunOS 4.1.1 cc rejects this.  */
3404 char const *const *ccp;
3405 char **p;
3406 /* NEC SVR4.0.2 mips cc rejects this.  */
3407 struct point {int x, y;};
3408 static struct point const zero = {0,0};
3409 /* AIX XL C 1.02.0.0 rejects this.
3410    It does not let you subtract one const X* pointer from another in an arm
3411    of an if-expression whose if-part is not a constant expression */
3412 const char *g = "string";
3413 ccp = &g + (g ? g-g : 0);
3414 /* HPUX 7.0 cc rejects these. */
3415 ++ccp;
3416 p = (char**) ccp;
3417 ccp = (char const *const *) p;
3418 { /* SCO 3.2v4 cc rejects this.  */
3419   char *t;
3420   char const *s = 0 ? (char *) 0 : (char const *) 0;
3421
3422   *t++ = 0;
3423 }
3424 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3425   int x[] = {25, 17};
3426   const int *foo = &x[0];
3427   ++foo;
3428 }
3429 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3430   typedef const int *iptr;
3431   iptr p = 0;
3432   ++p;
3433 }
3434 { /* AIX XL C 1.02.0.0 rejects this saying
3435      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3436   struct s { int j; const int *ap[3]; };
3437   struct s *b; b->j = 5;
3438 }
3439 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3440   const int foo = 10;
3441 }
3442
3443 ; return 0; }
3444 EOF
3445 if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3446   rm -rf conftest*
3447   ac_cv_c_const=yes
3448 else
3449   echo "configure: failed program was:" >&5
3450   cat conftest.$ac_ext >&5
3451   rm -rf conftest*
3452   ac_cv_c_const=no
3453 fi
3454 rm -f conftest*
3455 fi
3456
3457 echo "$ac_t""$ac_cv_c_const" 1>&6
3458 if test $ac_cv_c_const = no; then
3459   cat >> confdefs.h <<\EOF
3460 #define const 
3461 EOF
3462
3463 fi
3464
3465
3466 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3467 echo "configure:3468: checking for 8-bit clean memcmp" >&5
3468 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3469   echo $ac_n "(cached) $ac_c" 1>&6
3470 else
3471   if test "$cross_compiling" = yes; then
3472   ac_cv_func_memcmp_clean=no
3473 else
3474   cat > conftest.$ac_ext <<EOF
3475 #line 3476 "configure"
3476 #include "confdefs.h"
3477
3478 main()
3479 {
3480   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3481   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3482 }
3483
3484 EOF
3485 if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3486 then
3487   ac_cv_func_memcmp_clean=yes
3488 else
3489   echo "configure: failed program was:" >&5
3490   cat conftest.$ac_ext >&5
3491   rm -fr conftest*
3492   ac_cv_func_memcmp_clean=no
3493 fi
3494 rm -fr conftest*
3495 fi
3496
3497 fi
3498
3499 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3500 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
3501
3502 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3503 echo "configure:3504: checking return type of signal handlers" >&5
3504 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   cat > conftest.$ac_ext <<EOF
3508 #line 3509 "configure"
3509 #include "confdefs.h"
3510 #include <sys/types.h>
3511 #include <signal.h>
3512 #ifdef signal
3513 #undef signal
3514 #endif
3515 #ifdef __cplusplus
3516 extern "C" void (*signal (int, void (*)(int)))(int);
3517 #else
3518 void (*signal ()) ();
3519 #endif
3520
3521 int main() {
3522 int i;
3523 ; return 0; }
3524 EOF
3525 if { (eval echo configure:3526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3526   rm -rf conftest*
3527   ac_cv_type_signal=void
3528 else
3529   echo "configure: failed program was:" >&5
3530   cat conftest.$ac_ext >&5
3531   rm -rf conftest*
3532   ac_cv_type_signal=int
3533 fi
3534 rm -f conftest*
3535 fi
3536
3537 echo "$ac_t""$ac_cv_type_signal" 1>&6
3538 cat >> confdefs.h <<EOF
3539 #define RETSIGTYPE $ac_cv_type_signal
3540 EOF
3541
3542
3543 echo $ac_n "checking for strftime""... $ac_c" 1>&6
3544 echo "configure:3545: checking for strftime" >&5
3545 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
3546   echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548   cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551 /* System header to define __stub macros and hopefully few prototypes,
3552     which can conflict with char strftime(); below.  */
3553 #include <assert.h>
3554 /* Override any gcc2 internal prototype to avoid an error.  */
3555 /* We use char because int might match the return type of a gcc2
3556     builtin and then its argument prototype would still apply.  */
3557 char strftime();
3558
3559 int main() {
3560
3561 /* The GNU C library defines this for functions which it implements
3562     to always fail with ENOSYS.  Some functions are actually named
3563     something starting with __ and the normal name is an alias.  */
3564 #if defined (__stub_strftime) || defined (__stub___strftime)
3565 choke me
3566 #else
3567 strftime();
3568 #endif
3569
3570 ; return 0; }
3571 EOF
3572 if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3573   rm -rf conftest*
3574   eval "ac_cv_func_strftime=yes"
3575 else
3576   echo "configure: failed program was:" >&5
3577   cat conftest.$ac_ext >&5
3578   rm -rf conftest*
3579   eval "ac_cv_func_strftime=no"
3580 fi
3581 rm -f conftest*
3582 fi
3583
3584 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
3585   echo "$ac_t""yes" 1>&6
3586   cat >> confdefs.h <<\EOF
3587 #define HAVE_STRFTIME 1
3588 EOF
3589
3590 else
3591   echo "$ac_t""no" 1>&6
3592 # strftime is in -lintl on SCO UNIX.
3593 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
3594 echo "configure:3595: checking for strftime in -lintl" >&5
3595 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
3596 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3597   echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599   ac_save_LIBS="$LIBS"
3600 LIBS="-lintl  $LIBS"
3601 cat > conftest.$ac_ext <<EOF
3602 #line 3603 "configure"
3603 #include "confdefs.h"
3604 /* Override any gcc2 internal prototype to avoid an error.  */
3605 /* We use char because int might match the return type of a gcc2
3606     builtin and then its argument prototype would still apply.  */
3607 char strftime();
3608
3609 int main() {
3610 strftime()
3611 ; return 0; }
3612 EOF
3613 if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3614   rm -rf conftest*
3615   eval "ac_cv_lib_$ac_lib_var=yes"
3616 else
3617   echo "configure: failed program was:" >&5
3618   cat conftest.$ac_ext >&5
3619   rm -rf conftest*
3620   eval "ac_cv_lib_$ac_lib_var=no"
3621 fi
3622 rm -f conftest*
3623 LIBS="$ac_save_LIBS"
3624
3625 fi
3626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3627   echo "$ac_t""yes" 1>&6
3628   cat >> confdefs.h <<\EOF
3629 #define HAVE_STRFTIME 1
3630 EOF
3631
3632 LIBS="-lintl $LIBS"
3633 else
3634   echo "$ac_t""no" 1>&6
3635 fi
3636
3637 fi
3638
3639 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3640 echo "configure:3641: checking for vprintf" >&5
3641 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3642   echo $ac_n "(cached) $ac_c" 1>&6
3643 else
3644   cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647 /* System header to define __stub macros and hopefully few prototypes,
3648     which can conflict with char vprintf(); below.  */
3649 #include <assert.h>
3650 /* Override any gcc2 internal prototype to avoid an error.  */
3651 /* We use char because int might match the return type of a gcc2
3652     builtin and then its argument prototype would still apply.  */
3653 char vprintf();
3654
3655 int main() {
3656
3657 /* The GNU C library defines this for functions which it implements
3658     to always fail with ENOSYS.  Some functions are actually named
3659     something starting with __ and the normal name is an alias.  */
3660 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3661 choke me
3662 #else
3663 vprintf();
3664 #endif
3665
3666 ; return 0; }
3667 EOF
3668 if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3669   rm -rf conftest*
3670   eval "ac_cv_func_vprintf=yes"
3671 else
3672   echo "configure: failed program was:" >&5
3673   cat conftest.$ac_ext >&5
3674   rm -rf conftest*
3675   eval "ac_cv_func_vprintf=no"
3676 fi
3677 rm -f conftest*
3678 fi
3679
3680 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3681   echo "$ac_t""yes" 1>&6
3682   cat >> confdefs.h <<\EOF
3683 #define HAVE_VPRINTF 1
3684 EOF
3685
3686 else
3687   echo "$ac_t""no" 1>&6
3688 fi
3689
3690 if test "$ac_cv_func_vprintf" != yes; then
3691 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3692 echo "configure:3693: checking for _doprnt" >&5
3693 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3694   echo $ac_n "(cached) $ac_c" 1>&6
3695 else
3696   cat > conftest.$ac_ext <<EOF
3697 #line 3698 "configure"
3698 #include "confdefs.h"
3699 /* System header to define __stub macros and hopefully few prototypes,
3700     which can conflict with char _doprnt(); below.  */
3701 #include <assert.h>
3702 /* Override any gcc2 internal prototype to avoid an error.  */
3703 /* We use char because int might match the return type of a gcc2
3704     builtin and then its argument prototype would still apply.  */
3705 char _doprnt();
3706
3707 int main() {
3708
3709 /* The GNU C library defines this for functions which it implements
3710     to always fail with ENOSYS.  Some functions are actually named
3711     something starting with __ and the normal name is an alias.  */
3712 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3713 choke me
3714 #else
3715 _doprnt();
3716 #endif
3717
3718 ; return 0; }
3719 EOF
3720 if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3721   rm -rf conftest*
3722   eval "ac_cv_func__doprnt=yes"
3723 else
3724   echo "configure: failed program was:" >&5
3725   cat conftest.$ac_ext >&5
3726   rm -rf conftest*
3727   eval "ac_cv_func__doprnt=no"
3728 fi
3729 rm -f conftest*
3730 fi
3731
3732 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3733   echo "$ac_t""yes" 1>&6
3734   cat >> confdefs.h <<\EOF
3735 #define HAVE_DOPRNT 1
3736 EOF
3737
3738 else
3739   echo "$ac_t""no" 1>&6
3740 fi
3741
3742 fi
3743
3744 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
3745 echo "configure:3746: checking for wait3 that fills in rusage" >&5
3746 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
3747   echo $ac_n "(cached) $ac_c" 1>&6
3748 else
3749   if test "$cross_compiling" = yes; then
3750   ac_cv_func_wait3_rusage=no
3751 else
3752   cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <sys/types.h>
3756 #include <sys/time.h>
3757 #include <sys/resource.h>
3758 #include <stdio.h>
3759 /* HP-UX has wait3 but does not fill in rusage at all.  */
3760 main() {
3761   struct rusage r;
3762   int i;
3763   /* Use a field that we can force nonzero --
3764      voluntary context switches.
3765      For systems like NeXT and OSF/1 that don't set it,
3766      also use the system CPU time.  And page faults (I/O) for Linux.  */
3767   r.ru_nvcsw = 0;
3768   r.ru_stime.tv_sec = 0;
3769   r.ru_stime.tv_usec = 0;
3770   r.ru_majflt = r.ru_minflt = 0;
3771   switch (fork()) {
3772   case 0: /* Child.  */
3773     sleep(1); /* Give up the CPU.  */
3774     _exit(0);
3775   case -1: _exit(0); /* What can we do?  */
3776   default: /* Parent.  */
3777     wait3(&i, 0, &r);
3778     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
3779     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
3780          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
3781   }
3782 }
3783 EOF
3784 if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3785 then
3786   ac_cv_func_wait3_rusage=yes
3787 else
3788   echo "configure: failed program was:" >&5
3789   cat conftest.$ac_ext >&5
3790   rm -fr conftest*
3791   ac_cv_func_wait3_rusage=no
3792 fi
3793 rm -fr conftest*
3794 fi
3795
3796 fi
3797
3798 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
3799 if test $ac_cv_func_wait3_rusage = yes; then
3800   cat >> confdefs.h <<\EOF
3801 #define HAVE_WAIT3 1
3802 EOF
3803
3804 fi
3805
3806
3807 for ac_func in \
3808         gethostname             \
3809         gettimeofday    \
3810         mktime                  \
3811         select                  \
3812         socket                  \
3813         strdup                  \
3814         strerror                \
3815         strstr                  \
3816         strrchr                 \
3817         strtod                  \
3818         strtol                  \
3819         strtoul                 \
3820         strsep                  \
3821         memcpy                  \
3822
3823 do
3824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3825 echo "configure:3826: checking for $ac_func" >&5
3826 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3827   echo $ac_n "(cached) $ac_c" 1>&6
3828 else
3829   cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832 /* System header to define __stub macros and hopefully few prototypes,
3833     which can conflict with char $ac_func(); below.  */
3834 #include <assert.h>
3835 /* Override any gcc2 internal prototype to avoid an error.  */
3836 /* We use char because int might match the return type of a gcc2
3837     builtin and then its argument prototype would still apply.  */
3838 char $ac_func();
3839
3840 int main() {
3841
3842 /* The GNU C library defines this for functions which it implements
3843     to always fail with ENOSYS.  Some functions are actually named
3844     something starting with __ and the normal name is an alias.  */
3845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3846 choke me
3847 #else
3848 $ac_func();
3849 #endif
3850
3851 ; return 0; }
3852 EOF
3853 if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3854   rm -rf conftest*
3855   eval "ac_cv_func_$ac_func=yes"
3856 else
3857   echo "configure: failed program was:" >&5
3858   cat conftest.$ac_ext >&5
3859   rm -rf conftest*
3860   eval "ac_cv_func_$ac_func=no"
3861 fi
3862 rm -f conftest*
3863 fi
3864
3865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3866   echo "$ac_t""yes" 1>&6
3867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3868   cat >> confdefs.h <<EOF
3869 #define $ac_tr_func 1
3870 EOF
3871  
3872 else
3873   echo "$ac_t""no" 1>&6
3874 fi
3875 done
3876
3877
3878 for ac_func in strdup
3879 do
3880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3881 echo "configure:3882: checking for $ac_func" >&5
3882 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3883   echo $ac_n "(cached) $ac_c" 1>&6
3884 else
3885   cat > conftest.$ac_ext <<EOF
3886 #line 3887 "configure"
3887 #include "confdefs.h"
3888 /* System header to define __stub macros and hopefully few prototypes,
3889     which can conflict with char $ac_func(); below.  */
3890 #include <assert.h>
3891 /* Override any gcc2 internal prototype to avoid an error.  */
3892 /* We use char because int might match the return type of a gcc2
3893     builtin and then its argument prototype would still apply.  */
3894 char $ac_func();
3895
3896 int main() {
3897
3898 /* The GNU C library defines this for functions which it implements
3899     to always fail with ENOSYS.  Some functions are actually named
3900     something starting with __ and the normal name is an alias.  */
3901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3902 choke me
3903 #else
3904 $ac_func();
3905 #endif
3906
3907 ; return 0; }
3908 EOF
3909 if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3910   rm -rf conftest*
3911   eval "ac_cv_func_$ac_func=yes"
3912 else
3913   echo "configure: failed program was:" >&5
3914   cat conftest.$ac_ext >&5
3915   rm -rf conftest*
3916   eval "ac_cv_func_$ac_func=no"
3917 fi
3918 rm -f conftest*
3919 fi
3920
3921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3922   echo "$ac_t""yes" 1>&6
3923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3924   cat >> confdefs.h <<EOF
3925 #define $ac_tr_func 1
3926 EOF
3927  
3928 else
3929   echo "$ac_t""no" 1>&6
3930 LIBOBJS="$LIBOBJS ${ac_func}.o"
3931 fi
3932 done
3933
3934
3935
3936 # Check Configuration
3937
3938 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
3939 echo "configure:3940: checking declaration of sys_errlist" >&5
3940 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then
3941   echo $ac_n "(cached) $ac_c" 1>&6
3942 else
3943   
3944         cat > conftest.$ac_ext <<EOF
3945 #line 3946 "configure"
3946 #include "confdefs.h"
3947
3948 #include <stdio.h>
3949 #include <sys/types.h>
3950 #include <errno.h> 
3951 int main() {
3952 char *c = (char *) *sys_errlist
3953 ; return 0; }
3954 EOF
3955 if { (eval echo configure:3956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3956   rm -rf conftest*
3957   cf_cv_dcl_sys_errlist=yes
3958 else
3959   echo "configure: failed program was:" >&5
3960   cat conftest.$ac_ext >&5
3961   rm -rf conftest*
3962   cf_cv_dcl_sys_errlist=no
3963 fi
3964 rm -f conftest*
3965 fi
3966
3967 echo "$ac_t""$cf_cv_dcl_sys_errlist" 1>&6
3968
3969 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
3970 if test $cf_cv_dcl_sys_errlist = no ; then
3971         cat >> confdefs.h <<\EOF
3972 #define DECL_SYS_ERRLIST 1
3973 EOF
3974
3975         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
3976 echo "configure:3977: checking existence of sys_errlist" >&5
3977         if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then
3978   echo $ac_n "(cached) $ac_c" 1>&6
3979 else
3980   
3981                 cat > conftest.$ac_ext <<EOF
3982 #line 3983 "configure"
3983 #include "confdefs.h"
3984 #include <errno.h>
3985 int main() {
3986 char *c = (char *) *sys_errlist
3987 ; return 0; }
3988 EOF
3989 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3990   rm -rf conftest*
3991   cf_cv_have_sys_errlist=yes
3992 else
3993   echo "configure: failed program was:" >&5
3994   cat conftest.$ac_ext >&5
3995   rm -rf conftest*
3996   cf_cv_have_sys_errlist=no
3997 fi
3998 rm -f conftest*
3999 fi
4000
4001         echo "$ac_t""$cf_cv_have_sys_errlist" 1>&6
4002 fi
4003
4004
4005
4006
4007   
4008   
4009   
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019   
4020   
4021   
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033 trap '' 1 2 15
4034 cat > confcache <<\EOF
4035 # This file is a shell script that caches the results of configure
4036 # tests run on this system so they can be shared between configure
4037 # scripts and configure runs.  It is not useful on other systems.
4038 # If it contains results you don't want to keep, you may remove or edit it.
4039 #
4040 # By default, configure uses ./config.cache as the cache file,
4041 # creating it if it does not exist already.  You can give configure
4042 # the --cache-file=FILE option to use a different cache file; that is
4043 # what configure does when it calls configure scripts in
4044 # subdirectories, so they share the cache.
4045 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4046 # config.status only pays attention to the cache file if you give it the
4047 # --recheck option to rerun configure.
4048 #
4049 EOF
4050 # The following way of writing the cache mishandles newlines in values,
4051 # but we know of no workaround that is simple, portable, and efficient.
4052 # So, don't put newlines in cache variables' values.
4053 # Ultrix sh set writes to stderr and can't be redirected directly,
4054 # and sets the high bit in the cache file unless we assign to the vars.
4055 (set) 2>&1 |
4056   case `(ac_space=' '; set) 2>&1` in
4057   *ac_space=\ *)
4058     # `set' does not quote correctly, so add quotes (double-quote substitution
4059     # turns \\\\ into \\, and sed turns \\ into \).
4060     sed -n \
4061       -e "s/'/'\\\\''/g" \
4062       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4063     ;;
4064   *)
4065     # `set' quotes correctly as required by POSIX, so do not add quotes.
4066     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4067     ;;
4068   esac >> confcache
4069 if cmp -s $cache_file confcache; then
4070   :
4071 else
4072   if test -w $cache_file; then
4073     echo "updating cache $cache_file"
4074     cat confcache > $cache_file
4075   else
4076     echo "not updating unwritable cache $cache_file"
4077   fi
4078 fi
4079 rm -f confcache
4080
4081 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4082
4083 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4084 # Let make expand exec_prefix.
4085 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4086
4087 # Any assignment to VPATH causes Sun make to only execute
4088 # the first set of double-colon rules, so remove it if not needed.
4089 # If there is a colon in the path, we need to keep it.
4090 if test "x$srcdir" = x.; then
4091   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4092 fi
4093
4094 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4095
4096 DEFS=-DHAVE_CONFIG_H
4097
4098 # Without the "./", some shells look in PATH for config.status.
4099 : ${CONFIG_STATUS=./config.status}
4100
4101 echo creating $CONFIG_STATUS
4102 rm -f $CONFIG_STATUS
4103 cat > $CONFIG_STATUS <<EOF
4104 #! /bin/sh
4105 # Generated automatically by configure.
4106 # Run this file to recreate the current configuration.
4107 # This directory was configured as follows,
4108 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4109 #
4110 # $0 $ac_configure_args
4111 #
4112 # Compiler output produced by configure, useful for debugging
4113 # configure, is in ./config.log if it exists.
4114
4115 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4116 for ac_option
4117 do
4118   case "\$ac_option" in
4119   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4120     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4121     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4122   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4123     echo "$CONFIG_STATUS generated by autoconf version 2.12"
4124     exit 0 ;;
4125   -help | --help | --hel | --he | --h)
4126     echo "\$ac_cs_usage"; exit 0 ;;
4127   *) echo "\$ac_cs_usage"; exit 1 ;;
4128   esac
4129 done
4130
4131 ac_given_srcdir=$srcdir
4132 ac_given_INSTALL="$INSTALL"
4133
4134 trap 'rm -fr `echo "\
4135 Makefile:build/top.mk:Makefile.in:build/dir.mk \
4136 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
4137 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
4138 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
4139 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
4140 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
4141 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
4142 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
4143 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
4144 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
4145 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
4146 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
4147 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
4148 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
4149 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
4150 include/Makefile:build/top.mk:include/Makefile.in \
4151 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
4152 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
4153 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
4154 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
4155 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
4156 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
4157 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
4158 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
4159 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
4160 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
4161 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
4162 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
4163 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
4164 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
4165 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
4166 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
4167 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
4168 tests/Makefile:build/top.mk:tests/Makefile.in \
4169  include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4170 EOF
4171 cat >> $CONFIG_STATUS <<EOF
4172
4173 # Protect against being on the right side of a sed subst in config.status.
4174 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4175  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4176 $ac_vpsub
4177 $extrasub
4178 s%@CFLAGS@%$CFLAGS%g
4179 s%@CPPFLAGS@%$CPPFLAGS%g
4180 s%@CXXFLAGS@%$CXXFLAGS%g
4181 s%@DEFS@%$DEFS%g
4182 s%@LDFLAGS@%$LDFLAGS%g
4183 s%@LIBS@%$LIBS%g
4184 s%@exec_prefix@%$exec_prefix%g
4185 s%@prefix@%$prefix%g
4186 s%@program_transform_name@%$program_transform_name%g
4187 s%@bindir@%$bindir%g
4188 s%@sbindir@%$sbindir%g
4189 s%@libexecdir@%$libexecdir%g
4190 s%@datadir@%$datadir%g
4191 s%@sysconfdir@%$sysconfdir%g
4192 s%@sharedstatedir@%$sharedstatedir%g
4193 s%@localstatedir@%$localstatedir%g
4194 s%@libdir@%$libdir%g
4195 s%@includedir@%$includedir%g
4196 s%@oldincludedir@%$oldincludedir%g
4197 s%@infodir@%$infodir%g
4198 s%@mandir@%$mandir%g
4199 s%@CC@%$CC%g
4200 s%@CPP@%$CPP%g
4201 s%@LN_S@%$LN_S%g
4202 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4203 s%@INSTALL_DATA@%$INSTALL_DATA%g
4204 s%@RANLIB@%$RANLIB%g
4205 s%@SET_MAKE@%$SET_MAKE%g
4206 s%@SENDMAIL@%$SENDMAIL%g
4207 s%@EDITOR@%$EDITOR%g
4208 s%@FINGER@%$FINGER%g
4209 s%@LIBTERMCAP@%$LIBTERMCAP%g
4210 s%@LIBOBJS@%$LIBOBJS%g
4211 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
4212 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
4213 s%@BUILD_LDBM@%$BUILD_LDBM%g
4214 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
4215 s%@BUILD_SHELL@%$BUILD_SHELL%g
4216 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
4217 s%@LDAP_DEFS@%$LDAP_DEFS%g
4218 s%@LDAP_LIBS@%$LDAP_LIBS%g
4219 s%@LDAPD_DEFS@%$LDAPD_DEFS%g
4220 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
4221 s%@SLAPD_DEFS@%$SLAPD_DEFS%g
4222 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
4223 s%@SLAPD_LDBM@%$SLAPD_LDBM%g
4224 s%@SLAPD_PASSWD@%$SLAPD_PASSWD%g
4225 s%@SLAPD_SHELL@%$SLAPD_SHELL%g
4226 s%@SLURPD_DEFS@%$SLURPD_DEFS%g
4227 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
4228 s%@LDBM_DEFS@%$LDBM_DEFS%g
4229 s%@LDBM_LIBS@%$LDBM_LIBS%g
4230 s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g
4231 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
4232 s%@LUTIL_DEFS@%$LUTIL_DEFS%g
4233 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
4234
4235 CEOF
4236 EOF
4237
4238 cat >> $CONFIG_STATUS <<\EOF
4239
4240 # Split the substitutions into bite-sized pieces for seds with
4241 # small command number limits, like on Digital OSF/1 and HP-UX.
4242 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4243 ac_file=1 # Number of current file.
4244 ac_beg=1 # First line for current file.
4245 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4246 ac_more_lines=:
4247 ac_sed_cmds=""
4248 while $ac_more_lines; do
4249   if test $ac_beg -gt 1; then
4250     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4251   else
4252     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4253   fi
4254   if test ! -s conftest.s$ac_file; then
4255     ac_more_lines=false
4256     rm -f conftest.s$ac_file
4257   else
4258     if test -z "$ac_sed_cmds"; then
4259       ac_sed_cmds="sed -f conftest.s$ac_file"
4260     else
4261       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4262     fi
4263     ac_file=`expr $ac_file + 1`
4264     ac_beg=$ac_end
4265     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4266   fi
4267 done
4268 if test -z "$ac_sed_cmds"; then
4269   ac_sed_cmds=cat
4270 fi
4271 EOF
4272
4273 cat >> $CONFIG_STATUS <<EOF
4274
4275 CONFIG_FILES=\${CONFIG_FILES-"\
4276 Makefile:build/top.mk:Makefile.in:build/dir.mk \
4277 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
4278 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
4279 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
4280 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
4281 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
4282 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
4283 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
4284 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
4285 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
4286 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
4287 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
4288 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
4289 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
4290 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
4291 include/Makefile:build/top.mk:include/Makefile.in \
4292 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
4293 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
4294 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
4295 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
4296 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
4297 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
4298 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
4299 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
4300 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
4301 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
4302 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
4303 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
4304 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
4305 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
4306 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
4307 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
4308 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
4309 tests/Makefile:build/top.mk:tests/Makefile.in \
4310 "}
4311 EOF
4312 cat >> $CONFIG_STATUS <<\EOF
4313 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4314   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4315   case "$ac_file" in
4316   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4317        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4318   *) ac_file_in="${ac_file}.in" ;;
4319   esac
4320
4321   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4322
4323   # Remove last slash and all that follows it.  Not all systems have dirname.
4324   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4325   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4326     # The file is in a subdirectory.
4327     test ! -d "$ac_dir" && mkdir "$ac_dir"
4328     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4329     # A "../" for each directory in $ac_dir_suffix.
4330     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4331   else
4332     ac_dir_suffix= ac_dots=
4333   fi
4334
4335   case "$ac_given_srcdir" in
4336   .)  srcdir=.
4337       if test -z "$ac_dots"; then top_srcdir=.
4338       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4339   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4340   *) # Relative path.
4341     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4342     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4343   esac
4344
4345   case "$ac_given_INSTALL" in
4346   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4347   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4348   esac
4349
4350   echo creating "$ac_file"
4351   rm -f "$ac_file"
4352   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4353   case "$ac_file" in
4354   *Makefile*) ac_comsub="1i\\
4355 # $configure_input" ;;
4356   *) ac_comsub= ;;
4357   esac
4358
4359   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4360   sed -e "$ac_comsub
4361 s%@configure_input@%$configure_input%g
4362 s%@srcdir@%$srcdir%g
4363 s%@top_srcdir@%$top_srcdir%g
4364 s%@INSTALL@%$INSTALL%g
4365 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4366 fi; done
4367 rm -f conftest.s*
4368
4369 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4370 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4371 #
4372 # ac_d sets the value in "#define NAME VALUE" lines.
4373 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4374 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4375 ac_dC='\3'
4376 ac_dD='%g'
4377 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4378 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4379 ac_uB='\([      ]\)%\1#\2define\3'
4380 ac_uC=' '
4381 ac_uD='\4%g'
4382 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4383 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4384 ac_eB='$%\1#\2define\3'
4385 ac_eC=' '
4386 ac_eD='%g'
4387
4388 if test "${CONFIG_HEADERS+set}" != set; then
4389 EOF
4390 cat >> $CONFIG_STATUS <<EOF
4391   CONFIG_HEADERS="include/portable.h"
4392 EOF
4393 cat >> $CONFIG_STATUS <<\EOF
4394 fi
4395 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4396   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4397   case "$ac_file" in
4398   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4399        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4400   *) ac_file_in="${ac_file}.in" ;;
4401   esac
4402
4403   echo creating $ac_file
4404
4405   rm -f conftest.frag conftest.in conftest.out
4406   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4407   cat $ac_file_inputs > conftest.in
4408
4409 EOF
4410
4411 # Transform confdefs.h into a sed script conftest.vals that substitutes
4412 # the proper values into config.h.in to produce config.h.  And first:
4413 # Protect against being on the right side of a sed subst in config.status.
4414 # Protect against being in an unquoted here document in config.status.
4415 rm -f conftest.vals
4416 cat > conftest.hdr <<\EOF
4417 s/[\\&%]/\\&/g
4418 s%[\\$`]%\\&%g
4419 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4420 s%ac_d%ac_u%gp
4421 s%ac_u%ac_e%gp
4422 EOF
4423 sed -n -f conftest.hdr confdefs.h > conftest.vals
4424 rm -f conftest.hdr
4425
4426 # This sed command replaces #undef with comments.  This is necessary, for
4427 # example, in the case of _POSIX_SOURCE, which is predefined and required
4428 # on some systems where configure will not decide to define it.
4429 cat >> conftest.vals <<\EOF
4430 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4431 EOF
4432
4433 # Break up conftest.vals because some shells have a limit on
4434 # the size of here documents, and old seds have small limits too.
4435
4436 rm -f conftest.tail
4437 while :
4438 do
4439   ac_lines=`grep -c . conftest.vals`
4440   # grep -c gives empty output for an empty file on some AIX systems.
4441   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4442   # Write a limited-size here document to conftest.frag.
4443   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4444   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4445   echo 'CEOF
4446   sed -f conftest.frag conftest.in > conftest.out
4447   rm -f conftest.in
4448   mv conftest.out conftest.in
4449 ' >> $CONFIG_STATUS
4450   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4451   rm -f conftest.vals
4452   mv conftest.tail conftest.vals
4453 done
4454 rm -f conftest.vals
4455
4456 cat >> $CONFIG_STATUS <<\EOF
4457   rm -f conftest.frag conftest.h
4458   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4459   cat conftest.in >> conftest.h
4460   rm -f conftest.in
4461   if cmp -s $ac_file conftest.h 2>/dev/null; then
4462     echo "$ac_file is unchanged"
4463     rm -f conftest.h
4464   else
4465     # Remove last slash and all that follows it.  Not all systems have dirname.
4466       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4467       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4468       # The file is in a subdirectory.
4469       test ! -d "$ac_dir" && mkdir "$ac_dir"
4470     fi
4471     rm -f $ac_file
4472     mv conftest.h $ac_file
4473   fi
4474 fi; done
4475
4476 EOF
4477 cat >> $CONFIG_STATUS <<EOF
4478
4479 EOF
4480 cat >> $CONFIG_STATUS <<\EOF
4481 date > stamp-h
4482 exit 0
4483 EOF
4484 chmod +x $CONFIG_STATUS
4485 rm -fr confdefs* $ac_clean_files
4486 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4487