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