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