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