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