]> git.sur5r.net Git - openldap/blob - configure
Fix idl_firstid to return NOID when !(nids > 1) instead of when (nids == 1)
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
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   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-proctitle    enable proctitle support (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   --enable-dmalloc      enable debug malloc support (no)"
33 ac_help="$ac_help
34   --with-kerberos       use Kerberos (auto)"
35 ac_help="$ac_help
36   --with-threads        use threads (auto)"
37 ac_help="$ac_help
38   --with-yielding-select        with implicitly yielding select (auto)"
39 ac_help="$ac_help
40 LDAPD Options:"
41 ac_help="$ac_help
42   --enable-ldapd        enable building ldapd (no)"
43 ac_help="$ac_help
44 SLAPD Options:"
45 ac_help="$ac_help
46   --enable-slapd        enable building slapd (yes)"
47 ac_help="$ac_help
48     --enable-aclgroups  enable ACL group support (auto)"
49 ac_help="$ac_help
50     --enable-cleartext  enable cleartext passwords (yes)"
51 ac_help="$ac_help
52     --enable-crypt      enable crypt(3) passwords (auto)"
53 ac_help="$ac_help
54     --enable-wrappers   enable tcp wrapper support (no)"
55 ac_help="$ac_help
56     --enable-phonetic   enable phonetic/soundex (no)"
57 ac_help="$ac_help
58     --enable-rlookups   enable reverse lookups (auto)"
59 ac_help="$ac_help
60     --enable-bdb2       enable bdb2 backend (no)"
61 ac_help="$ac_help
62     --enable-ldbm       enable ldbm backend (yes)"
63 ac_help="$ac_help
64       --with-ldbm-api   use LDBM API (auto)"
65 ac_help="$ac_help
66       --with-ldbm-type  use LDBM type (auto)"
67 ac_help="$ac_help
68     --enable-passwd     enable passwd backend (no)"
69 ac_help="$ac_help
70     --enable-perl       enable perl backend (no)"
71 ac_help="$ac_help
72     --enable-shell      enable shell backend (no)"
73 ac_help="$ac_help
74 SLURPD Options:"
75 ac_help="$ac_help
76   --enable-slurpd       enable building slurpd (auto)"
77 ac_help="$ac_help
78 Library Generation & Linking Options"
79 ac_help="$ac_help
80   --enable-static         build static libraries [default=yes]
81   --enable-static=PKGS    only build shared libraries if the current package
82                           appears as an element in the PKGS list"
83 ac_help="$ac_help
84   --enable-shared         build shared libraries [default=yes]
85   --enable-shared=PKGS    only build shared libraries if the current package
86                           appears as an element in the PKGS list"
87 ac_help="$ac_help
88   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
89
90 # Initialize some variables set by options.
91 # The variables have the same names as the options, with
92 # dashes changed to underlines.
93 build=NONE
94 cache_file=./config.cache
95 exec_prefix=NONE
96 host=NONE
97 no_create=
98 nonopt=NONE
99 no_recursion=
100 prefix=NONE
101 program_prefix=NONE
102 program_suffix=NONE
103 program_transform_name=s,x,x,
104 silent=
105 site=
106 srcdir=
107 target=NONE
108 verbose=
109 x_includes=NONE
110 x_libraries=NONE
111 bindir='${exec_prefix}/bin'
112 sbindir='${exec_prefix}/sbin'
113 libexecdir='${exec_prefix}/libexec'
114 datadir='${prefix}/share'
115 sysconfdir='${prefix}/etc'
116 sharedstatedir='${prefix}/com'
117 localstatedir='${prefix}/var'
118 libdir='${exec_prefix}/lib'
119 includedir='${prefix}/include'
120 oldincludedir='/usr/include'
121 infodir='${prefix}/info'
122 mandir='${prefix}/man'
123
124 # Initialize some other variables.
125 subdirs=
126 MFLAGS= MAKEFLAGS=
127 SHELL=${CONFIG_SHELL-/bin/sh}
128 # Maximum number of lines to put in a shell here document.
129 ac_max_here_lines=12
130
131 ac_prev=
132 for ac_option
133 do
134
135   # If the previous option needs an argument, assign it.
136   if test -n "$ac_prev"; then
137     eval "$ac_prev=\$ac_option"
138     ac_prev=
139     continue
140   fi
141
142   case "$ac_option" in
143   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
144   *) ac_optarg= ;;
145   esac
146
147   # Accept the important Cygnus configure options, so we can diagnose typos.
148
149   case "$ac_option" in
150
151   -bindir | --bindir | --bindi | --bind | --bin | --bi)
152     ac_prev=bindir ;;
153   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
154     bindir="$ac_optarg" ;;
155
156   -build | --build | --buil | --bui | --bu)
157     ac_prev=build ;;
158   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
159     build="$ac_optarg" ;;
160
161   -cache-file | --cache-file | --cache-fil | --cache-fi \
162   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
163     ac_prev=cache_file ;;
164   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
165   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
166     cache_file="$ac_optarg" ;;
167
168   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
169     ac_prev=datadir ;;
170   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
171   | --da=*)
172     datadir="$ac_optarg" ;;
173
174   -disable-* | --disable-*)
175     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
176     # Reject names that are not valid shell variable names.
177     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
178       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
179     fi
180     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
181     eval "enable_${ac_feature}=no" ;;
182
183   -enable-* | --enable-*)
184     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
185     # Reject names that are not valid shell variable names.
186     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
187       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
188     fi
189     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
190     case "$ac_option" in
191       *=*) ;;
192       *) ac_optarg=yes ;;
193     esac
194     eval "enable_${ac_feature}='$ac_optarg'" ;;
195
196   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
197   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
198   | --exec | --exe | --ex)
199     ac_prev=exec_prefix ;;
200   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
201   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
202   | --exec=* | --exe=* | --ex=*)
203     exec_prefix="$ac_optarg" ;;
204
205   -gas | --gas | --ga | --g)
206     # Obsolete; use --with-gas.
207     with_gas=yes ;;
208
209   -help | --help | --hel | --he)
210     # Omit some internal or obsolete options to make the list less imposing.
211     # This message is too long to be a string in the A/UX 3.1 sh.
212     cat << EOF
213 Usage: configure [options] [host]
214 Options: [defaults in brackets after descriptions]
215 Configuration:
216   --cache-file=FILE       cache test results in FILE
217   --help                  print this message
218   --no-create             do not create output files
219   --quiet, --silent       do not print \`checking...' messages
220   --version               print the version of autoconf that created configure
221 Directory and file names:
222   --prefix=PREFIX         install architecture-independent files in PREFIX
223                           [$ac_default_prefix]
224   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
225                           [same as prefix]
226   --bindir=DIR            user executables in DIR [EPREFIX/bin]
227   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
228   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
229   --datadir=DIR           read-only architecture-independent data in DIR
230                           [PREFIX/share]
231   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
232   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
233                           [PREFIX/com]
234   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
235   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
236   --includedir=DIR        C header files in DIR [PREFIX/include]
237   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
238   --infodir=DIR           info documentation in DIR [PREFIX/info]
239   --mandir=DIR            man documentation in DIR [PREFIX/man]
240   --srcdir=DIR            find the sources in DIR [configure dir or ..]
241   --program-prefix=PREFIX prepend PREFIX to installed program names
242   --program-suffix=SUFFIX append SUFFIX to installed program names
243   --program-transform-name=PROGRAM
244                           run sed PROGRAM on installed program names
245 EOF
246     cat << EOF
247 Host type:
248   --build=BUILD           configure for building on BUILD [BUILD=HOST]
249   --host=HOST             configure for HOST [guessed]
250   --target=TARGET         configure for TARGET [TARGET=HOST]
251 Features and packages:
252   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
253   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
254   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
255   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
256   --x-includes=DIR        X include files are in DIR
257   --x-libraries=DIR       X library files are in DIR
258 EOF
259     if test -n "$ac_help"; then
260       echo "--enable and --with options recognized:$ac_help"
261     fi
262     exit 0 ;;
263
264   -host | --host | --hos | --ho)
265     ac_prev=host ;;
266   -host=* | --host=* | --hos=* | --ho=*)
267     host="$ac_optarg" ;;
268
269   -includedir | --includedir | --includedi | --included | --include \
270   | --includ | --inclu | --incl | --inc)
271     ac_prev=includedir ;;
272   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
273   | --includ=* | --inclu=* | --incl=* | --inc=*)
274     includedir="$ac_optarg" ;;
275
276   -infodir | --infodir | --infodi | --infod | --info | --inf)
277     ac_prev=infodir ;;
278   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
279     infodir="$ac_optarg" ;;
280
281   -libdir | --libdir | --libdi | --libd)
282     ac_prev=libdir ;;
283   -libdir=* | --libdir=* | --libdi=* | --libd=*)
284     libdir="$ac_optarg" ;;
285
286   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
287   | --libexe | --libex | --libe)
288     ac_prev=libexecdir ;;
289   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
290   | --libexe=* | --libex=* | --libe=*)
291     libexecdir="$ac_optarg" ;;
292
293   -localstatedir | --localstatedir | --localstatedi | --localstated \
294   | --localstate | --localstat | --localsta | --localst \
295   | --locals | --local | --loca | --loc | --lo)
296     ac_prev=localstatedir ;;
297   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
298   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
299   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
300     localstatedir="$ac_optarg" ;;
301
302   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
303     ac_prev=mandir ;;
304   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
305     mandir="$ac_optarg" ;;
306
307   -nfp | --nfp | --nf)
308     # Obsolete; use --without-fp.
309     with_fp=no ;;
310
311   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
312   | --no-cr | --no-c)
313     no_create=yes ;;
314
315   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
316   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
317     no_recursion=yes ;;
318
319   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
320   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
321   | --oldin | --oldi | --old | --ol | --o)
322     ac_prev=oldincludedir ;;
323   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
324   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
325   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
326     oldincludedir="$ac_optarg" ;;
327
328   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
329     ac_prev=prefix ;;
330   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
331     prefix="$ac_optarg" ;;
332
333   -program-prefix | --program-prefix | --program-prefi | --program-pref \
334   | --program-pre | --program-pr | --program-p)
335     ac_prev=program_prefix ;;
336   -program-prefix=* | --program-prefix=* | --program-prefi=* \
337   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
338     program_prefix="$ac_optarg" ;;
339
340   -program-suffix | --program-suffix | --program-suffi | --program-suff \
341   | --program-suf | --program-su | --program-s)
342     ac_prev=program_suffix ;;
343   -program-suffix=* | --program-suffix=* | --program-suffi=* \
344   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
345     program_suffix="$ac_optarg" ;;
346
347   -program-transform-name | --program-transform-name \
348   | --program-transform-nam | --program-transform-na \
349   | --program-transform-n | --program-transform- \
350   | --program-transform | --program-transfor \
351   | --program-transfo | --program-transf \
352   | --program-trans | --program-tran \
353   | --progr-tra | --program-tr | --program-t)
354     ac_prev=program_transform_name ;;
355   -program-transform-name=* | --program-transform-name=* \
356   | --program-transform-nam=* | --program-transform-na=* \
357   | --program-transform-n=* | --program-transform-=* \
358   | --program-transform=* | --program-transfor=* \
359   | --program-transfo=* | --program-transf=* \
360   | --program-trans=* | --program-tran=* \
361   | --progr-tra=* | --program-tr=* | --program-t=*)
362     program_transform_name="$ac_optarg" ;;
363
364   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
365   | -silent | --silent | --silen | --sile | --sil)
366     silent=yes ;;
367
368   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
369     ac_prev=sbindir ;;
370   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
371   | --sbi=* | --sb=*)
372     sbindir="$ac_optarg" ;;
373
374   -sharedstatedir | --sharedstatedir | --sharedstatedi \
375   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
376   | --sharedst | --shareds | --shared | --share | --shar \
377   | --sha | --sh)
378     ac_prev=sharedstatedir ;;
379   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
380   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
381   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
382   | --sha=* | --sh=*)
383     sharedstatedir="$ac_optarg" ;;
384
385   -site | --site | --sit)
386     ac_prev=site ;;
387   -site=* | --site=* | --sit=*)
388     site="$ac_optarg" ;;
389
390   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
391     ac_prev=srcdir ;;
392   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
393     srcdir="$ac_optarg" ;;
394
395   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
396   | --syscon | --sysco | --sysc | --sys | --sy)
397     ac_prev=sysconfdir ;;
398   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
399   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
400     sysconfdir="$ac_optarg" ;;
401
402   -target | --target | --targe | --targ | --tar | --ta | --t)
403     ac_prev=target ;;
404   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
405     target="$ac_optarg" ;;
406
407   -v | -verbose | --verbose | --verbos | --verbo | --verb)
408     verbose=yes ;;
409
410   -version | --version | --versio | --versi | --vers)
411     echo "configure generated by autoconf version 2.13"
412     exit 0 ;;
413
414   -with-* | --with-*)
415     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
416     # Reject names that are not valid shell variable names.
417     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
418       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
419     fi
420     ac_package=`echo $ac_package| sed 's/-/_/g'`
421     case "$ac_option" in
422       *=*) ;;
423       *) ac_optarg=yes ;;
424     esac
425     eval "with_${ac_package}='$ac_optarg'" ;;
426
427   -without-* | --without-*)
428     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
429     # Reject names that are not valid shell variable names.
430     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
431       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
432     fi
433     ac_package=`echo $ac_package| sed 's/-/_/g'`
434     eval "with_${ac_package}=no" ;;
435
436   --x)
437     # Obsolete; use --with-x.
438     with_x=yes ;;
439
440   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
441   | --x-incl | --x-inc | --x-in | --x-i)
442     ac_prev=x_includes ;;
443   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
444   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
445     x_includes="$ac_optarg" ;;
446
447   -x-libraries | --x-libraries | --x-librarie | --x-librari \
448   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
449     ac_prev=x_libraries ;;
450   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
451   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
452     x_libraries="$ac_optarg" ;;
453
454   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
455     ;;
456
457   *)
458     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
459       echo "configure: warning: $ac_option: invalid host type" 1>&2
460     fi
461     if test "x$nonopt" != xNONE; then
462       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
463     fi
464     nonopt="$ac_option"
465     ;;
466
467   esac
468 done
469
470 if test -n "$ac_prev"; then
471   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
472 fi
473
474 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
475
476 # File descriptor usage:
477 # 0 standard input
478 # 1 file creation
479 # 2 errors and warnings
480 # 3 some systems may open it to /dev/tty
481 # 4 used on the Kubota Titan
482 # 6 checking for... messages and results
483 # 5 compiler messages saved in config.log
484 if test "$silent" = yes; then
485   exec 6>/dev/null
486 else
487   exec 6>&1
488 fi
489 exec 5>./config.log
490
491 echo "\
492 This file contains any messages produced by compilers while
493 running configure, to aid debugging if configure makes a mistake.
494 " 1>&5
495
496 # Strip out --no-create and --no-recursion so they do not pile up.
497 # Also quote any args containing shell metacharacters.
498 ac_configure_args=
499 for ac_arg
500 do
501   case "$ac_arg" in
502   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
503   | --no-cr | --no-c) ;;
504   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
505   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
506   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
507   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
508   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
509   esac
510 done
511
512 # NLS nuisances.
513 # Only set these to C if already set.  These must not be set unconditionally
514 # because not all systems understand e.g. LANG=C (notably SCO).
515 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
516 # Non-C LC_CTYPE values break the ctype check.
517 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
518 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
519 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
520 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
521
522 # confdefs.h avoids OS command line length limits that DEFS can exceed.
523 rm -rf conftest* confdefs.h
524 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
525 echo > confdefs.h
526
527 # A filename unique to this package, relative to the directory that
528 # configure is in, which we can look for to find out if srcdir is correct.
529 ac_unique_file=include/ldap.h
530
531 # Find the source files, if location was not specified.
532 if test -z "$srcdir"; then
533   ac_srcdir_defaulted=yes
534   # Try the directory containing this script, then its parent.
535   ac_prog=$0
536   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
537   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
538   srcdir=$ac_confdir
539   if test ! -r $srcdir/$ac_unique_file; then
540     srcdir=..
541   fi
542 else
543   ac_srcdir_defaulted=no
544 fi
545 if test ! -r $srcdir/$ac_unique_file; then
546   if test "$ac_srcdir_defaulted" = yes; then
547     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
548   else
549     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
550   fi
551 fi
552 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
553
554 # Prefer explicitly selected file to automatically selected ones.
555 if test -z "$CONFIG_SITE"; then
556   if test "x$prefix" != xNONE; then
557     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
558   else
559     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
560   fi
561 fi
562 for ac_site_file in $CONFIG_SITE; do
563   if test -r "$ac_site_file"; then
564     echo "loading site script $ac_site_file"
565     . "$ac_site_file"
566   fi
567 done
568
569 if test -r "$cache_file"; then
570   echo "loading cache $cache_file"
571   . $cache_file
572 else
573   echo "creating cache $cache_file"
574   > $cache_file
575 fi
576
577 ac_ext=c
578 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
579 ac_cpp='$CPP $CPPFLAGS'
580 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
581 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
582 cross_compiling=$ac_cv_prog_cc_cross
583
584 ac_exeext=
585 ac_objext=o
586 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
587   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
588   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
589     ac_n= ac_c='
590 ' ac_t='        '
591   else
592     ac_n=-n ac_c= ac_t=
593   fi
594 else
595   ac_n= ac_c='\c' ac_t=
596 fi
597
598 ac_aux_dir=
599 for ac_dir in build $srcdir/build; do
600   if test -f $ac_dir/install-sh; then
601     ac_aux_dir=$ac_dir
602     ac_install_sh="$ac_aux_dir/install-sh -c"
603     break
604   elif test -f $ac_dir/install.sh; then
605     ac_aux_dir=$ac_dir
606     ac_install_sh="$ac_aux_dir/install.sh -c"
607     break
608   fi
609 done
610 if test -z "$ac_aux_dir"; then
611   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
612 fi
613 ac_config_guess=$ac_aux_dir/config.guess
614 ac_config_sub=$ac_aux_dir/config.sub
615 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
616 # Find a good install program.  We prefer a C program (faster),
617 # so one script is as good as another.  But avoid the broken or
618 # incompatible versions:
619 # SysV /etc/install, /usr/sbin/install
620 # SunOS /usr/etc/install
621 # IRIX /sbin/install
622 # AIX /bin/install
623 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
624 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
625 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
626 # ./install, which can be erroneously created by make from ./install.sh.
627 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
628 echo "configure:629: checking for a BSD compatible install" >&5
629 if test -z "$INSTALL"; then
630 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
631   echo $ac_n "(cached) $ac_c" 1>&6
632 else
633     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
634   for ac_dir in $PATH; do
635     # Account for people who put trailing slashes in PATH elements.
636     case "$ac_dir/" in
637     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
638     *)
639       # OSF1 and SCO ODT 3.0 have their own names for install.
640       # Don't use installbsd from OSF since it installs stuff as root
641       # by default.
642       for ac_prog in ginstall scoinst install; do
643         if test -f $ac_dir/$ac_prog; then
644           if test $ac_prog = install &&
645             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
646             # AIX install.  It has an incompatible calling convention.
647             :
648           else
649             ac_cv_path_install="$ac_dir/$ac_prog -c"
650             break 2
651           fi
652         fi
653       done
654       ;;
655     esac
656   done
657   IFS="$ac_save_IFS"
658
659 fi
660   if test "${ac_cv_path_install+set}" = set; then
661     INSTALL="$ac_cv_path_install"
662   else
663     # As a last resort, use the slow shell script.  We don't cache a
664     # path for INSTALL within a source directory, because that will
665     # break other packages using the cache if that directory is
666     # removed, or if the path is relative.
667     INSTALL="$ac_install_sh"
668   fi
669 fi
670 echo "$ac_t""$INSTALL" 1>&6
671
672 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
673 # It thinks the first close brace ends the variable substitution.
674 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
675
676 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
677
678 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
679
680 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
681 echo "configure:682: checking whether build environment is sane" >&5
682 # Just in case
683 sleep 1
684 echo timestamp > conftestfile
685 # Do `set' in a subshell so we don't clobber the current shell's
686 # arguments.  Must try -L first in case configure is actually a
687 # symlink; some systems play weird games with the mod time of symlinks
688 # (eg FreeBSD returns the mod time of the symlink's containing
689 # directory).
690 if (
691    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
692    if test "$*" = "X"; then
693       # -L didn't work.
694       set X `ls -t $srcdir/configure conftestfile`
695    fi
696    if test "$*" != "X $srcdir/configure conftestfile" \
697       && test "$*" != "X conftestfile $srcdir/configure"; then
698
699       # If neither matched, then we have a broken ls.  This can happen
700       # if, for instance, CONFIG_SHELL is bash and it inherits a
701       # broken ls alias from the environment.  This has actually
702       # happened.  Such a system could not be considered "sane".
703       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
704 alias in your environment" 1>&2; exit 1; }
705    fi
706
707    test "$2" = conftestfile
708    )
709 then
710    # Ok.
711    :
712 else
713    { echo "configure: error: newly created file is older than distributed files!
714 Check your system clock" 1>&2; exit 1; }
715 fi
716 rm -f conftest*
717 echo "$ac_t""yes" 1>&6
718 if test "$program_transform_name" = s,x,x,; then
719   program_transform_name=
720 else
721   # Double any \ or $.  echo might interpret backslashes.
722   cat <<\EOF_SED > conftestsed
723 s,\\,\\\\,g; s,\$,$$,g
724 EOF_SED
725   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
726   rm -f conftestsed
727 fi
728 test "$program_prefix" != NONE &&
729   program_transform_name="s,^,${program_prefix},; $program_transform_name"
730 # Use a double $ so make ignores it.
731 test "$program_suffix" != NONE &&
732   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
733
734 # sed with no file args requires a program.
735 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
736
737 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
738 echo "configure:739: checking whether ${MAKE-make} sets \${MAKE}" >&5
739 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
740 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
741   echo $ac_n "(cached) $ac_c" 1>&6
742 else
743   cat > conftestmake <<\EOF
744 all:
745         @echo 'ac_maketemp="${MAKE}"'
746 EOF
747 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
748 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
749 if test -n "$ac_maketemp"; then
750   eval ac_cv_prog_make_${ac_make}_set=yes
751 else
752   eval ac_cv_prog_make_${ac_make}_set=no
753 fi
754 rm -f conftestmake
755 fi
756 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
757   echo "$ac_t""yes" 1>&6
758   SET_MAKE=
759 else
760   echo "$ac_t""no" 1>&6
761   SET_MAKE="MAKE=${MAKE-make}"
762 fi
763
764
765 PACKAGE=OpenLDAP
766
767 VERSION=2.0-devel
768
769 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
770   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
771 fi
772
773
774
775 missing_dir=`cd $ac_aux_dir && pwd`
776 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
777 echo "configure:778: checking for working aclocal" >&5
778 # Run test in a subshell; some versions of sh will print an error if
779 # an executable is not found, even if stderr is redirected.
780 # Redirect stdin to placate older versions of autoconf.  Sigh.
781 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
782    ACLOCAL=aclocal
783    echo "$ac_t""found" 1>&6
784 else
785    ACLOCAL="$missing_dir/missing aclocal"
786    echo "$ac_t""missing" 1>&6
787 fi
788
789 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
790 echo "configure:791: checking for working autoconf" >&5
791 # Run test in a subshell; some versions of sh will print an error if
792 # an executable is not found, even if stderr is redirected.
793 # Redirect stdin to placate older versions of autoconf.  Sigh.
794 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
795    AUTOCONF=autoconf
796    echo "$ac_t""found" 1>&6
797 else
798    AUTOCONF="$missing_dir/missing autoconf"
799    echo "$ac_t""missing" 1>&6
800 fi
801
802 echo $ac_n "checking for working automake""... $ac_c" 1>&6
803 echo "configure:804: checking for working automake" >&5
804 # Run test in a subshell; some versions of sh will print an error if
805 # an executable is not found, even if stderr is redirected.
806 # Redirect stdin to placate older versions of autoconf.  Sigh.
807 if (automake --version) < /dev/null > /dev/null 2>&1; then
808    AUTOMAKE=automake
809    echo "$ac_t""found" 1>&6
810 else
811    AUTOMAKE="$missing_dir/missing automake"
812    echo "$ac_t""missing" 1>&6
813 fi
814
815 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
816 echo "configure:817: checking for working autoheader" >&5
817 # Run test in a subshell; some versions of sh will print an error if
818 # an executable is not found, even if stderr is redirected.
819 # Redirect stdin to placate older versions of autoconf.  Sigh.
820 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
821    AUTOHEADER=autoheader
822    echo "$ac_t""found" 1>&6
823 else
824    AUTOHEADER="$missing_dir/missing autoheader"
825    echo "$ac_t""missing" 1>&6
826 fi
827
828 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
829 echo "configure:830: checking for working makeinfo" >&5
830 # Run test in a subshell; some versions of sh will print an error if
831 # an executable is not found, even if stderr is redirected.
832 # Redirect stdin to placate older versions of autoconf.  Sigh.
833 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
834    MAKEINFO=makeinfo
835    echo "$ac_t""found" 1>&6
836 else
837    MAKEINFO="$missing_dir/missing makeinfo"
838    echo "$ac_t""missing" 1>&6
839 fi
840
841
842
843
844 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
845 echo "configure:846: checking configure arguments" >&5
846
847
848 top_builddir=`pwd`
849
850 ldap_subdir="openldap"
851
852 # Check whether --with-subdir or --without-subdir was given.
853 if test "${with_subdir+set}" = set; then
854   withval="$with_subdir"
855   
856         if test "$withval" = "no"; then
857                 ldap_subdir=""
858         elif test "$withval" != "yes"; then
859                 ldap_subdir="$withval"
860         fi
861
862 fi
863
864
865 # OpenLDAP --enable-debug
866         # Check whether --enable-debug or --disable-debug was given.
867 if test "${enable_debug+set}" = set; then
868   enableval="$enable_debug"
869   
870         ol_arg=invalid
871         for ol_val in auto yes no ; do
872                 if test "$enableval" = "$ol_val" ; then
873                         ol_arg="$ol_val"
874                 fi
875         done
876         if test "$ol_arg" = "invalid" ; then
877                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
878         fi
879         ol_enable_debug="$ol_arg"
880
881 else
882         ol_enable_debug="yes"
883 fi
884 # end --enable-debug
885 ol_enable_syslog=no
886 # OpenLDAP --enable-proctitle
887         # Check whether --enable-proctitle or --disable-proctitle was given.
888 if test "${enable_proctitle+set}" = set; then
889   enableval="$enable_proctitle"
890   
891         ol_arg=invalid
892         for ol_val in auto yes no ; do
893                 if test "$enableval" = "$ol_val" ; then
894                         ol_arg="$ol_val"
895                 fi
896         done
897         if test "$ol_arg" = "invalid" ; then
898                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
899         fi
900         ol_enable_proctitle="$ol_arg"
901
902 else
903         ol_enable_proctitle="yes"
904 fi
905 # end --enable-proctitle
906 # OpenLDAP --enable-cache
907         # Check whether --enable-cache or --disable-cache was given.
908 if test "${enable_cache+set}" = set; then
909   enableval="$enable_cache"
910   
911         ol_arg=invalid
912         for ol_val in auto yes no ; do
913                 if test "$enableval" = "$ol_val" ; then
914                         ol_arg="$ol_val"
915                 fi
916         done
917         if test "$ol_arg" = "invalid" ; then
918                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
919         fi
920         ol_enable_cache="$ol_arg"
921
922 else
923         ol_enable_cache="yes"
924 fi
925 # end --enable-cache
926 # OpenLDAP --enable-dns
927         # Check whether --enable-dns or --disable-dns was given.
928 if test "${enable_dns+set}" = set; then
929   enableval="$enable_dns"
930   
931         ol_arg=invalid
932         for ol_val in auto yes no ; do
933                 if test "$enableval" = "$ol_val" ; then
934                         ol_arg="$ol_val"
935                 fi
936         done
937         if test "$ol_arg" = "invalid" ; then
938                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
939         fi
940         ol_enable_dns="$ol_arg"
941
942 else
943         ol_enable_dns="no"
944 fi
945 # end --enable-dns
946 # OpenLDAP --enable-referrals
947         # Check whether --enable-referrals or --disable-referrals was given.
948 if test "${enable_referrals+set}" = set; then
949   enableval="$enable_referrals"
950   
951         ol_arg=invalid
952         for ol_val in auto yes no ; do
953                 if test "$enableval" = "$ol_val" ; then
954                         ol_arg="$ol_val"
955                 fi
956         done
957         if test "$ol_arg" = "invalid" ; then
958                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
959         fi
960         ol_enable_referrals="$ol_arg"
961
962 else
963         ol_enable_referrals="yes"
964 fi
965 # end --enable-referrals
966 # OpenLDAP --enable-cldap
967         # Check whether --enable-cldap or --disable-cldap was given.
968 if test "${enable_cldap+set}" = set; then
969   enableval="$enable_cldap"
970   
971         ol_arg=invalid
972         for ol_val in auto yes no ; do
973                 if test "$enableval" = "$ol_val" ; then
974                         ol_arg="$ol_val"
975                 fi
976         done
977         if test "$ol_arg" = "invalid" ; then
978                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
979         fi
980         ol_enable_cldap="$ol_arg"
981
982 else
983         ol_enable_cldap="no"
984 fi
985 # end --enable-cldap
986 # OpenLDAP --enable-x_compile
987         # Check whether --enable-x_compile or --disable-x_compile was given.
988 if test "${enable_x_compile+set}" = set; then
989   enableval="$enable_x_compile"
990   
991         ol_arg=invalid
992         for ol_val in yes no ; do
993                 if test "$enableval" = "$ol_val" ; then
994                         ol_arg="$ol_val"
995                 fi
996         done
997         if test "$ol_arg" = "invalid" ; then
998                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
999         fi
1000         ol_enable_x_compile="$ol_arg"
1001
1002 else
1003         ol_enable_x_compile="no"
1004 fi
1005 # end --enable-x_compile
1006
1007
1008 # OpenLDAP --enable-dmalloc
1009         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1010 if test "${enable_dmalloc+set}" = set; then
1011   enableval="$enable_dmalloc"
1012   
1013         ol_arg=invalid
1014         for ol_val in auto yes no ; do
1015                 if test "$enableval" = "$ol_val" ; then
1016                         ol_arg="$ol_val"
1017                 fi
1018         done
1019         if test "$ol_arg" = "invalid" ; then
1020                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1021         fi
1022         ol_enable_dmalloc="$ol_arg"
1023
1024 else
1025         ol_enable_dmalloc="no"
1026 fi
1027 # end --enable-dmalloc
1028
1029 # OpenLDAP --with-kerberos
1030         # Check whether --with-kerberos or --without-kerberos was given.
1031 if test "${with_kerberos+set}" = set; then
1032   withval="$with_kerberos"
1033   
1034         ol_arg=invalid
1035         for ol_val in auto k5 k4 afs yes no ; do
1036                 if test "$withval" = "$ol_val" ; then
1037                         ol_arg="$ol_val"
1038                 fi
1039         done
1040         if test "$ol_arg" = "invalid" ; then
1041                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1042         fi
1043         ol_with_kerberos="$ol_arg"
1044
1045 else
1046         ol_with_kerberos="auto"
1047 fi
1048 # end --with-kerberos
1049
1050 # OpenLDAP --with-threads
1051         # Check whether --with-threads or --without-threads was given.
1052 if test "${with_threads+set}" = set; then
1053   withval="$with_threads"
1054   
1055         ol_arg=invalid
1056         for ol_val in auto posix mach lwp yes no manual  ; do
1057                 if test "$withval" = "$ol_val" ; then
1058                         ol_arg="$ol_val"
1059                 fi
1060         done
1061         if test "$ol_arg" = "invalid" ; then
1062                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1063         fi
1064         ol_with_threads="$ol_arg"
1065
1066 else
1067         ol_with_threads="auto"
1068 fi
1069 # end --with-threads
1070
1071 # OpenLDAP --with-yielding_select
1072         # Check whether --with-yielding_select or --without-yielding_select was given.
1073 if test "${with_yielding_select+set}" = set; then
1074   withval="$with_yielding_select"
1075   
1076         ol_arg=invalid
1077         for ol_val in auto yes no manual  ; do
1078                 if test "$withval" = "$ol_val" ; then
1079                         ol_arg="$ol_val"
1080                 fi
1081         done
1082         if test "$ol_arg" = "invalid" ; then
1083                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1084         fi
1085         ol_with_yielding_select="$ol_arg"
1086
1087 else
1088         ol_with_yielding_select="auto"
1089 fi
1090 # end --with-yielding_select
1091
1092
1093
1094 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1095 if test "${with_xxldapdoptions+set}" = set; then
1096   withval="$with_xxldapdoptions"
1097   :
1098 fi
1099
1100 # OpenLDAP --enable-ldapd
1101         # Check whether --enable-ldapd or --disable-ldapd was given.
1102 if test "${enable_ldapd+set}" = set; then
1103   enableval="$enable_ldapd"
1104   
1105         ol_arg=invalid
1106         for ol_val in auto yes no ; do
1107                 if test "$enableval" = "$ol_val" ; then
1108                         ol_arg="$ol_val"
1109                 fi
1110         done
1111         if test "$ol_arg" = "invalid" ; then
1112                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1113         fi
1114         ol_enable_ldapd="$ol_arg"
1115
1116 else
1117         ol_enable_ldapd="no"
1118 fi
1119 # end --enable-ldapd
1120
1121 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1122 if test "${with_xxslapdoptions+set}" = set; then
1123   withval="$with_xxslapdoptions"
1124   :
1125 fi
1126
1127 # OpenLDAP --enable-slapd
1128         # Check whether --enable-slapd or --disable-slapd was given.
1129 if test "${enable_slapd+set}" = set; then
1130   enableval="$enable_slapd"
1131   
1132         ol_arg=invalid
1133         for ol_val in auto yes no ; do
1134                 if test "$enableval" = "$ol_val" ; then
1135                         ol_arg="$ol_val"
1136                 fi
1137         done
1138         if test "$ol_arg" = "invalid" ; then
1139                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1140         fi
1141         ol_enable_slapd="$ol_arg"
1142
1143 else
1144         ol_enable_slapd="yes"
1145 fi
1146 # end --enable-slapd
1147 # OpenLDAP --enable-aclgroups
1148         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1149 if test "${enable_aclgroups+set}" = set; then
1150   enableval="$enable_aclgroups"
1151   
1152         ol_arg=invalid
1153         for ol_val in auto yes no ; do
1154                 if test "$enableval" = "$ol_val" ; then
1155                         ol_arg="$ol_val"
1156                 fi
1157         done
1158         if test "$ol_arg" = "invalid" ; then
1159                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1160         fi
1161         ol_enable_aclgroups="$ol_arg"
1162
1163 else
1164         ol_enable_aclgroups="auto"
1165 fi
1166 # end --enable-aclgroups
1167 # OpenLDAP --enable-cleartext
1168         # Check whether --enable-cleartext or --disable-cleartext was given.
1169 if test "${enable_cleartext+set}" = set; then
1170   enableval="$enable_cleartext"
1171   
1172         ol_arg=invalid
1173         for ol_val in auto yes no ; do
1174                 if test "$enableval" = "$ol_val" ; then
1175                         ol_arg="$ol_val"
1176                 fi
1177         done
1178         if test "$ol_arg" = "invalid" ; then
1179                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1180         fi
1181         ol_enable_cleartext="$ol_arg"
1182
1183 else
1184         ol_enable_cleartext="yes"
1185 fi
1186 # end --enable-cleartext
1187 # OpenLDAP --enable-crypt
1188         # Check whether --enable-crypt or --disable-crypt was given.
1189 if test "${enable_crypt+set}" = set; then
1190   enableval="$enable_crypt"
1191   
1192         ol_arg=invalid
1193         for ol_val in auto yes no ; do
1194                 if test "$enableval" = "$ol_val" ; then
1195                         ol_arg="$ol_val"
1196                 fi
1197         done
1198         if test "$ol_arg" = "invalid" ; then
1199                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1200         fi
1201         ol_enable_crypt="$ol_arg"
1202
1203 else
1204         ol_enable_crypt="auto"
1205 fi
1206 # end --enable-crypt
1207 # OpenLDAP --enable-wrappers
1208         # Check whether --enable-wrappers or --disable-wrappers was given.
1209 if test "${enable_wrappers+set}" = set; then
1210   enableval="$enable_wrappers"
1211   
1212         ol_arg=invalid
1213         for ol_val in auto yes no ; do
1214                 if test "$enableval" = "$ol_val" ; then
1215                         ol_arg="$ol_val"
1216                 fi
1217         done
1218         if test "$ol_arg" = "invalid" ; then
1219                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1220         fi
1221         ol_enable_wrappers="$ol_arg"
1222
1223 else
1224         ol_enable_wrappers="no"
1225 fi
1226 # end --enable-wrappers
1227 # OpenLDAP --enable-phonetic
1228         # Check whether --enable-phonetic or --disable-phonetic was given.
1229 if test "${enable_phonetic+set}" = set; then
1230   enableval="$enable_phonetic"
1231   
1232         ol_arg=invalid
1233         for ol_val in auto yes no ; do
1234                 if test "$enableval" = "$ol_val" ; then
1235                         ol_arg="$ol_val"
1236                 fi
1237         done
1238         if test "$ol_arg" = "invalid" ; then
1239                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1240         fi
1241         ol_enable_phonetic="$ol_arg"
1242
1243 else
1244         ol_enable_phonetic="no"
1245 fi
1246 # end --enable-phonetic
1247 # OpenLDAP --enable-rlookups
1248         # Check whether --enable-rlookups or --disable-rlookups was given.
1249 if test "${enable_rlookups+set}" = set; then
1250   enableval="$enable_rlookups"
1251   
1252         ol_arg=invalid
1253         for ol_val in auto yes no ; do
1254                 if test "$enableval" = "$ol_val" ; then
1255                         ol_arg="$ol_val"
1256                 fi
1257         done
1258         if test "$ol_arg" = "invalid" ; then
1259                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1260         fi
1261         ol_enable_rlookups="$ol_arg"
1262
1263 else
1264         ol_enable_rlookups="auto"
1265 fi
1266 # end --enable-rlookups
1267
1268 # OpenLDAP --enable-bdb2
1269         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1270 if test "${enable_bdb2+set}" = set; then
1271   enableval="$enable_bdb2"
1272   
1273         ol_arg=invalid
1274         for ol_val in auto yes no ; do
1275                 if test "$enableval" = "$ol_val" ; then
1276                         ol_arg="$ol_val"
1277                 fi
1278         done
1279         if test "$ol_arg" = "invalid" ; then
1280                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1281         fi
1282         ol_enable_bdb2="$ol_arg"
1283
1284 else
1285         ol_enable_bdb2="no"
1286 fi
1287 # end --enable-bdb2
1288 # OpenLDAP --enable-ldbm
1289         # Check whether --enable-ldbm or --disable-ldbm was given.
1290 if test "${enable_ldbm+set}" = set; then
1291   enableval="$enable_ldbm"
1292   
1293         ol_arg=invalid
1294         for ol_val in auto yes no ; do
1295                 if test "$enableval" = "$ol_val" ; then
1296                         ol_arg="$ol_val"
1297                 fi
1298         done
1299         if test "$ol_arg" = "invalid" ; then
1300                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1301         fi
1302         ol_enable_ldbm="$ol_arg"
1303
1304 else
1305         ol_enable_ldbm="yes"
1306 fi
1307 # end --enable-ldbm
1308 # OpenLDAP --with-ldbm_api
1309         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1310 if test "${with_ldbm_api+set}" = set; then
1311   withval="$with_ldbm_api"
1312   
1313         ol_arg=invalid
1314         for ol_val in auto db2 db gdbm ndbm manual ; do
1315                 if test "$withval" = "$ol_val" ; then
1316                         ol_arg="$ol_val"
1317                 fi
1318         done
1319         if test "$ol_arg" = "invalid" ; then
1320                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1321         fi
1322         ol_with_ldbm_api="$ol_arg"
1323
1324 else
1325         ol_with_ldbm_api="auto"
1326 fi
1327 # end --with-ldbm_api
1328
1329 # OpenLDAP --with-ldbm_type
1330         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1331 if test "${with_ldbm_type+set}" = set; then
1332   withval="$with_ldbm_type"
1333   
1334         ol_arg=invalid
1335         for ol_val in auto btree hash ; do
1336                 if test "$withval" = "$ol_val" ; then
1337                         ol_arg="$ol_val"
1338                 fi
1339         done
1340         if test "$ol_arg" = "invalid" ; then
1341                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1342         fi
1343         ol_with_ldbm_type="$ol_arg"
1344
1345 else
1346         ol_with_ldbm_type="auto"
1347 fi
1348 # end --with-ldbm_type
1349
1350
1351 # OpenLDAP --enable-passwd
1352         # Check whether --enable-passwd or --disable-passwd was given.
1353 if test "${enable_passwd+set}" = set; then
1354   enableval="$enable_passwd"
1355   
1356         ol_arg=invalid
1357         for ol_val in auto yes no ; do
1358                 if test "$enableval" = "$ol_val" ; then
1359                         ol_arg="$ol_val"
1360                 fi
1361         done
1362         if test "$ol_arg" = "invalid" ; then
1363                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1364         fi
1365         ol_enable_passwd="$ol_arg"
1366
1367 else
1368         ol_enable_passwd="no"
1369 fi
1370 # end --enable-passwd
1371 # OpenLDAP --enable-perl
1372         # Check whether --enable-perl or --disable-perl was given.
1373 if test "${enable_perl+set}" = set; then
1374   enableval="$enable_perl"
1375   
1376         ol_arg=invalid
1377         for ol_val in auto yes no ; do
1378                 if test "$enableval" = "$ol_val" ; then
1379                         ol_arg="$ol_val"
1380                 fi
1381         done
1382         if test "$ol_arg" = "invalid" ; then
1383                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1384         fi
1385         ol_enable_perl="$ol_arg"
1386
1387 else
1388         ol_enable_perl="no"
1389 fi
1390 # end --enable-perl
1391 # OpenLDAP --enable-shell
1392         # Check whether --enable-shell or --disable-shell was given.
1393 if test "${enable_shell+set}" = set; then
1394   enableval="$enable_shell"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto yes no ; do
1398                 if test "$enableval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1404         fi
1405         ol_enable_shell="$ol_arg"
1406
1407 else
1408         ol_enable_shell="no"
1409 fi
1410 # end --enable-shell
1411
1412 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1413 if test "${with_xxslurpdoptions+set}" = set; then
1414   withval="$with_xxslurpdoptions"
1415   :
1416 fi
1417
1418 # OpenLDAP --enable-slurpd
1419         # Check whether --enable-slurpd or --disable-slurpd was given.
1420 if test "${enable_slurpd+set}" = set; then
1421   enableval="$enable_slurpd"
1422   
1423         ol_arg=invalid
1424         for ol_val in auto yes no ; do
1425                 if test "$enableval" = "$ol_val" ; then
1426                         ol_arg="$ol_val"
1427                 fi
1428         done
1429         if test "$ol_arg" = "invalid" ; then
1430                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1431         fi
1432         ol_enable_slurpd="$ol_arg"
1433
1434 else
1435         ol_enable_slurpd="auto"
1436 fi
1437 # end --enable-slurpd
1438
1439 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1440 if test "${with_xxliboptions+set}" = set; then
1441   withval="$with_xxliboptions"
1442   :
1443 fi
1444
1445 # Check whether --enable-static or --disable-static was given.
1446 if test "${enable_static+set}" = set; then
1447   enableval="$enable_static"
1448   p=${PACKAGE-default}
1449 case "$enableval" in
1450 yes) enable_static=yes ;;
1451 no) enable_static=no ;;
1452 *)
1453   enable_static=no
1454   # Look at the argument we got.  We use all the common list separators.
1455   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1456   for pkg in $enableval; do
1457     if test "X$pkg" = "X$p"; then
1458       enable_static=yes
1459     fi
1460   done
1461   IFS="$ac_save_ifs"
1462   ;;
1463 esac
1464 else
1465   enable_static=yes
1466 fi
1467
1468 # Check whether --enable-shared or --disable-shared was given.
1469 if test "${enable_shared+set}" = set; then
1470   enableval="$enable_shared"
1471   p=${PACKAGE-default}
1472 case "$enableval" in
1473 yes) enable_shared=yes ;;
1474 no) enable_shared=no ;;
1475 *)
1476   enable_shared=no
1477   # Look at the argument we got.  We use all the common list separators.
1478   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1479   for pkg in $enableval; do
1480     if test "X$pkg" = "X$p"; then
1481       enable_shared=yes
1482     fi
1483   done
1484   IFS="$ac_save_ifs"
1485   ;;
1486 esac
1487 else
1488   enable_shared=yes
1489 fi
1490
1491
1492 # validate options
1493 if test $ol_enable_dns = yes ; then
1494         if test $ol_enable_referrals = no ; then
1495                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1496         fi
1497         if test $ol_enable_referrals = auto ; then
1498                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1499                 ol_enable_referrals=yes
1500         fi
1501 fi
1502
1503 if test $ol_enable_slapd = no ; then
1504                 if test $ol_enable_bdb2 = yes ; then
1505                 echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2
1506         fi
1507         if test $ol_enable_ldbm = yes ; then
1508                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1509         fi
1510         if test $ol_enable_passwd = yes ; then
1511                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1512         fi
1513         if test $ol_enable_perl = yes ; then
1514                 echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2
1515         fi
1516         if test $ol_enable_shell = yes ; then
1517                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1518         fi
1519         if test $ol_enable_aclgroups = yes ; then
1520                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1521         fi
1522         if test $ol_enable_wrappers = yes ; then
1523                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1524         fi
1525         if test $ol_enable_phonetic = yes ; then
1526                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1527         fi
1528         if test $ol_enable_rlookups = yes ; then
1529                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1530         fi
1531         if test $ol_with_ldbm_api != auto ; then
1532                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1533         fi
1534         if test $ol_with_ldbm_type != auto ; then
1535                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1536         fi
1537         if test $ol_enable_slurpd = yes ; then
1538                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1539         fi
1540
1541         # force settings to no
1542         ol_enable_bdb2=no
1543         ol_enable_ldbm=no
1544         ol_enable_passwd=no
1545         ol_enable_perl=no
1546         ol_enable_shell=no
1547         ol_enable_aclgroups=no
1548         ol_enable_wrappers=no
1549         ol_enable_phonetic=no
1550         ol_enable_rlookups=no
1551         ol_with_ldbm_api=no
1552         ol_with_ldbm_type=no
1553         ol_enable_slurpd=no
1554
1555 elif test $ol_enable_ldbm = no ; then
1556         
1557         if test $ol_with_ldbm_api != auto ; then
1558                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1559         fi
1560
1561         if test $ol_with_ldbm_type != auto ; then
1562                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1563         fi
1564
1565         if test $ol_enable_ldbm = yes ; then
1566                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1567         fi
1568
1569         if test $ol_enable_passwd = no -a \
1570                 $ol_enable_perl = no -a
1571                 $ol_enable_shell = no ; then
1572                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1573         fi
1574
1575         ol_with_ldbm_api=no
1576         ol_with_ldbm_type=no
1577
1578 elif test $ol_enable_bdb2 = yes ; then
1579         
1580         if test $ol_with_ldbm_api != auto -a \
1581                 $ol_with_ldbm_api != db2 ; then
1582                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1583         fi
1584
1585         ol_with_ldbm_api=db2
1586
1587 else
1588         
1589         if test $ol_enable_bdb2 != no ; then
1590                 if test $ol_with_ldbm_api != auto -a \
1591                         $ol_with_ldbm_api != db2 ; then
1592                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1593                         ol_enable_bdb2=no
1594                 fi
1595         fi
1596
1597         if test $ol_with_ldbm_api = gdbm -a \
1598                 $ol_with_ldbm_type = btree ; then
1599                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1600         fi
1601         if test $ol_with_ldbm_api = ndbm -a \
1602                 $ol_with_ldbm_type = btree ; then
1603                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1604         fi
1605 fi
1606
1607 if test $ol_enable_slurpd = yes ; then
1608                 if test $ol_with_threads = no ; then
1609                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1610         fi
1611 fi
1612
1613 echo "$ac_t""done" 1>&6
1614
1615
1616 # Make sure we can run config.sub.
1617 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1618 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1619 fi
1620
1621 echo $ac_n "checking host system type""... $ac_c" 1>&6
1622 echo "configure:1623: checking host system type" >&5
1623
1624 host_alias=$host
1625 case "$host_alias" in
1626 NONE)
1627   case $nonopt in
1628   NONE)
1629     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1630     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1631     fi ;;
1632   *) host_alias=$nonopt ;;
1633   esac ;;
1634 esac
1635
1636 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1637 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1638 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1639 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1640 echo "$ac_t""$host" 1>&6
1641
1642
1643 ## Initialize vars
1644 LDAP_LIBS=
1645 LDBM_LIBS=
1646 LTHREAD_LIBS=
1647 LUTIL_LIBS=
1648
1649 LDAPD_LIBS=
1650 SLAPD_LIBS=
1651 SLURPD_LIBS=
1652
1653 BUILD_LDAPD=no
1654 BUILD_SLAPD=no
1655 BUILD_SLURPD=no
1656
1657 BUILD_BDB2=no
1658 BUILD_LDBM=no
1659 BUILD_PASSWD=no
1660 BUILD_PERL=no
1661 BUILD_SHELL=no
1662 BUILD_THREAD=no
1663
1664 SLAPD_PERL_LDFLAGS=
1665 SLAPD_PERL_CPPFLAGS=
1666
1667 KRB_LIBS=
1668 TERMCAP_LIBS=
1669
1670
1671 # Find a good install program.  We prefer a C program (faster),
1672 # so one script is as good as another.  But avoid the broken or
1673 # incompatible versions:
1674 # SysV /etc/install, /usr/sbin/install
1675 # SunOS /usr/etc/install
1676 # IRIX /sbin/install
1677 # AIX /bin/install
1678 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1679 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1680 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1681 # ./install, which can be erroneously created by make from ./install.sh.
1682 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1683 echo "configure:1684: checking for a BSD compatible install" >&5
1684 if test -z "$INSTALL"; then
1685 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1686   echo $ac_n "(cached) $ac_c" 1>&6
1687 else
1688     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1689   for ac_dir in $PATH; do
1690     # Account for people who put trailing slashes in PATH elements.
1691     case "$ac_dir/" in
1692     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1693     *)
1694       # OSF1 and SCO ODT 3.0 have their own names for install.
1695       # Don't use installbsd from OSF since it installs stuff as root
1696       # by default.
1697       for ac_prog in ginstall scoinst install; do
1698         if test -f $ac_dir/$ac_prog; then
1699           if test $ac_prog = install &&
1700             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1701             # AIX install.  It has an incompatible calling convention.
1702             :
1703           else
1704             ac_cv_path_install="$ac_dir/$ac_prog -c"
1705             break 2
1706           fi
1707         fi
1708       done
1709       ;;
1710     esac
1711   done
1712   IFS="$ac_save_IFS"
1713
1714 fi
1715   if test "${ac_cv_path_install+set}" = set; then
1716     INSTALL="$ac_cv_path_install"
1717   else
1718     # As a last resort, use the slow shell script.  We don't cache a
1719     # path for INSTALL within a source directory, because that will
1720     # break other packages using the cache if that directory is
1721     # removed, or if the path is relative.
1722     INSTALL="$ac_install_sh"
1723   fi
1724 fi
1725 echo "$ac_t""$INSTALL" 1>&6
1726
1727 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1728 # It thinks the first close brace ends the variable substitution.
1729 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1730
1731 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1732
1733 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1734
1735 # Extract the first word of "ranlib", so it can be a program name with args.
1736 set dummy ranlib; ac_word=$2
1737 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1738 echo "configure:1739: checking for $ac_word" >&5
1739 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1740   echo $ac_n "(cached) $ac_c" 1>&6
1741 else
1742   if test -n "$RANLIB"; then
1743   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1744 else
1745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1746   ac_dummy="$PATH"
1747   for ac_dir in $ac_dummy; do
1748     test -z "$ac_dir" && ac_dir=.
1749     if test -f $ac_dir/$ac_word; then
1750       ac_cv_prog_RANLIB="ranlib"
1751       break
1752     fi
1753   done
1754   IFS="$ac_save_ifs"
1755   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1756 fi
1757 fi
1758 RANLIB="$ac_cv_prog_RANLIB"
1759 if test -n "$RANLIB"; then
1760   echo "$ac_t""$RANLIB" 1>&6
1761 else
1762   echo "$ac_t""no" 1>&6
1763 fi
1764
1765 # Extract the first word of "gcc", so it can be a program name with args.
1766 set dummy gcc; ac_word=$2
1767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1768 echo "configure:1769: checking for $ac_word" >&5
1769 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1770   echo $ac_n "(cached) $ac_c" 1>&6
1771 else
1772   if test -n "$CC"; then
1773   ac_cv_prog_CC="$CC" # Let the user override the test.
1774 else
1775   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1776   ac_dummy="$PATH"
1777   for ac_dir in $ac_dummy; do
1778     test -z "$ac_dir" && ac_dir=.
1779     if test -f $ac_dir/$ac_word; then
1780       ac_cv_prog_CC="gcc"
1781       break
1782     fi
1783   done
1784   IFS="$ac_save_ifs"
1785 fi
1786 fi
1787 CC="$ac_cv_prog_CC"
1788 if test -n "$CC"; then
1789   echo "$ac_t""$CC" 1>&6
1790 else
1791   echo "$ac_t""no" 1>&6
1792 fi
1793
1794 if test -z "$CC"; then
1795   # Extract the first word of "cc", so it can be a program name with args.
1796 set dummy cc; ac_word=$2
1797 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1798 echo "configure:1799: checking for $ac_word" >&5
1799 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1800   echo $ac_n "(cached) $ac_c" 1>&6
1801 else
1802   if test -n "$CC"; then
1803   ac_cv_prog_CC="$CC" # Let the user override the test.
1804 else
1805   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1806   ac_prog_rejected=no
1807   ac_dummy="$PATH"
1808   for ac_dir in $ac_dummy; do
1809     test -z "$ac_dir" && ac_dir=.
1810     if test -f $ac_dir/$ac_word; then
1811       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1812         ac_prog_rejected=yes
1813         continue
1814       fi
1815       ac_cv_prog_CC="cc"
1816       break
1817     fi
1818   done
1819   IFS="$ac_save_ifs"
1820 if test $ac_prog_rejected = yes; then
1821   # We found a bogon in the path, so make sure we never use it.
1822   set dummy $ac_cv_prog_CC
1823   shift
1824   if test $# -gt 0; then
1825     # We chose a different compiler from the bogus one.
1826     # However, it has the same basename, so the bogon will be chosen
1827     # first if we set CC to just the basename; use the full file name.
1828     shift
1829     set dummy "$ac_dir/$ac_word" "$@"
1830     shift
1831     ac_cv_prog_CC="$@"
1832   fi
1833 fi
1834 fi
1835 fi
1836 CC="$ac_cv_prog_CC"
1837 if test -n "$CC"; then
1838   echo "$ac_t""$CC" 1>&6
1839 else
1840   echo "$ac_t""no" 1>&6
1841 fi
1842
1843   if test -z "$CC"; then
1844     case "`uname -s`" in
1845     *win32* | *WIN32*)
1846       # Extract the first word of "cl", so it can be a program name with args.
1847 set dummy cl; ac_word=$2
1848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1849 echo "configure:1850: checking for $ac_word" >&5
1850 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1851   echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853   if test -n "$CC"; then
1854   ac_cv_prog_CC="$CC" # Let the user override the test.
1855 else
1856   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1857   ac_dummy="$PATH"
1858   for ac_dir in $ac_dummy; do
1859     test -z "$ac_dir" && ac_dir=.
1860     if test -f $ac_dir/$ac_word; then
1861       ac_cv_prog_CC="cl"
1862       break
1863     fi
1864   done
1865   IFS="$ac_save_ifs"
1866 fi
1867 fi
1868 CC="$ac_cv_prog_CC"
1869 if test -n "$CC"; then
1870   echo "$ac_t""$CC" 1>&6
1871 else
1872   echo "$ac_t""no" 1>&6
1873 fi
1874  ;;
1875     esac
1876   fi
1877   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1878 fi
1879
1880 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1881 echo "configure:1882: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1882
1883 ac_ext=c
1884 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1885 ac_cpp='$CPP $CPPFLAGS'
1886 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1887 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1888 cross_compiling=$ac_cv_prog_cc_cross
1889
1890 cat > conftest.$ac_ext << EOF
1891
1892 #line 1893 "configure"
1893 #include "confdefs.h"
1894
1895 main(){return(0);}
1896 EOF
1897 if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1898   ac_cv_prog_cc_works=yes
1899   # If we can't run a trivial program, we are probably using a cross compiler.
1900   if (./conftest; exit) 2>/dev/null; then
1901     ac_cv_prog_cc_cross=no
1902   else
1903     ac_cv_prog_cc_cross=yes
1904   fi
1905 else
1906   echo "configure: failed program was:" >&5
1907   cat conftest.$ac_ext >&5
1908   ac_cv_prog_cc_works=no
1909 fi
1910 rm -fr conftest*
1911 ac_ext=c
1912 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1913 ac_cpp='$CPP $CPPFLAGS'
1914 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1915 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1916 cross_compiling=$ac_cv_prog_cc_cross
1917
1918 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1919 if test $ac_cv_prog_cc_works = no; then
1920   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1921 fi
1922 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1923 echo "configure:1924: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1924 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1925 cross_compiling=$ac_cv_prog_cc_cross
1926
1927 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1928 echo "configure:1929: checking whether we are using GNU C" >&5
1929 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1930   echo $ac_n "(cached) $ac_c" 1>&6
1931 else
1932   cat > conftest.c <<EOF
1933 #ifdef __GNUC__
1934   yes;
1935 #endif
1936 EOF
1937 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1938   ac_cv_prog_gcc=yes
1939 else
1940   ac_cv_prog_gcc=no
1941 fi
1942 fi
1943
1944 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1945
1946 if test $ac_cv_prog_gcc = yes; then
1947   GCC=yes
1948 else
1949   GCC=
1950 fi
1951
1952 ac_test_CFLAGS="${CFLAGS+set}"
1953 ac_save_CFLAGS="$CFLAGS"
1954 CFLAGS=
1955 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1956 echo "configure:1957: checking whether ${CC-cc} accepts -g" >&5
1957 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1958   echo $ac_n "(cached) $ac_c" 1>&6
1959 else
1960   echo 'void f(){}' > conftest.c
1961 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1962   ac_cv_prog_cc_g=yes
1963 else
1964   ac_cv_prog_cc_g=no
1965 fi
1966 rm -f conftest*
1967
1968 fi
1969
1970 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1971 if test "$ac_test_CFLAGS" = set; then
1972   CFLAGS="$ac_save_CFLAGS"
1973 elif test $ac_cv_prog_cc_g = yes; then
1974   if test "$GCC" = yes; then
1975     CFLAGS="-g -O2"
1976   else
1977     CFLAGS="-g"
1978   fi
1979 else
1980   if test "$GCC" = yes; then
1981     CFLAGS="-O2"
1982   else
1983     CFLAGS=
1984   fi
1985 fi
1986
1987 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1988 if test "${with_gnu_ld+set}" = set; then
1989   withval="$with_gnu_ld"
1990   test "$withval" = no || with_gnu_ld=yes
1991 else
1992   with_gnu_ld=no
1993 fi
1994
1995
1996 ac_prog=ld
1997 if test "$ac_cv_prog_gcc" = yes; then
1998   # Check if gcc -print-prog-name=ld gives a path.
1999   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2000 echo "configure:2001: checking for ld used by GCC" >&5
2001   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2002   case "$ac_prog" in
2003   # Accept absolute paths.
2004   /* | A-Za-z:\\*)
2005     test -z "$LD" && LD="$ac_prog"
2006     ;;
2007   "")
2008     # If it fails, then pretend we aren't using GCC.
2009     ac_prog=ld
2010     ;;
2011   *)
2012     # If it is relative, then search for the first ld in PATH.
2013     with_gnu_ld=unknown
2014     ;;
2015   esac
2016 elif test "$with_gnu_ld" = yes; then
2017   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2018 echo "configure:2019: checking for GNU ld" >&5
2019 else
2020   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2021 echo "configure:2022: checking for non-GNU ld" >&5
2022 fi
2023 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2024   echo $ac_n "(cached) $ac_c" 1>&6
2025 else
2026   if test -z "$LD"; then
2027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2028   for ac_dir in $PATH; do
2029     test -z "$ac_dir" && ac_dir=.
2030     if test -f "$ac_dir/$ac_prog"; then
2031       ac_cv_path_LD="$ac_dir/$ac_prog"
2032       # Check to see if the program is GNU ld.  I'd rather use --version,
2033       # but apparently some GNU ld's only accept -v.
2034       # Break only if it was the GNU/non-GNU ld that we prefer.
2035       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2036         test "$with_gnu_ld" != no && break
2037       else
2038         test "$with_gnu_ld" != yes && break
2039       fi
2040     fi
2041   done
2042   IFS="$ac_save_ifs"
2043 else
2044   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2045 fi
2046 fi
2047
2048 LD="$ac_cv_path_LD"
2049 if test -n "$LD"; then
2050   echo "$ac_t""$LD" 1>&6
2051 else
2052   echo "$ac_t""no" 1>&6
2053 fi
2054 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2055
2056 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2057 echo "configure:2058: checking if the linker ($LD) is GNU ld" >&5
2058 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2059   echo $ac_n "(cached) $ac_c" 1>&6
2060 else
2061   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2062 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2063   ac_cv_prog_gnu_ld=yes
2064 else
2065   ac_cv_prog_gnu_ld=no
2066 fi
2067 fi
2068
2069 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2070
2071
2072 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2073 echo "configure:2074: checking for BSD-compatible nm" >&5
2074 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2075   echo $ac_n "(cached) $ac_c" 1>&6
2076 else
2077   case "$NM" in
2078 /* | A-Za-z:\\*)
2079   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2080   ;;
2081 *)
2082   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2083   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2084     test -z "$ac_dir" && ac_dir=.
2085     if test -f $ac_dir/nm; then
2086       # Check to see if the nm accepts a BSD-compat flag.
2087       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2088       #   nm: unknown option "B" ignored
2089       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2090         ac_cv_path_NM="$ac_dir/nm -B"
2091       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2092         ac_cv_path_NM="$ac_dir/nm -p"
2093       else
2094         ac_cv_path_NM="$ac_dir/nm"
2095       fi
2096       break
2097     fi
2098   done
2099   IFS="$ac_save_ifs"
2100   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2101   ;;
2102 esac
2103 fi
2104
2105 NM="$ac_cv_path_NM"
2106 echo "$ac_t""$NM" 1>&6
2107
2108
2109 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2110 echo "configure:2111: checking whether ln -s works" >&5
2111 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2112   echo $ac_n "(cached) $ac_c" 1>&6
2113 else
2114   rm -f conftestdata
2115 if ln -s X conftestdata 2>/dev/null
2116 then
2117   rm -f conftestdata
2118   ac_cv_prog_LN_S="ln -s"
2119 else
2120   ac_cv_prog_LN_S=ln
2121 fi
2122 fi
2123 LN_S="$ac_cv_prog_LN_S"
2124 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2125   echo "$ac_t""yes" 1>&6
2126 else
2127   echo "$ac_t""no" 1>&6
2128 fi
2129
2130 # Always use our own libtool.
2131 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2132
2133 # Check for any special flags to pass to ltconfig.
2134 libtool_flags=
2135 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2136 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2137 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2138 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2139 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2140
2141 # Some flags need to be propagated to the compiler or linker for good
2142 # libtool support.
2143 case "$host" in
2144 *-*-irix6*)
2145   # Find out which ABI we are using.
2146   echo '#line 2147 "configure"' > conftest.$ac_ext
2147   if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2148     case "`/usr/bin/file conftest.o`" in
2149     *32-bit*)
2150       LD="${LD-ld} -32"
2151       ;;
2152     *N32*)
2153       LD="${LD-ld} -n32"
2154       ;;
2155     *64-bit*)
2156       LD="${LD-ld} -64"
2157       ;;
2158     esac
2159   fi
2160   rm -rf conftest*
2161   ;;
2162
2163 *-*-sco3.2v5*)
2164   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2165   CFLAGS="$CFLAGS -belf"
2166   ;;
2167 esac
2168
2169 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2170 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2171 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2172 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2173 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2174 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2175
2176
2177 for ac_prog in mawk gawk nawk awk
2178 do
2179 # Extract the first word of "$ac_prog", so it can be a program name with args.
2180 set dummy $ac_prog; ac_word=$2
2181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2182 echo "configure:2183: checking for $ac_word" >&5
2183 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2184   echo $ac_n "(cached) $ac_c" 1>&6
2185 else
2186   if test -n "$AWK"; then
2187   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2188 else
2189   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2190   ac_dummy="$PATH"
2191   for ac_dir in $ac_dummy; do
2192     test -z "$ac_dir" && ac_dir=.
2193     if test -f $ac_dir/$ac_word; then
2194       ac_cv_prog_AWK="$ac_prog"
2195       break
2196     fi
2197   done
2198   IFS="$ac_save_ifs"
2199 fi
2200 fi
2201 AWK="$ac_cv_prog_AWK"
2202 if test -n "$AWK"; then
2203   echo "$ac_t""$AWK" 1>&6
2204 else
2205   echo "$ac_t""no" 1>&6
2206 fi
2207
2208 test -n "$AWK" && break
2209 done
2210
2211 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2212 echo "configure:2213: checking whether ln -s works" >&5
2213 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2214   echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216   rm -f conftestdata
2217 if ln -s X conftestdata 2>/dev/null
2218 then
2219   rm -f conftestdata
2220   ac_cv_prog_LN_S="ln -s"
2221 else
2222   ac_cv_prog_LN_S=ln
2223 fi
2224 fi
2225 LN_S="$ac_cv_prog_LN_S"
2226 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2227   echo "$ac_t""yes" 1>&6
2228 else
2229   echo "$ac_t""no" 1>&6
2230 fi
2231
2232
2233 # Extract the first word of "sendmail", so it can be a program name with args.
2234 set dummy sendmail; ac_word=$2
2235 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2236 echo "configure:2237: checking for $ac_word" >&5
2237 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2238   echo $ac_n "(cached) $ac_c" 1>&6
2239 else
2240   case "$SENDMAIL" in
2241   /*)
2242   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2243   ;;
2244   ?:/*)                  
2245   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2246   ;;
2247   *)
2248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2249   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2250   for ac_dir in $ac_dummy; do 
2251     test -z "$ac_dir" && ac_dir=.
2252     if test -f $ac_dir/$ac_word; then
2253       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2254       break
2255     fi
2256   done
2257   IFS="$ac_save_ifs"
2258   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2259   ;;
2260 esac
2261 fi
2262 SENDMAIL="$ac_cv_path_SENDMAIL"
2263 if test -n "$SENDMAIL"; then
2264   echo "$ac_t""$SENDMAIL" 1>&6
2265 else
2266   echo "$ac_t""no" 1>&6
2267 fi
2268
2269 # Extract the first word of "vi", so it can be a program name with args.
2270 set dummy vi; ac_word=$2
2271 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2272 echo "configure:2273: checking for $ac_word" >&5
2273 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2274   echo $ac_n "(cached) $ac_c" 1>&6
2275 else
2276   case "$EDITOR" in
2277   /*)
2278   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2279   ;;
2280   ?:/*)                  
2281   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2282   ;;
2283   *)
2284   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2285   ac_dummy="$PATH:/usr/ucb"
2286   for ac_dir in $ac_dummy; do 
2287     test -z "$ac_dir" && ac_dir=.
2288     if test -f $ac_dir/$ac_word; then
2289       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2290       break
2291     fi
2292   done
2293   IFS="$ac_save_ifs"
2294   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2295   ;;
2296 esac
2297 fi
2298 EDITOR="$ac_cv_path_EDITOR"
2299 if test -n "$EDITOR"; then
2300   echo "$ac_t""$EDITOR" 1>&6
2301 else
2302   echo "$ac_t""no" 1>&6
2303 fi
2304
2305 # Extract the first word of "finger", so it can be a program name with args.
2306 set dummy finger; ac_word=$2
2307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2308 echo "configure:2309: checking for $ac_word" >&5
2309 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2310   echo $ac_n "(cached) $ac_c" 1>&6
2311 else
2312   case "$FINGER" in
2313   /*)
2314   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2315   ;;
2316   ?:/*)                  
2317   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2318   ;;
2319   *)
2320   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2321   ac_dummy="$PATH:/usr/ucb"
2322   for ac_dir in $ac_dummy; do 
2323     test -z "$ac_dir" && ac_dir=.
2324     if test -f $ac_dir/$ac_word; then
2325       ac_cv_path_FINGER="$ac_dir/$ac_word"
2326       break
2327     fi
2328   done
2329   IFS="$ac_save_ifs"
2330   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2331   ;;
2332 esac
2333 fi
2334 FINGER="$ac_cv_path_FINGER"
2335 if test -n "$FINGER"; then
2336   echo "$ac_t""$FINGER" 1>&6
2337 else
2338   echo "$ac_t""no" 1>&6
2339 fi
2340
2341
2342 if test $ol_enable_perl = yes ; then
2343         # Extract the first word of "perl", so it can be a program name with args.
2344 set dummy perl; ac_word=$2
2345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2346 echo "configure:2347: checking for $ac_word" >&5
2347 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2348   echo $ac_n "(cached) $ac_c" 1>&6
2349 else
2350   case "$PERLBIN" in
2351   /*)
2352   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2353   ;;
2354   ?:/*)                  
2355   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2356   ;;
2357   *)
2358   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2359   ac_dummy="$PATH"
2360   for ac_dir in $ac_dummy; do 
2361     test -z "$ac_dir" && ac_dir=.
2362     if test -f $ac_dir/$ac_word; then
2363       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2364       break
2365     fi
2366   done
2367   IFS="$ac_save_ifs"
2368   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2369   ;;
2370 esac
2371 fi
2372 PERLBIN="$ac_cv_path_PERLBIN"
2373 if test -n "$PERLBIN"; then
2374   echo "$ac_t""$PERLBIN" 1>&6
2375 else
2376   echo "$ac_t""no" 1>&6
2377 fi
2378
2379
2380         if test "no$PERLBIN" = "no" ; then
2381                 ol_enable_perl=no
2382         fi
2383
2384         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2385         SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e perl_inc`"
2386 fi
2387
2388 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2389 echo "configure:2390: checking how to run the C preprocessor" >&5
2390 # On Suns, sometimes $CPP names a directory.
2391 if test -n "$CPP" && test -d "$CPP"; then
2392   CPP=
2393 fi
2394 if test -z "$CPP"; then
2395 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2396   echo $ac_n "(cached) $ac_c" 1>&6
2397 else
2398     # This must be in double quotes, not single quotes, because CPP may get
2399   # substituted into the Makefile and "${CC-cc}" will confuse make.
2400   CPP="${CC-cc} -E"
2401   # On the NeXT, cc -E runs the code through the compiler's parser,
2402   # not just through cpp.
2403   cat > conftest.$ac_ext <<EOF
2404 #line 2405 "configure"
2405 #include "confdefs.h"
2406 #include <assert.h>
2407 Syntax Error
2408 EOF
2409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2410 { (eval echo configure:2411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2412 if test -z "$ac_err"; then
2413   :
2414 else
2415   echo "$ac_err" >&5
2416   echo "configure: failed program was:" >&5
2417   cat conftest.$ac_ext >&5
2418   rm -rf conftest*
2419   CPP="${CC-cc} -E -traditional-cpp"
2420   cat > conftest.$ac_ext <<EOF
2421 #line 2422 "configure"
2422 #include "confdefs.h"
2423 #include <assert.h>
2424 Syntax Error
2425 EOF
2426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2427 { (eval echo configure:2428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2429 if test -z "$ac_err"; then
2430   :
2431 else
2432   echo "$ac_err" >&5
2433   echo "configure: failed program was:" >&5
2434   cat conftest.$ac_ext >&5
2435   rm -rf conftest*
2436   CPP="${CC-cc} -nologo -E"
2437   cat > conftest.$ac_ext <<EOF
2438 #line 2439 "configure"
2439 #include "confdefs.h"
2440 #include <assert.h>
2441 Syntax Error
2442 EOF
2443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2444 { (eval echo configure:2445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2446 if test -z "$ac_err"; then
2447   :
2448 else
2449   echo "$ac_err" >&5
2450   echo "configure: failed program was:" >&5
2451   cat conftest.$ac_ext >&5
2452   rm -rf conftest*
2453   CPP=/lib/cpp
2454 fi
2455 rm -f conftest*
2456 fi
2457 rm -f conftest*
2458 fi
2459 rm -f conftest*
2460   ac_cv_prog_CPP="$CPP"
2461 fi
2462   CPP="$ac_cv_prog_CPP"
2463 else
2464   ac_cv_prog_CPP="$CPP"
2465 fi
2466 echo "$ac_t""$CPP" 1>&6
2467
2468
2469 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2470         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2471
2472 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2473         echo "configure: warning: programs compiled here do run here..." 1>&2
2474         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2475
2476 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2477         echo "configure: warning: programs compiled here do not run here..." 1>&2
2478         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2479 fi
2480
2481 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2482 echo "configure:2483: checking for AIX" >&5
2483 cat > conftest.$ac_ext <<EOF
2484 #line 2485 "configure"
2485 #include "confdefs.h"
2486 #ifdef _AIX
2487   yes
2488 #endif
2489
2490 EOF
2491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2492   egrep "yes" >/dev/null 2>&1; then
2493   rm -rf conftest*
2494   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2495 #define _ALL_SOURCE 1
2496 EOF
2497
2498 else
2499   rm -rf conftest*
2500   echo "$ac_t""no" 1>&6
2501 fi
2502 rm -f conftest*
2503
2504
2505 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2506 echo "configure:2507: checking for POSIXized ISC" >&5
2507 if test -d /etc/conf/kconfig.d &&
2508   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2509 then
2510   echo "$ac_t""yes" 1>&6
2511   ISC=yes # If later tests want to check for ISC.
2512   cat >> confdefs.h <<\EOF
2513 #define _POSIX_SOURCE 1
2514 EOF
2515
2516   if test "$GCC" = yes; then
2517     CC="$CC -posix"
2518   else
2519     CC="$CC -Xp"
2520   fi
2521 else
2522   echo "$ac_t""no" 1>&6
2523   ISC=
2524 fi
2525
2526 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2527 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2528 echo "configure:2529: checking for minix/config.h" >&5
2529 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2530   echo $ac_n "(cached) $ac_c" 1>&6
2531 else
2532   cat > conftest.$ac_ext <<EOF
2533 #line 2534 "configure"
2534 #include "confdefs.h"
2535 #include <minix/config.h>
2536 EOF
2537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2538 { (eval echo configure:2539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2540 if test -z "$ac_err"; then
2541   rm -rf conftest*
2542   eval "ac_cv_header_$ac_safe=yes"
2543 else
2544   echo "$ac_err" >&5
2545   echo "configure: failed program was:" >&5
2546   cat conftest.$ac_ext >&5
2547   rm -rf conftest*
2548   eval "ac_cv_header_$ac_safe=no"
2549 fi
2550 rm -f conftest*
2551 fi
2552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2553   echo "$ac_t""yes" 1>&6
2554   MINIX=yes
2555 else
2556   echo "$ac_t""no" 1>&6
2557 MINIX=
2558 fi
2559
2560 if test "$MINIX" = yes; then
2561   cat >> confdefs.h <<\EOF
2562 #define _POSIX_SOURCE 1
2563 EOF
2564
2565   cat >> confdefs.h <<\EOF
2566 #define _POSIX_1_SOURCE 2
2567 EOF
2568
2569   cat >> confdefs.h <<\EOF
2570 #define _MINIX 1
2571 EOF
2572
2573 fi
2574
2575
2576 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2577 echo "configure:2578: checking for Cygwin environment" >&5
2578 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2579   echo $ac_n "(cached) $ac_c" 1>&6
2580 else
2581   cat > conftest.$ac_ext <<EOF
2582 #line 2583 "configure"
2583 #include "confdefs.h"
2584
2585 int main() {
2586
2587 #ifndef __CYGWIN__
2588 #define __CYGWIN__ __CYGWIN32__
2589 #endif
2590 return __CYGWIN__;
2591 ; return 0; }
2592 EOF
2593 if { (eval echo configure:2594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2594   rm -rf conftest*
2595   ac_cv_cygwin=yes
2596 else
2597   echo "configure: failed program was:" >&5
2598   cat conftest.$ac_ext >&5
2599   rm -rf conftest*
2600   ac_cv_cygwin=no
2601 fi
2602 rm -f conftest*
2603 rm -f conftest*
2604 fi
2605
2606 echo "$ac_t""$ac_cv_cygwin" 1>&6
2607 CYGWIN=
2608 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2609 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2610 echo "configure:2611: checking for mingw32 environment" >&5
2611 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2612   echo $ac_n "(cached) $ac_c" 1>&6
2613 else
2614   cat > conftest.$ac_ext <<EOF
2615 #line 2616 "configure"
2616 #include "confdefs.h"
2617
2618 int main() {
2619 return __MINGW32__;
2620 ; return 0; }
2621 EOF
2622 if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2623   rm -rf conftest*
2624   ac_cv_mingw32=yes
2625 else
2626   echo "configure: failed program was:" >&5
2627   cat conftest.$ac_ext >&5
2628   rm -rf conftest*
2629   ac_cv_mingw32=no
2630 fi
2631 rm -f conftest*
2632 rm -f conftest*
2633 fi
2634
2635 echo "$ac_t""$ac_cv_mingw32" 1>&6
2636 MINGW32=
2637 test "$ac_cv_mingw32" = yes && MINGW32=yes
2638
2639
2640 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2641 echo "configure:2642: checking for executable suffix" >&5
2642 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2643   echo $ac_n "(cached) $ac_c" 1>&6
2644 else
2645   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2646   ac_cv_exeext=.exe
2647 else
2648   rm -f conftest*
2649   echo 'int main () { return 0; }' > conftest.$ac_ext
2650   ac_cv_exeext=
2651   if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2652     for file in conftest.*; do
2653       case $file in
2654       *.c | *.o | *.obj) ;;
2655       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2656       esac
2657     done
2658   else
2659     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2660   fi
2661   rm -f conftest*
2662   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2663 fi
2664 fi
2665
2666 EXEEXT=""
2667 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2668 echo "$ac_t""${ac_cv_exeext}" 1>&6
2669 ac_exeext=$EXEEXT
2670
2671 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2672 echo "configure:2673: checking for object suffix" >&5
2673 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2674   echo $ac_n "(cached) $ac_c" 1>&6
2675 else
2676   rm -f conftest*
2677 echo 'int i = 1;' > conftest.$ac_ext
2678 if { (eval echo configure:2679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2679   for ac_file in conftest.*; do
2680     case $ac_file in
2681     *.c) ;;
2682     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2683     esac
2684   done
2685 else
2686   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2687 fi
2688 rm -f conftest*
2689 fi
2690
2691 echo "$ac_t""$ac_cv_objext" 1>&6
2692 OBJEXT=$ac_cv_objext
2693 ac_objext=$ac_cv_objext
2694
2695
2696
2697
2698
2699 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2700 echo "configure:2701: checking for ${CC-cc} option to accept ANSI C" >&5
2701 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2702   echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704   am_cv_prog_cc_stdc=no
2705 ac_save_CC="$CC"
2706 # Don't try gcc -ansi; that turns off useful extensions and
2707 # breaks some systems' header files.
2708 # AIX                   -qlanglvl=ansi
2709 # Ultrix and OSF/1      -std1
2710 # HP-UX                 -Aa -D_HPUX_SOURCE
2711 # SVR4                  -Xc -D__EXTENSIONS__
2712 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2713 do
2714   CC="$ac_save_CC $ac_arg"
2715   cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718 #include <stdarg.h>
2719 #include <stdio.h>
2720 #include <sys/types.h>
2721 #include <sys/stat.h>
2722 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2723 struct buf { int x; };
2724 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2725 static char *e (p, i)
2726      char **p;
2727      int i;
2728 {
2729   return p[i];
2730 }
2731 static char *f (char * (*g) (char **, int), char **p, ...)
2732 {
2733   char *s;
2734   va_list v;
2735   va_start (v,p);
2736   s = g (p, va_arg (v,int));
2737   va_end (v);
2738   return s;
2739 }
2740 int test (int i, double x);
2741 struct s1 {int (*f) (int a);};
2742 struct s2 {int (*f) (double a);};
2743 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2744 int argc;
2745 char **argv;
2746
2747 int main() {
2748
2749 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2750
2751 ; return 0; }
2752 EOF
2753 if { (eval echo configure:2754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2754   rm -rf conftest*
2755   am_cv_prog_cc_stdc="$ac_arg"; break
2756 else
2757   echo "configure: failed program was:" >&5
2758   cat conftest.$ac_ext >&5
2759 fi
2760 rm -f conftest*
2761 done
2762 CC="$ac_save_CC"
2763
2764 fi
2765
2766 if test -z "$am_cv_prog_cc_stdc"; then
2767   echo "$ac_t""none needed" 1>&6
2768 else
2769   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2770 fi
2771 case "x$am_cv_prog_cc_stdc" in
2772   x|xno) ;;
2773   *) CC="$CC $am_cv_prog_cc_stdc" ;;
2774 esac
2775
2776 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
2777         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
2778 fi
2779
2780
2781
2782
2783 echo $ac_n "checking for socket""... $ac_c" 1>&6
2784 echo "configure:2785: checking for socket" >&5
2785 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2786   echo $ac_n "(cached) $ac_c" 1>&6
2787 else
2788   cat > conftest.$ac_ext <<EOF
2789 #line 2790 "configure"
2790 #include "confdefs.h"
2791 /* System header to define __stub macros and hopefully few prototypes,
2792     which can conflict with char socket(); below.  */
2793 #include <assert.h>
2794 /* Override any gcc2 internal prototype to avoid an error.  */
2795 /* We use char because int might match the return type of a gcc2
2796     builtin and then its argument prototype would still apply.  */
2797 char socket();
2798
2799 int main() {
2800
2801 /* The GNU C library defines this for functions which it implements
2802     to always fail with ENOSYS.  Some functions are actually named
2803     something starting with __ and the normal name is an alias.  */
2804 #if defined (__stub_socket) || defined (__stub___socket)
2805 choke me
2806 #else
2807 socket();
2808 #endif
2809
2810 ; return 0; }
2811 EOF
2812 if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2813   rm -rf conftest*
2814   eval "ac_cv_func_socket=yes"
2815 else
2816   echo "configure: failed program was:" >&5
2817   cat conftest.$ac_ext >&5
2818   rm -rf conftest*
2819   eval "ac_cv_func_socket=no"
2820 fi
2821 rm -f conftest*
2822 fi
2823
2824 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2825   echo "$ac_t""yes" 1>&6
2826   have_socket=yes
2827 else
2828   echo "$ac_t""no" 1>&6
2829         
2830         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2831 echo "configure:2832: checking for main in -lsocket" >&5
2832 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2834   echo $ac_n "(cached) $ac_c" 1>&6
2835 else
2836   ac_save_LIBS="$LIBS"
2837 LIBS="-lsocket  $LIBS"
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841
2842 int main() {
2843 main()
2844 ; return 0; }
2845 EOF
2846 if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2847   rm -rf conftest*
2848   eval "ac_cv_lib_$ac_lib_var=yes"
2849 else
2850   echo "configure: failed program was:" >&5
2851   cat conftest.$ac_ext >&5
2852   rm -rf conftest*
2853   eval "ac_cv_lib_$ac_lib_var=no"
2854 fi
2855 rm -f conftest*
2856 LIBS="$ac_save_LIBS"
2857
2858 fi
2859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2860   echo "$ac_t""yes" 1>&6
2861     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2862     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2863   cat >> confdefs.h <<EOF
2864 #define $ac_tr_lib 1
2865 EOF
2866
2867   LIBS="-lsocket $LIBS"
2868
2869 else
2870   echo "$ac_t""no" 1>&6
2871 fi
2872
2873         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
2874 echo "configure:2875: checking for main in -lnet" >&5
2875 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
2876 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   ac_save_LIBS="$LIBS"
2880 LIBS="-lnet  $LIBS"
2881 cat > conftest.$ac_ext <<EOF
2882 #line 2883 "configure"
2883 #include "confdefs.h"
2884
2885 int main() {
2886 main()
2887 ; return 0; }
2888 EOF
2889 if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2890   rm -rf conftest*
2891   eval "ac_cv_lib_$ac_lib_var=yes"
2892 else
2893   echo "configure: failed program was:" >&5
2894   cat conftest.$ac_ext >&5
2895   rm -rf conftest*
2896   eval "ac_cv_lib_$ac_lib_var=no"
2897 fi
2898 rm -f conftest*
2899 LIBS="$ac_save_LIBS"
2900
2901 fi
2902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2903   echo "$ac_t""yes" 1>&6
2904     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2905     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2906   cat >> confdefs.h <<EOF
2907 #define $ac_tr_lib 1
2908 EOF
2909
2910   LIBS="-lnet $LIBS"
2911
2912 else
2913   echo "$ac_t""no" 1>&6
2914 fi
2915
2916         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
2917 echo "configure:2918: checking for main in -lnsl_s" >&5
2918 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
2919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2920   echo $ac_n "(cached) $ac_c" 1>&6
2921 else
2922   ac_save_LIBS="$LIBS"
2923 LIBS="-lnsl_s  $LIBS"
2924 cat > conftest.$ac_ext <<EOF
2925 #line 2926 "configure"
2926 #include "confdefs.h"
2927
2928 int main() {
2929 main()
2930 ; return 0; }
2931 EOF
2932 if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2933   rm -rf conftest*
2934   eval "ac_cv_lib_$ac_lib_var=yes"
2935 else
2936   echo "configure: failed program was:" >&5
2937   cat conftest.$ac_ext >&5
2938   rm -rf conftest*
2939   eval "ac_cv_lib_$ac_lib_var=no"
2940 fi
2941 rm -f conftest*
2942 LIBS="$ac_save_LIBS"
2943
2944 fi
2945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2946   echo "$ac_t""yes" 1>&6
2947     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2948     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2949   cat >> confdefs.h <<EOF
2950 #define $ac_tr_lib 1
2951 EOF
2952
2953   LIBS="-lnsl_s $LIBS"
2954
2955 else
2956   echo "$ac_t""no" 1>&6
2957 fi
2958
2959         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2960 echo "configure:2961: checking for main in -lnsl" >&5
2961 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2962 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2963   echo $ac_n "(cached) $ac_c" 1>&6
2964 else
2965   ac_save_LIBS="$LIBS"
2966 LIBS="-lnsl  $LIBS"
2967 cat > conftest.$ac_ext <<EOF
2968 #line 2969 "configure"
2969 #include "confdefs.h"
2970
2971 int main() {
2972 main()
2973 ; return 0; }
2974 EOF
2975 if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2976   rm -rf conftest*
2977   eval "ac_cv_lib_$ac_lib_var=yes"
2978 else
2979   echo "configure: failed program was:" >&5
2980   cat conftest.$ac_ext >&5
2981   rm -rf conftest*
2982   eval "ac_cv_lib_$ac_lib_var=no"
2983 fi
2984 rm -f conftest*
2985 LIBS="$ac_save_LIBS"
2986
2987 fi
2988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2989   echo "$ac_t""yes" 1>&6
2990     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2991     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2992   cat >> confdefs.h <<EOF
2993 #define $ac_tr_lib 1
2994 EOF
2995
2996   LIBS="-lnsl $LIBS"
2997
2998 else
2999   echo "$ac_t""no" 1>&6
3000 fi
3001
3002         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3003 echo "configure:3004: checking for socket in -linet" >&5
3004 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3005 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3006   echo $ac_n "(cached) $ac_c" 1>&6
3007 else
3008   ac_save_LIBS="$LIBS"
3009 LIBS="-linet  $LIBS"
3010 cat > conftest.$ac_ext <<EOF
3011 #line 3012 "configure"
3012 #include "confdefs.h"
3013 /* Override any gcc2 internal prototype to avoid an error.  */
3014 /* We use char because int might match the return type of a gcc2
3015     builtin and then its argument prototype would still apply.  */
3016 char socket();
3017
3018 int main() {
3019 socket()
3020 ; return 0; }
3021 EOF
3022 if { (eval echo configure:3023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3023   rm -rf conftest*
3024   eval "ac_cv_lib_$ac_lib_var=yes"
3025 else
3026   echo "configure: failed program was:" >&5
3027   cat conftest.$ac_ext >&5
3028   rm -rf conftest*
3029   eval "ac_cv_lib_$ac_lib_var=no"
3030 fi
3031 rm -f conftest*
3032 LIBS="$ac_save_LIBS"
3033
3034 fi
3035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3036   echo "$ac_t""yes" 1>&6
3037     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3038     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3039   cat >> confdefs.h <<EOF
3040 #define $ac_tr_lib 1
3041 EOF
3042
3043   LIBS="-linet $LIBS"
3044
3045 else
3046   echo "$ac_t""no" 1>&6
3047 fi
3048
3049         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3050 echo "configure:3051: checking for main in -lgen" >&5
3051 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   ac_save_LIBS="$LIBS"
3056 LIBS="-lgen  $LIBS"
3057 cat > conftest.$ac_ext <<EOF
3058 #line 3059 "configure"
3059 #include "confdefs.h"
3060
3061 int main() {
3062 main()
3063 ; return 0; }
3064 EOF
3065 if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3066   rm -rf conftest*
3067   eval "ac_cv_lib_$ac_lib_var=yes"
3068 else
3069   echo "configure: failed program was:" >&5
3070   cat conftest.$ac_ext >&5
3071   rm -rf conftest*
3072   eval "ac_cv_lib_$ac_lib_var=no"
3073 fi
3074 rm -f conftest*
3075 LIBS="$ac_save_LIBS"
3076
3077 fi
3078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3079   echo "$ac_t""yes" 1>&6
3080     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3081     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3082   cat >> confdefs.h <<EOF
3083 #define $ac_tr_lib 1
3084 EOF
3085
3086   LIBS="-lgen $LIBS"
3087
3088 else
3089   echo "$ac_t""no" 1>&6
3090 fi
3091
3092
3093 fi
3094
3095
3096 for ac_func in res_search
3097 do
3098 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3099 echo "configure:3100: checking for $ac_func" >&5
3100 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3101   echo $ac_n "(cached) $ac_c" 1>&6
3102 else
3103   cat > conftest.$ac_ext <<EOF
3104 #line 3105 "configure"
3105 #include "confdefs.h"
3106 /* System header to define __stub macros and hopefully few prototypes,
3107     which can conflict with char $ac_func(); below.  */
3108 #include <assert.h>
3109 /* Override any gcc2 internal prototype to avoid an error.  */
3110 /* We use char because int might match the return type of a gcc2
3111     builtin and then its argument prototype would still apply.  */
3112 char $ac_func();
3113
3114 int main() {
3115
3116 /* The GNU C library defines this for functions which it implements
3117     to always fail with ENOSYS.  Some functions are actually named
3118     something starting with __ and the normal name is an alias.  */
3119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3120 choke me
3121 #else
3122 $ac_func();
3123 #endif
3124
3125 ; return 0; }
3126 EOF
3127 if { (eval echo configure:3128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3128   rm -rf conftest*
3129   eval "ac_cv_func_$ac_func=yes"
3130 else
3131   echo "configure: failed program was:" >&5
3132   cat conftest.$ac_ext >&5
3133   rm -rf conftest*
3134   eval "ac_cv_func_$ac_func=no"
3135 fi
3136 rm -f conftest*
3137 fi
3138
3139 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3140   echo "$ac_t""yes" 1>&6
3141     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3142   cat >> confdefs.h <<EOF
3143 #define $ac_tr_func 1
3144 EOF
3145  
3146 else
3147   echo "$ac_t""no" 1>&6
3148 fi
3149 done
3150
3151 if test $ac_cv_func_res_search = "no" ; then 
3152         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3153 echo "configure:3154: checking for res_search in -lbind" >&5
3154 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3155 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3156   echo $ac_n "(cached) $ac_c" 1>&6
3157 else
3158   ac_save_LIBS="$LIBS"
3159 LIBS="-lbind  $LIBS"
3160 cat > conftest.$ac_ext <<EOF
3161 #line 3162 "configure"
3162 #include "confdefs.h"
3163 /* Override any gcc2 internal prototype to avoid an error.  */
3164 /* We use char because int might match the return type of a gcc2
3165     builtin and then its argument prototype would still apply.  */
3166 char res_search();
3167
3168 int main() {
3169 res_search()
3170 ; return 0; }
3171 EOF
3172 if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3173   rm -rf conftest*
3174   eval "ac_cv_lib_$ac_lib_var=yes"
3175 else
3176   echo "configure: failed program was:" >&5
3177   cat conftest.$ac_ext >&5
3178   rm -rf conftest*
3179   eval "ac_cv_lib_$ac_lib_var=no"
3180 fi
3181 rm -f conftest*
3182 LIBS="$ac_save_LIBS"
3183
3184 fi
3185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3186   echo "$ac_t""yes" 1>&6
3187     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3188     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3189   cat >> confdefs.h <<EOF
3190 #define $ac_tr_lib 1
3191 EOF
3192
3193   LIBS="-lbind $LIBS"
3194
3195 else
3196   echo "$ac_t""no" 1>&6
3197 fi
3198
3199         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3200                 cat >> confdefs.h <<\EOF
3201 #define HAVE_RES_SEARCH 1
3202 EOF
3203
3204         else
3205                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3206 echo "configure:3207: checking for res_search in -lresolv" >&5
3207 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211   ac_save_LIBS="$LIBS"
3212 LIBS="-lresolv  $LIBS"
3213 cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 /* Override any gcc2 internal prototype to avoid an error.  */
3217 /* We use char because int might match the return type of a gcc2
3218     builtin and then its argument prototype would still apply.  */
3219 char res_search();
3220
3221 int main() {
3222 res_search()
3223 ; return 0; }
3224 EOF
3225 if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3226   rm -rf conftest*
3227   eval "ac_cv_lib_$ac_lib_var=yes"
3228 else
3229   echo "configure: failed program was:" >&5
3230   cat conftest.$ac_ext >&5
3231   rm -rf conftest*
3232   eval "ac_cv_lib_$ac_lib_var=no"
3233 fi
3234 rm -f conftest*
3235 LIBS="$ac_save_LIBS"
3236
3237 fi
3238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3239   echo "$ac_t""yes" 1>&6
3240     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3241     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3242   cat >> confdefs.h <<EOF
3243 #define $ac_tr_lib 1
3244 EOF
3245
3246   LIBS="-lresolv $LIBS"
3247
3248 else
3249   echo "$ac_t""no" 1>&6
3250 fi
3251
3252                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3253                         cat >> confdefs.h <<\EOF
3254 #define HAVE_RES_SEARCH 1
3255 EOF
3256
3257                 fi
3258         fi
3259 fi
3260
3261 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3262 echo "configure:3263: checking for sigset in -lV3" >&5
3263 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3264 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3265   echo $ac_n "(cached) $ac_c" 1>&6
3266 else
3267   ac_save_LIBS="$LIBS"
3268 LIBS="-lV3  $LIBS"
3269 cat > conftest.$ac_ext <<EOF
3270 #line 3271 "configure"
3271 #include "confdefs.h"
3272 /* Override any gcc2 internal prototype to avoid an error.  */
3273 /* We use char because int might match the return type of a gcc2
3274     builtin and then its argument prototype would still apply.  */
3275 char sigset();
3276
3277 int main() {
3278 sigset()
3279 ; return 0; }
3280 EOF
3281 if { (eval echo configure:3282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3282   rm -rf conftest*
3283   eval "ac_cv_lib_$ac_lib_var=yes"
3284 else
3285   echo "configure: failed program was:" >&5
3286   cat conftest.$ac_ext >&5
3287   rm -rf conftest*
3288   eval "ac_cv_lib_$ac_lib_var=no"
3289 fi
3290 rm -f conftest*
3291 LIBS="$ac_save_LIBS"
3292
3293 fi
3294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3295   echo "$ac_t""yes" 1>&6
3296     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3297     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3298   cat >> confdefs.h <<EOF
3299 #define $ac_tr_lib 1
3300 EOF
3301
3302   LIBS="-lV3 $LIBS"
3303
3304 else
3305   echo "$ac_t""no" 1>&6
3306 fi
3307
3308
3309 # ISODE tests
3310 ol_link_isode=no
3311 if test $ol_enable_ldapd != no ; then
3312                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3313 echo "configure:3314: checking for main in -lxtpp" >&5
3314 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3316   echo $ac_n "(cached) $ac_c" 1>&6
3317 else
3318   ac_save_LIBS="$LIBS"
3319 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3320 cat > conftest.$ac_ext <<EOF
3321 #line 3322 "configure"
3322 #include "confdefs.h"
3323
3324 int main() {
3325 main()
3326 ; return 0; }
3327 EOF
3328 if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3329   rm -rf conftest*
3330   eval "ac_cv_lib_$ac_lib_var=yes"
3331 else
3332   echo "configure: failed program was:" >&5
3333   cat conftest.$ac_ext >&5
3334   rm -rf conftest*
3335   eval "ac_cv_lib_$ac_lib_var=no"
3336 fi
3337 rm -f conftest*
3338 LIBS="$ac_save_LIBS"
3339
3340 fi
3341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3342   echo "$ac_t""yes" 1>&6
3343   
3344                 ol_link_isode=yes
3345                 cat >> confdefs.h <<\EOF
3346 #define HAVE_XTPP 1
3347 EOF
3348
3349                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3350                 
3351 else
3352   echo "$ac_t""no" 1>&6
3353 :
3354 fi
3355
3356         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3357 echo "configure:3358: checking for main in -ldsap" >&5
3358 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3359 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3360   echo $ac_n "(cached) $ac_c" 1>&6
3361 else
3362   ac_save_LIBS="$LIBS"
3363 LIBS="-ldsap -lisode $LIBS"
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3367
3368 int main() {
3369 main()
3370 ; return 0; }
3371 EOF
3372 if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3373   rm -rf conftest*
3374   eval "ac_cv_lib_$ac_lib_var=yes"
3375 else
3376   echo "configure: failed program was:" >&5
3377   cat conftest.$ac_ext >&5
3378   rm -rf conftest*
3379   eval "ac_cv_lib_$ac_lib_var=no"
3380 fi
3381 rm -f conftest*
3382 LIBS="$ac_save_LIBS"
3383
3384 fi
3385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3386   echo "$ac_t""yes" 1>&6
3387   
3388                 ol_link_isode=yes
3389                 cat >> confdefs.h <<\EOF
3390 #define HAVE_DSAP 1
3391 EOF
3392
3393                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3394                 
3395 else
3396   echo "$ac_t""no" 1>&6
3397 :
3398 fi
3399
3400         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3401 echo "configure:3402: checking for main in -lisode" >&5
3402 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3403 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3404   echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406   ac_save_LIBS="$LIBS"
3407 LIBS="-lisode  $LIBS"
3408 cat > conftest.$ac_ext <<EOF
3409 #line 3410 "configure"
3410 #include "confdefs.h"
3411
3412 int main() {
3413 main()
3414 ; return 0; }
3415 EOF
3416 if { (eval echo configure:3417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3417   rm -rf conftest*
3418   eval "ac_cv_lib_$ac_lib_var=yes"
3419 else
3420   echo "configure: failed program was:" >&5
3421   cat conftest.$ac_ext >&5
3422   rm -rf conftest*
3423   eval "ac_cv_lib_$ac_lib_var=no"
3424 fi
3425 rm -f conftest*
3426 LIBS="$ac_save_LIBS"
3427
3428 fi
3429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3430   echo "$ac_t""yes" 1>&6
3431   
3432                 ol_link_isode=yes
3433                 cat >> confdefs.h <<\EOF
3434 #define HAVE_ISODE 1
3435 EOF
3436
3437                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3438                 
3439 else
3440   echo "$ac_t""no" 1>&6
3441 :
3442 fi
3443
3444 fi
3445
3446 if test $ol_link_isode != no; then
3447         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3448 echo "configure:3449: checking for main in -lpp" >&5
3449 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3450 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3451   echo $ac_n "(cached) $ac_c" 1>&6
3452 else
3453   ac_save_LIBS="$LIBS"
3454 LIBS="-lpp  $LIBS"
3455 cat > conftest.$ac_ext <<EOF
3456 #line 3457 "configure"
3457 #include "confdefs.h"
3458
3459 int main() {
3460 main()
3461 ; return 0; }
3462 EOF
3463 if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3464   rm -rf conftest*
3465   eval "ac_cv_lib_$ac_lib_var=yes"
3466 else
3467   echo "configure: failed program was:" >&5
3468   cat conftest.$ac_ext >&5
3469   rm -rf conftest*
3470   eval "ac_cv_lib_$ac_lib_var=no"
3471 fi
3472 rm -f conftest*
3473 LIBS="$ac_save_LIBS"
3474
3475 fi
3476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3477   echo "$ac_t""yes" 1>&6
3478   
3479                 cat >> confdefs.h <<\EOF
3480 #define HAVE_PP 1
3481 EOF
3482
3483                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3484                 
3485 else
3486   echo "$ac_t""no" 1>&6
3487 :
3488 fi
3489
3490
3491         # Extract the first word of "pepsy", so it can be a program name with args.
3492 set dummy pepsy; ac_word=$2
3493 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3494 echo "configure:3495: checking for $ac_word" >&5
3495 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3496   echo $ac_n "(cached) $ac_c" 1>&6
3497 else
3498   case "$PEPSY" in
3499   /*)
3500   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3501   ;;
3502   ?:/*)                  
3503   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3504   ;;
3505   *)
3506   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3507   ac_dummy="$PATH"
3508   for ac_dir in $ac_dummy; do 
3509     test -z "$ac_dir" && ac_dir=.
3510     if test -f $ac_dir/$ac_word; then
3511       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3512       break
3513     fi
3514   done
3515   IFS="$ac_save_ifs"
3516   ;;
3517 esac
3518 fi
3519 PEPSY="$ac_cv_path_PEPSY"
3520 if test -n "$PEPSY"; then
3521   echo "$ac_t""$PEPSY" 1>&6
3522 else
3523   echo "$ac_t""no" 1>&6
3524 fi
3525
3526 fi
3527
3528 ol_link_kerberos=no
3529
3530 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3531         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3532 do
3533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3535 echo "configure:3536: checking for $ac_hdr" >&5
3536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539   cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <$ac_hdr>
3543 EOF
3544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3545 { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3547 if test -z "$ac_err"; then
3548   rm -rf conftest*
3549   eval "ac_cv_header_$ac_safe=yes"
3550 else
3551   echo "$ac_err" >&5
3552   echo "configure: failed program was:" >&5
3553   cat conftest.$ac_ext >&5
3554   rm -rf conftest*
3555   eval "ac_cv_header_$ac_safe=no"
3556 fi
3557 rm -f conftest*
3558 fi
3559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3560   echo "$ac_t""yes" 1>&6
3561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3562   cat >> confdefs.h <<EOF
3563 #define $ac_tr_hdr 1
3564 EOF
3565  
3566 else
3567   echo "$ac_t""no" 1>&6
3568 fi
3569 done
3570
3571
3572         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3573                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3574 echo "configure:3575: checking for main in -lkrb4" >&5
3575 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3576 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3577   echo $ac_n "(cached) $ac_c" 1>&6
3578 else
3579   ac_save_LIBS="$LIBS"
3580 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3581 cat > conftest.$ac_ext <<EOF
3582 #line 3583 "configure"
3583 #include "confdefs.h"
3584
3585 int main() {
3586 main()
3587 ; return 0; }
3588 EOF
3589 if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3590   rm -rf conftest*
3591   eval "ac_cv_lib_$ac_lib_var=yes"
3592 else
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595   rm -rf conftest*
3596   eval "ac_cv_lib_$ac_lib_var=no"
3597 fi
3598 rm -f conftest*
3599 LIBS="$ac_save_LIBS"
3600
3601 fi
3602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3603   echo "$ac_t""yes" 1>&6
3604   have_k5=yes
3605 else
3606   echo "$ac_t""no" 1>&6
3607 have_k5=no
3608 fi
3609
3610
3611                 if test $have_k5 = yes ; then
3612                         ol_with_kerberos=found
3613                         ol_link_kerberos=yes
3614
3615                         cat >> confdefs.h <<\EOF
3616 #define HAVE_KERBEROS 1
3617 EOF
3618
3619                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3620                 fi
3621         fi
3622 fi
3623
3624 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3625         for ac_hdr in krb.h des.h
3626 do
3627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3629 echo "configure:3630: checking for $ac_hdr" >&5
3630 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   cat > conftest.$ac_ext <<EOF
3634 #line 3635 "configure"
3635 #include "confdefs.h"
3636 #include <$ac_hdr>
3637 EOF
3638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3639 { (eval echo configure:3640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3641 if test -z "$ac_err"; then
3642   rm -rf conftest*
3643   eval "ac_cv_header_$ac_safe=yes"
3644 else
3645   echo "$ac_err" >&5
3646   echo "configure: failed program was:" >&5
3647   cat conftest.$ac_ext >&5
3648   rm -rf conftest*
3649   eval "ac_cv_header_$ac_safe=no"
3650 fi
3651 rm -f conftest*
3652 fi
3653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3654   echo "$ac_t""yes" 1>&6
3655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3656   cat >> confdefs.h <<EOF
3657 #define $ac_tr_hdr 1
3658 EOF
3659  
3660 else
3661   echo "$ac_t""no" 1>&6
3662 fi
3663 done
3664
3665
3666         if test $ac_cv_header_krb_h = yes ; then
3667                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3668 echo "configure:3669: checking for main in -lkrb" >&5
3669 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3670 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3671   echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673   ac_save_LIBS="$LIBS"
3674 LIBS="-lkrb -ldes $LIBS"
3675 cat > conftest.$ac_ext <<EOF
3676 #line 3677 "configure"
3677 #include "confdefs.h"
3678
3679 int main() {
3680 main()
3681 ; return 0; }
3682 EOF
3683 if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3684   rm -rf conftest*
3685   eval "ac_cv_lib_$ac_lib_var=yes"
3686 else
3687   echo "configure: failed program was:" >&5
3688   cat conftest.$ac_ext >&5
3689   rm -rf conftest*
3690   eval "ac_cv_lib_$ac_lib_var=no"
3691 fi
3692 rm -f conftest*
3693 LIBS="$ac_save_LIBS"
3694
3695 fi
3696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3697   echo "$ac_t""yes" 1>&6
3698   have_k4=yes
3699 else
3700   echo "$ac_t""no" 1>&6
3701 have_k4=no
3702 fi
3703
3704
3705                 if test $have_k4 = yes ; then
3706                         ol_with_kerberos=found
3707                         ol_link_kerberos=yes
3708
3709                         cat >> confdefs.h <<\EOF
3710 #define HAVE_KERBEROS 1
3711 EOF
3712
3713                         KRB_LIBS="-lkrb -ldes"
3714                 fi
3715         fi
3716 fi
3717
3718
3719 ol_link_threads=no
3720 if test $ol_with_threads = auto -o $ol_with_threads = yes \
3721         -o $ol_with_threads = posix ; then
3722
3723         for ac_hdr in pthread.h sched.h
3724 do
3725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3727 echo "configure:3728: checking for $ac_hdr" >&5
3728 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3729   echo $ac_n "(cached) $ac_c" 1>&6
3730 else
3731   cat > conftest.$ac_ext <<EOF
3732 #line 3733 "configure"
3733 #include "confdefs.h"
3734 #include <$ac_hdr>
3735 EOF
3736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3737 { (eval echo configure:3738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3739 if test -z "$ac_err"; then
3740   rm -rf conftest*
3741   eval "ac_cv_header_$ac_safe=yes"
3742 else
3743   echo "$ac_err" >&5
3744   echo "configure: failed program was:" >&5
3745   cat conftest.$ac_ext >&5
3746   rm -rf conftest*
3747   eval "ac_cv_header_$ac_safe=no"
3748 fi
3749 rm -f conftest*
3750 fi
3751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3752   echo "$ac_t""yes" 1>&6
3753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3754   cat >> confdefs.h <<EOF
3755 #define $ac_tr_hdr 1
3756 EOF
3757  
3758 else
3759   echo "$ac_t""no" 1>&6
3760 fi
3761 done
3762
3763
3764         if test $ac_cv_header_pthread_h = yes ; then
3765                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
3766 echo "configure:3767: checking POSIX thread version" >&5
3767 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   
3771         cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774
3775 #               include <pthread.h>
3776                 /* this check could be improved */
3777 #               ifdef PTHREAD_ONCE_INIT
3778                         pthread_version_final
3779 #               endif
3780         
3781 EOF
3782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3783   egrep "pthread_version_final" >/dev/null 2>&1; then
3784   rm -rf conftest*
3785   ol_pthread_final=yes
3786 else
3787   rm -rf conftest*
3788   ol_pthread_final=no
3789 fi
3790 rm -f conftest*
3791
3792
3793         cat > conftest.$ac_ext <<EOF
3794 #line 3795 "configure"
3795 #include "confdefs.h"
3796
3797 #               include <pthread.h>
3798                 /* this check could be improved */
3799 #               ifdef pthread_once_init
3800                         pthread_version_draft4
3801 #               endif
3802         
3803 EOF
3804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3805   egrep "pthread_version_draft4" >/dev/null 2>&1; then
3806   rm -rf conftest*
3807   ol_pthread_draft4=yes
3808 else
3809   rm -rf conftest*
3810   ol_pthread_draft4=no
3811 fi
3812 rm -f conftest*
3813
3814
3815         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
3816                 ol_cv_pthread_version=final
3817         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
3818                 ol_cv_pthread_version=draft4
3819         else
3820                 ol_cv_pthread_version=unknown
3821         fi
3822
3823 fi
3824
3825 echo "$ac_t""$ol_cv_pthread_version" 1>&6
3826
3827
3828                 if test $ol_cv_pthread_version = final ; then
3829                         cat >> confdefs.h <<\EOF
3830 #define HAVE_PTHREADS_FINAL 1
3831 EOF
3832
3833                 elif test $ol_cv_pthread_version = draft4 ; then
3834                         cat >> confdefs.h <<\EOF
3835 #define HAVE_PTHREADS_D4 1
3836 EOF
3837
3838                 else
3839                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
3840                 fi
3841
3842                 # consider threads found
3843                 ol_with_threads=found
3844
3845                 
3846 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
3847 echo "configure:3848: checking for LinuxThreads" >&5
3848 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
3849   echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851   
3852         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
3853         if test "$res" -gt 0 ; then
3854                 ol_cv_linux_threads=yes
3855         else
3856                 ol_cv_linux_threads=no
3857         fi
3858
3859 fi
3860
3861 echo "$ac_t""$ol_cv_linux_threads" 1>&6
3862
3863
3864                 if test $ol_cv_linux_threads = yes ; then
3865                         cat >> confdefs.h <<\EOF
3866 #define HAVE_LINUX_THREADS 1
3867 EOF
3868
3869                 fi
3870
3871                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
3872                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
3873 echo "configure:3874: checking for pthread_create" >&5
3874 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   cat > conftest.$ac_ext <<EOF
3878 #line 3879 "configure"
3879 #include "confdefs.h"
3880 /* System header to define __stub macros and hopefully few prototypes,
3881     which can conflict with char pthread_create(); below.  */
3882 #include <assert.h>
3883 /* Override any gcc2 internal prototype to avoid an error.  */
3884 /* We use char because int might match the return type of a gcc2
3885     builtin and then its argument prototype would still apply.  */
3886 char pthread_create();
3887
3888 int main() {
3889
3890 /* The GNU C library defines this for functions which it implements
3891     to always fail with ENOSYS.  Some functions are actually named
3892     something starting with __ and the normal name is an alias.  */
3893 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
3894 choke me
3895 #else
3896 pthread_create();
3897 #endif
3898
3899 ; return 0; }
3900 EOF
3901 if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3902   rm -rf conftest*
3903   eval "ac_cv_func_pthread_create=yes"
3904 else
3905   echo "configure: failed program was:" >&5
3906   cat conftest.$ac_ext >&5
3907   rm -rf conftest*
3908   eval "ac_cv_func_pthread_create=no"
3909 fi
3910 rm -f conftest*
3911 fi
3912
3913 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
3914   echo "$ac_t""yes" 1>&6
3915   ol_link_threads=yes
3916 else
3917   echo "$ac_t""no" 1>&6
3918 fi
3919
3920
3921                 if test $ol_link_threads = no ; then
3922                                                 echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
3923 echo "configure:3924: checking for pthread_create with -kthread" >&5
3924 if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
3925   echo $ac_n "(cached) $ac_c" 1>&6
3926 else
3927   
3928                                                                 save_LIBS="$LIBS"
3929                                 LIBS="-kthread $LIBS"
3930                                 cat > conftest.$ac_ext <<EOF
3931 #line 3932 "configure"
3932 #include "confdefs.h"
3933 char pthread();
3934 int main() {
3935
3936                                         pthread_create();
3937                                         
3938 ; return 0; }
3939 EOF
3940 if { (eval echo configure:3941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3941   rm -rf conftest*
3942   ol_cv_kthread_flag=yes
3943 else
3944   echo "configure: failed program was:" >&5
3945   cat conftest.$ac_ext >&5
3946   rm -rf conftest*
3947   ol_cv_kthread_flag=no
3948 fi
3949 rm -f conftest*
3950                                                                 LIBS="$save_LIBS"
3951                         
3952 fi
3953
3954 echo "$ac_t""$ol_cv_kthread_flag" 1>&6
3955
3956                         if test $ol_cv_kthread_flag = yes ; then
3957                                 LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
3958                                 ol_link_threads=posix
3959                         fi
3960                 fi
3961
3962                 if test $ol_link_threads = no ; then
3963                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
3964 echo "configure:3965: checking for pthread_create with -pthread" >&5
3965 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
3966   echo $ac_n "(cached) $ac_c" 1>&6
3967 else
3968   
3969                                                                 save_LIBS="$LIBS"
3970                                 LIBS="-pthread $LIBS"
3971                                 cat > conftest.$ac_ext <<EOF
3972 #line 3973 "configure"
3973 #include "confdefs.h"
3974 char pthread();
3975 int main() {
3976
3977                                         pthread_create();
3978                                         
3979 ; return 0; }
3980 EOF
3981 if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982   rm -rf conftest*
3983   ol_cv_pthread_flag=yes
3984 else
3985   echo "configure: failed program was:" >&5
3986   cat conftest.$ac_ext >&5
3987   rm -rf conftest*
3988   ol_cv_pthread_flag=no
3989 fi
3990 rm -f conftest*
3991                                                                 LIBS="$save_LIBS"
3992                         
3993 fi
3994
3995 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
3996
3997                         if test $ol_cv_pthread_flag = yes ; then
3998                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
3999                                 ol_link_threads=posix
4000                         fi
4001                 fi
4002
4003                 if test $ol_link_threads = no ; then
4004                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
4005 echo "configure:4006: checking for pthread_create with -pthreads" >&5
4006 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
4007   echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009   
4010                                                                 save_LIBS="$LIBS"
4011                                 LIBS="-pthreads $LIBS"
4012                                 cat > conftest.$ac_ext <<EOF
4013 #line 4014 "configure"
4014 #include "confdefs.h"
4015 char pthread();
4016 int main() {
4017
4018                                         pthread_create();
4019                                         
4020 ; return 0; }
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4023   rm -rf conftest*
4024   ol_cv_pthreads_flag=yes
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   ol_cv_pthreads_flag=no
4030 fi
4031 rm -f conftest*
4032                                                                 LIBS="$save_LIBS"
4033                         
4034 fi
4035
4036 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
4037
4038                         if test $ol_cv_pthreads_flag = yes ; then
4039                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
4040                                 ol_link_threads=posix
4041                         fi
4042                 fi
4043
4044                 if test $ol_link_threads = no ; then
4045                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
4046 echo "configure:4047: checking for pthread_create with -thread" >&5
4047 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4048   echo $ac_n "(cached) $ac_c" 1>&6
4049 else
4050   
4051                                                                 save_LIBS="$LIBS"
4052                                 LIBS="-thread $LIBS"
4053                                 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 char pthread();
4057 int main() {
4058
4059                                         pthread_create();
4060                                         
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4064   rm -rf conftest*
4065   ol_cv_thread_flag=yes
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   ol_cv_thread_flag=no
4071 fi
4072 rm -f conftest*
4073                                                                 LIBS="$save_LIBS"
4074                         
4075 fi
4076
4077 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4078
4079                         if test $ol_cv_thread_flag = yes ; then
4080                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
4081                                 ol_link_threads=posix
4082                         fi
4083                 fi
4084
4085                 if test $ol_link_threads = no ; then
4086                                                 save_LIBS="$LIBS"
4087                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
4088 echo "configure:4089: checking for pthread_mutex_lock in -lpthread" >&5
4089 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4090 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4091   echo $ac_n "(cached) $ac_c" 1>&6
4092 else
4093   ac_save_LIBS="$LIBS"
4094 LIBS="-lpthread -lexc $LIBS"
4095 cat > conftest.$ac_ext <<EOF
4096 #line 4097 "configure"
4097 #include "confdefs.h"
4098 /* Override any gcc2 internal prototype to avoid an error.  */
4099 /* We use char because int might match the return type of a gcc2
4100     builtin and then its argument prototype would still apply.  */
4101 char pthread_mutex_lock();
4102
4103 int main() {
4104 pthread_mutex_lock()
4105 ; return 0; }
4106 EOF
4107 if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4108   rm -rf conftest*
4109   eval "ac_cv_lib_$ac_lib_var=yes"
4110 else
4111   echo "configure: failed program was:" >&5
4112   cat conftest.$ac_ext >&5
4113   rm -rf conftest*
4114   eval "ac_cv_lib_$ac_lib_var=no"
4115 fi
4116 rm -f conftest*
4117 LIBS="$ac_save_LIBS"
4118
4119 fi
4120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4121   echo "$ac_t""yes" 1>&6
4122   
4123                                 ol_link_threads=posix
4124                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
4125                                 if test $ol_with_yielding_select = auto ; then
4126                                         ol_with_yielding_select=yes
4127                                 fi
4128                                 
4129 else
4130   echo "$ac_t""no" 1>&6
4131 :
4132 fi
4133
4134                         LIBS="$save_LIBS"
4135                 fi
4136
4137                 if test $ol_link_threads = no ; then
4138                                                 save_LIBS="$LIBS"
4139                         echo $ac_n "checking for pthread_mutex_unlock in -lpthread""... $ac_c" 1>&6
4140 echo "configure:4141: checking for pthread_mutex_unlock in -lpthread" >&5
4141 ac_lib_var=`echo pthread'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4142 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4143   echo $ac_n "(cached) $ac_c" 1>&6
4144 else
4145   ac_save_LIBS="$LIBS"
4146 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
4147 cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150 /* Override any gcc2 internal prototype to avoid an error.  */
4151 /* We use char because int might match the return type of a gcc2
4152     builtin and then its argument prototype would still apply.  */
4153 char pthread_mutex_unlock();
4154
4155 int main() {
4156 pthread_mutex_unlock()
4157 ; return 0; }
4158 EOF
4159 if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4160   rm -rf conftest*
4161   eval "ac_cv_lib_$ac_lib_var=yes"
4162 else
4163   echo "configure: failed program was:" >&5
4164   cat conftest.$ac_ext >&5
4165   rm -rf conftest*
4166   eval "ac_cv_lib_$ac_lib_var=no"
4167 fi
4168 rm -f conftest*
4169 LIBS="$ac_save_LIBS"
4170
4171 fi
4172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4173   echo "$ac_t""yes" 1>&6
4174   
4175                                 ol_link_threads=posix
4176                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc_r"
4177                                 if test $ol_with_yielding_select = auto ; then
4178                                         ol_with_yielding_select=yes
4179                                 fi
4180                                 
4181 else
4182   echo "$ac_t""no" 1>&6
4183 :
4184 fi
4185
4186                         LIBS="$save_LIBS"
4187                 fi
4188
4189                 if test $ol_link_threads = no ; then
4190                                                 save_LIBS="$LIBS"
4191                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
4192 echo "configure:4193: checking for pthread_create in -lpthread" >&5
4193 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
4194 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4195   echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197   ac_save_LIBS="$LIBS"
4198 LIBS="-lpthread  $LIBS"
4199 cat > conftest.$ac_ext <<EOF
4200 #line 4201 "configure"
4201 #include "confdefs.h"
4202 /* Override any gcc2 internal prototype to avoid an error.  */
4203 /* We use char because int might match the return type of a gcc2
4204     builtin and then its argument prototype would still apply.  */
4205 char pthread_create();
4206
4207 int main() {
4208 pthread_create()
4209 ; return 0; }
4210 EOF
4211 if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4212   rm -rf conftest*
4213   eval "ac_cv_lib_$ac_lib_var=yes"
4214 else
4215   echo "configure: failed program was:" >&5
4216   cat conftest.$ac_ext >&5
4217   rm -rf conftest*
4218   eval "ac_cv_lib_$ac_lib_var=no"
4219 fi
4220 rm -f conftest*
4221 LIBS="$ac_save_LIBS"
4222
4223 fi
4224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4225   echo "$ac_t""yes" 1>&6
4226   
4227                                 ol_link_threads=posix
4228                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4229 else
4230   echo "$ac_t""no" 1>&6
4231 :
4232 fi
4233
4234                         LIBS="$save_LIBS"
4235                 fi
4236
4237                 if test $ol_link_threads = no ; then
4238                                                 save_LIBS="$LIBS"
4239                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
4240 echo "configure:4241: checking for pthread_create in -lc_r" >&5
4241 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4242 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4243   echo $ac_n "(cached) $ac_c" 1>&6
4244 else
4245   ac_save_LIBS="$LIBS"
4246 LIBS="-lc_r  $LIBS"
4247 cat > conftest.$ac_ext <<EOF
4248 #line 4249 "configure"
4249 #include "confdefs.h"
4250 /* Override any gcc2 internal prototype to avoid an error.  */
4251 /* We use char because int might match the return type of a gcc2
4252     builtin and then its argument prototype would still apply.  */
4253 char pthread_create();
4254
4255 int main() {
4256 pthread_create()
4257 ; return 0; }
4258 EOF
4259 if { (eval echo configure:4260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4260   rm -rf conftest*
4261   eval "ac_cv_lib_$ac_lib_var=yes"
4262 else
4263   echo "configure: failed program was:" >&5
4264   cat conftest.$ac_ext >&5
4265   rm -rf conftest*
4266   eval "ac_cv_lib_$ac_lib_var=no"
4267 fi
4268 rm -f conftest*
4269 LIBS="$ac_save_LIBS"
4270
4271 fi
4272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4273   echo "$ac_t""yes" 1>&6
4274   
4275                                 ol_link_threads=posix
4276                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
4277 else
4278   echo "$ac_t""no" 1>&6
4279 :
4280 fi
4281
4282                         LIBS="$save_LIBS"
4283                 fi
4284
4285                 if test $ol_link_threads = no ; then
4286                                                 save_LIBS="$LIBS"
4287                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
4288 echo "configure:4289: checking for pthread_create in -lpthreads" >&5
4289 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
4290 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4291   echo $ac_n "(cached) $ac_c" 1>&6
4292 else
4293   ac_save_LIBS="$LIBS"
4294 LIBS="-lpthreads  $LIBS"
4295 cat > conftest.$ac_ext <<EOF
4296 #line 4297 "configure"
4297 #include "confdefs.h"
4298 /* Override any gcc2 internal prototype to avoid an error.  */
4299 /* We use char because int might match the return type of a gcc2
4300     builtin and then its argument prototype would still apply.  */
4301 char pthread_create();
4302
4303 int main() {
4304 pthread_create()
4305 ; return 0; }
4306 EOF
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4308   rm -rf conftest*
4309   eval "ac_cv_lib_$ac_lib_var=yes"
4310 else
4311   echo "configure: failed program was:" >&5
4312   cat conftest.$ac_ext >&5
4313   rm -rf conftest*
4314   eval "ac_cv_lib_$ac_lib_var=no"
4315 fi
4316 rm -f conftest*
4317 LIBS="$ac_save_LIBS"
4318
4319 fi
4320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4321   echo "$ac_t""yes" 1>&6
4322   
4323                                 ol_link_threads=posix
4324                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
4325 else
4326   echo "$ac_t""no" 1>&6
4327 :
4328 fi
4329
4330                         LIBS="$save_LIBS"
4331                 fi
4332
4333                                 if test $ol_link_threads = no ; then
4334                                                 save_LIBS="$LIBS"
4335                         echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
4336 echo "configure:4337: checking for pthread_join in -lpthreads" >&5
4337 ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
4338 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4339   echo $ac_n "(cached) $ac_c" 1>&6
4340 else
4341   ac_save_LIBS="$LIBS"
4342 LIBS="-lpthreads -Wl,-woff,85 $LIBS"
4343 cat > conftest.$ac_ext <<EOF
4344 #line 4345 "configure"
4345 #include "confdefs.h"
4346 /* Override any gcc2 internal prototype to avoid an error.  */
4347 /* We use char because int might match the return type of a gcc2
4348     builtin and then its argument prototype would still apply.  */
4349 char pthread_join();
4350
4351 int main() {
4352 pthread_join()
4353 ; return 0; }
4354 EOF
4355 if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4356   rm -rf conftest*
4357   eval "ac_cv_lib_$ac_lib_var=yes"
4358 else
4359   echo "configure: failed program was:" >&5
4360   cat conftest.$ac_ext >&5
4361   rm -rf conftest*
4362   eval "ac_cv_lib_$ac_lib_var=no"
4363 fi
4364 rm -f conftest*
4365 LIBS="$ac_save_LIBS"
4366
4367 fi
4368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4369   echo "$ac_t""yes" 1>&6
4370   
4371                                 ol_link_threads=posix
4372                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
4373                                 
4374 else
4375   echo "$ac_t""no" 1>&6
4376 :
4377 fi
4378
4379                         LIBS="$save_LIBS"
4380                 fi
4381
4382                                 if test $ol_link_threads = no; then
4383                         save_LIBS="$LIBS"
4384                         LIBS="$LIBS -lpthread"
4385                         echo $ac_n "checking for pthread_create() in HP-UX -lpthread""... $ac_c" 1>&6
4386 echo "configure:4387: checking for pthread_create() in HP-UX -lpthread" >&5
4387                         ol_try_pthread_hpux_11=no
4388                         if eval "test \"`echo '$''{'ol_cv_pthread_hpux_11'+set}'`\" = set"; then
4389   echo $ac_n "(cached) $ac_c" 1>&6
4390 else
4391   
4392                                 cat > conftest.$ac_ext <<EOF
4393 #line 4394 "configure"
4394 #include "confdefs.h"
4395
4396 #include <pthread.h>
4397 #include <elf.h>
4398 #ifndef ELFABI_HPUX_REL11
4399         die horribly
4400 #endif
4401                                 
4402 int main() {
4403 pthread_create(NULL, NULL, NULL, NULL);
4404 ; return 0; }
4405 EOF
4406 if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4407   rm -rf conftest*
4408   ol_try_pthread_hpux_11=yes
4409                                         ol_cv_pthread_hpux_11=yes
4410 else
4411   echo "configure: failed program was:" >&5
4412   cat conftest.$ac_ext >&5
4413   rm -rf conftest*
4414   ol_cv_pthread_hpux_11=no
4415 fi
4416 rm -f conftest*
4417 fi
4418
4419                         echo "$ac_t""yes" 1>&6
4420                         LIBS="$save_LIBS"
4421
4422                         if test $ol_cv_pthread_hpux_11=yes ; then
4423                                 ol_link_threads=posix
4424                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4425                                 if test $ol_try_pthread_hpux_11=yes ; then
4426                                                                                                                         ac_cv_func_pthread_attr_init=yes
4427                                 fi
4428                         fi
4429                 fi
4430
4431                 if test $ol_link_threads = no ; then
4432                                                 echo $ac_n "checking for pthread_create with -threads""... $ac_c" 1>&6
4433 echo "configure:4434: checking for pthread_create with -threads" >&5
4434 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
4435   echo $ac_n "(cached) $ac_c" 1>&6
4436 else
4437   
4438                                                                 save_LIBS="$LIBS"
4439                                 LIBS="-threads $LIBS"
4440                                 cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443 char pthread();
4444 int main() {
4445
4446                                         pthread_create();
4447                                         
4448 ; return 0; }
4449 EOF
4450 if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4451   rm -rf conftest*
4452   ol_cv_thread_flag=yes
4453 else
4454   echo "configure: failed program was:" >&5
4455   cat conftest.$ac_ext >&5
4456   rm -rf conftest*
4457   ol_cv_thread_flag=no
4458 fi
4459 rm -f conftest*
4460                                                                 LIBS="$save_LIBS"
4461                         
4462 fi
4463
4464 echo "$ac_t""$ol_cv_thread_flag" 1>&6
4465
4466                         if test $ol_cv_thread_flag = yes ; then
4467                                 LTHREAD_LIBS="$LTHREAD_LIBS -threads"
4468                                 ol_link_threads=posix
4469                         fi
4470                 fi
4471
4472                 if test $ol_link_threads = no ; then
4473                                                 save_LIBS="$LIBS"
4474                         echo $ac_n "checking for pthread_mutex_lock in -lpthreads""... $ac_c" 1>&6
4475 echo "configure:4476: checking for pthread_mutex_lock in -lpthreads" >&5
4476 ac_lib_var=`echo pthreads'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
4477 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   ac_save_LIBS="$LIBS"
4481 LIBS="-lpthreads -lexc $LIBS"
4482 cat > conftest.$ac_ext <<EOF
4483 #line 4484 "configure"
4484 #include "confdefs.h"
4485 /* Override any gcc2 internal prototype to avoid an error.  */
4486 /* We use char because int might match the return type of a gcc2
4487     builtin and then its argument prototype would still apply.  */
4488 char pthread_mutex_lock();
4489
4490 int main() {
4491 pthread_mutex_lock()
4492 ; return 0; }
4493 EOF
4494 if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4495   rm -rf conftest*
4496   eval "ac_cv_lib_$ac_lib_var=yes"
4497 else
4498   echo "configure: failed program was:" >&5
4499   cat conftest.$ac_ext >&5
4500   rm -rf conftest*
4501   eval "ac_cv_lib_$ac_lib_var=no"
4502 fi
4503 rm -f conftest*
4504 LIBS="$ac_save_LIBS"
4505
4506 fi
4507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4508   echo "$ac_t""yes" 1>&6
4509   
4510                                 ol_link_threads=posix
4511                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lexc"
4512                                 if test $ol_with_yielding_select = auto ; then
4513                                         ol_with_yielding_select=yes
4514                                 fi
4515                                 
4516 else
4517   echo "$ac_t""no" 1>&6
4518 :
4519 fi
4520
4521                         LIBS="$save_LIBS"
4522                 fi
4523
4524                 if test $ol_link_threads = no ; then
4525                                                 save_LIBS="$LIBS"
4526                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
4527 echo "configure:4528: checking for pthread_mutex_unlock in -lpthreads" >&5
4528 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
4529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   ac_save_LIBS="$LIBS"
4533 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
4534 cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537 /* Override any gcc2 internal prototype to avoid an error.  */
4538 /* We use char because int might match the return type of a gcc2
4539     builtin and then its argument prototype would still apply.  */
4540 char pthread_mutex_unlock();
4541
4542 int main() {
4543 pthread_mutex_unlock()
4544 ; return 0; }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547   rm -rf conftest*
4548   eval "ac_cv_lib_$ac_lib_var=yes"
4549 else
4550   echo "configure: failed program was:" >&5
4551   cat conftest.$ac_ext >&5
4552   rm -rf conftest*
4553   eval "ac_cv_lib_$ac_lib_var=no"
4554 fi
4555 rm -f conftest*
4556 LIBS="$ac_save_LIBS"
4557
4558 fi
4559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4560   echo "$ac_t""yes" 1>&6
4561   
4562                                 ol_link_threads=posix
4563                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
4564                                 if test $ol_with_yielding_select = auto ; then
4565                                         ol_with_yielding_select=yes
4566                                 fi
4567                                 
4568 else
4569   echo "$ac_t""no" 1>&6
4570 :
4571 fi
4572
4573                         LIBS="$save_LIBS"
4574                 fi
4575
4576                 if test $ol_link_threads != no ; then
4577                         cat >> confdefs.h <<\EOF
4578 #define HAVE_PTHREADS 1
4579 EOF
4580
4581
4582                                                 save_CPPFLAGS="$CPPFLAGS"
4583                         save_LIBS="$LIBS"
4584                         LIBS="$LTHREAD_LIBS $LIBS"
4585
4586                                                                                                 for ac_func in sched_yield pthread_yield
4587 do
4588 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4589 echo "configure:4590: checking for $ac_func" >&5
4590 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4591   echo $ac_n "(cached) $ac_c" 1>&6
4592 else
4593   cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 /* System header to define __stub macros and hopefully few prototypes,
4597     which can conflict with char $ac_func(); below.  */
4598 #include <assert.h>
4599 /* Override any gcc2 internal prototype to avoid an error.  */
4600 /* We use char because int might match the return type of a gcc2
4601     builtin and then its argument prototype would still apply.  */
4602 char $ac_func();
4603
4604 int main() {
4605
4606 /* The GNU C library defines this for functions which it implements
4607     to always fail with ENOSYS.  Some functions are actually named
4608     something starting with __ and the normal name is an alias.  */
4609 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4610 choke me
4611 #else
4612 $ac_func();
4613 #endif
4614
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4618   rm -rf conftest*
4619   eval "ac_cv_func_$ac_func=yes"
4620 else
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -rf conftest*
4624   eval "ac_cv_func_$ac_func=no"
4625 fi
4626 rm -f conftest*
4627 fi
4628
4629 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4630   echo "$ac_t""yes" 1>&6
4631     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4632   cat >> confdefs.h <<EOF
4633 #define $ac_tr_func 1
4634 EOF
4635  
4636 else
4637   echo "$ac_t""no" 1>&6
4638 fi
4639 done
4640
4641
4642                         if test $ac_cv_func_sched_yield = no -a \
4643                                 $ac_cv_func_pthread_yield = no ; then
4644                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4645 echo "configure:4646: checking for sched_yield in -lrt" >&5
4646 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4648   echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650   ac_save_LIBS="$LIBS"
4651 LIBS="-lrt  $LIBS"
4652 cat > conftest.$ac_ext <<EOF
4653 #line 4654 "configure"
4654 #include "confdefs.h"
4655 /* Override any gcc2 internal prototype to avoid an error.  */
4656 /* We use char because int might match the return type of a gcc2
4657     builtin and then its argument prototype would still apply.  */
4658 char sched_yield();
4659
4660 int main() {
4661 sched_yield()
4662 ; return 0; }
4663 EOF
4664 if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4665   rm -rf conftest*
4666   eval "ac_cv_lib_$ac_lib_var=yes"
4667 else
4668   echo "configure: failed program was:" >&5
4669   cat conftest.$ac_ext >&5
4670   rm -rf conftest*
4671   eval "ac_cv_lib_$ac_lib_var=no"
4672 fi
4673 rm -f conftest*
4674 LIBS="$ac_save_LIBS"
4675
4676 fi
4677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4678   echo "$ac_t""yes" 1>&6
4679   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
4680                                         cat >> confdefs.h <<\EOF
4681 #define HAVE_SCHED_YIELD 1
4682 EOF
4683
4684                                         ac_cv_func_sched_yield=yes
4685 else
4686   echo "$ac_t""no" 1>&6
4687 ac_cv_func_sched_yield=no
4688 fi
4689
4690                         fi
4691                         if test $ac_cv_func_sched_yield = no -a \
4692                                 $ac_cv_func_pthread_yield = no ; then
4693                                                                                                 for ac_func in thr_yield
4694 do
4695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4696 echo "configure:4697: checking for $ac_func" >&5
4697 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4698   echo $ac_n "(cached) $ac_c" 1>&6
4699 else
4700   cat > conftest.$ac_ext <<EOF
4701 #line 4702 "configure"
4702 #include "confdefs.h"
4703 /* System header to define __stub macros and hopefully few prototypes,
4704     which can conflict with char $ac_func(); below.  */
4705 #include <assert.h>
4706 /* Override any gcc2 internal prototype to avoid an error.  */
4707 /* We use char because int might match the return type of a gcc2
4708     builtin and then its argument prototype would still apply.  */
4709 char $ac_func();
4710
4711 int main() {
4712
4713 /* The GNU C library defines this for functions which it implements
4714     to always fail with ENOSYS.  Some functions are actually named
4715     something starting with __ and the normal name is an alias.  */
4716 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4717 choke me
4718 #else
4719 $ac_func();
4720 #endif
4721
4722 ; return 0; }
4723 EOF
4724 if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4725   rm -rf conftest*
4726   eval "ac_cv_func_$ac_func=yes"
4727 else
4728   echo "configure: failed program was:" >&5
4729   cat conftest.$ac_ext >&5
4730   rm -rf conftest*
4731   eval "ac_cv_func_$ac_func=no"
4732 fi
4733 rm -f conftest*
4734 fi
4735
4736 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4737   echo "$ac_t""yes" 1>&6
4738     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4739   cat >> confdefs.h <<EOF
4740 #define $ac_tr_func 1
4741 EOF
4742  
4743 else
4744   echo "$ac_t""no" 1>&6
4745 fi
4746 done
4747
4748                         fi
4749                         if test $ac_cv_func_sched_yield = no -a \
4750                                 $ac_cv_func_pthread_yield = no -a \
4751                                 "$ac_cv_func_thr_yield" = no ; then
4752                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
4753                         fi
4754
4755                                                 for ac_func in pthread_kill pthread_detach
4756 do
4757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4758 echo "configure:4759: checking for $ac_func" >&5
4759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4760   echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762   cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 /* System header to define __stub macros and hopefully few prototypes,
4766     which can conflict with char $ac_func(); below.  */
4767 #include <assert.h>
4768 /* Override any gcc2 internal prototype to avoid an error.  */
4769 /* We use char because int might match the return type of a gcc2
4770     builtin and then its argument prototype would still apply.  */
4771 char $ac_func();
4772
4773 int main() {
4774
4775 /* The GNU C library defines this for functions which it implements
4776     to always fail with ENOSYS.  Some functions are actually named
4777     something starting with __ and the normal name is an alias.  */
4778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4779 choke me
4780 #else
4781 $ac_func();
4782 #endif
4783
4784 ; return 0; }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787   rm -rf conftest*
4788   eval "ac_cv_func_$ac_func=yes"
4789 else
4790   echo "configure: failed program was:" >&5
4791   cat conftest.$ac_ext >&5
4792   rm -rf conftest*
4793   eval "ac_cv_func_$ac_func=no"
4794 fi
4795 rm -f conftest*
4796 fi
4797
4798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4799   echo "$ac_t""yes" 1>&6
4800     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4801   cat >> confdefs.h <<EOF
4802 #define $ac_tr_func 1
4803 EOF
4804  
4805 else
4806   echo "$ac_t""no" 1>&6
4807 fi
4808 done
4809
4810
4811                         if test $ac_cv_func_pthread_detach = no ; then
4812                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
4813                         fi
4814
4815                                                 for ac_func in \
4816                                 pthread_setconcurrency \
4817                                 pthread_getconcurrency \
4818                                 thr_setconcurrency \
4819                                 thr_getconcurrency \
4820                         
4821 do
4822 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4823 echo "configure:4824: checking for $ac_func" >&5
4824 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4825   echo $ac_n "(cached) $ac_c" 1>&6
4826 else
4827   cat > conftest.$ac_ext <<EOF
4828 #line 4829 "configure"
4829 #include "confdefs.h"
4830 /* System header to define __stub macros and hopefully few prototypes,
4831     which can conflict with char $ac_func(); below.  */
4832 #include <assert.h>
4833 /* Override any gcc2 internal prototype to avoid an error.  */
4834 /* We use char because int might match the return type of a gcc2
4835     builtin and then its argument prototype would still apply.  */
4836 char $ac_func();
4837
4838 int main() {
4839
4840 /* The GNU C library defines this for functions which it implements
4841     to always fail with ENOSYS.  Some functions are actually named
4842     something starting with __ and the normal name is an alias.  */
4843 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4844 choke me
4845 #else
4846 $ac_func();
4847 #endif
4848
4849 ; return 0; }
4850 EOF
4851 if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4852   rm -rf conftest*
4853   eval "ac_cv_func_$ac_func=yes"
4854 else
4855   echo "configure: failed program was:" >&5
4856   cat conftest.$ac_ext >&5
4857   rm -rf conftest*
4858   eval "ac_cv_func_$ac_func=no"
4859 fi
4860 rm -f conftest*
4861 fi
4862
4863 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4864   echo "$ac_t""yes" 1>&6
4865     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4866   cat >> confdefs.h <<EOF
4867 #define $ac_tr_func 1
4868 EOF
4869  
4870 else
4871   echo "$ac_t""no" 1>&6
4872 fi
4873 done
4874
4875
4876                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
4877 echo "configure:4878: checking if pthread_create() works" >&5
4878                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   
4882                         if test "$cross_compiling" = yes; then
4883                                 ol_cv_pthread_create_works=yes
4884 else
4885   cat > conftest.$ac_ext <<EOF
4886 #line 4887 "configure"
4887 #include "confdefs.h"
4888
4889 #include <pthread.h>
4890 #ifndef NULL
4891 #define NULL (void*)0
4892 #endif
4893
4894 static void *task(p)
4895         void *p;
4896 {
4897         return (void *) (p == NULL);
4898 }
4899
4900 int main(argc, argv)
4901         int argc;
4902         char **argv;
4903 {
4904         pthread_t t;
4905         exit(pthread_create(&t, NULL, task, NULL));
4906 }
4907
4908 EOF
4909 if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4910 then
4911   ol_cv_pthread_create_works=yes
4912 else
4913   echo "configure: failed program was:" >&5
4914   cat conftest.$ac_ext >&5
4915   rm -fr conftest*
4916   ol_cv_pthread_create_works=no
4917 fi
4918 rm -fr conftest*
4919 fi
4920
4921 fi
4922
4923                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
4924
4925                         if test $ol_cv_pthread_create_works = no ; then
4926                                 { echo "configure: error: pthread.h and pthread_create are not compatible" 1>&2; exit 1; }
4927                         fi
4928
4929                                                 if test $ol_with_yielding_select = auto ; then
4930                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
4931 echo "configure:4932: checking if select yields when using pthreads" >&5
4932                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
4933   echo $ac_n "(cached) $ac_c" 1>&6
4934 else
4935   
4936                                 if test "$cross_compiling" = yes; then
4937   
4938                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
4939 else
4940   cat > conftest.$ac_ext <<EOF
4941 #line 4942 "configure"
4942 #include "confdefs.h"
4943
4944 #include <sys/types.h>
4945 #include <sys/time.h>
4946 #include <unistd.h>
4947 #include <pthread.h>
4948 #ifndef NULL
4949 #define NULL (void*) 0
4950 #endif
4951
4952 static int fildes[2];
4953
4954 static void *task(p)
4955         void *p;
4956 {
4957         int i;
4958         struct timeval tv;
4959
4960         fd_set rfds;
4961
4962         tv.tv_sec=10;
4963         tv.tv_usec=0;
4964
4965         FD_ZERO(&rfds);
4966         FD_SET(fildes[0], &rfds);
4967
4968         /* we're not interested in any fds */
4969         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
4970
4971         if(i < 0) {
4972                 perror("select");
4973                 exit(10);
4974         }
4975
4976         exit(0); /* if we exit here, the select blocked the whole process */
4977 }
4978
4979 int main(argc, argv)
4980         int argc;
4981         char **argv;
4982 {
4983         pthread_t t;
4984
4985         /* create a pipe to select */
4986         if(pipe(&fildes[0])) {
4987                 perror("select");
4988                 exit(1);
4989         }
4990
4991 #ifdef HAVE_PTHREAD_SETCONCURRENCY
4992         (void) pthread_setconcurrency(2);
4993 #else
4994 #ifdef HAVE_THR_SETCONCURRENCY
4995         /* Set Solaris LWP concurrency to 2 */
4996         thr_setconcurrency(2);
4997 #endif
4998 #endif
4999
5000         pthread_create(&t, NULL, task, NULL);
5001
5002 #if HAVE_SCHED_YIELD
5003         sched_yield();  /* make sure task runs first */
5004 #else
5005 #ifdef HAVE_PTHREAD_YIELD
5006         pthread_yield();        /* make sure task runs first */
5007 #endif
5008 #endif
5009
5010         exit(2);
5011 }
5012 EOF
5013 if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5014 then
5015   ol_cv_pthread_select_yields=no
5016 else
5017   echo "configure: failed program was:" >&5
5018   cat conftest.$ac_ext >&5
5019   rm -fr conftest*
5020   ol_cv_pthread_select_yields=yes
5021 fi
5022 rm -fr conftest*
5023 fi
5024
5025 fi
5026
5027                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
5028
5029                                 if test $ol_cv_pthread_select_yields = yes ; then
5030                                         ol_with_yielding_select=yes
5031                                 fi
5032                         fi
5033
5034                                                 CPPFLAGS="$save_CPPFLAGS"
5035                         LIBS="$save_LIBS"
5036                 else
5037                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
5038                 fi
5039         fi
5040
5041         if test $ol_with_threads = posix ; then
5042                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
5043         fi
5044 fi
5045
5046 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5047         -o $ol_with_threads = mach ; then
5048
5049                 for ac_hdr in mach/cthreads.h
5050 do
5051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5053 echo "configure:5054: checking for $ac_hdr" >&5
5054 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5055   echo $ac_n "(cached) $ac_c" 1>&6
5056 else
5057   cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060 #include <$ac_hdr>
5061 EOF
5062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5063 { (eval echo configure:5064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5065 if test -z "$ac_err"; then
5066   rm -rf conftest*
5067   eval "ac_cv_header_$ac_safe=yes"
5068 else
5069   echo "$ac_err" >&5
5070   echo "configure: failed program was:" >&5
5071   cat conftest.$ac_ext >&5
5072   rm -rf conftest*
5073   eval "ac_cv_header_$ac_safe=no"
5074 fi
5075 rm -f conftest*
5076 fi
5077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5078   echo "$ac_t""yes" 1>&6
5079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5080   cat >> confdefs.h <<EOF
5081 #define $ac_tr_hdr 1
5082 EOF
5083  
5084 else
5085   echo "$ac_t""no" 1>&6
5086 fi
5087 done
5088
5089         if test $ac_cv_header_mach_cthreads_h = yes ; then
5090                 ol_with_threads=found
5091
5092                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
5093 echo "configure:5094: checking for cthread_fork" >&5
5094 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
5095   echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097   cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 /* System header to define __stub macros and hopefully few prototypes,
5101     which can conflict with char cthread_fork(); below.  */
5102 #include <assert.h>
5103 /* Override any gcc2 internal prototype to avoid an error.  */
5104 /* We use char because int might match the return type of a gcc2
5105     builtin and then its argument prototype would still apply.  */
5106 char cthread_fork();
5107
5108 int main() {
5109
5110 /* The GNU C library defines this for functions which it implements
5111     to always fail with ENOSYS.  Some functions are actually named
5112     something starting with __ and the normal name is an alias.  */
5113 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
5114 choke me
5115 #else
5116 cthread_fork();
5117 #endif
5118
5119 ; return 0; }
5120 EOF
5121 if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5122   rm -rf conftest*
5123   eval "ac_cv_func_cthread_fork=yes"
5124 else
5125   echo "configure: failed program was:" >&5
5126   cat conftest.$ac_ext >&5
5127   rm -rf conftest*
5128   eval "ac_cv_func_cthread_fork=no"
5129 fi
5130 rm -f conftest*
5131 fi
5132
5133 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
5134   echo "$ac_t""yes" 1>&6
5135   ol_link_threads=yes
5136 else
5137   echo "$ac_t""no" 1>&6
5138 fi
5139
5140
5141                 if test $ol_link_threads = no ; then
5142                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
5143 echo "configure:5144: checking for cthread_fork with -all_load" >&5
5144 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
5145   echo $ac_n "(cached) $ac_c" 1>&6
5146 else
5147   
5148                                                                 save_LIBS="$LIBS"
5149                                 LIBS="-all_load $LIBS"
5150                                 cat > conftest.$ac_ext <<EOF
5151 #line 5152 "configure"
5152 #include "confdefs.h"
5153 #include <mach/cthreads.h>
5154 int main() {
5155
5156                                         cthread_fork((void *)0, (void *)0);
5157                                         
5158 ; return 0; }
5159 EOF
5160 if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5161   rm -rf conftest*
5162   ol_cv_cthread_all_load=yes
5163 else
5164   echo "configure: failed program was:" >&5
5165   cat conftest.$ac_ext >&5
5166   rm -rf conftest*
5167   ol_cv_cthread_all_load=no
5168 fi
5169 rm -f conftest*
5170                                                                 LIBS="$save_LIBS"
5171                         
5172 fi
5173
5174 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
5175
5176                         if test $ol_cv_cthread_all_load = yes ; then
5177                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
5178                                 ol_link_threads=mach
5179                         fi
5180                 fi
5181
5182                 if test $ol_link_threads != no ; then
5183                         : check for cthread specific functionality here
5184                         cat >> confdefs.h <<\EOF
5185 #define HAVE_MACH_CTHREADS 1
5186 EOF
5187
5188                 else
5189                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
5190                 fi
5191         fi
5192
5193         if test $ol_with_threads = mach ; then
5194                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
5195         fi
5196 fi
5197
5198 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5199         -o $ol_with_threads = lwp ; then
5200
5201                 for ac_hdr in thread.h synch.h
5202 do
5203 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5204 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5205 echo "configure:5206: checking for $ac_hdr" >&5
5206 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5207   echo $ac_n "(cached) $ac_c" 1>&6
5208 else
5209   cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5212 #include <$ac_hdr>
5213 EOF
5214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5215 { (eval echo configure:5216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5217 if test -z "$ac_err"; then
5218   rm -rf conftest*
5219   eval "ac_cv_header_$ac_safe=yes"
5220 else
5221   echo "$ac_err" >&5
5222   echo "configure: failed program was:" >&5
5223   cat conftest.$ac_ext >&5
5224   rm -rf conftest*
5225   eval "ac_cv_header_$ac_safe=no"
5226 fi
5227 rm -f conftest*
5228 fi
5229 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5230   echo "$ac_t""yes" 1>&6
5231     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5232   cat >> confdefs.h <<EOF
5233 #define $ac_tr_hdr 1
5234 EOF
5235  
5236 else
5237   echo "$ac_t""no" 1>&6
5238 fi
5239 done
5240
5241         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
5242                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
5243 echo "configure:5244: checking for thr_create in -lthread" >&5
5244 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
5245 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5246   echo $ac_n "(cached) $ac_c" 1>&6
5247 else
5248   ac_save_LIBS="$LIBS"
5249 LIBS="-lthread  $LIBS"
5250 cat > conftest.$ac_ext <<EOF
5251 #line 5252 "configure"
5252 #include "confdefs.h"
5253 /* Override any gcc2 internal prototype to avoid an error.  */
5254 /* We use char because int might match the return type of a gcc2
5255     builtin and then its argument prototype would still apply.  */
5256 char thr_create();
5257
5258 int main() {
5259 thr_create()
5260 ; return 0; }
5261 EOF
5262 if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5263   rm -rf conftest*
5264   eval "ac_cv_lib_$ac_lib_var=yes"
5265 else
5266   echo "configure: failed program was:" >&5
5267   cat conftest.$ac_ext >&5
5268   rm -rf conftest*
5269   eval "ac_cv_lib_$ac_lib_var=no"
5270 fi
5271 rm -f conftest*
5272 LIBS="$ac_save_LIBS"
5273
5274 fi
5275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5276   echo "$ac_t""yes" 1>&6
5277   have_thr=yes
5278 else
5279   echo "$ac_t""no" 1>&6
5280 have_thr=no
5281 fi
5282
5283
5284                 if test $have_thr = yes ; then
5285                         cat >> confdefs.h <<\EOF
5286 #define HAVE_THR 1
5287 EOF
5288
5289                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
5290                         ol_link_threads=thr
5291
5292                         if test $ol_with_yielding_select = auto ; then
5293                                 ol_with_yielding_select=yes
5294                         fi
5295
5296                                                 for ac_func in \
5297                                 thr_setconcurrency \
5298                                 thr_getconcurrency \
5299                         
5300 do
5301 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5302 echo "configure:5303: checking for $ac_func" >&5
5303 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5304   echo $ac_n "(cached) $ac_c" 1>&6
5305 else
5306   cat > conftest.$ac_ext <<EOF
5307 #line 5308 "configure"
5308 #include "confdefs.h"
5309 /* System header to define __stub macros and hopefully few prototypes,
5310     which can conflict with char $ac_func(); below.  */
5311 #include <assert.h>
5312 /* Override any gcc2 internal prototype to avoid an error.  */
5313 /* We use char because int might match the return type of a gcc2
5314     builtin and then its argument prototype would still apply.  */
5315 char $ac_func();
5316
5317 int main() {
5318
5319 /* The GNU C library defines this for functions which it implements
5320     to always fail with ENOSYS.  Some functions are actually named
5321     something starting with __ and the normal name is an alias.  */
5322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5323 choke me
5324 #else
5325 $ac_func();
5326 #endif
5327
5328 ; return 0; }
5329 EOF
5330 if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5331   rm -rf conftest*
5332   eval "ac_cv_func_$ac_func=yes"
5333 else
5334   echo "configure: failed program was:" >&5
5335   cat conftest.$ac_ext >&5
5336   rm -rf conftest*
5337   eval "ac_cv_func_$ac_func=no"
5338 fi
5339 rm -f conftest*
5340 fi
5341
5342 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5343   echo "$ac_t""yes" 1>&6
5344     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5345   cat >> confdefs.h <<EOF
5346 #define $ac_tr_func 1
5347 EOF
5348  
5349 else
5350   echo "$ac_t""no" 1>&6
5351 fi
5352 done
5353
5354                 fi
5355         fi
5356
5357                 for ac_hdr in lwp/lwp.h
5358 do
5359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5361 echo "configure:5362: checking for $ac_hdr" >&5
5362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5363   echo $ac_n "(cached) $ac_c" 1>&6
5364 else
5365   cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368 #include <$ac_hdr>
5369 EOF
5370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5371 { (eval echo configure:5372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5373 if test -z "$ac_err"; then
5374   rm -rf conftest*
5375   eval "ac_cv_header_$ac_safe=yes"
5376 else
5377   echo "$ac_err" >&5
5378   echo "configure: failed program was:" >&5
5379   cat conftest.$ac_ext >&5
5380   rm -rf conftest*
5381   eval "ac_cv_header_$ac_safe=no"
5382 fi
5383 rm -f conftest*
5384 fi
5385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5386   echo "$ac_t""yes" 1>&6
5387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5388   cat >> confdefs.h <<EOF
5389 #define $ac_tr_hdr 1
5390 EOF
5391  
5392 else
5393   echo "$ac_t""no" 1>&6
5394 fi
5395 done
5396
5397         if test $ac_cv_header_lwp_lwp_h = yes ; then
5398                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
5399 echo "configure:5400: checking for lwp_create in -llwp" >&5
5400 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
5401 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5402   echo $ac_n "(cached) $ac_c" 1>&6
5403 else
5404   ac_save_LIBS="$LIBS"
5405 LIBS="-llwp  $LIBS"
5406 cat > conftest.$ac_ext <<EOF
5407 #line 5408 "configure"
5408 #include "confdefs.h"
5409 /* Override any gcc2 internal prototype to avoid an error.  */
5410 /* We use char because int might match the return type of a gcc2
5411     builtin and then its argument prototype would still apply.  */
5412 char lwp_create();
5413
5414 int main() {
5415 lwp_create()
5416 ; return 0; }
5417 EOF
5418 if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5419   rm -rf conftest*
5420   eval "ac_cv_lib_$ac_lib_var=yes"
5421 else
5422   echo "configure: failed program was:" >&5
5423   cat conftest.$ac_ext >&5
5424   rm -rf conftest*
5425   eval "ac_cv_lib_$ac_lib_var=no"
5426 fi
5427 rm -f conftest*
5428 LIBS="$ac_save_LIBS"
5429
5430 fi
5431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5432   echo "$ac_t""yes" 1>&6
5433   have_lwp=yes
5434 else
5435   echo "$ac_t""no" 1>&6
5436 have_lwp=no
5437 fi
5438
5439
5440                 if test $have_lwp = yes ; then
5441                         cat >> confdefs.h <<\EOF
5442 #define HAVE_LWP 1
5443 EOF
5444
5445                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
5446                         ol_link_threads=lwp
5447
5448                         if test $ol_with_yielding_select = auto ; then
5449                                 ol_with_yielding_select=no
5450                         fi
5451                 fi
5452         fi
5453 fi
5454
5455 if test $ol_with_yielding_select = yes ; then
5456         cat >> confdefs.h <<\EOF
5457 #define HAVE_YIELDING_SELECT 1
5458 EOF
5459
5460 fi
5461
5462 if test $ol_with_threads = manual ; then
5463                 ol_link_threads=yes
5464
5465         echo "configure: warning: thread defines and link options must be set manually" 1>&2
5466
5467         for ac_hdr in pthread.h sched.h
5468 do
5469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5471 echo "configure:5472: checking for $ac_hdr" >&5
5472 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5473   echo $ac_n "(cached) $ac_c" 1>&6
5474 else
5475   cat > conftest.$ac_ext <<EOF
5476 #line 5477 "configure"
5477 #include "confdefs.h"
5478 #include <$ac_hdr>
5479 EOF
5480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5481 { (eval echo configure:5482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5483 if test -z "$ac_err"; then
5484   rm -rf conftest*
5485   eval "ac_cv_header_$ac_safe=yes"
5486 else
5487   echo "$ac_err" >&5
5488   echo "configure: failed program was:" >&5
5489   cat conftest.$ac_ext >&5
5490   rm -rf conftest*
5491   eval "ac_cv_header_$ac_safe=no"
5492 fi
5493 rm -f conftest*
5494 fi
5495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5496   echo "$ac_t""yes" 1>&6
5497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5498   cat >> confdefs.h <<EOF
5499 #define $ac_tr_hdr 1
5500 EOF
5501  
5502 else
5503   echo "$ac_t""no" 1>&6
5504 fi
5505 done
5506
5507         for ac_func in sched_yield pthread_yield
5508 do
5509 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5510 echo "configure:5511: checking for $ac_func" >&5
5511 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5512   echo $ac_n "(cached) $ac_c" 1>&6
5513 else
5514   cat > conftest.$ac_ext <<EOF
5515 #line 5516 "configure"
5516 #include "confdefs.h"
5517 /* System header to define __stub macros and hopefully few prototypes,
5518     which can conflict with char $ac_func(); below.  */
5519 #include <assert.h>
5520 /* Override any gcc2 internal prototype to avoid an error.  */
5521 /* We use char because int might match the return type of a gcc2
5522     builtin and then its argument prototype would still apply.  */
5523 char $ac_func();
5524
5525 int main() {
5526
5527 /* The GNU C library defines this for functions which it implements
5528     to always fail with ENOSYS.  Some functions are actually named
5529     something starting with __ and the normal name is an alias.  */
5530 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5531 choke me
5532 #else
5533 $ac_func();
5534 #endif
5535
5536 ; return 0; }
5537 EOF
5538 if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5539   rm -rf conftest*
5540   eval "ac_cv_func_$ac_func=yes"
5541 else
5542   echo "configure: failed program was:" >&5
5543   cat conftest.$ac_ext >&5
5544   rm -rf conftest*
5545   eval "ac_cv_func_$ac_func=no"
5546 fi
5547 rm -f conftest*
5548 fi
5549
5550 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5551   echo "$ac_t""yes" 1>&6
5552     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5553   cat >> confdefs.h <<EOF
5554 #define $ac_tr_func 1
5555 EOF
5556  
5557 else
5558   echo "$ac_t""no" 1>&6
5559 fi
5560 done
5561
5562         
5563 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
5564 echo "configure:5565: checking for LinuxThreads" >&5
5565 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
5566   echo $ac_n "(cached) $ac_c" 1>&6
5567 else
5568   
5569         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
5570         if test "$res" -gt 0 ; then
5571                 ol_cv_linux_threads=yes
5572         else
5573                 ol_cv_linux_threads=no
5574         fi
5575
5576 fi
5577
5578 echo "$ac_t""$ol_cv_linux_threads" 1>&6
5579
5580
5581         for ac_hdr in mach/cthreads.h
5582 do
5583 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5584 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5585 echo "configure:5586: checking for $ac_hdr" >&5
5586 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5587   echo $ac_n "(cached) $ac_c" 1>&6
5588 else
5589   cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5592 #include <$ac_hdr>
5593 EOF
5594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5595 { (eval echo configure:5596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5597 if test -z "$ac_err"; then
5598   rm -rf conftest*
5599   eval "ac_cv_header_$ac_safe=yes"
5600 else
5601   echo "$ac_err" >&5
5602   echo "configure: failed program was:" >&5
5603   cat conftest.$ac_ext >&5
5604   rm -rf conftest*
5605   eval "ac_cv_header_$ac_safe=no"
5606 fi
5607 rm -f conftest*
5608 fi
5609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5610   echo "$ac_t""yes" 1>&6
5611     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5612   cat >> confdefs.h <<EOF
5613 #define $ac_tr_hdr 1
5614 EOF
5615  
5616 else
5617   echo "$ac_t""no" 1>&6
5618 fi
5619 done
5620
5621         for ac_hdr in lwp/lwp.h
5622 do
5623 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5624 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5625 echo "configure:5626: checking for $ac_hdr" >&5
5626 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5627   echo $ac_n "(cached) $ac_c" 1>&6
5628 else
5629   cat > conftest.$ac_ext <<EOF
5630 #line 5631 "configure"
5631 #include "confdefs.h"
5632 #include <$ac_hdr>
5633 EOF
5634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5635 { (eval echo configure:5636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5637 if test -z "$ac_err"; then
5638   rm -rf conftest*
5639   eval "ac_cv_header_$ac_safe=yes"
5640 else
5641   echo "$ac_err" >&5
5642   echo "configure: failed program was:" >&5
5643   cat conftest.$ac_ext >&5
5644   rm -rf conftest*
5645   eval "ac_cv_header_$ac_safe=no"
5646 fi
5647 rm -f conftest*
5648 fi
5649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5650   echo "$ac_t""yes" 1>&6
5651     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5652   cat >> confdefs.h <<EOF
5653 #define $ac_tr_hdr 1
5654 EOF
5655  
5656 else
5657   echo "$ac_t""no" 1>&6
5658 fi
5659 done
5660
5661         for ac_hdr in thread.h synch.h
5662 do
5663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5665 echo "configure:5666: checking for $ac_hdr" >&5
5666 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5667   echo $ac_n "(cached) $ac_c" 1>&6
5668 else
5669   cat > conftest.$ac_ext <<EOF
5670 #line 5671 "configure"
5671 #include "confdefs.h"
5672 #include <$ac_hdr>
5673 EOF
5674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5675 { (eval echo configure:5676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5677 if test -z "$ac_err"; then
5678   rm -rf conftest*
5679   eval "ac_cv_header_$ac_safe=yes"
5680 else
5681   echo "$ac_err" >&5
5682   echo "configure: failed program was:" >&5
5683   cat conftest.$ac_ext >&5
5684   rm -rf conftest*
5685   eval "ac_cv_header_$ac_safe=no"
5686 fi
5687 rm -f conftest*
5688 fi
5689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5690   echo "$ac_t""yes" 1>&6
5691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5692   cat >> confdefs.h <<EOF
5693 #define $ac_tr_hdr 1
5694 EOF
5695  
5696 else
5697   echo "$ac_t""no" 1>&6
5698 fi
5699 done
5700
5701 fi
5702
5703 if test $ol_link_threads != no ; then  
5704                         cat >> confdefs.h <<\EOF
5705 #define REENTRANT 1
5706 EOF
5707
5708         cat >> confdefs.h <<\EOF
5709 #define _REENTRANT 1
5710 EOF
5711
5712         cat >> confdefs.h <<\EOF
5713 #define THREAD_SAFE 1
5714 EOF
5715
5716         cat >> confdefs.h <<\EOF
5717 #define _THREAD_SAFE 1
5718 EOF
5719
5720         cat >> confdefs.h <<\EOF
5721 #define THREADSAFE 1
5722 EOF
5723
5724         cat >> confdefs.h <<\EOF
5725 #define _THREADSAFE 1
5726 EOF
5727
5728
5729                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
5730 echo "configure:5731: checking for thread specific errno" >&5
5731 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
5732   echo $ac_n "(cached) $ac_c" 1>&6
5733 else
5734   
5735                 cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5738
5739 #include <errno.h>
5740                         
5741 int main() {
5742
5743 int x = errno;
5744                         
5745 ; return 0; }
5746 EOF
5747 if { (eval echo configure:5748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5748   rm -rf conftest*
5749   ol_cv_errno_thread_specific=yes
5750 else
5751   echo "configure: failed program was:" >&5
5752   cat conftest.$ac_ext >&5
5753   rm -rf conftest*
5754   ol_cv_errno_thread_specific=no
5755 fi
5756 rm -f conftest*
5757         
5758 fi
5759
5760 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
5761
5762         if test $ol_cv_errno_thread_specific != yes ; then
5763                 LIBS="$LTHREAD_LIBS $LIBS"
5764                 LTHREAD_LIBS=""
5765         fi
5766
5767 fi  
5768
5769
5770 if test $ol_link_threads = no ; then
5771         if test $ol_with_threads = yes ; then
5772                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
5773         fi
5774
5775         if test $ol_with_threads = auto ; then
5776                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
5777                 ol_with_threads=no
5778         fi
5779
5780         cat >> confdefs.h <<\EOF
5781 #define NO_THREADS 1
5782 EOF
5783
5784         LTHREAD_LIBS=""
5785 fi
5786
5787 ol_link_ldbm=no 
5788 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
5789         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
5790 echo "configure:5791: checking for DB2 library" >&5
5791 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
5792   echo $ac_n "(cached) $ac_c" 1>&6
5793 else
5794         ol_LIBS="$LIBS"
5795         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
5796 echo "configure:5797: checking for db_open in -ldb" >&5
5797 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
5798 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5799   echo $ac_n "(cached) $ac_c" 1>&6
5800 else
5801   ac_save_LIBS="$LIBS"
5802 LIBS="-ldb  $LIBS"
5803 cat > conftest.$ac_ext <<EOF
5804 #line 5805 "configure"
5805 #include "confdefs.h"
5806 /* Override any gcc2 internal prototype to avoid an error.  */
5807 /* We use char because int might match the return type of a gcc2
5808     builtin and then its argument prototype would still apply.  */
5809 char db_open();
5810
5811 int main() {
5812 db_open()
5813 ; return 0; }
5814 EOF
5815 if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5816   rm -rf conftest*
5817   eval "ac_cv_lib_$ac_lib_var=yes"
5818 else
5819   echo "configure: failed program was:" >&5
5820   cat conftest.$ac_ext >&5
5821   rm -rf conftest*
5822   eval "ac_cv_lib_$ac_lib_var=no"
5823 fi
5824 rm -f conftest*
5825 LIBS="$ac_save_LIBS"
5826
5827 fi
5828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5829   echo "$ac_t""yes" 1>&6
5830   ol_cv_lib_db2=-ldb
5831 else
5832   echo "$ac_t""no" 1>&6
5833 ol_cv_lib_db2=no
5834 fi
5835
5836         LIBS="$ol_LIBS"
5837
5838 fi
5839
5840 echo "$ac_t""$ol_cv_lib_db2" 1>&6
5841
5842 for ac_hdr in db.h
5843 do
5844 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5845 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5846 echo "configure:5847: checking for $ac_hdr" >&5
5847 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5848   echo $ac_n "(cached) $ac_c" 1>&6
5849 else
5850   cat > conftest.$ac_ext <<EOF
5851 #line 5852 "configure"
5852 #include "confdefs.h"
5853 #include <$ac_hdr>
5854 EOF
5855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5856 { (eval echo configure:5857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5858 if test -z "$ac_err"; then
5859   rm -rf conftest*
5860   eval "ac_cv_header_$ac_safe=yes"
5861 else
5862   echo "$ac_err" >&5
5863   echo "configure: failed program was:" >&5
5864   cat conftest.$ac_ext >&5
5865   rm -rf conftest*
5866   eval "ac_cv_header_$ac_safe=no"
5867 fi
5868 rm -f conftest*
5869 fi
5870 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5871   echo "$ac_t""yes" 1>&6
5872     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5873   cat >> confdefs.h <<EOF
5874 #define $ac_tr_hdr 1
5875 EOF
5876  
5877 else
5878   echo "$ac_t""no" 1>&6
5879 fi
5880 done
5881
5882 if test $ac_cv_header_db_h = yes ; then
5883         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
5884 echo "configure:5885: checking if db.h is DB2" >&5
5885 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
5886   echo $ac_n "(cached) $ac_c" 1>&6
5887 else
5888   
5889                 cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892
5893 #                       include <db.h>
5894                         /* this check could be improved */
5895 #                       ifdef DB_VERSION_MAJOR
5896 #                               if DB_VERSION_MAJOR == 2
5897                                         __db_version_2
5898 #                               endif
5899 #                       endif
5900                 
5901 EOF
5902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5903   egrep "__db_version_2" >/dev/null 2>&1; then
5904   rm -rf conftest*
5905   ol_cv_header_db2=yes
5906 else
5907   rm -rf conftest*
5908   ol_cv_header_db2=no
5909 fi
5910 rm -f conftest*
5911
5912 fi
5913
5914 echo "$ac_t""$ol_cv_header_db2" 1>&6
5915 else
5916         ol_cv_header_db2=no
5917 fi
5918
5919
5920  
5921  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
5922 echo "configure:5923: checking for Berkeley DB2" >&5
5923 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
5924   echo $ac_n "(cached) $ac_c" 1>&6
5925 else
5926   
5927         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
5928                 ol_cv_berkeley_db2=no
5929         else
5930                 ol_cv_berkeley_db2=yes
5931         fi
5932
5933 fi
5934
5935 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
5936  if test $ol_cv_berkeley_db2 = yes ; then
5937         cat >> confdefs.h <<\EOF
5938 #define HAVE_BERKELEY_DB2 1
5939 EOF
5940
5941  fi
5942
5943
5944         if test $ol_cv_berkeley_db2 = yes ; then
5945                 ol_link_ldbm=db2
5946                 ol_with_ldbm_api=db2
5947
5948                 if test $ol_with_ldbm_type = hash ; then
5949                         cat >> confdefs.h <<\EOF
5950 #define LDBM_USE_DBHASH 1
5951 EOF
5952
5953                 else
5954                         cat >> confdefs.h <<\EOF
5955 #define LDBM_USE_DBBTREE 1
5956 EOF
5957
5958                 fi
5959
5960                                                 if test $ol_cv_lib_db2 != yes ; then
5961                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
5962                 fi
5963         fi
5964 fi
5965
5966 ol_link_bdb2=no
5967 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
5968         ol_link_bdb2=yes
5969 fi
5970
5971 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
5972         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
5973 echo "configure:5974: checking for Berkeley DB library" >&5
5974 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
5975   echo $ac_n "(cached) $ac_c" 1>&6
5976 else
5977         ol_LIBS="$LIBS"
5978         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
5979 echo "configure:5980: checking for dbopen" >&5
5980 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
5981   echo $ac_n "(cached) $ac_c" 1>&6
5982 else
5983   cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986 /* System header to define __stub macros and hopefully few prototypes,
5987     which can conflict with char dbopen(); below.  */
5988 #include <assert.h>
5989 /* Override any gcc2 internal prototype to avoid an error.  */
5990 /* We use char because int might match the return type of a gcc2
5991     builtin and then its argument prototype would still apply.  */
5992 char dbopen();
5993
5994 int main() {
5995
5996 /* The GNU C library defines this for functions which it implements
5997     to always fail with ENOSYS.  Some functions are actually named
5998     something starting with __ and the normal name is an alias.  */
5999 #if defined (__stub_dbopen) || defined (__stub___dbopen)
6000 choke me
6001 #else
6002 dbopen();
6003 #endif
6004
6005 ; return 0; }
6006 EOF
6007 if { (eval echo configure:6008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6008   rm -rf conftest*
6009   eval "ac_cv_func_dbopen=yes"
6010 else
6011   echo "configure: failed program was:" >&5
6012   cat conftest.$ac_ext >&5
6013   rm -rf conftest*
6014   eval "ac_cv_func_dbopen=no"
6015 fi
6016 rm -f conftest*
6017 fi
6018
6019 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
6020   echo "$ac_t""yes" 1>&6
6021   ol_cv_lib_db=yes
6022 else
6023   echo "$ac_t""no" 1>&6
6024
6025                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
6026 echo "configure:6027: checking for dbopen in -ldb" >&5
6027 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
6028 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6029   echo $ac_n "(cached) $ac_c" 1>&6
6030 else
6031   ac_save_LIBS="$LIBS"
6032 LIBS="-ldb  $LIBS"
6033 cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036 /* Override any gcc2 internal prototype to avoid an error.  */
6037 /* We use char because int might match the return type of a gcc2
6038     builtin and then its argument prototype would still apply.  */
6039 char dbopen();
6040
6041 int main() {
6042 dbopen()
6043 ; return 0; }
6044 EOF
6045 if { (eval echo configure:6046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6046   rm -rf conftest*
6047   eval "ac_cv_lib_$ac_lib_var=yes"
6048 else
6049   echo "configure: failed program was:" >&5
6050   cat conftest.$ac_ext >&5
6051   rm -rf conftest*
6052   eval "ac_cv_lib_$ac_lib_var=no"
6053 fi
6054 rm -f conftest*
6055 LIBS="$ac_save_LIBS"
6056
6057 fi
6058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6059   echo "$ac_t""yes" 1>&6
6060   ol_cv_lib_db=-ldb
6061 else
6062   echo "$ac_t""no" 1>&6
6063 ol_cv_lib_db=no
6064 fi
6065
6066         
6067 fi
6068
6069         LIBS="$ol_LIBS"
6070
6071 fi
6072
6073 echo "$ac_t""$ol_cv_lib_db" 1>&6
6074
6075
6076 for ac_hdr in db_185.h
6077 do
6078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6080 echo "configure:6081: checking for $ac_hdr" >&5
6081 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6082   echo $ac_n "(cached) $ac_c" 1>&6
6083 else
6084   cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087 #include <$ac_hdr>
6088 EOF
6089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6090 { (eval echo configure:6091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6092 if test -z "$ac_err"; then
6093   rm -rf conftest*
6094   eval "ac_cv_header_$ac_safe=yes"
6095 else
6096   echo "$ac_err" >&5
6097   echo "configure: failed program was:" >&5
6098   cat conftest.$ac_ext >&5
6099   rm -rf conftest*
6100   eval "ac_cv_header_$ac_safe=no"
6101 fi
6102 rm -f conftest*
6103 fi
6104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6105   echo "$ac_t""yes" 1>&6
6106     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6107   cat >> confdefs.h <<EOF
6108 #define $ac_tr_hdr 1
6109 EOF
6110  
6111 else
6112   echo "$ac_t""no" 1>&6
6113 fi
6114 done
6115
6116 if test "$ol_cv_header_db2" = yes ; then
6117         
6118         ol_cv_header_db=$ac_cv_header_db_185_h
6119 else
6120         ol_cv_header_db=$ac_cv_header_db_h
6121 fi
6122
6123
6124  
6125  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
6126 echo "configure:6127: checking for Berkeley DB" >&5
6127 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
6128   echo $ac_n "(cached) $ac_c" 1>&6
6129 else
6130   
6131         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
6132                 ol_cv_berkeley_db=no
6133         else
6134                 ol_cv_berkeley_db=yes
6135         fi
6136
6137 fi
6138
6139 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
6140  if test $ol_cv_berkeley_db = yes ; then
6141         cat >> confdefs.h <<\EOF
6142 #define HAVE_BERKELEY_DB 1
6143 EOF
6144
6145  fi
6146
6147
6148         if test $ol_cv_berkeley_db = yes ; then
6149                 ol_link_ldbm=db
6150                 ol_with_ldbm_api=db
6151
6152                 if test $ol_with_ldbm_type = hash ; then
6153                         cat >> confdefs.h <<\EOF
6154 #define LDBM_USE_DBHASH 1
6155 EOF
6156
6157                 else
6158                         cat >> confdefs.h <<\EOF
6159 #define LDBM_USE_DBBTREE 1
6160 EOF
6161
6162                 fi
6163
6164                                                 if test $ol_cv_lib_db != yes ; then
6165                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
6166                 fi
6167         fi
6168 fi
6169
6170 if test $ol_with_ldbm_api = manual ; then
6171                 ol_link_ldbm=yes
6172
6173         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
6174
6175         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
6176 do
6177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6179 echo "configure:6180: checking for $ac_hdr" >&5
6180 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6181   echo $ac_n "(cached) $ac_c" 1>&6
6182 else
6183   cat > conftest.$ac_ext <<EOF
6184 #line 6185 "configure"
6185 #include "confdefs.h"
6186 #include <$ac_hdr>
6187 EOF
6188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6189 { (eval echo configure:6190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6191 if test -z "$ac_err"; then
6192   rm -rf conftest*
6193   eval "ac_cv_header_$ac_safe=yes"
6194 else
6195   echo "$ac_err" >&5
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   eval "ac_cv_header_$ac_safe=no"
6200 fi
6201 rm -f conftest*
6202 fi
6203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6204   echo "$ac_t""yes" 1>&6
6205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6206   cat >> confdefs.h <<EOF
6207 #define $ac_tr_hdr 1
6208 EOF
6209  
6210 else
6211   echo "$ac_t""no" 1>&6
6212 fi
6213 done
6214
6215 fi
6216
6217 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
6218         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
6219         ol_with_ldbm_api=none
6220 fi
6221
6222 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
6223         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
6224 echo "configure:6225: checking for GDBM library" >&5
6225 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
6226   echo $ac_n "(cached) $ac_c" 1>&6
6227 else
6228         ol_LIBS="$LIBS"
6229         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
6230 echo "configure:6231: checking for gdbm_open" >&5
6231 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
6232   echo $ac_n "(cached) $ac_c" 1>&6
6233 else
6234   cat > conftest.$ac_ext <<EOF
6235 #line 6236 "configure"
6236 #include "confdefs.h"
6237 /* System header to define __stub macros and hopefully few prototypes,
6238     which can conflict with char gdbm_open(); below.  */
6239 #include <assert.h>
6240 /* Override any gcc2 internal prototype to avoid an error.  */
6241 /* We use char because int might match the return type of a gcc2
6242     builtin and then its argument prototype would still apply.  */
6243 char gdbm_open();
6244
6245 int main() {
6246
6247 /* The GNU C library defines this for functions which it implements
6248     to always fail with ENOSYS.  Some functions are actually named
6249     something starting with __ and the normal name is an alias.  */
6250 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
6251 choke me
6252 #else
6253 gdbm_open();
6254 #endif
6255
6256 ; return 0; }
6257 EOF
6258 if { (eval echo configure:6259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6259   rm -rf conftest*
6260   eval "ac_cv_func_gdbm_open=yes"
6261 else
6262   echo "configure: failed program was:" >&5
6263   cat conftest.$ac_ext >&5
6264   rm -rf conftest*
6265   eval "ac_cv_func_gdbm_open=no"
6266 fi
6267 rm -f conftest*
6268 fi
6269
6270 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
6271   echo "$ac_t""yes" 1>&6
6272   ol_cv_lib_gdbm=yes
6273 else
6274   echo "$ac_t""no" 1>&6
6275
6276                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
6277 echo "configure:6278: checking for gdbm_open in -lgdbm" >&5
6278 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
6279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6280   echo $ac_n "(cached) $ac_c" 1>&6
6281 else
6282   ac_save_LIBS="$LIBS"
6283 LIBS="-lgdbm  $LIBS"
6284 cat > conftest.$ac_ext <<EOF
6285 #line 6286 "configure"
6286 #include "confdefs.h"
6287 /* Override any gcc2 internal prototype to avoid an error.  */
6288 /* We use char because int might match the return type of a gcc2
6289     builtin and then its argument prototype would still apply.  */
6290 char gdbm_open();
6291
6292 int main() {
6293 gdbm_open()
6294 ; return 0; }
6295 EOF
6296 if { (eval echo configure:6297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6297   rm -rf conftest*
6298   eval "ac_cv_lib_$ac_lib_var=yes"
6299 else
6300   echo "configure: failed program was:" >&5
6301   cat conftest.$ac_ext >&5
6302   rm -rf conftest*
6303   eval "ac_cv_lib_$ac_lib_var=no"
6304 fi
6305 rm -f conftest*
6306 LIBS="$ac_save_LIBS"
6307
6308 fi
6309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6310   echo "$ac_t""yes" 1>&6
6311   ol_cv_lib_gdbm=-lgdbm
6312 else
6313   echo "$ac_t""no" 1>&6
6314 ol_cv_lib_gdbm=no
6315 fi
6316
6317         
6318 fi
6319
6320         LIBS="$ol_LIBS"
6321
6322 fi
6323
6324 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
6325
6326
6327  for ac_hdr in gdbm.h
6328 do
6329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6331 echo "configure:6332: checking for $ac_hdr" >&5
6332 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6333   echo $ac_n "(cached) $ac_c" 1>&6
6334 else
6335   cat > conftest.$ac_ext <<EOF
6336 #line 6337 "configure"
6337 #include "confdefs.h"
6338 #include <$ac_hdr>
6339 EOF
6340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6341 { (eval echo configure:6342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6343 if test -z "$ac_err"; then
6344   rm -rf conftest*
6345   eval "ac_cv_header_$ac_safe=yes"
6346 else
6347   echo "$ac_err" >&5
6348   echo "configure: failed program was:" >&5
6349   cat conftest.$ac_ext >&5
6350   rm -rf conftest*
6351   eval "ac_cv_header_$ac_safe=no"
6352 fi
6353 rm -f conftest*
6354 fi
6355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6356   echo "$ac_t""yes" 1>&6
6357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6358   cat >> confdefs.h <<EOF
6359 #define $ac_tr_hdr 1
6360 EOF
6361  
6362 else
6363   echo "$ac_t""no" 1>&6
6364 fi
6365 done
6366
6367  echo $ac_n "checking for db""... $ac_c" 1>&6
6368 echo "configure:6369: checking for db" >&5
6369 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
6370   echo $ac_n "(cached) $ac_c" 1>&6
6371 else
6372   
6373         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
6374                 ol_cv_gdbm=no
6375         else
6376                 ol_cv_gdbm=yes
6377         fi
6378
6379 fi
6380
6381 echo "$ac_t""$ol_cv_gdbm" 1>&6
6382  if test $ol_cv_gdbm = yes ; then
6383         cat >> confdefs.h <<\EOF
6384 #define HAVE_GDBM 1
6385 EOF
6386
6387  fi
6388
6389
6390         if test $ol_cv_gdbm = yes ; then
6391                 ol_link_ldbm=gdbm
6392                 ol_with_ldbm_api=gdbm
6393
6394                 if test $ol_cv_lib_gdbm != yes ; then
6395                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
6396                 fi
6397         fi
6398 fi
6399
6400 if test $ol_with_ldbm_api = auto ; then
6401         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
6402 elif test $ol_with_ldbm_api = ndbm ; then
6403         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
6404 echo "configure:6405: checking for NDBM library" >&5
6405 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
6406   echo $ac_n "(cached) $ac_c" 1>&6
6407 else
6408         ol_LIBS="$LIBS"
6409         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
6410 echo "configure:6411: checking for dbm_open" >&5
6411 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
6412   echo $ac_n "(cached) $ac_c" 1>&6
6413 else
6414   cat > conftest.$ac_ext <<EOF
6415 #line 6416 "configure"
6416 #include "confdefs.h"
6417 /* System header to define __stub macros and hopefully few prototypes,
6418     which can conflict with char dbm_open(); below.  */
6419 #include <assert.h>
6420 /* Override any gcc2 internal prototype to avoid an error.  */
6421 /* We use char because int might match the return type of a gcc2
6422     builtin and then its argument prototype would still apply.  */
6423 char dbm_open();
6424
6425 int main() {
6426
6427 /* The GNU C library defines this for functions which it implements
6428     to always fail with ENOSYS.  Some functions are actually named
6429     something starting with __ and the normal name is an alias.  */
6430 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
6431 choke me
6432 #else
6433 dbm_open();
6434 #endif
6435
6436 ; return 0; }
6437 EOF
6438 if { (eval echo configure:6439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6439   rm -rf conftest*
6440   eval "ac_cv_func_dbm_open=yes"
6441 else
6442   echo "configure: failed program was:" >&5
6443   cat conftest.$ac_ext >&5
6444   rm -rf conftest*
6445   eval "ac_cv_func_dbm_open=no"
6446 fi
6447 rm -f conftest*
6448 fi
6449
6450 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
6451   echo "$ac_t""yes" 1>&6
6452   ol_cv_lib_ndbm=yes
6453 else
6454   echo "$ac_t""no" 1>&6
6455
6456                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
6457 echo "configure:6458: checking for dbm_open in -lndbm" >&5
6458 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
6459 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6460   echo $ac_n "(cached) $ac_c" 1>&6
6461 else
6462   ac_save_LIBS="$LIBS"
6463 LIBS="-lndbm  $LIBS"
6464 cat > conftest.$ac_ext <<EOF
6465 #line 6466 "configure"
6466 #include "confdefs.h"
6467 /* Override any gcc2 internal prototype to avoid an error.  */
6468 /* We use char because int might match the return type of a gcc2
6469     builtin and then its argument prototype would still apply.  */
6470 char dbm_open();
6471
6472 int main() {
6473 dbm_open()
6474 ; return 0; }
6475 EOF
6476 if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6477   rm -rf conftest*
6478   eval "ac_cv_lib_$ac_lib_var=yes"
6479 else
6480   echo "configure: failed program was:" >&5
6481   cat conftest.$ac_ext >&5
6482   rm -rf conftest*
6483   eval "ac_cv_lib_$ac_lib_var=no"
6484 fi
6485 rm -f conftest*
6486 LIBS="$ac_save_LIBS"
6487
6488 fi
6489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6490   echo "$ac_t""yes" 1>&6
6491   ol_cv_lib_ndbm=-lndbm
6492 else
6493   echo "$ac_t""no" 1>&6
6494
6495                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
6496 echo "configure:6497: checking for dbm_open in -ldbm" >&5
6497 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
6498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6499   echo $ac_n "(cached) $ac_c" 1>&6
6500 else
6501   ac_save_LIBS="$LIBS"
6502 LIBS="-ldbm  $LIBS"
6503 cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 /* Override any gcc2 internal prototype to avoid an error.  */
6507 /* We use char because int might match the return type of a gcc2
6508     builtin and then its argument prototype would still apply.  */
6509 char dbm_open();
6510
6511 int main() {
6512 dbm_open()
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6516   rm -rf conftest*
6517   eval "ac_cv_lib_$ac_lib_var=yes"
6518 else
6519   echo "configure: failed program was:" >&5
6520   cat conftest.$ac_ext >&5
6521   rm -rf conftest*
6522   eval "ac_cv_lib_$ac_lib_var=no"
6523 fi
6524 rm -f conftest*
6525 LIBS="$ac_save_LIBS"
6526
6527 fi
6528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6529   echo "$ac_t""yes" 1>&6
6530   ol_cv_lib_ndbm=-ldbm
6531 else
6532   echo "$ac_t""no" 1>&6
6533 ol_cv_lib_ndbm=no
6534 fi
6535                 
6536 fi
6537
6538         
6539 fi
6540
6541         LIBS="$ol_LIBS"
6542
6543 fi
6544
6545 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
6546
6547
6548  for ac_hdr in ndbm.h
6549 do
6550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6552 echo "configure:6553: checking for $ac_hdr" >&5
6553 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6554   echo $ac_n "(cached) $ac_c" 1>&6
6555 else
6556   cat > conftest.$ac_ext <<EOF
6557 #line 6558 "configure"
6558 #include "confdefs.h"
6559 #include <$ac_hdr>
6560 EOF
6561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6562 { (eval echo configure:6563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6564 if test -z "$ac_err"; then
6565   rm -rf conftest*
6566   eval "ac_cv_header_$ac_safe=yes"
6567 else
6568   echo "$ac_err" >&5
6569   echo "configure: failed program was:" >&5
6570   cat conftest.$ac_ext >&5
6571   rm -rf conftest*
6572   eval "ac_cv_header_$ac_safe=no"
6573 fi
6574 rm -f conftest*
6575 fi
6576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6577   echo "$ac_t""yes" 1>&6
6578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6579   cat >> confdefs.h <<EOF
6580 #define $ac_tr_hdr 1
6581 EOF
6582  
6583 else
6584   echo "$ac_t""no" 1>&6
6585 fi
6586 done
6587
6588  echo $ac_n "checking for db""... $ac_c" 1>&6
6589 echo "configure:6590: checking for db" >&5
6590 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
6591   echo $ac_n "(cached) $ac_c" 1>&6
6592 else
6593   
6594         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
6595                 ol_cv_ndbm=no
6596         else
6597                 ol_cv_ndbm=yes
6598         fi
6599
6600 fi
6601
6602 echo "$ac_t""$ol_cv_ndbm" 1>&6
6603  if test $ol_cv_ndbm = yes ; then
6604         cat >> confdefs.h <<\EOF
6605 #define HAVE_NDBM 1
6606 EOF
6607
6608  fi
6609
6610
6611         if test $ol_cv_ndbm = yes ; then
6612                 ol_link_ldbm=ndbm
6613                 ol_with_ldbm_api=ndbm
6614
6615                 if test $ol_cv_lib_ndbm != yes ; then
6616                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
6617                 fi
6618         fi
6619 fi
6620
6621 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
6622         echo "configure: warning: could not find suitable LDBM backend" 1>&2
6623         if test $ol_enable_ldbm = yes ; then
6624                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
6625         fi
6626
6627         echo "configure: warning: disabling LDBM" 1>&2
6628         ol_enable_ldbm=no
6629 fi
6630
6631 if test $ol_enable_wrappers != no ; then
6632         for ac_hdr in tcpd.h
6633 do
6634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6636 echo "configure:6637: checking for $ac_hdr" >&5
6637 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6638   echo $ac_n "(cached) $ac_c" 1>&6
6639 else
6640   cat > conftest.$ac_ext <<EOF
6641 #line 6642 "configure"
6642 #include "confdefs.h"
6643 #include <$ac_hdr>
6644 EOF
6645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6646 { (eval echo configure:6647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6648 if test -z "$ac_err"; then
6649   rm -rf conftest*
6650   eval "ac_cv_header_$ac_safe=yes"
6651 else
6652   echo "$ac_err" >&5
6653   echo "configure: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   rm -rf conftest*
6656   eval "ac_cv_header_$ac_safe=no"
6657 fi
6658 rm -f conftest*
6659 fi
6660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6661   echo "$ac_t""yes" 1>&6
6662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6663   cat >> confdefs.h <<EOF
6664 #define $ac_tr_hdr 1
6665 EOF
6666  
6667 else
6668   echo "$ac_t""no" 1>&6
6669 fi
6670 done
6671
6672
6673         if test $ac_cv_header_tcpd_h != yes ; then
6674                 have_wrappers=no
6675         else
6676                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
6677 echo "configure:6678: checking for main in -lwrap" >&5
6678 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
6679 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6680   echo $ac_n "(cached) $ac_c" 1>&6
6681 else
6682   ac_save_LIBS="$LIBS"
6683 LIBS="-lwrap  $LIBS"
6684 cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6687
6688 int main() {
6689 main()
6690 ; return 0; }
6691 EOF
6692 if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6693   rm -rf conftest*
6694   eval "ac_cv_lib_$ac_lib_var=yes"
6695 else
6696   echo "configure: failed program was:" >&5
6697   cat conftest.$ac_ext >&5
6698   rm -rf conftest*
6699   eval "ac_cv_lib_$ac_lib_var=no"
6700 fi
6701 rm -f conftest*
6702 LIBS="$ac_save_LIBS"
6703
6704 fi
6705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6706   echo "$ac_t""yes" 1>&6
6707   have_wrappers=yes
6708 else
6709   echo "$ac_t""no" 1>&6
6710 have_wrappers=no
6711 fi
6712
6713         fi
6714
6715         if test $have_wrappers = yes ; then
6716                 cat >> confdefs.h <<\EOF
6717 #define HAVE_TCPD 1
6718 EOF
6719
6720                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
6721         else
6722                 echo "configure: warning: could not find -lwrap" 1>&2
6723                 if test $ol_enable_wrappers = yes ; then
6724                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
6725                 fi
6726
6727                 echo "configure: warning: disabling wrappers support" 1>&2
6728                 ol_enable_wrappers=no
6729         fi
6730 fi
6731
6732 if test $ol_enable_syslog != no ; then
6733         echo $ac_n "checking for openlog""... $ac_c" 1>&6
6734 echo "configure:6735: checking for openlog" >&5
6735 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
6736   echo $ac_n "(cached) $ac_c" 1>&6
6737 else
6738   cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6741 /* System header to define __stub macros and hopefully few prototypes,
6742     which can conflict with char openlog(); below.  */
6743 #include <assert.h>
6744 /* Override any gcc2 internal prototype to avoid an error.  */
6745 /* We use char because int might match the return type of a gcc2
6746     builtin and then its argument prototype would still apply.  */
6747 char openlog();
6748
6749 int main() {
6750
6751 /* The GNU C library defines this for functions which it implements
6752     to always fail with ENOSYS.  Some functions are actually named
6753     something starting with __ and the normal name is an alias.  */
6754 #if defined (__stub_openlog) || defined (__stub___openlog)
6755 choke me
6756 #else
6757 openlog();
6758 #endif
6759
6760 ; return 0; }
6761 EOF
6762 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6763   rm -rf conftest*
6764   eval "ac_cv_func_openlog=yes"
6765 else
6766   echo "configure: failed program was:" >&5
6767   cat conftest.$ac_ext >&5
6768   rm -rf conftest*
6769   eval "ac_cv_func_openlog=no"
6770 fi
6771 rm -f conftest*
6772 fi
6773
6774 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
6775   echo "$ac_t""yes" 1>&6
6776   :
6777 else
6778   echo "$ac_t""no" 1>&6
6779 fi
6780
6781         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
6782                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
6783         fi
6784         ol_enable_syslog=$ac_cv_func_openlog
6785 fi
6786
6787 if test $ol_enable_dmalloc != no ; then
6788         for ac_hdr in dmalloc.h
6789 do
6790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6792 echo "configure:6793: checking for $ac_hdr" >&5
6793 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6794   echo $ac_n "(cached) $ac_c" 1>&6
6795 else
6796   cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6799 #include <$ac_hdr>
6800 EOF
6801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6802 { (eval echo configure:6803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6804 if test -z "$ac_err"; then
6805   rm -rf conftest*
6806   eval "ac_cv_header_$ac_safe=yes"
6807 else
6808   echo "$ac_err" >&5
6809   echo "configure: failed program was:" >&5
6810   cat conftest.$ac_ext >&5
6811   rm -rf conftest*
6812   eval "ac_cv_header_$ac_safe=no"
6813 fi
6814 rm -f conftest*
6815 fi
6816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6817   echo "$ac_t""yes" 1>&6
6818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6819   cat >> confdefs.h <<EOF
6820 #define $ac_tr_hdr 1
6821 EOF
6822  
6823 else
6824   echo "$ac_t""no" 1>&6
6825 fi
6826 done
6827
6828         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
6829 echo "configure:6830: checking for dmalloc_shutdown in -ldmalloc" >&5
6830 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
6831 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6832   echo $ac_n "(cached) $ac_c" 1>&6
6833 else
6834   ac_save_LIBS="$LIBS"
6835 LIBS="-ldmalloc  $LIBS"
6836 cat > conftest.$ac_ext <<EOF
6837 #line 6838 "configure"
6838 #include "confdefs.h"
6839 /* Override any gcc2 internal prototype to avoid an error.  */
6840 /* We use char because int might match the return type of a gcc2
6841     builtin and then its argument prototype would still apply.  */
6842 char dmalloc_shutdown();
6843
6844 int main() {
6845 dmalloc_shutdown()
6846 ; return 0; }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6849   rm -rf conftest*
6850   eval "ac_cv_lib_$ac_lib_var=yes"
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -rf conftest*
6855   eval "ac_cv_lib_$ac_lib_var=no"
6856 fi
6857 rm -f conftest*
6858 LIBS="$ac_save_LIBS"
6859
6860 fi
6861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6862   echo "$ac_t""yes" 1>&6
6863     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6864     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6865   cat >> confdefs.h <<EOF
6866 #define $ac_tr_lib 1
6867 EOF
6868
6869   LIBS="-ldmalloc $LIBS"
6870
6871 else
6872   echo "$ac_t""no" 1>&6
6873 fi
6874
6875 fi
6876
6877 # ud needs termcap (should insert check here)
6878 ol_link_termcap=no
6879 for ac_hdr in termcap.h ncurses.h
6880 do
6881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6883 echo "configure:6884: checking for $ac_hdr" >&5
6884 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6885   echo $ac_n "(cached) $ac_c" 1>&6
6886 else
6887   cat > conftest.$ac_ext <<EOF
6888 #line 6889 "configure"
6889 #include "confdefs.h"
6890 #include <$ac_hdr>
6891 EOF
6892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6893 { (eval echo configure:6894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6895 if test -z "$ac_err"; then
6896   rm -rf conftest*
6897   eval "ac_cv_header_$ac_safe=yes"
6898 else
6899   echo "$ac_err" >&5
6900   echo "configure: failed program was:" >&5
6901   cat conftest.$ac_ext >&5
6902   rm -rf conftest*
6903   eval "ac_cv_header_$ac_safe=no"
6904 fi
6905 rm -f conftest*
6906 fi
6907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6908   echo "$ac_t""yes" 1>&6
6909     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6910   cat >> confdefs.h <<EOF
6911 #define $ac_tr_hdr 1
6912 EOF
6913  
6914 else
6915   echo "$ac_t""no" 1>&6
6916 fi
6917 done
6918
6919
6920 if test $ol_link_termcap = no ; then
6921         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
6922 echo "configure:6923: checking for tputs in -ltermcap" >&5
6923 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
6924 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6925   echo $ac_n "(cached) $ac_c" 1>&6
6926 else
6927   ac_save_LIBS="$LIBS"
6928 LIBS="-ltermcap  $LIBS"
6929 cat > conftest.$ac_ext <<EOF
6930 #line 6931 "configure"
6931 #include "confdefs.h"
6932 /* Override any gcc2 internal prototype to avoid an error.  */
6933 /* We use char because int might match the return type of a gcc2
6934     builtin and then its argument prototype would still apply.  */
6935 char tputs();
6936
6937 int main() {
6938 tputs()
6939 ; return 0; }
6940 EOF
6941 if { (eval echo configure:6942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6942   rm -rf conftest*
6943   eval "ac_cv_lib_$ac_lib_var=yes"
6944 else
6945   echo "configure: failed program was:" >&5
6946   cat conftest.$ac_ext >&5
6947   rm -rf conftest*
6948   eval "ac_cv_lib_$ac_lib_var=no"
6949 fi
6950 rm -f conftest*
6951 LIBS="$ac_save_LIBS"
6952
6953 fi
6954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6955   echo "$ac_t""yes" 1>&6
6956   have_termcap=yes
6957 else
6958   echo "$ac_t""no" 1>&6
6959 have_termcap=no
6960 fi
6961
6962         if test $have_termcap = yes ; then
6963                 cat >> confdefs.h <<\EOF
6964 #define HAVE_TERMCAP 1
6965 EOF
6966
6967                 ol_link_termcap=yes
6968                 TERMCAP_LIBS=-ltermcap
6969         fi
6970 fi
6971
6972 if test $ol_link_termcap = no ; then
6973         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
6974 echo "configure:6975: checking for initscr in -lncurses" >&5
6975 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
6976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6977   echo $ac_n "(cached) $ac_c" 1>&6
6978 else
6979   ac_save_LIBS="$LIBS"
6980 LIBS="-lncurses  $LIBS"
6981 cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984 /* Override any gcc2 internal prototype to avoid an error.  */
6985 /* We use char because int might match the return type of a gcc2
6986     builtin and then its argument prototype would still apply.  */
6987 char initscr();
6988
6989 int main() {
6990 initscr()
6991 ; return 0; }
6992 EOF
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6994   rm -rf conftest*
6995   eval "ac_cv_lib_$ac_lib_var=yes"
6996 else
6997   echo "configure: failed program was:" >&5
6998   cat conftest.$ac_ext >&5
6999   rm -rf conftest*
7000   eval "ac_cv_lib_$ac_lib_var=no"
7001 fi
7002 rm -f conftest*
7003 LIBS="$ac_save_LIBS"
7004
7005 fi
7006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7007   echo "$ac_t""yes" 1>&6
7008   have_ncurses=yes
7009 else
7010   echo "$ac_t""no" 1>&6
7011 have_ncurses=no
7012 fi
7013
7014         if test $have_ncurses = yes ; then
7015                 cat >> confdefs.h <<\EOF
7016 #define HAVE_NCURSES 1
7017 EOF
7018
7019                 ol_link_termcap=yes
7020                 TERMCAP_LIBS=-lncurses
7021         fi
7022 fi
7023
7024 if test $ol_link_termcap = no ; then
7025         cat >> confdefs.h <<\EOF
7026 #define NO_TERMCAP 1
7027 EOF
7028
7029         TERMCAP_LIBS=
7030 fi
7031
7032 # FreeBSD (and others) have crypt(3) in -lcrypt
7033 if test $ol_enable_crypt != no ; then
7034         echo $ac_n "checking for crypt""... $ac_c" 1>&6
7035 echo "configure:7036: checking for crypt" >&5
7036 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
7037   echo $ac_n "(cached) $ac_c" 1>&6
7038 else
7039   cat > conftest.$ac_ext <<EOF
7040 #line 7041 "configure"
7041 #include "confdefs.h"
7042 /* System header to define __stub macros and hopefully few prototypes,
7043     which can conflict with char crypt(); below.  */
7044 #include <assert.h>
7045 /* Override any gcc2 internal prototype to avoid an error.  */
7046 /* We use char because int might match the return type of a gcc2
7047     builtin and then its argument prototype would still apply.  */
7048 char crypt();
7049
7050 int main() {
7051
7052 /* The GNU C library defines this for functions which it implements
7053     to always fail with ENOSYS.  Some functions are actually named
7054     something starting with __ and the normal name is an alias.  */
7055 #if defined (__stub_crypt) || defined (__stub___crypt)
7056 choke me
7057 #else
7058 crypt();
7059 #endif
7060
7061 ; return 0; }
7062 EOF
7063 if { (eval echo configure:7064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7064   rm -rf conftest*
7065   eval "ac_cv_func_crypt=yes"
7066 else
7067   echo "configure: failed program was:" >&5
7068   cat conftest.$ac_ext >&5
7069   rm -rf conftest*
7070   eval "ac_cv_func_crypt=no"
7071 fi
7072 rm -f conftest*
7073 fi
7074
7075 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
7076   echo "$ac_t""yes" 1>&6
7077   have_crypt=yes
7078 else
7079   echo "$ac_t""no" 1>&6
7080
7081                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
7082 echo "configure:7083: checking for crypt in -lcrypt" >&5
7083 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
7084 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7085   echo $ac_n "(cached) $ac_c" 1>&6
7086 else
7087   ac_save_LIBS="$LIBS"
7088 LIBS="-lcrypt  $LIBS"
7089 cat > conftest.$ac_ext <<EOF
7090 #line 7091 "configure"
7091 #include "confdefs.h"
7092 /* Override any gcc2 internal prototype to avoid an error.  */
7093 /* We use char because int might match the return type of a gcc2
7094     builtin and then its argument prototype would still apply.  */
7095 char crypt();
7096
7097 int main() {
7098 crypt()
7099 ; return 0; }
7100 EOF
7101 if { (eval echo configure:7102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7102   rm -rf conftest*
7103   eval "ac_cv_lib_$ac_lib_var=yes"
7104 else
7105   echo "configure: failed program was:" >&5
7106   cat conftest.$ac_ext >&5
7107   rm -rf conftest*
7108   eval "ac_cv_lib_$ac_lib_var=no"
7109 fi
7110 rm -f conftest*
7111 LIBS="$ac_save_LIBS"
7112
7113 fi
7114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7115   echo "$ac_t""yes" 1>&6
7116   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
7117                         have_crypt=yes
7118 else
7119   echo "$ac_t""no" 1>&6
7120 have_crypt=no
7121 fi
7122
7123 fi
7124
7125
7126         if test $have_crypt = yes ; then
7127                 cat >> confdefs.h <<\EOF
7128 #define HAVE_CRYPT 1
7129 EOF
7130
7131         else
7132                 echo "configure: warning: could not find crypt" 1>&2
7133                 if test $ol_enable_crypt = yes ; then
7134                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
7135                 fi
7136
7137                 echo "configure: warning: disabling crypt support" 1>&2
7138                 ol_enable_crypt=no
7139         fi
7140 fi
7141
7142 # FreeBSD (and others) have setproctitle(3) in -lutil
7143 if test $ol_enable_proctitle != no ; then
7144         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
7145 echo "configure:7146: checking for setproctitle" >&5
7146 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
7147   echo $ac_n "(cached) $ac_c" 1>&6
7148 else
7149   cat > conftest.$ac_ext <<EOF
7150 #line 7151 "configure"
7151 #include "confdefs.h"
7152 /* System header to define __stub macros and hopefully few prototypes,
7153     which can conflict with char setproctitle(); below.  */
7154 #include <assert.h>
7155 /* Override any gcc2 internal prototype to avoid an error.  */
7156 /* We use char because int might match the return type of a gcc2
7157     builtin and then its argument prototype would still apply.  */
7158 char setproctitle();
7159
7160 int main() {
7161
7162 /* The GNU C library defines this for functions which it implements
7163     to always fail with ENOSYS.  Some functions are actually named
7164     something starting with __ and the normal name is an alias.  */
7165 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
7166 choke me
7167 #else
7168 setproctitle();
7169 #endif
7170
7171 ; return 0; }
7172 EOF
7173 if { (eval echo configure:7174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7174   rm -rf conftest*
7175   eval "ac_cv_func_setproctitle=yes"
7176 else
7177   echo "configure: failed program was:" >&5
7178   cat conftest.$ac_ext >&5
7179   rm -rf conftest*
7180   eval "ac_cv_func_setproctitle=no"
7181 fi
7182 rm -f conftest*
7183 fi
7184
7185 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
7186   echo "$ac_t""yes" 1>&6
7187   have_setproctitle=yes
7188 else
7189   echo "$ac_t""no" 1>&6
7190
7191                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
7192 echo "configure:7193: checking for setproctitle in -lutil" >&5
7193 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
7194 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7195   echo $ac_n "(cached) $ac_c" 1>&6
7196 else
7197   ac_save_LIBS="$LIBS"
7198 LIBS="-lutil  $LIBS"
7199 cat > conftest.$ac_ext <<EOF
7200 #line 7201 "configure"
7201 #include "confdefs.h"
7202 /* Override any gcc2 internal prototype to avoid an error.  */
7203 /* We use char because int might match the return type of a gcc2
7204     builtin and then its argument prototype would still apply.  */
7205 char setproctitle();
7206
7207 int main() {
7208 setproctitle()
7209 ; return 0; }
7210 EOF
7211 if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7212   rm -rf conftest*
7213   eval "ac_cv_lib_$ac_lib_var=yes"
7214 else
7215   echo "configure: failed program was:" >&5
7216   cat conftest.$ac_ext >&5
7217   rm -rf conftest*
7218   eval "ac_cv_lib_$ac_lib_var=no"
7219 fi
7220 rm -f conftest*
7221 LIBS="$ac_save_LIBS"
7222
7223 fi
7224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7225   echo "$ac_t""yes" 1>&6
7226   have_setproctitle=yes
7227                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
7228 else
7229   echo "$ac_t""no" 1>&6
7230 have_setproctitle=no
7231                         LIBOBJS="$LIBOBJS setproctitle.o"
7232 fi
7233
7234 fi
7235
7236
7237         if test $have_setproctitle = yes ; then
7238                 cat >> confdefs.h <<\EOF
7239 #define HAVE_SETPROCTITLE 1
7240 EOF
7241
7242         fi
7243 fi
7244
7245 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7246 echo "configure:7247: checking for ANSI C header files" >&5
7247 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7248   echo $ac_n "(cached) $ac_c" 1>&6
7249 else
7250   cat > conftest.$ac_ext <<EOF
7251 #line 7252 "configure"
7252 #include "confdefs.h"
7253 #include <stdlib.h>
7254 #include <stdarg.h>
7255 #include <string.h>
7256 #include <float.h>
7257 EOF
7258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7259 { (eval echo configure:7260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7261 if test -z "$ac_err"; then
7262   rm -rf conftest*
7263   ac_cv_header_stdc=yes
7264 else
7265   echo "$ac_err" >&5
7266   echo "configure: failed program was:" >&5
7267   cat conftest.$ac_ext >&5
7268   rm -rf conftest*
7269   ac_cv_header_stdc=no
7270 fi
7271 rm -f conftest*
7272
7273 if test $ac_cv_header_stdc = yes; then
7274   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7275 cat > conftest.$ac_ext <<EOF
7276 #line 7277 "configure"
7277 #include "confdefs.h"
7278 #include <string.h>
7279 EOF
7280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7281   egrep "memchr" >/dev/null 2>&1; then
7282   :
7283 else
7284   rm -rf conftest*
7285   ac_cv_header_stdc=no
7286 fi
7287 rm -f conftest*
7288
7289 fi
7290
7291 if test $ac_cv_header_stdc = yes; then
7292   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7293 cat > conftest.$ac_ext <<EOF
7294 #line 7295 "configure"
7295 #include "confdefs.h"
7296 #include <stdlib.h>
7297 EOF
7298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7299   egrep "free" >/dev/null 2>&1; then
7300   :
7301 else
7302   rm -rf conftest*
7303   ac_cv_header_stdc=no
7304 fi
7305 rm -f conftest*
7306
7307 fi
7308
7309 if test $ac_cv_header_stdc = yes; then
7310   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7311 if test "$cross_compiling" = yes; then
7312   :
7313 else
7314   cat > conftest.$ac_ext <<EOF
7315 #line 7316 "configure"
7316 #include "confdefs.h"
7317 #include <ctype.h>
7318 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7319 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7320 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7321 int main () { int i; for (i = 0; i < 256; i++)
7322 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
7323 exit (0); }
7324
7325 EOF
7326 if { (eval echo configure:7327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7327 then
7328   :
7329 else
7330   echo "configure: failed program was:" >&5
7331   cat conftest.$ac_ext >&5
7332   rm -fr conftest*
7333   ac_cv_header_stdc=no
7334 fi
7335 rm -fr conftest*
7336 fi
7337
7338 fi
7339 fi
7340
7341 echo "$ac_t""$ac_cv_header_stdc" 1>&6
7342 if test $ac_cv_header_stdc = yes; then
7343   cat >> confdefs.h <<\EOF
7344 #define STDC_HEADERS 1
7345 EOF
7346
7347 fi
7348
7349
7350 if test $ac_cv_header_stdc != yes; then
7351         echo "configure: warning: could not Standard C compliant headers" 1>&2
7352 fi
7353
7354 ac_header_dirent=no
7355 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
7356 do
7357 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7358 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
7359 echo "configure:7360: checking for $ac_hdr that defines DIR" >&5
7360 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
7361   echo $ac_n "(cached) $ac_c" 1>&6
7362 else
7363   cat > conftest.$ac_ext <<EOF
7364 #line 7365 "configure"
7365 #include "confdefs.h"
7366 #include <sys/types.h>
7367 #include <$ac_hdr>
7368 int main() {
7369 DIR *dirp = 0;
7370 ; return 0; }
7371 EOF
7372 if { (eval echo configure:7373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7373   rm -rf conftest*
7374   eval "ac_cv_header_dirent_$ac_safe=yes"
7375 else
7376   echo "configure: failed program was:" >&5
7377   cat conftest.$ac_ext >&5
7378   rm -rf conftest*
7379   eval "ac_cv_header_dirent_$ac_safe=no"
7380 fi
7381 rm -f conftest*
7382 fi
7383 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
7384   echo "$ac_t""yes" 1>&6
7385     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7386   cat >> confdefs.h <<EOF
7387 #define $ac_tr_hdr 1
7388 EOF
7389  ac_header_dirent=$ac_hdr; break
7390 else
7391   echo "$ac_t""no" 1>&6
7392 fi
7393 done
7394 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7395 if test $ac_header_dirent = dirent.h; then
7396 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
7397 echo "configure:7398: checking for opendir in -ldir" >&5
7398 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
7399 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7400   echo $ac_n "(cached) $ac_c" 1>&6
7401 else
7402   ac_save_LIBS="$LIBS"
7403 LIBS="-ldir  $LIBS"
7404 cat > conftest.$ac_ext <<EOF
7405 #line 7406 "configure"
7406 #include "confdefs.h"
7407 /* Override any gcc2 internal prototype to avoid an error.  */
7408 /* We use char because int might match the return type of a gcc2
7409     builtin and then its argument prototype would still apply.  */
7410 char opendir();
7411
7412 int main() {
7413 opendir()
7414 ; return 0; }
7415 EOF
7416 if { (eval echo configure:7417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7417   rm -rf conftest*
7418   eval "ac_cv_lib_$ac_lib_var=yes"
7419 else
7420   echo "configure: failed program was:" >&5
7421   cat conftest.$ac_ext >&5
7422   rm -rf conftest*
7423   eval "ac_cv_lib_$ac_lib_var=no"
7424 fi
7425 rm -f conftest*
7426 LIBS="$ac_save_LIBS"
7427
7428 fi
7429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7430   echo "$ac_t""yes" 1>&6
7431   LIBS="$LIBS -ldir"
7432 else
7433   echo "$ac_t""no" 1>&6
7434 fi
7435
7436 else
7437 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
7438 echo "configure:7439: checking for opendir in -lx" >&5
7439 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
7440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7441   echo $ac_n "(cached) $ac_c" 1>&6
7442 else
7443   ac_save_LIBS="$LIBS"
7444 LIBS="-lx  $LIBS"
7445 cat > conftest.$ac_ext <<EOF
7446 #line 7447 "configure"
7447 #include "confdefs.h"
7448 /* Override any gcc2 internal prototype to avoid an error.  */
7449 /* We use char because int might match the return type of a gcc2
7450     builtin and then its argument prototype would still apply.  */
7451 char opendir();
7452
7453 int main() {
7454 opendir()
7455 ; return 0; }
7456 EOF
7457 if { (eval echo configure:7458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7458   rm -rf conftest*
7459   eval "ac_cv_lib_$ac_lib_var=yes"
7460 else
7461   echo "configure: failed program was:" >&5
7462   cat conftest.$ac_ext >&5
7463   rm -rf conftest*
7464   eval "ac_cv_lib_$ac_lib_var=no"
7465 fi
7466 rm -f conftest*
7467 LIBS="$ac_save_LIBS"
7468
7469 fi
7470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7471   echo "$ac_t""yes" 1>&6
7472   LIBS="$LIBS -lx"
7473 else
7474   echo "$ac_t""no" 1>&6
7475 fi
7476
7477 fi
7478
7479 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
7480 echo "configure:7481: checking for sys/wait.h that is POSIX.1 compatible" >&5
7481 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
7482   echo $ac_n "(cached) $ac_c" 1>&6
7483 else
7484   cat > conftest.$ac_ext <<EOF
7485 #line 7486 "configure"
7486 #include "confdefs.h"
7487 #include <sys/types.h>
7488 #include <sys/wait.h>
7489 #ifndef WEXITSTATUS
7490 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7491 #endif
7492 #ifndef WIFEXITED
7493 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7494 #endif
7495 int main() {
7496 int s;
7497 wait (&s);
7498 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7499 ; return 0; }
7500 EOF
7501 if { (eval echo configure:7502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7502   rm -rf conftest*
7503   ac_cv_header_sys_wait_h=yes
7504 else
7505   echo "configure: failed program was:" >&5
7506   cat conftest.$ac_ext >&5
7507   rm -rf conftest*
7508   ac_cv_header_sys_wait_h=no
7509 fi
7510 rm -f conftest*
7511 fi
7512
7513 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
7514 if test $ac_cv_header_sys_wait_h = yes; then
7515   cat >> confdefs.h <<\EOF
7516 #define HAVE_SYS_WAIT_H 1
7517 EOF
7518
7519 fi
7520
7521 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
7522 echo "configure:7523: checking POSIX termios" >&5
7523 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
7524   echo $ac_n "(cached) $ac_c" 1>&6
7525 else
7526   cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 #include <sys/types.h>
7530 #include <unistd.h>
7531 #include <termios.h>
7532 int main() {
7533 /* SunOS 4.0.3 has termios.h but not the library calls.  */
7534    tcgetattr(0, 0);
7535 ; return 0; }
7536 EOF
7537 if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7538   rm -rf conftest*
7539   am_cv_sys_posix_termios=yes
7540 else
7541   echo "configure: failed program was:" >&5
7542   cat conftest.$ac_ext >&5
7543   rm -rf conftest*
7544   am_cv_sys_posix_termios=no
7545 fi
7546 rm -f conftest*
7547 fi
7548
7549 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
7550
7551
7552  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
7553 echo "configure:7554: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
7554 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
7555   echo $ac_n "(cached) $ac_c" 1>&6
7556 else
7557   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
7558
7559   gwinsz_in_termios_h=no
7560   if test $am_cv_sys_posix_termios = yes; then
7561     cat > conftest.$ac_ext <<EOF
7562 #line 7563 "configure"
7563 #include "confdefs.h"
7564 #include <sys/types.h>
7565 #     include <termios.h>
7566 #     ifdef TIOCGWINSZ
7567         yes
7568 #     endif
7569     
7570 EOF
7571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7572   egrep "yes" >/dev/null 2>&1; then
7573   rm -rf conftest*
7574   gwinsz_in_termios_h=yes
7575 fi
7576 rm -f conftest*
7577
7578   fi
7579
7580   if test $gwinsz_in_termios_h = no; then
7581     cat > conftest.$ac_ext <<EOF
7582 #line 7583 "configure"
7583 #include "confdefs.h"
7584 #include <sys/types.h>
7585 #     include <sys/ioctl.h>
7586 #     ifdef TIOCGWINSZ
7587         yes
7588 #     endif
7589     
7590 EOF
7591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7592   egrep "yes" >/dev/null 2>&1; then
7593   rm -rf conftest*
7594   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
7595 fi
7596 rm -f conftest*
7597
7598   fi
7599   
7600 fi
7601
7602 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
7603   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
7604     cat >> confdefs.h <<\EOF
7605 #define GWINSZ_IN_SYS_IOCTL 1
7606 EOF
7607
7608   fi
7609
7610 if test $am_cv_sys_posix_termios = yes ; then
7611         cat >> confdefs.h <<\EOF
7612 #define HAVE_POSIX_TERMIOS 1
7613 EOF
7614
7615 fi
7616
7617 for ac_hdr in \
7618         crypt.h                 \
7619         errno.h                 \
7620         fcntl.h                 \
7621         filio.h                 \
7622         getopt.h                \
7623         libutil.h               \
7624         limits.h                \
7625         malloc.h                \
7626         memory.h                \
7627         regex.h                 \
7628         psap.h                  \
7629         pwd.h                   \
7630         sgtty.h                 \
7631         stdarg.h                \
7632         stddef.h                \
7633         string.h                \
7634         strings.h               \
7635         sysexits.h              \
7636         sys/file.h              \
7637         sys/filio.h             \
7638         sys/errno.h             \
7639         sys/ioctl.h             \
7640         sys/param.h             \
7641         sys/resource.h  \
7642         sys/socket.h    \
7643         sys/syslog.h    \
7644         sys/time.h              \
7645         sys/types.h             \
7646         syslog.h                \
7647         termios.h               \
7648         unistd.h                \
7649
7650 do
7651 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7652 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7653 echo "configure:7654: checking for $ac_hdr" >&5
7654 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7655   echo $ac_n "(cached) $ac_c" 1>&6
7656 else
7657   cat > conftest.$ac_ext <<EOF
7658 #line 7659 "configure"
7659 #include "confdefs.h"
7660 #include <$ac_hdr>
7661 EOF
7662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7663 { (eval echo configure:7664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7665 if test -z "$ac_err"; then
7666   rm -rf conftest*
7667   eval "ac_cv_header_$ac_safe=yes"
7668 else
7669   echo "$ac_err" >&5
7670   echo "configure: failed program was:" >&5
7671   cat conftest.$ac_ext >&5
7672   rm -rf conftest*
7673   eval "ac_cv_header_$ac_safe=no"
7674 fi
7675 rm -f conftest*
7676 fi
7677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7678   echo "$ac_t""yes" 1>&6
7679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7680   cat >> confdefs.h <<EOF
7681 #define $ac_tr_hdr 1
7682 EOF
7683  
7684 else
7685   echo "$ac_t""no" 1>&6
7686 fi
7687 done
7688
7689
7690 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
7691 echo "configure:7692: checking for uid_t in sys/types.h" >&5
7692 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
7693   echo $ac_n "(cached) $ac_c" 1>&6
7694 else
7695   cat > conftest.$ac_ext <<EOF
7696 #line 7697 "configure"
7697 #include "confdefs.h"
7698 #include <sys/types.h>
7699 EOF
7700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7701   egrep "uid_t" >/dev/null 2>&1; then
7702   rm -rf conftest*
7703   ac_cv_type_uid_t=yes
7704 else
7705   rm -rf conftest*
7706   ac_cv_type_uid_t=no
7707 fi
7708 rm -f conftest*
7709
7710 fi
7711
7712 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
7713 if test $ac_cv_type_uid_t = no; then
7714   cat >> confdefs.h <<\EOF
7715 #define uid_t int
7716 EOF
7717
7718   cat >> confdefs.h <<\EOF
7719 #define gid_t int
7720 EOF
7721
7722 fi
7723
7724 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
7725 echo "configure:7726: checking type of array argument to getgroups" >&5
7726 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
7727   echo $ac_n "(cached) $ac_c" 1>&6
7728 else
7729   if test "$cross_compiling" = yes; then
7730   ac_cv_type_getgroups=cross
7731 else
7732   cat > conftest.$ac_ext <<EOF
7733 #line 7734 "configure"
7734 #include "confdefs.h"
7735
7736 /* Thanks to Mike Rendell for this test.  */
7737 #include <sys/types.h>
7738 #define NGID 256
7739 #undef MAX
7740 #define MAX(x, y) ((x) > (y) ? (x) : (y))
7741 main()
7742 {
7743   gid_t gidset[NGID];
7744   int i, n;
7745   union { gid_t gval; long lval; }  val;
7746
7747   val.lval = -1;
7748   for (i = 0; i < NGID; i++)
7749     gidset[i] = val.gval;
7750   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
7751                  gidset);
7752   /* Exit non-zero if getgroups seems to require an array of ints.  This
7753      happens when gid_t is short but getgroups modifies an array of ints.  */
7754   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
7755 }
7756
7757 EOF
7758 if { (eval echo configure:7759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7759 then
7760     ac_cv_type_getgroups=gid_t
7761 else
7762   echo "configure: failed program was:" >&5
7763   cat conftest.$ac_ext >&5
7764   rm -fr conftest*
7765   ac_cv_type_getgroups=int
7766 fi
7767 rm -fr conftest*
7768 fi
7769
7770 if test $ac_cv_type_getgroups = cross; then
7771         cat > conftest.$ac_ext <<EOF
7772 #line 7773 "configure"
7773 #include "confdefs.h"
7774 #include <unistd.h>
7775 EOF
7776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7777   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
7778   rm -rf conftest*
7779   ac_cv_type_getgroups=gid_t
7780 else
7781   rm -rf conftest*
7782   ac_cv_type_getgroups=int
7783 fi
7784 rm -f conftest*
7785
7786 fi
7787 fi
7788
7789 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
7790 cat >> confdefs.h <<EOF
7791 #define GETGROUPS_T $ac_cv_type_getgroups
7792 EOF
7793
7794  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
7795 echo "configure:7796: checking for mode_t" >&5
7796 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
7797   echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7799   cat > conftest.$ac_ext <<EOF
7800 #line 7801 "configure"
7801 #include "confdefs.h"
7802 #include <sys/types.h>
7803 #if STDC_HEADERS
7804 #include <stdlib.h>
7805 #include <stddef.h>
7806 #endif
7807 EOF
7808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7809   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7810   rm -rf conftest*
7811   ac_cv_type_mode_t=yes
7812 else
7813   rm -rf conftest*
7814   ac_cv_type_mode_t=no
7815 fi
7816 rm -f conftest*
7817
7818 fi
7819 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
7820 if test $ac_cv_type_mode_t = no; then
7821   cat >> confdefs.h <<\EOF
7822 #define mode_t int
7823 EOF
7824
7825 fi
7826
7827 echo $ac_n "checking for off_t""... $ac_c" 1>&6
7828 echo "configure:7829: checking for off_t" >&5
7829 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
7830   echo $ac_n "(cached) $ac_c" 1>&6
7831 else
7832   cat > conftest.$ac_ext <<EOF
7833 #line 7834 "configure"
7834 #include "confdefs.h"
7835 #include <sys/types.h>
7836 #if STDC_HEADERS
7837 #include <stdlib.h>
7838 #include <stddef.h>
7839 #endif
7840 EOF
7841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7842   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7843   rm -rf conftest*
7844   ac_cv_type_off_t=yes
7845 else
7846   rm -rf conftest*
7847   ac_cv_type_off_t=no
7848 fi
7849 rm -f conftest*
7850
7851 fi
7852 echo "$ac_t""$ac_cv_type_off_t" 1>&6
7853 if test $ac_cv_type_off_t = no; then
7854   cat >> confdefs.h <<\EOF
7855 #define off_t long
7856 EOF
7857
7858 fi
7859
7860 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7861 echo "configure:7862: checking for pid_t" >&5
7862 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
7863   echo $ac_n "(cached) $ac_c" 1>&6
7864 else
7865   cat > conftest.$ac_ext <<EOF
7866 #line 7867 "configure"
7867 #include "confdefs.h"
7868 #include <sys/types.h>
7869 #if STDC_HEADERS
7870 #include <stdlib.h>
7871 #include <stddef.h>
7872 #endif
7873 EOF
7874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7875   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7876   rm -rf conftest*
7877   ac_cv_type_pid_t=yes
7878 else
7879   rm -rf conftest*
7880   ac_cv_type_pid_t=no
7881 fi
7882 rm -f conftest*
7883
7884 fi
7885 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
7886 if test $ac_cv_type_pid_t = no; then
7887   cat >> confdefs.h <<\EOF
7888 #define pid_t int
7889 EOF
7890
7891 fi
7892
7893 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
7894 echo "configure:7895: checking for ptrdiff_t" >&5
7895 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
7896   echo $ac_n "(cached) $ac_c" 1>&6
7897 else
7898   cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 #include <stddef.h>
7902 int main() {
7903 ptrdiff_t p
7904 ; return 0; }
7905 EOF
7906 if { (eval echo configure:7907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7907   rm -rf conftest*
7908   am_cv_type_ptrdiff_t=yes
7909 else
7910   echo "configure: failed program was:" >&5
7911   cat conftest.$ac_ext >&5
7912   rm -rf conftest*
7913   am_cv_type_ptrdiff_t=no
7914 fi
7915 rm -f conftest*
7916 fi
7917
7918 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
7919    if test $am_cv_type_ptrdiff_t = yes; then
7920      cat >> confdefs.h <<\EOF
7921 #define HAVE_PTRDIFF_T 1
7922 EOF
7923
7924    fi
7925
7926 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7927 echo "configure:7928: checking return type of signal handlers" >&5
7928 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7929   echo $ac_n "(cached) $ac_c" 1>&6
7930 else
7931   cat > conftest.$ac_ext <<EOF
7932 #line 7933 "configure"
7933 #include "confdefs.h"
7934 #include <sys/types.h>
7935 #include <signal.h>
7936 #ifdef signal
7937 #undef signal
7938 #endif
7939 #ifdef __cplusplus
7940 extern "C" void (*signal (int, void (*)(int)))(int);
7941 #else
7942 void (*signal ()) ();
7943 #endif
7944
7945 int main() {
7946 int i;
7947 ; return 0; }
7948 EOF
7949 if { (eval echo configure:7950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7950   rm -rf conftest*
7951   ac_cv_type_signal=void
7952 else
7953   echo "configure: failed program was:" >&5
7954   cat conftest.$ac_ext >&5
7955   rm -rf conftest*
7956   ac_cv_type_signal=int
7957 fi
7958 rm -f conftest*
7959 fi
7960
7961 echo "$ac_t""$ac_cv_type_signal" 1>&6
7962 cat >> confdefs.h <<EOF
7963 #define RETSIGTYPE $ac_cv_type_signal
7964 EOF
7965
7966
7967 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
7968 echo "configure:7969: checking for sig_atomic_t" >&5
7969 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
7970   echo $ac_n "(cached) $ac_c" 1>&6
7971 else
7972   cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975 #include <signal.h>
7976 int main() {
7977 sig_atomic_t atomic;
7978 ; return 0; }
7979 EOF
7980 if { (eval echo configure:7981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7981   rm -rf conftest*
7982   ol_cv_type_sig_atomic_t=yes
7983 else
7984   echo "configure: failed program was:" >&5
7985   cat conftest.$ac_ext >&5
7986   rm -rf conftest*
7987   ol_cv_type_sig_atomic_t=no
7988 fi
7989 rm -f conftest*
7990 fi
7991
7992 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
7993   if test $ol_cv_type_sig_atomic_t = no; then
7994     cat >> confdefs.h <<\EOF
7995 #define sig_atomic_t int
7996 EOF
7997
7998   fi
7999  
8000 echo $ac_n "checking for size_t""... $ac_c" 1>&6
8001 echo "configure:8002: checking for size_t" >&5
8002 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
8003   echo $ac_n "(cached) $ac_c" 1>&6
8004 else
8005   cat > conftest.$ac_ext <<EOF
8006 #line 8007 "configure"
8007 #include "confdefs.h"
8008 #include <sys/types.h>
8009 #if STDC_HEADERS
8010 #include <stdlib.h>
8011 #include <stddef.h>
8012 #endif
8013 EOF
8014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8015   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8016   rm -rf conftest*
8017   ac_cv_type_size_t=yes
8018 else
8019   rm -rf conftest*
8020   ac_cv_type_size_t=no
8021 fi
8022 rm -f conftest*
8023
8024 fi
8025 echo "$ac_t""$ac_cv_type_size_t" 1>&6
8026 if test $ac_cv_type_size_t = no; then
8027   cat >> confdefs.h <<\EOF
8028 #define size_t unsigned
8029 EOF
8030
8031 fi
8032
8033 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
8034 echo "configure:8035: checking for st_blksize in struct stat" >&5
8035 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
8036   echo $ac_n "(cached) $ac_c" 1>&6
8037 else
8038   cat > conftest.$ac_ext <<EOF
8039 #line 8040 "configure"
8040 #include "confdefs.h"
8041 #include <sys/types.h>
8042 #include <sys/stat.h>
8043 int main() {
8044 struct stat s; s.st_blksize;
8045 ; return 0; }
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8048   rm -rf conftest*
8049   ac_cv_struct_st_blksize=yes
8050 else
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -rf conftest*
8054   ac_cv_struct_st_blksize=no
8055 fi
8056 rm -f conftest*
8057 fi
8058
8059 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
8060 if test $ac_cv_struct_st_blksize = yes; then
8061   cat >> confdefs.h <<\EOF
8062 #define HAVE_ST_BLKSIZE 1
8063 EOF
8064
8065 fi
8066
8067 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
8068 echo "configure:8069: checking whether time.h and sys/time.h may both be included" >&5
8069 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
8070   echo $ac_n "(cached) $ac_c" 1>&6
8071 else
8072   cat > conftest.$ac_ext <<EOF
8073 #line 8074 "configure"
8074 #include "confdefs.h"
8075 #include <sys/types.h>
8076 #include <sys/time.h>
8077 #include <time.h>
8078 int main() {
8079 struct tm *tp;
8080 ; return 0; }
8081 EOF
8082 if { (eval echo configure:8083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8083   rm -rf conftest*
8084   ac_cv_header_time=yes
8085 else
8086   echo "configure: failed program was:" >&5
8087   cat conftest.$ac_ext >&5
8088   rm -rf conftest*
8089   ac_cv_header_time=no
8090 fi
8091 rm -f conftest*
8092 fi
8093
8094 echo "$ac_t""$ac_cv_header_time" 1>&6
8095 if test $ac_cv_header_time = yes; then
8096   cat >> confdefs.h <<\EOF
8097 #define TIME_WITH_SYS_TIME 1
8098 EOF
8099
8100 fi
8101
8102 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
8103 echo "configure:8104: checking whether struct tm is in sys/time.h or time.h" >&5
8104 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
8105   echo $ac_n "(cached) $ac_c" 1>&6
8106 else
8107   cat > conftest.$ac_ext <<EOF
8108 #line 8109 "configure"
8109 #include "confdefs.h"
8110 #include <sys/types.h>
8111 #include <time.h>
8112 int main() {
8113 struct tm *tp; tp->tm_sec;
8114 ; return 0; }
8115 EOF
8116 if { (eval echo configure:8117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8117   rm -rf conftest*
8118   ac_cv_struct_tm=time.h
8119 else
8120   echo "configure: failed program was:" >&5
8121   cat conftest.$ac_ext >&5
8122   rm -rf conftest*
8123   ac_cv_struct_tm=sys/time.h
8124 fi
8125 rm -f conftest*
8126 fi
8127
8128 echo "$ac_t""$ac_cv_struct_tm" 1>&6
8129 if test $ac_cv_struct_tm = sys/time.h; then
8130   cat >> confdefs.h <<\EOF
8131 #define TM_IN_SYS_TIME 1
8132 EOF
8133
8134 fi
8135
8136
8137
8138 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
8139 echo "configure:8140: checking if toupper() requires islower()" >&5
8140 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143   
8144         if test "$cross_compiling" = yes; then
8145   ol_cv_c_upper_lower=safe
8146 else
8147   cat > conftest.$ac_ext <<EOF
8148 #line 8149 "configure"
8149 #include "confdefs.h"
8150
8151 #include <ctype.h>
8152 main()
8153 {
8154         if ('C' == toupper('C'))
8155                 exit(0);
8156         else
8157                 exit(1);
8158 }
8159 EOF
8160 if { (eval echo configure:8161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8161 then
8162   ol_cv_c_upper_lower=no
8163 else
8164   echo "configure: failed program was:" >&5
8165   cat conftest.$ac_ext >&5
8166   rm -fr conftest*
8167   ol_cv_c_upper_lower=yes
8168 fi
8169 rm -fr conftest*
8170 fi
8171
8172 fi
8173
8174 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
8175 if test $ol_cv_c_upper_lower != no ; then
8176         cat >> confdefs.h <<\EOF
8177 #define C_UPPER_LOWER 1
8178 EOF
8179
8180 fi
8181
8182 echo $ac_n "checking for working const""... $ac_c" 1>&6
8183 echo "configure:8184: checking for working const" >&5
8184 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
8185   echo $ac_n "(cached) $ac_c" 1>&6
8186 else
8187   cat > conftest.$ac_ext <<EOF
8188 #line 8189 "configure"
8189 #include "confdefs.h"
8190
8191 int main() {
8192
8193 /* Ultrix mips cc rejects this.  */
8194 typedef int charset[2]; const charset x;
8195 /* SunOS 4.1.1 cc rejects this.  */
8196 char const *const *ccp;
8197 char **p;
8198 /* NEC SVR4.0.2 mips cc rejects this.  */
8199 struct point {int x, y;};
8200 static struct point const zero = {0,0};
8201 /* AIX XL C 1.02.0.0 rejects this.
8202    It does not let you subtract one const X* pointer from another in an arm
8203    of an if-expression whose if-part is not a constant expression */
8204 const char *g = "string";
8205 ccp = &g + (g ? g-g : 0);
8206 /* HPUX 7.0 cc rejects these. */
8207 ++ccp;
8208 p = (char**) ccp;
8209 ccp = (char const *const *) p;
8210 { /* SCO 3.2v4 cc rejects this.  */
8211   char *t;
8212   char const *s = 0 ? (char *) 0 : (char const *) 0;
8213
8214   *t++ = 0;
8215 }
8216 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8217   int x[] = {25, 17};
8218   const int *foo = &x[0];
8219   ++foo;
8220 }
8221 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8222   typedef const int *iptr;
8223   iptr p = 0;
8224   ++p;
8225 }
8226 { /* AIX XL C 1.02.0.0 rejects this saying
8227      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8228   struct s { int j; const int *ap[3]; };
8229   struct s *b; b->j = 5;
8230 }
8231 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8232   const int foo = 10;
8233 }
8234
8235 ; return 0; }
8236 EOF
8237 if { (eval echo configure:8238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8238   rm -rf conftest*
8239   ac_cv_c_const=yes
8240 else
8241   echo "configure: failed program was:" >&5
8242   cat conftest.$ac_ext >&5
8243   rm -rf conftest*
8244   ac_cv_c_const=no
8245 fi
8246 rm -f conftest*
8247 fi
8248
8249 echo "$ac_t""$ac_cv_c_const" 1>&6
8250 if test $ac_cv_c_const = no; then
8251   cat >> confdefs.h <<\EOF
8252 #define const 
8253 EOF
8254
8255 fi
8256
8257 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
8258 echo "configure:8259: checking if compiler understands volatile" >&5
8259 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
8260   echo $ac_n "(cached) $ac_c" 1>&6
8261 else
8262   cat > conftest.$ac_ext <<EOF
8263 #line 8264 "configure"
8264 #include "confdefs.h"
8265 int x, y, z;
8266 int main() {
8267 volatile int a; int * volatile b = x ? &y : &z;
8268       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
8269       *b = 0;
8270 ; return 0; }
8271 EOF
8272 if { (eval echo configure:8273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8273   rm -rf conftest*
8274   ol_cv_c_volatile=yes
8275 else
8276   echo "configure: failed program was:" >&5
8277   cat conftest.$ac_ext >&5
8278   rm -rf conftest*
8279   ol_cv_c_volatile=no
8280 fi
8281 rm -f conftest*
8282 fi
8283
8284 echo "$ac_t""$ol_cv_c_volatile" 1>&6
8285   if test $ol_cv_c_volatile = yes; then
8286     : 
8287   else
8288     cat >> confdefs.h <<\EOF
8289 #define volatile 
8290 EOF
8291
8292   fi
8293  
8294
8295 if test $cross_compiling = yes ; then
8296         cat >> confdefs.h <<\EOF
8297 #define CROSS_COMPILING 1
8298 EOF
8299
8300 else
8301         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
8302 echo "configure:8303: checking whether byte ordering is bigendian" >&5
8303 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
8304   echo $ac_n "(cached) $ac_c" 1>&6
8305 else
8306   ac_cv_c_bigendian=unknown
8307 # See if sys/param.h defines the BYTE_ORDER macro.
8308 cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 #include <sys/types.h>
8312 #include <sys/param.h>
8313 int main() {
8314
8315 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8316  bogus endian macros
8317 #endif
8318 ; return 0; }
8319 EOF
8320 if { (eval echo configure:8321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8321   rm -rf conftest*
8322   # It does; now see whether it defined to BIG_ENDIAN or not.
8323 cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 #include <sys/types.h>
8327 #include <sys/param.h>
8328 int main() {
8329
8330 #if BYTE_ORDER != BIG_ENDIAN
8331  not big endian
8332 #endif
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8336   rm -rf conftest*
8337   ac_cv_c_bigendian=yes
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   ac_cv_c_bigendian=no
8343 fi
8344 rm -f conftest*
8345 else
8346   echo "configure: failed program was:" >&5
8347   cat conftest.$ac_ext >&5
8348 fi
8349 rm -f conftest*
8350 if test $ac_cv_c_bigendian = unknown; then
8351 if test "$cross_compiling" = yes; then
8352     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8353 else
8354   cat > conftest.$ac_ext <<EOF
8355 #line 8356 "configure"
8356 #include "confdefs.h"
8357 main () {
8358   /* Are we little or big endian?  From Harbison&Steele.  */
8359   union
8360   {
8361     long l;
8362     char c[sizeof (long)];
8363   } u;
8364   u.l = 1;
8365   exit (u.c[sizeof (long) - 1] == 1);
8366 }
8367 EOF
8368 if { (eval echo configure:8369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8369 then
8370   ac_cv_c_bigendian=no
8371 else
8372   echo "configure: failed program was:" >&5
8373   cat conftest.$ac_ext >&5
8374   rm -fr conftest*
8375   ac_cv_c_bigendian=yes
8376 fi
8377 rm -fr conftest*
8378 fi
8379
8380 fi
8381 fi
8382
8383 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
8384 if test $ac_cv_c_bigendian = yes; then
8385   cat >> confdefs.h <<\EOF
8386 #define WORDS_BIGENDIAN 1
8387 EOF
8388
8389 fi
8390
8391         echo $ac_n "checking size of short""... $ac_c" 1>&6
8392 echo "configure:8393: checking size of short" >&5
8393 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
8394   echo $ac_n "(cached) $ac_c" 1>&6
8395 else
8396   if test "$cross_compiling" = yes; then
8397     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8398 else
8399   cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402 #include <stdio.h>
8403 main()
8404 {
8405   FILE *f=fopen("conftestval", "w");
8406   if (!f) exit(1);
8407   fprintf(f, "%d\n", sizeof(short));
8408   exit(0);
8409 }
8410 EOF
8411 if { (eval echo configure:8412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8412 then
8413   ac_cv_sizeof_short=`cat conftestval`
8414 else
8415   echo "configure: failed program was:" >&5
8416   cat conftest.$ac_ext >&5
8417   rm -fr conftest*
8418   ac_cv_sizeof_short=0
8419 fi
8420 rm -fr conftest*
8421 fi
8422
8423 fi
8424 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
8425 cat >> confdefs.h <<EOF
8426 #define SIZEOF_SHORT $ac_cv_sizeof_short
8427 EOF
8428
8429  
8430         echo $ac_n "checking size of int""... $ac_c" 1>&6
8431 echo "configure:8432: checking size of int" >&5
8432 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
8433   echo $ac_n "(cached) $ac_c" 1>&6
8434 else
8435   if test "$cross_compiling" = yes; then
8436     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8437 else
8438   cat > conftest.$ac_ext <<EOF
8439 #line 8440 "configure"
8440 #include "confdefs.h"
8441 #include <stdio.h>
8442 main()
8443 {
8444   FILE *f=fopen("conftestval", "w");
8445   if (!f) exit(1);
8446   fprintf(f, "%d\n", sizeof(int));
8447   exit(0);
8448 }
8449 EOF
8450 if { (eval echo configure:8451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8451 then
8452   ac_cv_sizeof_int=`cat conftestval`
8453 else
8454   echo "configure: failed program was:" >&5
8455   cat conftest.$ac_ext >&5
8456   rm -fr conftest*
8457   ac_cv_sizeof_int=0
8458 fi
8459 rm -fr conftest*
8460 fi
8461
8462 fi
8463 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
8464 cat >> confdefs.h <<EOF
8465 #define SIZEOF_INT $ac_cv_sizeof_int
8466 EOF
8467
8468  
8469         echo $ac_n "checking size of long""... $ac_c" 1>&6
8470 echo "configure:8471: checking size of long" >&5
8471 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
8472   echo $ac_n "(cached) $ac_c" 1>&6
8473 else
8474   if test "$cross_compiling" = yes; then
8475     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8476 else
8477   cat > conftest.$ac_ext <<EOF
8478 #line 8479 "configure"
8479 #include "confdefs.h"
8480 #include <stdio.h>
8481 main()
8482 {
8483   FILE *f=fopen("conftestval", "w");
8484   if (!f) exit(1);
8485   fprintf(f, "%d\n", sizeof(long));
8486   exit(0);
8487 }
8488 EOF
8489 if { (eval echo configure:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8490 then
8491   ac_cv_sizeof_long=`cat conftestval`
8492 else
8493   echo "configure: failed program was:" >&5
8494   cat conftest.$ac_ext >&5
8495   rm -fr conftest*
8496   ac_cv_sizeof_long=0
8497 fi
8498 rm -fr conftest*
8499 fi
8500
8501 fi
8502 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
8503 cat >> confdefs.h <<EOF
8504 #define SIZEOF_LONG $ac_cv_sizeof_long
8505 EOF
8506
8507
8508 fi
8509
8510 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
8511 echo "configure:8512: checking for 8-bit clean memcmp" >&5
8512 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
8513   echo $ac_n "(cached) $ac_c" 1>&6
8514 else
8515   if test "$cross_compiling" = yes; then
8516   ac_cv_func_memcmp_clean=no
8517 else
8518   cat > conftest.$ac_ext <<EOF
8519 #line 8520 "configure"
8520 #include "confdefs.h"
8521
8522 main()
8523 {
8524   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
8525   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
8526 }
8527
8528 EOF
8529 if { (eval echo configure:8530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8530 then
8531   ac_cv_func_memcmp_clean=yes
8532 else
8533   echo "configure: failed program was:" >&5
8534   cat conftest.$ac_ext >&5
8535   rm -fr conftest*
8536   ac_cv_func_memcmp_clean=no
8537 fi
8538 rm -fr conftest*
8539 fi
8540
8541 fi
8542
8543 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
8544 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
8545
8546 echo $ac_n "checking for strftime""... $ac_c" 1>&6
8547 echo "configure:8548: checking for strftime" >&5
8548 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
8549   echo $ac_n "(cached) $ac_c" 1>&6
8550 else
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* System header to define __stub macros and hopefully few prototypes,
8555     which can conflict with char strftime(); below.  */
8556 #include <assert.h>
8557 /* Override any gcc2 internal prototype to avoid an error.  */
8558 /* We use char because int might match the return type of a gcc2
8559     builtin and then its argument prototype would still apply.  */
8560 char strftime();
8561
8562 int main() {
8563
8564 /* The GNU C library defines this for functions which it implements
8565     to always fail with ENOSYS.  Some functions are actually named
8566     something starting with __ and the normal name is an alias.  */
8567 #if defined (__stub_strftime) || defined (__stub___strftime)
8568 choke me
8569 #else
8570 strftime();
8571 #endif
8572
8573 ; return 0; }
8574 EOF
8575 if { (eval echo configure:8576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8576   rm -rf conftest*
8577   eval "ac_cv_func_strftime=yes"
8578 else
8579   echo "configure: failed program was:" >&5
8580   cat conftest.$ac_ext >&5
8581   rm -rf conftest*
8582   eval "ac_cv_func_strftime=no"
8583 fi
8584 rm -f conftest*
8585 fi
8586
8587 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
8588   echo "$ac_t""yes" 1>&6
8589   cat >> confdefs.h <<\EOF
8590 #define HAVE_STRFTIME 1
8591 EOF
8592
8593 else
8594   echo "$ac_t""no" 1>&6
8595 # strftime is in -lintl on SCO UNIX.
8596 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
8597 echo "configure:8598: checking for strftime in -lintl" >&5
8598 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
8599 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8600   echo $ac_n "(cached) $ac_c" 1>&6
8601 else
8602   ac_save_LIBS="$LIBS"
8603 LIBS="-lintl  $LIBS"
8604 cat > conftest.$ac_ext <<EOF
8605 #line 8606 "configure"
8606 #include "confdefs.h"
8607 /* Override any gcc2 internal prototype to avoid an error.  */
8608 /* We use char because int might match the return type of a gcc2
8609     builtin and then its argument prototype would still apply.  */
8610 char strftime();
8611
8612 int main() {
8613 strftime()
8614 ; return 0; }
8615 EOF
8616 if { (eval echo configure:8617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8617   rm -rf conftest*
8618   eval "ac_cv_lib_$ac_lib_var=yes"
8619 else
8620   echo "configure: failed program was:" >&5
8621   cat conftest.$ac_ext >&5
8622   rm -rf conftest*
8623   eval "ac_cv_lib_$ac_lib_var=no"
8624 fi
8625 rm -f conftest*
8626 LIBS="$ac_save_LIBS"
8627
8628 fi
8629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8630   echo "$ac_t""yes" 1>&6
8631   cat >> confdefs.h <<\EOF
8632 #define HAVE_STRFTIME 1
8633 EOF
8634
8635 LIBS="-lintl $LIBS"
8636 else
8637   echo "$ac_t""no" 1>&6
8638 fi
8639
8640 fi
8641
8642 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
8643 echo "configure:8644: checking for vprintf" >&5
8644 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
8645   echo $ac_n "(cached) $ac_c" 1>&6
8646 else
8647   cat > conftest.$ac_ext <<EOF
8648 #line 8649 "configure"
8649 #include "confdefs.h"
8650 /* System header to define __stub macros and hopefully few prototypes,
8651     which can conflict with char vprintf(); below.  */
8652 #include <assert.h>
8653 /* Override any gcc2 internal prototype to avoid an error.  */
8654 /* We use char because int might match the return type of a gcc2
8655     builtin and then its argument prototype would still apply.  */
8656 char vprintf();
8657
8658 int main() {
8659
8660 /* The GNU C library defines this for functions which it implements
8661     to always fail with ENOSYS.  Some functions are actually named
8662     something starting with __ and the normal name is an alias.  */
8663 #if defined (__stub_vprintf) || defined (__stub___vprintf)
8664 choke me
8665 #else
8666 vprintf();
8667 #endif
8668
8669 ; return 0; }
8670 EOF
8671 if { (eval echo configure:8672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8672   rm -rf conftest*
8673   eval "ac_cv_func_vprintf=yes"
8674 else
8675   echo "configure: failed program was:" >&5
8676   cat conftest.$ac_ext >&5
8677   rm -rf conftest*
8678   eval "ac_cv_func_vprintf=no"
8679 fi
8680 rm -f conftest*
8681 fi
8682
8683 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
8684   echo "$ac_t""yes" 1>&6
8685   cat >> confdefs.h <<\EOF
8686 #define HAVE_VPRINTF 1
8687 EOF
8688
8689 else
8690   echo "$ac_t""no" 1>&6
8691 fi
8692
8693 if test "$ac_cv_func_vprintf" != yes; then
8694 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
8695 echo "configure:8696: checking for _doprnt" >&5
8696 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
8697   echo $ac_n "(cached) $ac_c" 1>&6
8698 else
8699   cat > conftest.$ac_ext <<EOF
8700 #line 8701 "configure"
8701 #include "confdefs.h"
8702 /* System header to define __stub macros and hopefully few prototypes,
8703     which can conflict with char _doprnt(); below.  */
8704 #include <assert.h>
8705 /* Override any gcc2 internal prototype to avoid an error.  */
8706 /* We use char because int might match the return type of a gcc2
8707     builtin and then its argument prototype would still apply.  */
8708 char _doprnt();
8709
8710 int main() {
8711
8712 /* The GNU C library defines this for functions which it implements
8713     to always fail with ENOSYS.  Some functions are actually named
8714     something starting with __ and the normal name is an alias.  */
8715 #if defined (__stub__doprnt) || defined (__stub____doprnt)
8716 choke me
8717 #else
8718 _doprnt();
8719 #endif
8720
8721 ; return 0; }
8722 EOF
8723 if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8724   rm -rf conftest*
8725   eval "ac_cv_func__doprnt=yes"
8726 else
8727   echo "configure: failed program was:" >&5
8728   cat conftest.$ac_ext >&5
8729   rm -rf conftest*
8730   eval "ac_cv_func__doprnt=no"
8731 fi
8732 rm -f conftest*
8733 fi
8734
8735 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
8736   echo "$ac_t""yes" 1>&6
8737   cat >> confdefs.h <<\EOF
8738 #define HAVE_DOPRNT 1
8739 EOF
8740
8741 else
8742   echo "$ac_t""no" 1>&6
8743 fi
8744
8745 fi
8746
8747
8748 if test $ac_cv_func_vprintf = yes ; then
8749                 for ac_func in vsnprintf vsprintf
8750 do
8751 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8752 echo "configure:8753: checking for $ac_func" >&5
8753 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8754   echo $ac_n "(cached) $ac_c" 1>&6
8755 else
8756   cat > conftest.$ac_ext <<EOF
8757 #line 8758 "configure"
8758 #include "confdefs.h"
8759 /* System header to define __stub macros and hopefully few prototypes,
8760     which can conflict with char $ac_func(); below.  */
8761 #include <assert.h>
8762 /* Override any gcc2 internal prototype to avoid an error.  */
8763 /* We use char because int might match the return type of a gcc2
8764     builtin and then its argument prototype would still apply.  */
8765 char $ac_func();
8766
8767 int main() {
8768
8769 /* The GNU C library defines this for functions which it implements
8770     to always fail with ENOSYS.  Some functions are actually named
8771     something starting with __ and the normal name is an alias.  */
8772 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8773 choke me
8774 #else
8775 $ac_func();
8776 #endif
8777
8778 ; return 0; }
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8781   rm -rf conftest*
8782   eval "ac_cv_func_$ac_func=yes"
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -rf conftest*
8787   eval "ac_cv_func_$ac_func=no"
8788 fi
8789 rm -f conftest*
8790 fi
8791
8792 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8793   echo "$ac_t""yes" 1>&6
8794     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8795   cat >> confdefs.h <<EOF
8796 #define $ac_tr_func 1
8797 EOF
8798  
8799 else
8800   echo "$ac_t""no" 1>&6
8801 fi
8802 done
8803
8804 fi
8805
8806 for ac_func in \
8807         bcopy                   \
8808         flock                   \
8809         getdtablesize   \
8810         gethostname             \
8811         getpwuid                \
8812         gettimeofday    \
8813         lockf                   \
8814         memcpy                  \
8815         memmove                 \
8816         mkstemp                 \
8817         select                  \
8818         setpwfile               \
8819         setsid                  \
8820         signal                  \
8821         sigset                  \
8822         snprintf                \
8823         socket                  \
8824         strdup                  \
8825         strerror                \
8826         strpbrk                 \
8827         strrchr                 \
8828         strsep                  \
8829         strstr                  \
8830         strtok                  \
8831         strtol                  \
8832         strtoul                 \
8833         strspn                  \
8834         sysconf                 \
8835         waitpid                 \
8836
8837 do
8838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8839 echo "configure:8840: checking for $ac_func" >&5
8840 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8841   echo $ac_n "(cached) $ac_c" 1>&6
8842 else
8843   cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846 /* System header to define __stub macros and hopefully few prototypes,
8847     which can conflict with char $ac_func(); below.  */
8848 #include <assert.h>
8849 /* Override any gcc2 internal prototype to avoid an error.  */
8850 /* We use char because int might match the return type of a gcc2
8851     builtin and then its argument prototype would still apply.  */
8852 char $ac_func();
8853
8854 int main() {
8855
8856 /* The GNU C library defines this for functions which it implements
8857     to always fail with ENOSYS.  Some functions are actually named
8858     something starting with __ and the normal name is an alias.  */
8859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8860 choke me
8861 #else
8862 $ac_func();
8863 #endif
8864
8865 ; return 0; }
8866 EOF
8867 if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8868   rm -rf conftest*
8869   eval "ac_cv_func_$ac_func=yes"
8870 else
8871   echo "configure: failed program was:" >&5
8872   cat conftest.$ac_ext >&5
8873   rm -rf conftest*
8874   eval "ac_cv_func_$ac_func=no"
8875 fi
8876 rm -f conftest*
8877 fi
8878
8879 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8880   echo "$ac_t""yes" 1>&6
8881     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8882   cat >> confdefs.h <<EOF
8883 #define $ac_tr_func 1
8884 EOF
8885  
8886 else
8887   echo "$ac_t""no" 1>&6
8888 fi
8889 done
8890
8891
8892 # these functions are required to build a thread_safe -lldap
8893 for ac_func in \
8894         strtok_r                \
8895         ctime_r                 \
8896         gethostbyaddr_r \
8897         gethostbyname_r \
8898
8899 do
8900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8901 echo "configure:8902: checking for $ac_func" >&5
8902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8903   echo $ac_n "(cached) $ac_c" 1>&6
8904 else
8905   cat > conftest.$ac_ext <<EOF
8906 #line 8907 "configure"
8907 #include "confdefs.h"
8908 /* System header to define __stub macros and hopefully few prototypes,
8909     which can conflict with char $ac_func(); below.  */
8910 #include <assert.h>
8911 /* Override any gcc2 internal prototype to avoid an error.  */
8912 /* We use char because int might match the return type of a gcc2
8913     builtin and then its argument prototype would still apply.  */
8914 char $ac_func();
8915
8916 int main() {
8917
8918 /* The GNU C library defines this for functions which it implements
8919     to always fail with ENOSYS.  Some functions are actually named
8920     something starting with __ and the normal name is an alias.  */
8921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8922 choke me
8923 #else
8924 $ac_func();
8925 #endif
8926
8927 ; return 0; }
8928 EOF
8929 if { (eval echo configure:8930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8930   rm -rf conftest*
8931   eval "ac_cv_func_$ac_func=yes"
8932 else
8933   echo "configure: failed program was:" >&5
8934   cat conftest.$ac_ext >&5
8935   rm -rf conftest*
8936   eval "ac_cv_func_$ac_func=no"
8937 fi
8938 rm -f conftest*
8939 fi
8940
8941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8942   echo "$ac_t""yes" 1>&6
8943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8944   cat >> confdefs.h <<EOF
8945 #define $ac_tr_func 1
8946 EOF
8947  
8948 else
8949   echo "$ac_t""no" 1>&6
8950 fi
8951 done
8952
8953
8954 if test "$ac_cv_func_ctime_r" = yes ; then
8955         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
8956 echo "configure:8957: checking number of arguments of ctime_r" >&5
8957 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   cat > conftest.$ac_ext <<EOF
8961 #line 8962 "configure"
8962 #include "confdefs.h"
8963 #include <time.h>
8964 int main() {
8965 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
8966 ; return 0; }
8967 EOF
8968 if { (eval echo configure:8969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8969   rm -rf conftest*
8970   ol_cv_func_ctime_r_nargs=3
8971 else
8972   echo "configure: failed program was:" >&5
8973   cat conftest.$ac_ext >&5
8974   rm -rf conftest*
8975   ol_cv_func_ctime_r_nargs=0
8976 fi
8977 rm -f conftest*
8978                 if test $ol_cv_func_ctime_r_nargs = 0 ; then
8979                         cat > conftest.$ac_ext <<EOF
8980 #line 8981 "configure"
8981 #include "confdefs.h"
8982 #include <time.h>
8983 int main() {
8984 time_t ti; char *buffer;
8985                                         ctime_r(&ti,buffer);
8986 ; return 0; }
8987 EOF
8988 if { (eval echo configure:8989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8989   rm -rf conftest*
8990   ol_cv_func_ctime_r_nargs=2
8991 else
8992   echo "configure: failed program was:" >&5
8993   cat conftest.$ac_ext >&5
8994   rm -rf conftest*
8995   ol_cv_func_ctime_r_nargs=0
8996 fi
8997 rm -f conftest*
8998                 fi
8999         
9000 fi
9001
9002 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
9003   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
9004     cat >> confdefs.h <<EOF
9005 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
9006 EOF
9007
9008   fi
9009
9010 else
9011         ol_cv_func_ctime_r=0
9012 fi
9013
9014 if test "$ac_cv_func_strtok_r" = yes \
9015         -a "$ac_cv_func_ctime_r" = yes \
9016         -a "$ol_cv_func_ctime_r_nargs" -ge 2 -a "$ol_cv_func_ctime_r_nargs" -le 3 \
9017         -a "$ac_cv_func_gethostbyaddr_r" = yes \
9018         -a "$ac_cv_func_gethostbyname_r" = yes \
9019         ; then
9020
9021         cat >> confdefs.h <<\EOF
9022 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
9023 EOF
9024
9025 fi
9026
9027 if test $ol_link_threads != no ; then
9028         cat >> confdefs.h <<\EOF
9029 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
9030 EOF
9031
9032 fi
9033
9034 for ac_func in getopt tempnam
9035 do
9036 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9037 echo "configure:9038: checking for $ac_func" >&5
9038 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9039   echo $ac_n "(cached) $ac_c" 1>&6
9040 else
9041   cat > conftest.$ac_ext <<EOF
9042 #line 9043 "configure"
9043 #include "confdefs.h"
9044 /* System header to define __stub macros and hopefully few prototypes,
9045     which can conflict with char $ac_func(); below.  */
9046 #include <assert.h>
9047 /* Override any gcc2 internal prototype to avoid an error.  */
9048 /* We use char because int might match the return type of a gcc2
9049     builtin and then its argument prototype would still apply.  */
9050 char $ac_func();
9051
9052 int main() {
9053
9054 /* The GNU C library defines this for functions which it implements
9055     to always fail with ENOSYS.  Some functions are actually named
9056     something starting with __ and the normal name is an alias.  */
9057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9058 choke me
9059 #else
9060 $ac_func();
9061 #endif
9062
9063 ; return 0; }
9064 EOF
9065 if { (eval echo configure:9066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9066   rm -rf conftest*
9067   eval "ac_cv_func_$ac_func=yes"
9068 else
9069   echo "configure: failed program was:" >&5
9070   cat conftest.$ac_ext >&5
9071   rm -rf conftest*
9072   eval "ac_cv_func_$ac_func=no"
9073 fi
9074 rm -f conftest*
9075 fi
9076
9077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9078   echo "$ac_t""yes" 1>&6
9079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9080   cat >> confdefs.h <<EOF
9081 #define $ac_tr_func 1
9082 EOF
9083  
9084 else
9085   echo "$ac_t""no" 1>&6
9086 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
9087 fi
9088 done
9089
9090
9091
9092 # Check Configuration
9093
9094 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9095 echo "configure:9096: checking declaration of sys_errlist" >&5
9096 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
9097   echo $ac_n "(cached) $ac_c" 1>&6
9098 else
9099   
9100         cat > conftest.$ac_ext <<EOF
9101 #line 9102 "configure"
9102 #include "confdefs.h"
9103
9104 #include <stdio.h>
9105 #include <sys/types.h>
9106 #include <errno.h> 
9107 int main() {
9108 char *c = (char *) *sys_errlist
9109 ; return 0; }
9110 EOF
9111 if { (eval echo configure:9112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9112   rm -rf conftest*
9113   ol_cv_dcl_sys_errlist=yes
9114 else
9115   echo "configure: failed program was:" >&5
9116   cat conftest.$ac_ext >&5
9117   rm -rf conftest*
9118   ol_cv_dcl_sys_errlist=no
9119 fi
9120 rm -f conftest*
9121 fi
9122
9123 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9124
9125 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9126 if test $ol_cv_dcl_sys_errlist = no ; then
9127         cat >> confdefs.h <<\EOF
9128 #define DECL_SYS_ERRLIST 1
9129 EOF
9130
9131         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9132 echo "configure:9133: checking existence of sys_errlist" >&5
9133         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
9134   echo $ac_n "(cached) $ac_c" 1>&6
9135 else
9136   
9137                 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 #include <errno.h>
9141 int main() {
9142 char *c = (char *) *sys_errlist
9143 ; return 0; }
9144 EOF
9145 if { (eval echo configure:9146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9146   rm -rf conftest*
9147   ol_cv_have_sys_errlist=yes
9148 else
9149   echo "configure: failed program was:" >&5
9150   cat conftest.$ac_ext >&5
9151   rm -rf conftest*
9152   ol_cv_have_sys_errlist=no
9153 fi
9154 rm -f conftest*
9155 fi
9156
9157         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9158 fi
9159
9160
9161
9162 if test "$ol_enable_debug" != no ; then
9163         cat >> confdefs.h <<\EOF
9164 #define LDAP_DEBUG 1
9165 EOF
9166
9167 fi
9168 if test "$ol_enable_syslog" = yes ; then
9169         cat >> confdefs.h <<\EOF
9170 #define LDAP_SYSLOG 1
9171 EOF
9172
9173 fi
9174 if test "$ol_enable_libui" = yes ; then
9175         cat >> confdefs.h <<\EOF
9176 #define LDAP_LIBUI 1
9177 EOF
9178
9179 fi
9180 if test "$ol_enable_cache" = no ; then
9181         cat >> confdefs.h <<\EOF
9182 #define LDAP_NOCACHE 1
9183 EOF
9184
9185 fi
9186 if test "$ol_enable_dns" != no ; then
9187         cat >> confdefs.h <<\EOF
9188 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
9189 EOF
9190
9191 fi
9192 if test "$ol_enable_proctitle" != no ; then
9193         cat >> confdefs.h <<\EOF
9194 #define LDAP_PROCTITLE 1
9195 EOF
9196
9197 fi
9198 if test "$ol_enable_referrals" != no ; then
9199         cat >> confdefs.h <<\EOF
9200 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
9201 EOF
9202
9203 fi
9204 if test "$ol_enable_cldap" != no ; then
9205         cat >> confdefs.h <<\EOF
9206 #define LDAP_CONNECTIONLESS 1
9207 EOF
9208
9209 fi
9210
9211 if test "$ol_enable_aclgroups" != no ; then
9212         cat >> confdefs.h <<\EOF
9213 #define SLAPD_ACLGROUPS 1
9214 EOF
9215
9216 fi
9217 if test "$ol_enable_crypt" != no ; then
9218         cat >> confdefs.h <<\EOF
9219 #define SLAPD_CRYPT 1
9220 EOF
9221
9222 fi
9223 if test "$ol_enable_cleartext" != no ; then
9224         cat >> confdefs.h <<\EOF
9225 #define SLAPD_CLEARTEXT 1
9226 EOF
9227
9228 fi
9229 if test "$ol_enable_phonetic" != no ; then
9230         cat >> confdefs.h <<\EOF
9231 #define SLAPD_PHONETIC 1
9232 EOF
9233
9234 fi
9235 if test "$ol_enable_rlookups" != no ; then
9236         cat >> confdefs.h <<\EOF
9237 #define SLAPD_RLOOKUPS 1
9238 EOF
9239
9240 fi
9241
9242 if test "$ol_link_bdb2" != no ; then
9243         cat >> confdefs.h <<\EOF
9244 #define SLAPD_BDB2 1
9245 EOF
9246
9247         BUILD_SLAPD=yes
9248         BUILD_BDB2=yes
9249 fi
9250
9251 if test "$ol_link_ldbm" != no ; then
9252         cat >> confdefs.h <<\EOF
9253 #define SLAPD_LDBM 1
9254 EOF
9255
9256         BUILD_SLAPD=yes
9257         BUILD_LDBM=yes
9258 fi
9259
9260 if test "$ol_enable_passwd" != no ; then
9261         cat >> confdefs.h <<\EOF
9262 #define SLAPD_PASSWD 1
9263 EOF
9264
9265         BUILD_SLAPD=yes
9266         BUILD_PASSWD=yes
9267 fi
9268
9269 if test "$ol_enable_perl" != no ; then
9270         cat >> confdefs.h <<\EOF
9271 #define SLAPD_PERL 1
9272 EOF
9273
9274         BUILD_SLAPD=yes
9275         BUILD_PERL=yes
9276 fi
9277
9278 if test "$ol_enable_shell" != no ; then
9279         cat >> confdefs.h <<\EOF
9280 #define SLAPD_SHELL 1
9281 EOF
9282
9283         BUILD_SLAPD=yes
9284         BUILD_SHELL=yes
9285 fi
9286
9287 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
9288         $BUILD_SLAPD = yes ; then
9289         BUILD_SLURPD=yes
9290 fi
9291
9292 if test "$ol_link_isode" != no ; then
9293         BUILD_LDAPD=yes
9294 fi
9295
9296
9297
9298
9299   
9300   
9301   
9302   
9303   
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321 trap '' 1 2 15
9322 cat > confcache <<\EOF
9323 # This file is a shell script that caches the results of configure
9324 # tests run on this system so they can be shared between configure
9325 # scripts and configure runs.  It is not useful on other systems.
9326 # If it contains results you don't want to keep, you may remove or edit it.
9327 #
9328 # By default, configure uses ./config.cache as the cache file,
9329 # creating it if it does not exist already.  You can give configure
9330 # the --cache-file=FILE option to use a different cache file; that is
9331 # what configure does when it calls configure scripts in
9332 # subdirectories, so they share the cache.
9333 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9334 # config.status only pays attention to the cache file if you give it the
9335 # --recheck option to rerun configure.
9336 #
9337 EOF
9338 # The following way of writing the cache mishandles newlines in values,
9339 # but we know of no workaround that is simple, portable, and efficient.
9340 # So, don't put newlines in cache variables' values.
9341 # Ultrix sh set writes to stderr and can't be redirected directly,
9342 # and sets the high bit in the cache file unless we assign to the vars.
9343 (set) 2>&1 |
9344   case `(ac_space=' '; set | grep ac_space) 2>&1` in
9345   *ac_space=\ *)
9346     # `set' does not quote correctly, so add quotes (double-quote substitution
9347     # turns \\\\ into \\, and sed turns \\ into \).
9348     sed -n \
9349       -e "s/'/'\\\\''/g" \
9350       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9351     ;;
9352   *)
9353     # `set' quotes correctly as required by POSIX, so do not add quotes.
9354     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9355     ;;
9356   esac >> confcache
9357 if cmp -s $cache_file confcache; then
9358   :
9359 else
9360   if test -w $cache_file; then
9361     echo "updating cache $cache_file"
9362     cat confcache > $cache_file
9363   else
9364     echo "not updating unwritable cache $cache_file"
9365   fi
9366 fi
9367 rm -f confcache
9368
9369 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9370
9371 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9372 # Let make expand exec_prefix.
9373 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9374
9375 # Any assignment to VPATH causes Sun make to only execute
9376 # the first set of double-colon rules, so remove it if not needed.
9377 # If there is a colon in the path, we need to keep it.
9378 if test "x$srcdir" = x.; then
9379   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
9380 fi
9381
9382 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9383
9384 DEFS=-DHAVE_CONFIG_H
9385
9386 # Without the "./", some shells look in PATH for config.status.
9387 : ${CONFIG_STATUS=./config.status}
9388
9389 echo creating $CONFIG_STATUS
9390 rm -f $CONFIG_STATUS
9391 cat > $CONFIG_STATUS <<EOF
9392 #! /bin/sh
9393 # Generated automatically by configure.
9394 # Run this file to recreate the current configuration.
9395 # This directory was configured as follows,
9396 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9397 #
9398 # $0 $ac_configure_args
9399 #
9400 # Compiler output produced by configure, useful for debugging
9401 # configure, is in ./config.log if it exists.
9402
9403 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9404 for ac_option
9405 do
9406   case "\$ac_option" in
9407   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9408     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9409     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9410   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9411     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9412     exit 0 ;;
9413   -help | --help | --hel | --he | --h)
9414     echo "\$ac_cs_usage"; exit 0 ;;
9415   *) echo "\$ac_cs_usage"; exit 1 ;;
9416   esac
9417 done
9418
9419 ac_given_srcdir=$srcdir
9420 ac_given_INSTALL="$INSTALL"
9421
9422 trap 'rm -fr `echo "\
9423 Makefile:build/top.mk:Makefile.in:build/dir.mk \
9424 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
9425 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
9426 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
9427 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
9428 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
9429 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
9430 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
9431 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
9432 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
9433 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
9434 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
9435 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
9436 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
9437 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
9438 include/Makefile:build/top.mk:include/Makefile.in \
9439 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
9440 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
9441 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9442 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9443 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
9444 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
9445 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
9446 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
9447 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
9448 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
9449 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
9450 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
9451 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
9452 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
9453 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
9454 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
9455 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
9456 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
9457 tests/Makefile:build/top.mk:tests/Makefile.in \
9458  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9459 EOF
9460 cat >> $CONFIG_STATUS <<EOF
9461
9462 # Protect against being on the right side of a sed subst in config.status.
9463 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9464  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9465 $ac_vpsub
9466 $extrasub
9467 s%@SHELL@%$SHELL%g
9468 s%@CFLAGS@%$CFLAGS%g
9469 s%@CPPFLAGS@%$CPPFLAGS%g
9470 s%@CXXFLAGS@%$CXXFLAGS%g
9471 s%@FFLAGS@%$FFLAGS%g
9472 s%@DEFS@%$DEFS%g
9473 s%@LDFLAGS@%$LDFLAGS%g
9474 s%@LIBS@%$LIBS%g
9475 s%@exec_prefix@%$exec_prefix%g
9476 s%@prefix@%$prefix%g
9477 s%@program_transform_name@%$program_transform_name%g
9478 s%@bindir@%$bindir%g
9479 s%@sbindir@%$sbindir%g
9480 s%@libexecdir@%$libexecdir%g
9481 s%@datadir@%$datadir%g
9482 s%@sysconfdir@%$sysconfdir%g
9483 s%@sharedstatedir@%$sharedstatedir%g
9484 s%@localstatedir@%$localstatedir%g
9485 s%@libdir@%$libdir%g
9486 s%@includedir@%$includedir%g
9487 s%@oldincludedir@%$oldincludedir%g
9488 s%@infodir@%$infodir%g
9489 s%@mandir@%$mandir%g
9490 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9491 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9492 s%@INSTALL_DATA@%$INSTALL_DATA%g
9493 s%@PACKAGE@%$PACKAGE%g
9494 s%@VERSION@%$VERSION%g
9495 s%@ACLOCAL@%$ACLOCAL%g
9496 s%@AUTOCONF@%$AUTOCONF%g
9497 s%@AUTOMAKE@%$AUTOMAKE%g
9498 s%@AUTOHEADER@%$AUTOHEADER%g
9499 s%@MAKEINFO@%$MAKEINFO%g
9500 s%@SET_MAKE@%$SET_MAKE%g
9501 s%@top_builddir@%$top_builddir%g
9502 s%@ldap_subdir@%$ldap_subdir%g
9503 s%@host@%$host%g
9504 s%@host_alias@%$host_alias%g
9505 s%@host_cpu@%$host_cpu%g
9506 s%@host_vendor@%$host_vendor%g
9507 s%@host_os@%$host_os%g
9508 s%@RANLIB@%$RANLIB%g
9509 s%@CC@%$CC%g
9510 s%@LD@%$LD%g
9511 s%@NM@%$NM%g
9512 s%@LN_S@%$LN_S%g
9513 s%@LIBTOOL@%$LIBTOOL%g
9514 s%@AWK@%$AWK%g
9515 s%@SENDMAIL@%$SENDMAIL%g
9516 s%@EDITOR@%$EDITOR%g
9517 s%@FINGER@%$FINGER%g
9518 s%@PERLBIN@%$PERLBIN%g
9519 s%@CPP@%$CPP%g
9520 s%@EXEEXT@%$EXEEXT%g
9521 s%@OBJEXT@%$OBJEXT%g
9522 s%@PEPSY@%$PEPSY%g
9523 s%@LIBOBJS@%$LIBOBJS%g
9524 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
9525 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
9526 s%@BUILD_BDB2@%$BUILD_BDB2%g
9527 s%@BUILD_LDBM@%$BUILD_LDBM%g
9528 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
9529 s%@BUILD_PERL@%$BUILD_PERL%g
9530 s%@BUILD_SHELL@%$BUILD_SHELL%g
9531 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
9532 s%@LDAP_LIBS@%$LDAP_LIBS%g
9533 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
9534 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
9535 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
9536 s%@LDBM_LIBS@%$LDBM_LIBS%g
9537 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
9538 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
9539 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
9540 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
9541 s%@KRB_LIBS@%$KRB_LIBS%g
9542 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
9543
9544 CEOF
9545 EOF
9546
9547 cat >> $CONFIG_STATUS <<\EOF
9548
9549 # Split the substitutions into bite-sized pieces for seds with
9550 # small command number limits, like on Digital OSF/1 and HP-UX.
9551 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9552 ac_file=1 # Number of current file.
9553 ac_beg=1 # First line for current file.
9554 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9555 ac_more_lines=:
9556 ac_sed_cmds=""
9557 while $ac_more_lines; do
9558   if test $ac_beg -gt 1; then
9559     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9560   else
9561     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9562   fi
9563   if test ! -s conftest.s$ac_file; then
9564     ac_more_lines=false
9565     rm -f conftest.s$ac_file
9566   else
9567     if test -z "$ac_sed_cmds"; then
9568       ac_sed_cmds="sed -f conftest.s$ac_file"
9569     else
9570       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9571     fi
9572     ac_file=`expr $ac_file + 1`
9573     ac_beg=$ac_end
9574     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9575   fi
9576 done
9577 if test -z "$ac_sed_cmds"; then
9578   ac_sed_cmds=cat
9579 fi
9580 EOF
9581
9582 cat >> $CONFIG_STATUS <<EOF
9583
9584 CONFIG_FILES=\${CONFIG_FILES-"\
9585 Makefile:build/top.mk:Makefile.in:build/dir.mk \
9586 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
9587 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
9588 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
9589 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
9590 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
9591 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
9592 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
9593 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
9594 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
9595 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
9596 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
9597 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
9598 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
9599 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
9600 include/Makefile:build/top.mk:include/Makefile.in \
9601 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
9602 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
9603 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9604 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9605 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
9606 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
9607 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
9608 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
9609 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
9610 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
9611 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
9612 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
9613 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
9614 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
9615 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
9616 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
9617 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
9618 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
9619 tests/Makefile:build/top.mk:tests/Makefile.in \
9620 "}
9621 EOF
9622 cat >> $CONFIG_STATUS <<\EOF
9623 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9624   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9625   case "$ac_file" in
9626   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9627        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9628   *) ac_file_in="${ac_file}.in" ;;
9629   esac
9630
9631   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9632
9633   # Remove last slash and all that follows it.  Not all systems have dirname.
9634   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9635   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9636     # The file is in a subdirectory.
9637     test ! -d "$ac_dir" && mkdir "$ac_dir"
9638     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9639     # A "../" for each directory in $ac_dir_suffix.
9640     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9641   else
9642     ac_dir_suffix= ac_dots=
9643   fi
9644
9645   case "$ac_given_srcdir" in
9646   .)  srcdir=.
9647       if test -z "$ac_dots"; then top_srcdir=.
9648       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9649   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9650   *) # Relative path.
9651     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9652     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9653   esac
9654
9655   case "$ac_given_INSTALL" in
9656   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9657   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9658   esac
9659
9660   echo creating "$ac_file"
9661   rm -f "$ac_file"
9662   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9663   case "$ac_file" in
9664   *Makefile*) ac_comsub="1i\\
9665 # $configure_input" ;;
9666   *) ac_comsub= ;;
9667   esac
9668
9669   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9670   sed -e "$ac_comsub
9671 s%@configure_input@%$configure_input%g
9672 s%@srcdir@%$srcdir%g
9673 s%@top_srcdir@%$top_srcdir%g
9674 s%@INSTALL@%$INSTALL%g
9675 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9676 fi; done
9677 rm -f conftest.s*
9678
9679 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9680 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9681 #
9682 # ac_d sets the value in "#define NAME VALUE" lines.
9683 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9684 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9685 ac_dC='\3'
9686 ac_dD='%g'
9687 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9688 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9689 ac_uB='\([      ]\)%\1#\2define\3'
9690 ac_uC=' '
9691 ac_uD='\4%g'
9692 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9693 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9694 ac_eB='$%\1#\2define\3'
9695 ac_eC=' '
9696 ac_eD='%g'
9697
9698 if test "${CONFIG_HEADERS+set}" != set; then
9699 EOF
9700 cat >> $CONFIG_STATUS <<EOF
9701   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
9702 EOF
9703 cat >> $CONFIG_STATUS <<\EOF
9704 fi
9705 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9706   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9707   case "$ac_file" in
9708   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9709        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9710   *) ac_file_in="${ac_file}.in" ;;
9711   esac
9712
9713   echo creating $ac_file
9714
9715   rm -f conftest.frag conftest.in conftest.out
9716   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9717   cat $ac_file_inputs > conftest.in
9718
9719 EOF
9720
9721 # Transform confdefs.h into a sed script conftest.vals that substitutes
9722 # the proper values into config.h.in to produce config.h.  And first:
9723 # Protect against being on the right side of a sed subst in config.status.
9724 # Protect against being in an unquoted here document in config.status.
9725 rm -f conftest.vals
9726 cat > conftest.hdr <<\EOF
9727 s/[\\&%]/\\&/g
9728 s%[\\$`]%\\&%g
9729 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9730 s%ac_d%ac_u%gp
9731 s%ac_u%ac_e%gp
9732 EOF
9733 sed -n -f conftest.hdr confdefs.h > conftest.vals
9734 rm -f conftest.hdr
9735
9736 # This sed command replaces #undef with comments.  This is necessary, for
9737 # example, in the case of _POSIX_SOURCE, which is predefined and required
9738 # on some systems where configure will not decide to define it.
9739 cat >> conftest.vals <<\EOF
9740 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9741 EOF
9742
9743 # Break up conftest.vals because some shells have a limit on
9744 # the size of here documents, and old seds have small limits too.
9745
9746 rm -f conftest.tail
9747 while :
9748 do
9749   ac_lines=`grep -c . conftest.vals`
9750   # grep -c gives empty output for an empty file on some AIX systems.
9751   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9752   # Write a limited-size here document to conftest.frag.
9753   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9754   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9755   echo 'CEOF
9756   sed -f conftest.frag conftest.in > conftest.out
9757   rm -f conftest.in
9758   mv conftest.out conftest.in
9759 ' >> $CONFIG_STATUS
9760   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9761   rm -f conftest.vals
9762   mv conftest.tail conftest.vals
9763 done
9764 rm -f conftest.vals
9765
9766 cat >> $CONFIG_STATUS <<\EOF
9767   rm -f conftest.frag conftest.h
9768   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9769   cat conftest.in >> conftest.h
9770   rm -f conftest.in
9771   if cmp -s $ac_file conftest.h 2>/dev/null; then
9772     echo "$ac_file is unchanged"
9773     rm -f conftest.h
9774   else
9775     # Remove last slash and all that follows it.  Not all systems have dirname.
9776       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9777       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9778       # The file is in a subdirectory.
9779       test ! -d "$ac_dir" && mkdir "$ac_dir"
9780     fi
9781     rm -f $ac_file
9782     mv conftest.h $ac_file
9783   fi
9784 fi; done
9785
9786 EOF
9787 cat >> $CONFIG_STATUS <<EOF
9788
9789 EOF
9790 cat >> $CONFIG_STATUS <<\EOF
9791
9792 date > stamp-h
9793 echo Please \"make depend\" to build dependencies
9794
9795 exit 0
9796 EOF
9797 chmod +x $CONFIG_STATUS
9798 rm -fr confdefs* $ac_clean_files
9799 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9800