]> git.sur5r.net Git - openldap/blob - configure
1222f05fe647456c9a1c19d924ad2e858dafc4f3
[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     LDAP_TCP_WRAPPERS=no
803   fi
804 else
805   enableval=no 
806   LDAP_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 LDAP_DEFS=
977 LDAP_LIBS=
978
979 if test "$LDAP_DEBUG" = "yes" ; then
980         LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG"
981 fi
982 if test "$LDAP_REFERRALS" = "yes" ; then
983         cat >> confdefs.h <<\EOF
984 #define LDAP_REFERRALS 1
985 EOF
986
987         LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS"
988 fi
989 if test "$LDAP_CACHE" = "no" ; then
990         cat >> confdefs.h <<\EOF
991 #define LDAP_NOCACHE 1
992 EOF
993
994         LDAP_DEFS="$LDAP_DEFS -DNO_CACHE"
995 fi
996 if test "$LDAP_CLDAP" = "yes" ; then
997         cat >> confdefs.h <<\EOF
998 #define LDAP_CONNECTIONLESS 1
999 EOF
1000
1001         LDAP_DEFS="$LDAP_DEFS -DCLDAP"
1002 fi
1003
1004 LTHREAD_LIBS=
1005 if test "$opt_thread" = "no" ; then
1006         LTHREAD_DEFS="-DNO_THREADS"
1007         BUILD_SLURPD=no
1008 else
1009         LTHREAD_DEFS="-DNO_THREADS"
1010 fi
1011
1012 LDAPD_DEFS=
1013 LDAPD_LIBS=
1014
1015 SLAPD_DEFS=
1016 if test "$SLAPD_PHONETIC" = "yes" ; then
1017         cat >> confdefs.h <<\EOF
1018 #define SLAPD_PHONETIC 1
1019 EOF
1020
1021         SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX"
1022 fi
1023
1024 if test "$SLAPD_LDBM" = "yes" ; then
1025         SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM"
1026 fi
1027 if test "$SLAPD_PASSWD" = "yes" ; then
1028         SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD"
1029 fi
1030 if test "$SLAPD_SHELL" = "yes" ; then
1031         SLAPD_DEFS="$SLAPD_DEFS -DLDAP_SHELL"
1032 fi
1033
1034 SLURPD_DEFS=
1035
1036
1037 # Extract the first word of "gcc", so it can be a program name with args.
1038 set dummy gcc; ac_word=$2
1039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1040 echo "configure:1041: checking for $ac_word" >&5
1041 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1042   echo $ac_n "(cached) $ac_c" 1>&6
1043 else
1044   if test -n "$CC"; then
1045   ac_cv_prog_CC="$CC" # Let the user override the test.
1046 else
1047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1048   for ac_dir in $PATH; do
1049     test -z "$ac_dir" && ac_dir=.
1050     if test -f $ac_dir/$ac_word; then
1051       ac_cv_prog_CC="gcc"
1052       break
1053     fi
1054   done
1055   IFS="$ac_save_ifs"
1056 fi
1057 fi
1058 CC="$ac_cv_prog_CC"
1059 if test -n "$CC"; then
1060   echo "$ac_t""$CC" 1>&6
1061 else
1062   echo "$ac_t""no" 1>&6
1063 fi
1064
1065 if test -z "$CC"; then
1066   # Extract the first word of "cc", so it can be a program name with args.
1067 set dummy cc; ac_word=$2
1068 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1069 echo "configure:1070: checking for $ac_word" >&5
1070 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1071   echo $ac_n "(cached) $ac_c" 1>&6
1072 else
1073   if test -n "$CC"; then
1074   ac_cv_prog_CC="$CC" # Let the user override the test.
1075 else
1076   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1077   ac_prog_rejected=no
1078   for ac_dir in $PATH; do
1079     test -z "$ac_dir" && ac_dir=.
1080     if test -f $ac_dir/$ac_word; then
1081       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1082         ac_prog_rejected=yes
1083         continue
1084       fi
1085       ac_cv_prog_CC="cc"
1086       break
1087     fi
1088   done
1089   IFS="$ac_save_ifs"
1090 if test $ac_prog_rejected = yes; then
1091   # We found a bogon in the path, so make sure we never use it.
1092   set dummy $ac_cv_prog_CC
1093   shift
1094   if test $# -gt 0; then
1095     # We chose a different compiler from the bogus one.
1096     # However, it has the same basename, so the bogon will be chosen
1097     # first if we set CC to just the basename; use the full file name.
1098     shift
1099     set dummy "$ac_dir/$ac_word" "$@"
1100     shift
1101     ac_cv_prog_CC="$@"
1102   fi
1103 fi
1104 fi
1105 fi
1106 CC="$ac_cv_prog_CC"
1107 if test -n "$CC"; then
1108   echo "$ac_t""$CC" 1>&6
1109 else
1110   echo "$ac_t""no" 1>&6
1111 fi
1112
1113   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1114 fi
1115
1116 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1117 echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1118
1119 ac_ext=c
1120 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1121 ac_cpp='$CPP $CPPFLAGS'
1122 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1123 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1124 cross_compiling=$ac_cv_prog_cc_cross
1125
1126 cat > conftest.$ac_ext <<EOF
1127 #line 1128 "configure"
1128 #include "confdefs.h"
1129 main(){return(0);}
1130 EOF
1131 if { (eval echo configure:1132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1132   ac_cv_prog_cc_works=yes
1133   # If we can't run a trivial program, we are probably using a cross compiler.
1134   if (./conftest; exit) 2>/dev/null; then
1135     ac_cv_prog_cc_cross=no
1136   else
1137     ac_cv_prog_cc_cross=yes
1138   fi
1139 else
1140   echo "configure: failed program was:" >&5
1141   cat conftest.$ac_ext >&5
1142   ac_cv_prog_cc_works=no
1143 fi
1144 rm -fr conftest*
1145
1146 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1147 if test $ac_cv_prog_cc_works = no; then
1148   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1149 fi
1150 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1151 echo "configure:1152: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1152 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1153 cross_compiling=$ac_cv_prog_cc_cross
1154
1155 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1156 echo "configure:1157: checking whether we are using GNU C" >&5
1157 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1158   echo $ac_n "(cached) $ac_c" 1>&6
1159 else
1160   cat > conftest.c <<EOF
1161 #ifdef __GNUC__
1162   yes;
1163 #endif
1164 EOF
1165 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1166   ac_cv_prog_gcc=yes
1167 else
1168   ac_cv_prog_gcc=no
1169 fi
1170 fi
1171
1172 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1173
1174 if test $ac_cv_prog_gcc = yes; then
1175   GCC=yes
1176   ac_test_CFLAGS="${CFLAGS+set}"
1177   ac_save_CFLAGS="$CFLAGS"
1178   CFLAGS=
1179   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1180 echo "configure:1181: checking whether ${CC-cc} accepts -g" >&5
1181 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1182   echo $ac_n "(cached) $ac_c" 1>&6
1183 else
1184   echo 'void f(){}' > conftest.c
1185 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1186   ac_cv_prog_cc_g=yes
1187 else
1188   ac_cv_prog_cc_g=no
1189 fi
1190 rm -f conftest*
1191
1192 fi
1193
1194 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1195   if test "$ac_test_CFLAGS" = set; then
1196     CFLAGS="$ac_save_CFLAGS"
1197   elif test $ac_cv_prog_cc_g = yes; then
1198     CFLAGS="-g -O2"
1199   else
1200     CFLAGS="-O2"
1201   fi
1202 else
1203   GCC=
1204   test "${CFLAGS+set}" = set || CFLAGS="-g"
1205 fi
1206
1207 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1208 echo "configure:1209: checking how to run the C preprocessor" >&5
1209 # On Suns, sometimes $CPP names a directory.
1210 if test -n "$CPP" && test -d "$CPP"; then
1211   CPP=
1212 fi
1213 if test -z "$CPP"; then
1214 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1215   echo $ac_n "(cached) $ac_c" 1>&6
1216 else
1217     # This must be in double quotes, not single quotes, because CPP may get
1218   # substituted into the Makefile and "${CC-cc}" will confuse make.
1219   CPP="${CC-cc} -E"
1220   # On the NeXT, cc -E runs the code through the compiler's parser,
1221   # not just through cpp.
1222   cat > conftest.$ac_ext <<EOF
1223 #line 1224 "configure"
1224 #include "confdefs.h"
1225 #include <assert.h>
1226 Syntax Error
1227 EOF
1228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1229 { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1230 ac_err=`grep -v '^ *+' conftest.out`
1231 if test -z "$ac_err"; then
1232   :
1233 else
1234   echo "$ac_err" >&5
1235   echo "configure: failed program was:" >&5
1236   cat conftest.$ac_ext >&5
1237   rm -rf conftest*
1238   CPP="${CC-cc} -E -traditional-cpp"
1239   cat > conftest.$ac_ext <<EOF
1240 #line 1241 "configure"
1241 #include "confdefs.h"
1242 #include <assert.h>
1243 Syntax Error
1244 EOF
1245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1246 { (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1247 ac_err=`grep -v '^ *+' conftest.out`
1248 if test -z "$ac_err"; then
1249   :
1250 else
1251   echo "$ac_err" >&5
1252   echo "configure: failed program was:" >&5
1253   cat conftest.$ac_ext >&5
1254   rm -rf conftest*
1255   CPP=/lib/cpp
1256 fi
1257 rm -f conftest*
1258 fi
1259 rm -f conftest*
1260   ac_cv_prog_CPP="$CPP"
1261 fi
1262   CPP="$ac_cv_prog_CPP"
1263 else
1264   ac_cv_prog_CPP="$CPP"
1265 fi
1266 echo "$ac_t""$CPP" 1>&6
1267
1268 if test $ac_cv_prog_gcc = yes; then
1269     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1270 echo "configure:1271: checking whether ${CC-cc} needs -traditional" >&5
1271 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1272   echo $ac_n "(cached) $ac_c" 1>&6
1273 else
1274     ac_pattern="Autoconf.*'x'"
1275   cat > conftest.$ac_ext <<EOF
1276 #line 1277 "configure"
1277 #include "confdefs.h"
1278 #include <sgtty.h>
1279 Autoconf TIOCGETP
1280 EOF
1281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1282   egrep "$ac_pattern" >/dev/null 2>&1; then
1283   rm -rf conftest*
1284   ac_cv_prog_gcc_traditional=yes
1285 else
1286   rm -rf conftest*
1287   ac_cv_prog_gcc_traditional=no
1288 fi
1289 rm -f conftest*
1290
1291
1292   if test $ac_cv_prog_gcc_traditional = no; then
1293     cat > conftest.$ac_ext <<EOF
1294 #line 1295 "configure"
1295 #include "confdefs.h"
1296 #include <termio.h>
1297 Autoconf TCGETA
1298 EOF
1299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1300   egrep "$ac_pattern" >/dev/null 2>&1; then
1301   rm -rf conftest*
1302   ac_cv_prog_gcc_traditional=yes
1303 fi
1304 rm -f conftest*
1305
1306   fi
1307 fi
1308
1309 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1310   if test $ac_cv_prog_gcc_traditional = yes; then
1311     CC="$CC -traditional"
1312   fi
1313 fi
1314
1315
1316 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1317 echo "configure:1318: checking whether ln -s works" >&5
1318 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1319   echo $ac_n "(cached) $ac_c" 1>&6
1320 else
1321   rm -f conftestdata
1322 if ln -s X conftestdata 2>/dev/null
1323 then
1324   rm -f conftestdata
1325   ac_cv_prog_LN_S="ln -s"
1326 else
1327   ac_cv_prog_LN_S=ln
1328 fi
1329 fi
1330 LN_S="$ac_cv_prog_LN_S"
1331 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1332   echo "$ac_t""yes" 1>&6
1333 else
1334   echo "$ac_t""no" 1>&6
1335 fi
1336
1337 # Find a good install program.  We prefer a C program (faster),
1338 # so one script is as good as another.  But avoid the broken or
1339 # incompatible versions:
1340 # SysV /etc/install, /usr/sbin/install
1341 # SunOS /usr/etc/install
1342 # IRIX /sbin/install
1343 # AIX /bin/install
1344 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1345 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1346 # ./install, which can be erroneously created by make from ./install.sh.
1347 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1348 echo "configure:1349: checking for a BSD compatible install" >&5
1349 if test -z "$INSTALL"; then
1350 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1351   echo $ac_n "(cached) $ac_c" 1>&6
1352 else
1353     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1354   for ac_dir in $PATH; do
1355     # Account for people who put trailing slashes in PATH elements.
1356     case "$ac_dir/" in
1357     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1358     *)
1359       # OSF1 and SCO ODT 3.0 have their own names for install.
1360       for ac_prog in ginstall installbsd scoinst install; do
1361         if test -f $ac_dir/$ac_prog; then
1362           if test $ac_prog = install &&
1363             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1364             # AIX install.  It has an incompatible calling convention.
1365             # OSF/1 installbsd also uses dspmsg, but is usable.
1366             :
1367           else
1368             ac_cv_path_install="$ac_dir/$ac_prog -c"
1369             break 2
1370           fi
1371         fi
1372       done
1373       ;;
1374     esac
1375   done
1376   IFS="$ac_save_IFS"
1377
1378 fi
1379   if test "${ac_cv_path_install+set}" = set; then
1380     INSTALL="$ac_cv_path_install"
1381   else
1382     # As a last resort, use the slow shell script.  We don't cache a
1383     # path for INSTALL within a source directory, because that will
1384     # break other packages using the cache if that directory is
1385     # removed, or if the path is relative.
1386     INSTALL="$ac_install_sh"
1387   fi
1388 fi
1389 echo "$ac_t""$INSTALL" 1>&6
1390
1391 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1392 # It thinks the first close brace ends the variable substitution.
1393 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1394
1395 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1396
1397 # Extract the first word of "ranlib", so it can be a program name with args.
1398 set dummy ranlib; ac_word=$2
1399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1400 echo "configure:1401: checking for $ac_word" >&5
1401 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1402   echo $ac_n "(cached) $ac_c" 1>&6
1403 else
1404   if test -n "$RANLIB"; then
1405   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1406 else
1407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1408   for ac_dir in $PATH; do
1409     test -z "$ac_dir" && ac_dir=.
1410     if test -f $ac_dir/$ac_word; then
1411       ac_cv_prog_RANLIB="ranlib"
1412       break
1413     fi
1414   done
1415   IFS="$ac_save_ifs"
1416   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1417 fi
1418 fi
1419 RANLIB="$ac_cv_prog_RANLIB"
1420 if test -n "$RANLIB"; then
1421   echo "$ac_t""$RANLIB" 1>&6
1422 else
1423   echo "$ac_t""no" 1>&6
1424 fi
1425
1426 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1427 echo "configure:1428: checking whether ${MAKE-make} sets \${MAKE}" >&5
1428 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1429 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1430   echo $ac_n "(cached) $ac_c" 1>&6
1431 else
1432   cat > conftestmake <<\EOF
1433 all:
1434         @echo 'ac_maketemp="${MAKE}"'
1435 EOF
1436 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1437 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1438 if test -n "$ac_maketemp"; then
1439   eval ac_cv_prog_make_${ac_make}_set=yes
1440 else
1441   eval ac_cv_prog_make_${ac_make}_set=no
1442 fi
1443 rm -f conftestmake
1444 fi
1445 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1446   echo "$ac_t""yes" 1>&6
1447   SET_MAKE=
1448 else
1449   echo "$ac_t""no" 1>&6
1450   SET_MAKE="MAKE=${MAKE-make}"
1451 fi
1452
1453
1454 # Extract the first word of "sendmail", so it can be a program name with args.
1455 set dummy sendmail; ac_word=$2
1456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1457 echo "configure:1458: checking for $ac_word" >&5
1458 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
1459   echo $ac_n "(cached) $ac_c" 1>&6
1460 else
1461   case "$SENDMAIL" in
1462   /*)
1463   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
1464   ;;
1465   *)
1466   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1467   for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do
1468     test -z "$ac_dir" && ac_dir=.
1469     if test -f $ac_dir/$ac_word; then
1470       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
1471       break
1472     fi
1473   done
1474   IFS="$ac_save_ifs"
1475   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
1476   ;;
1477 esac
1478 fi
1479 SENDMAIL="$ac_cv_path_SENDMAIL"
1480 if test -n "$SENDMAIL"; then
1481   echo "$ac_t""$SENDMAIL" 1>&6
1482 else
1483   echo "$ac_t""no" 1>&6
1484 fi
1485
1486 # Extract the first word of "vi", so it can be a program name with args.
1487 set dummy vi; ac_word=$2
1488 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1489 echo "configure:1490: checking for $ac_word" >&5
1490 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
1491   echo $ac_n "(cached) $ac_c" 1>&6
1492 else
1493   case "$EDITOR" in
1494   /*)
1495   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
1496   ;;
1497   *)
1498   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1499   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1500     test -z "$ac_dir" && ac_dir=.
1501     if test -f $ac_dir/$ac_word; then
1502       ac_cv_path_EDITOR="$ac_dir/$ac_word"
1503       break
1504     fi
1505   done
1506   IFS="$ac_save_ifs"
1507   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
1508   ;;
1509 esac
1510 fi
1511 EDITOR="$ac_cv_path_EDITOR"
1512 if test -n "$EDITOR"; then
1513   echo "$ac_t""$EDITOR" 1>&6
1514 else
1515   echo "$ac_t""no" 1>&6
1516 fi
1517
1518 # Extract the first word of "finger", so it can be a program name with args.
1519 set dummy finger; ac_word=$2
1520 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1521 echo "configure:1522: checking for $ac_word" >&5
1522 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
1523   echo $ac_n "(cached) $ac_c" 1>&6
1524 else
1525   case "$FINGER" in
1526   /*)
1527   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
1528   ;;
1529   *)
1530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1531   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1532     test -z "$ac_dir" && ac_dir=.
1533     if test -f $ac_dir/$ac_word; then
1534       ac_cv_path_FINGER="$ac_dir/$ac_word"
1535       break
1536     fi
1537   done
1538   IFS="$ac_save_ifs"
1539   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
1540   ;;
1541 esac
1542 fi
1543 FINGER="$ac_cv_path_FINGER"
1544 if test -n "$FINGER"; then
1545   echo "$ac_t""$FINGER" 1>&6
1546 else
1547   echo "$ac_t""no" 1>&6
1548 fi
1549
1550
1551 ldbm_use="none"
1552 LDBM_LIB=""
1553 LDBM_DEFS=""
1554
1555 if test "$SLAPD_LDBM" = "yes" ; then
1556         if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \
1557                         -o $ldbm_prefer = dbhash ; then
1558                 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
1559 echo "configure:1560: checking for dbopen" >&5
1560 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
1561   echo $ac_n "(cached) $ac_c" 1>&6
1562 else
1563   cat > conftest.$ac_ext <<EOF
1564 #line 1565 "configure"
1565 #include "confdefs.h"
1566 /* System header to define __stub macros and hopefully few prototypes,
1567     which can conflict with char dbopen(); below.  */
1568 #include <assert.h>
1569 /* Override any gcc2 internal prototype to avoid an error.  */
1570 /* We use char because int might match the return type of a gcc2
1571     builtin and then its argument prototype would still apply.  */
1572 char dbopen();
1573
1574 int main() {
1575
1576 /* The GNU C library defines this for functions which it implements
1577     to always fail with ENOSYS.  Some functions are actually named
1578     something starting with __ and the normal name is an alias.  */
1579 #if defined (__stub_dbopen) || defined (__stub___dbopen)
1580 choke me
1581 #else
1582 dbopen();
1583 #endif
1584
1585 ; return 0; }
1586 EOF
1587 if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1588   rm -rf conftest*
1589   eval "ac_cv_func_dbopen=yes"
1590 else
1591   echo "configure: failed program was:" >&5
1592   cat conftest.$ac_ext >&5
1593   rm -rf conftest*
1594   eval "ac_cv_func_dbopen=no"
1595 fi
1596 rm -f conftest*
1597 fi
1598
1599 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
1600   echo "$ac_t""yes" 1>&6
1601   
1602                         ldbm_use=$ldbm_prefer
1603                         ldbm_prefer=found
1604 else
1605   echo "$ac_t""no" 1>&6
1606
1607                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
1608 echo "configure:1609: checking for dbopen in -ldb" >&5
1609 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
1610 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1611   echo $ac_n "(cached) $ac_c" 1>&6
1612 else
1613   ac_save_LIBS="$LIBS"
1614 LIBS="-ldb  $LIBS"
1615 cat > conftest.$ac_ext <<EOF
1616 #line 1617 "configure"
1617 #include "confdefs.h"
1618 /* Override any gcc2 internal prototype to avoid an error.  */
1619 /* We use char because int might match the return type of a gcc2
1620     builtin and then its argument prototype would still apply.  */
1621 char dbopen();
1622
1623 int main() {
1624 dbopen()
1625 ; return 0; }
1626 EOF
1627 if { (eval echo configure:1628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1628   rm -rf conftest*
1629   eval "ac_cv_lib_$ac_lib_var=yes"
1630 else
1631   echo "configure: failed program was:" >&5
1632   cat conftest.$ac_ext >&5
1633   rm -rf conftest*
1634   eval "ac_cv_lib_$ac_lib_var=no"
1635 fi
1636 rm -f conftest*
1637 LIBS="$ac_save_LIBS"
1638
1639 fi
1640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1641   echo "$ac_t""yes" 1>&6
1642   
1643                                 ldbm_use=$ldbm_prefer
1644                                 ldbm_prefer=found
1645                                 LDBM_LIB="-ldb"
1646                         
1647 else
1648   echo "$ac_t""no" 1>&6
1649 fi
1650  
1651                 
1652 fi
1653
1654
1655                 if test $ldbm_prefer = found ; then
1656                         if test $ldbm_use = dbhash ; then
1657                                 LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH"
1658                         else
1659                                 LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE"
1660                         fi
1661                 fi
1662         fi
1663
1664         if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then
1665                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
1666 echo "configure:1667: checking for gdbm_open in -lgdbm" >&5
1667 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
1668 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1669   echo $ac_n "(cached) $ac_c" 1>&6
1670 else
1671   ac_save_LIBS="$LIBS"
1672 LIBS="-lgdbm  $LIBS"
1673 cat > conftest.$ac_ext <<EOF
1674 #line 1675 "configure"
1675 #include "confdefs.h"
1676 /* Override any gcc2 internal prototype to avoid an error.  */
1677 /* We use char because int might match the return type of a gcc2
1678     builtin and then its argument prototype would still apply.  */
1679 char gdbm_open();
1680
1681 int main() {
1682 gdbm_open()
1683 ; return 0; }
1684 EOF
1685 if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1686   rm -rf conftest*
1687   eval "ac_cv_lib_$ac_lib_var=yes"
1688 else
1689   echo "configure: failed program was:" >&5
1690   cat conftest.$ac_ext >&5
1691   rm -rf conftest*
1692   eval "ac_cv_lib_$ac_lib_var=no"
1693 fi
1694 rm -f conftest*
1695 LIBS="$ac_save_LIBS"
1696
1697 fi
1698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1699   echo "$ac_t""yes" 1>&6
1700   
1701                         ldbm_use=$ldbm_prefer
1702                         ldbm_prefer=found
1703                         LDBM_LIB="-lgdbm"
1704                         LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM"
1705                 
1706 else
1707   echo "$ac_t""no" 1>&6
1708 fi
1709  
1710         fi
1711         if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then
1712                 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
1713 echo "configure:1714: checking for dbm_open in -ldbm" >&5
1714 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
1715 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1716   echo $ac_n "(cached) $ac_c" 1>&6
1717 else
1718   ac_save_LIBS="$LIBS"
1719 LIBS="-ldbm  $LIBS"
1720 cat > conftest.$ac_ext <<EOF
1721 #line 1722 "configure"
1722 #include "confdefs.h"
1723 /* Override any gcc2 internal prototype to avoid an error.  */
1724 /* We use char because int might match the return type of a gcc2
1725     builtin and then its argument prototype would still apply.  */
1726 char dbm_open();
1727
1728 int main() {
1729 dbm_open()
1730 ; return 0; }
1731 EOF
1732 if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1733   rm -rf conftest*
1734   eval "ac_cv_lib_$ac_lib_var=yes"
1735 else
1736   echo "configure: failed program was:" >&5
1737   cat conftest.$ac_ext >&5
1738   rm -rf conftest*
1739   eval "ac_cv_lib_$ac_lib_var=no"
1740 fi
1741 rm -f conftest*
1742 LIBS="$ac_save_LIBS"
1743
1744 fi
1745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1746   echo "$ac_t""yes" 1>&6
1747   
1748                         ldbm_use=ndbm
1749                         ldbm_prefer=found
1750                         LDBM_LIB="-ldbm"
1751                         LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM"
1752                 
1753 else
1754   echo "$ac_t""no" 1>&6
1755 fi
1756  
1757         fi
1758
1759         if test $ldbm_prefer != found ; then
1760                 { echo "configure: error: could not find suitable db for $ldbm_prefer backend" 1>&2; exit 1; }
1761         fi
1762
1763         if test $ldbm_use = ndbm ; then
1764                 echo "configure: warning: LDBM using NDBM" 1>&2
1765         fi
1766 fi
1767
1768 # ud needs termcap (should insert check here)
1769 LIBTERMCAP="-ltermcap"
1770
1771
1772 # FreeBSD (and others) have crypt(3) in -lcrypt
1773 LIBCRYPT=
1774 echo $ac_n "checking for crypt""... $ac_c" 1>&6
1775 echo "configure:1776: checking for crypt" >&5
1776 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
1777   echo $ac_n "(cached) $ac_c" 1>&6
1778 else
1779   cat > conftest.$ac_ext <<EOF
1780 #line 1781 "configure"
1781 #include "confdefs.h"
1782 /* System header to define __stub macros and hopefully few prototypes,
1783     which can conflict with char crypt(); below.  */
1784 #include <assert.h>
1785 /* Override any gcc2 internal prototype to avoid an error.  */
1786 /* We use char because int might match the return type of a gcc2
1787     builtin and then its argument prototype would still apply.  */
1788 char crypt();
1789
1790 int main() {
1791
1792 /* The GNU C library defines this for functions which it implements
1793     to always fail with ENOSYS.  Some functions are actually named
1794     something starting with __ and the normal name is an alias.  */
1795 #if defined (__stub_crypt) || defined (__stub___crypt)
1796 choke me
1797 #else
1798 crypt();
1799 #endif
1800
1801 ; return 0; }
1802 EOF
1803 if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1804   rm -rf conftest*
1805   eval "ac_cv_func_crypt=yes"
1806 else
1807   echo "configure: failed program was:" >&5
1808   cat conftest.$ac_ext >&5
1809   rm -rf conftest*
1810   eval "ac_cv_func_crypt=no"
1811 fi
1812 rm -f conftest*
1813 fi
1814
1815 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
1816   echo "$ac_t""yes" 1>&6
1817   cat >> confdefs.h <<\EOF
1818 #define HAVE_CRYPT 1
1819 EOF
1820
1821 else
1822   echo "$ac_t""no" 1>&6
1823
1824         echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1825 echo "configure:1826: checking for crypt in -lcrypt" >&5
1826 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1827 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1828   echo $ac_n "(cached) $ac_c" 1>&6
1829 else
1830   ac_save_LIBS="$LIBS"
1831 LIBS="-lcrypt  $LIBS"
1832 cat > conftest.$ac_ext <<EOF
1833 #line 1834 "configure"
1834 #include "confdefs.h"
1835 /* Override any gcc2 internal prototype to avoid an error.  */
1836 /* We use char because int might match the return type of a gcc2
1837     builtin and then its argument prototype would still apply.  */
1838 char crypt();
1839
1840 int main() {
1841 crypt()
1842 ; return 0; }
1843 EOF
1844 if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1845   rm -rf conftest*
1846   eval "ac_cv_lib_$ac_lib_var=yes"
1847 else
1848   echo "configure: failed program was:" >&5
1849   cat conftest.$ac_ext >&5
1850   rm -rf conftest*
1851   eval "ac_cv_lib_$ac_lib_var=no"
1852 fi
1853 rm -f conftest*
1854 LIBS="$ac_save_LIBS"
1855
1856 fi
1857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1858   echo "$ac_t""yes" 1>&6
1859   LIBCRYPT="-lcrypt"
1860         cat >> confdefs.h <<\EOF
1861 #define HAVE_CRYPT 1
1862 EOF
1863
1864 else
1865   echo "$ac_t""no" 1>&6
1866 fi
1867
1868
1869 fi
1870
1871
1872
1873 ac_header_dirent=no
1874 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1875 do
1876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1877 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1878 echo "configure:1879: checking for $ac_hdr that defines DIR" >&5
1879 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1880   echo $ac_n "(cached) $ac_c" 1>&6
1881 else
1882   cat > conftest.$ac_ext <<EOF
1883 #line 1884 "configure"
1884 #include "confdefs.h"
1885 #include <sys/types.h>
1886 #include <$ac_hdr>
1887 int main() {
1888 DIR *dirp = 0;
1889 ; return 0; }
1890 EOF
1891 if { (eval echo configure:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1892   rm -rf conftest*
1893   eval "ac_cv_header_dirent_$ac_safe=yes"
1894 else
1895   echo "configure: failed program was:" >&5
1896   cat conftest.$ac_ext >&5
1897   rm -rf conftest*
1898   eval "ac_cv_header_dirent_$ac_safe=no"
1899 fi
1900 rm -f conftest*
1901 fi
1902 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1903   echo "$ac_t""yes" 1>&6
1904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1905   cat >> confdefs.h <<EOF
1906 #define $ac_tr_hdr 1
1907 EOF
1908  ac_header_dirent=$ac_hdr; break
1909 else
1910   echo "$ac_t""no" 1>&6
1911 fi
1912 done
1913 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1914 if test $ac_header_dirent = dirent.h; then
1915 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1916 echo "configure:1917: checking for opendir in -ldir" >&5
1917 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1918 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1919   echo $ac_n "(cached) $ac_c" 1>&6
1920 else
1921   ac_save_LIBS="$LIBS"
1922 LIBS="-ldir  $LIBS"
1923 cat > conftest.$ac_ext <<EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1926 /* Override any gcc2 internal prototype to avoid an error.  */
1927 /* We use char because int might match the return type of a gcc2
1928     builtin and then its argument prototype would still apply.  */
1929 char opendir();
1930
1931 int main() {
1932 opendir()
1933 ; return 0; }
1934 EOF
1935 if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1936   rm -rf conftest*
1937   eval "ac_cv_lib_$ac_lib_var=yes"
1938 else
1939   echo "configure: failed program was:" >&5
1940   cat conftest.$ac_ext >&5
1941   rm -rf conftest*
1942   eval "ac_cv_lib_$ac_lib_var=no"
1943 fi
1944 rm -f conftest*
1945 LIBS="$ac_save_LIBS"
1946
1947 fi
1948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1949   echo "$ac_t""yes" 1>&6
1950   LIBS="$LIBS -ldir"
1951 else
1952   echo "$ac_t""no" 1>&6
1953 fi
1954
1955 else
1956 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1957 echo "configure:1958: checking for opendir in -lx" >&5
1958 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1960   echo $ac_n "(cached) $ac_c" 1>&6
1961 else
1962   ac_save_LIBS="$LIBS"
1963 LIBS="-lx  $LIBS"
1964 cat > conftest.$ac_ext <<EOF
1965 #line 1966 "configure"
1966 #include "confdefs.h"
1967 /* Override any gcc2 internal prototype to avoid an error.  */
1968 /* We use char because int might match the return type of a gcc2
1969     builtin and then its argument prototype would still apply.  */
1970 char opendir();
1971
1972 int main() {
1973 opendir()
1974 ; return 0; }
1975 EOF
1976 if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1977   rm -rf conftest*
1978   eval "ac_cv_lib_$ac_lib_var=yes"
1979 else
1980   echo "configure: failed program was:" >&5
1981   cat conftest.$ac_ext >&5
1982   rm -rf conftest*
1983   eval "ac_cv_lib_$ac_lib_var=no"
1984 fi
1985 rm -f conftest*
1986 LIBS="$ac_save_LIBS"
1987
1988 fi
1989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1990   echo "$ac_t""yes" 1>&6
1991   LIBS="$LIBS -lx"
1992 else
1993   echo "$ac_t""no" 1>&6
1994 fi
1995
1996 fi
1997
1998 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1999 echo "configure:2000: checking for ANSI C header files" >&5
2000 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2001   echo $ac_n "(cached) $ac_c" 1>&6
2002 else
2003   cat > conftest.$ac_ext <<EOF
2004 #line 2005 "configure"
2005 #include "confdefs.h"
2006 #include <stdlib.h>
2007 #include <stdarg.h>
2008 #include <string.h>
2009 #include <float.h>
2010 EOF
2011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2012 { (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2013 ac_err=`grep -v '^ *+' conftest.out`
2014 if test -z "$ac_err"; then
2015   rm -rf conftest*
2016   ac_cv_header_stdc=yes
2017 else
2018   echo "$ac_err" >&5
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -rf conftest*
2022   ac_cv_header_stdc=no
2023 fi
2024 rm -f conftest*
2025
2026 if test $ac_cv_header_stdc = yes; then
2027   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2028 cat > conftest.$ac_ext <<EOF
2029 #line 2030 "configure"
2030 #include "confdefs.h"
2031 #include <string.h>
2032 EOF
2033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2034   egrep "memchr" >/dev/null 2>&1; then
2035   :
2036 else
2037   rm -rf conftest*
2038   ac_cv_header_stdc=no
2039 fi
2040 rm -f conftest*
2041
2042 fi
2043
2044 if test $ac_cv_header_stdc = yes; then
2045   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2046 cat > conftest.$ac_ext <<EOF
2047 #line 2048 "configure"
2048 #include "confdefs.h"
2049 #include <stdlib.h>
2050 EOF
2051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2052   egrep "free" >/dev/null 2>&1; then
2053   :
2054 else
2055   rm -rf conftest*
2056   ac_cv_header_stdc=no
2057 fi
2058 rm -f conftest*
2059
2060 fi
2061
2062 if test $ac_cv_header_stdc = yes; then
2063   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2064 if test "$cross_compiling" = yes; then
2065   :
2066 else
2067   cat > conftest.$ac_ext <<EOF
2068 #line 2069 "configure"
2069 #include "confdefs.h"
2070 #include <ctype.h>
2071 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2072 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2073 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2074 int main () { int i; for (i = 0; i < 256; i++)
2075 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2076 exit (0); }
2077
2078 EOF
2079 if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2080 then
2081   :
2082 else
2083   echo "configure: failed program was:" >&5
2084   cat conftest.$ac_ext >&5
2085   rm -fr conftest*
2086   ac_cv_header_stdc=no
2087 fi
2088 rm -fr conftest*
2089 fi
2090
2091 fi
2092 fi
2093
2094 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2095 if test $ac_cv_header_stdc = yes; then
2096   cat >> confdefs.h <<\EOF
2097 #define STDC_HEADERS 1
2098 EOF
2099
2100 fi
2101
2102 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2103 echo "configure:2104: checking for sys/wait.h that is POSIX.1 compatible" >&5
2104 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2105   echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107   cat > conftest.$ac_ext <<EOF
2108 #line 2109 "configure"
2109 #include "confdefs.h"
2110 #include <sys/types.h>
2111 #include <sys/wait.h>
2112 #ifndef WEXITSTATUS
2113 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2114 #endif
2115 #ifndef WIFEXITED
2116 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2117 #endif
2118 int main() {
2119 int s;
2120 wait (&s);
2121 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2122 ; return 0; }
2123 EOF
2124 if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2125   rm -rf conftest*
2126   ac_cv_header_sys_wait_h=yes
2127 else
2128   echo "configure: failed program was:" >&5
2129   cat conftest.$ac_ext >&5
2130   rm -rf conftest*
2131   ac_cv_header_sys_wait_h=no
2132 fi
2133 rm -f conftest*
2134 fi
2135
2136 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2137 if test $ac_cv_header_sys_wait_h = yes; then
2138   cat >> confdefs.h <<\EOF
2139 #define HAVE_SYS_WAIT_H 1
2140 EOF
2141
2142 fi
2143
2144 for ac_hdr in \
2145         stddef.h        \
2146         fcntl.h         \
2147         limits.h        \
2148         malloc.h        \
2149         sgtty.h         \
2150         sys/file.h      \
2151         sys/ioctl.h     \
2152         sys/time.h      \
2153         syslog.h        \
2154         termio.h        \
2155         unistd.h        \
2156
2157 do
2158 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2159 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2160 echo "configure:2161: checking for $ac_hdr" >&5
2161 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2162   echo $ac_n "(cached) $ac_c" 1>&6
2163 else
2164   cat > conftest.$ac_ext <<EOF
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167 #include <$ac_hdr>
2168 EOF
2169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2170 { (eval echo configure:2171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2171 ac_err=`grep -v '^ *+' conftest.out`
2172 if test -z "$ac_err"; then
2173   rm -rf conftest*
2174   eval "ac_cv_header_$ac_safe=yes"
2175 else
2176   echo "$ac_err" >&5
2177   echo "configure: failed program was:" >&5
2178   cat conftest.$ac_ext >&5
2179   rm -rf conftest*
2180   eval "ac_cv_header_$ac_safe=no"
2181 fi
2182 rm -f conftest*
2183 fi
2184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2185   echo "$ac_t""yes" 1>&6
2186     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2187   cat >> confdefs.h <<EOF
2188 #define $ac_tr_hdr 1
2189 EOF
2190  
2191 else
2192   echo "$ac_t""no" 1>&6
2193 fi
2194 done
2195
2196
2197 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2198 echo "configure:2199: checking for uid_t in sys/types.h" >&5
2199 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2200   echo $ac_n "(cached) $ac_c" 1>&6
2201 else
2202   cat > conftest.$ac_ext <<EOF
2203 #line 2204 "configure"
2204 #include "confdefs.h"
2205 #include <sys/types.h>
2206 EOF
2207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2208   egrep "uid_t" >/dev/null 2>&1; then
2209   rm -rf conftest*
2210   ac_cv_type_uid_t=yes
2211 else
2212   rm -rf conftest*
2213   ac_cv_type_uid_t=no
2214 fi
2215 rm -f conftest*
2216
2217 fi
2218
2219 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2220 if test $ac_cv_type_uid_t = no; then
2221   cat >> confdefs.h <<\EOF
2222 #define uid_t int
2223 EOF
2224
2225   cat >> confdefs.h <<\EOF
2226 #define gid_t int
2227 EOF
2228
2229 fi
2230
2231 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
2232 echo "configure:2233: checking type of array argument to getgroups" >&5
2233 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
2234   echo $ac_n "(cached) $ac_c" 1>&6
2235 else
2236   if test "$cross_compiling" = yes; then
2237   ac_cv_type_getgroups=cross
2238 else
2239   cat > conftest.$ac_ext <<EOF
2240 #line 2241 "configure"
2241 #include "confdefs.h"
2242
2243 /* Thanks to Mike Rendell for this test.  */
2244 #include <sys/types.h>
2245 #define NGID 256
2246 #undef MAX
2247 #define MAX(x, y) ((x) > (y) ? (x) : (y))
2248 main()
2249 {
2250   gid_t gidset[NGID];
2251   int i, n;
2252   union { gid_t gval; long lval; }  val;
2253
2254   val.lval = -1;
2255   for (i = 0; i < NGID; i++)
2256     gidset[i] = val.gval;
2257   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
2258                  gidset);
2259   /* Exit non-zero if getgroups seems to require an array of ints.  This
2260      happens when gid_t is short but getgroups modifies an array of ints.  */
2261   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
2262 }
2263
2264 EOF
2265 if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2266 then
2267     ac_cv_type_getgroups=gid_t
2268 else
2269   echo "configure: failed program was:" >&5
2270   cat conftest.$ac_ext >&5
2271   rm -fr conftest*
2272   ac_cv_type_getgroups=int
2273 fi
2274 rm -fr conftest*
2275 fi
2276
2277 if test $ac_cv_type_getgroups = cross; then
2278         cat > conftest.$ac_ext <<EOF
2279 #line 2280 "configure"
2280 #include "confdefs.h"
2281 #include <unistd.h>
2282 EOF
2283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2284   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2285   rm -rf conftest*
2286   ac_cv_type_getgroups=gid_t
2287 else
2288   rm -rf conftest*
2289   ac_cv_type_getgroups=int
2290 fi
2291 rm -f conftest*
2292
2293 fi
2294 fi
2295
2296 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
2297 cat >> confdefs.h <<EOF
2298 #define GETGROUPS_T $ac_cv_type_getgroups
2299 EOF
2300
2301
2302 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2303 echo "configure:2304: checking for mode_t" >&5
2304 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2305   echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307   cat > conftest.$ac_ext <<EOF
2308 #line 2309 "configure"
2309 #include "confdefs.h"
2310 #include <sys/types.h>
2311 #if STDC_HEADERS
2312 #include <stdlib.h>
2313 #include <stddef.h>
2314 #endif
2315 EOF
2316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2317   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2318   rm -rf conftest*
2319   ac_cv_type_mode_t=yes
2320 else
2321   rm -rf conftest*
2322   ac_cv_type_mode_t=no
2323 fi
2324 rm -f conftest*
2325
2326 fi
2327 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2328 if test $ac_cv_type_mode_t = no; then
2329   cat >> confdefs.h <<\EOF
2330 #define mode_t int
2331 EOF
2332
2333 fi
2334
2335 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2336 echo "configure:2337: checking for off_t" >&5
2337 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2338   echo $ac_n "(cached) $ac_c" 1>&6
2339 else
2340   cat > conftest.$ac_ext <<EOF
2341 #line 2342 "configure"
2342 #include "confdefs.h"
2343 #include <sys/types.h>
2344 #if STDC_HEADERS
2345 #include <stdlib.h>
2346 #include <stddef.h>
2347 #endif
2348 EOF
2349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2350   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2351   rm -rf conftest*
2352   ac_cv_type_off_t=yes
2353 else
2354   rm -rf conftest*
2355   ac_cv_type_off_t=no
2356 fi
2357 rm -f conftest*
2358
2359 fi
2360 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2361 if test $ac_cv_type_off_t = no; then
2362   cat >> confdefs.h <<\EOF
2363 #define off_t long
2364 EOF
2365
2366 fi
2367
2368 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2369 echo "configure:2370: checking for pid_t" >&5
2370 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2371   echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373   cat > conftest.$ac_ext <<EOF
2374 #line 2375 "configure"
2375 #include "confdefs.h"
2376 #include <sys/types.h>
2377 #if STDC_HEADERS
2378 #include <stdlib.h>
2379 #include <stddef.h>
2380 #endif
2381 EOF
2382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2383   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2384   rm -rf conftest*
2385   ac_cv_type_pid_t=yes
2386 else
2387   rm -rf conftest*
2388   ac_cv_type_pid_t=no
2389 fi
2390 rm -f conftest*
2391
2392 fi
2393 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2394 if test $ac_cv_type_pid_t = no; then
2395   cat >> confdefs.h <<\EOF
2396 #define pid_t int
2397 EOF
2398
2399 fi
2400
2401 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2402 echo "configure:2403: checking return type of signal handlers" >&5
2403 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2404   echo $ac_n "(cached) $ac_c" 1>&6
2405 else
2406   cat > conftest.$ac_ext <<EOF
2407 #line 2408 "configure"
2408 #include "confdefs.h"
2409 #include <sys/types.h>
2410 #include <signal.h>
2411 #ifdef signal
2412 #undef signal
2413 #endif
2414 #ifdef __cplusplus
2415 extern "C" void (*signal (int, void (*)(int)))(int);
2416 #else
2417 void (*signal ()) ();
2418 #endif
2419
2420 int main() {
2421 int i;
2422 ; return 0; }
2423 EOF
2424 if { (eval echo configure:2425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2425   rm -rf conftest*
2426   ac_cv_type_signal=void
2427 else
2428   echo "configure: failed program was:" >&5
2429   cat conftest.$ac_ext >&5
2430   rm -rf conftest*
2431   ac_cv_type_signal=int
2432 fi
2433 rm -f conftest*
2434 fi
2435
2436 echo "$ac_t""$ac_cv_type_signal" 1>&6
2437 cat >> confdefs.h <<EOF
2438 #define RETSIGTYPE $ac_cv_type_signal
2439 EOF
2440
2441
2442 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2443 echo "configure:2444: checking for size_t" >&5
2444 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2445   echo $ac_n "(cached) $ac_c" 1>&6
2446 else
2447   cat > conftest.$ac_ext <<EOF
2448 #line 2449 "configure"
2449 #include "confdefs.h"
2450 #include <sys/types.h>
2451 #if STDC_HEADERS
2452 #include <stdlib.h>
2453 #include <stddef.h>
2454 #endif
2455 EOF
2456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2457   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2458   rm -rf conftest*
2459   ac_cv_type_size_t=yes
2460 else
2461   rm -rf conftest*
2462   ac_cv_type_size_t=no
2463 fi
2464 rm -f conftest*
2465
2466 fi
2467 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2468 if test $ac_cv_type_size_t = no; then
2469   cat >> confdefs.h <<\EOF
2470 #define size_t unsigned
2471 EOF
2472
2473 fi
2474
2475 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2476 echo "configure:2477: checking for uid_t in sys/types.h" >&5
2477 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2478   echo $ac_n "(cached) $ac_c" 1>&6
2479 else
2480   cat > conftest.$ac_ext <<EOF
2481 #line 2482 "configure"
2482 #include "confdefs.h"
2483 #include <sys/types.h>
2484 EOF
2485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2486   egrep "uid_t" >/dev/null 2>&1; then
2487   rm -rf conftest*
2488   ac_cv_type_uid_t=yes
2489 else
2490   rm -rf conftest*
2491   ac_cv_type_uid_t=no
2492 fi
2493 rm -f conftest*
2494
2495 fi
2496
2497 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2498 if test $ac_cv_type_uid_t = no; then
2499   cat >> confdefs.h <<\EOF
2500 #define uid_t int
2501 EOF
2502
2503   cat >> confdefs.h <<\EOF
2504 #define gid_t int
2505 EOF
2506
2507 fi
2508
2509 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2510 echo "configure:2511: checking for st_blksize in struct stat" >&5
2511 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2512   echo $ac_n "(cached) $ac_c" 1>&6
2513 else
2514   cat > conftest.$ac_ext <<EOF
2515 #line 2516 "configure"
2516 #include "confdefs.h"
2517 #include <sys/types.h>
2518 #include <sys/stat.h>
2519 int main() {
2520 struct stat s; s.st_blksize;
2521 ; return 0; }
2522 EOF
2523 if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2524   rm -rf conftest*
2525   ac_cv_struct_st_blksize=yes
2526 else
2527   echo "configure: failed program was:" >&5
2528   cat conftest.$ac_ext >&5
2529   rm -rf conftest*
2530   ac_cv_struct_st_blksize=no
2531 fi
2532 rm -f conftest*
2533 fi
2534
2535 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2536 if test $ac_cv_struct_st_blksize = yes; then
2537   cat >> confdefs.h <<\EOF
2538 #define HAVE_ST_BLKSIZE 1
2539 EOF
2540
2541 fi
2542
2543 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2544 echo "configure:2545: checking whether time.h and sys/time.h may both be included" >&5
2545 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2546   echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548   cat > conftest.$ac_ext <<EOF
2549 #line 2550 "configure"
2550 #include "confdefs.h"
2551 #include <sys/types.h>
2552 #include <sys/time.h>
2553 #include <time.h>
2554 int main() {
2555 struct tm *tp;
2556 ; return 0; }
2557 EOF
2558 if { (eval echo configure:2559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2559   rm -rf conftest*
2560   ac_cv_header_time=yes
2561 else
2562   echo "configure: failed program was:" >&5
2563   cat conftest.$ac_ext >&5
2564   rm -rf conftest*
2565   ac_cv_header_time=no
2566 fi
2567 rm -f conftest*
2568 fi
2569
2570 echo "$ac_t""$ac_cv_header_time" 1>&6
2571 if test $ac_cv_header_time = yes; then
2572   cat >> confdefs.h <<\EOF
2573 #define TIME_WITH_SYS_TIME 1
2574 EOF
2575
2576 fi
2577
2578 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2579 echo "configure:2580: checking whether struct tm is in sys/time.h or time.h" >&5
2580 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2581   echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583   cat > conftest.$ac_ext <<EOF
2584 #line 2585 "configure"
2585 #include "confdefs.h"
2586 #include <sys/types.h>
2587 #include <time.h>
2588 int main() {
2589 struct tm *tp; tp->tm_sec;
2590 ; return 0; }
2591 EOF
2592 if { (eval echo configure:2593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2593   rm -rf conftest*
2594   ac_cv_struct_tm=time.h
2595 else
2596   echo "configure: failed program was:" >&5
2597   cat conftest.$ac_ext >&5
2598   rm -rf conftest*
2599   ac_cv_struct_tm=sys/time.h
2600 fi
2601 rm -f conftest*
2602 fi
2603
2604 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2605 if test $ac_cv_struct_tm = sys/time.h; then
2606   cat >> confdefs.h <<\EOF
2607 #define TM_IN_SYS_TIME 1
2608 EOF
2609
2610 fi
2611
2612
2613 echo $ac_n "checking for working const""... $ac_c" 1>&6
2614 echo "configure:2615: checking for working const" >&5
2615 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2616   echo $ac_n "(cached) $ac_c" 1>&6
2617 else
2618   cat > conftest.$ac_ext <<EOF
2619 #line 2620 "configure"
2620 #include "confdefs.h"
2621
2622 int main() {
2623
2624 /* Ultrix mips cc rejects this.  */
2625 typedef int charset[2]; const charset x;
2626 /* SunOS 4.1.1 cc rejects this.  */
2627 char const *const *ccp;
2628 char **p;
2629 /* NEC SVR4.0.2 mips cc rejects this.  */
2630 struct point {int x, y;};
2631 static struct point const zero = {0,0};
2632 /* AIX XL C 1.02.0.0 rejects this.
2633    It does not let you subtract one const X* pointer from another in an arm
2634    of an if-expression whose if-part is not a constant expression */
2635 const char *g = "string";
2636 ccp = &g + (g ? g-g : 0);
2637 /* HPUX 7.0 cc rejects these. */
2638 ++ccp;
2639 p = (char**) ccp;
2640 ccp = (char const *const *) p;
2641 { /* SCO 3.2v4 cc rejects this.  */
2642   char *t;
2643   char const *s = 0 ? (char *) 0 : (char const *) 0;
2644
2645   *t++ = 0;
2646 }
2647 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2648   int x[] = {25, 17};
2649   const int *foo = &x[0];
2650   ++foo;
2651 }
2652 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2653   typedef const int *iptr;
2654   iptr p = 0;
2655   ++p;
2656 }
2657 { /* AIX XL C 1.02.0.0 rejects this saying
2658      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2659   struct s { int j; const int *ap[3]; };
2660   struct s *b; b->j = 5;
2661 }
2662 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2663   const int foo = 10;
2664 }
2665
2666 ; return 0; }
2667 EOF
2668 if { (eval echo configure:2669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2669   rm -rf conftest*
2670   ac_cv_c_const=yes
2671 else
2672   echo "configure: failed program was:" >&5
2673   cat conftest.$ac_ext >&5
2674   rm -rf conftest*
2675   ac_cv_c_const=no
2676 fi
2677 rm -f conftest*
2678 fi
2679
2680 echo "$ac_t""$ac_cv_c_const" 1>&6
2681 if test $ac_cv_c_const = no; then
2682   cat >> confdefs.h <<\EOF
2683 #define const 
2684 EOF
2685
2686 fi
2687
2688
2689 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2690 echo "configure:2691: checking for 8-bit clean memcmp" >&5
2691 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2692   echo $ac_n "(cached) $ac_c" 1>&6
2693 else
2694   if test "$cross_compiling" = yes; then
2695   ac_cv_func_memcmp_clean=no
2696 else
2697   cat > conftest.$ac_ext <<EOF
2698 #line 2699 "configure"
2699 #include "confdefs.h"
2700
2701 main()
2702 {
2703   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2704   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2705 }
2706
2707 EOF
2708 if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2709 then
2710   ac_cv_func_memcmp_clean=yes
2711 else
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714   rm -fr conftest*
2715   ac_cv_func_memcmp_clean=no
2716 fi
2717 rm -fr conftest*
2718 fi
2719
2720 fi
2721
2722 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2723 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2724
2725 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2726 echo "configure:2727: checking return type of signal handlers" >&5
2727 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2728   echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730   cat > conftest.$ac_ext <<EOF
2731 #line 2732 "configure"
2732 #include "confdefs.h"
2733 #include <sys/types.h>
2734 #include <signal.h>
2735 #ifdef signal
2736 #undef signal
2737 #endif
2738 #ifdef __cplusplus
2739 extern "C" void (*signal (int, void (*)(int)))(int);
2740 #else
2741 void (*signal ()) ();
2742 #endif
2743
2744 int main() {
2745 int i;
2746 ; return 0; }
2747 EOF
2748 if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2749   rm -rf conftest*
2750   ac_cv_type_signal=void
2751 else
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754   rm -rf conftest*
2755   ac_cv_type_signal=int
2756 fi
2757 rm -f conftest*
2758 fi
2759
2760 echo "$ac_t""$ac_cv_type_signal" 1>&6
2761 cat >> confdefs.h <<EOF
2762 #define RETSIGTYPE $ac_cv_type_signal
2763 EOF
2764
2765
2766 echo $ac_n "checking for strftime""... $ac_c" 1>&6
2767 echo "configure:2768: checking for strftime" >&5
2768 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
2769   echo $ac_n "(cached) $ac_c" 1>&6
2770 else
2771   cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2774 /* System header to define __stub macros and hopefully few prototypes,
2775     which can conflict with char strftime(); below.  */
2776 #include <assert.h>
2777 /* Override any gcc2 internal prototype to avoid an error.  */
2778 /* We use char because int might match the return type of a gcc2
2779     builtin and then its argument prototype would still apply.  */
2780 char strftime();
2781
2782 int main() {
2783
2784 /* The GNU C library defines this for functions which it implements
2785     to always fail with ENOSYS.  Some functions are actually named
2786     something starting with __ and the normal name is an alias.  */
2787 #if defined (__stub_strftime) || defined (__stub___strftime)
2788 choke me
2789 #else
2790 strftime();
2791 #endif
2792
2793 ; return 0; }
2794 EOF
2795 if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2796   rm -rf conftest*
2797   eval "ac_cv_func_strftime=yes"
2798 else
2799   echo "configure: failed program was:" >&5
2800   cat conftest.$ac_ext >&5
2801   rm -rf conftest*
2802   eval "ac_cv_func_strftime=no"
2803 fi
2804 rm -f conftest*
2805 fi
2806
2807 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
2808   echo "$ac_t""yes" 1>&6
2809   cat >> confdefs.h <<\EOF
2810 #define HAVE_STRFTIME 1
2811 EOF
2812
2813 else
2814   echo "$ac_t""no" 1>&6
2815 # strftime is in -lintl on SCO UNIX.
2816 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
2817 echo "configure:2818: checking for strftime in -lintl" >&5
2818 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
2819 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2820   echo $ac_n "(cached) $ac_c" 1>&6
2821 else
2822   ac_save_LIBS="$LIBS"
2823 LIBS="-lintl  $LIBS"
2824 cat > conftest.$ac_ext <<EOF
2825 #line 2826 "configure"
2826 #include "confdefs.h"
2827 /* Override any gcc2 internal prototype to avoid an error.  */
2828 /* We use char because int might match the return type of a gcc2
2829     builtin and then its argument prototype would still apply.  */
2830 char strftime();
2831
2832 int main() {
2833 strftime()
2834 ; return 0; }
2835 EOF
2836 if { (eval echo configure:2837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2837   rm -rf conftest*
2838   eval "ac_cv_lib_$ac_lib_var=yes"
2839 else
2840   echo "configure: failed program was:" >&5
2841   cat conftest.$ac_ext >&5
2842   rm -rf conftest*
2843   eval "ac_cv_lib_$ac_lib_var=no"
2844 fi
2845 rm -f conftest*
2846 LIBS="$ac_save_LIBS"
2847
2848 fi
2849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2850   echo "$ac_t""yes" 1>&6
2851   cat >> confdefs.h <<\EOF
2852 #define HAVE_STRFTIME 1
2853 EOF
2854
2855 LIBS="-lintl $LIBS"
2856 else
2857   echo "$ac_t""no" 1>&6
2858 fi
2859
2860 fi
2861
2862 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2863 echo "configure:2864: checking for vprintf" >&5
2864 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2865   echo $ac_n "(cached) $ac_c" 1>&6
2866 else
2867   cat > conftest.$ac_ext <<EOF
2868 #line 2869 "configure"
2869 #include "confdefs.h"
2870 /* System header to define __stub macros and hopefully few prototypes,
2871     which can conflict with char vprintf(); below.  */
2872 #include <assert.h>
2873 /* Override any gcc2 internal prototype to avoid an error.  */
2874 /* We use char because int might match the return type of a gcc2
2875     builtin and then its argument prototype would still apply.  */
2876 char vprintf();
2877
2878 int main() {
2879
2880 /* The GNU C library defines this for functions which it implements
2881     to always fail with ENOSYS.  Some functions are actually named
2882     something starting with __ and the normal name is an alias.  */
2883 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2884 choke me
2885 #else
2886 vprintf();
2887 #endif
2888
2889 ; return 0; }
2890 EOF
2891 if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2892   rm -rf conftest*
2893   eval "ac_cv_func_vprintf=yes"
2894 else
2895   echo "configure: failed program was:" >&5
2896   cat conftest.$ac_ext >&5
2897   rm -rf conftest*
2898   eval "ac_cv_func_vprintf=no"
2899 fi
2900 rm -f conftest*
2901 fi
2902
2903 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2904   echo "$ac_t""yes" 1>&6
2905   cat >> confdefs.h <<\EOF
2906 #define HAVE_VPRINTF 1
2907 EOF
2908
2909 else
2910   echo "$ac_t""no" 1>&6
2911 fi
2912
2913 if test "$ac_cv_func_vprintf" != yes; then
2914 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2915 echo "configure:2916: checking for _doprnt" >&5
2916 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2917   echo $ac_n "(cached) $ac_c" 1>&6
2918 else
2919   cat > conftest.$ac_ext <<EOF
2920 #line 2921 "configure"
2921 #include "confdefs.h"
2922 /* System header to define __stub macros and hopefully few prototypes,
2923     which can conflict with char _doprnt(); below.  */
2924 #include <assert.h>
2925 /* Override any gcc2 internal prototype to avoid an error.  */
2926 /* We use char because int might match the return type of a gcc2
2927     builtin and then its argument prototype would still apply.  */
2928 char _doprnt();
2929
2930 int main() {
2931
2932 /* The GNU C library defines this for functions which it implements
2933     to always fail with ENOSYS.  Some functions are actually named
2934     something starting with __ and the normal name is an alias.  */
2935 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2936 choke me
2937 #else
2938 _doprnt();
2939 #endif
2940
2941 ; return 0; }
2942 EOF
2943 if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2944   rm -rf conftest*
2945   eval "ac_cv_func__doprnt=yes"
2946 else
2947   echo "configure: failed program was:" >&5
2948   cat conftest.$ac_ext >&5
2949   rm -rf conftest*
2950   eval "ac_cv_func__doprnt=no"
2951 fi
2952 rm -f conftest*
2953 fi
2954
2955 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2956   echo "$ac_t""yes" 1>&6
2957   cat >> confdefs.h <<\EOF
2958 #define HAVE_DOPRNT 1
2959 EOF
2960
2961 else
2962   echo "$ac_t""no" 1>&6
2963 fi
2964
2965 fi
2966
2967 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
2968 echo "configure:2969: checking for wait3 that fills in rusage" >&5
2969 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
2970   echo $ac_n "(cached) $ac_c" 1>&6
2971 else
2972   if test "$cross_compiling" = yes; then
2973   ac_cv_func_wait3_rusage=no
2974 else
2975   cat > conftest.$ac_ext <<EOF
2976 #line 2977 "configure"
2977 #include "confdefs.h"
2978 #include <sys/types.h>
2979 #include <sys/time.h>
2980 #include <sys/resource.h>
2981 #include <stdio.h>
2982 /* HP-UX has wait3 but does not fill in rusage at all.  */
2983 main() {
2984   struct rusage r;
2985   int i;
2986   /* Use a field that we can force nonzero --
2987      voluntary context switches.
2988      For systems like NeXT and OSF/1 that don't set it,
2989      also use the system CPU time.  And page faults (I/O) for Linux.  */
2990   r.ru_nvcsw = 0;
2991   r.ru_stime.tv_sec = 0;
2992   r.ru_stime.tv_usec = 0;
2993   r.ru_majflt = r.ru_minflt = 0;
2994   switch (fork()) {
2995   case 0: /* Child.  */
2996     sleep(1); /* Give up the CPU.  */
2997     _exit(0);
2998   case -1: _exit(0); /* What can we do?  */
2999   default: /* Parent.  */
3000     wait3(&i, 0, &r);
3001     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
3002     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
3003          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
3004   }
3005 }
3006 EOF
3007 if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3008 then
3009   ac_cv_func_wait3_rusage=yes
3010 else
3011   echo "configure: failed program was:" >&5
3012   cat conftest.$ac_ext >&5
3013   rm -fr conftest*
3014   ac_cv_func_wait3_rusage=no
3015 fi
3016 rm -fr conftest*
3017 fi
3018
3019 fi
3020
3021 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
3022 if test $ac_cv_func_wait3_rusage = yes; then
3023   cat >> confdefs.h <<\EOF
3024 #define HAVE_WAIT3 1
3025 EOF
3026
3027 fi
3028
3029
3030 for ac_func in \
3031         gethostname             \
3032         gettimeofday    \
3033         mktime                  \
3034         select                  \
3035         socket                  \
3036         strdup                  \
3037         strerror                \
3038         strstr                  \
3039         strrchr                 \
3040         strtod                  \
3041         strtol                  \
3042         strtoul                 \
3043         memcpy                  \
3044
3045 do
3046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3047 echo "configure:3048: checking for $ac_func" >&5
3048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 /* System header to define __stub macros and hopefully few prototypes,
3055     which can conflict with char $ac_func(); below.  */
3056 #include <assert.h>
3057 /* Override any gcc2 internal prototype to avoid an error.  */
3058 /* We use char because int might match the return type of a gcc2
3059     builtin and then its argument prototype would still apply.  */
3060 char $ac_func();
3061
3062 int main() {
3063
3064 /* The GNU C library defines this for functions which it implements
3065     to always fail with ENOSYS.  Some functions are actually named
3066     something starting with __ and the normal name is an alias.  */
3067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3068 choke me
3069 #else
3070 $ac_func();
3071 #endif
3072
3073 ; return 0; }
3074 EOF
3075 if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3076   rm -rf conftest*
3077   eval "ac_cv_func_$ac_func=yes"
3078 else
3079   echo "configure: failed program was:" >&5
3080   cat conftest.$ac_ext >&5
3081   rm -rf conftest*
3082   eval "ac_cv_func_$ac_func=no"
3083 fi
3084 rm -f conftest*
3085 fi
3086
3087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3088   echo "$ac_t""yes" 1>&6
3089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3090   cat >> confdefs.h <<EOF
3091 #define $ac_tr_func 1
3092 EOF
3093  
3094 else
3095   echo "$ac_t""no" 1>&6
3096 fi
3097 done
3098
3099
3100 for ac_func in strdup
3101 do
3102 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3103 echo "configure:3104: checking for $ac_func" >&5
3104 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110 /* System header to define __stub macros and hopefully few prototypes,
3111     which can conflict with char $ac_func(); below.  */
3112 #include <assert.h>
3113 /* Override any gcc2 internal prototype to avoid an error.  */
3114 /* We use char because int might match the return type of a gcc2
3115     builtin and then its argument prototype would still apply.  */
3116 char $ac_func();
3117
3118 int main() {
3119
3120 /* The GNU C library defines this for functions which it implements
3121     to always fail with ENOSYS.  Some functions are actually named
3122     something starting with __ and the normal name is an alias.  */
3123 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3124 choke me
3125 #else
3126 $ac_func();
3127 #endif
3128
3129 ; return 0; }
3130 EOF
3131 if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3132   rm -rf conftest*
3133   eval "ac_cv_func_$ac_func=yes"
3134 else
3135   echo "configure: failed program was:" >&5
3136   cat conftest.$ac_ext >&5
3137   rm -rf conftest*
3138   eval "ac_cv_func_$ac_func=no"
3139 fi
3140 rm -f conftest*
3141 fi
3142
3143 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3144   echo "$ac_t""yes" 1>&6
3145     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3146   cat >> confdefs.h <<EOF
3147 #define $ac_tr_func 1
3148 EOF
3149  
3150 else
3151   echo "$ac_t""no" 1>&6
3152 LIBOBJS="$LIBOBJS ${ac_func}.o"
3153 fi
3154 done
3155
3156
3157
3158 # Check Configuration
3159
3160 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
3161 echo "configure:3162: checking declaration of sys_errlist" >&5
3162 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then
3163   echo $ac_n "(cached) $ac_c" 1>&6
3164 else
3165   
3166         cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169
3170 #include <stdio.h>
3171 #include <sys/types.h>
3172 #include <errno.h> 
3173 int main() {
3174 char *c = (char *) *sys_errlist
3175 ; return 0; }
3176 EOF
3177 if { (eval echo configure:3178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3178   rm -rf conftest*
3179   cf_cv_dcl_sys_errlist=yes
3180 else
3181   echo "configure: failed program was:" >&5
3182   cat conftest.$ac_ext >&5
3183   rm -rf conftest*
3184   cf_cv_dcl_sys_errlist=no
3185 fi
3186 rm -f conftest*
3187 fi
3188
3189 echo "$ac_t""$cf_cv_dcl_sys_errlist" 1>&6
3190
3191 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
3192 if test $cf_cv_dcl_sys_errlist = no ; then
3193         cat >> confdefs.h <<\EOF
3194 #define DECL_SYS_ERRLIST 1
3195 EOF
3196
3197         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
3198 echo "configure:3199: checking existence of sys_errlist" >&5
3199         if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   
3203                 cat > conftest.$ac_ext <<EOF
3204 #line 3205 "configure"
3205 #include "confdefs.h"
3206 #include <errno.h>
3207 int main() {
3208 char *c = (char *) *sys_errlist
3209 ; return 0; }
3210 EOF
3211 if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3212   rm -rf conftest*
3213   cf_cv_have_sys_errlist=yes
3214 else
3215   echo "configure: failed program was:" >&5
3216   cat conftest.$ac_ext >&5
3217   rm -rf conftest*
3218   cf_cv_have_sys_errlist=no
3219 fi
3220 rm -f conftest*
3221 fi
3222
3223         echo "$ac_t""$cf_cv_have_sys_errlist" 1>&6
3224 fi
3225
3226
3227
3228
3229
3230   
3231   
3232   
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250 trap '' 1 2 15
3251 cat > confcache <<\EOF
3252 # This file is a shell script that caches the results of configure
3253 # tests run on this system so they can be shared between configure
3254 # scripts and configure runs.  It is not useful on other systems.
3255 # If it contains results you don't want to keep, you may remove or edit it.
3256 #
3257 # By default, configure uses ./config.cache as the cache file,
3258 # creating it if it does not exist already.  You can give configure
3259 # the --cache-file=FILE option to use a different cache file; that is
3260 # what configure does when it calls configure scripts in
3261 # subdirectories, so they share the cache.
3262 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3263 # config.status only pays attention to the cache file if you give it the
3264 # --recheck option to rerun configure.
3265 #
3266 EOF
3267 # The following way of writing the cache mishandles newlines in values,
3268 # but we know of no workaround that is simple, portable, and efficient.
3269 # So, don't put newlines in cache variables' values.
3270 # Ultrix sh set writes to stderr and can't be redirected directly,
3271 # and sets the high bit in the cache file unless we assign to the vars.
3272 (set) 2>&1 |
3273   case `(ac_space=' '; set) 2>&1` in
3274   *ac_space=\ *)
3275     # `set' does not quote correctly, so add quotes (double-quote substitution
3276     # turns \\\\ into \\, and sed turns \\ into \).
3277     sed -n \
3278       -e "s/'/'\\\\''/g" \
3279       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3280     ;;
3281   *)
3282     # `set' quotes correctly as required by POSIX, so do not add quotes.
3283     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3284     ;;
3285   esac >> confcache
3286 if cmp -s $cache_file confcache; then
3287   :
3288 else
3289   if test -w $cache_file; then
3290     echo "updating cache $cache_file"
3291     cat confcache > $cache_file
3292   else
3293     echo "not updating unwritable cache $cache_file"
3294   fi
3295 fi
3296 rm -f confcache
3297
3298 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3299
3300 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3301 # Let make expand exec_prefix.
3302 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3303
3304 # Any assignment to VPATH causes Sun make to only execute
3305 # the first set of double-colon rules, so remove it if not needed.
3306 # If there is a colon in the path, we need to keep it.
3307 if test "x$srcdir" = x.; then
3308   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3309 fi
3310
3311 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3312
3313 DEFS=-DHAVE_CONFIG_H
3314
3315 # Without the "./", some shells look in PATH for config.status.
3316 : ${CONFIG_STATUS=./config.status}
3317
3318 echo creating $CONFIG_STATUS
3319 rm -f $CONFIG_STATUS
3320 cat > $CONFIG_STATUS <<EOF
3321 #! /bin/sh
3322 # Generated automatically by configure.
3323 # Run this file to recreate the current configuration.
3324 # This directory was configured as follows,
3325 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3326 #
3327 # $0 $ac_configure_args
3328 #
3329 # Compiler output produced by configure, useful for debugging
3330 # configure, is in ./config.log if it exists.
3331
3332 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3333 for ac_option
3334 do
3335   case "\$ac_option" in
3336   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3337     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3338     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3339   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3340     echo "$CONFIG_STATUS generated by autoconf version 2.12"
3341     exit 0 ;;
3342   -help | --help | --hel | --he | --h)
3343     echo "\$ac_cs_usage"; exit 0 ;;
3344   *) echo "\$ac_cs_usage"; exit 1 ;;
3345   esac
3346 done
3347
3348 ac_given_srcdir=$srcdir
3349 ac_given_INSTALL="$INSTALL"
3350
3351 trap 'rm -fr `echo "\
3352 Makefile:build/top.mk:Makefile.in:build/dir.mk \
3353 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
3354 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
3355 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
3356 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
3357 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
3358 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
3359 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
3360 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
3361 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
3362 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
3363 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
3364 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
3365 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
3366 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
3367 include/Makefile:build/top.mk:include/Makefile.in \
3368 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
3369 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
3370 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
3371 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
3372 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
3373 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
3374 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
3375 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
3376 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
3377 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
3378 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
3379 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
3380 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
3381 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
3382 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
3383 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
3384 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
3385 tests/Makefile:build/top.mk:tests/Makefile.in \
3386  include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3387 EOF
3388 cat >> $CONFIG_STATUS <<EOF
3389
3390 # Protect against being on the right side of a sed subst in config.status.
3391 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3392  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3393 $ac_vpsub
3394 $extrasub
3395 s%@CFLAGS@%$CFLAGS%g
3396 s%@CPPFLAGS@%$CPPFLAGS%g
3397 s%@CXXFLAGS@%$CXXFLAGS%g
3398 s%@DEFS@%$DEFS%g
3399 s%@LDFLAGS@%$LDFLAGS%g
3400 s%@LIBS@%$LIBS%g
3401 s%@exec_prefix@%$exec_prefix%g
3402 s%@prefix@%$prefix%g
3403 s%@program_transform_name@%$program_transform_name%g
3404 s%@bindir@%$bindir%g
3405 s%@sbindir@%$sbindir%g
3406 s%@libexecdir@%$libexecdir%g
3407 s%@datadir@%$datadir%g
3408 s%@sysconfdir@%$sysconfdir%g
3409 s%@sharedstatedir@%$sharedstatedir%g
3410 s%@localstatedir@%$localstatedir%g
3411 s%@libdir@%$libdir%g
3412 s%@includedir@%$includedir%g
3413 s%@oldincludedir@%$oldincludedir%g
3414 s%@infodir@%$infodir%g
3415 s%@mandir@%$mandir%g
3416 s%@CC@%$CC%g
3417 s%@CPP@%$CPP%g
3418 s%@LN_S@%$LN_S%g
3419 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3420 s%@INSTALL_DATA@%$INSTALL_DATA%g
3421 s%@RANLIB@%$RANLIB%g
3422 s%@SET_MAKE@%$SET_MAKE%g
3423 s%@SENDMAIL@%$SENDMAIL%g
3424 s%@EDITOR@%$EDITOR%g
3425 s%@FINGER@%$FINGER%g
3426 s%@LIBTERMCAP@%$LIBTERMCAP%g
3427 s%@LIBCRYPT@%$LIBCRYPT%g
3428 s%@LIBOBJS@%$LIBOBJS%g
3429 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
3430 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
3431 s%@SLAPD_LDBM@%$SLAPD_LDBM%g
3432 s%@SLAPD_PASSWD@%$SLAPD_PASSWD%g
3433 s%@SLAPD_SHELL@%$SLAPD_SHELL%g
3434 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
3435 s%@LDAP_DEFS@%$LDAP_DEFS%g
3436 s%@LDAP_LIBS@%$LDAP_LIBS%g
3437 s%@LDAPD_DEFS@%$LDAPD_DEFS%g
3438 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
3439 s%@SLAPD_DEFS@%$SLAPD_DEFS%g
3440 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
3441 s%@SLURPD_DEFS@%$SLURPD_DEFS%g
3442 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
3443 s%@LDBM_DEFS@%$LDBM_DEFS%g
3444 s%@LDBM_LIBS@%$LDBM_LIBS%g
3445 s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g
3446 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
3447
3448 CEOF
3449 EOF
3450
3451 cat >> $CONFIG_STATUS <<\EOF
3452
3453 # Split the substitutions into bite-sized pieces for seds with
3454 # small command number limits, like on Digital OSF/1 and HP-UX.
3455 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3456 ac_file=1 # Number of current file.
3457 ac_beg=1 # First line for current file.
3458 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3459 ac_more_lines=:
3460 ac_sed_cmds=""
3461 while $ac_more_lines; do
3462   if test $ac_beg -gt 1; then
3463     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3464   else
3465     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3466   fi
3467   if test ! -s conftest.s$ac_file; then
3468     ac_more_lines=false
3469     rm -f conftest.s$ac_file
3470   else
3471     if test -z "$ac_sed_cmds"; then
3472       ac_sed_cmds="sed -f conftest.s$ac_file"
3473     else
3474       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3475     fi
3476     ac_file=`expr $ac_file + 1`
3477     ac_beg=$ac_end
3478     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3479   fi
3480 done
3481 if test -z "$ac_sed_cmds"; then
3482   ac_sed_cmds=cat
3483 fi
3484 EOF
3485
3486 cat >> $CONFIG_STATUS <<EOF
3487
3488 CONFIG_FILES=\${CONFIG_FILES-"\
3489 Makefile:build/top.mk:Makefile.in:build/dir.mk \
3490 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
3491 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
3492 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
3493 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
3494 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
3495 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
3496 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
3497 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
3498 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
3499 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
3500 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
3501 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
3502 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
3503 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
3504 include/Makefile:build/top.mk:include/Makefile.in \
3505 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
3506 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
3507 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
3508 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
3509 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
3510 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
3511 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
3512 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
3513 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
3514 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
3515 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
3516 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
3517 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
3518 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
3519 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
3520 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
3521 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
3522 tests/Makefile:build/top.mk:tests/Makefile.in \
3523 "}
3524 EOF
3525 cat >> $CONFIG_STATUS <<\EOF
3526 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3527   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3528   case "$ac_file" in
3529   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3530        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3531   *) ac_file_in="${ac_file}.in" ;;
3532   esac
3533
3534   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3535
3536   # Remove last slash and all that follows it.  Not all systems have dirname.
3537   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3538   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3539     # The file is in a subdirectory.
3540     test ! -d "$ac_dir" && mkdir "$ac_dir"
3541     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3542     # A "../" for each directory in $ac_dir_suffix.
3543     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3544   else
3545     ac_dir_suffix= ac_dots=
3546   fi
3547
3548   case "$ac_given_srcdir" in
3549   .)  srcdir=.
3550       if test -z "$ac_dots"; then top_srcdir=.
3551       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3552   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3553   *) # Relative path.
3554     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3555     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3556   esac
3557
3558   case "$ac_given_INSTALL" in
3559   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3560   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3561   esac
3562
3563   echo creating "$ac_file"
3564   rm -f "$ac_file"
3565   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3566   case "$ac_file" in
3567   *Makefile*) ac_comsub="1i\\
3568 # $configure_input" ;;
3569   *) ac_comsub= ;;
3570   esac
3571
3572   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3573   sed -e "$ac_comsub
3574 s%@configure_input@%$configure_input%g
3575 s%@srcdir@%$srcdir%g
3576 s%@top_srcdir@%$top_srcdir%g
3577 s%@INSTALL@%$INSTALL%g
3578 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3579 fi; done
3580 rm -f conftest.s*
3581
3582 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3583 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3584 #
3585 # ac_d sets the value in "#define NAME VALUE" lines.
3586 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3587 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3588 ac_dC='\3'
3589 ac_dD='%g'
3590 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3591 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3592 ac_uB='\([      ]\)%\1#\2define\3'
3593 ac_uC=' '
3594 ac_uD='\4%g'
3595 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3596 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3597 ac_eB='$%\1#\2define\3'
3598 ac_eC=' '
3599 ac_eD='%g'
3600
3601 if test "${CONFIG_HEADERS+set}" != set; then
3602 EOF
3603 cat >> $CONFIG_STATUS <<EOF
3604   CONFIG_HEADERS="include/portable.h"
3605 EOF
3606 cat >> $CONFIG_STATUS <<\EOF
3607 fi
3608 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3609   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3610   case "$ac_file" in
3611   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3612        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3613   *) ac_file_in="${ac_file}.in" ;;
3614   esac
3615
3616   echo creating $ac_file
3617
3618   rm -f conftest.frag conftest.in conftest.out
3619   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3620   cat $ac_file_inputs > conftest.in
3621
3622 EOF
3623
3624 # Transform confdefs.h into a sed script conftest.vals that substitutes
3625 # the proper values into config.h.in to produce config.h.  And first:
3626 # Protect against being on the right side of a sed subst in config.status.
3627 # Protect against being in an unquoted here document in config.status.
3628 rm -f conftest.vals
3629 cat > conftest.hdr <<\EOF
3630 s/[\\&%]/\\&/g
3631 s%[\\$`]%\\&%g
3632 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3633 s%ac_d%ac_u%gp
3634 s%ac_u%ac_e%gp
3635 EOF
3636 sed -n -f conftest.hdr confdefs.h > conftest.vals
3637 rm -f conftest.hdr
3638
3639 # This sed command replaces #undef with comments.  This is necessary, for
3640 # example, in the case of _POSIX_SOURCE, which is predefined and required
3641 # on some systems where configure will not decide to define it.
3642 cat >> conftest.vals <<\EOF
3643 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3644 EOF
3645
3646 # Break up conftest.vals because some shells have a limit on
3647 # the size of here documents, and old seds have small limits too.
3648
3649 rm -f conftest.tail
3650 while :
3651 do
3652   ac_lines=`grep -c . conftest.vals`
3653   # grep -c gives empty output for an empty file on some AIX systems.
3654   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3655   # Write a limited-size here document to conftest.frag.
3656   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3657   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3658   echo 'CEOF
3659   sed -f conftest.frag conftest.in > conftest.out
3660   rm -f conftest.in
3661   mv conftest.out conftest.in
3662 ' >> $CONFIG_STATUS
3663   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3664   rm -f conftest.vals
3665   mv conftest.tail conftest.vals
3666 done
3667 rm -f conftest.vals
3668
3669 cat >> $CONFIG_STATUS <<\EOF
3670   rm -f conftest.frag conftest.h
3671   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3672   cat conftest.in >> conftest.h
3673   rm -f conftest.in
3674   if cmp -s $ac_file conftest.h 2>/dev/null; then
3675     echo "$ac_file is unchanged"
3676     rm -f conftest.h
3677   else
3678     # Remove last slash and all that follows it.  Not all systems have dirname.
3679       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3680       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3681       # The file is in a subdirectory.
3682       test ! -d "$ac_dir" && mkdir "$ac_dir"
3683     fi
3684     rm -f $ac_file
3685     mv conftest.h $ac_file
3686   fi
3687 fi; done
3688
3689 EOF
3690 cat >> $CONFIG_STATUS <<EOF
3691
3692 EOF
3693 cat >> $CONFIG_STATUS <<\EOF
3694 date > stamp-h
3695 exit 0
3696 EOF
3697 chmod +x $CONFIG_STATUS
3698 rm -fr confdefs* $ac_clean_files
3699 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3700