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