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