]> git.sur5r.net Git - openldap/blob - configure
2a0f47a805c1f718aa39274226796209cbda9293
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.345 2001/01/12 02:21:48 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug          enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog         enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle      enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache          enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-lmpasswd     enable LAN Manager passwords (auto)"
73 ac_help="$ac_help
74     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
75 ac_help="$ac_help
76     --enable-modules      enable dynamic module support (no)"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-rlookups     enable reverse lookups (no)"
81 ac_help="$ac_help
82     --enable-aci          enable per-object ACIs (no)"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support (no)"
85 ac_help="$ac_help
86     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
87 ac_help="$ac_help
88     --enable-bdb          enable Berkeley DB backend (no)"
89 ac_help="$ac_help
90     --with-bdb-module  module type (static)"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend (no)"
93 ac_help="$ac_help
94     --with-dnssrv-module  module type (static)"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend (no)"
97 ac_help="$ac_help
98     --with-ldap-module    module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm         enable ldbm backend (yes)"
101 ac_help="$ac_help
102     --with-ldbm-api       with LDBM API (auto)"
103 ac_help="$ac_help
104     --with-ldbm-module    module type (static)"
105 ac_help="$ac_help
106     --with-ldbm-type      use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd       enable passwd backend (no)"
109 ac_help="$ac_help
110     --with-passwd-module  module type (static)"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend (no)"
113 ac_help="$ac_help
114     --with-perl-module    module type (static)"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend (no)"
117 ac_help="$ac_help
118     --with-shell-module   module type (static)"
119 ac_help="$ac_help
120     --enable-sql          enable sql backend (no)"
121 ac_help="$ac_help
122     --with-sql-module     module type (static)"
123 ac_help="$ac_help
124     --enable-tcl          enable tcl backend (no)"
125 ac_help="$ac_help
126     --with-tcl-module     module type (static)"
127 ac_help="$ac_help
128 SLURPD (Replication Daemon) Options:"
129 ac_help="$ac_help
130   --enable-slurpd         enable building slurpd (auto)"
131 ac_help="$ac_help
132 Library Generation & Linking Options"
133 ac_help="$ac_help
134   --enable-static[=PKGS]  build static libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-shared[=PKGS]  build shared libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
139 ac_help="$ac_help
140   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
141 ac_help="$ac_help
142   --disable-libtool-lock  avoid locking (might break parallel builds)"
143
144 # Initialize some variables set by options.
145 # The variables have the same names as the options, with
146 # dashes changed to underlines.
147 build=NONE
148 cache_file=./config.cache
149 exec_prefix=NONE
150 host=NONE
151 no_create=
152 nonopt=NONE
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 target=NONE
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165 bindir='${exec_prefix}/bin'
166 sbindir='${exec_prefix}/sbin'
167 libexecdir='${exec_prefix}/libexec'
168 datadir='${prefix}/share'
169 sysconfdir='${prefix}/etc'
170 sharedstatedir='${prefix}/com'
171 localstatedir='${prefix}/var'
172 libdir='${exec_prefix}/lib'
173 includedir='${prefix}/include'
174 oldincludedir='/usr/include'
175 infodir='${prefix}/info'
176 mandir='${prefix}/man'
177
178 # Initialize some other variables.
179 subdirs=
180 MFLAGS= MAKEFLAGS=
181 SHELL=${CONFIG_SHELL-/bin/sh}
182 # Maximum number of lines to put in a shell here document.
183 ac_max_here_lines=12
184
185 ac_prev=
186 for ac_option
187 do
188
189   # If the previous option needs an argument, assign it.
190   if test -n "$ac_prev"; then
191     eval "$ac_prev=\$ac_option"
192     ac_prev=
193     continue
194   fi
195
196   case "$ac_option" in
197   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
198   *) ac_optarg= ;;
199   esac
200
201   # Accept the important Cygnus configure options, so we can diagnose typos.
202
203   case "$ac_option" in
204
205   -bindir | --bindir | --bindi | --bind | --bin | --bi)
206     ac_prev=bindir ;;
207   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
208     bindir="$ac_optarg" ;;
209
210   -build | --build | --buil | --bui | --bu)
211     ac_prev=build ;;
212   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
213     build="$ac_optarg" ;;
214
215   -cache-file | --cache-file | --cache-fil | --cache-fi \
216   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
217     ac_prev=cache_file ;;
218   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
219   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
220     cache_file="$ac_optarg" ;;
221
222   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
223     ac_prev=datadir ;;
224   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
225   | --da=*)
226     datadir="$ac_optarg" ;;
227
228   -disable-* | --disable-*)
229     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
230     # Reject names that are not valid shell variable names.
231     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
232       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
233     fi
234     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
235     eval "enable_${ac_feature}=no" ;;
236
237   -enable-* | --enable-*)
238     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
239     # Reject names that are not valid shell variable names.
240     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
241       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
242     fi
243     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
244     case "$ac_option" in
245       *=*) ;;
246       *) ac_optarg=yes ;;
247     esac
248     eval "enable_${ac_feature}='$ac_optarg'" ;;
249
250   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
251   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
252   | --exec | --exe | --ex)
253     ac_prev=exec_prefix ;;
254   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
255   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
256   | --exec=* | --exe=* | --ex=*)
257     exec_prefix="$ac_optarg" ;;
258
259   -gas | --gas | --ga | --g)
260     # Obsolete; use --with-gas.
261     with_gas=yes ;;
262
263   -help | --help | --hel | --he)
264     # Omit some internal or obsolete options to make the list less imposing.
265     # This message is too long to be a string in the A/UX 3.1 sh.
266     cat << EOF
267 Usage: configure [options] [host]
268 Options: [defaults in brackets after descriptions]
269 Configuration:
270   --cache-file=FILE       cache test results in FILE
271   --help                  print this message
272   --no-create             do not create output files
273   --quiet, --silent       do not print \`checking...' messages
274   --version               print the version of autoconf that created configure
275 Directory and file names:
276   --prefix=PREFIX         install architecture-independent files in PREFIX
277                           [$ac_default_prefix]
278   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
279                           [same as prefix]
280   --bindir=DIR            user executables in DIR [EPREFIX/bin]
281   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
282   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
283   --datadir=DIR           read-only architecture-independent data in DIR
284                           [PREFIX/share]
285   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
286   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
287                           [PREFIX/com]
288   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
289   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
290   --includedir=DIR        C header files in DIR [PREFIX/include]
291   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
292   --infodir=DIR           info documentation in DIR [PREFIX/info]
293   --mandir=DIR            man documentation in DIR [PREFIX/man]
294   --srcdir=DIR            find the sources in DIR [configure dir or ..]
295   --program-prefix=PREFIX prepend PREFIX to installed program names
296   --program-suffix=SUFFIX append SUFFIX to installed program names
297   --program-transform-name=PROGRAM
298                           run sed PROGRAM on installed program names
299 EOF
300     cat << EOF
301 Host type:
302   --build=BUILD           configure for building on BUILD [BUILD=HOST]
303   --host=HOST             configure for HOST [guessed]
304   --target=TARGET         configure for TARGET [TARGET=HOST]
305 Features and packages:
306   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
307   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
308   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
309   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
310   --x-includes=DIR        X include files are in DIR
311   --x-libraries=DIR       X library files are in DIR
312 EOF
313     if test -n "$ac_help"; then
314       echo "--enable and --with options recognized:$ac_help"
315     fi
316     exit 0 ;;
317
318   -host | --host | --hos | --ho)
319     ac_prev=host ;;
320   -host=* | --host=* | --hos=* | --ho=*)
321     host="$ac_optarg" ;;
322
323   -includedir | --includedir | --includedi | --included | --include \
324   | --includ | --inclu | --incl | --inc)
325     ac_prev=includedir ;;
326   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
327   | --includ=* | --inclu=* | --incl=* | --inc=*)
328     includedir="$ac_optarg" ;;
329
330   -infodir | --infodir | --infodi | --infod | --info | --inf)
331     ac_prev=infodir ;;
332   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
333     infodir="$ac_optarg" ;;
334
335   -libdir | --libdir | --libdi | --libd)
336     ac_prev=libdir ;;
337   -libdir=* | --libdir=* | --libdi=* | --libd=*)
338     libdir="$ac_optarg" ;;
339
340   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
341   | --libexe | --libex | --libe)
342     ac_prev=libexecdir ;;
343   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
344   | --libexe=* | --libex=* | --libe=*)
345     libexecdir="$ac_optarg" ;;
346
347   -localstatedir | --localstatedir | --localstatedi | --localstated \
348   | --localstate | --localstat | --localsta | --localst \
349   | --locals | --local | --loca | --loc | --lo)
350     ac_prev=localstatedir ;;
351   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
352   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
353   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
354     localstatedir="$ac_optarg" ;;
355
356   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
357     ac_prev=mandir ;;
358   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
359     mandir="$ac_optarg" ;;
360
361   -nfp | --nfp | --nf)
362     # Obsolete; use --without-fp.
363     with_fp=no ;;
364
365   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
366   | --no-cr | --no-c)
367     no_create=yes ;;
368
369   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
370   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
371     no_recursion=yes ;;
372
373   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
374   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
375   | --oldin | --oldi | --old | --ol | --o)
376     ac_prev=oldincludedir ;;
377   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
378   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
379   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
380     oldincludedir="$ac_optarg" ;;
381
382   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
383     ac_prev=prefix ;;
384   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
385     prefix="$ac_optarg" ;;
386
387   -program-prefix | --program-prefix | --program-prefi | --program-pref \
388   | --program-pre | --program-pr | --program-p)
389     ac_prev=program_prefix ;;
390   -program-prefix=* | --program-prefix=* | --program-prefi=* \
391   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
392     program_prefix="$ac_optarg" ;;
393
394   -program-suffix | --program-suffix | --program-suffi | --program-suff \
395   | --program-suf | --program-su | --program-s)
396     ac_prev=program_suffix ;;
397   -program-suffix=* | --program-suffix=* | --program-suffi=* \
398   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
399     program_suffix="$ac_optarg" ;;
400
401   -program-transform-name | --program-transform-name \
402   | --program-transform-nam | --program-transform-na \
403   | --program-transform-n | --program-transform- \
404   | --program-transform | --program-transfor \
405   | --program-transfo | --program-transf \
406   | --program-trans | --program-tran \
407   | --progr-tra | --program-tr | --program-t)
408     ac_prev=program_transform_name ;;
409   -program-transform-name=* | --program-transform-name=* \
410   | --program-transform-nam=* | --program-transform-na=* \
411   | --program-transform-n=* | --program-transform-=* \
412   | --program-transform=* | --program-transfor=* \
413   | --program-transfo=* | --program-transf=* \
414   | --program-trans=* | --program-tran=* \
415   | --progr-tra=* | --program-tr=* | --program-t=*)
416     program_transform_name="$ac_optarg" ;;
417
418   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
419   | -silent | --silent | --silen | --sile | --sil)
420     silent=yes ;;
421
422   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
423     ac_prev=sbindir ;;
424   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
425   | --sbi=* | --sb=*)
426     sbindir="$ac_optarg" ;;
427
428   -sharedstatedir | --sharedstatedir | --sharedstatedi \
429   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
430   | --sharedst | --shareds | --shared | --share | --shar \
431   | --sha | --sh)
432     ac_prev=sharedstatedir ;;
433   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
434   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
435   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
436   | --sha=* | --sh=*)
437     sharedstatedir="$ac_optarg" ;;
438
439   -site | --site | --sit)
440     ac_prev=site ;;
441   -site=* | --site=* | --sit=*)
442     site="$ac_optarg" ;;
443
444   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
445     ac_prev=srcdir ;;
446   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
447     srcdir="$ac_optarg" ;;
448
449   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
450   | --syscon | --sysco | --sysc | --sys | --sy)
451     ac_prev=sysconfdir ;;
452   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
453   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
454     sysconfdir="$ac_optarg" ;;
455
456   -target | --target | --targe | --targ | --tar | --ta | --t)
457     ac_prev=target ;;
458   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
459     target="$ac_optarg" ;;
460
461   -v | -verbose | --verbose | --verbos | --verbo | --verb)
462     verbose=yes ;;
463
464   -version | --version | --versio | --versi | --vers)
465     echo "configure generated by autoconf version 2.13.1"
466     exit 0 ;;
467
468   -with-* | --with-*)
469     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
470     # Reject names that are not valid shell variable names.
471     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
472       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
473     fi
474     ac_package=`echo $ac_package| sed 's/-/_/g'`
475     case "$ac_option" in
476       *=*) ;;
477       *) ac_optarg=yes ;;
478     esac
479     eval "with_${ac_package}='$ac_optarg'" ;;
480
481   -without-* | --without-*)
482     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
483     # Reject names that are not valid shell variable names.
484     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
485       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
486     fi
487     ac_package=`echo $ac_package| sed 's/-/_/g'`
488     eval "with_${ac_package}=no" ;;
489
490   --x)
491     # Obsolete; use --with-x.
492     with_x=yes ;;
493
494   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
495   | --x-incl | --x-inc | --x-in | --x-i)
496     ac_prev=x_includes ;;
497   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
498   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
499     x_includes="$ac_optarg" ;;
500
501   -x-libraries | --x-libraries | --x-librarie | --x-librari \
502   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
503     ac_prev=x_libraries ;;
504   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
505   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
506     x_libraries="$ac_optarg" ;;
507
508   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
509     ;;
510
511   *)
512     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
513       echo "configure: warning: $ac_option: invalid host type" 1>&2
514     fi
515     if test "x$nonopt" != xNONE; then
516       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
517     fi
518     nonopt="$ac_option"
519     ;;
520
521   esac
522 done
523
524 if test -n "$ac_prev"; then
525   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
526 fi
527
528 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
529
530 # File descriptor usage:
531 # 0 standard input
532 # 1 file creation
533 # 2 errors and warnings
534 # 3 some systems may open it to /dev/tty
535 # 4 used on the Kubota Titan
536 # 6 checking for... messages and results
537 # 5 compiler messages saved in config.log
538 if test "$silent" = yes; then
539   exec 6>/dev/null
540 else
541   exec 6>&1
542 fi
543 exec 5>./config.log
544
545 echo "\
546 This file contains any messages produced by compilers while
547 running configure, to aid debugging if configure makes a mistake.
548 " 1>&5
549
550 # Strip out --no-create and --no-recursion so they do not pile up.
551 # Also quote any args containing shell metacharacters.
552 ac_configure_args=
553 for ac_arg
554 do
555   case "$ac_arg" in
556   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
557   | --no-cr | --no-c) ;;
558   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
559   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
560   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
561   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
562   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
563   esac
564 done
565
566 # NLS nuisances.
567 # Only set these to C if already set.  These must not be set unconditionally
568 # because not all systems understand e.g. LANG=C (notably SCO).
569 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
570 # Non-C LC_CTYPE values break the ctype check.
571 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
572 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
573 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
574 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
575
576 # confdefs.h avoids OS command line length limits that DEFS can exceed.
577 rm -rf conftest* confdefs.h
578 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
579 echo > confdefs.h
580
581 # A filename unique to this package, relative to the directory that
582 # configure is in, which we can look for to find out if srcdir is correct.
583 ac_unique_file=build/version.sh
584
585 # Find the source files, if location was not specified.
586 if test -z "$srcdir"; then
587   ac_srcdir_defaulted=yes
588   # Try the directory containing this script, then its parent.
589   ac_prog=$0
590   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
591   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
592   srcdir=$ac_confdir
593   if test ! -r $srcdir/$ac_unique_file; then
594     srcdir=..
595   fi
596 else
597   ac_srcdir_defaulted=no
598 fi
599 if test ! -r $srcdir/$ac_unique_file; then
600   if test "$ac_srcdir_defaulted" = yes; then
601     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
602   else
603     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
604   fi
605 fi
606 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
607
608 # Prefer explicitly selected file to automatically selected ones.
609 if test -z "$CONFIG_SITE"; then
610   if test "x$prefix" != xNONE; then
611     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
612   else
613     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
614   fi
615 fi
616 for ac_site_file in $CONFIG_SITE; do
617   if test -r "$ac_site_file"; then
618     echo "loading site script $ac_site_file"
619     . "$ac_site_file"
620   fi
621 done
622
623
624 ac_ext=c
625 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
626 ac_cpp='$CPP $CPPFLAGS'
627 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
628 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
629 cross_compiling=$ac_cv_prog_cc_cross
630
631 ac_exeext=
632 ac_objext=o
633 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
634   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
635   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
636     ac_n= ac_c='
637 ' ac_t='        '
638   else
639     ac_n=-n ac_c= ac_t=
640   fi
641 else
642   ac_n= ac_c='\c' ac_t=
643 fi
644
645
646 # set unset (borrowed from autoconf 2.49c)
647 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
648   ol_unset=unset
649 else
650   ol_unset=false
651 fi
652 # unset CDPATH
653 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
654
655 ac_aux_dir=
656 for ac_dir in build $srcdir/build; do
657   if test -f $ac_dir/install-sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install-sh -c"
660     break
661   elif test -f $ac_dir/install.sh; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/install.sh -c"
664     break
665   elif test -f $ac_dir/shtool; then
666     ac_aux_dir=$ac_dir
667     ac_install_sh="$ac_aux_dir/shtool install -c"
668     break
669   fi
670 done
671 if test -z "$ac_aux_dir"; then
672   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
673 fi
674 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
675 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
676 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
677
678 eval `$ac_aux_dir/version.sh`
679 if test -z "$OL_STRING"; then
680         { echo "configure: error: could not determine version" 1>&2; exit 1; }
681 fi
682
683 echo "Configuring $OL_STRING ..."
684
685
686 echo $ac_n "checking host system type""... $ac_c" 1>&6
687 echo "configure:688: checking host system type" >&5
688 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
689
690 # Make sure we can run config.sub.
691   if $ac_config_sub sun4 >/dev/null 2>&1; then :
692     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
693   fi
694
695   ac_cv_host_alias=$host
696   case "$ac_cv_host_alias" in
697   NONE)
698     case $nonopt in
699     NONE)
700       if ac_cv_host_alias=`$ac_config_guess`; then :
701       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
702       fi ;;
703     *) ac_cv_host_alias=$nonopt ;;
704     esac ;;
705   esac
706
707   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
708   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 else
712   echo $ac_n "(cached) $ac_c" 1>&6
713 fi
714
715 echo "$ac_t""$ac_cv_host" 1>&6
716
717 host=$ac_cv_host
718 host_alias=$ac_cv_host_alias
719 host_cpu=$ac_cv_host_cpu
720 host_vendor=$ac_cv_host_vendor
721 host_os=$ac_cv_host_os
722
723
724
725
726
727 echo $ac_n "checking target system type""... $ac_c" 1>&6
728 echo "configure:729: checking target system type" >&5
729 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
730
731 # Make sure we can run config.sub.
732   if $ac_config_sub sun4 >/dev/null 2>&1; then :
733     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734   fi
735
736   ac_cv_target_alias=$target
737   case "$ac_cv_target_alias" in
738   NONE)
739     case $nonopt in
740     NONE)
741       ac_cv_target_alias=$host_alias ;;
742
743     *) ac_cv_target_alias=$nonopt ;;
744     esac ;;
745   esac
746
747   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
748   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
749   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
750   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
751 else
752   echo $ac_n "(cached) $ac_c" 1>&6
753 fi
754
755 echo "$ac_t""$ac_cv_target" 1>&6
756
757 target=$ac_cv_target
758 target_alias=$ac_cv_target_alias
759 target_cpu=$ac_cv_target_cpu
760 target_vendor=$ac_cv_target_vendor
761 target_os=$ac_cv_target_os
762
763
764
765
766
767 echo $ac_n "checking build system type""... $ac_c" 1>&6
768 echo "configure:769: checking build system type" >&5
769 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
770
771 # Make sure we can run config.sub.
772   if $ac_config_sub sun4 >/dev/null 2>&1; then :
773     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
774   fi
775
776   ac_cv_build_alias=$build
777   case "$ac_cv_build_alias" in
778   NONE)
779     case $nonopt in
780     NONE)
781       ac_cv_build_alias=$host_alias ;;
782
783     *) ac_cv_build_alias=$nonopt ;;
784     esac ;;
785   esac
786
787   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
788   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
789   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
790   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
791 else
792   echo $ac_n "(cached) $ac_c" 1>&6
793 fi
794
795 echo "$ac_t""$ac_cv_build" 1>&6
796
797 build=$ac_cv_build
798 build_alias=$ac_cv_build_alias
799 build_cpu=$ac_cv_build_cpu
800 build_vendor=$ac_cv_build_vendor
801 build_os=$ac_cv_build_os
802
803
804
805
806
807 # Do some error checking and defaulting for the host and target type.
808 # The inputs are:
809 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
810 #
811 # The rules are:
812 # 1. You are not allowed to specify --host, --target, and nonopt at the
813 #    same time.
814 # 2. Host defaults to nonopt.
815 # 3. If nonopt is not specified, then host defaults to the current host,
816 #    as determined by config.guess.
817 # 4. Target and build default to nonopt.
818 # 5. If nonopt is not specified, then target and build default to host.
819
820 # The aliases save the names the user supplied, while $host etc.
821 # will get canonicalized.
822 case $host---$target---$nonopt in
823 NONE---*---* | *---NONE---* | *---*---NONE) ;;
824 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
825 esac
826
827 test "$host_alias" != "$target_alias" &&
828   test "$program_prefix$program_suffix$program_transform_name" = \
829     NONENONEs,x,x, &&
830   program_prefix=${target_alias}-
831
832
833 # Find a good install program.  We prefer a C program (faster),
834 # so one script is as good as another.  But avoid the broken or
835 # incompatible versions:
836 # SysV /etc/install, /usr/sbin/install
837 # SunOS /usr/etc/install
838 # IRIX /sbin/install
839 # AIX /bin/install
840 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
841 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
842 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
843 # ./install, which can be erroneously created by make from ./install.sh.
844 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
845 echo "configure:846: checking for a BSD compatible install" >&5
846 if test -z "$INSTALL"; then
847 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
848   echo $ac_n "(cached) $ac_c" 1>&6
849 else
850     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
851   for ac_dir in $PATH; do
852     # Account for people who put trailing slashes in PATH elements.
853     case "$ac_dir/" in
854     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
855     *)
856       # OSF1 and SCO ODT 3.0 have their own names for install.
857       # Don't use installbsd from OSF since it installs stuff as root
858       # by default.
859       for ac_prog in ginstall scoinst install; do
860         if test -f $ac_dir/$ac_prog; then
861           if test $ac_prog = install &&
862             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # AIX install.  It has an incompatible calling convention.
864             :
865           elif test $ac_prog = install &&
866             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
867             # program-specific install script used by HP pwplus--don't use.
868             :
869           else
870             ac_cv_path_install="$ac_dir/$ac_prog -c"
871             break 2
872           fi
873         fi
874       done
875       ;;
876     esac
877   done
878   IFS="$ac_save_IFS"
879
880 fi
881   if test "${ac_cv_path_install+set}" = set; then
882     INSTALL="$ac_cv_path_install"
883   else
884     # As a last resort, use the slow shell script.  We don't cache a
885     # path for INSTALL within a source directory, because that will
886     # break other packages using the cache if that directory is
887     # removed, or if the path is relative.
888     INSTALL="$ac_install_sh"
889   fi
890 fi
891 echo "$ac_t""$INSTALL" 1>&6
892
893 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
894 # It thinks the first close brace ends the variable substitution.
895 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
896
897 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
898
899 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
900
901 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
902 echo "configure:903: checking whether build environment is sane" >&5
903 # Just in case
904 sleep 1
905 echo timestamp > conftestfile
906 # Do `set' in a subshell so we don't clobber the current shell's
907 # arguments.  Must try -L first in case configure is actually a
908 # symlink; some systems play weird games with the mod time of symlinks
909 # (eg FreeBSD returns the mod time of the symlink's containing
910 # directory).
911 if (
912    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913    if test "$*" = "X"; then
914       # -L didn't work.
915       set X `ls -t $srcdir/configure conftestfile`
916    fi
917    if test "$*" != "X $srcdir/configure conftestfile" \
918       && test "$*" != "X conftestfile $srcdir/configure"; then
919
920       # If neither matched, then we have a broken ls.  This can happen
921       # if, for instance, CONFIG_SHELL is bash and it inherits a
922       # broken ls alias from the environment.  This has actually
923       # happened.  Such a system could not be considered "sane".
924       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
925 alias in your environment" 1>&2; exit 1; }
926    fi
927
928    test "$2" = conftestfile
929    )
930 then
931    # Ok.
932    :
933 else
934    { echo "configure: error: newly created file is older than distributed files!
935 Check your system clock" 1>&2; exit 1; }
936 fi
937 rm -f conftest*
938 echo "$ac_t""yes" 1>&6
939 if test "$program_transform_name" = s,x,x,; then
940   program_transform_name=
941 else
942   # Double any \ or $.  echo might interpret backslashes.
943   cat <<\EOF_SED > conftestsed
944 s,\\,\\\\,g; s,\$,$$,g
945 EOF_SED
946   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
947   rm -f conftestsed
948 fi
949 test "$program_prefix" != NONE &&
950   program_transform_name="s,^,${program_prefix},;$program_transform_name"
951 # Use a double $ so make ignores it.
952 test "$program_suffix" != NONE &&
953   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
954
955 # sed with no file args requires a program.
956 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
957
958 for ac_prog in mawk gawk nawk awk
959 do
960 # Extract the first word of "$ac_prog", so it can be a program name with args.
961 set dummy $ac_prog; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   if test -n "$AWK"; then
968   ac_cv_prog_AWK="$AWK" # Let the user override the test.
969 else
970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
971   ac_dummy="$PATH"
972   for ac_dir in $ac_dummy; do
973     test -z "$ac_dir" && ac_dir=.
974     if test -f $ac_dir/$ac_word; then
975       ac_cv_prog_AWK="$ac_prog"
976       break
977     fi
978   done
979   IFS="$ac_save_ifs"
980 fi
981 fi
982 AWK="$ac_cv_prog_AWK"
983 if test -n "$AWK"; then
984   echo "$ac_t""$AWK" 1>&6
985 else
986   echo "$ac_t""no" 1>&6
987 fi
988
989 test -n "$AWK" && break
990 done
991
992 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
993 echo "configure:994: checking whether ${MAKE-make} sets \${MAKE}" >&5
994 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
995 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
996   echo $ac_n "(cached) $ac_c" 1>&6
997 else
998   cat > conftestmake <<\EOF
999 all:
1000         @echo 'ac_maketemp="${MAKE}"'
1001 EOF
1002 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1003 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1004 if test -n "$ac_maketemp"; then
1005   eval ac_cv_prog_make_${ac_make}_set=yes
1006 else
1007   eval ac_cv_prog_make_${ac_make}_set=no
1008 fi
1009 rm -f conftestmake
1010 fi
1011 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1012   echo "$ac_t""yes" 1>&6
1013   SET_MAKE=
1014 else
1015   echo "$ac_t""no" 1>&6
1016   SET_MAKE="MAKE=${MAKE-make}"
1017 fi
1018
1019
1020
1021 PACKAGE=$OL_PACKAGE
1022
1023 VERSION=$OL_VERSION
1024
1025 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1026   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1027 fi
1028
1029
1030
1031 missing_dir=`cd $ac_aux_dir && pwd`
1032 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working aclocal" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf.  Sigh.
1037 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1038    ACLOCAL=aclocal
1039    echo "$ac_t""found" 1>&6
1040 else
1041    ACLOCAL="$missing_dir/missing aclocal"
1042    echo "$ac_t""missing" 1>&6
1043 fi
1044
1045 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working autoconf" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1051    AUTOCONF=autoconf
1052    echo "$ac_t""found" 1>&6
1053 else
1054    AUTOCONF="$missing_dir/missing autoconf"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working automake" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (automake --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOMAKE=automake
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOMAKE="$missing_dir/missing automake"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working autoheader" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOHEADER=autoheader
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOHEADER="$missing_dir/missing autoheader"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working makeinfo" >&5
1086 # Run test in a subshell; some versions of sh will print an error if
1087 # an executable is not found, even if stderr is redirected.
1088 # Redirect stdin to placate older versions of autoconf.  Sigh.
1089 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1090    MAKEINFO=makeinfo
1091    echo "$ac_t""found" 1>&6
1092 else
1093    MAKEINFO="$missing_dir/missing makeinfo"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 install_sh="$missing_dir/install-sh"
1098 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1099
1100 for ac_prog in gnutar gtar tar
1101 do
1102 # Extract the first word of "$ac_prog", so it can be a program name with args.
1103 set dummy $ac_prog; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 echo "configure:1106: checking for $ac_word" >&5
1106 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1107   echo $ac_n "(cached) $ac_c" 1>&6
1108 else
1109   if test -n "$AMTAR"; then
1110   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1111 else
1112   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1113   ac_dummy="$PATH"
1114   for ac_dir in $ac_dummy; do
1115     test -z "$ac_dir" && ac_dir=.
1116     if test -f $ac_dir/$ac_word; then
1117       ac_cv_prog_AMTAR="$ac_prog"
1118       break
1119     fi
1120   done
1121   IFS="$ac_save_ifs"
1122 fi
1123 fi
1124 AMTAR="$ac_cv_prog_AMTAR"
1125 if test -n "$AMTAR"; then
1126   echo "$ac_t""$AMTAR" 1>&6
1127 else
1128   echo "$ac_t""no" 1>&6
1129 fi
1130
1131 test -n "$AMTAR" && break
1132 done
1133
1134
1135 AMTARFLAGS=
1136 if test -n "$AMTAR"; then
1137   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1138         AMTARFLAGS=o
1139   fi
1140 fi
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_PACKAGE "$PACKAGE"
1144 EOF
1145
1146 cat >> confdefs.h <<EOF
1147 #define OPENLDAP_VERSION "$VERSION"
1148 EOF
1149
1150
1151 cat >> confdefs.h <<EOF
1152 #define LDAP_VENDOR_VERSION $OL_API_INC
1153 EOF
1154
1155 cat >> confdefs.h <<EOF
1156 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1157 EOF
1158
1159 cat >> confdefs.h <<EOF
1160 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1161 EOF
1162
1163 cat >> confdefs.h <<EOF
1164 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1165 EOF
1166
1167
1168 OPENLDAP_LIBVERSION=$OL_API_LIB
1169
1170
1171
1172 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1173 echo "configure:1174: checking configure arguments" >&5
1174
1175
1176 top_builddir=`pwd`
1177
1178 ldap_subdir="/openldap"
1179
1180 # Check whether --with-subdir or --without-subdir was given.
1181 if test "${with_subdir+set}" = set; then
1182   withval="$with_subdir"
1183   case "$withval" in
1184         no) ldap_subdir=""
1185                 ;;
1186         yes)
1187                 ;;
1188         /*|\\*)
1189                 ldap_subdir="$withval"
1190                 ;;
1191         *)
1192                 ldap_subdir="/$withval"
1193                 ;;
1194 esac
1195
1196 fi
1197
1198
1199 # OpenLDAP --enable-debug
1200         # Check whether --enable-debug or --disable-debug was given.
1201 if test "${enable_debug+set}" = set; then
1202   enableval="$enable_debug"
1203   
1204         ol_arg=invalid
1205         for ol_val in auto yes no ; do
1206                 if test "$enableval" = "$ol_val" ; then
1207                         ol_arg="$ol_val"
1208                 fi
1209         done
1210         if test "$ol_arg" = "invalid" ; then
1211                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1212         fi
1213         ol_enable_debug="$ol_arg"
1214
1215 else
1216         ol_enable_debug="yes"
1217 fi
1218 # end --enable-debug
1219 # OpenLDAP --enable-syslog
1220         # Check whether --enable-syslog or --disable-syslog was given.
1221 if test "${enable_syslog+set}" = set; then
1222   enableval="$enable_syslog"
1223   
1224         ol_arg=invalid
1225         for ol_val in auto yes no ; do
1226                 if test "$enableval" = "$ol_val" ; then
1227                         ol_arg="$ol_val"
1228                 fi
1229         done
1230         if test "$ol_arg" = "invalid" ; then
1231                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1232         fi
1233         ol_enable_syslog="$ol_arg"
1234
1235 else
1236         ol_enable_syslog="auto"
1237 fi
1238 # end --enable-syslog
1239 # OpenLDAP --enable-proctitle
1240         # Check whether --enable-proctitle or --disable-proctitle was given.
1241 if test "${enable_proctitle+set}" = set; then
1242   enableval="$enable_proctitle"
1243   
1244         ol_arg=invalid
1245         for ol_val in auto yes no ; do
1246                 if test "$enableval" = "$ol_val" ; then
1247                         ol_arg="$ol_val"
1248                 fi
1249         done
1250         if test "$ol_arg" = "invalid" ; then
1251                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1252         fi
1253         ol_enable_proctitle="$ol_arg"
1254
1255 else
1256         ol_enable_proctitle="yes"
1257 fi
1258 # end --enable-proctitle
1259 # OpenLDAP --enable-cache
1260         # Check whether --enable-cache or --disable-cache was given.
1261 if test "${enable_cache+set}" = set; then
1262   enableval="$enable_cache"
1263   
1264         ol_arg=invalid
1265         for ol_val in auto yes no ; do
1266                 if test "$enableval" = "$ol_val" ; then
1267                         ol_arg="$ol_val"
1268                 fi
1269         done
1270         if test "$ol_arg" = "invalid" ; then
1271                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1272         fi
1273         ol_enable_cache="$ol_arg"
1274
1275 else
1276         ol_enable_cache="yes"
1277 fi
1278 # end --enable-cache
1279 # OpenLDAP --enable-referrals
1280         # Check whether --enable-referrals or --disable-referrals was given.
1281 if test "${enable_referrals+set}" = set; then
1282   enableval="$enable_referrals"
1283   
1284         ol_arg=invalid
1285         for ol_val in auto yes no ; do
1286                 if test "$enableval" = "$ol_val" ; then
1287                         ol_arg="$ol_val"
1288                 fi
1289         done
1290         if test "$ol_arg" = "invalid" ; then
1291                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1292         fi
1293         ol_enable_referrals="$ol_arg"
1294
1295 else
1296         ol_enable_referrals="yes"
1297 fi
1298 # end --enable-referrals
1299 # OpenLDAP --enable-kbind
1300         # Check whether --enable-kbind or --disable-kbind was given.
1301 if test "${enable_kbind+set}" = set; then
1302   enableval="$enable_kbind"
1303   
1304         ol_arg=invalid
1305         for ol_val in auto yes no ; do
1306                 if test "$enableval" = "$ol_val" ; then
1307                         ol_arg="$ol_val"
1308                 fi
1309         done
1310         if test "$ol_arg" = "invalid" ; then
1311                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1312         fi
1313         ol_enable_kbind="$ol_arg"
1314
1315 else
1316         ol_enable_kbind="no"
1317 fi
1318 # end --enable-kbind
1319 # OpenLDAP --enable-ipv6
1320         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1321 if test "${enable_ipv6+set}" = set; then
1322   enableval="$enable_ipv6"
1323   
1324         ol_arg=invalid
1325         for ol_val in auto yes no ; do
1326                 if test "$enableval" = "$ol_val" ; then
1327                         ol_arg="$ol_val"
1328                 fi
1329         done
1330         if test "$ol_arg" = "invalid" ; then
1331                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1332         fi
1333         ol_enable_ipv6="$ol_arg"
1334
1335 else
1336         ol_enable_ipv6="auto"
1337 fi
1338 # end --enable-ipv6
1339 # OpenLDAP --enable-local
1340         # Check whether --enable-local or --disable-local was given.
1341 if test "${enable_local+set}" = set; then
1342   enableval="$enable_local"
1343   
1344         ol_arg=invalid
1345         for ol_val in auto yes no ; do
1346                 if test "$enableval" = "$ol_val" ; then
1347                         ol_arg="$ol_val"
1348                 fi
1349         done
1350         if test "$ol_arg" = "invalid" ; then
1351                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1352         fi
1353         ol_enable_local="$ol_arg"
1354
1355 else
1356         ol_enable_local="auto"
1357 fi
1358 # end --enable-local
1359 # OpenLDAP --enable-x_compile
1360         # Check whether --enable-x_compile or --disable-x_compile was given.
1361 if test "${enable_x_compile+set}" = set; then
1362   enableval="$enable_x_compile"
1363   
1364         ol_arg=invalid
1365         for ol_val in yes no ; do
1366                 if test "$enableval" = "$ol_val" ; then
1367                         ol_arg="$ol_val"
1368                 fi
1369         done
1370         if test "$ol_arg" = "invalid" ; then
1371                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1372         fi
1373         ol_enable_x_compile="$ol_arg"
1374
1375 else
1376         ol_enable_x_compile="no"
1377 fi
1378 # end --enable-x_compile
1379
1380
1381 # OpenLDAP --with-cyrus_sasl
1382         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1383 if test "${with_cyrus_sasl+set}" = set; then
1384   withval="$with_cyrus_sasl"
1385   
1386         ol_arg=invalid
1387         for ol_val in auto yes no  ; do
1388                 if test "$withval" = "$ol_val" ; then
1389                         ol_arg="$ol_val"
1390                 fi
1391         done
1392         if test "$ol_arg" = "invalid" ; then
1393                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1394         fi
1395         ol_with_cyrus_sasl="$ol_arg"
1396
1397 else
1398         ol_with_cyrus_sasl="auto"
1399 fi
1400 # end --with-cyrus_sasl
1401
1402 # OpenLDAP --with-fetch
1403         # Check whether --with-fetch or --without-fetch was given.
1404 if test "${with_fetch+set}" = set; then
1405   withval="$with_fetch"
1406   
1407         ol_arg=invalid
1408         for ol_val in auto yes no  ; do
1409                 if test "$withval" = "$ol_val" ; then
1410                         ol_arg="$ol_val"
1411                 fi
1412         done
1413         if test "$ol_arg" = "invalid" ; then
1414                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1415         fi
1416         ol_with_fetch="$ol_arg"
1417
1418 else
1419         ol_with_fetch="auto"
1420 fi
1421 # end --with-fetch
1422
1423 # OpenLDAP --with-kerberos
1424         # Check whether --with-kerberos or --without-kerberos was given.
1425 if test "${with_kerberos+set}" = set; then
1426   withval="$with_kerberos"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1430                 if test "$withval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1436         fi
1437         ol_with_kerberos="$ol_arg"
1438
1439 else
1440         ol_with_kerberos="auto"
1441 fi
1442 # end --with-kerberos
1443
1444 # OpenLDAP --with-readline
1445         # Check whether --with-readline or --without-readline was given.
1446 if test "${with_readline+set}" = set; then
1447   withval="$with_readline"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto yes no  ; do
1451                 if test "$withval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1457         fi
1458         ol_with_readline="$ol_arg"
1459
1460 else
1461         ol_with_readline="auto"
1462 fi
1463 # end --with-readline
1464
1465 # OpenLDAP --with-threads
1466         # Check whether --with-threads or --without-threads was given.
1467 if test "${with_threads+set}" = set; then
1468   withval="$with_threads"
1469   
1470         ol_arg=invalid
1471         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1472                 if test "$withval" = "$ol_val" ; then
1473                         ol_arg="$ol_val"
1474                 fi
1475         done
1476         if test "$ol_arg" = "invalid" ; then
1477                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1478         fi
1479         ol_with_threads="$ol_arg"
1480
1481 else
1482         ol_with_threads="auto"
1483 fi
1484 # end --with-threads
1485
1486 # OpenLDAP --with-tls
1487         # Check whether --with-tls or --without-tls was given.
1488 if test "${with_tls+set}" = set; then
1489   withval="$with_tls"
1490   
1491         ol_arg=invalid
1492         for ol_val in auto ssleay openssl yes no  ; do
1493                 if test "$withval" = "$ol_val" ; then
1494                         ol_arg="$ol_val"
1495                 fi
1496         done
1497         if test "$ol_arg" = "invalid" ; then
1498                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1499         fi
1500         ol_with_tls="$ol_arg"
1501
1502 else
1503         ol_with_tls="auto"
1504 fi
1505 # end --with-tls
1506
1507 # OpenLDAP --with-yielding_select
1508         # Check whether --with-yielding_select or --without-yielding_select was given.
1509 if test "${with_yielding_select+set}" = set; then
1510   withval="$with_yielding_select"
1511   
1512         ol_arg=invalid
1513         for ol_val in auto yes no manual  ; do
1514                 if test "$withval" = "$ol_val" ; then
1515                         ol_arg="$ol_val"
1516                 fi
1517         done
1518         if test "$ol_arg" = "invalid" ; then
1519                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1520         fi
1521         ol_with_yielding_select="$ol_arg"
1522
1523 else
1524         ol_with_yielding_select="auto"
1525 fi
1526 # end --with-yielding_select
1527
1528
1529
1530 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1531 if test "${with_xxslapdoptions+set}" = set; then
1532   withval="$with_xxslapdoptions"
1533   :
1534 fi
1535
1536 # OpenLDAP --enable-slapd
1537         # Check whether --enable-slapd or --disable-slapd was given.
1538 if test "${enable_slapd+set}" = set; then
1539   enableval="$enable_slapd"
1540   
1541         ol_arg=invalid
1542         for ol_val in auto yes no ; do
1543                 if test "$enableval" = "$ol_val" ; then
1544                         ol_arg="$ol_val"
1545                 fi
1546         done
1547         if test "$ol_arg" = "invalid" ; then
1548                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1549         fi
1550         ol_enable_slapd="$ol_arg"
1551
1552 else
1553         ol_enable_slapd="yes"
1554 fi
1555 # end --enable-slapd
1556 # OpenLDAP --enable-cleartext
1557         # Check whether --enable-cleartext or --disable-cleartext was given.
1558 if test "${enable_cleartext+set}" = set; then
1559   enableval="$enable_cleartext"
1560   
1561         ol_arg=invalid
1562         for ol_val in auto yes no ; do
1563                 if test "$enableval" = "$ol_val" ; then
1564                         ol_arg="$ol_val"
1565                 fi
1566         done
1567         if test "$ol_arg" = "invalid" ; then
1568                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1569         fi
1570         ol_enable_cleartext="$ol_arg"
1571
1572 else
1573         ol_enable_cleartext="yes"
1574 fi
1575 # end --enable-cleartext
1576 # OpenLDAP --enable-crypt
1577         # Check whether --enable-crypt or --disable-crypt was given.
1578 if test "${enable_crypt+set}" = set; then
1579   enableval="$enable_crypt"
1580   
1581         ol_arg=invalid
1582         for ol_val in auto yes no ; do
1583                 if test "$enableval" = "$ol_val" ; then
1584                         ol_arg="$ol_val"
1585                 fi
1586         done
1587         if test "$ol_arg" = "invalid" ; then
1588                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1589         fi
1590         ol_enable_crypt="$ol_arg"
1591
1592 else
1593         ol_enable_crypt="auto"
1594 fi
1595 # end --enable-crypt
1596 # OpenLDAP --enable-kpasswd
1597         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1598 if test "${enable_kpasswd+set}" = set; then
1599   enableval="$enable_kpasswd"
1600   
1601         ol_arg=invalid
1602         for ol_val in auto yes no ; do
1603                 if test "$enableval" = "$ol_val" ; then
1604                         ol_arg="$ol_val"
1605                 fi
1606         done
1607         if test "$ol_arg" = "invalid" ; then
1608                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1609         fi
1610         ol_enable_kpasswd="$ol_arg"
1611
1612 else
1613         ol_enable_kpasswd="no"
1614 fi
1615 # end --enable-kpasswd
1616 # OpenLDAP --enable-lmpasswd
1617         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1618 if test "${enable_lmpasswd+set}" = set; then
1619   enableval="$enable_lmpasswd"
1620   
1621         ol_arg=invalid
1622         for ol_val in auto yes no ; do
1623                 if test "$enableval" = "$ol_val" ; then
1624                         ol_arg="$ol_val"
1625                 fi
1626         done
1627         if test "$ol_arg" = "invalid" ; then
1628                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1629         fi
1630         ol_enable_lmpasswd="$ol_arg"
1631
1632 else
1633         ol_enable_lmpasswd="auto"
1634 fi
1635 # end --enable-lmpasswd
1636 # OpenLDAP --enable-spasswd
1637         # Check whether --enable-spasswd or --disable-spasswd was given.
1638 if test "${enable_spasswd+set}" = set; then
1639   enableval="$enable_spasswd"
1640   
1641         ol_arg=invalid
1642         for ol_val in auto yes no ; do
1643                 if test "$enableval" = "$ol_val" ; then
1644                         ol_arg="$ol_val"
1645                 fi
1646         done
1647         if test "$ol_arg" = "invalid" ; then
1648                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1649         fi
1650         ol_enable_spasswd="$ol_arg"
1651
1652 else
1653         ol_enable_spasswd="no"
1654 fi
1655 # end --enable-spasswd
1656 # OpenLDAP --enable-modules
1657         # Check whether --enable-modules or --disable-modules was given.
1658 if test "${enable_modules+set}" = set; then
1659   enableval="$enable_modules"
1660   
1661         ol_arg=invalid
1662         for ol_val in auto yes no ; do
1663                 if test "$enableval" = "$ol_val" ; then
1664                         ol_arg="$ol_val"
1665                 fi
1666         done
1667         if test "$ol_arg" = "invalid" ; then
1668                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1669         fi
1670         ol_enable_modules="$ol_arg"
1671
1672 else
1673         ol_enable_modules="no"
1674 fi
1675 # end --enable-modules
1676 # OpenLDAP --enable-phonetic
1677         # Check whether --enable-phonetic or --disable-phonetic was given.
1678 if test "${enable_phonetic+set}" = set; then
1679   enableval="$enable_phonetic"
1680   
1681         ol_arg=invalid
1682         for ol_val in auto yes no ; do
1683                 if test "$enableval" = "$ol_val" ; then
1684                         ol_arg="$ol_val"
1685                 fi
1686         done
1687         if test "$ol_arg" = "invalid" ; then
1688                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1689         fi
1690         ol_enable_phonetic="$ol_arg"
1691
1692 else
1693         ol_enable_phonetic="no"
1694 fi
1695 # end --enable-phonetic
1696 # OpenLDAP --enable-rlookups
1697         # Check whether --enable-rlookups or --disable-rlookups was given.
1698 if test "${enable_rlookups+set}" = set; then
1699   enableval="$enable_rlookups"
1700   
1701         ol_arg=invalid
1702         for ol_val in auto yes no ; do
1703                 if test "$enableval" = "$ol_val" ; then
1704                         ol_arg="$ol_val"
1705                 fi
1706         done
1707         if test "$ol_arg" = "invalid" ; then
1708                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1709         fi
1710         ol_enable_rlookups="$ol_arg"
1711
1712 else
1713         ol_enable_rlookups="no"
1714 fi
1715 # end --enable-rlookups
1716 # OpenLDAP --enable-aci
1717         # Check whether --enable-aci or --disable-aci was given.
1718 if test "${enable_aci+set}" = set; then
1719   enableval="$enable_aci"
1720   
1721         ol_arg=invalid
1722         for ol_val in auto yes no ; do
1723                 if test "$enableval" = "$ol_val" ; then
1724                         ol_arg="$ol_val"
1725                 fi
1726         done
1727         if test "$ol_arg" = "invalid" ; then
1728                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1729         fi
1730         ol_enable_aci="$ol_arg"
1731
1732 else
1733         ol_enable_aci="no"
1734 fi
1735 # end --enable-aci
1736 # OpenLDAP --enable-wrappers
1737         # Check whether --enable-wrappers or --disable-wrappers was given.
1738 if test "${enable_wrappers+set}" = set; then
1739   enableval="$enable_wrappers"
1740   
1741         ol_arg=invalid
1742         for ol_val in auto yes no ; do
1743                 if test "$enableval" = "$ol_val" ; then
1744                         ol_arg="$ol_val"
1745                 fi
1746         done
1747         if test "$ol_arg" = "invalid" ; then
1748                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1749         fi
1750         ol_enable_wrappers="$ol_arg"
1751
1752 else
1753         ol_enable_wrappers="no"
1754 fi
1755 # end --enable-wrappers
1756 # OpenLDAP --enable-dynamic
1757         # Check whether --enable-dynamic or --disable-dynamic was given.
1758 if test "${enable_dynamic+set}" = set; then
1759   enableval="$enable_dynamic"
1760   
1761         ol_arg=invalid
1762         for ol_val in auto yes no ; do
1763                 if test "$enableval" = "$ol_val" ; then
1764                         ol_arg="$ol_val"
1765                 fi
1766         done
1767         if test "$ol_arg" = "invalid" ; then
1768                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1769         fi
1770         ol_enable_dynamic="$ol_arg"
1771
1772 else
1773         ol_enable_dynamic="no"
1774 fi
1775 # end --enable-dynamic
1776
1777 # OpenLDAP --enable-bdb
1778         # Check whether --enable-bdb or --disable-bdb was given.
1779 if test "${enable_bdb+set}" = set; then
1780   enableval="$enable_bdb"
1781   
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1790         fi
1791         ol_enable_bdb="$ol_arg"
1792
1793 else
1794         ol_enable_bdb="no"
1795 fi
1796 # end --enable-bdb
1797 # OpenLDAP --with-bdb_module
1798         # Check whether --with-bdb_module or --without-bdb_module was given.
1799 if test "${with_bdb_module+set}" = set; then
1800   withval="$with_bdb_module"
1801   
1802         ol_arg=invalid
1803         for ol_val in static dynamic ; do
1804                 if test "$withval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1810         fi
1811         ol_with_bdb_module="$ol_arg"
1812
1813 else
1814         ol_with_bdb_module="static"
1815 fi
1816 # end --with-bdb_module
1817
1818 # OpenLDAP --enable-dnssrv
1819         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1820 if test "${enable_dnssrv+set}" = set; then
1821   enableval="$enable_dnssrv"
1822   
1823         ol_arg=invalid
1824         for ol_val in auto yes no ; do
1825                 if test "$enableval" = "$ol_val" ; then
1826                         ol_arg="$ol_val"
1827                 fi
1828         done
1829         if test "$ol_arg" = "invalid" ; then
1830                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1831         fi
1832         ol_enable_dnssrv="$ol_arg"
1833
1834 else
1835         ol_enable_dnssrv="no"
1836 fi
1837 # end --enable-dnssrv
1838 # OpenLDAP --with-dnssrv_module
1839         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1840 if test "${with_dnssrv_module+set}" = set; then
1841   withval="$with_dnssrv_module"
1842   
1843         ol_arg=invalid
1844         for ol_val in static dynamic ; do
1845                 if test "$withval" = "$ol_val" ; then
1846                         ol_arg="$ol_val"
1847                 fi
1848         done
1849         if test "$ol_arg" = "invalid" ; then
1850                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1851         fi
1852         ol_with_dnssrv_module="$ol_arg"
1853
1854 else
1855         ol_with_dnssrv_module="static"
1856 fi
1857 # end --with-dnssrv_module
1858
1859 # OpenLDAP --enable-ldap
1860         # Check whether --enable-ldap or --disable-ldap was given.
1861 if test "${enable_ldap+set}" = set; then
1862   enableval="$enable_ldap"
1863   
1864         ol_arg=invalid
1865         for ol_val in auto yes no ; do
1866                 if test "$enableval" = "$ol_val" ; then
1867                         ol_arg="$ol_val"
1868                 fi
1869         done
1870         if test "$ol_arg" = "invalid" ; then
1871                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1872         fi
1873         ol_enable_ldap="$ol_arg"
1874
1875 else
1876         ol_enable_ldap="no"
1877 fi
1878 # end --enable-ldap
1879 # OpenLDAP --with-ldap_module
1880         # Check whether --with-ldap_module or --without-ldap_module was given.
1881 if test "${with_ldap_module+set}" = set; then
1882   withval="$with_ldap_module"
1883   
1884         ol_arg=invalid
1885         for ol_val in static dynamic ; do
1886                 if test "$withval" = "$ol_val" ; then
1887                         ol_arg="$ol_val"
1888                 fi
1889         done
1890         if test "$ol_arg" = "invalid" ; then
1891                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1892         fi
1893         ol_with_ldap_module="$ol_arg"
1894
1895 else
1896         ol_with_ldap_module="static"
1897 fi
1898 # end --with-ldap_module
1899
1900 # OpenLDAP --enable-ldbm
1901         # Check whether --enable-ldbm or --disable-ldbm was given.
1902 if test "${enable_ldbm+set}" = set; then
1903   enableval="$enable_ldbm"
1904   
1905         ol_arg=invalid
1906         for ol_val in auto yes no ; do
1907                 if test "$enableval" = "$ol_val" ; then
1908                         ol_arg="$ol_val"
1909                 fi
1910         done
1911         if test "$ol_arg" = "invalid" ; then
1912                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1913         fi
1914         ol_enable_ldbm="$ol_arg"
1915
1916 else
1917         ol_enable_ldbm="yes"
1918 fi
1919 # end --enable-ldbm
1920 # OpenLDAP --with-ldbm_api
1921         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1922 if test "${with_ldbm_api+set}" = set; then
1923   withval="$with_ldbm_api"
1924   
1925         ol_arg=invalid
1926         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1927                 if test "$withval" = "$ol_val" ; then
1928                         ol_arg="$ol_val"
1929                 fi
1930         done
1931         if test "$ol_arg" = "invalid" ; then
1932                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1933         fi
1934         ol_with_ldbm_api="$ol_arg"
1935
1936 else
1937         ol_with_ldbm_api="auto"
1938 fi
1939 # end --with-ldbm_api
1940
1941 # OpenLDAP --with-ldbm_module
1942         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1943 if test "${with_ldbm_module+set}" = set; then
1944   withval="$with_ldbm_module"
1945   
1946         ol_arg=invalid
1947         for ol_val in static dynamic ; do
1948                 if test "$withval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1954         fi
1955         ol_with_ldbm_module="$ol_arg"
1956
1957 else
1958         ol_with_ldbm_module="static"
1959 fi
1960 # end --with-ldbm_module
1961
1962 # OpenLDAP --with-ldbm_type
1963         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1964 if test "${with_ldbm_type+set}" = set; then
1965   withval="$with_ldbm_type"
1966   
1967         ol_arg=invalid
1968         for ol_val in auto btree hash ; do
1969                 if test "$withval" = "$ol_val" ; then
1970                         ol_arg="$ol_val"
1971                 fi
1972         done
1973         if test "$ol_arg" = "invalid" ; then
1974                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1975         fi
1976         ol_with_ldbm_type="$ol_arg"
1977
1978 else
1979         ol_with_ldbm_type="auto"
1980 fi
1981 # end --with-ldbm_type
1982
1983 # OpenLDAP --enable-passwd
1984         # Check whether --enable-passwd or --disable-passwd was given.
1985 if test "${enable_passwd+set}" = set; then
1986   enableval="$enable_passwd"
1987   
1988         ol_arg=invalid
1989         for ol_val in auto yes no ; do
1990                 if test "$enableval" = "$ol_val" ; then
1991                         ol_arg="$ol_val"
1992                 fi
1993         done
1994         if test "$ol_arg" = "invalid" ; then
1995                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1996         fi
1997         ol_enable_passwd="$ol_arg"
1998
1999 else
2000         ol_enable_passwd="no"
2001 fi
2002 # end --enable-passwd
2003 # OpenLDAP --with-passwd_module
2004         # Check whether --with-passwd_module or --without-passwd_module was given.
2005 if test "${with_passwd_module+set}" = set; then
2006   withval="$with_passwd_module"
2007   
2008         ol_arg=invalid
2009         for ol_val in static dynamic ; do
2010                 if test "$withval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2016         fi
2017         ol_with_passwd_module="$ol_arg"
2018
2019 else
2020         ol_with_passwd_module="static"
2021 fi
2022 # end --with-passwd_module
2023
2024 # OpenLDAP --enable-perl
2025         # Check whether --enable-perl or --disable-perl was given.
2026 if test "${enable_perl+set}" = set; then
2027   enableval="$enable_perl"
2028   
2029         ol_arg=invalid
2030         for ol_val in auto yes no ; do
2031                 if test "$enableval" = "$ol_val" ; then
2032                         ol_arg="$ol_val"
2033                 fi
2034         done
2035         if test "$ol_arg" = "invalid" ; then
2036                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2037         fi
2038         ol_enable_perl="$ol_arg"
2039
2040 else
2041         ol_enable_perl="no"
2042 fi
2043 # end --enable-perl
2044 # OpenLDAP --with-perl_module
2045         # Check whether --with-perl_module or --without-perl_module was given.
2046 if test "${with_perl_module+set}" = set; then
2047   withval="$with_perl_module"
2048   
2049         ol_arg=invalid
2050         for ol_val in static dynamic ; do
2051                 if test "$withval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2057         fi
2058         ol_with_perl_module="$ol_arg"
2059
2060 else
2061         ol_with_perl_module="static"
2062 fi
2063 # end --with-perl_module
2064
2065 # OpenLDAP --enable-shell
2066         # Check whether --enable-shell or --disable-shell was given.
2067 if test "${enable_shell+set}" = set; then
2068   enableval="$enable_shell"
2069   
2070         ol_arg=invalid
2071         for ol_val in auto yes no ; do
2072                 if test "$enableval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2078         fi
2079         ol_enable_shell="$ol_arg"
2080
2081 else
2082         ol_enable_shell="no"
2083 fi
2084 # end --enable-shell
2085 # OpenLDAP --with-shell_module
2086         # Check whether --with-shell_module or --without-shell_module was given.
2087 if test "${with_shell_module+set}" = set; then
2088   withval="$with_shell_module"
2089   
2090         ol_arg=invalid
2091         for ol_val in static dynamic ; do
2092                 if test "$withval" = "$ol_val" ; then
2093                         ol_arg="$ol_val"
2094                 fi
2095         done
2096         if test "$ol_arg" = "invalid" ; then
2097                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2098         fi
2099         ol_with_shell_module="$ol_arg"
2100
2101 else
2102         ol_with_shell_module="static"
2103 fi
2104 # end --with-shell_module
2105
2106 # OpenLDAP --enable-sql
2107         # Check whether --enable-sql or --disable-sql was given.
2108 if test "${enable_sql+set}" = set; then
2109   enableval="$enable_sql"
2110   
2111         ol_arg=invalid
2112         for ol_val in auto yes no ; do
2113                 if test "$enableval" = "$ol_val" ; then
2114                         ol_arg="$ol_val"
2115                 fi
2116         done
2117         if test "$ol_arg" = "invalid" ; then
2118                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2119         fi
2120         ol_enable_sql="$ol_arg"
2121
2122 else
2123         ol_enable_sql="no"
2124 fi
2125 # end --enable-sql
2126 # OpenLDAP --with-sql_module
2127         # Check whether --with-sql_module or --without-sql_module was given.
2128 if test "${with_sql_module+set}" = set; then
2129   withval="$with_sql_module"
2130   
2131         ol_arg=invalid
2132         for ol_val in static dynamic ; do
2133                 if test "$withval" = "$ol_val" ; then
2134                         ol_arg="$ol_val"
2135                 fi
2136         done
2137         if test "$ol_arg" = "invalid" ; then
2138                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2139         fi
2140         ol_with_sql_module="$ol_arg"
2141
2142 else
2143         ol_with_sql_module="static"
2144 fi
2145 # end --with-sql_module
2146
2147 # OpenLDAP --enable-tcl
2148         # Check whether --enable-tcl or --disable-tcl was given.
2149 if test "${enable_tcl+set}" = set; then
2150   enableval="$enable_tcl"
2151   
2152         ol_arg=invalid
2153         for ol_val in auto yes no ; do
2154                 if test "$enableval" = "$ol_val" ; then
2155                         ol_arg="$ol_val"
2156                 fi
2157         done
2158         if test "$ol_arg" = "invalid" ; then
2159                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2160         fi
2161         ol_enable_tcl="$ol_arg"
2162
2163 else
2164         ol_enable_tcl="no"
2165 fi
2166 # end --enable-tcl
2167 # OpenLDAP --with-tcl_module
2168         # Check whether --with-tcl_module or --without-tcl_module was given.
2169 if test "${with_tcl_module+set}" = set; then
2170   withval="$with_tcl_module"
2171   
2172         ol_arg=invalid
2173         for ol_val in static dynamic ; do
2174                 if test "$withval" = "$ol_val" ; then
2175                         ol_arg="$ol_val"
2176                 fi
2177         done
2178         if test "$ol_arg" = "invalid" ; then
2179                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2180         fi
2181         ol_with_tcl_module="$ol_arg"
2182
2183 else
2184         ol_with_tcl_module="static"
2185 fi
2186 # end --with-tcl_module
2187
2188
2189 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2190 if test "${with_xxslurpdoptions+set}" = set; then
2191   withval="$with_xxslurpdoptions"
2192   :
2193 fi
2194
2195 # OpenLDAP --enable-slurpd
2196         # Check whether --enable-slurpd or --disable-slurpd was given.
2197 if test "${enable_slurpd+set}" = set; then
2198   enableval="$enable_slurpd"
2199   
2200         ol_arg=invalid
2201         for ol_val in auto yes no ; do
2202                 if test "$enableval" = "$ol_val" ; then
2203                         ol_arg="$ol_val"
2204                 fi
2205         done
2206         if test "$ol_arg" = "invalid" ; then
2207                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2208         fi
2209         ol_enable_slurpd="$ol_arg"
2210
2211 else
2212         ol_enable_slurpd="auto"
2213 fi
2214 # end --enable-slurpd
2215
2216 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2217 if test "${with_xxliboptions+set}" = set; then
2218   withval="$with_xxliboptions"
2219   :
2220 fi
2221
2222 # Check whether --enable-static or --disable-static was given.
2223 if test "${enable_static+set}" = set; then
2224   enableval="$enable_static"
2225   p=${PACKAGE-default}
2226 case "$enableval" in
2227 yes) enable_static=yes ;;
2228 no) enable_static=no ;;
2229 *)
2230   enable_static=no
2231   # Look at the argument we got.  We use all the common list separators.
2232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2233   for pkg in $enableval; do
2234     if test "X$pkg" = "X$p"; then
2235       enable_static=yes
2236     fi
2237   done
2238   IFS="$ac_save_ifs"
2239   ;;
2240 esac
2241 else
2242   enable_static=yes
2243 fi
2244
2245 # Check whether --enable-shared or --disable-shared was given.
2246 if test "${enable_shared+set}" = set; then
2247   enableval="$enable_shared"
2248   p=${PACKAGE-default}
2249 case "$enableval" in
2250 yes) enable_shared=yes ;;
2251 no) enable_shared=no ;;
2252 *)
2253   enable_shared=no
2254   # Look at the argument we got.  We use all the common list separators.
2255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2256   for pkg in $enableval; do
2257     if test "X$pkg" = "X$p"; then
2258       enable_shared=yes
2259     fi
2260   done
2261   IFS="$ac_save_ifs"
2262   ;;
2263 esac
2264 else
2265   enable_shared=yes
2266 fi
2267
2268
2269
2270 # validate options
2271 if test $ol_enable_slapd = no ; then
2272                 if test $ol_enable_bdb = yes ; then
2273                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2274         fi
2275         if test $ol_enable_dnssrv = yes ; then
2276                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2277         fi
2278         if test $ol_enable_ldap = yes ; then
2279                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2280         fi
2281         if test $ol_enable_ldbm = yes ; then
2282                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2283         fi
2284         if test $ol_enable_passwd = yes ; then
2285                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2286         fi
2287         if test $ol_enable_perl = yes ; then
2288                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2289         fi
2290         if test $ol_enable_shell = yes ; then
2291                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2292         fi
2293         if test $ol_enable_tcl = yes ; then
2294                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2295         fi
2296         if test $ol_enable_sql = yes ; then
2297                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2298         fi
2299         if test $ol_enable_modules = yes ; then
2300                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2301         fi
2302         if test $ol_enable_wrappers = yes ; then
2303                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2304         fi
2305         if test $ol_enable_phonetic = yes ; then
2306                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2307         fi
2308         if test $ol_enable_rlookups = yes ; then
2309                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2310         fi
2311         if test $ol_enable_aci = yes ; then
2312                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2313         fi
2314         if test $ol_with_ldbm_api != auto ; then
2315                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2316         fi
2317         if test $ol_with_ldbm_type != auto ; then
2318                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2319         fi
2320         if test $ol_with_bdb_module != static ; then
2321                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2322         fi
2323         if test $ol_with_dnssrv_module != static ; then
2324                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2325         fi
2326         if test $ol_with_ldap_module != static ; then
2327                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2328         fi
2329         if test $ol_with_ldbm_module != static ; then
2330                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2331         fi
2332         if test $ol_with_passwd_module != static ; then
2333                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2334         fi
2335         if test $ol_with_perl_module != static ; then
2336                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2337         fi
2338         if test $ol_with_shell_module != static ; then
2339                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2340         fi
2341         if test $ol_with_tcl_module != static ; then
2342                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2343         fi
2344         if test $ol_with_sql_module != static ; then
2345                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2346         fi
2347         if test $ol_enable_slurpd = yes ; then
2348                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2349         fi
2350
2351         # force settings to no
2352         ol_enable_bdb=no
2353         ol_enable_dnssrv=no
2354         ol_enable_ldap=no
2355         ol_enable_ldbm=no
2356         ol_enable_passwd=no
2357         ol_enable_perl=no
2358         ol_enable_shell=no
2359         ol_enable_tcl=no
2360         ol_enable_sql=no
2361
2362         ol_enable_modules=no
2363         ol_enable_phonetic=no
2364         ol_enable_rlookups=no
2365         ol_enable_aci=no
2366         ol_enable_wrappers=no
2367         ol_enable_dynamic=no
2368
2369         ol_with_ldbm_api=no
2370         ol_with_ldbm_type=no
2371
2372         ol_with_bdb_module=static
2373         ol_with_dnssrv_module=static
2374         ol_with_ldap_module=static
2375         ol_with_ldbm_module=static
2376         ol_with_passwd_module=static
2377         ol_with_perl_module=static
2378         ol_with_shell_module=static
2379         ol_with_tcl_module=static
2380         ol_with_sql_module=static
2381
2382         ol_enable_slurpd=no
2383
2384 elif test $ol_enable_ldbm = no ; then
2385         
2386         if test $ol_with_ldbm_api != auto ; then
2387                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2388         fi
2389
2390         if test $ol_with_ldbm_type != auto ; then
2391                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2392         fi
2393
2394         if test $ol_with_ldbm_module != static ; then
2395                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2396         fi
2397
2398         if test $ol_enable_modules != yes -a \
2399                 $ol_enable_bdb = no -a \
2400                 $ol_enable_dnssrv = no -a \
2401                 $ol_enable_ldap = no -a \
2402                 $ol_enable_passwd = no -a \
2403                 $ol_enable_perl = no -a \
2404                 $ol_enable_shell = no -a \
2405                 $ol_enable_sql = no -a \
2406                 $ol_enable_tcl = no ; then
2407                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2408         fi
2409
2410         ol_with_ldbm_api=no
2411         ol_with_ldbm_type=no
2412         ol_with_ldbm_module=static
2413
2414 else
2415                 if test $ol_with_ldbm_api = gdbm -a \
2416                 $ol_with_ldbm_type = btree ; then
2417                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2418         fi
2419         if test $ol_with_ldbm_api = mdbm -a \
2420                 $ol_with_ldbm_type = btree ; then
2421                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2422         fi
2423         if test $ol_with_ldbm_api = ndbm -a \
2424                 $ol_with_ldbm_type = btree ; then
2425                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2426         fi
2427 fi
2428
2429 if test $ol_enable_slurpd = yes ; then
2430                 if test $ol_with_threads = no ; then
2431                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2432         fi
2433 fi
2434
2435 if test $ol_enable_lmpasswd = yes ; then
2436         if test $ol_with_tls = no ; then
2437                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2438         fi
2439 fi
2440
2441 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2442         if test $ol_with_kerberos = no ; then
2443                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2444         fi
2445         ol_with_kerberos=yes
2446 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2447         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2448                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2449         fi
2450         ol_with_kerberos=no
2451 fi
2452
2453 if test $ol_enable_spasswd = yes ; then
2454         if test $ol_with_cyrus_sasl = no ; then
2455                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2456         fi
2457         ol_with_cyrus_sasl=yes
2458 fi
2459
2460 echo "$ac_t""done" 1>&6
2461
2462 LDAP_LIBS=
2463 LDIF_LIBS=
2464 LDBM_LIBS=
2465 LTHREAD_LIBS=
2466 LUTIL_LIBS=
2467
2468 SLAPD_LIBS=
2469 SLURPD_LIBS=
2470
2471 BUILD_SLAPD=no
2472 BUILD_SLURPD=no
2473
2474 BUILD_THREAD=no
2475
2476 BUILD_BDB=no
2477 BUILD_DNSSRV=no
2478 BUILD_LDAP=no
2479 BUILD_LDBM=no
2480 BUILD_PASSWD=no
2481 BUILD_PERL=no
2482 BUILD_SHELL=no
2483 BUILD_SQL=no
2484 BUILD_TCL=no
2485
2486 BUILD_BDB_DYNAMIC=static
2487 BUILD_DNSSRV_DYNAMIC=static
2488 BUILD_LDAP_DYNAMIC=static
2489 BUILD_LDBM_DYNAMIC=static
2490 BUILD_PASSWD_DYNAMIC=static
2491 BUILD_PERL_DYNAMIC=static
2492 BUILD_SHELL_DYNAMIC=static
2493 BUILD_TCL_DYNAMIC=static
2494 BUILD_SQL_DYNAMIC=static
2495
2496 SLAPD_MODULES_LDFLAGS=
2497 SLAPD_MODULES_CPPFLAGS=
2498 SLAPD_MODULES_LIST=
2499
2500 SLAPD_PERL_LDFLAGS=
2501 MOD_PERL_LDFLAGS=
2502 PERL_CPPFLAGS=
2503
2504 SLAPD_SQL_LDFLAGS=
2505 SLAPD_SQL_LIBS=
2506 SLAPD_SQL_INCLUDES=
2507
2508 MOD_TCL_LIB=
2509 KRB4_LIBS=
2510 KRB5_LIBS=
2511 READLINE_LIBS=
2512 SASL_LIBS=
2513 TERMCAP_LIBS=
2514 TLS_LIBS=
2515 MODULES_LIBS=
2516 AUTH_LIBS=
2517
2518
2519
2520 cat >> confdefs.h <<\EOF
2521 #define HAVE_MKVERSION 1
2522 EOF
2523
2524
2525
2526
2527 ol_aix_threads=no
2528 case "$target" in
2529 *-*-aix*)       if test -z "$CC" ; then
2530                 case "$ol_with_threads" in
2531                 auto | yes |  posix) ol_aix_threads=yes ;;
2532                 esac
2533         fi
2534 ;;
2535 esac
2536
2537 if test $ol_aix_threads = yes ; then
2538         if test -z "${CC}" ; then
2539                 for ac_prog in cc_r xlc_r cc
2540 do
2541 # Extract the first word of "$ac_prog", so it can be a program name with args.
2542 set dummy $ac_prog; ac_word=$2
2543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2544 echo "configure:2545: checking for $ac_word" >&5
2545 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2546   echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548   if test -n "$CC"; then
2549   ac_cv_prog_CC="$CC" # Let the user override the test.
2550 else
2551   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2552   ac_dummy="$PATH"
2553   for ac_dir in $ac_dummy; do
2554     test -z "$ac_dir" && ac_dir=.
2555     if test -f $ac_dir/$ac_word; then
2556       ac_cv_prog_CC="$ac_prog"
2557       break
2558     fi
2559   done
2560   IFS="$ac_save_ifs"
2561 fi
2562 fi
2563 CC="$ac_cv_prog_CC"
2564 if test -n "$CC"; then
2565   echo "$ac_t""$CC" 1>&6
2566 else
2567   echo "$ac_t""no" 1>&6
2568 fi
2569
2570 test -n "$CC" && break
2571 done
2572
2573
2574                 if test "$CC" = cc ; then
2575                                                 if test $ol_with_threads != auto ; then
2576                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2577                         else
2578                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2579                         fi
2580                         ol_with_threads=no
2581                 fi
2582         fi
2583
2584         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2585                 ol_with_threads=posix
2586                 ol_cv_pthread_create=yes
2587         fi
2588 fi
2589
2590 if test -z "${CC}"; then
2591         for ac_prog in cc
2592 do
2593 # Extract the first word of "$ac_prog", so it can be a program name with args.
2594 set dummy $ac_prog; ac_word=$2
2595 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2596 echo "configure:2597: checking for $ac_word" >&5
2597 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2598   echo $ac_n "(cached) $ac_c" 1>&6
2599 else
2600   if test -n "$CC"; then
2601   ac_cv_prog_CC="$CC" # Let the user override the test.
2602 else
2603   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2604   ac_dummy="$PATH"
2605   for ac_dir in $ac_dummy; do
2606     test -z "$ac_dir" && ac_dir=.
2607     if test -f $ac_dir/$ac_word; then
2608       ac_cv_prog_CC="$ac_prog"
2609       break
2610     fi
2611   done
2612   IFS="$ac_save_ifs"
2613 fi
2614 fi
2615 CC="$ac_cv_prog_CC"
2616 if test -n "$CC"; then
2617   echo "$ac_t""$CC" 1>&6
2618 else
2619   echo "$ac_t""no" 1>&6
2620 fi
2621
2622 test -n "$CC" && break
2623 done
2624
2625 fi
2626
2627
2628
2629
2630 # Check whether --enable-fast-install or --disable-fast-install was given.
2631 if test "${enable_fast_install+set}" = set; then
2632   enableval="$enable_fast_install"
2633   p=${PACKAGE-default}
2634 case "$enableval" in
2635 yes) enable_fast_install=yes ;;
2636 no) enable_fast_install=no ;;
2637 *)
2638   enable_fast_install=no
2639   # Look at the argument we got.  We use all the common list separators.
2640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2641   for pkg in $enableval; do
2642     if test "X$pkg" = "X$p"; then
2643       enable_fast_install=yes
2644     fi
2645   done
2646   IFS="$ac_save_ifs"
2647   ;;
2648 esac
2649 else
2650   enable_fast_install=yes
2651 fi
2652
2653 # Extract the first word of "ranlib", so it can be a program name with args.
2654 set dummy ranlib; ac_word=$2
2655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2656 echo "configure:2657: checking for $ac_word" >&5
2657 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2658   echo $ac_n "(cached) $ac_c" 1>&6
2659 else
2660   if test -n "$RANLIB"; then
2661   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2662 else
2663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2664   ac_dummy="$PATH"
2665   for ac_dir in $ac_dummy; do
2666     test -z "$ac_dir" && ac_dir=.
2667     if test -f $ac_dir/$ac_word; then
2668       ac_cv_prog_RANLIB="ranlib"
2669       break
2670     fi
2671   done
2672   IFS="$ac_save_ifs"
2673   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2674 fi
2675 fi
2676 RANLIB="$ac_cv_prog_RANLIB"
2677 if test -n "$RANLIB"; then
2678   echo "$ac_t""$RANLIB" 1>&6
2679 else
2680   echo "$ac_t""no" 1>&6
2681 fi
2682
2683 # Extract the first word of "gcc", so it can be a program name with args.
2684 set dummy gcc; ac_word=$2
2685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2686 echo "configure:2687: checking for $ac_word" >&5
2687 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2688   echo $ac_n "(cached) $ac_c" 1>&6
2689 else
2690   if test -n "$CC"; then
2691   ac_cv_prog_CC="$CC" # Let the user override the test.
2692 else
2693   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2694   ac_dummy="$PATH"
2695   for ac_dir in $ac_dummy; do
2696     test -z "$ac_dir" && ac_dir=.
2697     if test -f $ac_dir/$ac_word; then
2698       ac_cv_prog_CC="gcc"
2699       break
2700     fi
2701   done
2702   IFS="$ac_save_ifs"
2703 fi
2704 fi
2705 CC="$ac_cv_prog_CC"
2706 if test -n "$CC"; then
2707   echo "$ac_t""$CC" 1>&6
2708 else
2709   echo "$ac_t""no" 1>&6
2710 fi
2711
2712 if test -z "$CC"; then
2713   # Extract the first word of "cc", so it can be a program name with args.
2714 set dummy cc; ac_word=$2
2715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2716 echo "configure:2717: checking for $ac_word" >&5
2717 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2718   echo $ac_n "(cached) $ac_c" 1>&6
2719 else
2720   if test -n "$CC"; then
2721   ac_cv_prog_CC="$CC" # Let the user override the test.
2722 else
2723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2724   ac_prog_rejected=no
2725   ac_dummy="$PATH"
2726   for ac_dir in $ac_dummy; do
2727     test -z "$ac_dir" && ac_dir=.
2728     if test -f $ac_dir/$ac_word; then
2729       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2730         ac_prog_rejected=yes
2731         continue
2732       fi
2733       ac_cv_prog_CC="cc"
2734       break
2735     fi
2736   done
2737   IFS="$ac_save_ifs"
2738 if test $ac_prog_rejected = yes; then
2739   # We found a bogon in the path, so make sure we never use it.
2740   set dummy $ac_cv_prog_CC
2741   shift
2742   if test $# -gt 0; then
2743     # We chose a different compiler from the bogus one.
2744     # However, it has the same basename, so the bogon will be chosen
2745     # first if we set CC to just the basename; use the full file name.
2746     shift
2747     set dummy "$ac_dir/$ac_word" "$@"
2748     shift
2749     ac_cv_prog_CC="$@"
2750   fi
2751 fi
2752 fi
2753 fi
2754 CC="$ac_cv_prog_CC"
2755 if test -n "$CC"; then
2756   echo "$ac_t""$CC" 1>&6
2757 else
2758   echo "$ac_t""no" 1>&6
2759 fi
2760
2761   if test -z "$CC"; then
2762     case "`uname -s`" in
2763     *win32* | *WIN32* | *CYGWIN*)
2764       # Extract the first word of "cl", so it can be a program name with args.
2765 set dummy cl; ac_word=$2
2766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2767 echo "configure:2768: checking for $ac_word" >&5
2768 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2769   echo $ac_n "(cached) $ac_c" 1>&6
2770 else
2771   if test -n "$CC"; then
2772   ac_cv_prog_CC="$CC" # Let the user override the test.
2773 else
2774   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2775   ac_dummy="$PATH"
2776   for ac_dir in $ac_dummy; do
2777     test -z "$ac_dir" && ac_dir=.
2778     if test -f $ac_dir/$ac_word; then
2779       ac_cv_prog_CC="cl"
2780       break
2781     fi
2782   done
2783   IFS="$ac_save_ifs"
2784 fi
2785 fi
2786 CC="$ac_cv_prog_CC"
2787 if test -n "$CC"; then
2788   echo "$ac_t""$CC" 1>&6
2789 else
2790   echo "$ac_t""no" 1>&6
2791 fi
2792  ;;
2793     esac
2794   fi
2795   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2796 fi
2797
2798 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2799 echo "configure:2800: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2800
2801 ac_ext=c
2802 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2803 ac_cpp='$CPP $CPPFLAGS'
2804 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2805 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2806 cross_compiling=$ac_cv_prog_cc_cross
2807
2808 cat > conftest.$ac_ext << EOF
2809
2810 #line 2811 "configure"
2811 #include "confdefs.h"
2812
2813 main(){return(0);}
2814 EOF
2815 if { (eval echo configure:2816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2816   ac_cv_prog_cc_works=yes
2817   # If we can't run a trivial program, we are probably using a cross compiler.
2818   if (./conftest; exit) 2>/dev/null; then
2819     ac_cv_prog_cc_cross=no
2820   else
2821     ac_cv_prog_cc_cross=yes
2822   fi
2823 else
2824   echo "configure: failed program was:" >&5
2825   cat conftest.$ac_ext >&5
2826   ac_cv_prog_cc_works=no
2827 fi
2828 rm -fr conftest*
2829 ac_ext=c
2830 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2831 ac_cpp='$CPP $CPPFLAGS'
2832 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2833 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2834 cross_compiling=$ac_cv_prog_cc_cross
2835
2836 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2837 if test $ac_cv_prog_cc_works = no; then
2838   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2839 fi
2840 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2841 echo "configure:2842: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2842 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2843 cross_compiling=$ac_cv_prog_cc_cross
2844
2845 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2846 echo "configure:2847: checking whether we are using GNU C" >&5
2847 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2848   echo $ac_n "(cached) $ac_c" 1>&6
2849 else
2850   cat > conftest.c <<EOF
2851 #ifdef __GNUC__
2852   yes;
2853 #endif
2854 EOF
2855 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2856   ac_cv_prog_gcc=yes
2857 else
2858   ac_cv_prog_gcc=no
2859 fi
2860 fi
2861
2862 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2863
2864 if test $ac_cv_prog_gcc = yes; then
2865   GCC=yes
2866 else
2867   GCC=
2868 fi
2869
2870 ac_test_CFLAGS="${CFLAGS+set}"
2871 ac_save_CFLAGS="$CFLAGS"
2872 CFLAGS=
2873 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2874 echo "configure:2875: checking whether ${CC-cc} accepts -g" >&5
2875 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2876   echo $ac_n "(cached) $ac_c" 1>&6
2877 else
2878   echo 'void f(){}' > conftest.c
2879 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2880   ac_cv_prog_cc_g=yes
2881 else
2882   ac_cv_prog_cc_g=no
2883 fi
2884 rm -f conftest*
2885
2886 fi
2887
2888 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2889 if test "$ac_test_CFLAGS" = set; then
2890   CFLAGS="$ac_save_CFLAGS"
2891 elif test $ac_cv_prog_cc_g = yes; then
2892   if test "$GCC" = yes; then
2893     CFLAGS="-g -O2"
2894   else
2895     CFLAGS="-g"
2896   fi
2897 else
2898   if test "$GCC" = yes; then
2899     CFLAGS="-O2"
2900   else
2901     CFLAGS=
2902   fi
2903 fi
2904
2905 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2906 if test "${with_gnu_ld+set}" = set; then
2907   withval="$with_gnu_ld"
2908   test "$withval" = no || with_gnu_ld=yes
2909 else
2910   with_gnu_ld=no
2911 fi
2912
2913 ac_prog=ld
2914 if test "$ac_cv_prog_gcc" = yes; then
2915   # Check if gcc -print-prog-name=ld gives a path.
2916   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2917 echo "configure:2918: checking for ld used by GCC" >&5
2918   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2919   case "$ac_prog" in
2920     # Accept absolute paths.
2921     [\\/]* | [A-Za-z]:[\\/]*)
2922       re_direlt='/[^/][^/]*/\.\./'
2923       # Canonicalize the path of ld
2924       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2925       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2926         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2927       done
2928       test -z "$LD" && LD="$ac_prog"
2929       ;;
2930   "")
2931     # If it fails, then pretend we aren't using GCC.
2932     ac_prog=ld
2933     ;;
2934   *)
2935     # If it is relative, then search for the first ld in PATH.
2936     with_gnu_ld=unknown
2937     ;;
2938   esac
2939 elif test "$with_gnu_ld" = yes; then
2940   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2941 echo "configure:2942: checking for GNU ld" >&5
2942 else
2943   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2944 echo "configure:2945: checking for non-GNU ld" >&5
2945 fi
2946 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   if test -z "$LD"; then
2950   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2951   for ac_dir in $PATH; do
2952     test -z "$ac_dir" && ac_dir=.
2953     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2954       ac_cv_path_LD="$ac_dir/$ac_prog"
2955       # Check to see if the program is GNU ld.  I'd rather use --version,
2956       # but apparently some GNU ld's only accept -v.
2957       # Break only if it was the GNU/non-GNU ld that we prefer.
2958       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2959         test "$with_gnu_ld" != no && break
2960       else
2961         test "$with_gnu_ld" != yes && break
2962       fi
2963     fi
2964   done
2965   IFS="$ac_save_ifs"
2966 else
2967   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2968 fi
2969 fi
2970
2971 LD="$ac_cv_path_LD"
2972 if test -n "$LD"; then
2973   echo "$ac_t""$LD" 1>&6
2974 else
2975   echo "$ac_t""no" 1>&6
2976 fi
2977 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2978 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2979 echo "configure:2980: checking if the linker ($LD) is GNU ld" >&5
2980 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2984 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2985   ac_cv_prog_gnu_ld=yes
2986 else
2987   ac_cv_prog_gnu_ld=no
2988 fi
2989 fi
2990
2991 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2992
2993
2994 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2995 echo "configure:2996: checking for BSD-compatible nm" >&5
2996 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2997   echo $ac_n "(cached) $ac_c" 1>&6
2998 else
2999   if test -n "$NM"; then
3000   # Let the user override the test.
3001   ac_cv_path_NM="$NM"
3002 else
3003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3004   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3005     test -z "$ac_dir" && ac_dir=.
3006     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3007       # Check to see if the nm accepts a BSD-compat flag.
3008       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3009       #   nm: unknown option "B" ignored
3010       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3011         ac_cv_path_NM="$ac_dir/nm -B"
3012         break
3013       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3014         ac_cv_path_NM="$ac_dir/nm -p"
3015         break
3016       else
3017         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3018         continue # so that we can try to find one that supports BSD flags
3019       fi
3020     fi
3021   done
3022   IFS="$ac_save_ifs"
3023   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3024 fi
3025 fi
3026
3027 NM="$ac_cv_path_NM"
3028 echo "$ac_t""$NM" 1>&6
3029
3030 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3031 echo "configure:3032: checking whether ln -s works" >&5
3032 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   rm -f conftestdata
3036 if ln -s X conftestdata 2>/dev/null
3037 then
3038   rm -f conftestdata
3039   ac_cv_prog_LN_S="ln -s"
3040 else
3041   ac_cv_prog_LN_S=ln
3042 fi
3043 fi
3044 LN_S="$ac_cv_prog_LN_S"
3045 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3046   echo "$ac_t""yes" 1>&6
3047 else
3048   echo "$ac_t""no" 1>&6
3049 fi
3050
3051 if test $host != $build; then
3052   ac_tool_prefix=${host_alias}-
3053 else
3054   ac_tool_prefix=
3055 fi
3056
3057
3058 case "$target" in
3059 NONE) lt_target="$host" ;;
3060 *) lt_target="$target" ;;
3061 esac
3062
3063 # Check for any special flags to pass to ltconfig.
3064 libtool_flags="--cache-file=$cache_file"
3065 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3066 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3067 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3068 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3069 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3070 libtool_flags="$libtool_flags --enable-dlopen"
3071 libtool_flags="$libtool_flags --enable-win32-dll"
3072 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3073 if test "${enable_libtool_lock+set}" = set; then
3074   enableval="$enable_libtool_lock"
3075   :
3076 fi
3077
3078 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3079 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3080
3081 # Some flags need to be propagated to the compiler or linker for good
3082 # libtool support.
3083 case "$lt_target" in
3084 *-*-irix6*)
3085   # Find out which ABI we are using.
3086   echo '#line 3087 "configure"' > conftest.$ac_ext
3087   if { (eval echo configure:3088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3088     case "`/usr/bin/file conftest.o`" in
3089     *32-bit*)
3090       LD="${LD-ld} -32"
3091       ;;
3092     *N32*)
3093       LD="${LD-ld} -n32"
3094       ;;
3095     *64-bit*)
3096       LD="${LD-ld} -64"
3097       ;;
3098     esac
3099   fi
3100   rm -rf conftest*
3101   ;;
3102
3103 *-*-sco3.2v5*)
3104   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3105   SAVE_CFLAGS="$CFLAGS"
3106   CFLAGS="$CFLAGS -belf"
3107   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3108 echo "configure:3109: checking whether the C compiler needs -belf" >&5
3109 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3110   echo $ac_n "(cached) $ac_c" 1>&6
3111 else
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115
3116 int main() {
3117
3118 ; return 0; }
3119 EOF
3120 if { (eval echo configure:3121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3121   rm -rf conftest*
3122   lt_cv_cc_needs_belf=yes
3123 else
3124   echo "configure: failed program was:" >&5
3125   cat conftest.$ac_ext >&5
3126   rm -rf conftest*
3127   lt_cv_cc_needs_belf=no
3128 fi
3129 rm -f conftest*
3130 fi
3131
3132 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3133   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3134     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3135     CFLAGS="$SAVE_CFLAGS"
3136   fi
3137   ;;
3138
3139 *-*-cygwin* | *-*-mingw*)
3140   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3141 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3143 echo "configure:3144: checking for $ac_word" >&5
3144 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   if test -n "$DLLTOOL"; then
3148   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3149 else
3150   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3151   ac_dummy="$PATH"
3152   for ac_dir in $ac_dummy; do
3153     test -z "$ac_dir" && ac_dir=.
3154     if test -f $ac_dir/$ac_word; then
3155       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3156       break
3157     fi
3158   done
3159   IFS="$ac_save_ifs"
3160 fi
3161 fi
3162 DLLTOOL="$ac_cv_prog_DLLTOOL"
3163 if test -n "$DLLTOOL"; then
3164   echo "$ac_t""$DLLTOOL" 1>&6
3165 else
3166   echo "$ac_t""no" 1>&6
3167 fi
3168
3169
3170 if test -z "$ac_cv_prog_DLLTOOL"; then
3171 if test -n "$ac_tool_prefix"; then
3172   # Extract the first word of "dlltool", so it can be a program name with args.
3173 set dummy dlltool; ac_word=$2
3174 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3175 echo "configure:3176: checking for $ac_word" >&5
3176 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3177   echo $ac_n "(cached) $ac_c" 1>&6
3178 else
3179   if test -n "$DLLTOOL"; then
3180   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3181 else
3182   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3183   ac_dummy="$PATH"
3184   for ac_dir in $ac_dummy; do
3185     test -z "$ac_dir" && ac_dir=.
3186     if test -f $ac_dir/$ac_word; then
3187       ac_cv_prog_DLLTOOL="dlltool"
3188       break
3189     fi
3190   done
3191   IFS="$ac_save_ifs"
3192   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3193 fi
3194 fi
3195 DLLTOOL="$ac_cv_prog_DLLTOOL"
3196 if test -n "$DLLTOOL"; then
3197   echo "$ac_t""$DLLTOOL" 1>&6
3198 else
3199   echo "$ac_t""no" 1>&6
3200 fi
3201
3202 else
3203   DLLTOOL="false"
3204 fi
3205 fi
3206
3207   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3208 set dummy ${ac_tool_prefix}as; ac_word=$2
3209 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3210 echo "configure:3211: checking for $ac_word" >&5
3211 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3212   echo $ac_n "(cached) $ac_c" 1>&6
3213 else
3214   if test -n "$AS"; then
3215   ac_cv_prog_AS="$AS" # Let the user override the test.
3216 else
3217   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3218   ac_dummy="$PATH"
3219   for ac_dir in $ac_dummy; do
3220     test -z "$ac_dir" && ac_dir=.
3221     if test -f $ac_dir/$ac_word; then
3222       ac_cv_prog_AS="${ac_tool_prefix}as"
3223       break
3224     fi
3225   done
3226   IFS="$ac_save_ifs"
3227 fi
3228 fi
3229 AS="$ac_cv_prog_AS"
3230 if test -n "$AS"; then
3231   echo "$ac_t""$AS" 1>&6
3232 else
3233   echo "$ac_t""no" 1>&6
3234 fi
3235
3236
3237 if test -z "$ac_cv_prog_AS"; then
3238 if test -n "$ac_tool_prefix"; then
3239   # Extract the first word of "as", so it can be a program name with args.
3240 set dummy as; ac_word=$2
3241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3242 echo "configure:3243: checking for $ac_word" >&5
3243 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   if test -n "$AS"; then
3247   ac_cv_prog_AS="$AS" # Let the user override the test.
3248 else
3249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3250   ac_dummy="$PATH"
3251   for ac_dir in $ac_dummy; do
3252     test -z "$ac_dir" && ac_dir=.
3253     if test -f $ac_dir/$ac_word; then
3254       ac_cv_prog_AS="as"
3255       break
3256     fi
3257   done
3258   IFS="$ac_save_ifs"
3259   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3260 fi
3261 fi
3262 AS="$ac_cv_prog_AS"
3263 if test -n "$AS"; then
3264   echo "$ac_t""$AS" 1>&6
3265 else
3266   echo "$ac_t""no" 1>&6
3267 fi
3268
3269 else
3270   AS="false"
3271 fi
3272 fi
3273
3274   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3275 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3276 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3277 echo "configure:3278: checking for $ac_word" >&5
3278 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3279   echo $ac_n "(cached) $ac_c" 1>&6
3280 else
3281   if test -n "$OBJDUMP"; then
3282   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3283 else
3284   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3285   ac_dummy="$PATH"
3286   for ac_dir in $ac_dummy; do
3287     test -z "$ac_dir" && ac_dir=.
3288     if test -f $ac_dir/$ac_word; then
3289       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3290       break
3291     fi
3292   done
3293   IFS="$ac_save_ifs"
3294 fi
3295 fi
3296 OBJDUMP="$ac_cv_prog_OBJDUMP"
3297 if test -n "$OBJDUMP"; then
3298   echo "$ac_t""$OBJDUMP" 1>&6
3299 else
3300   echo "$ac_t""no" 1>&6
3301 fi
3302
3303
3304 if test -z "$ac_cv_prog_OBJDUMP"; then
3305 if test -n "$ac_tool_prefix"; then
3306   # Extract the first word of "objdump", so it can be a program name with args.
3307 set dummy objdump; ac_word=$2
3308 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3309 echo "configure:3310: checking for $ac_word" >&5
3310 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3311   echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313   if test -n "$OBJDUMP"; then
3314   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3315 else
3316   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3317   ac_dummy="$PATH"
3318   for ac_dir in $ac_dummy; do
3319     test -z "$ac_dir" && ac_dir=.
3320     if test -f $ac_dir/$ac_word; then
3321       ac_cv_prog_OBJDUMP="objdump"
3322       break
3323     fi
3324   done
3325   IFS="$ac_save_ifs"
3326   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3327 fi
3328 fi
3329 OBJDUMP="$ac_cv_prog_OBJDUMP"
3330 if test -n "$OBJDUMP"; then
3331   echo "$ac_t""$OBJDUMP" 1>&6
3332 else
3333   echo "$ac_t""no" 1>&6
3334 fi
3335
3336 else
3337   OBJDUMP="false"
3338 fi
3339 fi
3340
3341   ;;
3342
3343 esac
3344
3345
3346 # Save cache, so that ltconfig can load it
3347
3348
3349 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3350 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3351 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3352 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3353 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3354 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3355 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3356 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3357
3358 # Reload cache, that may have been modified by ltconfig
3359
3360
3361 # This can be used to rebuild libtool when needed
3362 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3363
3364 # Always use our own libtool.
3365 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3366
3367 # Redirect the config.log output again, so that the ltconfig log is not
3368 # clobbered by the next message.
3369 exec 5>>./config.log
3370
3371
3372 for ac_prog in mawk gawk nawk awk
3373 do
3374 # Extract the first word of "$ac_prog", so it can be a program name with args.
3375 set dummy $ac_prog; ac_word=$2
3376 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3377 echo "configure:3378: checking for $ac_word" >&5
3378 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3379   echo $ac_n "(cached) $ac_c" 1>&6
3380 else
3381   if test -n "$AWK"; then
3382   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3383 else
3384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3385   ac_dummy="$PATH"
3386   for ac_dir in $ac_dummy; do
3387     test -z "$ac_dir" && ac_dir=.
3388     if test -f $ac_dir/$ac_word; then
3389       ac_cv_prog_AWK="$ac_prog"
3390       break
3391     fi
3392   done
3393   IFS="$ac_save_ifs"
3394 fi
3395 fi
3396 AWK="$ac_cv_prog_AWK"
3397 if test -n "$AWK"; then
3398   echo "$ac_t""$AWK" 1>&6
3399 else
3400   echo "$ac_t""no" 1>&6
3401 fi
3402
3403 test -n "$AWK" && break
3404 done
3405
3406 # test for ln hardlink support
3407 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3408 echo "configure:3409: checking whether ln works" >&5
3409 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3410   echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412   rm -f conftest.src conftest.dst
3413 echo "conftest" > conftest.src
3414 if ln conftest.src conftest.dst 2>/dev/null
3415 then
3416   ol_cv_prog_LN_H="ln"
3417 else
3418   ol_cv_prog_LN_H="cp"
3419 fi
3420 rm -f conftest.src conftest.dst
3421
3422 fi
3423 LN_H="$ol_cv_prog_LN_H"
3424 if test "$ol_cv_prog_LN_H" = "ln"; then
3425         echo "$ac_t""yes" 1>&6
3426 else
3427         echo "$ac_t""no" 1>&6
3428 fi
3429
3430 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3431 echo "configure:3432: checking whether ln -s works" >&5
3432 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3433   echo $ac_n "(cached) $ac_c" 1>&6
3434 else
3435   rm -f conftestdata
3436 if ln -s X conftestdata 2>/dev/null
3437 then
3438   rm -f conftestdata
3439   ac_cv_prog_LN_S="ln -s"
3440 else
3441   ac_cv_prog_LN_S=ln
3442 fi
3443 fi
3444 LN_S="$ac_cv_prog_LN_S"
3445 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3446   echo "$ac_t""yes" 1>&6
3447 else
3448   echo "$ac_t""no" 1>&6
3449 fi
3450
3451
3452 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3453         LN_S="$LN_H"
3454 fi
3455
3456 # Extract the first word of "sendmail", so it can be a program name with args.
3457 set dummy sendmail; ac_word=$2
3458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3459 echo "configure:3460: checking for $ac_word" >&5
3460 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3461   echo $ac_n "(cached) $ac_c" 1>&6
3462 else
3463   case "$SENDMAIL" in
3464   /*)
3465   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3466   ;;
3467   ?:/*)
3468   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3469   ;;
3470   *)
3471   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3472   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3473   for ac_dir in $ac_dummy; do 
3474     test -z "$ac_dir" && ac_dir=.
3475     if test -f $ac_dir/$ac_word; then
3476       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3477       break
3478     fi
3479   done
3480   IFS="$ac_save_ifs"
3481   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3482   ;;
3483 esac
3484 fi
3485 SENDMAIL="$ac_cv_path_SENDMAIL"
3486 if test -n "$SENDMAIL"; then
3487   echo "$ac_t""$SENDMAIL" 1>&6
3488 else
3489   echo "$ac_t""no" 1>&6
3490 fi
3491
3492 # Extract the first word of "vi", so it can be a program name with args.
3493 set dummy vi; ac_word=$2
3494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3495 echo "configure:3496: checking for $ac_word" >&5
3496 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   case "$EDITOR" in
3500   /*)
3501   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3502   ;;
3503   ?:/*)
3504   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3505   ;;
3506   *)
3507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3508   ac_dummy="$PATH:/usr/ucb"
3509   for ac_dir in $ac_dummy; do 
3510     test -z "$ac_dir" && ac_dir=.
3511     if test -f $ac_dir/$ac_word; then
3512       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3513       break
3514     fi
3515   done
3516   IFS="$ac_save_ifs"
3517   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3518   ;;
3519 esac
3520 fi
3521 EDITOR="$ac_cv_path_EDITOR"
3522 if test -n "$EDITOR"; then
3523   echo "$ac_t""$EDITOR" 1>&6
3524 else
3525   echo "$ac_t""no" 1>&6
3526 fi
3527
3528 # Extract the first word of "finger", so it can be a program name with args.
3529 set dummy finger; ac_word=$2
3530 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3531 echo "configure:3532: checking for $ac_word" >&5
3532 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3533   echo $ac_n "(cached) $ac_c" 1>&6
3534 else
3535   case "$FINGER" in
3536   /*)
3537   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3538   ;;
3539   ?:/*)
3540   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3541   ;;
3542   *)
3543   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3544   ac_dummy="$PATH:/usr/ucb"
3545   for ac_dir in $ac_dummy; do 
3546     test -z "$ac_dir" && ac_dir=.
3547     if test -f $ac_dir/$ac_word; then
3548       ac_cv_path_FINGER="$ac_dir/$ac_word"
3549       break
3550     fi
3551   done
3552   IFS="$ac_save_ifs"
3553   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3554   ;;
3555 esac
3556 fi
3557 FINGER="$ac_cv_path_FINGER"
3558 if test -n "$FINGER"; then
3559   echo "$ac_t""$FINGER" 1>&6
3560 else
3561   echo "$ac_t""no" 1>&6
3562 fi
3563
3564
3565 ol_link_perl=no
3566 if test $ol_enable_perl != no ; then
3567         # Extract the first word of "perl", so it can be a program name with args.
3568 set dummy perl; ac_word=$2
3569 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3570 echo "configure:3571: checking for $ac_word" >&5
3571 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3572   echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574   case "$PERLBIN" in
3575   /*)
3576   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3577   ;;
3578   ?:/*)
3579   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3580   ;;
3581   *)
3582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3583   ac_dummy="$PATH"
3584   for ac_dir in $ac_dummy; do 
3585     test -z "$ac_dir" && ac_dir=.
3586     if test -f $ac_dir/$ac_word; then
3587       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3588       break
3589     fi
3590   done
3591   IFS="$ac_save_ifs"
3592   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3593   ;;
3594 esac
3595 fi
3596 PERLBIN="$ac_cv_path_PERLBIN"
3597 if test -n "$PERLBIN"; then
3598   echo "$ac_t""$PERLBIN" 1>&6
3599 else
3600   echo "$ac_t""no" 1>&6
3601 fi
3602
3603
3604         if test "no$PERLBIN" = "no" ; then
3605                 if test $ol_enable_perl = yes ; then
3606                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3607                 fi
3608
3609         else
3610                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3611                 if test x"$ol_with_perl_module" = "xstatic" ; then
3612                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3613                 else
3614                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3615                 fi
3616                                 ol_link_perl=yes
3617         fi
3618 fi
3619
3620 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3621 echo "configure:3622: checking how to run the C preprocessor" >&5
3622 # On Suns, sometimes $CPP names a directory.
3623 if test -n "$CPP" && test -d "$CPP"; then
3624   CPP=
3625 fi
3626 if test -z "$CPP"; then
3627 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630     # This must be in double quotes, not single quotes, because CPP may get
3631   # substituted into the Makefile and "${CC-cc}" will confuse make.
3632   CPP="${CC-cc} -E"
3633   # On the NeXT, cc -E runs the code through the compiler's parser,
3634   # not just through cpp.
3635   cat > conftest.$ac_ext <<EOF
3636 #line 3637 "configure"
3637 #include "confdefs.h"
3638 #include <assert.h>
3639 Syntax Error
3640 EOF
3641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3642 { (eval echo configure:3643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3644 if test -z "$ac_err"; then
3645   :
3646 else
3647   echo "$ac_err" >&5
3648   echo "configure: failed program was:" >&5
3649   cat conftest.$ac_ext >&5
3650   rm -rf conftest*
3651   CPP="${CC-cc} -E -traditional-cpp"
3652   cat > conftest.$ac_ext <<EOF
3653 #line 3654 "configure"
3654 #include "confdefs.h"
3655 #include <assert.h>
3656 Syntax Error
3657 EOF
3658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3659 { (eval echo configure:3660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3661 if test -z "$ac_err"; then
3662   :
3663 else
3664   echo "$ac_err" >&5
3665   echo "configure: failed program was:" >&5
3666   cat conftest.$ac_ext >&5
3667   rm -rf conftest*
3668   CPP="${CC-cc} -nologo -E"
3669   cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3672 #include <assert.h>
3673 Syntax Error
3674 EOF
3675 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3676 { (eval echo configure:3677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3677 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3678 if test -z "$ac_err"; then
3679   :
3680 else
3681   echo "$ac_err" >&5
3682   echo "configure: failed program was:" >&5
3683   cat conftest.$ac_ext >&5
3684   rm -rf conftest*
3685   CPP=/lib/cpp
3686 fi
3687 rm -f conftest*
3688 fi
3689 rm -f conftest*
3690 fi
3691 rm -f conftest*
3692   ac_cv_prog_CPP="$CPP"
3693 fi
3694   CPP="$ac_cv_prog_CPP"
3695 else
3696   ac_cv_prog_CPP="$CPP"
3697 fi
3698 echo "$ac_t""$CPP" 1>&6
3699
3700
3701 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3702         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3703
3704 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3705         echo "configure: warning: programs compiled here do run here..." 1>&2
3706         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3707
3708 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3709         echo "configure: warning: programs compiled here do not run here..." 1>&2
3710         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3711 fi
3712
3713 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3714 echo "configure:3715: checking for AIX" >&5
3715 cat > conftest.$ac_ext <<EOF
3716 #line 3717 "configure"
3717 #include "confdefs.h"
3718 #ifdef _AIX
3719   yes
3720 #endif
3721
3722 EOF
3723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3724   egrep "yes" >/dev/null 2>&1; then
3725   rm -rf conftest*
3726   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3727 #define _ALL_SOURCE 1
3728 EOF
3729
3730 else
3731   rm -rf conftest*
3732   echo "$ac_t""no" 1>&6
3733 fi
3734 rm -f conftest*
3735
3736
3737 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3738 echo "configure:3739: checking for POSIXized ISC" >&5
3739 if test -d /etc/conf/kconfig.d &&
3740   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3741 then
3742   echo "$ac_t""yes" 1>&6
3743   ISC=yes # If later tests want to check for ISC.
3744   cat >> confdefs.h <<\EOF
3745 #define _POSIX_SOURCE 1
3746 EOF
3747
3748   if test "$GCC" = yes; then
3749     CC="$CC -posix"
3750   else
3751     CC="$CC -Xp"
3752   fi
3753 else
3754   echo "$ac_t""no" 1>&6
3755   ISC=
3756 fi
3757
3758 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3759 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3760 echo "configure:3761: checking for minix/config.h" >&5
3761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3762   echo $ac_n "(cached) $ac_c" 1>&6
3763 else
3764   cat > conftest.$ac_ext <<EOF
3765 #line 3766 "configure"
3766 #include "confdefs.h"
3767 #include <minix/config.h>
3768 EOF
3769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3770 { (eval echo configure:3771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3772 if test -z "$ac_err"; then
3773   rm -rf conftest*
3774   eval "ac_cv_header_$ac_safe=yes"
3775 else
3776   echo "$ac_err" >&5
3777   echo "configure: failed program was:" >&5
3778   cat conftest.$ac_ext >&5
3779   rm -rf conftest*
3780   eval "ac_cv_header_$ac_safe=no"
3781 fi
3782 rm -f conftest*
3783 fi
3784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3785   echo "$ac_t""yes" 1>&6
3786   MINIX=yes
3787 else
3788   echo "$ac_t""no" 1>&6
3789 MINIX=
3790 fi
3791
3792 if test "$MINIX" = yes; then
3793   cat >> confdefs.h <<\EOF
3794 #define _POSIX_SOURCE 1
3795 EOF
3796
3797   cat >> confdefs.h <<\EOF
3798 #define _POSIX_1_SOURCE 2
3799 EOF
3800
3801   cat >> confdefs.h <<\EOF
3802 #define _MINIX 1
3803 EOF
3804
3805 fi
3806
3807
3808 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3809 echo "configure:3810: checking for Cygwin environment" >&5
3810 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   cat > conftest.$ac_ext <<EOF
3814 #line 3815 "configure"
3815 #include "confdefs.h"
3816
3817 int main() {
3818
3819 #ifndef __CYGWIN__
3820 #define __CYGWIN__ __CYGWIN32__
3821 #endif
3822 return __CYGWIN__;
3823 ; return 0; }
3824 EOF
3825 if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3826   rm -rf conftest*
3827   ac_cv_cygwin=yes
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   ac_cv_cygwin=no
3833 fi
3834 rm -f conftest*
3835 fi
3836
3837 echo "$ac_t""$ac_cv_cygwin" 1>&6
3838 CYGWIN=
3839 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3840 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3841 echo "configure:3842: checking for mingw32 environment" >&5
3842 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3843   echo $ac_n "(cached) $ac_c" 1>&6
3844 else
3845   cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848
3849 int main() {
3850 return __MINGW32__;
3851 ; return 0; }
3852 EOF
3853 if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3854   rm -rf conftest*
3855   ac_cv_mingw32=yes
3856 else
3857   echo "configure: failed program was:" >&5
3858   cat conftest.$ac_ext >&5
3859   rm -rf conftest*
3860   ac_cv_mingw32=no
3861 fi
3862 rm -f conftest*
3863 fi
3864
3865 echo "$ac_t""$ac_cv_mingw32" 1>&6
3866 MINGW32=
3867 test "$ac_cv_mingw32" = yes && MINGW32=yes
3868 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3869 echo "configure:3870: checking for EMX OS/2 environment" >&5
3870 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3871   echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873   cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876
3877 int main() {
3878 return __EMX__;
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   rm -rf conftest*
3883   ac_cv_emxos2=yes
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   ac_cv_emxos2=no
3889 fi
3890 rm -f conftest*
3891 fi
3892
3893 echo "$ac_t""$ac_cv_emxos2" 1>&6
3894 EMXOS2=
3895 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3896
3897
3898
3899 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3900 echo "configure:3901: checking for executable suffix" >&5
3901 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3902   echo $ac_n "(cached) $ac_c" 1>&6
3903 else
3904   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3905   ac_cv_exeext=.exe
3906 else
3907   rm -f conftest*
3908   echo 'int main () { return 0; }' > conftest.$ac_ext
3909   ac_cv_exeext=
3910   if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3911     for file in conftest.*; do
3912       case $file in
3913       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3914       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3915       esac
3916     done
3917   else
3918     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3919   fi
3920   rm -f conftest*
3921   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3922 fi
3923 fi
3924
3925 EXEEXT=""
3926 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3927 echo "$ac_t""${ac_cv_exeext}" 1>&6
3928 ac_exeext=$EXEEXT
3929
3930 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3931 echo "configure:3932: checking for object suffix" >&5
3932 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3933   echo $ac_n "(cached) $ac_c" 1>&6
3934 else
3935   rm -f conftest*
3936 echo 'int i = 1;' > conftest.$ac_ext
3937 if { (eval echo configure:3938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3938   for ac_file in conftest.*; do
3939     case $ac_file in
3940     *.c) ;;
3941     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3942     esac
3943   done
3944 else
3945   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3946 fi
3947 rm -f conftest*
3948 fi
3949
3950 echo "$ac_t""$ac_cv_objext" 1>&6
3951 OBJEXT=$ac_cv_objext
3952 ac_objext=$ac_cv_objext
3953
3954
3955 cat >> confdefs.h <<EOF
3956 #define EXEEXT "${EXEEXT}"
3957 EOF
3958
3959
3960 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3961 echo "configure:3962: checking for be_app in -lbe" >&5
3962 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3964   echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966   ac_save_LIBS="$LIBS"
3967 LIBS="-lbe -lroot -lnet $LIBS"
3968 cat > conftest.$ac_ext <<EOF
3969 #line 3970 "configure"
3970 #include "confdefs.h"
3971 /* Override any gcc2 internal prototype to avoid an error.  */
3972 /* We use char because int might match the return type of a gcc2
3973     builtin and then its argument prototype would still apply.  */
3974 char be_app();
3975
3976 int main() {
3977 be_app()
3978 ; return 0; }
3979 EOF
3980 if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3981   rm -rf conftest*
3982   eval "ac_cv_lib_$ac_lib_var=yes"
3983 else
3984   echo "configure: failed program was:" >&5
3985   cat conftest.$ac_ext >&5
3986   rm -rf conftest*
3987   eval "ac_cv_lib_$ac_lib_var=no"
3988 fi
3989 rm -f conftest*
3990 LIBS="$ac_save_LIBS"
3991
3992 fi
3993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3994   echo "$ac_t""yes" 1>&6
3995   LIBS="$LIBS -lbe -lroot -lnet"
3996 else
3997   echo "$ac_t""no" 1>&6
3998 :
3999 fi
4000
4001
4002
4003
4004
4005 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4006 echo "configure:4007: checking for ${CC-cc} option to accept ANSI C" >&5
4007 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4008   echo $ac_n "(cached) $ac_c" 1>&6
4009 else
4010   am_cv_prog_cc_stdc=no
4011 ac_save_CC="$CC"
4012 # Don't try gcc -ansi; that turns off useful extensions and
4013 # breaks some systems' header files.
4014 # AIX                   -qlanglvl=ansi
4015 # Ultrix and OSF/1      -std1
4016 # HP-UX 10.20 and later -Ae
4017 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4018 # SVR4                  -Xc -D__EXTENSIONS__
4019 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4020 do
4021   CC="$ac_save_CC $ac_arg"
4022   cat > conftest.$ac_ext <<EOF
4023 #line 4024 "configure"
4024 #include "confdefs.h"
4025 #include <stdarg.h>
4026 #include <stdio.h>
4027 #include <sys/types.h>
4028 #include <sys/stat.h>
4029 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4030 struct buf { int x; };
4031 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4032 static char *e (p, i)
4033      char **p;
4034      int i;
4035 {
4036   return p[i];
4037 }
4038 static char *f (char * (*g) (char **, int), char **p, ...)
4039 {
4040   char *s;
4041   va_list v;
4042   va_start (v,p);
4043   s = g (p, va_arg (v,int));
4044   va_end (v);
4045   return s;
4046 }
4047 int test (int i, double x);
4048 struct s1 {int (*f) (int a);};
4049 struct s2 {int (*f) (double a);};
4050 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4051 int argc;
4052 char **argv;
4053
4054 int main() {
4055
4056 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4057
4058 ; return 0; }
4059 EOF
4060 if { (eval echo configure:4061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4061   rm -rf conftest*
4062   am_cv_prog_cc_stdc="$ac_arg"; break
4063 else
4064   echo "configure: failed program was:" >&5
4065   cat conftest.$ac_ext >&5
4066 fi
4067 rm -f conftest*
4068 done
4069 CC="$ac_save_CC"
4070
4071 fi
4072
4073 if test -z "$am_cv_prog_cc_stdc"; then
4074   echo "$ac_t""none needed" 1>&6
4075 else
4076   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4077 fi
4078 case "x$am_cv_prog_cc_stdc" in
4079   x|xno) ;;
4080   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4081 esac
4082
4083 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4084         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4085 fi
4086
4087 # test for make depend flag
4088 OL_MKDEP=
4089 OL_MKDEP_FLAGS=
4090 if test -z "${MKDEP}"; then
4091         OL_MKDEP="${CC-cc}"
4092         if test -z "${MKDEP_FLAGS}"; then
4093                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4094 echo "configure:4095: checking for ${OL_MKDEP} depend flag" >&5
4095 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   
4099                         ol_cv_mkdep=no
4100                         for flag in "-M" "-xM"; do
4101                                 cat > conftest.c <<EOF
4102  noCode;
4103 EOF
4104                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4105                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4106                                 then
4107                                         if test ! -f conftest."${ac_object}" ; then
4108                                                 ol_cv_mkdep=$flag
4109                                                 OL_MKDEP_FLAGS="$flag"
4110                                                 break
4111                                         fi
4112                                 fi
4113                         done
4114                         rm -f conftest*
4115                 
4116 fi
4117
4118 echo "$ac_t""$ol_cv_mkdep" 1>&6
4119         else
4120                 cc_cv_mkdep=yes
4121                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4122         fi
4123 else
4124         cc_cv_mkdep=yes
4125         OL_MKDEP="${MKDEP}"
4126         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4127 fi
4128
4129
4130
4131 if test "${ol_cv_mkdep}" = no ; then
4132         # this will soon become an error
4133         echo "configure: warning: do not know how to generate dependencies" 1>&2
4134 fi
4135
4136 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4137 echo "configure:4138: checking for afopen in -ls" >&5
4138 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4140   echo $ac_n "(cached) $ac_c" 1>&6
4141 else
4142   ac_save_LIBS="$LIBS"
4143 LIBS="-ls  $LIBS"
4144 cat > conftest.$ac_ext <<EOF
4145 #line 4146 "configure"
4146 #include "confdefs.h"
4147 /* Override any gcc2 internal prototype to avoid an error.  */
4148 /* We use char because int might match the return type of a gcc2
4149     builtin and then its argument prototype would still apply.  */
4150 char afopen();
4151
4152 int main() {
4153 afopen()
4154 ; return 0; }
4155 EOF
4156 if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4157   rm -rf conftest*
4158   eval "ac_cv_lib_$ac_lib_var=yes"
4159 else
4160   echo "configure: failed program was:" >&5
4161   cat conftest.$ac_ext >&5
4162   rm -rf conftest*
4163   eval "ac_cv_lib_$ac_lib_var=no"
4164 fi
4165 rm -f conftest*
4166 LIBS="$ac_save_LIBS"
4167
4168 fi
4169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4170   echo "$ac_t""yes" 1>&6
4171   
4172         AUTH_LIBS=-ls
4173         cat >> confdefs.h <<\EOF
4174 #define HAVE_AIX_SECURITY 1
4175 EOF
4176
4177
4178 else
4179   echo "$ac_t""no" 1>&6
4180 fi
4181
4182
4183
4184 ol_link_modules=no
4185 if test $ol_enable_modules != no ; then
4186         for ac_hdr in ltdl.h
4187 do
4188 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4189 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4190 echo "configure:4191: checking for $ac_hdr" >&5
4191 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 #include <$ac_hdr>
4198 EOF
4199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4200 { (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4202 if test -z "$ac_err"; then
4203   rm -rf conftest*
4204   eval "ac_cv_header_$ac_safe=yes"
4205 else
4206   echo "$ac_err" >&5
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   eval "ac_cv_header_$ac_safe=no"
4211 fi
4212 rm -f conftest*
4213 fi
4214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4215   echo "$ac_t""yes" 1>&6
4216     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4217   cat >> confdefs.h <<EOF
4218 #define $ac_tr_hdr 1
4219 EOF
4220  
4221 else
4222   echo "$ac_t""no" 1>&6
4223 fi
4224 done
4225
4226
4227         if test $ac_cv_header_ltdl_h = no ; then
4228                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4229         fi
4230
4231         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4232 echo "configure:4233: checking for lt_dlinit in -lltdl" >&5
4233 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4235   echo $ac_n "(cached) $ac_c" 1>&6
4236 else
4237   ac_save_LIBS="$LIBS"
4238 LIBS="-lltdl  $LIBS"
4239 cat > conftest.$ac_ext <<EOF
4240 #line 4241 "configure"
4241 #include "confdefs.h"
4242 /* Override any gcc2 internal prototype to avoid an error.  */
4243 /* We use char because int might match the return type of a gcc2
4244     builtin and then its argument prototype would still apply.  */
4245 char lt_dlinit();
4246
4247 int main() {
4248 lt_dlinit()
4249 ; return 0; }
4250 EOF
4251 if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4252   rm -rf conftest*
4253   eval "ac_cv_lib_$ac_lib_var=yes"
4254 else
4255   echo "configure: failed program was:" >&5
4256   cat conftest.$ac_ext >&5
4257   rm -rf conftest*
4258   eval "ac_cv_lib_$ac_lib_var=no"
4259 fi
4260 rm -f conftest*
4261 LIBS="$ac_save_LIBS"
4262
4263 fi
4264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4265   echo "$ac_t""yes" 1>&6
4266   
4267             MODULES_LIBS=-lltdl
4268             cat >> confdefs.h <<\EOF
4269 #define HAVE_LIBLTDL 1
4270 EOF
4271
4272         
4273 else
4274   echo "$ac_t""no" 1>&6
4275 fi
4276
4277
4278         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4279                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4280         fi
4281         ol_link_modules=yes
4282 else
4283         ol_with_bdb_module=static
4284         ol_with_dnssrv_module=static
4285         ol_with_ldap_module=static
4286         ol_with_ldbm_module=static
4287         ol_with_passwd_module=static
4288         ol_with_perl_module=static
4289         ol_with_shell_module=static
4290         ol_with_tcl_module=static
4291         ol_with_sql_module=static
4292 fi
4293
4294 # test for EBCDIC
4295 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4296 echo "configure:4297: checking for EBCDIC" >&5
4297 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4298   echo $ac_n "(cached) $ac_c" 1>&6
4299 else
4300   
4301         cat > conftest.$ac_ext <<EOF
4302 #line 4303 "configure"
4303 #include "confdefs.h"
4304
4305 #if !('M' == 0xd4)
4306 #include <__ASCII__/generate_error.h>
4307 #endif
4308
4309 EOF
4310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4311 { (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4313 if test -z "$ac_err"; then
4314   rm -rf conftest*
4315   ol_cv_cpp_ebcdic=yes
4316 else
4317   echo "$ac_err" >&5
4318   echo "configure: failed program was:" >&5
4319   cat conftest.$ac_ext >&5
4320   rm -rf conftest*
4321   ol_cv_cpp_ebcdic=no
4322 fi
4323 rm -f conftest*
4324 fi
4325
4326 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4327 if test $ol_cv_cpp_ebcdic = yes ; then
4328         cat >> confdefs.h <<\EOF
4329 #define HAVE_EBCDIC 1
4330 EOF
4331
4332 fi
4333
4334 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4335 echo "configure:4336: checking for ANSI C header files" >&5
4336 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4337   echo $ac_n "(cached) $ac_c" 1>&6
4338 else
4339   cat > conftest.$ac_ext <<EOF
4340 #line 4341 "configure"
4341 #include "confdefs.h"
4342 #include <stdlib.h>
4343 #include <stdarg.h>
4344 #include <string.h>
4345 #include <float.h>
4346 EOF
4347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4348 { (eval echo configure:4349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4350 if test -z "$ac_err"; then
4351   rm -rf conftest*
4352   ol_cv_header_stdc=yes
4353 else
4354   echo "$ac_err" >&5
4355   echo "configure: failed program was:" >&5
4356   cat conftest.$ac_ext >&5
4357   rm -rf conftest*
4358   ol_cv_header_stdc=no
4359 fi
4360 rm -f conftest*
4361
4362 if test $ol_cv_header_stdc = yes; then
4363   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4364 cat > conftest.$ac_ext <<EOF
4365 #line 4366 "configure"
4366 #include "confdefs.h"
4367 #include <string.h>
4368 EOF
4369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4370   egrep "memchr" >/dev/null 2>&1; then
4371   :
4372 else
4373   rm -rf conftest*
4374   ol_cv_header_stdc=no
4375 fi
4376 rm -f conftest*
4377
4378 fi
4379
4380 if test $ol_cv_header_stdc = yes; then
4381   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #include <stdlib.h>
4386 EOF
4387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4388   egrep "free" >/dev/null 2>&1; then
4389   :
4390 else
4391   rm -rf conftest*
4392   ol_cv_header_stdc=no
4393 fi
4394 rm -f conftest*
4395
4396 fi
4397
4398 if test $ol_cv_header_stdc = yes; then
4399   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4400 if test "$cross_compiling" = yes; then
4401   :
4402 else
4403   cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4406 #include <ctype.h>
4407 #ifndef HAVE_EBCDIC
4408 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4409 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4410 #else
4411 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4412                 || ('j' <= (c) && (c) <= 'r') \
4413                 || ('s' <= (c) && (c) <= 'z'))
4414 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4415 #endif
4416 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4417 int main () { int i; for (i = 0; i < 256; i++)
4418 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4419 exit (0); }
4420
4421 EOF
4422 if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4423 then
4424   :
4425 else
4426   echo "configure: failed program was:" >&5
4427   cat conftest.$ac_ext >&5
4428   rm -fr conftest*
4429   ol_cv_header_stdc=no
4430 fi
4431 rm -fr conftest*
4432 fi
4433
4434 fi
4435 fi
4436
4437 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4438 if test $ol_cv_header_stdc = yes; then
4439   cat >> confdefs.h <<\EOF
4440 #define STDC_HEADERS 1
4441 EOF
4442
4443 fi
4444 ac_cv_header_stdc=disable
4445
4446
4447 if test $ol_cv_header_stdc != yes; then
4448         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4449 fi
4450
4451 ac_header_dirent=no
4452 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4453 do
4454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4455 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4456 echo "configure:4457: checking for $ac_hdr that defines DIR" >&5
4457 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4458   echo $ac_n "(cached) $ac_c" 1>&6
4459 else
4460   cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 #include <sys/types.h>
4464 #include <$ac_hdr>
4465 int main() {
4466 DIR *dirp = 0;
4467 ; return 0; }
4468 EOF
4469 if { (eval echo configure:4470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4470   rm -rf conftest*
4471   eval "ac_cv_header_dirent_$ac_safe=yes"
4472 else
4473   echo "configure: failed program was:" >&5
4474   cat conftest.$ac_ext >&5
4475   rm -rf conftest*
4476   eval "ac_cv_header_dirent_$ac_safe=no"
4477 fi
4478 rm -f conftest*
4479 fi
4480 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4481   echo "$ac_t""yes" 1>&6
4482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4483   cat >> confdefs.h <<EOF
4484 #define $ac_tr_hdr 1
4485 EOF
4486  ac_header_dirent=$ac_hdr; break
4487 else
4488   echo "$ac_t""no" 1>&6
4489 fi
4490 done
4491 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4492 if test $ac_header_dirent = dirent.h; then
4493 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4494 echo "configure:4495: checking for opendir in -ldir" >&5
4495 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4496 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4497   echo $ac_n "(cached) $ac_c" 1>&6
4498 else
4499   ac_save_LIBS="$LIBS"
4500 LIBS="-ldir  $LIBS"
4501 cat > conftest.$ac_ext <<EOF
4502 #line 4503 "configure"
4503 #include "confdefs.h"
4504 /* Override any gcc2 internal prototype to avoid an error.  */
4505 /* We use char because int might match the return type of a gcc2
4506     builtin and then its argument prototype would still apply.  */
4507 char opendir();
4508
4509 int main() {
4510 opendir()
4511 ; return 0; }
4512 EOF
4513 if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4514   rm -rf conftest*
4515   eval "ac_cv_lib_$ac_lib_var=yes"
4516 else
4517   echo "configure: failed program was:" >&5
4518   cat conftest.$ac_ext >&5
4519   rm -rf conftest*
4520   eval "ac_cv_lib_$ac_lib_var=no"
4521 fi
4522 rm -f conftest*
4523 LIBS="$ac_save_LIBS"
4524
4525 fi
4526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4527   echo "$ac_t""yes" 1>&6
4528   LIBS="$LIBS -ldir"
4529 else
4530   echo "$ac_t""no" 1>&6
4531 fi
4532
4533 else
4534 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4535 echo "configure:4536: checking for opendir in -lx" >&5
4536 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4537 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4538   echo $ac_n "(cached) $ac_c" 1>&6
4539 else
4540   ac_save_LIBS="$LIBS"
4541 LIBS="-lx  $LIBS"
4542 cat > conftest.$ac_ext <<EOF
4543 #line 4544 "configure"
4544 #include "confdefs.h"
4545 /* Override any gcc2 internal prototype to avoid an error.  */
4546 /* We use char because int might match the return type of a gcc2
4547     builtin and then its argument prototype would still apply.  */
4548 char opendir();
4549
4550 int main() {
4551 opendir()
4552 ; return 0; }
4553 EOF
4554 if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4555   rm -rf conftest*
4556   eval "ac_cv_lib_$ac_lib_var=yes"
4557 else
4558   echo "configure: failed program was:" >&5
4559   cat conftest.$ac_ext >&5
4560   rm -rf conftest*
4561   eval "ac_cv_lib_$ac_lib_var=no"
4562 fi
4563 rm -f conftest*
4564 LIBS="$ac_save_LIBS"
4565
4566 fi
4567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4568   echo "$ac_t""yes" 1>&6
4569   LIBS="$LIBS -lx"
4570 else
4571   echo "$ac_t""no" 1>&6
4572 fi
4573
4574 fi
4575
4576 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4577 echo "configure:4578: checking for sys/wait.h that is POSIX.1 compatible" >&5
4578 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4579   echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581   cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 #include <sys/types.h>
4585 #include <sys/wait.h>
4586 #ifndef WEXITSTATUS
4587 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4588 #endif
4589 #ifndef WIFEXITED
4590 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4591 #endif
4592 int main() {
4593 int s;
4594 wait (&s);
4595 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4596 ; return 0; }
4597 EOF
4598 if { (eval echo configure:4599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4599   rm -rf conftest*
4600   ac_cv_header_sys_wait_h=yes
4601 else
4602   echo "configure: failed program was:" >&5
4603   cat conftest.$ac_ext >&5
4604   rm -rf conftest*
4605   ac_cv_header_sys_wait_h=no
4606 fi
4607 rm -f conftest*
4608 fi
4609
4610 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4611 if test $ac_cv_header_sys_wait_h = yes; then
4612   cat >> confdefs.h <<\EOF
4613 #define HAVE_SYS_WAIT_H 1
4614 EOF
4615
4616 fi
4617
4618 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4619 echo "configure:4620: checking POSIX termios" >&5
4620 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4626 #include <sys/types.h>
4627 #include <unistd.h>
4628 #include <termios.h>
4629 int main() {
4630 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4631    tcgetattr(0, 0);
4632 ; return 0; }
4633 EOF
4634 if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4635   rm -rf conftest*
4636   am_cv_sys_posix_termios=yes
4637 else
4638   echo "configure: failed program was:" >&5
4639   cat conftest.$ac_ext >&5
4640   rm -rf conftest*
4641   am_cv_sys_posix_termios=no
4642 fi
4643 rm -f conftest*
4644 fi
4645
4646 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4647
4648
4649  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4650 echo "configure:4651: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4651 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4652   echo $ac_n "(cached) $ac_c" 1>&6
4653 else
4654   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4655
4656   gwinsz_in_termios_h=no
4657   if test $am_cv_sys_posix_termios = yes; then
4658     cat > conftest.$ac_ext <<EOF
4659 #line 4660 "configure"
4660 #include "confdefs.h"
4661 #include <sys/types.h>
4662 #     include <termios.h>
4663 #     ifdef TIOCGWINSZ
4664         yes
4665 #     endif
4666     
4667 EOF
4668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4669   egrep "yes" >/dev/null 2>&1; then
4670   rm -rf conftest*
4671   gwinsz_in_termios_h=yes
4672 fi
4673 rm -f conftest*
4674
4675   fi
4676
4677   if test $gwinsz_in_termios_h = no; then
4678     cat > conftest.$ac_ext <<EOF
4679 #line 4680 "configure"
4680 #include "confdefs.h"
4681 #include <sys/types.h>
4682 #     include <sys/ioctl.h>
4683 #     ifdef TIOCGWINSZ
4684         yes
4685 #     endif
4686     
4687 EOF
4688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4689   egrep "yes" >/dev/null 2>&1; then
4690   rm -rf conftest*
4691   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4692 fi
4693 rm -f conftest*
4694
4695   fi
4696   
4697 fi
4698
4699 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4700   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4701     cat >> confdefs.h <<\EOF
4702 #define GWINSZ_IN_SYS_IOCTL 1
4703 EOF
4704
4705   fi
4706
4707 if test $am_cv_sys_posix_termios = yes ; then
4708         cat >> confdefs.h <<\EOF
4709 #define HAVE_POSIX_TERMIOS 1
4710 EOF
4711
4712 fi
4713
4714 for ac_hdr in \
4715         arpa/inet.h             \
4716         arpa/nameser.h  \
4717         assert.h                \
4718         conio.h                 \
4719         crypt.h                 \
4720         direct.h                \
4721         errno.h                 \
4722         fcntl.h                 \
4723         filio.h                 \
4724         getopt.h                \
4725         grp.h                   \
4726         io.h                    \
4727         libutil.h               \
4728         limits.h                \
4729         locale.h                \
4730         netinet/tcp.h   \
4731         malloc.h                \
4732         memory.h                \
4733         psap.h                  \
4734         pwd.h                   \
4735         process.h               \
4736         resolv.h                \
4737         sgtty.h                 \
4738         shadow.h                \
4739         stddef.h                \
4740         string.h                \
4741         strings.h               \
4742         sysexits.h              \
4743         sys/file.h              \
4744         sys/filio.h             \
4745         sys/errno.h             \
4746         sys/ioctl.h             \
4747         sys/param.h             \
4748         sys/resource.h  \
4749         sys/select.h    \
4750         sys/socket.h    \
4751         sys/syslog.h    \
4752         sys/time.h              \
4753         sys/types.h             \
4754         syslog.h                \
4755         termios.h               \
4756         unistd.h                \
4757         winsock.h               \
4758
4759 do
4760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4762 echo "configure:4763: checking for $ac_hdr" >&5
4763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4764   echo $ac_n "(cached) $ac_c" 1>&6
4765 else
4766   cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769 #include <$ac_hdr>
4770 EOF
4771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4772 { (eval echo configure:4773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4774 if test -z "$ac_err"; then
4775   rm -rf conftest*
4776   eval "ac_cv_header_$ac_safe=yes"
4777 else
4778   echo "$ac_err" >&5
4779   echo "configure: failed program was:" >&5
4780   cat conftest.$ac_ext >&5
4781   rm -rf conftest*
4782   eval "ac_cv_header_$ac_safe=no"
4783 fi
4784 rm -f conftest*
4785 fi
4786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4787   echo "$ac_t""yes" 1>&6
4788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4789   cat >> confdefs.h <<EOF
4790 #define $ac_tr_hdr 1
4791 EOF
4792  
4793 else
4794   echo "$ac_t""no" 1>&6
4795 fi
4796 done
4797
4798
4799
4800
4801 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4802 echo "configure:4803: checking for sigset in -lV3" >&5
4803 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4805   echo $ac_n "(cached) $ac_c" 1>&6
4806 else
4807   ac_save_LIBS="$LIBS"
4808 LIBS="-lV3  $LIBS"
4809 cat > conftest.$ac_ext <<EOF
4810 #line 4811 "configure"
4811 #include "confdefs.h"
4812 /* Override any gcc2 internal prototype to avoid an error.  */
4813 /* We use char because int might match the return type of a gcc2
4814     builtin and then its argument prototype would still apply.  */
4815 char sigset();
4816
4817 int main() {
4818 sigset()
4819 ; return 0; }
4820 EOF
4821 if { (eval echo configure:4822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4822   rm -rf conftest*
4823   eval "ac_cv_lib_$ac_lib_var=yes"
4824 else
4825   echo "configure: failed program was:" >&5
4826   cat conftest.$ac_ext >&5
4827   rm -rf conftest*
4828   eval "ac_cv_lib_$ac_lib_var=no"
4829 fi
4830 rm -f conftest*
4831 LIBS="$ac_save_LIBS"
4832
4833 fi
4834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4835   echo "$ac_t""yes" 1>&6
4836     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4837     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4838   cat >> confdefs.h <<EOF
4839 #define $ac_tr_lib 1
4840 EOF
4841
4842   LIBS="-lV3 $LIBS"
4843
4844 else
4845   echo "$ac_t""no" 1>&6
4846 fi
4847
4848
4849 if test $ac_cv_header_winsock_h = yes; then
4850         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4851 echo "configure:4852: checking for winsock" >&5
4852 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4853   echo $ac_n "(cached) $ac_c" 1>&6
4854 else
4855   cat > conftest.$ac_ext <<EOF
4856 #line 4857 "configure"
4857 #include "confdefs.h"
4858 #include <winsock.h>
4859 int main() {
4860
4861                         socket(0,0,0);
4862                         select(0,NULL,NULL,NULL,NULL);
4863                         closesocket(0);
4864                         gethostname(NULL,0);
4865         
4866 ; return 0; }
4867 EOF
4868 if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4869   rm -rf conftest*
4870   ol_cv_winsock=yes
4871 else
4872   echo "configure: failed program was:" >&5
4873   cat conftest.$ac_ext >&5
4874   rm -rf conftest*
4875   ol_cv_winsock=no
4876 fi
4877 rm -f conftest*]
4878 fi
4879
4880 echo "$ac_t""$ol_cv_winsock" 1>&6
4881
4882         if test $ol_cv_winsock = yes ; then
4883                 cat >> confdefs.h <<\EOF
4884 #define HAVE_WINSOCK 1
4885 EOF
4886
4887                 ac_cv_func_socket=yes
4888                 ac_cv_func_select=yes
4889                 ac_cv_func_closesocket=yes
4890                 ac_cv_func_gethostname=yes
4891         fi
4892 fi
4893
4894
4895 echo $ac_n "checking for socket""... $ac_c" 1>&6
4896 echo "configure:4897: checking for socket" >&5
4897 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4898   echo $ac_n "(cached) $ac_c" 1>&6
4899 else
4900   cat > conftest.$ac_ext <<EOF
4901 #line 4902 "configure"
4902 #include "confdefs.h"
4903 /* System header to define __stub macros and hopefully few prototypes,
4904     which can conflict with char socket(); below.  */
4905 #include <assert.h>
4906 /* Override any gcc2 internal prototype to avoid an error.  */
4907 /* We use char because int might match the return type of a gcc2
4908     builtin and then its argument prototype would still apply.  */
4909 char socket();
4910 char (*f)();
4911
4912 int main() {
4913
4914 /* The GNU C library defines this for functions which it implements
4915     to always fail with ENOSYS.  Some functions are actually named
4916     something starting with __ and the normal name is an alias.  */
4917 #if defined (__stub_socket) || defined (__stub___socket)
4918 choke me
4919 #else
4920 f = socket;
4921 #endif
4922
4923 ; return 0; }
4924 EOF
4925 if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4926   rm -rf conftest*
4927   eval "ac_cv_func_socket=yes"
4928 else
4929   echo "configure: failed program was:" >&5
4930   cat conftest.$ac_ext >&5
4931   rm -rf conftest*
4932   eval "ac_cv_func_socket=no"
4933 fi
4934 rm -f conftest*
4935 fi
4936
4937 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4938   echo "$ac_t""yes" 1>&6
4939   :
4940 else
4941   echo "$ac_t""no" 1>&6
4942         
4943         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4944 echo "configure:4945: checking for main in -lsocket" >&5
4945 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4946 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4947   echo $ac_n "(cached) $ac_c" 1>&6
4948 else
4949   ac_save_LIBS="$LIBS"
4950 LIBS="-lsocket  $LIBS"
4951 cat > conftest.$ac_ext <<EOF
4952 #line 4953 "configure"
4953 #include "confdefs.h"
4954
4955 int main() {
4956 main()
4957 ; return 0; }
4958 EOF
4959 if { (eval echo configure:4960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4960   rm -rf conftest*
4961   eval "ac_cv_lib_$ac_lib_var=yes"
4962 else
4963   echo "configure: failed program was:" >&5
4964   cat conftest.$ac_ext >&5
4965   rm -rf conftest*
4966   eval "ac_cv_lib_$ac_lib_var=no"
4967 fi
4968 rm -f conftest*
4969 LIBS="$ac_save_LIBS"
4970
4971 fi
4972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4973   echo "$ac_t""yes" 1>&6
4974     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4975     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4976   cat >> confdefs.h <<EOF
4977 #define $ac_tr_lib 1
4978 EOF
4979
4980   LIBS="-lsocket $LIBS"
4981
4982 else
4983   echo "$ac_t""no" 1>&6
4984 fi
4985
4986         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4987 echo "configure:4988: checking for main in -lnet" >&5
4988 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4990   echo $ac_n "(cached) $ac_c" 1>&6
4991 else
4992   ac_save_LIBS="$LIBS"
4993 LIBS="-lnet  $LIBS"
4994 cat > conftest.$ac_ext <<EOF
4995 #line 4996 "configure"
4996 #include "confdefs.h"
4997
4998 int main() {
4999 main()
5000 ; return 0; }
5001 EOF
5002 if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5003   rm -rf conftest*
5004   eval "ac_cv_lib_$ac_lib_var=yes"
5005 else
5006   echo "configure: failed program was:" >&5
5007   cat conftest.$ac_ext >&5
5008   rm -rf conftest*
5009   eval "ac_cv_lib_$ac_lib_var=no"
5010 fi
5011 rm -f conftest*
5012 LIBS="$ac_save_LIBS"
5013
5014 fi
5015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5016   echo "$ac_t""yes" 1>&6
5017     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5019   cat >> confdefs.h <<EOF
5020 #define $ac_tr_lib 1
5021 EOF
5022
5023   LIBS="-lnet $LIBS"
5024
5025 else
5026   echo "$ac_t""no" 1>&6
5027 fi
5028
5029         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5030 echo "configure:5031: checking for main in -lnsl_s" >&5
5031 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5032 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5033   echo $ac_n "(cached) $ac_c" 1>&6
5034 else
5035   ac_save_LIBS="$LIBS"
5036 LIBS="-lnsl_s  $LIBS"
5037 cat > conftest.$ac_ext <<EOF
5038 #line 5039 "configure"
5039 #include "confdefs.h"
5040
5041 int main() {
5042 main()
5043 ; return 0; }
5044 EOF
5045 if { (eval echo configure:5046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5046   rm -rf conftest*
5047   eval "ac_cv_lib_$ac_lib_var=yes"
5048 else
5049   echo "configure: failed program was:" >&5
5050   cat conftest.$ac_ext >&5
5051   rm -rf conftest*
5052   eval "ac_cv_lib_$ac_lib_var=no"
5053 fi
5054 rm -f conftest*
5055 LIBS="$ac_save_LIBS"
5056
5057 fi
5058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5059   echo "$ac_t""yes" 1>&6
5060     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5061     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5062   cat >> confdefs.h <<EOF
5063 #define $ac_tr_lib 1
5064 EOF
5065
5066   LIBS="-lnsl_s $LIBS"
5067
5068 else
5069   echo "$ac_t""no" 1>&6
5070 fi
5071
5072         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5073 echo "configure:5074: checking for main in -lnsl" >&5
5074 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5076   echo $ac_n "(cached) $ac_c" 1>&6
5077 else
5078   ac_save_LIBS="$LIBS"
5079 LIBS="-lnsl  $LIBS"
5080 cat > conftest.$ac_ext <<EOF
5081 #line 5082 "configure"
5082 #include "confdefs.h"
5083
5084 int main() {
5085 main()
5086 ; return 0; }
5087 EOF
5088 if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5089   rm -rf conftest*
5090   eval "ac_cv_lib_$ac_lib_var=yes"
5091 else
5092   echo "configure: failed program was:" >&5
5093   cat conftest.$ac_ext >&5
5094   rm -rf conftest*
5095   eval "ac_cv_lib_$ac_lib_var=no"
5096 fi
5097 rm -f conftest*
5098 LIBS="$ac_save_LIBS"
5099
5100 fi
5101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5102   echo "$ac_t""yes" 1>&6
5103     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5104     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5105   cat >> confdefs.h <<EOF
5106 #define $ac_tr_lib 1
5107 EOF
5108
5109   LIBS="-lnsl $LIBS"
5110
5111 else
5112   echo "$ac_t""no" 1>&6
5113 fi
5114
5115         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5116 echo "configure:5117: checking for socket in -linet" >&5
5117 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5118 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5119   echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121   ac_save_LIBS="$LIBS"
5122 LIBS="-linet  $LIBS"
5123 cat > conftest.$ac_ext <<EOF
5124 #line 5125 "configure"
5125 #include "confdefs.h"
5126 /* Override any gcc2 internal prototype to avoid an error.  */
5127 /* We use char because int might match the return type of a gcc2
5128     builtin and then its argument prototype would still apply.  */
5129 char socket();
5130
5131 int main() {
5132 socket()
5133 ; return 0; }
5134 EOF
5135 if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5136   rm -rf conftest*
5137   eval "ac_cv_lib_$ac_lib_var=yes"
5138 else
5139   echo "configure: failed program was:" >&5
5140   cat conftest.$ac_ext >&5
5141   rm -rf conftest*
5142   eval "ac_cv_lib_$ac_lib_var=no"
5143 fi
5144 rm -f conftest*
5145 LIBS="$ac_save_LIBS"
5146
5147 fi
5148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5149   echo "$ac_t""yes" 1>&6
5150     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5151     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5152   cat >> confdefs.h <<EOF
5153 #define $ac_tr_lib 1
5154 EOF
5155
5156   LIBS="-linet $LIBS"
5157
5158 else
5159   echo "$ac_t""no" 1>&6
5160 fi
5161
5162         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5163 echo "configure:5164: checking for main in -lgen" >&5
5164 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5166   echo $ac_n "(cached) $ac_c" 1>&6
5167 else
5168   ac_save_LIBS="$LIBS"
5169 LIBS="-lgen  $LIBS"
5170 cat > conftest.$ac_ext <<EOF
5171 #line 5172 "configure"
5172 #include "confdefs.h"
5173
5174 int main() {
5175 main()
5176 ; return 0; }
5177 EOF
5178 if { (eval echo configure:5179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5179   rm -rf conftest*
5180   eval "ac_cv_lib_$ac_lib_var=yes"
5181 else
5182   echo "configure: failed program was:" >&5
5183   cat conftest.$ac_ext >&5
5184   rm -rf conftest*
5185   eval "ac_cv_lib_$ac_lib_var=no"
5186 fi
5187 rm -f conftest*
5188 LIBS="$ac_save_LIBS"
5189
5190 fi
5191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5192   echo "$ac_t""yes" 1>&6
5193     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5194     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5195   cat >> confdefs.h <<EOF
5196 #define $ac_tr_lib 1
5197 EOF
5198
5199   LIBS="-lgen $LIBS"
5200
5201 else
5202   echo "$ac_t""no" 1>&6
5203 fi
5204
5205
5206 fi
5207
5208
5209 echo $ac_n "checking for select""... $ac_c" 1>&6
5210 echo "configure:5211: checking for select" >&5
5211 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5212   echo $ac_n "(cached) $ac_c" 1>&6
5213 else
5214   cat > conftest.$ac_ext <<EOF
5215 #line 5216 "configure"
5216 #include "confdefs.h"
5217 /* System header to define __stub macros and hopefully few prototypes,
5218     which can conflict with char select(); below.  */
5219 #include <assert.h>
5220 /* Override any gcc2 internal prototype to avoid an error.  */
5221 /* We use char because int might match the return type of a gcc2
5222     builtin and then its argument prototype would still apply.  */
5223 char select();
5224 char (*f)();
5225
5226 int main() {
5227
5228 /* The GNU C library defines this for functions which it implements
5229     to always fail with ENOSYS.  Some functions are actually named
5230     something starting with __ and the normal name is an alias.  */
5231 #if defined (__stub_select) || defined (__stub___select)
5232 choke me
5233 #else
5234 f = select;
5235 #endif
5236
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5240   rm -rf conftest*
5241   eval "ac_cv_func_select=yes"
5242 else
5243   echo "configure: failed program was:" >&5
5244   cat conftest.$ac_ext >&5
5245   rm -rf conftest*
5246   eval "ac_cv_func_select=no"
5247 fi
5248 rm -f conftest*
5249 fi
5250
5251 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5252   echo "$ac_t""yes" 1>&6
5253   :
5254 else
5255   echo "$ac_t""no" 1>&6
5256 { echo "configure: error: select() required." 1>&2; exit 1; }
5257 fi
5258
5259
5260 if test "${ac_cv_header_winsock_h}" != yes; then
5261                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5262 echo "configure:5263: checking types of arguments for select()" >&5
5263  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5264   echo $ac_n "(cached) $ac_c" 1>&6
5265 else
5266    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5270   echo $ac_n "(cached) $ac_c" 1>&6
5271 else
5272      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5273      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5274       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5275        cat > conftest.$ac_ext <<EOF
5276 #line 5277 "configure"
5277 #include "confdefs.h"
5278 #ifdef HAVE_SYS_TYPES_H
5279 #include <sys/types.h>
5280 #endif
5281 #ifdef HAVE_SYS_TIME_H
5282 #include <sys/time.h>
5283 #endif
5284 #ifdef HAVE_SYS_SELECT_H
5285 #include <sys/select.h>
5286 #endif
5287 #ifdef HAVE_SYS_SOCKET_H
5288 #include <sys/socket.h>
5289 #endif
5290 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
5291 int main() {
5292
5293 ; return 0; }
5294 EOF
5295 if { (eval echo configure:5296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5296   rm -rf conftest*
5297           ac_not_found=no ; break 3
5298 else
5299   echo "configure: failed program was:" >&5
5300   cat conftest.$ac_ext >&5
5301   rm -rf conftest*
5302   ac_not_found=yes
5303 fi
5304 rm -f conftest*
5305       done
5306      done
5307     done
5308    
5309 fi
5310   
5311 fi
5312  
5313 fi
5314  if test "$ac_not_found" = yes; then
5315   ac_cv_func_select_arg1=int 
5316   ac_cv_func_select_arg234='int *' 
5317   ac_cv_func_select_arg5='struct timeval *'
5318  fi
5319  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5320  cat >> confdefs.h <<EOF
5321 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5322 EOF
5323
5324  cat >> confdefs.h <<EOF
5325 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5326 EOF
5327
5328  cat >> confdefs.h <<EOF
5329 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5330 EOF
5331
5332
5333 fi
5334
5335
5336 for ac_hdr in regex.h 
5337 do
5338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5340 echo "configure:5341: checking for $ac_hdr" >&5
5341 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5342   echo $ac_n "(cached) $ac_c" 1>&6
5343 else
5344   cat > conftest.$ac_ext <<EOF
5345 #line 5346 "configure"
5346 #include "confdefs.h"
5347 #include <$ac_hdr>
5348 EOF
5349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5350 { (eval echo configure:5351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5352 if test -z "$ac_err"; then
5353   rm -rf conftest*
5354   eval "ac_cv_header_$ac_safe=yes"
5355 else
5356   echo "$ac_err" >&5
5357   echo "configure: failed program was:" >&5
5358   cat conftest.$ac_ext >&5
5359   rm -rf conftest*
5360   eval "ac_cv_header_$ac_safe=no"
5361 fi
5362 rm -f conftest*
5363 fi
5364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5365   echo "$ac_t""yes" 1>&6
5366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5367   cat >> confdefs.h <<EOF
5368 #define $ac_tr_hdr 1
5369 EOF
5370  
5371 else
5372   echo "$ac_t""no" 1>&6
5373 fi
5374 done
5375
5376 if test "$ac_cv_header_regex_h" != yes ; then
5377         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5378 fi
5379 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5380 echo "configure:5381: checking for regfree" >&5
5381 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5382   echo $ac_n "(cached) $ac_c" 1>&6
5383 else
5384   cat > conftest.$ac_ext <<EOF
5385 #line 5386 "configure"
5386 #include "confdefs.h"
5387 /* System header to define __stub macros and hopefully few prototypes,
5388     which can conflict with char regfree(); below.  */
5389 #include <assert.h>
5390 /* Override any gcc2 internal prototype to avoid an error.  */
5391 /* We use char because int might match the return type of a gcc2
5392     builtin and then its argument prototype would still apply.  */
5393 char regfree();
5394 char (*f)();
5395
5396 int main() {
5397
5398 /* The GNU C library defines this for functions which it implements
5399     to always fail with ENOSYS.  Some functions are actually named
5400     something starting with __ and the normal name is an alias.  */
5401 #if defined (__stub_regfree) || defined (__stub___regfree)
5402 choke me
5403 #else
5404 f = regfree;
5405 #endif
5406
5407 ; return 0; }
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5410   rm -rf conftest*
5411   eval "ac_cv_func_regfree=yes"
5412 else
5413   echo "configure: failed program was:" >&5
5414   cat conftest.$ac_ext >&5
5415   rm -rf conftest*
5416   eval "ac_cv_func_regfree=no"
5417 fi
5418 rm -f conftest*
5419 fi
5420
5421 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5422   echo "$ac_t""yes" 1>&6
5423   :
5424 else
5425   echo "$ac_t""no" 1>&6
5426 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5427 fi
5428
5429
5430
5431 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5432 echo "configure:5433: checking for compatible POSIX regex" >&5
5433 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5434   echo $ac_n "(cached) $ac_c" 1>&6
5435 else
5436   
5437         if test "$cross_compiling" = yes; then
5438   ol_cv_c_posix_regex=cross
5439 else
5440   cat > conftest.$ac_ext <<EOF
5441 #line 5442 "configure"
5442 #include "confdefs.h"
5443
5444 #include <sys/types.h>
5445 #include <regex.h>
5446 static char *pattern, *string;
5447 main()
5448 {
5449         int rc;
5450         regex_t re;
5451
5452         pattern = "^A";
5453
5454         if(regcomp(&re, pattern, 0)) {
5455                 return -1;
5456         }
5457         
5458         string = "ALL MATCH";
5459         
5460         rc = regexec(&re, string, 0, (void*)0, 0);
5461
5462         regfree(&re);
5463
5464         return rc;
5465 }
5466 EOF
5467 if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5468 then
5469   ol_cv_c_posix_regex=yes
5470 else
5471   echo "configure: failed program was:" >&5
5472   cat conftest.$ac_ext >&5
5473   rm -fr conftest*
5474   ol_cv_c_posix_regex=no
5475 fi
5476 rm -fr conftest*
5477 fi
5478
5479 fi
5480
5481 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5482
5483 if test "$ol_cv_c_posix_regex" = no ; then
5484         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5485 fi
5486
5487 ol_link_dnssrv=no
5488 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5489 echo "configure:5490: checking for res_query" >&5
5490 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5491   echo $ac_n "(cached) $ac_c" 1>&6
5492 else
5493   cat > conftest.$ac_ext <<EOF
5494 #line 5495 "configure"
5495 #include "confdefs.h"
5496 /* System header to define __stub macros and hopefully few prototypes,
5497     which can conflict with char res_query(); below.  */
5498 #include <assert.h>
5499 /* Override any gcc2 internal prototype to avoid an error.  */
5500 /* We use char because int might match the return type of a gcc2
5501     builtin and then its argument prototype would still apply.  */
5502 char res_query();
5503 char (*f)();
5504
5505 int main() {
5506
5507 /* The GNU C library defines this for functions which it implements
5508     to always fail with ENOSYS.  Some functions are actually named
5509     something starting with __ and the normal name is an alias.  */
5510 #if defined (__stub_res_query) || defined (__stub___res_query)
5511 choke me
5512 #else
5513 f = res_query;
5514 #endif
5515
5516 ; return 0; }
5517 EOF
5518 if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5519   rm -rf conftest*
5520   eval "ac_cv_func_res_query=yes"
5521 else
5522   echo "configure: failed program was:" >&5
5523   cat conftest.$ac_ext >&5
5524   rm -rf conftest*
5525   eval "ac_cv_func_res_query=no"
5526 fi
5527 rm -f conftest*
5528 fi
5529
5530 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5531   echo "$ac_t""yes" 1>&6
5532   :
5533 else
5534   echo "$ac_t""no" 1>&6
5535 fi
5536
5537 if test $ac_cv_func_res_query = no ; then 
5538         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5539 echo "configure:5540: checking for res_query in -lbind" >&5
5540 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5542   echo $ac_n "(cached) $ac_c" 1>&6
5543 else
5544   ac_save_LIBS="$LIBS"
5545 LIBS="-lbind  $LIBS"
5546 cat > conftest.$ac_ext <<EOF
5547 #line 5548 "configure"
5548 #include "confdefs.h"
5549 /* Override any gcc2 internal prototype to avoid an error.  */
5550 /* We use char because int might match the return type of a gcc2
5551     builtin and then its argument prototype would still apply.  */
5552 char res_query();
5553
5554 int main() {
5555 res_query()
5556 ; return 0; }
5557 EOF
5558 if { (eval echo configure:5559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5559   rm -rf conftest*
5560   eval "ac_cv_lib_$ac_lib_var=yes"
5561 else
5562   echo "configure: failed program was:" >&5
5563   cat conftest.$ac_ext >&5
5564   rm -rf conftest*
5565   eval "ac_cv_lib_$ac_lib_var=no"
5566 fi
5567 rm -f conftest*
5568 LIBS="$ac_save_LIBS"
5569
5570 fi
5571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5572   echo "$ac_t""yes" 1>&6
5573     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5574     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5575   cat >> confdefs.h <<EOF
5576 #define $ac_tr_lib 1
5577 EOF
5578
5579   LIBS="-lbind $LIBS"
5580
5581 else
5582   echo "$ac_t""no" 1>&6
5583 fi
5584
5585         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5586 fi
5587
5588 if test $ac_cv_func_res_query = no ; then 
5589         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5590 echo "configure:5591: checking for __res_query in -lbind" >&5
5591 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5592 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5593   echo $ac_n "(cached) $ac_c" 1>&6
5594 else
5595   ac_save_LIBS="$LIBS"
5596 LIBS="-lbind  $LIBS"
5597 cat > conftest.$ac_ext <<EOF
5598 #line 5599 "configure"
5599 #include "confdefs.h"
5600 /* Override any gcc2 internal prototype to avoid an error.  */
5601 /* We use char because int might match the return type of a gcc2
5602     builtin and then its argument prototype would still apply.  */
5603 char __res_query();
5604
5605 int main() {
5606 __res_query()
5607 ; return 0; }
5608 EOF
5609 if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5610   rm -rf conftest*
5611   eval "ac_cv_lib_$ac_lib_var=yes"
5612 else
5613   echo "configure: failed program was:" >&5
5614   cat conftest.$ac_ext >&5
5615   rm -rf conftest*
5616   eval "ac_cv_lib_$ac_lib_var=no"
5617 fi
5618 rm -f conftest*
5619 LIBS="$ac_save_LIBS"
5620
5621 fi
5622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5623   echo "$ac_t""yes" 1>&6
5624     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5625     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5626   cat >> confdefs.h <<EOF
5627 #define $ac_tr_lib 1
5628 EOF
5629
5630   LIBS="-lbind $LIBS"
5631
5632 else
5633   echo "$ac_t""no" 1>&6
5634 fi
5635
5636         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5637 fi
5638
5639 if test $ac_cv_func_res_query = no ; then 
5640         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5641 echo "configure:5642: checking for res_query in -lresolv" >&5
5642 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5643 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5644   echo $ac_n "(cached) $ac_c" 1>&6
5645 else
5646   ac_save_LIBS="$LIBS"
5647 LIBS="-lresolv  $LIBS"
5648 cat > conftest.$ac_ext <<EOF
5649 #line 5650 "configure"
5650 #include "confdefs.h"
5651 /* Override any gcc2 internal prototype to avoid an error.  */
5652 /* We use char because int might match the return type of a gcc2
5653     builtin and then its argument prototype would still apply.  */
5654 char res_query();
5655
5656 int main() {
5657 res_query()
5658 ; return 0; }
5659 EOF
5660 if { (eval echo configure:5661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5661   rm -rf conftest*
5662   eval "ac_cv_lib_$ac_lib_var=yes"
5663 else
5664   echo "configure: failed program was:" >&5
5665   cat conftest.$ac_ext >&5
5666   rm -rf conftest*
5667   eval "ac_cv_lib_$ac_lib_var=no"
5668 fi
5669 rm -f conftest*
5670 LIBS="$ac_save_LIBS"
5671
5672 fi
5673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5674   echo "$ac_t""yes" 1>&6
5675     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5676     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5677   cat >> confdefs.h <<EOF
5678 #define $ac_tr_lib 1
5679 EOF
5680
5681   LIBS="-lresolv $LIBS"
5682
5683 else
5684   echo "$ac_t""no" 1>&6
5685 fi
5686
5687         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5688 fi
5689
5690 if test "$ac_cv_func_res_query" = yes ; then
5691         cat >> confdefs.h <<\EOF
5692 #define HAVE_RES_QUERY 1
5693 EOF
5694
5695
5696         if test $ol_enable_dnssrv != no ; then
5697                 ol_link_dnssrv=yes
5698         fi
5699 fi
5700
5701 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5702         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5703 fi
5704
5705 for ac_func in getaddrinfo 
5706 do
5707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5708 echo "configure:5709: checking for $ac_func" >&5
5709 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5710   echo $ac_n "(cached) $ac_c" 1>&6
5711 else
5712   cat > conftest.$ac_ext <<EOF
5713 #line 5714 "configure"
5714 #include "confdefs.h"
5715 /* System header to define __stub macros and hopefully few prototypes,
5716     which can conflict with char $ac_func(); below.  */
5717 #include <assert.h>
5718 /* Override any gcc2 internal prototype to avoid an error.  */
5719 /* We use char because int might match the return type of a gcc2
5720     builtin and then its argument prototype would still apply.  */
5721 char $ac_func();
5722 char (*f)();
5723
5724 int main() {
5725
5726 /* The GNU C library defines this for functions which it implements
5727     to always fail with ENOSYS.  Some functions are actually named
5728     something starting with __ and the normal name is an alias.  */
5729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5730 choke me
5731 #else
5732 f = $ac_func;
5733 #endif
5734
5735 ; return 0; }
5736 EOF
5737 if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5738   rm -rf conftest*
5739   eval "ac_cv_func_$ac_func=yes"
5740 else
5741   echo "configure: failed program was:" >&5
5742   cat conftest.$ac_ext >&5
5743   rm -rf conftest*
5744   eval "ac_cv_func_$ac_func=no"
5745 fi
5746 rm -f conftest*
5747 fi
5748
5749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5750   echo "$ac_t""yes" 1>&6
5751     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5752   cat >> confdefs.h <<EOF
5753 #define $ac_tr_func 1
5754 EOF
5755  
5756 else
5757   echo "$ac_t""no" 1>&6
5758 fi
5759 done
5760
5761
5762 ol_link_ipv6=no
5763 if test $ac_cv_func_getaddrinfo = no ; then
5764         if test $ol_enable_ipv6 = yes ; then
5765                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5766         fi
5767 else
5768         for ac_func in gai_strerror 
5769 do
5770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5771 echo "configure:5772: checking for $ac_func" >&5
5772 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5773   echo $ac_n "(cached) $ac_c" 1>&6
5774 else
5775   cat > conftest.$ac_ext <<EOF
5776 #line 5777 "configure"
5777 #include "confdefs.h"
5778 /* System header to define __stub macros and hopefully few prototypes,
5779     which can conflict with char $ac_func(); below.  */
5780 #include <assert.h>
5781 /* Override any gcc2 internal prototype to avoid an error.  */
5782 /* We use char because int might match the return type of a gcc2
5783     builtin and then its argument prototype would still apply.  */
5784 char $ac_func();
5785 char (*f)();
5786
5787 int main() {
5788
5789 /* The GNU C library defines this for functions which it implements
5790     to always fail with ENOSYS.  Some functions are actually named
5791     something starting with __ and the normal name is an alias.  */
5792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5793 choke me
5794 #else
5795 f = $ac_func;
5796 #endif
5797
5798 ; return 0; }
5799 EOF
5800 if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5801   rm -rf conftest*
5802   eval "ac_cv_func_$ac_func=yes"
5803 else
5804   echo "configure: failed program was:" >&5
5805   cat conftest.$ac_ext >&5
5806   rm -rf conftest*
5807   eval "ac_cv_func_$ac_func=no"
5808 fi
5809 rm -f conftest*
5810 fi
5811
5812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5813   echo "$ac_t""yes" 1>&6
5814     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5815   cat >> confdefs.h <<EOF
5816 #define $ac_tr_func 1
5817 EOF
5818  
5819 else
5820   echo "$ac_t""no" 1>&6
5821 fi
5822 done
5823
5824
5825         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5826 echo "configure:5827: checking INET6_ADDRSTRLEN" >&5
5827 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5828   echo $ac_n "(cached) $ac_c" 1>&6
5829 else
5830   
5831                 cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834
5835 #                       include <netinet/in.h>
5836 #                       ifdef INET6_ADDRSTRLEN
5837                                 __has_inet6_addrstrlen__;
5838 #                       endif
5839                 
5840 EOF
5841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5842   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5843   rm -rf conftest*
5844   ol_cv_inet6_addrstrlen=yes
5845 else
5846   rm -rf conftest*
5847   ol_cv_inet6_addrstrlen=no
5848 fi
5849 rm -f conftest*
5850
5851 fi
5852
5853 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5854
5855         if test $ol_cv_inet6_addrstrlen = yes ; then
5856                 ol_link_ipv6=yes
5857         elif test $ol_enable_ipv6 = yes ; then
5858                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5859         fi
5860 fi
5861
5862 if test $ol_enable_local != no ; then
5863         for ac_hdr in sys/un.h 
5864 do
5865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5867 echo "configure:5868: checking for $ac_hdr" >&5
5868 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5869   echo $ac_n "(cached) $ac_c" 1>&6
5870 else
5871   cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 #include <$ac_hdr>
5875 EOF
5876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5877 { (eval echo configure:5878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5879 if test -z "$ac_err"; then
5880   rm -rf conftest*
5881   eval "ac_cv_header_$ac_safe=yes"
5882 else
5883   echo "$ac_err" >&5
5884   echo "configure: failed program was:" >&5
5885   cat conftest.$ac_ext >&5
5886   rm -rf conftest*
5887   eval "ac_cv_header_$ac_safe=no"
5888 fi
5889 rm -f conftest*
5890 fi
5891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5892   echo "$ac_t""yes" 1>&6
5893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5894   cat >> confdefs.h <<EOF
5895 #define $ac_tr_hdr 1
5896 EOF
5897  
5898 else
5899   echo "$ac_t""no" 1>&6
5900 fi
5901 done
5902
5903
5904         if test $ol_enable_local = auto ; then
5905                 ol_enable_local=$ac_cv_header_sys_un_h
5906         elif test $ac_cv_header_sys_un_h = no ; then
5907                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5908         fi
5909 fi
5910
5911 ol_link_kbind=no
5912 ol_link_kpasswd=no
5913 ol_link_krb5=no
5914 ol_link_krb4=no
5915
5916 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5917         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5918         -o $ol_with_kerberos = k425 ; then
5919
5920         for ac_hdr in krb5.h
5921 do
5922 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5923 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5924 echo "configure:5925: checking for $ac_hdr" >&5
5925 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5926   echo $ac_n "(cached) $ac_c" 1>&6
5927 else
5928   cat > conftest.$ac_ext <<EOF
5929 #line 5930 "configure"
5930 #include "confdefs.h"
5931 #include <$ac_hdr>
5932 EOF
5933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5934 { (eval echo configure:5935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5936 if test -z "$ac_err"; then
5937   rm -rf conftest*
5938   eval "ac_cv_header_$ac_safe=yes"
5939 else
5940   echo "$ac_err" >&5
5941   echo "configure: failed program was:" >&5
5942   cat conftest.$ac_ext >&5
5943   rm -rf conftest*
5944   eval "ac_cv_header_$ac_safe=no"
5945 fi
5946 rm -f conftest*
5947 fi
5948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5949   echo "$ac_t""yes" 1>&6
5950     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5951   cat >> confdefs.h <<EOF
5952 #define $ac_tr_hdr 1
5953 EOF
5954  
5955 else
5956   echo "$ac_t""no" 1>&6
5957 fi
5958 done
5959
5960
5961         if test $ac_cv_header_krb5_h = yes ; then
5962                                 for ac_hdr in heim_err.h
5963 do
5964 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5965 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5966 echo "configure:5967: checking for $ac_hdr" >&5
5967 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5968   echo $ac_n "(cached) $ac_c" 1>&6
5969 else
5970   cat > conftest.$ac_ext <<EOF
5971 #line 5972 "configure"
5972 #include "confdefs.h"
5973 #include <$ac_hdr>
5974 EOF
5975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5976 { (eval echo configure:5977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5978 if test -z "$ac_err"; then
5979   rm -rf conftest*
5980   eval "ac_cv_header_$ac_safe=yes"
5981 else
5982   echo "$ac_err" >&5
5983   echo "configure: failed program was:" >&5
5984   cat conftest.$ac_ext >&5
5985   rm -rf conftest*
5986   eval "ac_cv_header_$ac_safe=no"
5987 fi
5988 rm -f conftest*
5989 fi
5990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5991   echo "$ac_t""yes" 1>&6
5992     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5993   cat >> confdefs.h <<EOF
5994 #define $ac_tr_hdr 1
5995 EOF
5996  
5997 else
5998   echo "$ac_t""no" 1>&6
5999 fi
6000 done
6001
6002                 if test $ac_cv_header_heim_err_h = yes ; then
6003                         krb5_impl=heimdal
6004                 else
6005                         krb5_impl=mit
6006                 fi
6007
6008                 if test $krb5_impl = mit; then
6009                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6010 echo "configure:6011: checking for main in -lkrb5" >&5
6011 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6013   echo $ac_n "(cached) $ac_c" 1>&6
6014 else
6015   ac_save_LIBS="$LIBS"
6016 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6017 cat > conftest.$ac_ext <<EOF
6018 #line 6019 "configure"
6019 #include "confdefs.h"
6020
6021 int main() {
6022 main()
6023 ; return 0; }
6024 EOF
6025 if { (eval echo configure:6026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6026   rm -rf conftest*
6027   eval "ac_cv_lib_$ac_lib_var=yes"
6028 else
6029   echo "configure: failed program was:" >&5
6030   cat conftest.$ac_ext >&5
6031   rm -rf conftest*
6032   eval "ac_cv_lib_$ac_lib_var=no"
6033 fi
6034 rm -f conftest*
6035 LIBS="$ac_save_LIBS"
6036
6037 fi
6038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6039   echo "$ac_t""yes" 1>&6
6040   have_krb5=yes
6041                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6042 else
6043   echo "$ac_t""no" 1>&6
6044 have_krb5=no
6045 fi
6046
6047
6048                 elif test $krb5_impl = heimdal; then
6049                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6050 echo "configure:6051: checking for main in -lkrb5" >&5
6051 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6053   echo $ac_n "(cached) $ac_c" 1>&6
6054 else
6055   ac_save_LIBS="$LIBS"
6056 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6057 cat > conftest.$ac_ext <<EOF
6058 #line 6059 "configure"
6059 #include "confdefs.h"
6060
6061 int main() {
6062 main()
6063 ; return 0; }
6064 EOF
6065 if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066   rm -rf conftest*
6067   eval "ac_cv_lib_$ac_lib_var=yes"
6068 else
6069   echo "configure: failed program was:" >&5
6070   cat conftest.$ac_ext >&5
6071   rm -rf conftest*
6072   eval "ac_cv_lib_$ac_lib_var=no"
6073 fi
6074 rm -f conftest*
6075 LIBS="$ac_save_LIBS"
6076
6077 fi
6078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6079   echo "$ac_t""yes" 1>&6
6080   have_krb5=yes
6081                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6082 else
6083   echo "$ac_t""no" 1>&6
6084 have_krb5=no
6085 fi
6086
6087
6088                         cat >> confdefs.h <<\EOF
6089 #define HAVE_HEIMDAL_KERBEROS 1
6090 EOF
6091
6092                 else
6093                         have_krb5=no
6094                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6095                 fi
6096
6097                 if test $have_krb5 = yes ; then
6098                         ol_link_krb5=yes
6099
6100                         cat >> confdefs.h <<\EOF
6101 #define HAVE_KRB5 1
6102 EOF
6103
6104
6105                         if test $ol_enable_kpasswd != no ; then
6106                                 ol_link_kpasswd=yes;
6107                         fi
6108
6109                         if test $ol_with_kerberos = k5only ; then
6110                                 ol_with_kerberos=found
6111                         fi
6112
6113                 elif test $ol_with_kerberos != auto ; then
6114                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6115                 fi
6116
6117         fi
6118 fi
6119
6120 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6121         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6122
6123         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6124 do
6125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6127 echo "configure:6128: checking for $ac_hdr" >&5
6128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6129   echo $ac_n "(cached) $ac_c" 1>&6
6130 else
6131   cat > conftest.$ac_ext <<EOF
6132 #line 6133 "configure"
6133 #include "confdefs.h"
6134 #include <$ac_hdr>
6135 EOF
6136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6137 { (eval echo configure:6138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6139 if test -z "$ac_err"; then
6140   rm -rf conftest*
6141   eval "ac_cv_header_$ac_safe=yes"
6142 else
6143   echo "$ac_err" >&5
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   eval "ac_cv_header_$ac_safe=no"
6148 fi
6149 rm -f conftest*
6150 fi
6151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6152   echo "$ac_t""yes" 1>&6
6153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6154   cat >> confdefs.h <<EOF
6155 #define $ac_tr_hdr 1
6156 EOF
6157  
6158 else
6159   echo "$ac_t""no" 1>&6
6160 fi
6161 done
6162
6163
6164         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6165                 if test $krb5_impl = mit; then
6166                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6167 echo "configure:6168: checking for main in -lkrb4" >&5
6168 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6169 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6170   echo $ac_n "(cached) $ac_c" 1>&6
6171 else
6172   ac_save_LIBS="$LIBS"
6173 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6174 cat > conftest.$ac_ext <<EOF
6175 #line 6176 "configure"
6176 #include "confdefs.h"
6177
6178 int main() {
6179 main()
6180 ; return 0; }
6181 EOF
6182 if { (eval echo configure:6183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6183   rm -rf conftest*
6184   eval "ac_cv_lib_$ac_lib_var=yes"
6185 else
6186   echo "configure: failed program was:" >&5
6187   cat conftest.$ac_ext >&5
6188   rm -rf conftest*
6189   eval "ac_cv_lib_$ac_lib_var=no"
6190 fi
6191 rm -f conftest*
6192 LIBS="$ac_save_LIBS"
6193
6194 fi
6195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6196   echo "$ac_t""yes" 1>&6
6197   have_k425=yes
6198                                 KRB4_LIBS="-lkrb4 -ldes425"
6199 else
6200   echo "$ac_t""no" 1>&6
6201 have_k425=no
6202 fi
6203
6204
6205                 elif test $krb5_impl = heimdal; then
6206                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6207 echo "configure:6208: checking for main in -lkrb4" >&5
6208 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6209 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6210   echo $ac_n "(cached) $ac_c" 1>&6
6211 else
6212   ac_save_LIBS="$LIBS"
6213 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6214 cat > conftest.$ac_ext <<EOF
6215 #line 6216 "configure"
6216 #include "confdefs.h"
6217
6218 int main() {
6219 main()
6220 ; return 0; }
6221 EOF
6222 if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6223   rm -rf conftest*
6224   eval "ac_cv_lib_$ac_lib_var=yes"
6225 else
6226   echo "configure: failed program was:" >&5
6227   cat conftest.$ac_ext >&5
6228   rm -rf conftest*
6229   eval "ac_cv_lib_$ac_lib_var=no"
6230 fi
6231 rm -f conftest*
6232 LIBS="$ac_save_LIBS"
6233
6234 fi
6235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6236   echo "$ac_t""yes" 1>&6
6237   have_k425=yes
6238                                 KRB4_LIBS="-lkrb4"
6239 else
6240   echo "$ac_t""no" 1>&6
6241 have_k425=no
6242 fi
6243
6244
6245                 else
6246                         have_425=no
6247                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6248                 fi
6249
6250                 if test $have_k425 = yes ; then
6251                         ol_with_kerberos=found
6252                         ol_link_krb4=yes
6253
6254                         cat >> confdefs.h <<\EOF
6255 #define HAVE_KRB425 1
6256 EOF
6257
6258                         cat >> confdefs.h <<\EOF
6259 #define HAVE_KRB4 1
6260 EOF
6261
6262
6263                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6264 echo "configure:6265: checking for des_debug in Kerberos libraries" >&5
6265 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6266   echo $ac_n "(cached) $ac_c" 1>&6
6267 else
6268   
6269                                                                 save_LIBS="$LIBS"
6270                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6271                                 cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6274
6275 #include <kerberosIV/krb.h>
6276 #include <kerberosIV/des.h>
6277 extern int des_debug;
6278
6279 int main() {
6280
6281 des_debug = 1;
6282
6283 ; return 0; }
6284 EOF
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286   rm -rf conftest*
6287   ol_cv_var_des_debug=yes
6288 else
6289   echo "configure: failed program was:" >&5
6290   cat conftest.$ac_ext >&5
6291   rm -rf conftest*
6292   ol_cv_var_des_debug=no
6293 fi
6294 rm -f conftest*
6295                                                                 LIBS="$save_LIBS"
6296                         
6297 fi
6298
6299 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6300
6301                         if test $ol_cv_var_des_debug = yes ; then
6302                                 cat >> confdefs.h <<\EOF
6303 #define HAVE_DES_DEBUG 1
6304 EOF
6305
6306                         fi
6307
6308                         LIBS="$save_LIBS"
6309                 fi
6310         fi
6311 fi
6312
6313 if test $ol_link_krb5 = yes ; then
6314         ol_with_kerberos=found
6315 fi
6316
6317 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6318         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6319
6320         for ac_hdr in krb.h des.h krb-archaeology.h 
6321 do
6322 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6323 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6324 echo "configure:6325: checking for $ac_hdr" >&5
6325 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6326   echo $ac_n "(cached) $ac_c" 1>&6
6327 else
6328   cat > conftest.$ac_ext <<EOF
6329 #line 6330 "configure"
6330 #include "confdefs.h"
6331 #include <$ac_hdr>
6332 EOF
6333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6334 { (eval echo configure:6335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6336 if test -z "$ac_err"; then
6337   rm -rf conftest*
6338   eval "ac_cv_header_$ac_safe=yes"
6339 else
6340   echo "$ac_err" >&5
6341   echo "configure: failed program was:" >&5
6342   cat conftest.$ac_ext >&5
6343   rm -rf conftest*
6344   eval "ac_cv_header_$ac_safe=no"
6345 fi
6346 rm -f conftest*
6347 fi
6348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6349   echo "$ac_t""yes" 1>&6
6350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6351   cat >> confdefs.h <<EOF
6352 #define $ac_tr_hdr 1
6353 EOF
6354  
6355 else
6356   echo "$ac_t""no" 1>&6
6357 fi
6358 done
6359
6360
6361         if test $ac_cv_header_krb_h = yes ; then
6362                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6363 echo "configure:6364: checking for main in -lkrb" >&5
6364 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6366   echo $ac_n "(cached) $ac_c" 1>&6
6367 else
6368   ac_save_LIBS="$LIBS"
6369 LIBS="-lkrb -ldes $LIBS"
6370 cat > conftest.$ac_ext <<EOF
6371 #line 6372 "configure"
6372 #include "confdefs.h"
6373
6374 int main() {
6375 main()
6376 ; return 0; }
6377 EOF
6378 if { (eval echo configure:6379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6379   rm -rf conftest*
6380   eval "ac_cv_lib_$ac_lib_var=yes"
6381 else
6382   echo "configure: failed program was:" >&5
6383   cat conftest.$ac_ext >&5
6384   rm -rf conftest*
6385   eval "ac_cv_lib_$ac_lib_var=no"
6386 fi
6387 rm -f conftest*
6388 LIBS="$ac_save_LIBS"
6389
6390 fi
6391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6392   echo "$ac_t""yes" 1>&6
6393   have_k4=yes
6394 else
6395   echo "$ac_t""no" 1>&6
6396 have_k4=no
6397 fi
6398
6399
6400                 if test $have_k4 = yes ; then
6401                         ol_with_kerberos=found
6402                         ol_link_krb4=yes
6403
6404                         cat >> confdefs.h <<\EOF
6405 #define HAVE_KRB4 1
6406 EOF
6407
6408
6409                         KRB4_LIBS="-lkrb -ldes"
6410
6411                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6412                                 cat >> confdefs.h <<\EOF
6413 #define HAVE_KTH_KERBEROS 1
6414 EOF
6415
6416                         fi
6417                 fi
6418         fi
6419 fi
6420
6421 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6422         ol_link_kpasswd=yes
6423 fi
6424
6425 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6426         ol_link_kbind=yes
6427
6428 elif test $ol_enable_kbind = yes ; then
6429         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6430 fi
6431
6432 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6433         cat >> confdefs.h <<\EOF
6434 #define HAVE_KERBEROS 1
6435 EOF
6436
6437
6438 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6439         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6440 fi
6441
6442 ol_link_tls=no
6443 if test $ol_with_tls != no ; then
6444         for ac_hdr in openssl/ssl.h ssl.h
6445 do
6446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6448 echo "configure:6449: checking for $ac_hdr" >&5
6449 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6450   echo $ac_n "(cached) $ac_c" 1>&6
6451 else
6452   cat > conftest.$ac_ext <<EOF
6453 #line 6454 "configure"
6454 #include "confdefs.h"
6455 #include <$ac_hdr>
6456 EOF
6457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6458 { (eval echo configure:6459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6460 if test -z "$ac_err"; then
6461   rm -rf conftest*
6462   eval "ac_cv_header_$ac_safe=yes"
6463 else
6464   echo "$ac_err" >&5
6465   echo "configure: failed program was:" >&5
6466   cat conftest.$ac_ext >&5
6467   rm -rf conftest*
6468   eval "ac_cv_header_$ac_safe=no"
6469 fi
6470 rm -f conftest*
6471 fi
6472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6473   echo "$ac_t""yes" 1>&6
6474     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6475   cat >> confdefs.h <<EOF
6476 #define $ac_tr_hdr 1
6477 EOF
6478  
6479 else
6480   echo "$ac_t""no" 1>&6
6481 fi
6482 done
6483
6484         
6485         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6486                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6487 echo "configure:6488: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6488 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6490   echo $ac_n "(cached) $ac_c" 1>&6
6491 else
6492   ac_save_LIBS="$LIBS"
6493 LIBS="-lssl -lcrypto $LIBS"
6494 cat > conftest.$ac_ext <<EOF
6495 #line 6496 "configure"
6496 #include "confdefs.h"
6497 /* Override any gcc2 internal prototype to avoid an error.  */
6498 /* We use char because int might match the return type of a gcc2
6499     builtin and then its argument prototype would still apply.  */
6500 char SSLeay_add_ssl_algorithms();
6501
6502 int main() {
6503 SSLeay_add_ssl_algorithms()
6504 ; return 0; }
6505 EOF
6506 if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6507   rm -rf conftest*
6508   eval "ac_cv_lib_$ac_lib_var=yes"
6509 else
6510   echo "configure: failed program was:" >&5
6511   cat conftest.$ac_ext >&5
6512   rm -rf conftest*
6513   eval "ac_cv_lib_$ac_lib_var=no"
6514 fi
6515 rm -f conftest*
6516 LIBS="$ac_save_LIBS"
6517
6518 fi
6519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6520   echo "$ac_t""yes" 1>&6
6521   have_ssleay=yes
6522                         need_rsaref=no
6523 else
6524   echo "$ac_t""no" 1>&6
6525 have_ssleay=no
6526 fi
6527
6528                         
6529                 if test $have_ssleay = no ; then
6530                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6531 echo "configure:6532: checking for SSL_library_init in -lssl" >&5
6532 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6533 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6534   echo $ac_n "(cached) $ac_c" 1>&6
6535 else
6536   ac_save_LIBS="$LIBS"
6537 LIBS="-lssl -lcrypto $LIBS"
6538 cat > conftest.$ac_ext <<EOF
6539 #line 6540 "configure"
6540 #include "confdefs.h"
6541 /* Override any gcc2 internal prototype to avoid an error.  */
6542 /* We use char because int might match the return type of a gcc2
6543     builtin and then its argument prototype would still apply.  */
6544 char SSL_library_init();
6545
6546 int main() {
6547 SSL_library_init()
6548 ; return 0; }
6549 EOF
6550 if { (eval echo configure:6551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6551   rm -rf conftest*
6552   eval "ac_cv_lib_$ac_lib_var=yes"
6553 else
6554   echo "configure: failed program was:" >&5
6555   cat conftest.$ac_ext >&5
6556   rm -rf conftest*
6557   eval "ac_cv_lib_$ac_lib_var=no"
6558 fi
6559 rm -f conftest*
6560 LIBS="$ac_save_LIBS"
6561
6562 fi
6563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6564   echo "$ac_t""yes" 1>&6
6565   have_ssleay=yes
6566                                 need_rsaref=no
6567 else
6568   echo "$ac_t""no" 1>&6
6569 have_ssleay=no
6570 fi
6571
6572                 fi
6573
6574                 if test $have_ssleay = no ; then
6575                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6576 echo "configure:6577: checking for ssl3_accept in -lssl" >&5
6577 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6579   echo $ac_n "(cached) $ac_c" 1>&6
6580 else
6581   ac_save_LIBS="$LIBS"
6582 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6583 cat > conftest.$ac_ext <<EOF
6584 #line 6585 "configure"
6585 #include "confdefs.h"
6586 /* Override any gcc2 internal prototype to avoid an error.  */
6587 /* We use char because int might match the return type of a gcc2
6588     builtin and then its argument prototype would still apply.  */
6589 char ssl3_accept();
6590
6591 int main() {
6592 ssl3_accept()
6593 ; return 0; }
6594 EOF
6595 if { (eval echo configure:6596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6596   rm -rf conftest*
6597   eval "ac_cv_lib_$ac_lib_var=yes"
6598 else
6599   echo "configure: failed program was:" >&5
6600   cat conftest.$ac_ext >&5
6601   rm -rf conftest*
6602   eval "ac_cv_lib_$ac_lib_var=no"
6603 fi
6604 rm -f conftest*
6605 LIBS="$ac_save_LIBS"
6606
6607 fi
6608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6609   echo "$ac_t""yes" 1>&6
6610   have_ssleay=yes
6611                                 need_rsaref=yes
6612 else
6613   echo "$ac_t""no" 1>&6
6614 have_ssleay=no
6615 fi
6616
6617                 fi
6618
6619                 if test $have_ssleay = yes ; then
6620                         ol_with_tls=found
6621                         ol_link_tls=yes
6622
6623                         cat >> confdefs.h <<\EOF
6624 #define HAVE_SSLEAY 1
6625 EOF
6626
6627
6628                         if test $need_rsaref = yes; then
6629                                 cat >> confdefs.h <<\EOF
6630 #define HAVE_RSAREF 1
6631 EOF
6632
6633
6634                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6635                         else
6636                                 TLS_LIBS="-lssl -lcrypto"
6637                         fi
6638                 fi
6639         fi
6640
6641 else
6642         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6643 fi
6644
6645 if test $ol_link_tls = yes ; then
6646         cat >> confdefs.h <<\EOF
6647 #define HAVE_TLS 1
6648 EOF
6649
6650
6651 elif test $ol_with_tls = auto ; then
6652         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6653         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6654
6655 elif test $ol_with_tls != no ; then
6656         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6657 fi
6658
6659 if test $ol_enable_lmpasswd != no; then
6660         if test $ol_link_tls != yes ; then
6661                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
6662         fi
6663
6664         cat >> confdefs.h <<\EOF
6665 #define SLAPD_LMHASH 1
6666 EOF
6667
6668 fi
6669
6670 for ac_func in \
6671         ctime_r                 \
6672         gethostbyname_r gethostbyaddr_r \
6673
6674 do
6675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6676 echo "configure:6677: checking for $ac_func" >&5
6677 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6678   echo $ac_n "(cached) $ac_c" 1>&6
6679 else
6680   cat > conftest.$ac_ext <<EOF
6681 #line 6682 "configure"
6682 #include "confdefs.h"
6683 /* System header to define __stub macros and hopefully few prototypes,
6684     which can conflict with char $ac_func(); below.  */
6685 #include <assert.h>
6686 /* Override any gcc2 internal prototype to avoid an error.  */
6687 /* We use char because int might match the return type of a gcc2
6688     builtin and then its argument prototype would still apply.  */
6689 char $ac_func();
6690 char (*f)();
6691
6692 int main() {
6693
6694 /* The GNU C library defines this for functions which it implements
6695     to always fail with ENOSYS.  Some functions are actually named
6696     something starting with __ and the normal name is an alias.  */
6697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6698 choke me
6699 #else
6700 f = $ac_func;
6701 #endif
6702
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706   rm -rf conftest*
6707   eval "ac_cv_func_$ac_func=yes"
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   eval "ac_cv_func_$ac_func=no"
6713 fi
6714 rm -f conftest*
6715 fi
6716
6717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6718   echo "$ac_t""yes" 1>&6
6719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6720   cat >> confdefs.h <<EOF
6721 #define $ac_tr_func 1
6722 EOF
6723  
6724 else
6725   echo "$ac_t""no" 1>&6
6726 fi
6727 done
6728
6729
6730 if test "$ac_cv_func_ctime_r" = no ; then
6731         ol_cv_func_ctime_r_nargs=0
6732 else
6733         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6734 echo "configure:6735: checking number of arguments of ctime_r" >&5
6735 if eval "test \"\${ol_cv_func_ctime_r_nargs+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 #include <time.h>
6742 int main() {
6743 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6747   rm -rf conftest*
6748   ol_cv_func_ctime_r_nargs3=yes
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   ol_cv_func_ctime_r_nargs3=no
6754 fi
6755 rm -f conftest*
6756
6757         cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 #include <time.h>
6761 int main() {
6762 time_t ti; char *buffer; ctime_r(&ti,buffer);
6763 ; return 0; }
6764 EOF
6765 if { (eval echo configure:6766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6766   rm -rf conftest*
6767   ol_cv_func_ctime_r_nargs2=yes
6768 else
6769   echo "configure: failed program was:" >&5
6770   cat conftest.$ac_ext >&5
6771   rm -rf conftest*
6772   ol_cv_func_ctime_r_nargs2=no
6773 fi
6774 rm -f conftest*
6775
6776         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6777                 $ol_cv_func_ctime_r_nargs2 = no ; then
6778
6779                 ol_cv_func_ctime_r_nargs=3
6780
6781         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6782                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6783
6784                 ol_cv_func_ctime_r_nargs=2
6785
6786         else
6787                 ol_cv_func_ctime_r_nargs=0
6788         fi
6789   
6790 fi
6791
6792 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6793
6794   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6795         cat >> confdefs.h <<EOF
6796 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6797 EOF
6798
6799   fi
6800
6801 fi
6802
6803 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6804         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6805 echo "configure:6806: checking number of arguments of gethostbyname_r" >&5
6806 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 #include <sys/types.h>
6813 #include <sys/socket.h>
6814 #include <netinet/in.h>
6815 #include <netdb.h>
6816 #define BUFSIZE (sizeof(struct hostent)+10)
6817 int main() {
6818 struct hostent hent; char buffer[BUFSIZE];
6819                 int bufsize=BUFSIZE;int h_errno;
6820                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6821                         buffer, bufsize, &h_errno);
6822 ; return 0; }
6823 EOF
6824 if { (eval echo configure:6825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6825   rm -rf conftest*
6826   ol_cv_func_gethostbyname_r_nargs5=yes
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -rf conftest*
6831   ol_cv_func_gethostbyname_r_nargs5=no
6832 fi
6833 rm -f conftest*
6834
6835         cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 #include <sys/types.h>
6839 #include <sys/socket.h>
6840 #include <netinet/in.h>
6841 #include <netdb.h>
6842 #define BUFSIZE (sizeof(struct hostent)+10)
6843 int main() {
6844 struct hostent hent;struct hostent *rhent;
6845                 char buffer[BUFSIZE];
6846                 int bufsize=BUFSIZE;int h_errno;
6847                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6848                         &rhent, &h_errno);
6849 ; return 0; }
6850 EOF
6851 if { (eval echo configure:6852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6852   rm -rf conftest*
6853   ol_cv_func_gethostbyname_r_nargs6=yes
6854 else
6855   echo "configure: failed program was:" >&5
6856   cat conftest.$ac_ext >&5
6857   rm -rf conftest*
6858   ol_cv_func_gethostbyname_r_nargs6=no
6859 fi
6860 rm -f conftest*
6861
6862         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6863                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6864
6865                 ol_cv_func_gethostbyname_r_nargs=5
6866
6867         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6868                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6869
6870                 ol_cv_func_gethostbyname_r_nargs=6
6871
6872         else
6873                 ol_cv_func_gethostbyname_r_nargs=0
6874         fi
6875   
6876 fi
6877
6878 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6879   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6880         cat >> confdefs.h <<EOF
6881 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6882 EOF
6883
6884   fi
6885
6886 else
6887         ol_cv_func_gethostbyname_r_nargs=0
6888 fi
6889  
6890 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6891         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6892 echo "configure:6893: checking number of arguments of gethostbyaddr_r" >&5
6893 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6894   echo $ac_n "(cached) $ac_c" 1>&6
6895 else
6896   cat > conftest.$ac_ext <<EOF
6897 #line 6898 "configure"
6898 #include "confdefs.h"
6899 #include <sys/types.h>
6900 #include <sys/socket.h>
6901 #include <netinet/in.h>
6902 #include <netdb.h>
6903 #define BUFSIZE (sizeof(struct hostent)+10)
6904 int main() {
6905 struct hostent hent; char buffer[BUFSIZE]; 
6906             struct in_addr add;
6907             size_t alen=sizeof(struct in_addr);
6908             int bufsize=BUFSIZE;int h_errno;
6909                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6910                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6911 ; return 0; }
6912 EOF
6913 if { (eval echo configure:6914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6914   rm -rf conftest*
6915   ol_cv_func_gethostbyaddr_r_nargs7=yes
6916 else
6917   echo "configure: failed program was:" >&5
6918   cat conftest.$ac_ext >&5
6919   rm -rf conftest*
6920   ol_cv_func_gethostbyaddr_r_nargs7=no
6921 fi
6922 rm -f conftest*
6923
6924         cat > conftest.$ac_ext <<EOF
6925 #line 6926 "configure"
6926 #include "confdefs.h"
6927 #include <sys/types.h>
6928 #include <sys/socket.h>
6929 #include <netinet/in.h>
6930 #include <netdb.h>
6931 #define BUFSIZE (sizeof(struct hostent)+10)
6932 int main() {
6933 struct hostent hent;
6934                 struct hostent *rhent; char buffer[BUFSIZE]; 
6935                 struct in_addr add;
6936                 size_t alen=sizeof(struct in_addr);
6937                 int bufsize=BUFSIZE;int h_errno;
6938                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6939                         alen, AF_INET, &hent, buffer, bufsize, 
6940                         &rhent, &h_errno);
6941 ; return 0; }
6942 EOF
6943 if { (eval echo configure:6944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6944   rm -rf conftest*
6945   ol_cv_func_gethostbyaddr_r_nargs8=yes
6946 else
6947   echo "configure: failed program was:" >&5
6948   cat conftest.$ac_ext >&5
6949   rm -rf conftest*
6950   ol_cv_func_gethostbyaddr_r_nargs8=no
6951 fi
6952 rm -f conftest*
6953
6954         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6955                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6956
6957                 ol_cv_func_gethostbyaddr_r_nargs=7
6958
6959         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6960                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6961
6962                 ol_cv_func_gethostbyaddr_r_nargs=8
6963
6964         else
6965                 ol_cv_func_gethostbyaddr_r_nargs=0
6966         fi
6967   
6968 fi
6969
6970 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6971   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6972     cat >> confdefs.h <<EOF
6973 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6974 EOF
6975
6976   fi
6977
6978 else
6979         ol_cv_func_gethostbyaddr_r_nargs=0
6980 fi
6981
6982 if test "$ac_cv_func_ctime_r" = yes \
6983         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6984         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6985         -a "$ac_cv_func_gethostbyname_r" = yes \
6986         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6987         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6988         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6989         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6990         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6991         ; then
6992  
6993         cat >> confdefs.h <<\EOF
6994 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6995 EOF
6996
6997 fi
6998
6999 ol_link_threads=no
7000
7001 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7002         -o $ol_with_threads = nt ; then
7003
7004         
7005         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7006 echo "configure:7007: checking for NT Threads" >&5
7007 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7008   echo $ac_n "(cached) $ac_c" 1>&6
7009 else
7010   
7011                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7012 echo "configure:7013: checking for _beginthread" >&5
7013 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7014   echo $ac_n "(cached) $ac_c" 1>&6
7015 else
7016   cat > conftest.$ac_ext <<EOF
7017 #line 7018 "configure"
7018 #include "confdefs.h"
7019 /* System header to define __stub macros and hopefully few prototypes,
7020     which can conflict with char _beginthread(); below.  */
7021 #include <assert.h>
7022 /* Override any gcc2 internal prototype to avoid an error.  */
7023 /* We use char because int might match the return type of a gcc2
7024     builtin and then its argument prototype would still apply.  */
7025 char _beginthread();
7026 char (*f)();
7027
7028 int main() {
7029
7030 /* The GNU C library defines this for functions which it implements
7031     to always fail with ENOSYS.  Some functions are actually named
7032     something starting with __ and the normal name is an alias.  */
7033 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7034 choke me
7035 #else
7036 f = _beginthread;
7037 #endif
7038
7039 ; return 0; }
7040 EOF
7041 if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7042   rm -rf conftest*
7043   eval "ac_cv_func__beginthread=yes"
7044 else
7045   echo "configure: failed program was:" >&5
7046   cat conftest.$ac_ext >&5
7047   rm -rf conftest*
7048   eval "ac_cv_func__beginthread=no"
7049 fi
7050 rm -f conftest*
7051 fi
7052
7053 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7054   echo "$ac_t""yes" 1>&6
7055   ol_cv_nt_threads=yes
7056 else
7057   echo "$ac_t""no" 1>&6
7058 ol_cv_nt_threads=no
7059 fi
7060
7061         
7062 fi
7063
7064 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7065
7066         if test $ol_cv_nt_threads = yes ; then
7067                 cat >> confdefs.h <<\EOF
7068 #define HAVE_NT_THREADS 1
7069 EOF
7070
7071         fi
7072
7073
7074         if test "$ol_cv_nt_threads" = yes ; then
7075         ol_link_threads=nt
7076         ol_with_threads=found
7077         ol_with_yielding_select=yes
7078
7079                 cat >> confdefs.h <<\EOF
7080 #define HAVE_NT_SERVICE_MANAGER 1
7081 EOF
7082
7083                 cat >> confdefs.h <<\EOF
7084 #define HAVE_NT_EVENT_LOG 1
7085 EOF
7086
7087         fi
7088
7089         if test $ol_with_threads = nt ; then
7090                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7091         fi
7092 fi
7093
7094 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7095         -o $ol_with_threads = posix ; then
7096
7097         for ac_hdr in pthread.h
7098 do
7099 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7100 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7101 echo "configure:7102: checking for $ac_hdr" >&5
7102 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7103   echo $ac_n "(cached) $ac_c" 1>&6
7104 else
7105   cat > conftest.$ac_ext <<EOF
7106 #line 7107 "configure"
7107 #include "confdefs.h"
7108 #include <$ac_hdr>
7109 EOF
7110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7111 { (eval echo configure:7112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7113 if test -z "$ac_err"; then
7114   rm -rf conftest*
7115   eval "ac_cv_header_$ac_safe=yes"
7116 else
7117   echo "$ac_err" >&5
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -rf conftest*
7121   eval "ac_cv_header_$ac_safe=no"
7122 fi
7123 rm -f conftest*
7124 fi
7125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7126   echo "$ac_t""yes" 1>&6
7127     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7128   cat >> confdefs.h <<EOF
7129 #define $ac_tr_hdr 1
7130 EOF
7131  
7132 else
7133   echo "$ac_t""no" 1>&6
7134 fi
7135 done
7136
7137
7138         if test $ac_cv_header_pthread_h = yes ; then
7139                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7140 echo "configure:7141: checking POSIX thread version" >&5
7141 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7142   echo $ac_n "(cached) $ac_c" 1>&6
7143 else
7144   
7145         cat > conftest.$ac_ext <<EOF
7146 #line 7147 "configure"
7147 #include "confdefs.h"
7148
7149 #               include <pthread.h>
7150                 /* this check could be improved */
7151 #               ifdef PTHREAD_ONCE_INIT
7152                         pthread_version_final;
7153 #               endif
7154         
7155 EOF
7156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7157   egrep "pthread_version_final" >/dev/null 2>&1; then
7158   rm -rf conftest*
7159   ol_pthread_final=yes
7160 else
7161   rm -rf conftest*
7162   ol_pthread_final=no
7163 fi
7164 rm -f conftest*
7165
7166
7167         cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170
7171 #               include <pthread.h>
7172                 /* this check could be improved */
7173 #               ifdef pthread_once_init
7174                         pthread_version_draft4;
7175 #               endif
7176         
7177 EOF
7178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7179   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7180   rm -rf conftest*
7181   ol_pthread_draft4=yes
7182 else
7183   rm -rf conftest*
7184   ol_pthread_draft4=no
7185 fi
7186 rm -f conftest*
7187
7188
7189         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7190                 ol_cv_pthread_version=final
7191         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7192                 ol_cv_pthread_version=draft4
7193         else
7194                 ol_cv_pthread_version=unknown
7195         fi
7196
7197 fi
7198
7199 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7200
7201
7202                 if test $ol_cv_pthread_version = final ; then
7203                         cat >> confdefs.h <<\EOF
7204 #define HAVE_PTHREADS_FINAL 1
7205 EOF
7206
7207                 elif test $ol_cv_pthread_version = draft4 ; then
7208                         cat >> confdefs.h <<\EOF
7209 #define HAVE_PTHREADS_D4 1
7210 EOF
7211
7212                 else
7213                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7214                 fi
7215
7216                 # consider threads found
7217                 ol_with_threads=found
7218
7219                 
7220         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7221 echo "configure:7222: checking for LinuxThreads pthread.h" >&5
7222 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7223   echo $ac_n "(cached) $ac_c" 1>&6
7224 else
7225   cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228 #include <pthread.h>
7229 EOF
7230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7231   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7232   rm -rf conftest*
7233   ol_cv_header_linux_threads=yes
7234 else
7235   rm -rf conftest*
7236   ol_cv_header_linux_threads=no
7237 fi
7238 rm -f conftest*
7239
7240                 
7241 fi
7242
7243 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7244         if test $ol_cv_header_linux_threads = yes; then
7245                 cat >> confdefs.h <<\EOF
7246 #define HAVE_LINUX_THREADS 1
7247 EOF
7248
7249         fi
7250
7251                 
7252         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7253 echo "configure:7254: checking for GNU Pth pthread.h" >&5
7254 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 #include <pthread.h>
7261 #ifdef _POSIX_THREAD_IS_GNU_PTH
7262         __gnu_pth__;
7263 #endif
7264
7265 EOF
7266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7267   egrep "__gnu_pth__" >/dev/null 2>&1; then
7268   rm -rf conftest*
7269   ol_cv_header_gnu_pth_pthread_h=yes
7270 else
7271   rm -rf conftest*
7272   ol_cv_header_gnu_pth_pthread_h=no
7273 fi
7274 rm -f conftest*
7275
7276                 
7277 fi
7278
7279 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7280
7281
7282                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7283                         for ac_hdr in sched.h
7284 do
7285 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7286 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7287 echo "configure:7288: checking for $ac_hdr" >&5
7288 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7289   echo $ac_n "(cached) $ac_c" 1>&6
7290 else
7291   cat > conftest.$ac_ext <<EOF
7292 #line 7293 "configure"
7293 #include "confdefs.h"
7294 #include <$ac_hdr>
7295 EOF
7296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7297 { (eval echo configure:7298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7299 if test -z "$ac_err"; then
7300   rm -rf conftest*
7301   eval "ac_cv_header_$ac_safe=yes"
7302 else
7303   echo "$ac_err" >&5
7304   echo "configure: failed program was:" >&5
7305   cat conftest.$ac_ext >&5
7306   rm -rf conftest*
7307   eval "ac_cv_header_$ac_safe=no"
7308 fi
7309 rm -f conftest*
7310 fi
7311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7312   echo "$ac_t""yes" 1>&6
7313     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7314   cat >> confdefs.h <<EOF
7315 #define $ac_tr_hdr 1
7316 EOF
7317  
7318 else
7319   echo "$ac_t""no" 1>&6
7320 fi
7321 done
7322
7323                 fi
7324
7325                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7326                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7327 echo "configure:7328: checking for pthread_create in default libraries" >&5
7328 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   
7332                 if test "$cross_compiling" = yes; then
7333   cat > conftest.$ac_ext <<EOF
7334 #line 7335 "configure"
7335 #include "confdefs.h"
7336 /* pthread test headers */
7337 #include <pthread.h>
7338 #ifndef NULL
7339 #define NULL (void*)0
7340 #endif
7341
7342 static void *task(p)
7343         void *p;
7344 {
7345         return (void *) (p == NULL);
7346 }
7347
7348 int main() {
7349
7350         /* pthread test function */
7351         pthread_t t;
7352         int status;
7353 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7354         /* This system (e.g. AIX) defaults detached; must override */
7355         pthread_attr_t attr;
7356
7357         status = pthread_attr_init(&attr);
7358         if( status ) exit( status );
7359
7360         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7361         if( status ) exit( status );
7362
7363 #define ATTR    &attr
7364 #else
7365 #if HAVE_PTHREADS_D4
7366 #define ATTR    pthread_attr_default
7367 #else
7368 #define ATTR    NULL
7369 #endif
7370 #endif
7371         /* make sure pthread_create() isn't just a stub */
7372         status = pthread_create(&t, ATTR, task, NULL);
7373         if( status ) exit( status );
7374
7375         /* make sure pthread_detach() isn't just a stub */
7376 #if HAVE_PTHREADS_D4
7377         status = pthread_detach( &t );
7378 #else
7379         status = pthread_detach( t );
7380 #endif
7381
7382 #ifdef HAVE_LINUX_THREADS
7383         pthread_kill_other_threads_np();
7384 #endif
7385
7386         exit( status );
7387
7388 ; return 0; }
7389 EOF
7390 if { (eval echo configure:7391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7391   rm -rf conftest*
7392   ol_cv_pthread_create=yes
7393 else
7394   echo "configure: failed program was:" >&5
7395   cat conftest.$ac_ext >&5
7396   rm -rf conftest*
7397   ol_cv_pthread_create=no
7398 fi
7399 rm -f conftest*
7400 else
7401   cat > conftest.$ac_ext <<EOF
7402 #line 7403 "configure"
7403 #include "confdefs.h"
7404 /* pthread test headers */
7405 #include <pthread.h>
7406 #ifndef NULL
7407 #define NULL (void*)0
7408 #endif
7409
7410 static void *task(p)
7411         void *p;
7412 {
7413         return (void *) (p == NULL);
7414 }
7415
7416
7417 int main(argc, argv)
7418         int argc;
7419         char **argv;
7420 {
7421
7422         /* pthread test function */
7423         pthread_t t;
7424         int status;
7425 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7426         /* This system (e.g. AIX) defaults detached; must override */
7427         pthread_attr_t attr;
7428
7429         status = pthread_attr_init(&attr);
7430         if( status ) exit( status );
7431
7432         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7433         if( status ) exit( status );
7434
7435 #define ATTR    &attr
7436 #else
7437 #if HAVE_PTHREADS_D4
7438 #define ATTR    pthread_attr_default
7439 #else
7440 #define ATTR    NULL
7441 #endif
7442 #endif
7443         /* make sure pthread_create() isn't just a stub */
7444         status = pthread_create(&t, ATTR, task, NULL);
7445         if( status ) exit( status );
7446
7447         /* make sure pthread_detach() isn't just a stub */
7448 #if HAVE_PTHREADS_D4
7449         status = pthread_detach( &t );
7450 #else
7451         status = pthread_detach( t );
7452 #endif
7453
7454 #ifdef HAVE_LINUX_THREADS
7455         pthread_kill_other_threads_np();
7456 #endif
7457
7458         exit( status );
7459
7460 }
7461
7462 EOF
7463 if { (eval echo configure:7464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7464 then
7465   ol_cv_pthread_create=yes
7466 else
7467   echo "configure: failed program was:" >&5
7468   cat conftest.$ac_ext >&5
7469   rm -fr conftest*
7470   ol_cv_pthread_create=no
7471 fi
7472 rm -fr conftest*
7473 fi
7474
7475 fi
7476
7477 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7478
7479                 if test $ol_cv_pthread_create != no ; then
7480                         ol_link_threads=posix
7481                         ol_link_pthreads=""
7482                 fi
7483                 
7484                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7485 if test "$ol_link_threads" = no ; then
7486         # try -kthread
7487         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7488 echo "configure:7489: checking for pthread link with -kthread" >&5
7489 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7490   echo $ac_n "(cached) $ac_c" 1>&6
7491 else
7492   
7493                 # save the flags
7494                 ol_LIBS="$LIBS"
7495                 LIBS="-kthread $LIBS"
7496
7497                 if test "$cross_compiling" = yes; then
7498   cat > conftest.$ac_ext <<EOF
7499 #line 7500 "configure"
7500 #include "confdefs.h"
7501 /* pthread test headers */
7502 #include <pthread.h>
7503 #ifndef NULL
7504 #define NULL (void*)0
7505 #endif
7506
7507 static void *task(p)
7508         void *p;
7509 {
7510         return (void *) (p == NULL);
7511 }
7512
7513 int main() {
7514
7515         /* pthread test function */
7516         pthread_t t;
7517         int status;
7518 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7519         /* This system (e.g. AIX) defaults detached; must override */
7520         pthread_attr_t attr;
7521
7522         status = pthread_attr_init(&attr);
7523         if( status ) exit( status );
7524
7525         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7526         if( status ) exit( status );
7527
7528 #define ATTR    &attr
7529 #else
7530 #if HAVE_PTHREADS_D4
7531 #define ATTR    pthread_attr_default
7532 #else
7533 #define ATTR    NULL
7534 #endif
7535 #endif
7536         /* make sure pthread_create() isn't just a stub */
7537         status = pthread_create(&t, ATTR, task, NULL);
7538         if( status ) exit( status );
7539
7540         /* make sure pthread_detach() isn't just a stub */
7541 #if HAVE_PTHREADS_D4
7542         status = pthread_detach( &t );
7543 #else
7544         status = pthread_detach( t );
7545 #endif
7546
7547 #ifdef HAVE_LINUX_THREADS
7548         pthread_kill_other_threads_np();
7549 #endif
7550
7551         exit( status );
7552
7553 ; return 0; }
7554 EOF
7555 if { (eval echo configure:7556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7556   rm -rf conftest*
7557   ol_cv_pthread_kthread=yes
7558 else
7559   echo "configure: failed program was:" >&5
7560   cat conftest.$ac_ext >&5
7561   rm -rf conftest*
7562   ol_cv_pthread_kthread=no
7563 fi
7564 rm -f conftest*
7565 else
7566   cat > conftest.$ac_ext <<EOF
7567 #line 7568 "configure"
7568 #include "confdefs.h"
7569 /* pthread test headers */
7570 #include <pthread.h>
7571 #ifndef NULL
7572 #define NULL (void*)0
7573 #endif
7574
7575 static void *task(p)
7576         void *p;
7577 {
7578         return (void *) (p == NULL);
7579 }
7580
7581
7582 int main(argc, argv)
7583         int argc;
7584         char **argv;
7585 {
7586
7587         /* pthread test function */
7588         pthread_t t;
7589         int status;
7590 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7591         /* This system (e.g. AIX) defaults detached; must override */
7592         pthread_attr_t attr;
7593
7594         status = pthread_attr_init(&attr);
7595         if( status ) exit( status );
7596
7597         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7598         if( status ) exit( status );
7599
7600 #define ATTR    &attr
7601 #else
7602 #if HAVE_PTHREADS_D4
7603 #define ATTR    pthread_attr_default
7604 #else
7605 #define ATTR    NULL
7606 #endif
7607 #endif
7608         /* make sure pthread_create() isn't just a stub */
7609         status = pthread_create(&t, ATTR, task, NULL);
7610         if( status ) exit( status );
7611
7612         /* make sure pthread_detach() isn't just a stub */
7613 #if HAVE_PTHREADS_D4
7614         status = pthread_detach( &t );
7615 #else
7616         status = pthread_detach( t );
7617 #endif
7618
7619 #ifdef HAVE_LINUX_THREADS
7620         pthread_kill_other_threads_np();
7621 #endif
7622
7623         exit( status );
7624
7625 }
7626
7627 EOF
7628 if { (eval echo configure:7629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7629 then
7630   ol_cv_pthread_kthread=yes
7631 else
7632   echo "configure: failed program was:" >&5
7633   cat conftest.$ac_ext >&5
7634   rm -fr conftest*
7635   ol_cv_pthread_kthread=no
7636 fi
7637 rm -fr conftest*
7638 fi
7639
7640
7641                 # restore the LIBS
7642                 LIBS="$ol_LIBS"
7643         
7644 fi
7645
7646 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7647
7648         if test $ol_cv_pthread_kthread = yes ; then
7649                 ol_link_pthreads="-kthread"
7650                 ol_link_threads=posix
7651         fi
7652 fi
7653
7654                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7655 if test "$ol_link_threads" = no ; then
7656         # try -pthread
7657         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7658 echo "configure:7659: checking for pthread link with -pthread" >&5
7659 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7660   echo $ac_n "(cached) $ac_c" 1>&6
7661 else
7662   
7663                 # save the flags
7664                 ol_LIBS="$LIBS"
7665                 LIBS="-pthread $LIBS"
7666
7667                 if test "$cross_compiling" = yes; then
7668   cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671 /* pthread test headers */
7672 #include <pthread.h>
7673 #ifndef NULL
7674 #define NULL (void*)0
7675 #endif
7676
7677 static void *task(p)
7678         void *p;
7679 {
7680         return (void *) (p == NULL);
7681 }
7682
7683 int main() {
7684
7685         /* pthread test function */
7686         pthread_t t;
7687         int status;
7688 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7689         /* This system (e.g. AIX) defaults detached; must override */
7690         pthread_attr_t attr;
7691
7692         status = pthread_attr_init(&attr);
7693         if( status ) exit( status );
7694
7695         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7696         if( status ) exit( status );
7697
7698 #define ATTR    &attr
7699 #else
7700 #if HAVE_PTHREADS_D4
7701 #define ATTR    pthread_attr_default
7702 #else
7703 #define ATTR    NULL
7704 #endif
7705 #endif
7706         /* make sure pthread_create() isn't just a stub */
7707         status = pthread_create(&t, ATTR, task, NULL);
7708         if( status ) exit( status );
7709
7710         /* make sure pthread_detach() isn't just a stub */
7711 #if HAVE_PTHREADS_D4
7712         status = pthread_detach( &t );
7713 #else
7714         status = pthread_detach( t );
7715 #endif
7716
7717 #ifdef HAVE_LINUX_THREADS
7718         pthread_kill_other_threads_np();
7719 #endif
7720
7721         exit( status );
7722
7723 ; return 0; }
7724 EOF
7725 if { (eval echo configure:7726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7726   rm -rf conftest*
7727   ol_cv_pthread_pthread=yes
7728 else
7729   echo "configure: failed program was:" >&5
7730   cat conftest.$ac_ext >&5
7731   rm -rf conftest*
7732   ol_cv_pthread_pthread=no
7733 fi
7734 rm -f conftest*
7735 else
7736   cat > conftest.$ac_ext <<EOF
7737 #line 7738 "configure"
7738 #include "confdefs.h"
7739 /* pthread test headers */
7740 #include <pthread.h>
7741 #ifndef NULL
7742 #define NULL (void*)0
7743 #endif
7744
7745 static void *task(p)
7746         void *p;
7747 {
7748         return (void *) (p == NULL);
7749 }
7750
7751
7752 int main(argc, argv)
7753         int argc;
7754         char **argv;
7755 {
7756
7757         /* pthread test function */
7758         pthread_t t;
7759         int status;
7760 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7761         /* This system (e.g. AIX) defaults detached; must override */
7762         pthread_attr_t attr;
7763
7764         status = pthread_attr_init(&attr);
7765         if( status ) exit( status );
7766
7767         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7768         if( status ) exit( status );
7769
7770 #define ATTR    &attr
7771 #else
7772 #if HAVE_PTHREADS_D4
7773 #define ATTR    pthread_attr_default
7774 #else
7775 #define ATTR    NULL
7776 #endif
7777 #endif
7778         /* make sure pthread_create() isn't just a stub */
7779         status = pthread_create(&t, ATTR, task, NULL);
7780         if( status ) exit( status );
7781
7782         /* make sure pthread_detach() isn't just a stub */
7783 #if HAVE_PTHREADS_D4
7784         status = pthread_detach( &t );
7785 #else
7786         status = pthread_detach( t );
7787 #endif
7788
7789 #ifdef HAVE_LINUX_THREADS
7790         pthread_kill_other_threads_np();
7791 #endif
7792
7793         exit( status );
7794
7795 }
7796
7797 EOF
7798 if { (eval echo configure:7799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7799 then
7800   ol_cv_pthread_pthread=yes
7801 else
7802   echo "configure: failed program was:" >&5
7803   cat conftest.$ac_ext >&5
7804   rm -fr conftest*
7805   ol_cv_pthread_pthread=no
7806 fi
7807 rm -fr conftest*
7808 fi
7809
7810
7811                 # restore the LIBS
7812                 LIBS="$ol_LIBS"
7813         
7814 fi
7815
7816 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7817
7818         if test $ol_cv_pthread_pthread = yes ; then
7819                 ol_link_pthreads="-pthread"
7820                 ol_link_threads=posix
7821         fi
7822 fi
7823
7824                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7825 if test "$ol_link_threads" = no ; then
7826         # try -pthreads
7827         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7828 echo "configure:7829: checking for pthread link with -pthreads" >&5
7829 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7830   echo $ac_n "(cached) $ac_c" 1>&6
7831 else
7832   
7833                 # save the flags
7834                 ol_LIBS="$LIBS"
7835                 LIBS="-pthreads $LIBS"
7836
7837                 if test "$cross_compiling" = yes; then
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 /* pthread test headers */
7842 #include <pthread.h>
7843 #ifndef NULL
7844 #define NULL (void*)0
7845 #endif
7846
7847 static void *task(p)
7848         void *p;
7849 {
7850         return (void *) (p == NULL);
7851 }
7852
7853 int main() {
7854
7855         /* pthread test function */
7856         pthread_t t;
7857         int status;
7858 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7859         /* This system (e.g. AIX) defaults detached; must override */
7860         pthread_attr_t attr;
7861
7862         status = pthread_attr_init(&attr);
7863         if( status ) exit( status );
7864
7865         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7866         if( status ) exit( status );
7867
7868 #define ATTR    &attr
7869 #else
7870 #if HAVE_PTHREADS_D4
7871 #define ATTR    pthread_attr_default
7872 #else
7873 #define ATTR    NULL
7874 #endif
7875 #endif
7876         /* make sure pthread_create() isn't just a stub */
7877         status = pthread_create(&t, ATTR, task, NULL);
7878         if( status ) exit( status );
7879
7880         /* make sure pthread_detach() isn't just a stub */
7881 #if HAVE_PTHREADS_D4
7882         status = pthread_detach( &t );
7883 #else
7884         status = pthread_detach( t );
7885 #endif
7886
7887 #ifdef HAVE_LINUX_THREADS
7888         pthread_kill_other_threads_np();
7889 #endif
7890
7891         exit( status );
7892
7893 ; return 0; }
7894 EOF
7895 if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7896   rm -rf conftest*
7897   ol_cv_pthread_pthreads=yes
7898 else
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -rf conftest*
7902   ol_cv_pthread_pthreads=no
7903 fi
7904 rm -f conftest*
7905 else
7906   cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909 /* pthread test headers */
7910 #include <pthread.h>
7911 #ifndef NULL
7912 #define NULL (void*)0
7913 #endif
7914
7915 static void *task(p)
7916         void *p;
7917 {
7918         return (void *) (p == NULL);
7919 }
7920
7921
7922 int main(argc, argv)
7923         int argc;
7924         char **argv;
7925 {
7926
7927         /* pthread test function */
7928         pthread_t t;
7929         int status;
7930 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7931         /* This system (e.g. AIX) defaults detached; must override */
7932         pthread_attr_t attr;
7933
7934         status = pthread_attr_init(&attr);
7935         if( status ) exit( status );
7936
7937         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7938         if( status ) exit( status );
7939
7940 #define ATTR    &attr
7941 #else
7942 #if HAVE_PTHREADS_D4
7943 #define ATTR    pthread_attr_default
7944 #else
7945 #define ATTR    NULL
7946 #endif
7947 #endif
7948         /* make sure pthread_create() isn't just a stub */
7949         status = pthread_create(&t, ATTR, task, NULL);
7950         if( status ) exit( status );
7951
7952         /* make sure pthread_detach() isn't just a stub */
7953 #if HAVE_PTHREADS_D4
7954         status = pthread_detach( &t );
7955 #else
7956         status = pthread_detach( t );
7957 #endif
7958
7959 #ifdef HAVE_LINUX_THREADS
7960         pthread_kill_other_threads_np();
7961 #endif
7962
7963         exit( status );
7964
7965 }
7966
7967 EOF
7968 if { (eval echo configure:7969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7969 then
7970   ol_cv_pthread_pthreads=yes
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -fr conftest*
7975   ol_cv_pthread_pthreads=no
7976 fi
7977 rm -fr conftest*
7978 fi
7979
7980
7981                 # restore the LIBS
7982                 LIBS="$ol_LIBS"
7983         
7984 fi
7985
7986 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7987
7988         if test $ol_cv_pthread_pthreads = yes ; then
7989                 ol_link_pthreads="-pthreads"
7990                 ol_link_threads=posix
7991         fi
7992 fi
7993
7994                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7995 if test "$ol_link_threads" = no ; then
7996         # try -mthreads
7997         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7998 echo "configure:7999: checking for pthread link with -mthreads" >&5
7999 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8000   echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8002   
8003                 # save the flags
8004                 ol_LIBS="$LIBS"
8005                 LIBS="-mthreads $LIBS"
8006
8007                 if test "$cross_compiling" = yes; then
8008   cat > conftest.$ac_ext <<EOF
8009 #line 8010 "configure"
8010 #include "confdefs.h"
8011 /* pthread test headers */
8012 #include <pthread.h>
8013 #ifndef NULL
8014 #define NULL (void*)0
8015 #endif
8016
8017 static void *task(p)
8018         void *p;
8019 {
8020         return (void *) (p == NULL);
8021 }
8022
8023 int main() {
8024
8025         /* pthread test function */
8026         pthread_t t;
8027         int status;
8028 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8029         /* This system (e.g. AIX) defaults detached; must override */
8030         pthread_attr_t attr;
8031
8032         status = pthread_attr_init(&attr);
8033         if( status ) exit( status );
8034
8035         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8036         if( status ) exit( status );
8037
8038 #define ATTR    &attr
8039 #else
8040 #if HAVE_PTHREADS_D4
8041 #define ATTR    pthread_attr_default
8042 #else
8043 #define ATTR    NULL
8044 #endif
8045 #endif
8046         /* make sure pthread_create() isn't just a stub */
8047         status = pthread_create(&t, ATTR, task, NULL);
8048         if( status ) exit( status );
8049
8050         /* make sure pthread_detach() isn't just a stub */
8051 #if HAVE_PTHREADS_D4
8052         status = pthread_detach( &t );
8053 #else
8054         status = pthread_detach( t );
8055 #endif
8056
8057 #ifdef HAVE_LINUX_THREADS
8058         pthread_kill_other_threads_np();
8059 #endif
8060
8061         exit( status );
8062
8063 ; return 0; }
8064 EOF
8065 if { (eval echo configure:8066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8066   rm -rf conftest*
8067   ol_cv_pthread_mthreads=yes
8068 else
8069   echo "configure: failed program was:" >&5
8070   cat conftest.$ac_ext >&5
8071   rm -rf conftest*
8072   ol_cv_pthread_mthreads=no
8073 fi
8074 rm -f conftest*
8075 else
8076   cat > conftest.$ac_ext <<EOF
8077 #line 8078 "configure"
8078 #include "confdefs.h"
8079 /* pthread test headers */
8080 #include <pthread.h>
8081 #ifndef NULL
8082 #define NULL (void*)0
8083 #endif
8084
8085 static void *task(p)
8086         void *p;
8087 {
8088         return (void *) (p == NULL);
8089 }
8090
8091
8092 int main(argc, argv)
8093         int argc;
8094         char **argv;
8095 {
8096
8097         /* pthread test function */
8098         pthread_t t;
8099         int status;
8100 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8101         /* This system (e.g. AIX) defaults detached; must override */
8102         pthread_attr_t attr;
8103
8104         status = pthread_attr_init(&attr);
8105         if( status ) exit( status );
8106
8107         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8108         if( status ) exit( status );
8109
8110 #define ATTR    &attr
8111 #else
8112 #if HAVE_PTHREADS_D4
8113 #define ATTR    pthread_attr_default
8114 #else
8115 #define ATTR    NULL
8116 #endif
8117 #endif
8118         /* make sure pthread_create() isn't just a stub */
8119         status = pthread_create(&t, ATTR, task, NULL);
8120         if( status ) exit( status );
8121
8122         /* make sure pthread_detach() isn't just a stub */
8123 #if HAVE_PTHREADS_D4
8124         status = pthread_detach( &t );
8125 #else
8126         status = pthread_detach( t );
8127 #endif
8128
8129 #ifdef HAVE_LINUX_THREADS
8130         pthread_kill_other_threads_np();
8131 #endif
8132
8133         exit( status );
8134
8135 }
8136
8137 EOF
8138 if { (eval echo configure:8139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8139 then
8140   ol_cv_pthread_mthreads=yes
8141 else
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144   rm -fr conftest*
8145   ol_cv_pthread_mthreads=no
8146 fi
8147 rm -fr conftest*
8148 fi
8149
8150
8151                 # restore the LIBS
8152                 LIBS="$ol_LIBS"
8153         
8154 fi
8155
8156 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8157
8158         if test $ol_cv_pthread_mthreads = yes ; then
8159                 ol_link_pthreads="-mthreads"
8160                 ol_link_threads=posix
8161         fi
8162 fi
8163
8164                 # Pthread try link: -thread (ol_cv_pthread_thread)
8165 if test "$ol_link_threads" = no ; then
8166         # try -thread
8167         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8168 echo "configure:8169: checking for pthread link with -thread" >&5
8169 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8170   echo $ac_n "(cached) $ac_c" 1>&6
8171 else
8172   
8173                 # save the flags
8174                 ol_LIBS="$LIBS"
8175                 LIBS="-thread $LIBS"
8176
8177                 if test "$cross_compiling" = yes; then
8178   cat > conftest.$ac_ext <<EOF
8179 #line 8180 "configure"
8180 #include "confdefs.h"
8181 /* pthread test headers */
8182 #include <pthread.h>
8183 #ifndef NULL
8184 #define NULL (void*)0
8185 #endif
8186
8187 static void *task(p)
8188         void *p;
8189 {
8190         return (void *) (p == NULL);
8191 }
8192
8193 int main() {
8194
8195         /* pthread test function */
8196         pthread_t t;
8197         int status;
8198 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8199         /* This system (e.g. AIX) defaults detached; must override */
8200         pthread_attr_t attr;
8201
8202         status = pthread_attr_init(&attr);
8203         if( status ) exit( status );
8204
8205         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8206         if( status ) exit( status );
8207
8208 #define ATTR    &attr
8209 #else
8210 #if HAVE_PTHREADS_D4
8211 #define ATTR    pthread_attr_default
8212 #else
8213 #define ATTR    NULL
8214 #endif
8215 #endif
8216         /* make sure pthread_create() isn't just a stub */
8217         status = pthread_create(&t, ATTR, task, NULL);
8218         if( status ) exit( status );
8219
8220         /* make sure pthread_detach() isn't just a stub */
8221 #if HAVE_PTHREADS_D4
8222         status = pthread_detach( &t );
8223 #else
8224         status = pthread_detach( t );
8225 #endif
8226
8227 #ifdef HAVE_LINUX_THREADS
8228         pthread_kill_other_threads_np();
8229 #endif
8230
8231         exit( status );
8232
8233 ; return 0; }
8234 EOF
8235 if { (eval echo configure:8236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8236   rm -rf conftest*
8237   ol_cv_pthread_thread=yes
8238 else
8239   echo "configure: failed program was:" >&5
8240   cat conftest.$ac_ext >&5
8241   rm -rf conftest*
8242   ol_cv_pthread_thread=no
8243 fi
8244 rm -f conftest*
8245 else
8246   cat > conftest.$ac_ext <<EOF
8247 #line 8248 "configure"
8248 #include "confdefs.h"
8249 /* pthread test headers */
8250 #include <pthread.h>
8251 #ifndef NULL
8252 #define NULL (void*)0
8253 #endif
8254
8255 static void *task(p)
8256         void *p;
8257 {
8258         return (void *) (p == NULL);
8259 }
8260
8261
8262 int main(argc, argv)
8263         int argc;
8264         char **argv;
8265 {
8266
8267         /* pthread test function */
8268         pthread_t t;
8269         int status;
8270 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8271         /* This system (e.g. AIX) defaults detached; must override */
8272         pthread_attr_t attr;
8273
8274         status = pthread_attr_init(&attr);
8275         if( status ) exit( status );
8276
8277         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8278         if( status ) exit( status );
8279
8280 #define ATTR    &attr
8281 #else
8282 #if HAVE_PTHREADS_D4
8283 #define ATTR    pthread_attr_default
8284 #else
8285 #define ATTR    NULL
8286 #endif
8287 #endif
8288         /* make sure pthread_create() isn't just a stub */
8289         status = pthread_create(&t, ATTR, task, NULL);
8290         if( status ) exit( status );
8291
8292         /* make sure pthread_detach() isn't just a stub */
8293 #if HAVE_PTHREADS_D4
8294         status = pthread_detach( &t );
8295 #else
8296         status = pthread_detach( t );
8297 #endif
8298
8299 #ifdef HAVE_LINUX_THREADS
8300         pthread_kill_other_threads_np();
8301 #endif
8302
8303         exit( status );
8304
8305 }
8306
8307 EOF
8308 if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8309 then
8310   ol_cv_pthread_thread=yes
8311 else
8312   echo "configure: failed program was:" >&5
8313   cat conftest.$ac_ext >&5
8314   rm -fr conftest*
8315   ol_cv_pthread_thread=no
8316 fi
8317 rm -fr conftest*
8318 fi
8319
8320
8321                 # restore the LIBS
8322                 LIBS="$ol_LIBS"
8323         
8324 fi
8325
8326 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8327
8328         if test $ol_cv_pthread_thread = yes ; then
8329                 ol_link_pthreads="-thread"
8330                 ol_link_threads=posix
8331         fi
8332 fi
8333
8334
8335                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8336 if test "$ol_link_threads" = no ; then
8337         # try -lpthread -lmach -lexc -lc_r
8338         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8339 echo "configure:8340: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8340 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8341   echo $ac_n "(cached) $ac_c" 1>&6
8342 else
8343   
8344                 # save the flags
8345                 ol_LIBS="$LIBS"
8346                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8347
8348                 if test "$cross_compiling" = yes; then
8349   cat > conftest.$ac_ext <<EOF
8350 #line 8351 "configure"
8351 #include "confdefs.h"
8352 /* pthread test headers */
8353 #include <pthread.h>
8354 #ifndef NULL
8355 #define NULL (void*)0
8356 #endif
8357
8358 static void *task(p)
8359         void *p;
8360 {
8361         return (void *) (p == NULL);
8362 }
8363
8364 int main() {
8365
8366         /* pthread test function */
8367         pthread_t t;
8368         int status;
8369 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8370         /* This system (e.g. AIX) defaults detached; must override */
8371         pthread_attr_t attr;
8372
8373         status = pthread_attr_init(&attr);
8374         if( status ) exit( status );
8375
8376         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8377         if( status ) exit( status );
8378
8379 #define ATTR    &attr
8380 #else
8381 #if HAVE_PTHREADS_D4
8382 #define ATTR    pthread_attr_default
8383 #else
8384 #define ATTR    NULL
8385 #endif
8386 #endif
8387         /* make sure pthread_create() isn't just a stub */
8388         status = pthread_create(&t, ATTR, task, NULL);
8389         if( status ) exit( status );
8390
8391         /* make sure pthread_detach() isn't just a stub */
8392 #if HAVE_PTHREADS_D4
8393         status = pthread_detach( &t );
8394 #else
8395         status = pthread_detach( t );
8396 #endif
8397
8398 #ifdef HAVE_LINUX_THREADS
8399         pthread_kill_other_threads_np();
8400 #endif
8401
8402         exit( status );
8403
8404 ; return 0; }
8405 EOF
8406 if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8407   rm -rf conftest*
8408   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8409 else
8410   echo "configure: failed program was:" >&5
8411   cat conftest.$ac_ext >&5
8412   rm -rf conftest*
8413   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8414 fi
8415 rm -f conftest*
8416 else
8417   cat > conftest.$ac_ext <<EOF
8418 #line 8419 "configure"
8419 #include "confdefs.h"
8420 /* pthread test headers */
8421 #include <pthread.h>
8422 #ifndef NULL
8423 #define NULL (void*)0
8424 #endif
8425
8426 static void *task(p)
8427         void *p;
8428 {
8429         return (void *) (p == NULL);
8430 }
8431
8432
8433 int main(argc, argv)
8434         int argc;
8435         char **argv;
8436 {
8437
8438         /* pthread test function */
8439         pthread_t t;
8440         int status;
8441 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8442         /* This system (e.g. AIX) defaults detached; must override */
8443         pthread_attr_t attr;
8444
8445         status = pthread_attr_init(&attr);
8446         if( status ) exit( status );
8447
8448         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8449         if( status ) exit( status );
8450
8451 #define ATTR    &attr
8452 #else
8453 #if HAVE_PTHREADS_D4
8454 #define ATTR    pthread_attr_default
8455 #else
8456 #define ATTR    NULL
8457 #endif
8458 #endif
8459         /* make sure pthread_create() isn't just a stub */
8460         status = pthread_create(&t, ATTR, task, NULL);
8461         if( status ) exit( status );
8462
8463         /* make sure pthread_detach() isn't just a stub */
8464 #if HAVE_PTHREADS_D4
8465         status = pthread_detach( &t );
8466 #else
8467         status = pthread_detach( t );
8468 #endif
8469
8470 #ifdef HAVE_LINUX_THREADS
8471         pthread_kill_other_threads_np();
8472 #endif
8473
8474         exit( status );
8475
8476 }
8477
8478 EOF
8479 if { (eval echo configure:8480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8480 then
8481   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8482 else
8483   echo "configure: failed program was:" >&5
8484   cat conftest.$ac_ext >&5
8485   rm -fr conftest*
8486   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8487 fi
8488 rm -fr conftest*
8489 fi
8490
8491
8492                 # restore the LIBS
8493                 LIBS="$ol_LIBS"
8494         
8495 fi
8496
8497 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8498
8499         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8500                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8501                 ol_link_threads=posix
8502         fi
8503 fi
8504
8505                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8506 if test "$ol_link_threads" = no ; then
8507         # try -lpthread -lmach -lexc
8508         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8509 echo "configure:8510: checking for pthread link with -lpthread -lmach -lexc" >&5
8510 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8511   echo $ac_n "(cached) $ac_c" 1>&6
8512 else
8513   
8514                 # save the flags
8515                 ol_LIBS="$LIBS"
8516                 LIBS="-lpthread -lmach -lexc $LIBS"
8517
8518                 if test "$cross_compiling" = yes; then
8519   cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 /* pthread test headers */
8523 #include <pthread.h>
8524 #ifndef NULL
8525 #define NULL (void*)0
8526 #endif
8527
8528 static void *task(p)
8529         void *p;
8530 {
8531         return (void *) (p == NULL);
8532 }
8533
8534 int main() {
8535
8536         /* pthread test function */
8537         pthread_t t;
8538         int status;
8539 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8540         /* This system (e.g. AIX) defaults detached; must override */
8541         pthread_attr_t attr;
8542
8543         status = pthread_attr_init(&attr);
8544         if( status ) exit( status );
8545
8546         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8547         if( status ) exit( status );
8548
8549 #define ATTR    &attr
8550 #else
8551 #if HAVE_PTHREADS_D4
8552 #define ATTR    pthread_attr_default
8553 #else
8554 #define ATTR    NULL
8555 #endif
8556 #endif
8557         /* make sure pthread_create() isn't just a stub */
8558         status = pthread_create(&t, ATTR, task, NULL);
8559         if( status ) exit( status );
8560
8561         /* make sure pthread_detach() isn't just a stub */
8562 #if HAVE_PTHREADS_D4
8563         status = pthread_detach( &t );
8564 #else
8565         status = pthread_detach( t );
8566 #endif
8567
8568 #ifdef HAVE_LINUX_THREADS
8569         pthread_kill_other_threads_np();
8570 #endif
8571
8572         exit( status );
8573
8574 ; return 0; }
8575 EOF
8576 if { (eval echo configure:8577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8577   rm -rf conftest*
8578   ol_cv_pthread_lpthread_lmach_lexc=yes
8579 else
8580   echo "configure: failed program was:" >&5
8581   cat conftest.$ac_ext >&5
8582   rm -rf conftest*
8583   ol_cv_pthread_lpthread_lmach_lexc=no
8584 fi
8585 rm -f conftest*
8586 else
8587   cat > conftest.$ac_ext <<EOF
8588 #line 8589 "configure"
8589 #include "confdefs.h"
8590 /* pthread test headers */
8591 #include <pthread.h>
8592 #ifndef NULL
8593 #define NULL (void*)0
8594 #endif
8595
8596 static void *task(p)
8597         void *p;
8598 {
8599         return (void *) (p == NULL);
8600 }
8601
8602
8603 int main(argc, argv)
8604         int argc;
8605         char **argv;
8606 {
8607
8608         /* pthread test function */
8609         pthread_t t;
8610         int status;
8611 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8612         /* This system (e.g. AIX) defaults detached; must override */
8613         pthread_attr_t attr;
8614
8615         status = pthread_attr_init(&attr);
8616         if( status ) exit( status );
8617
8618         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8619         if( status ) exit( status );
8620
8621 #define ATTR    &attr
8622 #else
8623 #if HAVE_PTHREADS_D4
8624 #define ATTR    pthread_attr_default
8625 #else
8626 #define ATTR    NULL
8627 #endif
8628 #endif
8629         /* make sure pthread_create() isn't just a stub */
8630         status = pthread_create(&t, ATTR, task, NULL);
8631         if( status ) exit( status );
8632
8633         /* make sure pthread_detach() isn't just a stub */
8634 #if HAVE_PTHREADS_D4
8635         status = pthread_detach( &t );
8636 #else
8637         status = pthread_detach( t );
8638 #endif
8639
8640 #ifdef HAVE_LINUX_THREADS
8641         pthread_kill_other_threads_np();
8642 #endif
8643
8644         exit( status );
8645
8646 }
8647
8648 EOF
8649 if { (eval echo configure:8650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8650 then
8651   ol_cv_pthread_lpthread_lmach_lexc=yes
8652 else
8653   echo "configure: failed program was:" >&5
8654   cat conftest.$ac_ext >&5
8655   rm -fr conftest*
8656   ol_cv_pthread_lpthread_lmach_lexc=no
8657 fi
8658 rm -fr conftest*
8659 fi
8660
8661
8662                 # restore the LIBS
8663                 LIBS="$ol_LIBS"
8664         
8665 fi
8666
8667 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8668
8669         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8670                 ol_link_pthreads="-lpthread -lmach -lexc"
8671                 ol_link_threads=posix
8672         fi
8673 fi
8674
8675
8676                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8677 if test "$ol_link_threads" = no ; then
8678         # try -lpthread -Wl,-woff,85
8679         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8680 echo "configure:8681: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8681 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8682   echo $ac_n "(cached) $ac_c" 1>&6
8683 else
8684   
8685                 # save the flags
8686                 ol_LIBS="$LIBS"
8687                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8688
8689                 if test "$cross_compiling" = yes; then
8690   cat > conftest.$ac_ext <<EOF
8691 #line 8692 "configure"
8692 #include "confdefs.h"
8693 /* pthread test headers */
8694 #include <pthread.h>
8695 #ifndef NULL
8696 #define NULL (void*)0
8697 #endif
8698
8699 static void *task(p)
8700         void *p;
8701 {
8702         return (void *) (p == NULL);
8703 }
8704
8705 int main() {
8706
8707         /* pthread test function */
8708         pthread_t t;
8709         int status;
8710 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8711         /* This system (e.g. AIX) defaults detached; must override */
8712         pthread_attr_t attr;
8713
8714         status = pthread_attr_init(&attr);
8715         if( status ) exit( status );
8716
8717         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8718         if( status ) exit( status );
8719
8720 #define ATTR    &attr
8721 #else
8722 #if HAVE_PTHREADS_D4
8723 #define ATTR    pthread_attr_default
8724 #else
8725 #define ATTR    NULL
8726 #endif
8727 #endif
8728         /* make sure pthread_create() isn't just a stub */
8729         status = pthread_create(&t, ATTR, task, NULL);
8730         if( status ) exit( status );
8731
8732         /* make sure pthread_detach() isn't just a stub */
8733 #if HAVE_PTHREADS_D4
8734         status = pthread_detach( &t );
8735 #else
8736         status = pthread_detach( t );
8737 #endif
8738
8739 #ifdef HAVE_LINUX_THREADS
8740         pthread_kill_other_threads_np();
8741 #endif
8742
8743         exit( status );
8744
8745 ; return 0; }
8746 EOF
8747 if { (eval echo configure:8748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8748   rm -rf conftest*
8749   ol_cv_pthread_lib_lpthread_woff=yes
8750 else
8751   echo "configure: failed program was:" >&5
8752   cat conftest.$ac_ext >&5
8753   rm -rf conftest*
8754   ol_cv_pthread_lib_lpthread_woff=no
8755 fi
8756 rm -f conftest*
8757 else
8758   cat > conftest.$ac_ext <<EOF
8759 #line 8760 "configure"
8760 #include "confdefs.h"
8761 /* pthread test headers */
8762 #include <pthread.h>
8763 #ifndef NULL
8764 #define NULL (void*)0
8765 #endif
8766
8767 static void *task(p)
8768         void *p;
8769 {
8770         return (void *) (p == NULL);
8771 }
8772
8773
8774 int main(argc, argv)
8775         int argc;
8776         char **argv;
8777 {
8778
8779         /* pthread test function */
8780         pthread_t t;
8781         int status;
8782 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8783         /* This system (e.g. AIX) defaults detached; must override */
8784         pthread_attr_t attr;
8785
8786         status = pthread_attr_init(&attr);
8787         if( status ) exit( status );
8788
8789         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8790         if( status ) exit( status );
8791
8792 #define ATTR    &attr
8793 #else
8794 #if HAVE_PTHREADS_D4
8795 #define ATTR    pthread_attr_default
8796 #else
8797 #define ATTR    NULL
8798 #endif
8799 #endif
8800         /* make sure pthread_create() isn't just a stub */
8801         status = pthread_create(&t, ATTR, task, NULL);
8802         if( status ) exit( status );
8803
8804         /* make sure pthread_detach() isn't just a stub */
8805 #if HAVE_PTHREADS_D4
8806         status = pthread_detach( &t );
8807 #else
8808         status = pthread_detach( t );
8809 #endif
8810
8811 #ifdef HAVE_LINUX_THREADS
8812         pthread_kill_other_threads_np();
8813 #endif
8814
8815         exit( status );
8816
8817 }
8818
8819 EOF
8820 if { (eval echo configure:8821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8821 then
8822   ol_cv_pthread_lib_lpthread_woff=yes
8823 else
8824   echo "configure: failed program was:" >&5
8825   cat conftest.$ac_ext >&5
8826   rm -fr conftest*
8827   ol_cv_pthread_lib_lpthread_woff=no
8828 fi
8829 rm -fr conftest*
8830 fi
8831
8832
8833                 # restore the LIBS
8834                 LIBS="$ol_LIBS"
8835         
8836 fi
8837
8838 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8839
8840         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8841                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8842                 ol_link_threads=posix
8843         fi
8844 fi
8845
8846
8847                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8848 if test "$ol_link_threads" = no ; then
8849         # try -lpthread
8850         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8851 echo "configure:8852: checking for pthread link with -lpthread" >&5
8852 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   
8856                 # save the flags
8857                 ol_LIBS="$LIBS"
8858                 LIBS="-lpthread $LIBS"
8859
8860                 if test "$cross_compiling" = yes; then
8861   cat > conftest.$ac_ext <<EOF
8862 #line 8863 "configure"
8863 #include "confdefs.h"
8864 /* pthread test headers */
8865 #include <pthread.h>
8866 #ifndef NULL
8867 #define NULL (void*)0
8868 #endif
8869
8870 static void *task(p)
8871         void *p;
8872 {
8873         return (void *) (p == NULL);
8874 }
8875
8876 int main() {
8877
8878         /* pthread test function */
8879         pthread_t t;
8880         int status;
8881 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8882         /* This system (e.g. AIX) defaults detached; must override */
8883         pthread_attr_t attr;
8884
8885         status = pthread_attr_init(&attr);
8886         if( status ) exit( status );
8887
8888         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8889         if( status ) exit( status );
8890
8891 #define ATTR    &attr
8892 #else
8893 #if HAVE_PTHREADS_D4
8894 #define ATTR    pthread_attr_default
8895 #else
8896 #define ATTR    NULL
8897 #endif
8898 #endif
8899         /* make sure pthread_create() isn't just a stub */
8900         status = pthread_create(&t, ATTR, task, NULL);
8901         if( status ) exit( status );
8902
8903         /* make sure pthread_detach() isn't just a stub */
8904 #if HAVE_PTHREADS_D4
8905         status = pthread_detach( &t );
8906 #else
8907         status = pthread_detach( t );
8908 #endif
8909
8910 #ifdef HAVE_LINUX_THREADS
8911         pthread_kill_other_threads_np();
8912 #endif
8913
8914         exit( status );
8915
8916 ; return 0; }
8917 EOF
8918 if { (eval echo configure:8919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8919   rm -rf conftest*
8920   ol_cv_pthread_lpthread=yes
8921 else
8922   echo "configure: failed program was:" >&5
8923   cat conftest.$ac_ext >&5
8924   rm -rf conftest*
8925   ol_cv_pthread_lpthread=no
8926 fi
8927 rm -f conftest*
8928 else
8929   cat > conftest.$ac_ext <<EOF
8930 #line 8931 "configure"
8931 #include "confdefs.h"
8932 /* pthread test headers */
8933 #include <pthread.h>
8934 #ifndef NULL
8935 #define NULL (void*)0
8936 #endif
8937
8938 static void *task(p)
8939         void *p;
8940 {
8941         return (void *) (p == NULL);
8942 }
8943
8944
8945 int main(argc, argv)
8946         int argc;
8947         char **argv;
8948 {
8949
8950         /* pthread test function */
8951         pthread_t t;
8952         int status;
8953 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8954         /* This system (e.g. AIX) defaults detached; must override */
8955         pthread_attr_t attr;
8956
8957         status = pthread_attr_init(&attr);
8958         if( status ) exit( status );
8959
8960         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8961         if( status ) exit( status );
8962
8963 #define ATTR    &attr
8964 #else
8965 #if HAVE_PTHREADS_D4
8966 #define ATTR    pthread_attr_default
8967 #else
8968 #define ATTR    NULL
8969 #endif
8970 #endif
8971         /* make sure pthread_create() isn't just a stub */
8972         status = pthread_create(&t, ATTR, task, NULL);
8973         if( status ) exit( status );
8974
8975         /* make sure pthread_detach() isn't just a stub */
8976 #if HAVE_PTHREADS_D4
8977         status = pthread_detach( &t );
8978 #else
8979         status = pthread_detach( t );
8980 #endif
8981
8982 #ifdef HAVE_LINUX_THREADS
8983         pthread_kill_other_threads_np();
8984 #endif
8985
8986         exit( status );
8987
8988 }
8989
8990 EOF
8991 if { (eval echo configure:8992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8992 then
8993   ol_cv_pthread_lpthread=yes
8994 else
8995   echo "configure: failed program was:" >&5
8996   cat conftest.$ac_ext >&5
8997   rm -fr conftest*
8998   ol_cv_pthread_lpthread=no
8999 fi
9000 rm -fr conftest*
9001 fi
9002
9003
9004                 # restore the LIBS
9005                 LIBS="$ol_LIBS"
9006         
9007 fi
9008
9009 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9010
9011         if test $ol_cv_pthread_lpthread = yes ; then
9012                 ol_link_pthreads="-lpthread"
9013                 ol_link_threads=posix
9014         fi
9015 fi
9016
9017                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9018 if test "$ol_link_threads" = no ; then
9019         # try -lc_r
9020         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9021 echo "configure:9022: checking for pthread link with -lc_r" >&5
9022 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9023   echo $ac_n "(cached) $ac_c" 1>&6
9024 else
9025   
9026                 # save the flags
9027                 ol_LIBS="$LIBS"
9028                 LIBS="-lc_r $LIBS"
9029
9030                 if test "$cross_compiling" = yes; then
9031   cat > conftest.$ac_ext <<EOF
9032 #line 9033 "configure"
9033 #include "confdefs.h"
9034 /* pthread test headers */
9035 #include <pthread.h>
9036 #ifndef NULL
9037 #define NULL (void*)0
9038 #endif
9039
9040 static void *task(p)
9041         void *p;
9042 {
9043         return (void *) (p == NULL);
9044 }
9045
9046 int main() {
9047
9048         /* pthread test function */
9049         pthread_t t;
9050         int status;
9051 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9052         /* This system (e.g. AIX) defaults detached; must override */
9053         pthread_attr_t attr;
9054
9055         status = pthread_attr_init(&attr);
9056         if( status ) exit( status );
9057
9058         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9059         if( status ) exit( status );
9060
9061 #define ATTR    &attr
9062 #else
9063 #if HAVE_PTHREADS_D4
9064 #define ATTR    pthread_attr_default
9065 #else
9066 #define ATTR    NULL
9067 #endif
9068 #endif
9069         /* make sure pthread_create() isn't just a stub */
9070         status = pthread_create(&t, ATTR, task, NULL);
9071         if( status ) exit( status );
9072
9073         /* make sure pthread_detach() isn't just a stub */
9074 #if HAVE_PTHREADS_D4
9075         status = pthread_detach( &t );
9076 #else
9077         status = pthread_detach( t );
9078 #endif
9079
9080 #ifdef HAVE_LINUX_THREADS
9081         pthread_kill_other_threads_np();
9082 #endif
9083
9084         exit( status );
9085
9086 ; return 0; }
9087 EOF
9088 if { (eval echo configure:9089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9089   rm -rf conftest*
9090   ol_cv_pthread_lc_r=yes
9091 else
9092   echo "configure: failed program was:" >&5
9093   cat conftest.$ac_ext >&5
9094   rm -rf conftest*
9095   ol_cv_pthread_lc_r=no
9096 fi
9097 rm -f conftest*
9098 else
9099   cat > conftest.$ac_ext <<EOF
9100 #line 9101 "configure"
9101 #include "confdefs.h"
9102 /* pthread test headers */
9103 #include <pthread.h>
9104 #ifndef NULL
9105 #define NULL (void*)0
9106 #endif
9107
9108 static void *task(p)
9109         void *p;
9110 {
9111         return (void *) (p == NULL);
9112 }
9113
9114
9115 int main(argc, argv)
9116         int argc;
9117         char **argv;
9118 {
9119
9120         /* pthread test function */
9121         pthread_t t;
9122         int status;
9123 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9124         /* This system (e.g. AIX) defaults detached; must override */
9125         pthread_attr_t attr;
9126
9127         status = pthread_attr_init(&attr);
9128         if( status ) exit( status );
9129
9130         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9131         if( status ) exit( status );
9132
9133 #define ATTR    &attr
9134 #else
9135 #if HAVE_PTHREADS_D4
9136 #define ATTR    pthread_attr_default
9137 #else
9138 #define ATTR    NULL
9139 #endif
9140 #endif
9141         /* make sure pthread_create() isn't just a stub */
9142         status = pthread_create(&t, ATTR, task, NULL);
9143         if( status ) exit( status );
9144
9145         /* make sure pthread_detach() isn't just a stub */
9146 #if HAVE_PTHREADS_D4
9147         status = pthread_detach( &t );
9148 #else
9149         status = pthread_detach( t );
9150 #endif
9151
9152 #ifdef HAVE_LINUX_THREADS
9153         pthread_kill_other_threads_np();
9154 #endif
9155
9156         exit( status );
9157
9158 }
9159
9160 EOF
9161 if { (eval echo configure:9162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9162 then
9163   ol_cv_pthread_lc_r=yes
9164 else
9165   echo "configure: failed program was:" >&5
9166   cat conftest.$ac_ext >&5
9167   rm -fr conftest*
9168   ol_cv_pthread_lc_r=no
9169 fi
9170 rm -fr conftest*
9171 fi
9172
9173
9174                 # restore the LIBS
9175                 LIBS="$ol_LIBS"
9176         
9177 fi
9178
9179 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9180
9181         if test $ol_cv_pthread_lc_r = yes ; then
9182                 ol_link_pthreads="-lc_r"
9183                 ol_link_threads=posix
9184         fi
9185 fi
9186
9187
9188                 # Pthread try link: -threads (ol_cv_pthread_threads)
9189 if test "$ol_link_threads" = no ; then
9190         # try -threads
9191         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9192 echo "configure:9193: checking for pthread link with -threads" >&5
9193 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   
9197                 # save the flags
9198                 ol_LIBS="$LIBS"
9199                 LIBS="-threads $LIBS"
9200
9201                 if test "$cross_compiling" = yes; then
9202   cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205 /* pthread test headers */
9206 #include <pthread.h>
9207 #ifndef NULL
9208 #define NULL (void*)0
9209 #endif
9210
9211 static void *task(p)
9212         void *p;
9213 {
9214         return (void *) (p == NULL);
9215 }
9216
9217 int main() {
9218
9219         /* pthread test function */
9220         pthread_t t;
9221         int status;
9222 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9223         /* This system (e.g. AIX) defaults detached; must override */
9224         pthread_attr_t attr;
9225
9226         status = pthread_attr_init(&attr);
9227         if( status ) exit( status );
9228
9229         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9230         if( status ) exit( status );
9231
9232 #define ATTR    &attr
9233 #else
9234 #if HAVE_PTHREADS_D4
9235 #define ATTR    pthread_attr_default
9236 #else
9237 #define ATTR    NULL
9238 #endif
9239 #endif
9240         /* make sure pthread_create() isn't just a stub */
9241         status = pthread_create(&t, ATTR, task, NULL);
9242         if( status ) exit( status );
9243
9244         /* make sure pthread_detach() isn't just a stub */
9245 #if HAVE_PTHREADS_D4
9246         status = pthread_detach( &t );
9247 #else
9248         status = pthread_detach( t );
9249 #endif
9250
9251 #ifdef HAVE_LINUX_THREADS
9252         pthread_kill_other_threads_np();
9253 #endif
9254
9255         exit( status );
9256
9257 ; return 0; }
9258 EOF
9259 if { (eval echo configure:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9260   rm -rf conftest*
9261   ol_cv_pthread_threads=yes
9262 else
9263   echo "configure: failed program was:" >&5
9264   cat conftest.$ac_ext >&5
9265   rm -rf conftest*
9266   ol_cv_pthread_threads=no
9267 fi
9268 rm -f conftest*
9269 else
9270   cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273 /* pthread test headers */
9274 #include <pthread.h>
9275 #ifndef NULL
9276 #define NULL (void*)0
9277 #endif
9278
9279 static void *task(p)
9280         void *p;
9281 {
9282         return (void *) (p == NULL);
9283 }
9284
9285
9286 int main(argc, argv)
9287         int argc;
9288         char **argv;
9289 {
9290
9291         /* pthread test function */
9292         pthread_t t;
9293         int status;
9294 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9295         /* This system (e.g. AIX) defaults detached; must override */
9296         pthread_attr_t attr;
9297
9298         status = pthread_attr_init(&attr);
9299         if( status ) exit( status );
9300
9301         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9302         if( status ) exit( status );
9303
9304 #define ATTR    &attr
9305 #else
9306 #if HAVE_PTHREADS_D4
9307 #define ATTR    pthread_attr_default
9308 #else
9309 #define ATTR    NULL
9310 #endif
9311 #endif
9312         /* make sure pthread_create() isn't just a stub */
9313         status = pthread_create(&t, ATTR, task, NULL);
9314         if( status ) exit( status );
9315
9316         /* make sure pthread_detach() isn't just a stub */
9317 #if HAVE_PTHREADS_D4
9318         status = pthread_detach( &t );
9319 #else
9320         status = pthread_detach( t );
9321 #endif
9322
9323 #ifdef HAVE_LINUX_THREADS
9324         pthread_kill_other_threads_np();
9325 #endif
9326
9327         exit( status );
9328
9329 }
9330
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9333 then
9334   ol_cv_pthread_threads=yes
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -fr conftest*
9339   ol_cv_pthread_threads=no
9340 fi
9341 rm -fr conftest*
9342 fi
9343
9344
9345                 # restore the LIBS
9346                 LIBS="$ol_LIBS"
9347         
9348 fi
9349
9350 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9351
9352         if test $ol_cv_pthread_threads = yes ; then
9353                 ol_link_pthreads="-threads"
9354                 ol_link_threads=posix
9355         fi
9356 fi
9357
9358
9359                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9360 if test "$ol_link_threads" = no ; then
9361         # try -lpthreads -lmach -lexc -lc_r
9362         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9363 echo "configure:9364: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9364 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367   
9368                 # save the flags
9369                 ol_LIBS="$LIBS"
9370                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9371
9372                 if test "$cross_compiling" = yes; then
9373   cat > conftest.$ac_ext <<EOF
9374 #line 9375 "configure"
9375 #include "confdefs.h"
9376 /* pthread test headers */
9377 #include <pthread.h>
9378 #ifndef NULL
9379 #define NULL (void*)0
9380 #endif
9381
9382 static void *task(p)
9383         void *p;
9384 {
9385         return (void *) (p == NULL);
9386 }
9387
9388 int main() {
9389
9390         /* pthread test function */
9391         pthread_t t;
9392         int status;
9393 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9394         /* This system (e.g. AIX) defaults detached; must override */
9395         pthread_attr_t attr;
9396
9397         status = pthread_attr_init(&attr);
9398         if( status ) exit( status );
9399
9400         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9401         if( status ) exit( status );
9402
9403 #define ATTR    &attr
9404 #else
9405 #if HAVE_PTHREADS_D4
9406 #define ATTR    pthread_attr_default
9407 #else
9408 #define ATTR    NULL
9409 #endif
9410 #endif
9411         /* make sure pthread_create() isn't just a stub */
9412         status = pthread_create(&t, ATTR, task, NULL);
9413         if( status ) exit( status );
9414
9415         /* make sure pthread_detach() isn't just a stub */
9416 #if HAVE_PTHREADS_D4
9417         status = pthread_detach( &t );
9418 #else
9419         status = pthread_detach( t );
9420 #endif
9421
9422 #ifdef HAVE_LINUX_THREADS
9423         pthread_kill_other_threads_np();
9424 #endif
9425
9426         exit( status );
9427
9428 ; return 0; }
9429 EOF
9430 if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9431   rm -rf conftest*
9432   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9433 else
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -rf conftest*
9437   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9438 fi
9439 rm -f conftest*
9440 else
9441   cat > conftest.$ac_ext <<EOF
9442 #line 9443 "configure"
9443 #include "confdefs.h"
9444 /* pthread test headers */
9445 #include <pthread.h>
9446 #ifndef NULL
9447 #define NULL (void*)0
9448 #endif
9449
9450 static void *task(p)
9451         void *p;
9452 {
9453         return (void *) (p == NULL);
9454 }
9455
9456
9457 int main(argc, argv)
9458         int argc;
9459         char **argv;
9460 {
9461
9462         /* pthread test function */
9463         pthread_t t;
9464         int status;
9465 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9466         /* This system (e.g. AIX) defaults detached; must override */
9467         pthread_attr_t attr;
9468
9469         status = pthread_attr_init(&attr);
9470         if( status ) exit( status );
9471
9472         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9473         if( status ) exit( status );
9474
9475 #define ATTR    &attr
9476 #else
9477 #if HAVE_PTHREADS_D4
9478 #define ATTR    pthread_attr_default
9479 #else
9480 #define ATTR    NULL
9481 #endif
9482 #endif
9483         /* make sure pthread_create() isn't just a stub */
9484         status = pthread_create(&t, ATTR, task, NULL);
9485         if( status ) exit( status );
9486
9487         /* make sure pthread_detach() isn't just a stub */
9488 #if HAVE_PTHREADS_D4
9489         status = pthread_detach( &t );
9490 #else
9491         status = pthread_detach( t );
9492 #endif
9493
9494 #ifdef HAVE_LINUX_THREADS
9495         pthread_kill_other_threads_np();
9496 #endif
9497
9498         exit( status );
9499
9500 }
9501
9502 EOF
9503 if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9504 then
9505   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9506 else
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -fr conftest*
9510   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9511 fi
9512 rm -fr conftest*
9513 fi
9514
9515
9516                 # restore the LIBS
9517                 LIBS="$ol_LIBS"
9518         
9519 fi
9520
9521 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9522
9523         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9524                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9525                 ol_link_threads=posix
9526         fi
9527 fi
9528
9529                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9530 if test "$ol_link_threads" = no ; then
9531         # try -lpthreads -lmach -lexc
9532         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9533 echo "configure:9534: checking for pthread link with -lpthreads -lmach -lexc" >&5
9534 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9535   echo $ac_n "(cached) $ac_c" 1>&6
9536 else
9537   
9538                 # save the flags
9539                 ol_LIBS="$LIBS"
9540                 LIBS="-lpthreads -lmach -lexc $LIBS"
9541
9542                 if test "$cross_compiling" = yes; then
9543   cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546 /* pthread test headers */
9547 #include <pthread.h>
9548 #ifndef NULL
9549 #define NULL (void*)0
9550 #endif
9551
9552 static void *task(p)
9553         void *p;
9554 {
9555         return (void *) (p == NULL);
9556 }
9557
9558 int main() {
9559
9560         /* pthread test function */
9561         pthread_t t;
9562         int status;
9563 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9564         /* This system (e.g. AIX) defaults detached; must override */
9565         pthread_attr_t attr;
9566
9567         status = pthread_attr_init(&attr);
9568         if( status ) exit( status );
9569
9570         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9571         if( status ) exit( status );
9572
9573 #define ATTR    &attr
9574 #else
9575 #if HAVE_PTHREADS_D4
9576 #define ATTR    pthread_attr_default
9577 #else
9578 #define ATTR    NULL
9579 #endif
9580 #endif
9581         /* make sure pthread_create() isn't just a stub */
9582         status = pthread_create(&t, ATTR, task, NULL);
9583         if( status ) exit( status );
9584
9585         /* make sure pthread_detach() isn't just a stub */
9586 #if HAVE_PTHREADS_D4
9587         status = pthread_detach( &t );
9588 #else
9589         status = pthread_detach( t );
9590 #endif
9591
9592 #ifdef HAVE_LINUX_THREADS
9593         pthread_kill_other_threads_np();
9594 #endif
9595
9596         exit( status );
9597
9598 ; return 0; }
9599 EOF
9600 if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9601   rm -rf conftest*
9602   ol_cv_pthread_lpthreads_lmach_lexc=yes
9603 else
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606   rm -rf conftest*
9607   ol_cv_pthread_lpthreads_lmach_lexc=no
9608 fi
9609 rm -f conftest*
9610 else
9611   cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614 /* pthread test headers */
9615 #include <pthread.h>
9616 #ifndef NULL
9617 #define NULL (void*)0
9618 #endif
9619
9620 static void *task(p)
9621         void *p;
9622 {
9623         return (void *) (p == NULL);
9624 }
9625
9626
9627 int main(argc, argv)
9628         int argc;
9629         char **argv;
9630 {
9631
9632         /* pthread test function */
9633         pthread_t t;
9634         int status;
9635 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9636         /* This system (e.g. AIX) defaults detached; must override */
9637         pthread_attr_t attr;
9638
9639         status = pthread_attr_init(&attr);
9640         if( status ) exit( status );
9641
9642         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9643         if( status ) exit( status );
9644
9645 #define ATTR    &attr
9646 #else
9647 #if HAVE_PTHREADS_D4
9648 #define ATTR    pthread_attr_default
9649 #else
9650 #define ATTR    NULL
9651 #endif
9652 #endif
9653         /* make sure pthread_create() isn't just a stub */
9654         status = pthread_create(&t, ATTR, task, NULL);
9655         if( status ) exit( status );
9656
9657         /* make sure pthread_detach() isn't just a stub */
9658 #if HAVE_PTHREADS_D4
9659         status = pthread_detach( &t );
9660 #else
9661         status = pthread_detach( t );
9662 #endif
9663
9664 #ifdef HAVE_LINUX_THREADS
9665         pthread_kill_other_threads_np();
9666 #endif
9667
9668         exit( status );
9669
9670 }
9671
9672 EOF
9673 if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9674 then
9675   ol_cv_pthread_lpthreads_lmach_lexc=yes
9676 else
9677   echo "configure: failed program was:" >&5
9678   cat conftest.$ac_ext >&5
9679   rm -fr conftest*
9680   ol_cv_pthread_lpthreads_lmach_lexc=no
9681 fi
9682 rm -fr conftest*
9683 fi
9684
9685
9686                 # restore the LIBS
9687                 LIBS="$ol_LIBS"
9688         
9689 fi
9690
9691 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9692
9693         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9694                 ol_link_pthreads="-lpthreads -lmach -lexc"
9695                 ol_link_threads=posix
9696         fi
9697 fi
9698
9699                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9700 if test "$ol_link_threads" = no ; then
9701         # try -lpthreads -lexc
9702         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9703 echo "configure:9704: checking for pthread link with -lpthreads -lexc" >&5
9704 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   
9708                 # save the flags
9709                 ol_LIBS="$LIBS"
9710                 LIBS="-lpthreads -lexc $LIBS"
9711
9712                 if test "$cross_compiling" = yes; then
9713   cat > conftest.$ac_ext <<EOF
9714 #line 9715 "configure"
9715 #include "confdefs.h"
9716 /* pthread test headers */
9717 #include <pthread.h>
9718 #ifndef NULL
9719 #define NULL (void*)0
9720 #endif
9721
9722 static void *task(p)
9723         void *p;
9724 {
9725         return (void *) (p == NULL);
9726 }
9727
9728 int main() {
9729
9730         /* pthread test function */
9731         pthread_t t;
9732         int status;
9733 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9734         /* This system (e.g. AIX) defaults detached; must override */
9735         pthread_attr_t attr;
9736
9737         status = pthread_attr_init(&attr);
9738         if( status ) exit( status );
9739
9740         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9741         if( status ) exit( status );
9742
9743 #define ATTR    &attr
9744 #else
9745 #if HAVE_PTHREADS_D4
9746 #define ATTR    pthread_attr_default
9747 #else
9748 #define ATTR    NULL
9749 #endif
9750 #endif
9751         /* make sure pthread_create() isn't just a stub */
9752         status = pthread_create(&t, ATTR, task, NULL);
9753         if( status ) exit( status );
9754
9755         /* make sure pthread_detach() isn't just a stub */
9756 #if HAVE_PTHREADS_D4
9757         status = pthread_detach( &t );
9758 #else
9759         status = pthread_detach( t );
9760 #endif
9761
9762 #ifdef HAVE_LINUX_THREADS
9763         pthread_kill_other_threads_np();
9764 #endif
9765
9766         exit( status );
9767
9768 ; return 0; }
9769 EOF
9770 if { (eval echo configure:9771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9771   rm -rf conftest*
9772   ol_cv_pthread_lpthreads_lexc=yes
9773 else
9774   echo "configure: failed program was:" >&5
9775   cat conftest.$ac_ext >&5
9776   rm -rf conftest*
9777   ol_cv_pthread_lpthreads_lexc=no
9778 fi
9779 rm -f conftest*
9780 else
9781   cat > conftest.$ac_ext <<EOF
9782 #line 9783 "configure"
9783 #include "confdefs.h"
9784 /* pthread test headers */
9785 #include <pthread.h>
9786 #ifndef NULL
9787 #define NULL (void*)0
9788 #endif
9789
9790 static void *task(p)
9791         void *p;
9792 {
9793         return (void *) (p == NULL);
9794 }
9795
9796
9797 int main(argc, argv)
9798         int argc;
9799         char **argv;
9800 {
9801
9802         /* pthread test function */
9803         pthread_t t;
9804         int status;
9805 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9806         /* This system (e.g. AIX) defaults detached; must override */
9807         pthread_attr_t attr;
9808
9809         status = pthread_attr_init(&attr);
9810         if( status ) exit( status );
9811
9812         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9813         if( status ) exit( status );
9814
9815 #define ATTR    &attr
9816 #else
9817 #if HAVE_PTHREADS_D4
9818 #define ATTR    pthread_attr_default
9819 #else
9820 #define ATTR    NULL
9821 #endif
9822 #endif
9823         /* make sure pthread_create() isn't just a stub */
9824         status = pthread_create(&t, ATTR, task, NULL);
9825         if( status ) exit( status );
9826
9827         /* make sure pthread_detach() isn't just a stub */
9828 #if HAVE_PTHREADS_D4
9829         status = pthread_detach( &t );
9830 #else
9831         status = pthread_detach( t );
9832 #endif
9833
9834 #ifdef HAVE_LINUX_THREADS
9835         pthread_kill_other_threads_np();
9836 #endif
9837
9838         exit( status );
9839
9840 }
9841
9842 EOF
9843 if { (eval echo configure:9844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9844 then
9845   ol_cv_pthread_lpthreads_lexc=yes
9846 else
9847   echo "configure: failed program was:" >&5
9848   cat conftest.$ac_ext >&5
9849   rm -fr conftest*
9850   ol_cv_pthread_lpthreads_lexc=no
9851 fi
9852 rm -fr conftest*
9853 fi
9854
9855
9856                 # restore the LIBS
9857                 LIBS="$ol_LIBS"
9858         
9859 fi
9860
9861 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9862
9863         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9864                 ol_link_pthreads="-lpthreads -lexc"
9865                 ol_link_threads=posix
9866         fi
9867 fi
9868
9869
9870                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9871 if test "$ol_link_threads" = no ; then
9872         # try -lpthreads
9873         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9874 echo "configure:9875: checking for pthread link with -lpthreads" >&5
9875 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9876   echo $ac_n "(cached) $ac_c" 1>&6
9877 else
9878   
9879                 # save the flags
9880                 ol_LIBS="$LIBS"
9881                 LIBS="-lpthreads $LIBS"
9882
9883                 if test "$cross_compiling" = yes; then
9884   cat > conftest.$ac_ext <<EOF
9885 #line 9886 "configure"
9886 #include "confdefs.h"
9887 /* pthread test headers */
9888 #include <pthread.h>
9889 #ifndef NULL
9890 #define NULL (void*)0
9891 #endif
9892
9893 static void *task(p)
9894         void *p;
9895 {
9896         return (void *) (p == NULL);
9897 }
9898
9899 int main() {
9900
9901         /* pthread test function */
9902         pthread_t t;
9903         int status;
9904 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9905         /* This system (e.g. AIX) defaults detached; must override */
9906         pthread_attr_t attr;
9907
9908         status = pthread_attr_init(&attr);
9909         if( status ) exit( status );
9910
9911         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9912         if( status ) exit( status );
9913
9914 #define ATTR    &attr
9915 #else
9916 #if HAVE_PTHREADS_D4
9917 #define ATTR    pthread_attr_default
9918 #else
9919 #define ATTR    NULL
9920 #endif
9921 #endif
9922         /* make sure pthread_create() isn't just a stub */
9923         status = pthread_create(&t, ATTR, task, NULL);
9924         if( status ) exit( status );
9925
9926         /* make sure pthread_detach() isn't just a stub */
9927 #if HAVE_PTHREADS_D4
9928         status = pthread_detach( &t );
9929 #else
9930         status = pthread_detach( t );
9931 #endif
9932
9933 #ifdef HAVE_LINUX_THREADS
9934         pthread_kill_other_threads_np();
9935 #endif
9936
9937         exit( status );
9938
9939 ; return 0; }
9940 EOF
9941 if { (eval echo configure:9942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9942   rm -rf conftest*
9943   ol_cv_pthread_lib_lpthreads=yes
9944 else
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947   rm -rf conftest*
9948   ol_cv_pthread_lib_lpthreads=no
9949 fi
9950 rm -f conftest*
9951 else
9952   cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 /* pthread test headers */
9956 #include <pthread.h>
9957 #ifndef NULL
9958 #define NULL (void*)0
9959 #endif
9960
9961 static void *task(p)
9962         void *p;
9963 {
9964         return (void *) (p == NULL);
9965 }
9966
9967
9968 int main(argc, argv)
9969         int argc;
9970         char **argv;
9971 {
9972
9973         /* pthread test function */
9974         pthread_t t;
9975         int status;
9976 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9977         /* This system (e.g. AIX) defaults detached; must override */
9978         pthread_attr_t attr;
9979
9980         status = pthread_attr_init(&attr);
9981         if( status ) exit( status );
9982
9983         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9984         if( status ) exit( status );
9985
9986 #define ATTR    &attr
9987 #else
9988 #if HAVE_PTHREADS_D4
9989 #define ATTR    pthread_attr_default
9990 #else
9991 #define ATTR    NULL
9992 #endif
9993 #endif
9994         /* make sure pthread_create() isn't just a stub */
9995         status = pthread_create(&t, ATTR, task, NULL);
9996         if( status ) exit( status );
9997
9998         /* make sure pthread_detach() isn't just a stub */
9999 #if HAVE_PTHREADS_D4
10000         status = pthread_detach( &t );
10001 #else
10002         status = pthread_detach( t );
10003 #endif
10004
10005 #ifdef HAVE_LINUX_THREADS
10006         pthread_kill_other_threads_np();
10007 #endif
10008
10009         exit( status );
10010
10011 }
10012
10013 EOF
10014 if { (eval echo configure:10015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10015 then
10016   ol_cv_pthread_lib_lpthreads=yes
10017 else
10018   echo "configure: failed program was:" >&5
10019   cat conftest.$ac_ext >&5
10020   rm -fr conftest*
10021   ol_cv_pthread_lib_lpthreads=no
10022 fi
10023 rm -fr conftest*
10024 fi
10025
10026
10027                 # restore the LIBS
10028                 LIBS="$ol_LIBS"
10029         
10030 fi
10031
10032 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10033
10034         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10035                 ol_link_pthreads="-lpthreads"
10036                 ol_link_threads=posix
10037         fi
10038 fi
10039
10040
10041                 if test $ol_link_threads != no ; then
10042                         cat >> confdefs.h <<\EOF
10043 #define HAVE_PTHREADS 1
10044 EOF
10045
10046
10047                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10048
10049                                                 save_CPPFLAGS="$CPPFLAGS"
10050                         save_LIBS="$LIBS"
10051                         LIBS="$LTHREAD_LIBS $LIBS"
10052
10053                                                                                                 for ac_func in sched_yield pthread_yield
10054 do
10055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10056 echo "configure:10057: checking for $ac_func" >&5
10057 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10058   echo $ac_n "(cached) $ac_c" 1>&6
10059 else
10060   cat > conftest.$ac_ext <<EOF
10061 #line 10062 "configure"
10062 #include "confdefs.h"
10063 /* System header to define __stub macros and hopefully few prototypes,
10064     which can conflict with char $ac_func(); below.  */
10065 #include <assert.h>
10066 /* Override any gcc2 internal prototype to avoid an error.  */
10067 /* We use char because int might match the return type of a gcc2
10068     builtin and then its argument prototype would still apply.  */
10069 char $ac_func();
10070 char (*f)();
10071
10072 int main() {
10073
10074 /* The GNU C library defines this for functions which it implements
10075     to always fail with ENOSYS.  Some functions are actually named
10076     something starting with __ and the normal name is an alias.  */
10077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10078 choke me
10079 #else
10080 f = $ac_func;
10081 #endif
10082
10083 ; return 0; }
10084 EOF
10085 if { (eval echo configure:10086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10086   rm -rf conftest*
10087   eval "ac_cv_func_$ac_func=yes"
10088 else
10089   echo "configure: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091   rm -rf conftest*
10092   eval "ac_cv_func_$ac_func=no"
10093 fi
10094 rm -f conftest*
10095 fi
10096
10097 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10098   echo "$ac_t""yes" 1>&6
10099     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10100   cat >> confdefs.h <<EOF
10101 #define $ac_tr_func 1
10102 EOF
10103  
10104 else
10105   echo "$ac_t""no" 1>&6
10106 fi
10107 done
10108
10109
10110                         if test $ac_cv_func_sched_yield = no -a \
10111                                 $ac_cv_func_pthread_yield = no ; then
10112                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10113 echo "configure:10114: checking for sched_yield in -lrt" >&5
10114 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10115 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10116   echo $ac_n "(cached) $ac_c" 1>&6
10117 else
10118   ac_save_LIBS="$LIBS"
10119 LIBS="-lrt  $LIBS"
10120 cat > conftest.$ac_ext <<EOF
10121 #line 10122 "configure"
10122 #include "confdefs.h"
10123 /* Override any gcc2 internal prototype to avoid an error.  */
10124 /* We use char because int might match the return type of a gcc2
10125     builtin and then its argument prototype would still apply.  */
10126 char sched_yield();
10127
10128 int main() {
10129 sched_yield()
10130 ; return 0; }
10131 EOF
10132 if { (eval echo configure:10133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10133   rm -rf conftest*
10134   eval "ac_cv_lib_$ac_lib_var=yes"
10135 else
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -rf conftest*
10139   eval "ac_cv_lib_$ac_lib_var=no"
10140 fi
10141 rm -f conftest*
10142 LIBS="$ac_save_LIBS"
10143
10144 fi
10145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10146   echo "$ac_t""yes" 1>&6
10147   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10148                                         cat >> confdefs.h <<\EOF
10149 #define HAVE_SCHED_YIELD 1
10150 EOF
10151
10152                                         ac_cv_func_sched_yield=yes
10153 else
10154   echo "$ac_t""no" 1>&6
10155 ac_cv_func_sched_yield=no
10156 fi
10157
10158                         fi
10159                         if test $ac_cv_func_sched_yield = no -a \
10160                                 $ac_cv_func_pthread_yield = no ; then
10161                                                                                                 for ac_func in thr_yield
10162 do
10163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10164 echo "configure:10165: checking for $ac_func" >&5
10165 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10166   echo $ac_n "(cached) $ac_c" 1>&6
10167 else
10168   cat > conftest.$ac_ext <<EOF
10169 #line 10170 "configure"
10170 #include "confdefs.h"
10171 /* System header to define __stub macros and hopefully few prototypes,
10172     which can conflict with char $ac_func(); below.  */
10173 #include <assert.h>
10174 /* Override any gcc2 internal prototype to avoid an error.  */
10175 /* We use char because int might match the return type of a gcc2
10176     builtin and then its argument prototype would still apply.  */
10177 char $ac_func();
10178 char (*f)();
10179
10180 int main() {
10181
10182 /* The GNU C library defines this for functions which it implements
10183     to always fail with ENOSYS.  Some functions are actually named
10184     something starting with __ and the normal name is an alias.  */
10185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10186 choke me
10187 #else
10188 f = $ac_func;
10189 #endif
10190
10191 ; return 0; }
10192 EOF
10193 if { (eval echo configure:10194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10194   rm -rf conftest*
10195   eval "ac_cv_func_$ac_func=yes"
10196 else
10197   echo "configure: failed program was:" >&5
10198   cat conftest.$ac_ext >&5
10199   rm -rf conftest*
10200   eval "ac_cv_func_$ac_func=no"
10201 fi
10202 rm -f conftest*
10203 fi
10204
10205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10206   echo "$ac_t""yes" 1>&6
10207     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10208   cat >> confdefs.h <<EOF
10209 #define $ac_tr_func 1
10210 EOF
10211  
10212 else
10213   echo "$ac_t""no" 1>&6
10214 fi
10215 done
10216
10217                         fi
10218                         if test $ac_cv_func_sched_yield = no -a \
10219                                 $ac_cv_func_pthread_yield = no -a \
10220                                 "$ac_cv_func_thr_yield" = no ; then
10221                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10222                         fi
10223
10224                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10225 do
10226 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10227 echo "configure:10228: checking for $ac_func" >&5
10228 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10229   echo $ac_n "(cached) $ac_c" 1>&6
10230 else
10231   cat > conftest.$ac_ext <<EOF
10232 #line 10233 "configure"
10233 #include "confdefs.h"
10234 /* System header to define __stub macros and hopefully few prototypes,
10235     which can conflict with char $ac_func(); below.  */
10236 #include <assert.h>
10237 /* Override any gcc2 internal prototype to avoid an error.  */
10238 /* We use char because int might match the return type of a gcc2
10239     builtin and then its argument prototype would still apply.  */
10240 char $ac_func();
10241 char (*f)();
10242
10243 int main() {
10244
10245 /* The GNU C library defines this for functions which it implements
10246     to always fail with ENOSYS.  Some functions are actually named
10247     something starting with __ and the normal name is an alias.  */
10248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10249 choke me
10250 #else
10251 f = $ac_func;
10252 #endif
10253
10254 ; return 0; }
10255 EOF
10256 if { (eval echo configure:10257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10257   rm -rf conftest*
10258   eval "ac_cv_func_$ac_func=yes"
10259 else
10260   echo "configure: failed program was:" >&5
10261   cat conftest.$ac_ext >&5
10262   rm -rf conftest*
10263   eval "ac_cv_func_$ac_func=no"
10264 fi
10265 rm -f conftest*
10266 fi
10267
10268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10269   echo "$ac_t""yes" 1>&6
10270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10271   cat >> confdefs.h <<EOF
10272 #define $ac_tr_func 1
10273 EOF
10274  
10275 else
10276   echo "$ac_t""no" 1>&6
10277 fi
10278 done
10279
10280
10281                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10282 echo "configure:10283: checking for pthread_detach with <pthread.h>" >&5
10283 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10284   echo $ac_n "(cached) $ac_c" 1>&6
10285 else
10286   
10287                                                                 cat > conftest.$ac_ext <<EOF
10288 #line 10289 "configure"
10289 #include "confdefs.h"
10290
10291 #include <pthread.h>
10292 #ifndef NULL
10293 #define NULL (void*)0
10294 #endif
10295
10296 int main() {
10297 pthread_detach(NULL);
10298 ; return 0; }
10299 EOF
10300 if { (eval echo configure:10301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10301   rm -rf conftest*
10302   ol_cv_func_pthread_detach=yes
10303 else
10304   echo "configure: failed program was:" >&5
10305   cat conftest.$ac_ext >&5
10306   rm -rf conftest*
10307   ol_cv_func_pthread_detach=no
10308 fi
10309 rm -f conftest*
10310                         
10311 fi
10312
10313 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10314
10315                         if test $ol_cv_func_pthread_detach = no ; then
10316                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10317                         fi
10318
10319                         cat >> confdefs.h <<\EOF
10320 #define HAVE_PTHREAD_DETACH 1
10321 EOF
10322
10323
10324                                                 for ac_func in \
10325                                 pthread_setconcurrency \
10326                                 pthread_getconcurrency \
10327                                 thr_setconcurrency \
10328                                 thr_getconcurrency \
10329                         
10330 do
10331 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10332 echo "configure:10333: checking for $ac_func" >&5
10333 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10334   echo $ac_n "(cached) $ac_c" 1>&6
10335 else
10336   cat > conftest.$ac_ext <<EOF
10337 #line 10338 "configure"
10338 #include "confdefs.h"
10339 /* System header to define __stub macros and hopefully few prototypes,
10340     which can conflict with char $ac_func(); below.  */
10341 #include <assert.h>
10342 /* Override any gcc2 internal prototype to avoid an error.  */
10343 /* We use char because int might match the return type of a gcc2
10344     builtin and then its argument prototype would still apply.  */
10345 char $ac_func();
10346 char (*f)();
10347
10348 int main() {
10349
10350 /* The GNU C library defines this for functions which it implements
10351     to always fail with ENOSYS.  Some functions are actually named
10352     something starting with __ and the normal name is an alias.  */
10353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10354 choke me
10355 #else
10356 f = $ac_func;
10357 #endif
10358
10359 ; return 0; }
10360 EOF
10361 if { (eval echo configure:10362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10362   rm -rf conftest*
10363   eval "ac_cv_func_$ac_func=yes"
10364 else
10365   echo "configure: failed program was:" >&5
10366   cat conftest.$ac_ext >&5
10367   rm -rf conftest*
10368   eval "ac_cv_func_$ac_func=no"
10369 fi
10370 rm -f conftest*
10371 fi
10372
10373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10374   echo "$ac_t""yes" 1>&6
10375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10376   cat >> confdefs.h <<EOF
10377 #define $ac_tr_func 1
10378 EOF
10379  
10380 else
10381   echo "$ac_t""no" 1>&6
10382 fi
10383 done
10384
10385
10386                         
10387         for ac_func in pthread_kill_other_threads_np
10388 do
10389 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10390 echo "configure:10391: checking for $ac_func" >&5
10391 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10392   echo $ac_n "(cached) $ac_c" 1>&6
10393 else
10394   cat > conftest.$ac_ext <<EOF
10395 #line 10396 "configure"
10396 #include "confdefs.h"
10397 /* System header to define __stub macros and hopefully few prototypes,
10398     which can conflict with char $ac_func(); below.  */
10399 #include <assert.h>
10400 /* Override any gcc2 internal prototype to avoid an error.  */
10401 /* We use char because int might match the return type of a gcc2
10402     builtin and then its argument prototype would still apply.  */
10403 char $ac_func();
10404 char (*f)();
10405
10406 int main() {
10407
10408 /* The GNU C library defines this for functions which it implements
10409     to always fail with ENOSYS.  Some functions are actually named
10410     something starting with __ and the normal name is an alias.  */
10411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10412 choke me
10413 #else
10414 f = $ac_func;
10415 #endif
10416
10417 ; return 0; }
10418 EOF
10419 if { (eval echo configure:10420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10420   rm -rf conftest*
10421   eval "ac_cv_func_$ac_func=yes"
10422 else
10423   echo "configure: failed program was:" >&5
10424   cat conftest.$ac_ext >&5
10425   rm -rf conftest*
10426   eval "ac_cv_func_$ac_func=no"
10427 fi
10428 rm -f conftest*
10429 fi
10430
10431 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10432   echo "$ac_t""yes" 1>&6
10433     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10434   cat >> confdefs.h <<EOF
10435 #define $ac_tr_func 1
10436 EOF
10437  
10438 else
10439   echo "$ac_t""no" 1>&6
10440 fi
10441 done
10442
10443         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10444 echo "configure:10445: checking for LinuxThreads implementation" >&5
10445 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10446   echo $ac_n "(cached) $ac_c" 1>&6
10447 else
10448   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10449 fi
10450
10451 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10452
10453                         
10454         
10455         
10456         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10457 echo "configure:10458: checking for LinuxThreads consistency" >&5
10458 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10459   echo $ac_n "(cached) $ac_c" 1>&6
10460 else
10461   
10462                 if test $ol_cv_header_linux_threads = yes -a \
10463                         $ol_cv_sys_linux_threads = yes; then
10464                         ol_cv_linux_threads=yes
10465                 elif test $ol_cv_header_linux_threads = no -a \
10466                         $ol_cv_sys_linux_threads = no; then
10467                         ol_cv_linux_threads=no
10468                 else
10469                         ol_cv_linux_threads=error
10470                 fi
10471         
10472 fi
10473
10474 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10475
10476
10477                         if test $ol_cv_linux_threads = error; then
10478                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10479                         fi
10480
10481                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10482 echo "configure:10483: checking if pthread_create() works" >&5
10483 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10484   echo $ac_n "(cached) $ac_c" 1>&6
10485 else
10486   
10487                         if test "$cross_compiling" = yes; then
10488                                 ol_cv_pthread_create_works=yes
10489 else
10490   cat > conftest.$ac_ext <<EOF
10491 #line 10492 "configure"
10492 #include "confdefs.h"
10493 /* pthread test headers */
10494 #include <pthread.h>
10495 #ifndef NULL
10496 #define NULL (void*)0
10497 #endif
10498
10499 static void *task(p)
10500         void *p;
10501 {
10502         return (void *) (p == NULL);
10503 }
10504
10505
10506 int main(argc, argv)
10507         int argc;
10508         char **argv;
10509 {
10510
10511         /* pthread test function */
10512         pthread_t t;
10513         int status;
10514 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10515         /* This system (e.g. AIX) defaults detached; must override */
10516         pthread_attr_t attr;
10517
10518         status = pthread_attr_init(&attr);
10519         if( status ) exit( status );
10520
10521         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10522         if( status ) exit( status );
10523
10524 #define ATTR    &attr
10525 #else
10526 #if HAVE_PTHREADS_D4
10527 #define ATTR    pthread_attr_default
10528 #else
10529 #define ATTR    NULL
10530 #endif
10531 #endif
10532         /* make sure pthread_create() isn't just a stub */
10533         status = pthread_create(&t, ATTR, task, NULL);
10534         if( status ) exit( status );
10535
10536         /* make sure pthread_detach() isn't just a stub */
10537 #if HAVE_PTHREADS_D4
10538         status = pthread_detach( &t );
10539 #else
10540         status = pthread_detach( t );
10541 #endif
10542
10543 #ifdef HAVE_LINUX_THREADS
10544         pthread_kill_other_threads_np();
10545 #endif
10546
10547         exit( status );
10548
10549 }
10550
10551 EOF
10552 if { (eval echo configure:10553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10553 then
10554   ol_cv_pthread_create_works=yes
10555 else
10556   echo "configure: failed program was:" >&5
10557   cat conftest.$ac_ext >&5
10558   rm -fr conftest*
10559   ol_cv_pthread_create_works=no
10560 fi
10561 rm -fr conftest*
10562 fi
10563
10564 fi
10565
10566 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10567
10568                         if test $ol_cv_pthread_create_works = no ; then
10569                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10570                         fi
10571
10572                                                 if test $ol_with_yielding_select = auto ; then
10573                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10574 echo "configure:10575: checking if select yields when using pthreads" >&5
10575 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10576   echo $ac_n "(cached) $ac_c" 1>&6
10577 else
10578   
10579                                 if test "$cross_compiling" = yes; then
10580   ol_cv_pthread_select_yields=cross
10581 else
10582   cat > conftest.$ac_ext <<EOF
10583 #line 10584 "configure"
10584 #include "confdefs.h"
10585
10586 #include <sys/types.h>
10587 #include <sys/time.h>
10588 #include <unistd.h>
10589 #include <pthread.h>
10590 #ifndef NULL
10591 #define NULL (void*) 0
10592 #endif
10593
10594 static int fildes[2];
10595
10596 static void *task(p)
10597         void *p;
10598 {
10599         int i;
10600         struct timeval tv;
10601
10602         fd_set rfds;
10603
10604         tv.tv_sec=10;
10605         tv.tv_usec=0;
10606
10607         FD_ZERO(&rfds);
10608         FD_SET(fildes[0], &rfds);
10609
10610         /* we're not interested in any fds */
10611         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10612
10613         if(i < 0) {
10614                 perror("select");
10615                 exit(10);
10616         }
10617
10618         exit(0); /* if we exit here, the select blocked the whole process */
10619 }
10620
10621 int main(argc, argv)
10622         int argc;
10623         char **argv;
10624 {
10625         pthread_t t;
10626
10627         /* create a pipe to select */
10628         if(pipe(&fildes[0])) {
10629                 perror("select");
10630                 exit(1);
10631         }
10632
10633 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10634         (void) pthread_setconcurrency(2);
10635 #else
10636 #ifdef HAVE_THR_SETCONCURRENCY
10637         /* Set Solaris LWP concurrency to 2 */
10638         thr_setconcurrency(2);
10639 #endif
10640 #endif
10641
10642 #if HAVE_PTHREADS_D4
10643         pthread_create(&t, pthread_attr_default, task, NULL);
10644 #else
10645         pthread_create(&t, NULL, task, NULL);
10646 #endif
10647
10648 #if HAVE_SCHED_YIELD
10649         sched_yield();  /* make sure task runs first */
10650 #else
10651 #ifdef HAVE_PTHREAD_YIELD
10652         pthread_yield();        /* make sure task runs first */
10653 #endif
10654 #endif
10655
10656         exit(2);
10657 }
10658 EOF
10659 if { (eval echo configure:10660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10660 then
10661   ol_cv_pthread_select_yields=no
10662 else
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -fr conftest*
10666   ol_cv_pthread_select_yields=yes
10667 fi
10668 rm -fr conftest*
10669 fi
10670
10671 fi
10672
10673 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10674
10675                                 if test $ol_cv_pthread_select_yields = cross ; then
10676                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10677                                 fi
10678
10679                                 if test $ol_cv_pthread_select_yields = yes ; then
10680                                         ol_with_yielding_select=yes
10681                                 fi
10682                         fi
10683
10684                                                 CPPFLAGS="$save_CPPFLAGS"
10685                         LIBS="$save_LIBS"
10686                 else
10687                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10688                 fi
10689         fi
10690
10691         if test $ol_with_threads = posix ; then
10692                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10693         fi
10694 fi
10695
10696 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10697         -o $ol_with_threads = mach ; then
10698
10699                 for ac_hdr in mach/cthreads.h
10700 do
10701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10703 echo "configure:10704: checking for $ac_hdr" >&5
10704 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10705   echo $ac_n "(cached) $ac_c" 1>&6
10706 else
10707   cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710 #include <$ac_hdr>
10711 EOF
10712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10713 { (eval echo configure:10714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10715 if test -z "$ac_err"; then
10716   rm -rf conftest*
10717   eval "ac_cv_header_$ac_safe=yes"
10718 else
10719   echo "$ac_err" >&5
10720   echo "configure: failed program was:" >&5
10721   cat conftest.$ac_ext >&5
10722   rm -rf conftest*
10723   eval "ac_cv_header_$ac_safe=no"
10724 fi
10725 rm -f conftest*
10726 fi
10727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10728   echo "$ac_t""yes" 1>&6
10729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10730   cat >> confdefs.h <<EOF
10731 #define $ac_tr_hdr 1
10732 EOF
10733  
10734 else
10735   echo "$ac_t""no" 1>&6
10736 fi
10737 done
10738
10739         if test $ac_cv_header_mach_cthreads_h = yes ; then
10740                 ol_with_threads=found
10741
10742                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10743 echo "configure:10744: checking for cthread_fork" >&5
10744 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10745   echo $ac_n "(cached) $ac_c" 1>&6
10746 else
10747   cat > conftest.$ac_ext <<EOF
10748 #line 10749 "configure"
10749 #include "confdefs.h"
10750 /* System header to define __stub macros and hopefully few prototypes,
10751     which can conflict with char cthread_fork(); below.  */
10752 #include <assert.h>
10753 /* Override any gcc2 internal prototype to avoid an error.  */
10754 /* We use char because int might match the return type of a gcc2
10755     builtin and then its argument prototype would still apply.  */
10756 char cthread_fork();
10757 char (*f)();
10758
10759 int main() {
10760
10761 /* The GNU C library defines this for functions which it implements
10762     to always fail with ENOSYS.  Some functions are actually named
10763     something starting with __ and the normal name is an alias.  */
10764 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10765 choke me
10766 #else
10767 f = cthread_fork;
10768 #endif
10769
10770 ; return 0; }
10771 EOF
10772 if { (eval echo configure:10773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10773   rm -rf conftest*
10774   eval "ac_cv_func_cthread_fork=yes"
10775 else
10776   echo "configure: failed program was:" >&5
10777   cat conftest.$ac_ext >&5
10778   rm -rf conftest*
10779   eval "ac_cv_func_cthread_fork=no"
10780 fi
10781 rm -f conftest*
10782 fi
10783
10784 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10785   echo "$ac_t""yes" 1>&6
10786   ol_link_threads=yes
10787 else
10788   echo "$ac_t""no" 1>&6
10789 fi
10790
10791
10792                 if test $ol_link_threads = no ; then
10793                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10794 echo "configure:10795: checking for cthread_fork with -all_load" >&5
10795 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   
10799                                                                 save_LIBS="$LIBS"
10800                                 LIBS="-all_load $LIBS"
10801                                 cat > conftest.$ac_ext <<EOF
10802 #line 10803 "configure"
10803 #include "confdefs.h"
10804 #include <mach/cthreads.h>
10805 int main() {
10806
10807                                         cthread_fork((void *)0, (void *)0);
10808                                         
10809 ; return 0; }
10810 EOF
10811 if { (eval echo configure:10812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10812   rm -rf conftest*
10813   ol_cv_cthread_all_load=yes
10814 else
10815   echo "configure: failed program was:" >&5
10816   cat conftest.$ac_ext >&5
10817   rm -rf conftest*
10818   ol_cv_cthread_all_load=no
10819 fi
10820 rm -f conftest*
10821                                                                 LIBS="$save_LIBS"
10822                         
10823 fi
10824
10825 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10826
10827                         if test $ol_cv_cthread_all_load = yes ; then
10828                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10829                                 ol_link_threads=mach
10830                         fi
10831                 fi
10832
10833                 if test $ol_link_threads != no ; then
10834                         : check for cthread specific functionality here
10835                         cat >> confdefs.h <<\EOF
10836 #define HAVE_MACH_CTHREADS 1
10837 EOF
10838
10839                 else
10840                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10841                 fi
10842         fi
10843
10844         if test $ol_with_threads = mach ; then
10845                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10846         fi
10847 fi
10848
10849 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10850         -o $ol_with_threads = pth ; then
10851
10852         for ac_hdr in pth.h
10853 do
10854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10856 echo "configure:10857: checking for $ac_hdr" >&5
10857 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10858   echo $ac_n "(cached) $ac_c" 1>&6
10859 else
10860   cat > conftest.$ac_ext <<EOF
10861 #line 10862 "configure"
10862 #include "confdefs.h"
10863 #include <$ac_hdr>
10864 EOF
10865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10866 { (eval echo configure:10867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10868 if test -z "$ac_err"; then
10869   rm -rf conftest*
10870   eval "ac_cv_header_$ac_safe=yes"
10871 else
10872   echo "$ac_err" >&5
10873   echo "configure: failed program was:" >&5
10874   cat conftest.$ac_ext >&5
10875   rm -rf conftest*
10876   eval "ac_cv_header_$ac_safe=no"
10877 fi
10878 rm -f conftest*
10879 fi
10880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10881   echo "$ac_t""yes" 1>&6
10882     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10883   cat >> confdefs.h <<EOF
10884 #define $ac_tr_hdr 1
10885 EOF
10886  
10887 else
10888   echo "$ac_t""no" 1>&6
10889 fi
10890 done
10891
10892
10893         if test $ac_cv_header_pth_h = yes ; then
10894                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10895 echo "configure:10896: checking for pth_version in -lpth" >&5
10896 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10898   echo $ac_n "(cached) $ac_c" 1>&6
10899 else
10900   ac_save_LIBS="$LIBS"
10901 LIBS="-lpth  $LIBS"
10902 cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905 /* Override any gcc2 internal prototype to avoid an error.  */
10906 /* We use char because int might match the return type of a gcc2
10907     builtin and then its argument prototype would still apply.  */
10908 char pth_version();
10909
10910 int main() {
10911 pth_version()
10912 ; return 0; }
10913 EOF
10914 if { (eval echo configure:10915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10915   rm -rf conftest*
10916   eval "ac_cv_lib_$ac_lib_var=yes"
10917 else
10918   echo "configure: failed program was:" >&5
10919   cat conftest.$ac_ext >&5
10920   rm -rf conftest*
10921   eval "ac_cv_lib_$ac_lib_var=no"
10922 fi
10923 rm -f conftest*
10924 LIBS="$ac_save_LIBS"
10925
10926 fi
10927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10928   echo "$ac_t""yes" 1>&6
10929   have_pth=yes
10930 else
10931   echo "$ac_t""no" 1>&6
10932 have_pth=no
10933 fi
10934
10935
10936                 if test $have_pth = yes ; then
10937                         cat >> confdefs.h <<\EOF
10938 #define HAVE_GNU_PTH 1
10939 EOF
10940
10941                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10942                         ol_link_threads=pth
10943
10944                         if test $ol_with_yielding_select = auto ; then
10945                                 ol_with_yielding_select=yes
10946                         fi
10947                 fi
10948         fi
10949 fi
10950
10951 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10952         -o $ol_with_threads = lwp ; then
10953
10954                 for ac_hdr in thread.h synch.h
10955 do
10956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10958 echo "configure:10959: checking for $ac_hdr" >&5
10959 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10960   echo $ac_n "(cached) $ac_c" 1>&6
10961 else
10962   cat > conftest.$ac_ext <<EOF
10963 #line 10964 "configure"
10964 #include "confdefs.h"
10965 #include <$ac_hdr>
10966 EOF
10967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10968 { (eval echo configure:10969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10970 if test -z "$ac_err"; then
10971   rm -rf conftest*
10972   eval "ac_cv_header_$ac_safe=yes"
10973 else
10974   echo "$ac_err" >&5
10975   echo "configure: failed program was:" >&5
10976   cat conftest.$ac_ext >&5
10977   rm -rf conftest*
10978   eval "ac_cv_header_$ac_safe=no"
10979 fi
10980 rm -f conftest*
10981 fi
10982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10983   echo "$ac_t""yes" 1>&6
10984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10985   cat >> confdefs.h <<EOF
10986 #define $ac_tr_hdr 1
10987 EOF
10988  
10989 else
10990   echo "$ac_t""no" 1>&6
10991 fi
10992 done
10993
10994         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10995                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10996 echo "configure:10997: checking for thr_create in -lthread" >&5
10997 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10998 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10999   echo $ac_n "(cached) $ac_c" 1>&6
11000 else
11001   ac_save_LIBS="$LIBS"
11002 LIBS="-lthread  $LIBS"
11003 cat > conftest.$ac_ext <<EOF
11004 #line 11005 "configure"
11005 #include "confdefs.h"
11006 /* Override any gcc2 internal prototype to avoid an error.  */
11007 /* We use char because int might match the return type of a gcc2
11008     builtin and then its argument prototype would still apply.  */
11009 char thr_create();
11010
11011 int main() {
11012 thr_create()
11013 ; return 0; }
11014 EOF
11015 if { (eval echo configure:11016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11016   rm -rf conftest*
11017   eval "ac_cv_lib_$ac_lib_var=yes"
11018 else
11019   echo "configure: failed program was:" >&5
11020   cat conftest.$ac_ext >&5
11021   rm -rf conftest*
11022   eval "ac_cv_lib_$ac_lib_var=no"
11023 fi
11024 rm -f conftest*
11025 LIBS="$ac_save_LIBS"
11026
11027 fi
11028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11029   echo "$ac_t""yes" 1>&6
11030   have_thr=yes
11031 else
11032   echo "$ac_t""no" 1>&6
11033 have_thr=no
11034 fi
11035
11036
11037                 if test $have_thr = yes ; then
11038                         cat >> confdefs.h <<\EOF
11039 #define HAVE_THR 1
11040 EOF
11041
11042                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11043                         ol_link_threads=thr
11044
11045                         if test $ol_with_yielding_select = auto ; then
11046                                 ol_with_yielding_select=yes
11047                         fi
11048
11049                                                 for ac_func in \
11050                                 thr_setconcurrency \
11051                                 thr_getconcurrency \
11052                         
11053 do
11054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11055 echo "configure:11056: checking for $ac_func" >&5
11056 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11057   echo $ac_n "(cached) $ac_c" 1>&6
11058 else
11059   cat > conftest.$ac_ext <<EOF
11060 #line 11061 "configure"
11061 #include "confdefs.h"
11062 /* System header to define __stub macros and hopefully few prototypes,
11063     which can conflict with char $ac_func(); below.  */
11064 #include <assert.h>
11065 /* Override any gcc2 internal prototype to avoid an error.  */
11066 /* We use char because int might match the return type of a gcc2
11067     builtin and then its argument prototype would still apply.  */
11068 char $ac_func();
11069 char (*f)();
11070
11071 int main() {
11072
11073 /* The GNU C library defines this for functions which it implements
11074     to always fail with ENOSYS.  Some functions are actually named
11075     something starting with __ and the normal name is an alias.  */
11076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11077 choke me
11078 #else
11079 f = $ac_func;
11080 #endif
11081
11082 ; return 0; }
11083 EOF
11084 if { (eval echo configure:11085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11085   rm -rf conftest*
11086   eval "ac_cv_func_$ac_func=yes"
11087 else
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_func_$ac_func=no"
11092 fi
11093 rm -f conftest*
11094 fi
11095
11096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11097   echo "$ac_t""yes" 1>&6
11098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11099   cat >> confdefs.h <<EOF
11100 #define $ac_tr_func 1
11101 EOF
11102  
11103 else
11104   echo "$ac_t""no" 1>&6
11105 fi
11106 done
11107
11108                 fi
11109         fi
11110
11111                 for ac_hdr in lwp/lwp.h
11112 do
11113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11115 echo "configure:11116: checking for $ac_hdr" >&5
11116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11117   echo $ac_n "(cached) $ac_c" 1>&6
11118 else
11119   cat > conftest.$ac_ext <<EOF
11120 #line 11121 "configure"
11121 #include "confdefs.h"
11122 #include <$ac_hdr>
11123 EOF
11124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11125 { (eval echo configure:11126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11127 if test -z "$ac_err"; then
11128   rm -rf conftest*
11129   eval "ac_cv_header_$ac_safe=yes"
11130 else
11131   echo "$ac_err" >&5
11132   echo "configure: failed program was:" >&5
11133   cat conftest.$ac_ext >&5
11134   rm -rf conftest*
11135   eval "ac_cv_header_$ac_safe=no"
11136 fi
11137 rm -f conftest*
11138 fi
11139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11140   echo "$ac_t""yes" 1>&6
11141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11142   cat >> confdefs.h <<EOF
11143 #define $ac_tr_hdr 1
11144 EOF
11145  
11146 else
11147   echo "$ac_t""no" 1>&6
11148 fi
11149 done
11150
11151         if test $ac_cv_header_lwp_lwp_h = yes ; then
11152                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11153 echo "configure:11154: checking for lwp_create in -llwp" >&5
11154 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11156   echo $ac_n "(cached) $ac_c" 1>&6
11157 else
11158   ac_save_LIBS="$LIBS"
11159 LIBS="-llwp  $LIBS"
11160 cat > conftest.$ac_ext <<EOF
11161 #line 11162 "configure"
11162 #include "confdefs.h"
11163 /* Override any gcc2 internal prototype to avoid an error.  */
11164 /* We use char because int might match the return type of a gcc2
11165     builtin and then its argument prototype would still apply.  */
11166 char lwp_create();
11167
11168 int main() {
11169 lwp_create()
11170 ; return 0; }
11171 EOF
11172 if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=yes"
11175 else
11176   echo "configure: failed program was:" >&5
11177   cat conftest.$ac_ext >&5
11178   rm -rf conftest*
11179   eval "ac_cv_lib_$ac_lib_var=no"
11180 fi
11181 rm -f conftest*
11182 LIBS="$ac_save_LIBS"
11183
11184 fi
11185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11186   echo "$ac_t""yes" 1>&6
11187   have_lwp=yes
11188 else
11189   echo "$ac_t""no" 1>&6
11190 have_lwp=no
11191 fi
11192
11193
11194                 if test $have_lwp = yes ; then
11195                         cat >> confdefs.h <<\EOF
11196 #define HAVE_LWP 1
11197 EOF
11198
11199                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11200                         ol_link_threads=lwp
11201
11202                         if test $ol_with_yielding_select = auto ; then
11203                                 ol_with_yielding_select=no
11204                         fi
11205                 fi
11206         fi
11207 fi
11208
11209 if test $ol_with_yielding_select = yes ; then
11210         cat >> confdefs.h <<\EOF
11211 #define HAVE_YIELDING_SELECT 1
11212 EOF
11213
11214 fi
11215
11216 if test $ol_with_threads = manual ; then
11217                 ol_link_threads=yes
11218
11219         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11220
11221         for ac_hdr in pthread.h sched.h
11222 do
11223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11225 echo "configure:11226: checking for $ac_hdr" >&5
11226 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11227   echo $ac_n "(cached) $ac_c" 1>&6
11228 else
11229   cat > conftest.$ac_ext <<EOF
11230 #line 11231 "configure"
11231 #include "confdefs.h"
11232 #include <$ac_hdr>
11233 EOF
11234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11235 { (eval echo configure:11236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11237 if test -z "$ac_err"; then
11238   rm -rf conftest*
11239   eval "ac_cv_header_$ac_safe=yes"
11240 else
11241   echo "$ac_err" >&5
11242   echo "configure: failed program was:" >&5
11243   cat conftest.$ac_ext >&5
11244   rm -rf conftest*
11245   eval "ac_cv_header_$ac_safe=no"
11246 fi
11247 rm -f conftest*
11248 fi
11249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11250   echo "$ac_t""yes" 1>&6
11251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11252   cat >> confdefs.h <<EOF
11253 #define $ac_tr_hdr 1
11254 EOF
11255  
11256 else
11257   echo "$ac_t""no" 1>&6
11258 fi
11259 done
11260
11261         for ac_func in sched_yield pthread_yield
11262 do
11263 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11264 echo "configure:11265: checking for $ac_func" >&5
11265 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11266   echo $ac_n "(cached) $ac_c" 1>&6
11267 else
11268   cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 /* System header to define __stub macros and hopefully few prototypes,
11272     which can conflict with char $ac_func(); below.  */
11273 #include <assert.h>
11274 /* Override any gcc2 internal prototype to avoid an error.  */
11275 /* We use char because int might match the return type of a gcc2
11276     builtin and then its argument prototype would still apply.  */
11277 char $ac_func();
11278 char (*f)();
11279
11280 int main() {
11281
11282 /* The GNU C library defines this for functions which it implements
11283     to always fail with ENOSYS.  Some functions are actually named
11284     something starting with __ and the normal name is an alias.  */
11285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11286 choke me
11287 #else
11288 f = $ac_func;
11289 #endif
11290
11291 ; return 0; }
11292 EOF
11293 if { (eval echo configure:11294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11294   rm -rf conftest*
11295   eval "ac_cv_func_$ac_func=yes"
11296 else
11297   echo "configure: failed program was:" >&5
11298   cat conftest.$ac_ext >&5
11299   rm -rf conftest*
11300   eval "ac_cv_func_$ac_func=no"
11301 fi
11302 rm -f conftest*
11303 fi
11304
11305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11306   echo "$ac_t""yes" 1>&6
11307     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11308   cat >> confdefs.h <<EOF
11309 #define $ac_tr_func 1
11310 EOF
11311  
11312 else
11313   echo "$ac_t""no" 1>&6
11314 fi
11315 done
11316
11317         
11318         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11319 echo "configure:11320: checking for LinuxThreads pthread.h" >&5
11320 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11321   echo $ac_n "(cached) $ac_c" 1>&6
11322 else
11323   cat > conftest.$ac_ext <<EOF
11324 #line 11325 "configure"
11325 #include "confdefs.h"
11326 #include <pthread.h>
11327 EOF
11328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11329   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11330   rm -rf conftest*
11331   ol_cv_header_linux_threads=yes
11332 else
11333   rm -rf conftest*
11334   ol_cv_header_linux_threads=no
11335 fi
11336 rm -f conftest*
11337
11338                 
11339 fi
11340
11341 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11342         if test $ol_cv_header_linux_threads = yes; then
11343                 cat >> confdefs.h <<\EOF
11344 #define HAVE_LINUX_THREADS 1
11345 EOF
11346
11347         fi
11348
11349
11350         for ac_hdr in mach/cthreads.h
11351 do
11352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11354 echo "configure:11355: checking for $ac_hdr" >&5
11355 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11356   echo $ac_n "(cached) $ac_c" 1>&6
11357 else
11358   cat > conftest.$ac_ext <<EOF
11359 #line 11360 "configure"
11360 #include "confdefs.h"
11361 #include <$ac_hdr>
11362 EOF
11363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11364 { (eval echo configure:11365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11366 if test -z "$ac_err"; then
11367   rm -rf conftest*
11368   eval "ac_cv_header_$ac_safe=yes"
11369 else
11370   echo "$ac_err" >&5
11371   echo "configure: failed program was:" >&5
11372   cat conftest.$ac_ext >&5
11373   rm -rf conftest*
11374   eval "ac_cv_header_$ac_safe=no"
11375 fi
11376 rm -f conftest*
11377 fi
11378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11379   echo "$ac_t""yes" 1>&6
11380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11381   cat >> confdefs.h <<EOF
11382 #define $ac_tr_hdr 1
11383 EOF
11384  
11385 else
11386   echo "$ac_t""no" 1>&6
11387 fi
11388 done
11389
11390         for ac_hdr in lwp/lwp.h
11391 do
11392 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11393 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11394 echo "configure:11395: checking for $ac_hdr" >&5
11395 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11396   echo $ac_n "(cached) $ac_c" 1>&6
11397 else
11398   cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 #include <$ac_hdr>
11402 EOF
11403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11404 { (eval echo configure:11405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11406 if test -z "$ac_err"; then
11407   rm -rf conftest*
11408   eval "ac_cv_header_$ac_safe=yes"
11409 else
11410   echo "$ac_err" >&5
11411   echo "configure: failed program was:" >&5
11412   cat conftest.$ac_ext >&5
11413   rm -rf conftest*
11414   eval "ac_cv_header_$ac_safe=no"
11415 fi
11416 rm -f conftest*
11417 fi
11418 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11419   echo "$ac_t""yes" 1>&6
11420     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11421   cat >> confdefs.h <<EOF
11422 #define $ac_tr_hdr 1
11423 EOF
11424  
11425 else
11426   echo "$ac_t""no" 1>&6
11427 fi
11428 done
11429
11430         for ac_hdr in thread.h synch.h
11431 do
11432 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11433 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11434 echo "configure:11435: checking for $ac_hdr" >&5
11435 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11436   echo $ac_n "(cached) $ac_c" 1>&6
11437 else
11438   cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441 #include <$ac_hdr>
11442 EOF
11443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11444 { (eval echo configure:11445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11446 if test -z "$ac_err"; then
11447   rm -rf conftest*
11448   eval "ac_cv_header_$ac_safe=yes"
11449 else
11450   echo "$ac_err" >&5
11451   echo "configure: failed program was:" >&5
11452   cat conftest.$ac_ext >&5
11453   rm -rf conftest*
11454   eval "ac_cv_header_$ac_safe=no"
11455 fi
11456 rm -f conftest*
11457 fi
11458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11459   echo "$ac_t""yes" 1>&6
11460     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11461   cat >> confdefs.h <<EOF
11462 #define $ac_tr_hdr 1
11463 EOF
11464  
11465 else
11466   echo "$ac_t""no" 1>&6
11467 fi
11468 done
11469
11470 fi
11471
11472 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11473                         cat >> confdefs.h <<\EOF
11474 #define REENTRANT 1
11475 EOF
11476
11477         cat >> confdefs.h <<\EOF
11478 #define _REENTRANT 1
11479 EOF
11480
11481         cat >> confdefs.h <<\EOF
11482 #define THREAD_SAFE 1
11483 EOF
11484
11485         cat >> confdefs.h <<\EOF
11486 #define _THREAD_SAFE 1
11487 EOF
11488
11489         cat >> confdefs.h <<\EOF
11490 #define THREADSAFE 1
11491 EOF
11492
11493         cat >> confdefs.h <<\EOF
11494 #define _THREADSAFE 1
11495 EOF
11496
11497         cat >> confdefs.h <<\EOF
11498 #define _SGI_MP_SOURCE 1
11499 EOF
11500
11501
11502                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11503 echo "configure:11504: checking for thread specific errno" >&5
11504 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11505   echo $ac_n "(cached) $ac_c" 1>&6
11506 else
11507   
11508                 cat > conftest.$ac_ext <<EOF
11509 #line 11510 "configure"
11510 #include "confdefs.h"
11511 #include <errno.h>
11512 int main() {
11513 errno = 0;
11514 ; return 0; }
11515 EOF
11516 if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11517   rm -rf conftest*
11518   ol_cv_errno_thread_specific=yes
11519 else
11520   echo "configure: failed program was:" >&5
11521   cat conftest.$ac_ext >&5
11522   rm -rf conftest*
11523   ol_cv_errno_thread_specific=no
11524 fi
11525 rm -f conftest*
11526         
11527 fi
11528
11529 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11530
11531                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11532 echo "configure:11533: checking for thread specific h_errno" >&5
11533 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11534   echo $ac_n "(cached) $ac_c" 1>&6
11535 else
11536   
11537                 cat > conftest.$ac_ext <<EOF
11538 #line 11539 "configure"
11539 #include "confdefs.h"
11540 #include <netdb.h>
11541 int main() {
11542 h_errno = 0;
11543 ; return 0; }
11544 EOF
11545 if { (eval echo configure:11546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11546   rm -rf conftest*
11547   ol_cv_h_errno_thread_specific=yes
11548 else
11549   echo "configure: failed program was:" >&5
11550   cat conftest.$ac_ext >&5
11551   rm -rf conftest*
11552   ol_cv_h_errno_thread_specific=no
11553 fi
11554 rm -f conftest*
11555         
11556 fi
11557
11558 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11559
11560         if test $ol_cv_errno_thread_specific != yes \
11561                 -o $ol_cv_h_errno_thread_specific != yes ; then
11562                 LIBS="$LTHREAD_LIBS $LIBS"
11563                 LTHREAD_LIBS=""
11564         fi
11565
11566 fi  
11567
11568 if test $ol_link_threads = no ; then
11569         if test $ol_with_threads = yes ; then
11570                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11571         fi
11572
11573         if test $ol_with_threads = auto ; then
11574                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11575                 ol_with_threads=no
11576         fi
11577
11578         cat >> confdefs.h <<\EOF
11579 #define NO_THREADS 1
11580 EOF
11581
11582         LTHREAD_LIBS=""
11583 fi
11584
11585 if test $ol_link_threads != no ; then
11586         cat >> confdefs.h <<\EOF
11587 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11588 EOF
11589
11590 fi
11591
11592 ol_link_ldbm=no 
11593
11594 if test $ol_with_ldbm_api = auto \
11595         -o $ol_with_ldbm_api = berkeley \
11596         -o $ol_with_ldbm_api = bcompat ; then
11597
11598         if test $ol_with_ldbm_api = bcompat; then \
11599                 ol_cv_berkeley_db=no
11600 for ac_hdr in db_185.h db.h
11601 do
11602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11603 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11604 echo "configure:11605: checking for $ac_hdr" >&5
11605 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11606   echo $ac_n "(cached) $ac_c" 1>&6
11607 else
11608   cat > conftest.$ac_ext <<EOF
11609 #line 11610 "configure"
11610 #include "confdefs.h"
11611 #include <$ac_hdr>
11612 EOF
11613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11614 { (eval echo configure:11615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11616 if test -z "$ac_err"; then
11617   rm -rf conftest*
11618   eval "ac_cv_header_$ac_safe=yes"
11619 else
11620   echo "$ac_err" >&5
11621   echo "configure: failed program was:" >&5
11622   cat conftest.$ac_ext >&5
11623   rm -rf conftest*
11624   eval "ac_cv_header_$ac_safe=no"
11625 fi
11626 rm -f conftest*
11627 fi
11628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11629   echo "$ac_t""yes" 1>&6
11630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11631   cat >> confdefs.h <<EOF
11632 #define $ac_tr_hdr 1
11633 EOF
11634  
11635 else
11636   echo "$ac_t""no" 1>&6
11637 fi
11638 done
11639
11640 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11641         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11642 echo "configure:11643: checking if Berkeley DB header compatibility" >&5
11643 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11644   echo $ac_n "(cached) $ac_c" 1>&6
11645 else
11646   
11647                 cat > conftest.$ac_ext <<EOF
11648 #line 11649 "configure"
11649 #include "confdefs.h"
11650
11651 #if HAVE_DB_185_H
11652 #       include <db_185.h>
11653 #else
11654 #       include <db.h>
11655 #endif
11656
11657  /* this check could be improved */
11658 #ifndef DB_VERSION_MAJOR
11659 #       define DB_VERSION_MAJOR 1
11660 #endif
11661
11662 #if DB_VERSION_MAJOR == 1 
11663         __db_version_1
11664 #endif
11665
11666 EOF
11667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11668   egrep "__db_version_1" >/dev/null 2>&1; then
11669   rm -rf conftest*
11670   ol_cv_header_db1=yes
11671 else
11672   rm -rf conftest*
11673   ol_cv_header_db1=no
11674 fi
11675 rm -f conftest*
11676
11677 fi
11678
11679 echo "$ac_t""$ol_cv_header_db1" 1>&6
11680
11681         if test ol_cv_header_db1=yes ; then
11682                 ol_cv_lib_db=no
11683 if test $ol_cv_lib_db = no ; then
11684         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11685 echo "configure:11686: checking for Berkeley DB link (default)" >&5
11686 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11687   echo $ac_n "(cached) $ac_c" 1>&6
11688 else
11689   
11690         ol_DB_LIB=
11691         ol_LIBS=$LIBS
11692         LIBS="$ol_DB_LIB $LIBS"
11693
11694         cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697
11698 #ifdef HAVE_DB_185_H
11699 # include <db_185.h>
11700 #else
11701 # include <db.h>
11702 #endif
11703
11704 #ifndef DB_VERSION_MAJOR
11705 # define DB_VERSION_MAJOR 1
11706 #endif
11707
11708 #ifndef NULL
11709 #define NULL ((void*)0)
11710 #endif
11711
11712 int main() {
11713
11714 #if DB_VERSION_MAJOR > 2
11715         db_env_create( NULL, 0 );
11716 #elif DB_VERSION_MAJOR > 1
11717         db_appexit( NULL );
11718 #else
11719         (void) dbopen( NULL, 0, 0, 0, NULL);
11720 #endif
11721
11722 ; return 0; }
11723 EOF
11724 if { (eval echo configure:11725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11725   rm -rf conftest*
11726   ol_cv_db_none=yes
11727 else
11728   echo "configure: failed program was:" >&5
11729   cat conftest.$ac_ext >&5
11730   rm -rf conftest*
11731   ol_cv_db_none=no
11732 fi
11733 rm -f conftest*
11734
11735         LIBS="$ol_LIBS"
11736
11737 fi
11738
11739 echo "$ac_t""$ol_cv_db_none" 1>&6
11740
11741         if test $ol_cv_db_none = yes ; then
11742                 ol_cv_lib_db=yes
11743         fi
11744 fi
11745
11746 if test $ol_cv_lib_db = no ; then
11747         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11748 echo "configure:11749: checking for Berkeley DB link (-ldb)" >&5
11749 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11750   echo $ac_n "(cached) $ac_c" 1>&6
11751 else
11752   
11753         ol_DB_LIB=-ldb
11754         ol_LIBS=$LIBS
11755         LIBS="$ol_DB_LIB $LIBS"
11756
11757         cat > conftest.$ac_ext <<EOF
11758 #line 11759 "configure"
11759 #include "confdefs.h"
11760
11761 #ifdef HAVE_DB_185_H
11762 # include <db_185.h>
11763 #else
11764 # include <db.h>
11765 #endif
11766
11767 #ifndef DB_VERSION_MAJOR
11768 # define DB_VERSION_MAJOR 1
11769 #endif
11770
11771 #ifndef NULL
11772 #define NULL ((void*)0)
11773 #endif
11774
11775 int main() {
11776
11777 #if DB_VERSION_MAJOR > 2
11778         db_env_create( NULL, 0 );
11779 #elif DB_VERSION_MAJOR > 1
11780         db_appexit( NULL );
11781 #else
11782         (void) dbopen( NULL, 0, 0, 0, NULL);
11783 #endif
11784
11785 ; return 0; }
11786 EOF
11787 if { (eval echo configure:11788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11788   rm -rf conftest*
11789   ol_cv_db_db=yes
11790 else
11791   echo "configure: failed program was:" >&5
11792   cat conftest.$ac_ext >&5
11793   rm -rf conftest*
11794   ol_cv_db_db=no
11795 fi
11796 rm -f conftest*
11797
11798         LIBS="$ol_LIBS"
11799
11800 fi
11801
11802 echo "$ac_t""$ol_cv_db_db" 1>&6
11803
11804         if test $ol_cv_db_db = yes ; then
11805                 ol_cv_lib_db=-ldb
11806         fi
11807 fi
11808
11809 if test $ol_cv_lib_db = no ; then
11810         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11811 echo "configure:11812: checking for Berkeley DB link (-ldb3)" >&5
11812 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11813   echo $ac_n "(cached) $ac_c" 1>&6
11814 else
11815   
11816         ol_DB_LIB=-ldb3
11817         ol_LIBS=$LIBS
11818         LIBS="$ol_DB_LIB $LIBS"
11819
11820         cat > conftest.$ac_ext <<EOF
11821 #line 11822 "configure"
11822 #include "confdefs.h"
11823
11824 #ifdef HAVE_DB_185_H
11825 # include <db_185.h>
11826 #else
11827 # include <db.h>
11828 #endif
11829
11830 #ifndef DB_VERSION_MAJOR
11831 # define DB_VERSION_MAJOR 1
11832 #endif
11833
11834 #ifndef NULL
11835 #define NULL ((void*)0)
11836 #endif
11837
11838 int main() {
11839
11840 #if DB_VERSION_MAJOR > 2
11841         db_env_create( NULL, 0 );
11842 #elif DB_VERSION_MAJOR > 1
11843         db_appexit( NULL );
11844 #else
11845         (void) dbopen( NULL, 0, 0, 0, NULL);
11846 #endif
11847
11848 ; return 0; }
11849 EOF
11850 if { (eval echo configure:11851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11851   rm -rf conftest*
11852   ol_cv_db_db3=yes
11853 else
11854   echo "configure: failed program was:" >&5
11855   cat conftest.$ac_ext >&5
11856   rm -rf conftest*
11857   ol_cv_db_db3=no
11858 fi
11859 rm -f conftest*
11860
11861         LIBS="$ol_LIBS"
11862
11863 fi
11864
11865 echo "$ac_t""$ol_cv_db_db3" 1>&6
11866
11867         if test $ol_cv_db_db3 = yes ; then
11868                 ol_cv_lib_db=-ldb3
11869         fi
11870 fi
11871
11872 if test $ol_cv_lib_db = no ; then
11873         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11874 echo "configure:11875: checking for Berkeley DB link (-ldb2)" >&5
11875 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11876   echo $ac_n "(cached) $ac_c" 1>&6
11877 else
11878   
11879         ol_DB_LIB=-ldb2
11880         ol_LIBS=$LIBS
11881         LIBS="$ol_DB_LIB $LIBS"
11882
11883         cat > conftest.$ac_ext <<EOF
11884 #line 11885 "configure"
11885 #include "confdefs.h"
11886
11887 #ifdef HAVE_DB_185_H
11888 # include <db_185.h>
11889 #else
11890 # include <db.h>
11891 #endif
11892
11893 #ifndef DB_VERSION_MAJOR
11894 # define DB_VERSION_MAJOR 1
11895 #endif
11896
11897 #ifndef NULL
11898 #define NULL ((void*)0)
11899 #endif
11900
11901 int main() {
11902
11903 #if DB_VERSION_MAJOR > 2
11904         db_env_create( NULL, 0 );
11905 #elif DB_VERSION_MAJOR > 1
11906         db_appexit( NULL );
11907 #else
11908         (void) dbopen( NULL, 0, 0, 0, NULL);
11909 #endif
11910
11911 ; return 0; }
11912 EOF
11913 if { (eval echo configure:11914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11914   rm -rf conftest*
11915   ol_cv_db_db2=yes
11916 else
11917   echo "configure: failed program was:" >&5
11918   cat conftest.$ac_ext >&5
11919   rm -rf conftest*
11920   ol_cv_db_db2=no
11921 fi
11922 rm -f conftest*
11923
11924         LIBS="$ol_LIBS"
11925
11926 fi
11927
11928 echo "$ac_t""$ol_cv_db_db2" 1>&6
11929
11930         if test $ol_cv_db_db2 = yes ; then
11931                 ol_cv_lib_db=-ldb2
11932         fi
11933 fi
11934
11935 if test $ol_cv_lib_db = no ; then
11936         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11937 echo "configure:11938: checking for Berkeley DB link (-ldb1)" >&5
11938 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11939   echo $ac_n "(cached) $ac_c" 1>&6
11940 else
11941   
11942         ol_DB_LIB=-ldb1
11943         ol_LIBS=$LIBS
11944         LIBS="$ol_DB_LIB $LIBS"
11945
11946         cat > conftest.$ac_ext <<EOF
11947 #line 11948 "configure"
11948 #include "confdefs.h"
11949
11950 #ifdef HAVE_DB_185_H
11951 # include <db_185.h>
11952 #else
11953 # include <db.h>
11954 #endif
11955
11956 #ifndef DB_VERSION_MAJOR
11957 # define DB_VERSION_MAJOR 1
11958 #endif
11959
11960 #ifndef NULL
11961 #define NULL ((void*)0)
11962 #endif
11963
11964 int main() {
11965
11966 #if DB_VERSION_MAJOR > 2
11967         db_env_create( NULL, 0 );
11968 #elif DB_VERSION_MAJOR > 1
11969         db_appexit( NULL );
11970 #else
11971         (void) dbopen( NULL, 0, 0, 0, NULL);
11972 #endif
11973
11974 ; return 0; }
11975 EOF
11976 if { (eval echo configure:11977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11977   rm -rf conftest*
11978   ol_cv_db_db1=yes
11979 else
11980   echo "configure: failed program was:" >&5
11981   cat conftest.$ac_ext >&5
11982   rm -rf conftest*
11983   ol_cv_db_db1=no
11984 fi
11985 rm -f conftest*
11986
11987         LIBS="$ol_LIBS"
11988
11989 fi
11990
11991 echo "$ac_t""$ol_cv_db_db1" 1>&6
11992
11993         if test $ol_cv_db_db1 = yes ; then
11994                 ol_cv_lib_db=-ldb1
11995         fi
11996 fi
11997
11998
11999                 if test "$ol_cv_lib_db" != no ; then
12000                         ol_cv_berkeley_db=yes
12001                 fi
12002         fi
12003 fi
12004
12005         else
12006                 ol_cv_berkeley_db=no
12007 for ac_hdr in db.h
12008 do
12009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12011 echo "configure:12012: checking for $ac_hdr" >&5
12012 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12013   echo $ac_n "(cached) $ac_c" 1>&6
12014 else
12015   cat > conftest.$ac_ext <<EOF
12016 #line 12017 "configure"
12017 #include "confdefs.h"
12018 #include <$ac_hdr>
12019 EOF
12020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12021 { (eval echo configure:12022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12023 if test -z "$ac_err"; then
12024   rm -rf conftest*
12025   eval "ac_cv_header_$ac_safe=yes"
12026 else
12027   echo "$ac_err" >&5
12028   echo "configure: failed program was:" >&5
12029   cat conftest.$ac_ext >&5
12030   rm -rf conftest*
12031   eval "ac_cv_header_$ac_safe=no"
12032 fi
12033 rm -f conftest*
12034 fi
12035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12036   echo "$ac_t""yes" 1>&6
12037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12038   cat >> confdefs.h <<EOF
12039 #define $ac_tr_hdr 1
12040 EOF
12041  
12042 else
12043   echo "$ac_t""no" 1>&6
12044 fi
12045 done
12046
12047 if test $ac_cv_header_db_h = yes; then
12048         ol_cv_lib_db=no
12049 if test $ol_cv_lib_db = no ; then
12050         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12051 echo "configure:12052: checking for Berkeley DB link (default)" >&5
12052 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12053   echo $ac_n "(cached) $ac_c" 1>&6
12054 else
12055   
12056         ol_DB_LIB=
12057         ol_LIBS=$LIBS
12058         LIBS="$ol_DB_LIB $LIBS"
12059
12060         cat > conftest.$ac_ext <<EOF
12061 #line 12062 "configure"
12062 #include "confdefs.h"
12063
12064 #ifdef HAVE_DB_185_H
12065 # include <db_185.h>
12066 #else
12067 # include <db.h>
12068 #endif
12069
12070 #ifndef DB_VERSION_MAJOR
12071 # define DB_VERSION_MAJOR 1
12072 #endif
12073
12074 #ifndef NULL
12075 #define NULL ((void*)0)
12076 #endif
12077
12078 int main() {
12079
12080 #if DB_VERSION_MAJOR > 2
12081         db_env_create( NULL, 0 );
12082 #elif DB_VERSION_MAJOR > 1
12083         db_appexit( NULL );
12084 #else
12085         (void) dbopen( NULL, 0, 0, 0, NULL);
12086 #endif
12087
12088 ; return 0; }
12089 EOF
12090 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12091   rm -rf conftest*
12092   ol_cv_db_none=yes
12093 else
12094   echo "configure: failed program was:" >&5
12095   cat conftest.$ac_ext >&5
12096   rm -rf conftest*
12097   ol_cv_db_none=no
12098 fi
12099 rm -f conftest*
12100
12101         LIBS="$ol_LIBS"
12102
12103 fi
12104
12105 echo "$ac_t""$ol_cv_db_none" 1>&6
12106
12107         if test $ol_cv_db_none = yes ; then
12108                 ol_cv_lib_db=yes
12109         fi
12110 fi
12111
12112 if test $ol_cv_lib_db = no ; then
12113         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12114 echo "configure:12115: checking for Berkeley DB link (-ldb)" >&5
12115 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12116   echo $ac_n "(cached) $ac_c" 1>&6
12117 else
12118   
12119         ol_DB_LIB=-ldb
12120         ol_LIBS=$LIBS
12121         LIBS="$ol_DB_LIB $LIBS"
12122
12123         cat > conftest.$ac_ext <<EOF
12124 #line 12125 "configure"
12125 #include "confdefs.h"
12126
12127 #ifdef HAVE_DB_185_H
12128 # include <db_185.h>
12129 #else
12130 # include <db.h>
12131 #endif
12132
12133 #ifndef DB_VERSION_MAJOR
12134 # define DB_VERSION_MAJOR 1
12135 #endif
12136
12137 #ifndef NULL
12138 #define NULL ((void*)0)
12139 #endif
12140
12141 int main() {
12142
12143 #if DB_VERSION_MAJOR > 2
12144         db_env_create( NULL, 0 );
12145 #elif DB_VERSION_MAJOR > 1
12146         db_appexit( NULL );
12147 #else
12148         (void) dbopen( NULL, 0, 0, 0, NULL);
12149 #endif
12150
12151 ; return 0; }
12152 EOF
12153 if { (eval echo configure:12154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12154   rm -rf conftest*
12155   ol_cv_db_db=yes
12156 else
12157   echo "configure: failed program was:" >&5
12158   cat conftest.$ac_ext >&5
12159   rm -rf conftest*
12160   ol_cv_db_db=no
12161 fi
12162 rm -f conftest*
12163
12164         LIBS="$ol_LIBS"
12165
12166 fi
12167
12168 echo "$ac_t""$ol_cv_db_db" 1>&6
12169
12170         if test $ol_cv_db_db = yes ; then
12171                 ol_cv_lib_db=-ldb
12172         fi
12173 fi
12174
12175 if test $ol_cv_lib_db = no ; then
12176         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12177 echo "configure:12178: checking for Berkeley DB link (-ldb3)" >&5
12178 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12179   echo $ac_n "(cached) $ac_c" 1>&6
12180 else
12181   
12182         ol_DB_LIB=-ldb3
12183         ol_LIBS=$LIBS
12184         LIBS="$ol_DB_LIB $LIBS"
12185
12186         cat > conftest.$ac_ext <<EOF
12187 #line 12188 "configure"
12188 #include "confdefs.h"
12189
12190 #ifdef HAVE_DB_185_H
12191 # include <db_185.h>
12192 #else
12193 # include <db.h>
12194 #endif
12195
12196 #ifndef DB_VERSION_MAJOR
12197 # define DB_VERSION_MAJOR 1
12198 #endif
12199
12200 #ifndef NULL
12201 #define NULL ((void*)0)
12202 #endif
12203
12204 int main() {
12205
12206 #if DB_VERSION_MAJOR > 2
12207         db_env_create( NULL, 0 );
12208 #elif DB_VERSION_MAJOR > 1
12209         db_appexit( NULL );
12210 #else
12211         (void) dbopen( NULL, 0, 0, 0, NULL);
12212 #endif
12213
12214 ; return 0; }
12215 EOF
12216 if { (eval echo configure:12217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12217   rm -rf conftest*
12218   ol_cv_db_db3=yes
12219 else
12220   echo "configure: failed program was:" >&5
12221   cat conftest.$ac_ext >&5
12222   rm -rf conftest*
12223   ol_cv_db_db3=no
12224 fi
12225 rm -f conftest*
12226
12227         LIBS="$ol_LIBS"
12228
12229 fi
12230
12231 echo "$ac_t""$ol_cv_db_db3" 1>&6
12232
12233         if test $ol_cv_db_db3 = yes ; then
12234                 ol_cv_lib_db=-ldb3
12235         fi
12236 fi
12237
12238 if test $ol_cv_lib_db = no ; then
12239         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12240 echo "configure:12241: checking for Berkeley DB link (-ldb2)" >&5
12241 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12242   echo $ac_n "(cached) $ac_c" 1>&6
12243 else
12244   
12245         ol_DB_LIB=-ldb2
12246         ol_LIBS=$LIBS
12247         LIBS="$ol_DB_LIB $LIBS"
12248
12249         cat > conftest.$ac_ext <<EOF
12250 #line 12251 "configure"
12251 #include "confdefs.h"
12252
12253 #ifdef HAVE_DB_185_H
12254 # include <db_185.h>
12255 #else
12256 # include <db.h>
12257 #endif
12258
12259 #ifndef DB_VERSION_MAJOR
12260 # define DB_VERSION_MAJOR 1
12261 #endif
12262
12263 #ifndef NULL
12264 #define NULL ((void*)0)
12265 #endif
12266
12267 int main() {
12268
12269 #if DB_VERSION_MAJOR > 2
12270         db_env_create( NULL, 0 );
12271 #elif DB_VERSION_MAJOR > 1
12272         db_appexit( NULL );
12273 #else
12274         (void) dbopen( NULL, 0, 0, 0, NULL);
12275 #endif
12276
12277 ; return 0; }
12278 EOF
12279 if { (eval echo configure:12280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12280   rm -rf conftest*
12281   ol_cv_db_db2=yes
12282 else
12283   echo "configure: failed program was:" >&5
12284   cat conftest.$ac_ext >&5
12285   rm -rf conftest*
12286   ol_cv_db_db2=no
12287 fi
12288 rm -f conftest*
12289
12290         LIBS="$ol_LIBS"
12291
12292 fi
12293
12294 echo "$ac_t""$ol_cv_db_db2" 1>&6
12295
12296         if test $ol_cv_db_db2 = yes ; then
12297                 ol_cv_lib_db=-ldb2
12298         fi
12299 fi
12300
12301 if test $ol_cv_lib_db = no ; then
12302         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12303 echo "configure:12304: checking for Berkeley DB link (-ldb1)" >&5
12304 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12305   echo $ac_n "(cached) $ac_c" 1>&6
12306 else
12307   
12308         ol_DB_LIB=-ldb1
12309         ol_LIBS=$LIBS
12310         LIBS="$ol_DB_LIB $LIBS"
12311
12312         cat > conftest.$ac_ext <<EOF
12313 #line 12314 "configure"
12314 #include "confdefs.h"
12315
12316 #ifdef HAVE_DB_185_H
12317 # include <db_185.h>
12318 #else
12319 # include <db.h>
12320 #endif
12321
12322 #ifndef DB_VERSION_MAJOR
12323 # define DB_VERSION_MAJOR 1
12324 #endif
12325
12326 #ifndef NULL
12327 #define NULL ((void*)0)
12328 #endif
12329
12330 int main() {
12331
12332 #if DB_VERSION_MAJOR > 2
12333         db_env_create( NULL, 0 );
12334 #elif DB_VERSION_MAJOR > 1
12335         db_appexit( NULL );
12336 #else
12337         (void) dbopen( NULL, 0, 0, 0, NULL);
12338 #endif
12339
12340 ; return 0; }
12341 EOF
12342 if { (eval echo configure:12343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12343   rm -rf conftest*
12344   ol_cv_db_db1=yes
12345 else
12346   echo "configure: failed program was:" >&5
12347   cat conftest.$ac_ext >&5
12348   rm -rf conftest*
12349   ol_cv_db_db1=no
12350 fi
12351 rm -f conftest*
12352
12353         LIBS="$ol_LIBS"
12354
12355 fi
12356
12357 echo "$ac_t""$ol_cv_db_db1" 1>&6
12358
12359         if test $ol_cv_db_db1 = yes ; then
12360                 ol_cv_lib_db=-ldb1
12361         fi
12362 fi
12363
12364
12365         if test "$ol_cv_lib_db" != no ; then
12366                 ol_cv_berkeley_db=yes
12367                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12368 echo "configure:12369: checking for Berkeley DB thread support" >&5
12369 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12370   echo $ac_n "(cached) $ac_c" 1>&6
12371 else
12372   
12373         ol_LIBS="$LIBS"
12374         if test $ol_cv_lib_db != yes ; then
12375                 LIBS="$ol_cv_lib_db"
12376         fi
12377
12378         if test "$cross_compiling" = yes; then
12379   ol_cv_berkeley_db_thread=cross
12380 else
12381   cat > conftest.$ac_ext <<EOF
12382 #line 12383 "configure"
12383 #include "confdefs.h"
12384
12385 #ifdef HAVE_DB_185_H
12386         choke me;
12387 #else
12388 #include <db.h>
12389 #endif
12390 #ifndef NULL
12391 #define NULL ((void *)0)
12392 #endif
12393 main()
12394 {
12395         int rc;
12396         u_int32_t flags = DB_CREATE | DB_THREAD;
12397
12398 #if DB_VERSION_MAJOR > 2
12399         DB_ENV *env = NULL;
12400
12401         rc = db_env_create( &env, 0 );
12402
12403         if( rc == 0 ) {
12404 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12405                 rc = env->open( env, NULL, flags, 0 );
12406 #else
12407                 rc = env->open( env, NULL, NULL, flags, 0 );
12408 #endif
12409         }
12410
12411 #else
12412         DB_ENV env;
12413         memset( &env, '\0', sizeof(env) );
12414
12415         rc = db_appinit( NULL, NULL, &env, flags );
12416
12417         if( rc == 0 ) {
12418                 db_appexit( &env );
12419         }
12420 #endif
12421 #if DB_VERSION_MAJOR > 2
12422 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12423         env->remove( env, NULL, DB_FORCE);
12424 #else
12425         env->remove( env, NULL, NULL, DB_FORCE);
12426 #endif
12427 #endif
12428
12429         return rc;
12430 }
12431 EOF
12432 if { (eval echo configure:12433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12433 then
12434   ol_cv_berkeley_db_thread=yes
12435 else
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -fr conftest*
12439   ol_cv_berkeley_db_thread=no
12440 fi
12441 rm -fr conftest*
12442 fi
12443
12444
12445         LIBS="$ol_LIBS"
12446
12447         if test $ol_cv_berkeley_db_thread != no ; then
12448                 cat >> confdefs.h <<\EOF
12449 #define HAVE_BERKELEY_DB_THREAD 1
12450 EOF
12451
12452         fi
12453
12454 fi
12455
12456 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12457         fi
12458 fi
12459
12460         fi
12461
12462         if test $ol_cv_berkeley_db != no ; then
12463                 cat >> confdefs.h <<\EOF
12464 #define HAVE_BERKELEY_DB 1
12465 EOF
12466
12467
12468                 ol_link_ldbm=berkeley
12469                 ol_with_ldbm_api=db
12470
12471                 if test $ol_with_ldbm_type = hash ; then
12472                         cat >> confdefs.h <<\EOF
12473 #define LDBM_USE_DBHASH 1
12474 EOF
12475
12476                 else
12477                         cat >> confdefs.h <<\EOF
12478 #define LDBM_USE_DBBTREE 1
12479 EOF
12480
12481                 fi
12482
12483                                                 if test $ol_cv_lib_db != yes ; then
12484                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12485                 fi
12486         fi
12487 fi
12488
12489 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12490         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12491         ol_with_ldbm_api=none
12492 fi
12493
12494 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12495         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12496 echo "configure:12497: checking for MDBM library" >&5
12497 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12498   echo $ac_n "(cached) $ac_c" 1>&6
12499 else
12500         ol_LIBS="$LIBS"
12501         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12502 echo "configure:12503: checking for mdbm_set_chain" >&5
12503 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12504   echo $ac_n "(cached) $ac_c" 1>&6
12505 else
12506   cat > conftest.$ac_ext <<EOF
12507 #line 12508 "configure"
12508 #include "confdefs.h"
12509 /* System header to define __stub macros and hopefully few prototypes,
12510     which can conflict with char mdbm_set_chain(); below.  */
12511 #include <assert.h>
12512 /* Override any gcc2 internal prototype to avoid an error.  */
12513 /* We use char because int might match the return type of a gcc2
12514     builtin and then its argument prototype would still apply.  */
12515 char mdbm_set_chain();
12516 char (*f)();
12517
12518 int main() {
12519
12520 /* The GNU C library defines this for functions which it implements
12521     to always fail with ENOSYS.  Some functions are actually named
12522     something starting with __ and the normal name is an alias.  */
12523 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12524 choke me
12525 #else
12526 f = mdbm_set_chain;
12527 #endif
12528
12529 ; return 0; }
12530 EOF
12531 if { (eval echo configure:12532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12532   rm -rf conftest*
12533   eval "ac_cv_func_mdbm_set_chain=yes"
12534 else
12535   echo "configure: failed program was:" >&5
12536   cat conftest.$ac_ext >&5
12537   rm -rf conftest*
12538   eval "ac_cv_func_mdbm_set_chain=no"
12539 fi
12540 rm -f conftest*
12541 fi
12542
12543 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12544   echo "$ac_t""yes" 1>&6
12545   ol_cv_lib_mdbm=yes
12546 else
12547   echo "$ac_t""no" 1>&6
12548
12549                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12550 echo "configure:12551: checking for mdbm_set_chain in -lmdbm" >&5
12551 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12552 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12553   echo $ac_n "(cached) $ac_c" 1>&6
12554 else
12555   ac_save_LIBS="$LIBS"
12556 LIBS="-lmdbm  $LIBS"
12557 cat > conftest.$ac_ext <<EOF
12558 #line 12559 "configure"
12559 #include "confdefs.h"
12560 /* Override any gcc2 internal prototype to avoid an error.  */
12561 /* We use char because int might match the return type of a gcc2
12562     builtin and then its argument prototype would still apply.  */
12563 char mdbm_set_chain();
12564
12565 int main() {
12566 mdbm_set_chain()
12567 ; return 0; }
12568 EOF
12569 if { (eval echo configure:12570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12570   rm -rf conftest*
12571   eval "ac_cv_lib_$ac_lib_var=yes"
12572 else
12573   echo "configure: failed program was:" >&5
12574   cat conftest.$ac_ext >&5
12575   rm -rf conftest*
12576   eval "ac_cv_lib_$ac_lib_var=no"
12577 fi
12578 rm -f conftest*
12579 LIBS="$ac_save_LIBS"
12580
12581 fi
12582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12583   echo "$ac_t""yes" 1>&6
12584   ol_cv_lib_mdbm=-lmdbm
12585 else
12586   echo "$ac_t""no" 1>&6
12587 ol_cv_lib_mdbm=no
12588 fi
12589
12590         
12591 fi
12592
12593         LIBS="$ol_LIBS"
12594
12595 fi
12596
12597 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12598
12599
12600  for ac_hdr in mdbm.h
12601 do
12602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12603 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12604 echo "configure:12605: checking for $ac_hdr" >&5
12605 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12606   echo $ac_n "(cached) $ac_c" 1>&6
12607 else
12608   cat > conftest.$ac_ext <<EOF
12609 #line 12610 "configure"
12610 #include "confdefs.h"
12611 #include <$ac_hdr>
12612 EOF
12613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12614 { (eval echo configure:12615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12616 if test -z "$ac_err"; then
12617   rm -rf conftest*
12618   eval "ac_cv_header_$ac_safe=yes"
12619 else
12620   echo "$ac_err" >&5
12621   echo "configure: failed program was:" >&5
12622   cat conftest.$ac_ext >&5
12623   rm -rf conftest*
12624   eval "ac_cv_header_$ac_safe=no"
12625 fi
12626 rm -f conftest*
12627 fi
12628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12629   echo "$ac_t""yes" 1>&6
12630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12631   cat >> confdefs.h <<EOF
12632 #define $ac_tr_hdr 1
12633 EOF
12634  
12635 else
12636   echo "$ac_t""no" 1>&6
12637 fi
12638 done
12639
12640  echo $ac_n "checking for db""... $ac_c" 1>&6
12641 echo "configure:12642: checking for db" >&5
12642 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12643   echo $ac_n "(cached) $ac_c" 1>&6
12644 else
12645   
12646         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12647                 ol_cv_mdbm=no
12648         else
12649                 ol_cv_mdbm=yes
12650         fi
12651
12652 fi
12653
12654 echo "$ac_t""$ol_cv_mdbm" 1>&6
12655  if test $ol_cv_mdbm = yes ; then
12656         cat >> confdefs.h <<\EOF
12657 #define HAVE_MDBM 1
12658 EOF
12659
12660  fi
12661
12662
12663         if test $ol_cv_mdbm = yes ; then
12664                 ol_link_ldbm=mdbm
12665                 ol_with_ldbm_api=mdbm
12666                 if test $ol_cv_lib_mdbm != yes ; then
12667                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12668                 fi
12669         fi
12670 fi
12671
12672 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12673         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12674 echo "configure:12675: checking for GDBM library" >&5
12675 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12676   echo $ac_n "(cached) $ac_c" 1>&6
12677 else
12678         ol_LIBS="$LIBS"
12679         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12680 echo "configure:12681: checking for gdbm_open" >&5
12681 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12682   echo $ac_n "(cached) $ac_c" 1>&6
12683 else
12684   cat > conftest.$ac_ext <<EOF
12685 #line 12686 "configure"
12686 #include "confdefs.h"
12687 /* System header to define __stub macros and hopefully few prototypes,
12688     which can conflict with char gdbm_open(); below.  */
12689 #include <assert.h>
12690 /* Override any gcc2 internal prototype to avoid an error.  */
12691 /* We use char because int might match the return type of a gcc2
12692     builtin and then its argument prototype would still apply.  */
12693 char gdbm_open();
12694 char (*f)();
12695
12696 int main() {
12697
12698 /* The GNU C library defines this for functions which it implements
12699     to always fail with ENOSYS.  Some functions are actually named
12700     something starting with __ and the normal name is an alias.  */
12701 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12702 choke me
12703 #else
12704 f = gdbm_open;
12705 #endif
12706
12707 ; return 0; }
12708 EOF
12709 if { (eval echo configure:12710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12710   rm -rf conftest*
12711   eval "ac_cv_func_gdbm_open=yes"
12712 else
12713   echo "configure: failed program was:" >&5
12714   cat conftest.$ac_ext >&5
12715   rm -rf conftest*
12716   eval "ac_cv_func_gdbm_open=no"
12717 fi
12718 rm -f conftest*
12719 fi
12720
12721 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12722   echo "$ac_t""yes" 1>&6
12723   ol_cv_lib_gdbm=yes
12724 else
12725   echo "$ac_t""no" 1>&6
12726
12727                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12728 echo "configure:12729: checking for gdbm_open in -lgdbm" >&5
12729 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12731   echo $ac_n "(cached) $ac_c" 1>&6
12732 else
12733   ac_save_LIBS="$LIBS"
12734 LIBS="-lgdbm  $LIBS"
12735 cat > conftest.$ac_ext <<EOF
12736 #line 12737 "configure"
12737 #include "confdefs.h"
12738 /* Override any gcc2 internal prototype to avoid an error.  */
12739 /* We use char because int might match the return type of a gcc2
12740     builtin and then its argument prototype would still apply.  */
12741 char gdbm_open();
12742
12743 int main() {
12744 gdbm_open()
12745 ; return 0; }
12746 EOF
12747 if { (eval echo configure:12748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12748   rm -rf conftest*
12749   eval "ac_cv_lib_$ac_lib_var=yes"
12750 else
12751   echo "configure: failed program was:" >&5
12752   cat conftest.$ac_ext >&5
12753   rm -rf conftest*
12754   eval "ac_cv_lib_$ac_lib_var=no"
12755 fi
12756 rm -f conftest*
12757 LIBS="$ac_save_LIBS"
12758
12759 fi
12760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12761   echo "$ac_t""yes" 1>&6
12762   ol_cv_lib_gdbm=-lgdbm
12763 else
12764   echo "$ac_t""no" 1>&6
12765 ol_cv_lib_gdbm=no
12766 fi
12767
12768         
12769 fi
12770
12771         LIBS="$ol_LIBS"
12772
12773 fi
12774
12775 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12776
12777
12778  for ac_hdr in gdbm.h
12779 do
12780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12782 echo "configure:12783: checking for $ac_hdr" >&5
12783 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12784   echo $ac_n "(cached) $ac_c" 1>&6
12785 else
12786   cat > conftest.$ac_ext <<EOF
12787 #line 12788 "configure"
12788 #include "confdefs.h"
12789 #include <$ac_hdr>
12790 EOF
12791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12792 { (eval echo configure:12793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12794 if test -z "$ac_err"; then
12795   rm -rf conftest*
12796   eval "ac_cv_header_$ac_safe=yes"
12797 else
12798   echo "$ac_err" >&5
12799   echo "configure: failed program was:" >&5
12800   cat conftest.$ac_ext >&5
12801   rm -rf conftest*
12802   eval "ac_cv_header_$ac_safe=no"
12803 fi
12804 rm -f conftest*
12805 fi
12806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12807   echo "$ac_t""yes" 1>&6
12808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12809   cat >> confdefs.h <<EOF
12810 #define $ac_tr_hdr 1
12811 EOF
12812  
12813 else
12814   echo "$ac_t""no" 1>&6
12815 fi
12816 done
12817
12818  echo $ac_n "checking for db""... $ac_c" 1>&6
12819 echo "configure:12820: checking for db" >&5
12820 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12821   echo $ac_n "(cached) $ac_c" 1>&6
12822 else
12823   
12824         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12825                 ol_cv_gdbm=no
12826         else
12827                 ol_cv_gdbm=yes
12828         fi
12829
12830 fi
12831
12832 echo "$ac_t""$ol_cv_gdbm" 1>&6
12833  if test $ol_cv_gdbm = yes ; then
12834         cat >> confdefs.h <<\EOF
12835 #define HAVE_GDBM 1
12836 EOF
12837
12838  fi
12839
12840
12841         if test $ol_cv_gdbm = yes ; then
12842                 ol_link_ldbm=gdbm
12843                 ol_with_ldbm_api=gdbm
12844
12845                 if test $ol_cv_lib_gdbm != yes ; then
12846                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12847                 fi
12848         fi
12849 fi
12850
12851 if test $ol_with_ldbm_api = ndbm ; then
12852         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12853 echo "configure:12854: checking for NDBM library" >&5
12854 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12855   echo $ac_n "(cached) $ac_c" 1>&6
12856 else
12857         ol_LIBS="$LIBS"
12858         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12859 echo "configure:12860: checking for dbm_open" >&5
12860 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12861   echo $ac_n "(cached) $ac_c" 1>&6
12862 else
12863   cat > conftest.$ac_ext <<EOF
12864 #line 12865 "configure"
12865 #include "confdefs.h"
12866 /* System header to define __stub macros and hopefully few prototypes,
12867     which can conflict with char dbm_open(); below.  */
12868 #include <assert.h>
12869 /* Override any gcc2 internal prototype to avoid an error.  */
12870 /* We use char because int might match the return type of a gcc2
12871     builtin and then its argument prototype would still apply.  */
12872 char dbm_open();
12873 char (*f)();
12874
12875 int main() {
12876
12877 /* The GNU C library defines this for functions which it implements
12878     to always fail with ENOSYS.  Some functions are actually named
12879     something starting with __ and the normal name is an alias.  */
12880 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12881 choke me
12882 #else
12883 f = dbm_open;
12884 #endif
12885
12886 ; return 0; }
12887 EOF
12888 if { (eval echo configure:12889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12889   rm -rf conftest*
12890   eval "ac_cv_func_dbm_open=yes"
12891 else
12892   echo "configure: failed program was:" >&5
12893   cat conftest.$ac_ext >&5
12894   rm -rf conftest*
12895   eval "ac_cv_func_dbm_open=no"
12896 fi
12897 rm -f conftest*
12898 fi
12899
12900 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12901   echo "$ac_t""yes" 1>&6
12902   ol_cv_lib_ndbm=yes
12903 else
12904   echo "$ac_t""no" 1>&6
12905
12906                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12907 echo "configure:12908: checking for dbm_open in -lndbm" >&5
12908 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12910   echo $ac_n "(cached) $ac_c" 1>&6
12911 else
12912   ac_save_LIBS="$LIBS"
12913 LIBS="-lndbm  $LIBS"
12914 cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 /* Override any gcc2 internal prototype to avoid an error.  */
12918 /* We use char because int might match the return type of a gcc2
12919     builtin and then its argument prototype would still apply.  */
12920 char dbm_open();
12921
12922 int main() {
12923 dbm_open()
12924 ; return 0; }
12925 EOF
12926 if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12927   rm -rf conftest*
12928   eval "ac_cv_lib_$ac_lib_var=yes"
12929 else
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -rf conftest*
12933   eval "ac_cv_lib_$ac_lib_var=no"
12934 fi
12935 rm -f conftest*
12936 LIBS="$ac_save_LIBS"
12937
12938 fi
12939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12940   echo "$ac_t""yes" 1>&6
12941   ol_cv_lib_ndbm=-lndbm
12942 else
12943   echo "$ac_t""no" 1>&6
12944
12945                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12946 echo "configure:12947: checking for dbm_open in -ldbm" >&5
12947 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12948 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12949   echo $ac_n "(cached) $ac_c" 1>&6
12950 else
12951   ac_save_LIBS="$LIBS"
12952 LIBS="-ldbm  $LIBS"
12953 cat > conftest.$ac_ext <<EOF
12954 #line 12955 "configure"
12955 #include "confdefs.h"
12956 /* Override any gcc2 internal prototype to avoid an error.  */
12957 /* We use char because int might match the return type of a gcc2
12958     builtin and then its argument prototype would still apply.  */
12959 char dbm_open();
12960
12961 int main() {
12962 dbm_open()
12963 ; return 0; }
12964 EOF
12965 if { (eval echo configure:12966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12966   rm -rf conftest*
12967   eval "ac_cv_lib_$ac_lib_var=yes"
12968 else
12969   echo "configure: failed program was:" >&5
12970   cat conftest.$ac_ext >&5
12971   rm -rf conftest*
12972   eval "ac_cv_lib_$ac_lib_var=no"
12973 fi
12974 rm -f conftest*
12975 LIBS="$ac_save_LIBS"
12976
12977 fi
12978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12979   echo "$ac_t""yes" 1>&6
12980   ol_cv_lib_ndbm=-ldbm
12981 else
12982   echo "$ac_t""no" 1>&6
12983 ol_cv_lib_ndbm=no
12984 fi
12985                 
12986 fi
12987
12988         
12989 fi
12990
12991         LIBS="$ol_LIBS"
12992
12993 fi
12994
12995 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12996
12997
12998  for ac_hdr in ndbm.h
12999 do
13000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13002 echo "configure:13003: checking for $ac_hdr" >&5
13003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13004   echo $ac_n "(cached) $ac_c" 1>&6
13005 else
13006   cat > conftest.$ac_ext <<EOF
13007 #line 13008 "configure"
13008 #include "confdefs.h"
13009 #include <$ac_hdr>
13010 EOF
13011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13012 { (eval echo configure:13013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13014 if test -z "$ac_err"; then
13015   rm -rf conftest*
13016   eval "ac_cv_header_$ac_safe=yes"
13017 else
13018   echo "$ac_err" >&5
13019   echo "configure: failed program was:" >&5
13020   cat conftest.$ac_ext >&5
13021   rm -rf conftest*
13022   eval "ac_cv_header_$ac_safe=no"
13023 fi
13024 rm -f conftest*
13025 fi
13026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13027   echo "$ac_t""yes" 1>&6
13028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13029   cat >> confdefs.h <<EOF
13030 #define $ac_tr_hdr 1
13031 EOF
13032  
13033 else
13034   echo "$ac_t""no" 1>&6
13035 fi
13036 done
13037
13038  echo $ac_n "checking for db""... $ac_c" 1>&6
13039 echo "configure:13040: checking for db" >&5
13040 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13041   echo $ac_n "(cached) $ac_c" 1>&6
13042 else
13043   
13044         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13045                 ol_cv_ndbm=no
13046         else
13047                 ol_cv_ndbm=yes
13048         fi
13049
13050 fi
13051
13052 echo "$ac_t""$ol_cv_ndbm" 1>&6
13053  if test $ol_cv_ndbm = yes ; then
13054         cat >> confdefs.h <<\EOF
13055 #define HAVE_NDBM 1
13056 EOF
13057
13058  fi
13059
13060
13061         if test $ol_cv_ndbm = yes ; then
13062                 ol_link_ldbm=ndbm
13063                 ol_with_ldbm_api=ndbm
13064
13065                 if test $ol_cv_lib_ndbm != yes ; then
13066                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13067                 fi
13068         fi
13069 fi
13070
13071 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13072         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13073         if test $ol_enable_ldbm = yes ; then
13074                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13075         fi
13076
13077         echo "configure: warning: disabling LDBM" 1>&2
13078         ol_enable_ldbm=no
13079 fi
13080
13081 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13082         LINK_BINS_DYNAMIC="yes"
13083 else
13084         LINK_BINS_DYNAMIC="no"
13085 fi
13086
13087 if test $ol_enable_wrappers != no ; then
13088         for ac_hdr in tcpd.h
13089 do
13090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13092 echo "configure:13093: checking for $ac_hdr" >&5
13093 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13094   echo $ac_n "(cached) $ac_c" 1>&6
13095 else
13096   cat > conftest.$ac_ext <<EOF
13097 #line 13098 "configure"
13098 #include "confdefs.h"
13099 #include <$ac_hdr>
13100 EOF
13101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13102 { (eval echo configure:13103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13104 if test -z "$ac_err"; then
13105   rm -rf conftest*
13106   eval "ac_cv_header_$ac_safe=yes"
13107 else
13108   echo "$ac_err" >&5
13109   echo "configure: failed program was:" >&5
13110   cat conftest.$ac_ext >&5
13111   rm -rf conftest*
13112   eval "ac_cv_header_$ac_safe=no"
13113 fi
13114 rm -f conftest*
13115 fi
13116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13117   echo "$ac_t""yes" 1>&6
13118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13119   cat >> confdefs.h <<EOF
13120 #define $ac_tr_hdr 1
13121 EOF
13122  
13123 else
13124   echo "$ac_t""no" 1>&6
13125 fi
13126 done
13127
13128
13129         if test $ac_cv_header_tcpd_h != yes ; then
13130                 have_wrappers=no
13131         else
13132                 cat > conftest.$ac_ext <<EOF
13133 #line 13134 "configure"
13134 #include "confdefs.h"
13135
13136 int allow_severity = 0;
13137 int deny_severity  = 0;
13138                 
13139 int main() {
13140 hosts_access()
13141 ; return 0; }
13142 EOF
13143 if { (eval echo configure:13144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13144   rm -rf conftest*
13145   have_wrappers=yes
13146 else
13147   echo "configure: failed program was:" >&5
13148   cat conftest.$ac_ext >&5
13149   rm -rf conftest*
13150   have_wrappers=no
13151 fi
13152 rm -f conftest*
13153         fi
13154
13155         if test $have_wrappers = yes ; then
13156                 cat >> confdefs.h <<\EOF
13157 #define HAVE_TCPD 1
13158 EOF
13159
13160                 WRAP_LIBS="-lwrap"
13161
13162                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13163 echo "configure:13164: checking for main in -lnsl" >&5
13164 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13166   echo $ac_n "(cached) $ac_c" 1>&6
13167 else
13168   ac_save_LIBS="$LIBS"
13169 LIBS="-lnsl  $LIBS"
13170 cat > conftest.$ac_ext <<EOF
13171 #line 13172 "configure"
13172 #include "confdefs.h"
13173
13174 int main() {
13175 main()
13176 ; return 0; }
13177 EOF
13178 if { (eval echo configure:13179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13179   rm -rf conftest*
13180   eval "ac_cv_lib_$ac_lib_var=yes"
13181 else
13182   echo "configure: failed program was:" >&5
13183   cat conftest.$ac_ext >&5
13184   rm -rf conftest*
13185   eval "ac_cv_lib_$ac_lib_var=no"
13186 fi
13187 rm -f conftest*
13188 LIBS="$ac_save_LIBS"
13189
13190 fi
13191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13192   echo "$ac_t""yes" 1>&6
13193     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13194     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13195   cat >> confdefs.h <<EOF
13196 #define $ac_tr_lib 1
13197 EOF
13198
13199   LIBS="-lnsl $LIBS"
13200
13201 else
13202   echo "$ac_t""no" 1>&6
13203 fi
13204
13205         else
13206                 echo "configure: warning: could not find -lwrap" 1>&2
13207                 if test $ol_enable_wrappers = yes ; then
13208                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13209                 fi
13210
13211                 echo "configure: warning: disabling wrappers support" 1>&2
13212                 ol_enable_wrappers=no
13213                 WRAP_LIBS=""
13214         fi
13215 fi
13216
13217 if test $ol_enable_syslog != no ; then
13218         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13219 echo "configure:13220: checking for openlog" >&5
13220 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13221   echo $ac_n "(cached) $ac_c" 1>&6
13222 else
13223   cat > conftest.$ac_ext <<EOF
13224 #line 13225 "configure"
13225 #include "confdefs.h"
13226 /* System header to define __stub macros and hopefully few prototypes,
13227     which can conflict with char openlog(); below.  */
13228 #include <assert.h>
13229 /* Override any gcc2 internal prototype to avoid an error.  */
13230 /* We use char because int might match the return type of a gcc2
13231     builtin and then its argument prototype would still apply.  */
13232 char openlog();
13233 char (*f)();
13234
13235 int main() {
13236
13237 /* The GNU C library defines this for functions which it implements
13238     to always fail with ENOSYS.  Some functions are actually named
13239     something starting with __ and the normal name is an alias.  */
13240 #if defined (__stub_openlog) || defined (__stub___openlog)
13241 choke me
13242 #else
13243 f = openlog;
13244 #endif
13245
13246 ; return 0; }
13247 EOF
13248 if { (eval echo configure:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13249   rm -rf conftest*
13250   eval "ac_cv_func_openlog=yes"
13251 else
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -rf conftest*
13255   eval "ac_cv_func_openlog=no"
13256 fi
13257 rm -f conftest*
13258 fi
13259
13260 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13261   echo "$ac_t""yes" 1>&6
13262   :
13263 else
13264   echo "$ac_t""no" 1>&6
13265 fi
13266
13267         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13268                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13269         fi
13270         ol_enable_syslog=$ac_cv_func_openlog
13271 fi
13272
13273
13274 ol_link_sql=no
13275 if test $ol_enable_sql != no ; then
13276         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13277 echo "configure:13278: checking for SQLDriverConnect in -liodbc" >&5
13278 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13280   echo $ac_n "(cached) $ac_c" 1>&6
13281 else
13282   ac_save_LIBS="$LIBS"
13283 LIBS="-liodbc  $LIBS"
13284 cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287 /* Override any gcc2 internal prototype to avoid an error.  */
13288 /* We use char because int might match the return type of a gcc2
13289     builtin and then its argument prototype would still apply.  */
13290 char SQLDriverConnect();
13291
13292 int main() {
13293 SQLDriverConnect()
13294 ; return 0; }
13295 EOF
13296 if { (eval echo configure:13297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13297   rm -rf conftest*
13298   eval "ac_cv_lib_$ac_lib_var=yes"
13299 else
13300   echo "configure: failed program was:" >&5
13301   cat conftest.$ac_ext >&5
13302   rm -rf conftest*
13303   eval "ac_cv_lib_$ac_lib_var=no"
13304 fi
13305 rm -f conftest*
13306 LIBS="$ac_save_LIBS"
13307
13308 fi
13309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13310   echo "$ac_t""yes" 1>&6
13311   have_iodbc=yes
13312 else
13313   echo "$ac_t""no" 1>&6
13314 have_iodbc=no
13315 fi
13316
13317         if test $have_iodbc = yes ; then
13318                 ol_link_sql="-liodbc"
13319         else
13320                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13321 echo "configure:13322: checking for SQLDriverConnect in -lodbc" >&5
13322 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13323 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13324   echo $ac_n "(cached) $ac_c" 1>&6
13325 else
13326   ac_save_LIBS="$LIBS"
13327 LIBS="-lodbc  $LIBS"
13328 cat > conftest.$ac_ext <<EOF
13329 #line 13330 "configure"
13330 #include "confdefs.h"
13331 /* Override any gcc2 internal prototype to avoid an error.  */
13332 /* We use char because int might match the return type of a gcc2
13333     builtin and then its argument prototype would still apply.  */
13334 char SQLDriverConnect();
13335
13336 int main() {
13337 SQLDriverConnect()
13338 ; return 0; }
13339 EOF
13340 if { (eval echo configure:13341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13341   rm -rf conftest*
13342   eval "ac_cv_lib_$ac_lib_var=yes"
13343 else
13344   echo "configure: failed program was:" >&5
13345   cat conftest.$ac_ext >&5
13346   rm -rf conftest*
13347   eval "ac_cv_lib_$ac_lib_var=no"
13348 fi
13349 rm -f conftest*
13350 LIBS="$ac_save_LIBS"
13351
13352 fi
13353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13354   echo "$ac_t""yes" 1>&6
13355   have_odbc=yes
13356 else
13357   echo "$ac_t""no" 1>&6
13358 have_odbc=no
13359 fi
13360
13361                 if test $have_odbc = yes ; then
13362                         ol_link_sql="-lodbc"
13363                 fi
13364         fi
13365
13366         if test $ol_link_sql != no ; then
13367                 SLAPD_SQL_LIBS="$ol_link_sql"
13368
13369         elif test $ol_enable_sql != auto ; then
13370                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13371         fi
13372 fi
13373
13374 if test $ol_enable_tcl != no ; then
13375         for ac_hdr in tcl.h
13376 do
13377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13379 echo "configure:13380: checking for $ac_hdr" >&5
13380 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13381   echo $ac_n "(cached) $ac_c" 1>&6
13382 else
13383   cat > conftest.$ac_ext <<EOF
13384 #line 13385 "configure"
13385 #include "confdefs.h"
13386 #include <$ac_hdr>
13387 EOF
13388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13389 { (eval echo configure:13390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13391 if test -z "$ac_err"; then
13392   rm -rf conftest*
13393   eval "ac_cv_header_$ac_safe=yes"
13394 else
13395   echo "$ac_err" >&5
13396   echo "configure: failed program was:" >&5
13397   cat conftest.$ac_ext >&5
13398   rm -rf conftest*
13399   eval "ac_cv_header_$ac_safe=no"
13400 fi
13401 rm -f conftest*
13402 fi
13403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13404   echo "$ac_t""yes" 1>&6
13405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13406   cat >> confdefs.h <<EOF
13407 #define $ac_tr_hdr 1
13408 EOF
13409  
13410 else
13411   echo "$ac_t""no" 1>&6
13412 fi
13413 done
13414
13415
13416         if test $ac_cv_header_tcl_h != yes ; then
13417                 have_tcl=no
13418         else
13419                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13420                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13421 echo "configure:13422: checking for main in -l$lib" >&5
13422 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13424   echo $ac_n "(cached) $ac_c" 1>&6
13425 else
13426   ac_save_LIBS="$LIBS"
13427 LIBS="-l$lib  $LIBS"
13428 cat > conftest.$ac_ext <<EOF
13429 #line 13430 "configure"
13430 #include "confdefs.h"
13431
13432 int main() {
13433 main()
13434 ; return 0; }
13435 EOF
13436 if { (eval echo configure:13437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13437   rm -rf conftest*
13438   eval "ac_cv_lib_$ac_lib_var=yes"
13439 else
13440   echo "configure: failed program was:" >&5
13441   cat conftest.$ac_ext >&5
13442   rm -rf conftest*
13443   eval "ac_cv_lib_$ac_lib_var=no"
13444 fi
13445 rm -f conftest*
13446 LIBS="$ac_save_LIBS"
13447
13448 fi
13449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13450   echo "$ac_t""yes" 1>&6
13451   have_tcl=yes
13452                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13453                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13454                            else
13455                                MOD_TCL_LIB="-l${lib}"
13456                            fi;break
13457 else
13458   echo "$ac_t""no" 1>&6
13459 have_tcl=no
13460 fi
13461
13462                 done
13463         fi
13464
13465         if test $have_tcl != yes ; then
13466                 echo "configure: warning: could not find -ltcl" 1>&2
13467                 if test $ol_enable_tcl = yes ; then
13468                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13469                 fi
13470
13471                 ol_enable_tcl=no
13472         fi
13473 fi
13474
13475 ol_link_termcap=no
13476 for ac_hdr in termcap.h ncurses.h
13477 do
13478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13479 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13480 echo "configure:13481: checking for $ac_hdr" >&5
13481 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13482   echo $ac_n "(cached) $ac_c" 1>&6
13483 else
13484   cat > conftest.$ac_ext <<EOF
13485 #line 13486 "configure"
13486 #include "confdefs.h"
13487 #include <$ac_hdr>
13488 EOF
13489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13490 { (eval echo configure:13491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13492 if test -z "$ac_err"; then
13493   rm -rf conftest*
13494   eval "ac_cv_header_$ac_safe=yes"
13495 else
13496   echo "$ac_err" >&5
13497   echo "configure: failed program was:" >&5
13498   cat conftest.$ac_ext >&5
13499   rm -rf conftest*
13500   eval "ac_cv_header_$ac_safe=no"
13501 fi
13502 rm -f conftest*
13503 fi
13504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13505   echo "$ac_t""yes" 1>&6
13506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13507   cat >> confdefs.h <<EOF
13508 #define $ac_tr_hdr 1
13509 EOF
13510  
13511 else
13512   echo "$ac_t""no" 1>&6
13513 fi
13514 done
13515
13516
13517 if test $ol_link_termcap = no ; then
13518         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13519 echo "configure:13520: checking for tputs in -ltermcap" >&5
13520 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13521 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13522   echo $ac_n "(cached) $ac_c" 1>&6
13523 else
13524   ac_save_LIBS="$LIBS"
13525 LIBS="-ltermcap  $LIBS"
13526 cat > conftest.$ac_ext <<EOF
13527 #line 13528 "configure"
13528 #include "confdefs.h"
13529 /* Override any gcc2 internal prototype to avoid an error.  */
13530 /* We use char because int might match the return type of a gcc2
13531     builtin and then its argument prototype would still apply.  */
13532 char tputs();
13533
13534 int main() {
13535 tputs()
13536 ; return 0; }
13537 EOF
13538 if { (eval echo configure:13539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13539   rm -rf conftest*
13540   eval "ac_cv_lib_$ac_lib_var=yes"
13541 else
13542   echo "configure: failed program was:" >&5
13543   cat conftest.$ac_ext >&5
13544   rm -rf conftest*
13545   eval "ac_cv_lib_$ac_lib_var=no"
13546 fi
13547 rm -f conftest*
13548 LIBS="$ac_save_LIBS"
13549
13550 fi
13551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13552   echo "$ac_t""yes" 1>&6
13553   have_termcap=yes
13554 else
13555   echo "$ac_t""no" 1>&6
13556 have_termcap=no
13557 fi
13558
13559         if test $have_termcap = yes ; then
13560                 cat >> confdefs.h <<\EOF
13561 #define HAVE_TERMCAP 1
13562 EOF
13563
13564                 ol_link_termcap=yes
13565                 TERMCAP_LIBS=-ltermcap
13566         fi
13567 fi
13568
13569 if test $ol_link_termcap = no ; then
13570         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13571 echo "configure:13572: checking for initscr in -lncurses" >&5
13572 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13573 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13574   echo $ac_n "(cached) $ac_c" 1>&6
13575 else
13576   ac_save_LIBS="$LIBS"
13577 LIBS="-lncurses  $LIBS"
13578 cat > conftest.$ac_ext <<EOF
13579 #line 13580 "configure"
13580 #include "confdefs.h"
13581 /* Override any gcc2 internal prototype to avoid an error.  */
13582 /* We use char because int might match the return type of a gcc2
13583     builtin and then its argument prototype would still apply.  */
13584 char initscr();
13585
13586 int main() {
13587 initscr()
13588 ; return 0; }
13589 EOF
13590 if { (eval echo configure:13591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13591   rm -rf conftest*
13592   eval "ac_cv_lib_$ac_lib_var=yes"
13593 else
13594   echo "configure: failed program was:" >&5
13595   cat conftest.$ac_ext >&5
13596   rm -rf conftest*
13597   eval "ac_cv_lib_$ac_lib_var=no"
13598 fi
13599 rm -f conftest*
13600 LIBS="$ac_save_LIBS"
13601
13602 fi
13603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13604   echo "$ac_t""yes" 1>&6
13605   have_ncurses=yes
13606 else
13607   echo "$ac_t""no" 1>&6
13608 have_ncurses=no
13609 fi
13610
13611         if test $have_ncurses = yes ; then
13612                 cat >> confdefs.h <<\EOF
13613 #define HAVE_NCURSES 1
13614 EOF
13615
13616                 ol_link_termcap=yes
13617                 TERMCAP_LIBS=-lncurses
13618         fi
13619 fi
13620
13621 if test $ol_link_termcap = no ; then
13622         cat >> confdefs.h <<\EOF
13623 #define NO_TERMCAP 1
13624 EOF
13625
13626         TERMCAP_LIBS=
13627 fi
13628
13629 ol_link_sasl=no
13630 ol_link_spasswd=no
13631 if test $ol_with_cyrus_sasl != no ; then
13632         for ac_hdr in sasl.h
13633 do
13634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13636 echo "configure:13637: checking for $ac_hdr" >&5
13637 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13638   echo $ac_n "(cached) $ac_c" 1>&6
13639 else
13640   cat > conftest.$ac_ext <<EOF
13641 #line 13642 "configure"
13642 #include "confdefs.h"
13643 #include <$ac_hdr>
13644 EOF
13645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13646 { (eval echo configure:13647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13648 if test -z "$ac_err"; then
13649   rm -rf conftest*
13650   eval "ac_cv_header_$ac_safe=yes"
13651 else
13652   echo "$ac_err" >&5
13653   echo "configure: failed program was:" >&5
13654   cat conftest.$ac_ext >&5
13655   rm -rf conftest*
13656   eval "ac_cv_header_$ac_safe=no"
13657 fi
13658 rm -f conftest*
13659 fi
13660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13661   echo "$ac_t""yes" 1>&6
13662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13663   cat >> confdefs.h <<EOF
13664 #define $ac_tr_hdr 1
13665 EOF
13666  
13667 else
13668   echo "$ac_t""no" 1>&6
13669 fi
13670 done
13671
13672
13673         if test $ac_cv_header_sasl_h = yes ; then
13674                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13675 echo "configure:13676: checking for sasl_client_init in -lsasl" >&5
13676 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13677 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13678   echo $ac_n "(cached) $ac_c" 1>&6
13679 else
13680   ac_save_LIBS="$LIBS"
13681 LIBS="-lsasl  $LIBS"
13682 cat > conftest.$ac_ext <<EOF
13683 #line 13684 "configure"
13684 #include "confdefs.h"
13685 /* Override any gcc2 internal prototype to avoid an error.  */
13686 /* We use char because int might match the return type of a gcc2
13687     builtin and then its argument prototype would still apply.  */
13688 char sasl_client_init();
13689
13690 int main() {
13691 sasl_client_init()
13692 ; return 0; }
13693 EOF
13694 if { (eval echo configure:13695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13695   rm -rf conftest*
13696   eval "ac_cv_lib_$ac_lib_var=yes"
13697 else
13698   echo "configure: failed program was:" >&5
13699   cat conftest.$ac_ext >&5
13700   rm -rf conftest*
13701   eval "ac_cv_lib_$ac_lib_var=no"
13702 fi
13703 rm -f conftest*
13704 LIBS="$ac_save_LIBS"
13705
13706 fi
13707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13708   echo "$ac_t""yes" 1>&6
13709   have_cyrus_sasl=yes
13710 else
13711   echo "$ac_t""no" 1>&6
13712 have_cyrus_sasl=no
13713 fi
13714
13715
13716                 if test $have_cyrus_sasl != no ; then
13717                         SASL_LIBS="-lsasl"
13718                         cat >> confdefs.h <<\EOF
13719 #define HAVE_CYRUS_SASL 1
13720 EOF
13721
13722                         ol_link_sasl=yes
13723                 fi
13724         fi
13725
13726         if test $ol_link_sasl = no ; then
13727                 if test $ol_with_cyrus_sasl != auto ; then
13728                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13729                 else
13730                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13731                         echo "configure: warning: SASL authentication not supported!" 1>&2
13732                         if test $ol_link_tls = no ; then
13733                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13734                         fi
13735                 fi
13736
13737         elif test $ol_enable_spasswd != no ; then
13738                 ol_link_spasswd=yes
13739         fi
13740
13741 else
13742         echo "configure: warning: SASL authentication not supported!" 1>&2
13743         if test $ol_link_tls = no ; then
13744                 echo "configure: warning: Strong authentication not supported!" 1>&2
13745         fi
13746 fi
13747
13748 if test $cross_compiling != yes ; then
13749         dev=no
13750         if test -r /dev/urandom ; then
13751                 dev="/dev/urandom";
13752         elif test -r /idev/urandom ; then
13753                 dev="/idev/urandom";
13754         elif test -r /dev/srandom ; then
13755                 dev="/dev/srandom";
13756         elif test -r /dev/random ; then
13757                 dev="/dev/random";
13758         elif test -r /idev/random ; then
13759                 dev="/idev/random";
13760         fi
13761
13762         if test $dev != no ; then
13763                 cat >> confdefs.h <<EOF
13764 #define URANDOM_DEVICE "$dev"
13765 EOF
13766
13767         fi
13768 fi
13769
13770 ol_link_fetch=no
13771 if test $ol_with_fetch != no ; then
13772         ol_LIBS=$LIBS
13773 LIBS="-lfetch -lcom_err $LIBS"
13774 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13775 echo "configure:13776: checking fetch(3) library" >&5
13776 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13777   echo $ac_n "(cached) $ac_c" 1>&6
13778 else
13779   
13780         cat > conftest.$ac_ext <<EOF
13781 #line 13782 "configure"
13782 #include "confdefs.h"
13783
13784 #include <sys/param.h>
13785 #include <stdio.h>
13786 #include <fetch.h>
13787 int main() {
13788 struct url *u = fetchParseURL("file:///"); 
13789 ; return 0; }
13790 EOF
13791 if { (eval echo configure:13792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13792   rm -rf conftest*
13793   ol_cv_lib_fetch=yes
13794 else
13795   echo "configure: failed program was:" >&5
13796   cat conftest.$ac_ext >&5
13797   rm -rf conftest*
13798   ol_cv_lib_fetch=no
13799 fi
13800 rm -f conftest*
13801 fi
13802
13803 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13804 LIBS=$ol_LIBS
13805 if test $ol_cv_lib_fetch != no ; then
13806         ol_link_fetch="-lfetch -lcom_err"
13807         cat >> confdefs.h <<\EOF
13808 #define HAVE_FETCH 1
13809 EOF
13810
13811 fi
13812
13813
13814         if test $ol_cv_lib_fetch != no ; then
13815                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13816                 ol_link_fetch=freebsd
13817
13818         elif test $ol_with_fetch != auto ; then
13819                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13820         fi 
13821 fi
13822
13823 ol_link_readline=no
13824 if test $ol_with_readline != no ; then
13825         for ac_hdr in readline/readline.h readline/history.h
13826 do
13827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13828 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13829 echo "configure:13830: checking for $ac_hdr" >&5
13830 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13831   echo $ac_n "(cached) $ac_c" 1>&6
13832 else
13833   cat > conftest.$ac_ext <<EOF
13834 #line 13835 "configure"
13835 #include "confdefs.h"
13836 #include <$ac_hdr>
13837 EOF
13838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13839 { (eval echo configure:13840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13841 if test -z "$ac_err"; then
13842   rm -rf conftest*
13843   eval "ac_cv_header_$ac_safe=yes"
13844 else
13845   echo "$ac_err" >&5
13846   echo "configure: failed program was:" >&5
13847   cat conftest.$ac_ext >&5
13848   rm -rf conftest*
13849   eval "ac_cv_header_$ac_safe=no"
13850 fi
13851 rm -f conftest*
13852 fi
13853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13854   echo "$ac_t""yes" 1>&6
13855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13856   cat >> confdefs.h <<EOF
13857 #define $ac_tr_hdr 1
13858 EOF
13859  
13860 else
13861   echo "$ac_t""no" 1>&6
13862 fi
13863 done
13864
13865
13866         if test $ac_cv_header_readline_readline_h = yes ; then
13867                 save_LIBS="$LIBS"
13868                 LIBS="$TERMCAP_LIBS $LIBS"
13869                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13870 echo "configure:13871: checking for readline in -lreadline" >&5
13871 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13873   echo $ac_n "(cached) $ac_c" 1>&6
13874 else
13875   ac_save_LIBS="$LIBS"
13876 LIBS="-lreadline  $LIBS"
13877 cat > conftest.$ac_ext <<EOF
13878 #line 13879 "configure"
13879 #include "confdefs.h"
13880 /* Override any gcc2 internal prototype to avoid an error.  */
13881 /* We use char because int might match the return type of a gcc2
13882     builtin and then its argument prototype would still apply.  */
13883 char readline();
13884
13885 int main() {
13886 readline()
13887 ; return 0; }
13888 EOF
13889 if { (eval echo configure:13890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13890   rm -rf conftest*
13891   eval "ac_cv_lib_$ac_lib_var=yes"
13892 else
13893   echo "configure: failed program was:" >&5
13894   cat conftest.$ac_ext >&5
13895   rm -rf conftest*
13896   eval "ac_cv_lib_$ac_lib_var=no"
13897 fi
13898 rm -f conftest*
13899 LIBS="$ac_save_LIBS"
13900
13901 fi
13902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13903   echo "$ac_t""yes" 1>&6
13904   have_readline=yes
13905 else
13906   echo "$ac_t""no" 1>&6
13907 have_readline=no
13908 fi
13909
13910                 LIBS="$save_LIBS"
13911                         
13912                 if test $have_readline = yes ; then
13913                         ol_with_readline=found
13914                         ol_link_readline=yes
13915
13916                         READLINE_LIBS="-lreadline"
13917                 fi
13918         fi
13919 fi
13920
13921 if test $ol_link_readline = yes ; then
13922         cat >> confdefs.h <<\EOF
13923 #define HAVE_READLINE 1
13924 EOF
13925
13926 fi
13927
13928
13929 if test $ol_enable_crypt != no ; then
13930         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13931 echo "configure:13932: checking for crypt" >&5
13932 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13933   echo $ac_n "(cached) $ac_c" 1>&6
13934 else
13935   cat > conftest.$ac_ext <<EOF
13936 #line 13937 "configure"
13937 #include "confdefs.h"
13938 /* System header to define __stub macros and hopefully few prototypes,
13939     which can conflict with char crypt(); below.  */
13940 #include <assert.h>
13941 /* Override any gcc2 internal prototype to avoid an error.  */
13942 /* We use char because int might match the return type of a gcc2
13943     builtin and then its argument prototype would still apply.  */
13944 char crypt();
13945 char (*f)();
13946
13947 int main() {
13948
13949 /* The GNU C library defines this for functions which it implements
13950     to always fail with ENOSYS.  Some functions are actually named
13951     something starting with __ and the normal name is an alias.  */
13952 #if defined (__stub_crypt) || defined (__stub___crypt)
13953 choke me
13954 #else
13955 f = crypt;
13956 #endif
13957
13958 ; return 0; }
13959 EOF
13960 if { (eval echo configure:13961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13961   rm -rf conftest*
13962   eval "ac_cv_func_crypt=yes"
13963 else
13964   echo "configure: failed program was:" >&5
13965   cat conftest.$ac_ext >&5
13966   rm -rf conftest*
13967   eval "ac_cv_func_crypt=no"
13968 fi
13969 rm -f conftest*
13970 fi
13971
13972 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13973   echo "$ac_t""yes" 1>&6
13974   have_crypt=yes
13975 else
13976   echo "$ac_t""no" 1>&6
13977
13978                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13979 echo "configure:13980: checking for crypt in -lcrypt" >&5
13980 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13982   echo $ac_n "(cached) $ac_c" 1>&6
13983 else
13984   ac_save_LIBS="$LIBS"
13985 LIBS="-lcrypt  $LIBS"
13986 cat > conftest.$ac_ext <<EOF
13987 #line 13988 "configure"
13988 #include "confdefs.h"
13989 /* Override any gcc2 internal prototype to avoid an error.  */
13990 /* We use char because int might match the return type of a gcc2
13991     builtin and then its argument prototype would still apply.  */
13992 char crypt();
13993
13994 int main() {
13995 crypt()
13996 ; return 0; }
13997 EOF
13998 if { (eval echo configure:13999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13999   rm -rf conftest*
14000   eval "ac_cv_lib_$ac_lib_var=yes"
14001 else
14002   echo "configure: failed program was:" >&5
14003   cat conftest.$ac_ext >&5
14004   rm -rf conftest*
14005   eval "ac_cv_lib_$ac_lib_var=no"
14006 fi
14007 rm -f conftest*
14008 LIBS="$ac_save_LIBS"
14009
14010 fi
14011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14012   echo "$ac_t""yes" 1>&6
14013   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14014                         have_crypt=yes
14015 else
14016   echo "$ac_t""no" 1>&6
14017 have_crypt=no
14018 fi
14019
14020 fi
14021
14022
14023         if test $have_crypt = yes ; then
14024                 cat >> confdefs.h <<\EOF
14025 #define HAVE_CRYPT 1
14026 EOF
14027
14028         else
14029                 echo "configure: warning: could not find crypt" 1>&2
14030                 if test $ol_enable_crypt = yes ; then
14031                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14032                 fi
14033
14034                 echo "configure: warning: disabling crypt support" 1>&2
14035                 ol_enable_crypt=no
14036         fi
14037 fi
14038
14039 if test $ol_enable_proctitle != no ; then
14040         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14041 echo "configure:14042: checking for setproctitle" >&5
14042 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14043   echo $ac_n "(cached) $ac_c" 1>&6
14044 else
14045   cat > conftest.$ac_ext <<EOF
14046 #line 14047 "configure"
14047 #include "confdefs.h"
14048 /* System header to define __stub macros and hopefully few prototypes,
14049     which can conflict with char setproctitle(); below.  */
14050 #include <assert.h>
14051 /* Override any gcc2 internal prototype to avoid an error.  */
14052 /* We use char because int might match the return type of a gcc2
14053     builtin and then its argument prototype would still apply.  */
14054 char setproctitle();
14055 char (*f)();
14056
14057 int main() {
14058
14059 /* The GNU C library defines this for functions which it implements
14060     to always fail with ENOSYS.  Some functions are actually named
14061     something starting with __ and the normal name is an alias.  */
14062 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14063 choke me
14064 #else
14065 f = setproctitle;
14066 #endif
14067
14068 ; return 0; }
14069 EOF
14070 if { (eval echo configure:14071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14071   rm -rf conftest*
14072   eval "ac_cv_func_setproctitle=yes"
14073 else
14074   echo "configure: failed program was:" >&5
14075   cat conftest.$ac_ext >&5
14076   rm -rf conftest*
14077   eval "ac_cv_func_setproctitle=no"
14078 fi
14079 rm -f conftest*
14080 fi
14081
14082 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14083   echo "$ac_t""yes" 1>&6
14084   have_setproctitle=yes
14085 else
14086   echo "$ac_t""no" 1>&6
14087
14088                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14089 echo "configure:14090: checking for setproctitle in -lutil" >&5
14090 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14091 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14092   echo $ac_n "(cached) $ac_c" 1>&6
14093 else
14094   ac_save_LIBS="$LIBS"
14095 LIBS="-lutil  $LIBS"
14096 cat > conftest.$ac_ext <<EOF
14097 #line 14098 "configure"
14098 #include "confdefs.h"
14099 /* Override any gcc2 internal prototype to avoid an error.  */
14100 /* We use char because int might match the return type of a gcc2
14101     builtin and then its argument prototype would still apply.  */
14102 char setproctitle();
14103
14104 int main() {
14105 setproctitle()
14106 ; return 0; }
14107 EOF
14108 if { (eval echo configure:14109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14109   rm -rf conftest*
14110   eval "ac_cv_lib_$ac_lib_var=yes"
14111 else
14112   echo "configure: failed program was:" >&5
14113   cat conftest.$ac_ext >&5
14114   rm -rf conftest*
14115   eval "ac_cv_lib_$ac_lib_var=no"
14116 fi
14117 rm -f conftest*
14118 LIBS="$ac_save_LIBS"
14119
14120 fi
14121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14122   echo "$ac_t""yes" 1>&6
14123   have_setproctitle=yes
14124                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14125 else
14126   echo "$ac_t""no" 1>&6
14127 have_setproctitle=no
14128                         LIBOBJS="$LIBOBJS setproctitle.o"
14129                         LIBSRCS="$LIBSRCS setproctitle.c"
14130 fi
14131
14132 fi
14133
14134
14135         if test $have_setproctitle = yes ; then
14136                 cat >> confdefs.h <<\EOF
14137 #define HAVE_SETPROCTITLE 1
14138 EOF
14139
14140         fi
14141 fi
14142
14143 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14144 echo "configure:14145: checking for ANSI C header files" >&5
14145 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14146   echo $ac_n "(cached) $ac_c" 1>&6
14147 else
14148   cat > conftest.$ac_ext <<EOF
14149 #line 14150 "configure"
14150 #include "confdefs.h"
14151 #include <stdlib.h>
14152 #include <stdarg.h>
14153 #include <string.h>
14154 #include <float.h>
14155 EOF
14156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14157 { (eval echo configure:14158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14159 if test -z "$ac_err"; then
14160   rm -rf conftest*
14161   ac_cv_header_stdc=yes
14162 else
14163   echo "$ac_err" >&5
14164   echo "configure: failed program was:" >&5
14165   cat conftest.$ac_ext >&5
14166   rm -rf conftest*
14167   ac_cv_header_stdc=no
14168 fi
14169 rm -f conftest*
14170
14171 if test $ac_cv_header_stdc = yes; then
14172   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14173 cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 #include <string.h>
14177 EOF
14178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14179   egrep "memchr" >/dev/null 2>&1; then
14180   :
14181 else
14182   rm -rf conftest*
14183   ac_cv_header_stdc=no
14184 fi
14185 rm -f conftest*
14186
14187 fi
14188
14189 if test $ac_cv_header_stdc = yes; then
14190   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14191 cat > conftest.$ac_ext <<EOF
14192 #line 14193 "configure"
14193 #include "confdefs.h"
14194 #include <stdlib.h>
14195 EOF
14196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14197   egrep "free" >/dev/null 2>&1; then
14198   :
14199 else
14200   rm -rf conftest*
14201   ac_cv_header_stdc=no
14202 fi
14203 rm -f conftest*
14204
14205 fi
14206
14207 if test $ac_cv_header_stdc = yes; then
14208   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14209 if test "$cross_compiling" = yes; then
14210   :
14211 else
14212   cat > conftest.$ac_ext <<EOF
14213 #line 14214 "configure"
14214 #include "confdefs.h"
14215 #include <ctype.h>
14216 #if ((' ' & 0x0FF) == 0x020)
14217 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14218 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14219 #else
14220 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14221  || ('j' <= (c) && (c) <= 'r') \
14222  || ('s' <= (c) && (c) <= 'z'))
14223 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14224 #endif
14225 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14226 int main () { int i; for (i = 0; i < 256; i++)
14227 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14228 exit (0); }
14229
14230 EOF
14231 if { (eval echo configure:14232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14232 then
14233   :
14234 else
14235   echo "configure: failed program was:" >&5
14236   cat conftest.$ac_ext >&5
14237   rm -fr conftest*
14238   ac_cv_header_stdc=no
14239 fi
14240 rm -fr conftest*
14241 fi
14242
14243 fi
14244 fi
14245
14246 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14247 if test $ac_cv_header_stdc = yes; then
14248   cat >> confdefs.h <<\EOF
14249 #define STDC_HEADERS 1
14250 EOF
14251
14252 fi
14253
14254 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14255 echo "configure:14256: checking for mode_t" >&5
14256 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14257   echo $ac_n "(cached) $ac_c" 1>&6
14258 else
14259   cat > conftest.$ac_ext <<EOF
14260 #line 14261 "configure"
14261 #include "confdefs.h"
14262 #include <sys/types.h>
14263 #if STDC_HEADERS
14264 #include <stdlib.h>
14265 #include <stddef.h>
14266 #endif
14267
14268 EOF
14269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14270   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14271   rm -rf conftest*
14272   eval "ac_cv_type_mode_t=yes"
14273 else
14274   rm -rf conftest*
14275   eval "ac_cv_type_mode_t=no"
14276 fi
14277 rm -f conftest*
14278
14279 fi
14280 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14281   echo "$ac_t""yes" 1>&6
14282 else
14283   echo "$ac_t""no" 1>&6
14284   cat >> confdefs.h <<EOF
14285 #define mode_t int
14286 EOF
14287
14288 fi
14289
14290 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14291 echo "configure:14292: checking for off_t" >&5
14292 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14293   echo $ac_n "(cached) $ac_c" 1>&6
14294 else
14295   cat > conftest.$ac_ext <<EOF
14296 #line 14297 "configure"
14297 #include "confdefs.h"
14298 #include <sys/types.h>
14299 #if STDC_HEADERS
14300 #include <stdlib.h>
14301 #include <stddef.h>
14302 #endif
14303
14304 EOF
14305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14306   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14307   rm -rf conftest*
14308   eval "ac_cv_type_off_t=yes"
14309 else
14310   rm -rf conftest*
14311   eval "ac_cv_type_off_t=no"
14312 fi
14313 rm -f conftest*
14314
14315 fi
14316 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14317   echo "$ac_t""yes" 1>&6
14318 else
14319   echo "$ac_t""no" 1>&6
14320   cat >> confdefs.h <<EOF
14321 #define off_t long
14322 EOF
14323
14324 fi
14325
14326 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14327 echo "configure:14328: checking for pid_t" >&5
14328 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14329   echo $ac_n "(cached) $ac_c" 1>&6
14330 else
14331   cat > conftest.$ac_ext <<EOF
14332 #line 14333 "configure"
14333 #include "confdefs.h"
14334 #include <sys/types.h>
14335 #if STDC_HEADERS
14336 #include <stdlib.h>
14337 #include <stddef.h>
14338 #endif
14339
14340 EOF
14341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14342   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14343   rm -rf conftest*
14344   eval "ac_cv_type_pid_t=yes"
14345 else
14346   rm -rf conftest*
14347   eval "ac_cv_type_pid_t=no"
14348 fi
14349 rm -f conftest*
14350
14351 fi
14352 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14353   echo "$ac_t""yes" 1>&6
14354 else
14355   echo "$ac_t""no" 1>&6
14356   cat >> confdefs.h <<EOF
14357 #define pid_t int
14358 EOF
14359
14360 fi
14361
14362 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14363 echo "configure:14364: checking for ptrdiff_t" >&5
14364 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14365   echo $ac_n "(cached) $ac_c" 1>&6
14366 else
14367   cat > conftest.$ac_ext <<EOF
14368 #line 14369 "configure"
14369 #include "confdefs.h"
14370 #include <stddef.h>
14371 int main() {
14372 ptrdiff_t p
14373 ; return 0; }
14374 EOF
14375 if { (eval echo configure:14376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14376   rm -rf conftest*
14377   am_cv_type_ptrdiff_t=yes
14378 else
14379   echo "configure: failed program was:" >&5
14380   cat conftest.$ac_ext >&5
14381   rm -rf conftest*
14382   am_cv_type_ptrdiff_t=no
14383 fi
14384 rm -f conftest*
14385 fi
14386
14387 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14388    if test $am_cv_type_ptrdiff_t = yes; then
14389      cat >> confdefs.h <<\EOF
14390 #define HAVE_PTRDIFF_T 1
14391 EOF
14392
14393    fi
14394
14395 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14396 echo "configure:14397: checking return type of signal handlers" >&5
14397 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14398   echo $ac_n "(cached) $ac_c" 1>&6
14399 else
14400   cat > conftest.$ac_ext <<EOF
14401 #line 14402 "configure"
14402 #include "confdefs.h"
14403 #include <sys/types.h>
14404 #include <signal.h>
14405 #ifdef signal
14406 #undef signal
14407 #endif
14408 #ifdef __cplusplus
14409 extern "C" void (*signal (int, void (*)(int)))(int);
14410 #else
14411 void (*signal ()) ();
14412 #endif
14413
14414 int main() {
14415 int i;
14416 ; return 0; }
14417 EOF
14418 if { (eval echo configure:14419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14419   rm -rf conftest*
14420   ac_cv_type_signal=void
14421 else
14422   echo "configure: failed program was:" >&5
14423   cat conftest.$ac_ext >&5
14424   rm -rf conftest*
14425   ac_cv_type_signal=int
14426 fi
14427 rm -f conftest*
14428 fi
14429
14430 echo "$ac_t""$ac_cv_type_signal" 1>&6
14431 cat >> confdefs.h <<EOF
14432 #define RETSIGTYPE $ac_cv_type_signal
14433 EOF
14434
14435
14436 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14437 echo "configure:14438: checking for size_t" >&5
14438 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14439   echo $ac_n "(cached) $ac_c" 1>&6
14440 else
14441   cat > conftest.$ac_ext <<EOF
14442 #line 14443 "configure"
14443 #include "confdefs.h"
14444 #include <sys/types.h>
14445 #if STDC_HEADERS
14446 #include <stdlib.h>
14447 #include <stddef.h>
14448 #endif
14449
14450 EOF
14451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14452   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14453   rm -rf conftest*
14454   eval "ac_cv_type_size_t=yes"
14455 else
14456   rm -rf conftest*
14457   eval "ac_cv_type_size_t=no"
14458 fi
14459 rm -f conftest*
14460
14461 fi
14462 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14463   echo "$ac_t""yes" 1>&6
14464 else
14465   echo "$ac_t""no" 1>&6
14466   cat >> confdefs.h <<EOF
14467 #define size_t unsigned
14468 EOF
14469
14470 fi
14471
14472
14473 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14474 echo "configure:14475: checking for ssize_t" >&5
14475 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14476   echo $ac_n "(cached) $ac_c" 1>&6
14477 else
14478   cat > conftest.$ac_ext <<EOF
14479 #line 14480 "configure"
14480 #include "confdefs.h"
14481 #include <sys/types.h>
14482 #if STDC_HEADERS
14483 #include <stdlib.h>
14484 #include <stddef.h>
14485 #endif
14486
14487 EOF
14488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14489   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14490   rm -rf conftest*
14491   eval "ac_cv_type_ssize_t=yes"
14492 else
14493   rm -rf conftest*
14494   eval "ac_cv_type_ssize_t=no"
14495 fi
14496 rm -f conftest*
14497
14498 fi
14499 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14500   echo "$ac_t""yes" 1>&6
14501 else
14502   echo "$ac_t""no" 1>&6
14503   cat >> confdefs.h <<EOF
14504 #define ssize_t signed int
14505 EOF
14506
14507 fi
14508
14509 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14510 echo "configure:14511: checking for caddr_t" >&5
14511 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14512   echo $ac_n "(cached) $ac_c" 1>&6
14513 else
14514   cat > conftest.$ac_ext <<EOF
14515 #line 14516 "configure"
14516 #include "confdefs.h"
14517 #include <sys/types.h>
14518 #if STDC_HEADERS
14519 #include <stdlib.h>
14520 #include <stddef.h>
14521 #endif
14522
14523 EOF
14524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14525   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14526   rm -rf conftest*
14527   eval "ac_cv_type_caddr_t=yes"
14528 else
14529   rm -rf conftest*
14530   eval "ac_cv_type_caddr_t=no"
14531 fi
14532 rm -f conftest*
14533
14534 fi
14535 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14536   echo "$ac_t""yes" 1>&6
14537 else
14538   echo "$ac_t""no" 1>&6
14539   cat >> confdefs.h <<EOF
14540 #define caddr_t char *
14541 EOF
14542
14543 fi
14544
14545
14546 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14547 echo "configure:14548: checking for socklen_t" >&5
14548 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14549   echo $ac_n "(cached) $ac_c" 1>&6
14550 else
14551   cat > conftest.$ac_ext <<EOF
14552 #line 14553 "configure"
14553 #include "confdefs.h"
14554
14555 #ifdef HAVE_SYS_TYPES_H
14556 #include <sys/types.h>
14557 #endif
14558 #ifdef HAVE_SYS_SOCKET_H
14559 #include <sys/socket.h>
14560 #endif
14561
14562 int main() {
14563 socklen_t len;
14564 ; return 0; }
14565 EOF
14566 if { (eval echo configure:14567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14567   rm -rf conftest*
14568   ol_cv_type_socklen_t=yes
14569 else
14570   echo "configure: failed program was:" >&5
14571   cat conftest.$ac_ext >&5
14572   rm -rf conftest*
14573   ol_cv_type_socklen_t=no
14574 fi
14575 rm -f conftest*
14576 fi
14577
14578 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14579   if test $ol_cv_type_socklen_t = no; then
14580     cat >> confdefs.h <<\EOF
14581 #define socklen_t int
14582 EOF
14583
14584   fi
14585  
14586 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14587 echo "configure:14588: checking for member st_blksize in aggregate type struct stat" >&5
14588 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14589   echo $ac_n "(cached) $ac_c" 1>&6
14590 else
14591   cat > conftest.$ac_ext <<EOF
14592 #line 14593 "configure"
14593 #include "confdefs.h"
14594 #include <sys/types.h>
14595 #include <sys/stat.h>
14596 int main() {
14597 struct stat foo; foo.st_blksize;
14598 ; return 0; }
14599 EOF
14600 if { (eval echo configure:14601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14601   rm -rf conftest*
14602   ac_cv_c_struct_member_st_blksize=yes
14603 else
14604   echo "configure: failed program was:" >&5
14605   cat conftest.$ac_ext >&5
14606   rm -rf conftest*
14607   ac_cv_c_struct_member_st_blksize=no
14608 fi
14609 rm -f conftest*
14610 fi
14611
14612 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14613 st_blksize="$ac_cv_c_struct_member_st_blksize"
14614 if test $ac_cv_c_struct_member_st_blksize = yes; then
14615   cat >> confdefs.h <<\EOF
14616 #define HAVE_ST_BLKSIZE 1
14617 EOF
14618
14619 fi
14620
14621 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14622 echo "configure:14623: checking whether time.h and sys/time.h may both be included" >&5
14623 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14624   echo $ac_n "(cached) $ac_c" 1>&6
14625 else
14626   cat > conftest.$ac_ext <<EOF
14627 #line 14628 "configure"
14628 #include "confdefs.h"
14629 #include <sys/types.h>
14630 #include <sys/time.h>
14631 #include <time.h>
14632 int main() {
14633 struct tm *tp;
14634 ; return 0; }
14635 EOF
14636 if { (eval echo configure:14637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14637   rm -rf conftest*
14638   ac_cv_header_time=yes
14639 else
14640   echo "configure: failed program was:" >&5
14641   cat conftest.$ac_ext >&5
14642   rm -rf conftest*
14643   ac_cv_header_time=no
14644 fi
14645 rm -f conftest*
14646 fi
14647
14648 echo "$ac_t""$ac_cv_header_time" 1>&6
14649 if test $ac_cv_header_time = yes; then
14650   cat >> confdefs.h <<\EOF
14651 #define TIME_WITH_SYS_TIME 1
14652 EOF
14653
14654 fi
14655
14656 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14657 echo "configure:14658: checking whether struct tm is in sys/time.h or time.h" >&5
14658 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14659   echo $ac_n "(cached) $ac_c" 1>&6
14660 else
14661   cat > conftest.$ac_ext <<EOF
14662 #line 14663 "configure"
14663 #include "confdefs.h"
14664 #include <sys/types.h>
14665 #include <time.h>
14666 int main() {
14667 struct tm *tp; tp->tm_sec;
14668 ; return 0; }
14669 EOF
14670 if { (eval echo configure:14671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14671   rm -rf conftest*
14672   ac_cv_struct_tm=time.h
14673 else
14674   echo "configure: failed program was:" >&5
14675   cat conftest.$ac_ext >&5
14676   rm -rf conftest*
14677   ac_cv_struct_tm=sys/time.h
14678 fi
14679 rm -f conftest*
14680 fi
14681
14682 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14683 if test $ac_cv_struct_tm = sys/time.h; then
14684   cat >> confdefs.h <<\EOF
14685 #define TM_IN_SYS_TIME 1
14686 EOF
14687
14688 fi
14689
14690 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14691 echo "configure:14692: checking for uid_t in sys/types.h" >&5
14692 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14693   echo $ac_n "(cached) $ac_c" 1>&6
14694 else
14695   cat > conftest.$ac_ext <<EOF
14696 #line 14697 "configure"
14697 #include "confdefs.h"
14698 #include <sys/types.h>
14699 EOF
14700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14701   egrep "uid_t" >/dev/null 2>&1; then
14702   rm -rf conftest*
14703   ac_cv_type_uid_t=yes
14704 else
14705   rm -rf conftest*
14706   ac_cv_type_uid_t=no
14707 fi
14708 rm -f conftest*
14709
14710 fi
14711
14712 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14713 if test $ac_cv_type_uid_t = no; then
14714   cat >> confdefs.h <<\EOF
14715 #define uid_t int
14716 EOF
14717
14718   cat >> confdefs.h <<\EOF
14719 #define gid_t int
14720 EOF
14721
14722 fi
14723
14724 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14725 echo "configure:14726: checking for sig_atomic_t" >&5
14726 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14727   echo $ac_n "(cached) $ac_c" 1>&6
14728 else
14729   cat > conftest.$ac_ext <<EOF
14730 #line 14731 "configure"
14731 #include "confdefs.h"
14732 #include <signal.h>
14733 int main() {
14734 sig_atomic_t atomic;
14735 ; return 0; }
14736 EOF
14737 if { (eval echo configure:14738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14738   rm -rf conftest*
14739   ol_cv_type_sig_atomic_t=yes
14740 else
14741   echo "configure: failed program was:" >&5
14742   cat conftest.$ac_ext >&5
14743   rm -rf conftest*
14744   ol_cv_type_sig_atomic_t=no
14745 fi
14746 rm -f conftest*
14747 fi
14748
14749 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14750   if test $ol_cv_type_sig_atomic_t = no; then
14751     cat >> confdefs.h <<\EOF
14752 #define sig_atomic_t int
14753 EOF
14754
14755   fi
14756  
14757
14758
14759 # test for pw_gecos in struct passwd
14760 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14761 echo "configure:14762: checking struct passwd for pw_gecos" >&5
14762 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14763   echo $ac_n "(cached) $ac_c" 1>&6
14764 else
14765   
14766         cat > conftest.$ac_ext <<EOF
14767 #line 14768 "configure"
14768 #include "confdefs.h"
14769 #include <pwd.h>
14770 int main() {
14771
14772         struct passwd pwd;
14773         pwd.pw_gecos = pwd.pw_name;
14774
14775 ; return 0; }
14776 EOF
14777 if { (eval echo configure:14778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14778   rm -rf conftest*
14779   ol_cv_struct_passwd_pw_gecos=yes
14780 else
14781   echo "configure: failed program was:" >&5
14782   cat conftest.$ac_ext >&5
14783   rm -rf conftest*
14784   ol_cv_struct_passwd_pw_gecos=no
14785 fi
14786 rm -f conftest*
14787 fi
14788
14789 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14790 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14791         cat >> confdefs.h <<\EOF
14792 #define HAVE_PW_GECOS 1
14793 EOF
14794
14795 fi
14796
14797 # test for pw_passwd in struct passwd
14798 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14799 echo "configure:14800: checking struct passwd for pw_passwd" >&5
14800 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14801   echo $ac_n "(cached) $ac_c" 1>&6
14802 else
14803   
14804         cat > conftest.$ac_ext <<EOF
14805 #line 14806 "configure"
14806 #include "confdefs.h"
14807 #include <pwd.h>
14808 int main() {
14809
14810         struct passwd pwd;
14811         pwd.pw_passwd = pwd.pw_name;
14812
14813 ; return 0; }
14814 EOF
14815 if { (eval echo configure:14816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14816   rm -rf conftest*
14817   ol_cv_struct_passwd_pw_passwd=yes
14818 else
14819   echo "configure: failed program was:" >&5
14820   cat conftest.$ac_ext >&5
14821   rm -rf conftest*
14822   ol_cv_struct_passwd_pw_passwd=no
14823 fi
14824 rm -f conftest*
14825 fi
14826
14827 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14828 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14829         cat >> confdefs.h <<\EOF
14830 #define HAVE_PW_PASSWD 1
14831 EOF
14832
14833 fi
14834
14835
14836 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14837 echo "configure:14838: checking if toupper() requires islower()" >&5
14838 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14839   echo $ac_n "(cached) $ac_c" 1>&6
14840 else
14841   
14842         if test "$cross_compiling" = yes; then
14843   ol_cv_c_upper_lower=safe
14844 else
14845   cat > conftest.$ac_ext <<EOF
14846 #line 14847 "configure"
14847 #include "confdefs.h"
14848
14849 #include <ctype.h>
14850 main()
14851 {
14852         if ('C' == toupper('C'))
14853                 exit(0);
14854         else
14855                 exit(1);
14856 }
14857 EOF
14858 if { (eval echo configure:14859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14859 then
14860   ol_cv_c_upper_lower=no
14861 else
14862   echo "configure: failed program was:" >&5
14863   cat conftest.$ac_ext >&5
14864   rm -fr conftest*
14865   ol_cv_c_upper_lower=yes
14866 fi
14867 rm -fr conftest*
14868 fi
14869
14870 fi
14871
14872 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14873 if test $ol_cv_c_upper_lower != no ; then
14874         cat >> confdefs.h <<\EOF
14875 #define C_UPPER_LOWER 1
14876 EOF
14877
14878 fi
14879
14880 echo $ac_n "checking for working const""... $ac_c" 1>&6
14881 echo "configure:14882: checking for working const" >&5
14882 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14883   echo $ac_n "(cached) $ac_c" 1>&6
14884 else
14885   cat > conftest.$ac_ext <<EOF
14886 #line 14887 "configure"
14887 #include "confdefs.h"
14888
14889 int main() {
14890
14891 /* Ultrix mips cc rejects this.  */
14892 typedef int charset[2]; const charset x;
14893 /* SunOS 4.1.1 cc rejects this.  */
14894 char const *const *ccp;
14895 char **p;
14896 /* NEC SVR4.0.2 mips cc rejects this.  */
14897 struct point {int x, y;};
14898 static struct point const zero = {0,0};
14899 /* AIX XL C 1.02.0.0 rejects this.
14900    It does not let you subtract one const X* pointer from another in an arm
14901    of an if-expression whose if-part is not a constant expression */
14902 const char *g = "string";
14903 ccp = &g + (g ? g-g : 0);
14904 /* HPUX 7.0 cc rejects these. */
14905 ++ccp;
14906 p = (char**) ccp;
14907 ccp = (char const *const *) p;
14908 { /* SCO 3.2v4 cc rejects this.  */
14909   char *t;
14910   char const *s = 0 ? (char *) 0 : (char const *) 0;
14911
14912   *t++ = 0;
14913 }
14914 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14915   int x[] = {25, 17};
14916   const int *foo = &x[0];
14917   ++foo;
14918 }
14919 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14920   typedef const int *iptr;
14921   iptr p = 0;
14922   ++p;
14923 }
14924 { /* AIX XL C 1.02.0.0 rejects this saying
14925      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14926   struct s { int j; const int *ap[3]; };
14927   struct s *b; b->j = 5;
14928 }
14929 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14930   const int foo = 10;
14931 }
14932
14933 ; return 0; }
14934 EOF
14935 if { (eval echo configure:14936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14936   rm -rf conftest*
14937   ac_cv_c_const=yes
14938 else
14939   echo "configure: failed program was:" >&5
14940   cat conftest.$ac_ext >&5
14941   rm -rf conftest*
14942   ac_cv_c_const=no
14943 fi
14944 rm -f conftest*
14945 fi
14946
14947 echo "$ac_t""$ac_cv_c_const" 1>&6
14948 if test $ac_cv_c_const = no; then
14949   cat >> confdefs.h <<\EOF
14950 #define const 
14951 EOF
14952
14953 fi
14954
14955 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14956 echo "configure:14957: checking if compiler understands volatile" >&5
14957 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14958   echo $ac_n "(cached) $ac_c" 1>&6
14959 else
14960   cat > conftest.$ac_ext <<EOF
14961 #line 14962 "configure"
14962 #include "confdefs.h"
14963 int x, y, z;
14964 int main() {
14965 volatile int a; int * volatile b = x ? &y : &z;
14966       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14967       *b = 0;
14968 ; return 0; }
14969 EOF
14970 if { (eval echo configure:14971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14971   rm -rf conftest*
14972   ol_cv_c_volatile=yes
14973 else
14974   echo "configure: failed program was:" >&5
14975   cat conftest.$ac_ext >&5
14976   rm -rf conftest*
14977   ol_cv_c_volatile=no
14978 fi
14979 rm -f conftest*
14980 fi
14981
14982 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14983   if test $ol_cv_c_volatile = yes; then
14984     : 
14985   else
14986     cat >> confdefs.h <<\EOF
14987 #define volatile 
14988 EOF
14989
14990   fi
14991  
14992
14993 if test $cross_compiling = yes ; then
14994         cat >> confdefs.h <<\EOF
14995 #define CROSS_COMPILING 1
14996 EOF
14997
14998 else
14999         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15000 echo "configure:15001: checking whether byte ordering is bigendian" >&5
15001 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15002   echo $ac_n "(cached) $ac_c" 1>&6
15003 else
15004   ac_cv_c_bigendian=unknown
15005 # See if sys/param.h defines the BYTE_ORDER macro.
15006 cat > conftest.$ac_ext <<EOF
15007 #line 15008 "configure"
15008 #include "confdefs.h"
15009 #include <sys/types.h>
15010 #include <sys/param.h>
15011 int main() {
15012
15013 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15014  bogus endian macros
15015 #endif
15016 ; return 0; }
15017 EOF
15018 if { (eval echo configure:15019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15019   rm -rf conftest*
15020   # It does; now see whether it defined to BIG_ENDIAN or not.
15021 cat > conftest.$ac_ext <<EOF
15022 #line 15023 "configure"
15023 #include "confdefs.h"
15024 #include <sys/types.h>
15025 #include <sys/param.h>
15026 int main() {
15027
15028 #if BYTE_ORDER != BIG_ENDIAN
15029  not big endian
15030 #endif
15031 ; return 0; }
15032 EOF
15033 if { (eval echo configure:15034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15034   rm -rf conftest*
15035   ac_cv_c_bigendian=yes
15036 else
15037   echo "configure: failed program was:" >&5
15038   cat conftest.$ac_ext >&5
15039   rm -rf conftest*
15040   ac_cv_c_bigendian=no
15041 fi
15042 rm -f conftest*
15043 else
15044   echo "configure: failed program was:" >&5
15045   cat conftest.$ac_ext >&5
15046 fi
15047 rm -f conftest*
15048 if test $ac_cv_c_bigendian = unknown; then
15049 if test "$cross_compiling" = yes; then
15050     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15051 else
15052   cat > conftest.$ac_ext <<EOF
15053 #line 15054 "configure"
15054 #include "confdefs.h"
15055 main () {
15056   /* Are we little or big endian?  From Harbison&Steele.  */
15057   union
15058   {
15059     long l;
15060     char c[sizeof (long)];
15061   } u;
15062   u.l = 1;
15063   exit (u.c[sizeof (long) - 1] == 1);
15064 }
15065 EOF
15066 if { (eval echo configure:15067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15067 then
15068   ac_cv_c_bigendian=no
15069 else
15070   echo "configure: failed program was:" >&5
15071   cat conftest.$ac_ext >&5
15072   rm -fr conftest*
15073   ac_cv_c_bigendian=yes
15074 fi
15075 rm -fr conftest*
15076 fi
15077
15078 fi
15079 fi
15080
15081 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15082 if test $ac_cv_c_bigendian = yes; then
15083   cat >> confdefs.h <<\EOF
15084 #define WORDS_BIGENDIAN 1
15085 EOF
15086
15087 fi
15088
15089 fi
15090
15091 echo $ac_n "checking size of short""... $ac_c" 1>&6
15092 echo "configure:15093: checking size of short" >&5 
15093 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15094   echo $ac_n "(cached) $ac_c" 1>&6
15095 else
15096   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15097   cat > conftest.$ac_ext <<EOF
15098 #line 15099 "configure"
15099 #include "confdefs.h"
15100 #include "confdefs.h" 
15101 #include <sys/types.h> 
15102  
15103
15104 int main() {
15105 switch (0) case 0: case (sizeof (short) == $ac_size):;
15106 ; return 0; }
15107 EOF
15108 if { (eval echo configure:15109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15109   rm -rf conftest*
15110   ac_cv_sizeof_short=$ac_size
15111 else
15112   echo "configure: failed program was:" >&5
15113   cat conftest.$ac_ext >&5
15114 fi
15115 rm -f conftest* 
15116   if test x$ac_cv_sizeof_short != x ; then break; fi 
15117 done 
15118
15119 fi
15120  
15121 if test x$ac_cv_sizeof_short = x ; then 
15122   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15123 fi 
15124 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15125 cat >> confdefs.h <<EOF
15126 #define SIZEOF_SHORT $ac_cv_sizeof_short
15127 EOF
15128  
15129  
15130 echo $ac_n "checking size of int""... $ac_c" 1>&6
15131 echo "configure:15132: checking size of int" >&5 
15132 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15133   echo $ac_n "(cached) $ac_c" 1>&6
15134 else
15135   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15136   cat > conftest.$ac_ext <<EOF
15137 #line 15138 "configure"
15138 #include "confdefs.h"
15139 #include "confdefs.h" 
15140 #include <sys/types.h> 
15141  
15142
15143 int main() {
15144 switch (0) case 0: case (sizeof (int) == $ac_size):;
15145 ; return 0; }
15146 EOF
15147 if { (eval echo configure:15148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15148   rm -rf conftest*
15149   ac_cv_sizeof_int=$ac_size
15150 else
15151   echo "configure: failed program was:" >&5
15152   cat conftest.$ac_ext >&5
15153 fi
15154 rm -f conftest* 
15155   if test x$ac_cv_sizeof_int != x ; then break; fi 
15156 done 
15157
15158 fi
15159  
15160 if test x$ac_cv_sizeof_int = x ; then 
15161   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15162 fi 
15163 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15164 cat >> confdefs.h <<EOF
15165 #define SIZEOF_INT $ac_cv_sizeof_int
15166 EOF
15167  
15168  
15169 echo $ac_n "checking size of long""... $ac_c" 1>&6
15170 echo "configure:15171: checking size of long" >&5 
15171 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15172   echo $ac_n "(cached) $ac_c" 1>&6
15173 else
15174   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15175   cat > conftest.$ac_ext <<EOF
15176 #line 15177 "configure"
15177 #include "confdefs.h"
15178 #include "confdefs.h" 
15179 #include <sys/types.h> 
15180  
15181
15182 int main() {
15183 switch (0) case 0: case (sizeof (long) == $ac_size):;
15184 ; return 0; }
15185 EOF
15186 if { (eval echo configure:15187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15187   rm -rf conftest*
15188   ac_cv_sizeof_long=$ac_size
15189 else
15190   echo "configure: failed program was:" >&5
15191   cat conftest.$ac_ext >&5
15192 fi
15193 rm -f conftest* 
15194   if test x$ac_cv_sizeof_long != x ; then break; fi 
15195 done 
15196
15197 fi
15198  
15199 if test x$ac_cv_sizeof_long = x ; then 
15200   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15201 fi 
15202 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15203 cat >> confdefs.h <<EOF
15204 #define SIZEOF_LONG $ac_cv_sizeof_long
15205 EOF
15206  
15207
15208
15209 if test "$ac_cv_sizeof_int" -lt 4 ; then
15210         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15211
15212         cat >> confdefs.h <<\EOF
15213 #define LBER_INT_T long
15214 EOF
15215
15216 else
15217         cat >> confdefs.h <<\EOF
15218 #define LBER_INT_T int
15219 EOF
15220
15221 fi
15222
15223 cat >> confdefs.h <<\EOF
15224 #define LBER_LEN_T long
15225 EOF
15226
15227 cat >> confdefs.h <<\EOF
15228 #define LBER_SOCKET_T int
15229 EOF
15230
15231 cat >> confdefs.h <<\EOF
15232 #define LBER_TAG_T long
15233 EOF
15234
15235
15236 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15237 echo "configure:15238: checking for 8-bit clean memcmp" >&5
15238 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15239   echo $ac_n "(cached) $ac_c" 1>&6
15240 else
15241   if test "$cross_compiling" = yes; then
15242   ac_cv_func_memcmp_clean=no
15243 else
15244   cat > conftest.$ac_ext <<EOF
15245 #line 15246 "configure"
15246 #include "confdefs.h"
15247
15248 main()
15249 {
15250   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15251   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15252 }
15253
15254 EOF
15255 if { (eval echo configure:15256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15256 then
15257   ac_cv_func_memcmp_clean=yes
15258 else
15259   echo "configure: failed program was:" >&5
15260   cat conftest.$ac_ext >&5
15261   rm -fr conftest*
15262   ac_cv_func_memcmp_clean=no
15263 fi
15264 rm -fr conftest*
15265 fi
15266
15267 fi
15268
15269 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15270 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15271
15272 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15273 echo "configure:15274: checking for strftime" >&5
15274 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15275   echo $ac_n "(cached) $ac_c" 1>&6
15276 else
15277   cat > conftest.$ac_ext <<EOF
15278 #line 15279 "configure"
15279 #include "confdefs.h"
15280 /* System header to define __stub macros and hopefully few prototypes,
15281     which can conflict with char strftime(); below.  */
15282 #include <assert.h>
15283 /* Override any gcc2 internal prototype to avoid an error.  */
15284 /* We use char because int might match the return type of a gcc2
15285     builtin and then its argument prototype would still apply.  */
15286 char strftime();
15287 char (*f)();
15288
15289 int main() {
15290
15291 /* The GNU C library defines this for functions which it implements
15292     to always fail with ENOSYS.  Some functions are actually named
15293     something starting with __ and the normal name is an alias.  */
15294 #if defined (__stub_strftime) || defined (__stub___strftime)
15295 choke me
15296 #else
15297 f = strftime;
15298 #endif
15299
15300 ; return 0; }
15301 EOF
15302 if { (eval echo configure:15303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15303   rm -rf conftest*
15304   eval "ac_cv_func_strftime=yes"
15305 else
15306   echo "configure: failed program was:" >&5
15307   cat conftest.$ac_ext >&5
15308   rm -rf conftest*
15309   eval "ac_cv_func_strftime=no"
15310 fi
15311 rm -f conftest*
15312 fi
15313
15314 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15315   echo "$ac_t""yes" 1>&6
15316   cat >> confdefs.h <<\EOF
15317 #define HAVE_STRFTIME 1
15318 EOF
15319
15320 else
15321   echo "$ac_t""no" 1>&6
15322 # strftime is in -lintl on SCO UNIX.
15323 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15324 echo "configure:15325: checking for strftime in -lintl" >&5
15325 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15326 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15327   echo $ac_n "(cached) $ac_c" 1>&6
15328 else
15329   ac_save_LIBS="$LIBS"
15330 LIBS="-lintl  $LIBS"
15331 cat > conftest.$ac_ext <<EOF
15332 #line 15333 "configure"
15333 #include "confdefs.h"
15334 /* Override any gcc2 internal prototype to avoid an error.  */
15335 /* We use char because int might match the return type of a gcc2
15336     builtin and then its argument prototype would still apply.  */
15337 char strftime();
15338
15339 int main() {
15340 strftime()
15341 ; return 0; }
15342 EOF
15343 if { (eval echo configure:15344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15344   rm -rf conftest*
15345   eval "ac_cv_lib_$ac_lib_var=yes"
15346 else
15347   echo "configure: failed program was:" >&5
15348   cat conftest.$ac_ext >&5
15349   rm -rf conftest*
15350   eval "ac_cv_lib_$ac_lib_var=no"
15351 fi
15352 rm -f conftest*
15353 LIBS="$ac_save_LIBS"
15354
15355 fi
15356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15357   echo "$ac_t""yes" 1>&6
15358   cat >> confdefs.h <<\EOF
15359 #define HAVE_STRFTIME 1
15360 EOF
15361
15362 LIBS="-lintl $LIBS"
15363 else
15364   echo "$ac_t""no" 1>&6
15365 fi
15366
15367 fi
15368
15369
15370 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15371 echo "configure:15372: checking for inet_aton()" >&5
15372 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15373   echo $ac_n "(cached) $ac_c" 1>&6
15374 else
15375   cat > conftest.$ac_ext <<EOF
15376 #line 15377 "configure"
15377 #include "confdefs.h"
15378
15379 #ifdef HAVE_SYS_TYPES_H
15380 #       include <sys/types.h>
15381 #endif
15382 #ifdef HAVE_SYS_SOCKET_H
15383 #       include <sys/socket.h>
15384 #       ifdef HAVE_SYS_SELECT_H
15385 #               include <sys/select.h>
15386 #       endif
15387 #       include <netinet/in.h>
15388 #       ifdef HAVE_ARPA_INET_H
15389 #               include <arpa/inet.h>
15390 #       endif
15391 #endif
15392
15393 int main() {
15394 struct in_addr in;
15395 int rc = inet_aton( "255.255.255.255", &in );
15396 ; return 0; }
15397 EOF
15398 if { (eval echo configure:15399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15399   rm -rf conftest*
15400   ol_cv_func_inet_aton=yes
15401 else
15402   echo "configure: failed program was:" >&5
15403   cat conftest.$ac_ext >&5
15404   rm -rf conftest*
15405   ol_cv_func_inet_aton=no
15406 fi
15407 rm -f conftest*
15408 fi
15409
15410 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15411   if test $ol_cv_func_inet_aton != no; then
15412     cat >> confdefs.h <<\EOF
15413 #define HAVE_INET_ATON 1
15414 EOF
15415
15416   fi
15417  
15418
15419 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15420 echo "configure:15421: checking for _spawnlp" >&5
15421 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15422   echo $ac_n "(cached) $ac_c" 1>&6
15423 else
15424   cat > conftest.$ac_ext <<EOF
15425 #line 15426 "configure"
15426 #include "confdefs.h"
15427 /* System header to define __stub macros and hopefully few prototypes,
15428     which can conflict with char _spawnlp(); below.  */
15429 #include <assert.h>
15430 /* Override any gcc2 internal prototype to avoid an error.  */
15431 /* We use char because int might match the return type of a gcc2
15432     builtin and then its argument prototype would still apply.  */
15433 char _spawnlp();
15434 char (*f)();
15435
15436 int main() {
15437
15438 /* The GNU C library defines this for functions which it implements
15439     to always fail with ENOSYS.  Some functions are actually named
15440     something starting with __ and the normal name is an alias.  */
15441 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15442 choke me
15443 #else
15444 f = _spawnlp;
15445 #endif
15446
15447 ; return 0; }
15448 EOF
15449 if { (eval echo configure:15450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15450   rm -rf conftest*
15451   eval "ac_cv_func__spawnlp=yes"
15452 else
15453   echo "configure: failed program was:" >&5
15454   cat conftest.$ac_ext >&5
15455   rm -rf conftest*
15456   eval "ac_cv_func__spawnlp=no"
15457 fi
15458 rm -f conftest*
15459 fi
15460
15461 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15462   echo "$ac_t""yes" 1>&6
15463   cat >> confdefs.h <<\EOF
15464 #define HAVE_SPAWNLP 1
15465 EOF
15466
15467 else
15468   echo "$ac_t""no" 1>&6
15469 fi
15470
15471
15472 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15473 echo "configure:15474: checking for _snprintf" >&5
15474 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15475   echo $ac_n "(cached) $ac_c" 1>&6
15476 else
15477   cat > conftest.$ac_ext <<EOF
15478 #line 15479 "configure"
15479 #include "confdefs.h"
15480 /* System header to define __stub macros and hopefully few prototypes,
15481     which can conflict with char _snprintf(); below.  */
15482 #include <assert.h>
15483 /* Override any gcc2 internal prototype to avoid an error.  */
15484 /* We use char because int might match the return type of a gcc2
15485     builtin and then its argument prototype would still apply.  */
15486 char _snprintf();
15487 char (*f)();
15488
15489 int main() {
15490
15491 /* The GNU C library defines this for functions which it implements
15492     to always fail with ENOSYS.  Some functions are actually named
15493     something starting with __ and the normal name is an alias.  */
15494 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15495 choke me
15496 #else
15497 f = _snprintf;
15498 #endif
15499
15500 ; return 0; }
15501 EOF
15502 if { (eval echo configure:15503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15503   rm -rf conftest*
15504   eval "ac_cv_func__snprintf=yes"
15505 else
15506   echo "configure: failed program was:" >&5
15507   cat conftest.$ac_ext >&5
15508   rm -rf conftest*
15509   eval "ac_cv_func__snprintf=no"
15510 fi
15511 rm -f conftest*
15512 fi
15513
15514 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15515   echo "$ac_t""yes" 1>&6
15516   ac_cv_func_snprintf=yes
15517         cat >> confdefs.h <<\EOF
15518 #define snprintf _snprintf
15519 EOF
15520
15521
15522 else
15523   echo "$ac_t""no" 1>&6
15524 fi
15525
15526
15527 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15528 echo "configure:15529: checking for _vsnprintf" >&5
15529 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15530   echo $ac_n "(cached) $ac_c" 1>&6
15531 else
15532   cat > conftest.$ac_ext <<EOF
15533 #line 15534 "configure"
15534 #include "confdefs.h"
15535 /* System header to define __stub macros and hopefully few prototypes,
15536     which can conflict with char _vsnprintf(); below.  */
15537 #include <assert.h>
15538 /* Override any gcc2 internal prototype to avoid an error.  */
15539 /* We use char because int might match the return type of a gcc2
15540     builtin and then its argument prototype would still apply.  */
15541 char _vsnprintf();
15542 char (*f)();
15543
15544 int main() {
15545
15546 /* The GNU C library defines this for functions which it implements
15547     to always fail with ENOSYS.  Some functions are actually named
15548     something starting with __ and the normal name is an alias.  */
15549 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15550 choke me
15551 #else
15552 f = _vsnprintf;
15553 #endif
15554
15555 ; return 0; }
15556 EOF
15557 if { (eval echo configure:15558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15558   rm -rf conftest*
15559   eval "ac_cv_func__vsnprintf=yes"
15560 else
15561   echo "configure: failed program was:" >&5
15562   cat conftest.$ac_ext >&5
15563   rm -rf conftest*
15564   eval "ac_cv_func__vsnprintf=no"
15565 fi
15566 rm -f conftest*
15567 fi
15568
15569 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15570   echo "$ac_t""yes" 1>&6
15571   ac_cv_func_vsnprintf=yes
15572         cat >> confdefs.h <<\EOF
15573 #define vsnprintf _vsnprintf
15574 EOF
15575
15576
15577 else
15578   echo "$ac_t""no" 1>&6
15579 fi
15580
15581
15582 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15583 echo "configure:15584: checking for vprintf" >&5
15584 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15585   echo $ac_n "(cached) $ac_c" 1>&6
15586 else
15587   cat > conftest.$ac_ext <<EOF
15588 #line 15589 "configure"
15589 #include "confdefs.h"
15590 /* System header to define __stub macros and hopefully few prototypes,
15591     which can conflict with char vprintf(); below.  */
15592 #include <assert.h>
15593 /* Override any gcc2 internal prototype to avoid an error.  */
15594 /* We use char because int might match the return type of a gcc2
15595     builtin and then its argument prototype would still apply.  */
15596 char vprintf();
15597 char (*f)();
15598
15599 int main() {
15600
15601 /* The GNU C library defines this for functions which it implements
15602     to always fail with ENOSYS.  Some functions are actually named
15603     something starting with __ and the normal name is an alias.  */
15604 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15605 choke me
15606 #else
15607 f = vprintf;
15608 #endif
15609
15610 ; return 0; }
15611 EOF
15612 if { (eval echo configure:15613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15613   rm -rf conftest*
15614   eval "ac_cv_func_vprintf=yes"
15615 else
15616   echo "configure: failed program was:" >&5
15617   cat conftest.$ac_ext >&5
15618   rm -rf conftest*
15619   eval "ac_cv_func_vprintf=no"
15620 fi
15621 rm -f conftest*
15622 fi
15623
15624 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15625   echo "$ac_t""yes" 1>&6
15626   cat >> confdefs.h <<\EOF
15627 #define HAVE_VPRINTF 1
15628 EOF
15629
15630 else
15631   echo "$ac_t""no" 1>&6
15632 fi
15633
15634 if test "$ac_cv_func_vprintf" != yes; then
15635 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15636 echo "configure:15637: checking for _doprnt" >&5
15637 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15638   echo $ac_n "(cached) $ac_c" 1>&6
15639 else
15640   cat > conftest.$ac_ext <<EOF
15641 #line 15642 "configure"
15642 #include "confdefs.h"
15643 /* System header to define __stub macros and hopefully few prototypes,
15644     which can conflict with char _doprnt(); below.  */
15645 #include <assert.h>
15646 /* Override any gcc2 internal prototype to avoid an error.  */
15647 /* We use char because int might match the return type of a gcc2
15648     builtin and then its argument prototype would still apply.  */
15649 char _doprnt();
15650 char (*f)();
15651
15652 int main() {
15653
15654 /* The GNU C library defines this for functions which it implements
15655     to always fail with ENOSYS.  Some functions are actually named
15656     something starting with __ and the normal name is an alias.  */
15657 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15658 choke me
15659 #else
15660 f = _doprnt;
15661 #endif
15662
15663 ; return 0; }
15664 EOF
15665 if { (eval echo configure:15666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15666   rm -rf conftest*
15667   eval "ac_cv_func__doprnt=yes"
15668 else
15669   echo "configure: failed program was:" >&5
15670   cat conftest.$ac_ext >&5
15671   rm -rf conftest*
15672   eval "ac_cv_func__doprnt=no"
15673 fi
15674 rm -f conftest*
15675 fi
15676
15677 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15678   echo "$ac_t""yes" 1>&6
15679   cat >> confdefs.h <<\EOF
15680 #define HAVE_DOPRNT 1
15681 EOF
15682
15683 else
15684   echo "$ac_t""no" 1>&6
15685 fi
15686
15687 fi
15688
15689
15690 if test $ac_cv_func_vprintf = yes ; then
15691                 for ac_func in vsnprintf vsprintf
15692 do
15693 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15694 echo "configure:15695: checking for $ac_func" >&5
15695 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15696   echo $ac_n "(cached) $ac_c" 1>&6
15697 else
15698   cat > conftest.$ac_ext <<EOF
15699 #line 15700 "configure"
15700 #include "confdefs.h"
15701 /* System header to define __stub macros and hopefully few prototypes,
15702     which can conflict with char $ac_func(); below.  */
15703 #include <assert.h>
15704 /* Override any gcc2 internal prototype to avoid an error.  */
15705 /* We use char because int might match the return type of a gcc2
15706     builtin and then its argument prototype would still apply.  */
15707 char $ac_func();
15708 char (*f)();
15709
15710 int main() {
15711
15712 /* The GNU C library defines this for functions which it implements
15713     to always fail with ENOSYS.  Some functions are actually named
15714     something starting with __ and the normal name is an alias.  */
15715 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15716 choke me
15717 #else
15718 f = $ac_func;
15719 #endif
15720
15721 ; return 0; }
15722 EOF
15723 if { (eval echo configure:15724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15724   rm -rf conftest*
15725   eval "ac_cv_func_$ac_func=yes"
15726 else
15727   echo "configure: failed program was:" >&5
15728   cat conftest.$ac_ext >&5
15729   rm -rf conftest*
15730   eval "ac_cv_func_$ac_func=no"
15731 fi
15732 rm -f conftest*
15733 fi
15734
15735 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15736   echo "$ac_t""yes" 1>&6
15737     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15738   cat >> confdefs.h <<EOF
15739 #define $ac_tr_func 1
15740 EOF
15741  
15742 else
15743   echo "$ac_t""no" 1>&6
15744 fi
15745 done
15746
15747 fi
15748
15749 for ac_func in \
15750         bcopy                   \
15751         closesocket             \
15752         chroot                  \
15753         endgrent                \
15754         endpwent                \
15755         flock                   \
15756         getdtablesize   \
15757         getgrgid                \
15758         gethostname             \
15759         getpass                 \
15760         getpassphrase   \
15761         getpwuid                \
15762         getpwnam                \
15763         getspnam                \
15764         gettimeofday    \
15765         initgroups              \
15766         lockf                   \
15767         memcpy                  \
15768         memmove                 \
15769         mkstemp                 \
15770         pipe                    \
15771         read                    \
15772         recv                    \
15773         recvfrom                \
15774         setpwfile               \
15775         setgid                  \
15776         setegid                 \
15777         setsid                  \
15778         setuid                  \
15779         seteuid                 \
15780         sigaction               \
15781         signal                  \
15782         sigset                  \
15783         snprintf                \
15784         strdup                  \
15785         strerror                \
15786         strpbrk                 \
15787         strrchr                 \
15788         strsep                  \
15789         strstr                  \
15790         strtol                  \
15791         strtoul                 \
15792         strspn                  \
15793         sysconf                 \
15794         waitpid                 \
15795         wait4                   \
15796         write                   \
15797         send                    \
15798         sendto                  \
15799
15800 do
15801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15802 echo "configure:15803: checking for $ac_func" >&5
15803 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15804   echo $ac_n "(cached) $ac_c" 1>&6
15805 else
15806   cat > conftest.$ac_ext <<EOF
15807 #line 15808 "configure"
15808 #include "confdefs.h"
15809 /* System header to define __stub macros and hopefully few prototypes,
15810     which can conflict with char $ac_func(); below.  */
15811 #include <assert.h>
15812 /* Override any gcc2 internal prototype to avoid an error.  */
15813 /* We use char because int might match the return type of a gcc2
15814     builtin and then its argument prototype would still apply.  */
15815 char $ac_func();
15816 char (*f)();
15817
15818 int main() {
15819
15820 /* The GNU C library defines this for functions which it implements
15821     to always fail with ENOSYS.  Some functions are actually named
15822     something starting with __ and the normal name is an alias.  */
15823 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15824 choke me
15825 #else
15826 f = $ac_func;
15827 #endif
15828
15829 ; return 0; }
15830 EOF
15831 if { (eval echo configure:15832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15832   rm -rf conftest*
15833   eval "ac_cv_func_$ac_func=yes"
15834 else
15835   echo "configure: failed program was:" >&5
15836   cat conftest.$ac_ext >&5
15837   rm -rf conftest*
15838   eval "ac_cv_func_$ac_func=no"
15839 fi
15840 rm -f conftest*
15841 fi
15842
15843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15844   echo "$ac_t""yes" 1>&6
15845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15846   cat >> confdefs.h <<EOF
15847 #define $ac_tr_func 1
15848 EOF
15849  
15850 else
15851   echo "$ac_t""no" 1>&6
15852 fi
15853 done
15854
15855
15856 for ac_func in getopt tempnam
15857 do
15858 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15859 echo "configure:15860: checking for $ac_func" >&5
15860 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15861   echo $ac_n "(cached) $ac_c" 1>&6
15862 else
15863   cat > conftest.$ac_ext <<EOF
15864 #line 15865 "configure"
15865 #include "confdefs.h"
15866 /* System header to define __stub macros and hopefully few prototypes,
15867     which can conflict with char $ac_func(); below.  */
15868 #include <assert.h>
15869 /* Override any gcc2 internal prototype to avoid an error.  */
15870 /* We use char because int might match the return type of a gcc2
15871     builtin and then its argument prototype would still apply.  */
15872 char $ac_func();
15873 char (*f)();
15874
15875 int main() {
15876
15877 /* The GNU C library defines this for functions which it implements
15878     to always fail with ENOSYS.  Some functions are actually named
15879     something starting with __ and the normal name is an alias.  */
15880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15881 choke me
15882 #else
15883 f = $ac_func;
15884 #endif
15885
15886 ; return 0; }
15887 EOF
15888 if { (eval echo configure:15889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15889   rm -rf conftest*
15890   eval "ac_cv_func_$ac_func=yes"
15891 else
15892   echo "configure: failed program was:" >&5
15893   cat conftest.$ac_ext >&5
15894   rm -rf conftest*
15895   eval "ac_cv_func_$ac_func=no"
15896 fi
15897 rm -f conftest*
15898 fi
15899
15900 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15901   echo "$ac_t""yes" 1>&6
15902     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15903   cat >> confdefs.h <<EOF
15904 #define $ac_tr_func 1
15905 EOF
15906  
15907 else
15908   echo "$ac_t""no" 1>&6
15909 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15910 fi
15911 done
15912
15913
15914
15915 if test "$ac_cv_func_getopt" != yes; then
15916     LIBSRCS="$LIBSRCS getopt.c"
15917 fi
15918
15919 if test "$ac_cv_func_tempnam" != yes; then
15920     LIBSRCS="$LIBSRCS tempnam.c"
15921 fi
15922
15923 # Check Configuration
15924 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15925 echo "configure:15926: checking declaration of sys_errlist" >&5
15926 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15927   echo $ac_n "(cached) $ac_c" 1>&6
15928 else
15929   
15930         cat > conftest.$ac_ext <<EOF
15931 #line 15932 "configure"
15932 #include "confdefs.h"
15933
15934 #include <stdio.h>
15935 #include <sys/types.h>
15936 #include <errno.h>
15937 #ifdef WINNT
15938 #include <stdlib.h>
15939 #endif 
15940 int main() {
15941 char *c = (char *) *sys_errlist
15942 ; return 0; }
15943 EOF
15944 if { (eval echo configure:15945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15945   rm -rf conftest*
15946   ol_cv_dcl_sys_errlist=yes
15947         ol_cv_have_sys_errlist=yes
15948 else
15949   echo "configure: failed program was:" >&5
15950   cat conftest.$ac_ext >&5
15951   rm -rf conftest*
15952   ol_cv_dcl_sys_errlist=no
15953 fi
15954 rm -f conftest*
15955 fi
15956
15957 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15958 #
15959 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15960 if test $ol_cv_dcl_sys_errlist = no ; then
15961         cat >> confdefs.h <<\EOF
15962 #define DECL_SYS_ERRLIST 1
15963 EOF
15964
15965
15966         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15967 echo "configure:15968: checking existence of sys_errlist" >&5
15968 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15969   echo $ac_n "(cached) $ac_c" 1>&6
15970 else
15971   
15972                 cat > conftest.$ac_ext <<EOF
15973 #line 15974 "configure"
15974 #include "confdefs.h"
15975 #include <errno.h>
15976 int main() {
15977 char *c = (char *) *sys_errlist
15978 ; return 0; }
15979 EOF
15980 if { (eval echo configure:15981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15981   rm -rf conftest*
15982   ol_cv_have_sys_errlist=yes
15983 else
15984   echo "configure: failed program was:" >&5
15985   cat conftest.$ac_ext >&5
15986   rm -rf conftest*
15987   ol_cv_have_sys_errlist=no
15988 fi
15989 rm -f conftest*
15990 fi
15991
15992 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15993 fi
15994 if test $ol_cv_have_sys_errlist = yes ; then
15995         cat >> confdefs.h <<\EOF
15996 #define HAVE_SYS_ERRLIST 1
15997 EOF
15998
15999 fi
16000
16001
16002
16003 if test "$ol_enable_debug" != no ; then
16004         cat >> confdefs.h <<\EOF
16005 #define LDAP_DEBUG 1
16006 EOF
16007
16008 fi
16009 if test "$ol_enable_syslog" = yes ; then
16010         cat >> confdefs.h <<\EOF
16011 #define LDAP_SYSLOG 1
16012 EOF
16013
16014 fi
16015 if test "$ol_enable_cache" = no ; then
16016         cat >> confdefs.h <<\EOF
16017 #define LDAP_NOCACHE 1
16018 EOF
16019
16020 fi
16021 if test "$ol_link_kbind" != no ; then
16022         cat >> confdefs.h <<\EOF
16023 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16024 EOF
16025
16026 fi
16027 if test "$ol_enable_proctitle" != no ; then
16028         cat >> confdefs.h <<\EOF
16029 #define LDAP_PROCTITLE 1
16030 EOF
16031
16032 fi
16033 if test "$ol_enable_referrals" != no ; then
16034         cat >> confdefs.h <<\EOF
16035 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16036 EOF
16037
16038 fi
16039 if test "$ol_enable_local" != no; then
16040         cat >> confdefs.h <<\EOF
16041 #define LDAP_PF_LOCAL 1
16042 EOF
16043
16044 fi
16045 if test "$ol_link_ipv6" != no; then
16046         cat >> confdefs.h <<\EOF
16047 #define LDAP_PF_INET6 1
16048 EOF
16049
16050 fi
16051 if test "$ol_enable_cleartext" != no ; then
16052         cat >> confdefs.h <<\EOF
16053 #define SLAPD_CLEARTEXT 1
16054 EOF
16055
16056 fi
16057 if test "$ol_enable_crypt" != no ; then
16058         cat >> confdefs.h <<\EOF
16059 #define SLAPD_CRYPT 1
16060 EOF
16061
16062 fi
16063 if test "$ol_link_kpasswd" != no ; then
16064         cat >> confdefs.h <<\EOF
16065 #define SLAPD_KPASSWD 1
16066 EOF
16067
16068 fi
16069 if test "$ol_link_spasswd" != no ; then
16070         cat >> confdefs.h <<\EOF
16071 #define SLAPD_SPASSWD 1
16072 EOF
16073
16074 fi
16075 if test "$ol_enable_phonetic" != no ; then
16076         cat >> confdefs.h <<\EOF
16077 #define SLAPD_PHONETIC 1
16078 EOF
16079
16080 fi
16081 if test "$ol_enable_rlookups" != no ; then
16082         cat >> confdefs.h <<\EOF
16083 #define SLAPD_RLOOKUPS 1
16084 EOF
16085
16086 fi
16087 if test "$ol_enable_aci" != no ; then
16088         cat >> confdefs.h <<\EOF
16089 #define SLAPD_ACI_ENABLED 1
16090 EOF
16091
16092 fi
16093
16094 if test "$ol_link_modules" != no ; then
16095         cat >> confdefs.h <<\EOF
16096 #define SLAPD_MODULES 1
16097 EOF
16098
16099         BUILD_SLAPD=yes
16100         SLAPD_MODULES_LDFLAGS="-dlopen self"
16101 fi
16102
16103 if test "$ol_enable_bdb" != no ; then
16104         cat >> confdefs.h <<\EOF
16105 #define SLAPD_BDB 1
16106 EOF
16107
16108         BUILD_SLAPD=yes
16109         BUILD_BDB=yes
16110         if test "$ol_with_bdb_module" != static ; then
16111                 cat >> confdefs.h <<\EOF
16112 #define SLAPD_BDB_DYNAMIC 1
16113 EOF
16114
16115                 BUILD_BDB=mod
16116                 BUILD_BDB_DYNAMIC=shared
16117                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16118         fi
16119 fi
16120
16121 if test "$ol_link_dnssrv" != no ; then
16122         cat >> confdefs.h <<\EOF
16123 #define SLAPD_DNSSRV 1
16124 EOF
16125
16126         BUILD_SLAPD=yes
16127         BUILD_DNSSRV=yes
16128         if test "$ol_with_dnssrv_module" != static ; then
16129                 cat >> confdefs.h <<\EOF
16130 #define SLAPD_DNSSRV_DYNAMIC 1
16131 EOF
16132
16133                 BUILD_DNSSRV=mod
16134                 BUILD_DNSSRV_DYNAMIC=shared
16135                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16136         fi
16137 fi
16138
16139 if test "$ol_enable_ldap" != no ; then
16140         cat >> confdefs.h <<\EOF
16141 #define SLAPD_LDAP 1
16142 EOF
16143
16144         BUILD_SLAPD=yes
16145         BUILD_LDAP=yes
16146         if test "$ol_with_ldap_module" != static ; then
16147                 cat >> confdefs.h <<\EOF
16148 #define SLAPD_LDAP_DYNAMIC 1
16149 EOF
16150
16151                 BUILD_LDAP=mod
16152                 BUILD_LDAP_DYNAMIC=shared
16153                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16154         fi
16155 fi
16156
16157 if test "$ol_link_ldbm" != no ; then
16158         cat >> confdefs.h <<\EOF
16159 #define SLAPD_LDBM 1
16160 EOF
16161
16162         BUILD_SLAPD=yes
16163         BUILD_LDBM=yes
16164         if test "$ol_with_ldbm_module" != static ; then
16165                 cat >> confdefs.h <<\EOF
16166 #define SLAPD_LDBM_DYNAMIC 1
16167 EOF
16168
16169                 BUILD_LDBM=mod
16170                 BUILD_LDBM_DYNAMIC=shared
16171                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16172         fi
16173 fi
16174
16175 if test "$ol_enable_passwd" != no ; then
16176         cat >> confdefs.h <<\EOF
16177 #define SLAPD_PASSWD 1
16178 EOF
16179
16180         BUILD_SLAPD=yes
16181         BUILD_PASSWD=yes
16182         if test "$ol_with_passwd_module" != static ; then
16183                 cat >> confdefs.h <<\EOF
16184 #define SLAPD_PASSWD_DYNAMIC 1
16185 EOF
16186
16187                 BUILD_PASSWD=mod
16188                 BUILD_PASSWD_DYNAMIC=shared
16189                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16190         fi
16191 fi
16192
16193 if test "$ol_link_perl" != no ; then
16194         cat >> confdefs.h <<\EOF
16195 #define SLAPD_PERL 1
16196 EOF
16197
16198         BUILD_SLAPD=yes
16199         BUILD_PERL=yes
16200         if test "$ol_with_perl_module" != static ; then
16201                 cat >> confdefs.h <<\EOF
16202 #define SLAPD_PERL_DYNAMIC 1
16203 EOF
16204
16205                 BUILD_PERL=mod
16206                 BUILD_PERL_DYNAMIC=shared
16207                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16208         fi
16209 fi
16210
16211 if test "$ol_enable_shell" != no ; then
16212         cat >> confdefs.h <<\EOF
16213 #define SLAPD_SHELL 1
16214 EOF
16215
16216         BUILD_SLAPD=yes
16217         BUILD_SHELL=yes
16218         if test "$ol_with_shell_module" != static ; then
16219                 cat >> confdefs.h <<\EOF
16220 #define SLAPD_SHELL_DYNAMIC 1
16221 EOF
16222
16223                 BUILD_SHELL=mod
16224                 BUILD_SHELL_DYNAMIC=shared
16225                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16226         fi
16227 fi
16228
16229 if test "$ol_enable_tcl" != no ; then
16230         cat >> confdefs.h <<\EOF
16231 #define SLAPD_TCL 1
16232 EOF
16233
16234         BUILD_SLAPD=yes
16235         BUILD_TCL=yes
16236         if test "$ol_with_tcl_module" != static; then
16237                 cat >> confdefs.h <<\EOF
16238 #define SLAPD_TCL_DYNAMIC 1
16239 EOF
16240
16241                 BUILD_TCL=mod
16242                 BUILD_TCL_DYNAMIC=shared
16243                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16244         fi
16245 fi
16246
16247 if test "$ol_link_sql" != no ; then
16248         cat >> confdefs.h <<\EOF
16249 #define SLAPD_SQL 1
16250 EOF
16251
16252         BUILD_SLAPD=yes
16253         BUILD_SQL=yes
16254         if test "$ol_with_sql_module" != static; then
16255                 cat >> confdefs.h <<\EOF
16256 #define SLAPD_SQL_DYNAMIC 1
16257 EOF
16258
16259                 BUILD_SQL=mod
16260                 BUILD_SQL_DYNAMIC=shared
16261                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16262         fi
16263 fi
16264
16265 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16266         $BUILD_SLAPD = yes ; then
16267         BUILD_SLURPD=yes
16268 fi
16269
16270
16271 if test "$LINK_BINS_DYNAMIC" = yes; then
16272     LIB_LINKAGE=DYN
16273     LT_LIB_LINKAGE=shared
16274 else
16275     LIB_LINKAGE=STAT
16276     LT_LIB_LINKAGE=static
16277 fi
16278
16279 if test "$ac_cv_mingw32" = yes ; then
16280     PLAT=NT
16281     DYN_EXT=dll
16282 else
16283     PLAT=UNIX
16284     DYN_EXT=so
16285 fi
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295   
16296   
16297   
16298   
16299   
16300   
16301   
16302   
16303   
16304   
16305   
16306   
16307   
16308   
16309   
16310   
16311   
16312   
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348 trap '' 1 2 15
16349
16350 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16351
16352 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16353 # Let make expand exec_prefix.
16354 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16355
16356 # Any assignment to VPATH causes Sun make to only execute
16357 # the first set of double-colon rules, so remove it if not needed.
16358 # If there is a colon in the path, we need to keep it.
16359 if test "x$srcdir" = x.; then
16360   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16361 fi
16362
16363 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16364
16365 DEFS=-DHAVE_CONFIG_H
16366
16367 # Without the "./", some shells look in PATH for config.status.
16368 : ${CONFIG_STATUS=./config.status}
16369
16370 echo creating $CONFIG_STATUS
16371 rm -f $CONFIG_STATUS
16372 cat > $CONFIG_STATUS <<EOF
16373 #! /bin/sh
16374 # Generated automatically by configure.
16375 # Run this file to recreate the current configuration.
16376 # This directory was configured as follows,
16377 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16378 #
16379 # $0 $ac_configure_args
16380 #
16381 # Compiler output produced by configure, useful for debugging
16382 # configure, is in ./config.log if it exists.
16383
16384 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16385 for ac_option
16386 do
16387   case "\$ac_option" in
16388   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16389     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16390     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16391   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16392     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16393     exit 0 ;;
16394   -help | --help | --hel | --he | --h)
16395     echo "\$ac_cs_usage"; exit 0 ;;
16396   *) echo "\$ac_cs_usage"; exit 1 ;;
16397   esac
16398 done
16399
16400 ac_given_srcdir=$srcdir
16401 ac_given_INSTALL="$INSTALL"
16402
16403 trap 'rm -fr `echo "\
16404 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16405 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16406 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16407 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16408 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16409 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16410 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16411 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16412 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16413 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16414 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16415 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16416 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16417 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16418 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16419 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16420 include/Makefile:build/top.mk:include/Makefile.in \
16421 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16422 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16423 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16424 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16425 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16426 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16427 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16428 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16429 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16430 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16431 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16432 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16433 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16434 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16435 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16436 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16437 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16438 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16439 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16440 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16441 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16442 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16443 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16444 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16445 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16446 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16447 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16448 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16449  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16450 EOF
16451 cat >> $CONFIG_STATUS <<EOF
16452
16453 # Protect against being on the right side of a sed subst in config.status.
16454 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16455  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16456 $ac_vpsub
16457 $extrasub
16458 s%@SHELL@%$SHELL%g
16459 s%@CFLAGS@%$CFLAGS%g
16460 s%@CPPFLAGS@%$CPPFLAGS%g
16461 s%@CXXFLAGS@%$CXXFLAGS%g
16462 s%@FFLAGS@%$FFLAGS%g
16463 s%@DEFS@%$DEFS%g
16464 s%@LDFLAGS@%$LDFLAGS%g
16465 s%@LIBS@%$LIBS%g
16466 s%@exec_prefix@%$exec_prefix%g
16467 s%@prefix@%$prefix%g
16468 s%@program_transform_name@%$program_transform_name%g
16469 s%@bindir@%$bindir%g
16470 s%@sbindir@%$sbindir%g
16471 s%@libexecdir@%$libexecdir%g
16472 s%@datadir@%$datadir%g
16473 s%@sysconfdir@%$sysconfdir%g
16474 s%@sharedstatedir@%$sharedstatedir%g
16475 s%@localstatedir@%$localstatedir%g
16476 s%@libdir@%$libdir%g
16477 s%@includedir@%$includedir%g
16478 s%@oldincludedir@%$oldincludedir%g
16479 s%@infodir@%$infodir%g
16480 s%@mandir@%$mandir%g
16481 s%@host@%$host%g
16482 s%@host_alias@%$host_alias%g
16483 s%@host_cpu@%$host_cpu%g
16484 s%@host_vendor@%$host_vendor%g
16485 s%@host_os@%$host_os%g
16486 s%@target@%$target%g
16487 s%@target_alias@%$target_alias%g
16488 s%@target_cpu@%$target_cpu%g
16489 s%@target_vendor@%$target_vendor%g
16490 s%@target_os@%$target_os%g
16491 s%@build@%$build%g
16492 s%@build_alias@%$build_alias%g
16493 s%@build_cpu@%$build_cpu%g
16494 s%@build_vendor@%$build_vendor%g
16495 s%@build_os@%$build_os%g
16496 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16497 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16498 s%@INSTALL_DATA@%$INSTALL_DATA%g
16499 s%@PACKAGE@%$PACKAGE%g
16500 s%@VERSION@%$VERSION%g
16501 s%@ACLOCAL@%$ACLOCAL%g
16502 s%@AUTOCONF@%$AUTOCONF%g
16503 s%@AUTOMAKE@%$AUTOMAKE%g
16504 s%@AUTOHEADER@%$AUTOHEADER%g
16505 s%@MAKEINFO@%$MAKEINFO%g
16506 s%@install_sh@%$install_sh%g
16507 s%@AMTAR@%$AMTAR%g
16508 s%@AWK@%$AWK%g
16509 s%@AMTARFLAGS@%$AMTARFLAGS%g
16510 s%@SET_MAKE@%$SET_MAKE%g
16511 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16512 s%@top_builddir@%$top_builddir%g
16513 s%@ldap_subdir@%$ldap_subdir%g
16514 s%@CC@%$CC%g
16515 s%@RANLIB@%$RANLIB%g
16516 s%@LN_S@%$LN_S%g
16517 s%@DLLTOOL@%$DLLTOOL%g
16518 s%@AS@%$AS%g
16519 s%@OBJDUMP@%$OBJDUMP%g
16520 s%@LIBTOOL@%$LIBTOOL%g
16521 s%@LN_H@%$LN_H%g
16522 s%@SENDMAIL@%$SENDMAIL%g
16523 s%@EDITOR@%$EDITOR%g
16524 s%@FINGER@%$FINGER%g
16525 s%@PERLBIN@%$PERLBIN%g
16526 s%@CPP@%$CPP%g
16527 s%@EXEEXT@%$EXEEXT%g
16528 s%@OBJEXT@%$OBJEXT%g
16529 s%@OL_MKDEP@%$OL_MKDEP%g
16530 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16531 s%@LIBOBJS@%$LIBOBJS%g
16532 s%@LIBSRCS@%$LIBSRCS%g
16533 s%@PLAT@%$PLAT%g
16534 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16535 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16536 s%@DYN_EXT@%$DYN_EXT%g
16537 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16538 s%@BUILD_BDB@%$BUILD_BDB%g
16539 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16540 s%@BUILD_LDAP@%$BUILD_LDAP%g
16541 s%@BUILD_LDBM@%$BUILD_LDBM%g
16542 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16543 s%@BUILD_PERL@%$BUILD_PERL%g
16544 s%@BUILD_SHELL@%$BUILD_SHELL%g
16545 s%@BUILD_SQL@%$BUILD_SQL%g
16546 s%@BUILD_TCL@%$BUILD_TCL%g
16547 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16548 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16549 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16550 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16551 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16552 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16553 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16554 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16555 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16556 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16557 s%@LDAP_LIBS@%$LDAP_LIBS%g
16558 s%@LDIF_LIBS@%$LDIF_LIBS%g
16559 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16560 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16561 s%@LDBM_LIBS@%$LDBM_LIBS%g
16562 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16563 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16564 s%@WRAP_LIBS@%$WRAP_LIBS%g
16565 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16566 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16567 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16568 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16569 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16570 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16571 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16572 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16573 s%@KRB4_LIBS@%$KRB4_LIBS%g
16574 s%@KRB5_LIBS@%$KRB5_LIBS%g
16575 s%@READLINE_LIBS@%$READLINE_LIBS%g
16576 s%@SASL_LIBS@%$SASL_LIBS%g
16577 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16578 s%@TLS_LIBS@%$TLS_LIBS%g
16579 s%@MODULES_LIBS@%$MODULES_LIBS%g
16580 s%@AUTH_LIBS@%$AUTH_LIBS%g
16581 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16582 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16583 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16584
16585 CEOF
16586 EOF
16587
16588 cat >> $CONFIG_STATUS <<\EOF
16589
16590 # Split the substitutions into bite-sized pieces for seds with
16591 # small command number limits, like on Digital OSF/1 and HP-UX.
16592 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16593 ac_file=1 # Number of current file.
16594 ac_beg=1 # First line for current file.
16595 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16596 ac_more_lines=:
16597 ac_sed_cmds=""
16598 while $ac_more_lines; do
16599   if test $ac_beg -gt 1; then
16600     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16601   else
16602     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16603   fi
16604   if test ! -s conftest.s$ac_file; then
16605     ac_more_lines=false
16606     rm -f conftest.s$ac_file
16607   else
16608     if test -z "$ac_sed_cmds"; then
16609       ac_sed_cmds="sed -f conftest.s$ac_file"
16610     else
16611       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16612     fi
16613     ac_file=`expr $ac_file + 1`
16614     ac_beg=$ac_end
16615     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16616   fi
16617 done
16618 if test -z "$ac_sed_cmds"; then
16619   ac_sed_cmds=cat
16620 fi
16621 EOF
16622
16623 cat >> $CONFIG_STATUS <<EOF
16624
16625 CONFIG_FILES=\${CONFIG_FILES-"\
16626 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16627 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16628 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16629 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16630 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16631 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16632 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16633 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16634 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16635 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16636 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16637 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16638 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16639 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16640 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16641 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16642 include/Makefile:build/top.mk:include/Makefile.in \
16643 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16644 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16645 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16646 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16647 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16648 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16649 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16650 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16651 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16652 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16653 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16654 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16655 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16656 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16657 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16658 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16659 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16660 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16661 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16662 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16663 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16664 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16665 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16666 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16667 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16668 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16669 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16670 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16671 "}
16672 EOF
16673 cat >> $CONFIG_STATUS <<\EOF
16674 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16675   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16676   case "$ac_file" in
16677   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16678        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16679   *) ac_file_in="${ac_file}.in" ;;
16680   esac
16681
16682   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16683
16684   # Remove last slash and all that follows it.  Not all systems have dirname.
16685   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16686   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16687     # The file is in a subdirectory.
16688     test ! -d "$ac_dir" && mkdir "$ac_dir"
16689     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16690     # A "../" for each directory in $ac_dir_suffix.
16691     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16692   else
16693     ac_dir_suffix= ac_dots=
16694   fi
16695
16696   case "$ac_given_srcdir" in
16697   .)  srcdir=.
16698       if test -z "$ac_dots"; then top_srcdir=.
16699       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16700   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16701   *) # Relative path.
16702     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16703     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16704   esac
16705
16706   case "$ac_given_INSTALL" in
16707   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16708   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16709   esac
16710
16711   echo creating "$ac_file"
16712   rm -f "$ac_file"
16713   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16714   case "$ac_file" in
16715   *[Mm]akefile*) ac_comsub="1i\\
16716 # $configure_input" ;;
16717   *) ac_comsub= ;;
16718   esac
16719
16720   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16721   sed -e "$ac_comsub
16722 s%@configure_input@%$configure_input%g
16723 s%@srcdir@%$srcdir%g
16724 s%@top_srcdir@%$top_srcdir%g
16725 s%@INSTALL@%$INSTALL%g
16726 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16727 fi; done
16728 rm -f conftest.s*
16729
16730 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16731 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16732 #
16733 # ac_d sets the value in "#define NAME VALUE" lines.
16734 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16735 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16736 ac_dC='\3'
16737 ac_dD='%g'
16738 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16739 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16740 ac_uB='\([      ]\)%\1#\2define\3'
16741 ac_uC=' '
16742 ac_uD='\4%g'
16743 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16744 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16745 ac_eB='$%\1#\2define\3'
16746 ac_eC=' '
16747 ac_eD='%g'
16748
16749 if test "${CONFIG_HEADERS+set}" != set; then
16750 EOF
16751 cat >> $CONFIG_STATUS <<EOF
16752   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16753 EOF
16754 cat >> $CONFIG_STATUS <<\EOF
16755 fi
16756 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16757   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16758   case "$ac_file" in
16759   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16760        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16761   *) ac_file_in="${ac_file}.in" ;;
16762   esac
16763
16764   echo creating $ac_file
16765
16766   rm -f conftest.frag conftest.in conftest.out
16767   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16768   cat $ac_file_inputs > conftest.in
16769
16770 EOF
16771
16772 # Transform confdefs.h into a sed script conftest.vals that substitutes
16773 # the proper values into config.h.in to produce config.h.  And first:
16774 # Protect against being on the right side of a sed subst in config.status.
16775 # Protect against being in an unquoted here document in config.status.
16776 rm -f conftest.vals
16777 cat > conftest.hdr <<\EOF
16778 s/[\\&%]/\\&/g
16779 s%[\\$`]%\\&%g
16780 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16781 s%ac_d%ac_u%gp
16782 s%ac_u%ac_e%gp
16783 EOF
16784 sed -n -f conftest.hdr confdefs.h > conftest.vals
16785 rm -f conftest.hdr
16786
16787 # This sed command replaces #undef with comments.  This is necessary, for
16788 # example, in the case of _POSIX_SOURCE, which is predefined and required
16789 # on some systems where configure will not decide to define it.
16790 cat >> conftest.vals <<\EOF
16791 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16792 EOF
16793
16794 # Break up conftest.vals because some shells have a limit on
16795 # the size of here documents, and old seds have small limits too.
16796
16797 rm -f conftest.tail
16798 while :
16799 do
16800   ac_lines=`grep -c . conftest.vals`
16801   # grep -c gives empty output for an empty file on some AIX systems.
16802   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16803   # Write a limited-size here document to conftest.frag.
16804   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16805   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16806   echo 'CEOF
16807   sed -f conftest.frag conftest.in > conftest.out
16808   rm -f conftest.in
16809   mv conftest.out conftest.in
16810 ' >> $CONFIG_STATUS
16811   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16812   rm -f conftest.vals
16813   mv conftest.tail conftest.vals
16814 done
16815 rm -f conftest.vals
16816
16817 cat >> $CONFIG_STATUS <<\EOF
16818   rm -f conftest.frag conftest.h
16819   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16820   cat conftest.in >> conftest.h
16821   rm -f conftest.in
16822   if cmp -s $ac_file conftest.h 2>/dev/null; then
16823     echo "$ac_file is unchanged"
16824     rm -f conftest.h
16825   else
16826     # Remove last slash and all that follows it.  Not all systems have dirname.
16827       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16828       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16829       # The file is in a subdirectory.
16830       test ! -d "$ac_dir" && mkdir "$ac_dir"
16831     fi
16832     rm -f $ac_file
16833     mv conftest.h $ac_file
16834   fi
16835 fi; done
16836
16837 EOF
16838 cat >> $CONFIG_STATUS <<EOF
16839
16840 EOF
16841 cat >> $CONFIG_STATUS <<\EOF
16842
16843 date > stamp-h
16844 echo Please \"make depend\" to build dependencies
16845
16846 exit 0
16847 EOF
16848 chmod +x $CONFIG_STATUS
16849 rm -fr confdefs* $ac_clean_files
16850 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16851