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