]> git.sur5r.net Git - openldap/blob - configure
fe08c3e6045dd835bcc5e07f80fd939edaf92217
[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                         for ac_func in \
3255                                 pthread_attr_create pthread_attr_init \
3256                                 pthread_attr_destroy pthread_attr_delete \
3257                                 pthread_attr_setdetachstate pthread_attr_setdetach_np \
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                                                 for ac_func in \
3315                                 pthread_setconcurrency \
3316                                 thr_setconcurrency \
3317                         
3318 do
3319 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3320 echo "configure:3321: checking for $ac_func" >&5
3321 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3322   echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324   cat > conftest.$ac_ext <<EOF
3325 #line 3326 "configure"
3326 #include "confdefs.h"
3327 /* System header to define __stub macros and hopefully few prototypes,
3328     which can conflict with char $ac_func(); below.  */
3329 #include <assert.h>
3330 /* Override any gcc2 internal prototype to avoid an error.  */
3331 /* We use char because int might match the return type of a gcc2
3332     builtin and then its argument prototype would still apply.  */
3333 char $ac_func();
3334
3335 int main() {
3336
3337 /* The GNU C library defines this for functions which it implements
3338     to always fail with ENOSYS.  Some functions are actually named
3339     something starting with __ and the normal name is an alias.  */
3340 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3341 choke me
3342 #else
3343 $ac_func();
3344 #endif
3345
3346 ; return 0; }
3347 EOF
3348 if { (eval echo configure:3349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3349   rm -rf conftest*
3350   eval "ac_cv_func_$ac_func=yes"
3351 else
3352   echo "configure: failed program was:" >&5
3353   cat conftest.$ac_ext >&5
3354   rm -rf conftest*
3355   eval "ac_cv_func_$ac_func=no"
3356 fi
3357 rm -f conftest*
3358 fi
3359
3360 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3361   echo "$ac_t""yes" 1>&6
3362     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3363   cat >> confdefs.h <<EOF
3364 #define $ac_tr_func 1
3365 EOF
3366  
3367 else
3368   echo "$ac_t""no" 1>&6
3369 fi
3370 done
3371
3372
3373                                                 if test $ol_with_preemptive = auto ; then
3374                                 echo $ac_n "checking for preemptive Pthread implementation""... $ac_c" 1>&6
3375 echo "configure:3376: checking for preemptive Pthread implementation" >&5
3376                                 if test "$cross_compiling" = yes; then
3377   
3378                                 { echo "configure: error: crossing compiling: use --with-preemptive=yes|no|manual" 1>&2; exit 1; }
3379 else
3380   cat > conftest.$ac_ext <<EOF
3381 #line 3382 "configure"
3382 #include "confdefs.h"
3383
3384 #include <sys/types.h>
3385 #include <sys/time.h>
3386 #include <unistd.h>
3387 #include <pthread.h>
3388 #ifndef NULL
3389 #define NULL 0
3390 #endif
3391
3392 int task(arg)
3393         int *arg;
3394 {
3395         struct timeval tv;
3396
3397         tv.tv_sec=4;
3398         tv.tv_usec=0;
3399         select(0, NULL, NULL, NULL, &tv);
3400
3401         tv.tv_sec=6;
3402         tv.tv_usec=0;
3403         select(0, NULL, NULL, NULL, &tv);
3404
3405         exit(1); /* if we exit here, the select blocked the whole process */
3406 }
3407
3408 main(argc, argv)
3409 int argc; char **argv;
3410 {
3411         pthread_t t;
3412
3413 #ifdef HAVE_PTHREAD_SETCONCURRENCY
3414         (void) pthread_setconcurrency(2);
3415 #else
3416 #ifdef HAVE_THR_SETCONCURRENCY
3417         /* Set Solaris LWP concurrency to 2 */
3418         thr_setconcurrency(2);
3419 #endif
3420 #endif
3421
3422         pthread_create(&t, NULL, (void *) task, NULL);
3423
3424 #if HAVE_SCHED_YIELD
3425         sched_yield();  /* make sure task runs first */
3426 #else
3427 #ifdef HAVE_PTHREAD_YIELD
3428         pthread_yield();        /* make sure task runs first */
3429 #endif
3430 #endif
3431         exit(0);
3432 }
3433                                 
3434 EOF
3435 if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3436 then
3437   ol_pthread_preemptive=yes
3438 else
3439   echo "configure: failed program was:" >&5
3440   cat conftest.$ac_ext >&5
3441   rm -fr conftest*
3442   ol_pthread_preemptive=no
3443 fi
3444 rm -fr conftest*
3445 fi
3446
3447                                 echo "$ac_t""$ol_pthread_preemptive" 1>&6
3448
3449                                 if test $ol_pthread_preemptive = yes ; then
3450                                         cat >> confdefs.h <<\EOF
3451 #define HAVE_PREEMPTIVE_PTHREADS 1
3452 EOF
3453
3454                                         ol_with_preemptive=yes
3455                                 fi
3456                         fi
3457
3458
3459                                                 CPPFLAGS="$save_CPPFLAGS"
3460                         LIBS="$save_LIBS"
3461                 else
3462                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
3463                 fi
3464         fi
3465
3466         if test $ol_with_threads = posix ; then
3467                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
3468         fi
3469 fi
3470
3471 if test $ol_with_threads = auto -o $ol_with_threads = mach ; then
3472                 for ac_hdr in mach/cthreads.h
3473 do
3474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3476 echo "configure:3477: checking for $ac_hdr" >&5
3477 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3478   echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480   cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3483 #include <$ac_hdr>
3484 EOF
3485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3486 { (eval echo configure:3487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3487 ac_err=`grep -v '^ *+' conftest.out`
3488 if test -z "$ac_err"; then
3489   rm -rf conftest*
3490   eval "ac_cv_header_$ac_safe=yes"
3491 else
3492   echo "$ac_err" >&5
3493   echo "configure: failed program was:" >&5
3494   cat conftest.$ac_ext >&5
3495   rm -rf conftest*
3496   eval "ac_cv_header_$ac_safe=no"
3497 fi
3498 rm -f conftest*
3499 fi
3500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3501   echo "$ac_t""yes" 1>&6
3502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3503   cat >> confdefs.h <<EOF
3504 #define $ac_tr_hdr 1
3505 EOF
3506  
3507 else
3508   echo "$ac_t""no" 1>&6
3509 fi
3510 done
3511
3512         if test $ac_cv_header_mach_cthreads_h = yes ; then
3513                 ol_with_threads=found
3514
3515                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
3516 echo "configure:3517: checking for cthread_fork" >&5
3517 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
3518   echo $ac_n "(cached) $ac_c" 1>&6
3519 else
3520   cat > conftest.$ac_ext <<EOF
3521 #line 3522 "configure"
3522 #include "confdefs.h"
3523 /* System header to define __stub macros and hopefully few prototypes,
3524     which can conflict with char cthread_fork(); below.  */
3525 #include <assert.h>
3526 /* Override any gcc2 internal prototype to avoid an error.  */
3527 /* We use char because int might match the return type of a gcc2
3528     builtin and then its argument prototype would still apply.  */
3529 char cthread_fork();
3530
3531 int main() {
3532
3533 /* The GNU C library defines this for functions which it implements
3534     to always fail with ENOSYS.  Some functions are actually named
3535     something starting with __ and the normal name is an alias.  */
3536 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
3537 choke me
3538 #else
3539 cthread_fork();
3540 #endif
3541
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3545   rm -rf conftest*
3546   eval "ac_cv_func_cthread_fork=yes"
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   eval "ac_cv_func_cthread_fork=no"
3552 fi
3553 rm -f conftest*
3554 fi
3555
3556 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
3557   echo "$ac_t""yes" 1>&6
3558   ol_link_threads=yes
3559 else
3560   echo "$ac_t""no" 1>&6
3561 fi
3562
3563
3564                 if test $ol_link_threads = no ; then
3565                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
3566 echo "configure:3567: checking for cthread_fork with -all_load" >&5
3567 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   
3571                                                                 save_LIBS="$LIBS"
3572                                 LIBS="-all_load $LIBS"
3573                                 cat > conftest.$ac_ext <<EOF
3574 #line 3575 "configure"
3575 #include "confdefs.h"
3576 #include <mach/cthreads.h>
3577 int main() {
3578
3579                                         cthread_fork((void *)0, (void *)0);
3580                                         
3581 ; return 0; }
3582 EOF
3583 if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3584   rm -rf conftest*
3585   ol_cv_cthread_all_load=yes
3586 else
3587   echo "configure: failed program was:" >&5
3588   cat conftest.$ac_ext >&5
3589   rm -rf conftest*
3590   ol_cv_cthread_all_load=no
3591 fi
3592 rm -f conftest*
3593                                                                 LIBS="$save_LIBS"
3594                         
3595 fi
3596
3597 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
3598
3599                         if test $ol_cv_cthread_all_load = yes ; then
3600                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
3601                                 ol_link_threads=mach
3602                         fi
3603                 fi
3604
3605                 if test $ol_link_threads != no ; then
3606                         : check for cthread specific functionality here
3607                         cat >> confdefs.h <<\EOF
3608 #define HAVE_MACH_CTHREADS 1
3609 EOF
3610
3611                 else
3612                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
3613                 fi
3614         fi
3615
3616         if test $ol_with_threads = mach ; then
3617                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
3618         fi
3619 fi
3620
3621 if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then
3622                 for ac_hdr in thread.h synch.h
3623 do
3624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3626 echo "configure:3627: checking for $ac_hdr" >&5
3627 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633 #include <$ac_hdr>
3634 EOF
3635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3636 { (eval echo configure:3637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3637 ac_err=`grep -v '^ *+' conftest.out`
3638 if test -z "$ac_err"; then
3639   rm -rf conftest*
3640   eval "ac_cv_header_$ac_safe=yes"
3641 else
3642   echo "$ac_err" >&5
3643   echo "configure: failed program was:" >&5
3644   cat conftest.$ac_ext >&5
3645   rm -rf conftest*
3646   eval "ac_cv_header_$ac_safe=no"
3647 fi
3648 rm -f conftest*
3649 fi
3650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3651   echo "$ac_t""yes" 1>&6
3652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3653   cat >> confdefs.h <<EOF
3654 #define $ac_tr_hdr 1
3655 EOF
3656  
3657 else
3658   echo "$ac_t""no" 1>&6
3659 fi
3660 done
3661
3662         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
3663                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
3664 echo "configure:3665: checking for thr_create in -lthread" >&5
3665 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
3666 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   ac_save_LIBS="$LIBS"
3670 LIBS="-lthread  $LIBS"
3671 cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674 /* Override any gcc2 internal prototype to avoid an error.  */
3675 /* We use char because int might match the return type of a gcc2
3676     builtin and then its argument prototype would still apply.  */
3677 char thr_create();
3678
3679 int main() {
3680 thr_create()
3681 ; return 0; }
3682 EOF
3683 if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3684   rm -rf conftest*
3685   eval "ac_cv_lib_$ac_lib_var=yes"
3686 else
3687   echo "configure: failed program was:" >&5
3688   cat conftest.$ac_ext >&5
3689   rm -rf conftest*
3690   eval "ac_cv_lib_$ac_lib_var=no"
3691 fi
3692 rm -f conftest*
3693 LIBS="$ac_save_LIBS"
3694
3695 fi
3696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3697   echo "$ac_t""yes" 1>&6
3698   have_lwp=yes
3699 else
3700   echo "$ac_t""no" 1>&6
3701 have_lwp=no
3702 fi
3703
3704
3705                 if test $have_lwp = yes ; then
3706                         cat >> confdefs.h <<\EOF
3707 #define HAVE_THR 1
3708 EOF
3709
3710                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
3711
3712                         if test $ol_with_preemptive = auto ; then
3713                                 ol_with_preemptive=yes
3714                         fi
3715                 fi
3716         fi
3717
3718                 for ac_hdr in lwp/lwp.h
3719 do
3720 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3721 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3722 echo "configure:3723: checking for $ac_hdr" >&5
3723 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3724   echo $ac_n "(cached) $ac_c" 1>&6
3725 else
3726   cat > conftest.$ac_ext <<EOF
3727 #line 3728 "configure"
3728 #include "confdefs.h"
3729 #include <$ac_hdr>
3730 EOF
3731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3732 { (eval echo configure:3733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3733 ac_err=`grep -v '^ *+' conftest.out`
3734 if test -z "$ac_err"; then
3735   rm -rf conftest*
3736   eval "ac_cv_header_$ac_safe=yes"
3737 else
3738   echo "$ac_err" >&5
3739   echo "configure: failed program was:" >&5
3740   cat conftest.$ac_ext >&5
3741   rm -rf conftest*
3742   eval "ac_cv_header_$ac_safe=no"
3743 fi
3744 rm -f conftest*
3745 fi
3746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3747   echo "$ac_t""yes" 1>&6
3748     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3749   cat >> confdefs.h <<EOF
3750 #define $ac_tr_hdr 1
3751 EOF
3752  
3753 else
3754   echo "$ac_t""no" 1>&6
3755 fi
3756 done
3757
3758         if test $ac_cv_header_lwp_lwp_h = yes ; then
3759                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
3760 echo "configure:3761: checking for lwp_create in -llwp" >&5
3761 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
3762 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3763   echo $ac_n "(cached) $ac_c" 1>&6
3764 else
3765   ac_save_LIBS="$LIBS"
3766 LIBS="-llwp  $LIBS"
3767 cat > conftest.$ac_ext <<EOF
3768 #line 3769 "configure"
3769 #include "confdefs.h"
3770 /* Override any gcc2 internal prototype to avoid an error.  */
3771 /* We use char because int might match the return type of a gcc2
3772     builtin and then its argument prototype would still apply.  */
3773 char lwp_create();
3774
3775 int main() {
3776 lwp_create()
3777 ; return 0; }
3778 EOF
3779 if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3780   rm -rf conftest*
3781   eval "ac_cv_lib_$ac_lib_var=yes"
3782 else
3783   echo "configure: failed program was:" >&5
3784   cat conftest.$ac_ext >&5
3785   rm -rf conftest*
3786   eval "ac_cv_lib_$ac_lib_var=no"
3787 fi
3788 rm -f conftest*
3789 LIBS="$ac_save_LIBS"
3790
3791 fi
3792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3793   echo "$ac_t""yes" 1>&6
3794   have_lwp=yes
3795 else
3796   echo "$ac_t""no" 1>&6
3797 have_lwp=no
3798 fi
3799
3800
3801                 if test $have_lwp = yes ; then
3802                         cat >> confdefs.h <<\EOF
3803 #define HAVE_LWP 1
3804 EOF
3805
3806                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
3807
3808                         if test $ol_with_preemptive = auto ; then
3809                                 ol_with_preemptive=no
3810                         fi
3811                 fi
3812         fi
3813 fi
3814
3815 if test $ol_with_preemptive = yes ; then
3816         cat >> confdefs.h <<\EOF
3817 #define PREEMPTIVE_THREADS 1
3818 EOF
3819
3820 fi
3821
3822 if test $ol_with_threads = manual ; then
3823                 ol_link_threads=yes
3824
3825         echo "configure: warning: thread defines and link options must be set manually" 1>&2
3826
3827         for ac_hdr in pthread.h sched.h
3828 do
3829 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3830 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3831 echo "configure:3832: checking for $ac_hdr" >&5
3832 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3833   echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3835   cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 #include <$ac_hdr>
3839 EOF
3840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3841 { (eval echo configure:3842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3842 ac_err=`grep -v '^ *+' conftest.out`
3843 if test -z "$ac_err"; then
3844   rm -rf conftest*
3845   eval "ac_cv_header_$ac_safe=yes"
3846 else
3847   echo "$ac_err" >&5
3848   echo "configure: failed program was:" >&5
3849   cat conftest.$ac_ext >&5
3850   rm -rf conftest*
3851   eval "ac_cv_header_$ac_safe=no"
3852 fi
3853 rm -f conftest*
3854 fi
3855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3856   echo "$ac_t""yes" 1>&6
3857     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3858   cat >> confdefs.h <<EOF
3859 #define $ac_tr_hdr 1
3860 EOF
3861  
3862 else
3863   echo "$ac_t""no" 1>&6
3864 fi
3865 done
3866
3867         for ac_func in sched_yield pthread_yield
3868 do
3869 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3870 echo "configure:3871: checking for $ac_func" >&5
3871 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3872   echo $ac_n "(cached) $ac_c" 1>&6
3873 else
3874   cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877 /* System header to define __stub macros and hopefully few prototypes,
3878     which can conflict with char $ac_func(); below.  */
3879 #include <assert.h>
3880 /* Override any gcc2 internal prototype to avoid an error.  */
3881 /* We use char because int might match the return type of a gcc2
3882     builtin and then its argument prototype would still apply.  */
3883 char $ac_func();
3884
3885 int main() {
3886
3887 /* The GNU C library defines this for functions which it implements
3888     to always fail with ENOSYS.  Some functions are actually named
3889     something starting with __ and the normal name is an alias.  */
3890 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3891 choke me
3892 #else
3893 $ac_func();
3894 #endif
3895
3896 ; return 0; }
3897 EOF
3898 if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3899   rm -rf conftest*
3900   eval "ac_cv_func_$ac_func=yes"
3901 else
3902   echo "configure: failed program was:" >&5
3903   cat conftest.$ac_ext >&5
3904   rm -rf conftest*
3905   eval "ac_cv_func_$ac_func=no"
3906 fi
3907 rm -f conftest*
3908 fi
3909
3910 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3911   echo "$ac_t""yes" 1>&6
3912     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3913   cat >> confdefs.h <<EOF
3914 #define $ac_tr_func 1
3915 EOF
3916  
3917 else
3918   echo "$ac_t""no" 1>&6
3919 fi
3920 done
3921
3922         
3923 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
3924 echo "configure:3925: checking for LinuxThreads" >&5
3925 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
3926   echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928   
3929         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
3930         if test "$res" -gt 0 ; then
3931                 ol_cv_linux_threads=yes
3932         else
3933                 ol_cv_linux_threads=no
3934         fi
3935
3936 fi
3937
3938 echo "$ac_t""$ol_cv_linux_threads" 1>&6
3939
3940
3941         for ac_hdr in mach/cthreads.h
3942 do
3943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3945 echo "configure:3946: checking for $ac_hdr" >&5
3946 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952 #include <$ac_hdr>
3953 EOF
3954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3955 { (eval echo configure:3956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3956 ac_err=`grep -v '^ *+' conftest.out`
3957 if test -z "$ac_err"; then
3958   rm -rf conftest*
3959   eval "ac_cv_header_$ac_safe=yes"
3960 else
3961   echo "$ac_err" >&5
3962   echo "configure: failed program was:" >&5
3963   cat conftest.$ac_ext >&5
3964   rm -rf conftest*
3965   eval "ac_cv_header_$ac_safe=no"
3966 fi
3967 rm -f conftest*
3968 fi
3969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3970   echo "$ac_t""yes" 1>&6
3971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3972   cat >> confdefs.h <<EOF
3973 #define $ac_tr_hdr 1
3974 EOF
3975  
3976 else
3977   echo "$ac_t""no" 1>&6
3978 fi
3979 done
3980
3981         for ac_hdr in lwp/lwp.h
3982 do
3983 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3984 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3985 echo "configure:3986: checking for $ac_hdr" >&5
3986 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3987   echo $ac_n "(cached) $ac_c" 1>&6
3988 else
3989   cat > conftest.$ac_ext <<EOF
3990 #line 3991 "configure"
3991 #include "confdefs.h"
3992 #include <$ac_hdr>
3993 EOF
3994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3995 { (eval echo configure:3996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3996 ac_err=`grep -v '^ *+' conftest.out`
3997 if test -z "$ac_err"; then
3998   rm -rf conftest*
3999   eval "ac_cv_header_$ac_safe=yes"
4000 else
4001   echo "$ac_err" >&5
4002   echo "configure: failed program was:" >&5
4003   cat conftest.$ac_ext >&5
4004   rm -rf conftest*
4005   eval "ac_cv_header_$ac_safe=no"
4006 fi
4007 rm -f conftest*
4008 fi
4009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4010   echo "$ac_t""yes" 1>&6
4011     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4012   cat >> confdefs.h <<EOF
4013 #define $ac_tr_hdr 1
4014 EOF
4015  
4016 else
4017   echo "$ac_t""no" 1>&6
4018 fi
4019 done
4020
4021         for ac_hdr in thread.h synch.h
4022 do
4023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4025 echo "configure:4026: checking for $ac_hdr" >&5
4026 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4027   echo $ac_n "(cached) $ac_c" 1>&6
4028 else
4029   cat > conftest.$ac_ext <<EOF
4030 #line 4031 "configure"
4031 #include "confdefs.h"
4032 #include <$ac_hdr>
4033 EOF
4034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4035 { (eval echo configure:4036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4036 ac_err=`grep -v '^ *+' conftest.out`
4037 if test -z "$ac_err"; then
4038   rm -rf conftest*
4039   eval "ac_cv_header_$ac_safe=yes"
4040 else
4041   echo "$ac_err" >&5
4042   echo "configure: failed program was:" >&5
4043   cat conftest.$ac_ext >&5
4044   rm -rf conftest*
4045   eval "ac_cv_header_$ac_safe=no"
4046 fi
4047 rm -f conftest*
4048 fi
4049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4050   echo "$ac_t""yes" 1>&6
4051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4052   cat >> confdefs.h <<EOF
4053 #define $ac_tr_hdr 1
4054 EOF
4055  
4056 else
4057   echo "$ac_t""no" 1>&6
4058 fi
4059 done
4060
4061 fi
4062
4063 if test $ol_with_threads != no ; then
4064                                                 cat >> confdefs.h <<\EOF
4065 #define _REENTRANT 1
4066 EOF
4067
4068         cat >> confdefs.h <<\EOF
4069 #define _THREAD_SAFE 1
4070 EOF
4071
4072 fi
4073
4074
4075 if test $ol_link_threads = no ; then
4076         if test $ol_with_threads = yes ; then
4077                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
4078         fi
4079
4080         if test $ol_with_threads = auto ; then
4081                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
4082                 ol_with_threads=no
4083         fi
4084
4085         cat >> confdefs.h <<\EOF
4086 #define NO_THREADS 1
4087 EOF
4088
4089         cat >> confdefs.h <<\EOF
4090 #define PREEMPTIVE_THREADS 1
4091 EOF
4092
4093         LTHREAD_LIBS=""
4094 fi
4095
4096 ol_link_ldbm=no 
4097 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
4098         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
4099 echo "configure:4100: checking for DB2 library" >&5
4100 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
4101   echo $ac_n "(cached) $ac_c" 1>&6
4102 else
4103         ol_LIBS="$LIBS"
4104         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
4105 echo "configure:4106: checking for db_open in -ldb" >&5
4106 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
4107 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4108   echo $ac_n "(cached) $ac_c" 1>&6
4109 else
4110   ac_save_LIBS="$LIBS"
4111 LIBS="-ldb  $LIBS"
4112 cat > conftest.$ac_ext <<EOF
4113 #line 4114 "configure"
4114 #include "confdefs.h"
4115 /* Override any gcc2 internal prototype to avoid an error.  */
4116 /* We use char because int might match the return type of a gcc2
4117     builtin and then its argument prototype would still apply.  */
4118 char db_open();
4119
4120 int main() {
4121 db_open()
4122 ; return 0; }
4123 EOF
4124 if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4125   rm -rf conftest*
4126   eval "ac_cv_lib_$ac_lib_var=yes"
4127 else
4128   echo "configure: failed program was:" >&5
4129   cat conftest.$ac_ext >&5
4130   rm -rf conftest*
4131   eval "ac_cv_lib_$ac_lib_var=no"
4132 fi
4133 rm -f conftest*
4134 LIBS="$ac_save_LIBS"
4135
4136 fi
4137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4138   echo "$ac_t""yes" 1>&6
4139   ol_cv_lib_db2=-ldb
4140 else
4141   echo "$ac_t""no" 1>&6
4142 ol_cv_lib_db2=no
4143 fi
4144
4145         LIBS="$ol_LIBS"
4146
4147 fi
4148
4149 echo "$ac_t""$ol_cv_lib_db2" 1>&6
4150
4151 for ac_hdr in db.h
4152 do
4153 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4154 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4155 echo "configure:4156: checking for $ac_hdr" >&5
4156 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4157   echo $ac_n "(cached) $ac_c" 1>&6
4158 else
4159   cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 #include <$ac_hdr>
4163 EOF
4164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4165 { (eval echo configure:4166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4166 ac_err=`grep -v '^ *+' conftest.out`
4167 if test -z "$ac_err"; then
4168   rm -rf conftest*
4169   eval "ac_cv_header_$ac_safe=yes"
4170 else
4171   echo "$ac_err" >&5
4172   echo "configure: failed program was:" >&5
4173   cat conftest.$ac_ext >&5
4174   rm -rf conftest*
4175   eval "ac_cv_header_$ac_safe=no"
4176 fi
4177 rm -f conftest*
4178 fi
4179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4180   echo "$ac_t""yes" 1>&6
4181     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4182   cat >> confdefs.h <<EOF
4183 #define $ac_tr_hdr 1
4184 EOF
4185  
4186 else
4187   echo "$ac_t""no" 1>&6
4188 fi
4189 done
4190
4191 if test $ac_cv_header_db_h = yes ; then
4192         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
4193 echo "configure:4194: checking if db.h is DB2" >&5
4194 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
4195   echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197   
4198                 cat > conftest.$ac_ext <<EOF
4199 #line 4200 "configure"
4200 #include "confdefs.h"
4201
4202 #                       include <db.h>
4203                         /* this check could be improved */
4204 #                       ifdef DB_VERSION_MAJOR
4205 #                               if DB_VERSION_MAJOR == 2
4206                                         __db_version_2
4207 #                               endif
4208 #                       endif
4209                 
4210 EOF
4211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4212   egrep "__db_version_2" >/dev/null 2>&1; then
4213   rm -rf conftest*
4214   ol_cv_header_db2=yes
4215 else
4216   rm -rf conftest*
4217   ol_cv_header_db2=no
4218 fi
4219 rm -f conftest*
4220
4221 fi
4222
4223 echo "$ac_t""$ol_cv_header_db2" 1>&6
4224 else
4225         ol_cv_header_db2=no
4226 fi
4227
4228
4229  
4230  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
4231 echo "configure:4232: checking for Berkeley DB2" >&5
4232 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
4233   echo $ac_n "(cached) $ac_c" 1>&6
4234 else
4235   
4236         if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then
4237                 ol_cv_berkeley_db2=no
4238         else
4239                 ol_cv_berkeley_db2=yes
4240         fi
4241
4242 fi
4243
4244 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
4245  if test $ol_cv_berkeley_db2 = yes ; then
4246         cat >> confdefs.h <<\EOF
4247 #define HAVE_BERKELEY_DB2 1
4248 EOF
4249
4250  fi
4251
4252
4253         if test $ol_cv_berkeley_db2 = yes ; then
4254                 ol_link_ldbm=db2
4255                 ol_with_ldbm_api=db2
4256
4257                 if test $ol_with_ldbm_type = hash ; then
4258                         cat >> confdefs.h <<\EOF
4259 #define LDBM_USE_DBHASH 1
4260 EOF
4261
4262                 else
4263                         cat >> confdefs.h <<\EOF
4264 #define LDBM_USE_DBBTREE 1
4265 EOF
4266
4267                 fi
4268
4269                                                 if test $ol_cv_lib_db2 != yes ; then
4270                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
4271                 fi
4272         fi
4273 fi
4274
4275 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
4276         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
4277 echo "configure:4278: checking for Berkeley DB library" >&5
4278 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
4279   echo $ac_n "(cached) $ac_c" 1>&6
4280 else
4281         ol_LIBS="$LIBS"
4282         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
4283 echo "configure:4284: checking for dbopen" >&5
4284 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
4285   echo $ac_n "(cached) $ac_c" 1>&6
4286 else
4287   cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 /* System header to define __stub macros and hopefully few prototypes,
4291     which can conflict with char dbopen(); below.  */
4292 #include <assert.h>
4293 /* Override any gcc2 internal prototype to avoid an error.  */
4294 /* We use char because int might match the return type of a gcc2
4295     builtin and then its argument prototype would still apply.  */
4296 char dbopen();
4297
4298 int main() {
4299
4300 /* The GNU C library defines this for functions which it implements
4301     to always fail with ENOSYS.  Some functions are actually named
4302     something starting with __ and the normal name is an alias.  */
4303 #if defined (__stub_dbopen) || defined (__stub___dbopen)
4304 choke me
4305 #else
4306 dbopen();
4307 #endif
4308
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4312   rm -rf conftest*
4313   eval "ac_cv_func_dbopen=yes"
4314 else
4315   echo "configure: failed program was:" >&5
4316   cat conftest.$ac_ext >&5
4317   rm -rf conftest*
4318   eval "ac_cv_func_dbopen=no"
4319 fi
4320 rm -f conftest*
4321 fi
4322
4323 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
4324   echo "$ac_t""yes" 1>&6
4325   ol_cv_lib_db=yes
4326 else
4327   echo "$ac_t""no" 1>&6
4328
4329                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
4330 echo "configure:4331: checking for dbopen in -ldb" >&5
4331 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
4332 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4333   echo $ac_n "(cached) $ac_c" 1>&6
4334 else
4335   ac_save_LIBS="$LIBS"
4336 LIBS="-ldb  $LIBS"
4337 cat > conftest.$ac_ext <<EOF
4338 #line 4339 "configure"
4339 #include "confdefs.h"
4340 /* Override any gcc2 internal prototype to avoid an error.  */
4341 /* We use char because int might match the return type of a gcc2
4342     builtin and then its argument prototype would still apply.  */
4343 char dbopen();
4344
4345 int main() {
4346 dbopen()
4347 ; return 0; }
4348 EOF
4349 if { (eval echo configure:4350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4350   rm -rf conftest*
4351   eval "ac_cv_lib_$ac_lib_var=yes"
4352 else
4353   echo "configure: failed program was:" >&5
4354   cat conftest.$ac_ext >&5
4355   rm -rf conftest*
4356   eval "ac_cv_lib_$ac_lib_var=no"
4357 fi
4358 rm -f conftest*
4359 LIBS="$ac_save_LIBS"
4360
4361 fi
4362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4363   echo "$ac_t""yes" 1>&6
4364   ol_cv_lib_db=-ldb
4365 else
4366   echo "$ac_t""no" 1>&6
4367 ol_cv_lib_db=no
4368 fi
4369
4370         
4371 fi
4372
4373         LIBS="$ol_LIBS"
4374
4375 fi
4376
4377 echo "$ac_t""$ol_cv_lib_db" 1>&6
4378
4379
4380 for ac_hdr in db_185.h
4381 do
4382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4384 echo "configure:4385: checking for $ac_hdr" >&5
4385 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4386   echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388   cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391 #include <$ac_hdr>
4392 EOF
4393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4394 { (eval echo configure:4395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4395 ac_err=`grep -v '^ *+' conftest.out`
4396 if test -z "$ac_err"; then
4397   rm -rf conftest*
4398   eval "ac_cv_header_$ac_safe=yes"
4399 else
4400   echo "$ac_err" >&5
4401   echo "configure: failed program was:" >&5
4402   cat conftest.$ac_ext >&5
4403   rm -rf conftest*
4404   eval "ac_cv_header_$ac_safe=no"
4405 fi
4406 rm -f conftest*
4407 fi
4408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4409   echo "$ac_t""yes" 1>&6
4410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4411   cat >> confdefs.h <<EOF
4412 #define $ac_tr_hdr 1
4413 EOF
4414  
4415 else
4416   echo "$ac_t""no" 1>&6
4417 fi
4418 done
4419
4420 if test $ol_cv_header_db2 = yes ; then
4421         
4422         ol_cv_header_db=$ac_cv_header_db_185_h
4423 else
4424         ol_cv_header_db=$ac_cv_header_db_h
4425 fi
4426
4427
4428  
4429  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
4430 echo "configure:4431: checking for Berkeley DB" >&5
4431 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
4432   echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4434   
4435         if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then
4436                 ol_cv_berkeley_db=no
4437         else
4438                 ol_cv_berkeley_db=yes
4439         fi
4440
4441 fi
4442
4443 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
4444  if test $ol_cv_berkeley_db = yes ; then
4445         cat >> confdefs.h <<\EOF
4446 #define HAVE_BERKELEY_DB 1
4447 EOF
4448
4449  fi
4450
4451
4452         if test $ol_cv_berkeley_db = yes ; then
4453                 ol_link_ldbm=db
4454                 ol_with_ldbm_api=db
4455
4456                 if test $ol_with_ldbm_type = hash ; then
4457                         cat >> confdefs.h <<\EOF
4458 #define LDBM_USE_DBHASH 1
4459 EOF
4460
4461                 else
4462                         cat >> confdefs.h <<\EOF
4463 #define LDBM_USE_DBBTREE 1
4464 EOF
4465
4466                 fi
4467
4468                                                 if test $ol_cv_lib_db != yes ; then
4469                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
4470                 fi
4471         fi
4472 fi
4473
4474 if test $ol_with_ldbm_api = manual ; then
4475                 ol_link_ldbm=yes
4476
4477         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
4478
4479         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
4480 do
4481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4483 echo "configure:4484: checking for $ac_hdr" >&5
4484 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4485   echo $ac_n "(cached) $ac_c" 1>&6
4486 else
4487   cat > conftest.$ac_ext <<EOF
4488 #line 4489 "configure"
4489 #include "confdefs.h"
4490 #include <$ac_hdr>
4491 EOF
4492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4493 { (eval echo configure:4494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4494 ac_err=`grep -v '^ *+' conftest.out`
4495 if test -z "$ac_err"; then
4496   rm -rf conftest*
4497   eval "ac_cv_header_$ac_safe=yes"
4498 else
4499   echo "$ac_err" >&5
4500   echo "configure: failed program was:" >&5
4501   cat conftest.$ac_ext >&5
4502   rm -rf conftest*
4503   eval "ac_cv_header_$ac_safe=no"
4504 fi
4505 rm -f conftest*
4506 fi
4507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4508   echo "$ac_t""yes" 1>&6
4509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4510   cat >> confdefs.h <<EOF
4511 #define $ac_tr_hdr 1
4512 EOF
4513  
4514 else
4515   echo "$ac_t""no" 1>&6
4516 fi
4517 done
4518
4519 fi
4520
4521 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
4522         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
4523         ol_with_ldbm_api=none
4524 fi
4525
4526 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
4527         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
4528 echo "configure:4529: checking for GDBM library" >&5
4529 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532         ol_LIBS="$LIBS"
4533         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
4534 echo "configure:4535: checking for gdbm_open" >&5
4535 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
4536   echo $ac_n "(cached) $ac_c" 1>&6
4537 else
4538   cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 /* System header to define __stub macros and hopefully few prototypes,
4542     which can conflict with char gdbm_open(); below.  */
4543 #include <assert.h>
4544 /* Override any gcc2 internal prototype to avoid an error.  */
4545 /* We use char because int might match the return type of a gcc2
4546     builtin and then its argument prototype would still apply.  */
4547 char gdbm_open();
4548
4549 int main() {
4550
4551 /* The GNU C library defines this for functions which it implements
4552     to always fail with ENOSYS.  Some functions are actually named
4553     something starting with __ and the normal name is an alias.  */
4554 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
4555 choke me
4556 #else
4557 gdbm_open();
4558 #endif
4559
4560 ; return 0; }
4561 EOF
4562 if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4563   rm -rf conftest*
4564   eval "ac_cv_func_gdbm_open=yes"
4565 else
4566   echo "configure: failed program was:" >&5
4567   cat conftest.$ac_ext >&5
4568   rm -rf conftest*
4569   eval "ac_cv_func_gdbm_open=no"
4570 fi
4571 rm -f conftest*
4572 fi
4573
4574 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
4575   echo "$ac_t""yes" 1>&6
4576   ol_cv_lib_gdbm=yes
4577 else
4578   echo "$ac_t""no" 1>&6
4579
4580                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
4581 echo "configure:4582: checking for gdbm_open in -lgdbm" >&5
4582 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
4583 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   ac_save_LIBS="$LIBS"
4587 LIBS="-lgdbm  $LIBS"
4588 cat > conftest.$ac_ext <<EOF
4589 #line 4590 "configure"
4590 #include "confdefs.h"
4591 /* Override any gcc2 internal prototype to avoid an error.  */
4592 /* We use char because int might match the return type of a gcc2
4593     builtin and then its argument prototype would still apply.  */
4594 char gdbm_open();
4595
4596 int main() {
4597 gdbm_open()
4598 ; return 0; }
4599 EOF
4600 if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4601   rm -rf conftest*
4602   eval "ac_cv_lib_$ac_lib_var=yes"
4603 else
4604   echo "configure: failed program was:" >&5
4605   cat conftest.$ac_ext >&5
4606   rm -rf conftest*
4607   eval "ac_cv_lib_$ac_lib_var=no"
4608 fi
4609 rm -f conftest*
4610 LIBS="$ac_save_LIBS"
4611
4612 fi
4613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4614   echo "$ac_t""yes" 1>&6
4615   ol_cv_lib_gdbm=-lgdbm
4616 else
4617   echo "$ac_t""no" 1>&6
4618 ol_cv_lib_gdbm=no
4619 fi
4620
4621         
4622 fi
4623
4624         LIBS="$ol_LIBS"
4625
4626 fi
4627
4628 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
4629
4630
4631  for ac_hdr in gdbm.h
4632 do
4633 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4634 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4635 echo "configure:4636: checking for $ac_hdr" >&5
4636 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4637   echo $ac_n "(cached) $ac_c" 1>&6
4638 else
4639   cat > conftest.$ac_ext <<EOF
4640 #line 4641 "configure"
4641 #include "confdefs.h"
4642 #include <$ac_hdr>
4643 EOF
4644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4645 { (eval echo configure:4646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4646 ac_err=`grep -v '^ *+' conftest.out`
4647 if test -z "$ac_err"; then
4648   rm -rf conftest*
4649   eval "ac_cv_header_$ac_safe=yes"
4650 else
4651   echo "$ac_err" >&5
4652   echo "configure: failed program was:" >&5
4653   cat conftest.$ac_ext >&5
4654   rm -rf conftest*
4655   eval "ac_cv_header_$ac_safe=no"
4656 fi
4657 rm -f conftest*
4658 fi
4659 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4660   echo "$ac_t""yes" 1>&6
4661     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4662   cat >> confdefs.h <<EOF
4663 #define $ac_tr_hdr 1
4664 EOF
4665  
4666 else
4667   echo "$ac_t""no" 1>&6
4668 fi
4669 done
4670
4671  echo $ac_n "checking for db""... $ac_c" 1>&6
4672 echo "configure:4673: checking for db" >&5
4673 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
4674   echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676   
4677         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
4678                 ol_cv_gdbm=no
4679         else
4680                 ol_cv_gdbm=yes
4681         fi
4682
4683 fi
4684
4685 echo "$ac_t""$ol_cv_gdbm" 1>&6
4686  if test $ol_cv_gdbm = yes ; then
4687         cat >> confdefs.h <<\EOF
4688 #define HAVE_GDBM 1
4689 EOF
4690
4691  fi
4692
4693
4694         if test $ol_cv_gdbm = yes ; then
4695                 ol_link_ldbm=gdbm
4696                 ol_with_ldbm_api=gdbm
4697
4698                 if test $ol_cv_lib_gdbm != yes ; then
4699                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
4700                 fi
4701         fi
4702 fi
4703
4704 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
4705         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
4706 echo "configure:4707: checking for NDBM library" >&5
4707 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
4708   echo $ac_n "(cached) $ac_c" 1>&6
4709 else
4710         ol_LIBS="$LIBS"
4711         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
4712 echo "configure:4713: checking for dbm_open" >&5
4713 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
4714   echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716   cat > conftest.$ac_ext <<EOF
4717 #line 4718 "configure"
4718 #include "confdefs.h"
4719 /* System header to define __stub macros and hopefully few prototypes,
4720     which can conflict with char dbm_open(); below.  */
4721 #include <assert.h>
4722 /* Override any gcc2 internal prototype to avoid an error.  */
4723 /* We use char because int might match the return type of a gcc2
4724     builtin and then its argument prototype would still apply.  */
4725 char dbm_open();
4726
4727 int main() {
4728
4729 /* The GNU C library defines this for functions which it implements
4730     to always fail with ENOSYS.  Some functions are actually named
4731     something starting with __ and the normal name is an alias.  */
4732 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
4733 choke me
4734 #else
4735 dbm_open();
4736 #endif
4737
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4741   rm -rf conftest*
4742   eval "ac_cv_func_dbm_open=yes"
4743 else
4744   echo "configure: failed program was:" >&5
4745   cat conftest.$ac_ext >&5
4746   rm -rf conftest*
4747   eval "ac_cv_func_dbm_open=no"
4748 fi
4749 rm -f conftest*
4750 fi
4751
4752 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
4753   echo "$ac_t""yes" 1>&6
4754   ol_cv_lib_ndbm=yes
4755 else
4756   echo "$ac_t""no" 1>&6
4757
4758                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
4759 echo "configure:4760: checking for dbm_open in -lndbm" >&5
4760 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
4761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4762   echo $ac_n "(cached) $ac_c" 1>&6
4763 else
4764   ac_save_LIBS="$LIBS"
4765 LIBS="-lndbm  $LIBS"
4766 cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769 /* Override any gcc2 internal prototype to avoid an error.  */
4770 /* We use char because int might match the return type of a gcc2
4771     builtin and then its argument prototype would still apply.  */
4772 char dbm_open();
4773
4774 int main() {
4775 dbm_open()
4776 ; return 0; }
4777 EOF
4778 if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4779   rm -rf conftest*
4780   eval "ac_cv_lib_$ac_lib_var=yes"
4781 else
4782   echo "configure: failed program was:" >&5
4783   cat conftest.$ac_ext >&5
4784   rm -rf conftest*
4785   eval "ac_cv_lib_$ac_lib_var=no"
4786 fi
4787 rm -f conftest*
4788 LIBS="$ac_save_LIBS"
4789
4790 fi
4791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4792   echo "$ac_t""yes" 1>&6
4793   ol_cv_lib_ndbm=-lndbm
4794 else
4795   echo "$ac_t""no" 1>&6
4796
4797                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
4798 echo "configure:4799: checking for dbm_open in -ldbm" >&5
4799 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
4800 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   ac_save_LIBS="$LIBS"
4804 LIBS="-ldbm  $LIBS"
4805 cat > conftest.$ac_ext <<EOF
4806 #line 4807 "configure"
4807 #include "confdefs.h"
4808 /* Override any gcc2 internal prototype to avoid an error.  */
4809 /* We use char because int might match the return type of a gcc2
4810     builtin and then its argument prototype would still apply.  */
4811 char dbm_open();
4812
4813 int main() {
4814 dbm_open()
4815 ; return 0; }
4816 EOF
4817 if { (eval echo configure:4818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4818   rm -rf conftest*
4819   eval "ac_cv_lib_$ac_lib_var=yes"
4820 else
4821   echo "configure: failed program was:" >&5
4822   cat conftest.$ac_ext >&5
4823   rm -rf conftest*
4824   eval "ac_cv_lib_$ac_lib_var=no"
4825 fi
4826 rm -f conftest*
4827 LIBS="$ac_save_LIBS"
4828
4829 fi
4830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4831   echo "$ac_t""yes" 1>&6
4832   ol_cv_lib_ndbm=-ldbm
4833 else
4834   echo "$ac_t""no" 1>&6
4835 ol_cv_lib_ndbm=no
4836 fi
4837                 
4838 fi
4839
4840         
4841 fi
4842
4843         LIBS="$ol_LIBS"
4844
4845 fi
4846
4847 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
4848
4849
4850  for ac_hdr in ndbm.h
4851 do
4852 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4853 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4854 echo "configure:4855: checking for $ac_hdr" >&5
4855 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4856   echo $ac_n "(cached) $ac_c" 1>&6
4857 else
4858   cat > conftest.$ac_ext <<EOF
4859 #line 4860 "configure"
4860 #include "confdefs.h"
4861 #include <$ac_hdr>
4862 EOF
4863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4864 { (eval echo configure:4865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4865 ac_err=`grep -v '^ *+' conftest.out`
4866 if test -z "$ac_err"; then
4867   rm -rf conftest*
4868   eval "ac_cv_header_$ac_safe=yes"
4869 else
4870   echo "$ac_err" >&5
4871   echo "configure: failed program was:" >&5
4872   cat conftest.$ac_ext >&5
4873   rm -rf conftest*
4874   eval "ac_cv_header_$ac_safe=no"
4875 fi
4876 rm -f conftest*
4877 fi
4878 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4879   echo "$ac_t""yes" 1>&6
4880     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4881   cat >> confdefs.h <<EOF
4882 #define $ac_tr_hdr 1
4883 EOF
4884  
4885 else
4886   echo "$ac_t""no" 1>&6
4887 fi
4888 done
4889
4890  echo $ac_n "checking for db""... $ac_c" 1>&6
4891 echo "configure:4892: checking for db" >&5
4892 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
4893   echo $ac_n "(cached) $ac_c" 1>&6
4894 else
4895   
4896         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
4897                 ol_cv_ndbm=no
4898         else
4899                 ol_cv_ndbm=yes
4900         fi
4901
4902 fi
4903
4904 echo "$ac_t""$ol_cv_ndbm" 1>&6
4905  if test $ol_cv_ndbm = yes ; then
4906         cat >> confdefs.h <<\EOF
4907 #define HAVE_NDBM 1
4908 EOF
4909
4910  fi
4911
4912
4913         if test $ol_cv_ndbm = yes ; then
4914                 ol_link_ldbm=ndbm
4915                 ol_with_ldbm_api=ndbm
4916
4917                 if test $ol_with_ldbm_api = ndbm ; then
4918                         echo "configure: warning: Attempting to use NDBM.  Functionality will be limited." 1>&2
4919                 fi
4920
4921                 if test $ol_cv_lib_ndbm != yes ; then
4922                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
4923                 fi
4924         fi
4925 fi
4926
4927 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
4928         echo "configure: warning: could not find suitable LDBM backend" 1>&2
4929         if test $ol_enable_ldbm = yes ; then
4930                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
4931         fi
4932
4933         echo "configure: warning: disabling LDBM" 1>&2
4934         ol_enable_ldbm=no
4935 fi
4936
4937 if test $ol_enable_wrappers = yes ; then
4938         echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6
4939 echo "configure:4940: checking for hosts_access in -lwrap" >&5
4940 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'`
4941 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4942   echo $ac_n "(cached) $ac_c" 1>&6
4943 else
4944   ac_save_LIBS="$LIBS"
4945 LIBS="-lwrap  $LIBS"
4946 cat > conftest.$ac_ext <<EOF
4947 #line 4948 "configure"
4948 #include "confdefs.h"
4949 /* Override any gcc2 internal prototype to avoid an error.  */
4950 /* We use char because int might match the return type of a gcc2
4951     builtin and then its argument prototype would still apply.  */
4952 char hosts_access();
4953
4954 int main() {
4955 hosts_access()
4956 ; return 0; }
4957 EOF
4958 if { (eval echo configure:4959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4959   rm -rf conftest*
4960   eval "ac_cv_lib_$ac_lib_var=yes"
4961 else
4962   echo "configure: failed program was:" >&5
4963   cat conftest.$ac_ext >&5
4964   rm -rf conftest*
4965   eval "ac_cv_lib_$ac_lib_var=no"
4966 fi
4967 rm -f conftest*
4968 LIBS="$ac_save_LIBS"
4969
4970 fi
4971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4972   echo "$ac_t""yes" 1>&6
4973   have_wrappers=yes
4974 else
4975   echo "$ac_t""no" 1>&6
4976 have_wrappers=no
4977 fi
4978
4979
4980         if test $have_wrappers = yes ; then
4981                 cat >> confdefs.h <<\EOF
4982 #define HAVE_TCPD 1
4983 EOF
4984
4985                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
4986         else
4987                 echo "configure: warning: could not find -lwrap" 1>&2
4988                 if test $ol_enable_wrappers = yes ; then
4989                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
4990                 fi
4991
4992                 echo "configure: warning: disabling wrappers support" 1>&2
4993                 ol_enable_wrappers=no
4994         fi
4995
4996 fi
4997
4998 # ud needs termcap (should insert check here)
4999 ol_link_termcap=no
5000 for ac_hdr in termcap.h ncurses.h
5001 do
5002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5003 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5004 echo "configure:5005: checking for $ac_hdr" >&5
5005 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5006   echo $ac_n "(cached) $ac_c" 1>&6
5007 else
5008   cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011 #include <$ac_hdr>
5012 EOF
5013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5014 { (eval echo configure:5015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5015 ac_err=`grep -v '^ *+' conftest.out`
5016 if test -z "$ac_err"; then
5017   rm -rf conftest*
5018   eval "ac_cv_header_$ac_safe=yes"
5019 else
5020   echo "$ac_err" >&5
5021   echo "configure: failed program was:" >&5
5022   cat conftest.$ac_ext >&5
5023   rm -rf conftest*
5024   eval "ac_cv_header_$ac_safe=no"
5025 fi
5026 rm -f conftest*
5027 fi
5028 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5029   echo "$ac_t""yes" 1>&6
5030     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5031   cat >> confdefs.h <<EOF
5032 #define $ac_tr_hdr 1
5033 EOF
5034  
5035 else
5036   echo "$ac_t""no" 1>&6
5037 fi
5038 done
5039
5040
5041 if test $ol_link_termcap = no ; then
5042         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
5043 echo "configure:5044: checking for tputs in -ltermcap" >&5
5044 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
5045 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5046   echo $ac_n "(cached) $ac_c" 1>&6
5047 else
5048   ac_save_LIBS="$LIBS"
5049 LIBS="-ltermcap  $LIBS"
5050 cat > conftest.$ac_ext <<EOF
5051 #line 5052 "configure"
5052 #include "confdefs.h"
5053 /* Override any gcc2 internal prototype to avoid an error.  */
5054 /* We use char because int might match the return type of a gcc2
5055     builtin and then its argument prototype would still apply.  */
5056 char tputs();
5057
5058 int main() {
5059 tputs()
5060 ; return 0; }
5061 EOF
5062 if { (eval echo configure:5063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5063   rm -rf conftest*
5064   eval "ac_cv_lib_$ac_lib_var=yes"
5065 else
5066   echo "configure: failed program was:" >&5
5067   cat conftest.$ac_ext >&5
5068   rm -rf conftest*
5069   eval "ac_cv_lib_$ac_lib_var=no"
5070 fi
5071 rm -f conftest*
5072 LIBS="$ac_save_LIBS"
5073
5074 fi
5075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5076   echo "$ac_t""yes" 1>&6
5077   have_termcap=yes
5078 else
5079   echo "$ac_t""no" 1>&6
5080 have_termcap=no
5081 fi
5082
5083         if test $have_termcap = yes ; then
5084                 cat >> confdefs.h <<\EOF
5085 #define HAVE_TERMCAP 1
5086 EOF
5087
5088                 ol_link_termcap=yes
5089                 TERMCAP_LIBS=-ltermcap
5090         fi
5091 fi
5092
5093 if test $ol_link_termcap = no ; then
5094         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
5095 echo "configure:5096: checking for initscr in -lncurses" >&5
5096 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
5097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100   ac_save_LIBS="$LIBS"
5101 LIBS="-lncurses  $LIBS"
5102 cat > conftest.$ac_ext <<EOF
5103 #line 5104 "configure"
5104 #include "confdefs.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 initscr();
5109
5110 int main() {
5111 initscr()
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5115   rm -rf conftest*
5116   eval "ac_cv_lib_$ac_lib_var=yes"
5117 else
5118   echo "configure: failed program was:" >&5
5119   cat conftest.$ac_ext >&5
5120   rm -rf conftest*
5121   eval "ac_cv_lib_$ac_lib_var=no"
5122 fi
5123 rm -f conftest*
5124 LIBS="$ac_save_LIBS"
5125
5126 fi
5127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5128   echo "$ac_t""yes" 1>&6
5129   have_ncurses=yes
5130 else
5131   echo "$ac_t""no" 1>&6
5132 have_ncurses=no
5133 fi
5134
5135         if test $have_ncurses = yes ; then
5136                 cat >> confdefs.h <<\EOF
5137 #define HAVE_NCURSES 1
5138 EOF
5139
5140                 ol_link_termcap=yes
5141                 TERMCAP_LIBS=-lncurses
5142         fi
5143 fi
5144
5145 if test $ol_link_termcap = no ; then
5146         cat >> confdefs.h <<\EOF
5147 #define NO_TERMCAP 1
5148 EOF
5149
5150         TERMCAP_LIBS=
5151 fi
5152
5153 # FreeBSD (and others) have crypt(3) in -lcrypt
5154 if test $ol_enable_crypt != no ; then
5155         echo $ac_n "checking for crypt""... $ac_c" 1>&6
5156 echo "configure:5157: checking for crypt" >&5
5157 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
5158   echo $ac_n "(cached) $ac_c" 1>&6
5159 else
5160   cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 /* System header to define __stub macros and hopefully few prototypes,
5164     which can conflict with char crypt(); below.  */
5165 #include <assert.h>
5166 /* Override any gcc2 internal prototype to avoid an error.  */
5167 /* We use char because int might match the return type of a gcc2
5168     builtin and then its argument prototype would still apply.  */
5169 char crypt();
5170
5171 int main() {
5172
5173 /* The GNU C library defines this for functions which it implements
5174     to always fail with ENOSYS.  Some functions are actually named
5175     something starting with __ and the normal name is an alias.  */
5176 #if defined (__stub_crypt) || defined (__stub___crypt)
5177 choke me
5178 #else
5179 crypt();
5180 #endif
5181
5182 ; return 0; }
5183 EOF
5184 if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5185   rm -rf conftest*
5186   eval "ac_cv_func_crypt=yes"
5187 else
5188   echo "configure: failed program was:" >&5
5189   cat conftest.$ac_ext >&5
5190   rm -rf conftest*
5191   eval "ac_cv_func_crypt=no"
5192 fi
5193 rm -f conftest*
5194 fi
5195
5196 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
5197   echo "$ac_t""yes" 1>&6
5198   have_crypt=yes
5199 else
5200   echo "$ac_t""no" 1>&6
5201
5202                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
5203 echo "configure:5204: checking for crypt in -lcrypt" >&5
5204 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
5205 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5206   echo $ac_n "(cached) $ac_c" 1>&6
5207 else
5208   ac_save_LIBS="$LIBS"
5209 LIBS="-lcrypt  $LIBS"
5210 cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 /* Override any gcc2 internal prototype to avoid an error.  */
5214 /* We use char because int might match the return type of a gcc2
5215     builtin and then its argument prototype would still apply.  */
5216 char crypt();
5217
5218 int main() {
5219 crypt()
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5223   rm -rf conftest*
5224   eval "ac_cv_lib_$ac_lib_var=yes"
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   eval "ac_cv_lib_$ac_lib_var=no"
5230 fi
5231 rm -f conftest*
5232 LIBS="$ac_save_LIBS"
5233
5234 fi
5235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5236   echo "$ac_t""yes" 1>&6
5237   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
5238                         have_crypt=yes
5239 else
5240   echo "$ac_t""no" 1>&6
5241 have_crypt=no
5242 fi
5243
5244 fi
5245
5246
5247         if test $have_crypt = yes ; then
5248                 cat >> confdefs.h <<\EOF
5249 #define HAVE_CRYPT 1
5250 EOF
5251
5252         else
5253                 echo "configure: warning: could not find crypt" 1>&2
5254                 if test $ol_enable_crypt = yes ; then
5255                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
5256                 fi
5257
5258                 echo "configure: warning: disabling crypt support" 1>&2
5259                 ol_enable_crypt=no
5260         fi
5261 fi
5262
5263 # FreeBSD (and others) have setproctitle(3) in -lutil
5264 if test $ol_enable_proctitle != no ; then
5265         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
5266 echo "configure:5267: checking for setproctitle" >&5
5267 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
5268   echo $ac_n "(cached) $ac_c" 1>&6
5269 else
5270   cat > conftest.$ac_ext <<EOF
5271 #line 5272 "configure"
5272 #include "confdefs.h"
5273 /* System header to define __stub macros and hopefully few prototypes,
5274     which can conflict with char setproctitle(); below.  */
5275 #include <assert.h>
5276 /* Override any gcc2 internal prototype to avoid an error.  */
5277 /* We use char because int might match the return type of a gcc2
5278     builtin and then its argument prototype would still apply.  */
5279 char setproctitle();
5280
5281 int main() {
5282
5283 /* The GNU C library defines this for functions which it implements
5284     to always fail with ENOSYS.  Some functions are actually named
5285     something starting with __ and the normal name is an alias.  */
5286 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
5287 choke me
5288 #else
5289 setproctitle();
5290 #endif
5291
5292 ; return 0; }
5293 EOF
5294 if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5295   rm -rf conftest*
5296   eval "ac_cv_func_setproctitle=yes"
5297 else
5298   echo "configure: failed program was:" >&5
5299   cat conftest.$ac_ext >&5
5300   rm -rf conftest*
5301   eval "ac_cv_func_setproctitle=no"
5302 fi
5303 rm -f conftest*
5304 fi
5305
5306 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
5307   echo "$ac_t""yes" 1>&6
5308   have_setproctitle=yes
5309 else
5310   echo "$ac_t""no" 1>&6
5311
5312                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
5313 echo "configure:5314: checking for setproctitle in -lutil" >&5
5314 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
5315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5316   echo $ac_n "(cached) $ac_c" 1>&6
5317 else
5318   ac_save_LIBS="$LIBS"
5319 LIBS="-lutil  $LIBS"
5320 cat > conftest.$ac_ext <<EOF
5321 #line 5322 "configure"
5322 #include "confdefs.h"
5323 /* Override any gcc2 internal prototype to avoid an error.  */
5324 /* We use char because int might match the return type of a gcc2
5325     builtin and then its argument prototype would still apply.  */
5326 char setproctitle();
5327
5328 int main() {
5329 setproctitle()
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5333   rm -rf conftest*
5334   eval "ac_cv_lib_$ac_lib_var=yes"
5335 else
5336   echo "configure: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338   rm -rf conftest*
5339   eval "ac_cv_lib_$ac_lib_var=no"
5340 fi
5341 rm -f conftest*
5342 LIBS="$ac_save_LIBS"
5343
5344 fi
5345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5346   echo "$ac_t""yes" 1>&6
5347   have_setproctitle=yes
5348                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
5349 else
5350   echo "$ac_t""no" 1>&6
5351 have_setproctitle=no
5352                         LIBOBJS="$LIBOBJS setproctitle.o"
5353 fi
5354
5355 fi
5356
5357
5358         if test $have_setproctitle = yes ; then
5359                 cat >> confdefs.h <<\EOF
5360 #define HAVE_SETPROCTITLE 1
5361 EOF
5362
5363         fi
5364 fi
5365
5366 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5367 echo "configure:5368: checking for ANSI C header files" >&5
5368 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5369   echo $ac_n "(cached) $ac_c" 1>&6
5370 else
5371   cat > conftest.$ac_ext <<EOF
5372 #line 5373 "configure"
5373 #include "confdefs.h"
5374 #include <stdlib.h>
5375 #include <stdarg.h>
5376 #include <string.h>
5377 #include <float.h>
5378 EOF
5379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5380 { (eval echo configure:5381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5381 ac_err=`grep -v '^ *+' conftest.out`
5382 if test -z "$ac_err"; then
5383   rm -rf conftest*
5384   ac_cv_header_stdc=yes
5385 else
5386   echo "$ac_err" >&5
5387   echo "configure: failed program was:" >&5
5388   cat conftest.$ac_ext >&5
5389   rm -rf conftest*
5390   ac_cv_header_stdc=no
5391 fi
5392 rm -f conftest*
5393
5394 if test $ac_cv_header_stdc = yes; then
5395   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5396 cat > conftest.$ac_ext <<EOF
5397 #line 5398 "configure"
5398 #include "confdefs.h"
5399 #include <string.h>
5400 EOF
5401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5402   egrep "memchr" >/dev/null 2>&1; then
5403   :
5404 else
5405   rm -rf conftest*
5406   ac_cv_header_stdc=no
5407 fi
5408 rm -f conftest*
5409
5410 fi
5411
5412 if test $ac_cv_header_stdc = yes; then
5413   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5414 cat > conftest.$ac_ext <<EOF
5415 #line 5416 "configure"
5416 #include "confdefs.h"
5417 #include <stdlib.h>
5418 EOF
5419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5420   egrep "free" >/dev/null 2>&1; then
5421   :
5422 else
5423   rm -rf conftest*
5424   ac_cv_header_stdc=no
5425 fi
5426 rm -f conftest*
5427
5428 fi
5429
5430 if test $ac_cv_header_stdc = yes; then
5431   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5432 if test "$cross_compiling" = yes; then
5433   :
5434 else
5435   cat > conftest.$ac_ext <<EOF
5436 #line 5437 "configure"
5437 #include "confdefs.h"
5438 #include <ctype.h>
5439 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5440 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5441 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5442 int main () { int i; for (i = 0; i < 256; i++)
5443 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5444 exit (0); }
5445
5446 EOF
5447 if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5448 then
5449   :
5450 else
5451   echo "configure: failed program was:" >&5
5452   cat conftest.$ac_ext >&5
5453   rm -fr conftest*
5454   ac_cv_header_stdc=no
5455 fi
5456 rm -fr conftest*
5457 fi
5458
5459 fi
5460 fi
5461
5462 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5463 if test $ac_cv_header_stdc = yes; then
5464   cat >> confdefs.h <<\EOF
5465 #define STDC_HEADERS 1
5466 EOF
5467
5468 fi
5469
5470
5471 if test $ac_cv_header_stdc != yes; then
5472         echo "configure: warning: could not locate Standard C headers" 1>&2
5473 fi
5474
5475 ac_header_dirent=no
5476 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5477 do
5478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5479 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5480 echo "configure:5481: checking for $ac_hdr that defines DIR" >&5
5481 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5482   echo $ac_n "(cached) $ac_c" 1>&6
5483 else
5484   cat > conftest.$ac_ext <<EOF
5485 #line 5486 "configure"
5486 #include "confdefs.h"
5487 #include <sys/types.h>
5488 #include <$ac_hdr>
5489 int main() {
5490 DIR *dirp = 0;
5491 ; return 0; }
5492 EOF
5493 if { (eval echo configure:5494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5494   rm -rf conftest*
5495   eval "ac_cv_header_dirent_$ac_safe=yes"
5496 else
5497   echo "configure: failed program was:" >&5
5498   cat conftest.$ac_ext >&5
5499   rm -rf conftest*
5500   eval "ac_cv_header_dirent_$ac_safe=no"
5501 fi
5502 rm -f conftest*
5503 fi
5504 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5505   echo "$ac_t""yes" 1>&6
5506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5507   cat >> confdefs.h <<EOF
5508 #define $ac_tr_hdr 1
5509 EOF
5510  ac_header_dirent=$ac_hdr; break
5511 else
5512   echo "$ac_t""no" 1>&6
5513 fi
5514 done
5515 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5516 if test $ac_header_dirent = dirent.h; then
5517 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
5518 echo "configure:5519: checking for opendir in -ldir" >&5
5519 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5520 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5521   echo $ac_n "(cached) $ac_c" 1>&6
5522 else
5523   ac_save_LIBS="$LIBS"
5524 LIBS="-ldir  $LIBS"
5525 cat > conftest.$ac_ext <<EOF
5526 #line 5527 "configure"
5527 #include "confdefs.h"
5528 /* Override any gcc2 internal prototype to avoid an error.  */
5529 /* We use char because int might match the return type of a gcc2
5530     builtin and then its argument prototype would still apply.  */
5531 char opendir();
5532
5533 int main() {
5534 opendir()
5535 ; return 0; }
5536 EOF
5537 if { (eval echo configure:5538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5538   rm -rf conftest*
5539   eval "ac_cv_lib_$ac_lib_var=yes"
5540 else
5541   echo "configure: failed program was:" >&5
5542   cat conftest.$ac_ext >&5
5543   rm -rf conftest*
5544   eval "ac_cv_lib_$ac_lib_var=no"
5545 fi
5546 rm -f conftest*
5547 LIBS="$ac_save_LIBS"
5548
5549 fi
5550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5551   echo "$ac_t""yes" 1>&6
5552   LIBS="$LIBS -ldir"
5553 else
5554   echo "$ac_t""no" 1>&6
5555 fi
5556
5557 else
5558 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
5559 echo "configure:5560: checking for opendir in -lx" >&5
5560 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5561 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5562   echo $ac_n "(cached) $ac_c" 1>&6
5563 else
5564   ac_save_LIBS="$LIBS"
5565 LIBS="-lx  $LIBS"
5566 cat > conftest.$ac_ext <<EOF
5567 #line 5568 "configure"
5568 #include "confdefs.h"
5569 /* Override any gcc2 internal prototype to avoid an error.  */
5570 /* We use char because int might match the return type of a gcc2
5571     builtin and then its argument prototype would still apply.  */
5572 char opendir();
5573
5574 int main() {
5575 opendir()
5576 ; return 0; }
5577 EOF
5578 if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5579   rm -rf conftest*
5580   eval "ac_cv_lib_$ac_lib_var=yes"
5581 else
5582   echo "configure: failed program was:" >&5
5583   cat conftest.$ac_ext >&5
5584   rm -rf conftest*
5585   eval "ac_cv_lib_$ac_lib_var=no"
5586 fi
5587 rm -f conftest*
5588 LIBS="$ac_save_LIBS"
5589
5590 fi
5591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5592   echo "$ac_t""yes" 1>&6
5593   LIBS="$LIBS -lx"
5594 else
5595   echo "$ac_t""no" 1>&6
5596 fi
5597
5598 fi
5599
5600 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5601 echo "configure:5602: checking for sys/wait.h that is POSIX.1 compatible" >&5
5602 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5603   echo $ac_n "(cached) $ac_c" 1>&6
5604 else
5605   cat > conftest.$ac_ext <<EOF
5606 #line 5607 "configure"
5607 #include "confdefs.h"
5608 #include <sys/types.h>
5609 #include <sys/wait.h>
5610 #ifndef WEXITSTATUS
5611 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5612 #endif
5613 #ifndef WIFEXITED
5614 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5615 #endif
5616 int main() {
5617 int s;
5618 wait (&s);
5619 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5620 ; return 0; }
5621 EOF
5622 if { (eval echo configure:5623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5623   rm -rf conftest*
5624   ac_cv_header_sys_wait_h=yes
5625 else
5626   echo "configure: failed program was:" >&5
5627   cat conftest.$ac_ext >&5
5628   rm -rf conftest*
5629   ac_cv_header_sys_wait_h=no
5630 fi
5631 rm -f conftest*
5632 fi
5633
5634 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5635 if test $ac_cv_header_sys_wait_h = yes; then
5636   cat >> confdefs.h <<\EOF
5637 #define HAVE_SYS_WAIT_H 1
5638 EOF
5639
5640 fi
5641
5642 for ac_hdr in \
5643         stdarg.h                \
5644         stddef.h                \
5645         errno.h                 \
5646         fcntl.h                 \
5647         filio.h                 \
5648         getopt.h                \
5649         libutil.h               \
5650         limits.h                \
5651         malloc.h                \
5652         regex.h                 \
5653         sgtty.h                 \
5654         sys/file.h              \
5655         sys/filio.h             \
5656         sys/errno.h             \
5657         sys/ioctl.h             \
5658         sys/param.h             \
5659         sys/socket.h    \
5660         sys/syslog.h    \
5661         sys/time.h              \
5662         sys/types.h             \
5663         syslog.h                \
5664         termios.h               \
5665         unistd.h                \
5666
5667 do
5668 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5669 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5670 echo "configure:5671: checking for $ac_hdr" >&5
5671 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5672   echo $ac_n "(cached) $ac_c" 1>&6
5673 else
5674   cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677 #include <$ac_hdr>
5678 EOF
5679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5680 { (eval echo configure:5681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5681 ac_err=`grep -v '^ *+' conftest.out`
5682 if test -z "$ac_err"; then
5683   rm -rf conftest*
5684   eval "ac_cv_header_$ac_safe=yes"
5685 else
5686   echo "$ac_err" >&5
5687   echo "configure: failed program was:" >&5
5688   cat conftest.$ac_ext >&5
5689   rm -rf conftest*
5690   eval "ac_cv_header_$ac_safe=no"
5691 fi
5692 rm -f conftest*
5693 fi
5694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5695   echo "$ac_t""yes" 1>&6
5696     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5697   cat >> confdefs.h <<EOF
5698 #define $ac_tr_hdr 1
5699 EOF
5700  
5701 else
5702   echo "$ac_t""no" 1>&6
5703 fi
5704 done
5705
5706
5707 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
5708 echo "configure:5709: checking for uid_t in sys/types.h" >&5
5709 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
5710   echo $ac_n "(cached) $ac_c" 1>&6
5711 else
5712   cat > conftest.$ac_ext <<EOF
5713 #line 5714 "configure"
5714 #include "confdefs.h"
5715 #include <sys/types.h>
5716 EOF
5717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5718   egrep "uid_t" >/dev/null 2>&1; then
5719   rm -rf conftest*
5720   ac_cv_type_uid_t=yes
5721 else
5722   rm -rf conftest*
5723   ac_cv_type_uid_t=no
5724 fi
5725 rm -f conftest*
5726
5727 fi
5728
5729 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
5730 if test $ac_cv_type_uid_t = no; then
5731   cat >> confdefs.h <<\EOF
5732 #define uid_t int
5733 EOF
5734
5735   cat >> confdefs.h <<\EOF
5736 #define gid_t int
5737 EOF
5738
5739 fi
5740
5741 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
5742 echo "configure:5743: checking type of array argument to getgroups" >&5
5743 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
5744   echo $ac_n "(cached) $ac_c" 1>&6
5745 else
5746   if test "$cross_compiling" = yes; then
5747   ac_cv_type_getgroups=cross
5748 else
5749   cat > conftest.$ac_ext <<EOF
5750 #line 5751 "configure"
5751 #include "confdefs.h"
5752
5753 /* Thanks to Mike Rendell for this test.  */
5754 #include <sys/types.h>
5755 #define NGID 256
5756 #undef MAX
5757 #define MAX(x, y) ((x) > (y) ? (x) : (y))
5758 main()
5759 {
5760   gid_t gidset[NGID];
5761   int i, n;
5762   union { gid_t gval; long lval; }  val;
5763
5764   val.lval = -1;
5765   for (i = 0; i < NGID; i++)
5766     gidset[i] = val.gval;
5767   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
5768                  gidset);
5769   /* Exit non-zero if getgroups seems to require an array of ints.  This
5770      happens when gid_t is short but getgroups modifies an array of ints.  */
5771   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
5772 }
5773
5774 EOF
5775 if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5776 then
5777     ac_cv_type_getgroups=gid_t
5778 else
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -fr conftest*
5782   ac_cv_type_getgroups=int
5783 fi
5784 rm -fr conftest*
5785 fi
5786
5787 if test $ac_cv_type_getgroups = cross; then
5788         cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791 #include <unistd.h>
5792 EOF
5793 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5794   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
5795   rm -rf conftest*
5796   ac_cv_type_getgroups=gid_t
5797 else
5798   rm -rf conftest*
5799   ac_cv_type_getgroups=int
5800 fi
5801 rm -f conftest*
5802
5803 fi
5804 fi
5805
5806 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
5807 cat >> confdefs.h <<EOF
5808 #define GETGROUPS_T $ac_cv_type_getgroups
5809 EOF
5810
5811
5812 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
5813 echo "configure:5814: checking for mode_t" >&5
5814 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
5815   echo $ac_n "(cached) $ac_c" 1>&6
5816 else
5817   cat > conftest.$ac_ext <<EOF
5818 #line 5819 "configure"
5819 #include "confdefs.h"
5820 #include <sys/types.h>
5821 #if STDC_HEADERS
5822 #include <stdlib.h>
5823 #include <stddef.h>
5824 #endif
5825 EOF
5826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5827   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5828   rm -rf conftest*
5829   ac_cv_type_mode_t=yes
5830 else
5831   rm -rf conftest*
5832   ac_cv_type_mode_t=no
5833 fi
5834 rm -f conftest*
5835
5836 fi
5837 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
5838 if test $ac_cv_type_mode_t = no; then
5839   cat >> confdefs.h <<\EOF
5840 #define mode_t int
5841 EOF
5842
5843 fi
5844
5845 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5846 echo "configure:5847: checking for off_t" >&5
5847 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5848   echo $ac_n "(cached) $ac_c" 1>&6
5849 else
5850   cat > conftest.$ac_ext <<EOF
5851 #line 5852 "configure"
5852 #include "confdefs.h"
5853 #include <sys/types.h>
5854 #if STDC_HEADERS
5855 #include <stdlib.h>
5856 #include <stddef.h>
5857 #endif
5858 EOF
5859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5860   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5861   rm -rf conftest*
5862   ac_cv_type_off_t=yes
5863 else
5864   rm -rf conftest*
5865   ac_cv_type_off_t=no
5866 fi
5867 rm -f conftest*
5868
5869 fi
5870 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5871 if test $ac_cv_type_off_t = no; then
5872   cat >> confdefs.h <<\EOF
5873 #define off_t long
5874 EOF
5875
5876 fi
5877
5878 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
5879 echo "configure:5880: checking for pid_t" >&5
5880 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
5881   echo $ac_n "(cached) $ac_c" 1>&6
5882 else
5883   cat > conftest.$ac_ext <<EOF
5884 #line 5885 "configure"
5885 #include "confdefs.h"
5886 #include <sys/types.h>
5887 #if STDC_HEADERS
5888 #include <stdlib.h>
5889 #include <stddef.h>
5890 #endif
5891 EOF
5892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5893   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5894   rm -rf conftest*
5895   ac_cv_type_pid_t=yes
5896 else
5897   rm -rf conftest*
5898   ac_cv_type_pid_t=no
5899 fi
5900 rm -f conftest*
5901
5902 fi
5903 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5904 if test $ac_cv_type_pid_t = no; then
5905   cat >> confdefs.h <<\EOF
5906 #define pid_t int
5907 EOF
5908
5909 fi
5910
5911 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5912 echo "configure:5913: checking return type of signal handlers" >&5
5913 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 #include <sys/types.h>
5920 #include <signal.h>
5921 #ifdef signal
5922 #undef signal
5923 #endif
5924 #ifdef __cplusplus
5925 extern "C" void (*signal (int, void (*)(int)))(int);
5926 #else
5927 void (*signal ()) ();
5928 #endif
5929
5930 int main() {
5931 int i;
5932 ; return 0; }
5933 EOF
5934 if { (eval echo configure:5935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5935   rm -rf conftest*
5936   ac_cv_type_signal=void
5937 else
5938   echo "configure: failed program was:" >&5
5939   cat conftest.$ac_ext >&5
5940   rm -rf conftest*
5941   ac_cv_type_signal=int
5942 fi
5943 rm -f conftest*
5944 fi
5945
5946 echo "$ac_t""$ac_cv_type_signal" 1>&6
5947 cat >> confdefs.h <<EOF
5948 #define RETSIGTYPE $ac_cv_type_signal
5949 EOF
5950
5951
5952 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5953 echo "configure:5954: checking for size_t" >&5
5954 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5955   echo $ac_n "(cached) $ac_c" 1>&6
5956 else
5957   cat > conftest.$ac_ext <<EOF
5958 #line 5959 "configure"
5959 #include "confdefs.h"
5960 #include <sys/types.h>
5961 #if STDC_HEADERS
5962 #include <stdlib.h>
5963 #include <stddef.h>
5964 #endif
5965 EOF
5966 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5967   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5968   rm -rf conftest*
5969   ac_cv_type_size_t=yes
5970 else
5971   rm -rf conftest*
5972   ac_cv_type_size_t=no
5973 fi
5974 rm -f conftest*
5975
5976 fi
5977 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5978 if test $ac_cv_type_size_t = no; then
5979   cat >> confdefs.h <<\EOF
5980 #define size_t unsigned
5981 EOF
5982
5983 fi
5984
5985 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
5986 echo "configure:5987: checking for uid_t in sys/types.h" >&5
5987 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
5988   echo $ac_n "(cached) $ac_c" 1>&6
5989 else
5990   cat > conftest.$ac_ext <<EOF
5991 #line 5992 "configure"
5992 #include "confdefs.h"
5993 #include <sys/types.h>
5994 EOF
5995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5996   egrep "uid_t" >/dev/null 2>&1; then
5997   rm -rf conftest*
5998   ac_cv_type_uid_t=yes
5999 else
6000   rm -rf conftest*
6001   ac_cv_type_uid_t=no
6002 fi
6003 rm -f conftest*
6004
6005 fi
6006
6007 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6008 if test $ac_cv_type_uid_t = no; then
6009   cat >> confdefs.h <<\EOF
6010 #define uid_t int
6011 EOF
6012
6013   cat >> confdefs.h <<\EOF
6014 #define gid_t int
6015 EOF
6016
6017 fi
6018
6019 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
6020 echo "configure:6021: checking for st_blksize in struct stat" >&5
6021 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
6022   echo $ac_n "(cached) $ac_c" 1>&6
6023 else
6024   cat > conftest.$ac_ext <<EOF
6025 #line 6026 "configure"
6026 #include "confdefs.h"
6027 #include <sys/types.h>
6028 #include <sys/stat.h>
6029 int main() {
6030 struct stat s; s.st_blksize;
6031 ; return 0; }
6032 EOF
6033 if { (eval echo configure:6034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6034   rm -rf conftest*
6035   ac_cv_struct_st_blksize=yes
6036 else
6037   echo "configure: failed program was:" >&5
6038   cat conftest.$ac_ext >&5
6039   rm -rf conftest*
6040   ac_cv_struct_st_blksize=no
6041 fi
6042 rm -f conftest*
6043 fi
6044
6045 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
6046 if test $ac_cv_struct_st_blksize = yes; then
6047   cat >> confdefs.h <<\EOF
6048 #define HAVE_ST_BLKSIZE 1
6049 EOF
6050
6051 fi
6052
6053 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6054 echo "configure:6055: checking whether time.h and sys/time.h may both be included" >&5
6055 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6056   echo $ac_n "(cached) $ac_c" 1>&6
6057 else
6058   cat > conftest.$ac_ext <<EOF
6059 #line 6060 "configure"
6060 #include "confdefs.h"
6061 #include <sys/types.h>
6062 #include <sys/time.h>
6063 #include <time.h>
6064 int main() {
6065 struct tm *tp;
6066 ; return 0; }
6067 EOF
6068 if { (eval echo configure:6069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6069   rm -rf conftest*
6070   ac_cv_header_time=yes
6071 else
6072   echo "configure: failed program was:" >&5
6073   cat conftest.$ac_ext >&5
6074   rm -rf conftest*
6075   ac_cv_header_time=no
6076 fi
6077 rm -f conftest*
6078 fi
6079
6080 echo "$ac_t""$ac_cv_header_time" 1>&6
6081 if test $ac_cv_header_time = yes; then
6082   cat >> confdefs.h <<\EOF
6083 #define TIME_WITH_SYS_TIME 1
6084 EOF
6085
6086 fi
6087
6088 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6089 echo "configure:6090: checking whether struct tm is in sys/time.h or time.h" >&5
6090 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6091   echo $ac_n "(cached) $ac_c" 1>&6
6092 else
6093   cat > conftest.$ac_ext <<EOF
6094 #line 6095 "configure"
6095 #include "confdefs.h"
6096 #include <sys/types.h>
6097 #include <time.h>
6098 int main() {
6099 struct tm *tp; tp->tm_sec;
6100 ; return 0; }
6101 EOF
6102 if { (eval echo configure:6103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6103   rm -rf conftest*
6104   ac_cv_struct_tm=time.h
6105 else
6106   echo "configure: failed program was:" >&5
6107   cat conftest.$ac_ext >&5
6108   rm -rf conftest*
6109   ac_cv_struct_tm=sys/time.h
6110 fi
6111 rm -f conftest*
6112 fi
6113
6114 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6115 if test $ac_cv_struct_tm = sys/time.h; then
6116   cat >> confdefs.h <<\EOF
6117 #define TM_IN_SYS_TIME 1
6118 EOF
6119
6120 fi
6121
6122
6123
6124 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
6125 echo "configure:6126: checking if toupper() requires islower()" >&5
6126 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
6127   echo $ac_n "(cached) $ac_c" 1>&6
6128 else
6129   
6130         if test "$cross_compiling" = yes; then
6131   ol_cv_c_upper_lower=safe
6132 else
6133   cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136
6137 #include <ctype.h>
6138 main()
6139 {
6140         if ('C' == toupper('C'))
6141                 exit(0);
6142         else
6143                 exit(1);
6144 }
6145 EOF
6146 if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6147 then
6148   ol_cv_c_upper_lower=no
6149 else
6150   echo "configure: failed program was:" >&5
6151   cat conftest.$ac_ext >&5
6152   rm -fr conftest*
6153   ol_cv_c_upper_lower=yes
6154 fi
6155 rm -fr conftest*
6156 fi
6157
6158 fi
6159
6160 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
6161 if test $ol_cv_c_upper_lower != no ; then
6162         cat >> confdefs.h <<\EOF
6163 #define C_UPPER_LOWER 1
6164 EOF
6165
6166 fi
6167
6168 echo $ac_n "checking for working const""... $ac_c" 1>&6
6169 echo "configure:6170: checking for working const" >&5
6170 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6171   echo $ac_n "(cached) $ac_c" 1>&6
6172 else
6173   cat > conftest.$ac_ext <<EOF
6174 #line 6175 "configure"
6175 #include "confdefs.h"
6176
6177 int main() {
6178
6179 /* Ultrix mips cc rejects this.  */
6180 typedef int charset[2]; const charset x;
6181 /* SunOS 4.1.1 cc rejects this.  */
6182 char const *const *ccp;
6183 char **p;
6184 /* NEC SVR4.0.2 mips cc rejects this.  */
6185 struct point {int x, y;};
6186 static struct point const zero = {0,0};
6187 /* AIX XL C 1.02.0.0 rejects this.
6188    It does not let you subtract one const X* pointer from another in an arm
6189    of an if-expression whose if-part is not a constant expression */
6190 const char *g = "string";
6191 ccp = &g + (g ? g-g : 0);
6192 /* HPUX 7.0 cc rejects these. */
6193 ++ccp;
6194 p = (char**) ccp;
6195 ccp = (char const *const *) p;
6196 { /* SCO 3.2v4 cc rejects this.  */
6197   char *t;
6198   char const *s = 0 ? (char *) 0 : (char const *) 0;
6199
6200   *t++ = 0;
6201 }
6202 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
6203   int x[] = {25, 17};
6204   const int *foo = &x[0];
6205   ++foo;
6206 }
6207 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6208   typedef const int *iptr;
6209   iptr p = 0;
6210   ++p;
6211 }
6212 { /* AIX XL C 1.02.0.0 rejects this saying
6213      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6214   struct s { int j; const int *ap[3]; };
6215   struct s *b; b->j = 5;
6216 }
6217 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6218   const int foo = 10;
6219 }
6220
6221 ; return 0; }
6222 EOF
6223 if { (eval echo configure:6224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6224   rm -rf conftest*
6225   ac_cv_c_const=yes
6226 else
6227   echo "configure: failed program was:" >&5
6228   cat conftest.$ac_ext >&5
6229   rm -rf conftest*
6230   ac_cv_c_const=no
6231 fi
6232 rm -f conftest*
6233 fi
6234
6235 echo "$ac_t""$ac_cv_c_const" 1>&6
6236 if test $ac_cv_c_const = no; then
6237   cat >> confdefs.h <<\EOF
6238 #define const 
6239 EOF
6240
6241 fi
6242
6243
6244
6245 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
6246 echo "configure:6247: checking for 8-bit clean memcmp" >&5
6247 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
6248   echo $ac_n "(cached) $ac_c" 1>&6
6249 else
6250   if test "$cross_compiling" = yes; then
6251   ac_cv_func_memcmp_clean=no
6252 else
6253   cat > conftest.$ac_ext <<EOF
6254 #line 6255 "configure"
6255 #include "confdefs.h"
6256
6257 main()
6258 {
6259   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
6260   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
6261 }
6262
6263 EOF
6264 if { (eval echo configure:6265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6265 then
6266   ac_cv_func_memcmp_clean=yes
6267 else
6268   echo "configure: failed program was:" >&5
6269   cat conftest.$ac_ext >&5
6270   rm -fr conftest*
6271   ac_cv_func_memcmp_clean=no
6272 fi
6273 rm -fr conftest*
6274 fi
6275
6276 fi
6277
6278 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
6279 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
6280
6281 echo $ac_n "checking for strftime""... $ac_c" 1>&6
6282 echo "configure:6283: checking for strftime" >&5
6283 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
6284   echo $ac_n "(cached) $ac_c" 1>&6
6285 else
6286   cat > conftest.$ac_ext <<EOF
6287 #line 6288 "configure"
6288 #include "confdefs.h"
6289 /* System header to define __stub macros and hopefully few prototypes,
6290     which can conflict with char strftime(); below.  */
6291 #include <assert.h>
6292 /* Override any gcc2 internal prototype to avoid an error.  */
6293 /* We use char because int might match the return type of a gcc2
6294     builtin and then its argument prototype would still apply.  */
6295 char strftime();
6296
6297 int main() {
6298
6299 /* The GNU C library defines this for functions which it implements
6300     to always fail with ENOSYS.  Some functions are actually named
6301     something starting with __ and the normal name is an alias.  */
6302 #if defined (__stub_strftime) || defined (__stub___strftime)
6303 choke me
6304 #else
6305 strftime();
6306 #endif
6307
6308 ; return 0; }
6309 EOF
6310 if { (eval echo configure:6311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6311   rm -rf conftest*
6312   eval "ac_cv_func_strftime=yes"
6313 else
6314   echo "configure: failed program was:" >&5
6315   cat conftest.$ac_ext >&5
6316   rm -rf conftest*
6317   eval "ac_cv_func_strftime=no"
6318 fi
6319 rm -f conftest*
6320 fi
6321
6322 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
6323   echo "$ac_t""yes" 1>&6
6324   cat >> confdefs.h <<\EOF
6325 #define HAVE_STRFTIME 1
6326 EOF
6327
6328 else
6329   echo "$ac_t""no" 1>&6
6330 # strftime is in -lintl on SCO UNIX.
6331 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
6332 echo "configure:6333: checking for strftime in -lintl" >&5
6333 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
6334 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6335   echo $ac_n "(cached) $ac_c" 1>&6
6336 else
6337   ac_save_LIBS="$LIBS"
6338 LIBS="-lintl  $LIBS"
6339 cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6342 /* Override any gcc2 internal prototype to avoid an error.  */
6343 /* We use char because int might match the return type of a gcc2
6344     builtin and then its argument prototype would still apply.  */
6345 char strftime();
6346
6347 int main() {
6348 strftime()
6349 ; return 0; }
6350 EOF
6351 if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6352   rm -rf conftest*
6353   eval "ac_cv_lib_$ac_lib_var=yes"
6354 else
6355   echo "configure: failed program was:" >&5
6356   cat conftest.$ac_ext >&5
6357   rm -rf conftest*
6358   eval "ac_cv_lib_$ac_lib_var=no"
6359 fi
6360 rm -f conftest*
6361 LIBS="$ac_save_LIBS"
6362
6363 fi
6364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6365   echo "$ac_t""yes" 1>&6
6366   cat >> confdefs.h <<\EOF
6367 #define HAVE_STRFTIME 1
6368 EOF
6369
6370 LIBS="-lintl $LIBS"
6371 else
6372   echo "$ac_t""no" 1>&6
6373 fi
6374
6375 fi
6376
6377 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
6378 echo "configure:6379: checking for vprintf" >&5
6379 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
6380   echo $ac_n "(cached) $ac_c" 1>&6
6381 else
6382   cat > conftest.$ac_ext <<EOF
6383 #line 6384 "configure"
6384 #include "confdefs.h"
6385 /* System header to define __stub macros and hopefully few prototypes,
6386     which can conflict with char vprintf(); below.  */
6387 #include <assert.h>
6388 /* Override any gcc2 internal prototype to avoid an error.  */
6389 /* We use char because int might match the return type of a gcc2
6390     builtin and then its argument prototype would still apply.  */
6391 char vprintf();
6392
6393 int main() {
6394
6395 /* The GNU C library defines this for functions which it implements
6396     to always fail with ENOSYS.  Some functions are actually named
6397     something starting with __ and the normal name is an alias.  */
6398 #if defined (__stub_vprintf) || defined (__stub___vprintf)
6399 choke me
6400 #else
6401 vprintf();
6402 #endif
6403
6404 ; return 0; }
6405 EOF
6406 if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6407   rm -rf conftest*
6408   eval "ac_cv_func_vprintf=yes"
6409 else
6410   echo "configure: failed program was:" >&5
6411   cat conftest.$ac_ext >&5
6412   rm -rf conftest*
6413   eval "ac_cv_func_vprintf=no"
6414 fi
6415 rm -f conftest*
6416 fi
6417
6418 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
6419   echo "$ac_t""yes" 1>&6
6420   cat >> confdefs.h <<\EOF
6421 #define HAVE_VPRINTF 1
6422 EOF
6423
6424 else
6425   echo "$ac_t""no" 1>&6
6426 fi
6427
6428 if test "$ac_cv_func_vprintf" != yes; then
6429 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
6430 echo "configure:6431: checking for _doprnt" >&5
6431 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
6432   echo $ac_n "(cached) $ac_c" 1>&6
6433 else
6434   cat > conftest.$ac_ext <<EOF
6435 #line 6436 "configure"
6436 #include "confdefs.h"
6437 /* System header to define __stub macros and hopefully few prototypes,
6438     which can conflict with char _doprnt(); below.  */
6439 #include <assert.h>
6440 /* Override any gcc2 internal prototype to avoid an error.  */
6441 /* We use char because int might match the return type of a gcc2
6442     builtin and then its argument prototype would still apply.  */
6443 char _doprnt();
6444
6445 int main() {
6446
6447 /* The GNU C library defines this for functions which it implements
6448     to always fail with ENOSYS.  Some functions are actually named
6449     something starting with __ and the normal name is an alias.  */
6450 #if defined (__stub__doprnt) || defined (__stub____doprnt)
6451 choke me
6452 #else
6453 _doprnt();
6454 #endif
6455
6456 ; return 0; }
6457 EOF
6458 if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6459   rm -rf conftest*
6460   eval "ac_cv_func__doprnt=yes"
6461 else
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_func__doprnt=no"
6466 fi
6467 rm -f conftest*
6468 fi
6469
6470 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
6471   echo "$ac_t""yes" 1>&6
6472   cat >> confdefs.h <<\EOF
6473 #define HAVE_DOPRNT 1
6474 EOF
6475
6476 else
6477   echo "$ac_t""no" 1>&6
6478 fi
6479
6480 fi
6481
6482
6483 if test $ac_cv_func_vprintf = yes ; then
6484                 for ac_func in vsnprintf
6485 do
6486 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6487 echo "configure:6488: checking for $ac_func" >&5
6488 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6489   echo $ac_n "(cached) $ac_c" 1>&6
6490 else
6491   cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* System header to define __stub macros and hopefully few prototypes,
6495     which can conflict with char $ac_func(); below.  */
6496 #include <assert.h>
6497 /* Override any gcc2 internal prototype to avoid an error.  */
6498 /* We use char because int might match the return type of a gcc2
6499     builtin and then its argument prototype would still apply.  */
6500 char $ac_func();
6501
6502 int main() {
6503
6504 /* The GNU C library defines this for functions which it implements
6505     to always fail with ENOSYS.  Some functions are actually named
6506     something starting with __ and the normal name is an alias.  */
6507 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6508 choke me
6509 #else
6510 $ac_func();
6511 #endif
6512
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6516   rm -rf conftest*
6517   eval "ac_cv_func_$ac_func=yes"
6518 else
6519   echo "configure: failed program was:" >&5
6520   cat conftest.$ac_ext >&5
6521   rm -rf conftest*
6522   eval "ac_cv_func_$ac_func=no"
6523 fi
6524 rm -f conftest*
6525 fi
6526
6527 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6528   echo "$ac_t""yes" 1>&6
6529     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6530   cat >> confdefs.h <<EOF
6531 #define $ac_tr_func 1
6532 EOF
6533  
6534 else
6535   echo "$ac_t""no" 1>&6
6536 fi
6537 done
6538
6539 fi
6540
6541 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
6542 echo "configure:6543: checking for wait3 that fills in rusage" >&5
6543 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   if test "$cross_compiling" = yes; then
6547   ac_cv_func_wait3_rusage=no
6548 else
6549   cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552 #include <sys/types.h>
6553 #include <sys/time.h>
6554 #include <sys/resource.h>
6555 #include <stdio.h>
6556 /* HP-UX has wait3 but does not fill in rusage at all.  */
6557 main() {
6558   struct rusage r;
6559   int i;
6560   /* Use a field that we can force nonzero --
6561      voluntary context switches.
6562      For systems like NeXT and OSF/1 that don't set it,
6563      also use the system CPU time.  And page faults (I/O) for Linux.  */
6564   r.ru_nvcsw = 0;
6565   r.ru_stime.tv_sec = 0;
6566   r.ru_stime.tv_usec = 0;
6567   r.ru_majflt = r.ru_minflt = 0;
6568   switch (fork()) {
6569   case 0: /* Child.  */
6570     sleep(1); /* Give up the CPU.  */
6571     _exit(0);
6572   case -1: _exit(0); /* What can we do?  */
6573   default: /* Parent.  */
6574     wait3(&i, 0, &r);
6575     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
6576     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
6577          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
6578   }
6579 }
6580 EOF
6581 if { (eval echo configure:6582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6582 then
6583   ac_cv_func_wait3_rusage=yes
6584 else
6585   echo "configure: failed program was:" >&5
6586   cat conftest.$ac_ext >&5
6587   rm -fr conftest*
6588   ac_cv_func_wait3_rusage=no
6589 fi
6590 rm -fr conftest*
6591 fi
6592
6593 fi
6594
6595 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
6596 if test $ac_cv_func_wait3_rusage = yes; then
6597   cat >> confdefs.h <<\EOF
6598 #define HAVE_WAIT3 1
6599 EOF
6600
6601 fi
6602
6603
6604 for ac_func in \
6605         bcopy                   \
6606         getopt                  \
6607         flock                   \
6608         gethostname             \
6609         gettimeofday    \
6610         getdtablesize   \
6611         lockf                   \
6612         memcpy                  \
6613         memmove                 \
6614         mkstemp                 \
6615         mktime                  \
6616         res_search              \
6617         select                  \
6618         setpwfile               \
6619         setsid                  \
6620         signal                  \
6621         sigset                  \
6622         snprintf                \
6623         socket                  \
6624         strerror                \
6625         strstr                  \
6626         strrchr                 \
6627         strsep                  \
6628         strtod                  \
6629         strtol                  \
6630         strtoul                 \
6631         sysconf                 \
6632         tempnam                 \
6633         waitpid                 \
6634
6635 do
6636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6637 echo "configure:6638: checking for $ac_func" >&5
6638 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6639   echo $ac_n "(cached) $ac_c" 1>&6
6640 else
6641   cat > conftest.$ac_ext <<EOF
6642 #line 6643 "configure"
6643 #include "confdefs.h"
6644 /* System header to define __stub macros and hopefully few prototypes,
6645     which can conflict with char $ac_func(); below.  */
6646 #include <assert.h>
6647 /* Override any gcc2 internal prototype to avoid an error.  */
6648 /* We use char because int might match the return type of a gcc2
6649     builtin and then its argument prototype would still apply.  */
6650 char $ac_func();
6651
6652 int main() {
6653
6654 /* The GNU C library defines this for functions which it implements
6655     to always fail with ENOSYS.  Some functions are actually named
6656     something starting with __ and the normal name is an alias.  */
6657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6658 choke me
6659 #else
6660 $ac_func();
6661 #endif
6662
6663 ; return 0; }
6664 EOF
6665 if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6666   rm -rf conftest*
6667   eval "ac_cv_func_$ac_func=yes"
6668 else
6669   echo "configure: failed program was:" >&5
6670   cat conftest.$ac_ext >&5
6671   rm -rf conftest*
6672   eval "ac_cv_func_$ac_func=no"
6673 fi
6674 rm -f conftest*
6675 fi
6676
6677 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6678   echo "$ac_t""yes" 1>&6
6679     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6680   cat >> confdefs.h <<EOF
6681 #define $ac_tr_func 1
6682 EOF
6683  
6684 else
6685   echo "$ac_t""no" 1>&6
6686 fi
6687 done
6688
6689
6690 for ac_func in getopt strdup tempnam
6691 do
6692 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6693 echo "configure:6694: checking for $ac_func" >&5
6694 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   cat > conftest.$ac_ext <<EOF
6698 #line 6699 "configure"
6699 #include "confdefs.h"
6700 /* System header to define __stub macros and hopefully few prototypes,
6701     which can conflict with char $ac_func(); below.  */
6702 #include <assert.h>
6703 /* Override any gcc2 internal prototype to avoid an error.  */
6704 /* We use char because int might match the return type of a gcc2
6705     builtin and then its argument prototype would still apply.  */
6706 char $ac_func();
6707
6708 int main() {
6709
6710 /* The GNU C library defines this for functions which it implements
6711     to always fail with ENOSYS.  Some functions are actually named
6712     something starting with __ and the normal name is an alias.  */
6713 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6714 choke me
6715 #else
6716 $ac_func();
6717 #endif
6718
6719 ; return 0; }
6720 EOF
6721 if { (eval echo configure:6722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6722   rm -rf conftest*
6723   eval "ac_cv_func_$ac_func=yes"
6724 else
6725   echo "configure: failed program was:" >&5
6726   cat conftest.$ac_ext >&5
6727   rm -rf conftest*
6728   eval "ac_cv_func_$ac_func=no"
6729 fi
6730 rm -f conftest*
6731 fi
6732
6733 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6734   echo "$ac_t""yes" 1>&6
6735     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6736   cat >> confdefs.h <<EOF
6737 #define $ac_tr_func 1
6738 EOF
6739  
6740 else
6741   echo "$ac_t""no" 1>&6
6742 LIBOBJS="$LIBOBJS ${ac_func}.o"
6743 fi
6744 done
6745
6746
6747
6748 # Check Configuration
6749
6750 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
6751 echo "configure:6752: checking declaration of sys_errlist" >&5
6752 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
6753   echo $ac_n "(cached) $ac_c" 1>&6
6754 else
6755   
6756         cat > conftest.$ac_ext <<EOF
6757 #line 6758 "configure"
6758 #include "confdefs.h"
6759
6760 #include <stdio.h>
6761 #include <sys/types.h>
6762 #include <errno.h> 
6763 int main() {
6764 char *c = (char *) *sys_errlist
6765 ; return 0; }
6766 EOF
6767 if { (eval echo configure:6768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6768   rm -rf conftest*
6769   ol_cv_dcl_sys_errlist=yes
6770 else
6771   echo "configure: failed program was:" >&5
6772   cat conftest.$ac_ext >&5
6773   rm -rf conftest*
6774   ol_cv_dcl_sys_errlist=no
6775 fi
6776 rm -f conftest*
6777 fi
6778
6779 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
6780
6781 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
6782 if test $ol_cv_dcl_sys_errlist = no ; then
6783         cat >> confdefs.h <<\EOF
6784 #define DECL_SYS_ERRLIST 1
6785 EOF
6786
6787         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
6788 echo "configure:6789: checking existence of sys_errlist" >&5
6789         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
6790   echo $ac_n "(cached) $ac_c" 1>&6
6791 else
6792   
6793                 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 #include <errno.h>
6797 int main() {
6798 char *c = (char *) *sys_errlist
6799 ; return 0; }
6800 EOF
6801 if { (eval echo configure:6802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6802   rm -rf conftest*
6803   ol_cv_have_sys_errlist=yes
6804 else
6805   echo "configure: failed program was:" >&5
6806   cat conftest.$ac_ext >&5
6807   rm -rf conftest*
6808   ol_cv_have_sys_errlist=no
6809 fi
6810 rm -f conftest*
6811 fi
6812
6813         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
6814 fi
6815
6816
6817
6818 if test $ol_enable_debug != no ; then
6819         cat >> confdefs.h <<\EOF
6820 #define LDAP_DEBUG 1
6821 EOF
6822
6823 fi
6824 if test $ol_enable_libui = yes ; then
6825         cat >> confdefs.h <<\EOF
6826 #define LDAP_LIBUI 1
6827 EOF
6828
6829 fi
6830 if test $ol_enable_cache = no ; then
6831         cat >> confdefs.h <<\EOF
6832 #define LDAP_NOCACHE 1
6833 EOF
6834
6835 fi
6836 if test $ol_enable_dns != no ; then
6837         cat >> confdefs.h <<\EOF
6838 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_API_VENDOR_VERSION
6839 EOF
6840
6841 fi
6842 if test $ol_enable_proctitle != no ; then
6843         cat >> confdefs.h <<\EOF
6844 #define LDAP_PROCTITLE 1
6845 EOF
6846
6847 fi
6848 if test $ol_enable_referrals != no ; then
6849         cat >> confdefs.h <<\EOF
6850 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_API_VENDOR_VERSION
6851 EOF
6852
6853 fi
6854 if test $ol_enable_cldap != no ; then
6855         cat >> confdefs.h <<\EOF
6856 #define LDAP_CONNECTIONLESS 1
6857 EOF
6858
6859 fi
6860
6861 if test $ol_enable_aclgroups != no ; then
6862         cat >> confdefs.h <<\EOF
6863 #define SLAPD_ACLGROUPS 1
6864 EOF
6865
6866 fi
6867 if test $ol_enable_crypt != no ; then
6868         cat >> confdefs.h <<\EOF
6869 #define SLAPD_CRYPT 1
6870 EOF
6871
6872 fi
6873 if test $ol_enable_md5 != no ; then
6874         cat >> confdefs.h <<\EOF
6875 #define SLAPD_MD5 1
6876 EOF
6877
6878 fi
6879 if test $ol_enable_sha1 != no ; then
6880         cat >> confdefs.h <<\EOF
6881 #define SLAPD_SHA1 1
6882 EOF
6883
6884 fi
6885 if test $ol_enable_phonetic != no ; then
6886         cat >> confdefs.h <<\EOF
6887 #define SLAPD_PHONETIC 1
6888 EOF
6889
6890 fi
6891 if test $ol_enable_rlookups != no ; then
6892         cat >> confdefs.h <<\EOF
6893 #define SLAPD_RLOOKUPS 1
6894 EOF
6895
6896 fi
6897
6898 if test $ol_link_ldbm != no ; then
6899         cat >> confdefs.h <<\EOF
6900 #define SLAPD_LDBM 1
6901 EOF
6902
6903         BUILD_SLAPD=yes
6904         BUILD_LDBM=yes
6905 fi
6906
6907 if test $ol_enable_passwd != no ; then
6908         cat >> confdefs.h <<\EOF
6909 #define SLAPD_PASSWD 1
6910 EOF
6911
6912         BUILD_SLAPD=yes
6913         BUILD_PASSWD=yes
6914 fi
6915
6916 if test $ol_enable_shell != no ; then
6917         cat >> confdefs.h <<\EOF
6918 #define SLAPD_SHELL 1
6919 EOF
6920
6921         BUILD_SLAPD=yes
6922         BUILD_SHELL=yes
6923 fi
6924
6925 if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
6926         $BUILD_SLAPD = yes ; then
6927         BUILD_SLURPD=yes
6928 fi
6929
6930 if test $ol_link_isode != no ; then
6931         BUILD_LDAPD=yes
6932 fi
6933
6934
6935
6936
6937   
6938   
6939   
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955 trap '' 1 2 15
6956 cat > confcache <<\EOF
6957 # This file is a shell script that caches the results of configure
6958 # tests run on this system so they can be shared between configure
6959 # scripts and configure runs.  It is not useful on other systems.
6960 # If it contains results you don't want to keep, you may remove or edit it.
6961 #
6962 # By default, configure uses ./config.cache as the cache file,
6963 # creating it if it does not exist already.  You can give configure
6964 # the --cache-file=FILE option to use a different cache file; that is
6965 # what configure does when it calls configure scripts in
6966 # subdirectories, so they share the cache.
6967 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6968 # config.status only pays attention to the cache file if you give it the
6969 # --recheck option to rerun configure.
6970 #
6971 EOF
6972 # The following way of writing the cache mishandles newlines in values,
6973 # but we know of no workaround that is simple, portable, and efficient.
6974 # So, don't put newlines in cache variables' values.
6975 # Ultrix sh set writes to stderr and can't be redirected directly,
6976 # and sets the high bit in the cache file unless we assign to the vars.
6977 (set) 2>&1 |
6978   case `(ac_space=' '; set) 2>&1` in
6979   *ac_space=\ *)
6980     # `set' does not quote correctly, so add quotes (double-quote substitution
6981     # turns \\\\ into \\, and sed turns \\ into \).
6982     sed -n \
6983       -e "s/'/'\\\\''/g" \
6984       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6985     ;;
6986   *)
6987     # `set' quotes correctly as required by POSIX, so do not add quotes.
6988     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6989     ;;
6990   esac >> confcache
6991 if cmp -s $cache_file confcache; then
6992   :
6993 else
6994   if test -w $cache_file; then
6995     echo "updating cache $cache_file"
6996     cat confcache > $cache_file
6997   else
6998     echo "not updating unwritable cache $cache_file"
6999   fi
7000 fi
7001 rm -f confcache
7002
7003 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7004
7005 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7006 # Let make expand exec_prefix.
7007 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7008
7009 # Any assignment to VPATH causes Sun make to only execute
7010 # the first set of double-colon rules, so remove it if not needed.
7011 # If there is a colon in the path, we need to keep it.
7012 if test "x$srcdir" = x.; then
7013   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7014 fi
7015
7016 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7017
7018 DEFS=-DHAVE_CONFIG_H
7019
7020 # Without the "./", some shells look in PATH for config.status.
7021 : ${CONFIG_STATUS=./config.status}
7022
7023 echo creating $CONFIG_STATUS
7024 rm -f $CONFIG_STATUS
7025 cat > $CONFIG_STATUS <<EOF
7026 #! /bin/sh
7027 # Generated automatically by configure.
7028 # Run this file to recreate the current configuration.
7029 # This directory was configured as follows,
7030 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7031 #
7032 # $0 $ac_configure_args
7033 #
7034 # Compiler output produced by configure, useful for debugging
7035 # configure, is in ./config.log if it exists.
7036
7037 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7038 for ac_option
7039 do
7040   case "\$ac_option" in
7041   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7042     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7043     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7044   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7045     echo "$CONFIG_STATUS generated by autoconf version 2.12"
7046     exit 0 ;;
7047   -help | --help | --hel | --he | --h)
7048     echo "\$ac_cs_usage"; exit 0 ;;
7049   *) echo "\$ac_cs_usage"; exit 1 ;;
7050   esac
7051 done
7052
7053 ac_given_srcdir=$srcdir
7054 ac_given_INSTALL="$INSTALL"
7055
7056 trap 'rm -fr `echo "\
7057 Makefile:build/top.mk:Makefile.in:build/dir.mk \
7058 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
7059 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
7060 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
7061 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
7062 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
7063 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
7064 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
7065 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
7066 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
7067 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
7068 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
7069 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
7070 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
7071 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
7072 include/Makefile:build/top.mk:include/Makefile.in \
7073 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
7074 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
7075 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
7076 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
7077 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
7078 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
7079 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
7080 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
7081 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
7082 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
7083 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
7084 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
7085 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
7086 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
7087 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
7088 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
7089 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
7090 tests/Makefile:build/top.mk:tests/Makefile.in \
7091  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7092 EOF
7093 cat >> $CONFIG_STATUS <<EOF
7094
7095 # Protect against being on the right side of a sed subst in config.status.
7096 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7097  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7098 $ac_vpsub
7099 $extrasub
7100 s%@CFLAGS@%$CFLAGS%g
7101 s%@CPPFLAGS@%$CPPFLAGS%g
7102 s%@CXXFLAGS@%$CXXFLAGS%g
7103 s%@DEFS@%$DEFS%g
7104 s%@LDFLAGS@%$LDFLAGS%g
7105 s%@LIBS@%$LIBS%g
7106 s%@exec_prefix@%$exec_prefix%g
7107 s%@prefix@%$prefix%g
7108 s%@program_transform_name@%$program_transform_name%g
7109 s%@bindir@%$bindir%g
7110 s%@sbindir@%$sbindir%g
7111 s%@libexecdir@%$libexecdir%g
7112 s%@datadir@%$datadir%g
7113 s%@sysconfdir@%$sysconfdir%g
7114 s%@sharedstatedir@%$sharedstatedir%g
7115 s%@localstatedir@%$localstatedir%g
7116 s%@libdir@%$libdir%g
7117 s%@includedir@%$includedir%g
7118 s%@oldincludedir@%$oldincludedir%g
7119 s%@infodir@%$infodir%g
7120 s%@mandir@%$mandir%g
7121 s%@LN_S@%$LN_S%g
7122 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7123 s%@INSTALL_DATA@%$INSTALL_DATA%g
7124 s%@RANLIB@%$RANLIB%g
7125 s%@SET_MAKE@%$SET_MAKE%g
7126 s%@SENDMAIL@%$SENDMAIL%g
7127 s%@EDITOR@%$EDITOR%g
7128 s%@FINGER@%$FINGER%g
7129 s%@CC@%$CC%g
7130 s%@CPP@%$CPP%g
7131 s%@PEPSY@%$PEPSY%g
7132 s%@LIBOBJS@%$LIBOBJS%g
7133 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
7134 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
7135 s%@BUILD_LDBM@%$BUILD_LDBM%g
7136 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
7137 s%@BUILD_SHELL@%$BUILD_SHELL%g
7138 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
7139 s%@LDAP_LIBS@%$LDAP_LIBS%g
7140 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
7141 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
7142 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
7143 s%@LDBM_LIBS@%$LDBM_LIBS%g
7144 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
7145 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
7146 s%@KRB_LIBS@%$KRB_LIBS%g
7147 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
7148
7149 CEOF
7150 EOF
7151
7152 cat >> $CONFIG_STATUS <<\EOF
7153
7154 # Split the substitutions into bite-sized pieces for seds with
7155 # small command number limits, like on Digital OSF/1 and HP-UX.
7156 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7157 ac_file=1 # Number of current file.
7158 ac_beg=1 # First line for current file.
7159 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7160 ac_more_lines=:
7161 ac_sed_cmds=""
7162 while $ac_more_lines; do
7163   if test $ac_beg -gt 1; then
7164     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7165   else
7166     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7167   fi
7168   if test ! -s conftest.s$ac_file; then
7169     ac_more_lines=false
7170     rm -f conftest.s$ac_file
7171   else
7172     if test -z "$ac_sed_cmds"; then
7173       ac_sed_cmds="sed -f conftest.s$ac_file"
7174     else
7175       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7176     fi
7177     ac_file=`expr $ac_file + 1`
7178     ac_beg=$ac_end
7179     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7180   fi
7181 done
7182 if test -z "$ac_sed_cmds"; then
7183   ac_sed_cmds=cat
7184 fi
7185 EOF
7186
7187 cat >> $CONFIG_STATUS <<EOF
7188
7189 CONFIG_FILES=\${CONFIG_FILES-"\
7190 Makefile:build/top.mk:Makefile.in:build/dir.mk \
7191 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
7192 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
7193 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
7194 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
7195 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
7196 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
7197 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
7198 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
7199 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
7200 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
7201 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
7202 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
7203 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
7204 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
7205 include/Makefile:build/top.mk:include/Makefile.in \
7206 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
7207 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
7208 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
7209 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
7210 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
7211 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
7212 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
7213 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
7214 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
7215 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
7216 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
7217 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
7218 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
7219 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
7220 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
7221 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
7222 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
7223 tests/Makefile:build/top.mk:tests/Makefile.in \
7224 "}
7225 EOF
7226 cat >> $CONFIG_STATUS <<\EOF
7227 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7228   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7229   case "$ac_file" in
7230   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7231        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7232   *) ac_file_in="${ac_file}.in" ;;
7233   esac
7234
7235   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7236
7237   # Remove last slash and all that follows it.  Not all systems have dirname.
7238   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7239   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7240     # The file is in a subdirectory.
7241     test ! -d "$ac_dir" && mkdir "$ac_dir"
7242     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7243     # A "../" for each directory in $ac_dir_suffix.
7244     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7245   else
7246     ac_dir_suffix= ac_dots=
7247   fi
7248
7249   case "$ac_given_srcdir" in
7250   .)  srcdir=.
7251       if test -z "$ac_dots"; then top_srcdir=.
7252       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7253   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7254   *) # Relative path.
7255     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7256     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7257   esac
7258
7259   case "$ac_given_INSTALL" in
7260   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7261   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7262   esac
7263
7264   echo creating "$ac_file"
7265   rm -f "$ac_file"
7266   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7267   case "$ac_file" in
7268   *Makefile*) ac_comsub="1i\\
7269 # $configure_input" ;;
7270   *) ac_comsub= ;;
7271   esac
7272
7273   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7274   sed -e "$ac_comsub
7275 s%@configure_input@%$configure_input%g
7276 s%@srcdir@%$srcdir%g
7277 s%@top_srcdir@%$top_srcdir%g
7278 s%@INSTALL@%$INSTALL%g
7279 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7280 fi; done
7281 rm -f conftest.s*
7282
7283 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7284 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7285 #
7286 # ac_d sets the value in "#define NAME VALUE" lines.
7287 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7288 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7289 ac_dC='\3'
7290 ac_dD='%g'
7291 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7292 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7293 ac_uB='\([      ]\)%\1#\2define\3'
7294 ac_uC=' '
7295 ac_uD='\4%g'
7296 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7297 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7298 ac_eB='$%\1#\2define\3'
7299 ac_eC=' '
7300 ac_eD='%g'
7301
7302 if test "${CONFIG_HEADERS+set}" != set; then
7303 EOF
7304 cat >> $CONFIG_STATUS <<EOF
7305   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
7306 EOF
7307 cat >> $CONFIG_STATUS <<\EOF
7308 fi
7309 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7310   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7311   case "$ac_file" in
7312   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7313        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7314   *) ac_file_in="${ac_file}.in" ;;
7315   esac
7316
7317   echo creating $ac_file
7318
7319   rm -f conftest.frag conftest.in conftest.out
7320   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7321   cat $ac_file_inputs > conftest.in
7322
7323 EOF
7324
7325 # Transform confdefs.h into a sed script conftest.vals that substitutes
7326 # the proper values into config.h.in to produce config.h.  And first:
7327 # Protect against being on the right side of a sed subst in config.status.
7328 # Protect against being in an unquoted here document in config.status.
7329 rm -f conftest.vals
7330 cat > conftest.hdr <<\EOF
7331 s/[\\&%]/\\&/g
7332 s%[\\$`]%\\&%g
7333 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7334 s%ac_d%ac_u%gp
7335 s%ac_u%ac_e%gp
7336 EOF
7337 sed -n -f conftest.hdr confdefs.h > conftest.vals
7338 rm -f conftest.hdr
7339
7340 # This sed command replaces #undef with comments.  This is necessary, for
7341 # example, in the case of _POSIX_SOURCE, which is predefined and required
7342 # on some systems where configure will not decide to define it.
7343 cat >> conftest.vals <<\EOF
7344 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7345 EOF
7346
7347 # Break up conftest.vals because some shells have a limit on
7348 # the size of here documents, and old seds have small limits too.
7349
7350 rm -f conftest.tail
7351 while :
7352 do
7353   ac_lines=`grep -c . conftest.vals`
7354   # grep -c gives empty output for an empty file on some AIX systems.
7355   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7356   # Write a limited-size here document to conftest.frag.
7357   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7358   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7359   echo 'CEOF
7360   sed -f conftest.frag conftest.in > conftest.out
7361   rm -f conftest.in
7362   mv conftest.out conftest.in
7363 ' >> $CONFIG_STATUS
7364   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7365   rm -f conftest.vals
7366   mv conftest.tail conftest.vals
7367 done
7368 rm -f conftest.vals
7369
7370 cat >> $CONFIG_STATUS <<\EOF
7371   rm -f conftest.frag conftest.h
7372   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7373   cat conftest.in >> conftest.h
7374   rm -f conftest.in
7375   if cmp -s $ac_file conftest.h 2>/dev/null; then
7376     echo "$ac_file is unchanged"
7377     rm -f conftest.h
7378   else
7379     # Remove last slash and all that follows it.  Not all systems have dirname.
7380       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7381       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7382       # The file is in a subdirectory.
7383       test ! -d "$ac_dir" && mkdir "$ac_dir"
7384     fi
7385     rm -f $ac_file
7386     mv conftest.h $ac_file
7387   fi
7388 fi; done
7389
7390 EOF
7391 cat >> $CONFIG_STATUS <<EOF
7392
7393 EOF
7394 cat >> $CONFIG_STATUS <<\EOF
7395
7396 date > stamp-h
7397 echo Please \"make depend\" to build dependencies
7398
7399 exit 0
7400 EOF
7401 chmod +x $CONFIG_STATUS
7402 rm -fr confdefs* $ac_clean_files
7403 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7404