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