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