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