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