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