]> git.sur5r.net Git - openldap/blob - configure
Add additional LDAPD/ISODE checks
[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-proctitle    enable proctitle support (yes)"
19 ac_help="$ac_help
20   --enable-libui        enable library user interface (yes)"
21 ac_help="$ac_help
22   --enable-cache        enable caching (yes)"
23 ac_help="$ac_help
24   --enable-dns          enable dns support (no)"
25 ac_help="$ac_help
26   --enable-referrals    enable referrals (yes)"
27 ac_help="$ac_help
28   --enable-cldap        enable connectionless ldap (no)"
29 ac_help="$ac_help
30   --enable-x-compile    enable cross compiling (no)"
31 ac_help="$ac_help
32   --with-kerberos       use Kerberos (auto)"
33 ac_help="$ac_help
34   --with-threads        use threads (auto)"
35 ac_help="$ac_help
36   --with-preemptive     thread implementation is preemptive (auto)"
37 ac_help="$ac_help
38   --enable-ldapd        enable building ldapd (no)"
39 ac_help="$ac_help
40   --enable-slapd        enable building slapd (yes)"
41 ac_help="$ac_help
42     --enable-aclgroups  enable ACL group support (auto)"
43 ac_help="$ac_help
44     --enable-crypt      enable crypt(3) passwords (auto)"
45 ac_help="$ac_help
46     --enable-md5        enable MD5 passwords (auto)"
47 ac_help="$ac_help
48     --enable-sha1       enable SHA1 passwords (auto)"
49 ac_help="$ac_help
50     --enable-wrappers   enable tcp wrapper support (no)"
51 ac_help="$ac_help
52     --enable-phonetic   enable phonetic/soundex (no)"
53 ac_help="$ac_help
54     --enable-rlookups   enable reverse lookups (auto)"
55 ac_help="$ac_help
56     --enable-ldbm       enable ldbm backend (yes)"
57 ac_help="$ac_help
58       --with-ldbm-api   use LDBM API (auto)"
59 ac_help="$ac_help
60       --with-ldbm-type  use LDBM type (auto)"
61 ac_help="$ac_help
62     --enable-passwd     enable passwd backend (no)"
63 ac_help="$ac_help
64     --enable-shell      enable shell backend (no)"
65 ac_help="$ac_help
66   --enable-slurpd       enable building slurpd (auto)"
67
68 # Initialize some variables set by options.
69 # The variables have the same names as the options, with
70 # dashes changed to underlines.
71 build=NONE
72 cache_file=./config.cache
73 exec_prefix=NONE
74 host=NONE
75 no_create=
76 nonopt=NONE
77 no_recursion=
78 prefix=NONE
79 program_prefix=NONE
80 program_suffix=NONE
81 program_transform_name=s,x,x,
82 silent=
83 site=
84 srcdir=
85 target=NONE
86 verbose=
87 x_includes=NONE
88 x_libraries=NONE
89 bindir='${exec_prefix}/bin'
90 sbindir='${exec_prefix}/sbin'
91 libexecdir='${exec_prefix}/libexec'
92 datadir='${prefix}/share'
93 sysconfdir='${prefix}/etc'
94 sharedstatedir='${prefix}/com'
95 localstatedir='${prefix}/var'
96 libdir='${exec_prefix}/lib'
97 includedir='${prefix}/include'
98 oldincludedir='/usr/include'
99 infodir='${prefix}/info'
100 mandir='${prefix}/man'
101
102 # Initialize some other variables.
103 subdirs=
104 MFLAGS= MAKEFLAGS=
105 # Maximum number of lines to put in a shell here document.
106 ac_max_here_lines=12
107
108 ac_prev=
109 for ac_option
110 do
111
112   # If the previous option needs an argument, assign it.
113   if test -n "$ac_prev"; then
114     eval "$ac_prev=\$ac_option"
115     ac_prev=
116     continue
117   fi
118
119   case "$ac_option" in
120   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121   *) ac_optarg= ;;
122   esac
123
124   # Accept the important Cygnus configure options, so we can diagnose typos.
125
126   case "$ac_option" in
127
128   -bindir | --bindir | --bindi | --bind | --bin | --bi)
129     ac_prev=bindir ;;
130   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131     bindir="$ac_optarg" ;;
132
133   -build | --build | --buil | --bui | --bu)
134     ac_prev=build ;;
135   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136     build="$ac_optarg" ;;
137
138   -cache-file | --cache-file | --cache-fil | --cache-fi \
139   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140     ac_prev=cache_file ;;
141   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143     cache_file="$ac_optarg" ;;
144
145   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146     ac_prev=datadir ;;
147   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148   | --da=*)
149     datadir="$ac_optarg" ;;
150
151   -disable-* | --disable-*)
152     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153     # Reject names that are not valid shell variable names.
154     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156     fi
157     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158     eval "enable_${ac_feature}=no" ;;
159
160   -enable-* | --enable-*)
161     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162     # Reject names that are not valid shell variable names.
163     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165     fi
166     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167     case "$ac_option" in
168       *=*) ;;
169       *) ac_optarg=yes ;;
170     esac
171     eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175   | --exec | --exe | --ex)
176     ac_prev=exec_prefix ;;
177   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179   | --exec=* | --exe=* | --ex=*)
180     exec_prefix="$ac_optarg" ;;
181
182   -gas | --gas | --ga | --g)
183     # Obsolete; use --with-gas.
184     with_gas=yes ;;
185
186   -help | --help | --hel | --he)
187     # Omit some internal or obsolete options to make the list less imposing.
188     # This message is too long to be a string in the A/UX 3.1 sh.
189     cat << EOF
190 Usage: configure [options] [host]
191 Options: [defaults in brackets after descriptions]
192 Configuration:
193   --cache-file=FILE       cache test results in FILE
194   --help                  print this message
195   --no-create             do not create output files
196   --quiet, --silent       do not print \`checking...' messages
197   --version               print the version of autoconf that created configure
198 Directory and file names:
199   --prefix=PREFIX         install architecture-independent files in PREFIX
200                           [$ac_default_prefix]
201   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
202                           [same as prefix]
203   --bindir=DIR            user executables in DIR [EPREFIX/bin]
204   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
205   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
206   --datadir=DIR           read-only architecture-independent data in DIR
207                           [PREFIX/share]
208   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
209   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
210                           [PREFIX/com]
211   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
212   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
213   --includedir=DIR        C header files in DIR [PREFIX/include]
214   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
215   --infodir=DIR           info documentation in DIR [PREFIX/info]
216   --mandir=DIR            man documentation in DIR [PREFIX/man]
217   --srcdir=DIR            find the sources in DIR [configure dir or ..]
218   --program-prefix=PREFIX prepend PREFIX to installed program names
219   --program-suffix=SUFFIX append SUFFIX to installed program names
220   --program-transform-name=PROGRAM
221                           run sed PROGRAM on installed program names
222 EOF
223     cat << EOF
224 Host type:
225   --build=BUILD           configure for building on BUILD [BUILD=HOST]
226   --host=HOST             configure for HOST [guessed]
227   --target=TARGET         configure for TARGET [TARGET=HOST]
228 Features and packages:
229   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
230   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
231   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
232   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
233   --x-includes=DIR        X include files are in DIR
234   --x-libraries=DIR       X library files are in DIR
235 EOF
236     if test -n "$ac_help"; then
237       echo "--enable and --with options recognized:$ac_help"
238     fi
239     exit 0 ;;
240
241   -host | --host | --hos | --ho)
242     ac_prev=host ;;
243   -host=* | --host=* | --hos=* | --ho=*)
244     host="$ac_optarg" ;;
245
246   -includedir | --includedir | --includedi | --included | --include \
247   | --includ | --inclu | --incl | --inc)
248     ac_prev=includedir ;;
249   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
250   | --includ=* | --inclu=* | --incl=* | --inc=*)
251     includedir="$ac_optarg" ;;
252
253   -infodir | --infodir | --infodi | --infod | --info | --inf)
254     ac_prev=infodir ;;
255   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
256     infodir="$ac_optarg" ;;
257
258   -libdir | --libdir | --libdi | --libd)
259     ac_prev=libdir ;;
260   -libdir=* | --libdir=* | --libdi=* | --libd=*)
261     libdir="$ac_optarg" ;;
262
263   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
264   | --libexe | --libex | --libe)
265     ac_prev=libexecdir ;;
266   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
267   | --libexe=* | --libex=* | --libe=*)
268     libexecdir="$ac_optarg" ;;
269
270   -localstatedir | --localstatedir | --localstatedi | --localstated \
271   | --localstate | --localstat | --localsta | --localst \
272   | --locals | --local | --loca | --loc | --lo)
273     ac_prev=localstatedir ;;
274   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
275   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
276   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
277     localstatedir="$ac_optarg" ;;
278
279   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
280     ac_prev=mandir ;;
281   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
282     mandir="$ac_optarg" ;;
283
284   -nfp | --nfp | --nf)
285     # Obsolete; use --without-fp.
286     with_fp=no ;;
287
288   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
289   | --no-cr | --no-c)
290     no_create=yes ;;
291
292   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
293   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
294     no_recursion=yes ;;
295
296   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
297   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
298   | --oldin | --oldi | --old | --ol | --o)
299     ac_prev=oldincludedir ;;
300   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
301   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
302   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
303     oldincludedir="$ac_optarg" ;;
304
305   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
306     ac_prev=prefix ;;
307   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
308     prefix="$ac_optarg" ;;
309
310   -program-prefix | --program-prefix | --program-prefi | --program-pref \
311   | --program-pre | --program-pr | --program-p)
312     ac_prev=program_prefix ;;
313   -program-prefix=* | --program-prefix=* | --program-prefi=* \
314   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
315     program_prefix="$ac_optarg" ;;
316
317   -program-suffix | --program-suffix | --program-suffi | --program-suff \
318   | --program-suf | --program-su | --program-s)
319     ac_prev=program_suffix ;;
320   -program-suffix=* | --program-suffix=* | --program-suffi=* \
321   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
322     program_suffix="$ac_optarg" ;;
323
324   -program-transform-name | --program-transform-name \
325   | --program-transform-nam | --program-transform-na \
326   | --program-transform-n | --program-transform- \
327   | --program-transform | --program-transfor \
328   | --program-transfo | --program-transf \
329   | --program-trans | --program-tran \
330   | --progr-tra | --program-tr | --program-t)
331     ac_prev=program_transform_name ;;
332   -program-transform-name=* | --program-transform-name=* \
333   | --program-transform-nam=* | --program-transform-na=* \
334   | --program-transform-n=* | --program-transform-=* \
335   | --program-transform=* | --program-transfor=* \
336   | --program-transfo=* | --program-transf=* \
337   | --program-trans=* | --program-tran=* \
338   | --progr-tra=* | --program-tr=* | --program-t=*)
339     program_transform_name="$ac_optarg" ;;
340
341   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
342   | -silent | --silent | --silen | --sile | --sil)
343     silent=yes ;;
344
345   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
346     ac_prev=sbindir ;;
347   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
348   | --sbi=* | --sb=*)
349     sbindir="$ac_optarg" ;;
350
351   -sharedstatedir | --sharedstatedir | --sharedstatedi \
352   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
353   | --sharedst | --shareds | --shared | --share | --shar \
354   | --sha | --sh)
355     ac_prev=sharedstatedir ;;
356   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
357   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
358   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
359   | --sha=* | --sh=*)
360     sharedstatedir="$ac_optarg" ;;
361
362   -site | --site | --sit)
363     ac_prev=site ;;
364   -site=* | --site=* | --sit=*)
365     site="$ac_optarg" ;;
366
367   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
368     ac_prev=srcdir ;;
369   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
370     srcdir="$ac_optarg" ;;
371
372   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
373   | --syscon | --sysco | --sysc | --sys | --sy)
374     ac_prev=sysconfdir ;;
375   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
376   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
377     sysconfdir="$ac_optarg" ;;
378
379   -target | --target | --targe | --targ | --tar | --ta | --t)
380     ac_prev=target ;;
381   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
382     target="$ac_optarg" ;;
383
384   -v | -verbose | --verbose | --verbos | --verbo | --verb)
385     verbose=yes ;;
386
387   -version | --version | --versio | --versi | --vers)
388     echo "configure generated by autoconf version 2.12"
389     exit 0 ;;
390
391   -with-* | --with-*)
392     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
393     # Reject names that are not valid shell variable names.
394     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
395       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
396     fi
397     ac_package=`echo $ac_package| sed 's/-/_/g'`
398     case "$ac_option" in
399       *=*) ;;
400       *) ac_optarg=yes ;;
401     esac
402     eval "with_${ac_package}='$ac_optarg'" ;;
403
404   -without-* | --without-*)
405     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
406     # Reject names that are not valid shell variable names.
407     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
408       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
409     fi
410     ac_package=`echo $ac_package| sed 's/-/_/g'`
411     eval "with_${ac_package}=no" ;;
412
413   --x)
414     # Obsolete; use --with-x.
415     with_x=yes ;;
416
417   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
418   | --x-incl | --x-inc | --x-in | --x-i)
419     ac_prev=x_includes ;;
420   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
421   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
422     x_includes="$ac_optarg" ;;
423
424   -x-libraries | --x-libraries | --x-librarie | --x-librari \
425   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
426     ac_prev=x_libraries ;;
427   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
428   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
429     x_libraries="$ac_optarg" ;;
430
431   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
432     ;;
433
434   *)
435     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
436       echo "configure: warning: $ac_option: invalid host type" 1>&2
437     fi
438     if test "x$nonopt" != xNONE; then
439       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
440     fi
441     nonopt="$ac_option"
442     ;;
443
444   esac
445 done
446
447 if test -n "$ac_prev"; then
448   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
449 fi
450
451 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
452
453 # File descriptor usage:
454 # 0 standard input
455 # 1 file creation
456 # 2 errors and warnings
457 # 3 some systems may open it to /dev/tty
458 # 4 used on the Kubota Titan
459 # 6 checking for... messages and results
460 # 5 compiler messages saved in config.log
461 if test "$silent" = yes; then
462   exec 6>/dev/null
463 else
464   exec 6>&1
465 fi
466 exec 5>./config.log
467
468 echo "\
469 This file contains any messages produced by compilers while
470 running configure, to aid debugging if configure makes a mistake.
471 " 1>&5
472
473 # Strip out --no-create and --no-recursion so they do not pile up.
474 # Also quote any args containing shell metacharacters.
475 ac_configure_args=
476 for ac_arg
477 do
478   case "$ac_arg" in
479   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
480   | --no-cr | --no-c) ;;
481   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
482   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
483   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
484   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
485   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
486   esac
487 done
488
489 # NLS nuisances.
490 # Only set these to C if already set.  These must not be set unconditionally
491 # because not all systems understand e.g. LANG=C (notably SCO).
492 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
493 # Non-C LC_CTYPE values break the ctype check.
494 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
495 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
496 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
497 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
498
499 # confdefs.h avoids OS command line length limits that DEFS can exceed.
500 rm -rf conftest* confdefs.h
501 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
502 echo > confdefs.h
503
504 # A filename unique to this package, relative to the directory that
505 # configure is in, which we can look for to find out if srcdir is correct.
506 ac_unique_file=include/ldap.h
507
508 # Find the source files, if location was not specified.
509 if test -z "$srcdir"; then
510   ac_srcdir_defaulted=yes
511   # Try the directory containing this script, then its parent.
512   ac_prog=$0
513   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
514   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
515   srcdir=$ac_confdir
516   if test ! -r $srcdir/$ac_unique_file; then
517     srcdir=..
518   fi
519 else
520   ac_srcdir_defaulted=no
521 fi
522 if test ! -r $srcdir/$ac_unique_file; then
523   if test "$ac_srcdir_defaulted" = yes; then
524     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
525   else
526     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
527   fi
528 fi
529 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
530
531 # Prefer explicitly selected file to automatically selected ones.
532 if test -z "$CONFIG_SITE"; then
533   if test "x$prefix" != xNONE; then
534     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
535   else
536     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
537   fi
538 fi
539 for ac_site_file in $CONFIG_SITE; do
540   if test -r "$ac_site_file"; then
541     echo "loading site script $ac_site_file"
542     . "$ac_site_file"
543   fi
544 done
545
546 if test -r "$cache_file"; then
547   echo "loading cache $cache_file"
548   . $cache_file
549 else
550   echo "creating cache $cache_file"
551   > $cache_file
552 fi
553
554 ac_ext=c
555 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
556 ac_cpp='$CPP $CPPFLAGS'
557 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
558 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
559 cross_compiling=$ac_cv_prog_cc_cross
560
561 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
562   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
563   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
564     ac_n= ac_c='
565 ' ac_t='        '
566   else
567     ac_n=-n ac_c= ac_t=
568   fi
569 else
570   ac_n= ac_c='\c' ac_t=
571 fi
572
573
574 ac_aux_dir=
575 for ac_dir in build $srcdir/build; do
576   if test -f $ac_dir/install-sh; then
577     ac_aux_dir=$ac_dir
578     ac_install_sh="$ac_aux_dir/install-sh -c"
579     break
580   elif test -f $ac_dir/install.sh; then
581     ac_aux_dir=$ac_dir
582     ac_install_sh="$ac_aux_dir/install.sh -c"
583     break
584   fi
585 done
586 if test -z "$ac_aux_dir"; then
587   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
588 fi
589 ac_config_guess=$ac_aux_dir/config.guess
590 ac_config_sub=$ac_aux_dir/config.sub
591 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
592
593 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
594 echo "configure:595: checking configure arguments" >&5
595
596
597 # OpenLDAP --enable-debug
598         # Check whether --enable-debug or --disable-debug was given.
599 if test "${enable_debug+set}" = set; then
600   enableval="$enable_debug"
601   
602         ol_arg=invalid
603         for ol_val in auto yes no ; do
604                 if test "$enableval" = "$ol_val" ; then
605                         ol_arg="$ol_val"
606                 fi
607         done
608         if test "$ol_arg" = "invalid" ; then
609                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
610         fi
611         ol_enable_debug="$ol_arg"
612
613 else
614         ol_enable_debug="yes"
615 fi
616 # end --enable-debug
617 # OpenLDAP --enable-proctitle
618         # Check whether --enable-proctitle or --disable-proctitle was given.
619 if test "${enable_proctitle+set}" = set; then
620   enableval="$enable_proctitle"
621   
622         ol_arg=invalid
623         for ol_val in auto yes no ; do
624                 if test "$enableval" = "$ol_val" ; then
625                         ol_arg="$ol_val"
626                 fi
627         done
628         if test "$ol_arg" = "invalid" ; then
629                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
630         fi
631         ol_enable_proctitle="$ol_arg"
632
633 else
634         ol_enable_proctitle="yes"
635 fi
636 # end --enable-proctitle
637 # OpenLDAP --enable-libui
638         # Check whether --enable-libui or --disable-libui was given.
639 if test "${enable_libui+set}" = set; then
640   enableval="$enable_libui"
641   
642         ol_arg=invalid
643         for ol_val in auto yes no ; do
644                 if test "$enableval" = "$ol_val" ; then
645                         ol_arg="$ol_val"
646                 fi
647         done
648         if test "$ol_arg" = "invalid" ; then
649                 { echo "configure: error: bad value $enableval for --enable-libui" 1>&2; exit 1; }
650         fi
651         ol_enable_libui="$ol_arg"
652
653 else
654         ol_enable_libui="yes"
655 fi
656 # end --enable-libui
657 # OpenLDAP --enable-cache
658         # Check whether --enable-cache or --disable-cache was given.
659 if test "${enable_cache+set}" = set; then
660   enableval="$enable_cache"
661   
662         ol_arg=invalid
663         for ol_val in auto yes no ; do
664                 if test "$enableval" = "$ol_val" ; then
665                         ol_arg="$ol_val"
666                 fi
667         done
668         if test "$ol_arg" = "invalid" ; then
669                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
670         fi
671         ol_enable_cache="$ol_arg"
672
673 else
674         ol_enable_cache="yes"
675 fi
676 # end --enable-cache
677 # OpenLDAP --enable-dns
678         # Check whether --enable-dns or --disable-dns was given.
679 if test "${enable_dns+set}" = set; then
680   enableval="$enable_dns"
681   
682         ol_arg=invalid
683         for ol_val in auto yes no ; do
684                 if test "$enableval" = "$ol_val" ; then
685                         ol_arg="$ol_val"
686                 fi
687         done
688         if test "$ol_arg" = "invalid" ; then
689                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
690         fi
691         ol_enable_dns="$ol_arg"
692
693 else
694         ol_enable_dns="no"
695 fi
696 # end --enable-dns
697 # OpenLDAP --enable-referrals
698         # Check whether --enable-referrals or --disable-referrals was given.
699 if test "${enable_referrals+set}" = set; then
700   enableval="$enable_referrals"
701   
702         ol_arg=invalid
703         for ol_val in auto yes no ; do
704                 if test "$enableval" = "$ol_val" ; then
705                         ol_arg="$ol_val"
706                 fi
707         done
708         if test "$ol_arg" = "invalid" ; then
709                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
710         fi
711         ol_enable_referrals="$ol_arg"
712
713 else
714         ol_enable_referrals="yes"
715 fi
716 # end --enable-referrals
717 # OpenLDAP --enable-cldap
718         # Check whether --enable-cldap or --disable-cldap was given.
719 if test "${enable_cldap+set}" = set; then
720   enableval="$enable_cldap"
721   
722         ol_arg=invalid
723         for ol_val in auto yes no ; do
724                 if test "$enableval" = "$ol_val" ; then
725                         ol_arg="$ol_val"
726                 fi
727         done
728         if test "$ol_arg" = "invalid" ; then
729                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
730         fi
731         ol_enable_cldap="$ol_arg"
732
733 else
734         ol_enable_cldap="no"
735 fi
736 # end --enable-cldap
737 # OpenLDAP --enable-x_compile
738         # Check whether --enable-x_compile or --disable-x_compile was given.
739 if test "${enable_x_compile+set}" = set; then
740   enableval="$enable_x_compile"
741   
742         ol_arg=invalid
743         for ol_val in yes no ; do
744                 if test "$enableval" = "$ol_val" ; then
745                         ol_arg="$ol_val"
746                 fi
747         done
748         if test "$ol_arg" = "invalid" ; then
749                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
750         fi
751         ol_enable_x_compile="$ol_arg"
752
753 else
754         ol_enable_x_compile="no"
755 fi
756 # end --enable-x_compile
757
758 # OpenLDAP --with-kerberos
759         # Check whether --with-kerberos or --without-kerberos was given.
760 if test "${with_kerberos+set}" = set; then
761   withval="$with_kerberos"
762   
763         ol_arg=invalid
764         for ol_val in auto k5 k4 afs yes no ; do
765                 if test "$withval" = "$ol_val" ; then
766                         ol_arg="$ol_val"
767                 fi
768         done
769         if test "$ol_arg" = "invalid" ; then
770                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
771         fi
772         ol_with_kerberos="$ol_arg"
773
774 else
775         ol_with_kerberos="auto"
776 fi
777 # end --with-kerberos
778
779 # OpenLDAP --with-threads
780         # Check whether --with-threads or --without-threads was given.
781 if test "${with_threads+set}" = set; then
782   withval="$with_threads"
783   
784         ol_arg=invalid
785         for ol_val in auto posix mach lwp yes no manual  ; do
786                 if test "$withval" = "$ol_val" ; then
787                         ol_arg="$ol_val"
788                 fi
789         done
790         if test "$ol_arg" = "invalid" ; then
791                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
792         fi
793         ol_with_threads="$ol_arg"
794
795 else
796         ol_with_threads="auto"
797 fi
798 # end --with-threads
799
800 # OpenLDAP --with-preemptive
801         # Check whether --with-preemptive or --without-preemptive was given.
802 if test "${with_preemptive+set}" = set; then
803   withval="$with_preemptive"
804   
805         ol_arg=invalid
806         for ol_val in auto yes no manual  ; do
807                 if test "$withval" = "$ol_val" ; then
808                         ol_arg="$ol_val"
809                 fi
810         done
811         if test "$ol_arg" = "invalid" ; then
812                 { echo "configure: error: bad value $withval for --with-preemptive" 1>&2; exit 1; }
813         fi
814         ol_with_preemptive="$ol_arg"
815
816 else
817         ol_with_preemptive="auto"
818 fi
819 # end --with-preemptive
820
821
822
823 # OpenLDAP --enable-ldapd
824         # Check whether --enable-ldapd or --disable-ldapd was given.
825 if test "${enable_ldapd+set}" = set; then
826   enableval="$enable_ldapd"
827   
828         ol_arg=invalid
829         for ol_val in auto yes no ; do
830                 if test "$enableval" = "$ol_val" ; then
831                         ol_arg="$ol_val"
832                 fi
833         done
834         if test "$ol_arg" = "invalid" ; then
835                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
836         fi
837         ol_enable_ldapd="$ol_arg"
838
839 else
840         ol_enable_ldapd="no"
841 fi
842 # end --enable-ldapd
843
844 # OpenLDAP --enable-slapd
845         # Check whether --enable-slapd or --disable-slapd was given.
846 if test "${enable_slapd+set}" = set; then
847   enableval="$enable_slapd"
848   
849         ol_arg=invalid
850         for ol_val in auto yes no ; do
851                 if test "$enableval" = "$ol_val" ; then
852                         ol_arg="$ol_val"
853                 fi
854         done
855         if test "$ol_arg" = "invalid" ; then
856                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
857         fi
858         ol_enable_slapd="$ol_arg"
859
860 else
861         ol_enable_slapd="yes"
862 fi
863 # end --enable-slapd
864 # OpenLDAP --enable-aclgroups
865         # Check whether --enable-aclgroups or --disable-aclgroups was given.
866 if test "${enable_aclgroups+set}" = set; then
867   enableval="$enable_aclgroups"
868   
869         ol_arg=invalid
870         for ol_val in auto yes no ; do
871                 if test "$enableval" = "$ol_val" ; then
872                         ol_arg="$ol_val"
873                 fi
874         done
875         if test "$ol_arg" = "invalid" ; then
876                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
877         fi
878         ol_enable_aclgroups="$ol_arg"
879
880 else
881         ol_enable_aclgroups="auto"
882 fi
883 # end --enable-aclgroups
884 # OpenLDAP --enable-crypt
885         # Check whether --enable-crypt or --disable-crypt was given.
886 if test "${enable_crypt+set}" = set; then
887   enableval="$enable_crypt"
888   
889         ol_arg=invalid
890         for ol_val in auto yes no ; do
891                 if test "$enableval" = "$ol_val" ; then
892                         ol_arg="$ol_val"
893                 fi
894         done
895         if test "$ol_arg" = "invalid" ; then
896                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
897         fi
898         ol_enable_crypt="$ol_arg"
899
900 else
901         ol_enable_crypt="auto"
902 fi
903 # end --enable-crypt
904 # OpenLDAP --enable-md5
905         # Check whether --enable-md5 or --disable-md5 was given.
906 if test "${enable_md5+set}" = set; then
907   enableval="$enable_md5"
908   
909         ol_arg=invalid
910         for ol_val in auto yes no ; do
911                 if test "$enableval" = "$ol_val" ; then
912                         ol_arg="$ol_val"
913                 fi
914         done
915         if test "$ol_arg" = "invalid" ; then
916                 { echo "configure: error: bad value $enableval for --enable-md5" 1>&2; exit 1; }
917         fi
918         ol_enable_md5="$ol_arg"
919
920 else
921         ol_enable_md5="auto"
922 fi
923 # end --enable-md5
924 # OpenLDAP --enable-sha1
925         # Check whether --enable-sha1 or --disable-sha1 was given.
926 if test "${enable_sha1+set}" = set; then
927   enableval="$enable_sha1"
928   
929         ol_arg=invalid
930         for ol_val in auto yes no ; do
931                 if test "$enableval" = "$ol_val" ; then
932                         ol_arg="$ol_val"
933                 fi
934         done
935         if test "$ol_arg" = "invalid" ; then
936                 { echo "configure: error: bad value $enableval for --enable-sha1" 1>&2; exit 1; }
937         fi
938         ol_enable_sha1="$ol_arg"
939
940 else
941         ol_enable_sha1="auto"
942 fi
943 # end --enable-sha1
944 # OpenLDAP --enable-wrappers
945         # Check whether --enable-wrappers or --disable-wrappers was given.
946 if test "${enable_wrappers+set}" = set; then
947   enableval="$enable_wrappers"
948   
949         ol_arg=invalid
950         for ol_val in auto yes no ; do
951                 if test "$enableval" = "$ol_val" ; then
952                         ol_arg="$ol_val"
953                 fi
954         done
955         if test "$ol_arg" = "invalid" ; then
956                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
957         fi
958         ol_enable_wrappers="$ol_arg"
959
960 else
961         ol_enable_wrappers="no"
962 fi
963 # end --enable-wrappers
964 # OpenLDAP --enable-phonetic
965         # Check whether --enable-phonetic or --disable-phonetic was given.
966 if test "${enable_phonetic+set}" = set; then
967   enableval="$enable_phonetic"
968   
969         ol_arg=invalid
970         for ol_val in auto yes no ; do
971                 if test "$enableval" = "$ol_val" ; then
972                         ol_arg="$ol_val"
973                 fi
974         done
975         if test "$ol_arg" = "invalid" ; then
976                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
977         fi
978         ol_enable_phonetic="$ol_arg"
979
980 else
981         ol_enable_phonetic="no"
982 fi
983 # end --enable-phonetic
984 # OpenLDAP --enable-rlookups
985         # Check whether --enable-rlookups or --disable-rlookups was given.
986 if test "${enable_rlookups+set}" = set; then
987   enableval="$enable_rlookups"
988   
989         ol_arg=invalid
990         for ol_val in auto yes no ; do
991                 if test "$enableval" = "$ol_val" ; then
992                         ol_arg="$ol_val"
993                 fi
994         done
995         if test "$ol_arg" = "invalid" ; then
996                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
997         fi
998         ol_enable_rlookups="$ol_arg"
999
1000 else
1001         ol_enable_rlookups="auto"
1002 fi
1003 # end --enable-rlookups
1004
1005 # OpenLDAP --enable-ldbm
1006         # Check whether --enable-ldbm or --disable-ldbm was given.
1007 if test "${enable_ldbm+set}" = set; then
1008   enableval="$enable_ldbm"
1009   
1010         ol_arg=invalid
1011         for ol_val in auto yes no ; do
1012                 if test "$enableval" = "$ol_val" ; then
1013                         ol_arg="$ol_val"
1014                 fi
1015         done
1016         if test "$ol_arg" = "invalid" ; then
1017                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1018         fi
1019         ol_enable_ldbm="$ol_arg"
1020
1021 else
1022         ol_enable_ldbm="yes"
1023 fi
1024 # end --enable-ldbm
1025 # OpenLDAP --with-ldbm_api
1026         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1027 if test "${with_ldbm_api+set}" = set; then
1028   withval="$with_ldbm_api"
1029   
1030         ol_arg=invalid
1031         for ol_val in auto db2 db gdbm ndbm manual ; do
1032                 if test "$withval" = "$ol_val" ; then
1033                         ol_arg="$ol_val"
1034                 fi
1035         done
1036         if test "$ol_arg" = "invalid" ; then
1037                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1038         fi
1039         ol_with_ldbm_api="$ol_arg"
1040
1041 else
1042         ol_with_ldbm_api="auto"
1043 fi
1044 # end --with-ldbm_api
1045
1046 # OpenLDAP --with-ldbm_type
1047         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1048 if test "${with_ldbm_type+set}" = set; then
1049   withval="$with_ldbm_type"
1050   
1051         ol_arg=invalid
1052         for ol_val in auto btree hash ; do
1053                 if test "$withval" = "$ol_val" ; then
1054                         ol_arg="$ol_val"
1055                 fi
1056         done
1057         if test "$ol_arg" = "invalid" ; then
1058                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1059         fi
1060         ol_with_ldbm_type="$ol_arg"
1061
1062 else
1063         ol_with_ldbm_type="auto"
1064 fi
1065 # end --with-ldbm_type
1066
1067
1068 # OpenLDAP --enable-passwd
1069         # Check whether --enable-passwd or --disable-passwd was given.
1070 if test "${enable_passwd+set}" = set; then
1071   enableval="$enable_passwd"
1072   
1073         ol_arg=invalid
1074         for ol_val in auto yes no ; do
1075                 if test "$enableval" = "$ol_val" ; then
1076                         ol_arg="$ol_val"
1077                 fi
1078         done
1079         if test "$ol_arg" = "invalid" ; then
1080                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1081         fi
1082         ol_enable_passwd="$ol_arg"
1083
1084 else
1085         ol_enable_passwd="no"
1086 fi
1087 # end --enable-passwd
1088 # OpenLDAP --enable-shell
1089         # Check whether --enable-shell or --disable-shell was given.
1090 if test "${enable_shell+set}" = set; then
1091   enableval="$enable_shell"
1092   
1093         ol_arg=invalid
1094         for ol_val in auto yes no ; do
1095                 if test "$enableval" = "$ol_val" ; then
1096                         ol_arg="$ol_val"
1097                 fi
1098         done
1099         if test "$ol_arg" = "invalid" ; then
1100                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1101         fi
1102         ol_enable_shell="$ol_arg"
1103
1104 else
1105         ol_enable_shell="no"
1106 fi
1107 # end --enable-shell
1108
1109 # OpenLDAP --enable-slurpd
1110         # Check whether --enable-slurpd or --disable-slurpd was given.
1111 if test "${enable_slurpd+set}" = set; then
1112   enableval="$enable_slurpd"
1113   
1114         ol_arg=invalid
1115         for ol_val in auto yes no ; do
1116                 if test "$enableval" = "$ol_val" ; then
1117                         ol_arg="$ol_val"
1118                 fi
1119         done
1120         if test "$ol_arg" = "invalid" ; then
1121                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1122         fi
1123         ol_enable_slurpd="$ol_arg"
1124
1125 else
1126         ol_enable_slurpd="auto"
1127 fi
1128 # end --enable-slurpd
1129
1130 if test $ol_enable_slapd = no ; then
1131                 if test $ol_enable_ldbm = yes ; then
1132                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1133         fi
1134         if test $ol_enable_passwd = yes ; then
1135                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1136         fi
1137         if test $ol_enable_shell = yes ; then
1138                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1139         fi
1140         if test $ol_enable_aclgroups = yes ; then
1141                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1142         fi
1143         if test $ol_enable_crypt = yes ; then
1144                 echo "configure: warning: slapd disabled, ignoring --enable_crypt argument" 1>&2
1145         fi
1146         if test $ol_enable_md5 = yes ; then
1147                 echo "configure: warning: slapd disabled, ignoring --enable_md5 argument" 1>&2
1148         fi
1149         if test $ol_enable_sha1 = yes ; then
1150                 echo "configure: warning: slapd disabled, ignoring --enable_sha1 argument" 1>&2
1151         fi
1152         if test $ol_enable_wrappers = yes ; then
1153                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1154         fi
1155         if test $ol_enable_phonetic = yes ; then
1156                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1157         fi
1158         if test $ol_enable_rlookups = yes ; then
1159                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1160         fi
1161         if test $ol_with_ldbm_api != auto ; then
1162                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1163         fi
1164         if test $ol_with_ldbm_type != auto ; then
1165                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1166         fi
1167         if test $ol_enable_slurpd = yes ; then
1168                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1169         fi
1170
1171         # force settings to no
1172         ol_enable_ldbm=no
1173         ol_enable_shell=no
1174         ol_enable_passwd=no
1175         ol_enable_aclgroups=no
1176         ol_enable_crypt=no
1177         ol_enable_md5=no
1178         ol_enable_sha1=no
1179         ol_enable_wrappers=no
1180         ol_enable_phonetic=no
1181         ol_enable_rlookups=no
1182         ol_with_ldbm_api=no
1183         ol_with_ldbm_type=no
1184         ol_enable_slurpd=no
1185
1186 elif test $ol_enable_ldbm = no ; then
1187         
1188         if test $ol_with_ldbm_api != auto ; then
1189                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1190         fi
1191
1192         if test $ol_with_ldbm_type != auto ; then
1193                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1194         fi
1195
1196         if test $ol_enable_passwd = no -a $ol_enable_shell = no ; then
1197                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1198         fi
1199
1200         ol_with_ldbm_api=no
1201         ol_with_ldbm_type=no
1202
1203 else
1204         
1205         if test $ol_with_ldbm_api = gdbm -a \
1206                 $ol_with_ldbm_type = btree ; then
1207                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1208         fi
1209         if test $ol_with_ldbm_api = ndbm -a \
1210                 $ol_with_ldbm_type = btree ; then
1211                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1212         fi
1213 fi
1214
1215 if test $ol_enable_slurpd = yes ; then
1216                 if test $ol_with_threads = no ; then
1217                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1218         fi
1219 fi
1220
1221 echo "$ac_t""done" 1>&6
1222
1223 ## Initialize vars
1224 LDAP_LIBS=
1225 LDBM_LIBS=
1226 LTHREAD_LIBS=
1227 LUTIL_LIBS=
1228
1229 LDAPD_LIBS=
1230 SLAPD_LIBS=
1231 SLURPD_LIBS=
1232
1233 BUILD_LDAPD=no
1234 BUILD_SLAPD=no
1235 BUILD_SLURPD=no
1236
1237 BUILD_LDBM=no
1238 BUILD_PASSWD=no
1239 BUILD_SHELL=no
1240
1241 KRB_LIBS=
1242 TERMCAP_LIBS=
1243
1244
1245 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1246 echo "configure:1247: checking whether ln -s works" >&5
1247 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1248   echo $ac_n "(cached) $ac_c" 1>&6
1249 else
1250   rm -f conftestdata
1251 if ln -s X conftestdata 2>/dev/null
1252 then
1253   rm -f conftestdata
1254   ac_cv_prog_LN_S="ln -s"
1255 else
1256   ac_cv_prog_LN_S=ln
1257 fi
1258 fi
1259 LN_S="$ac_cv_prog_LN_S"
1260 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1261   echo "$ac_t""yes" 1>&6
1262 else
1263   echo "$ac_t""no" 1>&6
1264 fi
1265
1266 # Find a good install program.  We prefer a C program (faster),
1267 # so one script is as good as another.  But avoid the broken or
1268 # incompatible versions:
1269 # SysV /etc/install, /usr/sbin/install
1270 # SunOS /usr/etc/install
1271 # IRIX /sbin/install
1272 # AIX /bin/install
1273 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1274 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1275 # ./install, which can be erroneously created by make from ./install.sh.
1276 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1277 echo "configure:1278: checking for a BSD compatible install" >&5
1278 if test -z "$INSTALL"; then
1279 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1280   echo $ac_n "(cached) $ac_c" 1>&6
1281 else
1282     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1283   for ac_dir in $PATH; do
1284     # Account for people who put trailing slashes in PATH elements.
1285     case "$ac_dir/" in
1286     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1287     *)
1288       # OSF1 and SCO ODT 3.0 have their own names for install.
1289       for ac_prog in ginstall installbsd scoinst install; do
1290         if test -f $ac_dir/$ac_prog; then
1291           if test $ac_prog = install &&
1292             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1293             # AIX install.  It has an incompatible calling convention.
1294             # OSF/1 installbsd also uses dspmsg, but is usable.
1295             :
1296           else
1297             ac_cv_path_install="$ac_dir/$ac_prog -c"
1298             break 2
1299           fi
1300         fi
1301       done
1302       ;;
1303     esac
1304   done
1305   IFS="$ac_save_IFS"
1306
1307 fi
1308   if test "${ac_cv_path_install+set}" = set; then
1309     INSTALL="$ac_cv_path_install"
1310   else
1311     # As a last resort, use the slow shell script.  We don't cache a
1312     # path for INSTALL within a source directory, because that will
1313     # break other packages using the cache if that directory is
1314     # removed, or if the path is relative.
1315     INSTALL="$ac_install_sh"
1316   fi
1317 fi
1318 echo "$ac_t""$INSTALL" 1>&6
1319
1320 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1321 # It thinks the first close brace ends the variable substitution.
1322 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1323
1324 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1325
1326 # Extract the first word of "ranlib", so it can be a program name with args.
1327 set dummy ranlib; ac_word=$2
1328 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1329 echo "configure:1330: checking for $ac_word" >&5
1330 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1331   echo $ac_n "(cached) $ac_c" 1>&6
1332 else
1333   if test -n "$RANLIB"; then
1334   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1335 else
1336   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1337   for ac_dir in $PATH; do
1338     test -z "$ac_dir" && ac_dir=.
1339     if test -f $ac_dir/$ac_word; then
1340       ac_cv_prog_RANLIB="ranlib"
1341       break
1342     fi
1343   done
1344   IFS="$ac_save_ifs"
1345   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1346 fi
1347 fi
1348 RANLIB="$ac_cv_prog_RANLIB"
1349 if test -n "$RANLIB"; then
1350   echo "$ac_t""$RANLIB" 1>&6
1351 else
1352   echo "$ac_t""no" 1>&6
1353 fi
1354
1355 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1356 echo "configure:1357: checking whether ${MAKE-make} sets \${MAKE}" >&5
1357 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1358 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1359   echo $ac_n "(cached) $ac_c" 1>&6
1360 else
1361   cat > conftestmake <<\EOF
1362 all:
1363         @echo 'ac_maketemp="${MAKE}"'
1364 EOF
1365 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1366 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1367 if test -n "$ac_maketemp"; then
1368   eval ac_cv_prog_make_${ac_make}_set=yes
1369 else
1370   eval ac_cv_prog_make_${ac_make}_set=no
1371 fi
1372 rm -f conftestmake
1373 fi
1374 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1375   echo "$ac_t""yes" 1>&6
1376   SET_MAKE=
1377 else
1378   echo "$ac_t""no" 1>&6
1379   SET_MAKE="MAKE=${MAKE-make}"
1380 fi
1381
1382
1383 # Extract the first word of "sendmail", so it can be a program name with args.
1384 set dummy sendmail; ac_word=$2
1385 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1386 echo "configure:1387: checking for $ac_word" >&5
1387 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
1388   echo $ac_n "(cached) $ac_c" 1>&6
1389 else
1390   case "$SENDMAIL" in
1391   /*)
1392   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
1393   ;;
1394   *)
1395   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1396   for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do
1397     test -z "$ac_dir" && ac_dir=.
1398     if test -f $ac_dir/$ac_word; then
1399       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
1400       break
1401     fi
1402   done
1403   IFS="$ac_save_ifs"
1404   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
1405   ;;
1406 esac
1407 fi
1408 SENDMAIL="$ac_cv_path_SENDMAIL"
1409 if test -n "$SENDMAIL"; then
1410   echo "$ac_t""$SENDMAIL" 1>&6
1411 else
1412   echo "$ac_t""no" 1>&6
1413 fi
1414
1415 # Extract the first word of "vi", so it can be a program name with args.
1416 set dummy vi; ac_word=$2
1417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1418 echo "configure:1419: checking for $ac_word" >&5
1419 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
1420   echo $ac_n "(cached) $ac_c" 1>&6
1421 else
1422   case "$EDITOR" in
1423   /*)
1424   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
1425   ;;
1426   *)
1427   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1428   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1429     test -z "$ac_dir" && ac_dir=.
1430     if test -f $ac_dir/$ac_word; then
1431       ac_cv_path_EDITOR="$ac_dir/$ac_word"
1432       break
1433     fi
1434   done
1435   IFS="$ac_save_ifs"
1436   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
1437   ;;
1438 esac
1439 fi
1440 EDITOR="$ac_cv_path_EDITOR"
1441 if test -n "$EDITOR"; then
1442   echo "$ac_t""$EDITOR" 1>&6
1443 else
1444   echo "$ac_t""no" 1>&6
1445 fi
1446
1447 # Extract the first word of "finger", so it can be a program name with args.
1448 set dummy finger; ac_word=$2
1449 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1450 echo "configure:1451: checking for $ac_word" >&5
1451 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
1452   echo $ac_n "(cached) $ac_c" 1>&6
1453 else
1454   case "$FINGER" in
1455   /*)
1456   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
1457   ;;
1458   *)
1459   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1460   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1461     test -z "$ac_dir" && ac_dir=.
1462     if test -f $ac_dir/$ac_word; then
1463       ac_cv_path_FINGER="$ac_dir/$ac_word"
1464       break
1465     fi
1466   done
1467   IFS="$ac_save_ifs"
1468   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
1469   ;;
1470 esac
1471 fi
1472 FINGER="$ac_cv_path_FINGER"
1473 if test -n "$FINGER"; then
1474   echo "$ac_t""$FINGER" 1>&6
1475 else
1476   echo "$ac_t""no" 1>&6
1477 fi
1478
1479
1480 # Extract the first word of "gcc", so it can be a program name with args.
1481 set dummy gcc; ac_word=$2
1482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1483 echo "configure:1484: checking for $ac_word" >&5
1484 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1485   echo $ac_n "(cached) $ac_c" 1>&6
1486 else
1487   if test -n "$CC"; then
1488   ac_cv_prog_CC="$CC" # Let the user override the test.
1489 else
1490   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1491   for ac_dir in $PATH; do
1492     test -z "$ac_dir" && ac_dir=.
1493     if test -f $ac_dir/$ac_word; then
1494       ac_cv_prog_CC="gcc"
1495       break
1496     fi
1497   done
1498   IFS="$ac_save_ifs"
1499 fi
1500 fi
1501 CC="$ac_cv_prog_CC"
1502 if test -n "$CC"; then
1503   echo "$ac_t""$CC" 1>&6
1504 else
1505   echo "$ac_t""no" 1>&6
1506 fi
1507
1508 if test -z "$CC"; then
1509   # Extract the first word of "cc", so it can be a program name with args.
1510 set dummy cc; ac_word=$2
1511 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1512 echo "configure:1513: checking for $ac_word" >&5
1513 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1514   echo $ac_n "(cached) $ac_c" 1>&6
1515 else
1516   if test -n "$CC"; then
1517   ac_cv_prog_CC="$CC" # Let the user override the test.
1518 else
1519   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1520   ac_prog_rejected=no
1521   for ac_dir in $PATH; do
1522     test -z "$ac_dir" && ac_dir=.
1523     if test -f $ac_dir/$ac_word; then
1524       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1525         ac_prog_rejected=yes
1526         continue
1527       fi
1528       ac_cv_prog_CC="cc"
1529       break
1530     fi
1531   done
1532   IFS="$ac_save_ifs"
1533 if test $ac_prog_rejected = yes; then
1534   # We found a bogon in the path, so make sure we never use it.
1535   set dummy $ac_cv_prog_CC
1536   shift
1537   if test $# -gt 0; then
1538     # We chose a different compiler from the bogus one.
1539     # However, it has the same basename, so the bogon will be chosen
1540     # first if we set CC to just the basename; use the full file name.
1541     shift
1542     set dummy "$ac_dir/$ac_word" "$@"
1543     shift
1544     ac_cv_prog_CC="$@"
1545   fi
1546 fi
1547 fi
1548 fi
1549 CC="$ac_cv_prog_CC"
1550 if test -n "$CC"; then
1551   echo "$ac_t""$CC" 1>&6
1552 else
1553   echo "$ac_t""no" 1>&6
1554 fi
1555
1556   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1557 fi
1558
1559 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1560 echo "configure:1561: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1561
1562 ac_ext=c
1563 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1564 ac_cpp='$CPP $CPPFLAGS'
1565 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1566 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1567 cross_compiling=$ac_cv_prog_cc_cross
1568
1569 cat > conftest.$ac_ext <<EOF
1570 #line 1571 "configure"
1571 #include "confdefs.h"
1572 main(){return(0);}
1573 EOF
1574 if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1575   ac_cv_prog_cc_works=yes
1576   # If we can't run a trivial program, we are probably using a cross compiler.
1577   if (./conftest; exit) 2>/dev/null; then
1578     ac_cv_prog_cc_cross=no
1579   else
1580     ac_cv_prog_cc_cross=yes
1581   fi
1582 else
1583   echo "configure: failed program was:" >&5
1584   cat conftest.$ac_ext >&5
1585   ac_cv_prog_cc_works=no
1586 fi
1587 rm -fr conftest*
1588
1589 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1590 if test $ac_cv_prog_cc_works = no; then
1591   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1592 fi
1593 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1594 echo "configure:1595: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1595 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1596 cross_compiling=$ac_cv_prog_cc_cross
1597
1598 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1599 echo "configure:1600: checking whether we are using GNU C" >&5
1600 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1601   echo $ac_n "(cached) $ac_c" 1>&6
1602 else
1603   cat > conftest.c <<EOF
1604 #ifdef __GNUC__
1605   yes;
1606 #endif
1607 EOF
1608 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1609   ac_cv_prog_gcc=yes
1610 else
1611   ac_cv_prog_gcc=no
1612 fi
1613 fi
1614
1615 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1616
1617 if test $ac_cv_prog_gcc = yes; then
1618   GCC=yes
1619   ac_test_CFLAGS="${CFLAGS+set}"
1620   ac_save_CFLAGS="$CFLAGS"
1621   CFLAGS=
1622   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1623 echo "configure:1624: checking whether ${CC-cc} accepts -g" >&5
1624 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1625   echo $ac_n "(cached) $ac_c" 1>&6
1626 else
1627   echo 'void f(){}' > conftest.c
1628 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1629   ac_cv_prog_cc_g=yes
1630 else
1631   ac_cv_prog_cc_g=no
1632 fi
1633 rm -f conftest*
1634
1635 fi
1636
1637 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1638   if test "$ac_test_CFLAGS" = set; then
1639     CFLAGS="$ac_save_CFLAGS"
1640   elif test $ac_cv_prog_cc_g = yes; then
1641     CFLAGS="-g -O2"
1642   else
1643     CFLAGS="-O2"
1644   fi
1645 else
1646   GCC=
1647   test "${CFLAGS+set}" = set || CFLAGS="-g"
1648 fi
1649
1650
1651 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
1652         echo "configure: warning: cross compiling....  go for it" 1>&2
1653
1654 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
1655         echo "configure: warning: programs compiled here do run here..." 1>&2
1656         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
1657
1658 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
1659         echo "configure: warning: programs compiled here do not run here..." 1>&2
1660         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
1661 fi
1662
1663 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1664 echo "configure:1665: checking how to run the C preprocessor" >&5
1665 # On Suns, sometimes $CPP names a directory.
1666 if test -n "$CPP" && test -d "$CPP"; then
1667   CPP=
1668 fi
1669 if test -z "$CPP"; then
1670 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1671   echo $ac_n "(cached) $ac_c" 1>&6
1672 else
1673     # This must be in double quotes, not single quotes, because CPP may get
1674   # substituted into the Makefile and "${CC-cc}" will confuse make.
1675   CPP="${CC-cc} -E"
1676   # On the NeXT, cc -E runs the code through the compiler's parser,
1677   # not just through cpp.
1678   cat > conftest.$ac_ext <<EOF
1679 #line 1680 "configure"
1680 #include "confdefs.h"
1681 #include <assert.h>
1682 Syntax Error
1683 EOF
1684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1685 { (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1686 ac_err=`grep -v '^ *+' conftest.out`
1687 if test -z "$ac_err"; then
1688   :
1689 else
1690   echo "$ac_err" >&5
1691   echo "configure: failed program was:" >&5
1692   cat conftest.$ac_ext >&5
1693   rm -rf conftest*
1694   CPP="${CC-cc} -E -traditional-cpp"
1695   cat > conftest.$ac_ext <<EOF
1696 #line 1697 "configure"
1697 #include "confdefs.h"
1698 #include <assert.h>
1699 Syntax Error
1700 EOF
1701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1702 { (eval echo configure:1703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1703 ac_err=`grep -v '^ *+' conftest.out`
1704 if test -z "$ac_err"; then
1705   :
1706 else
1707   echo "$ac_err" >&5
1708   echo "configure: failed program was:" >&5
1709   cat conftest.$ac_ext >&5
1710   rm -rf conftest*
1711   CPP=/lib/cpp
1712 fi
1713 rm -f conftest*
1714 fi
1715 rm -f conftest*
1716   ac_cv_prog_CPP="$CPP"
1717 fi
1718   CPP="$ac_cv_prog_CPP"
1719 else
1720   ac_cv_prog_CPP="$CPP"
1721 fi
1722 echo "$ac_t""$CPP" 1>&6
1723
1724
1725
1726 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1727 echo "configure:1728: checking for AIX" >&5
1728 cat > conftest.$ac_ext <<EOF
1729 #line 1730 "configure"
1730 #include "confdefs.h"
1731 #ifdef _AIX
1732   yes
1733 #endif
1734
1735 EOF
1736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1737   egrep "yes" >/dev/null 2>&1; then
1738   rm -rf conftest*
1739   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1740 #define _ALL_SOURCE 1
1741 EOF
1742
1743 else
1744   rm -rf conftest*
1745   echo "$ac_t""no" 1>&6
1746 fi
1747 rm -f conftest*
1748
1749
1750 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1751 echo "configure:1752: checking for POSIXized ISC" >&5
1752 if test -d /etc/conf/kconfig.d &&
1753   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1754 then
1755   echo "$ac_t""yes" 1>&6
1756   ISC=yes # If later tests want to check for ISC.
1757   cat >> confdefs.h <<\EOF
1758 #define _POSIX_SOURCE 1
1759 EOF
1760
1761   if test "$GCC" = yes; then
1762     CC="$CC -posix"
1763   else
1764     CC="$CC -Xp"
1765   fi
1766 else
1767   echo "$ac_t""no" 1>&6
1768   ISC=
1769 fi
1770
1771 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1772 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1773 echo "configure:1774: checking for minix/config.h" >&5
1774 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1775   echo $ac_n "(cached) $ac_c" 1>&6
1776 else
1777   cat > conftest.$ac_ext <<EOF
1778 #line 1779 "configure"
1779 #include "confdefs.h"
1780 #include <minix/config.h>
1781 EOF
1782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1783 { (eval echo configure:1784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1784 ac_err=`grep -v '^ *+' conftest.out`
1785 if test -z "$ac_err"; then
1786   rm -rf conftest*
1787   eval "ac_cv_header_$ac_safe=yes"
1788 else
1789   echo "$ac_err" >&5
1790   echo "configure: failed program was:" >&5
1791   cat conftest.$ac_ext >&5
1792   rm -rf conftest*
1793   eval "ac_cv_header_$ac_safe=no"
1794 fi
1795 rm -f conftest*
1796 fi
1797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1798   echo "$ac_t""yes" 1>&6
1799   MINIX=yes
1800 else
1801   echo "$ac_t""no" 1>&6
1802 MINIX=
1803 fi
1804
1805 if test "$MINIX" = yes; then
1806   cat >> confdefs.h <<\EOF
1807 #define _POSIX_SOURCE 1
1808 EOF
1809
1810   cat >> confdefs.h <<\EOF
1811 #define _POSIX_1_SOURCE 2
1812 EOF
1813
1814   cat >> confdefs.h <<\EOF
1815 #define _MINIX 1
1816 EOF
1817
1818 fi
1819
1820
1821
1822
1823 echo $ac_n "checking for socket""... $ac_c" 1>&6
1824 echo "configure:1825: checking for socket" >&5
1825 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
1826   echo $ac_n "(cached) $ac_c" 1>&6
1827 else
1828   cat > conftest.$ac_ext <<EOF
1829 #line 1830 "configure"
1830 #include "confdefs.h"
1831 /* System header to define __stub macros and hopefully few prototypes,
1832     which can conflict with char socket(); below.  */
1833 #include <assert.h>
1834 /* Override any gcc2 internal prototype to avoid an error.  */
1835 /* We use char because int might match the return type of a gcc2
1836     builtin and then its argument prototype would still apply.  */
1837 char socket();
1838
1839 int main() {
1840
1841 /* The GNU C library defines this for functions which it implements
1842     to always fail with ENOSYS.  Some functions are actually named
1843     something starting with __ and the normal name is an alias.  */
1844 #if defined (__stub_socket) || defined (__stub___socket)
1845 choke me
1846 #else
1847 socket();
1848 #endif
1849
1850 ; return 0; }
1851 EOF
1852 if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1853   rm -rf conftest*
1854   eval "ac_cv_func_socket=yes"
1855 else
1856   echo "configure: failed program was:" >&5
1857   cat conftest.$ac_ext >&5
1858   rm -rf conftest*
1859   eval "ac_cv_func_socket=no"
1860 fi
1861 rm -f conftest*
1862 fi
1863
1864 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
1865   echo "$ac_t""yes" 1>&6
1866   :
1867 else
1868   echo "$ac_t""no" 1>&6
1869         
1870         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1871 echo "configure:1872: checking for main in -lsocket" >&5
1872 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1873 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1874   echo $ac_n "(cached) $ac_c" 1>&6
1875 else
1876   ac_save_LIBS="$LIBS"
1877 LIBS="-lsocket  $LIBS"
1878 cat > conftest.$ac_ext <<EOF
1879 #line 1880 "configure"
1880 #include "confdefs.h"
1881
1882 int main() {
1883 main()
1884 ; return 0; }
1885 EOF
1886 if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1887   rm -rf conftest*
1888   eval "ac_cv_lib_$ac_lib_var=yes"
1889 else
1890   echo "configure: failed program was:" >&5
1891   cat conftest.$ac_ext >&5
1892   rm -rf conftest*
1893   eval "ac_cv_lib_$ac_lib_var=no"
1894 fi
1895 rm -f conftest*
1896 LIBS="$ac_save_LIBS"
1897
1898 fi
1899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1900   echo "$ac_t""yes" 1>&6
1901     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1902     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1903   cat >> confdefs.h <<EOF
1904 #define $ac_tr_lib 1
1905 EOF
1906
1907   LIBS="-lsocket $LIBS"
1908
1909 else
1910   echo "$ac_t""no" 1>&6
1911 fi
1912
1913         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
1914 echo "configure:1915: checking for main in -lnet" >&5
1915 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
1916 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1917   echo $ac_n "(cached) $ac_c" 1>&6
1918 else
1919   ac_save_LIBS="$LIBS"
1920 LIBS="-lnet  $LIBS"
1921 cat > conftest.$ac_ext <<EOF
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924
1925 int main() {
1926 main()
1927 ; return 0; }
1928 EOF
1929 if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1930   rm -rf conftest*
1931   eval "ac_cv_lib_$ac_lib_var=yes"
1932 else
1933   echo "configure: failed program was:" >&5
1934   cat conftest.$ac_ext >&5
1935   rm -rf conftest*
1936   eval "ac_cv_lib_$ac_lib_var=no"
1937 fi
1938 rm -f conftest*
1939 LIBS="$ac_save_LIBS"
1940
1941 fi
1942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1943   echo "$ac_t""yes" 1>&6
1944     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1945     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1946   cat >> confdefs.h <<EOF
1947 #define $ac_tr_lib 1
1948 EOF
1949
1950   LIBS="-lnet $LIBS"
1951
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955
1956         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
1957 echo "configure:1958: checking for main in -lnsl_s" >&5
1958 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
1959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1960   echo $ac_n "(cached) $ac_c" 1>&6
1961 else
1962   ac_save_LIBS="$LIBS"
1963 LIBS="-lnsl_s  $LIBS"
1964 cat > conftest.$ac_ext <<EOF
1965 #line 1966 "configure"
1966 #include "confdefs.h"
1967
1968 int main() {
1969 main()
1970 ; return 0; }
1971 EOF
1972 if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1973   rm -rf conftest*
1974   eval "ac_cv_lib_$ac_lib_var=yes"
1975 else
1976   echo "configure: failed program was:" >&5
1977   cat conftest.$ac_ext >&5
1978   rm -rf conftest*
1979   eval "ac_cv_lib_$ac_lib_var=no"
1980 fi
1981 rm -f conftest*
1982 LIBS="$ac_save_LIBS"
1983
1984 fi
1985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1986   echo "$ac_t""yes" 1>&6
1987     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1988     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1989   cat >> confdefs.h <<EOF
1990 #define $ac_tr_lib 1
1991 EOF
1992
1993   LIBS="-lnsl_s $LIBS"
1994
1995 else
1996   echo "$ac_t""no" 1>&6
1997 fi
1998
1999         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2000 echo "configure:2001: checking for main in -lnsl" >&5
2001 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2002 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2003   echo $ac_n "(cached) $ac_c" 1>&6
2004 else
2005   ac_save_LIBS="$LIBS"
2006 LIBS="-lnsl  $LIBS"
2007 cat > conftest.$ac_ext <<EOF
2008 #line 2009 "configure"
2009 #include "confdefs.h"
2010
2011 int main() {
2012 main()
2013 ; return 0; }
2014 EOF
2015 if { (eval echo configure:2016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2016   rm -rf conftest*
2017   eval "ac_cv_lib_$ac_lib_var=yes"
2018 else
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -rf conftest*
2022   eval "ac_cv_lib_$ac_lib_var=no"
2023 fi
2024 rm -f conftest*
2025 LIBS="$ac_save_LIBS"
2026
2027 fi
2028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2029   echo "$ac_t""yes" 1>&6
2030     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2031     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2032   cat >> confdefs.h <<EOF
2033 #define $ac_tr_lib 1
2034 EOF
2035
2036   LIBS="-lnsl $LIBS"
2037
2038 else
2039   echo "$ac_t""no" 1>&6
2040 fi
2041
2042         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
2043 echo "configure:2044: checking for socket in -linet" >&5
2044 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
2045 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2046   echo $ac_n "(cached) $ac_c" 1>&6
2047 else
2048   ac_save_LIBS="$LIBS"
2049 LIBS="-linet  $LIBS"
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2053 /* Override any gcc2 internal prototype to avoid an error.  */
2054 /* We use char because int might match the return type of a gcc2
2055     builtin and then its argument prototype would still apply.  */
2056 char socket();
2057
2058 int main() {
2059 socket()
2060 ; return 0; }
2061 EOF
2062 if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2063   rm -rf conftest*
2064   eval "ac_cv_lib_$ac_lib_var=yes"
2065 else
2066   echo "configure: failed program was:" >&5
2067   cat conftest.$ac_ext >&5
2068   rm -rf conftest*
2069   eval "ac_cv_lib_$ac_lib_var=no"
2070 fi
2071 rm -f conftest*
2072 LIBS="$ac_save_LIBS"
2073
2074 fi
2075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2076   echo "$ac_t""yes" 1>&6
2077     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2078     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2079   cat >> confdefs.h <<EOF
2080 #define $ac_tr_lib 1
2081 EOF
2082
2083   LIBS="-linet $LIBS"
2084
2085 else
2086   echo "$ac_t""no" 1>&6
2087 fi
2088
2089         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
2090 echo "configure:2091: checking for main in -lgen" >&5
2091 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
2092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2093   echo $ac_n "(cached) $ac_c" 1>&6
2094 else
2095   ac_save_LIBS="$LIBS"
2096 LIBS="-lgen  $LIBS"
2097 cat > conftest.$ac_ext <<EOF
2098 #line 2099 "configure"
2099 #include "confdefs.h"
2100
2101 int main() {
2102 main()
2103 ; return 0; }
2104 EOF
2105 if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2106   rm -rf conftest*
2107   eval "ac_cv_lib_$ac_lib_var=yes"
2108 else
2109   echo "configure: failed program was:" >&5
2110   cat conftest.$ac_ext >&5
2111   rm -rf conftest*
2112   eval "ac_cv_lib_$ac_lib_var=no"
2113 fi
2114 rm -f conftest*
2115 LIBS="$ac_save_LIBS"
2116
2117 fi
2118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2119   echo "$ac_t""yes" 1>&6
2120     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2122   cat >> confdefs.h <<EOF
2123 #define $ac_tr_lib 1
2124 EOF
2125
2126   LIBS="-lgen $LIBS"
2127
2128 else
2129   echo "$ac_t""no" 1>&6
2130 fi
2131
2132
2133 fi
2134
2135
2136 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
2137 echo "configure:2138: checking for sigset in -lV3" >&5
2138 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
2139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2140   echo $ac_n "(cached) $ac_c" 1>&6
2141 else
2142   ac_save_LIBS="$LIBS"
2143 LIBS="-lV3  $LIBS"
2144 cat > conftest.$ac_ext <<EOF
2145 #line 2146 "configure"
2146 #include "confdefs.h"
2147 /* Override any gcc2 internal prototype to avoid an error.  */
2148 /* We use char because int might match the return type of a gcc2
2149     builtin and then its argument prototype would still apply.  */
2150 char sigset();
2151
2152 int main() {
2153 sigset()
2154 ; return 0; }
2155 EOF
2156 if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2157   rm -rf conftest*
2158   eval "ac_cv_lib_$ac_lib_var=yes"
2159 else
2160   echo "configure: failed program was:" >&5
2161   cat conftest.$ac_ext >&5
2162   rm -rf conftest*
2163   eval "ac_cv_lib_$ac_lib_var=no"
2164 fi
2165 rm -f conftest*
2166 LIBS="$ac_save_LIBS"
2167
2168 fi
2169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2170   echo "$ac_t""yes" 1>&6
2171     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2172     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2173   cat >> confdefs.h <<EOF
2174 #define $ac_tr_lib 1
2175 EOF
2176
2177   LIBS="-lV3 $LIBS"
2178
2179 else
2180   echo "$ac_t""no" 1>&6
2181 fi
2182
2183
2184 # ISODE tests
2185 ol_link_isode=no
2186 if test $ol_enable_ldapd != no ; then
2187                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
2188 echo "configure:2189: checking for main in -lxtpp" >&5
2189 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
2190 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2191   echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193   ac_save_LIBS="$LIBS"
2194 LIBS="-lxtpp -lresolv -lxtdsap -lxtisode -losi $LIBS"
2195 cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198
2199 int main() {
2200 main()
2201 ; return 0; }
2202 EOF
2203 if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2204   rm -rf conftest*
2205   eval "ac_cv_lib_$ac_lib_var=yes"
2206 else
2207   echo "configure: failed program was:" >&5
2208   cat conftest.$ac_ext >&5
2209   rm -rf conftest*
2210   eval "ac_cv_lib_$ac_lib_var=no"
2211 fi
2212 rm -f conftest*
2213 LIBS="$ac_save_LIBS"
2214
2215 fi
2216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2217   echo "$ac_t""yes" 1>&6
2218   
2219                 ol_link_isode=yes
2220                 cat >> confdefs.h <<\EOF
2221 #define HAVE_XTPP 1
2222 EOF
2223
2224                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lresolv -lxtdsap -lxtisode -losi"
2225                 
2226 else
2227   echo "$ac_t""no" 1>&6
2228 :
2229 fi
2230
2231         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
2232 echo "configure:2233: checking for main in -ldsap" >&5
2233 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
2234 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2235   echo $ac_n "(cached) $ac_c" 1>&6
2236 else
2237   ac_save_LIBS="$LIBS"
2238 LIBS="-ldsap -lisode $LIBS"
2239 cat > conftest.$ac_ext <<EOF
2240 #line 2241 "configure"
2241 #include "confdefs.h"
2242
2243 int main() {
2244 main()
2245 ; return 0; }
2246 EOF
2247 if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2248   rm -rf conftest*
2249   eval "ac_cv_lib_$ac_lib_var=yes"
2250 else
2251   echo "configure: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   rm -rf conftest*
2254   eval "ac_cv_lib_$ac_lib_var=no"
2255 fi
2256 rm -f conftest*
2257 LIBS="$ac_save_LIBS"
2258
2259 fi
2260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2261   echo "$ac_t""yes" 1>&6
2262   
2263                 ol_link_isode=yes
2264                 cat >> confdefs.h <<\EOF
2265 #define HAVE_DSAP 1
2266 EOF
2267
2268                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
2269                 
2270 else
2271   echo "$ac_t""no" 1>&6
2272 :
2273 fi
2274
2275         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
2276 echo "configure:2277: checking for main in -lisode" >&5
2277 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
2278 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2279   echo $ac_n "(cached) $ac_c" 1>&6
2280 else
2281   ac_save_LIBS="$LIBS"
2282 LIBS="-lisode  $LIBS"
2283 cat > conftest.$ac_ext <<EOF
2284 #line 2285 "configure"
2285 #include "confdefs.h"
2286
2287 int main() {
2288 main()
2289 ; return 0; }
2290 EOF
2291 if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2292   rm -rf conftest*
2293   eval "ac_cv_lib_$ac_lib_var=yes"
2294 else
2295   echo "configure: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   rm -rf conftest*
2298   eval "ac_cv_lib_$ac_lib_var=no"
2299 fi
2300 rm -f conftest*
2301 LIBS="$ac_save_LIBS"
2302
2303 fi
2304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2305   echo "$ac_t""yes" 1>&6
2306   
2307                 ol_link_isode=yes
2308                 cat >> confdefs.h <<\EOF
2309 #define HAVE_ISODE 1
2310 EOF
2311
2312                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
2313                 
2314 else
2315   echo "$ac_t""no" 1>&6
2316 :
2317 fi
2318
2319 fi
2320
2321 if test $ol_link_isode != no; then
2322         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
2323 echo "configure:2324: checking for main in -lpp" >&5
2324 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
2325 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2326   echo $ac_n "(cached) $ac_c" 1>&6
2327 else
2328   ac_save_LIBS="$LIBS"
2329 LIBS="-lpp  $LIBS"
2330 cat > conftest.$ac_ext <<EOF
2331 #line 2332 "configure"
2332 #include "confdefs.h"
2333
2334 int main() {
2335 main()
2336 ; return 0; }
2337 EOF
2338 if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2339   rm -rf conftest*
2340   eval "ac_cv_lib_$ac_lib_var=yes"
2341 else
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -rf conftest*
2345   eval "ac_cv_lib_$ac_lib_var=no"
2346 fi
2347 rm -f conftest*
2348 LIBS="$ac_save_LIBS"
2349
2350 fi
2351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2352   echo "$ac_t""yes" 1>&6
2353   
2354                 cat >> confdefs.h <<\EOF
2355 #define HAVE_PP 1
2356 EOF
2357
2358                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
2359                 
2360 else
2361   echo "$ac_t""no" 1>&6
2362 :
2363 fi
2364
2365
2366         # Extract the first word of "pepsy", so it can be a program name with args.
2367 set dummy pepsy; ac_word=$2
2368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2369 echo "configure:2370: checking for $ac_word" >&5
2370 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
2371   echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373   case "$PEPSY" in
2374   /*)
2375   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
2376   ;;
2377   *)
2378   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2379   for ac_dir in $PATH; do
2380     test -z "$ac_dir" && ac_dir=.
2381     if test -f $ac_dir/$ac_word; then
2382       ac_cv_path_PEPSY="$ac_dir/$ac_word"
2383       break
2384     fi
2385   done
2386   IFS="$ac_save_ifs"
2387   ;;
2388 esac
2389 fi
2390 PEPSY="$ac_cv_path_PEPSY"
2391 if test -n "$PEPSY"; then
2392   echo "$ac_t""$PEPSY" 1>&6
2393 else
2394   echo "$ac_t""no" 1>&6
2395 fi
2396
2397 fi
2398
2399 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
2400         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
2401 do
2402 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2403 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2404 echo "configure:2405: checking for $ac_hdr" >&5
2405 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2406   echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408   cat > conftest.$ac_ext <<EOF
2409 #line 2410 "configure"
2410 #include "confdefs.h"
2411 #include <$ac_hdr>
2412 EOF
2413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2414 { (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2415 ac_err=`grep -v '^ *+' conftest.out`
2416 if test -z "$ac_err"; then
2417   rm -rf conftest*
2418   eval "ac_cv_header_$ac_safe=yes"
2419 else
2420   echo "$ac_err" >&5
2421   echo "configure: failed program was:" >&5
2422   cat conftest.$ac_ext >&5
2423   rm -rf conftest*
2424   eval "ac_cv_header_$ac_safe=no"
2425 fi
2426 rm -f conftest*
2427 fi
2428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2429   echo "$ac_t""yes" 1>&6
2430     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2431   cat >> confdefs.h <<EOF
2432 #define $ac_tr_hdr 1
2433 EOF
2434  
2435 else
2436   echo "$ac_t""no" 1>&6
2437 fi
2438 done
2439
2440
2441         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
2442                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
2443 echo "configure:2444: checking for main in -lkrb4" >&5
2444 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
2445 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2446   echo $ac_n "(cached) $ac_c" 1>&6
2447 else
2448   ac_save_LIBS="$LIBS"
2449 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
2450 cat > conftest.$ac_ext <<EOF
2451 #line 2452 "configure"
2452 #include "confdefs.h"
2453
2454 int main() {
2455 main()
2456 ; return 0; }
2457 EOF
2458 if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2459   rm -rf conftest*
2460   eval "ac_cv_lib_$ac_lib_var=yes"
2461 else
2462   echo "configure: failed program was:" >&5
2463   cat conftest.$ac_ext >&5
2464   rm -rf conftest*
2465   eval "ac_cv_lib_$ac_lib_var=no"
2466 fi
2467 rm -f conftest*
2468 LIBS="$ac_save_LIBS"
2469
2470 fi
2471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2472   echo "$ac_t""yes" 1>&6
2473   have_k5=yes
2474 else
2475   echo "$ac_t""no" 1>&6
2476 have_k5=no
2477 fi
2478
2479
2480                 if test $have_k5 = yes ; then
2481                         ol_with_kerberos=found
2482                         ol_link_kerberos=yes
2483
2484                         cat >> confdefs.h <<\EOF
2485 #define HAVE_KERBEROS 1
2486 EOF
2487
2488
2489                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
2490                 fi
2491         fi
2492 fi
2493 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
2494         for ac_hdr in krb.h des.h
2495 do
2496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2497 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2498 echo "configure:2499: checking for $ac_hdr" >&5
2499 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2500   echo $ac_n "(cached) $ac_c" 1>&6
2501 else
2502   cat > conftest.$ac_ext <<EOF
2503 #line 2504 "configure"
2504 #include "confdefs.h"
2505 #include <$ac_hdr>
2506 EOF
2507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2508 { (eval echo configure:2509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2509 ac_err=`grep -v '^ *+' conftest.out`
2510 if test -z "$ac_err"; then
2511   rm -rf conftest*
2512   eval "ac_cv_header_$ac_safe=yes"
2513 else
2514   echo "$ac_err" >&5
2515   echo "configure: failed program was:" >&5
2516   cat conftest.$ac_ext >&5
2517   rm -rf conftest*
2518   eval "ac_cv_header_$ac_safe=no"
2519 fi
2520 rm -f conftest*
2521 fi
2522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2523   echo "$ac_t""yes" 1>&6
2524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2525   cat >> confdefs.h <<EOF
2526 #define $ac_tr_hdr 1
2527 EOF
2528  
2529 else
2530   echo "$ac_t""no" 1>&6
2531 fi
2532 done
2533
2534
2535         if test $ac_cv_header_krb_h = yes ; then
2536                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
2537 echo "configure:2538: checking for main in -lkrb" >&5
2538 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
2539 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2540   echo $ac_n "(cached) $ac_c" 1>&6
2541 else
2542   ac_save_LIBS="$LIBS"
2543 LIBS="-lkrb -ldes $LIBS"
2544 cat > conftest.$ac_ext <<EOF
2545 #line 2546 "configure"
2546 #include "confdefs.h"
2547
2548 int main() {
2549 main()
2550 ; return 0; }
2551 EOF
2552 if { (eval echo configure:2553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2553   rm -rf conftest*
2554   eval "ac_cv_lib_$ac_lib_var=yes"
2555 else
2556   echo "configure: failed program was:" >&5
2557   cat conftest.$ac_ext >&5
2558   rm -rf conftest*
2559   eval "ac_cv_lib_$ac_lib_var=no"
2560 fi
2561 rm -f conftest*
2562 LIBS="$ac_save_LIBS"
2563
2564 fi
2565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2566   echo "$ac_t""yes" 1>&6
2567   have_k4=yes
2568 else
2569   echo "$ac_t""no" 1>&6
2570 have_k4=no
2571 fi
2572
2573
2574                 if test $have_k4 = yes ; then
2575                         ol_with_kerberos=found
2576                         ol_link_kerberos=yes
2577
2578                         cat >> confdefs.h <<\EOF
2579 #define HAVE_KERBEROS 1
2580 EOF
2581
2582
2583                         KRB_LIBS="-lkrb -ldes"
2584                 fi
2585         fi
2586 fi
2587
2588
2589 ol_link_threads=no
2590 if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
2591         for ac_hdr in pthread.h sched.h
2592 do
2593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2595 echo "configure:2596: checking for $ac_hdr" >&5
2596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2597   echo $ac_n "(cached) $ac_c" 1>&6
2598 else
2599   cat > conftest.$ac_ext <<EOF
2600 #line 2601 "configure"
2601 #include "confdefs.h"
2602 #include <$ac_hdr>
2603 EOF
2604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2605 { (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2606 ac_err=`grep -v '^ *+' conftest.out`
2607 if test -z "$ac_err"; then
2608   rm -rf conftest*
2609   eval "ac_cv_header_$ac_safe=yes"
2610 else
2611   echo "$ac_err" >&5
2612   echo "configure: failed program was:" >&5
2613   cat conftest.$ac_ext >&5
2614   rm -rf conftest*
2615   eval "ac_cv_header_$ac_safe=no"
2616 fi
2617 rm -f conftest*
2618 fi
2619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2620   echo "$ac_t""yes" 1>&6
2621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2622   cat >> confdefs.h <<EOF
2623 #define $ac_tr_hdr 1
2624 EOF
2625  
2626 else
2627   echo "$ac_t""no" 1>&6
2628 fi
2629 done
2630
2631
2632         if test $ac_cv_header_pthread_h = yes ; then
2633                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
2634 echo "configure:2635: checking POSIX thread version" >&5
2635 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
2636   echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638   
2639         cat > conftest.$ac_ext <<EOF
2640 #line 2641 "configure"
2641 #include "confdefs.h"
2642
2643 #               include <pthread.h>
2644                 /* this check could be improved */
2645 #               ifdef PTHREAD_ONCE_INIT
2646                         final
2647 #               endif
2648         
2649 EOF
2650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2651   egrep "final" >/dev/null 2>&1; then
2652   rm -rf conftest*
2653   ol_pthread_final=yes
2654 else
2655   rm -rf conftest*
2656   ol_pthread_final=no
2657 fi
2658 rm -f conftest*
2659
2660
2661         cat > conftest.$ac_ext <<EOF
2662 #line 2663 "configure"
2663 #include "confdefs.h"
2664
2665 #               include <pthread.h>
2666                 /* this check could be improved */
2667 #               ifdef pthread_once_init
2668                         draft4
2669 #               endif
2670         
2671 EOF
2672 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2673   egrep "draft4" >/dev/null 2>&1; then
2674   rm -rf conftest*
2675   ol_pthread_draft4=yes
2676 else
2677   rm -rf conftest*
2678   ol_pthread_draft4=no
2679 fi
2680 rm -f conftest*
2681
2682
2683         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
2684                 ol_cv_pthread_version=final
2685         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
2686                 ol_cv_pthread_version=draft4
2687         else
2688                 ol_cv_pthread_version=unknown
2689         fi
2690
2691 fi
2692
2693 echo "$ac_t""$ol_cv_pthread_version" 1>&6
2694
2695
2696                 if test $ol_cv_pthread_version = final ; then
2697                         cat >> confdefs.h <<\EOF
2698 #define HAVE_PTHREADS_FINAL 1
2699 EOF
2700
2701                 elif test $ol_cv_pthread_version = draft4 ; then
2702                         cat >> confdefs.h <<\EOF
2703 #define HAVE_PTHREADS_D4 1
2704 EOF
2705
2706                 else
2707                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
2708                 fi
2709
2710                 # consider threads found
2711                 ol_with_threads=found
2712
2713                 
2714 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
2715 echo "configure:2716: checking for LinuxThreads" >&5
2716 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
2717   echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719   
2720         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
2721         if test "$res" -gt 0 ; then
2722                 ol_cv_linux_threads=yes
2723         else
2724                 ol_cv_linux_threads=no
2725         fi
2726
2727 fi
2728
2729 echo "$ac_t""$ol_cv_linux_threads" 1>&6
2730
2731
2732                 if test $ol_cv_linux_threads = yes ; then
2733                         cat >> confdefs.h <<\EOF
2734 #define HAVE_LINUX_THREADS 1
2735 EOF
2736
2737                 fi
2738
2739                 
2740                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
2741 echo "configure:2742: checking for pthread_create" >&5
2742 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
2743   echo $ac_n "(cached) $ac_c" 1>&6
2744 else
2745   cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748 /* System header to define __stub macros and hopefully few prototypes,
2749     which can conflict with char pthread_create(); below.  */
2750 #include <assert.h>
2751 /* Override any gcc2 internal prototype to avoid an error.  */
2752 /* We use char because int might match the return type of a gcc2
2753     builtin and then its argument prototype would still apply.  */
2754 char pthread_create();
2755
2756 int main() {
2757
2758 /* The GNU C library defines this for functions which it implements
2759     to always fail with ENOSYS.  Some functions are actually named
2760     something starting with __ and the normal name is an alias.  */
2761 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
2762 choke me
2763 #else
2764 pthread_create();
2765 #endif
2766
2767 ; return 0; }
2768 EOF
2769 if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2770   rm -rf conftest*
2771   eval "ac_cv_func_pthread_create=yes"
2772 else
2773   echo "configure: failed program was:" >&5
2774   cat conftest.$ac_ext >&5
2775   rm -rf conftest*
2776   eval "ac_cv_func_pthread_create=no"
2777 fi
2778 rm -f conftest*
2779 fi
2780
2781 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
2782   echo "$ac_t""yes" 1>&6
2783   ol_link_threads=yes
2784 else
2785   echo "$ac_t""no" 1>&6
2786 fi
2787
2788
2789                 if test $ol_link_threads = no ; then
2790                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
2791 echo "configure:2792: checking for pthread_create with -pthread" >&5
2792 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   
2796                                                                 save_LIBS="$LIBS"
2797                                 LIBS="-pthread $LIBS"
2798                                 cat > conftest.$ac_ext <<EOF
2799 #line 2800 "configure"
2800 #include "confdefs.h"
2801 #include <pthread.h>
2802 int main() {
2803
2804                                         pthread_create((pthread_t*) 0,
2805                                                 (pthread_attr_t*) 0, 0, 0);
2806                                         
2807 ; return 0; }
2808 EOF
2809 if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2810   rm -rf conftest*
2811   ol_cv_pthread_flag=yes
2812 else
2813   echo "configure: failed program was:" >&5
2814   cat conftest.$ac_ext >&5
2815   rm -rf conftest*
2816   ol_cv_pthread_flag=no
2817 fi
2818 rm -f conftest*
2819                                                                 LIBS="$save_LIBS"
2820                         
2821 fi
2822
2823 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
2824
2825                         if test $ol_cv_pthread_flag = yes ; then
2826                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
2827                                 ol_link_threads=posix
2828                         fi
2829                 fi
2830
2831                 if test $ol_link_threads = no ; then
2832                                                 save_LIBS="$LIBS"
2833                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
2834 echo "configure:2835: checking for pthread_create in -lpthread" >&5
2835 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
2836 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2837   echo $ac_n "(cached) $ac_c" 1>&6
2838 else
2839   ac_save_LIBS="$LIBS"
2840 LIBS="-lpthread  $LIBS"
2841 cat > conftest.$ac_ext <<EOF
2842 #line 2843 "configure"
2843 #include "confdefs.h"
2844 /* Override any gcc2 internal prototype to avoid an error.  */
2845 /* We use char because int might match the return type of a gcc2
2846     builtin and then its argument prototype would still apply.  */
2847 char pthread_create();
2848
2849 int main() {
2850 pthread_create()
2851 ; return 0; }
2852 EOF
2853 if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2854   rm -rf conftest*
2855   eval "ac_cv_lib_$ac_lib_var=yes"
2856 else
2857   echo "configure: failed program was:" >&5
2858   cat conftest.$ac_ext >&5
2859   rm -rf conftest*
2860   eval "ac_cv_lib_$ac_lib_var=no"
2861 fi
2862 rm -f conftest*
2863 LIBS="$ac_save_LIBS"
2864
2865 fi
2866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2867   echo "$ac_t""yes" 1>&6
2868   
2869                                 ol_link_threads=posix
2870                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
2871 else
2872   echo "$ac_t""no" 1>&6
2873 fi
2874
2875                         LIBS="$save_LIBS"
2876                 fi
2877
2878                 if test $ol_link_threads = no ; then
2879                                                 save_LIBS="$LIBS"
2880                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
2881 echo "configure:2882: checking for pthread_create in -lc_r" >&5
2882 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2883 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2884   echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886   ac_save_LIBS="$LIBS"
2887 LIBS="-lc_r  $LIBS"
2888 cat > conftest.$ac_ext <<EOF
2889 #line 2890 "configure"
2890 #include "confdefs.h"
2891 /* Override any gcc2 internal prototype to avoid an error.  */
2892 /* We use char because int might match the return type of a gcc2
2893     builtin and then its argument prototype would still apply.  */
2894 char pthread_create();
2895
2896 int main() {
2897 pthread_create()
2898 ; return 0; }
2899 EOF
2900 if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2901   rm -rf conftest*
2902   eval "ac_cv_lib_$ac_lib_var=yes"
2903 else
2904   echo "configure: failed program was:" >&5
2905   cat conftest.$ac_ext >&5
2906   rm -rf conftest*
2907   eval "ac_cv_lib_$ac_lib_var=no"
2908 fi
2909 rm -f conftest*
2910 LIBS="$ac_save_LIBS"
2911
2912 fi
2913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2914   echo "$ac_t""yes" 1>&6
2915   
2916                                 ol_link_threads=posix
2917                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
2918 else
2919   echo "$ac_t""no" 1>&6
2920 fi
2921
2922                         LIBS="$save_LIBS"
2923                 fi
2924
2925                 if test $ol_link_threads = no ; then
2926                                                 save_LIBS="$LIBS"
2927                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
2928 echo "configure:2929: checking for pthread_create in -lpthread" >&5
2929 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
2930 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2931   echo $ac_n "(cached) $ac_c" 1>&6
2932 else
2933   ac_save_LIBS="$LIBS"
2934 LIBS="-lpthread -lmach -lexc -lc $LIBS"
2935 cat > conftest.$ac_ext <<EOF
2936 #line 2937 "configure"
2937 #include "confdefs.h"
2938 /* Override any gcc2 internal prototype to avoid an error.  */
2939 /* We use char because int might match the return type of a gcc2
2940     builtin and then its argument prototype would still apply.  */
2941 char pthread_create();
2942
2943 int main() {
2944 pthread_create()
2945 ; return 0; }
2946 EOF
2947 if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2948   rm -rf conftest*
2949   eval "ac_cv_lib_$ac_lib_var=yes"
2950 else
2951   echo "configure: failed program was:" >&5
2952   cat conftest.$ac_ext >&5
2953   rm -rf conftest*
2954   eval "ac_cv_lib_$ac_lib_var=no"
2955 fi
2956 rm -f conftest*
2957 LIBS="$ac_save_LIBS"
2958
2959 fi
2960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2961   echo "$ac_t""yes" 1>&6
2962   
2963                                 cat >> confdefs.h <<\EOF
2964 #define HAVE_DCE 1
2965 EOF
2966
2967                                 ol_link_threads=posix
2968                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"
2969                                 if test $ol_with_preemptive = auto ; then
2970                                         ol_with_preemptive=yes
2971                                 fi
2972                                 
2973 else
2974   echo "$ac_t""no" 1>&6
2975 fi
2976
2977                         LIBS="$save_LIBS"
2978                 fi
2979
2980                 if test $ol_link_threads != no ; then
2981                         cat >> confdefs.h <<\EOF
2982 #define HAVE_PTHREADS 1
2983 EOF
2984
2985
2986                                                 save_CPPFLAGS="$CPPFLAGS"
2987                         save_LIBS="$LIBS"
2988                         LIBS="$LTHREAD_LIBS $LIBS"
2989
2990                                                                                                 for ac_func in sched_yield pthread_yield
2991 do
2992 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2993 echo "configure:2994: checking for $ac_func" >&5
2994 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2995   echo $ac_n "(cached) $ac_c" 1>&6
2996 else
2997   cat > conftest.$ac_ext <<EOF
2998 #line 2999 "configure"
2999 #include "confdefs.h"
3000 /* System header to define __stub macros and hopefully few prototypes,
3001     which can conflict with char $ac_func(); below.  */
3002 #include <assert.h>
3003 /* Override any gcc2 internal prototype to avoid an error.  */
3004 /* We use char because int might match the return type of a gcc2
3005     builtin and then its argument prototype would still apply.  */
3006 char $ac_func();
3007
3008 int main() {
3009
3010 /* The GNU C library defines this for functions which it implements
3011     to always fail with ENOSYS.  Some functions are actually named
3012     something starting with __ and the normal name is an alias.  */
3013 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3014 choke me
3015 #else
3016 $ac_func();
3017 #endif
3018
3019 ; return 0; }
3020 EOF
3021 if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3022   rm -rf conftest*
3023   eval "ac_cv_func_$ac_func=yes"
3024 else
3025   echo "configure: failed program was:" >&5
3026   cat conftest.$ac_ext >&5
3027   rm -rf conftest*
3028   eval "ac_cv_func_$ac_func=no"
3029 fi
3030 rm -f conftest*
3031 fi
3032
3033 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3034   echo "$ac_t""yes" 1>&6
3035     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3036   cat >> confdefs.h <<EOF
3037 #define $ac_tr_func 1
3038 EOF
3039  
3040 else
3041   echo "$ac_t""no" 1>&6
3042 fi
3043 done
3044
3045
3046                         if test $ac_cv_func_sched_yield = no -a \
3047                                 $ac_cv_func_pthread_yield = no ; then
3048                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
3049 echo "configure:3050: checking for sched_yield in -lrt" >&5
3050 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
3051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   ac_save_LIBS="$LIBS"
3055 LIBS="-lrt  $LIBS"
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 /* Override any gcc2 internal prototype to avoid an error.  */
3060 /* We use char because int might match the return type of a gcc2
3061     builtin and then its argument prototype would still apply.  */
3062 char sched_yield();
3063
3064 int main() {
3065 sched_yield()
3066 ; return 0; }
3067 EOF
3068 if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3069   rm -rf conftest*
3070   eval "ac_cv_lib_$ac_lib_var=yes"
3071 else
3072   echo "configure: failed program was:" >&5
3073   cat conftest.$ac_ext >&5
3074   rm -rf conftest*
3075   eval "ac_cv_lib_$ac_lib_var=no"
3076 fi
3077 rm -f conftest*
3078 LIBS="$ac_save_LIBS"
3079
3080 fi
3081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3082   echo "$ac_t""yes" 1>&6
3083   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
3084                                         cat >> confdefs.h <<\EOF
3085 #define HAVE_SCHED_YIELD 1
3086 EOF
3087
3088                                         ac_cv_func_sched_yield=yes
3089 else
3090   echo "$ac_t""no" 1>&6
3091 ac_cv_func_sched_yield=no
3092 fi
3093
3094                         fi
3095                         if test $ac_cv_func_sched_yield = no -a \
3096                                 $ac_cv_func_pthread_yield = no ; then
3097                                                                 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
3098 echo "configure:3099: checking for sched_yield in -lposix4" >&5
3099 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
3100 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3101   echo $ac_n "(cached) $ac_c" 1>&6
3102 else
3103   ac_save_LIBS="$LIBS"
3104 LIBS="-lposix4  $LIBS"
3105 cat > conftest.$ac_ext <<EOF
3106 #line 3107 "configure"
3107 #include "confdefs.h"
3108 /* Override any gcc2 internal prototype to avoid an error.  */
3109 /* We use char because int might match the return type of a gcc2
3110     builtin and then its argument prototype would still apply.  */
3111 char sched_yield();
3112
3113 int main() {
3114 sched_yield()
3115 ; return 0; }
3116 EOF
3117 if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3118   rm -rf conftest*
3119   eval "ac_cv_lib_$ac_lib_var=yes"
3120 else
3121   echo "configure: failed program was:" >&5
3122   cat conftest.$ac_ext >&5
3123   rm -rf conftest*
3124   eval "ac_cv_lib_$ac_lib_var=no"
3125 fi
3126 rm -f conftest*
3127 LIBS="$ac_save_LIBS"
3128
3129 fi
3130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3131   echo "$ac_t""yes" 1>&6
3132   LTHREAD_LIBS="$LTHREAD_LIBS -lposix4"
3133                                         cat >> confdefs.h <<\EOF
3134 #define HAVE_SCHED_YIELD 1
3135 EOF
3136
3137                                         ac_cv_func_sched_yield=yes
3138 else
3139   echo "$ac_t""no" 1>&6
3140 ac_cv_func_sched_yield=no
3141 fi
3142
3143                         fi
3144                         if test $ac_cv_func_sched_yield = no -a \
3145                                 $ac_cv_func_pthread_yield = no ; then
3146                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
3147                                 { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; }
3148                         fi
3149
3150                                                 for ac_func in pthread_kill
3151 do
3152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3153 echo "configure:3154: checking for $ac_func" >&5
3154 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3155   echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157   cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 /* System header to define __stub macros and hopefully few prototypes,
3161     which can conflict with char $ac_func(); below.  */
3162 #include <assert.h>
3163 /* Override any gcc2 internal prototype to avoid an error.  */
3164 /* We use char because int might match the return type of a gcc2
3165     builtin and then its argument prototype would still apply.  */
3166 char $ac_func();
3167
3168 int main() {
3169
3170 /* The GNU C library defines this for functions which it implements
3171     to always fail with ENOSYS.  Some functions are actually named
3172     something starting with __ and the normal name is an alias.  */
3173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3174 choke me
3175 #else
3176 $ac_func();
3177 #endif
3178
3179 ; return 0; }
3180 EOF
3181 if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3182   rm -rf conftest*
3183   eval "ac_cv_func_$ac_func=yes"
3184 else
3185   echo "configure: failed program was:" >&5
3186   cat conftest.$ac_ext >&5
3187   rm -rf conftest*
3188   eval "ac_cv_func_$ac_func=no"
3189 fi
3190 rm -f conftest*
3191 fi
3192
3193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3194   echo "$ac_t""yes" 1>&6
3195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3196   cat >> confdefs.h <<EOF
3197 #define $ac_tr_func 1
3198 EOF
3199  
3200 else
3201   echo "$ac_t""no" 1>&6
3202 fi
3203 done
3204
3205
3206                                                 for ac_func in \
3207                                 pthread_setconcurrency \
3208                                 thr_setconcurrency \
3209                         
3210 do
3211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3212 echo "configure:3213: checking for $ac_func" >&5
3213 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3219 /* System header to define __stub macros and hopefully few prototypes,
3220     which can conflict with char $ac_func(); below.  */
3221 #include <assert.h>
3222 /* Override any gcc2 internal prototype to avoid an error.  */
3223 /* We use char because int might match the return type of a gcc2
3224     builtin and then its argument prototype would still apply.  */
3225 char $ac_func();
3226
3227 int main() {
3228
3229 /* The GNU C library defines this for functions which it implements
3230     to always fail with ENOSYS.  Some functions are actually named
3231     something starting with __ and the normal name is an alias.  */
3232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3233 choke me
3234 #else
3235 $ac_func();
3236 #endif
3237
3238 ; return 0; }
3239 EOF
3240 if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3241   rm -rf conftest*
3242   eval "ac_cv_func_$ac_func=yes"
3243 else
3244   echo "configure: failed program was:" >&5
3245   cat conftest.$ac_ext >&5
3246   rm -rf conftest*
3247   eval "ac_cv_func_$ac_func=no"
3248 fi
3249 rm -f conftest*
3250 fi
3251
3252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3253   echo "$ac_t""yes" 1>&6
3254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3255   cat >> confdefs.h <<EOF
3256 #define $ac_tr_func 1
3257 EOF
3258  
3259 else
3260   echo "$ac_t""no" 1>&6
3261 fi
3262 done
3263
3264
3265                                                 if test $ol_with_preemptive = auto ; then
3266                                 echo $ac_n "checking for preemptive Pthread implementation""... $ac_c" 1>&6
3267 echo "configure:3268: checking for preemptive Pthread implementation" >&5
3268                                 if test "$cross_compiling" = yes; then
3269   
3270                                 { echo "configure: error: crossing compiling: use --with-preemptive=yes|no|manual" 1>&2; exit 1; }
3271 else
3272   cat > conftest.$ac_ext <<EOF
3273 #line 3274 "configure"
3274 #include "confdefs.h"
3275
3276 #include <sys/types.h>
3277 #include <sys/time.h>
3278 #include <unistd.h>
3279 #include <pthread.h>
3280 #ifndef NULL
3281 #define NULL 0
3282 #endif
3283
3284 int task(arg)
3285         int *arg;
3286 {
3287         struct timeval tv;
3288
3289         tv.tv_sec=4;
3290         tv.tv_usec=0;
3291         select(0, NULL, NULL, NULL, &tv);
3292
3293         tv.tv_sec=6;
3294         tv.tv_usec=0;
3295         select(0, NULL, NULL, NULL, &tv);
3296
3297         exit(1); /* if we exit here, the select blocked the whole process */
3298 }
3299
3300 main(argc, argv)
3301 int argc; char **argv;
3302 {
3303         pthread_t t;
3304
3305 #ifdef HAVE_PTHREAD_SETCONCURRENCY
3306         (void) pthread_setconcurrency(2);
3307 #elif HAVE_THR_SETCONCURRENCY
3308         /* Set Solaris LWP concurrency to 2 */
3309         thr_setconcurrency(2);
3310 #endif
3311
3312         pthread_create(&t, NULL, (void *) task, NULL);
3313
3314 #if HAVE_SCHED_YIELD
3315         sched_yield();  /* make sure task runs first */
3316 #else
3317 #if defined(HAVE_PTHREAD_YIELD)
3318         pthread_yield();        /* make sure task runs first */
3319 #endif
3320 #endif
3321         exit(0);
3322 }
3323                                 
3324 EOF
3325 if { (eval echo configure:3326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3326 then
3327   ol_pthread_preemptive=yes
3328 else
3329   echo "configure: failed program was:" >&5
3330   cat conftest.$ac_ext >&5
3331   rm -fr conftest*
3332   ol_pthread_preemptive=no
3333 fi
3334 rm -fr conftest*
3335 fi
3336
3337                                 echo "$ac_t""$ol_pthread_preemptive" 1>&6
3338
3339                                 if test $ol_pthread_preemptive = yes ; then
3340                                         cat >> confdefs.h <<\EOF
3341 #define HAVE_PREEMPTIVE_PTHREADS 1
3342 EOF
3343
3344                                         ol_with_preemptive=yes
3345                                 fi
3346                         fi
3347
3348
3349                                                 CPPFLAGS="$save_CPPFLAGS"
3350                         LIBS="$save_LIBS"
3351                 else
3352                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
3353                 fi
3354         fi
3355
3356         if test $ol_with_threads = posix ; then
3357                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
3358         fi
3359 fi
3360
3361 if test $ol_with_threads = auto -o $ol_with_threads = mach ; then
3362                 for ac_hdr in mach/cthreads.h
3363 do
3364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3366 echo "configure:3367: checking for $ac_hdr" >&5
3367 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3368   echo $ac_n "(cached) $ac_c" 1>&6
3369 else
3370   cat > conftest.$ac_ext <<EOF
3371 #line 3372 "configure"
3372 #include "confdefs.h"
3373 #include <$ac_hdr>
3374 EOF
3375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3376 { (eval echo configure:3377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3377 ac_err=`grep -v '^ *+' conftest.out`
3378 if test -z "$ac_err"; then
3379   rm -rf conftest*
3380   eval "ac_cv_header_$ac_safe=yes"
3381 else
3382   echo "$ac_err" >&5
3383   echo "configure: failed program was:" >&5
3384   cat conftest.$ac_ext >&5
3385   rm -rf conftest*
3386   eval "ac_cv_header_$ac_safe=no"
3387 fi
3388 rm -f conftest*
3389 fi
3390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3391   echo "$ac_t""yes" 1>&6
3392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3393   cat >> confdefs.h <<EOF
3394 #define $ac_tr_hdr 1
3395 EOF
3396  
3397 else
3398   echo "$ac_t""no" 1>&6
3399 fi
3400 done
3401
3402         if test $ac_cv_header_mach_cthreads_h = yes ; then
3403                 ol_with_threads=found
3404
3405                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
3406 echo "configure:3407: checking for cthread_fork" >&5
3407 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+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 /* System header to define __stub macros and hopefully few prototypes,
3414     which can conflict with char cthread_fork(); below.  */
3415 #include <assert.h>
3416 /* Override any gcc2 internal prototype to avoid an error.  */
3417 /* We use char because int might match the return type of a gcc2
3418     builtin and then its argument prototype would still apply.  */
3419 char cthread_fork();
3420
3421 int main() {
3422
3423 /* The GNU C library defines this for functions which it implements
3424     to always fail with ENOSYS.  Some functions are actually named
3425     something starting with __ and the normal name is an alias.  */
3426 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
3427 choke me
3428 #else
3429 cthread_fork();
3430 #endif
3431
3432 ; return 0; }
3433 EOF
3434 if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3435   rm -rf conftest*
3436   eval "ac_cv_func_cthread_fork=yes"
3437 else
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   eval "ac_cv_func_cthread_fork=no"
3442 fi
3443 rm -f conftest*
3444 fi
3445
3446 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
3447   echo "$ac_t""yes" 1>&6
3448   ol_link_threads=yes
3449 else
3450   echo "$ac_t""no" 1>&6
3451 fi
3452
3453
3454                 if test $ol_link_threads = no ; then
3455                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
3456 echo "configure:3457: checking for cthread_fork with -all_load" >&5
3457 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   
3461                                                                 save_LIBS="$LIBS"
3462                                 LIBS="-all_load $LIBS"
3463                                 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 #include <mach/cthreads.h>
3467 int main() {
3468
3469                                         cthread_fork((void *)0, (void *)0);
3470                                         
3471 ; return 0; }
3472 EOF
3473 if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3474   rm -rf conftest*
3475   ol_cv_cthread_all_load=yes
3476 else
3477   echo "configure: failed program was:" >&5
3478   cat conftest.$ac_ext >&5
3479   rm -rf conftest*
3480   ol_cv_cthread_all_load=no
3481 fi
3482 rm -f conftest*
3483                                                                 LIBS="$save_LIBS"
3484                         
3485 fi
3486
3487 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
3488
3489                         if test $ol_cv_cthread_all_load = yes ; then
3490                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
3491                                 ol_link_threads=mach
3492                         fi
3493                 fi
3494
3495                 if test $ol_link_threads != no ; then
3496                         : check for cthread specific functionality here
3497                 else
3498                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
3499                 fi
3500         fi
3501
3502         if test $ol_with_threads = mach ; then
3503                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
3504         fi
3505 fi
3506
3507 if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then
3508                 for ac_hdr in thread.h synch.h
3509 do
3510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3512 echo "configure:3513: checking for $ac_hdr" >&5
3513 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3514   echo $ac_n "(cached) $ac_c" 1>&6
3515 else
3516   cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 #include <$ac_hdr>
3520 EOF
3521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3522 { (eval echo configure:3523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3523 ac_err=`grep -v '^ *+' conftest.out`
3524 if test -z "$ac_err"; then
3525   rm -rf conftest*
3526   eval "ac_cv_header_$ac_safe=yes"
3527 else
3528   echo "$ac_err" >&5
3529   echo "configure: failed program was:" >&5
3530   cat conftest.$ac_ext >&5
3531   rm -rf conftest*
3532   eval "ac_cv_header_$ac_safe=no"
3533 fi
3534 rm -f conftest*
3535 fi
3536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3537   echo "$ac_t""yes" 1>&6
3538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3539   cat >> confdefs.h <<EOF
3540 #define $ac_tr_hdr 1
3541 EOF
3542  
3543 else
3544   echo "$ac_t""no" 1>&6
3545 fi
3546 done
3547
3548         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
3549                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
3550 echo "configure:3551: checking for thr_create in -lthread" >&5
3551 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
3552 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555   ac_save_LIBS="$LIBS"
3556 LIBS="-lthread  $LIBS"
3557 cat > conftest.$ac_ext <<EOF
3558 #line 3559 "configure"
3559 #include "confdefs.h"
3560 /* Override any gcc2 internal prototype to avoid an error.  */
3561 /* We use char because int might match the return type of a gcc2
3562     builtin and then its argument prototype would still apply.  */
3563 char thr_create();
3564
3565 int main() {
3566 thr_create()
3567 ; return 0; }
3568 EOF
3569 if { (eval echo configure:3570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3570   rm -rf conftest*
3571   eval "ac_cv_lib_$ac_lib_var=yes"
3572 else
3573   echo "configure: failed program was:" >&5
3574   cat conftest.$ac_ext >&5
3575   rm -rf conftest*
3576   eval "ac_cv_lib_$ac_lib_var=no"
3577 fi
3578 rm -f conftest*
3579 LIBS="$ac_save_LIBS"
3580
3581 fi
3582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3583   echo "$ac_t""yes" 1>&6
3584   have_lwp=yes
3585 else
3586   echo "$ac_t""no" 1>&6
3587 have_lwp=no
3588 fi
3589
3590
3591                 if test $have_lwp = yes ; then
3592                         cat >> confdefs.h <<\EOF
3593 #define HAVE_THR 1
3594 EOF
3595
3596                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
3597
3598                         if test $ol_with_preemptive = auto ; then
3599                                 ol_with_preemptive=yes
3600                         fi
3601                 fi
3602         fi
3603
3604                 for ac_hdr in lwp/lwp.h
3605 do
3606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3608 echo "configure:3609: checking for $ac_hdr" >&5
3609 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612   cat > conftest.$ac_ext <<EOF
3613 #line 3614 "configure"
3614 #include "confdefs.h"
3615 #include <$ac_hdr>
3616 EOF
3617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3618 { (eval echo configure:3619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3619 ac_err=`grep -v '^ *+' conftest.out`
3620 if test -z "$ac_err"; then
3621   rm -rf conftest*
3622   eval "ac_cv_header_$ac_safe=yes"
3623 else
3624   echo "$ac_err" >&5
3625   echo "configure: failed program was:" >&5
3626   cat conftest.$ac_ext >&5
3627   rm -rf conftest*
3628   eval "ac_cv_header_$ac_safe=no"
3629 fi
3630 rm -f conftest*
3631 fi
3632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3633   echo "$ac_t""yes" 1>&6
3634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3635   cat >> confdefs.h <<EOF
3636 #define $ac_tr_hdr 1
3637 EOF
3638  
3639 else
3640   echo "$ac_t""no" 1>&6
3641 fi
3642 done
3643
3644         if test $ac_cv_header_lwp_lwp_h = yes ; then
3645                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
3646 echo "configure:3647: checking for lwp_create in -llwp" >&5
3647 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
3648 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3649   echo $ac_n "(cached) $ac_c" 1>&6
3650 else
3651   ac_save_LIBS="$LIBS"
3652 LIBS="-llwp  $LIBS"
3653 cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 /* Override any gcc2 internal prototype to avoid an error.  */
3657 /* We use char because int might match the return type of a gcc2
3658     builtin and then its argument prototype would still apply.  */
3659 char lwp_create();
3660
3661 int main() {
3662 lwp_create()
3663 ; return 0; }
3664 EOF
3665 if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3666   rm -rf conftest*
3667   eval "ac_cv_lib_$ac_lib_var=yes"
3668 else
3669   echo "configure: failed program was:" >&5
3670   cat conftest.$ac_ext >&5
3671   rm -rf conftest*
3672   eval "ac_cv_lib_$ac_lib_var=no"
3673 fi
3674 rm -f conftest*
3675 LIBS="$ac_save_LIBS"
3676
3677 fi
3678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3679   echo "$ac_t""yes" 1>&6
3680   have_lwp=yes
3681 else
3682   echo "$ac_t""no" 1>&6
3683 have_lwp=no
3684 fi
3685
3686
3687                 if test $have_lwp = yes ; then
3688                         cat >> confdefs.h <<\EOF
3689 #define HAVE_LWP 1
3690 EOF
3691
3692                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
3693
3694                         if test $ol_with_preemptive = auto ; then
3695                                 ol_with_preemptive=no
3696                         fi
3697                 fi
3698         fi
3699 fi
3700
3701 if test $ol_with_preemptive = yes ; then
3702         cat >> confdefs.h <<\EOF
3703 #define PREEMPTIVE_THREADS 1
3704 EOF
3705
3706 fi
3707
3708 if test $ol_with_threads = manual ; then
3709                 ol_link_threads=yes
3710
3711         echo "configure: warning: thread defines and link options must be set manually" 1>&2
3712
3713         for ac_hdr in pthread.h sched.h
3714 do
3715 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3716 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3717 echo "configure:3718: checking for $ac_hdr" >&5
3718 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3719   echo $ac_n "(cached) $ac_c" 1>&6
3720 else
3721   cat > conftest.$ac_ext <<EOF
3722 #line 3723 "configure"
3723 #include "confdefs.h"
3724 #include <$ac_hdr>
3725 EOF
3726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3727 { (eval echo configure:3728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3728 ac_err=`grep -v '^ *+' conftest.out`
3729 if test -z "$ac_err"; then
3730   rm -rf conftest*
3731   eval "ac_cv_header_$ac_safe=yes"
3732 else
3733   echo "$ac_err" >&5
3734   echo "configure: failed program was:" >&5
3735   cat conftest.$ac_ext >&5
3736   rm -rf conftest*
3737   eval "ac_cv_header_$ac_safe=no"
3738 fi
3739 rm -f conftest*
3740 fi
3741 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3742   echo "$ac_t""yes" 1>&6
3743     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3744   cat >> confdefs.h <<EOF
3745 #define $ac_tr_hdr 1
3746 EOF
3747  
3748 else
3749   echo "$ac_t""no" 1>&6
3750 fi
3751 done
3752
3753         for ac_func in sched_yield pthread_yield
3754 do
3755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3756 echo "configure:3757: checking for $ac_func" >&5
3757 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763 /* System header to define __stub macros and hopefully few prototypes,
3764     which can conflict with char $ac_func(); below.  */
3765 #include <assert.h>
3766 /* Override any gcc2 internal prototype to avoid an error.  */
3767 /* We use char because int might match the return type of a gcc2
3768     builtin and then its argument prototype would still apply.  */
3769 char $ac_func();
3770
3771 int main() {
3772
3773 /* The GNU C library defines this for functions which it implements
3774     to always fail with ENOSYS.  Some functions are actually named
3775     something starting with __ and the normal name is an alias.  */
3776 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3777 choke me
3778 #else
3779 $ac_func();
3780 #endif
3781
3782 ; return 0; }
3783 EOF
3784 if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3785   rm -rf conftest*
3786   eval "ac_cv_func_$ac_func=yes"
3787 else
3788   echo "configure: failed program was:" >&5
3789   cat conftest.$ac_ext >&5
3790   rm -rf conftest*
3791   eval "ac_cv_func_$ac_func=no"
3792 fi
3793 rm -f conftest*
3794 fi
3795
3796 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3797   echo "$ac_t""yes" 1>&6
3798     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3799   cat >> confdefs.h <<EOF
3800 #define $ac_tr_func 1
3801 EOF
3802  
3803 else
3804   echo "$ac_t""no" 1>&6
3805 fi
3806 done
3807
3808         
3809 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
3810 echo "configure:3811: checking for LinuxThreads" >&5
3811 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   
3815         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
3816         if test "$res" -gt 0 ; then
3817                 ol_cv_linux_threads=yes
3818         else
3819                 ol_cv_linux_threads=no
3820         fi
3821
3822 fi
3823
3824 echo "$ac_t""$ol_cv_linux_threads" 1>&6
3825
3826
3827         for ac_hdr in mach/cthreads.h
3828 do
3829 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3830 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3831 echo "configure:3832: checking for $ac_hdr" >&5
3832 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3833   echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3835   cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 #include <$ac_hdr>
3839 EOF
3840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3841 { (eval echo configure:3842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3842 ac_err=`grep -v '^ *+' conftest.out`
3843 if test -z "$ac_err"; then
3844   rm -rf conftest*
3845   eval "ac_cv_header_$ac_safe=yes"
3846 else
3847   echo "$ac_err" >&5
3848   echo "configure: failed program was:" >&5
3849   cat conftest.$ac_ext >&5
3850   rm -rf conftest*
3851   eval "ac_cv_header_$ac_safe=no"
3852 fi
3853 rm -f conftest*
3854 fi
3855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3856   echo "$ac_t""yes" 1>&6
3857     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3858   cat >> confdefs.h <<EOF
3859 #define $ac_tr_hdr 1
3860 EOF
3861  
3862 else
3863   echo "$ac_t""no" 1>&6
3864 fi
3865 done
3866
3867         for ac_hdr in lwp/lwp.h
3868 do
3869 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3870 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3871 echo "configure:3872: checking for $ac_hdr" >&5
3872 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3873   echo $ac_n "(cached) $ac_c" 1>&6
3874 else
3875   cat > conftest.$ac_ext <<EOF
3876 #line 3877 "configure"
3877 #include "confdefs.h"
3878 #include <$ac_hdr>
3879 EOF
3880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3881 { (eval echo configure:3882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3882 ac_err=`grep -v '^ *+' conftest.out`
3883 if test -z "$ac_err"; then
3884   rm -rf conftest*
3885   eval "ac_cv_header_$ac_safe=yes"
3886 else
3887   echo "$ac_err" >&5
3888   echo "configure: failed program was:" >&5
3889   cat conftest.$ac_ext >&5
3890   rm -rf conftest*
3891   eval "ac_cv_header_$ac_safe=no"
3892 fi
3893 rm -f conftest*
3894 fi
3895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3896   echo "$ac_t""yes" 1>&6
3897     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3898   cat >> confdefs.h <<EOF
3899 #define $ac_tr_hdr 1
3900 EOF
3901  
3902 else
3903   echo "$ac_t""no" 1>&6
3904 fi
3905 done
3906
3907         for ac_hdr in thread.h synch.h
3908 do
3909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3911 echo "configure:3912: checking for $ac_hdr" >&5
3912 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3913   echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915   cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918 #include <$ac_hdr>
3919 EOF
3920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3921 { (eval echo configure:3922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3922 ac_err=`grep -v '^ *+' conftest.out`
3923 if test -z "$ac_err"; then
3924   rm -rf conftest*
3925   eval "ac_cv_header_$ac_safe=yes"
3926 else
3927   echo "$ac_err" >&5
3928   echo "configure: failed program was:" >&5
3929   cat conftest.$ac_ext >&5
3930   rm -rf conftest*
3931   eval "ac_cv_header_$ac_safe=no"
3932 fi
3933 rm -f conftest*
3934 fi
3935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3936   echo "$ac_t""yes" 1>&6
3937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3938   cat >> confdefs.h <<EOF
3939 #define $ac_tr_hdr 1
3940 EOF
3941  
3942 else
3943   echo "$ac_t""no" 1>&6
3944 fi
3945 done
3946
3947 fi
3948
3949 if test $ol_with_threads = yes ; then
3950                                                 cat >> confdefs.h <<\EOF
3951 #define _REENTRANT 1
3952 EOF
3953
3954         cat >> confdefs.h <<\EOF
3955 #define _THREAD_SAFE 1
3956 EOF
3957
3958 fi
3959
3960
3961 if test $ol_link_threads = no ; then
3962         if test $ol_with_threads = yes ; then
3963                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
3964         fi
3965
3966         if test $ol_with_threads = auto ; then
3967                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
3968                 ol_with_threads=no
3969         fi
3970
3971         cat >> confdefs.h <<\EOF
3972 #define NO_THREADS 1
3973 EOF
3974
3975         cat >> confdefs.h <<\EOF
3976 #define PREEMPTIVE_THREADS 1
3977 EOF
3978
3979         LTHREAD_LIBS=""
3980 fi
3981
3982 ol_link_ldbm=no 
3983 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
3984         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
3985 echo "configure:3986: checking for DB2 library" >&5
3986 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
3987   echo $ac_n "(cached) $ac_c" 1>&6
3988 else
3989         ol_LIBS="$LIBS"
3990         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
3991 echo "configure:3992: checking for db_open in -ldb" >&5
3992 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
3993 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   ac_save_LIBS="$LIBS"
3997 LIBS="-ldb  $LIBS"
3998 cat > conftest.$ac_ext <<EOF
3999 #line 4000 "configure"
4000 #include "confdefs.h"
4001 /* Override any gcc2 internal prototype to avoid an error.  */
4002 /* We use char because int might match the return type of a gcc2
4003     builtin and then its argument prototype would still apply.  */
4004 char db_open();
4005
4006 int main() {
4007 db_open()
4008 ; return 0; }
4009 EOF
4010 if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4011   rm -rf conftest*
4012   eval "ac_cv_lib_$ac_lib_var=yes"
4013 else
4014   echo "configure: failed program was:" >&5
4015   cat conftest.$ac_ext >&5
4016   rm -rf conftest*
4017   eval "ac_cv_lib_$ac_lib_var=no"
4018 fi
4019 rm -f conftest*
4020 LIBS="$ac_save_LIBS"
4021
4022 fi
4023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4024   echo "$ac_t""yes" 1>&6
4025   ol_cv_lib_db2=-ldb
4026 else
4027   echo "$ac_t""no" 1>&6
4028 ol_cv_lib_db2=no
4029 fi
4030
4031         LIBS="$ol_LIBS"
4032
4033 fi
4034
4035 echo "$ac_t""$ol_cv_lib_db2" 1>&6
4036
4037 for ac_hdr in db.h
4038 do
4039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4041 echo "configure:4042: checking for $ac_hdr" >&5
4042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4043   echo $ac_n "(cached) $ac_c" 1>&6
4044 else
4045   cat > conftest.$ac_ext <<EOF
4046 #line 4047 "configure"
4047 #include "confdefs.h"
4048 #include <$ac_hdr>
4049 EOF
4050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4051 { (eval echo configure:4052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4052 ac_err=`grep -v '^ *+' conftest.out`
4053 if test -z "$ac_err"; then
4054   rm -rf conftest*
4055   eval "ac_cv_header_$ac_safe=yes"
4056 else
4057   echo "$ac_err" >&5
4058   echo "configure: failed program was:" >&5
4059   cat conftest.$ac_ext >&5
4060   rm -rf conftest*
4061   eval "ac_cv_header_$ac_safe=no"
4062 fi
4063 rm -f conftest*
4064 fi
4065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4066   echo "$ac_t""yes" 1>&6
4067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4068   cat >> confdefs.h <<EOF
4069 #define $ac_tr_hdr 1
4070 EOF
4071  
4072 else
4073   echo "$ac_t""no" 1>&6
4074 fi
4075 done
4076
4077 if test $ac_cv_header_db_h = yes ; then
4078         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
4079 echo "configure:4080: checking if db.h is DB2" >&5
4080 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
4081   echo $ac_n "(cached) $ac_c" 1>&6
4082 else
4083   
4084                 cat > conftest.$ac_ext <<EOF
4085 #line 4086 "configure"
4086 #include "confdefs.h"
4087
4088 #                       include <db.h>
4089                         /* this check could be improved */
4090 #                       ifdef DB_VERSION_MAJOR
4091 #                               if DB_VERSION_MAJOR == 2
4092                                         __db_version_2
4093 #                               endif
4094 #                       endif
4095                 
4096 EOF
4097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4098   egrep "__db_version_2" >/dev/null 2>&1; then
4099   rm -rf conftest*
4100   ol_cv_header_db2=yes
4101 else
4102   rm -rf conftest*
4103   ol_cv_header_db2=no
4104 fi
4105 rm -f conftest*
4106
4107 fi
4108
4109 echo "$ac_t""$ol_cv_header_db2" 1>&6
4110 else
4111         ol_cv_header_db2=no
4112 fi
4113
4114
4115  
4116  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
4117 echo "configure:4118: checking for Berkeley DB2" >&5
4118 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
4119   echo $ac_n "(cached) $ac_c" 1>&6
4120 else
4121   
4122         if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then
4123                 ol_cv_berkeley_db2=no
4124         else
4125                 ol_cv_berkeley_db2=yes
4126         fi
4127
4128 fi
4129
4130 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
4131  if test $ol_cv_berkeley_db2 = yes ; then
4132         cat >> confdefs.h <<\EOF
4133 #define HAVE_BERKELEY_DB2 1
4134 EOF
4135
4136  fi
4137
4138
4139         if test $ol_cv_berkeley_db2 = yes ; then
4140                 ol_link_ldbm=db2
4141                 ol_with_ldbm_api=db2
4142
4143                 if test $ol_with_ldbm_type = hash ; then
4144                         cat >> confdefs.h <<\EOF
4145 #define LDBM_USE_DBHASH 1
4146 EOF
4147
4148                 else
4149                         cat >> confdefs.h <<\EOF
4150 #define LDBM_USE_DBBTREE 1
4151 EOF
4152
4153                 fi
4154
4155                                                 if test $ol_cv_lib_db2 != yes ; then
4156                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
4157                 fi
4158         fi
4159 fi
4160
4161 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
4162         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
4163 echo "configure:4164: checking for Berkeley DB library" >&5
4164 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
4165   echo $ac_n "(cached) $ac_c" 1>&6
4166 else
4167         ol_LIBS="$LIBS"
4168         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
4169 echo "configure:4170: checking for dbopen" >&5
4170 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
4171   echo $ac_n "(cached) $ac_c" 1>&6
4172 else
4173   cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 /* System header to define __stub macros and hopefully few prototypes,
4177     which can conflict with char dbopen(); below.  */
4178 #include <assert.h>
4179 /* Override any gcc2 internal prototype to avoid an error.  */
4180 /* We use char because int might match the return type of a gcc2
4181     builtin and then its argument prototype would still apply.  */
4182 char dbopen();
4183
4184 int main() {
4185
4186 /* The GNU C library defines this for functions which it implements
4187     to always fail with ENOSYS.  Some functions are actually named
4188     something starting with __ and the normal name is an alias.  */
4189 #if defined (__stub_dbopen) || defined (__stub___dbopen)
4190 choke me
4191 #else
4192 dbopen();
4193 #endif
4194
4195 ; return 0; }
4196 EOF
4197 if { (eval echo configure:4198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4198   rm -rf conftest*
4199   eval "ac_cv_func_dbopen=yes"
4200 else
4201   echo "configure: failed program was:" >&5
4202   cat conftest.$ac_ext >&5
4203   rm -rf conftest*
4204   eval "ac_cv_func_dbopen=no"
4205 fi
4206 rm -f conftest*
4207 fi
4208
4209 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
4210   echo "$ac_t""yes" 1>&6
4211   ol_cv_lib_db=yes
4212 else
4213   echo "$ac_t""no" 1>&6
4214
4215                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
4216 echo "configure:4217: checking for dbopen in -ldb" >&5
4217 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
4218 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4219   echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221   ac_save_LIBS="$LIBS"
4222 LIBS="-ldb  $LIBS"
4223 cat > conftest.$ac_ext <<EOF
4224 #line 4225 "configure"
4225 #include "confdefs.h"
4226 /* Override any gcc2 internal prototype to avoid an error.  */
4227 /* We use char because int might match the return type of a gcc2
4228     builtin and then its argument prototype would still apply.  */
4229 char dbopen();
4230
4231 int main() {
4232 dbopen()
4233 ; return 0; }
4234 EOF
4235 if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4236   rm -rf conftest*
4237   eval "ac_cv_lib_$ac_lib_var=yes"
4238 else
4239   echo "configure: failed program was:" >&5
4240   cat conftest.$ac_ext >&5
4241   rm -rf conftest*
4242   eval "ac_cv_lib_$ac_lib_var=no"
4243 fi
4244 rm -f conftest*
4245 LIBS="$ac_save_LIBS"
4246
4247 fi
4248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4249   echo "$ac_t""yes" 1>&6
4250   ol_cv_lib_db=-ldb
4251 else
4252   echo "$ac_t""no" 1>&6
4253 ol_cv_lib_db=no
4254 fi
4255
4256         
4257 fi
4258
4259         LIBS="$ol_LIBS"
4260
4261 fi
4262
4263 echo "$ac_t""$ol_cv_lib_db" 1>&6
4264
4265
4266 for ac_hdr in db_185.h
4267 do
4268 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4269 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4270 echo "configure:4271: checking for $ac_hdr" >&5
4271 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4272   echo $ac_n "(cached) $ac_c" 1>&6
4273 else
4274   cat > conftest.$ac_ext <<EOF
4275 #line 4276 "configure"
4276 #include "confdefs.h"
4277 #include <$ac_hdr>
4278 EOF
4279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4280 { (eval echo configure:4281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4281 ac_err=`grep -v '^ *+' conftest.out`
4282 if test -z "$ac_err"; then
4283   rm -rf conftest*
4284   eval "ac_cv_header_$ac_safe=yes"
4285 else
4286   echo "$ac_err" >&5
4287   echo "configure: failed program was:" >&5
4288   cat conftest.$ac_ext >&5
4289   rm -rf conftest*
4290   eval "ac_cv_header_$ac_safe=no"
4291 fi
4292 rm -f conftest*
4293 fi
4294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4295   echo "$ac_t""yes" 1>&6
4296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4297   cat >> confdefs.h <<EOF
4298 #define $ac_tr_hdr 1
4299 EOF
4300  
4301 else
4302   echo "$ac_t""no" 1>&6
4303 fi
4304 done
4305
4306 if test $ol_cv_header_db2 = yes ; then
4307         
4308         ol_cv_header_db=$ac_cv_header_db_185_h
4309 else
4310         ol_cv_header_db=$ac_cv_header_db_h
4311 fi
4312
4313
4314  
4315  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
4316 echo "configure:4317: checking for Berkeley DB" >&5
4317 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   
4321         if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then
4322                 ol_cv_berkeley_db=no
4323         else
4324                 ol_cv_berkeley_db=yes
4325         fi
4326
4327 fi
4328
4329 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
4330  if test $ol_cv_berkeley_db = yes ; then
4331         cat >> confdefs.h <<\EOF
4332 #define HAVE_BERKELEY_DB 1
4333 EOF
4334
4335  fi
4336
4337
4338         if test $ol_cv_berkeley_db = yes ; then
4339                 ol_link_ldbm=db
4340                 ol_with_ldbm_api=db
4341
4342                 if test $ol_with_ldbm_type = hash ; then
4343                         cat >> confdefs.h <<\EOF
4344 #define LDBM_USE_DBHASH 1
4345 EOF
4346
4347                 else
4348                         cat >> confdefs.h <<\EOF
4349 #define LDBM_USE_DBBTREE 1
4350 EOF
4351
4352                 fi
4353
4354                                                 if test $ol_cv_lib_db != yes ; then
4355                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
4356                 fi
4357         fi
4358 fi
4359
4360 if test $ol_with_ldbm_api = manual ; then
4361                 ol_link_ldbm=yes
4362
4363         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
4364
4365         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
4366 do
4367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4369 echo "configure:4370: checking for $ac_hdr" >&5
4370 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4371   echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373   cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 #include <$ac_hdr>
4377 EOF
4378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4379 { (eval echo configure:4380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4380 ac_err=`grep -v '^ *+' conftest.out`
4381 if test -z "$ac_err"; then
4382   rm -rf conftest*
4383   eval "ac_cv_header_$ac_safe=yes"
4384 else
4385   echo "$ac_err" >&5
4386   echo "configure: failed program was:" >&5
4387   cat conftest.$ac_ext >&5
4388   rm -rf conftest*
4389   eval "ac_cv_header_$ac_safe=no"
4390 fi
4391 rm -f conftest*
4392 fi
4393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4394   echo "$ac_t""yes" 1>&6
4395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4396   cat >> confdefs.h <<EOF
4397 #define $ac_tr_hdr 1
4398 EOF
4399  
4400 else
4401   echo "$ac_t""no" 1>&6
4402 fi
4403 done
4404
4405 fi
4406
4407 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
4408         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
4409         ol_with_ldbm_api=none
4410 fi
4411
4412 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
4413         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
4414 echo "configure:4415: checking for GDBM library" >&5
4415 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
4416   echo $ac_n "(cached) $ac_c" 1>&6
4417 else
4418         ol_LIBS="$LIBS"
4419         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
4420 echo "configure:4421: checking for gdbm_open" >&5
4421 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
4422   echo $ac_n "(cached) $ac_c" 1>&6
4423 else
4424   cat > conftest.$ac_ext <<EOF
4425 #line 4426 "configure"
4426 #include "confdefs.h"
4427 /* System header to define __stub macros and hopefully few prototypes,
4428     which can conflict with char gdbm_open(); below.  */
4429 #include <assert.h>
4430 /* Override any gcc2 internal prototype to avoid an error.  */
4431 /* We use char because int might match the return type of a gcc2
4432     builtin and then its argument prototype would still apply.  */
4433 char gdbm_open();
4434
4435 int main() {
4436
4437 /* The GNU C library defines this for functions which it implements
4438     to always fail with ENOSYS.  Some functions are actually named
4439     something starting with __ and the normal name is an alias.  */
4440 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
4441 choke me
4442 #else
4443 gdbm_open();
4444 #endif
4445
4446 ; return 0; }
4447 EOF
4448 if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4449   rm -rf conftest*
4450   eval "ac_cv_func_gdbm_open=yes"
4451 else
4452   echo "configure: failed program was:" >&5
4453   cat conftest.$ac_ext >&5
4454   rm -rf conftest*
4455   eval "ac_cv_func_gdbm_open=no"
4456 fi
4457 rm -f conftest*
4458 fi
4459
4460 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
4461   echo "$ac_t""yes" 1>&6
4462   ol_cv_lib_gdbm=yes
4463 else
4464   echo "$ac_t""no" 1>&6
4465
4466                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
4467 echo "configure:4468: checking for gdbm_open in -lgdbm" >&5
4468 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
4469 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   ac_save_LIBS="$LIBS"
4473 LIBS="-lgdbm  $LIBS"
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 /* Override any gcc2 internal prototype to avoid an error.  */
4478 /* We use char because int might match the return type of a gcc2
4479     builtin and then its argument prototype would still apply.  */
4480 char gdbm_open();
4481
4482 int main() {
4483 gdbm_open()
4484 ; return 0; }
4485 EOF
4486 if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4487   rm -rf conftest*
4488   eval "ac_cv_lib_$ac_lib_var=yes"
4489 else
4490   echo "configure: failed program was:" >&5
4491   cat conftest.$ac_ext >&5
4492   rm -rf conftest*
4493   eval "ac_cv_lib_$ac_lib_var=no"
4494 fi
4495 rm -f conftest*
4496 LIBS="$ac_save_LIBS"
4497
4498 fi
4499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4500   echo "$ac_t""yes" 1>&6
4501   ol_cv_lib_gdbm=-lgdbm
4502 else
4503   echo "$ac_t""no" 1>&6
4504 ol_cv_lib_gdbm=no
4505 fi
4506
4507         
4508 fi
4509
4510         LIBS="$ol_LIBS"
4511
4512 fi
4513
4514 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
4515
4516
4517  for ac_hdr in gdbm.h
4518 do
4519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4521 echo "configure:4522: checking for $ac_hdr" >&5
4522 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4523   echo $ac_n "(cached) $ac_c" 1>&6
4524 else
4525   cat > conftest.$ac_ext <<EOF
4526 #line 4527 "configure"
4527 #include "confdefs.h"
4528 #include <$ac_hdr>
4529 EOF
4530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4531 { (eval echo configure:4532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4532 ac_err=`grep -v '^ *+' conftest.out`
4533 if test -z "$ac_err"; then
4534   rm -rf conftest*
4535   eval "ac_cv_header_$ac_safe=yes"
4536 else
4537   echo "$ac_err" >&5
4538   echo "configure: failed program was:" >&5
4539   cat conftest.$ac_ext >&5
4540   rm -rf conftest*
4541   eval "ac_cv_header_$ac_safe=no"
4542 fi
4543 rm -f conftest*
4544 fi
4545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4546   echo "$ac_t""yes" 1>&6
4547     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4548   cat >> confdefs.h <<EOF
4549 #define $ac_tr_hdr 1
4550 EOF
4551  
4552 else
4553   echo "$ac_t""no" 1>&6
4554 fi
4555 done
4556
4557  echo $ac_n "checking for db""... $ac_c" 1>&6
4558 echo "configure:4559: checking for db" >&5
4559 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562   
4563         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
4564                 ol_cv_gdbm=no
4565         else
4566                 ol_cv_gdbm=yes
4567         fi
4568
4569 fi
4570
4571 echo "$ac_t""$ol_cv_gdbm" 1>&6
4572  if test $ol_cv_gdbm = yes ; then
4573         cat >> confdefs.h <<\EOF
4574 #define HAVE_GDBM 1
4575 EOF
4576
4577  fi
4578
4579
4580         if test $ol_cv_gdbm = yes ; then
4581                 ol_link_ldbm=gdbm
4582                 ol_with_ldbm_api=gdbm
4583
4584                 if test $ol_cv_lib_gdbm != yes ; then
4585                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
4586                 fi
4587         fi
4588 fi
4589
4590 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
4591         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
4592 echo "configure:4593: checking for NDBM library" >&5
4593 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596         ol_LIBS="$LIBS"
4597         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
4598 echo "configure:4599: checking for dbm_open" >&5
4599 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
4600   echo $ac_n "(cached) $ac_c" 1>&6
4601 else
4602   cat > conftest.$ac_ext <<EOF
4603 #line 4604 "configure"
4604 #include "confdefs.h"
4605 /* System header to define __stub macros and hopefully few prototypes,
4606     which can conflict with char dbm_open(); below.  */
4607 #include <assert.h>
4608 /* Override any gcc2 internal prototype to avoid an error.  */
4609 /* We use char because int might match the return type of a gcc2
4610     builtin and then its argument prototype would still apply.  */
4611 char dbm_open();
4612
4613 int main() {
4614
4615 /* The GNU C library defines this for functions which it implements
4616     to always fail with ENOSYS.  Some functions are actually named
4617     something starting with __ and the normal name is an alias.  */
4618 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
4619 choke me
4620 #else
4621 dbm_open();
4622 #endif
4623
4624 ; return 0; }
4625 EOF
4626 if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4627   rm -rf conftest*
4628   eval "ac_cv_func_dbm_open=yes"
4629 else
4630   echo "configure: failed program was:" >&5
4631   cat conftest.$ac_ext >&5
4632   rm -rf conftest*
4633   eval "ac_cv_func_dbm_open=no"
4634 fi
4635 rm -f conftest*
4636 fi
4637
4638 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
4639   echo "$ac_t""yes" 1>&6
4640   ol_cv_lib_ndbm=yes
4641 else
4642   echo "$ac_t""no" 1>&6
4643
4644                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
4645 echo "configure:4646: checking for dbm_open in -lndbm" >&5
4646 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
4647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4648   echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650   ac_save_LIBS="$LIBS"
4651 LIBS="-lndbm  $LIBS"
4652 cat > conftest.$ac_ext <<EOF
4653 #line 4654 "configure"
4654 #include "confdefs.h"
4655 /* Override any gcc2 internal prototype to avoid an error.  */
4656 /* We use char because int might match the return type of a gcc2
4657     builtin and then its argument prototype would still apply.  */
4658 char dbm_open();
4659
4660 int main() {
4661 dbm_open()
4662 ; return 0; }
4663 EOF
4664 if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4665   rm -rf conftest*
4666   eval "ac_cv_lib_$ac_lib_var=yes"
4667 else
4668   echo "configure: failed program was:" >&5
4669   cat conftest.$ac_ext >&5
4670   rm -rf conftest*
4671   eval "ac_cv_lib_$ac_lib_var=no"
4672 fi
4673 rm -f conftest*
4674 LIBS="$ac_save_LIBS"
4675
4676 fi
4677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4678   echo "$ac_t""yes" 1>&6
4679   ol_cv_lib_ndbm=-lndbm
4680 else
4681   echo "$ac_t""no" 1>&6
4682
4683                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
4684 echo "configure:4685: checking for dbm_open in -ldbm" >&5
4685 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
4686 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4687   echo $ac_n "(cached) $ac_c" 1>&6
4688 else
4689   ac_save_LIBS="$LIBS"
4690 LIBS="-ldbm  $LIBS"
4691 cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 /* Override any gcc2 internal prototype to avoid an error.  */
4695 /* We use char because int might match the return type of a gcc2
4696     builtin and then its argument prototype would still apply.  */
4697 char dbm_open();
4698
4699 int main() {
4700 dbm_open()
4701 ; return 0; }
4702 EOF
4703 if { (eval echo configure:4704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4704   rm -rf conftest*
4705   eval "ac_cv_lib_$ac_lib_var=yes"
4706 else
4707   echo "configure: failed program was:" >&5
4708   cat conftest.$ac_ext >&5
4709   rm -rf conftest*
4710   eval "ac_cv_lib_$ac_lib_var=no"
4711 fi
4712 rm -f conftest*
4713 LIBS="$ac_save_LIBS"
4714
4715 fi
4716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4717   echo "$ac_t""yes" 1>&6
4718   ol_cv_lib_ndbm=-ldbm
4719 else
4720   echo "$ac_t""no" 1>&6
4721 ol_cv_lib_ndbm=no
4722 fi
4723                 
4724 fi
4725
4726         
4727 fi
4728
4729         LIBS="$ol_LIBS"
4730
4731 fi
4732
4733 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
4734
4735
4736  for ac_hdr in ndbm.h
4737 do
4738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4740 echo "configure:4741: checking for $ac_hdr" >&5
4741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4742   echo $ac_n "(cached) $ac_c" 1>&6
4743 else
4744   cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747 #include <$ac_hdr>
4748 EOF
4749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4750 { (eval echo configure:4751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4751 ac_err=`grep -v '^ *+' conftest.out`
4752 if test -z "$ac_err"; then
4753   rm -rf conftest*
4754   eval "ac_cv_header_$ac_safe=yes"
4755 else
4756   echo "$ac_err" >&5
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   eval "ac_cv_header_$ac_safe=no"
4761 fi
4762 rm -f conftest*
4763 fi
4764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4765   echo "$ac_t""yes" 1>&6
4766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4767   cat >> confdefs.h <<EOF
4768 #define $ac_tr_hdr 1
4769 EOF
4770  
4771 else
4772   echo "$ac_t""no" 1>&6
4773 fi
4774 done
4775
4776  echo $ac_n "checking for db""... $ac_c" 1>&6
4777 echo "configure:4778: checking for db" >&5
4778 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
4779   echo $ac_n "(cached) $ac_c" 1>&6
4780 else
4781   
4782         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
4783                 ol_cv_ndbm=no
4784         else
4785                 ol_cv_ndbm=yes
4786         fi
4787
4788 fi
4789
4790 echo "$ac_t""$ol_cv_ndbm" 1>&6
4791  if test $ol_cv_ndbm = yes ; then
4792         cat >> confdefs.h <<\EOF
4793 #define HAVE_NDBM 1
4794 EOF
4795
4796  fi
4797
4798
4799         if test $ol_cv_ndbm = yes ; then
4800                 ol_link_ldbm=ndbm
4801                 ol_with_ldbm_api=ndbm
4802
4803                 if test $ol_with_ldbm_api = ndbm ; then
4804                         echo "configure: warning: Attempting to use NDBM.  Functionality will be limited." 1>&2
4805                 fi
4806
4807                 if test $ol_cv_lib_ndbm != yes ; then
4808                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
4809                 fi
4810         fi
4811 fi
4812
4813 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
4814         echo "configure: warning: could not find suitable LDBM backend" 1>&2
4815         if test $ol_enable_ldbm = yes ; then
4816                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
4817         fi
4818
4819         echo "configure: warning: disabling LDBM" 1>&2
4820         ol_enable_ldbm=no
4821 fi
4822
4823 if test $ol_enable_wrappers = yes ; then
4824         echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6
4825 echo "configure:4826: checking for hosts_access in -lwrap" >&5
4826 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'`
4827 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4828   echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830   ac_save_LIBS="$LIBS"
4831 LIBS="-lwrap  $LIBS"
4832 cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 /* Override any gcc2 internal prototype to avoid an error.  */
4836 /* We use char because int might match the return type of a gcc2
4837     builtin and then its argument prototype would still apply.  */
4838 char hosts_access();
4839
4840 int main() {
4841 hosts_access()
4842 ; return 0; }
4843 EOF
4844 if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4845   rm -rf conftest*
4846   eval "ac_cv_lib_$ac_lib_var=yes"
4847 else
4848   echo "configure: failed program was:" >&5
4849   cat conftest.$ac_ext >&5
4850   rm -rf conftest*
4851   eval "ac_cv_lib_$ac_lib_var=no"
4852 fi
4853 rm -f conftest*
4854 LIBS="$ac_save_LIBS"
4855
4856 fi
4857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4858   echo "$ac_t""yes" 1>&6
4859   have_wrappers=yes
4860 else
4861   echo "$ac_t""no" 1>&6
4862 have_wrappers=no
4863 fi
4864
4865
4866         if test $have_wrappers = yes ; then
4867                 cat >> confdefs.h <<\EOF
4868 #define HAVE_TCPD 1
4869 EOF
4870
4871                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
4872         else
4873                 echo "configure: warning: could not find -lwrap" 1>&2
4874                 if test $ol_enable_wrappers = yes ; then
4875                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
4876                 fi
4877
4878                 echo "configure: warning: disabling wrappers support" 1>&2
4879                 ol_enable_wrappers=no
4880         fi
4881
4882 fi
4883
4884 # ud needs termcap (should insert check here)
4885 ol_link_termcap=no
4886 for ac_hdr in termcap.h ncurses.h
4887 do
4888 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4889 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4890 echo "configure:4891: checking for $ac_hdr" >&5
4891 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4892   echo $ac_n "(cached) $ac_c" 1>&6
4893 else
4894   cat > conftest.$ac_ext <<EOF
4895 #line 4896 "configure"
4896 #include "confdefs.h"
4897 #include <$ac_hdr>
4898 EOF
4899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4900 { (eval echo configure:4901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4901 ac_err=`grep -v '^ *+' conftest.out`
4902 if test -z "$ac_err"; then
4903   rm -rf conftest*
4904   eval "ac_cv_header_$ac_safe=yes"
4905 else
4906   echo "$ac_err" >&5
4907   echo "configure: failed program was:" >&5
4908   cat conftest.$ac_ext >&5
4909   rm -rf conftest*
4910   eval "ac_cv_header_$ac_safe=no"
4911 fi
4912 rm -f conftest*
4913 fi
4914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4915   echo "$ac_t""yes" 1>&6
4916     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4917   cat >> confdefs.h <<EOF
4918 #define $ac_tr_hdr 1
4919 EOF
4920  
4921 else
4922   echo "$ac_t""no" 1>&6
4923 fi
4924 done
4925
4926
4927 if test $ol_link_termcap = no ; then
4928         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
4929 echo "configure:4930: checking for tputs in -ltermcap" >&5
4930 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
4931 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4932   echo $ac_n "(cached) $ac_c" 1>&6
4933 else
4934   ac_save_LIBS="$LIBS"
4935 LIBS="-ltermcap  $LIBS"
4936 cat > conftest.$ac_ext <<EOF
4937 #line 4938 "configure"
4938 #include "confdefs.h"
4939 /* Override any gcc2 internal prototype to avoid an error.  */
4940 /* We use char because int might match the return type of a gcc2
4941     builtin and then its argument prototype would still apply.  */
4942 char tputs();
4943
4944 int main() {
4945 tputs()
4946 ; return 0; }
4947 EOF
4948 if { (eval echo configure:4949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4949   rm -rf conftest*
4950   eval "ac_cv_lib_$ac_lib_var=yes"
4951 else
4952   echo "configure: failed program was:" >&5
4953   cat conftest.$ac_ext >&5
4954   rm -rf conftest*
4955   eval "ac_cv_lib_$ac_lib_var=no"
4956 fi
4957 rm -f conftest*
4958 LIBS="$ac_save_LIBS"
4959
4960 fi
4961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4962   echo "$ac_t""yes" 1>&6
4963   have_termcap=yes
4964 else
4965   echo "$ac_t""no" 1>&6
4966 have_termcap=no
4967 fi
4968
4969         if test $have_termcap = yes ; then
4970                 cat >> confdefs.h <<\EOF
4971 #define HAVE_TERMCAP 1
4972 EOF
4973
4974                 ol_link_termcap=yes
4975                 TERMCAP_LIBS=-ltermcap
4976         fi
4977 fi
4978
4979 if test $ol_link_termcap = no ; then
4980         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
4981 echo "configure:4982: checking for initscr in -lncurses" >&5
4982 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
4983 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4984   echo $ac_n "(cached) $ac_c" 1>&6
4985 else
4986   ac_save_LIBS="$LIBS"
4987 LIBS="-lncurses  $LIBS"
4988 cat > conftest.$ac_ext <<EOF
4989 #line 4990 "configure"
4990 #include "confdefs.h"
4991 /* Override any gcc2 internal prototype to avoid an error.  */
4992 /* We use char because int might match the return type of a gcc2
4993     builtin and then its argument prototype would still apply.  */
4994 char initscr();
4995
4996 int main() {
4997 initscr()
4998 ; return 0; }
4999 EOF
5000 if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5001   rm -rf conftest*
5002   eval "ac_cv_lib_$ac_lib_var=yes"
5003 else
5004   echo "configure: failed program was:" >&5
5005   cat conftest.$ac_ext >&5
5006   rm -rf conftest*
5007   eval "ac_cv_lib_$ac_lib_var=no"
5008 fi
5009 rm -f conftest*
5010 LIBS="$ac_save_LIBS"
5011
5012 fi
5013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5014   echo "$ac_t""yes" 1>&6
5015   have_ncurses=yes
5016 else
5017   echo "$ac_t""no" 1>&6
5018 have_ncurses=no
5019 fi
5020
5021         if test $have_ncurses = yes ; then
5022                 cat >> confdefs.h <<\EOF
5023 #define HAVE_NCURSES 1
5024 EOF
5025
5026                 ol_link_termcap=yes
5027                 TERMCAP_LIBS=-lncurses
5028         fi
5029 fi
5030
5031 if test $ol_link_termcap = no ; then
5032         cat >> confdefs.h <<\EOF
5033 #define NO_TERMCAP 1
5034 EOF
5035
5036         TERMCAP_LIBS=
5037 fi
5038
5039 # FreeBSD (and others) have crypt(3) in -lcrypt
5040 if test $ol_enable_crypt != no ; then
5041         echo $ac_n "checking for crypt""... $ac_c" 1>&6
5042 echo "configure:5043: checking for crypt" >&5
5043 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
5044   echo $ac_n "(cached) $ac_c" 1>&6
5045 else
5046   cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049 /* System header to define __stub macros and hopefully few prototypes,
5050     which can conflict with char crypt(); below.  */
5051 #include <assert.h>
5052 /* Override any gcc2 internal prototype to avoid an error.  */
5053 /* We use char because int might match the return type of a gcc2
5054     builtin and then its argument prototype would still apply.  */
5055 char crypt();
5056
5057 int main() {
5058
5059 /* The GNU C library defines this for functions which it implements
5060     to always fail with ENOSYS.  Some functions are actually named
5061     something starting with __ and the normal name is an alias.  */
5062 #if defined (__stub_crypt) || defined (__stub___crypt)
5063 choke me
5064 #else
5065 crypt();
5066 #endif
5067
5068 ; return 0; }
5069 EOF
5070 if { (eval echo configure:5071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5071   rm -rf conftest*
5072   eval "ac_cv_func_crypt=yes"
5073 else
5074   echo "configure: failed program was:" >&5
5075   cat conftest.$ac_ext >&5
5076   rm -rf conftest*
5077   eval "ac_cv_func_crypt=no"
5078 fi
5079 rm -f conftest*
5080 fi
5081
5082 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
5083   echo "$ac_t""yes" 1>&6
5084   have_crypt=yes
5085 else
5086   echo "$ac_t""no" 1>&6
5087
5088                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
5089 echo "configure:5090: checking for crypt in -lcrypt" >&5
5090 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
5091 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5092   echo $ac_n "(cached) $ac_c" 1>&6
5093 else
5094   ac_save_LIBS="$LIBS"
5095 LIBS="-lcrypt  $LIBS"
5096 cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099 /* Override any gcc2 internal prototype to avoid an error.  */
5100 /* We use char because int might match the return type of a gcc2
5101     builtin and then its argument prototype would still apply.  */
5102 char crypt();
5103
5104 int main() {
5105 crypt()
5106 ; return 0; }
5107 EOF
5108 if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5109   rm -rf conftest*
5110   eval "ac_cv_lib_$ac_lib_var=yes"
5111 else
5112   echo "configure: failed program was:" >&5
5113   cat conftest.$ac_ext >&5
5114   rm -rf conftest*
5115   eval "ac_cv_lib_$ac_lib_var=no"
5116 fi
5117 rm -f conftest*
5118 LIBS="$ac_save_LIBS"
5119
5120 fi
5121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5122   echo "$ac_t""yes" 1>&6
5123   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
5124                         have_crypt=yes
5125 else
5126   echo "$ac_t""no" 1>&6
5127 have_crypt=no
5128 fi
5129
5130 fi
5131
5132
5133         if test $have_crypt = yes ; then
5134                 cat >> confdefs.h <<\EOF
5135 #define HAVE_CRYPT 1
5136 EOF
5137
5138         else
5139                 echo "configure: warning: could not find crypt" 1>&2
5140                 if test $ol_enable_crypt = yes ; then
5141                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
5142                 fi
5143
5144                 echo "configure: warning: disabling crypt support" 1>&2
5145                 ol_enable_crypt=no
5146         fi
5147 fi
5148
5149 # FreeBSD (and others) have setproctitle(3) in -lutil
5150 if test $ol_enable_proctitle != no ; then
5151         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
5152 echo "configure:5153: checking for setproctitle" >&5
5153 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
5154   echo $ac_n "(cached) $ac_c" 1>&6
5155 else
5156   cat > conftest.$ac_ext <<EOF
5157 #line 5158 "configure"
5158 #include "confdefs.h"
5159 /* System header to define __stub macros and hopefully few prototypes,
5160     which can conflict with char setproctitle(); below.  */
5161 #include <assert.h>
5162 /* Override any gcc2 internal prototype to avoid an error.  */
5163 /* We use char because int might match the return type of a gcc2
5164     builtin and then its argument prototype would still apply.  */
5165 char setproctitle();
5166
5167 int main() {
5168
5169 /* The GNU C library defines this for functions which it implements
5170     to always fail with ENOSYS.  Some functions are actually named
5171     something starting with __ and the normal name is an alias.  */
5172 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
5173 choke me
5174 #else
5175 setproctitle();
5176 #endif
5177
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5181   rm -rf conftest*
5182   eval "ac_cv_func_setproctitle=yes"
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   eval "ac_cv_func_setproctitle=no"
5188 fi
5189 rm -f conftest*
5190 fi
5191
5192 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
5193   echo "$ac_t""yes" 1>&6
5194   have_setproctitle=yes
5195 else
5196   echo "$ac_t""no" 1>&6
5197
5198                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
5199 echo "configure:5200: checking for setproctitle in -lutil" >&5
5200 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
5201 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5202   echo $ac_n "(cached) $ac_c" 1>&6
5203 else
5204   ac_save_LIBS="$LIBS"
5205 LIBS="-lutil  $LIBS"
5206 cat > conftest.$ac_ext <<EOF
5207 #line 5208 "configure"
5208 #include "confdefs.h"
5209 /* Override any gcc2 internal prototype to avoid an error.  */
5210 /* We use char because int might match the return type of a gcc2
5211     builtin and then its argument prototype would still apply.  */
5212 char setproctitle();
5213
5214 int main() {
5215 setproctitle()
5216 ; return 0; }
5217 EOF
5218 if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5219   rm -rf conftest*
5220   eval "ac_cv_lib_$ac_lib_var=yes"
5221 else
5222   echo "configure: failed program was:" >&5
5223   cat conftest.$ac_ext >&5
5224   rm -rf conftest*
5225   eval "ac_cv_lib_$ac_lib_var=no"
5226 fi
5227 rm -f conftest*
5228 LIBS="$ac_save_LIBS"
5229
5230 fi
5231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5232   echo "$ac_t""yes" 1>&6
5233   have_setproctitle=yes
5234                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
5235 else
5236   echo "$ac_t""no" 1>&6
5237 have_setproctitle=no
5238                         LIBOBJS="$LIBOBJS setproctitle.o"
5239 fi
5240
5241 fi
5242
5243
5244         if test $have_setproctitle = yes ; then
5245                 cat >> confdefs.h <<\EOF
5246 #define HAVE_SETPROCTITLE 1
5247 EOF
5248
5249         fi
5250 fi
5251
5252 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5253 echo "configure:5254: checking for ANSI C header files" >&5
5254 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5255   echo $ac_n "(cached) $ac_c" 1>&6
5256 else
5257   cat > conftest.$ac_ext <<EOF
5258 #line 5259 "configure"
5259 #include "confdefs.h"
5260 #include <stdlib.h>
5261 #include <stdarg.h>
5262 #include <string.h>
5263 #include <float.h>
5264 EOF
5265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5266 { (eval echo configure:5267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5267 ac_err=`grep -v '^ *+' conftest.out`
5268 if test -z "$ac_err"; then
5269   rm -rf conftest*
5270   ac_cv_header_stdc=yes
5271 else
5272   echo "$ac_err" >&5
5273   echo "configure: failed program was:" >&5
5274   cat conftest.$ac_ext >&5
5275   rm -rf conftest*
5276   ac_cv_header_stdc=no
5277 fi
5278 rm -f conftest*
5279
5280 if test $ac_cv_header_stdc = yes; then
5281   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5282 cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285 #include <string.h>
5286 EOF
5287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5288   egrep "memchr" >/dev/null 2>&1; then
5289   :
5290 else
5291   rm -rf conftest*
5292   ac_cv_header_stdc=no
5293 fi
5294 rm -f conftest*
5295
5296 fi
5297
5298 if test $ac_cv_header_stdc = yes; then
5299   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5300 cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303 #include <stdlib.h>
5304 EOF
5305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5306   egrep "free" >/dev/null 2>&1; then
5307   :
5308 else
5309   rm -rf conftest*
5310   ac_cv_header_stdc=no
5311 fi
5312 rm -f conftest*
5313
5314 fi
5315
5316 if test $ac_cv_header_stdc = yes; then
5317   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5318 if test "$cross_compiling" = yes; then
5319   :
5320 else
5321   cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5324 #include <ctype.h>
5325 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5326 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5327 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5328 int main () { int i; for (i = 0; i < 256; i++)
5329 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5330 exit (0); }
5331
5332 EOF
5333 if { (eval echo configure:5334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5334 then
5335   :
5336 else
5337   echo "configure: failed program was:" >&5
5338   cat conftest.$ac_ext >&5
5339   rm -fr conftest*
5340   ac_cv_header_stdc=no
5341 fi
5342 rm -fr conftest*
5343 fi
5344
5345 fi
5346 fi
5347
5348 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5349 if test $ac_cv_header_stdc = yes; then
5350   cat >> confdefs.h <<\EOF
5351 #define STDC_HEADERS 1
5352 EOF
5353
5354 fi
5355
5356
5357 if test $ac_cv_header_stdc != yes; then
5358         echo "configure: warning: could not locate Standard C headers" 1>&2
5359 fi
5360
5361 ac_header_dirent=no
5362 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5363 do
5364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5365 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5366 echo "configure:5367: checking for $ac_hdr that defines DIR" >&5
5367 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5368   echo $ac_n "(cached) $ac_c" 1>&6
5369 else
5370   cat > conftest.$ac_ext <<EOF
5371 #line 5372 "configure"
5372 #include "confdefs.h"
5373 #include <sys/types.h>
5374 #include <$ac_hdr>
5375 int main() {
5376 DIR *dirp = 0;
5377 ; return 0; }
5378 EOF
5379 if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5380   rm -rf conftest*
5381   eval "ac_cv_header_dirent_$ac_safe=yes"
5382 else
5383   echo "configure: failed program was:" >&5
5384   cat conftest.$ac_ext >&5
5385   rm -rf conftest*
5386   eval "ac_cv_header_dirent_$ac_safe=no"
5387 fi
5388 rm -f conftest*
5389 fi
5390 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5391   echo "$ac_t""yes" 1>&6
5392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5393   cat >> confdefs.h <<EOF
5394 #define $ac_tr_hdr 1
5395 EOF
5396  ac_header_dirent=$ac_hdr; break
5397 else
5398   echo "$ac_t""no" 1>&6
5399 fi
5400 done
5401 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5402 if test $ac_header_dirent = dirent.h; then
5403 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
5404 echo "configure:5405: checking for opendir in -ldir" >&5
5405 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5406 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5407   echo $ac_n "(cached) $ac_c" 1>&6
5408 else
5409   ac_save_LIBS="$LIBS"
5410 LIBS="-ldir  $LIBS"
5411 cat > conftest.$ac_ext <<EOF
5412 #line 5413 "configure"
5413 #include "confdefs.h"
5414 /* Override any gcc2 internal prototype to avoid an error.  */
5415 /* We use char because int might match the return type of a gcc2
5416     builtin and then its argument prototype would still apply.  */
5417 char opendir();
5418
5419 int main() {
5420 opendir()
5421 ; return 0; }
5422 EOF
5423 if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5424   rm -rf conftest*
5425   eval "ac_cv_lib_$ac_lib_var=yes"
5426 else
5427   echo "configure: failed program was:" >&5
5428   cat conftest.$ac_ext >&5
5429   rm -rf conftest*
5430   eval "ac_cv_lib_$ac_lib_var=no"
5431 fi
5432 rm -f conftest*
5433 LIBS="$ac_save_LIBS"
5434
5435 fi
5436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5437   echo "$ac_t""yes" 1>&6
5438   LIBS="$LIBS -ldir"
5439 else
5440   echo "$ac_t""no" 1>&6
5441 fi
5442
5443 else
5444 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
5445 echo "configure:5446: checking for opendir in -lx" >&5
5446 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5448   echo $ac_n "(cached) $ac_c" 1>&6
5449 else
5450   ac_save_LIBS="$LIBS"
5451 LIBS="-lx  $LIBS"
5452 cat > conftest.$ac_ext <<EOF
5453 #line 5454 "configure"
5454 #include "confdefs.h"
5455 /* Override any gcc2 internal prototype to avoid an error.  */
5456 /* We use char because int might match the return type of a gcc2
5457     builtin and then its argument prototype would still apply.  */
5458 char opendir();
5459
5460 int main() {
5461 opendir()
5462 ; return 0; }
5463 EOF
5464 if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5465   rm -rf conftest*
5466   eval "ac_cv_lib_$ac_lib_var=yes"
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470   rm -rf conftest*
5471   eval "ac_cv_lib_$ac_lib_var=no"
5472 fi
5473 rm -f conftest*
5474 LIBS="$ac_save_LIBS"
5475
5476 fi
5477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5478   echo "$ac_t""yes" 1>&6
5479   LIBS="$LIBS -lx"
5480 else
5481   echo "$ac_t""no" 1>&6
5482 fi
5483
5484 fi
5485
5486 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5487 echo "configure:5488: checking for sys/wait.h that is POSIX.1 compatible" >&5
5488 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5489   echo $ac_n "(cached) $ac_c" 1>&6
5490 else
5491   cat > conftest.$ac_ext <<EOF
5492 #line 5493 "configure"
5493 #include "confdefs.h"
5494 #include <sys/types.h>
5495 #include <sys/wait.h>
5496 #ifndef WEXITSTATUS
5497 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5498 #endif
5499 #ifndef WIFEXITED
5500 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5501 #endif
5502 int main() {
5503 int s;
5504 wait (&s);
5505 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5506 ; return 0; }
5507 EOF
5508 if { (eval echo configure:5509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5509   rm -rf conftest*
5510   ac_cv_header_sys_wait_h=yes
5511 else
5512   echo "configure: failed program was:" >&5
5513   cat conftest.$ac_ext >&5
5514   rm -rf conftest*
5515   ac_cv_header_sys_wait_h=no
5516 fi
5517 rm -f conftest*
5518 fi
5519
5520 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5521 if test $ac_cv_header_sys_wait_h = yes; then
5522   cat >> confdefs.h <<\EOF
5523 #define HAVE_SYS_WAIT_H 1
5524 EOF
5525
5526 fi
5527
5528 for ac_hdr in \
5529         stdarg.h                \
5530         stddef.h                \
5531         errno.h                 \
5532         fcntl.h                 \
5533         filio.h                 \
5534         getopt.h                \
5535         libutil.h               \
5536         limits.h                \
5537         malloc.h                \
5538         regex.h                 \
5539         sgtty.h                 \
5540         sys/file.h              \
5541         sys/filio.h             \
5542         sys/errno.h             \
5543         sys/ioctl.h             \
5544         sys/param.h             \
5545         sys/socket.h    \
5546         sys/syslog.h    \
5547         sys/time.h              \
5548         sys/types.h             \
5549         syslog.h                \
5550         termios.h               \
5551         unistd.h                \
5552
5553 do
5554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5556 echo "configure:5557: checking for $ac_hdr" >&5
5557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5558   echo $ac_n "(cached) $ac_c" 1>&6
5559 else
5560   cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 #include <$ac_hdr>
5564 EOF
5565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5566 { (eval echo configure:5567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5567 ac_err=`grep -v '^ *+' conftest.out`
5568 if test -z "$ac_err"; then
5569   rm -rf conftest*
5570   eval "ac_cv_header_$ac_safe=yes"
5571 else
5572   echo "$ac_err" >&5
5573   echo "configure: failed program was:" >&5
5574   cat conftest.$ac_ext >&5
5575   rm -rf conftest*
5576   eval "ac_cv_header_$ac_safe=no"
5577 fi
5578 rm -f conftest*
5579 fi
5580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5581   echo "$ac_t""yes" 1>&6
5582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5583   cat >> confdefs.h <<EOF
5584 #define $ac_tr_hdr 1
5585 EOF
5586  
5587 else
5588   echo "$ac_t""no" 1>&6
5589 fi
5590 done
5591
5592
5593 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
5594 echo "configure:5595: checking for uid_t in sys/types.h" >&5
5595 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
5596   echo $ac_n "(cached) $ac_c" 1>&6
5597 else
5598   cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 #include <sys/types.h>
5602 EOF
5603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5604   egrep "uid_t" >/dev/null 2>&1; then
5605   rm -rf conftest*
5606   ac_cv_type_uid_t=yes
5607 else
5608   rm -rf conftest*
5609   ac_cv_type_uid_t=no
5610 fi
5611 rm -f conftest*
5612
5613 fi
5614
5615 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
5616 if test $ac_cv_type_uid_t = no; then
5617   cat >> confdefs.h <<\EOF
5618 #define uid_t int
5619 EOF
5620
5621   cat >> confdefs.h <<\EOF
5622 #define gid_t int
5623 EOF
5624
5625 fi
5626
5627 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
5628 echo "configure:5629: checking type of array argument to getgroups" >&5
5629 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
5630   echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632   if test "$cross_compiling" = yes; then
5633   ac_cv_type_getgroups=cross
5634 else
5635   cat > conftest.$ac_ext <<EOF
5636 #line 5637 "configure"
5637 #include "confdefs.h"
5638
5639 /* Thanks to Mike Rendell for this test.  */
5640 #include <sys/types.h>
5641 #define NGID 256
5642 #undef MAX
5643 #define MAX(x, y) ((x) > (y) ? (x) : (y))
5644 main()
5645 {
5646   gid_t gidset[NGID];
5647   int i, n;
5648   union { gid_t gval; long lval; }  val;
5649
5650   val.lval = -1;
5651   for (i = 0; i < NGID; i++)
5652     gidset[i] = val.gval;
5653   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
5654                  gidset);
5655   /* Exit non-zero if getgroups seems to require an array of ints.  This
5656      happens when gid_t is short but getgroups modifies an array of ints.  */
5657   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
5658 }
5659
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5662 then
5663     ac_cv_type_getgroups=gid_t
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -fr conftest*
5668   ac_cv_type_getgroups=int
5669 fi
5670 rm -fr conftest*
5671 fi
5672
5673 if test $ac_cv_type_getgroups = cross; then
5674         cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677 #include <unistd.h>
5678 EOF
5679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5680   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
5681   rm -rf conftest*
5682   ac_cv_type_getgroups=gid_t
5683 else
5684   rm -rf conftest*
5685   ac_cv_type_getgroups=int
5686 fi
5687 rm -f conftest*
5688
5689 fi
5690 fi
5691
5692 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
5693 cat >> confdefs.h <<EOF
5694 #define GETGROUPS_T $ac_cv_type_getgroups
5695 EOF
5696
5697
5698 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
5699 echo "configure:5700: checking for mode_t" >&5
5700 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
5701   echo $ac_n "(cached) $ac_c" 1>&6
5702 else
5703   cat > conftest.$ac_ext <<EOF
5704 #line 5705 "configure"
5705 #include "confdefs.h"
5706 #include <sys/types.h>
5707 #if STDC_HEADERS
5708 #include <stdlib.h>
5709 #include <stddef.h>
5710 #endif
5711 EOF
5712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5713   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5714   rm -rf conftest*
5715   ac_cv_type_mode_t=yes
5716 else
5717   rm -rf conftest*
5718   ac_cv_type_mode_t=no
5719 fi
5720 rm -f conftest*
5721
5722 fi
5723 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
5724 if test $ac_cv_type_mode_t = no; then
5725   cat >> confdefs.h <<\EOF
5726 #define mode_t int
5727 EOF
5728
5729 fi
5730
5731 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5732 echo "configure:5733: checking for off_t" >&5
5733 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5734   echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736   cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 #include <sys/types.h>
5740 #if STDC_HEADERS
5741 #include <stdlib.h>
5742 #include <stddef.h>
5743 #endif
5744 EOF
5745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5746   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5747   rm -rf conftest*
5748   ac_cv_type_off_t=yes
5749 else
5750   rm -rf conftest*
5751   ac_cv_type_off_t=no
5752 fi
5753 rm -f conftest*
5754
5755 fi
5756 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5757 if test $ac_cv_type_off_t = no; then
5758   cat >> confdefs.h <<\EOF
5759 #define off_t long
5760 EOF
5761
5762 fi
5763
5764 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
5765 echo "configure:5766: checking for pid_t" >&5
5766 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
5767   echo $ac_n "(cached) $ac_c" 1>&6
5768 else
5769   cat > conftest.$ac_ext <<EOF
5770 #line 5771 "configure"
5771 #include "confdefs.h"
5772 #include <sys/types.h>
5773 #if STDC_HEADERS
5774 #include <stdlib.h>
5775 #include <stddef.h>
5776 #endif
5777 EOF
5778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5779   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5780   rm -rf conftest*
5781   ac_cv_type_pid_t=yes
5782 else
5783   rm -rf conftest*
5784   ac_cv_type_pid_t=no
5785 fi
5786 rm -f conftest*
5787
5788 fi
5789 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5790 if test $ac_cv_type_pid_t = no; then
5791   cat >> confdefs.h <<\EOF
5792 #define pid_t int
5793 EOF
5794
5795 fi
5796
5797 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5798 echo "configure:5799: checking return type of signal handlers" >&5
5799 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5800   echo $ac_n "(cached) $ac_c" 1>&6
5801 else
5802   cat > conftest.$ac_ext <<EOF
5803 #line 5804 "configure"
5804 #include "confdefs.h"
5805 #include <sys/types.h>
5806 #include <signal.h>
5807 #ifdef signal
5808 #undef signal
5809 #endif
5810 #ifdef __cplusplus
5811 extern "C" void (*signal (int, void (*)(int)))(int);
5812 #else
5813 void (*signal ()) ();
5814 #endif
5815
5816 int main() {
5817 int i;
5818 ; return 0; }
5819 EOF
5820 if { (eval echo configure:5821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5821   rm -rf conftest*
5822   ac_cv_type_signal=void
5823 else
5824   echo "configure: failed program was:" >&5
5825   cat conftest.$ac_ext >&5
5826   rm -rf conftest*
5827   ac_cv_type_signal=int
5828 fi
5829 rm -f conftest*
5830 fi
5831
5832 echo "$ac_t""$ac_cv_type_signal" 1>&6
5833 cat >> confdefs.h <<EOF
5834 #define RETSIGTYPE $ac_cv_type_signal
5835 EOF
5836
5837
5838 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5839 echo "configure:5840: checking for size_t" >&5
5840 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5841   echo $ac_n "(cached) $ac_c" 1>&6
5842 else
5843   cat > conftest.$ac_ext <<EOF
5844 #line 5845 "configure"
5845 #include "confdefs.h"
5846 #include <sys/types.h>
5847 #if STDC_HEADERS
5848 #include <stdlib.h>
5849 #include <stddef.h>
5850 #endif
5851 EOF
5852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5853   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5854   rm -rf conftest*
5855   ac_cv_type_size_t=yes
5856 else
5857   rm -rf conftest*
5858   ac_cv_type_size_t=no
5859 fi
5860 rm -f conftest*
5861
5862 fi
5863 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5864 if test $ac_cv_type_size_t = no; then
5865   cat >> confdefs.h <<\EOF
5866 #define size_t unsigned
5867 EOF
5868
5869 fi
5870
5871 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
5872 echo "configure:5873: checking for uid_t in sys/types.h" >&5
5873 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
5874   echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876   cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879 #include <sys/types.h>
5880 EOF
5881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5882   egrep "uid_t" >/dev/null 2>&1; then
5883   rm -rf conftest*
5884   ac_cv_type_uid_t=yes
5885 else
5886   rm -rf conftest*
5887   ac_cv_type_uid_t=no
5888 fi
5889 rm -f conftest*
5890
5891 fi
5892
5893 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
5894 if test $ac_cv_type_uid_t = no; then
5895   cat >> confdefs.h <<\EOF
5896 #define uid_t int
5897 EOF
5898
5899   cat >> confdefs.h <<\EOF
5900 #define gid_t int
5901 EOF
5902
5903 fi
5904
5905 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
5906 echo "configure:5907: checking for st_blksize in struct stat" >&5
5907 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5908   echo $ac_n "(cached) $ac_c" 1>&6
5909 else
5910   cat > conftest.$ac_ext <<EOF
5911 #line 5912 "configure"
5912 #include "confdefs.h"
5913 #include <sys/types.h>
5914 #include <sys/stat.h>
5915 int main() {
5916 struct stat s; s.st_blksize;
5917 ; return 0; }
5918 EOF
5919 if { (eval echo configure:5920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5920   rm -rf conftest*
5921   ac_cv_struct_st_blksize=yes
5922 else
5923   echo "configure: failed program was:" >&5
5924   cat conftest.$ac_ext >&5
5925   rm -rf conftest*
5926   ac_cv_struct_st_blksize=no
5927 fi
5928 rm -f conftest*
5929 fi
5930
5931 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5932 if test $ac_cv_struct_st_blksize = yes; then
5933   cat >> confdefs.h <<\EOF
5934 #define HAVE_ST_BLKSIZE 1
5935 EOF
5936
5937 fi
5938
5939 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5940 echo "configure:5941: checking whether time.h and sys/time.h may both be included" >&5
5941 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5942   echo $ac_n "(cached) $ac_c" 1>&6
5943 else
5944   cat > conftest.$ac_ext <<EOF
5945 #line 5946 "configure"
5946 #include "confdefs.h"
5947 #include <sys/types.h>
5948 #include <sys/time.h>
5949 #include <time.h>
5950 int main() {
5951 struct tm *tp;
5952 ; return 0; }
5953 EOF
5954 if { (eval echo configure:5955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5955   rm -rf conftest*
5956   ac_cv_header_time=yes
5957 else
5958   echo "configure: failed program was:" >&5
5959   cat conftest.$ac_ext >&5
5960   rm -rf conftest*
5961   ac_cv_header_time=no
5962 fi
5963 rm -f conftest*
5964 fi
5965
5966 echo "$ac_t""$ac_cv_header_time" 1>&6
5967 if test $ac_cv_header_time = yes; then
5968   cat >> confdefs.h <<\EOF
5969 #define TIME_WITH_SYS_TIME 1
5970 EOF
5971
5972 fi
5973
5974 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5975 echo "configure:5976: checking whether struct tm is in sys/time.h or time.h" >&5
5976 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5977   echo $ac_n "(cached) $ac_c" 1>&6
5978 else
5979   cat > conftest.$ac_ext <<EOF
5980 #line 5981 "configure"
5981 #include "confdefs.h"
5982 #include <sys/types.h>
5983 #include <time.h>
5984 int main() {
5985 struct tm *tp; tp->tm_sec;
5986 ; return 0; }
5987 EOF
5988 if { (eval echo configure:5989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5989   rm -rf conftest*
5990   ac_cv_struct_tm=time.h
5991 else
5992   echo "configure: failed program was:" >&5
5993   cat conftest.$ac_ext >&5
5994   rm -rf conftest*
5995   ac_cv_struct_tm=sys/time.h
5996 fi
5997 rm -f conftest*
5998 fi
5999
6000 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6001 if test $ac_cv_struct_tm = sys/time.h; then
6002   cat >> confdefs.h <<\EOF
6003 #define TM_IN_SYS_TIME 1
6004 EOF
6005
6006 fi
6007
6008
6009
6010 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
6011 echo "configure:6012: checking if toupper() requires islower()" >&5
6012 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
6013   echo $ac_n "(cached) $ac_c" 1>&6
6014 else
6015   
6016         if test "$cross_compiling" = yes; then
6017   ol_cv_c_upper_lower=safe
6018 else
6019   cat > conftest.$ac_ext <<EOF
6020 #line 6021 "configure"
6021 #include "confdefs.h"
6022
6023 #include <ctype.h>
6024 main()
6025 {
6026         if ('C' == toupper('C'))
6027                 exit(0);
6028         else
6029                 exit(1);
6030 }
6031 EOF
6032 if { (eval echo configure:6033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6033 then
6034   ol_cv_c_upper_lower=no
6035 else
6036   echo "configure: failed program was:" >&5
6037   cat conftest.$ac_ext >&5
6038   rm -fr conftest*
6039   ol_cv_c_upper_lower=yes
6040 fi
6041 rm -fr conftest*
6042 fi
6043
6044 fi
6045
6046 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
6047 if test $ol_cv_c_upper_lower != no ; then
6048         cat >> confdefs.h <<\EOF
6049 #define C_UPPER_LOWER 1
6050 EOF
6051
6052 fi
6053
6054 echo $ac_n "checking for working const""... $ac_c" 1>&6
6055 echo "configure:6056: checking for working const" >&5
6056 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6057   echo $ac_n "(cached) $ac_c" 1>&6
6058 else
6059   cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062
6063 int main() {
6064
6065 /* Ultrix mips cc rejects this.  */
6066 typedef int charset[2]; const charset x;
6067 /* SunOS 4.1.1 cc rejects this.  */
6068 char const *const *ccp;
6069 char **p;
6070 /* NEC SVR4.0.2 mips cc rejects this.  */
6071 struct point {int x, y;};
6072 static struct point const zero = {0,0};
6073 /* AIX XL C 1.02.0.0 rejects this.
6074    It does not let you subtract one const X* pointer from another in an arm
6075    of an if-expression whose if-part is not a constant expression */
6076 const char *g = "string";
6077 ccp = &g + (g ? g-g : 0);
6078 /* HPUX 7.0 cc rejects these. */
6079 ++ccp;
6080 p = (char**) ccp;
6081 ccp = (char const *const *) p;
6082 { /* SCO 3.2v4 cc rejects this.  */
6083   char *t;
6084   char const *s = 0 ? (char *) 0 : (char const *) 0;
6085
6086   *t++ = 0;
6087 }
6088 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6089   int x[] = {25, 17};
6090   const int *foo = &x[0];
6091   ++foo;
6092 }
6093 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6094   typedef const int *iptr;
6095   iptr p = 0;
6096   ++p;
6097 }
6098 { /* AIX XL C 1.02.0.0 rejects this saying
6099      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6100   struct s { int j; const int *ap[3]; };
6101   struct s *b; b->j = 5;
6102 }
6103 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6104   const int foo = 10;
6105 }
6106
6107 ; return 0; }
6108 EOF
6109 if { (eval echo configure:6110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6110   rm -rf conftest*
6111   ac_cv_c_const=yes
6112 else
6113   echo "configure: failed program was:" >&5
6114   cat conftest.$ac_ext >&5
6115   rm -rf conftest*
6116   ac_cv_c_const=no
6117 fi
6118 rm -f conftest*
6119 fi
6120
6121 echo "$ac_t""$ac_cv_c_const" 1>&6
6122 if test $ac_cv_c_const = no; then
6123   cat >> confdefs.h <<\EOF
6124 #define const 
6125 EOF
6126
6127 fi
6128
6129
6130
6131 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
6132 echo "configure:6133: checking for 8-bit clean memcmp" >&5
6133 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
6134   echo $ac_n "(cached) $ac_c" 1>&6
6135 else
6136   if test "$cross_compiling" = yes; then
6137   ac_cv_func_memcmp_clean=no
6138 else
6139   cat > conftest.$ac_ext <<EOF
6140 #line 6141 "configure"
6141 #include "confdefs.h"
6142
6143 main()
6144 {
6145   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
6146   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
6147 }
6148
6149 EOF
6150 if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6151 then
6152   ac_cv_func_memcmp_clean=yes
6153 else
6154   echo "configure: failed program was:" >&5
6155   cat conftest.$ac_ext >&5
6156   rm -fr conftest*
6157   ac_cv_func_memcmp_clean=no
6158 fi
6159 rm -fr conftest*
6160 fi
6161
6162 fi
6163
6164 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
6165 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
6166
6167 echo $ac_n "checking for strftime""... $ac_c" 1>&6
6168 echo "configure:6169: checking for strftime" >&5
6169 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
6170   echo $ac_n "(cached) $ac_c" 1>&6
6171 else
6172   cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175 /* System header to define __stub macros and hopefully few prototypes,
6176     which can conflict with char strftime(); below.  */
6177 #include <assert.h>
6178 /* Override any gcc2 internal prototype to avoid an error.  */
6179 /* We use char because int might match the return type of a gcc2
6180     builtin and then its argument prototype would still apply.  */
6181 char strftime();
6182
6183 int main() {
6184
6185 /* The GNU C library defines this for functions which it implements
6186     to always fail with ENOSYS.  Some functions are actually named
6187     something starting with __ and the normal name is an alias.  */
6188 #if defined (__stub_strftime) || defined (__stub___strftime)
6189 choke me
6190 #else
6191 strftime();
6192 #endif
6193
6194 ; return 0; }
6195 EOF
6196 if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6197   rm -rf conftest*
6198   eval "ac_cv_func_strftime=yes"
6199 else
6200   echo "configure: failed program was:" >&5
6201   cat conftest.$ac_ext >&5
6202   rm -rf conftest*
6203   eval "ac_cv_func_strftime=no"
6204 fi
6205 rm -f conftest*
6206 fi
6207
6208 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
6209   echo "$ac_t""yes" 1>&6
6210   cat >> confdefs.h <<\EOF
6211 #define HAVE_STRFTIME 1
6212 EOF
6213
6214 else
6215   echo "$ac_t""no" 1>&6
6216 # strftime is in -lintl on SCO UNIX.
6217 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
6218 echo "configure:6219: checking for strftime in -lintl" >&5
6219 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
6220 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6221   echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223   ac_save_LIBS="$LIBS"
6224 LIBS="-lintl  $LIBS"
6225 cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6228 /* Override any gcc2 internal prototype to avoid an error.  */
6229 /* We use char because int might match the return type of a gcc2
6230     builtin and then its argument prototype would still apply.  */
6231 char strftime();
6232
6233 int main() {
6234 strftime()
6235 ; return 0; }
6236 EOF
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6238   rm -rf conftest*
6239   eval "ac_cv_lib_$ac_lib_var=yes"
6240 else
6241   echo "configure: failed program was:" >&5
6242   cat conftest.$ac_ext >&5
6243   rm -rf conftest*
6244   eval "ac_cv_lib_$ac_lib_var=no"
6245 fi
6246 rm -f conftest*
6247 LIBS="$ac_save_LIBS"
6248
6249 fi
6250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6251   echo "$ac_t""yes" 1>&6
6252   cat >> confdefs.h <<\EOF
6253 #define HAVE_STRFTIME 1
6254 EOF
6255
6256 LIBS="-lintl $LIBS"
6257 else
6258   echo "$ac_t""no" 1>&6
6259 fi
6260
6261 fi
6262
6263 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
6264 echo "configure:6265: checking for vprintf" >&5
6265 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
6266   echo $ac_n "(cached) $ac_c" 1>&6
6267 else
6268   cat > conftest.$ac_ext <<EOF
6269 #line 6270 "configure"
6270 #include "confdefs.h"
6271 /* System header to define __stub macros and hopefully few prototypes,
6272     which can conflict with char vprintf(); below.  */
6273 #include <assert.h>
6274 /* Override any gcc2 internal prototype to avoid an error.  */
6275 /* We use char because int might match the return type of a gcc2
6276     builtin and then its argument prototype would still apply.  */
6277 char vprintf();
6278
6279 int main() {
6280
6281 /* The GNU C library defines this for functions which it implements
6282     to always fail with ENOSYS.  Some functions are actually named
6283     something starting with __ and the normal name is an alias.  */
6284 #if defined (__stub_vprintf) || defined (__stub___vprintf)
6285 choke me
6286 #else
6287 vprintf();
6288 #endif
6289
6290 ; return 0; }
6291 EOF
6292 if { (eval echo configure:6293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6293   rm -rf conftest*
6294   eval "ac_cv_func_vprintf=yes"
6295 else
6296   echo "configure: failed program was:" >&5
6297   cat conftest.$ac_ext >&5
6298   rm -rf conftest*
6299   eval "ac_cv_func_vprintf=no"
6300 fi
6301 rm -f conftest*
6302 fi
6303
6304 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
6305   echo "$ac_t""yes" 1>&6
6306   cat >> confdefs.h <<\EOF
6307 #define HAVE_VPRINTF 1
6308 EOF
6309
6310 else
6311   echo "$ac_t""no" 1>&6
6312 fi
6313
6314 if test "$ac_cv_func_vprintf" != yes; then
6315 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
6316 echo "configure:6317: checking for _doprnt" >&5
6317 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
6318   echo $ac_n "(cached) $ac_c" 1>&6
6319 else
6320   cat > conftest.$ac_ext <<EOF
6321 #line 6322 "configure"
6322 #include "confdefs.h"
6323 /* System header to define __stub macros and hopefully few prototypes,
6324     which can conflict with char _doprnt(); below.  */
6325 #include <assert.h>
6326 /* Override any gcc2 internal prototype to avoid an error.  */
6327 /* We use char because int might match the return type of a gcc2
6328     builtin and then its argument prototype would still apply.  */
6329 char _doprnt();
6330
6331 int main() {
6332
6333 /* The GNU C library defines this for functions which it implements
6334     to always fail with ENOSYS.  Some functions are actually named
6335     something starting with __ and the normal name is an alias.  */
6336 #if defined (__stub__doprnt) || defined (__stub____doprnt)
6337 choke me
6338 #else
6339 _doprnt();
6340 #endif
6341
6342 ; return 0; }
6343 EOF
6344 if { (eval echo configure:6345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6345   rm -rf conftest*
6346   eval "ac_cv_func__doprnt=yes"
6347 else
6348   echo "configure: failed program was:" >&5
6349   cat conftest.$ac_ext >&5
6350   rm -rf conftest*
6351   eval "ac_cv_func__doprnt=no"
6352 fi
6353 rm -f conftest*
6354 fi
6355
6356 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
6357   echo "$ac_t""yes" 1>&6
6358   cat >> confdefs.h <<\EOF
6359 #define HAVE_DOPRNT 1
6360 EOF
6361
6362 else
6363   echo "$ac_t""no" 1>&6
6364 fi
6365
6366 fi
6367
6368
6369 if test $ac_cv_func_vprintf = yes ; then
6370                 for ac_func in vsnprintf
6371 do
6372 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6373 echo "configure:6374: checking for $ac_func" >&5
6374 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6375   echo $ac_n "(cached) $ac_c" 1>&6
6376 else
6377   cat > conftest.$ac_ext <<EOF
6378 #line 6379 "configure"
6379 #include "confdefs.h"
6380 /* System header to define __stub macros and hopefully few prototypes,
6381     which can conflict with char $ac_func(); below.  */
6382 #include <assert.h>
6383 /* Override any gcc2 internal prototype to avoid an error.  */
6384 /* We use char because int might match the return type of a gcc2
6385     builtin and then its argument prototype would still apply.  */
6386 char $ac_func();
6387
6388 int main() {
6389
6390 /* The GNU C library defines this for functions which it implements
6391     to always fail with ENOSYS.  Some functions are actually named
6392     something starting with __ and the normal name is an alias.  */
6393 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6394 choke me
6395 #else
6396 $ac_func();
6397 #endif
6398
6399 ; return 0; }
6400 EOF
6401 if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6402   rm -rf conftest*
6403   eval "ac_cv_func_$ac_func=yes"
6404 else
6405   echo "configure: failed program was:" >&5
6406   cat conftest.$ac_ext >&5
6407   rm -rf conftest*
6408   eval "ac_cv_func_$ac_func=no"
6409 fi
6410 rm -f conftest*
6411 fi
6412
6413 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6414   echo "$ac_t""yes" 1>&6
6415     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6416   cat >> confdefs.h <<EOF
6417 #define $ac_tr_func 1
6418 EOF
6419  
6420 else
6421   echo "$ac_t""no" 1>&6
6422 fi
6423 done
6424
6425 fi
6426
6427 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
6428 echo "configure:6429: checking for wait3 that fills in rusage" >&5
6429 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
6430   echo $ac_n "(cached) $ac_c" 1>&6
6431 else
6432   if test "$cross_compiling" = yes; then
6433   ac_cv_func_wait3_rusage=no
6434 else
6435   cat > conftest.$ac_ext <<EOF
6436 #line 6437 "configure"
6437 #include "confdefs.h"
6438 #include <sys/types.h>
6439 #include <sys/time.h>
6440 #include <sys/resource.h>
6441 #include <stdio.h>
6442 /* HP-UX has wait3 but does not fill in rusage at all.  */
6443 main() {
6444   struct rusage r;
6445   int i;
6446   /* Use a field that we can force nonzero --
6447      voluntary context switches.
6448      For systems like NeXT and OSF/1 that don't set it,
6449      also use the system CPU time.  And page faults (I/O) for Linux.  */
6450   r.ru_nvcsw = 0;
6451   r.ru_stime.tv_sec = 0;
6452   r.ru_stime.tv_usec = 0;
6453   r.ru_majflt = r.ru_minflt = 0;
6454   switch (fork()) {
6455   case 0: /* Child.  */
6456     sleep(1); /* Give up the CPU.  */
6457     _exit(0);
6458   case -1: _exit(0); /* What can we do?  */
6459   default: /* Parent.  */
6460     wait3(&i, 0, &r);
6461     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
6462     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
6463          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
6464   }
6465 }
6466 EOF
6467 if { (eval echo configure:6468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6468 then
6469   ac_cv_func_wait3_rusage=yes
6470 else
6471   echo "configure: failed program was:" >&5
6472   cat conftest.$ac_ext >&5
6473   rm -fr conftest*
6474   ac_cv_func_wait3_rusage=no
6475 fi
6476 rm -fr conftest*
6477 fi
6478
6479 fi
6480
6481 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
6482 if test $ac_cv_func_wait3_rusage = yes; then
6483   cat >> confdefs.h <<\EOF
6484 #define HAVE_WAIT3 1
6485 EOF
6486
6487 fi
6488
6489
6490 for ac_func in \
6491         bcopy                   \
6492         getopt                  \
6493         flock                   \
6494         gethostname             \
6495         gettimeofday    \
6496         getdtablesize   \
6497         lockf                   \
6498         memcpy                  \
6499         memmove                 \
6500         mkstemp                 \
6501         mktime                  \
6502         select                  \
6503         setpwfile               \
6504         setsid                  \
6505         signal                  \
6506         sigset                  \
6507         snprintf                \
6508         socket                  \
6509         strerror                \
6510         strstr                  \
6511         strrchr                 \
6512         strsep                  \
6513         strtod                  \
6514         strtol                  \
6515         strtoul                 \
6516         sysconf                 \
6517         tempnam                 \
6518         waitpid                 \
6519
6520 do
6521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6522 echo "configure:6523: checking for $ac_func" >&5
6523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6524   echo $ac_n "(cached) $ac_c" 1>&6
6525 else
6526   cat > conftest.$ac_ext <<EOF
6527 #line 6528 "configure"
6528 #include "confdefs.h"
6529 /* System header to define __stub macros and hopefully few prototypes,
6530     which can conflict with char $ac_func(); below.  */
6531 #include <assert.h>
6532 /* Override any gcc2 internal prototype to avoid an error.  */
6533 /* We use char because int might match the return type of a gcc2
6534     builtin and then its argument prototype would still apply.  */
6535 char $ac_func();
6536
6537 int main() {
6538
6539 /* The GNU C library defines this for functions which it implements
6540     to always fail with ENOSYS.  Some functions are actually named
6541     something starting with __ and the normal name is an alias.  */
6542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6543 choke me
6544 #else
6545 $ac_func();
6546 #endif
6547
6548 ; return 0; }
6549 EOF
6550 if { (eval echo configure:6551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6551   rm -rf conftest*
6552   eval "ac_cv_func_$ac_func=yes"
6553 else
6554   echo "configure: failed program was:" >&5
6555   cat conftest.$ac_ext >&5
6556   rm -rf conftest*
6557   eval "ac_cv_func_$ac_func=no"
6558 fi
6559 rm -f conftest*
6560 fi
6561
6562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6563   echo "$ac_t""yes" 1>&6
6564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6565   cat >> confdefs.h <<EOF
6566 #define $ac_tr_func 1
6567 EOF
6568  
6569 else
6570   echo "$ac_t""no" 1>&6
6571 fi
6572 done
6573
6574
6575 for ac_func in getopt strdup tempnam
6576 do
6577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6578 echo "configure:6579: checking for $ac_func" >&5
6579 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6580   echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582   cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 /* System header to define __stub macros and hopefully few prototypes,
6586     which can conflict with char $ac_func(); below.  */
6587 #include <assert.h>
6588 /* Override any gcc2 internal prototype to avoid an error.  */
6589 /* We use char because int might match the return type of a gcc2
6590     builtin and then its argument prototype would still apply.  */
6591 char $ac_func();
6592
6593 int main() {
6594
6595 /* The GNU C library defines this for functions which it implements
6596     to always fail with ENOSYS.  Some functions are actually named
6597     something starting with __ and the normal name is an alias.  */
6598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6599 choke me
6600 #else
6601 $ac_func();
6602 #endif
6603
6604 ; return 0; }
6605 EOF
6606 if { (eval echo configure:6607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6607   rm -rf conftest*
6608   eval "ac_cv_func_$ac_func=yes"
6609 else
6610   echo "configure: failed program was:" >&5
6611   cat conftest.$ac_ext >&5
6612   rm -rf conftest*
6613   eval "ac_cv_func_$ac_func=no"
6614 fi
6615 rm -f conftest*
6616 fi
6617
6618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6619   echo "$ac_t""yes" 1>&6
6620     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6621   cat >> confdefs.h <<EOF
6622 #define $ac_tr_func 1
6623 EOF
6624  
6625 else
6626   echo "$ac_t""no" 1>&6
6627 LIBOBJS="$LIBOBJS ${ac_func}.o"
6628 fi
6629 done
6630
6631
6632
6633 # Check Configuration
6634
6635 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
6636 echo "configure:6637: checking declaration of sys_errlist" >&5
6637 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
6638   echo $ac_n "(cached) $ac_c" 1>&6
6639 else
6640   
6641         cat > conftest.$ac_ext <<EOF
6642 #line 6643 "configure"
6643 #include "confdefs.h"
6644
6645 #include <stdio.h>
6646 #include <sys/types.h>
6647 #include <errno.h> 
6648 int main() {
6649 char *c = (char *) *sys_errlist
6650 ; return 0; }
6651 EOF
6652 if { (eval echo configure:6653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6653   rm -rf conftest*
6654   ol_cv_dcl_sys_errlist=yes
6655 else
6656   echo "configure: failed program was:" >&5
6657   cat conftest.$ac_ext >&5
6658   rm -rf conftest*
6659   ol_cv_dcl_sys_errlist=no
6660 fi
6661 rm -f conftest*
6662 fi
6663
6664 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
6665
6666 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
6667 if test $ol_cv_dcl_sys_errlist = no ; then
6668         cat >> confdefs.h <<\EOF
6669 #define DECL_SYS_ERRLIST 1
6670 EOF
6671
6672         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
6673 echo "configure:6674: checking existence of sys_errlist" >&5
6674         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
6675   echo $ac_n "(cached) $ac_c" 1>&6
6676 else
6677   
6678                 cat > conftest.$ac_ext <<EOF
6679 #line 6680 "configure"
6680 #include "confdefs.h"
6681 #include <errno.h>
6682 int main() {
6683 char *c = (char *) *sys_errlist
6684 ; return 0; }
6685 EOF
6686 if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6687   rm -rf conftest*
6688   ol_cv_have_sys_errlist=yes
6689 else
6690   echo "configure: failed program was:" >&5
6691   cat conftest.$ac_ext >&5
6692   rm -rf conftest*
6693   ol_cv_have_sys_errlist=no
6694 fi
6695 rm -f conftest*
6696 fi
6697
6698         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
6699 fi
6700
6701
6702
6703 if test $ol_enable_debug != no ; then
6704         cat >> confdefs.h <<\EOF
6705 #define LDAP_DEBUG 1
6706 EOF
6707
6708 fi
6709 if test $ol_enable_libui = yes ; then
6710         cat >> confdefs.h <<\EOF
6711 #define LDAP_LIBUI 1
6712 EOF
6713
6714 fi
6715 if test $ol_enable_cache = no ; then
6716         cat >> confdefs.h <<\EOF
6717 #define LDAP_NOCACHE 1
6718 EOF
6719
6720 fi
6721 if test $ol_enable_dns != no ; then
6722         cat >> confdefs.h <<\EOF
6723 #define LDAP_DNS 1
6724 EOF
6725
6726 fi
6727 if test $ol_enable_proctitle != no ; then
6728         cat >> confdefs.h <<\EOF
6729 #define LDAP_PROCTITLE 1
6730 EOF
6731
6732 fi
6733 if test $ol_enable_referrals != no ; then
6734         cat >> confdefs.h <<\EOF
6735 #define LDAP_REFERRALS 1
6736 EOF
6737
6738 fi
6739 if test $ol_enable_cldap != no ; then
6740         cat >> confdefs.h <<\EOF
6741 #define LDAP_CONNECTIONLESS 1
6742 EOF
6743
6744 fi
6745
6746 if test $ol_enable_aclgroups != no ; then
6747         cat >> confdefs.h <<\EOF
6748 #define SLAPD_ACLGROUPS 1
6749 EOF
6750
6751 fi
6752 if test $ol_enable_crypt != no ; then
6753         cat >> confdefs.h <<\EOF
6754 #define SLAPD_CRYPT 1
6755 EOF
6756
6757 fi
6758 if test $ol_enable_md5 != no ; then
6759         cat >> confdefs.h <<\EOF
6760 #define SLAPD_MD5 1
6761 EOF
6762
6763 fi
6764 if test $ol_enable_sha1 != no ; then
6765         cat >> confdefs.h <<\EOF
6766 #define SLAPD_SHA1 1
6767 EOF
6768
6769 fi
6770 if test $ol_enable_phonetic != no ; then
6771         cat >> confdefs.h <<\EOF
6772 #define SLAPD_PHONETIC 1
6773 EOF
6774
6775 fi
6776 if test $ol_enable_rlookups != no ; then
6777         cat >> confdefs.h <<\EOF
6778 #define SLAPD_RLOOKUPS 1
6779 EOF
6780
6781 fi
6782
6783 if test $ol_link_ldbm != no ; then
6784         cat >> confdefs.h <<\EOF
6785 #define SLAPD_LDBM 1
6786 EOF
6787
6788         BUILD_SLAPD=yes
6789         BUILD_LDBM=yes
6790 fi
6791
6792 if test $ol_enable_passwd != no ; then
6793         cat >> confdefs.h <<\EOF
6794 #define SLAPD_PASSWD 1
6795 EOF
6796
6797         BUILD_SLAPD=yes
6798         BUILD_PASSWD=yes
6799 fi
6800
6801 if test $ol_enable_shell != no ; then
6802         cat >> confdefs.h <<\EOF
6803 #define SLAPD_SHELL 1
6804 EOF
6805
6806         BUILD_SLAPD=yes
6807         BUILD_SHELL=yes
6808 fi
6809
6810 if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
6811         $BUILD_SLAPD = yes ; then
6812         BUILD_SLURPD=yes
6813 fi
6814
6815 if test $ol_link_isode != no ; then
6816         BUILD_LDAPD=yes
6817 fi
6818
6819
6820
6821
6822   
6823   
6824   
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841 trap '' 1 2 15
6842 cat > confcache <<\EOF
6843 # This file is a shell script that caches the results of configure
6844 # tests run on this system so they can be shared between configure
6845 # scripts and configure runs.  It is not useful on other systems.
6846 # If it contains results you don't want to keep, you may remove or edit it.
6847 #
6848 # By default, configure uses ./config.cache as the cache file,
6849 # creating it if it does not exist already.  You can give configure
6850 # the --cache-file=FILE option to use a different cache file; that is
6851 # what configure does when it calls configure scripts in
6852 # subdirectories, so they share the cache.
6853 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6854 # config.status only pays attention to the cache file if you give it the
6855 # --recheck option to rerun configure.
6856 #
6857 EOF
6858 # The following way of writing the cache mishandles newlines in values,
6859 # but we know of no workaround that is simple, portable, and efficient.
6860 # So, don't put newlines in cache variables' values.
6861 # Ultrix sh set writes to stderr and can't be redirected directly,
6862 # and sets the high bit in the cache file unless we assign to the vars.
6863 (set) 2>&1 |
6864   case `(ac_space=' '; set) 2>&1` in
6865   *ac_space=\ *)
6866     # `set' does not quote correctly, so add quotes (double-quote substitution
6867     # turns \\\\ into \\, and sed turns \\ into \).
6868     sed -n \
6869       -e "s/'/'\\\\''/g" \
6870       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6871     ;;
6872   *)
6873     # `set' quotes correctly as required by POSIX, so do not add quotes.
6874     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6875     ;;
6876   esac >> confcache
6877 if cmp -s $cache_file confcache; then
6878   :
6879 else
6880   if test -w $cache_file; then
6881     echo "updating cache $cache_file"
6882     cat confcache > $cache_file
6883   else
6884     echo "not updating unwritable cache $cache_file"
6885   fi
6886 fi
6887 rm -f confcache
6888
6889 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6890
6891 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6892 # Let make expand exec_prefix.
6893 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6894
6895 # Any assignment to VPATH causes Sun make to only execute
6896 # the first set of double-colon rules, so remove it if not needed.
6897 # If there is a colon in the path, we need to keep it.
6898 if test "x$srcdir" = x.; then
6899   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6900 fi
6901
6902 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6903
6904 DEFS=-DHAVE_CONFIG_H
6905
6906 # Without the "./", some shells look in PATH for config.status.
6907 : ${CONFIG_STATUS=./config.status}
6908
6909 echo creating $CONFIG_STATUS
6910 rm -f $CONFIG_STATUS
6911 cat > $CONFIG_STATUS <<EOF
6912 #! /bin/sh
6913 # Generated automatically by configure.
6914 # Run this file to recreate the current configuration.
6915 # This directory was configured as follows,
6916 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6917 #
6918 # $0 $ac_configure_args
6919 #
6920 # Compiler output produced by configure, useful for debugging
6921 # configure, is in ./config.log if it exists.
6922
6923 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6924 for ac_option
6925 do
6926   case "\$ac_option" in
6927   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6928     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6929     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6930   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6931     echo "$CONFIG_STATUS generated by autoconf version 2.12"
6932     exit 0 ;;
6933   -help | --help | --hel | --he | --h)
6934     echo "\$ac_cs_usage"; exit 0 ;;
6935   *) echo "\$ac_cs_usage"; exit 1 ;;
6936   esac
6937 done
6938
6939 ac_given_srcdir=$srcdir
6940 ac_given_INSTALL="$INSTALL"
6941
6942 trap 'rm -fr `echo "\
6943 Makefile:build/top.mk:Makefile.in:build/dir.mk \
6944 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
6945 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
6946 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
6947 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
6948 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
6949 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
6950 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
6951 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
6952 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
6953 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
6954 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
6955 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
6956 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
6957 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
6958 include/Makefile:build/top.mk:include/Makefile.in \
6959 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
6960 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
6961 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
6962 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
6963 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
6964 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
6965 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
6966 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
6967 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
6968 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
6969 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
6970 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
6971 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
6972 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
6973 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
6974 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
6975 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
6976 tests/Makefile:build/top.mk:tests/Makefile.in \
6977  include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6978 EOF
6979 cat >> $CONFIG_STATUS <<EOF
6980
6981 # Protect against being on the right side of a sed subst in config.status.
6982 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6983  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6984 $ac_vpsub
6985 $extrasub
6986 s%@CFLAGS@%$CFLAGS%g
6987 s%@CPPFLAGS@%$CPPFLAGS%g
6988 s%@CXXFLAGS@%$CXXFLAGS%g
6989 s%@DEFS@%$DEFS%g
6990 s%@LDFLAGS@%$LDFLAGS%g
6991 s%@LIBS@%$LIBS%g
6992 s%@exec_prefix@%$exec_prefix%g
6993 s%@prefix@%$prefix%g
6994 s%@program_transform_name@%$program_transform_name%g
6995 s%@bindir@%$bindir%g
6996 s%@sbindir@%$sbindir%g
6997 s%@libexecdir@%$libexecdir%g
6998 s%@datadir@%$datadir%g
6999 s%@sysconfdir@%$sysconfdir%g
7000 s%@sharedstatedir@%$sharedstatedir%g
7001 s%@localstatedir@%$localstatedir%g
7002 s%@libdir@%$libdir%g
7003 s%@includedir@%$includedir%g
7004 s%@oldincludedir@%$oldincludedir%g
7005 s%@infodir@%$infodir%g
7006 s%@mandir@%$mandir%g
7007 s%@LN_S@%$LN_S%g
7008 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7009 s%@INSTALL_DATA@%$INSTALL_DATA%g
7010 s%@RANLIB@%$RANLIB%g
7011 s%@SET_MAKE@%$SET_MAKE%g
7012 s%@SENDMAIL@%$SENDMAIL%g
7013 s%@EDITOR@%$EDITOR%g
7014 s%@FINGER@%$FINGER%g
7015 s%@CC@%$CC%g
7016 s%@CPP@%$CPP%g
7017 s%@PEPSY@%$PEPSY%g
7018 s%@LIBOBJS@%$LIBOBJS%g
7019 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
7020 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
7021 s%@BUILD_LDBM@%$BUILD_LDBM%g
7022 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
7023 s%@BUILD_SHELL@%$BUILD_SHELL%g
7024 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
7025 s%@LDAP_LIBS@%$LDAP_LIBS%g
7026 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
7027 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
7028 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
7029 s%@LDBM_LIBS@%$LDBM_LIBS%g
7030 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
7031 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
7032 s%@KRB_LIBS@%$KRB_LIBS%g
7033 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
7034
7035 CEOF
7036 EOF
7037
7038 cat >> $CONFIG_STATUS <<\EOF
7039
7040 # Split the substitutions into bite-sized pieces for seds with
7041 # small command number limits, like on Digital OSF/1 and HP-UX.
7042 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7043 ac_file=1 # Number of current file.
7044 ac_beg=1 # First line for current file.
7045 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7046 ac_more_lines=:
7047 ac_sed_cmds=""
7048 while $ac_more_lines; do
7049   if test $ac_beg -gt 1; then
7050     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7051   else
7052     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7053   fi
7054   if test ! -s conftest.s$ac_file; then
7055     ac_more_lines=false
7056     rm -f conftest.s$ac_file
7057   else
7058     if test -z "$ac_sed_cmds"; then
7059       ac_sed_cmds="sed -f conftest.s$ac_file"
7060     else
7061       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7062     fi
7063     ac_file=`expr $ac_file + 1`
7064     ac_beg=$ac_end
7065     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7066   fi
7067 done
7068 if test -z "$ac_sed_cmds"; then
7069   ac_sed_cmds=cat
7070 fi
7071 EOF
7072
7073 cat >> $CONFIG_STATUS <<EOF
7074
7075 CONFIG_FILES=\${CONFIG_FILES-"\
7076 Makefile:build/top.mk:Makefile.in:build/dir.mk \
7077 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
7078 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
7079 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
7080 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
7081 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
7082 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
7083 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
7084 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
7085 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
7086 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
7087 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
7088 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
7089 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
7090 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
7091 include/Makefile:build/top.mk:include/Makefile.in \
7092 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
7093 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
7094 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
7095 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
7096 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
7097 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
7098 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
7099 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
7100 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
7101 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
7102 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
7103 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
7104 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
7105 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
7106 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
7107 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
7108 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
7109 tests/Makefile:build/top.mk:tests/Makefile.in \
7110 "}
7111 EOF
7112 cat >> $CONFIG_STATUS <<\EOF
7113 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7114   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7115   case "$ac_file" in
7116   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7117        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7118   *) ac_file_in="${ac_file}.in" ;;
7119   esac
7120
7121   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7122
7123   # Remove last slash and all that follows it.  Not all systems have dirname.
7124   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7125   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7126     # The file is in a subdirectory.
7127     test ! -d "$ac_dir" && mkdir "$ac_dir"
7128     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7129     # A "../" for each directory in $ac_dir_suffix.
7130     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7131   else
7132     ac_dir_suffix= ac_dots=
7133   fi
7134
7135   case "$ac_given_srcdir" in
7136   .)  srcdir=.
7137       if test -z "$ac_dots"; then top_srcdir=.
7138       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7139   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7140   *) # Relative path.
7141     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7142     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7143   esac
7144
7145   case "$ac_given_INSTALL" in
7146   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7147   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7148   esac
7149
7150   echo creating "$ac_file"
7151   rm -f "$ac_file"
7152   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7153   case "$ac_file" in
7154   *Makefile*) ac_comsub="1i\\
7155 # $configure_input" ;;
7156   *) ac_comsub= ;;
7157   esac
7158
7159   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7160   sed -e "$ac_comsub
7161 s%@configure_input@%$configure_input%g
7162 s%@srcdir@%$srcdir%g
7163 s%@top_srcdir@%$top_srcdir%g
7164 s%@INSTALL@%$INSTALL%g
7165 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7166 fi; done
7167 rm -f conftest.s*
7168
7169 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7170 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7171 #
7172 # ac_d sets the value in "#define NAME VALUE" lines.
7173 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7174 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7175 ac_dC='\3'
7176 ac_dD='%g'
7177 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7178 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7179 ac_uB='\([      ]\)%\1#\2define\3'
7180 ac_uC=' '
7181 ac_uD='\4%g'
7182 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7183 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7184 ac_eB='$%\1#\2define\3'
7185 ac_eC=' '
7186 ac_eD='%g'
7187
7188 if test "${CONFIG_HEADERS+set}" != set; then
7189 EOF
7190 cat >> $CONFIG_STATUS <<EOF
7191   CONFIG_HEADERS="include/portable.h"
7192 EOF
7193 cat >> $CONFIG_STATUS <<\EOF
7194 fi
7195 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7196   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7197   case "$ac_file" in
7198   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7199        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7200   *) ac_file_in="${ac_file}.in" ;;
7201   esac
7202
7203   echo creating $ac_file
7204
7205   rm -f conftest.frag conftest.in conftest.out
7206   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7207   cat $ac_file_inputs > conftest.in
7208
7209 EOF
7210
7211 # Transform confdefs.h into a sed script conftest.vals that substitutes
7212 # the proper values into config.h.in to produce config.h.  And first:
7213 # Protect against being on the right side of a sed subst in config.status.
7214 # Protect against being in an unquoted here document in config.status.
7215 rm -f conftest.vals
7216 cat > conftest.hdr <<\EOF
7217 s/[\\&%]/\\&/g
7218 s%[\\$`]%\\&%g
7219 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7220 s%ac_d%ac_u%gp
7221 s%ac_u%ac_e%gp
7222 EOF
7223 sed -n -f conftest.hdr confdefs.h > conftest.vals
7224 rm -f conftest.hdr
7225
7226 # This sed command replaces #undef with comments.  This is necessary, for
7227 # example, in the case of _POSIX_SOURCE, which is predefined and required
7228 # on some systems where configure will not decide to define it.
7229 cat >> conftest.vals <<\EOF
7230 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7231 EOF
7232
7233 # Break up conftest.vals because some shells have a limit on
7234 # the size of here documents, and old seds have small limits too.
7235
7236 rm -f conftest.tail
7237 while :
7238 do
7239   ac_lines=`grep -c . conftest.vals`
7240   # grep -c gives empty output for an empty file on some AIX systems.
7241   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7242   # Write a limited-size here document to conftest.frag.
7243   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7244   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7245   echo 'CEOF
7246   sed -f conftest.frag conftest.in > conftest.out
7247   rm -f conftest.in
7248   mv conftest.out conftest.in
7249 ' >> $CONFIG_STATUS
7250   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7251   rm -f conftest.vals
7252   mv conftest.tail conftest.vals
7253 done
7254 rm -f conftest.vals
7255
7256 cat >> $CONFIG_STATUS <<\EOF
7257   rm -f conftest.frag conftest.h
7258   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7259   cat conftest.in >> conftest.h
7260   rm -f conftest.in
7261   if cmp -s $ac_file conftest.h 2>/dev/null; then
7262     echo "$ac_file is unchanged"
7263     rm -f conftest.h
7264   else
7265     # Remove last slash and all that follows it.  Not all systems have dirname.
7266       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7267       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7268       # The file is in a subdirectory.
7269       test ! -d "$ac_dir" && mkdir "$ac_dir"
7270     fi
7271     rm -f $ac_file
7272     mv conftest.h $ac_file
7273   fi
7274 fi; done
7275
7276 EOF
7277 cat >> $CONFIG_STATUS <<EOF
7278
7279 EOF
7280 cat >> $CONFIG_STATUS <<\EOF
7281
7282 date > stamp-h
7283 echo Please \"make depend\" to build dependencies
7284
7285 exit 0
7286 EOF
7287 chmod +x $CONFIG_STATUS
7288 rm -fr confdefs* $ac_clean_files
7289 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7290