]> git.sur5r.net Git - openldap/blob - configure
5ce0e3dc1bf4bc0fafe5f4baf95fe5ba06280314
[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 fi
2275
2276
2277  
2278  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
2279 echo "configure:2280: checking for Berkeley DB2" >&5
2280 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
2281   echo $ac_n "(cached) $ac_c" 1>&6
2282 else
2283   
2284         if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then
2285                 ol_cv_berkeley_db2=no
2286         else
2287                 ol_cv_berkeley_db2=yes
2288         fi
2289
2290 fi
2291
2292 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
2293
2294
2295         if test $ol_cv_berkeley_db2 = yes ; then
2296                 ol_link_ldbm=db2
2297                 ol_with_ldbm_api=db2
2298
2299                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2"
2300
2301                 if test $ol_with_ldbm_type = hash ; then
2302                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
2303                 else
2304                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
2305                 fi
2306
2307                 if test $ol_cv_lib_db2 != yes ; then
2308                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
2309                 fi
2310         fi
2311 fi
2312
2313 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
2314         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
2315 echo "configure:2316: checking for Berkeley DB library" >&5
2316 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319         ol_LIBS="$LIBS"
2320         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
2321 echo "configure:2322: checking for dbopen" >&5
2322 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
2323   echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325   cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 /* System header to define __stub macros and hopefully few prototypes,
2329     which can conflict with char dbopen(); below.  */
2330 #include <assert.h>
2331 /* Override any gcc2 internal prototype to avoid an error.  */
2332 /* We use char because int might match the return type of a gcc2
2333     builtin and then its argument prototype would still apply.  */
2334 char dbopen();
2335
2336 int main() {
2337
2338 /* The GNU C library defines this for functions which it implements
2339     to always fail with ENOSYS.  Some functions are actually named
2340     something starting with __ and the normal name is an alias.  */
2341 #if defined (__stub_dbopen) || defined (__stub___dbopen)
2342 choke me
2343 #else
2344 dbopen();
2345 #endif
2346
2347 ; return 0; }
2348 EOF
2349 if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2350   rm -rf conftest*
2351   eval "ac_cv_func_dbopen=yes"
2352 else
2353   echo "configure: failed program was:" >&5
2354   cat conftest.$ac_ext >&5
2355   rm -rf conftest*
2356   eval "ac_cv_func_dbopen=no"
2357 fi
2358 rm -f conftest*
2359 fi
2360
2361 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
2362   echo "$ac_t""yes" 1>&6
2363   ol_cv_lib_db=yes
2364 else
2365   echo "$ac_t""no" 1>&6
2366
2367                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
2368 echo "configure:2369: checking for dbopen in -ldb" >&5
2369 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
2370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2371   echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373   ac_save_LIBS="$LIBS"
2374 LIBS="-ldb  $LIBS"
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 /* Override any gcc2 internal prototype to avoid an error.  */
2379 /* We use char because int might match the return type of a gcc2
2380     builtin and then its argument prototype would still apply.  */
2381 char dbopen();
2382
2383 int main() {
2384 dbopen()
2385 ; return 0; }
2386 EOF
2387 if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2388   rm -rf conftest*
2389   eval "ac_cv_lib_$ac_lib_var=yes"
2390 else
2391   echo "configure: failed program was:" >&5
2392   cat conftest.$ac_ext >&5
2393   rm -rf conftest*
2394   eval "ac_cv_lib_$ac_lib_var=no"
2395 fi
2396 rm -f conftest*
2397 LIBS="$ac_save_LIBS"
2398
2399 fi
2400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2401   echo "$ac_t""yes" 1>&6
2402   ol_cv_lib_db=-ldb
2403 else
2404   echo "$ac_t""no" 1>&6
2405 ol_cv_lib_db=no
2406 fi
2407
2408         
2409 fi
2410
2411         LIBS="$ol_LIBS"
2412
2413 fi
2414
2415 echo "$ac_t""$ol_cv_lib_db" 1>&6
2416
2417
2418 for ac_hdr in db_185.h
2419 do
2420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2422 echo "configure:2423: checking for $ac_hdr" >&5
2423 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2424   echo $ac_n "(cached) $ac_c" 1>&6
2425 else
2426   cat > conftest.$ac_ext <<EOF
2427 #line 2428 "configure"
2428 #include "confdefs.h"
2429 #include <$ac_hdr>
2430 EOF
2431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2432 { (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2433 ac_err=`grep -v '^ *+' conftest.out`
2434 if test -z "$ac_err"; then
2435   rm -rf conftest*
2436   eval "ac_cv_header_$ac_safe=yes"
2437 else
2438   echo "$ac_err" >&5
2439   echo "configure: failed program was:" >&5
2440   cat conftest.$ac_ext >&5
2441   rm -rf conftest*
2442   eval "ac_cv_header_$ac_safe=no"
2443 fi
2444 rm -f conftest*
2445 fi
2446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2447   echo "$ac_t""yes" 1>&6
2448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2449   cat >> confdefs.h <<EOF
2450 #define $ac_tr_hdr 1
2451 EOF
2452  
2453 else
2454   echo "$ac_t""no" 1>&6
2455 fi
2456 done
2457
2458 if test $ol_cv_header_db2 = yes ; then
2459         
2460         ol_cv_header_db=$ac_cv_header_db_185_h
2461 else
2462         ol_cv_header_db=$ac_cv_header_db_h
2463 fi
2464
2465
2466  
2467  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
2468 echo "configure:2469: checking for Berkeley DB" >&5
2469 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   
2473         if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then
2474                 ol_cv_berkeley_db=no
2475         else
2476                 ol_cv_berkeley_db=yes
2477         fi
2478
2479 fi
2480
2481 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
2482
2483
2484         if test $ol_cv_berkeley_db = yes ; then
2485                 ol_link_ldbm=db
2486                 ol_with_ldbm_api=db
2487
2488                 if test $ac_cv_header_db_185_h = yes ; then
2489                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185"
2490                 fi
2491
2492                 if test $ol_with_ldbm_type = hash ; then
2493                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
2494                 else
2495                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
2496                 fi
2497
2498                 if test $ol_cv_lib_db != yes ; then
2499                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
2500                 fi
2501         fi
2502 fi
2503
2504 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
2505         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2;
2506         $ol_with_ldbm_api=none
2507 fi
2508
2509 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
2510         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
2511 echo "configure:2512: checking for GDBM library" >&5
2512 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
2513   echo $ac_n "(cached) $ac_c" 1>&6
2514 else
2515         ol_LIBS="$LIBS"
2516         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
2517 echo "configure:2518: checking for gdbm_open" >&5
2518 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
2519   echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521   cat > conftest.$ac_ext <<EOF
2522 #line 2523 "configure"
2523 #include "confdefs.h"
2524 /* System header to define __stub macros and hopefully few prototypes,
2525     which can conflict with char gdbm_open(); below.  */
2526 #include <assert.h>
2527 /* Override any gcc2 internal prototype to avoid an error.  */
2528 /* We use char because int might match the return type of a gcc2
2529     builtin and then its argument prototype would still apply.  */
2530 char gdbm_open();
2531
2532 int main() {
2533
2534 /* The GNU C library defines this for functions which it implements
2535     to always fail with ENOSYS.  Some functions are actually named
2536     something starting with __ and the normal name is an alias.  */
2537 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
2538 choke me
2539 #else
2540 gdbm_open();
2541 #endif
2542
2543 ; return 0; }
2544 EOF
2545 if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2546   rm -rf conftest*
2547   eval "ac_cv_func_gdbm_open=yes"
2548 else
2549   echo "configure: failed program was:" >&5
2550   cat conftest.$ac_ext >&5
2551   rm -rf conftest*
2552   eval "ac_cv_func_gdbm_open=no"
2553 fi
2554 rm -f conftest*
2555 fi
2556
2557 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
2558   echo "$ac_t""yes" 1>&6
2559   ol_cv_lib_gdbm=yes
2560 else
2561   echo "$ac_t""no" 1>&6
2562
2563                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
2564 echo "configure:2565: checking for gdbm_open in -lgdbm" >&5
2565 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
2566 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2567   echo $ac_n "(cached) $ac_c" 1>&6
2568 else
2569   ac_save_LIBS="$LIBS"
2570 LIBS="-lgdbm  $LIBS"
2571 cat > conftest.$ac_ext <<EOF
2572 #line 2573 "configure"
2573 #include "confdefs.h"
2574 /* Override any gcc2 internal prototype to avoid an error.  */
2575 /* We use char because int might match the return type of a gcc2
2576     builtin and then its argument prototype would still apply.  */
2577 char gdbm_open();
2578
2579 int main() {
2580 gdbm_open()
2581 ; return 0; }
2582 EOF
2583 if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2584   rm -rf conftest*
2585   eval "ac_cv_lib_$ac_lib_var=yes"
2586 else
2587   echo "configure: failed program was:" >&5
2588   cat conftest.$ac_ext >&5
2589   rm -rf conftest*
2590   eval "ac_cv_lib_$ac_lib_var=no"
2591 fi
2592 rm -f conftest*
2593 LIBS="$ac_save_LIBS"
2594
2595 fi
2596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2597   echo "$ac_t""yes" 1>&6
2598   ol_cv_lib_gdbm=-lgdbm
2599 else
2600   echo "$ac_t""no" 1>&6
2601 ol_cv_lib_gdbm=no
2602 fi
2603
2604         
2605 fi
2606
2607         LIBS="$ol_LIBS"
2608
2609 fi
2610
2611 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
2612
2613
2614  for ac_hdr in gdbm.h
2615 do
2616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2618 echo "configure:2619: checking for $ac_hdr" >&5
2619 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2620   echo $ac_n "(cached) $ac_c" 1>&6
2621 else
2622   cat > conftest.$ac_ext <<EOF
2623 #line 2624 "configure"
2624 #include "confdefs.h"
2625 #include <$ac_hdr>
2626 EOF
2627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2628 { (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2629 ac_err=`grep -v '^ *+' conftest.out`
2630 if test -z "$ac_err"; then
2631   rm -rf conftest*
2632   eval "ac_cv_header_$ac_safe=yes"
2633 else
2634   echo "$ac_err" >&5
2635   echo "configure: failed program was:" >&5
2636   cat conftest.$ac_ext >&5
2637   rm -rf conftest*
2638   eval "ac_cv_header_$ac_safe=no"
2639 fi
2640 rm -f conftest*
2641 fi
2642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2643   echo "$ac_t""yes" 1>&6
2644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2645   cat >> confdefs.h <<EOF
2646 #define $ac_tr_hdr 1
2647 EOF
2648  
2649 else
2650   echo "$ac_t""no" 1>&6
2651 fi
2652 done
2653
2654  echo $ac_n "checking for db""... $ac_c" 1>&6
2655 echo "configure:2656: checking for db" >&5
2656 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
2657   echo $ac_n "(cached) $ac_c" 1>&6
2658 else
2659   
2660         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
2661                 ol_cv_gdbm=no
2662         else
2663                 ol_cv_gdbm=yes
2664         fi
2665
2666 fi
2667
2668 echo "$ac_t""$ol_cv_gdbm" 1>&6
2669
2670
2671         if test $ol_cv_gdbm = yes ; then
2672                 ol_link_ldbm=gdbm
2673                 ol_with_ldbm_api=gdbm
2674
2675                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM"
2676
2677                 if test $ol_cv_lib_gdbm != yes ; then
2678                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
2679                 fi
2680         fi
2681 fi
2682
2683 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
2684         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
2685 echo "configure:2686: checking for NDBM library" >&5
2686 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
2687   echo $ac_n "(cached) $ac_c" 1>&6
2688 else
2689         ol_LIBS="$LIBS"
2690         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
2691 echo "configure:2692: checking for dbm_open" >&5
2692 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
2693   echo $ac_n "(cached) $ac_c" 1>&6
2694 else
2695   cat > conftest.$ac_ext <<EOF
2696 #line 2697 "configure"
2697 #include "confdefs.h"
2698 /* System header to define __stub macros and hopefully few prototypes,
2699     which can conflict with char dbm_open(); below.  */
2700 #include <assert.h>
2701 /* Override any gcc2 internal prototype to avoid an error.  */
2702 /* We use char because int might match the return type of a gcc2
2703     builtin and then its argument prototype would still apply.  */
2704 char dbm_open();
2705
2706 int main() {
2707
2708 /* The GNU C library defines this for functions which it implements
2709     to always fail with ENOSYS.  Some functions are actually named
2710     something starting with __ and the normal name is an alias.  */
2711 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
2712 choke me
2713 #else
2714 dbm_open();
2715 #endif
2716
2717 ; return 0; }
2718 EOF
2719 if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2720   rm -rf conftest*
2721   eval "ac_cv_func_dbm_open=yes"
2722 else
2723   echo "configure: failed program was:" >&5
2724   cat conftest.$ac_ext >&5
2725   rm -rf conftest*
2726   eval "ac_cv_func_dbm_open=no"
2727 fi
2728 rm -f conftest*
2729 fi
2730
2731 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
2732   echo "$ac_t""yes" 1>&6
2733   ol_cv_lib_ndbm=yes
2734 else
2735   echo "$ac_t""no" 1>&6
2736
2737                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
2738 echo "configure:2739: checking for dbm_open in -lndbm" >&5
2739 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
2740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2741   echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743   ac_save_LIBS="$LIBS"
2744 LIBS="-lndbm  $LIBS"
2745 cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748 /* Override any gcc2 internal prototype to avoid an error.  */
2749 /* We use char because int might match the return type of a gcc2
2750     builtin and then its argument prototype would still apply.  */
2751 char dbm_open();
2752
2753 int main() {
2754 dbm_open()
2755 ; return 0; }
2756 EOF
2757 if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2758   rm -rf conftest*
2759   eval "ac_cv_lib_$ac_lib_var=yes"
2760 else
2761   echo "configure: failed program was:" >&5
2762   cat conftest.$ac_ext >&5
2763   rm -rf conftest*
2764   eval "ac_cv_lib_$ac_lib_var=no"
2765 fi
2766 rm -f conftest*
2767 LIBS="$ac_save_LIBS"
2768
2769 fi
2770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2771   echo "$ac_t""yes" 1>&6
2772   ol_cv_lib_ndbm=-lndbm
2773 else
2774   echo "$ac_t""no" 1>&6
2775
2776                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
2777 echo "configure:2778: checking for dbm_open in -ldbm" >&5
2778 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
2779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2780   echo $ac_n "(cached) $ac_c" 1>&6
2781 else
2782   ac_save_LIBS="$LIBS"
2783 LIBS="-ldbm  $LIBS"
2784 cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787 /* Override any gcc2 internal prototype to avoid an error.  */
2788 /* We use char because int might match the return type of a gcc2
2789     builtin and then its argument prototype would still apply.  */
2790 char dbm_open();
2791
2792 int main() {
2793 dbm_open()
2794 ; return 0; }
2795 EOF
2796 if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2797   rm -rf conftest*
2798   eval "ac_cv_lib_$ac_lib_var=yes"
2799 else
2800   echo "configure: failed program was:" >&5
2801   cat conftest.$ac_ext >&5
2802   rm -rf conftest*
2803   eval "ac_cv_lib_$ac_lib_var=no"
2804 fi
2805 rm -f conftest*
2806 LIBS="$ac_save_LIBS"
2807
2808 fi
2809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2810   echo "$ac_t""yes" 1>&6
2811   ol_cv_lib_ndbm=-ldbm
2812 else
2813   echo "$ac_t""no" 1>&6
2814 ol_cv_lib_ndbm=no
2815 fi
2816                 
2817 fi
2818
2819         
2820 fi
2821
2822         LIBS="$ol_LIBS"
2823
2824 fi
2825
2826 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
2827
2828
2829  for ac_hdr in ndbm.h
2830 do
2831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2833 echo "configure:2834: checking for $ac_hdr" >&5
2834 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2835   echo $ac_n "(cached) $ac_c" 1>&6
2836 else
2837   cat > conftest.$ac_ext <<EOF
2838 #line 2839 "configure"
2839 #include "confdefs.h"
2840 #include <$ac_hdr>
2841 EOF
2842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2843 { (eval echo configure:2844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2844 ac_err=`grep -v '^ *+' conftest.out`
2845 if test -z "$ac_err"; then
2846   rm -rf conftest*
2847   eval "ac_cv_header_$ac_safe=yes"
2848 else
2849   echo "$ac_err" >&5
2850   echo "configure: failed program was:" >&5
2851   cat conftest.$ac_ext >&5
2852   rm -rf conftest*
2853   eval "ac_cv_header_$ac_safe=no"
2854 fi
2855 rm -f conftest*
2856 fi
2857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2858   echo "$ac_t""yes" 1>&6
2859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2860   cat >> confdefs.h <<EOF
2861 #define $ac_tr_hdr 1
2862 EOF
2863  
2864 else
2865   echo "$ac_t""no" 1>&6
2866 fi
2867 done
2868
2869  echo $ac_n "checking for db""... $ac_c" 1>&6
2870 echo "configure:2871: checking for db" >&5
2871 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
2872   echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874   
2875         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
2876                 ol_cv_ndbm=no
2877         else
2878                 ol_cv_ndbm=yes
2879         fi
2880
2881 fi
2882
2883 echo "$ac_t""$ol_cv_ndbm" 1>&6
2884
2885
2886         if test $ol_cv_ndbm = yes ; then
2887                 ol_link_ldbm=ndbm
2888                 ol_with_ldbm_api=ndbm
2889
2890                 if test $ol_with_ldbm_api = ndbm ; then
2891                         echo "configure: warning: Attempting to use NDBM.  Functionality will be limited." 1>&2
2892                 fi
2893
2894                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM"
2895
2896                 if test $ol_cv_lib_ndbm != yes ; then
2897                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
2898                 fi
2899         fi
2900 fi
2901
2902 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
2903         echo "configure: warning: could not find suitable LDBM backend" 1>&2
2904         if test $ol_enable_ldbm = yes ; then
2905                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
2906         fi
2907
2908         echo "configure: warning: disabling LDBM" 1>&2
2909         $ol_enable_ldbm=no
2910 fi
2911
2912 if test $ol_enable_wrappers = yes ; then
2913         echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6
2914 echo "configure:2915: checking for hosts_access in -lwrap" >&5
2915 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'`
2916 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2917   echo $ac_n "(cached) $ac_c" 1>&6
2918 else
2919   ac_save_LIBS="$LIBS"
2920 LIBS="-lwrap  $LIBS"
2921 cat > conftest.$ac_ext <<EOF
2922 #line 2923 "configure"
2923 #include "confdefs.h"
2924 /* Override any gcc2 internal prototype to avoid an error.  */
2925 /* We use char because int might match the return type of a gcc2
2926     builtin and then its argument prototype would still apply.  */
2927 char hosts_access();
2928
2929 int main() {
2930 hosts_access()
2931 ; return 0; }
2932 EOF
2933 if { (eval echo configure:2934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2934   rm -rf conftest*
2935   eval "ac_cv_lib_$ac_lib_var=yes"
2936 else
2937   echo "configure: failed program was:" >&5
2938   cat conftest.$ac_ext >&5
2939   rm -rf conftest*
2940   eval "ac_cv_lib_$ac_lib_var=no"
2941 fi
2942 rm -f conftest*
2943 LIBS="$ac_save_LIBS"
2944
2945 fi
2946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2947   echo "$ac_t""yes" 1>&6
2948   have_wrappers=yes
2949 else
2950   echo "$ac_t""no" 1>&6
2951 have_wrappers=no
2952 fi
2953
2954
2955         if test $have_wrappers = yes ; then
2956                 SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS"
2957                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
2958         else
2959                 echo "configure: warning: could not find -lwrap" 1>&2
2960                 if test $ol_enable_wrappers = yes ; then
2961                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
2962                 fi
2963
2964                 echo "configure: warning: disabling wrappers support" 1>&2
2965                 ol_enable_wrappers=no
2966         fi
2967
2968 fi
2969
2970 # ud needs termcap (should insert check here)
2971 LIBTERMCAP="-ltermcap"
2972
2973
2974 # FreeBSD (and others) have crypt(3) in -lcrypt
2975 if test $ol_enable_crypt != no ; then
2976         echo $ac_n "checking for crypt""... $ac_c" 1>&6
2977 echo "configure:2978: checking for crypt" >&5
2978 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 /* System header to define __stub macros and hopefully few prototypes,
2985     which can conflict with char crypt(); below.  */
2986 #include <assert.h>
2987 /* Override any gcc2 internal prototype to avoid an error.  */
2988 /* We use char because int might match the return type of a gcc2
2989     builtin and then its argument prototype would still apply.  */
2990 char crypt();
2991
2992 int main() {
2993
2994 /* The GNU C library defines this for functions which it implements
2995     to always fail with ENOSYS.  Some functions are actually named
2996     something starting with __ and the normal name is an alias.  */
2997 #if defined (__stub_crypt) || defined (__stub___crypt)
2998 choke me
2999 #else
3000 crypt();
3001 #endif
3002
3003 ; return 0; }
3004 EOF
3005 if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3006   rm -rf conftest*
3007   eval "ac_cv_func_crypt=yes"
3008 else
3009   echo "configure: failed program was:" >&5
3010   cat conftest.$ac_ext >&5
3011   rm -rf conftest*
3012   eval "ac_cv_func_crypt=no"
3013 fi
3014 rm -f conftest*
3015 fi
3016
3017 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
3018   echo "$ac_t""yes" 1>&6
3019   have_crypt=yes
3020 else
3021   echo "$ac_t""no" 1>&6
3022
3023                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3024 echo "configure:3025: checking for crypt in -lcrypt" >&5
3025 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3026 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3027   echo $ac_n "(cached) $ac_c" 1>&6
3028 else
3029   ac_save_LIBS="$LIBS"
3030 LIBS="-lcrypt  $LIBS"
3031 cat > conftest.$ac_ext <<EOF
3032 #line 3033 "configure"
3033 #include "confdefs.h"
3034 /* Override any gcc2 internal prototype to avoid an error.  */
3035 /* We use char because int might match the return type of a gcc2
3036     builtin and then its argument prototype would still apply.  */
3037 char crypt();
3038
3039 int main() {
3040 crypt()
3041 ; return 0; }
3042 EOF
3043 if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3044   rm -rf conftest*
3045   eval "ac_cv_lib_$ac_lib_var=yes"
3046 else
3047   echo "configure: failed program was:" >&5
3048   cat conftest.$ac_ext >&5
3049   rm -rf conftest*
3050   eval "ac_cv_lib_$ac_lib_var=no"
3051 fi
3052 rm -f conftest*
3053 LIBS="$ac_save_LIBS"
3054
3055 fi
3056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3057   echo "$ac_t""yes" 1>&6
3058   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
3059                         have_crypt=yes
3060 else
3061   echo "$ac_t""no" 1>&6
3062 have_crypt=no
3063 fi
3064
3065 fi
3066
3067
3068         if test $have_crypt = yes ; then
3069                 LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT"
3070         else
3071                 echo "configure: warning: could not find crypt" 1>&2
3072                 if test $ol_enable_crypt = yes ; then
3073                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
3074                 fi
3075
3076                 echo "configure: warning: disabling crypt support" 1>&2
3077                 ol_enable_crypt=no
3078         fi
3079 fi
3080
3081 ac_header_dirent=no
3082 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3083 do
3084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3085 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3086 echo "configure:3087: checking for $ac_hdr that defines DIR" >&5
3087 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   cat > conftest.$ac_ext <<EOF
3091 #line 3092 "configure"
3092 #include "confdefs.h"
3093 #include <sys/types.h>
3094 #include <$ac_hdr>
3095 int main() {
3096 DIR *dirp = 0;
3097 ; return 0; }
3098 EOF
3099 if { (eval echo configure:3100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3100   rm -rf conftest*
3101   eval "ac_cv_header_dirent_$ac_safe=yes"
3102 else
3103   echo "configure: failed program was:" >&5
3104   cat conftest.$ac_ext >&5
3105   rm -rf conftest*
3106   eval "ac_cv_header_dirent_$ac_safe=no"
3107 fi
3108 rm -f conftest*
3109 fi
3110 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3111   echo "$ac_t""yes" 1>&6
3112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3113   cat >> confdefs.h <<EOF
3114 #define $ac_tr_hdr 1
3115 EOF
3116  ac_header_dirent=$ac_hdr; break
3117 else
3118   echo "$ac_t""no" 1>&6
3119 fi
3120 done
3121 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3122 if test $ac_header_dirent = dirent.h; then
3123 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3124 echo "configure:3125: checking for opendir in -ldir" >&5
3125 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   ac_save_LIBS="$LIBS"
3130 LIBS="-ldir  $LIBS"
3131 cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 /* Override any gcc2 internal prototype to avoid an error.  */
3135 /* We use char because int might match the return type of a gcc2
3136     builtin and then its argument prototype would still apply.  */
3137 char opendir();
3138
3139 int main() {
3140 opendir()
3141 ; return 0; }
3142 EOF
3143 if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3144   rm -rf conftest*
3145   eval "ac_cv_lib_$ac_lib_var=yes"
3146 else
3147   echo "configure: failed program was:" >&5
3148   cat conftest.$ac_ext >&5
3149   rm -rf conftest*
3150   eval "ac_cv_lib_$ac_lib_var=no"
3151 fi
3152 rm -f conftest*
3153 LIBS="$ac_save_LIBS"
3154
3155 fi
3156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3157   echo "$ac_t""yes" 1>&6
3158   LIBS="$LIBS -ldir"
3159 else
3160   echo "$ac_t""no" 1>&6
3161 fi
3162
3163 else
3164 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3165 echo "configure:3166: checking for opendir in -lx" >&5
3166 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3167 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3168   echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170   ac_save_LIBS="$LIBS"
3171 LIBS="-lx  $LIBS"
3172 cat > conftest.$ac_ext <<EOF
3173 #line 3174 "configure"
3174 #include "confdefs.h"
3175 /* Override any gcc2 internal prototype to avoid an error.  */
3176 /* We use char because int might match the return type of a gcc2
3177     builtin and then its argument prototype would still apply.  */
3178 char opendir();
3179
3180 int main() {
3181 opendir()
3182 ; return 0; }
3183 EOF
3184 if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3185   rm -rf conftest*
3186   eval "ac_cv_lib_$ac_lib_var=yes"
3187 else
3188   echo "configure: failed program was:" >&5
3189   cat conftest.$ac_ext >&5
3190   rm -rf conftest*
3191   eval "ac_cv_lib_$ac_lib_var=no"
3192 fi
3193 rm -f conftest*
3194 LIBS="$ac_save_LIBS"
3195
3196 fi
3197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3198   echo "$ac_t""yes" 1>&6
3199   LIBS="$LIBS -lx"
3200 else
3201   echo "$ac_t""no" 1>&6
3202 fi
3203
3204 fi
3205
3206 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3207 echo "configure:3208: checking for ANSI C header files" >&5
3208 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211   cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214 #include <stdlib.h>
3215 #include <stdarg.h>
3216 #include <string.h>
3217 #include <float.h>
3218 EOF
3219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3220 { (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3221 ac_err=`grep -v '^ *+' conftest.out`
3222 if test -z "$ac_err"; then
3223   rm -rf conftest*
3224   ac_cv_header_stdc=yes
3225 else
3226   echo "$ac_err" >&5
3227   echo "configure: failed program was:" >&5
3228   cat conftest.$ac_ext >&5
3229   rm -rf conftest*
3230   ac_cv_header_stdc=no
3231 fi
3232 rm -f conftest*
3233
3234 if test $ac_cv_header_stdc = yes; then
3235   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3236 cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239 #include <string.h>
3240 EOF
3241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3242   egrep "memchr" >/dev/null 2>&1; then
3243   :
3244 else
3245   rm -rf conftest*
3246   ac_cv_header_stdc=no
3247 fi
3248 rm -f conftest*
3249
3250 fi
3251
3252 if test $ac_cv_header_stdc = yes; then
3253   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3254 cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 #include <stdlib.h>
3258 EOF
3259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3260   egrep "free" >/dev/null 2>&1; then
3261   :
3262 else
3263   rm -rf conftest*
3264   ac_cv_header_stdc=no
3265 fi
3266 rm -f conftest*
3267
3268 fi
3269
3270 if test $ac_cv_header_stdc = yes; then
3271   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3272 if test "$cross_compiling" = yes; then
3273   :
3274 else
3275   cat > conftest.$ac_ext <<EOF
3276 #line 3277 "configure"
3277 #include "confdefs.h"
3278 #include <ctype.h>
3279 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3280 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3281 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3282 int main () { int i; for (i = 0; i < 256; i++)
3283 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3284 exit (0); }
3285
3286 EOF
3287 if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3288 then
3289   :
3290 else
3291   echo "configure: failed program was:" >&5
3292   cat conftest.$ac_ext >&5
3293   rm -fr conftest*
3294   ac_cv_header_stdc=no
3295 fi
3296 rm -fr conftest*
3297 fi
3298
3299 fi
3300 fi
3301
3302 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3303 if test $ac_cv_header_stdc = yes; then
3304   cat >> confdefs.h <<\EOF
3305 #define STDC_HEADERS 1
3306 EOF
3307
3308 fi
3309
3310 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3311 echo "configure:3312: checking for sys/wait.h that is POSIX.1 compatible" >&5
3312 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3313   echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315   cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 #include <sys/types.h>
3319 #include <sys/wait.h>
3320 #ifndef WEXITSTATUS
3321 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3322 #endif
3323 #ifndef WIFEXITED
3324 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3325 #endif
3326 int main() {
3327 int s;
3328 wait (&s);
3329 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3330 ; return 0; }
3331 EOF
3332 if { (eval echo configure:3333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3333   rm -rf conftest*
3334   ac_cv_header_sys_wait_h=yes
3335 else
3336   echo "configure: failed program was:" >&5
3337   cat conftest.$ac_ext >&5
3338   rm -rf conftest*
3339   ac_cv_header_sys_wait_h=no
3340 fi
3341 rm -f conftest*
3342 fi
3343
3344 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3345 if test $ac_cv_header_sys_wait_h = yes; then
3346   cat >> confdefs.h <<\EOF
3347 #define HAVE_SYS_WAIT_H 1
3348 EOF
3349
3350 fi
3351
3352 for ac_hdr in \
3353         stddef.h        \
3354         fcntl.h         \
3355         limits.h        \
3356         malloc.h        \
3357         sgtty.h         \
3358         sys/file.h      \
3359         sys/ioctl.h     \
3360         sys/time.h      \
3361         syslog.h        \
3362         termio.h        \
3363         unistd.h        \
3364
3365 do
3366 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3367 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3368 echo "configure:3369: checking for $ac_hdr" >&5
3369 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3370   echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372   cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 #include <$ac_hdr>
3376 EOF
3377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3378 { (eval echo configure:3379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3379 ac_err=`grep -v '^ *+' conftest.out`
3380 if test -z "$ac_err"; then
3381   rm -rf conftest*
3382   eval "ac_cv_header_$ac_safe=yes"
3383 else
3384   echo "$ac_err" >&5
3385   echo "configure: failed program was:" >&5
3386   cat conftest.$ac_ext >&5
3387   rm -rf conftest*
3388   eval "ac_cv_header_$ac_safe=no"
3389 fi
3390 rm -f conftest*
3391 fi
3392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3393   echo "$ac_t""yes" 1>&6
3394     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3395   cat >> confdefs.h <<EOF
3396 #define $ac_tr_hdr 1
3397 EOF
3398  
3399 else
3400   echo "$ac_t""no" 1>&6
3401 fi
3402 done
3403
3404
3405 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3406 echo "configure:3407: checking for uid_t in sys/types.h" >&5
3407 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <sys/types.h>
3414 EOF
3415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3416   egrep "uid_t" >/dev/null 2>&1; then
3417   rm -rf conftest*
3418   ac_cv_type_uid_t=yes
3419 else
3420   rm -rf conftest*
3421   ac_cv_type_uid_t=no
3422 fi
3423 rm -f conftest*
3424
3425 fi
3426
3427 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3428 if test $ac_cv_type_uid_t = no; then
3429   cat >> confdefs.h <<\EOF
3430 #define uid_t int
3431 EOF
3432
3433   cat >> confdefs.h <<\EOF
3434 #define gid_t int
3435 EOF
3436
3437 fi
3438
3439 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3440 echo "configure:3441: checking type of array argument to getgroups" >&5
3441 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3442   echo $ac_n "(cached) $ac_c" 1>&6
3443 else
3444   if test "$cross_compiling" = yes; then
3445   ac_cv_type_getgroups=cross
3446 else
3447   cat > conftest.$ac_ext <<EOF
3448 #line 3449 "configure"
3449 #include "confdefs.h"
3450
3451 /* Thanks to Mike Rendell for this test.  */
3452 #include <sys/types.h>
3453 #define NGID 256
3454 #undef MAX
3455 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3456 main()
3457 {
3458   gid_t gidset[NGID];
3459   int i, n;
3460   union { gid_t gval; long lval; }  val;
3461
3462   val.lval = -1;
3463   for (i = 0; i < NGID; i++)
3464     gidset[i] = val.gval;
3465   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3466                  gidset);
3467   /* Exit non-zero if getgroups seems to require an array of ints.  This
3468      happens when gid_t is short but getgroups modifies an array of ints.  */
3469   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3470 }
3471
3472 EOF
3473 if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3474 then
3475     ac_cv_type_getgroups=gid_t
3476 else
3477   echo "configure: failed program was:" >&5
3478   cat conftest.$ac_ext >&5
3479   rm -fr conftest*
3480   ac_cv_type_getgroups=int
3481 fi
3482 rm -fr conftest*
3483 fi
3484
3485 if test $ac_cv_type_getgroups = cross; then
3486         cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 #include <unistd.h>
3490 EOF
3491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3492   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3493   rm -rf conftest*
3494   ac_cv_type_getgroups=gid_t
3495 else
3496   rm -rf conftest*
3497   ac_cv_type_getgroups=int
3498 fi
3499 rm -f conftest*
3500
3501 fi
3502 fi
3503
3504 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3505 cat >> confdefs.h <<EOF
3506 #define GETGROUPS_T $ac_cv_type_getgroups
3507 EOF
3508
3509
3510 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3511 echo "configure:3512: checking for mode_t" >&5
3512 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   cat > conftest.$ac_ext <<EOF
3516 #line 3517 "configure"
3517 #include "confdefs.h"
3518 #include <sys/types.h>
3519 #if STDC_HEADERS
3520 #include <stdlib.h>
3521 #include <stddef.h>
3522 #endif
3523 EOF
3524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3525   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3526   rm -rf conftest*
3527   ac_cv_type_mode_t=yes
3528 else
3529   rm -rf conftest*
3530   ac_cv_type_mode_t=no
3531 fi
3532 rm -f conftest*
3533
3534 fi
3535 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3536 if test $ac_cv_type_mode_t = no; then
3537   cat >> confdefs.h <<\EOF
3538 #define mode_t int
3539 EOF
3540
3541 fi
3542
3543 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3544 echo "configure:3545: checking for off_t" >&5
3545 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3546   echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548   cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551 #include <sys/types.h>
3552 #if STDC_HEADERS
3553 #include <stdlib.h>
3554 #include <stddef.h>
3555 #endif
3556 EOF
3557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3558   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3559   rm -rf conftest*
3560   ac_cv_type_off_t=yes
3561 else
3562   rm -rf conftest*
3563   ac_cv_type_off_t=no
3564 fi
3565 rm -f conftest*
3566
3567 fi
3568 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3569 if test $ac_cv_type_off_t = no; then
3570   cat >> confdefs.h <<\EOF
3571 #define off_t long
3572 EOF
3573
3574 fi
3575
3576 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3577 echo "configure:3578: checking for pid_t" >&5
3578 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3579   echo $ac_n "(cached) $ac_c" 1>&6
3580 else
3581   cat > conftest.$ac_ext <<EOF
3582 #line 3583 "configure"
3583 #include "confdefs.h"
3584 #include <sys/types.h>
3585 #if STDC_HEADERS
3586 #include <stdlib.h>
3587 #include <stddef.h>
3588 #endif
3589 EOF
3590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3591   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3592   rm -rf conftest*
3593   ac_cv_type_pid_t=yes
3594 else
3595   rm -rf conftest*
3596   ac_cv_type_pid_t=no
3597 fi
3598 rm -f conftest*
3599
3600 fi
3601 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3602 if test $ac_cv_type_pid_t = no; then
3603   cat >> confdefs.h <<\EOF
3604 #define pid_t int
3605 EOF
3606
3607 fi
3608
3609 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3610 echo "configure:3611: checking return type of signal handlers" >&5
3611 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3612   echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614   cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #include <sys/types.h>
3618 #include <signal.h>
3619 #ifdef signal
3620 #undef signal
3621 #endif
3622 #ifdef __cplusplus
3623 extern "C" void (*signal (int, void (*)(int)))(int);
3624 #else
3625 void (*signal ()) ();
3626 #endif
3627
3628 int main() {
3629 int i;
3630 ; return 0; }
3631 EOF
3632 if { (eval echo configure:3633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3633   rm -rf conftest*
3634   ac_cv_type_signal=void
3635 else
3636   echo "configure: failed program was:" >&5
3637   cat conftest.$ac_ext >&5
3638   rm -rf conftest*
3639   ac_cv_type_signal=int
3640 fi
3641 rm -f conftest*
3642 fi
3643
3644 echo "$ac_t""$ac_cv_type_signal" 1>&6
3645 cat >> confdefs.h <<EOF
3646 #define RETSIGTYPE $ac_cv_type_signal
3647 EOF
3648
3649
3650 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3651 echo "configure:3652: checking for size_t" >&5
3652 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   cat > conftest.$ac_ext <<EOF
3656 #line 3657 "configure"
3657 #include "confdefs.h"
3658 #include <sys/types.h>
3659 #if STDC_HEADERS
3660 #include <stdlib.h>
3661 #include <stddef.h>
3662 #endif
3663 EOF
3664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3665   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3666   rm -rf conftest*
3667   ac_cv_type_size_t=yes
3668 else
3669   rm -rf conftest*
3670   ac_cv_type_size_t=no
3671 fi
3672 rm -f conftest*
3673
3674 fi
3675 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3676 if test $ac_cv_type_size_t = no; then
3677   cat >> confdefs.h <<\EOF
3678 #define size_t unsigned
3679 EOF
3680
3681 fi
3682
3683 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3684 echo "configure:3685: checking for uid_t in sys/types.h" >&5
3685 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3686   echo $ac_n "(cached) $ac_c" 1>&6
3687 else
3688   cat > conftest.$ac_ext <<EOF
3689 #line 3690 "configure"
3690 #include "confdefs.h"
3691 #include <sys/types.h>
3692 EOF
3693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3694   egrep "uid_t" >/dev/null 2>&1; then
3695   rm -rf conftest*
3696   ac_cv_type_uid_t=yes
3697 else
3698   rm -rf conftest*
3699   ac_cv_type_uid_t=no
3700 fi
3701 rm -f conftest*
3702
3703 fi
3704
3705 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3706 if test $ac_cv_type_uid_t = no; then
3707   cat >> confdefs.h <<\EOF
3708 #define uid_t int
3709 EOF
3710
3711   cat >> confdefs.h <<\EOF
3712 #define gid_t int
3713 EOF
3714
3715 fi
3716
3717 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
3718 echo "configure:3719: checking for st_blksize in struct stat" >&5
3719 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
3720   echo $ac_n "(cached) $ac_c" 1>&6
3721 else
3722   cat > conftest.$ac_ext <<EOF
3723 #line 3724 "configure"
3724 #include "confdefs.h"
3725 #include <sys/types.h>
3726 #include <sys/stat.h>
3727 int main() {
3728 struct stat s; s.st_blksize;
3729 ; return 0; }
3730 EOF
3731 if { (eval echo configure:3732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3732   rm -rf conftest*
3733   ac_cv_struct_st_blksize=yes
3734 else
3735   echo "configure: failed program was:" >&5
3736   cat conftest.$ac_ext >&5
3737   rm -rf conftest*
3738   ac_cv_struct_st_blksize=no
3739 fi
3740 rm -f conftest*
3741 fi
3742
3743 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
3744 if test $ac_cv_struct_st_blksize = yes; then
3745   cat >> confdefs.h <<\EOF
3746 #define HAVE_ST_BLKSIZE 1
3747 EOF
3748
3749 fi
3750
3751 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3752 echo "configure:3753: checking whether time.h and sys/time.h may both be included" >&5
3753 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759 #include <sys/types.h>
3760 #include <sys/time.h>
3761 #include <time.h>
3762 int main() {
3763 struct tm *tp;
3764 ; return 0; }
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3767   rm -rf conftest*
3768   ac_cv_header_time=yes
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773   ac_cv_header_time=no
3774 fi
3775 rm -f conftest*
3776 fi
3777
3778 echo "$ac_t""$ac_cv_header_time" 1>&6
3779 if test $ac_cv_header_time = yes; then
3780   cat >> confdefs.h <<\EOF
3781 #define TIME_WITH_SYS_TIME 1
3782 EOF
3783
3784 fi
3785
3786 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3787 echo "configure:3788: checking whether struct tm is in sys/time.h or time.h" >&5
3788 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3789   echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791   cat > conftest.$ac_ext <<EOF
3792 #line 3793 "configure"
3793 #include "confdefs.h"
3794 #include <sys/types.h>
3795 #include <time.h>
3796 int main() {
3797 struct tm *tp; tp->tm_sec;
3798 ; return 0; }
3799 EOF
3800 if { (eval echo configure:3801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3801   rm -rf conftest*
3802   ac_cv_struct_tm=time.h
3803 else
3804   echo "configure: failed program was:" >&5
3805   cat conftest.$ac_ext >&5
3806   rm -rf conftest*
3807   ac_cv_struct_tm=sys/time.h
3808 fi
3809 rm -f conftest*
3810 fi
3811
3812 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3813 if test $ac_cv_struct_tm = sys/time.h; then
3814   cat >> confdefs.h <<\EOF
3815 #define TM_IN_SYS_TIME 1
3816 EOF
3817
3818 fi
3819
3820
3821 echo $ac_n "checking for working const""... $ac_c" 1>&6
3822 echo "configure:3823: checking for working const" >&5
3823 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829
3830 int main() {
3831
3832 /* Ultrix mips cc rejects this.  */
3833 typedef int charset[2]; const charset x;
3834 /* SunOS 4.1.1 cc rejects this.  */
3835 char const *const *ccp;
3836 char **p;
3837 /* NEC SVR4.0.2 mips cc rejects this.  */
3838 struct point {int x, y;};
3839 static struct point const zero = {0,0};
3840 /* AIX XL C 1.02.0.0 rejects this.
3841    It does not let you subtract one const X* pointer from another in an arm
3842    of an if-expression whose if-part is not a constant expression */
3843 const char *g = "string";
3844 ccp = &g + (g ? g-g : 0);
3845 /* HPUX 7.0 cc rejects these. */
3846 ++ccp;
3847 p = (char**) ccp;
3848 ccp = (char const *const *) p;
3849 { /* SCO 3.2v4 cc rejects this.  */
3850   char *t;
3851   char const *s = 0 ? (char *) 0 : (char const *) 0;
3852
3853   *t++ = 0;
3854 }
3855 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3856   int x[] = {25, 17};
3857   const int *foo = &x[0];
3858   ++foo;
3859 }
3860 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3861   typedef const int *iptr;
3862   iptr p = 0;
3863   ++p;
3864 }
3865 { /* AIX XL C 1.02.0.0 rejects this saying
3866      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3867   struct s { int j; const int *ap[3]; };
3868   struct s *b; b->j = 5;
3869 }
3870 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3871   const int foo = 10;
3872 }
3873
3874 ; return 0; }
3875 EOF
3876 if { (eval echo configure:3877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3877   rm -rf conftest*
3878   ac_cv_c_const=yes
3879 else
3880   echo "configure: failed program was:" >&5
3881   cat conftest.$ac_ext >&5
3882   rm -rf conftest*
3883   ac_cv_c_const=no
3884 fi
3885 rm -f conftest*
3886 fi
3887
3888 echo "$ac_t""$ac_cv_c_const" 1>&6
3889 if test $ac_cv_c_const = no; then
3890   cat >> confdefs.h <<\EOF
3891 #define const 
3892 EOF
3893
3894 fi
3895
3896
3897 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3898 echo "configure:3899: checking for 8-bit clean memcmp" >&5
3899 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3900   echo $ac_n "(cached) $ac_c" 1>&6
3901 else
3902   if test "$cross_compiling" = yes; then
3903   ac_cv_func_memcmp_clean=no
3904 else
3905   cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908
3909 main()
3910 {
3911   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3912   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3913 }
3914
3915 EOF
3916 if { (eval echo configure:3917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3917 then
3918   ac_cv_func_memcmp_clean=yes
3919 else
3920   echo "configure: failed program was:" >&5
3921   cat conftest.$ac_ext >&5
3922   rm -fr conftest*
3923   ac_cv_func_memcmp_clean=no
3924 fi
3925 rm -fr conftest*
3926 fi
3927
3928 fi
3929
3930 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3931 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
3932
3933 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3934 echo "configure:3935: checking return type of signal handlers" >&5
3935 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3936   echo $ac_n "(cached) $ac_c" 1>&6
3937 else
3938   cat > conftest.$ac_ext <<EOF
3939 #line 3940 "configure"
3940 #include "confdefs.h"
3941 #include <sys/types.h>
3942 #include <signal.h>
3943 #ifdef signal
3944 #undef signal
3945 #endif
3946 #ifdef __cplusplus
3947 extern "C" void (*signal (int, void (*)(int)))(int);
3948 #else
3949 void (*signal ()) ();
3950 #endif
3951
3952 int main() {
3953 int i;
3954 ; return 0; }
3955 EOF
3956 if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3957   rm -rf conftest*
3958   ac_cv_type_signal=void
3959 else
3960   echo "configure: failed program was:" >&5
3961   cat conftest.$ac_ext >&5
3962   rm -rf conftest*
3963   ac_cv_type_signal=int
3964 fi
3965 rm -f conftest*
3966 fi
3967
3968 echo "$ac_t""$ac_cv_type_signal" 1>&6
3969 cat >> confdefs.h <<EOF
3970 #define RETSIGTYPE $ac_cv_type_signal
3971 EOF
3972
3973
3974 echo $ac_n "checking for strftime""... $ac_c" 1>&6
3975 echo "configure:3976: checking for strftime" >&5
3976 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
3977   echo $ac_n "(cached) $ac_c" 1>&6
3978 else
3979   cat > conftest.$ac_ext <<EOF
3980 #line 3981 "configure"
3981 #include "confdefs.h"
3982 /* System header to define __stub macros and hopefully few prototypes,
3983     which can conflict with char strftime(); below.  */
3984 #include <assert.h>
3985 /* Override any gcc2 internal prototype to avoid an error.  */
3986 /* We use char because int might match the return type of a gcc2
3987     builtin and then its argument prototype would still apply.  */
3988 char strftime();
3989
3990 int main() {
3991
3992 /* The GNU C library defines this for functions which it implements
3993     to always fail with ENOSYS.  Some functions are actually named
3994     something starting with __ and the normal name is an alias.  */
3995 #if defined (__stub_strftime) || defined (__stub___strftime)
3996 choke me
3997 #else
3998 strftime();
3999 #endif
4000
4001 ; return 0; }
4002 EOF
4003 if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4004   rm -rf conftest*
4005   eval "ac_cv_func_strftime=yes"
4006 else
4007   echo "configure: failed program was:" >&5
4008   cat conftest.$ac_ext >&5
4009   rm -rf conftest*
4010   eval "ac_cv_func_strftime=no"
4011 fi
4012 rm -f conftest*
4013 fi
4014
4015 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
4016   echo "$ac_t""yes" 1>&6
4017   cat >> confdefs.h <<\EOF
4018 #define HAVE_STRFTIME 1
4019 EOF
4020
4021 else
4022   echo "$ac_t""no" 1>&6
4023 # strftime is in -lintl on SCO UNIX.
4024 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
4025 echo "configure:4026: checking for strftime in -lintl" >&5
4026 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
4027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4028   echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030   ac_save_LIBS="$LIBS"
4031 LIBS="-lintl  $LIBS"
4032 cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035 /* Override any gcc2 internal prototype to avoid an error.  */
4036 /* We use char because int might match the return type of a gcc2
4037     builtin and then its argument prototype would still apply.  */
4038 char strftime();
4039
4040 int main() {
4041 strftime()
4042 ; return 0; }
4043 EOF
4044 if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4045   rm -rf conftest*
4046   eval "ac_cv_lib_$ac_lib_var=yes"
4047 else
4048   echo "configure: failed program was:" >&5
4049   cat conftest.$ac_ext >&5
4050   rm -rf conftest*
4051   eval "ac_cv_lib_$ac_lib_var=no"
4052 fi
4053 rm -f conftest*
4054 LIBS="$ac_save_LIBS"
4055
4056 fi
4057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4058   echo "$ac_t""yes" 1>&6
4059   cat >> confdefs.h <<\EOF
4060 #define HAVE_STRFTIME 1
4061 EOF
4062
4063 LIBS="-lintl $LIBS"
4064 else
4065   echo "$ac_t""no" 1>&6
4066 fi
4067
4068 fi
4069
4070 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
4071 echo "configure:4072: checking for vprintf" >&5
4072 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
4073   echo $ac_n "(cached) $ac_c" 1>&6
4074 else
4075   cat > conftest.$ac_ext <<EOF
4076 #line 4077 "configure"
4077 #include "confdefs.h"
4078 /* System header to define __stub macros and hopefully few prototypes,
4079     which can conflict with char vprintf(); below.  */
4080 #include <assert.h>
4081 /* Override any gcc2 internal prototype to avoid an error.  */
4082 /* We use char because int might match the return type of a gcc2
4083     builtin and then its argument prototype would still apply.  */
4084 char vprintf();
4085
4086 int main() {
4087
4088 /* The GNU C library defines this for functions which it implements
4089     to always fail with ENOSYS.  Some functions are actually named
4090     something starting with __ and the normal name is an alias.  */
4091 #if defined (__stub_vprintf) || defined (__stub___vprintf)
4092 choke me
4093 #else
4094 vprintf();
4095 #endif
4096
4097 ; return 0; }
4098 EOF
4099 if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4100   rm -rf conftest*
4101   eval "ac_cv_func_vprintf=yes"
4102 else
4103   echo "configure: failed program was:" >&5
4104   cat conftest.$ac_ext >&5
4105   rm -rf conftest*
4106   eval "ac_cv_func_vprintf=no"
4107 fi
4108 rm -f conftest*
4109 fi
4110
4111 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
4112   echo "$ac_t""yes" 1>&6
4113   cat >> confdefs.h <<\EOF
4114 #define HAVE_VPRINTF 1
4115 EOF
4116
4117 else
4118   echo "$ac_t""no" 1>&6
4119 fi
4120
4121 if test "$ac_cv_func_vprintf" != yes; then
4122 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
4123 echo "configure:4124: checking for _doprnt" >&5
4124 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
4125   echo $ac_n "(cached) $ac_c" 1>&6
4126 else
4127   cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130 /* System header to define __stub macros and hopefully few prototypes,
4131     which can conflict with char _doprnt(); below.  */
4132 #include <assert.h>
4133 /* Override any gcc2 internal prototype to avoid an error.  */
4134 /* We use char because int might match the return type of a gcc2
4135     builtin and then its argument prototype would still apply.  */
4136 char _doprnt();
4137
4138 int main() {
4139
4140 /* The GNU C library defines this for functions which it implements
4141     to always fail with ENOSYS.  Some functions are actually named
4142     something starting with __ and the normal name is an alias.  */
4143 #if defined (__stub__doprnt) || defined (__stub____doprnt)
4144 choke me
4145 #else
4146 _doprnt();
4147 #endif
4148
4149 ; return 0; }
4150 EOF
4151 if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4152   rm -rf conftest*
4153   eval "ac_cv_func__doprnt=yes"
4154 else
4155   echo "configure: failed program was:" >&5
4156   cat conftest.$ac_ext >&5
4157   rm -rf conftest*
4158   eval "ac_cv_func__doprnt=no"
4159 fi
4160 rm -f conftest*
4161 fi
4162
4163 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
4164   echo "$ac_t""yes" 1>&6
4165   cat >> confdefs.h <<\EOF
4166 #define HAVE_DOPRNT 1
4167 EOF
4168
4169 else
4170   echo "$ac_t""no" 1>&6
4171 fi
4172
4173 fi
4174
4175 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
4176 echo "configure:4177: checking for wait3 that fills in rusage" >&5
4177 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
4178   echo $ac_n "(cached) $ac_c" 1>&6
4179 else
4180   if test "$cross_compiling" = yes; then
4181   ac_cv_func_wait3_rusage=no
4182 else
4183   cat > conftest.$ac_ext <<EOF
4184 #line 4185 "configure"
4185 #include "confdefs.h"
4186 #include <sys/types.h>
4187 #include <sys/time.h>
4188 #include <sys/resource.h>
4189 #include <stdio.h>
4190 /* HP-UX has wait3 but does not fill in rusage at all.  */
4191 main() {
4192   struct rusage r;
4193   int i;
4194   /* Use a field that we can force nonzero --
4195      voluntary context switches.
4196      For systems like NeXT and OSF/1 that don't set it,
4197      also use the system CPU time.  And page faults (I/O) for Linux.  */
4198   r.ru_nvcsw = 0;
4199   r.ru_stime.tv_sec = 0;
4200   r.ru_stime.tv_usec = 0;
4201   r.ru_majflt = r.ru_minflt = 0;
4202   switch (fork()) {
4203   case 0: /* Child.  */
4204     sleep(1); /* Give up the CPU.  */
4205     _exit(0);
4206   case -1: _exit(0); /* What can we do?  */
4207   default: /* Parent.  */
4208     wait3(&i, 0, &r);
4209     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
4210     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
4211          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
4212   }
4213 }
4214 EOF
4215 if { (eval echo configure:4216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4216 then
4217   ac_cv_func_wait3_rusage=yes
4218 else
4219   echo "configure: failed program was:" >&5
4220   cat conftest.$ac_ext >&5
4221   rm -fr conftest*
4222   ac_cv_func_wait3_rusage=no
4223 fi
4224 rm -fr conftest*
4225 fi
4226
4227 fi
4228
4229 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
4230 if test $ac_cv_func_wait3_rusage = yes; then
4231   cat >> confdefs.h <<\EOF
4232 #define HAVE_WAIT3 1
4233 EOF
4234
4235 fi
4236
4237
4238 for ac_func in \
4239         gethostname             \
4240         gettimeofday    \
4241         mktime                  \
4242         select                  \
4243         socket                  \
4244         strdup                  \
4245         strerror                \
4246         strstr                  \
4247         strrchr                 \
4248         strtod                  \
4249         strtol                  \
4250         strtoul                 \
4251         strsep                  \
4252         memcpy                  \
4253
4254 do
4255 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4256 echo "configure:4257: checking for $ac_func" >&5
4257 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4258   echo $ac_n "(cached) $ac_c" 1>&6
4259 else
4260   cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 /* System header to define __stub macros and hopefully few prototypes,
4264     which can conflict with char $ac_func(); below.  */
4265 #include <assert.h>
4266 /* Override any gcc2 internal prototype to avoid an error.  */
4267 /* We use char because int might match the return type of a gcc2
4268     builtin and then its argument prototype would still apply.  */
4269 char $ac_func();
4270
4271 int main() {
4272
4273 /* The GNU C library defines this for functions which it implements
4274     to always fail with ENOSYS.  Some functions are actually named
4275     something starting with __ and the normal name is an alias.  */
4276 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4277 choke me
4278 #else
4279 $ac_func();
4280 #endif
4281
4282 ; return 0; }
4283 EOF
4284 if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4285   rm -rf conftest*
4286   eval "ac_cv_func_$ac_func=yes"
4287 else
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -rf conftest*
4291   eval "ac_cv_func_$ac_func=no"
4292 fi
4293 rm -f conftest*
4294 fi
4295
4296 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4297   echo "$ac_t""yes" 1>&6
4298     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4299   cat >> confdefs.h <<EOF
4300 #define $ac_tr_func 1
4301 EOF
4302  
4303 else
4304   echo "$ac_t""no" 1>&6
4305 fi
4306 done
4307
4308
4309 for ac_func in strdup
4310 do
4311 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4312 echo "configure:4313: checking for $ac_func" >&5
4313 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4314   echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316   cat > conftest.$ac_ext <<EOF
4317 #line 4318 "configure"
4318 #include "confdefs.h"
4319 /* System header to define __stub macros and hopefully few prototypes,
4320     which can conflict with char $ac_func(); below.  */
4321 #include <assert.h>
4322 /* Override any gcc2 internal prototype to avoid an error.  */
4323 /* We use char because int might match the return type of a gcc2
4324     builtin and then its argument prototype would still apply.  */
4325 char $ac_func();
4326
4327 int main() {
4328
4329 /* The GNU C library defines this for functions which it implements
4330     to always fail with ENOSYS.  Some functions are actually named
4331     something starting with __ and the normal name is an alias.  */
4332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4333 choke me
4334 #else
4335 $ac_func();
4336 #endif
4337
4338 ; return 0; }
4339 EOF
4340 if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4341   rm -rf conftest*
4342   eval "ac_cv_func_$ac_func=yes"
4343 else
4344   echo "configure: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346   rm -rf conftest*
4347   eval "ac_cv_func_$ac_func=no"
4348 fi
4349 rm -f conftest*
4350 fi
4351
4352 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4353   echo "$ac_t""yes" 1>&6
4354     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4355   cat >> confdefs.h <<EOF
4356 #define $ac_tr_func 1
4357 EOF
4358  
4359 else
4360   echo "$ac_t""no" 1>&6
4361 LIBOBJS="$LIBOBJS ${ac_func}.o"
4362 fi
4363 done
4364
4365
4366
4367 # Check Configuration
4368
4369 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
4370 echo "configure:4371: checking declaration of sys_errlist" >&5
4371 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
4372   echo $ac_n "(cached) $ac_c" 1>&6
4373 else
4374   
4375         cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378
4379 #include <stdio.h>
4380 #include <sys/types.h>
4381 #include <errno.h> 
4382 int main() {
4383 char *c = (char *) *sys_errlist
4384 ; return 0; }
4385 EOF
4386 if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4387   rm -rf conftest*
4388   ol_cv_dcl_sys_errlist=yes
4389 else
4390   echo "configure: failed program was:" >&5
4391   cat conftest.$ac_ext >&5
4392   rm -rf conftest*
4393   ol_cv_dcl_sys_errlist=no
4394 fi
4395 rm -f conftest*
4396 fi
4397
4398 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
4399
4400 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
4401 if test $ol_cv_dcl_sys_errlist = no ; then
4402         cat >> confdefs.h <<\EOF
4403 #define DECL_SYS_ERRLIST 1
4404 EOF
4405
4406         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
4407 echo "configure:4408: checking existence of sys_errlist" >&5
4408         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
4409   echo $ac_n "(cached) $ac_c" 1>&6
4410 else
4411   
4412                 cat > conftest.$ac_ext <<EOF
4413 #line 4414 "configure"
4414 #include "confdefs.h"
4415 #include <errno.h>
4416 int main() {
4417 char *c = (char *) *sys_errlist
4418 ; return 0; }
4419 EOF
4420 if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4421   rm -rf conftest*
4422   ol_cv_have_sys_errlist=yes
4423 else
4424   echo "configure: failed program was:" >&5
4425   cat conftest.$ac_ext >&5
4426   rm -rf conftest*
4427   ol_cv_have_sys_errlist=no
4428 fi
4429 rm -f conftest*
4430 fi
4431
4432         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
4433 fi
4434
4435
4436
4437 if test $ol_enable_debug != no ; then
4438         LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG"
4439 fi
4440 #if test $ol_enable_syslog != no ; then
4441 #       LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG"
4442 #fi
4443 if test $ol_enable_libui = no ; then
4444         LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE"
4445 fi
4446 if test $ol_enable_cache = no ; then
4447         LDAP_DEFS="$LDAP_DEFS -DNO_CACHE"
4448 fi
4449 if test $ol_enable_dns != no ; then
4450         LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS"
4451 fi
4452 if test $ol_enable_referrals != no ; then
4453         LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS"
4454 fi
4455 if test $ol_enable_cldap != no ; then
4456         LDAP_DEFS="$LDAP_DEFS -DCLDAP"
4457 fi
4458
4459 if test $ol_enable_aclgroup != no ; then
4460         cat >> confdefs.h <<\EOF
4461 #define SLAPD_ACLGROUP 1
4462 EOF
4463
4464         SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP"
4465 fi
4466
4467 if test $ol_enable_md5 != no ; then
4468         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5"
4469 fi
4470
4471 if test $ol_enable_sha1 != no ; then
4472         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1"
4473 fi
4474
4475 if test $ol_enable_phonetic != no ; then
4476         cat >> confdefs.h <<\EOF
4477 #define SLAPD_PHONETIC 1
4478 EOF
4479
4480         SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX"
4481 fi
4482
4483 if test $ol_enable_rlookups != no ; then
4484         cat >> confdefs.h <<\EOF
4485 #define SLAPD_RLOOKUPS 1
4486 EOF
4487
4488         SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS"
4489 fi
4490
4491 if test $ol_link_ldbm != no ; then
4492         BUILD_SLAPD=yes
4493         BUILD_LDBM=yes
4494         LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS"
4495 fi
4496
4497 if test $ol_enable_passwd != no ; then
4498         BUILD_SLAPD=yes
4499         BUILD_PASSWD=yes
4500         SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS"
4501 fi
4502
4503 if test $ol_enable_shell != no ; then
4504         BUILD_SLAPD=yes
4505         BUILD_SHELL=yes
4506         SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS"
4507 fi
4508
4509 if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
4510         $BUILD_SLAPD = yes ; then
4511         BUILD_SLURPD=yes
4512 fi
4513
4514
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 trap '' 1 2 15
4541 cat > confcache <<\EOF
4542 # This file is a shell script that caches the results of configure
4543 # tests run on this system so they can be shared between configure
4544 # scripts and configure runs.  It is not useful on other systems.
4545 # If it contains results you don't want to keep, you may remove or edit it.
4546 #
4547 # By default, configure uses ./config.cache as the cache file,
4548 # creating it if it does not exist already.  You can give configure
4549 # the --cache-file=FILE option to use a different cache file; that is
4550 # what configure does when it calls configure scripts in
4551 # subdirectories, so they share the cache.
4552 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4553 # config.status only pays attention to the cache file if you give it the
4554 # --recheck option to rerun configure.
4555 #
4556 EOF
4557 # The following way of writing the cache mishandles newlines in values,
4558 # but we know of no workaround that is simple, portable, and efficient.
4559 # So, don't put newlines in cache variables' values.
4560 # Ultrix sh set writes to stderr and can't be redirected directly,
4561 # and sets the high bit in the cache file unless we assign to the vars.
4562 (set) 2>&1 |
4563   case `(ac_space=' '; set) 2>&1` in
4564   *ac_space=\ *)
4565     # `set' does not quote correctly, so add quotes (double-quote substitution
4566     # turns \\\\ into \\, and sed turns \\ into \).
4567     sed -n \
4568       -e "s/'/'\\\\''/g" \
4569       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4570     ;;
4571   *)
4572     # `set' quotes correctly as required by POSIX, so do not add quotes.
4573     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4574     ;;
4575   esac >> confcache
4576 if cmp -s $cache_file confcache; then
4577   :
4578 else
4579   if test -w $cache_file; then
4580     echo "updating cache $cache_file"
4581     cat confcache > $cache_file
4582   else
4583     echo "not updating unwritable cache $cache_file"
4584   fi
4585 fi
4586 rm -f confcache
4587
4588 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4589
4590 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4591 # Let make expand exec_prefix.
4592 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4593
4594 # Any assignment to VPATH causes Sun make to only execute
4595 # the first set of double-colon rules, so remove it if not needed.
4596 # If there is a colon in the path, we need to keep it.
4597 if test "x$srcdir" = x.; then
4598   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4599 fi
4600
4601 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4602
4603 DEFS=-DHAVE_CONFIG_H
4604
4605 # Without the "./", some shells look in PATH for config.status.
4606 : ${CONFIG_STATUS=./config.status}
4607
4608 echo creating $CONFIG_STATUS
4609 rm -f $CONFIG_STATUS
4610 cat > $CONFIG_STATUS <<EOF
4611 #! /bin/sh
4612 # Generated automatically by configure.
4613 # Run this file to recreate the current configuration.
4614 # This directory was configured as follows,
4615 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4616 #
4617 # $0 $ac_configure_args
4618 #
4619 # Compiler output produced by configure, useful for debugging
4620 # configure, is in ./config.log if it exists.
4621
4622 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4623 for ac_option
4624 do
4625   case "\$ac_option" in
4626   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4627     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4628     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4629   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4630     echo "$CONFIG_STATUS generated by autoconf version 2.12"
4631     exit 0 ;;
4632   -help | --help | --hel | --he | --h)
4633     echo "\$ac_cs_usage"; exit 0 ;;
4634   *) echo "\$ac_cs_usage"; exit 1 ;;
4635   esac
4636 done
4637
4638 ac_given_srcdir=$srcdir
4639 ac_given_INSTALL="$INSTALL"
4640
4641 trap 'rm -fr `echo "\
4642 Makefile:build/top.mk:Makefile.in:build/dir.mk \
4643 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
4644 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
4645 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
4646 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
4647 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
4648 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
4649 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
4650 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
4651 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
4652 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
4653 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
4654 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
4655 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
4656 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
4657 include/Makefile:build/top.mk:include/Makefile.in \
4658 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
4659 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
4660 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
4661 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
4662 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
4663 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
4664 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
4665 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
4666 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
4667 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
4668 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
4669 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
4670 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
4671 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
4672 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
4673 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
4674 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
4675 tests/Makefile:build/top.mk:tests/Makefile.in \
4676  include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4677 EOF
4678 cat >> $CONFIG_STATUS <<EOF
4679
4680 # Protect against being on the right side of a sed subst in config.status.
4681 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4682  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4683 $ac_vpsub
4684 $extrasub
4685 s%@CFLAGS@%$CFLAGS%g
4686 s%@CPPFLAGS@%$CPPFLAGS%g
4687 s%@CXXFLAGS@%$CXXFLAGS%g
4688 s%@DEFS@%$DEFS%g
4689 s%@LDFLAGS@%$LDFLAGS%g
4690 s%@LIBS@%$LIBS%g
4691 s%@exec_prefix@%$exec_prefix%g
4692 s%@prefix@%$prefix%g
4693 s%@program_transform_name@%$program_transform_name%g
4694 s%@bindir@%$bindir%g
4695 s%@sbindir@%$sbindir%g
4696 s%@libexecdir@%$libexecdir%g
4697 s%@datadir@%$datadir%g
4698 s%@sysconfdir@%$sysconfdir%g
4699 s%@sharedstatedir@%$sharedstatedir%g
4700 s%@localstatedir@%$localstatedir%g
4701 s%@libdir@%$libdir%g
4702 s%@includedir@%$includedir%g
4703 s%@oldincludedir@%$oldincludedir%g
4704 s%@infodir@%$infodir%g
4705 s%@mandir@%$mandir%g
4706 s%@CC@%$CC%g
4707 s%@CPP@%$CPP%g
4708 s%@LN_S@%$LN_S%g
4709 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4710 s%@INSTALL_DATA@%$INSTALL_DATA%g
4711 s%@RANLIB@%$RANLIB%g
4712 s%@SET_MAKE@%$SET_MAKE%g
4713 s%@SENDMAIL@%$SENDMAIL%g
4714 s%@EDITOR@%$EDITOR%g
4715 s%@FINGER@%$FINGER%g
4716 s%@LIBTERMCAP@%$LIBTERMCAP%g
4717 s%@LIBOBJS@%$LIBOBJS%g
4718 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
4719 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
4720 s%@BUILD_LDBM@%$BUILD_LDBM%g
4721 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
4722 s%@BUILD_SHELL@%$BUILD_SHELL%g
4723 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
4724 s%@LDAP_DEFS@%$LDAP_DEFS%g
4725 s%@LDAP_LIBS@%$LDAP_LIBS%g
4726 s%@LDAPD_DEFS@%$LDAPD_DEFS%g
4727 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
4728 s%@SLAPD_DEFS@%$SLAPD_DEFS%g
4729 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
4730 s%@SLURPD_DEFS@%$SLURPD_DEFS%g
4731 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
4732 s%@LDBM_DEFS@%$LDBM_DEFS%g
4733 s%@LDBM_LIBS@%$LDBM_LIBS%g
4734 s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g
4735 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
4736 s%@LUTIL_DEFS@%$LUTIL_DEFS%g
4737 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
4738
4739 CEOF
4740 EOF
4741
4742 cat >> $CONFIG_STATUS <<\EOF
4743
4744 # Split the substitutions into bite-sized pieces for seds with
4745 # small command number limits, like on Digital OSF/1 and HP-UX.
4746 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4747 ac_file=1 # Number of current file.
4748 ac_beg=1 # First line for current file.
4749 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4750 ac_more_lines=:
4751 ac_sed_cmds=""
4752 while $ac_more_lines; do
4753   if test $ac_beg -gt 1; then
4754     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4755   else
4756     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4757   fi
4758   if test ! -s conftest.s$ac_file; then
4759     ac_more_lines=false
4760     rm -f conftest.s$ac_file
4761   else
4762     if test -z "$ac_sed_cmds"; then
4763       ac_sed_cmds="sed -f conftest.s$ac_file"
4764     else
4765       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4766     fi
4767     ac_file=`expr $ac_file + 1`
4768     ac_beg=$ac_end
4769     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4770   fi
4771 done
4772 if test -z "$ac_sed_cmds"; then
4773   ac_sed_cmds=cat
4774 fi
4775 EOF
4776
4777 cat >> $CONFIG_STATUS <<EOF
4778
4779 CONFIG_FILES=\${CONFIG_FILES-"\
4780 Makefile:build/top.mk:Makefile.in:build/dir.mk \
4781 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
4782 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
4783 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
4784 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
4785 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
4786 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
4787 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
4788 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
4789 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
4790 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
4791 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
4792 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
4793 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
4794 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
4795 include/Makefile:build/top.mk:include/Makefile.in \
4796 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
4797 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
4798 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
4799 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
4800 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
4801 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
4802 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
4803 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
4804 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
4805 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
4806 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
4807 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
4808 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
4809 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
4810 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
4811 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
4812 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
4813 tests/Makefile:build/top.mk:tests/Makefile.in \
4814 "}
4815 EOF
4816 cat >> $CONFIG_STATUS <<\EOF
4817 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4818   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4819   case "$ac_file" in
4820   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4821        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4822   *) ac_file_in="${ac_file}.in" ;;
4823   esac
4824
4825   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4826
4827   # Remove last slash and all that follows it.  Not all systems have dirname.
4828   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4829   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4830     # The file is in a subdirectory.
4831     test ! -d "$ac_dir" && mkdir "$ac_dir"
4832     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4833     # A "../" for each directory in $ac_dir_suffix.
4834     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4835   else
4836     ac_dir_suffix= ac_dots=
4837   fi
4838
4839   case "$ac_given_srcdir" in
4840   .)  srcdir=.
4841       if test -z "$ac_dots"; then top_srcdir=.
4842       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4843   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4844   *) # Relative path.
4845     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4846     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4847   esac
4848
4849   case "$ac_given_INSTALL" in
4850   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4851   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4852   esac
4853
4854   echo creating "$ac_file"
4855   rm -f "$ac_file"
4856   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4857   case "$ac_file" in
4858   *Makefile*) ac_comsub="1i\\
4859 # $configure_input" ;;
4860   *) ac_comsub= ;;
4861   esac
4862
4863   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4864   sed -e "$ac_comsub
4865 s%@configure_input@%$configure_input%g
4866 s%@srcdir@%$srcdir%g
4867 s%@top_srcdir@%$top_srcdir%g
4868 s%@INSTALL@%$INSTALL%g
4869 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4870 fi; done
4871 rm -f conftest.s*
4872
4873 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4874 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4875 #
4876 # ac_d sets the value in "#define NAME VALUE" lines.
4877 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4878 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4879 ac_dC='\3'
4880 ac_dD='%g'
4881 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4882 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4883 ac_uB='\([      ]\)%\1#\2define\3'
4884 ac_uC=' '
4885 ac_uD='\4%g'
4886 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4887 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4888 ac_eB='$%\1#\2define\3'
4889 ac_eC=' '
4890 ac_eD='%g'
4891
4892 if test "${CONFIG_HEADERS+set}" != set; then
4893 EOF
4894 cat >> $CONFIG_STATUS <<EOF
4895   CONFIG_HEADERS="include/portable.h"
4896 EOF
4897 cat >> $CONFIG_STATUS <<\EOF
4898 fi
4899 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4900   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4901   case "$ac_file" in
4902   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4903        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4904   *) ac_file_in="${ac_file}.in" ;;
4905   esac
4906
4907   echo creating $ac_file
4908
4909   rm -f conftest.frag conftest.in conftest.out
4910   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4911   cat $ac_file_inputs > conftest.in
4912
4913 EOF
4914
4915 # Transform confdefs.h into a sed script conftest.vals that substitutes
4916 # the proper values into config.h.in to produce config.h.  And first:
4917 # Protect against being on the right side of a sed subst in config.status.
4918 # Protect against being in an unquoted here document in config.status.
4919 rm -f conftest.vals
4920 cat > conftest.hdr <<\EOF
4921 s/[\\&%]/\\&/g
4922 s%[\\$`]%\\&%g
4923 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4924 s%ac_d%ac_u%gp
4925 s%ac_u%ac_e%gp
4926 EOF
4927 sed -n -f conftest.hdr confdefs.h > conftest.vals
4928 rm -f conftest.hdr
4929
4930 # This sed command replaces #undef with comments.  This is necessary, for
4931 # example, in the case of _POSIX_SOURCE, which is predefined and required
4932 # on some systems where configure will not decide to define it.
4933 cat >> conftest.vals <<\EOF
4934 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4935 EOF
4936
4937 # Break up conftest.vals because some shells have a limit on
4938 # the size of here documents, and old seds have small limits too.
4939
4940 rm -f conftest.tail
4941 while :
4942 do
4943   ac_lines=`grep -c . conftest.vals`
4944   # grep -c gives empty output for an empty file on some AIX systems.
4945   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4946   # Write a limited-size here document to conftest.frag.
4947   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4948   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4949   echo 'CEOF
4950   sed -f conftest.frag conftest.in > conftest.out
4951   rm -f conftest.in
4952   mv conftest.out conftest.in
4953 ' >> $CONFIG_STATUS
4954   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4955   rm -f conftest.vals
4956   mv conftest.tail conftest.vals
4957 done
4958 rm -f conftest.vals
4959
4960 cat >> $CONFIG_STATUS <<\EOF
4961   rm -f conftest.frag conftest.h
4962   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4963   cat conftest.in >> conftest.h
4964   rm -f conftest.in
4965   if cmp -s $ac_file conftest.h 2>/dev/null; then
4966     echo "$ac_file is unchanged"
4967     rm -f conftest.h
4968   else
4969     # Remove last slash and all that follows it.  Not all systems have dirname.
4970       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4971       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4972       # The file is in a subdirectory.
4973       test ! -d "$ac_dir" && mkdir "$ac_dir"
4974     fi
4975     rm -f $ac_file
4976     mv conftest.h $ac_file
4977   fi
4978 fi; done
4979
4980 EOF
4981 cat >> $CONFIG_STATUS <<EOF
4982
4983 EOF
4984 cat >> $CONFIG_STATUS <<\EOF
4985 date > stamp-h
4986 exit 0
4987 EOF
4988 chmod +x $CONFIG_STATUS
4989 rm -fr confdefs* $ac_clean_files
4990 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4991