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