]> git.sur5r.net Git - openldap/blob - configure
c396f70ab58ee130462ecf9a61a1783779d476e7
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.366 2001/09/24 16:26:24 kurt Exp  
4
5 # Copyright 1998-2001 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2001 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-kbind          enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-rewrite        enable rewrite [no]"
48 ac_help="$ac_help
49   --enable-x-compile      enable cross compiling [no]"
50 ac_help="$ac_help
51   --with-cyrus-sasl       with Cyrus SASL support [auto]"
52 ac_help="$ac_help
53   --with-fetch            with fetch URL support [auto]"
54 ac_help="$ac_help
55   --with-kerberos         with Kerberos support [auto]"
56 ac_help="$ac_help
57   --with-readline         with readline support [auto]"
58 ac_help="$ac_help
59   --with-threads          with threads [auto]"
60 ac_help="$ac_help
61   --with-tls              with TLS/SSL support [auto]"
62 ac_help="$ac_help
63   --with-yielding-select  with implicitly yielding select [auto]"
64 ac_help="$ac_help
65 SLAPD (Standalone LDAP Daemon) Options:"
66 ac_help="$ac_help
67   --enable-slapd          enable building slapd [yes]"
68 ac_help="$ac_help
69     --enable-aci          enable per-object ACIs (experimental) [no]"
70 ac_help="$ac_help
71     --enable-cleartext    enable cleartext passwords [yes]"
72 ac_help="$ac_help
73     --enable-crypt        enable crypt(3) passwords [no]"
74 ac_help="$ac_help
75     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
76 ac_help="$ac_help
77     --enable-kpasswd      enable Kerberos password verification [no]"
78 ac_help="$ac_help
79     --enable-lmpasswd     enable LAN Manager passwords [no]"
80 ac_help="$ac_help
81     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
82 ac_help="$ac_help
83     --enable-modules      enable dynamic module support [no]"
84 ac_help="$ac_help
85     --enable-phonetic     enable phonetic/soundex [no]"
86 ac_help="$ac_help
87     --enable-rlookups     enable reverse lookups [no]"
88 ac_help="$ac_help
89     --enable-slp          enable SLPv2 support [no]"
90 ac_help="$ac_help
91     --enable-wrappers     enable tcp wrapper support [no]"
92 ac_help="$ac_help
93     --enable-bdb          enable Berkeley DB backend [no]"
94 ac_help="$ac_help
95     --with-bdb-module     module type [static]"
96 ac_help="$ac_help
97     --enable-dnssrv       enable dnssrv backend [no]"
98 ac_help="$ac_help
99     --with-dnssrv-module  module type [static]"
100 ac_help="$ac_help
101     --enable-ldap         enable ldap backend [no]"
102 ac_help="$ac_help
103     --with-ldap-module    module type [static]"
104 ac_help="$ac_help
105     --enable-ldbm         enable ldbm backend [yes]"
106 ac_help="$ac_help
107     --with-ldbm-api       with LDBM API [auto]"
108 ac_help="$ac_help
109     --with-ldbm-module    module type [static]"
110 ac_help="$ac_help
111     --with-ldbm-type      use LDBM type [auto]"
112 ac_help="$ac_help
113     --enable-meta         enable metadirectory backend [no]"
114 ac_help="$ac_help
115     --with-meta-module    module type [static]"
116 ac_help="$ac_help
117     --enable-monitor      enable monitor backend [no]"
118 ac_help="$ac_help
119     --with-monitor-module         module type [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type [static]"
128 ac_help="$ac_help
129     --enable-shell        enable shell backend [no]"
130 ac_help="$ac_help
131     --with-shell-module   module type [static]"
132 ac_help="$ac_help
133     --enable-sql          enable sql backend [no]"
134 ac_help="$ac_help
135     --with-sql-module     module type [static]"
136 ac_help="$ac_help
137     --enable-tcl          enable tcl backend [no]"
138 ac_help="$ac_help
139     --with-tcl-module     module type [static]"
140 ac_help="$ac_help
141 SLURPD (Replication Daemon) Options:"
142 ac_help="$ac_help
143   --enable-slurpd         enable building slurpd [auto]"
144 ac_help="$ac_help
145 Library Generation & Linking Options"
146 ac_help="$ac_help
147   --enable-static[=PKGS]  build static libraries [default=yes]"
148 ac_help="$ac_help
149   --enable-shared[=PKGS]  build shared libraries [default=yes]"
150 ac_help="$ac_help
151   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
152 ac_help="$ac_help
153   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
154 ac_help="$ac_help
155   --disable-libtool-lock  avoid locking (might break parallel builds)"
156
157 # Initialize some variables set by options.
158 # The variables have the same names as the options, with
159 # dashes changed to underlines.
160 build=NONE
161 cache_file=./config.cache
162 exec_prefix=NONE
163 host=NONE
164 no_create=
165 nonopt=NONE
166 no_recursion=
167 prefix=NONE
168 program_prefix=NONE
169 program_suffix=NONE
170 program_transform_name=s,x,x,
171 silent=
172 site=
173 srcdir=
174 target=NONE
175 verbose=
176 x_includes=NONE
177 x_libraries=NONE
178 bindir='${exec_prefix}/bin'
179 sbindir='${exec_prefix}/sbin'
180 libexecdir='${exec_prefix}/libexec'
181 datadir='${prefix}/share'
182 sysconfdir='${prefix}/etc'
183 sharedstatedir='${prefix}/com'
184 localstatedir='${prefix}/var'
185 libdir='${exec_prefix}/lib'
186 includedir='${prefix}/include'
187 oldincludedir='/usr/include'
188 infodir='${prefix}/info'
189 mandir='${prefix}/man'
190
191 # Initialize some other variables.
192 subdirs=
193 MFLAGS= MAKEFLAGS=
194 SHELL=${CONFIG_SHELL-/bin/sh}
195 # Maximum number of lines to put in a shell here document.
196 ac_max_here_lines=12
197
198 ac_prev=
199 for ac_option
200 do
201
202   # If the previous option needs an argument, assign it.
203   if test -n "$ac_prev"; then
204     eval "$ac_prev=\$ac_option"
205     ac_prev=
206     continue
207   fi
208
209   case "$ac_option" in
210   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
211   *) ac_optarg= ;;
212   esac
213
214   # Accept the important Cygnus configure options, so we can diagnose typos.
215
216   case "$ac_option" in
217
218   -bindir | --bindir | --bindi | --bind | --bin | --bi)
219     ac_prev=bindir ;;
220   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
221     bindir="$ac_optarg" ;;
222
223   -build | --build | --buil | --bui | --bu)
224     ac_prev=build ;;
225   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
226     build="$ac_optarg" ;;
227
228   -cache-file | --cache-file | --cache-fil | --cache-fi \
229   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
230     ac_prev=cache_file ;;
231   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
232   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
233     cache_file="$ac_optarg" ;;
234
235   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
236     ac_prev=datadir ;;
237   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
238   | --da=*)
239     datadir="$ac_optarg" ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
243     # Reject names that are not valid shell variable names.
244     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
245       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
246     fi
247     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
248     eval "enable_${ac_feature}=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
252     # Reject names that are not valid shell variable names.
253     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
254       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
255     fi
256     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
257     case "$ac_option" in
258       *=*) ;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_${ac_feature}='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix="$ac_optarg" ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he)
277     # Omit some internal or obsolete options to make the list less imposing.
278     # This message is too long to be a string in the A/UX 3.1 sh.
279     cat << EOF
280 Usage: configure [options] [host]
281 Options: [defaults in brackets after descriptions]
282 Configuration:
283   --cache-file=FILE       cache test results in FILE
284   --help                  print this message
285   --no-create             do not create output files
286   --quiet, --silent       do not print \`checking...' messages
287   --version               print the version of autoconf that created configure
288 Directory and file names:
289   --prefix=PREFIX         install architecture-independent files in PREFIX
290                           [$ac_default_prefix]
291   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
292                           [same as prefix]
293   --bindir=DIR            user executables in DIR [EPREFIX/bin]
294   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
295   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
296   --datadir=DIR           read-only architecture-independent data in DIR
297                           [PREFIX/share]
298   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
299   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
300                           [PREFIX/com]
301   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
302   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
303   --includedir=DIR        C header files in DIR [PREFIX/include]
304   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
305   --infodir=DIR           info documentation in DIR [PREFIX/info]
306   --mandir=DIR            man documentation in DIR [PREFIX/man]
307   --srcdir=DIR            find the sources in DIR [configure dir or ..]
308   --program-prefix=PREFIX prepend PREFIX to installed program names
309   --program-suffix=SUFFIX append SUFFIX to installed program names
310   --program-transform-name=PROGRAM
311                           run sed PROGRAM on installed program names
312 EOF
313     cat << EOF
314 Host type:
315   --build=BUILD           configure for building on BUILD [BUILD=HOST]
316   --host=HOST             configure for HOST [guessed]
317   --target=TARGET         configure for TARGET [TARGET=HOST]
318 Features and packages:
319   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
320   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
321   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
322   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
323   --x-includes=DIR        X include files are in DIR
324   --x-libraries=DIR       X library files are in DIR
325 EOF
326     if test -n "$ac_help"; then
327       echo "--enable and --with options recognized:$ac_help"
328     fi
329     exit 0 ;;
330
331   -host | --host | --hos | --ho)
332     ac_prev=host ;;
333   -host=* | --host=* | --hos=* | --ho=*)
334     host="$ac_optarg" ;;
335
336   -includedir | --includedir | --includedi | --included | --include \
337   | --includ | --inclu | --incl | --inc)
338     ac_prev=includedir ;;
339   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
340   | --includ=* | --inclu=* | --incl=* | --inc=*)
341     includedir="$ac_optarg" ;;
342
343   -infodir | --infodir | --infodi | --infod | --info | --inf)
344     ac_prev=infodir ;;
345   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
346     infodir="$ac_optarg" ;;
347
348   -libdir | --libdir | --libdi | --libd)
349     ac_prev=libdir ;;
350   -libdir=* | --libdir=* | --libdi=* | --libd=*)
351     libdir="$ac_optarg" ;;
352
353   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
354   | --libexe | --libex | --libe)
355     ac_prev=libexecdir ;;
356   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
357   | --libexe=* | --libex=* | --libe=*)
358     libexecdir="$ac_optarg" ;;
359
360   -localstatedir | --localstatedir | --localstatedi | --localstated \
361   | --localstate | --localstat | --localsta | --localst \
362   | --locals | --local | --loca | --loc | --lo)
363     ac_prev=localstatedir ;;
364   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
365   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
366   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
367     localstatedir="$ac_optarg" ;;
368
369   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
370     ac_prev=mandir ;;
371   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
372     mandir="$ac_optarg" ;;
373
374   -nfp | --nfp | --nf)
375     # Obsolete; use --without-fp.
376     with_fp=no ;;
377
378   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
379   | --no-cr | --no-c)
380     no_create=yes ;;
381
382   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
383   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
384     no_recursion=yes ;;
385
386   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
387   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
388   | --oldin | --oldi | --old | --ol | --o)
389     ac_prev=oldincludedir ;;
390   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
391   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
392   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
393     oldincludedir="$ac_optarg" ;;
394
395   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
396     ac_prev=prefix ;;
397   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
398     prefix="$ac_optarg" ;;
399
400   -program-prefix | --program-prefix | --program-prefi | --program-pref \
401   | --program-pre | --program-pr | --program-p)
402     ac_prev=program_prefix ;;
403   -program-prefix=* | --program-prefix=* | --program-prefi=* \
404   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
405     program_prefix="$ac_optarg" ;;
406
407   -program-suffix | --program-suffix | --program-suffi | --program-suff \
408   | --program-suf | --program-su | --program-s)
409     ac_prev=program_suffix ;;
410   -program-suffix=* | --program-suffix=* | --program-suffi=* \
411   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
412     program_suffix="$ac_optarg" ;;
413
414   -program-transform-name | --program-transform-name \
415   | --program-transform-nam | --program-transform-na \
416   | --program-transform-n | --program-transform- \
417   | --program-transform | --program-transfor \
418   | --program-transfo | --program-transf \
419   | --program-trans | --program-tran \
420   | --progr-tra | --program-tr | --program-t)
421     ac_prev=program_transform_name ;;
422   -program-transform-name=* | --program-transform-name=* \
423   | --program-transform-nam=* | --program-transform-na=* \
424   | --program-transform-n=* | --program-transform-=* \
425   | --program-transform=* | --program-transfor=* \
426   | --program-transfo=* | --program-transf=* \
427   | --program-trans=* | --program-tran=* \
428   | --progr-tra=* | --program-tr=* | --program-t=*)
429     program_transform_name="$ac_optarg" ;;
430
431   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
432   | -silent | --silent | --silen | --sile | --sil)
433     silent=yes ;;
434
435   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
436     ac_prev=sbindir ;;
437   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
438   | --sbi=* | --sb=*)
439     sbindir="$ac_optarg" ;;
440
441   -sharedstatedir | --sharedstatedir | --sharedstatedi \
442   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
443   | --sharedst | --shareds | --shared | --share | --shar \
444   | --sha | --sh)
445     ac_prev=sharedstatedir ;;
446   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
447   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
448   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
449   | --sha=* | --sh=*)
450     sharedstatedir="$ac_optarg" ;;
451
452   -site | --site | --sit)
453     ac_prev=site ;;
454   -site=* | --site=* | --sit=*)
455     site="$ac_optarg" ;;
456
457   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
458     ac_prev=srcdir ;;
459   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
460     srcdir="$ac_optarg" ;;
461
462   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
463   | --syscon | --sysco | --sysc | --sys | --sy)
464     ac_prev=sysconfdir ;;
465   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
466   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
467     sysconfdir="$ac_optarg" ;;
468
469   -target | --target | --targe | --targ | --tar | --ta | --t)
470     ac_prev=target ;;
471   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
472     target="$ac_optarg" ;;
473
474   -v | -verbose | --verbose | --verbos | --verbo | --verb)
475     verbose=yes ;;
476
477   -version | --version | --versio | --versi | --vers)
478     echo "configure generated by autoconf version 2.13.1"
479     exit 0 ;;
480
481   -with-* | --with-*)
482     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
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     case "$ac_option" in
489       *=*) ;;
490       *) ac_optarg=yes ;;
491     esac
492     eval "with_${ac_package}='$ac_optarg'" ;;
493
494   -without-* | --without-*)
495     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
496     # Reject names that are not valid shell variable names.
497     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
498       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
499     fi
500     ac_package=`echo $ac_package| sed 's/-/_/g'`
501     eval "with_${ac_package}=no" ;;
502
503   --x)
504     # Obsolete; use --with-x.
505     with_x=yes ;;
506
507   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
508   | --x-incl | --x-inc | --x-in | --x-i)
509     ac_prev=x_includes ;;
510   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
511   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
512     x_includes="$ac_optarg" ;;
513
514   -x-libraries | --x-libraries | --x-librarie | --x-librari \
515   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
516     ac_prev=x_libraries ;;
517   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
518   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
519     x_libraries="$ac_optarg" ;;
520
521   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
522     ;;
523
524   *)
525     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
526       echo "configure: warning: $ac_option: invalid host type" 1>&2
527     fi
528     if test "x$nonopt" != xNONE; then
529       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
530     fi
531     nonopt="$ac_option"
532     ;;
533
534   esac
535 done
536
537 if test -n "$ac_prev"; then
538   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
539 fi
540
541 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
542
543 # File descriptor usage:
544 # 0 standard input
545 # 1 file creation
546 # 2 errors and warnings
547 # 3 some systems may open it to /dev/tty
548 # 4 used on the Kubota Titan
549 # 6 checking for... messages and results
550 # 5 compiler messages saved in config.log
551 if test "$silent" = yes; then
552   exec 6>/dev/null
553 else
554   exec 6>&1
555 fi
556 exec 5>./config.log
557
558 echo "\
559 This file contains any messages produced by compilers while
560 running configure, to aid debugging if configure makes a mistake.
561 " 1>&5
562
563 # Strip out --no-create and --no-recursion so they do not pile up.
564 # Also quote any args containing shell metacharacters.
565 ac_configure_args=
566 for ac_arg
567 do
568   case "$ac_arg" in
569   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
570   | --no-cr | --no-c) ;;
571   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
572   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
573   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
574   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
575   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
576   esac
577 done
578
579 # NLS nuisances.
580 # Only set these to C if already set.  These must not be set unconditionally
581 # because not all systems understand e.g. LANG=C (notably SCO).
582 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
583 # Non-C LC_CTYPE values break the ctype check.
584 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
585 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
586 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
587 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
588
589 # confdefs.h avoids OS command line length limits that DEFS can exceed.
590 rm -rf conftest* confdefs.h
591 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
592 echo > confdefs.h
593
594 # A filename unique to this package, relative to the directory that
595 # configure is in, which we can look for to find out if srcdir is correct.
596 ac_unique_file=build/version.sh
597
598 # Find the source files, if location was not specified.
599 if test -z "$srcdir"; then
600   ac_srcdir_defaulted=yes
601   # Try the directory containing this script, then its parent.
602   ac_prog=$0
603   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
604   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
605   srcdir=$ac_confdir
606   if test ! -r $srcdir/$ac_unique_file; then
607     srcdir=..
608   fi
609 else
610   ac_srcdir_defaulted=no
611 fi
612 if test ! -r $srcdir/$ac_unique_file; then
613   if test "$ac_srcdir_defaulted" = yes; then
614     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
615   else
616     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
617   fi
618 fi
619 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
620
621 # Prefer explicitly selected file to automatically selected ones.
622 if test -z "$CONFIG_SITE"; then
623   if test "x$prefix" != xNONE; then
624     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
625   else
626     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
627   fi
628 fi
629 for ac_site_file in $CONFIG_SITE; do
630   if test -r "$ac_site_file"; then
631     echo "loading site script $ac_site_file"
632     . "$ac_site_file"
633   fi
634 done
635
636
637 ac_ext=c
638 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
639 ac_cpp='$CPP $CPPFLAGS'
640 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
641 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
642 cross_compiling=$ac_cv_prog_cc_cross
643
644 ac_exeext=
645 ac_objext=o
646 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
647   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
648   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
649     ac_n= ac_c='
650 ' ac_t='        '
651   else
652     ac_n=-n ac_c= ac_t=
653   fi
654 else
655   ac_n= ac_c='\c' ac_t=
656 fi
657
658
659 # set unset (borrowed from autoconf 2.49c)
660 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
661   ol_unset=unset
662 else
663   ol_unset=false
664 fi
665 # unset CDPATH
666 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
667
668 ac_aux_dir=
669 for ac_dir in build $srcdir/build; do
670   if test -f $ac_dir/install-sh; then
671     ac_aux_dir=$ac_dir
672     ac_install_sh="$ac_aux_dir/install-sh -c"
673     break
674   elif test -f $ac_dir/install.sh; then
675     ac_aux_dir=$ac_dir
676     ac_install_sh="$ac_aux_dir/install.sh -c"
677     break
678   elif test -f $ac_dir/shtool; then
679     ac_aux_dir=$ac_dir
680     ac_install_sh="$ac_aux_dir/shtool install -c"
681     break
682   fi
683 done
684 if test -z "$ac_aux_dir"; then
685   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
686 fi
687 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
688 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
689 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
690
691 eval `$ac_aux_dir/version.sh`
692 if test -z "$OL_STRING"; then
693         { echo "configure: error: could not determine version" 1>&2; exit 1; }
694 fi
695
696 echo "Configuring $OL_STRING ..."
697
698
699 echo $ac_n "checking host system type""... $ac_c" 1>&6
700 echo "configure:701: checking host system type" >&5
701 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
702
703 # Make sure we can run config.sub.
704   if $ac_config_sub sun4 >/dev/null 2>&1; then :
705     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
706   fi
707
708   ac_cv_host_alias=$host
709   case "$ac_cv_host_alias" in
710   NONE)
711     case $nonopt in
712     NONE)
713       if ac_cv_host_alias=`$ac_config_guess`; then :
714       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
715       fi ;;
716     *) ac_cv_host_alias=$nonopt ;;
717     esac ;;
718   esac
719
720   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
721   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
722   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
723   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
724 else
725   echo $ac_n "(cached) $ac_c" 1>&6
726 fi
727
728 echo "$ac_t""$ac_cv_host" 1>&6
729
730 host=$ac_cv_host
731 host_alias=$ac_cv_host_alias
732 host_cpu=$ac_cv_host_cpu
733 host_vendor=$ac_cv_host_vendor
734 host_os=$ac_cv_host_os
735
736
737
738
739
740 echo $ac_n "checking target system type""... $ac_c" 1>&6
741 echo "configure:742: checking target system type" >&5
742 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
743
744 # Make sure we can run config.sub.
745   if $ac_config_sub sun4 >/dev/null 2>&1; then :
746     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
747   fi
748
749   ac_cv_target_alias=$target
750   case "$ac_cv_target_alias" in
751   NONE)
752     case $nonopt in
753     NONE)
754       ac_cv_target_alias=$host_alias ;;
755
756     *) ac_cv_target_alias=$nonopt ;;
757     esac ;;
758   esac
759
760   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
761   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
762   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
763   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
764 else
765   echo $ac_n "(cached) $ac_c" 1>&6
766 fi
767
768 echo "$ac_t""$ac_cv_target" 1>&6
769
770 target=$ac_cv_target
771 target_alias=$ac_cv_target_alias
772 target_cpu=$ac_cv_target_cpu
773 target_vendor=$ac_cv_target_vendor
774 target_os=$ac_cv_target_os
775
776
777
778
779
780 echo $ac_n "checking build system type""... $ac_c" 1>&6
781 echo "configure:782: checking build system type" >&5
782 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
783
784 # Make sure we can run config.sub.
785   if $ac_config_sub sun4 >/dev/null 2>&1; then :
786     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
787   fi
788
789   ac_cv_build_alias=$build
790   case "$ac_cv_build_alias" in
791   NONE)
792     case $nonopt in
793     NONE)
794       ac_cv_build_alias=$host_alias ;;
795
796     *) ac_cv_build_alias=$nonopt ;;
797     esac ;;
798   esac
799
800   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
801   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
802   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
803   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
804 else
805   echo $ac_n "(cached) $ac_c" 1>&6
806 fi
807
808 echo "$ac_t""$ac_cv_build" 1>&6
809
810 build=$ac_cv_build
811 build_alias=$ac_cv_build_alias
812 build_cpu=$ac_cv_build_cpu
813 build_vendor=$ac_cv_build_vendor
814 build_os=$ac_cv_build_os
815
816
817
818
819
820 # Do some error checking and defaulting for the host and target type.
821 # The inputs are:
822 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
823 #
824 # The rules are:
825 # 1. You are not allowed to specify --host, --target, and nonopt at the
826 #    same time.
827 # 2. Host defaults to nonopt.
828 # 3. If nonopt is not specified, then host defaults to the current host,
829 #    as determined by config.guess.
830 # 4. Target and build default to nonopt.
831 # 5. If nonopt is not specified, then target and build default to host.
832
833 # The aliases save the names the user supplied, while $host etc.
834 # will get canonicalized.
835 case $host---$target---$nonopt in
836 NONE---*---* | *---NONE---* | *---*---NONE) ;;
837 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
838 esac
839
840 test "$host_alias" != "$target_alias" &&
841   test "$program_prefix$program_suffix$program_transform_name" = \
842     NONENONEs,x,x, &&
843   program_prefix=${target_alias}-
844
845
846 # Find a good install program.  We prefer a C program (faster),
847 # so one script is as good as another.  But avoid the broken or
848 # incompatible versions:
849 # SysV /etc/install, /usr/sbin/install
850 # SunOS /usr/etc/install
851 # IRIX /sbin/install
852 # AIX /bin/install
853 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
854 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
855 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
856 # ./install, which can be erroneously created by make from ./install.sh.
857 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
858 echo "configure:859: checking for a BSD compatible install" >&5
859 if test -z "$INSTALL"; then
860 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
861   echo $ac_n "(cached) $ac_c" 1>&6
862 else
863     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
864   for ac_dir in $PATH; do
865     # Account for people who put trailing slashes in PATH elements.
866     case "$ac_dir/" in
867     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
868     *)
869       # OSF1 and SCO ODT 3.0 have their own names for install.
870       # Don't use installbsd from OSF since it installs stuff as root
871       # by default.
872       for ac_prog in ginstall scoinst install; do
873         if test -f $ac_dir/$ac_prog; then
874           if test $ac_prog = install &&
875             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
876             # AIX install.  It has an incompatible calling convention.
877             :
878           elif test $ac_prog = install &&
879             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
880             # program-specific install script used by HP pwplus--don't use.
881             :
882           else
883             ac_cv_path_install="$ac_dir/$ac_prog -c"
884             break 2
885           fi
886         fi
887       done
888       ;;
889     esac
890   done
891   IFS="$ac_save_IFS"
892
893 fi
894   if test "${ac_cv_path_install+set}" = set; then
895     INSTALL="$ac_cv_path_install"
896   else
897     # As a last resort, use the slow shell script.  We don't cache a
898     # path for INSTALL within a source directory, because that will
899     # break other packages using the cache if that directory is
900     # removed, or if the path is relative.
901     INSTALL="$ac_install_sh"
902   fi
903 fi
904 echo "$ac_t""$INSTALL" 1>&6
905
906 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
907 # It thinks the first close brace ends the variable substitution.
908 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
909
910 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
911
912 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
913
914 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
915 echo "configure:916: checking whether build environment is sane" >&5
916 # Just in case
917 sleep 1
918 echo timestamp > conftestfile
919 # Do `set' in a subshell so we don't clobber the current shell's
920 # arguments.  Must try -L first in case configure is actually a
921 # symlink; some systems play weird games with the mod time of symlinks
922 # (eg FreeBSD returns the mod time of the symlink's containing
923 # directory).
924 if (
925    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
926    if test "$*" = "X"; then
927       # -L didn't work.
928       set X `ls -t $srcdir/configure conftestfile`
929    fi
930    if test "$*" != "X $srcdir/configure conftestfile" \
931       && test "$*" != "X conftestfile $srcdir/configure"; then
932
933       # If neither matched, then we have a broken ls.  This can happen
934       # if, for instance, CONFIG_SHELL is bash and it inherits a
935       # broken ls alias from the environment.  This has actually
936       # happened.  Such a system could not be considered "sane".
937       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
938 alias in your environment" 1>&2; exit 1; }
939    fi
940
941    test "$2" = conftestfile
942    )
943 then
944    # Ok.
945    :
946 else
947    { echo "configure: error: newly created file is older than distributed files!
948 Check your system clock" 1>&2; exit 1; }
949 fi
950 rm -f conftest*
951 echo "$ac_t""yes" 1>&6
952 if test "$program_transform_name" = s,x,x,; then
953   program_transform_name=
954 else
955   # Double any \ or $.  echo might interpret backslashes.
956   cat <<\EOF_SED > conftestsed
957 s,\\,\\\\,g; s,\$,$$,g
958 EOF_SED
959   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
960   rm -f conftestsed
961 fi
962 test "$program_prefix" != NONE &&
963   program_transform_name="s,^,${program_prefix},;$program_transform_name"
964 # Use a double $ so make ignores it.
965 test "$program_suffix" != NONE &&
966   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
967
968 # sed with no file args requires a program.
969 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
970
971 for ac_prog in mawk gawk nawk awk
972 do
973 # Extract the first word of "$ac_prog", so it can be a program name with args.
974 set dummy $ac_prog; ac_word=$2
975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
976 echo "configure:977: checking for $ac_word" >&5
977 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   if test -n "$AWK"; then
981   ac_cv_prog_AWK="$AWK" # Let the user override the test.
982 else
983   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
984   ac_dummy="$PATH"
985   for ac_dir in $ac_dummy; do
986     test -z "$ac_dir" && ac_dir=.
987     if test -f $ac_dir/$ac_word; then
988       ac_cv_prog_AWK="$ac_prog"
989       break
990     fi
991   done
992   IFS="$ac_save_ifs"
993 fi
994 fi
995 AWK="$ac_cv_prog_AWK"
996 if test -n "$AWK"; then
997   echo "$ac_t""$AWK" 1>&6
998 else
999   echo "$ac_t""no" 1>&6
1000 fi
1001
1002 test -n "$AWK" && break
1003 done
1004
1005 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1006 echo "configure:1007: checking whether ${MAKE-make} sets \${MAKE}" >&5
1007 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1008 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1009   echo $ac_n "(cached) $ac_c" 1>&6
1010 else
1011   cat > conftestmake <<\EOF
1012 all:
1013         @echo 'ac_maketemp="${MAKE}"'
1014 EOF
1015 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1016 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1017 if test -n "$ac_maketemp"; then
1018   eval ac_cv_prog_make_${ac_make}_set=yes
1019 else
1020   eval ac_cv_prog_make_${ac_make}_set=no
1021 fi
1022 rm -f conftestmake
1023 fi
1024 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1025   echo "$ac_t""yes" 1>&6
1026   SET_MAKE=
1027 else
1028   echo "$ac_t""no" 1>&6
1029   SET_MAKE="MAKE=${MAKE-make}"
1030 fi
1031
1032
1033
1034 PACKAGE=$OL_PACKAGE
1035
1036 VERSION=$OL_VERSION
1037
1038 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1039   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1040 fi
1041
1042
1043
1044 missing_dir=`cd $ac_aux_dir && pwd`
1045 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working aclocal" >&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 (aclocal --version) < /dev/null > /dev/null 2>&1; then
1051    ACLOCAL=aclocal
1052    echo "$ac_t""found" 1>&6
1053 else
1054    ACLOCAL="$missing_dir/missing aclocal"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working autoconf" >&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 (autoconf --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOCONF=autoconf
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOCONF="$missing_dir/missing autoconf"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working automake" >&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 (automake --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOMAKE=automake
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOMAKE="$missing_dir/missing automake"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working autoheader" >&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 (autoheader --version) < /dev/null > /dev/null 2>&1; then
1090    AUTOHEADER=autoheader
1091    echo "$ac_t""found" 1>&6
1092 else
1093    AUTOHEADER="$missing_dir/missing autoheader"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1098 echo "configure:1099: checking for working makeinfo" >&5
1099 # Run test in a subshell; some versions of sh will print an error if
1100 # an executable is not found, even if stderr is redirected.
1101 # Redirect stdin to placate older versions of autoconf.  Sigh.
1102 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1103    MAKEINFO=makeinfo
1104    echo "$ac_t""found" 1>&6
1105 else
1106    MAKEINFO="$missing_dir/missing makeinfo"
1107    echo "$ac_t""missing" 1>&6
1108 fi
1109
1110 install_sh="$missing_dir/install-sh"
1111 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1112
1113 for ac_prog in gnutar gtar tar
1114 do
1115 # Extract the first word of "$ac_prog", so it can be a program name with args.
1116 set dummy $ac_prog; ac_word=$2
1117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1118 echo "configure:1119: checking for $ac_word" >&5
1119 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1120   echo $ac_n "(cached) $ac_c" 1>&6
1121 else
1122   if test -n "$AMTAR"; then
1123   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1124 else
1125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1126   ac_dummy="$PATH"
1127   for ac_dir in $ac_dummy; do
1128     test -z "$ac_dir" && ac_dir=.
1129     if test -f $ac_dir/$ac_word; then
1130       ac_cv_prog_AMTAR="$ac_prog"
1131       break
1132     fi
1133   done
1134   IFS="$ac_save_ifs"
1135 fi
1136 fi
1137 AMTAR="$ac_cv_prog_AMTAR"
1138 if test -n "$AMTAR"; then
1139   echo "$ac_t""$AMTAR" 1>&6
1140 else
1141   echo "$ac_t""no" 1>&6
1142 fi
1143
1144 test -n "$AMTAR" && break
1145 done
1146
1147
1148 AMTARFLAGS=
1149 if test -n "$AMTAR"; then
1150   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1151         AMTARFLAGS=o
1152   fi
1153 fi
1154
1155 cat >> confdefs.h <<EOF
1156 #define OPENLDAP_PACKAGE "$PACKAGE"
1157 EOF
1158
1159 cat >> confdefs.h <<EOF
1160 #define OPENLDAP_VERSION "$VERSION"
1161 EOF
1162
1163
1164 cat >> confdefs.h <<EOF
1165 #define LDAP_VENDOR_VERSION $OL_API_INC
1166 EOF
1167
1168 cat >> confdefs.h <<EOF
1169 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1170 EOF
1171
1172 cat >> confdefs.h <<EOF
1173 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1174 EOF
1175
1176 cat >> confdefs.h <<EOF
1177 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1178 EOF
1179
1180
1181 OPENLDAP_LIBVERSION=$OL_API_LIB
1182
1183
1184
1185 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1186 echo "configure:1187: checking configure arguments" >&5
1187
1188
1189 top_builddir=`pwd`
1190
1191 ldap_subdir="/openldap"
1192
1193 # Check whether --with-subdir or --without-subdir was given.
1194 if test "${with_subdir+set}" = set; then
1195   withval="$with_subdir"
1196   case "$withval" in
1197         no) ldap_subdir=""
1198                 ;;
1199         yes)
1200                 ;;
1201         /*|\\*)
1202                 ldap_subdir="$withval"
1203                 ;;
1204         *)
1205                 ldap_subdir="/$withval"
1206                 ;;
1207 esac
1208
1209 fi
1210
1211
1212 # OpenLDAP --enable-debug
1213         # Check whether --enable-debug or --disable-debug was given.
1214 if test "${enable_debug+set}" = set; then
1215   enableval="$enable_debug"
1216   
1217         ol_arg=invalid
1218         for ol_val in auto yes no ; do
1219                 if test "$enableval" = "$ol_val" ; then
1220                         ol_arg="$ol_val"
1221                 fi
1222         done
1223         if test "$ol_arg" = "invalid" ; then
1224                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1225         fi
1226         ol_enable_debug="$ol_arg"
1227
1228 else
1229         ol_enable_debug="yes"
1230 fi
1231 # end --enable-debug
1232 # OpenLDAP --enable-syslog
1233         # Check whether --enable-syslog or --disable-syslog was given.
1234 if test "${enable_syslog+set}" = set; then
1235   enableval="$enable_syslog"
1236   
1237         ol_arg=invalid
1238         for ol_val in auto yes no ; do
1239                 if test "$enableval" = "$ol_val" ; then
1240                         ol_arg="$ol_val"
1241                 fi
1242         done
1243         if test "$ol_arg" = "invalid" ; then
1244                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1245         fi
1246         ol_enable_syslog="$ol_arg"
1247
1248 else
1249         ol_enable_syslog="auto"
1250 fi
1251 # end --enable-syslog
1252 # OpenLDAP --enable-proctitle
1253         # Check whether --enable-proctitle or --disable-proctitle was given.
1254 if test "${enable_proctitle+set}" = set; then
1255   enableval="$enable_proctitle"
1256   
1257         ol_arg=invalid
1258         for ol_val in auto yes no ; do
1259                 if test "$enableval" = "$ol_val" ; then
1260                         ol_arg="$ol_val"
1261                 fi
1262         done
1263         if test "$ol_arg" = "invalid" ; then
1264                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1265         fi
1266         ol_enable_proctitle="$ol_arg"
1267
1268 else
1269         ol_enable_proctitle="yes"
1270 fi
1271 # end --enable-proctitle
1272 # OpenLDAP --enable-cache
1273         # Check whether --enable-cache or --disable-cache was given.
1274 if test "${enable_cache+set}" = set; then
1275   enableval="$enable_cache"
1276   
1277         ol_arg=invalid
1278         for ol_val in auto yes no ; do
1279                 if test "$enableval" = "$ol_val" ; then
1280                         ol_arg="$ol_val"
1281                 fi
1282         done
1283         if test "$ol_arg" = "invalid" ; then
1284                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1285         fi
1286         ol_enable_cache="$ol_arg"
1287
1288 else
1289         ol_enable_cache="no"
1290 fi
1291 # end --enable-cache
1292 # OpenLDAP --enable-referrals
1293         # Check whether --enable-referrals or --disable-referrals was given.
1294 if test "${enable_referrals+set}" = set; then
1295   enableval="$enable_referrals"
1296   
1297         ol_arg=invalid
1298         for ol_val in auto yes no ; do
1299                 if test "$enableval" = "$ol_val" ; then
1300                         ol_arg="$ol_val"
1301                 fi
1302         done
1303         if test "$ol_arg" = "invalid" ; then
1304                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1305         fi
1306         ol_enable_referrals="$ol_arg"
1307
1308 else
1309         ol_enable_referrals="no"
1310 fi
1311 # end --enable-referrals
1312 # OpenLDAP --enable-kbind
1313         # Check whether --enable-kbind or --disable-kbind was given.
1314 if test "${enable_kbind+set}" = set; then
1315   enableval="$enable_kbind"
1316   
1317         ol_arg=invalid
1318         for ol_val in auto yes no ; do
1319                 if test "$enableval" = "$ol_val" ; then
1320                         ol_arg="$ol_val"
1321                 fi
1322         done
1323         if test "$ol_arg" = "invalid" ; then
1324                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1325         fi
1326         ol_enable_kbind="$ol_arg"
1327
1328 else
1329         ol_enable_kbind="no"
1330 fi
1331 # end --enable-kbind
1332 # OpenLDAP --enable-ipv6
1333         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1334 if test "${enable_ipv6+set}" = set; then
1335   enableval="$enable_ipv6"
1336   
1337         ol_arg=invalid
1338         for ol_val in auto yes no ; do
1339                 if test "$enableval" = "$ol_val" ; then
1340                         ol_arg="$ol_val"
1341                 fi
1342         done
1343         if test "$ol_arg" = "invalid" ; then
1344                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1345         fi
1346         ol_enable_ipv6="$ol_arg"
1347
1348 else
1349         ol_enable_ipv6="auto"
1350 fi
1351 # end --enable-ipv6
1352 # OpenLDAP --enable-local
1353         # Check whether --enable-local or --disable-local was given.
1354 if test "${enable_local+set}" = set; then
1355   enableval="$enable_local"
1356   
1357         ol_arg=invalid
1358         for ol_val in auto yes no ; do
1359                 if test "$enableval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1365         fi
1366         ol_enable_local="$ol_arg"
1367
1368 else
1369         ol_enable_local="auto"
1370 fi
1371 # end --enable-local
1372 # OpenLDAP --enable-rewrite
1373         # Check whether --enable-rewrite or --disable-rewrite was given.
1374 if test "${enable_rewrite+set}" = set; then
1375   enableval="$enable_rewrite"
1376   
1377         ol_arg=invalid
1378         for ol_val in auto yes no ; do
1379                 if test "$enableval" = "$ol_val" ; then
1380                         ol_arg="$ol_val"
1381                 fi
1382         done
1383         if test "$ol_arg" = "invalid" ; then
1384                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1385         fi
1386         ol_enable_rewrite="$ol_arg"
1387
1388 else
1389         ol_enable_rewrite="no"
1390 fi
1391 # end --enable-rewrite
1392 # OpenLDAP --enable-x_compile
1393         # Check whether --enable-x_compile or --disable-x_compile was given.
1394 if test "${enable_x_compile+set}" = set; then
1395   enableval="$enable_x_compile"
1396   
1397         ol_arg=invalid
1398         for ol_val in yes no ; do
1399                 if test "$enableval" = "$ol_val" ; then
1400                         ol_arg="$ol_val"
1401                 fi
1402         done
1403         if test "$ol_arg" = "invalid" ; then
1404                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1405         fi
1406         ol_enable_x_compile="$ol_arg"
1407
1408 else
1409         ol_enable_x_compile="no"
1410 fi
1411 # end --enable-x_compile
1412
1413
1414 # OpenLDAP --with-cyrus_sasl
1415         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1416 if test "${with_cyrus_sasl+set}" = set; then
1417   withval="$with_cyrus_sasl"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no  ; do
1421                 if test "$withval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1427         fi
1428         ol_with_cyrus_sasl="$ol_arg"
1429
1430 else
1431         ol_with_cyrus_sasl="auto"
1432 fi
1433 # end --with-cyrus_sasl
1434
1435 # OpenLDAP --with-fetch
1436         # Check whether --with-fetch or --without-fetch was given.
1437 if test "${with_fetch+set}" = set; then
1438   withval="$with_fetch"
1439   
1440         ol_arg=invalid
1441         for ol_val in auto yes no  ; do
1442                 if test "$withval" = "$ol_val" ; then
1443                         ol_arg="$ol_val"
1444                 fi
1445         done
1446         if test "$ol_arg" = "invalid" ; then
1447                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1448         fi
1449         ol_with_fetch="$ol_arg"
1450
1451 else
1452         ol_with_fetch="auto"
1453 fi
1454 # end --with-fetch
1455
1456 # OpenLDAP --with-kerberos
1457         # Check whether --with-kerberos or --without-kerberos was given.
1458 if test "${with_kerberos+set}" = set; then
1459   withval="$with_kerberos"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1463                 if test "$withval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1469         fi
1470         ol_with_kerberos="$ol_arg"
1471
1472 else
1473         ol_with_kerberos="auto"
1474 fi
1475 # end --with-kerberos
1476
1477 # OpenLDAP --with-readline
1478         # Check whether --with-readline or --without-readline was given.
1479 if test "${with_readline+set}" = set; then
1480   withval="$with_readline"
1481   
1482         ol_arg=invalid
1483         for ol_val in auto yes no  ; do
1484                 if test "$withval" = "$ol_val" ; then
1485                         ol_arg="$ol_val"
1486                 fi
1487         done
1488         if test "$ol_arg" = "invalid" ; then
1489                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1490         fi
1491         ol_with_readline="$ol_arg"
1492
1493 else
1494         ol_with_readline="auto"
1495 fi
1496 # end --with-readline
1497
1498 # OpenLDAP --with-threads
1499         # Check whether --with-threads or --without-threads was given.
1500 if test "${with_threads+set}" = set; then
1501   withval="$with_threads"
1502   
1503         ol_arg=invalid
1504         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1505                 if test "$withval" = "$ol_val" ; then
1506                         ol_arg="$ol_val"
1507                 fi
1508         done
1509         if test "$ol_arg" = "invalid" ; then
1510                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1511         fi
1512         ol_with_threads="$ol_arg"
1513
1514 else
1515         ol_with_threads="auto"
1516 fi
1517 # end --with-threads
1518
1519 # OpenLDAP --with-tls
1520         # Check whether --with-tls or --without-tls was given.
1521 if test "${with_tls+set}" = set; then
1522   withval="$with_tls"
1523   
1524         ol_arg=invalid
1525         for ol_val in auto ssleay openssl yes no  ; do
1526                 if test "$withval" = "$ol_val" ; then
1527                         ol_arg="$ol_val"
1528                 fi
1529         done
1530         if test "$ol_arg" = "invalid" ; then
1531                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1532         fi
1533         ol_with_tls="$ol_arg"
1534
1535 else
1536         ol_with_tls="auto"
1537 fi
1538 # end --with-tls
1539
1540 # OpenLDAP --with-yielding_select
1541         # Check whether --with-yielding_select or --without-yielding_select was given.
1542 if test "${with_yielding_select+set}" = set; then
1543   withval="$with_yielding_select"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no manual  ; do
1547                 if test "$withval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1553         fi
1554         ol_with_yielding_select="$ol_arg"
1555
1556 else
1557         ol_with_yielding_select="auto"
1558 fi
1559 # end --with-yielding_select
1560
1561
1562
1563 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1564 if test "${with_xxslapdoptions+set}" = set; then
1565   withval="$with_xxslapdoptions"
1566   :
1567 fi
1568
1569 # OpenLDAP --enable-slapd
1570         # Check whether --enable-slapd or --disable-slapd was given.
1571 if test "${enable_slapd+set}" = set; then
1572   enableval="$enable_slapd"
1573   
1574         ol_arg=invalid
1575         for ol_val in auto yes no ; do
1576                 if test "$enableval" = "$ol_val" ; then
1577                         ol_arg="$ol_val"
1578                 fi
1579         done
1580         if test "$ol_arg" = "invalid" ; then
1581                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1582         fi
1583         ol_enable_slapd="$ol_arg"
1584
1585 else
1586         ol_enable_slapd="yes"
1587 fi
1588 # end --enable-slapd
1589 # OpenLDAP --enable-aci
1590         # Check whether --enable-aci or --disable-aci was given.
1591 if test "${enable_aci+set}" = set; then
1592   enableval="$enable_aci"
1593   
1594         ol_arg=invalid
1595         for ol_val in auto yes no ; do
1596                 if test "$enableval" = "$ol_val" ; then
1597                         ol_arg="$ol_val"
1598                 fi
1599         done
1600         if test "$ol_arg" = "invalid" ; then
1601                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1602         fi
1603         ol_enable_aci="$ol_arg"
1604
1605 else
1606         ol_enable_aci="no"
1607 fi
1608 # end --enable-aci
1609 # OpenLDAP --enable-cleartext
1610         # Check whether --enable-cleartext or --disable-cleartext was given.
1611 if test "${enable_cleartext+set}" = set; then
1612   enableval="$enable_cleartext"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no ; do
1616                 if test "$enableval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1622         fi
1623         ol_enable_cleartext="$ol_arg"
1624
1625 else
1626         ol_enable_cleartext="yes"
1627 fi
1628 # end --enable-cleartext
1629 # OpenLDAP --enable-crypt
1630         # Check whether --enable-crypt or --disable-crypt was given.
1631 if test "${enable_crypt+set}" = set; then
1632   enableval="$enable_crypt"
1633   
1634         ol_arg=invalid
1635         for ol_val in auto yes no ; do
1636                 if test "$enableval" = "$ol_val" ; then
1637                         ol_arg="$ol_val"
1638                 fi
1639         done
1640         if test "$ol_arg" = "invalid" ; then
1641                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1642         fi
1643         ol_enable_crypt="$ol_arg"
1644
1645 else
1646         ol_enable_crypt="no"
1647 fi
1648 # end --enable-crypt
1649 # OpenLDAP --enable-dynamic
1650         # Check whether --enable-dynamic or --disable-dynamic was given.
1651 if test "${enable_dynamic+set}" = set; then
1652   enableval="$enable_dynamic"
1653   
1654         ol_arg=invalid
1655         for ol_val in auto yes no ; do
1656                 if test "$enableval" = "$ol_val" ; then
1657                         ol_arg="$ol_val"
1658                 fi
1659         done
1660         if test "$ol_arg" = "invalid" ; then
1661                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1662         fi
1663         ol_enable_dynamic="$ol_arg"
1664
1665 else
1666         ol_enable_dynamic="no"
1667 fi
1668 # end --enable-dynamic
1669 # OpenLDAP --enable-kpasswd
1670         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1671 if test "${enable_kpasswd+set}" = set; then
1672   enableval="$enable_kpasswd"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1682         fi
1683         ol_enable_kpasswd="$ol_arg"
1684
1685 else
1686         ol_enable_kpasswd="no"
1687 fi
1688 # end --enable-kpasswd
1689 # OpenLDAP --enable-lmpasswd
1690         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1691 if test "${enable_lmpasswd+set}" = set; then
1692   enableval="$enable_lmpasswd"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1702         fi
1703         ol_enable_lmpasswd="$ol_arg"
1704
1705 else
1706         ol_enable_lmpasswd="no"
1707 fi
1708 # end --enable-lmpasswd
1709 # OpenLDAP --enable-spasswd
1710         # Check whether --enable-spasswd or --disable-spasswd was given.
1711 if test "${enable_spasswd+set}" = set; then
1712   enableval="$enable_spasswd"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1722         fi
1723         ol_enable_spasswd="$ol_arg"
1724
1725 else
1726         ol_enable_spasswd="no"
1727 fi
1728 # end --enable-spasswd
1729 # OpenLDAP --enable-modules
1730         # Check whether --enable-modules or --disable-modules was given.
1731 if test "${enable_modules+set}" = set; then
1732   enableval="$enable_modules"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1742         fi
1743         ol_enable_modules="$ol_arg"
1744
1745 else
1746         ol_enable_modules="no"
1747 fi
1748 # end --enable-modules
1749 # OpenLDAP --enable-phonetic
1750         # Check whether --enable-phonetic or --disable-phonetic was given.
1751 if test "${enable_phonetic+set}" = set; then
1752   enableval="$enable_phonetic"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1762         fi
1763         ol_enable_phonetic="$ol_arg"
1764
1765 else
1766         ol_enable_phonetic="no"
1767 fi
1768 # end --enable-phonetic
1769 # OpenLDAP --enable-rlookups
1770         # Check whether --enable-rlookups or --disable-rlookups was given.
1771 if test "${enable_rlookups+set}" = set; then
1772   enableval="$enable_rlookups"
1773   
1774         ol_arg=invalid
1775         for ol_val in auto yes no ; do
1776                 if test "$enableval" = "$ol_val" ; then
1777                         ol_arg="$ol_val"
1778                 fi
1779         done
1780         if test "$ol_arg" = "invalid" ; then
1781                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1782         fi
1783         ol_enable_rlookups="$ol_arg"
1784
1785 else
1786         ol_enable_rlookups="no"
1787 fi
1788 # end --enable-rlookups
1789 # OpenLDAP --enable-slp
1790         # Check whether --enable-slp or --disable-slp was given.
1791 if test "${enable_slp+set}" = set; then
1792   enableval="$enable_slp"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1802         fi
1803         ol_enable_slp="$ol_arg"
1804
1805 else
1806         ol_enable_slp="no"
1807 fi
1808 # end --enable-slp
1809 # OpenLDAP --enable-wrappers
1810         # Check whether --enable-wrappers or --disable-wrappers was given.
1811 if test "${enable_wrappers+set}" = set; then
1812   enableval="$enable_wrappers"
1813   
1814         ol_arg=invalid
1815         for ol_val in auto yes no ; do
1816                 if test "$enableval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1822         fi
1823         ol_enable_wrappers="$ol_arg"
1824
1825 else
1826         ol_enable_wrappers="no"
1827 fi
1828 # end --enable-wrappers
1829
1830 # OpenLDAP --enable-bdb
1831         # Check whether --enable-bdb or --disable-bdb was given.
1832 if test "${enable_bdb+set}" = set; then
1833   enableval="$enable_bdb"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1843         fi
1844         ol_enable_bdb="$ol_arg"
1845
1846 else
1847         ol_enable_bdb="no"
1848 fi
1849 # end --enable-bdb
1850 # OpenLDAP --with-bdb_module
1851         # Check whether --with-bdb_module or --without-bdb_module was given.
1852 if test "${with_bdb_module+set}" = set; then
1853   withval="$with_bdb_module"
1854   
1855         ol_arg=invalid
1856         for ol_val in static dynamic ; do
1857                 if test "$withval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1863         fi
1864         ol_with_bdb_module="$ol_arg"
1865
1866 else
1867         ol_with_bdb_module="static"
1868 fi
1869 # end --with-bdb_module
1870
1871 # OpenLDAP --enable-dnssrv
1872         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1873 if test "${enable_dnssrv+set}" = set; then
1874   enableval="$enable_dnssrv"
1875   
1876         ol_arg=invalid
1877         for ol_val in auto yes no ; do
1878                 if test "$enableval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1884         fi
1885         ol_enable_dnssrv="$ol_arg"
1886
1887 else
1888         ol_enable_dnssrv="no"
1889 fi
1890 # end --enable-dnssrv
1891 # OpenLDAP --with-dnssrv_module
1892         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1893 if test "${with_dnssrv_module+set}" = set; then
1894   withval="$with_dnssrv_module"
1895   
1896         ol_arg=invalid
1897         for ol_val in static dynamic ; do
1898                 if test "$withval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1904         fi
1905         ol_with_dnssrv_module="$ol_arg"
1906
1907 else
1908         ol_with_dnssrv_module="static"
1909 fi
1910 # end --with-dnssrv_module
1911
1912 # OpenLDAP --enable-ldap
1913         # Check whether --enable-ldap or --disable-ldap was given.
1914 if test "${enable_ldap+set}" = set; then
1915   enableval="$enable_ldap"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto yes no ; do
1919                 if test "$enableval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1925         fi
1926         ol_enable_ldap="$ol_arg"
1927
1928 else
1929         ol_enable_ldap="no"
1930 fi
1931 # end --enable-ldap
1932 # OpenLDAP --with-ldap_module
1933         # Check whether --with-ldap_module or --without-ldap_module was given.
1934 if test "${with_ldap_module+set}" = set; then
1935   withval="$with_ldap_module"
1936   
1937         ol_arg=invalid
1938         for ol_val in static dynamic ; do
1939                 if test "$withval" = "$ol_val" ; then
1940                         ol_arg="$ol_val"
1941                 fi
1942         done
1943         if test "$ol_arg" = "invalid" ; then
1944                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1945         fi
1946         ol_with_ldap_module="$ol_arg"
1947
1948 else
1949         ol_with_ldap_module="static"
1950 fi
1951 # end --with-ldap_module
1952
1953 # OpenLDAP --enable-ldbm
1954         # Check whether --enable-ldbm or --disable-ldbm was given.
1955 if test "${enable_ldbm+set}" = set; then
1956   enableval="$enable_ldbm"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1966         fi
1967         ol_enable_ldbm="$ol_arg"
1968
1969 else
1970         ol_enable_ldbm="yes"
1971 fi
1972 # end --enable-ldbm
1973 # OpenLDAP --with-ldbm_api
1974         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1975 if test "${with_ldbm_api+set}" = set; then
1976   withval="$with_ldbm_api"
1977   
1978         ol_arg=invalid
1979         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1980                 if test "$withval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1986         fi
1987         ol_with_ldbm_api="$ol_arg"
1988
1989 else
1990         ol_with_ldbm_api="auto"
1991 fi
1992 # end --with-ldbm_api
1993
1994 # OpenLDAP --with-ldbm_module
1995         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1996 if test "${with_ldbm_module+set}" = set; then
1997   withval="$with_ldbm_module"
1998   
1999         ol_arg=invalid
2000         for ol_val in static dynamic ; do
2001                 if test "$withval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2007         fi
2008         ol_with_ldbm_module="$ol_arg"
2009
2010 else
2011         ol_with_ldbm_module="static"
2012 fi
2013 # end --with-ldbm_module
2014
2015 # OpenLDAP --with-ldbm_type
2016         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2017 if test "${with_ldbm_type+set}" = set; then
2018   withval="$with_ldbm_type"
2019   
2020         ol_arg=invalid
2021         for ol_val in auto btree hash ; do
2022                 if test "$withval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2028         fi
2029         ol_with_ldbm_type="$ol_arg"
2030
2031 else
2032         ol_with_ldbm_type="auto"
2033 fi
2034 # end --with-ldbm_type
2035
2036 # OpenLDAP --enable-meta
2037         # Check whether --enable-meta or --disable-meta was given.
2038 if test "${enable_meta+set}" = set; then
2039   enableval="$enable_meta"
2040   
2041         ol_arg=invalid
2042         for ol_val in auto yes no ; do
2043                 if test "$enableval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2049         fi
2050         ol_enable_meta="$ol_arg"
2051
2052 else
2053         ol_enable_meta="no"
2054 fi
2055 # end --enable-meta
2056 # OpenLDAP --with-meta_module
2057         # Check whether --with-meta_module or --without-meta_module was given.
2058 if test "${with_meta_module+set}" = set; then
2059   withval="$with_meta_module"
2060   
2061         ol_arg=invalid
2062         for ol_val in static dynamic ; do
2063                 if test "$withval" = "$ol_val" ; then
2064                         ol_arg="$ol_val"
2065                 fi
2066         done
2067         if test "$ol_arg" = "invalid" ; then
2068                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2069         fi
2070         ol_with_meta_module="$ol_arg"
2071
2072 else
2073         ol_with_meta_module="static"
2074 fi
2075 # end --with-meta_module
2076
2077 # OpenLDAP --enable-monitor
2078         # Check whether --enable-monitor or --disable-monitor was given.
2079 if test "${enable_monitor+set}" = set; then
2080   enableval="$enable_monitor"
2081   
2082         ol_arg=invalid
2083         for ol_val in auto yes no ; do
2084                 if test "$enableval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2090         fi
2091         ol_enable_monitor="$ol_arg"
2092
2093 else
2094         ol_enable_monitor="no"
2095 fi
2096 # end --enable-monitor
2097 # OpenLDAP --with-monitor_module
2098         # Check whether --with-monitor_module or --without-monitor_module was given.
2099 if test "${with_monitor_module+set}" = set; then
2100   withval="$with_monitor_module"
2101   
2102         ol_arg=invalid
2103         for ol_val in static dynamic ; do
2104                 if test "$withval" = "$ol_val" ; then
2105                         ol_arg="$ol_val"
2106                 fi
2107         done
2108         if test "$ol_arg" = "invalid" ; then
2109                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2110         fi
2111         ol_with_monitor_module="$ol_arg"
2112
2113 else
2114         ol_with_monitor_module="static"
2115 fi
2116 # end --with-monitor_module
2117
2118 # OpenLDAP --enable-passwd
2119         # Check whether --enable-passwd or --disable-passwd was given.
2120 if test "${enable_passwd+set}" = set; then
2121   enableval="$enable_passwd"
2122   
2123         ol_arg=invalid
2124         for ol_val in auto yes no ; do
2125                 if test "$enableval" = "$ol_val" ; then
2126                         ol_arg="$ol_val"
2127                 fi
2128         done
2129         if test "$ol_arg" = "invalid" ; then
2130                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2131         fi
2132         ol_enable_passwd="$ol_arg"
2133
2134 else
2135         ol_enable_passwd="no"
2136 fi
2137 # end --enable-passwd
2138 # OpenLDAP --with-passwd_module
2139         # Check whether --with-passwd_module or --without-passwd_module was given.
2140 if test "${with_passwd_module+set}" = set; then
2141   withval="$with_passwd_module"
2142   
2143         ol_arg=invalid
2144         for ol_val in static dynamic ; do
2145                 if test "$withval" = "$ol_val" ; then
2146                         ol_arg="$ol_val"
2147                 fi
2148         done
2149         if test "$ol_arg" = "invalid" ; then
2150                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2151         fi
2152         ol_with_passwd_module="$ol_arg"
2153
2154 else
2155         ol_with_passwd_module="static"
2156 fi
2157 # end --with-passwd_module
2158
2159 # OpenLDAP --enable-perl
2160         # Check whether --enable-perl or --disable-perl was given.
2161 if test "${enable_perl+set}" = set; then
2162   enableval="$enable_perl"
2163   
2164         ol_arg=invalid
2165         for ol_val in auto yes no ; do
2166                 if test "$enableval" = "$ol_val" ; then
2167                         ol_arg="$ol_val"
2168                 fi
2169         done
2170         if test "$ol_arg" = "invalid" ; then
2171                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2172         fi
2173         ol_enable_perl="$ol_arg"
2174
2175 else
2176         ol_enable_perl="no"
2177 fi
2178 # end --enable-perl
2179 # OpenLDAP --with-perl_module
2180         # Check whether --with-perl_module or --without-perl_module was given.
2181 if test "${with_perl_module+set}" = set; then
2182   withval="$with_perl_module"
2183   
2184         ol_arg=invalid
2185         for ol_val in static dynamic ; do
2186                 if test "$withval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2192         fi
2193         ol_with_perl_module="$ol_arg"
2194
2195 else
2196         ol_with_perl_module="static"
2197 fi
2198 # end --with-perl_module
2199
2200 # OpenLDAP --enable-shell
2201         # Check whether --enable-shell or --disable-shell was given.
2202 if test "${enable_shell+set}" = set; then
2203   enableval="$enable_shell"
2204   
2205         ol_arg=invalid
2206         for ol_val in auto yes no ; do
2207                 if test "$enableval" = "$ol_val" ; then
2208                         ol_arg="$ol_val"
2209                 fi
2210         done
2211         if test "$ol_arg" = "invalid" ; then
2212                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2213         fi
2214         ol_enable_shell="$ol_arg"
2215
2216 else
2217         ol_enable_shell="no"
2218 fi
2219 # end --enable-shell
2220 # OpenLDAP --with-shell_module
2221         # Check whether --with-shell_module or --without-shell_module was given.
2222 if test "${with_shell_module+set}" = set; then
2223   withval="$with_shell_module"
2224   
2225         ol_arg=invalid
2226         for ol_val in static dynamic ; do
2227                 if test "$withval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2233         fi
2234         ol_with_shell_module="$ol_arg"
2235
2236 else
2237         ol_with_shell_module="static"
2238 fi
2239 # end --with-shell_module
2240
2241 # OpenLDAP --enable-sql
2242         # Check whether --enable-sql or --disable-sql was given.
2243 if test "${enable_sql+set}" = set; then
2244   enableval="$enable_sql"
2245   
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2254         fi
2255         ol_enable_sql="$ol_arg"
2256
2257 else
2258         ol_enable_sql="no"
2259 fi
2260 # end --enable-sql
2261 # OpenLDAP --with-sql_module
2262         # Check whether --with-sql_module or --without-sql_module was given.
2263 if test "${with_sql_module+set}" = set; then
2264   withval="$with_sql_module"
2265   
2266         ol_arg=invalid
2267         for ol_val in static dynamic ; do
2268                 if test "$withval" = "$ol_val" ; then
2269                         ol_arg="$ol_val"
2270                 fi
2271         done
2272         if test "$ol_arg" = "invalid" ; then
2273                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2274         fi
2275         ol_with_sql_module="$ol_arg"
2276
2277 else
2278         ol_with_sql_module="static"
2279 fi
2280 # end --with-sql_module
2281
2282 # OpenLDAP --enable-tcl
2283         # Check whether --enable-tcl or --disable-tcl was given.
2284 if test "${enable_tcl+set}" = set; then
2285   enableval="$enable_tcl"
2286   
2287         ol_arg=invalid
2288         for ol_val in auto yes no ; do
2289                 if test "$enableval" = "$ol_val" ; then
2290                         ol_arg="$ol_val"
2291                 fi
2292         done
2293         if test "$ol_arg" = "invalid" ; then
2294                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2295         fi
2296         ol_enable_tcl="$ol_arg"
2297
2298 else
2299         ol_enable_tcl="no"
2300 fi
2301 # end --enable-tcl
2302 # OpenLDAP --with-tcl_module
2303         # Check whether --with-tcl_module or --without-tcl_module was given.
2304 if test "${with_tcl_module+set}" = set; then
2305   withval="$with_tcl_module"
2306   
2307         ol_arg=invalid
2308         for ol_val in static dynamic ; do
2309                 if test "$withval" = "$ol_val" ; then
2310                         ol_arg="$ol_val"
2311                 fi
2312         done
2313         if test "$ol_arg" = "invalid" ; then
2314                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2315         fi
2316         ol_with_tcl_module="$ol_arg"
2317
2318 else
2319         ol_with_tcl_module="static"
2320 fi
2321 # end --with-tcl_module
2322
2323
2324 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2325 if test "${with_xxslurpdoptions+set}" = set; then
2326   withval="$with_xxslurpdoptions"
2327   :
2328 fi
2329
2330 # OpenLDAP --enable-slurpd
2331         # Check whether --enable-slurpd or --disable-slurpd was given.
2332 if test "${enable_slurpd+set}" = set; then
2333   enableval="$enable_slurpd"
2334   
2335         ol_arg=invalid
2336         for ol_val in auto yes no ; do
2337                 if test "$enableval" = "$ol_val" ; then
2338                         ol_arg="$ol_val"
2339                 fi
2340         done
2341         if test "$ol_arg" = "invalid" ; then
2342                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2343         fi
2344         ol_enable_slurpd="$ol_arg"
2345
2346 else
2347         ol_enable_slurpd="auto"
2348 fi
2349 # end --enable-slurpd
2350
2351 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2352 if test "${with_xxliboptions+set}" = set; then
2353   withval="$with_xxliboptions"
2354   :
2355 fi
2356
2357 # Check whether --enable-static or --disable-static was given.
2358 if test "${enable_static+set}" = set; then
2359   enableval="$enable_static"
2360   p=${PACKAGE-default}
2361 case "$enableval" in
2362 yes) enable_static=yes ;;
2363 no) enable_static=no ;;
2364 *)
2365   enable_static=no
2366   # Look at the argument we got.  We use all the common list separators.
2367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2368   for pkg in $enableval; do
2369     if test "X$pkg" = "X$p"; then
2370       enable_static=yes
2371     fi
2372   done
2373   IFS="$ac_save_ifs"
2374   ;;
2375 esac
2376 else
2377   enable_static=yes
2378 fi
2379
2380 # Check whether --enable-shared or --disable-shared was given.
2381 if test "${enable_shared+set}" = set; then
2382   enableval="$enable_shared"
2383   p=${PACKAGE-default}
2384 case "$enableval" in
2385 yes) enable_shared=yes ;;
2386 no) enable_shared=no ;;
2387 *)
2388   enable_shared=no
2389   # Look at the argument we got.  We use all the common list separators.
2390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2391   for pkg in $enableval; do
2392     if test "X$pkg" = "X$p"; then
2393       enable_shared=yes
2394     fi
2395   done
2396   IFS="$ac_save_ifs"
2397   ;;
2398 esac
2399 else
2400   enable_shared=yes
2401 fi
2402
2403
2404
2405 # validate options
2406 if test $ol_enable_slapd = no ; then
2407                 if test $ol_enable_bdb = yes ; then
2408                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2409         fi
2410         if test $ol_enable_dnssrv = yes ; then
2411                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2412         fi
2413         if test $ol_enable_ldap = yes ; then
2414                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2415         fi
2416         if test $ol_enable_ldbm = yes ; then
2417                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2418         fi
2419         if test $ol_enable_meta = yes ; then
2420                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2421         fi
2422         if test $ol_enable_module = yes ; then
2423                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2424         fi
2425         if test $ol_enable_passwd = yes ; then
2426                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2427         fi
2428         if test $ol_enable_perl = yes ; then
2429                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2430         fi
2431         if test $ol_enable_shell = yes ; then
2432                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2433         fi
2434         if test $ol_enable_tcl = yes ; then
2435                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2436         fi
2437         if test $ol_enable_sql = yes ; then
2438                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2439         fi
2440         if test $ol_enable_modules = yes ; then
2441                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2442         fi
2443         if test $ol_enable_wrappers = yes ; then
2444                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2445         fi
2446         if test $ol_enable_phonetic = yes ; then
2447                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2448         fi
2449         if test $ol_enable_rlookups = yes ; then
2450                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2451         fi
2452         if test $ol_enable_aci = yes ; then
2453                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2454         fi
2455         if test $ol_with_ldbm_api != auto ; then
2456                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2457         fi
2458         if test $ol_with_ldbm_type != auto ; then
2459                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2460         fi
2461         if test $ol_with_bdb_module != static ; then
2462                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2463         fi
2464         if test $ol_with_dnssrv_module != static ; then
2465                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2466         fi
2467         if test $ol_with_ldap_module != static ; then
2468                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2469         fi
2470         if test $ol_with_ldbm_module != static ; then
2471                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2472         fi
2473         if test $ol_with_meta_module != static ; then
2474                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2475         fi
2476         if test $ol_with_monitor_module != static ; then
2477                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2478         fi
2479         if test $ol_with_passwd_module != static ; then
2480                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2481         fi
2482         if test $ol_with_perl_module != static ; then
2483                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2484         fi
2485         if test $ol_with_shell_module != static ; then
2486                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2487         fi
2488         if test $ol_with_tcl_module != static ; then
2489                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2490         fi
2491         if test $ol_with_sql_module != static ; then
2492                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2493         fi
2494         if test $ol_enable_slurpd = yes ; then
2495                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2496         fi
2497         if test $ol_enable_rewrite = yes ; then
2498                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2499         fi
2500
2501         # force settings to no
2502         ol_enable_bdb=no
2503         ol_enable_dnssrv=no
2504         ol_enable_ldap=no
2505         ol_enable_ldbm=no
2506         ol_enable_meta=no
2507         ol_enable_monitor=no
2508         ol_enable_passwd=no
2509         ol_enable_perl=no
2510         ol_enable_shell=no
2511         ol_enable_tcl=no
2512         ol_enable_sql=no
2513
2514         ol_enable_modules=no
2515         ol_enable_phonetic=no
2516         ol_enable_rlookups=no
2517         ol_enable_aci=no
2518         ol_enable_wrappers=no
2519         ol_enable_dynamic=no
2520
2521         ol_with_ldbm_api=no
2522         ol_with_ldbm_type=no
2523
2524         ol_with_bdb_module=static
2525         ol_with_dnssrv_module=static
2526         ol_with_ldap_module=static
2527         ol_with_ldbm_module=static
2528         ol_with_meta_module=static
2529         ol_with_monitor_module=static
2530         ol_with_passwd_module=static
2531         ol_with_perl_module=static
2532         ol_with_shell_module=static
2533         ol_with_tcl_module=static
2534         ol_with_sql_module=static
2535
2536         ol_enable_slurpd=no
2537
2538         ol_enable_rewrite=no
2539
2540 elif test $ol_enable_ldbm = no ; then
2541         
2542         if test $ol_with_ldbm_api != auto ; then
2543                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2544         fi
2545
2546         if test $ol_with_ldbm_type != auto ; then
2547                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2548         fi
2549
2550         if test $ol_with_ldbm_module != static ; then
2551                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2552         fi
2553
2554         if test $ol_enable_modules != yes -a \
2555                 $ol_enable_bdb = no -a \
2556                 $ol_enable_dnssrv = no -a \
2557                 $ol_enable_ldap = no -a \
2558                 $ol_enable_meta = no -a \
2559                 $ol_enable_monitor = no -a \
2560                 $ol_enable_passwd = no -a \
2561                 $ol_enable_perl = no -a \
2562                 $ol_enable_shell = no -a \
2563                 $ol_enable_sql = no -a \
2564                 $ol_enable_tcl = no ; then
2565
2566                 if test $ol_enable_slapd = yes ; then
2567                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2568                 else
2569                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2570                         ol_enable_slapd=no
2571                 fi
2572         fi
2573
2574         ol_with_ldbm_api=no
2575         ol_with_ldbm_type=no
2576         ol_with_ldbm_module=static
2577
2578         if test $ol_enable_bdb != no ; then
2579                 ol_with_ldbm_api=berkeley
2580         fi
2581
2582 else
2583                 if test $ol_with_ldbm_api = gdbm -a \
2584                 $ol_with_ldbm_type = btree ; then
2585                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2586         fi
2587         if test $ol_with_ldbm_api = mdbm -a \
2588                 $ol_with_ldbm_type = btree ; then
2589                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2590         fi
2591         if test $ol_with_ldbm_api = ndbm -a \
2592                 $ol_with_ldbm_type = btree ; then
2593                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2594         fi
2595
2596         if test $ol_enable_bdb = yes ; then
2597                 if test $ol_with_ldbm_api = auto ; then
2598                         ol_with_ldbm_api=berkeley
2599                 elif test $ol_with_ldbm_api != berkeley ; then
2600                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2601                 fi
2602
2603         elif test $ol_enable_bdb = auto ; then
2604                 if test $ol_with_ldbm_api != berkeley \
2605                         -o $ol_with_ldbm_api != auto ; then
2606                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2607                         ol_enable_bdb=no
2608                 fi
2609         fi
2610 fi
2611
2612 if test $ol_enable_slurpd = yes ; then
2613                 if test $ol_with_threads = no ; then
2614                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2615         fi
2616 fi
2617
2618 if test $ol_enable_lmpasswd = yes ; then
2619         if test $ol_with_tls = no ; then
2620                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2621         fi
2622 fi
2623
2624 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2625         if test $ol_with_kerberos = no ; then
2626                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2627         fi
2628         ol_with_kerberos=yes
2629 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2630         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2631                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2632         fi
2633         ol_with_kerberos=no
2634 fi
2635
2636 if test $ol_enable_spasswd = yes ; then
2637         if test $ol_with_cyrus_sasl = no ; then
2638                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2639         fi
2640         ol_with_cyrus_sasl=yes
2641 fi
2642
2643 echo "$ac_t""done" 1>&6
2644
2645 LDAP_LIBS=
2646 LDIF_LIBS=
2647 LDBM_LIBS=
2648 LTHREAD_LIBS=
2649 LUTIL_LIBS=
2650
2651 SLAPD_LIBS=
2652 SLURPD_LIBS=
2653
2654 BUILD_SLAPD=no
2655 BUILD_SLURPD=no
2656
2657 BUILD_THREAD=no
2658
2659 BUILD_BDB=no
2660 BUILD_DNSSRV=no
2661 BUILD_LDAP=no
2662 BUILD_LDBM=no
2663 BUILD_META=no
2664 BUILD_MONITOR=no
2665 BUILD_PASSWD=no
2666 BUILD_PERL=no
2667 BUILD_SHELL=no
2668 BUILD_SQL=no
2669 BUILD_TCL=no
2670
2671 BUILD_BDB_DYNAMIC=static
2672 BUILD_DNSSRV_DYNAMIC=static
2673 BUILD_LDAP_DYNAMIC=static
2674 BUILD_LDBM_DYNAMIC=static
2675 BUILD_META_DYNAMIC=static
2676 BUILD_MONITOR_DYNAMIC=static
2677 BUILD_PASSWD_DYNAMIC=static
2678 BUILD_PERL_DYNAMIC=static
2679 BUILD_SHELL_DYNAMIC=static
2680 BUILD_TCL_DYNAMIC=static
2681 BUILD_SQL_DYNAMIC=static
2682
2683 SLAPD_MODULES_LDFLAGS=
2684 SLAPD_MODULES_CPPFLAGS=
2685 SLAPD_MODULES_LIST=
2686
2687 SLAPD_PERL_LDFLAGS=
2688 MOD_PERL_LDFLAGS=
2689 PERL_CPPFLAGS=
2690
2691 SLAPD_SQL_LDFLAGS=
2692 SLAPD_SQL_LIBS=
2693 SLAPD_SQL_INCLUDES=
2694
2695 MOD_TCL_LIB=
2696 KRB4_LIBS=
2697 KRB5_LIBS=
2698 READLINE_LIBS=
2699 SASL_LIBS=
2700 TERMCAP_LIBS=
2701 TLS_LIBS=
2702 MODULES_LIBS=
2703 AUTH_LIBS=
2704
2705 SLAPD_SLP_LIBS=
2706
2707
2708
2709 cat >> confdefs.h <<\EOF
2710 #define HAVE_MKVERSION 1
2711 EOF
2712
2713
2714
2715
2716 ol_aix_threads=no
2717 case "$target" in
2718 *-*-aix*)       if test -z "$CC" ; then
2719                 case "$ol_with_threads" in
2720                 auto | yes |  posix) ol_aix_threads=yes ;;
2721                 esac
2722         fi
2723 ;;
2724 esac
2725
2726 if test $ol_aix_threads = yes ; then
2727         if test -z "${CC}" ; then
2728                 for ac_prog in cc_r xlc_r cc
2729 do
2730 # Extract the first word of "$ac_prog", so it can be a program name with args.
2731 set dummy $ac_prog; ac_word=$2
2732 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2733 echo "configure:2734: checking for $ac_word" >&5
2734 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2735   echo $ac_n "(cached) $ac_c" 1>&6
2736 else
2737   if test -n "$CC"; then
2738   ac_cv_prog_CC="$CC" # Let the user override the test.
2739 else
2740   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2741   ac_dummy="$PATH"
2742   for ac_dir in $ac_dummy; do
2743     test -z "$ac_dir" && ac_dir=.
2744     if test -f $ac_dir/$ac_word; then
2745       ac_cv_prog_CC="$ac_prog"
2746       break
2747     fi
2748   done
2749   IFS="$ac_save_ifs"
2750 fi
2751 fi
2752 CC="$ac_cv_prog_CC"
2753 if test -n "$CC"; then
2754   echo "$ac_t""$CC" 1>&6
2755 else
2756   echo "$ac_t""no" 1>&6
2757 fi
2758
2759 test -n "$CC" && break
2760 done
2761
2762
2763                 if test "$CC" = cc ; then
2764                                                 if test $ol_with_threads != auto ; then
2765                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2766                         else
2767                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2768                         fi
2769                         ol_with_threads=no
2770                 fi
2771         fi
2772
2773         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2774                 ol_with_threads=posix
2775                 ol_cv_pthread_create=yes
2776         fi
2777 fi
2778
2779 if test -z "${CC}"; then
2780         for ac_prog in cc
2781 do
2782 # Extract the first word of "$ac_prog", so it can be a program name with args.
2783 set dummy $ac_prog; ac_word=$2
2784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2785 echo "configure:2786: checking for $ac_word" >&5
2786 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2787   echo $ac_n "(cached) $ac_c" 1>&6
2788 else
2789   if test -n "$CC"; then
2790   ac_cv_prog_CC="$CC" # Let the user override the test.
2791 else
2792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2793   ac_dummy="$PATH"
2794   for ac_dir in $ac_dummy; do
2795     test -z "$ac_dir" && ac_dir=.
2796     if test -f $ac_dir/$ac_word; then
2797       ac_cv_prog_CC="$ac_prog"
2798       break
2799     fi
2800   done
2801   IFS="$ac_save_ifs"
2802 fi
2803 fi
2804 CC="$ac_cv_prog_CC"
2805 if test -n "$CC"; then
2806   echo "$ac_t""$CC" 1>&6
2807 else
2808   echo "$ac_t""no" 1>&6
2809 fi
2810
2811 test -n "$CC" && break
2812 done
2813
2814 fi
2815
2816
2817
2818
2819 # Check whether --enable-fast-install or --disable-fast-install was given.
2820 if test "${enable_fast_install+set}" = set; then
2821   enableval="$enable_fast_install"
2822   p=${PACKAGE-default}
2823 case "$enableval" in
2824 yes) enable_fast_install=yes ;;
2825 no) enable_fast_install=no ;;
2826 *)
2827   enable_fast_install=no
2828   # Look at the argument we got.  We use all the common list separators.
2829   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2830   for pkg in $enableval; do
2831     if test "X$pkg" = "X$p"; then
2832       enable_fast_install=yes
2833     fi
2834   done
2835   IFS="$ac_save_ifs"
2836   ;;
2837 esac
2838 else
2839   enable_fast_install=yes
2840 fi
2841
2842 # Extract the first word of "ranlib", so it can be a program name with args.
2843 set dummy ranlib; ac_word=$2
2844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2845 echo "configure:2846: checking for $ac_word" >&5
2846 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2847   echo $ac_n "(cached) $ac_c" 1>&6
2848 else
2849   if test -n "$RANLIB"; then
2850   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2851 else
2852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2853   ac_dummy="$PATH"
2854   for ac_dir in $ac_dummy; do
2855     test -z "$ac_dir" && ac_dir=.
2856     if test -f $ac_dir/$ac_word; then
2857       ac_cv_prog_RANLIB="ranlib"
2858       break
2859     fi
2860   done
2861   IFS="$ac_save_ifs"
2862   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2863 fi
2864 fi
2865 RANLIB="$ac_cv_prog_RANLIB"
2866 if test -n "$RANLIB"; then
2867   echo "$ac_t""$RANLIB" 1>&6
2868 else
2869   echo "$ac_t""no" 1>&6
2870 fi
2871
2872 # Extract the first word of "gcc", so it can be a program name with args.
2873 set dummy gcc; ac_word=$2
2874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2875 echo "configure:2876: checking for $ac_word" >&5
2876 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   if test -n "$CC"; then
2880   ac_cv_prog_CC="$CC" # Let the user override the test.
2881 else
2882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2883   ac_dummy="$PATH"
2884   for ac_dir in $ac_dummy; do
2885     test -z "$ac_dir" && ac_dir=.
2886     if test -f $ac_dir/$ac_word; then
2887       ac_cv_prog_CC="gcc"
2888       break
2889     fi
2890   done
2891   IFS="$ac_save_ifs"
2892 fi
2893 fi
2894 CC="$ac_cv_prog_CC"
2895 if test -n "$CC"; then
2896   echo "$ac_t""$CC" 1>&6
2897 else
2898   echo "$ac_t""no" 1>&6
2899 fi
2900
2901 if test -z "$CC"; then
2902   # Extract the first word of "cc", so it can be a program name with args.
2903 set dummy cc; ac_word=$2
2904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2905 echo "configure:2906: checking for $ac_word" >&5
2906 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2907   echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909   if test -n "$CC"; then
2910   ac_cv_prog_CC="$CC" # Let the user override the test.
2911 else
2912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2913   ac_prog_rejected=no
2914   ac_dummy="$PATH"
2915   for ac_dir in $ac_dummy; do
2916     test -z "$ac_dir" && ac_dir=.
2917     if test -f $ac_dir/$ac_word; then
2918       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2919         ac_prog_rejected=yes
2920         continue
2921       fi
2922       ac_cv_prog_CC="cc"
2923       break
2924     fi
2925   done
2926   IFS="$ac_save_ifs"
2927 if test $ac_prog_rejected = yes; then
2928   # We found a bogon in the path, so make sure we never use it.
2929   set dummy $ac_cv_prog_CC
2930   shift
2931   if test $# -gt 0; then
2932     # We chose a different compiler from the bogus one.
2933     # However, it has the same basename, so the bogon will be chosen
2934     # first if we set CC to just the basename; use the full file name.
2935     shift
2936     set dummy "$ac_dir/$ac_word" "$@"
2937     shift
2938     ac_cv_prog_CC="$@"
2939   fi
2940 fi
2941 fi
2942 fi
2943 CC="$ac_cv_prog_CC"
2944 if test -n "$CC"; then
2945   echo "$ac_t""$CC" 1>&6
2946 else
2947   echo "$ac_t""no" 1>&6
2948 fi
2949
2950   if test -z "$CC"; then
2951     case "`uname -s`" in
2952     *win32* | *WIN32* | *CYGWIN*)
2953       # Extract the first word of "cl", so it can be a program name with args.
2954 set dummy cl; ac_word=$2
2955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2956 echo "configure:2957: checking for $ac_word" >&5
2957 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2958   echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960   if test -n "$CC"; then
2961   ac_cv_prog_CC="$CC" # Let the user override the test.
2962 else
2963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2964   ac_dummy="$PATH"
2965   for ac_dir in $ac_dummy; do
2966     test -z "$ac_dir" && ac_dir=.
2967     if test -f $ac_dir/$ac_word; then
2968       ac_cv_prog_CC="cl"
2969       break
2970     fi
2971   done
2972   IFS="$ac_save_ifs"
2973 fi
2974 fi
2975 CC="$ac_cv_prog_CC"
2976 if test -n "$CC"; then
2977   echo "$ac_t""$CC" 1>&6
2978 else
2979   echo "$ac_t""no" 1>&6
2980 fi
2981  ;;
2982     esac
2983   fi
2984   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2985 fi
2986
2987 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2988 echo "configure:2989: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2989
2990 ac_ext=c
2991 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2992 ac_cpp='$CPP $CPPFLAGS'
2993 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2994 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2995 cross_compiling=$ac_cv_prog_cc_cross
2996
2997 cat > conftest.$ac_ext << EOF
2998
2999 #line 3000 "configure"
3000 #include "confdefs.h"
3001
3002 main(){return(0);}
3003 EOF
3004 if { (eval echo configure:3005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3005   ac_cv_prog_cc_works=yes
3006   # If we can't run a trivial program, we are probably using a cross compiler.
3007   if (./conftest; exit) 2>/dev/null; then
3008     ac_cv_prog_cc_cross=no
3009   else
3010     ac_cv_prog_cc_cross=yes
3011   fi
3012 else
3013   echo "configure: failed program was:" >&5
3014   cat conftest.$ac_ext >&5
3015   ac_cv_prog_cc_works=no
3016 fi
3017 rm -fr conftest*
3018 ac_ext=c
3019 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3020 ac_cpp='$CPP $CPPFLAGS'
3021 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3022 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3023 cross_compiling=$ac_cv_prog_cc_cross
3024
3025 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3026 if test $ac_cv_prog_cc_works = no; then
3027   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3028 fi
3029 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3030 echo "configure:3031: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3031 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3032 cross_compiling=$ac_cv_prog_cc_cross
3033
3034 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3035 echo "configure:3036: checking whether we are using GNU C" >&5
3036 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3037   echo $ac_n "(cached) $ac_c" 1>&6
3038 else
3039   cat > conftest.c <<EOF
3040 #ifdef __GNUC__
3041   yes;
3042 #endif
3043 EOF
3044 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3045   ac_cv_prog_gcc=yes
3046 else
3047   ac_cv_prog_gcc=no
3048 fi
3049 fi
3050
3051 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3052
3053 if test $ac_cv_prog_gcc = yes; then
3054   GCC=yes
3055 else
3056   GCC=
3057 fi
3058
3059 ac_test_CFLAGS="${CFLAGS+set}"
3060 ac_save_CFLAGS="$CFLAGS"
3061 CFLAGS=
3062 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3063 echo "configure:3064: checking whether ${CC-cc} accepts -g" >&5
3064 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3065   echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067   echo 'void f(){}' > conftest.c
3068 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3069   ac_cv_prog_cc_g=yes
3070 else
3071   ac_cv_prog_cc_g=no
3072 fi
3073 rm -f conftest*
3074
3075 fi
3076
3077 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3078 if test "$ac_test_CFLAGS" = set; then
3079   CFLAGS="$ac_save_CFLAGS"
3080 elif test $ac_cv_prog_cc_g = yes; then
3081   if test "$GCC" = yes; then
3082     CFLAGS="-g -O2"
3083   else
3084     CFLAGS="-g"
3085   fi
3086 else
3087   if test "$GCC" = yes; then
3088     CFLAGS="-O2"
3089   else
3090     CFLAGS=
3091   fi
3092 fi
3093
3094 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3095 if test "${with_gnu_ld+set}" = set; then
3096   withval="$with_gnu_ld"
3097   test "$withval" = no || with_gnu_ld=yes
3098 else
3099   with_gnu_ld=no
3100 fi
3101
3102 ac_prog=ld
3103 if test "$ac_cv_prog_gcc" = yes; then
3104   # Check if gcc -print-prog-name=ld gives a path.
3105   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3106 echo "configure:3107: checking for ld used by GCC" >&5
3107   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3108   case "$ac_prog" in
3109     # Accept absolute paths.
3110     [\\/]* | [A-Za-z]:[\\/]*)
3111       re_direlt='/[^/][^/]*/\.\./'
3112       # Canonicalize the path of ld
3113       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3114       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3115         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3116       done
3117       test -z "$LD" && LD="$ac_prog"
3118       ;;
3119   "")
3120     # If it fails, then pretend we aren't using GCC.
3121     ac_prog=ld
3122     ;;
3123   *)
3124     # If it is relative, then search for the first ld in PATH.
3125     with_gnu_ld=unknown
3126     ;;
3127   esac
3128 elif test "$with_gnu_ld" = yes; then
3129   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3130 echo "configure:3131: checking for GNU ld" >&5
3131 else
3132   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3133 echo "configure:3134: checking for non-GNU ld" >&5
3134 fi
3135 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3136   echo $ac_n "(cached) $ac_c" 1>&6
3137 else
3138   if test -z "$LD"; then
3139   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3140   for ac_dir in $PATH; do
3141     test -z "$ac_dir" && ac_dir=.
3142     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3143       ac_cv_path_LD="$ac_dir/$ac_prog"
3144       # Check to see if the program is GNU ld.  I'd rather use --version,
3145       # but apparently some GNU ld's only accept -v.
3146       # Break only if it was the GNU/non-GNU ld that we prefer.
3147       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3148         test "$with_gnu_ld" != no && break
3149       else
3150         test "$with_gnu_ld" != yes && break
3151       fi
3152     fi
3153   done
3154   IFS="$ac_save_ifs"
3155 else
3156   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3157 fi
3158 fi
3159
3160 LD="$ac_cv_path_LD"
3161 if test -n "$LD"; then
3162   echo "$ac_t""$LD" 1>&6
3163 else
3164   echo "$ac_t""no" 1>&6
3165 fi
3166 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3167 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3168 echo "configure:3169: checking if the linker ($LD) is GNU ld" >&5
3169 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3170   echo $ac_n "(cached) $ac_c" 1>&6
3171 else
3172   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3173 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3174   ac_cv_prog_gnu_ld=yes
3175 else
3176   ac_cv_prog_gnu_ld=no
3177 fi
3178 fi
3179
3180 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3181
3182
3183 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3184 echo "configure:3185: checking for BSD-compatible nm" >&5
3185 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3186   echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3188   if test -n "$NM"; then
3189   # Let the user override the test.
3190   ac_cv_path_NM="$NM"
3191 else
3192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3193   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3194     test -z "$ac_dir" && ac_dir=.
3195     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3196       # Check to see if the nm accepts a BSD-compat flag.
3197       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3198       #   nm: unknown option "B" ignored
3199       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3200         ac_cv_path_NM="$ac_dir/nm -B"
3201         break
3202       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3203         ac_cv_path_NM="$ac_dir/nm -p"
3204         break
3205       else
3206         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3207         continue # so that we can try to find one that supports BSD flags
3208       fi
3209     fi
3210   done
3211   IFS="$ac_save_ifs"
3212   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3213 fi
3214 fi
3215
3216 NM="$ac_cv_path_NM"
3217 echo "$ac_t""$NM" 1>&6
3218
3219 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3220 echo "configure:3221: checking whether ln -s works" >&5
3221 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3222   echo $ac_n "(cached) $ac_c" 1>&6
3223 else
3224   rm -f conftestdata
3225 if ln -s X conftestdata 2>/dev/null
3226 then
3227   rm -f conftestdata
3228   ac_cv_prog_LN_S="ln -s"
3229 else
3230   ac_cv_prog_LN_S=ln
3231 fi
3232 fi
3233 LN_S="$ac_cv_prog_LN_S"
3234 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3235   echo "$ac_t""yes" 1>&6
3236 else
3237   echo "$ac_t""no" 1>&6
3238 fi
3239
3240 if test $host != $build; then
3241   ac_tool_prefix=${host_alias}-
3242 else
3243   ac_tool_prefix=
3244 fi
3245
3246
3247 case "$target" in
3248 NONE) lt_target="$host" ;;
3249 *) lt_target="$target" ;;
3250 esac
3251
3252 # Check for any special flags to pass to ltconfig.
3253 libtool_flags="--cache-file=$cache_file"
3254 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3255 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3256 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3257 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3258 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3259 libtool_flags="$libtool_flags --enable-dlopen"
3260 libtool_flags="$libtool_flags --enable-win32-dll"
3261 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3262 if test "${enable_libtool_lock+set}" = set; then
3263   enableval="$enable_libtool_lock"
3264   :
3265 fi
3266
3267 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3268 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3269
3270 # Some flags need to be propagated to the compiler or linker for good
3271 # libtool support.
3272 case "$lt_target" in
3273 *-*-irix6*)
3274   # Find out which ABI we are using.
3275   echo '#line 3276 "configure"' > conftest.$ac_ext
3276   if { (eval echo configure:3277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3277     case "`/usr/bin/file conftest.o`" in
3278     *32-bit*)
3279       LD="${LD-ld} -32"
3280       ;;
3281     *N32*)
3282       LD="${LD-ld} -n32"
3283       ;;
3284     *64-bit*)
3285       LD="${LD-ld} -64"
3286       ;;
3287     esac
3288   fi
3289   rm -rf conftest*
3290   ;;
3291
3292 *-*-sco3.2v5*)
3293   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3294   SAVE_CFLAGS="$CFLAGS"
3295   CFLAGS="$CFLAGS -belf"
3296   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3297 echo "configure:3298: checking whether the C compiler needs -belf" >&5
3298 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3299   echo $ac_n "(cached) $ac_c" 1>&6
3300 else
3301   cat > conftest.$ac_ext <<EOF
3302 #line 3303 "configure"
3303 #include "confdefs.h"
3304
3305 int main() {
3306
3307 ; return 0; }
3308 EOF
3309 if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3310   rm -rf conftest*
3311   lt_cv_cc_needs_belf=yes
3312 else
3313   echo "configure: failed program was:" >&5
3314   cat conftest.$ac_ext >&5
3315   rm -rf conftest*
3316   lt_cv_cc_needs_belf=no
3317 fi
3318 rm -f conftest*
3319 fi
3320
3321 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3322   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3323     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3324     CFLAGS="$SAVE_CFLAGS"
3325   fi
3326   ;;
3327
3328 *-*-cygwin* | *-*-mingw*)
3329   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3330 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3331 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3332 echo "configure:3333: checking for $ac_word" >&5
3333 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3334   echo $ac_n "(cached) $ac_c" 1>&6
3335 else
3336   if test -n "$DLLTOOL"; then
3337   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3338 else
3339   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3340   ac_dummy="$PATH"
3341   for ac_dir in $ac_dummy; do
3342     test -z "$ac_dir" && ac_dir=.
3343     if test -f $ac_dir/$ac_word; then
3344       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3345       break
3346     fi
3347   done
3348   IFS="$ac_save_ifs"
3349 fi
3350 fi
3351 DLLTOOL="$ac_cv_prog_DLLTOOL"
3352 if test -n "$DLLTOOL"; then
3353   echo "$ac_t""$DLLTOOL" 1>&6
3354 else
3355   echo "$ac_t""no" 1>&6
3356 fi
3357
3358
3359 if test -z "$ac_cv_prog_DLLTOOL"; then
3360 if test -n "$ac_tool_prefix"; then
3361   # Extract the first word of "dlltool", so it can be a program name with args.
3362 set dummy dlltool; ac_word=$2
3363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3364 echo "configure:3365: checking for $ac_word" >&5
3365 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3366   echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368   if test -n "$DLLTOOL"; then
3369   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3370 else
3371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3372   ac_dummy="$PATH"
3373   for ac_dir in $ac_dummy; do
3374     test -z "$ac_dir" && ac_dir=.
3375     if test -f $ac_dir/$ac_word; then
3376       ac_cv_prog_DLLTOOL="dlltool"
3377       break
3378     fi
3379   done
3380   IFS="$ac_save_ifs"
3381   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3382 fi
3383 fi
3384 DLLTOOL="$ac_cv_prog_DLLTOOL"
3385 if test -n "$DLLTOOL"; then
3386   echo "$ac_t""$DLLTOOL" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 else
3392   DLLTOOL="false"
3393 fi
3394 fi
3395
3396   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3397 set dummy ${ac_tool_prefix}as; ac_word=$2
3398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3399 echo "configure:3400: checking for $ac_word" >&5
3400 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   if test -n "$AS"; then
3404   ac_cv_prog_AS="$AS" # Let the user override the test.
3405 else
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_dummy="$PATH"
3408   for ac_dir in $ac_dummy; do
3409     test -z "$ac_dir" && ac_dir=.
3410     if test -f $ac_dir/$ac_word; then
3411       ac_cv_prog_AS="${ac_tool_prefix}as"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416 fi
3417 fi
3418 AS="$ac_cv_prog_AS"
3419 if test -n "$AS"; then
3420   echo "$ac_t""$AS" 1>&6
3421 else
3422   echo "$ac_t""no" 1>&6
3423 fi
3424
3425
3426 if test -z "$ac_cv_prog_AS"; then
3427 if test -n "$ac_tool_prefix"; then
3428   # Extract the first word of "as", so it can be a program name with args.
3429 set dummy as; ac_word=$2
3430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3431 echo "configure:3432: checking for $ac_word" >&5
3432 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3433   echo $ac_n "(cached) $ac_c" 1>&6
3434 else
3435   if test -n "$AS"; then
3436   ac_cv_prog_AS="$AS" # Let the user override the test.
3437 else
3438   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3439   ac_dummy="$PATH"
3440   for ac_dir in $ac_dummy; do
3441     test -z "$ac_dir" && ac_dir=.
3442     if test -f $ac_dir/$ac_word; then
3443       ac_cv_prog_AS="as"
3444       break
3445     fi
3446   done
3447   IFS="$ac_save_ifs"
3448   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3449 fi
3450 fi
3451 AS="$ac_cv_prog_AS"
3452 if test -n "$AS"; then
3453   echo "$ac_t""$AS" 1>&6
3454 else
3455   echo "$ac_t""no" 1>&6
3456 fi
3457
3458 else
3459   AS="false"
3460 fi
3461 fi
3462
3463   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3464 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3465 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3466 echo "configure:3467: checking for $ac_word" >&5
3467 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   if test -n "$OBJDUMP"; then
3471   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3472 else
3473   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3474   ac_dummy="$PATH"
3475   for ac_dir in $ac_dummy; do
3476     test -z "$ac_dir" && ac_dir=.
3477     if test -f $ac_dir/$ac_word; then
3478       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3479       break
3480     fi
3481   done
3482   IFS="$ac_save_ifs"
3483 fi
3484 fi
3485 OBJDUMP="$ac_cv_prog_OBJDUMP"
3486 if test -n "$OBJDUMP"; then
3487   echo "$ac_t""$OBJDUMP" 1>&6
3488 else
3489   echo "$ac_t""no" 1>&6
3490 fi
3491
3492
3493 if test -z "$ac_cv_prog_OBJDUMP"; then
3494 if test -n "$ac_tool_prefix"; then
3495   # Extract the first word of "objdump", so it can be a program name with args.
3496 set dummy objdump; ac_word=$2
3497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3498 echo "configure:3499: checking for $ac_word" >&5
3499 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3500   echo $ac_n "(cached) $ac_c" 1>&6
3501 else
3502   if test -n "$OBJDUMP"; then
3503   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3504 else
3505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3506   ac_dummy="$PATH"
3507   for ac_dir in $ac_dummy; do
3508     test -z "$ac_dir" && ac_dir=.
3509     if test -f $ac_dir/$ac_word; then
3510       ac_cv_prog_OBJDUMP="objdump"
3511       break
3512     fi
3513   done
3514   IFS="$ac_save_ifs"
3515   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3516 fi
3517 fi
3518 OBJDUMP="$ac_cv_prog_OBJDUMP"
3519 if test -n "$OBJDUMP"; then
3520   echo "$ac_t""$OBJDUMP" 1>&6
3521 else
3522   echo "$ac_t""no" 1>&6
3523 fi
3524
3525 else
3526   OBJDUMP="false"
3527 fi
3528 fi
3529
3530   ;;
3531
3532 esac
3533
3534
3535 # Save cache, so that ltconfig can load it
3536
3537
3538 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3539 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3540 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3541 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3542 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3543 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3544 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3545 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3546
3547 # Reload cache, that may have been modified by ltconfig
3548
3549
3550 # This can be used to rebuild libtool when needed
3551 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3552
3553 # Always use our own libtool.
3554 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3555
3556 # Redirect the config.log output again, so that the ltconfig log is not
3557 # clobbered by the next message.
3558 exec 5>>./config.log
3559
3560
3561 for ac_prog in mawk gawk nawk awk
3562 do
3563 # Extract the first word of "$ac_prog", so it can be a program name with args.
3564 set dummy $ac_prog; ac_word=$2
3565 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3566 echo "configure:3567: checking for $ac_word" >&5
3567 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   if test -n "$AWK"; then
3571   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3572 else
3573   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3574   ac_dummy="$PATH"
3575   for ac_dir in $ac_dummy; do
3576     test -z "$ac_dir" && ac_dir=.
3577     if test -f $ac_dir/$ac_word; then
3578       ac_cv_prog_AWK="$ac_prog"
3579       break
3580     fi
3581   done
3582   IFS="$ac_save_ifs"
3583 fi
3584 fi
3585 AWK="$ac_cv_prog_AWK"
3586 if test -n "$AWK"; then
3587   echo "$ac_t""$AWK" 1>&6
3588 else
3589   echo "$ac_t""no" 1>&6
3590 fi
3591
3592 test -n "$AWK" && break
3593 done
3594
3595 # test for ln hardlink support
3596 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3597 echo "configure:3598: checking whether ln works" >&5
3598 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   rm -f conftest.src conftest.dst
3602 echo "conftest" > conftest.src
3603 if ln conftest.src conftest.dst 2>/dev/null
3604 then
3605   ol_cv_prog_LN_H="ln"
3606 else
3607   ol_cv_prog_LN_H="cp"
3608 fi
3609 rm -f conftest.src conftest.dst
3610
3611 fi
3612 LN_H="$ol_cv_prog_LN_H"
3613 if test "$ol_cv_prog_LN_H" = "ln"; then
3614         echo "$ac_t""yes" 1>&6
3615 else
3616         echo "$ac_t""no" 1>&6
3617 fi
3618
3619 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3620 echo "configure:3621: checking whether ln -s works" >&5
3621 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3622   echo $ac_n "(cached) $ac_c" 1>&6
3623 else
3624   rm -f conftestdata
3625 if ln -s X conftestdata 2>/dev/null
3626 then
3627   rm -f conftestdata
3628   ac_cv_prog_LN_S="ln -s"
3629 else
3630   ac_cv_prog_LN_S=ln
3631 fi
3632 fi
3633 LN_S="$ac_cv_prog_LN_S"
3634 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3635   echo "$ac_t""yes" 1>&6
3636 else
3637   echo "$ac_t""no" 1>&6
3638 fi
3639
3640
3641 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3642         LN_S="$LN_H"
3643 fi
3644
3645 # Extract the first word of "sendmail", so it can be a program name with args.
3646 set dummy sendmail; ac_word=$2
3647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3648 echo "configure:3649: checking for $ac_word" >&5
3649 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3650   echo $ac_n "(cached) $ac_c" 1>&6
3651 else
3652   case "$SENDMAIL" in
3653   /*)
3654   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3655   ;;
3656   ?:/*)
3657   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3658   ;;
3659   *)
3660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3661   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3662   for ac_dir in $ac_dummy; do 
3663     test -z "$ac_dir" && ac_dir=.
3664     if test -f $ac_dir/$ac_word; then
3665       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3666       break
3667     fi
3668   done
3669   IFS="$ac_save_ifs"
3670   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3671   ;;
3672 esac
3673 fi
3674 SENDMAIL="$ac_cv_path_SENDMAIL"
3675 if test -n "$SENDMAIL"; then
3676   echo "$ac_t""$SENDMAIL" 1>&6
3677 else
3678   echo "$ac_t""no" 1>&6
3679 fi
3680
3681 # Extract the first word of "vi", so it can be a program name with args.
3682 set dummy vi; ac_word=$2
3683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3684 echo "configure:3685: checking for $ac_word" >&5
3685 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3686   echo $ac_n "(cached) $ac_c" 1>&6
3687 else
3688   case "$EDITOR" in
3689   /*)
3690   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3691   ;;
3692   ?:/*)
3693   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3694   ;;
3695   *)
3696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3697   ac_dummy="$PATH:/usr/ucb"
3698   for ac_dir in $ac_dummy; do 
3699     test -z "$ac_dir" && ac_dir=.
3700     if test -f $ac_dir/$ac_word; then
3701       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3702       break
3703     fi
3704   done
3705   IFS="$ac_save_ifs"
3706   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3707   ;;
3708 esac
3709 fi
3710 EDITOR="$ac_cv_path_EDITOR"
3711 if test -n "$EDITOR"; then
3712   echo "$ac_t""$EDITOR" 1>&6
3713 else
3714   echo "$ac_t""no" 1>&6
3715 fi
3716
3717 # Extract the first word of "finger", so it can be a program name with args.
3718 set dummy finger; ac_word=$2
3719 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3720 echo "configure:3721: checking for $ac_word" >&5
3721 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3722   echo $ac_n "(cached) $ac_c" 1>&6
3723 else
3724   case "$FINGER" in
3725   /*)
3726   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3727   ;;
3728   ?:/*)
3729   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3730   ;;
3731   *)
3732   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3733   ac_dummy="$PATH:/usr/ucb"
3734   for ac_dir in $ac_dummy; do 
3735     test -z "$ac_dir" && ac_dir=.
3736     if test -f $ac_dir/$ac_word; then
3737       ac_cv_path_FINGER="$ac_dir/$ac_word"
3738       break
3739     fi
3740   done
3741   IFS="$ac_save_ifs"
3742   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3743   ;;
3744 esac
3745 fi
3746 FINGER="$ac_cv_path_FINGER"
3747 if test -n "$FINGER"; then
3748   echo "$ac_t""$FINGER" 1>&6
3749 else
3750   echo "$ac_t""no" 1>&6
3751 fi
3752
3753
3754 ol_link_perl=no
3755 if test $ol_enable_perl != no ; then
3756         # Extract the first word of "perl", so it can be a program name with args.
3757 set dummy perl; ac_word=$2
3758 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3759 echo "configure:3760: checking for $ac_word" >&5
3760 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3761   echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763   case "$PERLBIN" in
3764   /*)
3765   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3766   ;;
3767   ?:/*)
3768   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3769   ;;
3770   *)
3771   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3772   ac_dummy="$PATH"
3773   for ac_dir in $ac_dummy; do 
3774     test -z "$ac_dir" && ac_dir=.
3775     if test -f $ac_dir/$ac_word; then
3776       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3777       break
3778     fi
3779   done
3780   IFS="$ac_save_ifs"
3781   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3782   ;;
3783 esac
3784 fi
3785 PERLBIN="$ac_cv_path_PERLBIN"
3786 if test -n "$PERLBIN"; then
3787   echo "$ac_t""$PERLBIN" 1>&6
3788 else
3789   echo "$ac_t""no" 1>&6
3790 fi
3791
3792
3793         if test "no$PERLBIN" = "no" ; then
3794                 if test $ol_enable_perl = yes ; then
3795                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3796                 fi
3797
3798         else
3799                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3800                 if test x"$ol_with_perl_module" = "xstatic" ; then
3801                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3802                 else
3803                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3804                 fi
3805                                 ol_link_perl=yes
3806         fi
3807 fi
3808
3809 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3810 echo "configure:3811: checking how to run the C preprocessor" >&5
3811 # On Suns, sometimes $CPP names a directory.
3812 if test -n "$CPP" && test -d "$CPP"; then
3813   CPP=
3814 fi
3815 if test -z "$CPP"; then
3816 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819     # This must be in double quotes, not single quotes, because CPP may get
3820   # substituted into the Makefile and "${CC-cc}" will confuse make.
3821   CPP="${CC-cc} -E"
3822   # On the NeXT, cc -E runs the code through the compiler's parser,
3823   # not just through cpp.
3824   cat > conftest.$ac_ext <<EOF
3825 #line 3826 "configure"
3826 #include "confdefs.h"
3827 #include <assert.h>
3828 Syntax Error
3829 EOF
3830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3831 { (eval echo configure:3832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3833 if test -z "$ac_err"; then
3834   :
3835 else
3836   echo "$ac_err" >&5
3837   echo "configure: failed program was:" >&5
3838   cat conftest.$ac_ext >&5
3839   rm -rf conftest*
3840   CPP="${CC-cc} -E -traditional-cpp"
3841   cat > conftest.$ac_ext <<EOF
3842 #line 3843 "configure"
3843 #include "confdefs.h"
3844 #include <assert.h>
3845 Syntax Error
3846 EOF
3847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3848 { (eval echo configure:3849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3850 if test -z "$ac_err"; then
3851   :
3852 else
3853   echo "$ac_err" >&5
3854   echo "configure: failed program was:" >&5
3855   cat conftest.$ac_ext >&5
3856   rm -rf conftest*
3857   CPP="${CC-cc} -nologo -E"
3858   cat > conftest.$ac_ext <<EOF
3859 #line 3860 "configure"
3860 #include "confdefs.h"
3861 #include <assert.h>
3862 Syntax Error
3863 EOF
3864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3865 { (eval echo configure:3866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3867 if test -z "$ac_err"; then
3868   :
3869 else
3870   echo "$ac_err" >&5
3871   echo "configure: failed program was:" >&5
3872   cat conftest.$ac_ext >&5
3873   rm -rf conftest*
3874   CPP=/lib/cpp
3875 fi
3876 rm -f conftest*
3877 fi
3878 rm -f conftest*
3879 fi
3880 rm -f conftest*
3881   ac_cv_prog_CPP="$CPP"
3882 fi
3883   CPP="$ac_cv_prog_CPP"
3884 else
3885   ac_cv_prog_CPP="$CPP"
3886 fi
3887 echo "$ac_t""$CPP" 1>&6
3888
3889
3890 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3891         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3892
3893 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3894         echo "configure: warning: programs compiled here do run here..." 1>&2
3895         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3896
3897 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3898         echo "configure: warning: programs compiled here do not run here..." 1>&2
3899         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3900 fi
3901
3902 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3903 echo "configure:3904: checking for AIX" >&5
3904 cat > conftest.$ac_ext <<EOF
3905 #line 3906 "configure"
3906 #include "confdefs.h"
3907 #ifdef _AIX
3908   yes
3909 #endif
3910
3911 EOF
3912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3913   egrep "yes" >/dev/null 2>&1; then
3914   rm -rf conftest*
3915   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3916 #define _ALL_SOURCE 1
3917 EOF
3918
3919 else
3920   rm -rf conftest*
3921   echo "$ac_t""no" 1>&6
3922 fi
3923 rm -f conftest*
3924
3925
3926 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3927 echo "configure:3928: checking for POSIXized ISC" >&5
3928 if test -d /etc/conf/kconfig.d &&
3929   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3930 then
3931   echo "$ac_t""yes" 1>&6
3932   ISC=yes # If later tests want to check for ISC.
3933   cat >> confdefs.h <<\EOF
3934 #define _POSIX_SOURCE 1
3935 EOF
3936
3937   if test "$GCC" = yes; then
3938     CC="$CC -posix"
3939   else
3940     CC="$CC -Xp"
3941   fi
3942 else
3943   echo "$ac_t""no" 1>&6
3944   ISC=
3945 fi
3946
3947 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3948 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3949 echo "configure:3950: checking for minix/config.h" >&5
3950 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3951   echo $ac_n "(cached) $ac_c" 1>&6
3952 else
3953   cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 #include <minix/config.h>
3957 EOF
3958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3959 { (eval echo configure:3960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3961 if test -z "$ac_err"; then
3962   rm -rf conftest*
3963   eval "ac_cv_header_$ac_safe=yes"
3964 else
3965   echo "$ac_err" >&5
3966   echo "configure: failed program was:" >&5
3967   cat conftest.$ac_ext >&5
3968   rm -rf conftest*
3969   eval "ac_cv_header_$ac_safe=no"
3970 fi
3971 rm -f conftest*
3972 fi
3973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3974   echo "$ac_t""yes" 1>&6
3975   MINIX=yes
3976 else
3977   echo "$ac_t""no" 1>&6
3978 MINIX=
3979 fi
3980
3981 if test "$MINIX" = yes; then
3982   cat >> confdefs.h <<\EOF
3983 #define _POSIX_SOURCE 1
3984 EOF
3985
3986   cat >> confdefs.h <<\EOF
3987 #define _POSIX_1_SOURCE 2
3988 EOF
3989
3990   cat >> confdefs.h <<\EOF
3991 #define _MINIX 1
3992 EOF
3993
3994 fi
3995
3996
3997 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3998 echo "configure:3999: checking for Cygwin environment" >&5
3999 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005
4006 int main() {
4007
4008 #ifndef __CYGWIN__
4009 #define __CYGWIN__ __CYGWIN32__
4010 #endif
4011 return __CYGWIN__;
4012 ; return 0; }
4013 EOF
4014 if { (eval echo configure:4015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4015   rm -rf conftest*
4016   ac_cv_cygwin=yes
4017 else
4018   echo "configure: failed program was:" >&5
4019   cat conftest.$ac_ext >&5
4020   rm -rf conftest*
4021   ac_cv_cygwin=no
4022 fi
4023 rm -f conftest*
4024 fi
4025
4026 echo "$ac_t""$ac_cv_cygwin" 1>&6
4027 CYGWIN=
4028 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4029 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4030 echo "configure:4031: checking for mingw32 environment" >&5
4031 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
4032   echo $ac_n "(cached) $ac_c" 1>&6
4033 else
4034   cat > conftest.$ac_ext <<EOF
4035 #line 4036 "configure"
4036 #include "confdefs.h"
4037
4038 int main() {
4039 return __MINGW32__;
4040 ; return 0; }
4041 EOF
4042 if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4043   rm -rf conftest*
4044   ac_cv_mingw32=yes
4045 else
4046   echo "configure: failed program was:" >&5
4047   cat conftest.$ac_ext >&5
4048   rm -rf conftest*
4049   ac_cv_mingw32=no
4050 fi
4051 rm -f conftest*
4052 fi
4053
4054 echo "$ac_t""$ac_cv_mingw32" 1>&6
4055 MINGW32=
4056 test "$ac_cv_mingw32" = yes && MINGW32=yes
4057 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
4058 echo "configure:4059: checking for EMX OS/2 environment" >&5
4059 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
4060   echo $ac_n "(cached) $ac_c" 1>&6
4061 else
4062   cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065
4066 int main() {
4067 return __EMX__;
4068 ; return 0; }
4069 EOF
4070 if { (eval echo configure:4071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4071   rm -rf conftest*
4072   ac_cv_emxos2=yes
4073 else
4074   echo "configure: failed program was:" >&5
4075   cat conftest.$ac_ext >&5
4076   rm -rf conftest*
4077   ac_cv_emxos2=no
4078 fi
4079 rm -f conftest*
4080 fi
4081
4082 echo "$ac_t""$ac_cv_emxos2" 1>&6
4083 EMXOS2=
4084 test "$ac_cv_emxos2" = yes && EMXOS2=yes
4085
4086
4087
4088 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4089 echo "configure:4090: checking for executable suffix" >&5
4090 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4091   echo $ac_n "(cached) $ac_c" 1>&6
4092 else
4093   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4094   ac_cv_exeext=.exe
4095 else
4096   rm -f conftest*
4097   echo 'int main () { return 0; }' > conftest.$ac_ext
4098   ac_cv_exeext=
4099   if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4100     for file in conftest.*; do
4101       case $file in
4102       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4103       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4104       esac
4105     done
4106   else
4107     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4108   fi
4109   rm -f conftest*
4110   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4111 fi
4112 fi
4113
4114 EXEEXT=""
4115 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4116 echo "$ac_t""${ac_cv_exeext}" 1>&6
4117 ac_exeext=$EXEEXT
4118
4119 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4120 echo "configure:4121: checking for object suffix" >&5
4121 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4122   echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124   rm -f conftest*
4125 echo 'int i = 1;' > conftest.$ac_ext
4126 if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4127   for ac_file in conftest.*; do
4128     case $ac_file in
4129     *.c) ;;
4130     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4131     esac
4132   done
4133 else
4134   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4135 fi
4136 rm -f conftest*
4137 fi
4138
4139 echo "$ac_t""$ac_cv_objext" 1>&6
4140 OBJEXT=$ac_cv_objext
4141 ac_objext=$ac_cv_objext
4142
4143
4144 cat >> confdefs.h <<EOF
4145 #define EXEEXT "${EXEEXT}"
4146 EOF
4147
4148
4149 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4150 echo "configure:4151: checking for be_app in -lbe" >&5
4151 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4152 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4153   echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155   ac_save_LIBS="$LIBS"
4156 LIBS="-lbe -lroot -lnet $LIBS"
4157 cat > conftest.$ac_ext <<EOF
4158 #line 4159 "configure"
4159 #include "confdefs.h"
4160 /* Override any gcc2 internal prototype to avoid an error.  */
4161 /* We use char because int might match the return type of a gcc2
4162     builtin and then its argument prototype would still apply.  */
4163 char be_app();
4164
4165 int main() {
4166 be_app()
4167 ; return 0; }
4168 EOF
4169 if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4170   rm -rf conftest*
4171   eval "ac_cv_lib_$ac_lib_var=yes"
4172 else
4173   echo "configure: failed program was:" >&5
4174   cat conftest.$ac_ext >&5
4175   rm -rf conftest*
4176   eval "ac_cv_lib_$ac_lib_var=no"
4177 fi
4178 rm -f conftest*
4179 LIBS="$ac_save_LIBS"
4180
4181 fi
4182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4183   echo "$ac_t""yes" 1>&6
4184   LIBS="$LIBS -lbe -lroot -lnet"
4185 else
4186   echo "$ac_t""no" 1>&6
4187 :
4188 fi
4189
4190
4191
4192
4193
4194 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4195 echo "configure:4196: checking for ${CC-cc} option to accept ANSI C" >&5
4196 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4197   echo $ac_n "(cached) $ac_c" 1>&6
4198 else
4199   am_cv_prog_cc_stdc=no
4200 ac_save_CC="$CC"
4201 # Don't try gcc -ansi; that turns off useful extensions and
4202 # breaks some systems' header files.
4203 # AIX                   -qlanglvl=ansi
4204 # Ultrix and OSF/1      -std1
4205 # HP-UX 10.20 and later -Ae
4206 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4207 # SVR4                  -Xc -D__EXTENSIONS__
4208 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4209 do
4210   CC="$ac_save_CC $ac_arg"
4211   cat > conftest.$ac_ext <<EOF
4212 #line 4213 "configure"
4213 #include "confdefs.h"
4214 #include <stdarg.h>
4215 #include <stdio.h>
4216 #include <sys/types.h>
4217 #include <sys/stat.h>
4218 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4219 struct buf { int x; };
4220 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4221 static char *e (p, i)
4222      char **p;
4223      int i;
4224 {
4225   return p[i];
4226 }
4227 static char *f (char * (*g) (char **, int), char **p, ...)
4228 {
4229   char *s;
4230   va_list v;
4231   va_start (v,p);
4232   s = g (p, va_arg (v,int));
4233   va_end (v);
4234   return s;
4235 }
4236 int test (int i, double x);
4237 struct s1 {int (*f) (int a);};
4238 struct s2 {int (*f) (double a);};
4239 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4240 int argc;
4241 char **argv;
4242
4243 int main() {
4244
4245 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4246
4247 ; return 0; }
4248 EOF
4249 if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4250   rm -rf conftest*
4251   am_cv_prog_cc_stdc="$ac_arg"; break
4252 else
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255 fi
4256 rm -f conftest*
4257 done
4258 CC="$ac_save_CC"
4259
4260 fi
4261
4262 if test -z "$am_cv_prog_cc_stdc"; then
4263   echo "$ac_t""none needed" 1>&6
4264 else
4265   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4266 fi
4267 case "x$am_cv_prog_cc_stdc" in
4268   x|xno) ;;
4269   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4270 esac
4271
4272 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4273         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4274 fi
4275
4276 # test for make depend flag
4277 OL_MKDEP=
4278 OL_MKDEP_FLAGS=
4279 if test -z "${MKDEP}"; then
4280         OL_MKDEP="${CC-cc}"
4281         if test -z "${MKDEP_FLAGS}"; then
4282                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4283 echo "configure:4284: checking for ${OL_MKDEP} depend flag" >&5
4284 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4285   echo $ac_n "(cached) $ac_c" 1>&6
4286 else
4287   
4288                         ol_cv_mkdep=no
4289                         for flag in "-M" "-xM"; do
4290                                 cat > conftest.c <<EOF
4291  noCode;
4292 EOF
4293                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4294                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4295                                 then
4296                                         if test ! -f conftest."${ac_object}" ; then
4297                                                 ol_cv_mkdep=$flag
4298                                                 OL_MKDEP_FLAGS="$flag"
4299                                                 break
4300                                         fi
4301                                 fi
4302                         done
4303                         rm -f conftest*
4304                 
4305 fi
4306
4307 echo "$ac_t""$ol_cv_mkdep" 1>&6
4308         else
4309                 cc_cv_mkdep=yes
4310                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4311         fi
4312 else
4313         cc_cv_mkdep=yes
4314         OL_MKDEP="${MKDEP}"
4315         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4316 fi
4317
4318
4319
4320 if test "${ol_cv_mkdep}" = no ; then
4321         # this will soon become an error
4322         echo "configure: warning: do not know how to generate dependencies" 1>&2
4323 fi
4324
4325 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4326 echo "configure:4327: checking for afopen in -ls" >&5
4327 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4329   echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331   ac_save_LIBS="$LIBS"
4332 LIBS="-ls  $LIBS"
4333 cat > conftest.$ac_ext <<EOF
4334 #line 4335 "configure"
4335 #include "confdefs.h"
4336 /* Override any gcc2 internal prototype to avoid an error.  */
4337 /* We use char because int might match the return type of a gcc2
4338     builtin and then its argument prototype would still apply.  */
4339 char afopen();
4340
4341 int main() {
4342 afopen()
4343 ; return 0; }
4344 EOF
4345 if { (eval echo configure:4346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4346   rm -rf conftest*
4347   eval "ac_cv_lib_$ac_lib_var=yes"
4348 else
4349   echo "configure: failed program was:" >&5
4350   cat conftest.$ac_ext >&5
4351   rm -rf conftest*
4352   eval "ac_cv_lib_$ac_lib_var=no"
4353 fi
4354 rm -f conftest*
4355 LIBS="$ac_save_LIBS"
4356
4357 fi
4358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4359   echo "$ac_t""yes" 1>&6
4360   
4361         AUTH_LIBS=-ls
4362         cat >> confdefs.h <<\EOF
4363 #define HAVE_AIX_SECURITY 1
4364 EOF
4365
4366
4367 else
4368   echo "$ac_t""no" 1>&6
4369 fi
4370
4371
4372
4373 ol_link_modules=no
4374 if test $ol_enable_modules != no ; then
4375         for ac_hdr in ltdl.h
4376 do
4377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4379 echo "configure:4380: checking for $ac_hdr" >&5
4380 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4381   echo $ac_n "(cached) $ac_c" 1>&6
4382 else
4383   cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 #include <$ac_hdr>
4387 EOF
4388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4389 { (eval echo configure:4390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4391 if test -z "$ac_err"; then
4392   rm -rf conftest*
4393   eval "ac_cv_header_$ac_safe=yes"
4394 else
4395   echo "$ac_err" >&5
4396   echo "configure: failed program was:" >&5
4397   cat conftest.$ac_ext >&5
4398   rm -rf conftest*
4399   eval "ac_cv_header_$ac_safe=no"
4400 fi
4401 rm -f conftest*
4402 fi
4403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4404   echo "$ac_t""yes" 1>&6
4405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4406   cat >> confdefs.h <<EOF
4407 #define $ac_tr_hdr 1
4408 EOF
4409  
4410 else
4411   echo "$ac_t""no" 1>&6
4412 fi
4413 done
4414
4415
4416         if test $ac_cv_header_ltdl_h = no ; then
4417                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4418         fi
4419
4420         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4421 echo "configure:4422: checking for lt_dlinit in -lltdl" >&5
4422 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4424   echo $ac_n "(cached) $ac_c" 1>&6
4425 else
4426   ac_save_LIBS="$LIBS"
4427 LIBS="-lltdl  $LIBS"
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 /* Override any gcc2 internal prototype to avoid an error.  */
4432 /* We use char because int might match the return type of a gcc2
4433     builtin and then its argument prototype would still apply.  */
4434 char lt_dlinit();
4435
4436 int main() {
4437 lt_dlinit()
4438 ; return 0; }
4439 EOF
4440 if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4441   rm -rf conftest*
4442   eval "ac_cv_lib_$ac_lib_var=yes"
4443 else
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -rf conftest*
4447   eval "ac_cv_lib_$ac_lib_var=no"
4448 fi
4449 rm -f conftest*
4450 LIBS="$ac_save_LIBS"
4451
4452 fi
4453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4454   echo "$ac_t""yes" 1>&6
4455   
4456             MODULES_LIBS=-lltdl
4457             cat >> confdefs.h <<\EOF
4458 #define HAVE_LIBLTDL 1
4459 EOF
4460
4461         
4462 else
4463   echo "$ac_t""no" 1>&6
4464 fi
4465
4466
4467         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4468                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4469         fi
4470         ol_link_modules=yes
4471 else
4472         ol_with_bdb_module=static
4473         ol_with_dnssrv_module=static
4474         ol_with_ldap_module=static
4475         ol_with_ldbm_module=static
4476         ol_with_meta_module=static
4477         ol_with_monitor_module=static
4478         ol_with_passwd_module=static
4479         ol_with_perl_module=static
4480         ol_with_shell_module=static
4481         ol_with_tcl_module=static
4482         ol_with_sql_module=static
4483 fi
4484
4485 # test for EBCDIC
4486 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4487 echo "configure:4488: checking for EBCDIC" >&5
4488 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   
4492         cat > conftest.$ac_ext <<EOF
4493 #line 4494 "configure"
4494 #include "confdefs.h"
4495
4496 #if !('M' == 0xd4)
4497 #include <__ASCII__/generate_error.h>
4498 #endif
4499
4500 EOF
4501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4502 { (eval echo configure:4503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4504 if test -z "$ac_err"; then
4505   rm -rf conftest*
4506   ol_cv_cpp_ebcdic=yes
4507 else
4508   echo "$ac_err" >&5
4509   echo "configure: failed program was:" >&5
4510   cat conftest.$ac_ext >&5
4511   rm -rf conftest*
4512   ol_cv_cpp_ebcdic=no
4513 fi
4514 rm -f conftest*
4515 fi
4516
4517 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4518 if test $ol_cv_cpp_ebcdic = yes ; then
4519         cat >> confdefs.h <<\EOF
4520 #define HAVE_EBCDIC 1
4521 EOF
4522
4523 fi
4524
4525 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4526 echo "configure:4527: checking for ANSI C header files" >&5
4527 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4533 #include <stdlib.h>
4534 #include <stdarg.h>
4535 #include <string.h>
4536 #include <float.h>
4537 EOF
4538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4539 { (eval echo configure:4540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4541 if test -z "$ac_err"; then
4542   rm -rf conftest*
4543   ol_cv_header_stdc=yes
4544 else
4545   echo "$ac_err" >&5
4546   echo "configure: failed program was:" >&5
4547   cat conftest.$ac_ext >&5
4548   rm -rf conftest*
4549   ol_cv_header_stdc=no
4550 fi
4551 rm -f conftest*
4552
4553 if test $ol_cv_header_stdc = yes; then
4554   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558 #include <string.h>
4559 EOF
4560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4561   egrep "memchr" >/dev/null 2>&1; then
4562   :
4563 else
4564   rm -rf conftest*
4565   ol_cv_header_stdc=no
4566 fi
4567 rm -f conftest*
4568
4569 fi
4570
4571 if test $ol_cv_header_stdc = yes; then
4572   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4573 cat > conftest.$ac_ext <<EOF
4574 #line 4575 "configure"
4575 #include "confdefs.h"
4576 #include <stdlib.h>
4577 EOF
4578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4579   egrep "free" >/dev/null 2>&1; then
4580   :
4581 else
4582   rm -rf conftest*
4583   ol_cv_header_stdc=no
4584 fi
4585 rm -f conftest*
4586
4587 fi
4588
4589 if test $ol_cv_header_stdc = yes; then
4590   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4591 if test "$cross_compiling" = yes; then
4592   :
4593 else
4594   cat > conftest.$ac_ext <<EOF
4595 #line 4596 "configure"
4596 #include "confdefs.h"
4597 #include <ctype.h>
4598 #ifndef HAVE_EBCDIC
4599 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4600 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4601 #else
4602 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4603                 || ('j' <= (c) && (c) <= 'r') \
4604                 || ('s' <= (c) && (c) <= 'z'))
4605 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4606 #endif
4607 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4608 int main () { int i; for (i = 0; i < 256; i++)
4609 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4610 exit (0); }
4611
4612 EOF
4613 if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4614 then
4615   :
4616 else
4617   echo "configure: failed program was:" >&5
4618   cat conftest.$ac_ext >&5
4619   rm -fr conftest*
4620   ol_cv_header_stdc=no
4621 fi
4622 rm -fr conftest*
4623 fi
4624
4625 fi
4626 fi
4627
4628 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4629 if test $ol_cv_header_stdc = yes; then
4630   cat >> confdefs.h <<\EOF
4631 #define STDC_HEADERS 1
4632 EOF
4633
4634 fi
4635 ac_cv_header_stdc=disable
4636
4637
4638 if test $ol_cv_header_stdc != yes; then
4639         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4640 fi
4641
4642 ac_header_dirent=no
4643 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4644 do
4645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4646 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4647 echo "configure:4648: checking for $ac_hdr that defines DIR" >&5
4648 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4649   echo $ac_n "(cached) $ac_c" 1>&6
4650 else
4651   cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4654 #include <sys/types.h>
4655 #include <$ac_hdr>
4656 int main() {
4657 DIR *dirp = 0;
4658 ; return 0; }
4659 EOF
4660 if { (eval echo configure:4661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4661   rm -rf conftest*
4662   eval "ac_cv_header_dirent_$ac_safe=yes"
4663 else
4664   echo "configure: failed program was:" >&5
4665   cat conftest.$ac_ext >&5
4666   rm -rf conftest*
4667   eval "ac_cv_header_dirent_$ac_safe=no"
4668 fi
4669 rm -f conftest*
4670 fi
4671 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4672   echo "$ac_t""yes" 1>&6
4673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4674   cat >> confdefs.h <<EOF
4675 #define $ac_tr_hdr 1
4676 EOF
4677  ac_header_dirent=$ac_hdr; break
4678 else
4679   echo "$ac_t""no" 1>&6
4680 fi
4681 done
4682 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4683 if test $ac_header_dirent = dirent.h; then
4684 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4685 echo "configure:4686: checking for opendir in -ldir" >&5
4686 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4687 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4688   echo $ac_n "(cached) $ac_c" 1>&6
4689 else
4690   ac_save_LIBS="$LIBS"
4691 LIBS="-ldir  $LIBS"
4692 cat > conftest.$ac_ext <<EOF
4693 #line 4694 "configure"
4694 #include "confdefs.h"
4695 /* Override any gcc2 internal prototype to avoid an error.  */
4696 /* We use char because int might match the return type of a gcc2
4697     builtin and then its argument prototype would still apply.  */
4698 char opendir();
4699
4700 int main() {
4701 opendir()
4702 ; return 0; }
4703 EOF
4704 if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4705   rm -rf conftest*
4706   eval "ac_cv_lib_$ac_lib_var=yes"
4707 else
4708   echo "configure: failed program was:" >&5
4709   cat conftest.$ac_ext >&5
4710   rm -rf conftest*
4711   eval "ac_cv_lib_$ac_lib_var=no"
4712 fi
4713 rm -f conftest*
4714 LIBS="$ac_save_LIBS"
4715
4716 fi
4717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4718   echo "$ac_t""yes" 1>&6
4719   LIBS="$LIBS -ldir"
4720 else
4721   echo "$ac_t""no" 1>&6
4722 fi
4723
4724 else
4725 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4726 echo "configure:4727: checking for opendir in -lx" >&5
4727 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4729   echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731   ac_save_LIBS="$LIBS"
4732 LIBS="-lx  $LIBS"
4733 cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736 /* Override any gcc2 internal prototype to avoid an error.  */
4737 /* We use char because int might match the return type of a gcc2
4738     builtin and then its argument prototype would still apply.  */
4739 char opendir();
4740
4741 int main() {
4742 opendir()
4743 ; return 0; }
4744 EOF
4745 if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4746   rm -rf conftest*
4747   eval "ac_cv_lib_$ac_lib_var=yes"
4748 else
4749   echo "configure: failed program was:" >&5
4750   cat conftest.$ac_ext >&5
4751   rm -rf conftest*
4752   eval "ac_cv_lib_$ac_lib_var=no"
4753 fi
4754 rm -f conftest*
4755 LIBS="$ac_save_LIBS"
4756
4757 fi
4758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4759   echo "$ac_t""yes" 1>&6
4760   LIBS="$LIBS -lx"
4761 else
4762   echo "$ac_t""no" 1>&6
4763 fi
4764
4765 fi
4766
4767 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4768 echo "configure:4769: checking for sys/wait.h that is POSIX.1 compatible" >&5
4769 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4770   echo $ac_n "(cached) $ac_c" 1>&6
4771 else
4772   cat > conftest.$ac_ext <<EOF
4773 #line 4774 "configure"
4774 #include "confdefs.h"
4775 #include <sys/types.h>
4776 #include <sys/wait.h>
4777 #ifndef WEXITSTATUS
4778 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4779 #endif
4780 #ifndef WIFEXITED
4781 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4782 #endif
4783 int main() {
4784 int s;
4785 wait (&s);
4786 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4787 ; return 0; }
4788 EOF
4789 if { (eval echo configure:4790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4790   rm -rf conftest*
4791   ac_cv_header_sys_wait_h=yes
4792 else
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   ac_cv_header_sys_wait_h=no
4797 fi
4798 rm -f conftest*
4799 fi
4800
4801 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4802 if test $ac_cv_header_sys_wait_h = yes; then
4803   cat >> confdefs.h <<\EOF
4804 #define HAVE_SYS_WAIT_H 1
4805 EOF
4806
4807 fi
4808
4809 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4810 echo "configure:4811: checking POSIX termios" >&5
4811 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4812   echo $ac_n "(cached) $ac_c" 1>&6
4813 else
4814   cat > conftest.$ac_ext <<EOF
4815 #line 4816 "configure"
4816 #include "confdefs.h"
4817 #include <sys/types.h>
4818 #include <unistd.h>
4819 #include <termios.h>
4820 int main() {
4821 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4822    tcgetattr(0, 0);
4823 ; return 0; }
4824 EOF
4825 if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4826   rm -rf conftest*
4827   am_cv_sys_posix_termios=yes
4828 else
4829   echo "configure: failed program was:" >&5
4830   cat conftest.$ac_ext >&5
4831   rm -rf conftest*
4832   am_cv_sys_posix_termios=no
4833 fi
4834 rm -f conftest*
4835 fi
4836
4837 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4838
4839
4840  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4841 echo "configure:4842: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4842 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4846
4847   gwinsz_in_termios_h=no
4848   if test $am_cv_sys_posix_termios = yes; then
4849     cat > conftest.$ac_ext <<EOF
4850 #line 4851 "configure"
4851 #include "confdefs.h"
4852 #include <sys/types.h>
4853 #     include <termios.h>
4854 #     ifdef TIOCGWINSZ
4855         yes
4856 #     endif
4857     
4858 EOF
4859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4860   egrep "yes" >/dev/null 2>&1; then
4861   rm -rf conftest*
4862   gwinsz_in_termios_h=yes
4863 fi
4864 rm -f conftest*
4865
4866   fi
4867
4868   if test $gwinsz_in_termios_h = no; then
4869     cat > conftest.$ac_ext <<EOF
4870 #line 4871 "configure"
4871 #include "confdefs.h"
4872 #include <sys/types.h>
4873 #     include <sys/ioctl.h>
4874 #     ifdef TIOCGWINSZ
4875         yes
4876 #     endif
4877     
4878 EOF
4879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4880   egrep "yes" >/dev/null 2>&1; then
4881   rm -rf conftest*
4882   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4883 fi
4884 rm -f conftest*
4885
4886   fi
4887   
4888 fi
4889
4890 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4891   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4892     cat >> confdefs.h <<\EOF
4893 #define GWINSZ_IN_SYS_IOCTL 1
4894 EOF
4895
4896   fi
4897
4898 if test $am_cv_sys_posix_termios = yes ; then
4899         cat >> confdefs.h <<\EOF
4900 #define HAVE_POSIX_TERMIOS 1
4901 EOF
4902
4903 fi
4904
4905 for ac_hdr in \
4906         arpa/inet.h             \
4907         arpa/nameser.h  \
4908         assert.h                \
4909         conio.h                 \
4910         crypt.h                 \
4911         direct.h                \
4912         errno.h                 \
4913         fcntl.h                 \
4914         filio.h                 \
4915         getopt.h                \
4916         grp.h                   \
4917         io.h                    \
4918         libutil.h               \
4919         limits.h                \
4920         locale.h                \
4921         netinet/tcp.h   \
4922         malloc.h                \
4923         memory.h                \
4924         psap.h                  \
4925         pwd.h                   \
4926         process.h               \
4927         resolv.h                \
4928         sgtty.h                 \
4929         shadow.h                \
4930         stddef.h                \
4931         string.h                \
4932         strings.h               \
4933         sysexits.h              \
4934         sys/file.h              \
4935         sys/filio.h             \
4936         sys/errno.h             \
4937         sys/ioctl.h             \
4938         sys/param.h             \
4939         sys/resource.h  \
4940         sys/select.h    \
4941         sys/socket.h    \
4942         sys/syslog.h    \
4943         sys/time.h              \
4944         sys/types.h             \
4945         syslog.h                \
4946         termios.h               \
4947         unistd.h                \
4948         winsock.h               \
4949
4950 do
4951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4953 echo "configure:4954: checking for $ac_hdr" >&5
4954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4955   echo $ac_n "(cached) $ac_c" 1>&6
4956 else
4957   cat > conftest.$ac_ext <<EOF
4958 #line 4959 "configure"
4959 #include "confdefs.h"
4960 #include <$ac_hdr>
4961 EOF
4962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4963 { (eval echo configure:4964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4965 if test -z "$ac_err"; then
4966   rm -rf conftest*
4967   eval "ac_cv_header_$ac_safe=yes"
4968 else
4969   echo "$ac_err" >&5
4970   echo "configure: failed program was:" >&5
4971   cat conftest.$ac_ext >&5
4972   rm -rf conftest*
4973   eval "ac_cv_header_$ac_safe=no"
4974 fi
4975 rm -f conftest*
4976 fi
4977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4978   echo "$ac_t""yes" 1>&6
4979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4980   cat >> confdefs.h <<EOF
4981 #define $ac_tr_hdr 1
4982 EOF
4983  
4984 else
4985   echo "$ac_t""no" 1>&6
4986 fi
4987 done
4988
4989
4990
4991
4992 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4993 echo "configure:4994: checking for dlopen" >&5
4994 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
4995   echo $ac_n "(cached) $ac_c" 1>&6
4996 else
4997   cat > conftest.$ac_ext <<EOF
4998 #line 4999 "configure"
4999 #include "confdefs.h"
5000 /* System header to define __stub macros and hopefully few prototypes,
5001     which can conflict with char dlopen(); below.  */
5002 #include <assert.h>
5003 /* Override any gcc2 internal prototype to avoid an error.  */
5004 /* We use char because int might match the return type of a gcc2
5005     builtin and then its argument prototype would still apply.  */
5006 char dlopen();
5007 char (*f)();
5008
5009 int main() {
5010
5011 /* The GNU C library defines this for functions which it implements
5012     to always fail with ENOSYS.  Some functions are actually named
5013     something starting with __ and the normal name is an alias.  */
5014 #if defined (__stub_dlopen) || defined (__stub___dlopen)
5015 choke me
5016 #else
5017 f = dlopen;
5018 #endif
5019
5020 ; return 0; }
5021 EOF
5022 if { (eval echo configure:5023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5023   rm -rf conftest*
5024   eval "ac_cv_func_dlopen=yes"
5025 else
5026   echo "configure: failed program was:" >&5
5027   cat conftest.$ac_ext >&5
5028   rm -rf conftest*
5029   eval "ac_cv_func_dlopen=no"
5030 fi
5031 rm -f conftest*
5032 fi
5033
5034 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
5035   echo "$ac_t""yes" 1>&6
5036   :
5037 else
5038   echo "$ac_t""no" 1>&6
5039 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5040 echo "configure:5041: checking for dlopen in -ldl" >&5
5041 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
5042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5043   echo $ac_n "(cached) $ac_c" 1>&6
5044 else
5045   ac_save_LIBS="$LIBS"
5046 LIBS="-ldl  $LIBS"
5047 cat > conftest.$ac_ext <<EOF
5048 #line 5049 "configure"
5049 #include "confdefs.h"
5050 /* Override any gcc2 internal prototype to avoid an error.  */
5051 /* We use char because int might match the return type of a gcc2
5052     builtin and then its argument prototype would still apply.  */
5053 char dlopen();
5054
5055 int main() {
5056 dlopen()
5057 ; return 0; }
5058 EOF
5059 if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5060   rm -rf conftest*
5061   eval "ac_cv_lib_$ac_lib_var=yes"
5062 else
5063   echo "configure: failed program was:" >&5
5064   cat conftest.$ac_ext >&5
5065   rm -rf conftest*
5066   eval "ac_cv_lib_$ac_lib_var=no"
5067 fi
5068 rm -f conftest*
5069 LIBS="$ac_save_LIBS"
5070
5071 fi
5072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5073   echo "$ac_t""yes" 1>&6
5074     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5075     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5076   cat >> confdefs.h <<EOF
5077 #define $ac_tr_lib 1
5078 EOF
5079
5080   LIBS="-ldl $LIBS"
5081
5082 else
5083   echo "$ac_t""no" 1>&6
5084 fi
5085
5086 fi
5087
5088
5089 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5090 echo "configure:5091: checking for sigset in -lV3" >&5
5091 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5092 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5093   echo $ac_n "(cached) $ac_c" 1>&6
5094 else
5095   ac_save_LIBS="$LIBS"
5096 LIBS="-lV3  $LIBS"
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 /* Override any gcc2 internal prototype to avoid an error.  */
5101 /* We use char because int might match the return type of a gcc2
5102     builtin and then its argument prototype would still apply.  */
5103 char sigset();
5104
5105 int main() {
5106 sigset()
5107 ; return 0; }
5108 EOF
5109 if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=yes"
5112 else
5113   echo "configure: failed program was:" >&5
5114   cat conftest.$ac_ext >&5
5115   rm -rf conftest*
5116   eval "ac_cv_lib_$ac_lib_var=no"
5117 fi
5118 rm -f conftest*
5119 LIBS="$ac_save_LIBS"
5120
5121 fi
5122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5123   echo "$ac_t""yes" 1>&6
5124     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5125     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5126   cat >> confdefs.h <<EOF
5127 #define $ac_tr_lib 1
5128 EOF
5129
5130   LIBS="-lV3 $LIBS"
5131
5132 else
5133   echo "$ac_t""no" 1>&6
5134 fi
5135
5136
5137 if test $ac_cv_header_winsock_h = yes; then
5138         echo $ac_n "checking for winsock""... $ac_c" 1>&6
5139 echo "configure:5140: checking for winsock" >&5
5140 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
5141   echo $ac_n "(cached) $ac_c" 1>&6
5142 else
5143   cat > conftest.$ac_ext <<EOF
5144 #line 5145 "configure"
5145 #include "confdefs.h"
5146 #include <winsock.h>
5147 int main() {
5148
5149                         socket(0,0,0);
5150                         select(0,NULL,NULL,NULL,NULL);
5151                         closesocket(0);
5152                         gethostname(NULL,0);
5153         
5154 ; return 0; }
5155 EOF
5156 if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5157   rm -rf conftest*
5158   ol_cv_winsock=yes
5159 else
5160   echo "configure: failed program was:" >&5
5161   cat conftest.$ac_ext >&5
5162   rm -rf conftest*
5163   ol_cv_winsock=no
5164 fi
5165 rm -f conftest*
5166 fi
5167
5168 echo "$ac_t""$ol_cv_winsock" 1>&6
5169
5170         if test $ol_cv_winsock = yes ; then
5171                 cat >> confdefs.h <<\EOF
5172 #define HAVE_WINSOCK 1
5173 EOF
5174
5175                 ac_cv_func_socket=yes
5176                 ac_cv_func_select=yes
5177                 ac_cv_func_closesocket=yes
5178                 ac_cv_func_gethostname=yes
5179         fi
5180 fi
5181
5182
5183 echo $ac_n "checking for socket""... $ac_c" 1>&6
5184 echo "configure:5185: checking for socket" >&5
5185 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5186   echo $ac_n "(cached) $ac_c" 1>&6
5187 else
5188   cat > conftest.$ac_ext <<EOF
5189 #line 5190 "configure"
5190 #include "confdefs.h"
5191 /* System header to define __stub macros and hopefully few prototypes,
5192     which can conflict with char socket(); below.  */
5193 #include <assert.h>
5194 /* Override any gcc2 internal prototype to avoid an error.  */
5195 /* We use char because int might match the return type of a gcc2
5196     builtin and then its argument prototype would still apply.  */
5197 char socket();
5198 char (*f)();
5199
5200 int main() {
5201
5202 /* The GNU C library defines this for functions which it implements
5203     to always fail with ENOSYS.  Some functions are actually named
5204     something starting with __ and the normal name is an alias.  */
5205 #if defined (__stub_socket) || defined (__stub___socket)
5206 choke me
5207 #else
5208 f = socket;
5209 #endif
5210
5211 ; return 0; }
5212 EOF
5213 if { (eval echo configure:5214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5214   rm -rf conftest*
5215   eval "ac_cv_func_socket=yes"
5216 else
5217   echo "configure: failed program was:" >&5
5218   cat conftest.$ac_ext >&5
5219   rm -rf conftest*
5220   eval "ac_cv_func_socket=no"
5221 fi
5222 rm -f conftest*
5223 fi
5224
5225 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5226   echo "$ac_t""yes" 1>&6
5227   :
5228 else
5229   echo "$ac_t""no" 1>&6
5230         
5231         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5232 echo "configure:5233: checking for main in -lsocket" >&5
5233 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5235   echo $ac_n "(cached) $ac_c" 1>&6
5236 else
5237   ac_save_LIBS="$LIBS"
5238 LIBS="-lsocket  $LIBS"
5239 cat > conftest.$ac_ext <<EOF
5240 #line 5241 "configure"
5241 #include "confdefs.h"
5242
5243 int main() {
5244 main()
5245 ; return 0; }
5246 EOF
5247 if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5248   rm -rf conftest*
5249   eval "ac_cv_lib_$ac_lib_var=yes"
5250 else
5251   echo "configure: failed program was:" >&5
5252   cat conftest.$ac_ext >&5
5253   rm -rf conftest*
5254   eval "ac_cv_lib_$ac_lib_var=no"
5255 fi
5256 rm -f conftest*
5257 LIBS="$ac_save_LIBS"
5258
5259 fi
5260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5261   echo "$ac_t""yes" 1>&6
5262     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5263     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5264   cat >> confdefs.h <<EOF
5265 #define $ac_tr_lib 1
5266 EOF
5267
5268   LIBS="-lsocket $LIBS"
5269
5270 else
5271   echo "$ac_t""no" 1>&6
5272 fi
5273
5274         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5275 echo "configure:5276: checking for main in -lnet" >&5
5276 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5277 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5278   echo $ac_n "(cached) $ac_c" 1>&6
5279 else
5280   ac_save_LIBS="$LIBS"
5281 LIBS="-lnet  $LIBS"
5282 cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285
5286 int main() {
5287 main()
5288 ; return 0; }
5289 EOF
5290 if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5291   rm -rf conftest*
5292   eval "ac_cv_lib_$ac_lib_var=yes"
5293 else
5294   echo "configure: failed program was:" >&5
5295   cat conftest.$ac_ext >&5
5296   rm -rf conftest*
5297   eval "ac_cv_lib_$ac_lib_var=no"
5298 fi
5299 rm -f conftest*
5300 LIBS="$ac_save_LIBS"
5301
5302 fi
5303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5304   echo "$ac_t""yes" 1>&6
5305     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5306     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5307   cat >> confdefs.h <<EOF
5308 #define $ac_tr_lib 1
5309 EOF
5310
5311   LIBS="-lnet $LIBS"
5312
5313 else
5314   echo "$ac_t""no" 1>&6
5315 fi
5316
5317         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5318 echo "configure:5319: checking for main in -lnsl_s" >&5
5319 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5321   echo $ac_n "(cached) $ac_c" 1>&6
5322 else
5323   ac_save_LIBS="$LIBS"
5324 LIBS="-lnsl_s  $LIBS"
5325 cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5328
5329 int main() {
5330 main()
5331 ; return 0; }
5332 EOF
5333 if { (eval echo configure:5334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5334   rm -rf conftest*
5335   eval "ac_cv_lib_$ac_lib_var=yes"
5336 else
5337   echo "configure: failed program was:" >&5
5338   cat conftest.$ac_ext >&5
5339   rm -rf conftest*
5340   eval "ac_cv_lib_$ac_lib_var=no"
5341 fi
5342 rm -f conftest*
5343 LIBS="$ac_save_LIBS"
5344
5345 fi
5346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5347   echo "$ac_t""yes" 1>&6
5348     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5349     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5350   cat >> confdefs.h <<EOF
5351 #define $ac_tr_lib 1
5352 EOF
5353
5354   LIBS="-lnsl_s $LIBS"
5355
5356 else
5357   echo "$ac_t""no" 1>&6
5358 fi
5359
5360         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5361 echo "configure:5362: checking for main in -lnsl" >&5
5362 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5364   echo $ac_n "(cached) $ac_c" 1>&6
5365 else
5366   ac_save_LIBS="$LIBS"
5367 LIBS="-lnsl  $LIBS"
5368 cat > conftest.$ac_ext <<EOF
5369 #line 5370 "configure"
5370 #include "confdefs.h"
5371
5372 int main() {
5373 main()
5374 ; return 0; }
5375 EOF
5376 if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5377   rm -rf conftest*
5378   eval "ac_cv_lib_$ac_lib_var=yes"
5379 else
5380   echo "configure: failed program was:" >&5
5381   cat conftest.$ac_ext >&5
5382   rm -rf conftest*
5383   eval "ac_cv_lib_$ac_lib_var=no"
5384 fi
5385 rm -f conftest*
5386 LIBS="$ac_save_LIBS"
5387
5388 fi
5389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5390   echo "$ac_t""yes" 1>&6
5391     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5392     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5393   cat >> confdefs.h <<EOF
5394 #define $ac_tr_lib 1
5395 EOF
5396
5397   LIBS="-lnsl $LIBS"
5398
5399 else
5400   echo "$ac_t""no" 1>&6
5401 fi
5402
5403         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5404 echo "configure:5405: checking for socket in -linet" >&5
5405 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5406 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5407   echo $ac_n "(cached) $ac_c" 1>&6
5408 else
5409   ac_save_LIBS="$LIBS"
5410 LIBS="-linet  $LIBS"
5411 cat > conftest.$ac_ext <<EOF
5412 #line 5413 "configure"
5413 #include "confdefs.h"
5414 /* Override any gcc2 internal prototype to avoid an error.  */
5415 /* We use char because int might match the return type of a gcc2
5416     builtin and then its argument prototype would still apply.  */
5417 char socket();
5418
5419 int main() {
5420 socket()
5421 ; return 0; }
5422 EOF
5423 if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5424   rm -rf conftest*
5425   eval "ac_cv_lib_$ac_lib_var=yes"
5426 else
5427   echo "configure: failed program was:" >&5
5428   cat conftest.$ac_ext >&5
5429   rm -rf conftest*
5430   eval "ac_cv_lib_$ac_lib_var=no"
5431 fi
5432 rm -f conftest*
5433 LIBS="$ac_save_LIBS"
5434
5435 fi
5436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5437   echo "$ac_t""yes" 1>&6
5438     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5439     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5440   cat >> confdefs.h <<EOF
5441 #define $ac_tr_lib 1
5442 EOF
5443
5444   LIBS="-linet $LIBS"
5445
5446 else
5447   echo "$ac_t""no" 1>&6
5448 fi
5449
5450         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5451 echo "configure:5452: checking for main in -lgen" >&5
5452 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5453 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5454   echo $ac_n "(cached) $ac_c" 1>&6
5455 else
5456   ac_save_LIBS="$LIBS"
5457 LIBS="-lgen  $LIBS"
5458 cat > conftest.$ac_ext <<EOF
5459 #line 5460 "configure"
5460 #include "confdefs.h"
5461
5462 int main() {
5463 main()
5464 ; return 0; }
5465 EOF
5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5467   rm -rf conftest*
5468   eval "ac_cv_lib_$ac_lib_var=yes"
5469 else
5470   echo "configure: failed program was:" >&5
5471   cat conftest.$ac_ext >&5
5472   rm -rf conftest*
5473   eval "ac_cv_lib_$ac_lib_var=no"
5474 fi
5475 rm -f conftest*
5476 LIBS="$ac_save_LIBS"
5477
5478 fi
5479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5480   echo "$ac_t""yes" 1>&6
5481     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5482     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5483   cat >> confdefs.h <<EOF
5484 #define $ac_tr_lib 1
5485 EOF
5486
5487   LIBS="-lgen $LIBS"
5488
5489 else
5490   echo "$ac_t""no" 1>&6
5491 fi
5492
5493
5494 fi
5495
5496
5497 echo $ac_n "checking for select""... $ac_c" 1>&6
5498 echo "configure:5499: checking for select" >&5
5499 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5500   echo $ac_n "(cached) $ac_c" 1>&6
5501 else
5502   cat > conftest.$ac_ext <<EOF
5503 #line 5504 "configure"
5504 #include "confdefs.h"
5505 /* System header to define __stub macros and hopefully few prototypes,
5506     which can conflict with char select(); below.  */
5507 #include <assert.h>
5508 /* Override any gcc2 internal prototype to avoid an error.  */
5509 /* We use char because int might match the return type of a gcc2
5510     builtin and then its argument prototype would still apply.  */
5511 char select();
5512 char (*f)();
5513
5514 int main() {
5515
5516 /* The GNU C library defines this for functions which it implements
5517     to always fail with ENOSYS.  Some functions are actually named
5518     something starting with __ and the normal name is an alias.  */
5519 #if defined (__stub_select) || defined (__stub___select)
5520 choke me
5521 #else
5522 f = select;
5523 #endif
5524
5525 ; return 0; }
5526 EOF
5527 if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5528   rm -rf conftest*
5529   eval "ac_cv_func_select=yes"
5530 else
5531   echo "configure: failed program was:" >&5
5532   cat conftest.$ac_ext >&5
5533   rm -rf conftest*
5534   eval "ac_cv_func_select=no"
5535 fi
5536 rm -f conftest*
5537 fi
5538
5539 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5540   echo "$ac_t""yes" 1>&6
5541   :
5542 else
5543   echo "$ac_t""no" 1>&6
5544 { echo "configure: error: select() required." 1>&2; exit 1; }
5545 fi
5546
5547
5548 if test "${ac_cv_header_winsock_h}" != yes; then
5549                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5550 echo "configure:5551: checking types of arguments for select()" >&5
5551  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5552   echo $ac_n "(cached) $ac_c" 1>&6
5553 else
5554    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5555   echo $ac_n "(cached) $ac_c" 1>&6
5556 else
5557     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5558   echo $ac_n "(cached) $ac_c" 1>&6
5559 else
5560      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5561      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5562       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5563        cat > conftest.$ac_ext <<EOF
5564 #line 5565 "configure"
5565 #include "confdefs.h"
5566 #ifdef HAVE_SYS_TYPES_H
5567 #include <sys/types.h>
5568 #endif
5569 #ifdef HAVE_SYS_TIME_H
5570 #include <sys/time.h>
5571 #endif
5572 #ifdef HAVE_SYS_SELECT_H
5573 #include <sys/select.h>
5574 #endif
5575 #ifdef HAVE_SYS_SOCKET_H
5576 #include <sys/socket.h>
5577 #endif
5578 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);
5579 int main() {
5580
5581 ; return 0; }
5582 EOF
5583 if { (eval echo configure:5584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5584   rm -rf conftest*
5585           ac_not_found=no ; break 3
5586 else
5587   echo "configure: failed program was:" >&5
5588   cat conftest.$ac_ext >&5
5589   rm -rf conftest*
5590   ac_not_found=yes
5591 fi
5592 rm -f conftest*
5593       done
5594      done
5595     done
5596    
5597 fi
5598   
5599 fi
5600  
5601 fi
5602  if test "$ac_not_found" = yes; then
5603   ac_cv_func_select_arg1=int 
5604   ac_cv_func_select_arg234='int *' 
5605   ac_cv_func_select_arg5='struct timeval *'
5606  fi
5607  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5608  cat >> confdefs.h <<EOF
5609 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5610 EOF
5611
5612  cat >> confdefs.h <<EOF
5613 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5614 EOF
5615
5616  cat >> confdefs.h <<EOF
5617 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5618 EOF
5619
5620
5621 fi
5622
5623
5624 for ac_hdr in regex.h 
5625 do
5626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5628 echo "configure:5629: checking for $ac_hdr" >&5
5629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5630   echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632   cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635 #include <$ac_hdr>
5636 EOF
5637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5638 { (eval echo configure:5639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5640 if test -z "$ac_err"; then
5641   rm -rf conftest*
5642   eval "ac_cv_header_$ac_safe=yes"
5643 else
5644   echo "$ac_err" >&5
5645   echo "configure: failed program was:" >&5
5646   cat conftest.$ac_ext >&5
5647   rm -rf conftest*
5648   eval "ac_cv_header_$ac_safe=no"
5649 fi
5650 rm -f conftest*
5651 fi
5652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5653   echo "$ac_t""yes" 1>&6
5654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5655   cat >> confdefs.h <<EOF
5656 #define $ac_tr_hdr 1
5657 EOF
5658  
5659 else
5660   echo "$ac_t""no" 1>&6
5661 fi
5662 done
5663
5664 if test "$ac_cv_header_regex_h" != yes ; then
5665         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5666 fi
5667 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5668 echo "configure:5669: checking for regfree" >&5
5669 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5670   echo $ac_n "(cached) $ac_c" 1>&6
5671 else
5672   cat > conftest.$ac_ext <<EOF
5673 #line 5674 "configure"
5674 #include "confdefs.h"
5675 /* System header to define __stub macros and hopefully few prototypes,
5676     which can conflict with char regfree(); below.  */
5677 #include <assert.h>
5678 /* Override any gcc2 internal prototype to avoid an error.  */
5679 /* We use char because int might match the return type of a gcc2
5680     builtin and then its argument prototype would still apply.  */
5681 char regfree();
5682 char (*f)();
5683
5684 int main() {
5685
5686 /* The GNU C library defines this for functions which it implements
5687     to always fail with ENOSYS.  Some functions are actually named
5688     something starting with __ and the normal name is an alias.  */
5689 #if defined (__stub_regfree) || defined (__stub___regfree)
5690 choke me
5691 #else
5692 f = regfree;
5693 #endif
5694
5695 ; return 0; }
5696 EOF
5697 if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5698   rm -rf conftest*
5699   eval "ac_cv_func_regfree=yes"
5700 else
5701   echo "configure: failed program was:" >&5
5702   cat conftest.$ac_ext >&5
5703   rm -rf conftest*
5704   eval "ac_cv_func_regfree=no"
5705 fi
5706 rm -f conftest*
5707 fi
5708
5709 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5710   echo "$ac_t""yes" 1>&6
5711   :
5712 else
5713   echo "$ac_t""no" 1>&6
5714 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5715 fi
5716
5717
5718
5719 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5720 echo "configure:5721: checking for compatible POSIX regex" >&5
5721 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5722   echo $ac_n "(cached) $ac_c" 1>&6
5723 else
5724   
5725         if test "$cross_compiling" = yes; then
5726   ol_cv_c_posix_regex=cross
5727 else
5728   cat > conftest.$ac_ext <<EOF
5729 #line 5730 "configure"
5730 #include "confdefs.h"
5731
5732 #include <sys/types.h>
5733 #include <regex.h>
5734 static char *pattern, *string;
5735 main()
5736 {
5737         int rc;
5738         regex_t re;
5739
5740         pattern = "^A";
5741
5742         if(regcomp(&re, pattern, 0)) {
5743                 return -1;
5744         }
5745         
5746         string = "ALL MATCH";
5747         
5748         rc = regexec(&re, string, 0, (void*)0, 0);
5749
5750         regfree(&re);
5751
5752         return rc;
5753 }
5754 EOF
5755 if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5756 then
5757   ol_cv_c_posix_regex=yes
5758 else
5759   echo "configure: failed program was:" >&5
5760   cat conftest.$ac_ext >&5
5761   rm -fr conftest*
5762   ol_cv_c_posix_regex=no
5763 fi
5764 rm -fr conftest*
5765 fi
5766
5767 fi
5768
5769 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5770
5771 if test "$ol_cv_c_posix_regex" = no ; then
5772         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5773 fi
5774
5775 ol_link_dnssrv=no
5776 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5777 echo "configure:5778: checking for res_query" >&5
5778 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5779   echo $ac_n "(cached) $ac_c" 1>&6
5780 else
5781   cat > conftest.$ac_ext <<EOF
5782 #line 5783 "configure"
5783 #include "confdefs.h"
5784 /* System header to define __stub macros and hopefully few prototypes,
5785     which can conflict with char res_query(); below.  */
5786 #include <assert.h>
5787 /* Override any gcc2 internal prototype to avoid an error.  */
5788 /* We use char because int might match the return type of a gcc2
5789     builtin and then its argument prototype would still apply.  */
5790 char res_query();
5791 char (*f)();
5792
5793 int main() {
5794
5795 /* The GNU C library defines this for functions which it implements
5796     to always fail with ENOSYS.  Some functions are actually named
5797     something starting with __ and the normal name is an alias.  */
5798 #if defined (__stub_res_query) || defined (__stub___res_query)
5799 choke me
5800 #else
5801 f = res_query;
5802 #endif
5803
5804 ; return 0; }
5805 EOF
5806 if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5807   rm -rf conftest*
5808   eval "ac_cv_func_res_query=yes"
5809 else
5810   echo "configure: failed program was:" >&5
5811   cat conftest.$ac_ext >&5
5812   rm -rf conftest*
5813   eval "ac_cv_func_res_query=no"
5814 fi
5815 rm -f conftest*
5816 fi
5817
5818 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5819   echo "$ac_t""yes" 1>&6
5820   :
5821 else
5822   echo "$ac_t""no" 1>&6
5823 fi
5824
5825 if test $ac_cv_func_res_query = no ; then 
5826         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5827 echo "configure:5828: checking for res_query in -lbind" >&5
5828 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5830   echo $ac_n "(cached) $ac_c" 1>&6
5831 else
5832   ac_save_LIBS="$LIBS"
5833 LIBS="-lbind  $LIBS"
5834 cat > conftest.$ac_ext <<EOF
5835 #line 5836 "configure"
5836 #include "confdefs.h"
5837 /* Override any gcc2 internal prototype to avoid an error.  */
5838 /* We use char because int might match the return type of a gcc2
5839     builtin and then its argument prototype would still apply.  */
5840 char res_query();
5841
5842 int main() {
5843 res_query()
5844 ; return 0; }
5845 EOF
5846 if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5847   rm -rf conftest*
5848   eval "ac_cv_lib_$ac_lib_var=yes"
5849 else
5850   echo "configure: failed program was:" >&5
5851   cat conftest.$ac_ext >&5
5852   rm -rf conftest*
5853   eval "ac_cv_lib_$ac_lib_var=no"
5854 fi
5855 rm -f conftest*
5856 LIBS="$ac_save_LIBS"
5857
5858 fi
5859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5860   echo "$ac_t""yes" 1>&6
5861     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5862     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5863   cat >> confdefs.h <<EOF
5864 #define $ac_tr_lib 1
5865 EOF
5866
5867   LIBS="-lbind $LIBS"
5868
5869 else
5870   echo "$ac_t""no" 1>&6
5871 fi
5872
5873         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5874 fi
5875
5876 if test $ac_cv_func_res_query = no ; then 
5877         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5878 echo "configure:5879: checking for __res_query in -lbind" >&5
5879 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5880 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5881   echo $ac_n "(cached) $ac_c" 1>&6
5882 else
5883   ac_save_LIBS="$LIBS"
5884 LIBS="-lbind  $LIBS"
5885 cat > conftest.$ac_ext <<EOF
5886 #line 5887 "configure"
5887 #include "confdefs.h"
5888 /* Override any gcc2 internal prototype to avoid an error.  */
5889 /* We use char because int might match the return type of a gcc2
5890     builtin and then its argument prototype would still apply.  */
5891 char __res_query();
5892
5893 int main() {
5894 __res_query()
5895 ; return 0; }
5896 EOF
5897 if { (eval echo configure:5898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5898   rm -rf conftest*
5899   eval "ac_cv_lib_$ac_lib_var=yes"
5900 else
5901   echo "configure: failed program was:" >&5
5902   cat conftest.$ac_ext >&5
5903   rm -rf conftest*
5904   eval "ac_cv_lib_$ac_lib_var=no"
5905 fi
5906 rm -f conftest*
5907 LIBS="$ac_save_LIBS"
5908
5909 fi
5910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5911   echo "$ac_t""yes" 1>&6
5912     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5913     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5914   cat >> confdefs.h <<EOF
5915 #define $ac_tr_lib 1
5916 EOF
5917
5918   LIBS="-lbind $LIBS"
5919
5920 else
5921   echo "$ac_t""no" 1>&6
5922 fi
5923
5924         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5925 fi
5926
5927 if test $ac_cv_func_res_query = no ; then 
5928         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5929 echo "configure:5930: checking for res_query in -lresolv" >&5
5930 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5932   echo $ac_n "(cached) $ac_c" 1>&6
5933 else
5934   ac_save_LIBS="$LIBS"
5935 LIBS="-lresolv  $LIBS"
5936 cat > conftest.$ac_ext <<EOF
5937 #line 5938 "configure"
5938 #include "confdefs.h"
5939 /* Override any gcc2 internal prototype to avoid an error.  */
5940 /* We use char because int might match the return type of a gcc2
5941     builtin and then its argument prototype would still apply.  */
5942 char res_query();
5943
5944 int main() {
5945 res_query()
5946 ; return 0; }
5947 EOF
5948 if { (eval echo configure:5949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5949   rm -rf conftest*
5950   eval "ac_cv_lib_$ac_lib_var=yes"
5951 else
5952   echo "configure: failed program was:" >&5
5953   cat conftest.$ac_ext >&5
5954   rm -rf conftest*
5955   eval "ac_cv_lib_$ac_lib_var=no"
5956 fi
5957 rm -f conftest*
5958 LIBS="$ac_save_LIBS"
5959
5960 fi
5961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5962   echo "$ac_t""yes" 1>&6
5963     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5964     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5965   cat >> confdefs.h <<EOF
5966 #define $ac_tr_lib 1
5967 EOF
5968
5969   LIBS="-lresolv $LIBS"
5970
5971 else
5972   echo "$ac_t""no" 1>&6
5973 fi
5974
5975         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5976 fi
5977
5978 if test "$ac_cv_func_res_query" = yes ; then
5979         cat >> confdefs.h <<\EOF
5980 #define HAVE_RES_QUERY 1
5981 EOF
5982
5983
5984         if test $ol_enable_dnssrv != no ; then
5985                 ol_link_dnssrv=yes
5986         fi
5987 fi
5988
5989 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5990         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5991 fi
5992
5993 for ac_func in getaddrinfo inet_ntop 
5994 do
5995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5996 echo "configure:5997: checking for $ac_func" >&5
5997 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5998   echo $ac_n "(cached) $ac_c" 1>&6
5999 else
6000   cat > conftest.$ac_ext <<EOF
6001 #line 6002 "configure"
6002 #include "confdefs.h"
6003 /* System header to define __stub macros and hopefully few prototypes,
6004     which can conflict with char $ac_func(); below.  */
6005 #include <assert.h>
6006 /* Override any gcc2 internal prototype to avoid an error.  */
6007 /* We use char because int might match the return type of a gcc2
6008     builtin and then its argument prototype would still apply.  */
6009 char $ac_func();
6010 char (*f)();
6011
6012 int main() {
6013
6014 /* The GNU C library defines this for functions which it implements
6015     to always fail with ENOSYS.  Some functions are actually named
6016     something starting with __ and the normal name is an alias.  */
6017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6018 choke me
6019 #else
6020 f = $ac_func;
6021 #endif
6022
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_func_$ac_func=yes"
6028 else
6029   echo "configure: failed program was:" >&5
6030   cat conftest.$ac_ext >&5
6031   rm -rf conftest*
6032   eval "ac_cv_func_$ac_func=no"
6033 fi
6034 rm -f conftest*
6035 fi
6036
6037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6038   echo "$ac_t""yes" 1>&6
6039     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6040   cat >> confdefs.h <<EOF
6041 #define $ac_tr_func 1
6042 EOF
6043  
6044 else
6045   echo "$ac_t""no" 1>&6
6046 fi
6047 done
6048
6049
6050 ol_link_ipv6=no
6051 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
6052         if test $ol_enable_ipv6 = yes ; then
6053                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
6054         fi
6055 else
6056         for ac_func in gai_strerror 
6057 do
6058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6059 echo "configure:6060: checking for $ac_func" >&5
6060 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6061   echo $ac_n "(cached) $ac_c" 1>&6
6062 else
6063   cat > conftest.$ac_ext <<EOF
6064 #line 6065 "configure"
6065 #include "confdefs.h"
6066 /* System header to define __stub macros and hopefully few prototypes,
6067     which can conflict with char $ac_func(); below.  */
6068 #include <assert.h>
6069 /* Override any gcc2 internal prototype to avoid an error.  */
6070 /* We use char because int might match the return type of a gcc2
6071     builtin and then its argument prototype would still apply.  */
6072 char $ac_func();
6073 char (*f)();
6074
6075 int main() {
6076
6077 /* The GNU C library defines this for functions which it implements
6078     to always fail with ENOSYS.  Some functions are actually named
6079     something starting with __ and the normal name is an alias.  */
6080 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6081 choke me
6082 #else
6083 f = $ac_func;
6084 #endif
6085
6086 ; return 0; }
6087 EOF
6088 if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6089   rm -rf conftest*
6090   eval "ac_cv_func_$ac_func=yes"
6091 else
6092   echo "configure: failed program was:" >&5
6093   cat conftest.$ac_ext >&5
6094   rm -rf conftest*
6095   eval "ac_cv_func_$ac_func=no"
6096 fi
6097 rm -f conftest*
6098 fi
6099
6100 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6101   echo "$ac_t""yes" 1>&6
6102     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6103   cat >> confdefs.h <<EOF
6104 #define $ac_tr_func 1
6105 EOF
6106  
6107 else
6108   echo "$ac_t""no" 1>&6
6109 fi
6110 done
6111
6112
6113         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
6114 echo "configure:6115: checking INET6_ADDRSTRLEN" >&5
6115 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
6116   echo $ac_n "(cached) $ac_c" 1>&6
6117 else
6118   
6119                 cat > conftest.$ac_ext <<EOF
6120 #line 6121 "configure"
6121 #include "confdefs.h"
6122
6123 #                       include <netinet/in.h>
6124 #                       ifdef INET6_ADDRSTRLEN
6125                                 __has_inet6_addrstrlen__;
6126 #                       endif
6127                 
6128 EOF
6129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6130   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
6131   rm -rf conftest*
6132   ol_cv_inet6_addrstrlen=yes
6133 else
6134   rm -rf conftest*
6135   ol_cv_inet6_addrstrlen=no
6136 fi
6137 rm -f conftest*
6138
6139 fi
6140
6141 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
6142
6143         if test $ol_cv_inet6_addrstrlen = yes ; then
6144                 ol_link_ipv6=yes
6145         elif test $ol_enable_ipv6 = yes ; then
6146                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
6147         fi
6148 fi
6149
6150 if test $ol_enable_local != no ; then
6151         for ac_hdr in sys/un.h 
6152 do
6153 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6154 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6155 echo "configure:6156: checking for $ac_hdr" >&5
6156 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6157   echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159   cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6162 #include <$ac_hdr>
6163 EOF
6164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6165 { (eval echo configure:6166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6167 if test -z "$ac_err"; then
6168   rm -rf conftest*
6169   eval "ac_cv_header_$ac_safe=yes"
6170 else
6171   echo "$ac_err" >&5
6172   echo "configure: failed program was:" >&5
6173   cat conftest.$ac_ext >&5
6174   rm -rf conftest*
6175   eval "ac_cv_header_$ac_safe=no"
6176 fi
6177 rm -f conftest*
6178 fi
6179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6180   echo "$ac_t""yes" 1>&6
6181     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6182   cat >> confdefs.h <<EOF
6183 #define $ac_tr_hdr 1
6184 EOF
6185  
6186 else
6187   echo "$ac_t""no" 1>&6
6188 fi
6189 done
6190
6191
6192         if test $ol_enable_local = auto ; then
6193                 ol_enable_local=$ac_cv_header_sys_un_h
6194         elif test $ac_cv_header_sys_un_h = no ; then
6195                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
6196         fi
6197 fi
6198
6199 ol_link_kbind=no
6200 ol_link_kpasswd=no
6201 ol_link_krb5=no
6202 ol_link_krb4=no
6203
6204 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6205         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
6206         -o $ol_with_kerberos = k425 ; then
6207
6208         for ac_hdr in krb5.h
6209 do
6210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6212 echo "configure:6213: checking for $ac_hdr" >&5
6213 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6214   echo $ac_n "(cached) $ac_c" 1>&6
6215 else
6216   cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6219 #include <$ac_hdr>
6220 EOF
6221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6222 { (eval echo configure:6223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6224 if test -z "$ac_err"; then
6225   rm -rf conftest*
6226   eval "ac_cv_header_$ac_safe=yes"
6227 else
6228   echo "$ac_err" >&5
6229   echo "configure: failed program was:" >&5
6230   cat conftest.$ac_ext >&5
6231   rm -rf conftest*
6232   eval "ac_cv_header_$ac_safe=no"
6233 fi
6234 rm -f conftest*
6235 fi
6236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6237   echo "$ac_t""yes" 1>&6
6238     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6239   cat >> confdefs.h <<EOF
6240 #define $ac_tr_hdr 1
6241 EOF
6242  
6243 else
6244   echo "$ac_t""no" 1>&6
6245 fi
6246 done
6247
6248
6249         if test $ac_cv_header_krb5_h = yes ; then
6250                                 for ac_hdr in heim_err.h
6251 do
6252 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6253 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6254 echo "configure:6255: checking for $ac_hdr" >&5
6255 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6256   echo $ac_n "(cached) $ac_c" 1>&6
6257 else
6258   cat > conftest.$ac_ext <<EOF
6259 #line 6260 "configure"
6260 #include "confdefs.h"
6261 #include <$ac_hdr>
6262 EOF
6263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6264 { (eval echo configure:6265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6266 if test -z "$ac_err"; then
6267   rm -rf conftest*
6268   eval "ac_cv_header_$ac_safe=yes"
6269 else
6270   echo "$ac_err" >&5
6271   echo "configure: failed program was:" >&5
6272   cat conftest.$ac_ext >&5
6273   rm -rf conftest*
6274   eval "ac_cv_header_$ac_safe=no"
6275 fi
6276 rm -f conftest*
6277 fi
6278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6279   echo "$ac_t""yes" 1>&6
6280     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6281   cat >> confdefs.h <<EOF
6282 #define $ac_tr_hdr 1
6283 EOF
6284  
6285 else
6286   echo "$ac_t""no" 1>&6
6287 fi
6288 done
6289
6290                 if test $ac_cv_header_heim_err_h = yes ; then
6291                         krb5_impl=heimdal
6292                 else
6293                         krb5_impl=mit
6294                 fi
6295
6296                 if test $krb5_impl = mit; then
6297                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6298 echo "configure:6299: checking for main in -lkrb5" >&5
6299 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6300 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6301   echo $ac_n "(cached) $ac_c" 1>&6
6302 else
6303   ac_save_LIBS="$LIBS"
6304 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6305 cat > conftest.$ac_ext <<EOF
6306 #line 6307 "configure"
6307 #include "confdefs.h"
6308
6309 int main() {
6310 main()
6311 ; return 0; }
6312 EOF
6313 if { (eval echo configure:6314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6314   rm -rf conftest*
6315   eval "ac_cv_lib_$ac_lib_var=yes"
6316 else
6317   echo "configure: failed program was:" >&5
6318   cat conftest.$ac_ext >&5
6319   rm -rf conftest*
6320   eval "ac_cv_lib_$ac_lib_var=no"
6321 fi
6322 rm -f conftest*
6323 LIBS="$ac_save_LIBS"
6324
6325 fi
6326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6327   echo "$ac_t""yes" 1>&6
6328   have_krb5=yes
6329                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6330 else
6331   echo "$ac_t""no" 1>&6
6332 have_krb5=no
6333 fi
6334
6335
6336                 elif test $krb5_impl = heimdal; then
6337                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6338 echo "configure:6339: checking for main in -lkrb5" >&5
6339 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6341   echo $ac_n "(cached) $ac_c" 1>&6
6342 else
6343   ac_save_LIBS="$LIBS"
6344 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6345 cat > conftest.$ac_ext <<EOF
6346 #line 6347 "configure"
6347 #include "confdefs.h"
6348
6349 int main() {
6350 main()
6351 ; return 0; }
6352 EOF
6353 if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6354   rm -rf conftest*
6355   eval "ac_cv_lib_$ac_lib_var=yes"
6356 else
6357   echo "configure: failed program was:" >&5
6358   cat conftest.$ac_ext >&5
6359   rm -rf conftest*
6360   eval "ac_cv_lib_$ac_lib_var=no"
6361 fi
6362 rm -f conftest*
6363 LIBS="$ac_save_LIBS"
6364
6365 fi
6366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6367   echo "$ac_t""yes" 1>&6
6368   have_krb5=yes
6369                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6370 else
6371   echo "$ac_t""no" 1>&6
6372 have_krb5=no
6373 fi
6374
6375
6376                         cat >> confdefs.h <<\EOF
6377 #define HAVE_HEIMDAL_KERBEROS 1
6378 EOF
6379
6380                 else
6381                         have_krb5=no
6382                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6383                 fi
6384
6385                 if test $have_krb5 = yes ; then
6386                         ol_link_krb5=yes
6387
6388                         cat >> confdefs.h <<\EOF
6389 #define HAVE_KRB5 1
6390 EOF
6391
6392
6393                         if test $ol_enable_kpasswd != no ; then
6394                                 ol_link_kpasswd=yes;
6395                         fi
6396
6397                         if test $ol_with_kerberos = k5only ; then
6398                                 ol_with_kerberos=found
6399                         fi
6400
6401                 elif test $ol_with_kerberos != auto ; then
6402                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6403                 fi
6404
6405         fi
6406 fi
6407
6408 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6409         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6410
6411         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6412 do
6413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6415 echo "configure:6416: checking for $ac_hdr" >&5
6416 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6417   echo $ac_n "(cached) $ac_c" 1>&6
6418 else
6419   cat > conftest.$ac_ext <<EOF
6420 #line 6421 "configure"
6421 #include "confdefs.h"
6422 #include <$ac_hdr>
6423 EOF
6424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6425 { (eval echo configure:6426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6427 if test -z "$ac_err"; then
6428   rm -rf conftest*
6429   eval "ac_cv_header_$ac_safe=yes"
6430 else
6431   echo "$ac_err" >&5
6432   echo "configure: failed program was:" >&5
6433   cat conftest.$ac_ext >&5
6434   rm -rf conftest*
6435   eval "ac_cv_header_$ac_safe=no"
6436 fi
6437 rm -f conftest*
6438 fi
6439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6440   echo "$ac_t""yes" 1>&6
6441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6442   cat >> confdefs.h <<EOF
6443 #define $ac_tr_hdr 1
6444 EOF
6445  
6446 else
6447   echo "$ac_t""no" 1>&6
6448 fi
6449 done
6450
6451
6452         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6453                 if test $krb5_impl = mit; then
6454                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6455 echo "configure:6456: checking for main in -lkrb4" >&5
6456 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6457 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6458   echo $ac_n "(cached) $ac_c" 1>&6
6459 else
6460   ac_save_LIBS="$LIBS"
6461 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6462 cat > conftest.$ac_ext <<EOF
6463 #line 6464 "configure"
6464 #include "confdefs.h"
6465
6466 int main() {
6467 main()
6468 ; return 0; }
6469 EOF
6470 if { (eval echo configure:6471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6471   rm -rf conftest*
6472   eval "ac_cv_lib_$ac_lib_var=yes"
6473 else
6474   echo "configure: failed program was:" >&5
6475   cat conftest.$ac_ext >&5
6476   rm -rf conftest*
6477   eval "ac_cv_lib_$ac_lib_var=no"
6478 fi
6479 rm -f conftest*
6480 LIBS="$ac_save_LIBS"
6481
6482 fi
6483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6484   echo "$ac_t""yes" 1>&6
6485   have_k425=yes
6486                                 KRB4_LIBS="-lkrb4 -ldes425"
6487 else
6488   echo "$ac_t""no" 1>&6
6489 have_k425=no
6490 fi
6491
6492
6493                 elif test $krb5_impl = heimdal; then
6494                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6495 echo "configure:6496: checking for main in -lkrb4" >&5
6496 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6498   echo $ac_n "(cached) $ac_c" 1>&6
6499 else
6500   ac_save_LIBS="$LIBS"
6501 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6502 cat > conftest.$ac_ext <<EOF
6503 #line 6504 "configure"
6504 #include "confdefs.h"
6505
6506 int main() {
6507 main()
6508 ; return 0; }
6509 EOF
6510 if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6511   rm -rf conftest*
6512   eval "ac_cv_lib_$ac_lib_var=yes"
6513 else
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -rf conftest*
6517   eval "ac_cv_lib_$ac_lib_var=no"
6518 fi
6519 rm -f conftest*
6520 LIBS="$ac_save_LIBS"
6521
6522 fi
6523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6524   echo "$ac_t""yes" 1>&6
6525   have_k425=yes
6526                                 KRB4_LIBS="-lkrb4"
6527 else
6528   echo "$ac_t""no" 1>&6
6529 have_k425=no
6530 fi
6531
6532
6533                 else
6534                         have_425=no
6535                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6536                 fi
6537
6538                 if test $have_k425 = yes ; then
6539                         ol_with_kerberos=found
6540                         ol_link_krb4=yes
6541
6542                         cat >> confdefs.h <<\EOF
6543 #define HAVE_KRB425 1
6544 EOF
6545
6546                         cat >> confdefs.h <<\EOF
6547 #define HAVE_KRB4 1
6548 EOF
6549
6550
6551                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6552 echo "configure:6553: checking for des_debug in Kerberos libraries" >&5
6553 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6554   echo $ac_n "(cached) $ac_c" 1>&6
6555 else
6556   
6557                                                                 save_LIBS="$LIBS"
6558                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6559                                 cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562
6563 #include <kerberosIV/krb.h>
6564 #include <kerberosIV/des.h>
6565 extern int des_debug;
6566
6567 int main() {
6568
6569 des_debug = 1;
6570
6571 ; return 0; }
6572 EOF
6573 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6574   rm -rf conftest*
6575   ol_cv_var_des_debug=yes
6576 else
6577   echo "configure: failed program was:" >&5
6578   cat conftest.$ac_ext >&5
6579   rm -rf conftest*
6580   ol_cv_var_des_debug=no
6581 fi
6582 rm -f conftest*
6583                                                                 LIBS="$save_LIBS"
6584                         
6585 fi
6586
6587 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6588
6589                         if test $ol_cv_var_des_debug = yes ; then
6590                                 cat >> confdefs.h <<\EOF
6591 #define HAVE_DES_DEBUG 1
6592 EOF
6593
6594                         fi
6595
6596                         LIBS="$save_LIBS"
6597                 fi
6598         fi
6599 fi
6600
6601 if test $ol_link_krb5 = yes ; then
6602         ol_with_kerberos=found
6603 fi
6604
6605 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6606         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6607
6608         for ac_hdr in krb.h des.h krb-archaeology.h 
6609 do
6610 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6611 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6612 echo "configure:6613: checking for $ac_hdr" >&5
6613 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6614   echo $ac_n "(cached) $ac_c" 1>&6
6615 else
6616   cat > conftest.$ac_ext <<EOF
6617 #line 6618 "configure"
6618 #include "confdefs.h"
6619 #include <$ac_hdr>
6620 EOF
6621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6622 { (eval echo configure:6623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6624 if test -z "$ac_err"; then
6625   rm -rf conftest*
6626   eval "ac_cv_header_$ac_safe=yes"
6627 else
6628   echo "$ac_err" >&5
6629   echo "configure: failed program was:" >&5
6630   cat conftest.$ac_ext >&5
6631   rm -rf conftest*
6632   eval "ac_cv_header_$ac_safe=no"
6633 fi
6634 rm -f conftest*
6635 fi
6636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6637   echo "$ac_t""yes" 1>&6
6638     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6639   cat >> confdefs.h <<EOF
6640 #define $ac_tr_hdr 1
6641 EOF
6642  
6643 else
6644   echo "$ac_t""no" 1>&6
6645 fi
6646 done
6647
6648
6649         if test $ac_cv_header_krb_h = yes ; then
6650                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6651 echo "configure:6652: checking for main in -lkrb" >&5
6652 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6654   echo $ac_n "(cached) $ac_c" 1>&6
6655 else
6656   ac_save_LIBS="$LIBS"
6657 LIBS="-lkrb -ldes $LIBS"
6658 cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661
6662 int main() {
6663 main()
6664 ; return 0; }
6665 EOF
6666 if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6667   rm -rf conftest*
6668   eval "ac_cv_lib_$ac_lib_var=yes"
6669 else
6670   echo "configure: failed program was:" >&5
6671   cat conftest.$ac_ext >&5
6672   rm -rf conftest*
6673   eval "ac_cv_lib_$ac_lib_var=no"
6674 fi
6675 rm -f conftest*
6676 LIBS="$ac_save_LIBS"
6677
6678 fi
6679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6680   echo "$ac_t""yes" 1>&6
6681   have_k4=yes
6682 else
6683   echo "$ac_t""no" 1>&6
6684 have_k4=no
6685 fi
6686
6687
6688                 if test $have_k4 = yes ; then
6689                         ol_with_kerberos=found
6690                         ol_link_krb4=yes
6691
6692                         cat >> confdefs.h <<\EOF
6693 #define HAVE_KRB4 1
6694 EOF
6695
6696
6697                         KRB4_LIBS="-lkrb -ldes"
6698
6699                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6700                                 cat >> confdefs.h <<\EOF
6701 #define HAVE_KTH_KERBEROS 1
6702 EOF
6703
6704                         fi
6705                 fi
6706         fi
6707 fi
6708
6709 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6710         ol_link_kpasswd=yes
6711 fi
6712
6713 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6714         ol_link_kbind=yes
6715
6716 elif test $ol_enable_kbind = yes ; then
6717         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6718 fi
6719
6720 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6721         cat >> confdefs.h <<\EOF
6722 #define HAVE_KERBEROS 1
6723 EOF
6724
6725
6726 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6727         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6728 fi
6729
6730 ol_link_tls=no
6731 if test $ol_with_tls != no ; then
6732         for ac_hdr in openssl/ssl.h ssl.h
6733 do
6734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6736 echo "configure:6737: checking for $ac_hdr" >&5
6737 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6738   echo $ac_n "(cached) $ac_c" 1>&6
6739 else
6740   cat > conftest.$ac_ext <<EOF
6741 #line 6742 "configure"
6742 #include "confdefs.h"
6743 #include <$ac_hdr>
6744 EOF
6745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6746 { (eval echo configure:6747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6748 if test -z "$ac_err"; then
6749   rm -rf conftest*
6750   eval "ac_cv_header_$ac_safe=yes"
6751 else
6752   echo "$ac_err" >&5
6753   echo "configure: failed program was:" >&5
6754   cat conftest.$ac_ext >&5
6755   rm -rf conftest*
6756   eval "ac_cv_header_$ac_safe=no"
6757 fi
6758 rm -f conftest*
6759 fi
6760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6761   echo "$ac_t""yes" 1>&6
6762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6763   cat >> confdefs.h <<EOF
6764 #define $ac_tr_hdr 1
6765 EOF
6766  
6767 else
6768   echo "$ac_t""no" 1>&6
6769 fi
6770 done
6771
6772         
6773         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6774                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6775 echo "configure:6776: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6776 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6778   echo $ac_n "(cached) $ac_c" 1>&6
6779 else
6780   ac_save_LIBS="$LIBS"
6781 LIBS="-lssl -lcrypto $LIBS"
6782 cat > conftest.$ac_ext <<EOF
6783 #line 6784 "configure"
6784 #include "confdefs.h"
6785 /* Override any gcc2 internal prototype to avoid an error.  */
6786 /* We use char because int might match the return type of a gcc2
6787     builtin and then its argument prototype would still apply.  */
6788 char SSLeay_add_ssl_algorithms();
6789
6790 int main() {
6791 SSLeay_add_ssl_algorithms()
6792 ; return 0; }
6793 EOF
6794 if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6795   rm -rf conftest*
6796   eval "ac_cv_lib_$ac_lib_var=yes"
6797 else
6798   echo "configure: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   rm -rf conftest*
6801   eval "ac_cv_lib_$ac_lib_var=no"
6802 fi
6803 rm -f conftest*
6804 LIBS="$ac_save_LIBS"
6805
6806 fi
6807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6808   echo "$ac_t""yes" 1>&6
6809   have_ssleay=yes
6810                         need_rsaref=no
6811 else
6812   echo "$ac_t""no" 1>&6
6813 have_ssleay=no
6814 fi
6815
6816                         
6817                 if test $have_ssleay = no ; then
6818                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6819 echo "configure:6820: checking for SSL_library_init in -lssl" >&5
6820 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6821 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   ac_save_LIBS="$LIBS"
6825 LIBS="-lssl -lcrypto $LIBS"
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* Override any gcc2 internal prototype to avoid an error.  */
6830 /* We use char because int might match the return type of a gcc2
6831     builtin and then its argument prototype would still apply.  */
6832 char SSL_library_init();
6833
6834 int main() {
6835 SSL_library_init()
6836 ; return 0; }
6837 EOF
6838 if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6839   rm -rf conftest*
6840   eval "ac_cv_lib_$ac_lib_var=yes"
6841 else
6842   echo "configure: failed program was:" >&5
6843   cat conftest.$ac_ext >&5
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=no"
6846 fi
6847 rm -f conftest*
6848 LIBS="$ac_save_LIBS"
6849
6850 fi
6851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6852   echo "$ac_t""yes" 1>&6
6853   have_ssleay=yes
6854                                 need_rsaref=no
6855 else
6856   echo "$ac_t""no" 1>&6
6857 have_ssleay=no
6858 fi
6859
6860                 fi
6861
6862                 if test $have_ssleay = no ; then
6863                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6864 echo "configure:6865: checking for ssl3_accept in -lssl" >&5
6865 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6867   echo $ac_n "(cached) $ac_c" 1>&6
6868 else
6869   ac_save_LIBS="$LIBS"
6870 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6871 cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874 /* Override any gcc2 internal prototype to avoid an error.  */
6875 /* We use char because int might match the return type of a gcc2
6876     builtin and then its argument prototype would still apply.  */
6877 char ssl3_accept();
6878
6879 int main() {
6880 ssl3_accept()
6881 ; return 0; }
6882 EOF
6883 if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6884   rm -rf conftest*
6885   eval "ac_cv_lib_$ac_lib_var=yes"
6886 else
6887   echo "configure: failed program was:" >&5
6888   cat conftest.$ac_ext >&5
6889   rm -rf conftest*
6890   eval "ac_cv_lib_$ac_lib_var=no"
6891 fi
6892 rm -f conftest*
6893 LIBS="$ac_save_LIBS"
6894
6895 fi
6896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6897   echo "$ac_t""yes" 1>&6
6898   have_ssleay=yes
6899                                 need_rsaref=yes
6900 else
6901   echo "$ac_t""no" 1>&6
6902 have_ssleay=no
6903 fi
6904
6905                 fi
6906
6907                 if test $have_ssleay = yes ; then
6908                         ol_with_tls=found
6909                         ol_link_tls=yes
6910
6911                         cat >> confdefs.h <<\EOF
6912 #define HAVE_SSLEAY 1
6913 EOF
6914
6915
6916                         if test $need_rsaref = yes; then
6917                                 cat >> confdefs.h <<\EOF
6918 #define HAVE_RSAREF 1
6919 EOF
6920
6921
6922                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6923                         else
6924                                 TLS_LIBS="-lssl -lcrypto"
6925                         fi
6926                 fi
6927         fi
6928
6929 else
6930         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6931 fi
6932
6933 if test $ol_link_tls = yes ; then
6934         cat >> confdefs.h <<\EOF
6935 #define HAVE_TLS 1
6936 EOF
6937
6938
6939 elif test $ol_with_tls = auto ; then
6940         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6941         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6942
6943 elif test $ol_with_tls != no ; then
6944         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6945 fi
6946
6947 if test $ol_enable_lmpasswd != no; then
6948         if test $ol_link_tls != yes ; then
6949                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
6950         fi
6951
6952         cat >> confdefs.h <<\EOF
6953 #define SLAPD_LMHASH 1
6954 EOF
6955
6956 fi
6957
6958 for ac_func in \
6959         ctime_r                 \
6960         gethostbyname_r gethostbyaddr_r \
6961
6962 do
6963 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6964 echo "configure:6965: checking for $ac_func" >&5
6965 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6966   echo $ac_n "(cached) $ac_c" 1>&6
6967 else
6968   cat > conftest.$ac_ext <<EOF
6969 #line 6970 "configure"
6970 #include "confdefs.h"
6971 /* System header to define __stub macros and hopefully few prototypes,
6972     which can conflict with char $ac_func(); below.  */
6973 #include <assert.h>
6974 /* Override any gcc2 internal prototype to avoid an error.  */
6975 /* We use char because int might match the return type of a gcc2
6976     builtin and then its argument prototype would still apply.  */
6977 char $ac_func();
6978 char (*f)();
6979
6980 int main() {
6981
6982 /* The GNU C library defines this for functions which it implements
6983     to always fail with ENOSYS.  Some functions are actually named
6984     something starting with __ and the normal name is an alias.  */
6985 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6986 choke me
6987 #else
6988 f = $ac_func;
6989 #endif
6990
6991 ; return 0; }
6992 EOF
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6994   rm -rf conftest*
6995   eval "ac_cv_func_$ac_func=yes"
6996 else
6997   echo "configure: failed program was:" >&5
6998   cat conftest.$ac_ext >&5
6999   rm -rf conftest*
7000   eval "ac_cv_func_$ac_func=no"
7001 fi
7002 rm -f conftest*
7003 fi
7004
7005 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7006   echo "$ac_t""yes" 1>&6
7007     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7008   cat >> confdefs.h <<EOF
7009 #define $ac_tr_func 1
7010 EOF
7011  
7012 else
7013   echo "$ac_t""no" 1>&6
7014 fi
7015 done
7016
7017
7018 if test "$ac_cv_func_ctime_r" = no ; then
7019         ol_cv_func_ctime_r_nargs=0
7020 else
7021         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
7022 echo "configure:7023: checking number of arguments of ctime_r" >&5
7023 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
7024   echo $ac_n "(cached) $ac_c" 1>&6
7025 else
7026   cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029 #include <time.h>
7030 int main() {
7031 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
7032 ; return 0; }
7033 EOF
7034 if { (eval echo configure:7035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7035   rm -rf conftest*
7036   ol_cv_func_ctime_r_nargs3=yes
7037 else
7038   echo "configure: failed program was:" >&5
7039   cat conftest.$ac_ext >&5
7040   rm -rf conftest*
7041   ol_cv_func_ctime_r_nargs3=no
7042 fi
7043 rm -f conftest*
7044
7045         cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 #include <time.h>
7049 int main() {
7050 time_t ti; char *buffer; ctime_r(&ti,buffer);
7051 ; return 0; }
7052 EOF
7053 if { (eval echo configure:7054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7054   rm -rf conftest*
7055   ol_cv_func_ctime_r_nargs2=yes
7056 else
7057   echo "configure: failed program was:" >&5
7058   cat conftest.$ac_ext >&5
7059   rm -rf conftest*
7060   ol_cv_func_ctime_r_nargs2=no
7061 fi
7062 rm -f conftest*
7063
7064         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
7065                 $ol_cv_func_ctime_r_nargs2 = no ; then
7066
7067                 ol_cv_func_ctime_r_nargs=3
7068
7069         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
7070                 $ol_cv_func_ctime_r_nargs2 = yes ; then
7071
7072                 ol_cv_func_ctime_r_nargs=2
7073
7074         else
7075                 ol_cv_func_ctime_r_nargs=0
7076         fi
7077   
7078 fi
7079
7080 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
7081
7082   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
7083         cat >> confdefs.h <<EOF
7084 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
7085 EOF
7086
7087   fi
7088
7089 fi
7090
7091 if test "$ac_cv_func_gethostbyname_r" = yes ; then
7092         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
7093 echo "configure:7094: checking number of arguments of gethostbyname_r" >&5
7094 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
7095   echo $ac_n "(cached) $ac_c" 1>&6
7096 else
7097   cat > conftest.$ac_ext <<EOF
7098 #line 7099 "configure"
7099 #include "confdefs.h"
7100 #include <sys/types.h>
7101 #include <sys/socket.h>
7102 #include <netinet/in.h>
7103 #include <netdb.h>
7104 #define BUFSIZE (sizeof(struct hostent)+10)
7105 int main() {
7106 struct hostent hent; char buffer[BUFSIZE];
7107                 int bufsize=BUFSIZE;int h_errno;
7108                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
7109                         buffer, bufsize, &h_errno);
7110 ; return 0; }
7111 EOF
7112 if { (eval echo configure:7113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7113   rm -rf conftest*
7114   ol_cv_func_gethostbyname_r_nargs5=yes
7115 else
7116   echo "configure: failed program was:" >&5
7117   cat conftest.$ac_ext >&5
7118   rm -rf conftest*
7119   ol_cv_func_gethostbyname_r_nargs5=no
7120 fi
7121 rm -f conftest*
7122
7123         cat > conftest.$ac_ext <<EOF
7124 #line 7125 "configure"
7125 #include "confdefs.h"
7126 #include <sys/types.h>
7127 #include <sys/socket.h>
7128 #include <netinet/in.h>
7129 #include <netdb.h>
7130 #define BUFSIZE (sizeof(struct hostent)+10)
7131 int main() {
7132 struct hostent hent;struct hostent *rhent;
7133                 char buffer[BUFSIZE];
7134                 int bufsize=BUFSIZE;int h_errno;
7135                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
7136                         &rhent, &h_errno);
7137 ; return 0; }
7138 EOF
7139 if { (eval echo configure:7140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7140   rm -rf conftest*
7141   ol_cv_func_gethostbyname_r_nargs6=yes
7142 else
7143   echo "configure: failed program was:" >&5
7144   cat conftest.$ac_ext >&5
7145   rm -rf conftest*
7146   ol_cv_func_gethostbyname_r_nargs6=no
7147 fi
7148 rm -f conftest*
7149
7150         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
7151                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
7152
7153                 ol_cv_func_gethostbyname_r_nargs=5
7154
7155         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7156                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7157
7158                 ol_cv_func_gethostbyname_r_nargs=6
7159
7160         else
7161                 ol_cv_func_gethostbyname_r_nargs=0
7162         fi
7163   
7164 fi
7165
7166 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7167   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7168         cat >> confdefs.h <<EOF
7169 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7170 EOF
7171
7172   fi
7173
7174 else
7175         ol_cv_func_gethostbyname_r_nargs=0
7176 fi
7177  
7178 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7179         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7180 echo "configure:7181: checking number of arguments of gethostbyaddr_r" >&5
7181 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7182   echo $ac_n "(cached) $ac_c" 1>&6
7183 else
7184   cat > conftest.$ac_ext <<EOF
7185 #line 7186 "configure"
7186 #include "confdefs.h"
7187 #include <sys/types.h>
7188 #include <sys/socket.h>
7189 #include <netinet/in.h>
7190 #include <netdb.h>
7191 #define BUFSIZE (sizeof(struct hostent)+10)
7192 int main() {
7193 struct hostent hent; char buffer[BUFSIZE]; 
7194             struct in_addr add;
7195             size_t alen=sizeof(struct in_addr);
7196             int bufsize=BUFSIZE;int h_errno;
7197                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7198                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7199 ; return 0; }
7200 EOF
7201 if { (eval echo configure:7202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7202   rm -rf conftest*
7203   ol_cv_func_gethostbyaddr_r_nargs7=yes
7204 else
7205   echo "configure: failed program was:" >&5
7206   cat conftest.$ac_ext >&5
7207   rm -rf conftest*
7208   ol_cv_func_gethostbyaddr_r_nargs7=no
7209 fi
7210 rm -f conftest*
7211
7212         cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 #include <sys/types.h>
7216 #include <sys/socket.h>
7217 #include <netinet/in.h>
7218 #include <netdb.h>
7219 #define BUFSIZE (sizeof(struct hostent)+10)
7220 int main() {
7221 struct hostent hent;
7222                 struct hostent *rhent; char buffer[BUFSIZE]; 
7223                 struct in_addr add;
7224                 size_t alen=sizeof(struct in_addr);
7225                 int bufsize=BUFSIZE;int h_errno;
7226                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7227                         alen, AF_INET, &hent, buffer, bufsize, 
7228                         &rhent, &h_errno);
7229 ; return 0; }
7230 EOF
7231 if { (eval echo configure:7232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7232   rm -rf conftest*
7233   ol_cv_func_gethostbyaddr_r_nargs8=yes
7234 else
7235   echo "configure: failed program was:" >&5
7236   cat conftest.$ac_ext >&5
7237   rm -rf conftest*
7238   ol_cv_func_gethostbyaddr_r_nargs8=no
7239 fi
7240 rm -f conftest*
7241
7242         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7243                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7244
7245                 ol_cv_func_gethostbyaddr_r_nargs=7
7246
7247         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7248                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7249
7250                 ol_cv_func_gethostbyaddr_r_nargs=8
7251
7252         else
7253                 ol_cv_func_gethostbyaddr_r_nargs=0
7254         fi
7255   
7256 fi
7257
7258 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7259   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7260     cat >> confdefs.h <<EOF
7261 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7262 EOF
7263
7264   fi
7265
7266 else
7267         ol_cv_func_gethostbyaddr_r_nargs=0
7268 fi
7269
7270 if test "$ac_cv_func_ctime_r" = yes \
7271         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7272         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7273         -a "$ac_cv_func_gethostbyname_r" = yes \
7274         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7275         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7276         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7277         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7278         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7279         ; then
7280  
7281         cat >> confdefs.h <<\EOF
7282 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7283 EOF
7284
7285 fi
7286
7287 ol_link_threads=no
7288
7289 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7290         -o $ol_with_threads = nt ; then
7291
7292         
7293         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7294 echo "configure:7295: checking for _beginthread" >&5
7295 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7296   echo $ac_n "(cached) $ac_c" 1>&6
7297 else
7298   cat > conftest.$ac_ext <<EOF
7299 #line 7300 "configure"
7300 #include "confdefs.h"
7301 /* System header to define __stub macros and hopefully few prototypes,
7302     which can conflict with char _beginthread(); below.  */
7303 #include <assert.h>
7304 /* Override any gcc2 internal prototype to avoid an error.  */
7305 /* We use char because int might match the return type of a gcc2
7306     builtin and then its argument prototype would still apply.  */
7307 char _beginthread();
7308 char (*f)();
7309
7310 int main() {
7311
7312 /* The GNU C library defines this for functions which it implements
7313     to always fail with ENOSYS.  Some functions are actually named
7314     something starting with __ and the normal name is an alias.  */
7315 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7316 choke me
7317 #else
7318 f = _beginthread;
7319 #endif
7320
7321 ; return 0; }
7322 EOF
7323 if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7324   rm -rf conftest*
7325   eval "ac_cv_func__beginthread=yes"
7326 else
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329   rm -rf conftest*
7330   eval "ac_cv_func__beginthread=no"
7331 fi
7332 rm -f conftest*
7333 fi
7334
7335 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7336   echo "$ac_t""yes" 1>&6
7337   :
7338 else
7339   echo "$ac_t""no" 1>&6
7340 fi
7341
7342
7343         if test $ac_cv_func__beginthread = yes ; then
7344                 cat >> confdefs.h <<\EOF
7345 #define HAVE_NT_THREADS 1
7346 EOF
7347
7348         fi
7349
7350
7351         if test "$ol_cv_nt_threads" = yes ; then
7352         ol_link_threads=nt
7353         ol_with_threads=found
7354         ol_with_yielding_select=yes
7355
7356                 cat >> confdefs.h <<\EOF
7357 #define HAVE_NT_SERVICE_MANAGER 1
7358 EOF
7359
7360                 cat >> confdefs.h <<\EOF
7361 #define HAVE_NT_EVENT_LOG 1
7362 EOF
7363
7364         fi
7365
7366         if test $ol_with_threads = nt ; then
7367                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7368         fi
7369 fi
7370
7371 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7372         -o $ol_with_threads = posix ; then
7373
7374         for ac_hdr in pthread.h
7375 do
7376 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7377 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7378 echo "configure:7379: checking for $ac_hdr" >&5
7379 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7380   echo $ac_n "(cached) $ac_c" 1>&6
7381 else
7382   cat > conftest.$ac_ext <<EOF
7383 #line 7384 "configure"
7384 #include "confdefs.h"
7385 #include <$ac_hdr>
7386 EOF
7387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7388 { (eval echo configure:7389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7390 if test -z "$ac_err"; then
7391   rm -rf conftest*
7392   eval "ac_cv_header_$ac_safe=yes"
7393 else
7394   echo "$ac_err" >&5
7395   echo "configure: failed program was:" >&5
7396   cat conftest.$ac_ext >&5
7397   rm -rf conftest*
7398   eval "ac_cv_header_$ac_safe=no"
7399 fi
7400 rm -f conftest*
7401 fi
7402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7403   echo "$ac_t""yes" 1>&6
7404     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7405   cat >> confdefs.h <<EOF
7406 #define $ac_tr_hdr 1
7407 EOF
7408  
7409 else
7410   echo "$ac_t""no" 1>&6
7411 fi
7412 done
7413
7414
7415         if test $ac_cv_header_pthread_h = yes ; then
7416                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7417 echo "configure:7418: checking POSIX thread version" >&5
7418 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7419   echo $ac_n "(cached) $ac_c" 1>&6
7420 else
7421   
7422         cat > conftest.$ac_ext <<EOF
7423 #line 7424 "configure"
7424 #include "confdefs.h"
7425
7426 #               include <pthread.h>
7427                 /* this check could be improved */
7428 #               ifdef PTHREAD_ONCE_INIT
7429                         pthread_version_final;
7430 #               endif
7431         
7432 EOF
7433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7434   egrep "pthread_version_final" >/dev/null 2>&1; then
7435   rm -rf conftest*
7436   ol_pthread_final=yes
7437 else
7438   rm -rf conftest*
7439   ol_pthread_final=no
7440 fi
7441 rm -f conftest*
7442
7443
7444         cat > conftest.$ac_ext <<EOF
7445 #line 7446 "configure"
7446 #include "confdefs.h"
7447
7448 #               include <pthread.h>
7449                 /* this check could be improved */
7450 #               ifdef pthread_once_init
7451                         pthread_version_draft4;
7452 #               endif
7453         
7454 EOF
7455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7456   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7457   rm -rf conftest*
7458   ol_pthread_draft4=yes
7459 else
7460   rm -rf conftest*
7461   ol_pthread_draft4=no
7462 fi
7463 rm -f conftest*
7464
7465
7466         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7467                 ol_cv_pthread_version=final
7468         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7469                 ol_cv_pthread_version=draft4
7470         else
7471                 ol_cv_pthread_version=unknown
7472         fi
7473
7474 fi
7475
7476 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7477
7478
7479                 if test $ol_cv_pthread_version = final ; then
7480                         cat >> confdefs.h <<\EOF
7481 #define HAVE_PTHREADS_FINAL 1
7482 EOF
7483
7484                 elif test $ol_cv_pthread_version = draft4 ; then
7485                         cat >> confdefs.h <<\EOF
7486 #define HAVE_PTHREADS_D4 1
7487 EOF
7488
7489                 else
7490                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7491                 fi
7492
7493                 # consider threads found
7494                 ol_with_threads=found
7495
7496                 
7497         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7498 echo "configure:7499: checking for LinuxThreads pthread.h" >&5
7499 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505 #include <pthread.h>
7506 EOF
7507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7508   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7509   rm -rf conftest*
7510   ol_cv_header_linux_threads=yes
7511 else
7512   rm -rf conftest*
7513   ol_cv_header_linux_threads=no
7514 fi
7515 rm -f conftest*
7516
7517                 
7518 fi
7519
7520 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7521         if test $ol_cv_header_linux_threads = yes; then
7522                 cat >> confdefs.h <<\EOF
7523 #define HAVE_LINUX_THREADS 1
7524 EOF
7525
7526         fi
7527
7528                 
7529         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7530 echo "configure:7531: checking for GNU Pth pthread.h" >&5
7531 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7532   echo $ac_n "(cached) $ac_c" 1>&6
7533 else
7534   cat > conftest.$ac_ext <<EOF
7535 #line 7536 "configure"
7536 #include "confdefs.h"
7537 #include <pthread.h>
7538 #ifdef _POSIX_THREAD_IS_GNU_PTH
7539         __gnu_pth__;
7540 #endif
7541
7542 EOF
7543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7544   egrep "__gnu_pth__" >/dev/null 2>&1; then
7545   rm -rf conftest*
7546   ol_cv_header_gnu_pth_pthread_h=yes
7547 else
7548   rm -rf conftest*
7549   ol_cv_header_gnu_pth_pthread_h=no
7550 fi
7551 rm -f conftest*
7552
7553                 
7554 fi
7555
7556 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7557
7558
7559                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7560                         for ac_hdr in sched.h
7561 do
7562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7564 echo "configure:7565: checking for $ac_hdr" >&5
7565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7566   echo $ac_n "(cached) $ac_c" 1>&6
7567 else
7568   cat > conftest.$ac_ext <<EOF
7569 #line 7570 "configure"
7570 #include "confdefs.h"
7571 #include <$ac_hdr>
7572 EOF
7573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7574 { (eval echo configure:7575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7576 if test -z "$ac_err"; then
7577   rm -rf conftest*
7578   eval "ac_cv_header_$ac_safe=yes"
7579 else
7580   echo "$ac_err" >&5
7581   echo "configure: failed program was:" >&5
7582   cat conftest.$ac_ext >&5
7583   rm -rf conftest*
7584   eval "ac_cv_header_$ac_safe=no"
7585 fi
7586 rm -f conftest*
7587 fi
7588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7589   echo "$ac_t""yes" 1>&6
7590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7591   cat >> confdefs.h <<EOF
7592 #define $ac_tr_hdr 1
7593 EOF
7594  
7595 else
7596   echo "$ac_t""no" 1>&6
7597 fi
7598 done
7599
7600                 fi
7601
7602                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7603                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7604 echo "configure:7605: checking for pthread_create in default libraries" >&5
7605 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7606   echo $ac_n "(cached) $ac_c" 1>&6
7607 else
7608   
7609                 if test "$cross_compiling" = yes; then
7610   cat > conftest.$ac_ext <<EOF
7611 #line 7612 "configure"
7612 #include "confdefs.h"
7613 /* pthread test headers */
7614 #include <pthread.h>
7615 #ifndef NULL
7616 #define NULL (void*)0
7617 #endif
7618
7619 static void *task(p)
7620         void *p;
7621 {
7622         return (void *) (p == NULL);
7623 }
7624
7625 int main() {
7626
7627         /* pthread test function */
7628         pthread_t t;
7629         int status;
7630         int detach = 1;
7631
7632 #ifdef HAVE_PTHREADS_FINAL
7633         /* Final pthreads */
7634         pthread_attr_t attr;
7635
7636         status = pthread_attr_init(&attr);
7637         if( status ) return status;
7638
7639 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7640         if( !detach ) {
7641 #if defined( PTHREAD_CREATE_JOINABLE )
7642                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7643 #else
7644                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7645 #endif
7646
7647 #ifdef PTHREAD_CREATE_DETACHED
7648         } else {
7649                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7650 #endif
7651         }
7652         if( status ) return status;
7653 #endif
7654
7655         status = pthread_create( &t, &attr, task, NULL );
7656         if( status ) return status;
7657
7658 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7659         if( detach ) {
7660                 /* give thread a chance to complete */
7661                 /* it should remain joinable and hence detachable */
7662                 sleep( 1 );
7663
7664                 status = pthread_detach( t );
7665                 if( status ) return status;
7666         }
7667 #endif
7668
7669 #else
7670         /* Draft 4 pthreads */
7671         status = pthread_create( &t, pthread_attr_default, task, NULL );
7672         if( status ) return status;
7673
7674         if( detach ) {
7675                 /* give thread a chance to complete */
7676                 /* it should remain joinable and hence detachable */
7677                 sleep( 1 );
7678
7679                 status = pthread_detach( &t );
7680                 if( status ) return status;
7681         }
7682 #endif
7683
7684 #ifdef HAVE_LINUX_THREADS
7685         pthread_kill_other_threads_np();
7686 #endif
7687
7688         return 0;
7689
7690 ; return 0; }
7691 EOF
7692 if { (eval echo configure:7693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7693   rm -rf conftest*
7694   ol_cv_pthread_create=yes
7695 else
7696   echo "configure: failed program was:" >&5
7697   cat conftest.$ac_ext >&5
7698   rm -rf conftest*
7699   ol_cv_pthread_create=no
7700 fi
7701 rm -f conftest*
7702 else
7703   cat > conftest.$ac_ext <<EOF
7704 #line 7705 "configure"
7705 #include "confdefs.h"
7706 /* pthread test headers */
7707 #include <pthread.h>
7708 #ifndef NULL
7709 #define NULL (void*)0
7710 #endif
7711
7712 static void *task(p)
7713         void *p;
7714 {
7715         return (void *) (p == NULL);
7716 }
7717
7718
7719 int main(argc, argv)
7720         int argc;
7721         char **argv;
7722 {
7723
7724         /* pthread test function */
7725         pthread_t t;
7726         int status;
7727         int detach = 1;
7728
7729 #ifdef HAVE_PTHREADS_FINAL
7730         /* Final pthreads */
7731         pthread_attr_t attr;
7732
7733         status = pthread_attr_init(&attr);
7734         if( status ) return status;
7735
7736 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7737         if( !detach ) {
7738 #if defined( PTHREAD_CREATE_JOINABLE )
7739                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7740 #else
7741                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7742 #endif
7743
7744 #ifdef PTHREAD_CREATE_DETACHED
7745         } else {
7746                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7747 #endif
7748         }
7749         if( status ) return status;
7750 #endif
7751
7752         status = pthread_create( &t, &attr, task, NULL );
7753         if( status ) return status;
7754
7755 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7756         if( detach ) {
7757                 /* give thread a chance to complete */
7758                 /* it should remain joinable and hence detachable */
7759                 sleep( 1 );
7760
7761                 status = pthread_detach( t );
7762                 if( status ) return status;
7763         }
7764 #endif
7765
7766 #else
7767         /* Draft 4 pthreads */
7768         status = pthread_create( &t, pthread_attr_default, task, NULL );
7769         if( status ) return status;
7770
7771         if( detach ) {
7772                 /* give thread a chance to complete */
7773                 /* it should remain joinable and hence detachable */
7774                 sleep( 1 );
7775
7776                 status = pthread_detach( &t );
7777                 if( status ) return status;
7778         }
7779 #endif
7780
7781 #ifdef HAVE_LINUX_THREADS
7782         pthread_kill_other_threads_np();
7783 #endif
7784
7785         return 0;
7786
7787 }
7788
7789 EOF
7790 if { (eval echo configure:7791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7791 then
7792   ol_cv_pthread_create=yes
7793 else
7794   echo "configure: failed program was:" >&5
7795   cat conftest.$ac_ext >&5
7796   rm -fr conftest*
7797   ol_cv_pthread_create=no
7798 fi
7799 rm -fr conftest*
7800 fi
7801
7802 fi
7803
7804 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7805
7806                 if test $ol_cv_pthread_create != no ; then
7807                         ol_link_threads=posix
7808                         ol_link_pthreads=""
7809                 fi
7810                 
7811                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7812 if test "$ol_link_threads" = no ; then
7813         # try -kthread
7814         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7815 echo "configure:7816: checking for pthread link with -kthread" >&5
7816 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7817   echo $ac_n "(cached) $ac_c" 1>&6
7818 else
7819   
7820                 # save the flags
7821                 ol_LIBS="$LIBS"
7822                 LIBS="-kthread $LIBS"
7823
7824                 if test "$cross_compiling" = yes; then
7825   cat > conftest.$ac_ext <<EOF
7826 #line 7827 "configure"
7827 #include "confdefs.h"
7828 /* pthread test headers */
7829 #include <pthread.h>
7830 #ifndef NULL
7831 #define NULL (void*)0
7832 #endif
7833
7834 static void *task(p)
7835         void *p;
7836 {
7837         return (void *) (p == NULL);
7838 }
7839
7840 int main() {
7841
7842         /* pthread test function */
7843         pthread_t t;
7844         int status;
7845         int detach = 1;
7846
7847 #ifdef HAVE_PTHREADS_FINAL
7848         /* Final pthreads */
7849         pthread_attr_t attr;
7850
7851         status = pthread_attr_init(&attr);
7852         if( status ) return status;
7853
7854 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7855         if( !detach ) {
7856 #if defined( PTHREAD_CREATE_JOINABLE )
7857                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7858 #else
7859                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7860 #endif
7861
7862 #ifdef PTHREAD_CREATE_DETACHED
7863         } else {
7864                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7865 #endif
7866         }
7867         if( status ) return status;
7868 #endif
7869
7870         status = pthread_create( &t, &attr, task, NULL );
7871         if( status ) return status;
7872
7873 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7874         if( detach ) {
7875                 /* give thread a chance to complete */
7876                 /* it should remain joinable and hence detachable */
7877                 sleep( 1 );
7878
7879                 status = pthread_detach( t );
7880                 if( status ) return status;
7881         }
7882 #endif
7883
7884 #else
7885         /* Draft 4 pthreads */
7886         status = pthread_create( &t, pthread_attr_default, task, NULL );
7887         if( status ) return status;
7888
7889         if( detach ) {
7890                 /* give thread a chance to complete */
7891                 /* it should remain joinable and hence detachable */
7892                 sleep( 1 );
7893
7894                 status = pthread_detach( &t );
7895                 if( status ) return status;
7896         }
7897 #endif
7898
7899 #ifdef HAVE_LINUX_THREADS
7900         pthread_kill_other_threads_np();
7901 #endif
7902
7903         return 0;
7904
7905 ; return 0; }
7906 EOF
7907 if { (eval echo configure:7908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7908   rm -rf conftest*
7909   ol_cv_pthread_kthread=yes
7910 else
7911   echo "configure: failed program was:" >&5
7912   cat conftest.$ac_ext >&5
7913   rm -rf conftest*
7914   ol_cv_pthread_kthread=no
7915 fi
7916 rm -f conftest*
7917 else
7918   cat > conftest.$ac_ext <<EOF
7919 #line 7920 "configure"
7920 #include "confdefs.h"
7921 /* pthread test headers */
7922 #include <pthread.h>
7923 #ifndef NULL
7924 #define NULL (void*)0
7925 #endif
7926
7927 static void *task(p)
7928         void *p;
7929 {
7930         return (void *) (p == NULL);
7931 }
7932
7933
7934 int main(argc, argv)
7935         int argc;
7936         char **argv;
7937 {
7938
7939         /* pthread test function */
7940         pthread_t t;
7941         int status;
7942         int detach = 1;
7943
7944 #ifdef HAVE_PTHREADS_FINAL
7945         /* Final pthreads */
7946         pthread_attr_t attr;
7947
7948         status = pthread_attr_init(&attr);
7949         if( status ) return status;
7950
7951 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7952         if( !detach ) {
7953 #if defined( PTHREAD_CREATE_JOINABLE )
7954                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7955 #else
7956                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7957 #endif
7958
7959 #ifdef PTHREAD_CREATE_DETACHED
7960         } else {
7961                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7962 #endif
7963         }
7964         if( status ) return status;
7965 #endif
7966
7967         status = pthread_create( &t, &attr, task, NULL );
7968         if( status ) return status;
7969
7970 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7971         if( detach ) {
7972                 /* give thread a chance to complete */
7973                 /* it should remain joinable and hence detachable */
7974                 sleep( 1 );
7975
7976                 status = pthread_detach( t );
7977                 if( status ) return status;
7978         }
7979 #endif
7980
7981 #else
7982         /* Draft 4 pthreads */
7983         status = pthread_create( &t, pthread_attr_default, task, NULL );
7984         if( status ) return status;
7985
7986         if( detach ) {
7987                 /* give thread a chance to complete */
7988                 /* it should remain joinable and hence detachable */
7989                 sleep( 1 );
7990
7991                 status = pthread_detach( &t );
7992                 if( status ) return status;
7993         }
7994 #endif
7995
7996 #ifdef HAVE_LINUX_THREADS
7997         pthread_kill_other_threads_np();
7998 #endif
7999
8000         return 0;
8001
8002 }
8003
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8006 then
8007   ol_cv_pthread_kthread=yes
8008 else
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -fr conftest*
8012   ol_cv_pthread_kthread=no
8013 fi
8014 rm -fr conftest*
8015 fi
8016
8017
8018                 # restore the LIBS
8019                 LIBS="$ol_LIBS"
8020         
8021 fi
8022
8023 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
8024
8025         if test $ol_cv_pthread_kthread = yes ; then
8026                 ol_link_pthreads="-kthread"
8027                 ol_link_threads=posix
8028         fi
8029 fi
8030
8031                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
8032 if test "$ol_link_threads" = no ; then
8033         # try -pthread
8034         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
8035 echo "configure:8036: checking for pthread link with -pthread" >&5
8036 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
8037   echo $ac_n "(cached) $ac_c" 1>&6
8038 else
8039   
8040                 # save the flags
8041                 ol_LIBS="$LIBS"
8042                 LIBS="-pthread $LIBS"
8043
8044                 if test "$cross_compiling" = yes; then
8045   cat > conftest.$ac_ext <<EOF
8046 #line 8047 "configure"
8047 #include "confdefs.h"
8048 /* pthread test headers */
8049 #include <pthread.h>
8050 #ifndef NULL
8051 #define NULL (void*)0
8052 #endif
8053
8054 static void *task(p)
8055         void *p;
8056 {
8057         return (void *) (p == NULL);
8058 }
8059
8060 int main() {
8061
8062         /* pthread test function */
8063         pthread_t t;
8064         int status;
8065         int detach = 1;
8066
8067 #ifdef HAVE_PTHREADS_FINAL
8068         /* Final pthreads */
8069         pthread_attr_t attr;
8070
8071         status = pthread_attr_init(&attr);
8072         if( status ) return status;
8073
8074 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8075         if( !detach ) {
8076 #if defined( PTHREAD_CREATE_JOINABLE )
8077                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8078 #else
8079                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8080 #endif
8081
8082 #ifdef PTHREAD_CREATE_DETACHED
8083         } else {
8084                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8085 #endif
8086         }
8087         if( status ) return status;
8088 #endif
8089
8090         status = pthread_create( &t, &attr, task, NULL );
8091         if( status ) return status;
8092
8093 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8094         if( detach ) {
8095                 /* give thread a chance to complete */
8096                 /* it should remain joinable and hence detachable */
8097                 sleep( 1 );
8098
8099                 status = pthread_detach( t );
8100                 if( status ) return status;
8101         }
8102 #endif
8103
8104 #else
8105         /* Draft 4 pthreads */
8106         status = pthread_create( &t, pthread_attr_default, task, NULL );
8107         if( status ) return status;
8108
8109         if( detach ) {
8110                 /* give thread a chance to complete */
8111                 /* it should remain joinable and hence detachable */
8112                 sleep( 1 );
8113
8114                 status = pthread_detach( &t );
8115                 if( status ) return status;
8116         }
8117 #endif
8118
8119 #ifdef HAVE_LINUX_THREADS
8120         pthread_kill_other_threads_np();
8121 #endif
8122
8123         return 0;
8124
8125 ; return 0; }
8126 EOF
8127 if { (eval echo configure:8128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8128   rm -rf conftest*
8129   ol_cv_pthread_pthread=yes
8130 else
8131   echo "configure: failed program was:" >&5
8132   cat conftest.$ac_ext >&5
8133   rm -rf conftest*
8134   ol_cv_pthread_pthread=no
8135 fi
8136 rm -f conftest*
8137 else
8138   cat > conftest.$ac_ext <<EOF
8139 #line 8140 "configure"
8140 #include "confdefs.h"
8141 /* pthread test headers */
8142 #include <pthread.h>
8143 #ifndef NULL
8144 #define NULL (void*)0
8145 #endif
8146
8147 static void *task(p)
8148         void *p;
8149 {
8150         return (void *) (p == NULL);
8151 }
8152
8153
8154 int main(argc, argv)
8155         int argc;
8156         char **argv;
8157 {
8158
8159         /* pthread test function */
8160         pthread_t t;
8161         int status;
8162         int detach = 1;
8163
8164 #ifdef HAVE_PTHREADS_FINAL
8165         /* Final pthreads */
8166         pthread_attr_t attr;
8167
8168         status = pthread_attr_init(&attr);
8169         if( status ) return status;
8170
8171 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8172         if( !detach ) {
8173 #if defined( PTHREAD_CREATE_JOINABLE )
8174                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8175 #else
8176                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8177 #endif
8178
8179 #ifdef PTHREAD_CREATE_DETACHED
8180         } else {
8181                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8182 #endif
8183         }
8184         if( status ) return status;
8185 #endif
8186
8187         status = pthread_create( &t, &attr, task, NULL );
8188         if( status ) return status;
8189
8190 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8191         if( detach ) {
8192                 /* give thread a chance to complete */
8193                 /* it should remain joinable and hence detachable */
8194                 sleep( 1 );
8195
8196                 status = pthread_detach( t );
8197                 if( status ) return status;
8198         }
8199 #endif
8200
8201 #else
8202         /* Draft 4 pthreads */
8203         status = pthread_create( &t, pthread_attr_default, task, NULL );
8204         if( status ) return status;
8205
8206         if( detach ) {
8207                 /* give thread a chance to complete */
8208                 /* it should remain joinable and hence detachable */
8209                 sleep( 1 );
8210
8211                 status = pthread_detach( &t );
8212                 if( status ) return status;
8213         }
8214 #endif
8215
8216 #ifdef HAVE_LINUX_THREADS
8217         pthread_kill_other_threads_np();
8218 #endif
8219
8220         return 0;
8221
8222 }
8223
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8226 then
8227   ol_cv_pthread_pthread=yes
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -fr conftest*
8232   ol_cv_pthread_pthread=no
8233 fi
8234 rm -fr conftest*
8235 fi
8236
8237
8238                 # restore the LIBS
8239                 LIBS="$ol_LIBS"
8240         
8241 fi
8242
8243 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
8244
8245         if test $ol_cv_pthread_pthread = yes ; then
8246                 ol_link_pthreads="-pthread"
8247                 ol_link_threads=posix
8248         fi
8249 fi
8250
8251                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
8252 if test "$ol_link_threads" = no ; then
8253         # try -pthreads
8254         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
8255 echo "configure:8256: checking for pthread link with -pthreads" >&5
8256 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
8257   echo $ac_n "(cached) $ac_c" 1>&6
8258 else
8259   
8260                 # save the flags
8261                 ol_LIBS="$LIBS"
8262                 LIBS="-pthreads $LIBS"
8263
8264                 if test "$cross_compiling" = yes; then
8265   cat > conftest.$ac_ext <<EOF
8266 #line 8267 "configure"
8267 #include "confdefs.h"
8268 /* pthread test headers */
8269 #include <pthread.h>
8270 #ifndef NULL
8271 #define NULL (void*)0
8272 #endif
8273
8274 static void *task(p)
8275         void *p;
8276 {
8277         return (void *) (p == NULL);
8278 }
8279
8280 int main() {
8281
8282         /* pthread test function */
8283         pthread_t t;
8284         int status;
8285         int detach = 1;
8286
8287 #ifdef HAVE_PTHREADS_FINAL
8288         /* Final pthreads */
8289         pthread_attr_t attr;
8290
8291         status = pthread_attr_init(&attr);
8292         if( status ) return status;
8293
8294 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8295         if( !detach ) {
8296 #if defined( PTHREAD_CREATE_JOINABLE )
8297                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8298 #else
8299                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8300 #endif
8301
8302 #ifdef PTHREAD_CREATE_DETACHED
8303         } else {
8304                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8305 #endif
8306         }
8307         if( status ) return status;
8308 #endif
8309
8310         status = pthread_create( &t, &attr, task, NULL );
8311         if( status ) return status;
8312
8313 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8314         if( detach ) {
8315                 /* give thread a chance to complete */
8316                 /* it should remain joinable and hence detachable */
8317                 sleep( 1 );
8318
8319                 status = pthread_detach( t );
8320                 if( status ) return status;
8321         }
8322 #endif
8323
8324 #else
8325         /* Draft 4 pthreads */
8326         status = pthread_create( &t, pthread_attr_default, task, NULL );
8327         if( status ) return status;
8328
8329         if( detach ) {
8330                 /* give thread a chance to complete */
8331                 /* it should remain joinable and hence detachable */
8332                 sleep( 1 );
8333
8334                 status = pthread_detach( &t );
8335                 if( status ) return status;
8336         }
8337 #endif
8338
8339 #ifdef HAVE_LINUX_THREADS
8340         pthread_kill_other_threads_np();
8341 #endif
8342
8343         return 0;
8344
8345 ; return 0; }
8346 EOF
8347 if { (eval echo configure:8348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8348   rm -rf conftest*
8349   ol_cv_pthread_pthreads=yes
8350 else
8351   echo "configure: failed program was:" >&5
8352   cat conftest.$ac_ext >&5
8353   rm -rf conftest*
8354   ol_cv_pthread_pthreads=no
8355 fi
8356 rm -f conftest*
8357 else
8358   cat > conftest.$ac_ext <<EOF
8359 #line 8360 "configure"
8360 #include "confdefs.h"
8361 /* pthread test headers */
8362 #include <pthread.h>
8363 #ifndef NULL
8364 #define NULL (void*)0
8365 #endif
8366
8367 static void *task(p)
8368         void *p;
8369 {
8370         return (void *) (p == NULL);
8371 }
8372
8373
8374 int main(argc, argv)
8375         int argc;
8376         char **argv;
8377 {
8378
8379         /* pthread test function */
8380         pthread_t t;
8381         int status;
8382         int detach = 1;
8383
8384 #ifdef HAVE_PTHREADS_FINAL
8385         /* Final pthreads */
8386         pthread_attr_t attr;
8387
8388         status = pthread_attr_init(&attr);
8389         if( status ) return status;
8390
8391 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8392         if( !detach ) {
8393 #if defined( PTHREAD_CREATE_JOINABLE )
8394                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8395 #else
8396                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8397 #endif
8398
8399 #ifdef PTHREAD_CREATE_DETACHED
8400         } else {
8401                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8402 #endif
8403         }
8404         if( status ) return status;
8405 #endif
8406
8407         status = pthread_create( &t, &attr, task, NULL );
8408         if( status ) return status;
8409
8410 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8411         if( detach ) {
8412                 /* give thread a chance to complete */
8413                 /* it should remain joinable and hence detachable */
8414                 sleep( 1 );
8415
8416                 status = pthread_detach( t );
8417                 if( status ) return status;
8418         }
8419 #endif
8420
8421 #else
8422         /* Draft 4 pthreads */
8423         status = pthread_create( &t, pthread_attr_default, task, NULL );
8424         if( status ) return status;
8425
8426         if( detach ) {
8427                 /* give thread a chance to complete */
8428                 /* it should remain joinable and hence detachable */
8429                 sleep( 1 );
8430
8431                 status = pthread_detach( &t );
8432                 if( status ) return status;
8433         }
8434 #endif
8435
8436 #ifdef HAVE_LINUX_THREADS
8437         pthread_kill_other_threads_np();
8438 #endif
8439
8440         return 0;
8441
8442 }
8443
8444 EOF
8445 if { (eval echo configure:8446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8446 then
8447   ol_cv_pthread_pthreads=yes
8448 else
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -fr conftest*
8452   ol_cv_pthread_pthreads=no
8453 fi
8454 rm -fr conftest*
8455 fi
8456
8457
8458                 # restore the LIBS
8459                 LIBS="$ol_LIBS"
8460         
8461 fi
8462
8463 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8464
8465         if test $ol_cv_pthread_pthreads = yes ; then
8466                 ol_link_pthreads="-pthreads"
8467                 ol_link_threads=posix
8468         fi
8469 fi
8470
8471                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8472 if test "$ol_link_threads" = no ; then
8473         # try -mthreads
8474         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8475 echo "configure:8476: checking for pthread link with -mthreads" >&5
8476 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8477   echo $ac_n "(cached) $ac_c" 1>&6
8478 else
8479   
8480                 # save the flags
8481                 ol_LIBS="$LIBS"
8482                 LIBS="-mthreads $LIBS"
8483
8484                 if test "$cross_compiling" = yes; then
8485   cat > conftest.$ac_ext <<EOF
8486 #line 8487 "configure"
8487 #include "confdefs.h"
8488 /* pthread test headers */
8489 #include <pthread.h>
8490 #ifndef NULL
8491 #define NULL (void*)0
8492 #endif
8493
8494 static void *task(p)
8495         void *p;
8496 {
8497         return (void *) (p == NULL);
8498 }
8499
8500 int main() {
8501
8502         /* pthread test function */
8503         pthread_t t;
8504         int status;
8505         int detach = 1;
8506
8507 #ifdef HAVE_PTHREADS_FINAL
8508         /* Final pthreads */
8509         pthread_attr_t attr;
8510
8511         status = pthread_attr_init(&attr);
8512         if( status ) return status;
8513
8514 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8515         if( !detach ) {
8516 #if defined( PTHREAD_CREATE_JOINABLE )
8517                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8518 #else
8519                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8520 #endif
8521
8522 #ifdef PTHREAD_CREATE_DETACHED
8523         } else {
8524                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8525 #endif
8526         }
8527         if( status ) return status;
8528 #endif
8529
8530         status = pthread_create( &t, &attr, task, NULL );
8531         if( status ) return status;
8532
8533 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8534         if( detach ) {
8535                 /* give thread a chance to complete */
8536                 /* it should remain joinable and hence detachable */
8537                 sleep( 1 );
8538
8539                 status = pthread_detach( t );
8540                 if( status ) return status;
8541         }
8542 #endif
8543
8544 #else
8545         /* Draft 4 pthreads */
8546         status = pthread_create( &t, pthread_attr_default, task, NULL );
8547         if( status ) return status;
8548
8549         if( detach ) {
8550                 /* give thread a chance to complete */
8551                 /* it should remain joinable and hence detachable */
8552                 sleep( 1 );
8553
8554                 status = pthread_detach( &t );
8555                 if( status ) return status;
8556         }
8557 #endif
8558
8559 #ifdef HAVE_LINUX_THREADS
8560         pthread_kill_other_threads_np();
8561 #endif
8562
8563         return 0;
8564
8565 ; return 0; }
8566 EOF
8567 if { (eval echo configure:8568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8568   rm -rf conftest*
8569   ol_cv_pthread_mthreads=yes
8570 else
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   ol_cv_pthread_mthreads=no
8575 fi
8576 rm -f conftest*
8577 else
8578   cat > conftest.$ac_ext <<EOF
8579 #line 8580 "configure"
8580 #include "confdefs.h"
8581 /* pthread test headers */
8582 #include <pthread.h>
8583 #ifndef NULL
8584 #define NULL (void*)0
8585 #endif
8586
8587 static void *task(p)
8588         void *p;
8589 {
8590         return (void *) (p == NULL);
8591 }
8592
8593
8594 int main(argc, argv)
8595         int argc;
8596         char **argv;
8597 {
8598
8599         /* pthread test function */
8600         pthread_t t;
8601         int status;
8602         int detach = 1;
8603
8604 #ifdef HAVE_PTHREADS_FINAL
8605         /* Final pthreads */
8606         pthread_attr_t attr;
8607
8608         status = pthread_attr_init(&attr);
8609         if( status ) return status;
8610
8611 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8612         if( !detach ) {
8613 #if defined( PTHREAD_CREATE_JOINABLE )
8614                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8615 #else
8616                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8617 #endif
8618
8619 #ifdef PTHREAD_CREATE_DETACHED
8620         } else {
8621                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8622 #endif
8623         }
8624         if( status ) return status;
8625 #endif
8626
8627         status = pthread_create( &t, &attr, task, NULL );
8628         if( status ) return status;
8629
8630 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8631         if( detach ) {
8632                 /* give thread a chance to complete */
8633                 /* it should remain joinable and hence detachable */
8634                 sleep( 1 );
8635
8636                 status = pthread_detach( t );
8637                 if( status ) return status;
8638         }
8639 #endif
8640
8641 #else
8642         /* Draft 4 pthreads */
8643         status = pthread_create( &t, pthread_attr_default, task, NULL );
8644         if( status ) return status;
8645
8646         if( detach ) {
8647                 /* give thread a chance to complete */
8648                 /* it should remain joinable and hence detachable */
8649                 sleep( 1 );
8650
8651                 status = pthread_detach( &t );
8652                 if( status ) return status;
8653         }
8654 #endif
8655
8656 #ifdef HAVE_LINUX_THREADS
8657         pthread_kill_other_threads_np();
8658 #endif
8659
8660         return 0;
8661
8662 }
8663
8664 EOF
8665 if { (eval echo configure:8666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8666 then
8667   ol_cv_pthread_mthreads=yes
8668 else
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -fr conftest*
8672   ol_cv_pthread_mthreads=no
8673 fi
8674 rm -fr conftest*
8675 fi
8676
8677
8678                 # restore the LIBS
8679                 LIBS="$ol_LIBS"
8680         
8681 fi
8682
8683 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8684
8685         if test $ol_cv_pthread_mthreads = yes ; then
8686                 ol_link_pthreads="-mthreads"
8687                 ol_link_threads=posix
8688         fi
8689 fi
8690
8691                 # Pthread try link: -thread (ol_cv_pthread_thread)
8692 if test "$ol_link_threads" = no ; then
8693         # try -thread
8694         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8695 echo "configure:8696: checking for pthread link with -thread" >&5
8696 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8697   echo $ac_n "(cached) $ac_c" 1>&6
8698 else
8699   
8700                 # save the flags
8701                 ol_LIBS="$LIBS"
8702                 LIBS="-thread $LIBS"
8703
8704                 if test "$cross_compiling" = yes; then
8705   cat > conftest.$ac_ext <<EOF
8706 #line 8707 "configure"
8707 #include "confdefs.h"
8708 /* pthread test headers */
8709 #include <pthread.h>
8710 #ifndef NULL
8711 #define NULL (void*)0
8712 #endif
8713
8714 static void *task(p)
8715         void *p;
8716 {
8717         return (void *) (p == NULL);
8718 }
8719
8720 int main() {
8721
8722         /* pthread test function */
8723         pthread_t t;
8724         int status;
8725         int detach = 1;
8726
8727 #ifdef HAVE_PTHREADS_FINAL
8728         /* Final pthreads */
8729         pthread_attr_t attr;
8730
8731         status = pthread_attr_init(&attr);
8732         if( status ) return status;
8733
8734 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8735         if( !detach ) {
8736 #if defined( PTHREAD_CREATE_JOINABLE )
8737                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8738 #else
8739                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8740 #endif
8741
8742 #ifdef PTHREAD_CREATE_DETACHED
8743         } else {
8744                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8745 #endif
8746         }
8747         if( status ) return status;
8748 #endif
8749
8750         status = pthread_create( &t, &attr, task, NULL );
8751         if( status ) return status;
8752
8753 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8754         if( detach ) {
8755                 /* give thread a chance to complete */
8756                 /* it should remain joinable and hence detachable */
8757                 sleep( 1 );
8758
8759                 status = pthread_detach( t );
8760                 if( status ) return status;
8761         }
8762 #endif
8763
8764 #else
8765         /* Draft 4 pthreads */
8766         status = pthread_create( &t, pthread_attr_default, task, NULL );
8767         if( status ) return status;
8768
8769         if( detach ) {
8770                 /* give thread a chance to complete */
8771                 /* it should remain joinable and hence detachable */
8772                 sleep( 1 );
8773
8774                 status = pthread_detach( &t );
8775                 if( status ) return status;
8776         }
8777 #endif
8778
8779 #ifdef HAVE_LINUX_THREADS
8780         pthread_kill_other_threads_np();
8781 #endif
8782
8783         return 0;
8784
8785 ; return 0; }
8786 EOF
8787 if { (eval echo configure:8788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8788   rm -rf conftest*
8789   ol_cv_pthread_thread=yes
8790 else
8791   echo "configure: failed program was:" >&5
8792   cat conftest.$ac_ext >&5
8793   rm -rf conftest*
8794   ol_cv_pthread_thread=no
8795 fi
8796 rm -f conftest*
8797 else
8798   cat > conftest.$ac_ext <<EOF
8799 #line 8800 "configure"
8800 #include "confdefs.h"
8801 /* pthread test headers */
8802 #include <pthread.h>
8803 #ifndef NULL
8804 #define NULL (void*)0
8805 #endif
8806
8807 static void *task(p)
8808         void *p;
8809 {
8810         return (void *) (p == NULL);
8811 }
8812
8813
8814 int main(argc, argv)
8815         int argc;
8816         char **argv;
8817 {
8818
8819         /* pthread test function */
8820         pthread_t t;
8821         int status;
8822         int detach = 1;
8823
8824 #ifdef HAVE_PTHREADS_FINAL
8825         /* Final pthreads */
8826         pthread_attr_t attr;
8827
8828         status = pthread_attr_init(&attr);
8829         if( status ) return status;
8830
8831 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8832         if( !detach ) {
8833 #if defined( PTHREAD_CREATE_JOINABLE )
8834                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8835 #else
8836                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8837 #endif
8838
8839 #ifdef PTHREAD_CREATE_DETACHED
8840         } else {
8841                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8842 #endif
8843         }
8844         if( status ) return status;
8845 #endif
8846
8847         status = pthread_create( &t, &attr, task, NULL );
8848         if( status ) return status;
8849
8850 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8851         if( detach ) {
8852                 /* give thread a chance to complete */
8853                 /* it should remain joinable and hence detachable */
8854                 sleep( 1 );
8855
8856                 status = pthread_detach( t );
8857                 if( status ) return status;
8858         }
8859 #endif
8860
8861 #else
8862         /* Draft 4 pthreads */
8863         status = pthread_create( &t, pthread_attr_default, task, NULL );
8864         if( status ) return status;
8865
8866         if( detach ) {
8867                 /* give thread a chance to complete */
8868                 /* it should remain joinable and hence detachable */
8869                 sleep( 1 );
8870
8871                 status = pthread_detach( &t );
8872                 if( status ) return status;
8873         }
8874 #endif
8875
8876 #ifdef HAVE_LINUX_THREADS
8877         pthread_kill_other_threads_np();
8878 #endif
8879
8880         return 0;
8881
8882 }
8883
8884 EOF
8885 if { (eval echo configure:8886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8886 then
8887   ol_cv_pthread_thread=yes
8888 else
8889   echo "configure: failed program was:" >&5
8890   cat conftest.$ac_ext >&5
8891   rm -fr conftest*
8892   ol_cv_pthread_thread=no
8893 fi
8894 rm -fr conftest*
8895 fi
8896
8897
8898                 # restore the LIBS
8899                 LIBS="$ol_LIBS"
8900         
8901 fi
8902
8903 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8904
8905         if test $ol_cv_pthread_thread = yes ; then
8906                 ol_link_pthreads="-thread"
8907                 ol_link_threads=posix
8908         fi
8909 fi
8910
8911
8912                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8913 if test "$ol_link_threads" = no ; then
8914         # try -lpthread -lmach -lexc -lc_r
8915         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8916 echo "configure:8917: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8917 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8918   echo $ac_n "(cached) $ac_c" 1>&6
8919 else
8920   
8921                 # save the flags
8922                 ol_LIBS="$LIBS"
8923                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8924
8925                 if test "$cross_compiling" = yes; then
8926   cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 /* pthread test headers */
8930 #include <pthread.h>
8931 #ifndef NULL
8932 #define NULL (void*)0
8933 #endif
8934
8935 static void *task(p)
8936         void *p;
8937 {
8938         return (void *) (p == NULL);
8939 }
8940
8941 int main() {
8942
8943         /* pthread test function */
8944         pthread_t t;
8945         int status;
8946         int detach = 1;
8947
8948 #ifdef HAVE_PTHREADS_FINAL
8949         /* Final pthreads */
8950         pthread_attr_t attr;
8951
8952         status = pthread_attr_init(&attr);
8953         if( status ) return status;
8954
8955 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8956         if( !detach ) {
8957 #if defined( PTHREAD_CREATE_JOINABLE )
8958                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8959 #else
8960                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8961 #endif
8962
8963 #ifdef PTHREAD_CREATE_DETACHED
8964         } else {
8965                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8966 #endif
8967         }
8968         if( status ) return status;
8969 #endif
8970
8971         status = pthread_create( &t, &attr, task, NULL );
8972         if( status ) return status;
8973
8974 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8975         if( detach ) {
8976                 /* give thread a chance to complete */
8977                 /* it should remain joinable and hence detachable */
8978                 sleep( 1 );
8979
8980                 status = pthread_detach( t );
8981                 if( status ) return status;
8982         }
8983 #endif
8984
8985 #else
8986         /* Draft 4 pthreads */
8987         status = pthread_create( &t, pthread_attr_default, task, NULL );
8988         if( status ) return status;
8989
8990         if( detach ) {
8991                 /* give thread a chance to complete */
8992                 /* it should remain joinable and hence detachable */
8993                 sleep( 1 );
8994
8995                 status = pthread_detach( &t );
8996                 if( status ) return status;
8997         }
8998 #endif
8999
9000 #ifdef HAVE_LINUX_THREADS
9001         pthread_kill_other_threads_np();
9002 #endif
9003
9004         return 0;
9005
9006 ; return 0; }
9007 EOF
9008 if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9009   rm -rf conftest*
9010   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9011 else
9012   echo "configure: failed program was:" >&5
9013   cat conftest.$ac_ext >&5
9014   rm -rf conftest*
9015   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9016 fi
9017 rm -f conftest*
9018 else
9019   cat > conftest.$ac_ext <<EOF
9020 #line 9021 "configure"
9021 #include "confdefs.h"
9022 /* pthread test headers */
9023 #include <pthread.h>
9024 #ifndef NULL
9025 #define NULL (void*)0
9026 #endif
9027
9028 static void *task(p)
9029         void *p;
9030 {
9031         return (void *) (p == NULL);
9032 }
9033
9034
9035 int main(argc, argv)
9036         int argc;
9037         char **argv;
9038 {
9039
9040         /* pthread test function */
9041         pthread_t t;
9042         int status;
9043         int detach = 1;
9044
9045 #ifdef HAVE_PTHREADS_FINAL
9046         /* Final pthreads */
9047         pthread_attr_t attr;
9048
9049         status = pthread_attr_init(&attr);
9050         if( status ) return status;
9051
9052 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9053         if( !detach ) {
9054 #if defined( PTHREAD_CREATE_JOINABLE )
9055                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9056 #else
9057                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9058 #endif
9059
9060 #ifdef PTHREAD_CREATE_DETACHED
9061         } else {
9062                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9063 #endif
9064         }
9065         if( status ) return status;
9066 #endif
9067
9068         status = pthread_create( &t, &attr, task, NULL );
9069         if( status ) return status;
9070
9071 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9072         if( detach ) {
9073                 /* give thread a chance to complete */
9074                 /* it should remain joinable and hence detachable */
9075                 sleep( 1 );
9076
9077                 status = pthread_detach( t );
9078                 if( status ) return status;
9079         }
9080 #endif
9081
9082 #else
9083         /* Draft 4 pthreads */
9084         status = pthread_create( &t, pthread_attr_default, task, NULL );
9085         if( status ) return status;
9086
9087         if( detach ) {
9088                 /* give thread a chance to complete */
9089                 /* it should remain joinable and hence detachable */
9090                 sleep( 1 );
9091
9092                 status = pthread_detach( &t );
9093                 if( status ) return status;
9094         }
9095 #endif
9096
9097 #ifdef HAVE_LINUX_THREADS
9098         pthread_kill_other_threads_np();
9099 #endif
9100
9101         return 0;
9102
9103 }
9104
9105 EOF
9106 if { (eval echo configure:9107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9107 then
9108   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9109 else
9110   echo "configure: failed program was:" >&5
9111   cat conftest.$ac_ext >&5
9112   rm -fr conftest*
9113   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9114 fi
9115 rm -fr conftest*
9116 fi
9117
9118
9119                 # restore the LIBS
9120                 LIBS="$ol_LIBS"
9121         
9122 fi
9123
9124 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
9125
9126         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
9127                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
9128                 ol_link_threads=posix
9129         fi
9130 fi
9131
9132                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
9133 if test "$ol_link_threads" = no ; then
9134         # try -lpthread -lmach -lexc
9135         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
9136 echo "configure:9137: checking for pthread link with -lpthread -lmach -lexc" >&5
9137 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
9138   echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140   
9141                 # save the flags
9142                 ol_LIBS="$LIBS"
9143                 LIBS="-lpthread -lmach -lexc $LIBS"
9144
9145                 if test "$cross_compiling" = yes; then
9146   cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149 /* pthread test headers */
9150 #include <pthread.h>
9151 #ifndef NULL
9152 #define NULL (void*)0
9153 #endif
9154
9155 static void *task(p)
9156         void *p;
9157 {
9158         return (void *) (p == NULL);
9159 }
9160
9161 int main() {
9162
9163         /* pthread test function */
9164         pthread_t t;
9165         int status;
9166         int detach = 1;
9167
9168 #ifdef HAVE_PTHREADS_FINAL
9169         /* Final pthreads */
9170         pthread_attr_t attr;
9171
9172         status = pthread_attr_init(&attr);
9173         if( status ) return status;
9174
9175 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9176         if( !detach ) {
9177 #if defined( PTHREAD_CREATE_JOINABLE )
9178                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9179 #else
9180                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9181 #endif
9182
9183 #ifdef PTHREAD_CREATE_DETACHED
9184         } else {
9185                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9186 #endif
9187         }
9188         if( status ) return status;
9189 #endif
9190
9191         status = pthread_create( &t, &attr, task, NULL );
9192         if( status ) return status;
9193
9194 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9195         if( detach ) {
9196                 /* give thread a chance to complete */
9197                 /* it should remain joinable and hence detachable */
9198                 sleep( 1 );
9199
9200                 status = pthread_detach( t );
9201                 if( status ) return status;
9202         }
9203 #endif
9204
9205 #else
9206         /* Draft 4 pthreads */
9207         status = pthread_create( &t, pthread_attr_default, task, NULL );
9208         if( status ) return status;
9209
9210         if( detach ) {
9211                 /* give thread a chance to complete */
9212                 /* it should remain joinable and hence detachable */
9213                 sleep( 1 );
9214
9215                 status = pthread_detach( &t );
9216                 if( status ) return status;
9217         }
9218 #endif
9219
9220 #ifdef HAVE_LINUX_THREADS
9221         pthread_kill_other_threads_np();
9222 #endif
9223
9224         return 0;
9225
9226 ; return 0; }
9227 EOF
9228 if { (eval echo configure:9229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9229   rm -rf conftest*
9230   ol_cv_pthread_lpthread_lmach_lexc=yes
9231 else
9232   echo "configure: failed program was:" >&5
9233   cat conftest.$ac_ext >&5
9234   rm -rf conftest*
9235   ol_cv_pthread_lpthread_lmach_lexc=no
9236 fi
9237 rm -f conftest*
9238 else
9239   cat > conftest.$ac_ext <<EOF
9240 #line 9241 "configure"
9241 #include "confdefs.h"
9242 /* pthread test headers */
9243 #include <pthread.h>
9244 #ifndef NULL
9245 #define NULL (void*)0
9246 #endif
9247
9248 static void *task(p)
9249         void *p;
9250 {
9251         return (void *) (p == NULL);
9252 }
9253
9254
9255 int main(argc, argv)
9256         int argc;
9257         char **argv;
9258 {
9259
9260         /* pthread test function */
9261         pthread_t t;
9262         int status;
9263         int detach = 1;
9264
9265 #ifdef HAVE_PTHREADS_FINAL
9266         /* Final pthreads */
9267         pthread_attr_t attr;
9268
9269         status = pthread_attr_init(&attr);
9270         if( status ) return status;
9271
9272 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9273         if( !detach ) {
9274 #if defined( PTHREAD_CREATE_JOINABLE )
9275                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9276 #else
9277                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9278 #endif
9279
9280 #ifdef PTHREAD_CREATE_DETACHED
9281         } else {
9282                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9283 #endif
9284         }
9285         if( status ) return status;
9286 #endif
9287
9288         status = pthread_create( &t, &attr, task, NULL );
9289         if( status ) return status;
9290
9291 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9292         if( detach ) {
9293                 /* give thread a chance to complete */
9294                 /* it should remain joinable and hence detachable */
9295                 sleep( 1 );
9296
9297                 status = pthread_detach( t );
9298                 if( status ) return status;
9299         }
9300 #endif
9301
9302 #else
9303         /* Draft 4 pthreads */
9304         status = pthread_create( &t, pthread_attr_default, task, NULL );
9305         if( status ) return status;
9306
9307         if( detach ) {
9308                 /* give thread a chance to complete */
9309                 /* it should remain joinable and hence detachable */
9310                 sleep( 1 );
9311
9312                 status = pthread_detach( &t );
9313                 if( status ) return status;
9314         }
9315 #endif
9316
9317 #ifdef HAVE_LINUX_THREADS
9318         pthread_kill_other_threads_np();
9319 #endif
9320
9321         return 0;
9322
9323 }
9324
9325 EOF
9326 if { (eval echo configure:9327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9327 then
9328   ol_cv_pthread_lpthread_lmach_lexc=yes
9329 else
9330   echo "configure: failed program was:" >&5
9331   cat conftest.$ac_ext >&5
9332   rm -fr conftest*
9333   ol_cv_pthread_lpthread_lmach_lexc=no
9334 fi
9335 rm -fr conftest*
9336 fi
9337
9338
9339                 # restore the LIBS
9340                 LIBS="$ol_LIBS"
9341         
9342 fi
9343
9344 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
9345
9346         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
9347                 ol_link_pthreads="-lpthread -lmach -lexc"
9348                 ol_link_threads=posix
9349         fi
9350 fi
9351
9352
9353                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
9354 if test "$ol_link_threads" = no ; then
9355         # try -lpthread -Wl,-woff,85
9356         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
9357 echo "configure:9358: checking for pthread link with -lpthread -Wl,-woff,85" >&5
9358 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361   
9362                 # save the flags
9363                 ol_LIBS="$LIBS"
9364                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
9365
9366                 if test "$cross_compiling" = yes; then
9367   cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370 /* pthread test headers */
9371 #include <pthread.h>
9372 #ifndef NULL
9373 #define NULL (void*)0
9374 #endif
9375
9376 static void *task(p)
9377         void *p;
9378 {
9379         return (void *) (p == NULL);
9380 }
9381
9382 int main() {
9383
9384         /* pthread test function */
9385         pthread_t t;
9386         int status;
9387         int detach = 1;
9388
9389 #ifdef HAVE_PTHREADS_FINAL
9390         /* Final pthreads */
9391         pthread_attr_t attr;
9392
9393         status = pthread_attr_init(&attr);
9394         if( status ) return status;
9395
9396 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9397         if( !detach ) {
9398 #if defined( PTHREAD_CREATE_JOINABLE )
9399                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9400 #else
9401                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9402 #endif
9403
9404 #ifdef PTHREAD_CREATE_DETACHED
9405         } else {
9406                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9407 #endif
9408         }
9409         if( status ) return status;
9410 #endif
9411
9412         status = pthread_create( &t, &attr, task, NULL );
9413         if( status ) return status;
9414
9415 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9416         if( detach ) {
9417                 /* give thread a chance to complete */
9418                 /* it should remain joinable and hence detachable */
9419                 sleep( 1 );
9420
9421                 status = pthread_detach( t );
9422                 if( status ) return status;
9423         }
9424 #endif
9425
9426 #else
9427         /* Draft 4 pthreads */
9428         status = pthread_create( &t, pthread_attr_default, task, NULL );
9429         if( status ) return status;
9430
9431         if( detach ) {
9432                 /* give thread a chance to complete */
9433                 /* it should remain joinable and hence detachable */
9434                 sleep( 1 );
9435
9436                 status = pthread_detach( &t );
9437                 if( status ) return status;
9438         }
9439 #endif
9440
9441 #ifdef HAVE_LINUX_THREADS
9442         pthread_kill_other_threads_np();
9443 #endif
9444
9445         return 0;
9446
9447 ; return 0; }
9448 EOF
9449 if { (eval echo configure:9450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9450   rm -rf conftest*
9451   ol_cv_pthread_lib_lpthread_woff=yes
9452 else
9453   echo "configure: failed program was:" >&5
9454   cat conftest.$ac_ext >&5
9455   rm -rf conftest*
9456   ol_cv_pthread_lib_lpthread_woff=no
9457 fi
9458 rm -f conftest*
9459 else
9460   cat > conftest.$ac_ext <<EOF
9461 #line 9462 "configure"
9462 #include "confdefs.h"
9463 /* pthread test headers */
9464 #include <pthread.h>
9465 #ifndef NULL
9466 #define NULL (void*)0
9467 #endif
9468
9469 static void *task(p)
9470         void *p;
9471 {
9472         return (void *) (p == NULL);
9473 }
9474
9475
9476 int main(argc, argv)
9477         int argc;
9478         char **argv;
9479 {
9480
9481         /* pthread test function */
9482         pthread_t t;
9483         int status;
9484         int detach = 1;
9485
9486 #ifdef HAVE_PTHREADS_FINAL
9487         /* Final pthreads */
9488         pthread_attr_t attr;
9489
9490         status = pthread_attr_init(&attr);
9491         if( status ) return status;
9492
9493 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9494         if( !detach ) {
9495 #if defined( PTHREAD_CREATE_JOINABLE )
9496                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9497 #else
9498                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9499 #endif
9500
9501 #ifdef PTHREAD_CREATE_DETACHED
9502         } else {
9503                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9504 #endif
9505         }
9506         if( status ) return status;
9507 #endif
9508
9509         status = pthread_create( &t, &attr, task, NULL );
9510         if( status ) return status;
9511
9512 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9513         if( detach ) {
9514                 /* give thread a chance to complete */
9515                 /* it should remain joinable and hence detachable */
9516                 sleep( 1 );
9517
9518                 status = pthread_detach( t );
9519                 if( status ) return status;
9520         }
9521 #endif
9522
9523 #else
9524         /* Draft 4 pthreads */
9525         status = pthread_create( &t, pthread_attr_default, task, NULL );
9526         if( status ) return status;
9527
9528         if( detach ) {
9529                 /* give thread a chance to complete */
9530                 /* it should remain joinable and hence detachable */
9531                 sleep( 1 );
9532
9533                 status = pthread_detach( &t );
9534                 if( status ) return status;
9535         }
9536 #endif
9537
9538 #ifdef HAVE_LINUX_THREADS
9539         pthread_kill_other_threads_np();
9540 #endif
9541
9542         return 0;
9543
9544 }
9545
9546 EOF
9547 if { (eval echo configure:9548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9548 then
9549   ol_cv_pthread_lib_lpthread_woff=yes
9550 else
9551   echo "configure: failed program was:" >&5
9552   cat conftest.$ac_ext >&5
9553   rm -fr conftest*
9554   ol_cv_pthread_lib_lpthread_woff=no
9555 fi
9556 rm -fr conftest*
9557 fi
9558
9559
9560                 # restore the LIBS
9561                 LIBS="$ol_LIBS"
9562         
9563 fi
9564
9565 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9566
9567         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9568                 ol_link_pthreads="-lpthread -Wl,-woff,85"
9569                 ol_link_threads=posix
9570         fi
9571 fi
9572
9573
9574                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9575 if test "$ol_link_threads" = no ; then
9576         # try -lpthread
9577         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9578 echo "configure:9579: checking for pthread link with -lpthread" >&5
9579 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9580   echo $ac_n "(cached) $ac_c" 1>&6
9581 else
9582   
9583                 # save the flags
9584                 ol_LIBS="$LIBS"
9585                 LIBS="-lpthread $LIBS"
9586
9587                 if test "$cross_compiling" = yes; then
9588   cat > conftest.$ac_ext <<EOF
9589 #line 9590 "configure"
9590 #include "confdefs.h"
9591 /* pthread test headers */
9592 #include <pthread.h>
9593 #ifndef NULL
9594 #define NULL (void*)0
9595 #endif
9596
9597 static void *task(p)
9598         void *p;
9599 {
9600         return (void *) (p == NULL);
9601 }
9602
9603 int main() {
9604
9605         /* pthread test function */
9606         pthread_t t;
9607         int status;
9608         int detach = 1;
9609
9610 #ifdef HAVE_PTHREADS_FINAL
9611         /* Final pthreads */
9612         pthread_attr_t attr;
9613
9614         status = pthread_attr_init(&attr);
9615         if( status ) return status;
9616
9617 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9618         if( !detach ) {
9619 #if defined( PTHREAD_CREATE_JOINABLE )
9620                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9621 #else
9622                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9623 #endif
9624
9625 #ifdef PTHREAD_CREATE_DETACHED
9626         } else {
9627                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9628 #endif
9629         }
9630         if( status ) return status;
9631 #endif
9632
9633         status = pthread_create( &t, &attr, task, NULL );
9634         if( status ) return status;
9635
9636 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9637         if( detach ) {
9638                 /* give thread a chance to complete */
9639                 /* it should remain joinable and hence detachable */
9640                 sleep( 1 );
9641
9642                 status = pthread_detach( t );
9643                 if( status ) return status;
9644         }
9645 #endif
9646
9647 #else
9648         /* Draft 4 pthreads */
9649         status = pthread_create( &t, pthread_attr_default, task, NULL );
9650         if( status ) return status;
9651
9652         if( detach ) {
9653                 /* give thread a chance to complete */
9654                 /* it should remain joinable and hence detachable */
9655                 sleep( 1 );
9656
9657                 status = pthread_detach( &t );
9658                 if( status ) return status;
9659         }
9660 #endif
9661
9662 #ifdef HAVE_LINUX_THREADS
9663         pthread_kill_other_threads_np();
9664 #endif
9665
9666         return 0;
9667
9668 ; return 0; }
9669 EOF
9670 if { (eval echo configure:9671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9671   rm -rf conftest*
9672   ol_cv_pthread_lpthread=yes
9673 else
9674   echo "configure: failed program was:" >&5
9675   cat conftest.$ac_ext >&5
9676   rm -rf conftest*
9677   ol_cv_pthread_lpthread=no
9678 fi
9679 rm -f conftest*
9680 else
9681   cat > conftest.$ac_ext <<EOF
9682 #line 9683 "configure"
9683 #include "confdefs.h"
9684 /* pthread test headers */
9685 #include <pthread.h>
9686 #ifndef NULL
9687 #define NULL (void*)0
9688 #endif
9689
9690 static void *task(p)
9691         void *p;
9692 {
9693         return (void *) (p == NULL);
9694 }
9695
9696
9697 int main(argc, argv)
9698         int argc;
9699         char **argv;
9700 {
9701
9702         /* pthread test function */
9703         pthread_t t;
9704         int status;
9705         int detach = 1;
9706
9707 #ifdef HAVE_PTHREADS_FINAL
9708         /* Final pthreads */
9709         pthread_attr_t attr;
9710
9711         status = pthread_attr_init(&attr);
9712         if( status ) return status;
9713
9714 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9715         if( !detach ) {
9716 #if defined( PTHREAD_CREATE_JOINABLE )
9717                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9718 #else
9719                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9720 #endif
9721
9722 #ifdef PTHREAD_CREATE_DETACHED
9723         } else {
9724                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9725 #endif
9726         }
9727         if( status ) return status;
9728 #endif
9729
9730         status = pthread_create( &t, &attr, task, NULL );
9731         if( status ) return status;
9732
9733 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9734         if( detach ) {
9735                 /* give thread a chance to complete */
9736                 /* it should remain joinable and hence detachable */
9737                 sleep( 1 );
9738
9739                 status = pthread_detach( t );
9740                 if( status ) return status;
9741         }
9742 #endif
9743
9744 #else
9745         /* Draft 4 pthreads */
9746         status = pthread_create( &t, pthread_attr_default, task, NULL );
9747         if( status ) return status;
9748
9749         if( detach ) {
9750                 /* give thread a chance to complete */
9751                 /* it should remain joinable and hence detachable */
9752                 sleep( 1 );
9753
9754                 status = pthread_detach( &t );
9755                 if( status ) return status;
9756         }
9757 #endif
9758
9759 #ifdef HAVE_LINUX_THREADS
9760         pthread_kill_other_threads_np();
9761 #endif
9762
9763         return 0;
9764
9765 }
9766
9767 EOF
9768 if { (eval echo configure:9769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9769 then
9770   ol_cv_pthread_lpthread=yes
9771 else
9772   echo "configure: failed program was:" >&5
9773   cat conftest.$ac_ext >&5
9774   rm -fr conftest*
9775   ol_cv_pthread_lpthread=no
9776 fi
9777 rm -fr conftest*
9778 fi
9779
9780
9781                 # restore the LIBS
9782                 LIBS="$ol_LIBS"
9783         
9784 fi
9785
9786 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9787
9788         if test $ol_cv_pthread_lpthread = yes ; then
9789                 ol_link_pthreads="-lpthread"
9790                 ol_link_threads=posix
9791         fi
9792 fi
9793
9794                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9795 if test "$ol_link_threads" = no ; then
9796         # try -lc_r
9797         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9798 echo "configure:9799: checking for pthread link with -lc_r" >&5
9799 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   
9803                 # save the flags
9804                 ol_LIBS="$LIBS"
9805                 LIBS="-lc_r $LIBS"
9806
9807                 if test "$cross_compiling" = yes; then
9808   cat > conftest.$ac_ext <<EOF
9809 #line 9810 "configure"
9810 #include "confdefs.h"
9811 /* pthread test headers */
9812 #include <pthread.h>
9813 #ifndef NULL
9814 #define NULL (void*)0
9815 #endif
9816
9817 static void *task(p)
9818         void *p;
9819 {
9820         return (void *) (p == NULL);
9821 }
9822
9823 int main() {
9824
9825         /* pthread test function */
9826         pthread_t t;
9827         int status;
9828         int detach = 1;
9829
9830 #ifdef HAVE_PTHREADS_FINAL
9831         /* Final pthreads */
9832         pthread_attr_t attr;
9833
9834         status = pthread_attr_init(&attr);
9835         if( status ) return status;
9836
9837 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9838         if( !detach ) {
9839 #if defined( PTHREAD_CREATE_JOINABLE )
9840                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9841 #else
9842                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9843 #endif
9844
9845 #ifdef PTHREAD_CREATE_DETACHED
9846         } else {
9847                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9848 #endif
9849         }
9850         if( status ) return status;
9851 #endif
9852
9853         status = pthread_create( &t, &attr, task, NULL );
9854         if( status ) return status;
9855
9856 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9857         if( detach ) {
9858                 /* give thread a chance to complete */
9859                 /* it should remain joinable and hence detachable */
9860                 sleep( 1 );
9861
9862                 status = pthread_detach( t );
9863                 if( status ) return status;
9864         }
9865 #endif
9866
9867 #else
9868         /* Draft 4 pthreads */
9869         status = pthread_create( &t, pthread_attr_default, task, NULL );
9870         if( status ) return status;
9871
9872         if( detach ) {
9873                 /* give thread a chance to complete */
9874                 /* it should remain joinable and hence detachable */
9875                 sleep( 1 );
9876
9877                 status = pthread_detach( &t );
9878                 if( status ) return status;
9879         }
9880 #endif
9881
9882 #ifdef HAVE_LINUX_THREADS
9883         pthread_kill_other_threads_np();
9884 #endif
9885
9886         return 0;
9887
9888 ; return 0; }
9889 EOF
9890 if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9891   rm -rf conftest*
9892   ol_cv_pthread_lc_r=yes
9893 else
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -rf conftest*
9897   ol_cv_pthread_lc_r=no
9898 fi
9899 rm -f conftest*
9900 else
9901   cat > conftest.$ac_ext <<EOF
9902 #line 9903 "configure"
9903 #include "confdefs.h"
9904 /* pthread test headers */
9905 #include <pthread.h>
9906 #ifndef NULL
9907 #define NULL (void*)0
9908 #endif
9909
9910 static void *task(p)
9911         void *p;
9912 {
9913         return (void *) (p == NULL);
9914 }
9915
9916
9917 int main(argc, argv)
9918         int argc;
9919         char **argv;
9920 {
9921
9922         /* pthread test function */
9923         pthread_t t;
9924         int status;
9925         int detach = 1;
9926
9927 #ifdef HAVE_PTHREADS_FINAL
9928         /* Final pthreads */
9929         pthread_attr_t attr;
9930
9931         status = pthread_attr_init(&attr);
9932         if( status ) return status;
9933
9934 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9935         if( !detach ) {
9936 #if defined( PTHREAD_CREATE_JOINABLE )
9937                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9938 #else
9939                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9940 #endif
9941
9942 #ifdef PTHREAD_CREATE_DETACHED
9943         } else {
9944                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9945 #endif
9946         }
9947         if( status ) return status;
9948 #endif
9949
9950         status = pthread_create( &t, &attr, task, NULL );
9951         if( status ) return status;
9952
9953 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9954         if( detach ) {
9955                 /* give thread a chance to complete */
9956                 /* it should remain joinable and hence detachable */
9957                 sleep( 1 );
9958
9959                 status = pthread_detach( t );
9960                 if( status ) return status;
9961         }
9962 #endif
9963
9964 #else
9965         /* Draft 4 pthreads */
9966         status = pthread_create( &t, pthread_attr_default, task, NULL );
9967         if( status ) return status;
9968
9969         if( detach ) {
9970                 /* give thread a chance to complete */
9971                 /* it should remain joinable and hence detachable */
9972                 sleep( 1 );
9973
9974                 status = pthread_detach( &t );
9975                 if( status ) return status;
9976         }
9977 #endif
9978
9979 #ifdef HAVE_LINUX_THREADS
9980         pthread_kill_other_threads_np();
9981 #endif
9982
9983         return 0;
9984
9985 }
9986
9987 EOF
9988 if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9989 then
9990   ol_cv_pthread_lc_r=yes
9991 else
9992   echo "configure: failed program was:" >&5
9993   cat conftest.$ac_ext >&5
9994   rm -fr conftest*
9995   ol_cv_pthread_lc_r=no
9996 fi
9997 rm -fr conftest*
9998 fi
9999
10000
10001                 # restore the LIBS
10002                 LIBS="$ol_LIBS"
10003         
10004 fi
10005
10006 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
10007
10008         if test $ol_cv_pthread_lc_r = yes ; then
10009                 ol_link_pthreads="-lc_r"
10010                 ol_link_threads=posix
10011         fi
10012 fi
10013
10014
10015                 # Pthread try link: -threads (ol_cv_pthread_threads)
10016 if test "$ol_link_threads" = no ; then
10017         # try -threads
10018         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
10019 echo "configure:10020: checking for pthread link with -threads" >&5
10020 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
10021   echo $ac_n "(cached) $ac_c" 1>&6
10022 else
10023   
10024                 # save the flags
10025                 ol_LIBS="$LIBS"
10026                 LIBS="-threads $LIBS"
10027
10028                 if test "$cross_compiling" = yes; then
10029   cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 /* pthread test headers */
10033 #include <pthread.h>
10034 #ifndef NULL
10035 #define NULL (void*)0
10036 #endif
10037
10038 static void *task(p)
10039         void *p;
10040 {
10041         return (void *) (p == NULL);
10042 }
10043
10044 int main() {
10045
10046         /* pthread test function */
10047         pthread_t t;
10048         int status;
10049         int detach = 1;
10050
10051 #ifdef HAVE_PTHREADS_FINAL
10052         /* Final pthreads */
10053         pthread_attr_t attr;
10054
10055         status = pthread_attr_init(&attr);
10056         if( status ) return status;
10057
10058 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10059         if( !detach ) {
10060 #if defined( PTHREAD_CREATE_JOINABLE )
10061                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10062 #else
10063                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10064 #endif
10065
10066 #ifdef PTHREAD_CREATE_DETACHED
10067         } else {
10068                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10069 #endif
10070         }
10071         if( status ) return status;
10072 #endif
10073
10074         status = pthread_create( &t, &attr, task, NULL );
10075         if( status ) return status;
10076
10077 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10078         if( detach ) {
10079                 /* give thread a chance to complete */
10080                 /* it should remain joinable and hence detachable */
10081                 sleep( 1 );
10082
10083                 status = pthread_detach( t );
10084                 if( status ) return status;
10085         }
10086 #endif
10087
10088 #else
10089         /* Draft 4 pthreads */
10090         status = pthread_create( &t, pthread_attr_default, task, NULL );
10091         if( status ) return status;
10092
10093         if( detach ) {
10094                 /* give thread a chance to complete */
10095                 /* it should remain joinable and hence detachable */
10096                 sleep( 1 );
10097
10098                 status = pthread_detach( &t );
10099                 if( status ) return status;
10100         }
10101 #endif
10102
10103 #ifdef HAVE_LINUX_THREADS
10104         pthread_kill_other_threads_np();
10105 #endif
10106
10107         return 0;
10108
10109 ; return 0; }
10110 EOF
10111 if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10112   rm -rf conftest*
10113   ol_cv_pthread_threads=yes
10114 else
10115   echo "configure: failed program was:" >&5
10116   cat conftest.$ac_ext >&5
10117   rm -rf conftest*
10118   ol_cv_pthread_threads=no
10119 fi
10120 rm -f conftest*
10121 else
10122   cat > conftest.$ac_ext <<EOF
10123 #line 10124 "configure"
10124 #include "confdefs.h"
10125 /* pthread test headers */
10126 #include <pthread.h>
10127 #ifndef NULL
10128 #define NULL (void*)0
10129 #endif
10130
10131 static void *task(p)
10132         void *p;
10133 {
10134         return (void *) (p == NULL);
10135 }
10136
10137
10138 int main(argc, argv)
10139         int argc;
10140         char **argv;
10141 {
10142
10143         /* pthread test function */
10144         pthread_t t;
10145         int status;
10146         int detach = 1;
10147
10148 #ifdef HAVE_PTHREADS_FINAL
10149         /* Final pthreads */
10150         pthread_attr_t attr;
10151
10152         status = pthread_attr_init(&attr);
10153         if( status ) return status;
10154
10155 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10156         if( !detach ) {
10157 #if defined( PTHREAD_CREATE_JOINABLE )
10158                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10159 #else
10160                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10161 #endif
10162
10163 #ifdef PTHREAD_CREATE_DETACHED
10164         } else {
10165                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10166 #endif
10167         }
10168         if( status ) return status;
10169 #endif
10170
10171         status = pthread_create( &t, &attr, task, NULL );
10172         if( status ) return status;
10173
10174 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10175         if( detach ) {
10176                 /* give thread a chance to complete */
10177                 /* it should remain joinable and hence detachable */
10178                 sleep( 1 );
10179
10180                 status = pthread_detach( t );
10181                 if( status ) return status;
10182         }
10183 #endif
10184
10185 #else
10186         /* Draft 4 pthreads */
10187         status = pthread_create( &t, pthread_attr_default, task, NULL );
10188         if( status ) return status;
10189
10190         if( detach ) {
10191                 /* give thread a chance to complete */
10192                 /* it should remain joinable and hence detachable */
10193                 sleep( 1 );
10194
10195                 status = pthread_detach( &t );
10196                 if( status ) return status;
10197         }
10198 #endif
10199
10200 #ifdef HAVE_LINUX_THREADS
10201         pthread_kill_other_threads_np();
10202 #endif
10203
10204         return 0;
10205
10206 }
10207
10208 EOF
10209 if { (eval echo configure:10210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10210 then
10211   ol_cv_pthread_threads=yes
10212 else
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -fr conftest*
10216   ol_cv_pthread_threads=no
10217 fi
10218 rm -fr conftest*
10219 fi
10220
10221
10222                 # restore the LIBS
10223                 LIBS="$ol_LIBS"
10224         
10225 fi
10226
10227 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
10228
10229         if test $ol_cv_pthread_threads = yes ; then
10230                 ol_link_pthreads="-threads"
10231                 ol_link_threads=posix
10232         fi
10233 fi
10234
10235
10236                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
10237 if test "$ol_link_threads" = no ; then
10238         # try -lpthreads -lmach -lexc -lc_r
10239         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
10240 echo "configure:10241: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
10241 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
10242   echo $ac_n "(cached) $ac_c" 1>&6
10243 else
10244   
10245                 # save the flags
10246                 ol_LIBS="$LIBS"
10247                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
10248
10249                 if test "$cross_compiling" = yes; then
10250   cat > conftest.$ac_ext <<EOF
10251 #line 10252 "configure"
10252 #include "confdefs.h"
10253 /* pthread test headers */
10254 #include <pthread.h>
10255 #ifndef NULL
10256 #define NULL (void*)0
10257 #endif
10258
10259 static void *task(p)
10260         void *p;
10261 {
10262         return (void *) (p == NULL);
10263 }
10264
10265 int main() {
10266
10267         /* pthread test function */
10268         pthread_t t;
10269         int status;
10270         int detach = 1;
10271
10272 #ifdef HAVE_PTHREADS_FINAL
10273         /* Final pthreads */
10274         pthread_attr_t attr;
10275
10276         status = pthread_attr_init(&attr);
10277         if( status ) return status;
10278
10279 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10280         if( !detach ) {
10281 #if defined( PTHREAD_CREATE_JOINABLE )
10282                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10283 #else
10284                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10285 #endif
10286
10287 #ifdef PTHREAD_CREATE_DETACHED
10288         } else {
10289                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10290 #endif
10291         }
10292         if( status ) return status;
10293 #endif
10294
10295         status = pthread_create( &t, &attr, task, NULL );
10296         if( status ) return status;
10297
10298 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10299         if( detach ) {
10300                 /* give thread a chance to complete */
10301                 /* it should remain joinable and hence detachable */
10302                 sleep( 1 );
10303
10304                 status = pthread_detach( t );
10305                 if( status ) return status;
10306         }
10307 #endif
10308
10309 #else
10310         /* Draft 4 pthreads */
10311         status = pthread_create( &t, pthread_attr_default, task, NULL );
10312         if( status ) return status;
10313
10314         if( detach ) {
10315                 /* give thread a chance to complete */
10316                 /* it should remain joinable and hence detachable */
10317                 sleep( 1 );
10318
10319                 status = pthread_detach( &t );
10320                 if( status ) return status;
10321         }
10322 #endif
10323
10324 #ifdef HAVE_LINUX_THREADS
10325         pthread_kill_other_threads_np();
10326 #endif
10327
10328         return 0;
10329
10330 ; return 0; }
10331 EOF
10332 if { (eval echo configure:10333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10333   rm -rf conftest*
10334   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10335 else
10336   echo "configure: failed program was:" >&5
10337   cat conftest.$ac_ext >&5
10338   rm -rf conftest*
10339   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10340 fi
10341 rm -f conftest*
10342 else
10343   cat > conftest.$ac_ext <<EOF
10344 #line 10345 "configure"
10345 #include "confdefs.h"
10346 /* pthread test headers */
10347 #include <pthread.h>
10348 #ifndef NULL
10349 #define NULL (void*)0
10350 #endif
10351
10352 static void *task(p)
10353         void *p;
10354 {
10355         return (void *) (p == NULL);
10356 }
10357
10358
10359 int main(argc, argv)
10360         int argc;
10361         char **argv;
10362 {
10363
10364         /* pthread test function */
10365         pthread_t t;
10366         int status;
10367         int detach = 1;
10368
10369 #ifdef HAVE_PTHREADS_FINAL
10370         /* Final pthreads */
10371         pthread_attr_t attr;
10372
10373         status = pthread_attr_init(&attr);
10374         if( status ) return status;
10375
10376 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10377         if( !detach ) {
10378 #if defined( PTHREAD_CREATE_JOINABLE )
10379                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10380 #else
10381                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10382 #endif
10383
10384 #ifdef PTHREAD_CREATE_DETACHED
10385         } else {
10386                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10387 #endif
10388         }
10389         if( status ) return status;
10390 #endif
10391
10392         status = pthread_create( &t, &attr, task, NULL );
10393         if( status ) return status;
10394
10395 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10396         if( detach ) {
10397                 /* give thread a chance to complete */
10398                 /* it should remain joinable and hence detachable */
10399                 sleep( 1 );
10400
10401                 status = pthread_detach( t );
10402                 if( status ) return status;
10403         }
10404 #endif
10405
10406 #else
10407         /* Draft 4 pthreads */
10408         status = pthread_create( &t, pthread_attr_default, task, NULL );
10409         if( status ) return status;
10410
10411         if( detach ) {
10412                 /* give thread a chance to complete */
10413                 /* it should remain joinable and hence detachable */
10414                 sleep( 1 );
10415
10416                 status = pthread_detach( &t );
10417                 if( status ) return status;
10418         }
10419 #endif
10420
10421 #ifdef HAVE_LINUX_THREADS
10422         pthread_kill_other_threads_np();
10423 #endif
10424
10425         return 0;
10426
10427 }
10428
10429 EOF
10430 if { (eval echo configure:10431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10431 then
10432   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10433 else
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -fr conftest*
10437   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10438 fi
10439 rm -fr conftest*
10440 fi
10441
10442
10443                 # restore the LIBS
10444                 LIBS="$ol_LIBS"
10445         
10446 fi
10447
10448 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
10449
10450         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
10451                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
10452                 ol_link_threads=posix
10453         fi
10454 fi
10455
10456                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
10457 if test "$ol_link_threads" = no ; then
10458         # try -lpthreads -lmach -lexc
10459         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
10460 echo "configure:10461: checking for pthread link with -lpthreads -lmach -lexc" >&5
10461 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
10462   echo $ac_n "(cached) $ac_c" 1>&6
10463 else
10464   
10465                 # save the flags
10466                 ol_LIBS="$LIBS"
10467                 LIBS="-lpthreads -lmach -lexc $LIBS"
10468
10469                 if test "$cross_compiling" = yes; then
10470   cat > conftest.$ac_ext <<EOF
10471 #line 10472 "configure"
10472 #include "confdefs.h"
10473 /* pthread test headers */
10474 #include <pthread.h>
10475 #ifndef NULL
10476 #define NULL (void*)0
10477 #endif
10478
10479 static void *task(p)
10480         void *p;
10481 {
10482         return (void *) (p == NULL);
10483 }
10484
10485 int main() {
10486
10487         /* pthread test function */
10488         pthread_t t;
10489         int status;
10490         int detach = 1;
10491
10492 #ifdef HAVE_PTHREADS_FINAL
10493         /* Final pthreads */
10494         pthread_attr_t attr;
10495
10496         status = pthread_attr_init(&attr);
10497         if( status ) return status;
10498
10499 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10500         if( !detach ) {
10501 #if defined( PTHREAD_CREATE_JOINABLE )
10502                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10503 #else
10504                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10505 #endif
10506
10507 #ifdef PTHREAD_CREATE_DETACHED
10508         } else {
10509                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10510 #endif
10511         }
10512         if( status ) return status;
10513 #endif
10514
10515         status = pthread_create( &t, &attr, task, NULL );
10516         if( status ) return status;
10517
10518 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10519         if( detach ) {
10520                 /* give thread a chance to complete */
10521                 /* it should remain joinable and hence detachable */
10522                 sleep( 1 );
10523
10524                 status = pthread_detach( t );
10525                 if( status ) return status;
10526         }
10527 #endif
10528
10529 #else
10530         /* Draft 4 pthreads */
10531         status = pthread_create( &t, pthread_attr_default, task, NULL );
10532         if( status ) return status;
10533
10534         if( detach ) {
10535                 /* give thread a chance to complete */
10536                 /* it should remain joinable and hence detachable */
10537                 sleep( 1 );
10538
10539                 status = pthread_detach( &t );
10540                 if( status ) return status;
10541         }
10542 #endif
10543
10544 #ifdef HAVE_LINUX_THREADS
10545         pthread_kill_other_threads_np();
10546 #endif
10547
10548         return 0;
10549
10550 ; return 0; }
10551 EOF
10552 if { (eval echo configure:10553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10553   rm -rf conftest*
10554   ol_cv_pthread_lpthreads_lmach_lexc=yes
10555 else
10556   echo "configure: failed program was:" >&5
10557   cat conftest.$ac_ext >&5
10558   rm -rf conftest*
10559   ol_cv_pthread_lpthreads_lmach_lexc=no
10560 fi
10561 rm -f conftest*
10562 else
10563   cat > conftest.$ac_ext <<EOF
10564 #line 10565 "configure"
10565 #include "confdefs.h"
10566 /* pthread test headers */
10567 #include <pthread.h>
10568 #ifndef NULL
10569 #define NULL (void*)0
10570 #endif
10571
10572 static void *task(p)
10573         void *p;
10574 {
10575         return (void *) (p == NULL);
10576 }
10577
10578
10579 int main(argc, argv)
10580         int argc;
10581         char **argv;
10582 {
10583
10584         /* pthread test function */
10585         pthread_t t;
10586         int status;
10587         int detach = 1;
10588
10589 #ifdef HAVE_PTHREADS_FINAL
10590         /* Final pthreads */
10591         pthread_attr_t attr;
10592
10593         status = pthread_attr_init(&attr);
10594         if( status ) return status;
10595
10596 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10597         if( !detach ) {
10598 #if defined( PTHREAD_CREATE_JOINABLE )
10599                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10600 #else
10601                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10602 #endif
10603
10604 #ifdef PTHREAD_CREATE_DETACHED
10605         } else {
10606                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10607 #endif
10608         }
10609         if( status ) return status;
10610 #endif
10611
10612         status = pthread_create( &t, &attr, task, NULL );
10613         if( status ) return status;
10614
10615 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10616         if( detach ) {
10617                 /* give thread a chance to complete */
10618                 /* it should remain joinable and hence detachable */
10619                 sleep( 1 );
10620
10621                 status = pthread_detach( t );
10622                 if( status ) return status;
10623         }
10624 #endif
10625
10626 #else
10627         /* Draft 4 pthreads */
10628         status = pthread_create( &t, pthread_attr_default, task, NULL );
10629         if( status ) return status;
10630
10631         if( detach ) {
10632                 /* give thread a chance to complete */
10633                 /* it should remain joinable and hence detachable */
10634                 sleep( 1 );
10635
10636                 status = pthread_detach( &t );
10637                 if( status ) return status;
10638         }
10639 #endif
10640
10641 #ifdef HAVE_LINUX_THREADS
10642         pthread_kill_other_threads_np();
10643 #endif
10644
10645         return 0;
10646
10647 }
10648
10649 EOF
10650 if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10651 then
10652   ol_cv_pthread_lpthreads_lmach_lexc=yes
10653 else
10654   echo "configure: failed program was:" >&5
10655   cat conftest.$ac_ext >&5
10656   rm -fr conftest*
10657   ol_cv_pthread_lpthreads_lmach_lexc=no
10658 fi
10659 rm -fr conftest*
10660 fi
10661
10662
10663                 # restore the LIBS
10664                 LIBS="$ol_LIBS"
10665         
10666 fi
10667
10668 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
10669
10670         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
10671                 ol_link_pthreads="-lpthreads -lmach -lexc"
10672                 ol_link_threads=posix
10673         fi
10674 fi
10675
10676                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
10677 if test "$ol_link_threads" = no ; then
10678         # try -lpthreads -lexc
10679         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
10680 echo "configure:10681: checking for pthread link with -lpthreads -lexc" >&5
10681 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
10682   echo $ac_n "(cached) $ac_c" 1>&6
10683 else
10684   
10685                 # save the flags
10686                 ol_LIBS="$LIBS"
10687                 LIBS="-lpthreads -lexc $LIBS"
10688
10689                 if test "$cross_compiling" = yes; then
10690   cat > conftest.$ac_ext <<EOF
10691 #line 10692 "configure"
10692 #include "confdefs.h"
10693 /* pthread test headers */
10694 #include <pthread.h>
10695 #ifndef NULL
10696 #define NULL (void*)0
10697 #endif
10698
10699 static void *task(p)
10700         void *p;
10701 {
10702         return (void *) (p == NULL);
10703 }
10704
10705 int main() {
10706
10707         /* pthread test function */
10708         pthread_t t;
10709         int status;
10710         int detach = 1;
10711
10712 #ifdef HAVE_PTHREADS_FINAL
10713         /* Final pthreads */
10714         pthread_attr_t attr;
10715
10716         status = pthread_attr_init(&attr);
10717         if( status ) return status;
10718
10719 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10720         if( !detach ) {
10721 #if defined( PTHREAD_CREATE_JOINABLE )
10722                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10723 #else
10724                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10725 #endif
10726
10727 #ifdef PTHREAD_CREATE_DETACHED
10728         } else {
10729                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10730 #endif
10731         }
10732         if( status ) return status;
10733 #endif
10734
10735         status = pthread_create( &t, &attr, task, NULL );
10736         if( status ) return status;
10737
10738 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10739         if( detach ) {
10740                 /* give thread a chance to complete */
10741                 /* it should remain joinable and hence detachable */
10742                 sleep( 1 );
10743
10744                 status = pthread_detach( t );
10745                 if( status ) return status;
10746         }
10747 #endif
10748
10749 #else
10750         /* Draft 4 pthreads */
10751         status = pthread_create( &t, pthread_attr_default, task, NULL );
10752         if( status ) return status;
10753
10754         if( detach ) {
10755                 /* give thread a chance to complete */
10756                 /* it should remain joinable and hence detachable */
10757                 sleep( 1 );
10758
10759                 status = pthread_detach( &t );
10760                 if( status ) return status;
10761         }
10762 #endif
10763
10764 #ifdef HAVE_LINUX_THREADS
10765         pthread_kill_other_threads_np();
10766 #endif
10767
10768         return 0;
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   ol_cv_pthread_lpthreads_lexc=yes
10775 else
10776   echo "configure: failed program was:" >&5
10777   cat conftest.$ac_ext >&5
10778   rm -rf conftest*
10779   ol_cv_pthread_lpthreads_lexc=no
10780 fi
10781 rm -f conftest*
10782 else
10783   cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 /* pthread test headers */
10787 #include <pthread.h>
10788 #ifndef NULL
10789 #define NULL (void*)0
10790 #endif
10791
10792 static void *task(p)
10793         void *p;
10794 {
10795         return (void *) (p == NULL);
10796 }
10797
10798
10799 int main(argc, argv)
10800         int argc;
10801         char **argv;
10802 {
10803
10804         /* pthread test function */
10805         pthread_t t;
10806         int status;
10807         int detach = 1;
10808
10809 #ifdef HAVE_PTHREADS_FINAL
10810         /* Final pthreads */
10811         pthread_attr_t attr;
10812
10813         status = pthread_attr_init(&attr);
10814         if( status ) return status;
10815
10816 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10817         if( !detach ) {
10818 #if defined( PTHREAD_CREATE_JOINABLE )
10819                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10820 #else
10821                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10822 #endif
10823
10824 #ifdef PTHREAD_CREATE_DETACHED
10825         } else {
10826                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10827 #endif
10828         }
10829         if( status ) return status;
10830 #endif
10831
10832         status = pthread_create( &t, &attr, task, NULL );
10833         if( status ) return status;
10834
10835 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10836         if( detach ) {
10837                 /* give thread a chance to complete */
10838                 /* it should remain joinable and hence detachable */
10839                 sleep( 1 );
10840
10841                 status = pthread_detach( t );
10842                 if( status ) return status;
10843         }
10844 #endif
10845
10846 #else
10847         /* Draft 4 pthreads */
10848         status = pthread_create( &t, pthread_attr_default, task, NULL );
10849         if( status ) return status;
10850
10851         if( detach ) {
10852                 /* give thread a chance to complete */
10853                 /* it should remain joinable and hence detachable */
10854                 sleep( 1 );
10855
10856                 status = pthread_detach( &t );
10857                 if( status ) return status;
10858         }
10859 #endif
10860
10861 #ifdef HAVE_LINUX_THREADS
10862         pthread_kill_other_threads_np();
10863 #endif
10864
10865         return 0;
10866
10867 }
10868
10869 EOF
10870 if { (eval echo configure:10871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10871 then
10872   ol_cv_pthread_lpthreads_lexc=yes
10873 else
10874   echo "configure: failed program was:" >&5
10875   cat conftest.$ac_ext >&5
10876   rm -fr conftest*
10877   ol_cv_pthread_lpthreads_lexc=no
10878 fi
10879 rm -fr conftest*
10880 fi
10881
10882
10883                 # restore the LIBS
10884                 LIBS="$ol_LIBS"
10885         
10886 fi
10887
10888 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
10889
10890         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10891                 ol_link_pthreads="-lpthreads -lexc"
10892                 ol_link_threads=posix
10893         fi
10894 fi
10895
10896
10897                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10898 if test "$ol_link_threads" = no ; then
10899         # try -lpthreads
10900         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10901 echo "configure:10902: checking for pthread link with -lpthreads" >&5
10902 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10903   echo $ac_n "(cached) $ac_c" 1>&6
10904 else
10905   
10906                 # save the flags
10907                 ol_LIBS="$LIBS"
10908                 LIBS="-lpthreads $LIBS"
10909
10910                 if test "$cross_compiling" = yes; then
10911   cat > conftest.$ac_ext <<EOF
10912 #line 10913 "configure"
10913 #include "confdefs.h"
10914 /* pthread test headers */
10915 #include <pthread.h>
10916 #ifndef NULL
10917 #define NULL (void*)0
10918 #endif
10919
10920 static void *task(p)
10921         void *p;
10922 {
10923         return (void *) (p == NULL);
10924 }
10925
10926 int main() {
10927
10928         /* pthread test function */
10929         pthread_t t;
10930         int status;
10931         int detach = 1;
10932
10933 #ifdef HAVE_PTHREADS_FINAL
10934         /* Final pthreads */
10935         pthread_attr_t attr;
10936
10937         status = pthread_attr_init(&attr);
10938         if( status ) return status;
10939
10940 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10941         if( !detach ) {
10942 #if defined( PTHREAD_CREATE_JOINABLE )
10943                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10944 #else
10945                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10946 #endif
10947
10948 #ifdef PTHREAD_CREATE_DETACHED
10949         } else {
10950                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10951 #endif
10952         }
10953         if( status ) return status;
10954 #endif
10955
10956         status = pthread_create( &t, &attr, task, NULL );
10957         if( status ) return status;
10958
10959 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10960         if( detach ) {
10961                 /* give thread a chance to complete */
10962                 /* it should remain joinable and hence detachable */
10963                 sleep( 1 );
10964
10965                 status = pthread_detach( t );
10966                 if( status ) return status;
10967         }
10968 #endif
10969
10970 #else
10971         /* Draft 4 pthreads */
10972         status = pthread_create( &t, pthread_attr_default, task, NULL );
10973         if( status ) return status;
10974
10975         if( detach ) {
10976                 /* give thread a chance to complete */
10977                 /* it should remain joinable and hence detachable */
10978                 sleep( 1 );
10979
10980                 status = pthread_detach( &t );
10981                 if( status ) return status;
10982         }
10983 #endif
10984
10985 #ifdef HAVE_LINUX_THREADS
10986         pthread_kill_other_threads_np();
10987 #endif
10988
10989         return 0;
10990
10991 ; return 0; }
10992 EOF
10993 if { (eval echo configure:10994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10994   rm -rf conftest*
10995   ol_cv_pthread_lib_lpthreads=yes
10996 else
10997   echo "configure: failed program was:" >&5
10998   cat conftest.$ac_ext >&5
10999   rm -rf conftest*
11000   ol_cv_pthread_lib_lpthreads=no
11001 fi
11002 rm -f conftest*
11003 else
11004   cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007 /* pthread test headers */
11008 #include <pthread.h>
11009 #ifndef NULL
11010 #define NULL (void*)0
11011 #endif
11012
11013 static void *task(p)
11014         void *p;
11015 {
11016         return (void *) (p == NULL);
11017 }
11018
11019
11020 int main(argc, argv)
11021         int argc;
11022         char **argv;
11023 {
11024
11025         /* pthread test function */
11026         pthread_t t;
11027         int status;
11028         int detach = 1;
11029
11030 #ifdef HAVE_PTHREADS_FINAL
11031         /* Final pthreads */
11032         pthread_attr_t attr;
11033
11034         status = pthread_attr_init(&attr);
11035         if( status ) return status;
11036
11037 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11038         if( !detach ) {
11039 #if defined( PTHREAD_CREATE_JOINABLE )
11040                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11041 #else
11042                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11043 #endif
11044
11045 #ifdef PTHREAD_CREATE_DETACHED
11046         } else {
11047                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11048 #endif
11049         }
11050         if( status ) return status;
11051 #endif
11052
11053         status = pthread_create( &t, &attr, task, NULL );
11054         if( status ) return status;
11055
11056 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11057         if( detach ) {
11058                 /* give thread a chance to complete */
11059                 /* it should remain joinable and hence detachable */
11060                 sleep( 1 );
11061
11062                 status = pthread_detach( t );
11063                 if( status ) return status;
11064         }
11065 #endif
11066
11067 #else
11068         /* Draft 4 pthreads */
11069         status = pthread_create( &t, pthread_attr_default, task, NULL );
11070         if( status ) return status;
11071
11072         if( detach ) {
11073                 /* give thread a chance to complete */
11074                 /* it should remain joinable and hence detachable */
11075                 sleep( 1 );
11076
11077                 status = pthread_detach( &t );
11078                 if( status ) return status;
11079         }
11080 #endif
11081
11082 #ifdef HAVE_LINUX_THREADS
11083         pthread_kill_other_threads_np();
11084 #endif
11085
11086         return 0;
11087
11088 }
11089
11090 EOF
11091 if { (eval echo configure:11092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11092 then
11093   ol_cv_pthread_lib_lpthreads=yes
11094 else
11095   echo "configure: failed program was:" >&5
11096   cat conftest.$ac_ext >&5
11097   rm -fr conftest*
11098   ol_cv_pthread_lib_lpthreads=no
11099 fi
11100 rm -fr conftest*
11101 fi
11102
11103
11104                 # restore the LIBS
11105                 LIBS="$ol_LIBS"
11106         
11107 fi
11108
11109 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
11110
11111         if test $ol_cv_pthread_lib_lpthreads = yes ; then
11112                 ol_link_pthreads="-lpthreads"
11113                 ol_link_threads=posix
11114         fi
11115 fi
11116
11117
11118                 if test $ol_link_threads != no ; then
11119                         cat >> confdefs.h <<\EOF
11120 #define HAVE_PTHREADS 1
11121 EOF
11122
11123
11124                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
11125
11126                                                 save_CPPFLAGS="$CPPFLAGS"
11127                         save_LIBS="$LIBS"
11128                         LIBS="$LTHREAD_LIBS $LIBS"
11129
11130                                                                                                 for ac_func in sched_yield pthread_yield
11131 do
11132 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11133 echo "configure:11134: checking for $ac_func" >&5
11134 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11135   echo $ac_n "(cached) $ac_c" 1>&6
11136 else
11137   cat > conftest.$ac_ext <<EOF
11138 #line 11139 "configure"
11139 #include "confdefs.h"
11140 /* System header to define __stub macros and hopefully few prototypes,
11141     which can conflict with char $ac_func(); below.  */
11142 #include <assert.h>
11143 /* Override any gcc2 internal prototype to avoid an error.  */
11144 /* We use char because int might match the return type of a gcc2
11145     builtin and then its argument prototype would still apply.  */
11146 char $ac_func();
11147 char (*f)();
11148
11149 int main() {
11150
11151 /* The GNU C library defines this for functions which it implements
11152     to always fail with ENOSYS.  Some functions are actually named
11153     something starting with __ and the normal name is an alias.  */
11154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11155 choke me
11156 #else
11157 f = $ac_func;
11158 #endif
11159
11160 ; return 0; }
11161 EOF
11162 if { (eval echo configure:11163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11163   rm -rf conftest*
11164   eval "ac_cv_func_$ac_func=yes"
11165 else
11166   echo "configure: failed program was:" >&5
11167   cat conftest.$ac_ext >&5
11168   rm -rf conftest*
11169   eval "ac_cv_func_$ac_func=no"
11170 fi
11171 rm -f conftest*
11172 fi
11173
11174 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11175   echo "$ac_t""yes" 1>&6
11176     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11177   cat >> confdefs.h <<EOF
11178 #define $ac_tr_func 1
11179 EOF
11180  
11181 else
11182   echo "$ac_t""no" 1>&6
11183 fi
11184 done
11185
11186
11187                         if test $ac_cv_func_sched_yield = no -a \
11188                                 $ac_cv_func_pthread_yield = no ; then
11189                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
11190 echo "configure:11191: checking for sched_yield in -lrt" >&5
11191 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
11192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11193   echo $ac_n "(cached) $ac_c" 1>&6
11194 else
11195   ac_save_LIBS="$LIBS"
11196 LIBS="-lrt  $LIBS"
11197 cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 /* Override any gcc2 internal prototype to avoid an error.  */
11201 /* We use char because int might match the return type of a gcc2
11202     builtin and then its argument prototype would still apply.  */
11203 char sched_yield();
11204
11205 int main() {
11206 sched_yield()
11207 ; return 0; }
11208 EOF
11209 if { (eval echo configure:11210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11210   rm -rf conftest*
11211   eval "ac_cv_lib_$ac_lib_var=yes"
11212 else
11213   echo "configure: failed program was:" >&5
11214   cat conftest.$ac_ext >&5
11215   rm -rf conftest*
11216   eval "ac_cv_lib_$ac_lib_var=no"
11217 fi
11218 rm -f conftest*
11219 LIBS="$ac_save_LIBS"
11220
11221 fi
11222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11223   echo "$ac_t""yes" 1>&6
11224   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
11225                                         cat >> confdefs.h <<\EOF
11226 #define HAVE_SCHED_YIELD 1
11227 EOF
11228
11229                                         ac_cv_func_sched_yield=yes
11230 else
11231   echo "$ac_t""no" 1>&6
11232 ac_cv_func_sched_yield=no
11233 fi
11234
11235                         fi
11236                         if test $ac_cv_func_sched_yield = no -a \
11237                                 $ac_cv_func_pthread_yield = no ; then
11238                                                                                                 for ac_func in thr_yield
11239 do
11240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11241 echo "configure:11242: checking for $ac_func" >&5
11242 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11243   echo $ac_n "(cached) $ac_c" 1>&6
11244 else
11245   cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 /* System header to define __stub macros and hopefully few prototypes,
11249     which can conflict with char $ac_func(); below.  */
11250 #include <assert.h>
11251 /* Override any gcc2 internal prototype to avoid an error.  */
11252 /* We use char because int might match the return type of a gcc2
11253     builtin and then its argument prototype would still apply.  */
11254 char $ac_func();
11255 char (*f)();
11256
11257 int main() {
11258
11259 /* The GNU C library defines this for functions which it implements
11260     to always fail with ENOSYS.  Some functions are actually named
11261     something starting with __ and the normal name is an alias.  */
11262 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11263 choke me
11264 #else
11265 f = $ac_func;
11266 #endif
11267
11268 ; return 0; }
11269 EOF
11270 if { (eval echo configure:11271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11271   rm -rf conftest*
11272   eval "ac_cv_func_$ac_func=yes"
11273 else
11274   echo "configure: failed program was:" >&5
11275   cat conftest.$ac_ext >&5
11276   rm -rf conftest*
11277   eval "ac_cv_func_$ac_func=no"
11278 fi
11279 rm -f conftest*
11280 fi
11281
11282 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11283   echo "$ac_t""yes" 1>&6
11284     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11285   cat >> confdefs.h <<EOF
11286 #define $ac_tr_func 1
11287 EOF
11288  
11289 else
11290   echo "$ac_t""no" 1>&6
11291 fi
11292 done
11293
11294                         fi
11295                         if test $ac_cv_func_sched_yield = no -a \
11296                                 $ac_cv_func_pthread_yield = no -a \
11297                                 "$ac_cv_func_thr_yield" = no ; then
11298                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
11299                         fi
11300
11301                                                 for ac_func in pthread_kill pthread_rwlock_destroy
11302 do
11303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11304 echo "configure:11305: checking for $ac_func" >&5
11305 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11306   echo $ac_n "(cached) $ac_c" 1>&6
11307 else
11308   cat > conftest.$ac_ext <<EOF
11309 #line 11310 "configure"
11310 #include "confdefs.h"
11311 /* System header to define __stub macros and hopefully few prototypes,
11312     which can conflict with char $ac_func(); below.  */
11313 #include <assert.h>
11314 /* Override any gcc2 internal prototype to avoid an error.  */
11315 /* We use char because int might match the return type of a gcc2
11316     builtin and then its argument prototype would still apply.  */
11317 char $ac_func();
11318 char (*f)();
11319
11320 int main() {
11321
11322 /* The GNU C library defines this for functions which it implements
11323     to always fail with ENOSYS.  Some functions are actually named
11324     something starting with __ and the normal name is an alias.  */
11325 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11326 choke me
11327 #else
11328 f = $ac_func;
11329 #endif
11330
11331 ; return 0; }
11332 EOF
11333 if { (eval echo configure:11334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11334   rm -rf conftest*
11335   eval "ac_cv_func_$ac_func=yes"
11336 else
11337   echo "configure: failed program was:" >&5
11338   cat conftest.$ac_ext >&5
11339   rm -rf conftest*
11340   eval "ac_cv_func_$ac_func=no"
11341 fi
11342 rm -f conftest*
11343 fi
11344
11345 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11346   echo "$ac_t""yes" 1>&6
11347     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11348   cat >> confdefs.h <<EOF
11349 #define $ac_tr_func 1
11350 EOF
11351  
11352 else
11353   echo "$ac_t""no" 1>&6
11354 fi
11355 done
11356
11357
11358                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
11359 echo "configure:11360: checking for pthread_detach with <pthread.h>" >&5
11360 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
11361   echo $ac_n "(cached) $ac_c" 1>&6
11362 else
11363   
11364                                                                 cat > conftest.$ac_ext <<EOF
11365 #line 11366 "configure"
11366 #include "confdefs.h"
11367
11368 #include <pthread.h>
11369 #ifndef NULL
11370 #define NULL (void*)0
11371 #endif
11372
11373 int main() {
11374 pthread_detach(NULL);
11375 ; return 0; }
11376 EOF
11377 if { (eval echo configure:11378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11378   rm -rf conftest*
11379   ol_cv_func_pthread_detach=yes
11380 else
11381   echo "configure: failed program was:" >&5
11382   cat conftest.$ac_ext >&5
11383   rm -rf conftest*
11384   ol_cv_func_pthread_detach=no
11385 fi
11386 rm -f conftest*
11387                         
11388 fi
11389
11390 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
11391
11392                         if test $ol_cv_func_pthread_detach = no ; then
11393                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
11394                         fi
11395
11396                         cat >> confdefs.h <<\EOF
11397 #define HAVE_PTHREAD_DETACH 1
11398 EOF
11399
11400
11401                                                 for ac_func in \
11402                                 pthread_setconcurrency \
11403                                 pthread_getconcurrency \
11404                                 thr_setconcurrency \
11405                                 thr_getconcurrency \
11406                         
11407 do
11408 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11409 echo "configure:11410: checking for $ac_func" >&5
11410 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11411   echo $ac_n "(cached) $ac_c" 1>&6
11412 else
11413   cat > conftest.$ac_ext <<EOF
11414 #line 11415 "configure"
11415 #include "confdefs.h"
11416 /* System header to define __stub macros and hopefully few prototypes,
11417     which can conflict with char $ac_func(); below.  */
11418 #include <assert.h>
11419 /* Override any gcc2 internal prototype to avoid an error.  */
11420 /* We use char because int might match the return type of a gcc2
11421     builtin and then its argument prototype would still apply.  */
11422 char $ac_func();
11423 char (*f)();
11424
11425 int main() {
11426
11427 /* The GNU C library defines this for functions which it implements
11428     to always fail with ENOSYS.  Some functions are actually named
11429     something starting with __ and the normal name is an alias.  */
11430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11431 choke me
11432 #else
11433 f = $ac_func;
11434 #endif
11435
11436 ; return 0; }
11437 EOF
11438 if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11439   rm -rf conftest*
11440   eval "ac_cv_func_$ac_func=yes"
11441 else
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444   rm -rf conftest*
11445   eval "ac_cv_func_$ac_func=no"
11446 fi
11447 rm -f conftest*
11448 fi
11449
11450 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11451   echo "$ac_t""yes" 1>&6
11452     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11453   cat >> confdefs.h <<EOF
11454 #define $ac_tr_func 1
11455 EOF
11456  
11457 else
11458   echo "$ac_t""no" 1>&6
11459 fi
11460 done
11461
11462
11463                         
11464         for ac_func in pthread_kill_other_threads_np
11465 do
11466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11467 echo "configure:11468: checking for $ac_func" >&5
11468 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11469   echo $ac_n "(cached) $ac_c" 1>&6
11470 else
11471   cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474 /* System header to define __stub macros and hopefully few prototypes,
11475     which can conflict with char $ac_func(); below.  */
11476 #include <assert.h>
11477 /* Override any gcc2 internal prototype to avoid an error.  */
11478 /* We use char because int might match the return type of a gcc2
11479     builtin and then its argument prototype would still apply.  */
11480 char $ac_func();
11481 char (*f)();
11482
11483 int main() {
11484
11485 /* The GNU C library defines this for functions which it implements
11486     to always fail with ENOSYS.  Some functions are actually named
11487     something starting with __ and the normal name is an alias.  */
11488 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11489 choke me
11490 #else
11491 f = $ac_func;
11492 #endif
11493
11494 ; return 0; }
11495 EOF
11496 if { (eval echo configure:11497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11497   rm -rf conftest*
11498   eval "ac_cv_func_$ac_func=yes"
11499 else
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   eval "ac_cv_func_$ac_func=no"
11504 fi
11505 rm -f conftest*
11506 fi
11507
11508 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11509   echo "$ac_t""yes" 1>&6
11510     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11511   cat >> confdefs.h <<EOF
11512 #define $ac_tr_func 1
11513 EOF
11514  
11515 else
11516   echo "$ac_t""no" 1>&6
11517 fi
11518 done
11519
11520         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
11521 echo "configure:11522: checking for LinuxThreads implementation" >&5
11522 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
11523   echo $ac_n "(cached) $ac_c" 1>&6
11524 else
11525   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
11526 fi
11527
11528 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
11529
11530                         
11531         
11532         
11533         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
11534 echo "configure:11535: checking for LinuxThreads consistency" >&5
11535 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
11536   echo $ac_n "(cached) $ac_c" 1>&6
11537 else
11538   
11539                 if test $ol_cv_header_linux_threads = yes -a \
11540                         $ol_cv_sys_linux_threads = yes; then
11541                         ol_cv_linux_threads=yes
11542                 elif test $ol_cv_header_linux_threads = no -a \
11543                         $ol_cv_sys_linux_threads = no; then
11544                         ol_cv_linux_threads=no
11545                 else
11546                         ol_cv_linux_threads=error
11547                 fi
11548         
11549 fi
11550
11551 echo "$ac_t""$ol_cv_linux_threads" 1>&6
11552
11553
11554                         if test $ol_cv_linux_threads = error; then
11555                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
11556                         fi
11557
11558                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
11559 echo "configure:11560: checking if pthread_create() works" >&5
11560 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
11561   echo $ac_n "(cached) $ac_c" 1>&6
11562 else
11563   
11564                         if test "$cross_compiling" = yes; then
11565                                 ol_cv_pthread_create_works=yes
11566 else
11567   cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570 /* pthread test headers */
11571 #include <pthread.h>
11572 #ifndef NULL
11573 #define NULL (void*)0
11574 #endif
11575
11576 static void *task(p)
11577         void *p;
11578 {
11579         return (void *) (p == NULL);
11580 }
11581
11582
11583 int main(argc, argv)
11584         int argc;
11585         char **argv;
11586 {
11587
11588         /* pthread test function */
11589         pthread_t t;
11590         int status;
11591         int detach = 1;
11592
11593 #ifdef HAVE_PTHREADS_FINAL
11594         /* Final pthreads */
11595         pthread_attr_t attr;
11596
11597         status = pthread_attr_init(&attr);
11598         if( status ) return status;
11599
11600 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11601         if( !detach ) {
11602 #if defined( PTHREAD_CREATE_JOINABLE )
11603                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11604 #else
11605                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11606 #endif
11607
11608 #ifdef PTHREAD_CREATE_DETACHED
11609         } else {
11610                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11611 #endif
11612         }
11613         if( status ) return status;
11614 #endif
11615
11616         status = pthread_create( &t, &attr, task, NULL );
11617         if( status ) return status;
11618
11619 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11620         if( detach ) {
11621                 /* give thread a chance to complete */
11622                 /* it should remain joinable and hence detachable */
11623                 sleep( 1 );
11624
11625                 status = pthread_detach( t );
11626                 if( status ) return status;
11627         }
11628 #endif
11629
11630 #else
11631         /* Draft 4 pthreads */
11632         status = pthread_create( &t, pthread_attr_default, task, NULL );
11633         if( status ) return status;
11634
11635         if( detach ) {
11636                 /* give thread a chance to complete */
11637                 /* it should remain joinable and hence detachable */
11638                 sleep( 1 );
11639
11640                 status = pthread_detach( &t );
11641                 if( status ) return status;
11642         }
11643 #endif
11644
11645 #ifdef HAVE_LINUX_THREADS
11646         pthread_kill_other_threads_np();
11647 #endif
11648
11649         return 0;
11650
11651 }
11652
11653 EOF
11654 if { (eval echo configure:11655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11655 then
11656   ol_cv_pthread_create_works=yes
11657 else
11658   echo "configure: failed program was:" >&5
11659   cat conftest.$ac_ext >&5
11660   rm -fr conftest*
11661   ol_cv_pthread_create_works=no
11662 fi
11663 rm -fr conftest*
11664 fi
11665
11666 fi
11667
11668 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
11669
11670                         if test $ol_cv_pthread_create_works = no ; then
11671                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
11672                         fi
11673
11674                                                 if test $ol_with_yielding_select = auto ; then
11675                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
11676 echo "configure:11677: checking if select yields when using pthreads" >&5
11677 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
11678   echo $ac_n "(cached) $ac_c" 1>&6
11679 else
11680   
11681                                 if test "$cross_compiling" = yes; then
11682   ol_cv_pthread_select_yields=cross
11683 else
11684   cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687
11688 #include <sys/types.h>
11689 #include <sys/time.h>
11690 #include <unistd.h>
11691 #include <pthread.h>
11692 #ifndef NULL
11693 #define NULL (void*) 0
11694 #endif
11695
11696 static int fildes[2];
11697
11698 static void *task(p)
11699         void *p;
11700 {
11701         int i;
11702         struct timeval tv;
11703
11704         fd_set rfds;
11705
11706         tv.tv_sec=10;
11707         tv.tv_usec=0;
11708
11709         FD_ZERO(&rfds);
11710         FD_SET(fildes[0], &rfds);
11711
11712         /* we're not interested in any fds */
11713         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
11714
11715         if(i < 0) {
11716                 perror("select");
11717                 exit(10);
11718         }
11719
11720         exit(0); /* if we exit here, the select blocked the whole process */
11721 }
11722
11723 int main(argc, argv)
11724         int argc;
11725         char **argv;
11726 {
11727         pthread_t t;
11728
11729         /* create a pipe to select */
11730         if(pipe(&fildes[0])) {
11731                 perror("select");
11732                 exit(1);
11733         }
11734
11735 #ifdef HAVE_PTHREAD_SETCONCURRENCY
11736         (void) pthread_setconcurrency(2);
11737 #else
11738 #ifdef HAVE_THR_SETCONCURRENCY
11739         /* Set Solaris LWP concurrency to 2 */
11740         thr_setconcurrency(2);
11741 #endif
11742 #endif
11743
11744 #if HAVE_PTHREADS_D4
11745         pthread_create(&t, pthread_attr_default, task, NULL);
11746 #else
11747         pthread_create(&t, NULL, task, NULL);
11748 #endif
11749
11750 #if HAVE_SCHED_YIELD
11751         sched_yield();  /* make sure task runs first */
11752 #else
11753 #ifdef HAVE_PTHREAD_YIELD
11754         pthread_yield();        /* make sure task runs first */
11755 #endif
11756 #endif
11757
11758         exit(2);
11759 }
11760 EOF
11761 if { (eval echo configure:11762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11762 then
11763   ol_cv_pthread_select_yields=no
11764 else
11765   echo "configure: failed program was:" >&5
11766   cat conftest.$ac_ext >&5
11767   rm -fr conftest*
11768   ol_cv_pthread_select_yields=yes
11769 fi
11770 rm -fr conftest*
11771 fi
11772
11773 fi
11774
11775 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
11776
11777                                 if test $ol_cv_pthread_select_yields = cross ; then
11778                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
11779                                 fi
11780
11781                                 if test $ol_cv_pthread_select_yields = yes ; then
11782                                         ol_with_yielding_select=yes
11783                                 fi
11784                         fi
11785
11786                                                 CPPFLAGS="$save_CPPFLAGS"
11787                         LIBS="$save_LIBS"
11788                 else
11789                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
11790                 fi
11791         fi
11792
11793         if test $ol_with_threads = posix ; then
11794                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
11795         fi
11796 fi
11797
11798 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11799         -o $ol_with_threads = mach ; then
11800
11801                 for ac_hdr in mach/cthreads.h
11802 do
11803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11805 echo "configure:11806: checking for $ac_hdr" >&5
11806 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812 #include <$ac_hdr>
11813 EOF
11814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11815 { (eval echo configure:11816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11817 if test -z "$ac_err"; then
11818   rm -rf conftest*
11819   eval "ac_cv_header_$ac_safe=yes"
11820 else
11821   echo "$ac_err" >&5
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   eval "ac_cv_header_$ac_safe=no"
11826 fi
11827 rm -f conftest*
11828 fi
11829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11830   echo "$ac_t""yes" 1>&6
11831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11832   cat >> confdefs.h <<EOF
11833 #define $ac_tr_hdr 1
11834 EOF
11835  
11836 else
11837   echo "$ac_t""no" 1>&6
11838 fi
11839 done
11840
11841         if test $ac_cv_header_mach_cthreads_h = yes ; then
11842                 ol_with_threads=found
11843
11844                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
11845 echo "configure:11846: checking for cthread_fork" >&5
11846 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
11847   echo $ac_n "(cached) $ac_c" 1>&6
11848 else
11849   cat > conftest.$ac_ext <<EOF
11850 #line 11851 "configure"
11851 #include "confdefs.h"
11852 /* System header to define __stub macros and hopefully few prototypes,
11853     which can conflict with char cthread_fork(); below.  */
11854 #include <assert.h>
11855 /* Override any gcc2 internal prototype to avoid an error.  */
11856 /* We use char because int might match the return type of a gcc2
11857     builtin and then its argument prototype would still apply.  */
11858 char cthread_fork();
11859 char (*f)();
11860
11861 int main() {
11862
11863 /* The GNU C library defines this for functions which it implements
11864     to always fail with ENOSYS.  Some functions are actually named
11865     something starting with __ and the normal name is an alias.  */
11866 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
11867 choke me
11868 #else
11869 f = cthread_fork;
11870 #endif
11871
11872 ; return 0; }
11873 EOF
11874 if { (eval echo configure:11875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11875   rm -rf conftest*
11876   eval "ac_cv_func_cthread_fork=yes"
11877 else
11878   echo "configure: failed program was:" >&5
11879   cat conftest.$ac_ext >&5
11880   rm -rf conftest*
11881   eval "ac_cv_func_cthread_fork=no"
11882 fi
11883 rm -f conftest*
11884 fi
11885
11886 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
11887   echo "$ac_t""yes" 1>&6
11888   ol_link_threads=yes
11889 else
11890   echo "$ac_t""no" 1>&6
11891 fi
11892
11893
11894                 if test $ol_link_threads = no ; then
11895                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
11896 echo "configure:11897: checking for cthread_fork with -all_load" >&5
11897 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
11898   echo $ac_n "(cached) $ac_c" 1>&6
11899 else
11900   
11901                                                                 save_LIBS="$LIBS"
11902                                 LIBS="-all_load $LIBS"
11903                                 cat > conftest.$ac_ext <<EOF
11904 #line 11905 "configure"
11905 #include "confdefs.h"
11906 #include <mach/cthreads.h>
11907 int main() {
11908
11909                                         cthread_fork((void *)0, (void *)0);
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_cthread_all_load=yes
11916 else
11917   echo "configure: failed program was:" >&5
11918   cat conftest.$ac_ext >&5
11919   rm -rf conftest*
11920   ol_cv_cthread_all_load=no
11921 fi
11922 rm -f conftest*
11923                                                                 LIBS="$save_LIBS"
11924                         
11925 fi
11926
11927 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
11928
11929                         if test $ol_cv_cthread_all_load = yes ; then
11930                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
11931                                 ol_link_threads=mach
11932                         fi
11933                 fi
11934
11935                 if test $ol_link_threads != no ; then
11936                         : check for cthread specific functionality here
11937                         cat >> confdefs.h <<\EOF
11938 #define HAVE_MACH_CTHREADS 1
11939 EOF
11940
11941                 else
11942                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
11943                 fi
11944         fi
11945
11946         if test $ol_with_threads = mach ; then
11947                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
11948         fi
11949 fi
11950
11951 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11952         -o $ol_with_threads = pth ; then
11953
11954         for ac_hdr in pth.h
11955 do
11956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11958 echo "configure:11959: checking for $ac_hdr" >&5
11959 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11960   echo $ac_n "(cached) $ac_c" 1>&6
11961 else
11962   cat > conftest.$ac_ext <<EOF
11963 #line 11964 "configure"
11964 #include "confdefs.h"
11965 #include <$ac_hdr>
11966 EOF
11967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11968 { (eval echo configure:11969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11970 if test -z "$ac_err"; then
11971   rm -rf conftest*
11972   eval "ac_cv_header_$ac_safe=yes"
11973 else
11974   echo "$ac_err" >&5
11975   echo "configure: failed program was:" >&5
11976   cat conftest.$ac_ext >&5
11977   rm -rf conftest*
11978   eval "ac_cv_header_$ac_safe=no"
11979 fi
11980 rm -f conftest*
11981 fi
11982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11983   echo "$ac_t""yes" 1>&6
11984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11985   cat >> confdefs.h <<EOF
11986 #define $ac_tr_hdr 1
11987 EOF
11988  
11989 else
11990   echo "$ac_t""no" 1>&6
11991 fi
11992 done
11993
11994
11995         if test $ac_cv_header_pth_h = yes ; then
11996                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11997 echo "configure:11998: checking for pth_version in -lpth" >&5
11998 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12000   echo $ac_n "(cached) $ac_c" 1>&6
12001 else
12002   ac_save_LIBS="$LIBS"
12003 LIBS="-lpth  $LIBS"
12004 cat > conftest.$ac_ext <<EOF
12005 #line 12006 "configure"
12006 #include "confdefs.h"
12007 /* Override any gcc2 internal prototype to avoid an error.  */
12008 /* We use char because int might match the return type of a gcc2
12009     builtin and then its argument prototype would still apply.  */
12010 char pth_version();
12011
12012 int main() {
12013 pth_version()
12014 ; return 0; }
12015 EOF
12016 if { (eval echo configure:12017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12017   rm -rf conftest*
12018   eval "ac_cv_lib_$ac_lib_var=yes"
12019 else
12020   echo "configure: failed program was:" >&5
12021   cat conftest.$ac_ext >&5
12022   rm -rf conftest*
12023   eval "ac_cv_lib_$ac_lib_var=no"
12024 fi
12025 rm -f conftest*
12026 LIBS="$ac_save_LIBS"
12027
12028 fi
12029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12030   echo "$ac_t""yes" 1>&6
12031   have_pth=yes
12032 else
12033   echo "$ac_t""no" 1>&6
12034 have_pth=no
12035 fi
12036
12037
12038                 if test $have_pth = yes ; then
12039                         cat >> confdefs.h <<\EOF
12040 #define HAVE_GNU_PTH 1
12041 EOF
12042
12043                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
12044                         ol_link_threads=pth
12045
12046                         if test $ol_with_yielding_select = auto ; then
12047                                 ol_with_yielding_select=yes
12048                         fi
12049                 fi
12050         fi
12051 fi
12052
12053 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12054         -o $ol_with_threads = lwp ; then
12055
12056                 for ac_hdr in thread.h synch.h
12057 do
12058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12060 echo "configure:12061: checking for $ac_hdr" >&5
12061 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12062   echo $ac_n "(cached) $ac_c" 1>&6
12063 else
12064   cat > conftest.$ac_ext <<EOF
12065 #line 12066 "configure"
12066 #include "confdefs.h"
12067 #include <$ac_hdr>
12068 EOF
12069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12070 { (eval echo configure:12071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12072 if test -z "$ac_err"; then
12073   rm -rf conftest*
12074   eval "ac_cv_header_$ac_safe=yes"
12075 else
12076   echo "$ac_err" >&5
12077   echo "configure: failed program was:" >&5
12078   cat conftest.$ac_ext >&5
12079   rm -rf conftest*
12080   eval "ac_cv_header_$ac_safe=no"
12081 fi
12082 rm -f conftest*
12083 fi
12084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12085   echo "$ac_t""yes" 1>&6
12086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12087   cat >> confdefs.h <<EOF
12088 #define $ac_tr_hdr 1
12089 EOF
12090  
12091 else
12092   echo "$ac_t""no" 1>&6
12093 fi
12094 done
12095
12096         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
12097                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
12098 echo "configure:12099: checking for thr_create in -lthread" >&5
12099 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
12100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12101   echo $ac_n "(cached) $ac_c" 1>&6
12102 else
12103   ac_save_LIBS="$LIBS"
12104 LIBS="-lthread  $LIBS"
12105 cat > conftest.$ac_ext <<EOF
12106 #line 12107 "configure"
12107 #include "confdefs.h"
12108 /* Override any gcc2 internal prototype to avoid an error.  */
12109 /* We use char because int might match the return type of a gcc2
12110     builtin and then its argument prototype would still apply.  */
12111 char thr_create();
12112
12113 int main() {
12114 thr_create()
12115 ; return 0; }
12116 EOF
12117 if { (eval echo configure:12118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12118   rm -rf conftest*
12119   eval "ac_cv_lib_$ac_lib_var=yes"
12120 else
12121   echo "configure: failed program was:" >&5
12122   cat conftest.$ac_ext >&5
12123   rm -rf conftest*
12124   eval "ac_cv_lib_$ac_lib_var=no"
12125 fi
12126 rm -f conftest*
12127 LIBS="$ac_save_LIBS"
12128
12129 fi
12130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12131   echo "$ac_t""yes" 1>&6
12132   have_thr=yes
12133 else
12134   echo "$ac_t""no" 1>&6
12135 have_thr=no
12136 fi
12137
12138
12139                 if test $have_thr = yes ; then
12140                         cat >> confdefs.h <<\EOF
12141 #define HAVE_THR 1
12142 EOF
12143
12144                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
12145                         ol_link_threads=thr
12146
12147                         if test $ol_with_yielding_select = auto ; then
12148                                 ol_with_yielding_select=yes
12149                         fi
12150
12151                                                 for ac_func in \
12152                                 thr_setconcurrency \
12153                                 thr_getconcurrency \
12154                         
12155 do
12156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12157 echo "configure:12158: checking for $ac_func" >&5
12158 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12159   echo $ac_n "(cached) $ac_c" 1>&6
12160 else
12161   cat > conftest.$ac_ext <<EOF
12162 #line 12163 "configure"
12163 #include "confdefs.h"
12164 /* System header to define __stub macros and hopefully few prototypes,
12165     which can conflict with char $ac_func(); below.  */
12166 #include <assert.h>
12167 /* Override any gcc2 internal prototype to avoid an error.  */
12168 /* We use char because int might match the return type of a gcc2
12169     builtin and then its argument prototype would still apply.  */
12170 char $ac_func();
12171 char (*f)();
12172
12173 int main() {
12174
12175 /* The GNU C library defines this for functions which it implements
12176     to always fail with ENOSYS.  Some functions are actually named
12177     something starting with __ and the normal name is an alias.  */
12178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12179 choke me
12180 #else
12181 f = $ac_func;
12182 #endif
12183
12184 ; return 0; }
12185 EOF
12186 if { (eval echo configure:12187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12187   rm -rf conftest*
12188   eval "ac_cv_func_$ac_func=yes"
12189 else
12190   echo "configure: failed program was:" >&5
12191   cat conftest.$ac_ext >&5
12192   rm -rf conftest*
12193   eval "ac_cv_func_$ac_func=no"
12194 fi
12195 rm -f conftest*
12196 fi
12197
12198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12199   echo "$ac_t""yes" 1>&6
12200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12201   cat >> confdefs.h <<EOF
12202 #define $ac_tr_func 1
12203 EOF
12204  
12205 else
12206   echo "$ac_t""no" 1>&6
12207 fi
12208 done
12209
12210                 fi
12211         fi
12212
12213                 for ac_hdr in lwp/lwp.h
12214 do
12215 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12216 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12217 echo "configure:12218: checking for $ac_hdr" >&5
12218 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12219   echo $ac_n "(cached) $ac_c" 1>&6
12220 else
12221   cat > conftest.$ac_ext <<EOF
12222 #line 12223 "configure"
12223 #include "confdefs.h"
12224 #include <$ac_hdr>
12225 EOF
12226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12227 { (eval echo configure:12228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12229 if test -z "$ac_err"; then
12230   rm -rf conftest*
12231   eval "ac_cv_header_$ac_safe=yes"
12232 else
12233   echo "$ac_err" >&5
12234   echo "configure: failed program was:" >&5
12235   cat conftest.$ac_ext >&5
12236   rm -rf conftest*
12237   eval "ac_cv_header_$ac_safe=no"
12238 fi
12239 rm -f conftest*
12240 fi
12241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12242   echo "$ac_t""yes" 1>&6
12243     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12244   cat >> confdefs.h <<EOF
12245 #define $ac_tr_hdr 1
12246 EOF
12247  
12248 else
12249   echo "$ac_t""no" 1>&6
12250 fi
12251 done
12252
12253         if test $ac_cv_header_lwp_lwp_h = yes ; then
12254                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
12255 echo "configure:12256: checking for lwp_create in -llwp" >&5
12256 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
12257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12258   echo $ac_n "(cached) $ac_c" 1>&6
12259 else
12260   ac_save_LIBS="$LIBS"
12261 LIBS="-llwp  $LIBS"
12262 cat > conftest.$ac_ext <<EOF
12263 #line 12264 "configure"
12264 #include "confdefs.h"
12265 /* Override any gcc2 internal prototype to avoid an error.  */
12266 /* We use char because int might match the return type of a gcc2
12267     builtin and then its argument prototype would still apply.  */
12268 char lwp_create();
12269
12270 int main() {
12271 lwp_create()
12272 ; return 0; }
12273 EOF
12274 if { (eval echo configure:12275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12275   rm -rf conftest*
12276   eval "ac_cv_lib_$ac_lib_var=yes"
12277 else
12278   echo "configure: failed program was:" >&5
12279   cat conftest.$ac_ext >&5
12280   rm -rf conftest*
12281   eval "ac_cv_lib_$ac_lib_var=no"
12282 fi
12283 rm -f conftest*
12284 LIBS="$ac_save_LIBS"
12285
12286 fi
12287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12288   echo "$ac_t""yes" 1>&6
12289   have_lwp=yes
12290 else
12291   echo "$ac_t""no" 1>&6
12292 have_lwp=no
12293 fi
12294
12295
12296                 if test $have_lwp = yes ; then
12297                         cat >> confdefs.h <<\EOF
12298 #define HAVE_LWP 1
12299 EOF
12300
12301                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
12302                         ol_link_threads=lwp
12303
12304                         if test $ol_with_yielding_select = auto ; then
12305                                 ol_with_yielding_select=no
12306                         fi
12307                 fi
12308         fi
12309 fi
12310
12311 if test $ol_with_yielding_select = yes ; then
12312         cat >> confdefs.h <<\EOF
12313 #define HAVE_YIELDING_SELECT 1
12314 EOF
12315
12316 fi
12317
12318 if test $ol_with_threads = manual ; then
12319                 ol_link_threads=yes
12320
12321         echo "configure: warning: thread defines and link options must be set manually" 1>&2
12322
12323         for ac_hdr in pthread.h sched.h
12324 do
12325 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12326 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12327 echo "configure:12328: checking for $ac_hdr" >&5
12328 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12329   echo $ac_n "(cached) $ac_c" 1>&6
12330 else
12331   cat > conftest.$ac_ext <<EOF
12332 #line 12333 "configure"
12333 #include "confdefs.h"
12334 #include <$ac_hdr>
12335 EOF
12336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12337 { (eval echo configure:12338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12339 if test -z "$ac_err"; then
12340   rm -rf conftest*
12341   eval "ac_cv_header_$ac_safe=yes"
12342 else
12343   echo "$ac_err" >&5
12344   echo "configure: failed program was:" >&5
12345   cat conftest.$ac_ext >&5
12346   rm -rf conftest*
12347   eval "ac_cv_header_$ac_safe=no"
12348 fi
12349 rm -f conftest*
12350 fi
12351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12352   echo "$ac_t""yes" 1>&6
12353     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12354   cat >> confdefs.h <<EOF
12355 #define $ac_tr_hdr 1
12356 EOF
12357  
12358 else
12359   echo "$ac_t""no" 1>&6
12360 fi
12361 done
12362
12363         for ac_func in sched_yield pthread_yield
12364 do
12365 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12366 echo "configure:12367: checking for $ac_func" >&5
12367 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12368   echo $ac_n "(cached) $ac_c" 1>&6
12369 else
12370   cat > conftest.$ac_ext <<EOF
12371 #line 12372 "configure"
12372 #include "confdefs.h"
12373 /* System header to define __stub macros and hopefully few prototypes,
12374     which can conflict with char $ac_func(); below.  */
12375 #include <assert.h>
12376 /* Override any gcc2 internal prototype to avoid an error.  */
12377 /* We use char because int might match the return type of a gcc2
12378     builtin and then its argument prototype would still apply.  */
12379 char $ac_func();
12380 char (*f)();
12381
12382 int main() {
12383
12384 /* The GNU C library defines this for functions which it implements
12385     to always fail with ENOSYS.  Some functions are actually named
12386     something starting with __ and the normal name is an alias.  */
12387 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12388 choke me
12389 #else
12390 f = $ac_func;
12391 #endif
12392
12393 ; return 0; }
12394 EOF
12395 if { (eval echo configure:12396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12396   rm -rf conftest*
12397   eval "ac_cv_func_$ac_func=yes"
12398 else
12399   echo "configure: failed program was:" >&5
12400   cat conftest.$ac_ext >&5
12401   rm -rf conftest*
12402   eval "ac_cv_func_$ac_func=no"
12403 fi
12404 rm -f conftest*
12405 fi
12406
12407 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12408   echo "$ac_t""yes" 1>&6
12409     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12410   cat >> confdefs.h <<EOF
12411 #define $ac_tr_func 1
12412 EOF
12413  
12414 else
12415   echo "$ac_t""no" 1>&6
12416 fi
12417 done
12418
12419         
12420         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
12421 echo "configure:12422: checking for LinuxThreads pthread.h" >&5
12422 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
12423   echo $ac_n "(cached) $ac_c" 1>&6
12424 else
12425   cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 #include <pthread.h>
12429 EOF
12430 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12431   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
12432   rm -rf conftest*
12433   ol_cv_header_linux_threads=yes
12434 else
12435   rm -rf conftest*
12436   ol_cv_header_linux_threads=no
12437 fi
12438 rm -f conftest*
12439
12440                 
12441 fi
12442
12443 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12444         if test $ol_cv_header_linux_threads = yes; then
12445                 cat >> confdefs.h <<\EOF
12446 #define HAVE_LINUX_THREADS 1
12447 EOF
12448
12449         fi
12450
12451
12452         for ac_hdr in mach/cthreads.h
12453 do
12454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12456 echo "configure:12457: checking for $ac_hdr" >&5
12457 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12458   echo $ac_n "(cached) $ac_c" 1>&6
12459 else
12460   cat > conftest.$ac_ext <<EOF
12461 #line 12462 "configure"
12462 #include "confdefs.h"
12463 #include <$ac_hdr>
12464 EOF
12465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12466 { (eval echo configure:12467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12468 if test -z "$ac_err"; then
12469   rm -rf conftest*
12470   eval "ac_cv_header_$ac_safe=yes"
12471 else
12472   echo "$ac_err" >&5
12473   echo "configure: failed program was:" >&5
12474   cat conftest.$ac_ext >&5
12475   rm -rf conftest*
12476   eval "ac_cv_header_$ac_safe=no"
12477 fi
12478 rm -f conftest*
12479 fi
12480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12481   echo "$ac_t""yes" 1>&6
12482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12483   cat >> confdefs.h <<EOF
12484 #define $ac_tr_hdr 1
12485 EOF
12486  
12487 else
12488   echo "$ac_t""no" 1>&6
12489 fi
12490 done
12491
12492         for ac_hdr in lwp/lwp.h
12493 do
12494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12496 echo "configure:12497: checking for $ac_hdr" >&5
12497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12498   echo $ac_n "(cached) $ac_c" 1>&6
12499 else
12500   cat > conftest.$ac_ext <<EOF
12501 #line 12502 "configure"
12502 #include "confdefs.h"
12503 #include <$ac_hdr>
12504 EOF
12505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12506 { (eval echo configure:12507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12508 if test -z "$ac_err"; then
12509   rm -rf conftest*
12510   eval "ac_cv_header_$ac_safe=yes"
12511 else
12512   echo "$ac_err" >&5
12513   echo "configure: failed program was:" >&5
12514   cat conftest.$ac_ext >&5
12515   rm -rf conftest*
12516   eval "ac_cv_header_$ac_safe=no"
12517 fi
12518 rm -f conftest*
12519 fi
12520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12521   echo "$ac_t""yes" 1>&6
12522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12523   cat >> confdefs.h <<EOF
12524 #define $ac_tr_hdr 1
12525 EOF
12526  
12527 else
12528   echo "$ac_t""no" 1>&6
12529 fi
12530 done
12531
12532         for ac_hdr in thread.h synch.h
12533 do
12534 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12535 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12536 echo "configure:12537: checking for $ac_hdr" >&5
12537 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12538   echo $ac_n "(cached) $ac_c" 1>&6
12539 else
12540   cat > conftest.$ac_ext <<EOF
12541 #line 12542 "configure"
12542 #include "confdefs.h"
12543 #include <$ac_hdr>
12544 EOF
12545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12546 { (eval echo configure:12547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12548 if test -z "$ac_err"; then
12549   rm -rf conftest*
12550   eval "ac_cv_header_$ac_safe=yes"
12551 else
12552   echo "$ac_err" >&5
12553   echo "configure: failed program was:" >&5
12554   cat conftest.$ac_ext >&5
12555   rm -rf conftest*
12556   eval "ac_cv_header_$ac_safe=no"
12557 fi
12558 rm -f conftest*
12559 fi
12560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12561   echo "$ac_t""yes" 1>&6
12562     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12563   cat >> confdefs.h <<EOF
12564 #define $ac_tr_hdr 1
12565 EOF
12566  
12567 else
12568   echo "$ac_t""no" 1>&6
12569 fi
12570 done
12571
12572 fi
12573
12574 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
12575                         cat >> confdefs.h <<\EOF
12576 #define REENTRANT 1
12577 EOF
12578
12579         cat >> confdefs.h <<\EOF
12580 #define _REENTRANT 1
12581 EOF
12582
12583         cat >> confdefs.h <<\EOF
12584 #define THREAD_SAFE 1
12585 EOF
12586
12587         cat >> confdefs.h <<\EOF
12588 #define _THREAD_SAFE 1
12589 EOF
12590
12591         cat >> confdefs.h <<\EOF
12592 #define THREADSAFE 1
12593 EOF
12594
12595         cat >> confdefs.h <<\EOF
12596 #define _THREADSAFE 1
12597 EOF
12598
12599         cat >> confdefs.h <<\EOF
12600 #define _SGI_MP_SOURCE 1
12601 EOF
12602
12603
12604                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
12605 echo "configure:12606: checking for thread specific errno" >&5
12606 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
12607   echo $ac_n "(cached) $ac_c" 1>&6
12608 else
12609   
12610                 cat > conftest.$ac_ext <<EOF
12611 #line 12612 "configure"
12612 #include "confdefs.h"
12613 #include <errno.h>
12614 int main() {
12615 errno = 0;
12616 ; return 0; }
12617 EOF
12618 if { (eval echo configure:12619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12619   rm -rf conftest*
12620   ol_cv_errno_thread_specific=yes
12621 else
12622   echo "configure: failed program was:" >&5
12623   cat conftest.$ac_ext >&5
12624   rm -rf conftest*
12625   ol_cv_errno_thread_specific=no
12626 fi
12627 rm -f conftest*
12628         
12629 fi
12630
12631 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
12632
12633                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
12634 echo "configure:12635: checking for thread specific h_errno" >&5
12635 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
12636   echo $ac_n "(cached) $ac_c" 1>&6
12637 else
12638   
12639                 cat > conftest.$ac_ext <<EOF
12640 #line 12641 "configure"
12641 #include "confdefs.h"
12642 #include <netdb.h>
12643 int main() {
12644 h_errno = 0;
12645 ; return 0; }
12646 EOF
12647 if { (eval echo configure:12648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12648   rm -rf conftest*
12649   ol_cv_h_errno_thread_specific=yes
12650 else
12651   echo "configure: failed program was:" >&5
12652   cat conftest.$ac_ext >&5
12653   rm -rf conftest*
12654   ol_cv_h_errno_thread_specific=no
12655 fi
12656 rm -f conftest*
12657         
12658 fi
12659
12660 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
12661
12662         if test $ol_cv_errno_thread_specific != yes \
12663                 -o $ol_cv_h_errno_thread_specific != yes ; then
12664                 LIBS="$LTHREAD_LIBS $LIBS"
12665                 LTHREAD_LIBS=""
12666         fi
12667
12668 fi  
12669
12670 if test $ol_link_threads = no ; then
12671         if test $ol_with_threads = yes ; then
12672                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
12673         fi
12674
12675         if test $ol_with_threads = auto ; then
12676                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
12677                 ol_with_threads=no
12678         fi
12679
12680         cat >> confdefs.h <<\EOF
12681 #define NO_THREADS 1
12682 EOF
12683
12684         LTHREAD_LIBS=""
12685 fi
12686
12687 if test $ol_link_threads != no ; then
12688         cat >> confdefs.h <<\EOF
12689 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
12690 EOF
12691
12692 fi
12693
12694 ol_link_ldbm=no 
12695
12696 if test $ol_with_ldbm_api = auto \
12697         -o $ol_with_ldbm_api = berkeley \
12698         -o $ol_with_ldbm_api = bcompat ; then
12699
12700         if test $ol_with_ldbm_api = bcompat; then \
12701                 ol_cv_berkeley_db=no
12702 for ac_hdr in db_185.h db.h
12703 do
12704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12705 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12706 echo "configure:12707: checking for $ac_hdr" >&5
12707 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12708   echo $ac_n "(cached) $ac_c" 1>&6
12709 else
12710   cat > conftest.$ac_ext <<EOF
12711 #line 12712 "configure"
12712 #include "confdefs.h"
12713 #include <$ac_hdr>
12714 EOF
12715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12716 { (eval echo configure:12717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12718 if test -z "$ac_err"; then
12719   rm -rf conftest*
12720   eval "ac_cv_header_$ac_safe=yes"
12721 else
12722   echo "$ac_err" >&5
12723   echo "configure: failed program was:" >&5
12724   cat conftest.$ac_ext >&5
12725   rm -rf conftest*
12726   eval "ac_cv_header_$ac_safe=no"
12727 fi
12728 rm -f conftest*
12729 fi
12730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12731   echo "$ac_t""yes" 1>&6
12732     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12733   cat >> confdefs.h <<EOF
12734 #define $ac_tr_hdr 1
12735 EOF
12736  
12737 else
12738   echo "$ac_t""no" 1>&6
12739 fi
12740 done
12741
12742 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
12743         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
12744 echo "configure:12745: checking if Berkeley DB header compatibility" >&5
12745 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
12746   echo $ac_n "(cached) $ac_c" 1>&6
12747 else
12748   
12749                 cat > conftest.$ac_ext <<EOF
12750 #line 12751 "configure"
12751 #include "confdefs.h"
12752
12753 #if HAVE_DB_185_H
12754 #       include <db_185.h>
12755 #else
12756 #       include <db.h>
12757 #endif
12758
12759  /* this check could be improved */
12760 #ifndef DB_VERSION_MAJOR
12761 #       define DB_VERSION_MAJOR 1
12762 #endif
12763
12764 #if DB_VERSION_MAJOR == 1 
12765         __db_version_1
12766 #endif
12767
12768 EOF
12769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12770   egrep "__db_version_1" >/dev/null 2>&1; then
12771   rm -rf conftest*
12772   ol_cv_header_db1=yes
12773 else
12774   rm -rf conftest*
12775   ol_cv_header_db1=no
12776 fi
12777 rm -f conftest*
12778
12779 fi
12780
12781 echo "$ac_t""$ol_cv_header_db1" 1>&6
12782
12783         if test $ol_cv_header_db1 = yes ; then
12784                 ol_cv_lib_db=no
12785 if test $ol_cv_lib_db = no ; then
12786         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12787 echo "configure:12788: checking for Berkeley DB link (default)" >&5
12788 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12789   echo $ac_n "(cached) $ac_c" 1>&6
12790 else
12791   
12792         ol_DB_LIB=
12793         ol_LIBS=$LIBS
12794         LIBS="$ol_DB_LIB $LIBS"
12795
12796         cat > conftest.$ac_ext <<EOF
12797 #line 12798 "configure"
12798 #include "confdefs.h"
12799
12800 #ifdef HAVE_DB_185_H
12801 # include <db_185.h>
12802 #else
12803 # include <db.h>
12804 #endif
12805
12806 #ifndef DB_VERSION_MAJOR
12807 # define DB_VERSION_MAJOR 1
12808 #endif
12809
12810 #ifndef NULL
12811 #define NULL ((void*)0)
12812 #endif
12813
12814 int main() {
12815
12816 #if DB_VERSION_MAJOR > 1
12817         {
12818                 char *version;
12819                 int major, minor, patch;
12820
12821                 version = db_version( &major, &minor, &patch );
12822
12823                 if( major != DB_VERSION_MAJOR ||
12824                         minor < DB_VERSION_MINOR )
12825                 {
12826                         printf("Berkeley DB version mismatch\n"
12827                                 "\texpected: %s\n\tgot: %s\n",
12828                                 DB_VERSION_STRING, version);
12829                         return 1;
12830                 }
12831         }
12832 #endif
12833
12834 #if DB_VERSION_MAJOR > 2
12835         db_env_create( NULL, 0 );
12836 #elif DB_VERSION_MAJOR > 1
12837         db_appexit( NULL );
12838 #else
12839         (void) dbopen( NULL, 0, 0, 0, NULL);
12840 #endif
12841
12842 ; return 0; }
12843 EOF
12844 if { (eval echo configure:12845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12845   rm -rf conftest*
12846   ol_cv_db_none=yes
12847 else
12848   echo "configure: failed program was:" >&5
12849   cat conftest.$ac_ext >&5
12850   rm -rf conftest*
12851   ol_cv_db_none=no
12852 fi
12853 rm -f conftest*
12854
12855         LIBS="$ol_LIBS"
12856
12857 fi
12858
12859 echo "$ac_t""$ol_cv_db_none" 1>&6
12860
12861         if test $ol_cv_db_none = yes ; then
12862                 ol_cv_lib_db=yes
12863         fi
12864 fi
12865
12866 if test $ol_cv_lib_db = no ; then
12867         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12868 echo "configure:12869: checking for Berkeley DB link (-ldb)" >&5
12869 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12870   echo $ac_n "(cached) $ac_c" 1>&6
12871 else
12872   
12873         ol_DB_LIB=-ldb
12874         ol_LIBS=$LIBS
12875         LIBS="$ol_DB_LIB $LIBS"
12876
12877         cat > conftest.$ac_ext <<EOF
12878 #line 12879 "configure"
12879 #include "confdefs.h"
12880
12881 #ifdef HAVE_DB_185_H
12882 # include <db_185.h>
12883 #else
12884 # include <db.h>
12885 #endif
12886
12887 #ifndef DB_VERSION_MAJOR
12888 # define DB_VERSION_MAJOR 1
12889 #endif
12890
12891 #ifndef NULL
12892 #define NULL ((void*)0)
12893 #endif
12894
12895 int main() {
12896
12897 #if DB_VERSION_MAJOR > 1
12898         {
12899                 char *version;
12900                 int major, minor, patch;
12901
12902                 version = db_version( &major, &minor, &patch );
12903
12904                 if( major != DB_VERSION_MAJOR ||
12905                         minor < DB_VERSION_MINOR )
12906                 {
12907                         printf("Berkeley DB version mismatch\n"
12908                                 "\texpected: %s\n\tgot: %s\n",
12909                                 DB_VERSION_STRING, version);
12910                         return 1;
12911                 }
12912         }
12913 #endif
12914
12915 #if DB_VERSION_MAJOR > 2
12916         db_env_create( NULL, 0 );
12917 #elif DB_VERSION_MAJOR > 1
12918         db_appexit( NULL );
12919 #else
12920         (void) dbopen( NULL, 0, 0, 0, NULL);
12921 #endif
12922
12923 ; return 0; }
12924 EOF
12925 if { (eval echo configure:12926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12926   rm -rf conftest*
12927   ol_cv_db_db=yes
12928 else
12929   echo "configure: failed program was:" >&5
12930   cat conftest.$ac_ext >&5
12931   rm -rf conftest*
12932   ol_cv_db_db=no
12933 fi
12934 rm -f conftest*
12935
12936         LIBS="$ol_LIBS"
12937
12938 fi
12939
12940 echo "$ac_t""$ol_cv_db_db" 1>&6
12941
12942         if test $ol_cv_db_db = yes ; then
12943                 ol_cv_lib_db=-ldb
12944         fi
12945 fi
12946
12947 if test $ol_cv_lib_db = no ; then
12948         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12949 echo "configure:12950: checking for Berkeley DB link (-ldb3)" >&5
12950 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12951   echo $ac_n "(cached) $ac_c" 1>&6
12952 else
12953   
12954         ol_DB_LIB=-ldb3
12955         ol_LIBS=$LIBS
12956         LIBS="$ol_DB_LIB $LIBS"
12957
12958         cat > conftest.$ac_ext <<EOF
12959 #line 12960 "configure"
12960 #include "confdefs.h"
12961
12962 #ifdef HAVE_DB_185_H
12963 # include <db_185.h>
12964 #else
12965 # include <db.h>
12966 #endif
12967
12968 #ifndef DB_VERSION_MAJOR
12969 # define DB_VERSION_MAJOR 1
12970 #endif
12971
12972 #ifndef NULL
12973 #define NULL ((void*)0)
12974 #endif
12975
12976 int main() {
12977
12978 #if DB_VERSION_MAJOR > 1
12979         {
12980                 char *version;
12981                 int major, minor, patch;
12982
12983                 version = db_version( &major, &minor, &patch );
12984
12985                 if( major != DB_VERSION_MAJOR ||
12986                         minor < DB_VERSION_MINOR )
12987                 {
12988                         printf("Berkeley DB version mismatch\n"
12989                                 "\texpected: %s\n\tgot: %s\n",
12990                                 DB_VERSION_STRING, version);
12991                         return 1;
12992                 }
12993         }
12994 #endif
12995
12996 #if DB_VERSION_MAJOR > 2
12997         db_env_create( NULL, 0 );
12998 #elif DB_VERSION_MAJOR > 1
12999         db_appexit( NULL );
13000 #else
13001         (void) dbopen( NULL, 0, 0, 0, NULL);
13002 #endif
13003
13004 ; return 0; }
13005 EOF
13006 if { (eval echo configure:13007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13007   rm -rf conftest*
13008   ol_cv_db_db3=yes
13009 else
13010   echo "configure: failed program was:" >&5
13011   cat conftest.$ac_ext >&5
13012   rm -rf conftest*
13013   ol_cv_db_db3=no
13014 fi
13015 rm -f conftest*
13016
13017         LIBS="$ol_LIBS"
13018
13019 fi
13020
13021 echo "$ac_t""$ol_cv_db_db3" 1>&6
13022
13023         if test $ol_cv_db_db3 = yes ; then
13024                 ol_cv_lib_db=-ldb3
13025         fi
13026 fi
13027
13028 if test $ol_cv_lib_db = no ; then
13029         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13030 echo "configure:13031: checking for Berkeley DB link (-ldb2)" >&5
13031 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13032   echo $ac_n "(cached) $ac_c" 1>&6
13033 else
13034   
13035         ol_DB_LIB=-ldb2
13036         ol_LIBS=$LIBS
13037         LIBS="$ol_DB_LIB $LIBS"
13038
13039         cat > conftest.$ac_ext <<EOF
13040 #line 13041 "configure"
13041 #include "confdefs.h"
13042
13043 #ifdef HAVE_DB_185_H
13044 # include <db_185.h>
13045 #else
13046 # include <db.h>
13047 #endif
13048
13049 #ifndef DB_VERSION_MAJOR
13050 # define DB_VERSION_MAJOR 1
13051 #endif
13052
13053 #ifndef NULL
13054 #define NULL ((void*)0)
13055 #endif
13056
13057 int main() {
13058
13059 #if DB_VERSION_MAJOR > 1
13060         {
13061                 char *version;
13062                 int major, minor, patch;
13063
13064                 version = db_version( &major, &minor, &patch );
13065
13066                 if( major != DB_VERSION_MAJOR ||
13067                         minor < DB_VERSION_MINOR )
13068                 {
13069                         printf("Berkeley DB version mismatch\n"
13070                                 "\texpected: %s\n\tgot: %s\n",
13071                                 DB_VERSION_STRING, version);
13072                         return 1;
13073                 }
13074         }
13075 #endif
13076
13077 #if DB_VERSION_MAJOR > 2
13078         db_env_create( NULL, 0 );
13079 #elif DB_VERSION_MAJOR > 1
13080         db_appexit( NULL );
13081 #else
13082         (void) dbopen( NULL, 0, 0, 0, NULL);
13083 #endif
13084
13085 ; return 0; }
13086 EOF
13087 if { (eval echo configure:13088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13088   rm -rf conftest*
13089   ol_cv_db_db2=yes
13090 else
13091   echo "configure: failed program was:" >&5
13092   cat conftest.$ac_ext >&5
13093   rm -rf conftest*
13094   ol_cv_db_db2=no
13095 fi
13096 rm -f conftest*
13097
13098         LIBS="$ol_LIBS"
13099
13100 fi
13101
13102 echo "$ac_t""$ol_cv_db_db2" 1>&6
13103
13104         if test $ol_cv_db_db2 = yes ; then
13105                 ol_cv_lib_db=-ldb2
13106         fi
13107 fi
13108
13109 if test $ol_cv_lib_db = no ; then
13110         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13111 echo "configure:13112: checking for Berkeley DB link (-ldb1)" >&5
13112 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13113   echo $ac_n "(cached) $ac_c" 1>&6
13114 else
13115   
13116         ol_DB_LIB=-ldb1
13117         ol_LIBS=$LIBS
13118         LIBS="$ol_DB_LIB $LIBS"
13119
13120         cat > conftest.$ac_ext <<EOF
13121 #line 13122 "configure"
13122 #include "confdefs.h"
13123
13124 #ifdef HAVE_DB_185_H
13125 # include <db_185.h>
13126 #else
13127 # include <db.h>
13128 #endif
13129
13130 #ifndef DB_VERSION_MAJOR
13131 # define DB_VERSION_MAJOR 1
13132 #endif
13133
13134 #ifndef NULL
13135 #define NULL ((void*)0)
13136 #endif
13137
13138 int main() {
13139
13140 #if DB_VERSION_MAJOR > 1
13141         {
13142                 char *version;
13143                 int major, minor, patch;
13144
13145                 version = db_version( &major, &minor, &patch );
13146
13147                 if( major != DB_VERSION_MAJOR ||
13148                         minor < DB_VERSION_MINOR )
13149                 {
13150                         printf("Berkeley DB version mismatch\n"
13151                                 "\texpected: %s\n\tgot: %s\n",
13152                                 DB_VERSION_STRING, version);
13153                         return 1;
13154                 }
13155         }
13156 #endif
13157
13158 #if DB_VERSION_MAJOR > 2
13159         db_env_create( NULL, 0 );
13160 #elif DB_VERSION_MAJOR > 1
13161         db_appexit( NULL );
13162 #else
13163         (void) dbopen( NULL, 0, 0, 0, NULL);
13164 #endif
13165
13166 ; return 0; }
13167 EOF
13168 if { (eval echo configure:13169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13169   rm -rf conftest*
13170   ol_cv_db_db1=yes
13171 else
13172   echo "configure: failed program was:" >&5
13173   cat conftest.$ac_ext >&5
13174   rm -rf conftest*
13175   ol_cv_db_db1=no
13176 fi
13177 rm -f conftest*
13178
13179         LIBS="$ol_LIBS"
13180
13181 fi
13182
13183 echo "$ac_t""$ol_cv_db_db1" 1>&6
13184
13185         if test $ol_cv_db_db1 = yes ; then
13186                 ol_cv_lib_db=-ldb1
13187         fi
13188 fi
13189
13190
13191                 if test "$ol_cv_lib_db" != no ; then
13192                         ol_cv_berkeley_db=yes
13193                 fi
13194         fi
13195 fi
13196
13197         else
13198                 ol_cv_berkeley_db=no
13199 for ac_hdr in db.h
13200 do
13201 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13202 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13203 echo "configure:13204: checking for $ac_hdr" >&5
13204 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13205   echo $ac_n "(cached) $ac_c" 1>&6
13206 else
13207   cat > conftest.$ac_ext <<EOF
13208 #line 13209 "configure"
13209 #include "confdefs.h"
13210 #include <$ac_hdr>
13211 EOF
13212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13213 { (eval echo configure:13214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13215 if test -z "$ac_err"; then
13216   rm -rf conftest*
13217   eval "ac_cv_header_$ac_safe=yes"
13218 else
13219   echo "$ac_err" >&5
13220   echo "configure: failed program was:" >&5
13221   cat conftest.$ac_ext >&5
13222   rm -rf conftest*
13223   eval "ac_cv_header_$ac_safe=no"
13224 fi
13225 rm -f conftest*
13226 fi
13227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13228   echo "$ac_t""yes" 1>&6
13229     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13230   cat >> confdefs.h <<EOF
13231 #define $ac_tr_hdr 1
13232 EOF
13233  
13234 else
13235   echo "$ac_t""no" 1>&6
13236 fi
13237 done
13238
13239 if test $ac_cv_header_db_h = yes; then
13240         ol_cv_lib_db=no
13241 if test $ol_cv_lib_db = no ; then
13242         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
13243 echo "configure:13244: checking for Berkeley DB link (default)" >&5
13244 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
13245   echo $ac_n "(cached) $ac_c" 1>&6
13246 else
13247   
13248         ol_DB_LIB=
13249         ol_LIBS=$LIBS
13250         LIBS="$ol_DB_LIB $LIBS"
13251
13252         cat > conftest.$ac_ext <<EOF
13253 #line 13254 "configure"
13254 #include "confdefs.h"
13255
13256 #ifdef HAVE_DB_185_H
13257 # include <db_185.h>
13258 #else
13259 # include <db.h>
13260 #endif
13261
13262 #ifndef DB_VERSION_MAJOR
13263 # define DB_VERSION_MAJOR 1
13264 #endif
13265
13266 #ifndef NULL
13267 #define NULL ((void*)0)
13268 #endif
13269
13270 int main() {
13271
13272 #if DB_VERSION_MAJOR > 1
13273         {
13274                 char *version;
13275                 int major, minor, patch;
13276
13277                 version = db_version( &major, &minor, &patch );
13278
13279                 if( major != DB_VERSION_MAJOR ||
13280                         minor < DB_VERSION_MINOR )
13281                 {
13282                         printf("Berkeley DB version mismatch\n"
13283                                 "\texpected: %s\n\tgot: %s\n",
13284                                 DB_VERSION_STRING, version);
13285                         return 1;
13286                 }
13287         }
13288 #endif
13289
13290 #if DB_VERSION_MAJOR > 2
13291         db_env_create( NULL, 0 );
13292 #elif DB_VERSION_MAJOR > 1
13293         db_appexit( NULL );
13294 #else
13295         (void) dbopen( NULL, 0, 0, 0, NULL);
13296 #endif
13297
13298 ; return 0; }
13299 EOF
13300 if { (eval echo configure:13301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13301   rm -rf conftest*
13302   ol_cv_db_none=yes
13303 else
13304   echo "configure: failed program was:" >&5
13305   cat conftest.$ac_ext >&5
13306   rm -rf conftest*
13307   ol_cv_db_none=no
13308 fi
13309 rm -f conftest*
13310
13311         LIBS="$ol_LIBS"
13312
13313 fi
13314
13315 echo "$ac_t""$ol_cv_db_none" 1>&6
13316
13317         if test $ol_cv_db_none = yes ; then
13318                 ol_cv_lib_db=yes
13319         fi
13320 fi
13321
13322 if test $ol_cv_lib_db = no ; then
13323         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13324 echo "configure:13325: checking for Berkeley DB link (-ldb)" >&5
13325 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13326   echo $ac_n "(cached) $ac_c" 1>&6
13327 else
13328   
13329         ol_DB_LIB=-ldb
13330         ol_LIBS=$LIBS
13331         LIBS="$ol_DB_LIB $LIBS"
13332
13333         cat > conftest.$ac_ext <<EOF
13334 #line 13335 "configure"
13335 #include "confdefs.h"
13336
13337 #ifdef HAVE_DB_185_H
13338 # include <db_185.h>
13339 #else
13340 # include <db.h>
13341 #endif
13342
13343 #ifndef DB_VERSION_MAJOR
13344 # define DB_VERSION_MAJOR 1
13345 #endif
13346
13347 #ifndef NULL
13348 #define NULL ((void*)0)
13349 #endif
13350
13351 int main() {
13352
13353 #if DB_VERSION_MAJOR > 1
13354         {
13355                 char *version;
13356                 int major, minor, patch;
13357
13358                 version = db_version( &major, &minor, &patch );
13359
13360                 if( major != DB_VERSION_MAJOR ||
13361                         minor < DB_VERSION_MINOR )
13362                 {
13363                         printf("Berkeley DB version mismatch\n"
13364                                 "\texpected: %s\n\tgot: %s\n",
13365                                 DB_VERSION_STRING, version);
13366                         return 1;
13367                 }
13368         }
13369 #endif
13370
13371 #if DB_VERSION_MAJOR > 2
13372         db_env_create( NULL, 0 );
13373 #elif DB_VERSION_MAJOR > 1
13374         db_appexit( NULL );
13375 #else
13376         (void) dbopen( NULL, 0, 0, 0, NULL);
13377 #endif
13378
13379 ; return 0; }
13380 EOF
13381 if { (eval echo configure:13382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13382   rm -rf conftest*
13383   ol_cv_db_db=yes
13384 else
13385   echo "configure: failed program was:" >&5
13386   cat conftest.$ac_ext >&5
13387   rm -rf conftest*
13388   ol_cv_db_db=no
13389 fi
13390 rm -f conftest*
13391
13392         LIBS="$ol_LIBS"
13393
13394 fi
13395
13396 echo "$ac_t""$ol_cv_db_db" 1>&6
13397
13398         if test $ol_cv_db_db = yes ; then
13399                 ol_cv_lib_db=-ldb
13400         fi
13401 fi
13402
13403 if test $ol_cv_lib_db = no ; then
13404         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13405 echo "configure:13406: checking for Berkeley DB link (-ldb3)" >&5
13406 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13407   echo $ac_n "(cached) $ac_c" 1>&6
13408 else
13409   
13410         ol_DB_LIB=-ldb3
13411         ol_LIBS=$LIBS
13412         LIBS="$ol_DB_LIB $LIBS"
13413
13414         cat > conftest.$ac_ext <<EOF
13415 #line 13416 "configure"
13416 #include "confdefs.h"
13417
13418 #ifdef HAVE_DB_185_H
13419 # include <db_185.h>
13420 #else
13421 # include <db.h>
13422 #endif
13423
13424 #ifndef DB_VERSION_MAJOR
13425 # define DB_VERSION_MAJOR 1
13426 #endif
13427
13428 #ifndef NULL
13429 #define NULL ((void*)0)
13430 #endif
13431
13432 int main() {
13433
13434 #if DB_VERSION_MAJOR > 1
13435         {
13436                 char *version;
13437                 int major, minor, patch;
13438
13439                 version = db_version( &major, &minor, &patch );
13440
13441                 if( major != DB_VERSION_MAJOR ||
13442                         minor < DB_VERSION_MINOR )
13443                 {
13444                         printf("Berkeley DB version mismatch\n"
13445                                 "\texpected: %s\n\tgot: %s\n",
13446                                 DB_VERSION_STRING, version);
13447                         return 1;
13448                 }
13449         }
13450 #endif
13451
13452 #if DB_VERSION_MAJOR > 2
13453         db_env_create( NULL, 0 );
13454 #elif DB_VERSION_MAJOR > 1
13455         db_appexit( NULL );
13456 #else
13457         (void) dbopen( NULL, 0, 0, 0, NULL);
13458 #endif
13459
13460 ; return 0; }
13461 EOF
13462 if { (eval echo configure:13463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13463   rm -rf conftest*
13464   ol_cv_db_db3=yes
13465 else
13466   echo "configure: failed program was:" >&5
13467   cat conftest.$ac_ext >&5
13468   rm -rf conftest*
13469   ol_cv_db_db3=no
13470 fi
13471 rm -f conftest*
13472
13473         LIBS="$ol_LIBS"
13474
13475 fi
13476
13477 echo "$ac_t""$ol_cv_db_db3" 1>&6
13478
13479         if test $ol_cv_db_db3 = yes ; then
13480                 ol_cv_lib_db=-ldb3
13481         fi
13482 fi
13483
13484 if test $ol_cv_lib_db = no ; then
13485         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13486 echo "configure:13487: checking for Berkeley DB link (-ldb2)" >&5
13487 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13488   echo $ac_n "(cached) $ac_c" 1>&6
13489 else
13490   
13491         ol_DB_LIB=-ldb2
13492         ol_LIBS=$LIBS
13493         LIBS="$ol_DB_LIB $LIBS"
13494
13495         cat > conftest.$ac_ext <<EOF
13496 #line 13497 "configure"
13497 #include "confdefs.h"
13498
13499 #ifdef HAVE_DB_185_H
13500 # include <db_185.h>
13501 #else
13502 # include <db.h>
13503 #endif
13504
13505 #ifndef DB_VERSION_MAJOR
13506 # define DB_VERSION_MAJOR 1
13507 #endif
13508
13509 #ifndef NULL
13510 #define NULL ((void*)0)
13511 #endif
13512
13513 int main() {
13514
13515 #if DB_VERSION_MAJOR > 1
13516         {
13517                 char *version;
13518                 int major, minor, patch;
13519
13520                 version = db_version( &major, &minor, &patch );
13521
13522                 if( major != DB_VERSION_MAJOR ||
13523                         minor < DB_VERSION_MINOR )
13524                 {
13525                         printf("Berkeley DB version mismatch\n"
13526                                 "\texpected: %s\n\tgot: %s\n",
13527                                 DB_VERSION_STRING, version);
13528                         return 1;
13529                 }
13530         }
13531 #endif
13532
13533 #if DB_VERSION_MAJOR > 2
13534         db_env_create( NULL, 0 );
13535 #elif DB_VERSION_MAJOR > 1
13536         db_appexit( NULL );
13537 #else
13538         (void) dbopen( NULL, 0, 0, 0, NULL);
13539 #endif
13540
13541 ; return 0; }
13542 EOF
13543 if { (eval echo configure:13544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13544   rm -rf conftest*
13545   ol_cv_db_db2=yes
13546 else
13547   echo "configure: failed program was:" >&5
13548   cat conftest.$ac_ext >&5
13549   rm -rf conftest*
13550   ol_cv_db_db2=no
13551 fi
13552 rm -f conftest*
13553
13554         LIBS="$ol_LIBS"
13555
13556 fi
13557
13558 echo "$ac_t""$ol_cv_db_db2" 1>&6
13559
13560         if test $ol_cv_db_db2 = yes ; then
13561                 ol_cv_lib_db=-ldb2
13562         fi
13563 fi
13564
13565 if test $ol_cv_lib_db = no ; then
13566         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13567 echo "configure:13568: checking for Berkeley DB link (-ldb1)" >&5
13568 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13569   echo $ac_n "(cached) $ac_c" 1>&6
13570 else
13571   
13572         ol_DB_LIB=-ldb1
13573         ol_LIBS=$LIBS
13574         LIBS="$ol_DB_LIB $LIBS"
13575
13576         cat > conftest.$ac_ext <<EOF
13577 #line 13578 "configure"
13578 #include "confdefs.h"
13579
13580 #ifdef HAVE_DB_185_H
13581 # include <db_185.h>
13582 #else
13583 # include <db.h>
13584 #endif
13585
13586 #ifndef DB_VERSION_MAJOR
13587 # define DB_VERSION_MAJOR 1
13588 #endif
13589
13590 #ifndef NULL
13591 #define NULL ((void*)0)
13592 #endif
13593
13594 int main() {
13595
13596 #if DB_VERSION_MAJOR > 1
13597         {
13598                 char *version;
13599                 int major, minor, patch;
13600
13601                 version = db_version( &major, &minor, &patch );
13602
13603                 if( major != DB_VERSION_MAJOR ||
13604                         minor < DB_VERSION_MINOR )
13605                 {
13606                         printf("Berkeley DB version mismatch\n"
13607                                 "\texpected: %s\n\tgot: %s\n",
13608                                 DB_VERSION_STRING, version);
13609                         return 1;
13610                 }
13611         }
13612 #endif
13613
13614 #if DB_VERSION_MAJOR > 2
13615         db_env_create( NULL, 0 );
13616 #elif DB_VERSION_MAJOR > 1
13617         db_appexit( NULL );
13618 #else
13619         (void) dbopen( NULL, 0, 0, 0, NULL);
13620 #endif
13621
13622 ; return 0; }
13623 EOF
13624 if { (eval echo configure:13625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13625   rm -rf conftest*
13626   ol_cv_db_db1=yes
13627 else
13628   echo "configure: failed program was:" >&5
13629   cat conftest.$ac_ext >&5
13630   rm -rf conftest*
13631   ol_cv_db_db1=no
13632 fi
13633 rm -f conftest*
13634
13635         LIBS="$ol_LIBS"
13636
13637 fi
13638
13639 echo "$ac_t""$ol_cv_db_db1" 1>&6
13640
13641         if test $ol_cv_db_db1 = yes ; then
13642                 ol_cv_lib_db=-ldb1
13643         fi
13644 fi
13645
13646
13647         if test "$ol_cv_lib_db" != no ; then
13648                 ol_cv_berkeley_db=yes
13649                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
13650 echo "configure:13651: checking for Berkeley DB thread support" >&5
13651 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
13652   echo $ac_n "(cached) $ac_c" 1>&6
13653 else
13654   
13655         ol_LIBS="$LIBS"
13656         if test $ol_cv_lib_db != yes ; then
13657                 LIBS="$ol_cv_lib_db"
13658         fi
13659
13660         if test "$cross_compiling" = yes; then
13661   ol_cv_berkeley_db_thread=cross
13662 else
13663   cat > conftest.$ac_ext <<EOF
13664 #line 13665 "configure"
13665 #include "confdefs.h"
13666
13667 #ifdef HAVE_DB_185_H
13668         choke me;
13669 #else
13670 #include <db.h>
13671 #endif
13672 #ifndef NULL
13673 #define NULL ((void *)0)
13674 #endif
13675 main()
13676 {
13677         int rc;
13678         u_int32_t flags = DB_CREATE |
13679 #ifdef DB_PRIVATE
13680                 DB_PRIVATE |
13681 #endif
13682                 DB_THREAD;
13683
13684 #if DB_VERSION_MAJOR > 2
13685         DB_ENV *env = NULL;
13686
13687         rc = db_env_create( &env, 0 );
13688
13689         flags |= DB_INIT_MPOOL;
13690 #ifdef DB_MPOOL_PRIVATE
13691         flags |= DB_MPOOL_PRIVATE;
13692 #endif
13693
13694         if( rc ) {
13695                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13696                 return rc;
13697         }
13698
13699 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
13700         rc = env->open( env, NULL, flags, 0 );
13701 #else
13702         rc = env->open( env, NULL, NULL, flags, 0 );
13703 #endif
13704
13705         if ( rc == 0 ) {
13706                 rc = env->close( env, 0 );
13707         }
13708
13709         if( rc ) {
13710                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13711                 return rc;
13712         }
13713
13714 #else
13715         DB_ENV env;
13716         memset( &env, '\0', sizeof(env) );
13717
13718         rc = db_appinit( NULL, NULL, &env, flags );
13719
13720         if( rc == 0 ) {
13721                 db_appexit( &env );
13722         }
13723
13724         unlink("__db_mpool.share");
13725         unlink("__db_lock.share");
13726 #endif
13727
13728         return rc;
13729 }
13730 EOF
13731 if { (eval echo configure:13732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13732 then
13733   ol_cv_berkeley_db_thread=yes
13734 else
13735   echo "configure: failed program was:" >&5
13736   cat conftest.$ac_ext >&5
13737   rm -fr conftest*
13738   ol_cv_berkeley_db_thread=no
13739 fi
13740 rm -fr conftest*
13741 fi
13742
13743
13744         LIBS="$ol_LIBS"
13745
13746         if test $ol_cv_berkeley_db_thread != no ; then
13747                 cat >> confdefs.h <<\EOF
13748 #define HAVE_BERKELEY_DB_THREAD 1
13749 EOF
13750
13751         fi
13752
13753 fi
13754
13755 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
13756         fi
13757 fi
13758
13759         fi
13760
13761         if test $ol_cv_berkeley_db != no ; then
13762                 cat >> confdefs.h <<\EOF
13763 #define HAVE_BERKELEY_DB 1
13764 EOF
13765
13766
13767                 ol_link_ldbm=berkeley
13768                 ol_with_ldbm_api=berkeley
13769
13770                 if test $ol_with_ldbm_type = hash ; then
13771                         cat >> confdefs.h <<\EOF
13772 #define LDBM_USE_DBHASH 1
13773 EOF
13774
13775                 else
13776                         cat >> confdefs.h <<\EOF
13777 #define LDBM_USE_DBBTREE 1
13778 EOF
13779
13780                 fi
13781
13782                                                 if test $ol_cv_lib_db != yes ; then
13783                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
13784                 fi
13785         fi
13786 fi
13787
13788 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
13789         { echo "configure: error: BerkeleyDB not availabl" 1>&2; exit 1; }
13790 elif test $ol_enable_bdb != no -a $ol_link_ldbm != no ; then
13791         ol_enable_bdb=yes
13792 fi
13793
13794 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
13795         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
13796         ol_with_ldbm_api=none
13797 fi
13798
13799 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
13800         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
13801 echo "configure:13802: checking for MDBM library" >&5
13802 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
13803   echo $ac_n "(cached) $ac_c" 1>&6
13804 else
13805         ol_LIBS="$LIBS"
13806         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
13807 echo "configure:13808: checking for mdbm_set_chain" >&5
13808 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
13809   echo $ac_n "(cached) $ac_c" 1>&6
13810 else
13811   cat > conftest.$ac_ext <<EOF
13812 #line 13813 "configure"
13813 #include "confdefs.h"
13814 /* System header to define __stub macros and hopefully few prototypes,
13815     which can conflict with char mdbm_set_chain(); below.  */
13816 #include <assert.h>
13817 /* Override any gcc2 internal prototype to avoid an error.  */
13818 /* We use char because int might match the return type of a gcc2
13819     builtin and then its argument prototype would still apply.  */
13820 char mdbm_set_chain();
13821 char (*f)();
13822
13823 int main() {
13824
13825 /* The GNU C library defines this for functions which it implements
13826     to always fail with ENOSYS.  Some functions are actually named
13827     something starting with __ and the normal name is an alias.  */
13828 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
13829 choke me
13830 #else
13831 f = mdbm_set_chain;
13832 #endif
13833
13834 ; return 0; }
13835 EOF
13836 if { (eval echo configure:13837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13837   rm -rf conftest*
13838   eval "ac_cv_func_mdbm_set_chain=yes"
13839 else
13840   echo "configure: failed program was:" >&5
13841   cat conftest.$ac_ext >&5
13842   rm -rf conftest*
13843   eval "ac_cv_func_mdbm_set_chain=no"
13844 fi
13845 rm -f conftest*
13846 fi
13847
13848 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
13849   echo "$ac_t""yes" 1>&6
13850   ol_cv_lib_mdbm=yes
13851 else
13852   echo "$ac_t""no" 1>&6
13853
13854                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
13855 echo "configure:13856: checking for mdbm_set_chain in -lmdbm" >&5
13856 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
13857 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13858   echo $ac_n "(cached) $ac_c" 1>&6
13859 else
13860   ac_save_LIBS="$LIBS"
13861 LIBS="-lmdbm  $LIBS"
13862 cat > conftest.$ac_ext <<EOF
13863 #line 13864 "configure"
13864 #include "confdefs.h"
13865 /* Override any gcc2 internal prototype to avoid an error.  */
13866 /* We use char because int might match the return type of a gcc2
13867     builtin and then its argument prototype would still apply.  */
13868 char mdbm_set_chain();
13869
13870 int main() {
13871 mdbm_set_chain()
13872 ; return 0; }
13873 EOF
13874 if { (eval echo configure:13875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13875   rm -rf conftest*
13876   eval "ac_cv_lib_$ac_lib_var=yes"
13877 else
13878   echo "configure: failed program was:" >&5
13879   cat conftest.$ac_ext >&5
13880   rm -rf conftest*
13881   eval "ac_cv_lib_$ac_lib_var=no"
13882 fi
13883 rm -f conftest*
13884 LIBS="$ac_save_LIBS"
13885
13886 fi
13887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13888   echo "$ac_t""yes" 1>&6
13889   ol_cv_lib_mdbm=-lmdbm
13890 else
13891   echo "$ac_t""no" 1>&6
13892 ol_cv_lib_mdbm=no
13893 fi
13894
13895         
13896 fi
13897
13898         LIBS="$ol_LIBS"
13899
13900 fi
13901
13902 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
13903
13904
13905  for ac_hdr in mdbm.h
13906 do
13907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13908 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13909 echo "configure:13910: checking for $ac_hdr" >&5
13910 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13911   echo $ac_n "(cached) $ac_c" 1>&6
13912 else
13913   cat > conftest.$ac_ext <<EOF
13914 #line 13915 "configure"
13915 #include "confdefs.h"
13916 #include <$ac_hdr>
13917 EOF
13918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13919 { (eval echo configure:13920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13921 if test -z "$ac_err"; then
13922   rm -rf conftest*
13923   eval "ac_cv_header_$ac_safe=yes"
13924 else
13925   echo "$ac_err" >&5
13926   echo "configure: failed program was:" >&5
13927   cat conftest.$ac_ext >&5
13928   rm -rf conftest*
13929   eval "ac_cv_header_$ac_safe=no"
13930 fi
13931 rm -f conftest*
13932 fi
13933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13934   echo "$ac_t""yes" 1>&6
13935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13936   cat >> confdefs.h <<EOF
13937 #define $ac_tr_hdr 1
13938 EOF
13939  
13940 else
13941   echo "$ac_t""no" 1>&6
13942 fi
13943 done
13944
13945  echo $ac_n "checking for db""... $ac_c" 1>&6
13946 echo "configure:13947: checking for db" >&5
13947 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
13948   echo $ac_n "(cached) $ac_c" 1>&6
13949 else
13950   
13951         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
13952                 ol_cv_mdbm=no
13953         else
13954                 ol_cv_mdbm=yes
13955         fi
13956
13957 fi
13958
13959 echo "$ac_t""$ol_cv_mdbm" 1>&6
13960  if test $ol_cv_mdbm = yes ; then
13961         cat >> confdefs.h <<\EOF
13962 #define HAVE_MDBM 1
13963 EOF
13964
13965  fi
13966
13967
13968         if test $ol_cv_mdbm = yes ; then
13969                 ol_link_ldbm=mdbm
13970                 ol_with_ldbm_api=mdbm
13971                 if test $ol_cv_lib_mdbm != yes ; then
13972                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
13973                 fi
13974         fi
13975 fi
13976
13977 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
13978         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
13979 echo "configure:13980: checking for GDBM library" >&5
13980 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
13981   echo $ac_n "(cached) $ac_c" 1>&6
13982 else
13983         ol_LIBS="$LIBS"
13984         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
13985 echo "configure:13986: checking for gdbm_open" >&5
13986 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
13987   echo $ac_n "(cached) $ac_c" 1>&6
13988 else
13989   cat > conftest.$ac_ext <<EOF
13990 #line 13991 "configure"
13991 #include "confdefs.h"
13992 /* System header to define __stub macros and hopefully few prototypes,
13993     which can conflict with char gdbm_open(); below.  */
13994 #include <assert.h>
13995 /* Override any gcc2 internal prototype to avoid an error.  */
13996 /* We use char because int might match the return type of a gcc2
13997     builtin and then its argument prototype would still apply.  */
13998 char gdbm_open();
13999 char (*f)();
14000
14001 int main() {
14002
14003 /* The GNU C library defines this for functions which it implements
14004     to always fail with ENOSYS.  Some functions are actually named
14005     something starting with __ and the normal name is an alias.  */
14006 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
14007 choke me
14008 #else
14009 f = gdbm_open;
14010 #endif
14011
14012 ; return 0; }
14013 EOF
14014 if { (eval echo configure:14015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14015   rm -rf conftest*
14016   eval "ac_cv_func_gdbm_open=yes"
14017 else
14018   echo "configure: failed program was:" >&5
14019   cat conftest.$ac_ext >&5
14020   rm -rf conftest*
14021   eval "ac_cv_func_gdbm_open=no"
14022 fi
14023 rm -f conftest*
14024 fi
14025
14026 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
14027   echo "$ac_t""yes" 1>&6
14028   ol_cv_lib_gdbm=yes
14029 else
14030   echo "$ac_t""no" 1>&6
14031
14032                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
14033 echo "configure:14034: checking for gdbm_open in -lgdbm" >&5
14034 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
14035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14036   echo $ac_n "(cached) $ac_c" 1>&6
14037 else
14038   ac_save_LIBS="$LIBS"
14039 LIBS="-lgdbm  $LIBS"
14040 cat > conftest.$ac_ext <<EOF
14041 #line 14042 "configure"
14042 #include "confdefs.h"
14043 /* Override any gcc2 internal prototype to avoid an error.  */
14044 /* We use char because int might match the return type of a gcc2
14045     builtin and then its argument prototype would still apply.  */
14046 char gdbm_open();
14047
14048 int main() {
14049 gdbm_open()
14050 ; return 0; }
14051 EOF
14052 if { (eval echo configure:14053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14053   rm -rf conftest*
14054   eval "ac_cv_lib_$ac_lib_var=yes"
14055 else
14056   echo "configure: failed program was:" >&5
14057   cat conftest.$ac_ext >&5
14058   rm -rf conftest*
14059   eval "ac_cv_lib_$ac_lib_var=no"
14060 fi
14061 rm -f conftest*
14062 LIBS="$ac_save_LIBS"
14063
14064 fi
14065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14066   echo "$ac_t""yes" 1>&6
14067   ol_cv_lib_gdbm=-lgdbm
14068 else
14069   echo "$ac_t""no" 1>&6
14070 ol_cv_lib_gdbm=no
14071 fi
14072
14073         
14074 fi
14075
14076         LIBS="$ol_LIBS"
14077
14078 fi
14079
14080 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
14081
14082
14083  for ac_hdr in gdbm.h
14084 do
14085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14087 echo "configure:14088: checking for $ac_hdr" >&5
14088 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14089   echo $ac_n "(cached) $ac_c" 1>&6
14090 else
14091   cat > conftest.$ac_ext <<EOF
14092 #line 14093 "configure"
14093 #include "confdefs.h"
14094 #include <$ac_hdr>
14095 EOF
14096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14097 { (eval echo configure:14098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14099 if test -z "$ac_err"; then
14100   rm -rf conftest*
14101   eval "ac_cv_header_$ac_safe=yes"
14102 else
14103   echo "$ac_err" >&5
14104   echo "configure: failed program was:" >&5
14105   cat conftest.$ac_ext >&5
14106   rm -rf conftest*
14107   eval "ac_cv_header_$ac_safe=no"
14108 fi
14109 rm -f conftest*
14110 fi
14111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14112   echo "$ac_t""yes" 1>&6
14113     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14114   cat >> confdefs.h <<EOF
14115 #define $ac_tr_hdr 1
14116 EOF
14117  
14118 else
14119   echo "$ac_t""no" 1>&6
14120 fi
14121 done
14122
14123  echo $ac_n "checking for db""... $ac_c" 1>&6
14124 echo "configure:14125: checking for db" >&5
14125 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
14126   echo $ac_n "(cached) $ac_c" 1>&6
14127 else
14128   
14129         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
14130                 ol_cv_gdbm=no
14131         else
14132                 ol_cv_gdbm=yes
14133         fi
14134
14135 fi
14136
14137 echo "$ac_t""$ol_cv_gdbm" 1>&6
14138  if test $ol_cv_gdbm = yes ; then
14139         cat >> confdefs.h <<\EOF
14140 #define HAVE_GDBM 1
14141 EOF
14142
14143  fi
14144
14145
14146         if test $ol_cv_gdbm = yes ; then
14147                 ol_link_ldbm=gdbm
14148                 ol_with_ldbm_api=gdbm
14149
14150                 if test $ol_cv_lib_gdbm != yes ; then
14151                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
14152                 fi
14153         fi
14154 fi
14155
14156 if test $ol_with_ldbm_api = ndbm ; then
14157         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
14158 echo "configure:14159: checking for NDBM library" >&5
14159 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
14160   echo $ac_n "(cached) $ac_c" 1>&6
14161 else
14162         ol_LIBS="$LIBS"
14163         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14164 echo "configure:14165: checking for dbm_open" >&5
14165 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
14166   echo $ac_n "(cached) $ac_c" 1>&6
14167 else
14168   cat > conftest.$ac_ext <<EOF
14169 #line 14170 "configure"
14170 #include "confdefs.h"
14171 /* System header to define __stub macros and hopefully few prototypes,
14172     which can conflict with char dbm_open(); below.  */
14173 #include <assert.h>
14174 /* Override any gcc2 internal prototype to avoid an error.  */
14175 /* We use char because int might match the return type of a gcc2
14176     builtin and then its argument prototype would still apply.  */
14177 char dbm_open();
14178 char (*f)();
14179
14180 int main() {
14181
14182 /* The GNU C library defines this for functions which it implements
14183     to always fail with ENOSYS.  Some functions are actually named
14184     something starting with __ and the normal name is an alias.  */
14185 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14186 choke me
14187 #else
14188 f = dbm_open;
14189 #endif
14190
14191 ; return 0; }
14192 EOF
14193 if { (eval echo configure:14194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14194   rm -rf conftest*
14195   eval "ac_cv_func_dbm_open=yes"
14196 else
14197   echo "configure: failed program was:" >&5
14198   cat conftest.$ac_ext >&5
14199   rm -rf conftest*
14200   eval "ac_cv_func_dbm_open=no"
14201 fi
14202 rm -f conftest*
14203 fi
14204
14205 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14206   echo "$ac_t""yes" 1>&6
14207   ol_cv_lib_ndbm=yes
14208 else
14209   echo "$ac_t""no" 1>&6
14210
14211                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
14212 echo "configure:14213: checking for dbm_open in -lndbm" >&5
14213 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14215   echo $ac_n "(cached) $ac_c" 1>&6
14216 else
14217   ac_save_LIBS="$LIBS"
14218 LIBS="-lndbm  $LIBS"
14219 cat > conftest.$ac_ext <<EOF
14220 #line 14221 "configure"
14221 #include "confdefs.h"
14222 /* Override any gcc2 internal prototype to avoid an error.  */
14223 /* We use char because int might match the return type of a gcc2
14224     builtin and then its argument prototype would still apply.  */
14225 char dbm_open();
14226
14227 int main() {
14228 dbm_open()
14229 ; return 0; }
14230 EOF
14231 if { (eval echo configure:14232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14232   rm -rf conftest*
14233   eval "ac_cv_lib_$ac_lib_var=yes"
14234 else
14235   echo "configure: failed program was:" >&5
14236   cat conftest.$ac_ext >&5
14237   rm -rf conftest*
14238   eval "ac_cv_lib_$ac_lib_var=no"
14239 fi
14240 rm -f conftest*
14241 LIBS="$ac_save_LIBS"
14242
14243 fi
14244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14245   echo "$ac_t""yes" 1>&6
14246   ol_cv_lib_ndbm=-lndbm
14247 else
14248   echo "$ac_t""no" 1>&6
14249
14250                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14251 echo "configure:14252: checking for dbm_open in -ldbm" >&5
14252 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14254   echo $ac_n "(cached) $ac_c" 1>&6
14255 else
14256   ac_save_LIBS="$LIBS"
14257 LIBS="-ldbm  $LIBS"
14258 cat > conftest.$ac_ext <<EOF
14259 #line 14260 "configure"
14260 #include "confdefs.h"
14261 /* Override any gcc2 internal prototype to avoid an error.  */
14262 /* We use char because int might match the return type of a gcc2
14263     builtin and then its argument prototype would still apply.  */
14264 char dbm_open();
14265
14266 int main() {
14267 dbm_open()
14268 ; return 0; }
14269 EOF
14270 if { (eval echo configure:14271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14271   rm -rf conftest*
14272   eval "ac_cv_lib_$ac_lib_var=yes"
14273 else
14274   echo "configure: failed program was:" >&5
14275   cat conftest.$ac_ext >&5
14276   rm -rf conftest*
14277   eval "ac_cv_lib_$ac_lib_var=no"
14278 fi
14279 rm -f conftest*
14280 LIBS="$ac_save_LIBS"
14281
14282 fi
14283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14284   echo "$ac_t""yes" 1>&6
14285   ol_cv_lib_ndbm=-ldbm
14286 else
14287   echo "$ac_t""no" 1>&6
14288 ol_cv_lib_ndbm=no
14289 fi
14290                 
14291 fi
14292
14293         
14294 fi
14295
14296         LIBS="$ol_LIBS"
14297
14298 fi
14299
14300 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
14301
14302
14303  for ac_hdr in ndbm.h
14304 do
14305 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14306 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14307 echo "configure:14308: checking for $ac_hdr" >&5
14308 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14309   echo $ac_n "(cached) $ac_c" 1>&6
14310 else
14311   cat > conftest.$ac_ext <<EOF
14312 #line 14313 "configure"
14313 #include "confdefs.h"
14314 #include <$ac_hdr>
14315 EOF
14316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14317 { (eval echo configure:14318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14319 if test -z "$ac_err"; then
14320   rm -rf conftest*
14321   eval "ac_cv_header_$ac_safe=yes"
14322 else
14323   echo "$ac_err" >&5
14324   echo "configure: failed program was:" >&5
14325   cat conftest.$ac_ext >&5
14326   rm -rf conftest*
14327   eval "ac_cv_header_$ac_safe=no"
14328 fi
14329 rm -f conftest*
14330 fi
14331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14332   echo "$ac_t""yes" 1>&6
14333     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14334   cat >> confdefs.h <<EOF
14335 #define $ac_tr_hdr 1
14336 EOF
14337  
14338 else
14339   echo "$ac_t""no" 1>&6
14340 fi
14341 done
14342
14343  echo $ac_n "checking for db""... $ac_c" 1>&6
14344 echo "configure:14345: checking for db" >&5
14345 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
14346   echo $ac_n "(cached) $ac_c" 1>&6
14347 else
14348   
14349         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
14350                 ol_cv_ndbm=no
14351         else
14352                 ol_cv_ndbm=yes
14353         fi
14354
14355 fi
14356
14357 echo "$ac_t""$ol_cv_ndbm" 1>&6
14358  if test $ol_cv_ndbm = yes ; then
14359         cat >> confdefs.h <<\EOF
14360 #define HAVE_NDBM 1
14361 EOF
14362
14363  fi
14364
14365
14366         if test $ol_cv_ndbm = yes ; then
14367                 ol_link_ldbm=ndbm
14368                 ol_with_ldbm_api=ndbm
14369
14370                 if test $ol_cv_lib_ndbm != yes ; then
14371                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
14372                 fi
14373         fi
14374 fi
14375
14376 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
14377         echo "configure: warning: could not find suitable LDBM backend" 1>&2
14378         if test $ol_enable_ldbm = yes ; then
14379                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
14380         fi
14381
14382         echo "configure: warning: disabling LDBM" 1>&2
14383         ol_enable_ldbm=no
14384 fi
14385
14386 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
14387         LINK_BINS_DYNAMIC="yes"
14388 else
14389         LINK_BINS_DYNAMIC="no"
14390 fi
14391
14392 if test $ol_enable_wrappers != no ; then
14393         for ac_hdr in tcpd.h
14394 do
14395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14397 echo "configure:14398: checking for $ac_hdr" >&5
14398 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14399   echo $ac_n "(cached) $ac_c" 1>&6
14400 else
14401   cat > conftest.$ac_ext <<EOF
14402 #line 14403 "configure"
14403 #include "confdefs.h"
14404 #include <$ac_hdr>
14405 EOF
14406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14407 { (eval echo configure:14408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14409 if test -z "$ac_err"; then
14410   rm -rf conftest*
14411   eval "ac_cv_header_$ac_safe=yes"
14412 else
14413   echo "$ac_err" >&5
14414   echo "configure: failed program was:" >&5
14415   cat conftest.$ac_ext >&5
14416   rm -rf conftest*
14417   eval "ac_cv_header_$ac_safe=no"
14418 fi
14419 rm -f conftest*
14420 fi
14421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14422   echo "$ac_t""yes" 1>&6
14423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14424   cat >> confdefs.h <<EOF
14425 #define $ac_tr_hdr 1
14426 EOF
14427  
14428 else
14429   echo "$ac_t""no" 1>&6
14430 fi
14431 done
14432
14433
14434         if test $ac_cv_header_tcpd_h != yes ; then
14435                 have_wrappers=no
14436         else
14437                 cat > conftest.$ac_ext <<EOF
14438 #line 14439 "configure"
14439 #include "confdefs.h"
14440
14441 int allow_severity = 0;
14442 int deny_severity  = 0;
14443                 
14444 int main() {
14445 hosts_access()
14446 ; return 0; }
14447 EOF
14448 if { (eval echo configure:14449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14449   rm -rf conftest*
14450   have_wrappers=yes
14451 else
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -rf conftest*
14455   have_wrappers=no
14456 fi
14457 rm -f conftest*
14458         fi
14459
14460         if test $have_wrappers = yes ; then
14461                 cat >> confdefs.h <<\EOF
14462 #define HAVE_TCPD 1
14463 EOF
14464
14465                 WRAP_LIBS="-lwrap"
14466
14467                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
14468 echo "configure:14469: checking for main in -lnsl" >&5
14469 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
14470 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14471   echo $ac_n "(cached) $ac_c" 1>&6
14472 else
14473   ac_save_LIBS="$LIBS"
14474 LIBS="-lnsl  $LIBS"
14475 cat > conftest.$ac_ext <<EOF
14476 #line 14477 "configure"
14477 #include "confdefs.h"
14478
14479 int main() {
14480 main()
14481 ; return 0; }
14482 EOF
14483 if { (eval echo configure:14484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14484   rm -rf conftest*
14485   eval "ac_cv_lib_$ac_lib_var=yes"
14486 else
14487   echo "configure: failed program was:" >&5
14488   cat conftest.$ac_ext >&5
14489   rm -rf conftest*
14490   eval "ac_cv_lib_$ac_lib_var=no"
14491 fi
14492 rm -f conftest*
14493 LIBS="$ac_save_LIBS"
14494
14495 fi
14496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14497   echo "$ac_t""yes" 1>&6
14498     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14500   cat >> confdefs.h <<EOF
14501 #define $ac_tr_lib 1
14502 EOF
14503
14504   LIBS="-lnsl $LIBS"
14505
14506 else
14507   echo "$ac_t""no" 1>&6
14508 fi
14509
14510         else
14511                 echo "configure: warning: could not find -lwrap" 1>&2
14512                 if test $ol_enable_wrappers = yes ; then
14513                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
14514                 fi
14515
14516                 echo "configure: warning: disabling wrappers support" 1>&2
14517                 ol_enable_wrappers=no
14518                 WRAP_LIBS=""
14519         fi
14520 fi
14521
14522 if test $ol_enable_syslog != no ; then
14523         echo $ac_n "checking for openlog""... $ac_c" 1>&6
14524 echo "configure:14525: checking for openlog" >&5
14525 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
14526   echo $ac_n "(cached) $ac_c" 1>&6
14527 else
14528   cat > conftest.$ac_ext <<EOF
14529 #line 14530 "configure"
14530 #include "confdefs.h"
14531 /* System header to define __stub macros and hopefully few prototypes,
14532     which can conflict with char openlog(); below.  */
14533 #include <assert.h>
14534 /* Override any gcc2 internal prototype to avoid an error.  */
14535 /* We use char because int might match the return type of a gcc2
14536     builtin and then its argument prototype would still apply.  */
14537 char openlog();
14538 char (*f)();
14539
14540 int main() {
14541
14542 /* The GNU C library defines this for functions which it implements
14543     to always fail with ENOSYS.  Some functions are actually named
14544     something starting with __ and the normal name is an alias.  */
14545 #if defined (__stub_openlog) || defined (__stub___openlog)
14546 choke me
14547 #else
14548 f = openlog;
14549 #endif
14550
14551 ; return 0; }
14552 EOF
14553 if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14554   rm -rf conftest*
14555   eval "ac_cv_func_openlog=yes"
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -rf conftest*
14560   eval "ac_cv_func_openlog=no"
14561 fi
14562 rm -f conftest*
14563 fi
14564
14565 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
14566   echo "$ac_t""yes" 1>&6
14567   :
14568 else
14569   echo "$ac_t""no" 1>&6
14570 fi
14571
14572         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
14573                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
14574         fi
14575         ol_enable_syslog=$ac_cv_func_openlog
14576 fi
14577
14578
14579 ol_link_sql=no
14580 if test $ol_enable_sql != no ; then
14581         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
14582 echo "configure:14583: checking for SQLDriverConnect in -liodbc" >&5
14583 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14585   echo $ac_n "(cached) $ac_c" 1>&6
14586 else
14587   ac_save_LIBS="$LIBS"
14588 LIBS="-liodbc  $LIBS"
14589 cat > conftest.$ac_ext <<EOF
14590 #line 14591 "configure"
14591 #include "confdefs.h"
14592 /* Override any gcc2 internal prototype to avoid an error.  */
14593 /* We use char because int might match the return type of a gcc2
14594     builtin and then its argument prototype would still apply.  */
14595 char SQLDriverConnect();
14596
14597 int main() {
14598 SQLDriverConnect()
14599 ; return 0; }
14600 EOF
14601 if { (eval echo configure:14602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14602   rm -rf conftest*
14603   eval "ac_cv_lib_$ac_lib_var=yes"
14604 else
14605   echo "configure: failed program was:" >&5
14606   cat conftest.$ac_ext >&5
14607   rm -rf conftest*
14608   eval "ac_cv_lib_$ac_lib_var=no"
14609 fi
14610 rm -f conftest*
14611 LIBS="$ac_save_LIBS"
14612
14613 fi
14614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14615   echo "$ac_t""yes" 1>&6
14616   have_iodbc=yes
14617 else
14618   echo "$ac_t""no" 1>&6
14619 have_iodbc=no
14620 fi
14621
14622         if test $have_iodbc = yes ; then
14623                 ol_link_sql="-liodbc"
14624         else
14625                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
14626 echo "configure:14627: checking for SQLDriverConnect in -lodbc" >&5
14627 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14629   echo $ac_n "(cached) $ac_c" 1>&6
14630 else
14631   ac_save_LIBS="$LIBS"
14632 LIBS="-lodbc  $LIBS"
14633 cat > conftest.$ac_ext <<EOF
14634 #line 14635 "configure"
14635 #include "confdefs.h"
14636 /* Override any gcc2 internal prototype to avoid an error.  */
14637 /* We use char because int might match the return type of a gcc2
14638     builtin and then its argument prototype would still apply.  */
14639 char SQLDriverConnect();
14640
14641 int main() {
14642 SQLDriverConnect()
14643 ; return 0; }
14644 EOF
14645 if { (eval echo configure:14646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14646   rm -rf conftest*
14647   eval "ac_cv_lib_$ac_lib_var=yes"
14648 else
14649   echo "configure: failed program was:" >&5
14650   cat conftest.$ac_ext >&5
14651   rm -rf conftest*
14652   eval "ac_cv_lib_$ac_lib_var=no"
14653 fi
14654 rm -f conftest*
14655 LIBS="$ac_save_LIBS"
14656
14657 fi
14658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14659   echo "$ac_t""yes" 1>&6
14660   have_odbc=yes
14661 else
14662   echo "$ac_t""no" 1>&6
14663 have_odbc=no
14664 fi
14665
14666                 if test $have_odbc = yes ; then
14667                         ol_link_sql="-lodbc"
14668                 fi
14669         fi
14670
14671         if test $ol_link_sql != no ; then
14672                 SLAPD_SQL_LIBS="$ol_link_sql"
14673
14674         elif test $ol_enable_sql != auto ; then
14675                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
14676         fi
14677 fi
14678
14679 if test $ol_enable_tcl != no ; then
14680         for ac_hdr in tcl.h
14681 do
14682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14683 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14684 echo "configure:14685: checking for $ac_hdr" >&5
14685 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14686   echo $ac_n "(cached) $ac_c" 1>&6
14687 else
14688   cat > conftest.$ac_ext <<EOF
14689 #line 14690 "configure"
14690 #include "confdefs.h"
14691 #include <$ac_hdr>
14692 EOF
14693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14694 { (eval echo configure:14695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14696 if test -z "$ac_err"; then
14697   rm -rf conftest*
14698   eval "ac_cv_header_$ac_safe=yes"
14699 else
14700   echo "$ac_err" >&5
14701   echo "configure: failed program was:" >&5
14702   cat conftest.$ac_ext >&5
14703   rm -rf conftest*
14704   eval "ac_cv_header_$ac_safe=no"
14705 fi
14706 rm -f conftest*
14707 fi
14708 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14709   echo "$ac_t""yes" 1>&6
14710     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14711   cat >> confdefs.h <<EOF
14712 #define $ac_tr_hdr 1
14713 EOF
14714  
14715 else
14716   echo "$ac_t""no" 1>&6
14717 fi
14718 done
14719
14720
14721         if test $ac_cv_header_tcl_h != yes ; then
14722                 have_tcl=no
14723         else
14724                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
14725                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
14726 echo "configure:14727: checking for main in -l$lib" >&5
14727 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
14728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14729   echo $ac_n "(cached) $ac_c" 1>&6
14730 else
14731   ac_save_LIBS="$LIBS"
14732 LIBS="-l$lib  $LIBS"
14733 cat > conftest.$ac_ext <<EOF
14734 #line 14735 "configure"
14735 #include "confdefs.h"
14736
14737 int main() {
14738 main()
14739 ; return 0; }
14740 EOF
14741 if { (eval echo configure:14742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14742   rm -rf conftest*
14743   eval "ac_cv_lib_$ac_lib_var=yes"
14744 else
14745   echo "configure: failed program was:" >&5
14746   cat conftest.$ac_ext >&5
14747   rm -rf conftest*
14748   eval "ac_cv_lib_$ac_lib_var=no"
14749 fi
14750 rm -f conftest*
14751 LIBS="$ac_save_LIBS"
14752
14753 fi
14754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14755   echo "$ac_t""yes" 1>&6
14756   have_tcl=yes
14757                            if test x"$ol_with_tcl_module" = "xstatic" ; then
14758                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
14759                            else
14760                                MOD_TCL_LIB="-l${lib}"
14761                            fi;break
14762 else
14763   echo "$ac_t""no" 1>&6
14764 have_tcl=no
14765 fi
14766
14767                 done
14768         fi
14769
14770         if test $have_tcl != yes ; then
14771                 echo "configure: warning: could not find -ltcl" 1>&2
14772                 if test $ol_enable_tcl = yes ; then
14773                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
14774                 fi
14775
14776                 ol_enable_tcl=no
14777         fi
14778 fi
14779
14780 ol_link_termcap=no
14781 for ac_hdr in termcap.h ncurses.h
14782 do
14783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14785 echo "configure:14786: checking for $ac_hdr" >&5
14786 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14787   echo $ac_n "(cached) $ac_c" 1>&6
14788 else
14789   cat > conftest.$ac_ext <<EOF
14790 #line 14791 "configure"
14791 #include "confdefs.h"
14792 #include <$ac_hdr>
14793 EOF
14794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14795 { (eval echo configure:14796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14797 if test -z "$ac_err"; then
14798   rm -rf conftest*
14799   eval "ac_cv_header_$ac_safe=yes"
14800 else
14801   echo "$ac_err" >&5
14802   echo "configure: failed program was:" >&5
14803   cat conftest.$ac_ext >&5
14804   rm -rf conftest*
14805   eval "ac_cv_header_$ac_safe=no"
14806 fi
14807 rm -f conftest*
14808 fi
14809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14810   echo "$ac_t""yes" 1>&6
14811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14812   cat >> confdefs.h <<EOF
14813 #define $ac_tr_hdr 1
14814 EOF
14815  
14816 else
14817   echo "$ac_t""no" 1>&6
14818 fi
14819 done
14820
14821
14822 if test $ol_link_termcap = no ; then
14823         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
14824 echo "configure:14825: checking for tputs in -ltermcap" >&5
14825 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
14826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14827   echo $ac_n "(cached) $ac_c" 1>&6
14828 else
14829   ac_save_LIBS="$LIBS"
14830 LIBS="-ltermcap  $LIBS"
14831 cat > conftest.$ac_ext <<EOF
14832 #line 14833 "configure"
14833 #include "confdefs.h"
14834 /* Override any gcc2 internal prototype to avoid an error.  */
14835 /* We use char because int might match the return type of a gcc2
14836     builtin and then its argument prototype would still apply.  */
14837 char tputs();
14838
14839 int main() {
14840 tputs()
14841 ; return 0; }
14842 EOF
14843 if { (eval echo configure:14844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14844   rm -rf conftest*
14845   eval "ac_cv_lib_$ac_lib_var=yes"
14846 else
14847   echo "configure: failed program was:" >&5
14848   cat conftest.$ac_ext >&5
14849   rm -rf conftest*
14850   eval "ac_cv_lib_$ac_lib_var=no"
14851 fi
14852 rm -f conftest*
14853 LIBS="$ac_save_LIBS"
14854
14855 fi
14856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14857   echo "$ac_t""yes" 1>&6
14858   have_termcap=yes
14859 else
14860   echo "$ac_t""no" 1>&6
14861 have_termcap=no
14862 fi
14863
14864         if test $have_termcap = yes ; then
14865                 cat >> confdefs.h <<\EOF
14866 #define HAVE_TERMCAP 1
14867 EOF
14868
14869                 ol_link_termcap=yes
14870                 TERMCAP_LIBS=-ltermcap
14871         fi
14872 fi
14873
14874 if test $ol_link_termcap = no ; then
14875         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
14876 echo "configure:14877: checking for initscr in -lncurses" >&5
14877 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
14878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14879   echo $ac_n "(cached) $ac_c" 1>&6
14880 else
14881   ac_save_LIBS="$LIBS"
14882 LIBS="-lncurses  $LIBS"
14883 cat > conftest.$ac_ext <<EOF
14884 #line 14885 "configure"
14885 #include "confdefs.h"
14886 /* Override any gcc2 internal prototype to avoid an error.  */
14887 /* We use char because int might match the return type of a gcc2
14888     builtin and then its argument prototype would still apply.  */
14889 char initscr();
14890
14891 int main() {
14892 initscr()
14893 ; return 0; }
14894 EOF
14895 if { (eval echo configure:14896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14896   rm -rf conftest*
14897   eval "ac_cv_lib_$ac_lib_var=yes"
14898 else
14899   echo "configure: failed program was:" >&5
14900   cat conftest.$ac_ext >&5
14901   rm -rf conftest*
14902   eval "ac_cv_lib_$ac_lib_var=no"
14903 fi
14904 rm -f conftest*
14905 LIBS="$ac_save_LIBS"
14906
14907 fi
14908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14909   echo "$ac_t""yes" 1>&6
14910   have_ncurses=yes
14911 else
14912   echo "$ac_t""no" 1>&6
14913 have_ncurses=no
14914 fi
14915
14916         if test $have_ncurses = yes ; then
14917                 cat >> confdefs.h <<\EOF
14918 #define HAVE_NCURSES 1
14919 EOF
14920
14921                 ol_link_termcap=yes
14922                 TERMCAP_LIBS=-lncurses
14923         fi
14924 fi
14925
14926 if test $ol_link_termcap = no ; then
14927         cat >> confdefs.h <<\EOF
14928 #define NO_TERMCAP 1
14929 EOF
14930
14931         TERMCAP_LIBS=
14932 fi
14933
14934 ol_link_sasl=no
14935 ol_link_spasswd=no
14936 if test $ol_with_cyrus_sasl != no ; then
14937         for ac_hdr in sasl.h
14938 do
14939 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14940 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14941 echo "configure:14942: checking for $ac_hdr" >&5
14942 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14943   echo $ac_n "(cached) $ac_c" 1>&6
14944 else
14945   cat > conftest.$ac_ext <<EOF
14946 #line 14947 "configure"
14947 #include "confdefs.h"
14948 #include <$ac_hdr>
14949 EOF
14950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14951 { (eval echo configure:14952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14953 if test -z "$ac_err"; then
14954   rm -rf conftest*
14955   eval "ac_cv_header_$ac_safe=yes"
14956 else
14957   echo "$ac_err" >&5
14958   echo "configure: failed program was:" >&5
14959   cat conftest.$ac_ext >&5
14960   rm -rf conftest*
14961   eval "ac_cv_header_$ac_safe=no"
14962 fi
14963 rm -f conftest*
14964 fi
14965 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14966   echo "$ac_t""yes" 1>&6
14967     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14968   cat >> confdefs.h <<EOF
14969 #define $ac_tr_hdr 1
14970 EOF
14971  
14972 else
14973   echo "$ac_t""no" 1>&6
14974 fi
14975 done
14976
14977
14978         if test $ac_cv_header_sasl_h = yes ; then
14979                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
14980 echo "configure:14981: checking for sasl_client_init in -lsasl" >&5
14981 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
14982 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14983   echo $ac_n "(cached) $ac_c" 1>&6
14984 else
14985   ac_save_LIBS="$LIBS"
14986 LIBS="-lsasl  $LIBS"
14987 cat > conftest.$ac_ext <<EOF
14988 #line 14989 "configure"
14989 #include "confdefs.h"
14990 /* Override any gcc2 internal prototype to avoid an error.  */
14991 /* We use char because int might match the return type of a gcc2
14992     builtin and then its argument prototype would still apply.  */
14993 char sasl_client_init();
14994
14995 int main() {
14996 sasl_client_init()
14997 ; return 0; }
14998 EOF
14999 if { (eval echo configure:15000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15000   rm -rf conftest*
15001   eval "ac_cv_lib_$ac_lib_var=yes"
15002 else
15003   echo "configure: failed program was:" >&5
15004   cat conftest.$ac_ext >&5
15005   rm -rf conftest*
15006   eval "ac_cv_lib_$ac_lib_var=no"
15007 fi
15008 rm -f conftest*
15009 LIBS="$ac_save_LIBS"
15010
15011 fi
15012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15013   echo "$ac_t""yes" 1>&6
15014   have_cyrus_sasl=yes
15015 else
15016   echo "$ac_t""no" 1>&6
15017 have_cyrus_sasl=no
15018 fi
15019
15020
15021                 if test $have_cyrus_sasl != no ; then
15022                         SASL_LIBS="-lsasl"
15023                         cat >> confdefs.h <<\EOF
15024 #define HAVE_CYRUS_SASL 1
15025 EOF
15026
15027                         ol_link_sasl=yes
15028                 fi
15029         fi
15030
15031         if test $ol_link_sasl = no ; then
15032                 if test $ol_with_cyrus_sasl != auto ; then
15033                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
15034                 else
15035                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
15036                         echo "configure: warning: SASL authentication not supported!" 1>&2
15037                         if test $ol_link_tls = no ; then
15038                                 echo "configure: warning: Strong authentication not supported!" 1>&2
15039                         fi
15040                 fi
15041
15042         elif test $ol_enable_spasswd != no ; then
15043                 ol_link_spasswd=yes
15044         fi
15045
15046 else
15047         echo "configure: warning: SASL authentication not supported!" 1>&2
15048         if test $ol_link_tls = no ; then
15049                 echo "configure: warning: Strong authentication not supported!" 1>&2
15050         fi
15051 fi
15052
15053 if test $cross_compiling != yes ; then
15054         dev=no
15055         if test -r /dev/urandom ; then
15056                 dev="/dev/urandom";
15057         elif test -r /idev/urandom ; then
15058                 dev="/idev/urandom";
15059         elif test -r /dev/srandom ; then
15060                 dev="/dev/srandom";
15061         elif test -r /dev/random ; then
15062                 dev="/dev/random";
15063         elif test -r /idev/random ; then
15064                 dev="/idev/random";
15065         fi
15066
15067         if test $dev != no ; then
15068                 cat >> confdefs.h <<EOF
15069 #define URANDOM_DEVICE "$dev"
15070 EOF
15071
15072         fi
15073 fi
15074
15075 ol_link_fetch=no
15076 if test $ol_with_fetch != no ; then
15077         ol_LIBS=$LIBS
15078 LIBS="-lfetch -lcom_err $LIBS"
15079 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
15080 echo "configure:15081: checking fetch(3) library" >&5
15081 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
15082   echo $ac_n "(cached) $ac_c" 1>&6
15083 else
15084   
15085         cat > conftest.$ac_ext <<EOF
15086 #line 15087 "configure"
15087 #include "confdefs.h"
15088
15089 #include <sys/param.h>
15090 #include <stdio.h>
15091 #include <fetch.h>
15092 int main() {
15093 struct url *u = fetchParseURL("file:///"); 
15094 ; return 0; }
15095 EOF
15096 if { (eval echo configure:15097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15097   rm -rf conftest*
15098   ol_cv_lib_fetch=yes
15099 else
15100   echo "configure: failed program was:" >&5
15101   cat conftest.$ac_ext >&5
15102   rm -rf conftest*
15103   ol_cv_lib_fetch=no
15104 fi
15105 rm -f conftest*
15106 fi
15107
15108 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
15109 LIBS=$ol_LIBS
15110 if test $ol_cv_lib_fetch != no ; then
15111         ol_link_fetch="-lfetch -lcom_err"
15112         cat >> confdefs.h <<\EOF
15113 #define HAVE_FETCH 1
15114 EOF
15115
15116 fi
15117
15118
15119         if test $ol_cv_lib_fetch != no ; then
15120                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
15121                 ol_link_fetch=freebsd
15122
15123         elif test $ol_with_fetch != auto ; then
15124                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
15125         fi 
15126 fi
15127
15128 ol_link_readline=no
15129 if test $ol_with_readline != no ; then
15130         for ac_hdr in readline/readline.h readline/history.h
15131 do
15132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15134 echo "configure:15135: checking for $ac_hdr" >&5
15135 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15136   echo $ac_n "(cached) $ac_c" 1>&6
15137 else
15138   cat > conftest.$ac_ext <<EOF
15139 #line 15140 "configure"
15140 #include "confdefs.h"
15141 #include <$ac_hdr>
15142 EOF
15143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15144 { (eval echo configure:15145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15146 if test -z "$ac_err"; then
15147   rm -rf conftest*
15148   eval "ac_cv_header_$ac_safe=yes"
15149 else
15150   echo "$ac_err" >&5
15151   echo "configure: failed program was:" >&5
15152   cat conftest.$ac_ext >&5
15153   rm -rf conftest*
15154   eval "ac_cv_header_$ac_safe=no"
15155 fi
15156 rm -f conftest*
15157 fi
15158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15159   echo "$ac_t""yes" 1>&6
15160     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15161   cat >> confdefs.h <<EOF
15162 #define $ac_tr_hdr 1
15163 EOF
15164  
15165 else
15166   echo "$ac_t""no" 1>&6
15167 fi
15168 done
15169
15170
15171         if test $ac_cv_header_readline_readline_h = yes ; then
15172                 save_LIBS="$LIBS"
15173                 LIBS="$TERMCAP_LIBS $LIBS"
15174                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
15175 echo "configure:15176: checking for readline in -lreadline" >&5
15176 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
15177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15178   echo $ac_n "(cached) $ac_c" 1>&6
15179 else
15180   ac_save_LIBS="$LIBS"
15181 LIBS="-lreadline  $LIBS"
15182 cat > conftest.$ac_ext <<EOF
15183 #line 15184 "configure"
15184 #include "confdefs.h"
15185 /* Override any gcc2 internal prototype to avoid an error.  */
15186 /* We use char because int might match the return type of a gcc2
15187     builtin and then its argument prototype would still apply.  */
15188 char readline();
15189
15190 int main() {
15191 readline()
15192 ; return 0; }
15193 EOF
15194 if { (eval echo configure:15195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15195   rm -rf conftest*
15196   eval "ac_cv_lib_$ac_lib_var=yes"
15197 else
15198   echo "configure: failed program was:" >&5
15199   cat conftest.$ac_ext >&5
15200   rm -rf conftest*
15201   eval "ac_cv_lib_$ac_lib_var=no"
15202 fi
15203 rm -f conftest*
15204 LIBS="$ac_save_LIBS"
15205
15206 fi
15207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15208   echo "$ac_t""yes" 1>&6
15209   have_readline=yes
15210 else
15211   echo "$ac_t""no" 1>&6
15212 have_readline=no
15213 fi
15214
15215                 LIBS="$save_LIBS"
15216                         
15217                 if test $have_readline = yes ; then
15218                         ol_with_readline=found
15219                         ol_link_readline=yes
15220
15221                         READLINE_LIBS="-lreadline"
15222                 fi
15223         fi
15224 fi
15225
15226 if test $ol_link_readline = yes ; then
15227         cat >> confdefs.h <<\EOF
15228 #define HAVE_READLINE 1
15229 EOF
15230
15231 fi
15232
15233
15234 if test $ol_enable_crypt != no ; then
15235         echo $ac_n "checking for crypt""... $ac_c" 1>&6
15236 echo "configure:15237: checking for crypt" >&5
15237 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
15238   echo $ac_n "(cached) $ac_c" 1>&6
15239 else
15240   cat > conftest.$ac_ext <<EOF
15241 #line 15242 "configure"
15242 #include "confdefs.h"
15243 /* System header to define __stub macros and hopefully few prototypes,
15244     which can conflict with char crypt(); below.  */
15245 #include <assert.h>
15246 /* Override any gcc2 internal prototype to avoid an error.  */
15247 /* We use char because int might match the return type of a gcc2
15248     builtin and then its argument prototype would still apply.  */
15249 char crypt();
15250 char (*f)();
15251
15252 int main() {
15253
15254 /* The GNU C library defines this for functions which it implements
15255     to always fail with ENOSYS.  Some functions are actually named
15256     something starting with __ and the normal name is an alias.  */
15257 #if defined (__stub_crypt) || defined (__stub___crypt)
15258 choke me
15259 #else
15260 f = crypt;
15261 #endif
15262
15263 ; return 0; }
15264 EOF
15265 if { (eval echo configure:15266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15266   rm -rf conftest*
15267   eval "ac_cv_func_crypt=yes"
15268 else
15269   echo "configure: failed program was:" >&5
15270   cat conftest.$ac_ext >&5
15271   rm -rf conftest*
15272   eval "ac_cv_func_crypt=no"
15273 fi
15274 rm -f conftest*
15275 fi
15276
15277 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
15278   echo "$ac_t""yes" 1>&6
15279   have_crypt=yes
15280 else
15281   echo "$ac_t""no" 1>&6
15282
15283                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
15284 echo "configure:15285: checking for crypt in -lcrypt" >&5
15285 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
15286 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15287   echo $ac_n "(cached) $ac_c" 1>&6
15288 else
15289   ac_save_LIBS="$LIBS"
15290 LIBS="-lcrypt  $LIBS"
15291 cat > conftest.$ac_ext <<EOF
15292 #line 15293 "configure"
15293 #include "confdefs.h"
15294 /* Override any gcc2 internal prototype to avoid an error.  */
15295 /* We use char because int might match the return type of a gcc2
15296     builtin and then its argument prototype would still apply.  */
15297 char crypt();
15298
15299 int main() {
15300 crypt()
15301 ; return 0; }
15302 EOF
15303 if { (eval echo configure:15304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15304   rm -rf conftest*
15305   eval "ac_cv_lib_$ac_lib_var=yes"
15306 else
15307   echo "configure: failed program was:" >&5
15308   cat conftest.$ac_ext >&5
15309   rm -rf conftest*
15310   eval "ac_cv_lib_$ac_lib_var=no"
15311 fi
15312 rm -f conftest*
15313 LIBS="$ac_save_LIBS"
15314
15315 fi
15316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15317   echo "$ac_t""yes" 1>&6
15318   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
15319                         have_crypt=yes
15320 else
15321   echo "$ac_t""no" 1>&6
15322 have_crypt=no
15323 fi
15324
15325 fi
15326
15327
15328         if test $have_crypt = yes ; then
15329                 cat >> confdefs.h <<\EOF
15330 #define HAVE_CRYPT 1
15331 EOF
15332
15333         else
15334                 echo "configure: warning: could not find crypt" 1>&2
15335                 if test $ol_enable_crypt = yes ; then
15336                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
15337                 fi
15338
15339                 echo "configure: warning: disabling crypt support" 1>&2
15340                 ol_enable_crypt=no
15341         fi
15342 fi
15343
15344 if test $ol_enable_proctitle != no ; then
15345         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
15346 echo "configure:15347: checking for setproctitle" >&5
15347 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
15348   echo $ac_n "(cached) $ac_c" 1>&6
15349 else
15350   cat > conftest.$ac_ext <<EOF
15351 #line 15352 "configure"
15352 #include "confdefs.h"
15353 /* System header to define __stub macros and hopefully few prototypes,
15354     which can conflict with char setproctitle(); below.  */
15355 #include <assert.h>
15356 /* Override any gcc2 internal prototype to avoid an error.  */
15357 /* We use char because int might match the return type of a gcc2
15358     builtin and then its argument prototype would still apply.  */
15359 char setproctitle();
15360 char (*f)();
15361
15362 int main() {
15363
15364 /* The GNU C library defines this for functions which it implements
15365     to always fail with ENOSYS.  Some functions are actually named
15366     something starting with __ and the normal name is an alias.  */
15367 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
15368 choke me
15369 #else
15370 f = setproctitle;
15371 #endif
15372
15373 ; return 0; }
15374 EOF
15375 if { (eval echo configure:15376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15376   rm -rf conftest*
15377   eval "ac_cv_func_setproctitle=yes"
15378 else
15379   echo "configure: failed program was:" >&5
15380   cat conftest.$ac_ext >&5
15381   rm -rf conftest*
15382   eval "ac_cv_func_setproctitle=no"
15383 fi
15384 rm -f conftest*
15385 fi
15386
15387 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
15388   echo "$ac_t""yes" 1>&6
15389   have_setproctitle=yes
15390 else
15391   echo "$ac_t""no" 1>&6
15392
15393                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
15394 echo "configure:15395: checking for setproctitle in -lutil" >&5
15395 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
15396 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15397   echo $ac_n "(cached) $ac_c" 1>&6
15398 else
15399   ac_save_LIBS="$LIBS"
15400 LIBS="-lutil  $LIBS"
15401 cat > conftest.$ac_ext <<EOF
15402 #line 15403 "configure"
15403 #include "confdefs.h"
15404 /* Override any gcc2 internal prototype to avoid an error.  */
15405 /* We use char because int might match the return type of a gcc2
15406     builtin and then its argument prototype would still apply.  */
15407 char setproctitle();
15408
15409 int main() {
15410 setproctitle()
15411 ; return 0; }
15412 EOF
15413 if { (eval echo configure:15414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15414   rm -rf conftest*
15415   eval "ac_cv_lib_$ac_lib_var=yes"
15416 else
15417   echo "configure: failed program was:" >&5
15418   cat conftest.$ac_ext >&5
15419   rm -rf conftest*
15420   eval "ac_cv_lib_$ac_lib_var=no"
15421 fi
15422 rm -f conftest*
15423 LIBS="$ac_save_LIBS"
15424
15425 fi
15426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15427   echo "$ac_t""yes" 1>&6
15428   have_setproctitle=yes
15429                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
15430 else
15431   echo "$ac_t""no" 1>&6
15432 have_setproctitle=no
15433                         LIBOBJS="$LIBOBJS setproctitle.o"
15434                         LIBSRCS="$LIBSRCS setproctitle.c"
15435 fi
15436
15437 fi
15438
15439
15440         if test $have_setproctitle = yes ; then
15441                 cat >> confdefs.h <<\EOF
15442 #define HAVE_SETPROCTITLE 1
15443 EOF
15444
15445         fi
15446 fi
15447
15448 if test $ol_enable_slp != no ; then
15449         for ac_hdr in slp.h 
15450 do
15451 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15452 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15453 echo "configure:15454: checking for $ac_hdr" >&5
15454 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15455   echo $ac_n "(cached) $ac_c" 1>&6
15456 else
15457   cat > conftest.$ac_ext <<EOF
15458 #line 15459 "configure"
15459 #include "confdefs.h"
15460 #include <$ac_hdr>
15461 EOF
15462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15463 { (eval echo configure:15464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15464 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15465 if test -z "$ac_err"; then
15466   rm -rf conftest*
15467   eval "ac_cv_header_$ac_safe=yes"
15468 else
15469   echo "$ac_err" >&5
15470   echo "configure: failed program was:" >&5
15471   cat conftest.$ac_ext >&5
15472   rm -rf conftest*
15473   eval "ac_cv_header_$ac_safe=no"
15474 fi
15475 rm -f conftest*
15476 fi
15477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15478   echo "$ac_t""yes" 1>&6
15479     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15480   cat >> confdefs.h <<EOF
15481 #define $ac_tr_hdr 1
15482 EOF
15483  
15484 else
15485   echo "$ac_t""no" 1>&6
15486 fi
15487 done
15488
15489
15490         if test $ac_cv_header_slp_h = yes ; then
15491                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
15492 echo "configure:15493: checking for SLPOpen in -lslp" >&5
15493 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
15494 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15495   echo $ac_n "(cached) $ac_c" 1>&6
15496 else
15497   ac_save_LIBS="$LIBS"
15498 LIBS="-lslp  $LIBS"
15499 cat > conftest.$ac_ext <<EOF
15500 #line 15501 "configure"
15501 #include "confdefs.h"
15502 /* Override any gcc2 internal prototype to avoid an error.  */
15503 /* We use char because int might match the return type of a gcc2
15504     builtin and then its argument prototype would still apply.  */
15505 char SLPOpen();
15506
15507 int main() {
15508 SLPOpen()
15509 ; return 0; }
15510 EOF
15511 if { (eval echo configure:15512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15512   rm -rf conftest*
15513   eval "ac_cv_lib_$ac_lib_var=yes"
15514 else
15515   echo "configure: failed program was:" >&5
15516   cat conftest.$ac_ext >&5
15517   rm -rf conftest*
15518   eval "ac_cv_lib_$ac_lib_var=no"
15519 fi
15520 rm -f conftest*
15521 LIBS="$ac_save_LIBS"
15522
15523 fi
15524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15525   echo "$ac_t""yes" 1>&6
15526   have_slp=yes
15527 else
15528   echo "$ac_t""no" 1>&6
15529 have_slp=no
15530 fi
15531
15532                 if test $have_slp = yes ; then
15533                         cat >> confdefs.h <<\EOF
15534 #define HAVE_SLP 1
15535 EOF
15536
15537                         SLAPD_SLP_LIBS=-lslp
15538                 fi
15539
15540         elif test $ol_enable_slp = yes ; then
15541                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
15542         fi
15543 fi
15544
15545 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
15546 echo "configure:15547: checking for ANSI C header files" >&5
15547 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
15548   echo $ac_n "(cached) $ac_c" 1>&6
15549 else
15550   cat > conftest.$ac_ext <<EOF
15551 #line 15552 "configure"
15552 #include "confdefs.h"
15553 #include <stdlib.h>
15554 #include <stdarg.h>
15555 #include <string.h>
15556 #include <float.h>
15557 EOF
15558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15559 { (eval echo configure:15560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15561 if test -z "$ac_err"; then
15562   rm -rf conftest*
15563   ac_cv_header_stdc=yes
15564 else
15565   echo "$ac_err" >&5
15566   echo "configure: failed program was:" >&5
15567   cat conftest.$ac_ext >&5
15568   rm -rf conftest*
15569   ac_cv_header_stdc=no
15570 fi
15571 rm -f conftest*
15572
15573 if test $ac_cv_header_stdc = yes; then
15574   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15575 cat > conftest.$ac_ext <<EOF
15576 #line 15577 "configure"
15577 #include "confdefs.h"
15578 #include <string.h>
15579 EOF
15580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15581   egrep "memchr" >/dev/null 2>&1; then
15582   :
15583 else
15584   rm -rf conftest*
15585   ac_cv_header_stdc=no
15586 fi
15587 rm -f conftest*
15588
15589 fi
15590
15591 if test $ac_cv_header_stdc = yes; then
15592   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15593 cat > conftest.$ac_ext <<EOF
15594 #line 15595 "configure"
15595 #include "confdefs.h"
15596 #include <stdlib.h>
15597 EOF
15598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15599   egrep "free" >/dev/null 2>&1; then
15600   :
15601 else
15602   rm -rf conftest*
15603   ac_cv_header_stdc=no
15604 fi
15605 rm -f conftest*
15606
15607 fi
15608
15609 if test $ac_cv_header_stdc = yes; then
15610   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15611 if test "$cross_compiling" = yes; then
15612   :
15613 else
15614   cat > conftest.$ac_ext <<EOF
15615 #line 15616 "configure"
15616 #include "confdefs.h"
15617 #include <ctype.h>
15618 #if ((' ' & 0x0FF) == 0x020)
15619 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15620 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15621 #else
15622 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15623  || ('j' <= (c) && (c) <= 'r') \
15624  || ('s' <= (c) && (c) <= 'z'))
15625 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15626 #endif
15627 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15628 int main () { int i; for (i = 0; i < 256; i++)
15629 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
15630 exit (0); }
15631
15632 EOF
15633 if { (eval echo configure:15634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15634 then
15635   :
15636 else
15637   echo "configure: failed program was:" >&5
15638   cat conftest.$ac_ext >&5
15639   rm -fr conftest*
15640   ac_cv_header_stdc=no
15641 fi
15642 rm -fr conftest*
15643 fi
15644
15645 fi
15646 fi
15647
15648 echo "$ac_t""$ac_cv_header_stdc" 1>&6
15649 if test $ac_cv_header_stdc = yes; then
15650   cat >> confdefs.h <<\EOF
15651 #define STDC_HEADERS 1
15652 EOF
15653
15654 fi
15655
15656 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
15657 echo "configure:15658: checking for mode_t" >&5
15658 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
15659   echo $ac_n "(cached) $ac_c" 1>&6
15660 else
15661   cat > conftest.$ac_ext <<EOF
15662 #line 15663 "configure"
15663 #include "confdefs.h"
15664 #include <sys/types.h>
15665 #if STDC_HEADERS
15666 #include <stdlib.h>
15667 #include <stddef.h>
15668 #endif
15669
15670 EOF
15671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15672   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15673   rm -rf conftest*
15674   eval "ac_cv_type_mode_t=yes"
15675 else
15676   rm -rf conftest*
15677   eval "ac_cv_type_mode_t=no"
15678 fi
15679 rm -f conftest*
15680
15681 fi
15682 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
15683   echo "$ac_t""yes" 1>&6
15684 else
15685   echo "$ac_t""no" 1>&6
15686   cat >> confdefs.h <<EOF
15687 #define mode_t int
15688 EOF
15689
15690 fi
15691
15692 echo $ac_n "checking for off_t""... $ac_c" 1>&6
15693 echo "configure:15694: checking for off_t" >&5
15694 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
15695   echo $ac_n "(cached) $ac_c" 1>&6
15696 else
15697   cat > conftest.$ac_ext <<EOF
15698 #line 15699 "configure"
15699 #include "confdefs.h"
15700 #include <sys/types.h>
15701 #if STDC_HEADERS
15702 #include <stdlib.h>
15703 #include <stddef.h>
15704 #endif
15705
15706 EOF
15707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15708   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15709   rm -rf conftest*
15710   eval "ac_cv_type_off_t=yes"
15711 else
15712   rm -rf conftest*
15713   eval "ac_cv_type_off_t=no"
15714 fi
15715 rm -f conftest*
15716
15717 fi
15718 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
15719   echo "$ac_t""yes" 1>&6
15720 else
15721   echo "$ac_t""no" 1>&6
15722   cat >> confdefs.h <<EOF
15723 #define off_t long
15724 EOF
15725
15726 fi
15727
15728 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
15729 echo "configure:15730: checking for pid_t" >&5
15730 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
15731   echo $ac_n "(cached) $ac_c" 1>&6
15732 else
15733   cat > conftest.$ac_ext <<EOF
15734 #line 15735 "configure"
15735 #include "confdefs.h"
15736 #include <sys/types.h>
15737 #if STDC_HEADERS
15738 #include <stdlib.h>
15739 #include <stddef.h>
15740 #endif
15741
15742 EOF
15743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15744   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15745   rm -rf conftest*
15746   eval "ac_cv_type_pid_t=yes"
15747 else
15748   rm -rf conftest*
15749   eval "ac_cv_type_pid_t=no"
15750 fi
15751 rm -f conftest*
15752
15753 fi
15754 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
15755   echo "$ac_t""yes" 1>&6
15756 else
15757   echo "$ac_t""no" 1>&6
15758   cat >> confdefs.h <<EOF
15759 #define pid_t int
15760 EOF
15761
15762 fi
15763
15764 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
15765 echo "configure:15766: checking for ptrdiff_t" >&5
15766 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
15767   echo $ac_n "(cached) $ac_c" 1>&6
15768 else
15769   cat > conftest.$ac_ext <<EOF
15770 #line 15771 "configure"
15771 #include "confdefs.h"
15772 #include <stddef.h>
15773 int main() {
15774 ptrdiff_t p
15775 ; return 0; }
15776 EOF
15777 if { (eval echo configure:15778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15778   rm -rf conftest*
15779   am_cv_type_ptrdiff_t=yes
15780 else
15781   echo "configure: failed program was:" >&5
15782   cat conftest.$ac_ext >&5
15783   rm -rf conftest*
15784   am_cv_type_ptrdiff_t=no
15785 fi
15786 rm -f conftest*
15787 fi
15788
15789 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
15790    if test $am_cv_type_ptrdiff_t = yes; then
15791      cat >> confdefs.h <<\EOF
15792 #define HAVE_PTRDIFF_T 1
15793 EOF
15794
15795    fi
15796
15797 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
15798 echo "configure:15799: checking return type of signal handlers" >&5
15799 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
15800   echo $ac_n "(cached) $ac_c" 1>&6
15801 else
15802   cat > conftest.$ac_ext <<EOF
15803 #line 15804 "configure"
15804 #include "confdefs.h"
15805 #include <sys/types.h>
15806 #include <signal.h>
15807 #ifdef signal
15808 #undef signal
15809 #endif
15810 #ifdef __cplusplus
15811 extern "C" void (*signal (int, void (*)(int)))(int);
15812 #else
15813 void (*signal ()) ();
15814 #endif
15815
15816 int main() {
15817 int i;
15818 ; return 0; }
15819 EOF
15820 if { (eval echo configure:15821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15821   rm -rf conftest*
15822   ac_cv_type_signal=void
15823 else
15824   echo "configure: failed program was:" >&5
15825   cat conftest.$ac_ext >&5
15826   rm -rf conftest*
15827   ac_cv_type_signal=int
15828 fi
15829 rm -f conftest*
15830 fi
15831
15832 echo "$ac_t""$ac_cv_type_signal" 1>&6
15833 cat >> confdefs.h <<EOF
15834 #define RETSIGTYPE $ac_cv_type_signal
15835 EOF
15836
15837
15838 echo $ac_n "checking for size_t""... $ac_c" 1>&6
15839 echo "configure:15840: checking for size_t" >&5
15840 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
15841   echo $ac_n "(cached) $ac_c" 1>&6
15842 else
15843   cat > conftest.$ac_ext <<EOF
15844 #line 15845 "configure"
15845 #include "confdefs.h"
15846 #include <sys/types.h>
15847 #if STDC_HEADERS
15848 #include <stdlib.h>
15849 #include <stddef.h>
15850 #endif
15851
15852 EOF
15853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15854   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15855   rm -rf conftest*
15856   eval "ac_cv_type_size_t=yes"
15857 else
15858   rm -rf conftest*
15859   eval "ac_cv_type_size_t=no"
15860 fi
15861 rm -f conftest*
15862
15863 fi
15864 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
15865   echo "$ac_t""yes" 1>&6
15866 else
15867   echo "$ac_t""no" 1>&6
15868   cat >> confdefs.h <<EOF
15869 #define size_t unsigned
15870 EOF
15871
15872 fi
15873
15874
15875 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
15876 echo "configure:15877: checking for ssize_t" >&5
15877 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
15878   echo $ac_n "(cached) $ac_c" 1>&6
15879 else
15880   cat > conftest.$ac_ext <<EOF
15881 #line 15882 "configure"
15882 #include "confdefs.h"
15883 #include <sys/types.h>
15884 #if STDC_HEADERS
15885 #include <stdlib.h>
15886 #include <stddef.h>
15887 #endif
15888
15889 EOF
15890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15891   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15892   rm -rf conftest*
15893   eval "ac_cv_type_ssize_t=yes"
15894 else
15895   rm -rf conftest*
15896   eval "ac_cv_type_ssize_t=no"
15897 fi
15898 rm -f conftest*
15899
15900 fi
15901 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
15902   echo "$ac_t""yes" 1>&6
15903 else
15904   echo "$ac_t""no" 1>&6
15905   cat >> confdefs.h <<EOF
15906 #define ssize_t signed int
15907 EOF
15908
15909 fi
15910
15911 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
15912 echo "configure:15913: checking for caddr_t" >&5
15913 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
15914   echo $ac_n "(cached) $ac_c" 1>&6
15915 else
15916   cat > conftest.$ac_ext <<EOF
15917 #line 15918 "configure"
15918 #include "confdefs.h"
15919 #include <sys/types.h>
15920 #if STDC_HEADERS
15921 #include <stdlib.h>
15922 #include <stddef.h>
15923 #endif
15924
15925 EOF
15926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15927   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15928   rm -rf conftest*
15929   eval "ac_cv_type_caddr_t=yes"
15930 else
15931   rm -rf conftest*
15932   eval "ac_cv_type_caddr_t=no"
15933 fi
15934 rm -f conftest*
15935
15936 fi
15937 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
15938   echo "$ac_t""yes" 1>&6
15939 else
15940   echo "$ac_t""no" 1>&6
15941   cat >> confdefs.h <<EOF
15942 #define caddr_t char *
15943 EOF
15944
15945 fi
15946
15947
15948 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
15949 echo "configure:15950: checking for socklen_t" >&5
15950 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
15951   echo $ac_n "(cached) $ac_c" 1>&6
15952 else
15953   cat > conftest.$ac_ext <<EOF
15954 #line 15955 "configure"
15955 #include "confdefs.h"
15956
15957 #ifdef HAVE_SYS_TYPES_H
15958 #include <sys/types.h>
15959 #endif
15960 #ifdef HAVE_SYS_SOCKET_H
15961 #include <sys/socket.h>
15962 #endif
15963
15964 int main() {
15965 socklen_t len;
15966 ; return 0; }
15967 EOF
15968 if { (eval echo configure:15969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15969   rm -rf conftest*
15970   ol_cv_type_socklen_t=yes
15971 else
15972   echo "configure: failed program was:" >&5
15973   cat conftest.$ac_ext >&5
15974   rm -rf conftest*
15975   ol_cv_type_socklen_t=no
15976 fi
15977 rm -f conftest*
15978 fi
15979
15980 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
15981   if test $ol_cv_type_socklen_t = no; then
15982     cat >> confdefs.h <<\EOF
15983 #define socklen_t int
15984 EOF
15985
15986   fi
15987  
15988 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
15989 echo "configure:15990: checking for member st_blksize in aggregate type struct stat" >&5
15990 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
15991   echo $ac_n "(cached) $ac_c" 1>&6
15992 else
15993   cat > conftest.$ac_ext <<EOF
15994 #line 15995 "configure"
15995 #include "confdefs.h"
15996 #include <sys/types.h>
15997 #include <sys/stat.h>
15998 int main() {
15999 struct stat foo; foo.st_blksize;
16000 ; return 0; }
16001 EOF
16002 if { (eval echo configure:16003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16003   rm -rf conftest*
16004   ac_cv_c_struct_member_st_blksize=yes
16005 else
16006   echo "configure: failed program was:" >&5
16007   cat conftest.$ac_ext >&5
16008   rm -rf conftest*
16009   ac_cv_c_struct_member_st_blksize=no
16010 fi
16011 rm -f conftest*
16012 fi
16013
16014 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
16015 st_blksize="$ac_cv_c_struct_member_st_blksize"
16016 if test $ac_cv_c_struct_member_st_blksize = yes; then
16017   cat >> confdefs.h <<\EOF
16018 #define HAVE_ST_BLKSIZE 1
16019 EOF
16020
16021 fi
16022
16023 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
16024 echo "configure:16025: checking whether time.h and sys/time.h may both be included" >&5
16025 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
16026   echo $ac_n "(cached) $ac_c" 1>&6
16027 else
16028   cat > conftest.$ac_ext <<EOF
16029 #line 16030 "configure"
16030 #include "confdefs.h"
16031 #include <sys/types.h>
16032 #include <sys/time.h>
16033 #include <time.h>
16034 int main() {
16035 struct tm *tp;
16036 ; return 0; }
16037 EOF
16038 if { (eval echo configure:16039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16039   rm -rf conftest*
16040   ac_cv_header_time=yes
16041 else
16042   echo "configure: failed program was:" >&5
16043   cat conftest.$ac_ext >&5
16044   rm -rf conftest*
16045   ac_cv_header_time=no
16046 fi
16047 rm -f conftest*
16048 fi
16049
16050 echo "$ac_t""$ac_cv_header_time" 1>&6
16051 if test $ac_cv_header_time = yes; then
16052   cat >> confdefs.h <<\EOF
16053 #define TIME_WITH_SYS_TIME 1
16054 EOF
16055
16056 fi
16057
16058 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
16059 echo "configure:16060: checking whether struct tm is in sys/time.h or time.h" >&5
16060 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
16061   echo $ac_n "(cached) $ac_c" 1>&6
16062 else
16063   cat > conftest.$ac_ext <<EOF
16064 #line 16065 "configure"
16065 #include "confdefs.h"
16066 #include <sys/types.h>
16067 #include <time.h>
16068 int main() {
16069 struct tm *tp; tp->tm_sec;
16070 ; return 0; }
16071 EOF
16072 if { (eval echo configure:16073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16073   rm -rf conftest*
16074   ac_cv_struct_tm=time.h
16075 else
16076   echo "configure: failed program was:" >&5
16077   cat conftest.$ac_ext >&5
16078   rm -rf conftest*
16079   ac_cv_struct_tm=sys/time.h
16080 fi
16081 rm -f conftest*
16082 fi
16083
16084 echo "$ac_t""$ac_cv_struct_tm" 1>&6
16085 if test $ac_cv_struct_tm = sys/time.h; then
16086   cat >> confdefs.h <<\EOF
16087 #define TM_IN_SYS_TIME 1
16088 EOF
16089
16090 fi
16091
16092 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
16093 echo "configure:16094: checking for uid_t in sys/types.h" >&5
16094 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
16095   echo $ac_n "(cached) $ac_c" 1>&6
16096 else
16097   cat > conftest.$ac_ext <<EOF
16098 #line 16099 "configure"
16099 #include "confdefs.h"
16100 #include <sys/types.h>
16101 EOF
16102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16103   egrep "uid_t" >/dev/null 2>&1; then
16104   rm -rf conftest*
16105   ac_cv_type_uid_t=yes
16106 else
16107   rm -rf conftest*
16108   ac_cv_type_uid_t=no
16109 fi
16110 rm -f conftest*
16111
16112 fi
16113
16114 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
16115 if test $ac_cv_type_uid_t = no; then
16116   cat >> confdefs.h <<\EOF
16117 #define uid_t int
16118 EOF
16119
16120   cat >> confdefs.h <<\EOF
16121 #define gid_t int
16122 EOF
16123
16124 fi
16125
16126 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
16127 echo "configure:16128: checking for sig_atomic_t" >&5
16128 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
16129   echo $ac_n "(cached) $ac_c" 1>&6
16130 else
16131   cat > conftest.$ac_ext <<EOF
16132 #line 16133 "configure"
16133 #include "confdefs.h"
16134 #include <signal.h>
16135 int main() {
16136 sig_atomic_t atomic;
16137 ; return 0; }
16138 EOF
16139 if { (eval echo configure:16140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16140   rm -rf conftest*
16141   ol_cv_type_sig_atomic_t=yes
16142 else
16143   echo "configure: failed program was:" >&5
16144   cat conftest.$ac_ext >&5
16145   rm -rf conftest*
16146   ol_cv_type_sig_atomic_t=no
16147 fi
16148 rm -f conftest*
16149 fi
16150
16151 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
16152   if test $ol_cv_type_sig_atomic_t = no; then
16153     cat >> confdefs.h <<\EOF
16154 #define sig_atomic_t int
16155 EOF
16156
16157   fi
16158  
16159
16160
16161 # test for pw_gecos in struct passwd
16162 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
16163 echo "configure:16164: checking struct passwd for pw_gecos" >&5
16164 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
16165   echo $ac_n "(cached) $ac_c" 1>&6
16166 else
16167   
16168         cat > conftest.$ac_ext <<EOF
16169 #line 16170 "configure"
16170 #include "confdefs.h"
16171 #include <pwd.h>
16172 int main() {
16173
16174         struct passwd pwd;
16175         pwd.pw_gecos = pwd.pw_name;
16176
16177 ; return 0; }
16178 EOF
16179 if { (eval echo configure:16180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16180   rm -rf conftest*
16181   ol_cv_struct_passwd_pw_gecos=yes
16182 else
16183   echo "configure: failed program was:" >&5
16184   cat conftest.$ac_ext >&5
16185   rm -rf conftest*
16186   ol_cv_struct_passwd_pw_gecos=no
16187 fi
16188 rm -f conftest*
16189 fi
16190
16191 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
16192 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
16193         cat >> confdefs.h <<\EOF
16194 #define HAVE_PW_GECOS 1
16195 EOF
16196
16197 fi
16198
16199 # test for pw_passwd in struct passwd
16200 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
16201 echo "configure:16202: checking struct passwd for pw_passwd" >&5
16202 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
16203   echo $ac_n "(cached) $ac_c" 1>&6
16204 else
16205   
16206         cat > conftest.$ac_ext <<EOF
16207 #line 16208 "configure"
16208 #include "confdefs.h"
16209 #include <pwd.h>
16210 int main() {
16211
16212         struct passwd pwd;
16213         pwd.pw_passwd = pwd.pw_name;
16214
16215 ; return 0; }
16216 EOF
16217 if { (eval echo configure:16218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16218   rm -rf conftest*
16219   ol_cv_struct_passwd_pw_passwd=yes
16220 else
16221   echo "configure: failed program was:" >&5
16222   cat conftest.$ac_ext >&5
16223   rm -rf conftest*
16224   ol_cv_struct_passwd_pw_passwd=no
16225 fi
16226 rm -f conftest*
16227 fi
16228
16229 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
16230 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
16231         cat >> confdefs.h <<\EOF
16232 #define HAVE_PW_PASSWD 1
16233 EOF
16234
16235 fi
16236
16237
16238 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
16239 echo "configure:16240: checking if toupper() requires islower()" >&5
16240 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
16241   echo $ac_n "(cached) $ac_c" 1>&6
16242 else
16243   
16244         if test "$cross_compiling" = yes; then
16245   ol_cv_c_upper_lower=safe
16246 else
16247   cat > conftest.$ac_ext <<EOF
16248 #line 16249 "configure"
16249 #include "confdefs.h"
16250
16251 #include <ctype.h>
16252 main()
16253 {
16254         if ('C' == toupper('C'))
16255                 exit(0);
16256         else
16257                 exit(1);
16258 }
16259 EOF
16260 if { (eval echo configure:16261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16261 then
16262   ol_cv_c_upper_lower=no
16263 else
16264   echo "configure: failed program was:" >&5
16265   cat conftest.$ac_ext >&5
16266   rm -fr conftest*
16267   ol_cv_c_upper_lower=yes
16268 fi
16269 rm -fr conftest*
16270 fi
16271
16272 fi
16273
16274 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
16275 if test $ol_cv_c_upper_lower != no ; then
16276         cat >> confdefs.h <<\EOF
16277 #define C_UPPER_LOWER 1
16278 EOF
16279
16280 fi
16281
16282 echo $ac_n "checking for working const""... $ac_c" 1>&6
16283 echo "configure:16284: checking for working const" >&5
16284 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
16285   echo $ac_n "(cached) $ac_c" 1>&6
16286 else
16287   cat > conftest.$ac_ext <<EOF
16288 #line 16289 "configure"
16289 #include "confdefs.h"
16290
16291 int main() {
16292
16293 /* Ultrix mips cc rejects this.  */
16294 typedef int charset[2]; const charset x;
16295 /* SunOS 4.1.1 cc rejects this.  */
16296 char const *const *ccp;
16297 char **p;
16298 /* NEC SVR4.0.2 mips cc rejects this.  */
16299 struct point {int x, y;};
16300 static struct point const zero = {0,0};
16301 /* AIX XL C 1.02.0.0 rejects this.
16302    It does not let you subtract one const X* pointer from another in an arm
16303    of an if-expression whose if-part is not a constant expression */
16304 const char *g = "string";
16305 ccp = &g + (g ? g-g : 0);
16306 /* HPUX 7.0 cc rejects these. */
16307 ++ccp;
16308 p = (char**) ccp;
16309 ccp = (char const *const *) p;
16310 { /* SCO 3.2v4 cc rejects this.  */
16311   char *t;
16312   char const *s = 0 ? (char *) 0 : (char const *) 0;
16313
16314   *t++ = 0;
16315 }
16316 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16317   int x[] = {25, 17};
16318   const int *foo = &x[0];
16319   ++foo;
16320 }
16321 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16322   typedef const int *iptr;
16323   iptr p = 0;
16324   ++p;
16325 }
16326 { /* AIX XL C 1.02.0.0 rejects this saying
16327      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16328   struct s { int j; const int *ap[3]; };
16329   struct s *b; b->j = 5;
16330 }
16331 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16332   const int foo = 10;
16333 }
16334
16335 ; return 0; }
16336 EOF
16337 if { (eval echo configure:16338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16338   rm -rf conftest*
16339   ac_cv_c_const=yes
16340 else
16341   echo "configure: failed program was:" >&5
16342   cat conftest.$ac_ext >&5
16343   rm -rf conftest*
16344   ac_cv_c_const=no
16345 fi
16346 rm -f conftest*
16347 fi
16348
16349 echo "$ac_t""$ac_cv_c_const" 1>&6
16350 if test $ac_cv_c_const = no; then
16351   cat >> confdefs.h <<\EOF
16352 #define const 
16353 EOF
16354
16355 fi
16356
16357 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
16358 echo "configure:16359: checking if compiler understands volatile" >&5
16359 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
16360   echo $ac_n "(cached) $ac_c" 1>&6
16361 else
16362   cat > conftest.$ac_ext <<EOF
16363 #line 16364 "configure"
16364 #include "confdefs.h"
16365 int x, y, z;
16366 int main() {
16367 volatile int a; int * volatile b = x ? &y : &z;
16368       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
16369       *b = 0;
16370 ; return 0; }
16371 EOF
16372 if { (eval echo configure:16373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16373   rm -rf conftest*
16374   ol_cv_c_volatile=yes
16375 else
16376   echo "configure: failed program was:" >&5
16377   cat conftest.$ac_ext >&5
16378   rm -rf conftest*
16379   ol_cv_c_volatile=no
16380 fi
16381 rm -f conftest*
16382 fi
16383
16384 echo "$ac_t""$ol_cv_c_volatile" 1>&6
16385   if test $ol_cv_c_volatile = yes; then
16386     : 
16387   else
16388     cat >> confdefs.h <<\EOF
16389 #define volatile 
16390 EOF
16391
16392   fi
16393  
16394
16395 if test $cross_compiling = yes ; then
16396         cat >> confdefs.h <<\EOF
16397 #define CROSS_COMPILING 1
16398 EOF
16399
16400 else
16401         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
16402 echo "configure:16403: checking whether byte ordering is bigendian" >&5
16403 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
16404   echo $ac_n "(cached) $ac_c" 1>&6
16405 else
16406   ac_cv_c_bigendian=unknown
16407 # See if sys/param.h defines the BYTE_ORDER macro.
16408 cat > conftest.$ac_ext <<EOF
16409 #line 16410 "configure"
16410 #include "confdefs.h"
16411 #include <sys/types.h>
16412 #include <sys/param.h>
16413 int main() {
16414
16415 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16416  bogus endian macros
16417 #endif
16418 ; return 0; }
16419 EOF
16420 if { (eval echo configure:16421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16421   rm -rf conftest*
16422   # It does; now see whether it defined to BIG_ENDIAN or not.
16423 cat > conftest.$ac_ext <<EOF
16424 #line 16425 "configure"
16425 #include "confdefs.h"
16426 #include <sys/types.h>
16427 #include <sys/param.h>
16428 int main() {
16429
16430 #if BYTE_ORDER != BIG_ENDIAN
16431  not big endian
16432 #endif
16433 ; return 0; }
16434 EOF
16435 if { (eval echo configure:16436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16436   rm -rf conftest*
16437   ac_cv_c_bigendian=yes
16438 else
16439   echo "configure: failed program was:" >&5
16440   cat conftest.$ac_ext >&5
16441   rm -rf conftest*
16442   ac_cv_c_bigendian=no
16443 fi
16444 rm -f conftest*
16445 else
16446   echo "configure: failed program was:" >&5
16447   cat conftest.$ac_ext >&5
16448 fi
16449 rm -f conftest*
16450 if test $ac_cv_c_bigendian = unknown; then
16451 if test "$cross_compiling" = yes; then
16452     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
16453 else
16454   cat > conftest.$ac_ext <<EOF
16455 #line 16456 "configure"
16456 #include "confdefs.h"
16457 main () {
16458   /* Are we little or big endian?  From Harbison&Steele.  */
16459   union
16460   {
16461     long l;
16462     char c[sizeof (long)];
16463   } u;
16464   u.l = 1;
16465   exit (u.c[sizeof (long) - 1] == 1);
16466 }
16467 EOF
16468 if { (eval echo configure:16469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16469 then
16470   ac_cv_c_bigendian=no
16471 else
16472   echo "configure: failed program was:" >&5
16473   cat conftest.$ac_ext >&5
16474   rm -fr conftest*
16475   ac_cv_c_bigendian=yes
16476 fi
16477 rm -fr conftest*
16478 fi
16479
16480 fi
16481 fi
16482
16483 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
16484 if test $ac_cv_c_bigendian = yes; then
16485   cat >> confdefs.h <<\EOF
16486 #define WORDS_BIGENDIAN 1
16487 EOF
16488
16489 fi
16490
16491 fi
16492
16493 echo $ac_n "checking size of short""... $ac_c" 1>&6
16494 echo "configure:16495: checking size of short" >&5 
16495 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
16496   echo $ac_n "(cached) $ac_c" 1>&6
16497 else
16498   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16499   cat > conftest.$ac_ext <<EOF
16500 #line 16501 "configure"
16501 #include "confdefs.h"
16502 #include "confdefs.h" 
16503 #include <sys/types.h> 
16504  
16505
16506 int main() {
16507 switch (0) case 0: case (sizeof (short) == $ac_size):;
16508 ; return 0; }
16509 EOF
16510 if { (eval echo configure:16511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16511   rm -rf conftest*
16512   ac_cv_sizeof_short=$ac_size
16513 else
16514   echo "configure: failed program was:" >&5
16515   cat conftest.$ac_ext >&5
16516 fi
16517 rm -f conftest* 
16518   if test x$ac_cv_sizeof_short != x ; then break; fi 
16519 done 
16520
16521 fi
16522  
16523 if test x$ac_cv_sizeof_short = x ; then 
16524   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
16525 fi 
16526 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
16527 cat >> confdefs.h <<EOF
16528 #define SIZEOF_SHORT $ac_cv_sizeof_short
16529 EOF
16530  
16531  
16532 echo $ac_n "checking size of int""... $ac_c" 1>&6
16533 echo "configure:16534: checking size of int" >&5 
16534 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
16535   echo $ac_n "(cached) $ac_c" 1>&6
16536 else
16537   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16538   cat > conftest.$ac_ext <<EOF
16539 #line 16540 "configure"
16540 #include "confdefs.h"
16541 #include "confdefs.h" 
16542 #include <sys/types.h> 
16543  
16544
16545 int main() {
16546 switch (0) case 0: case (sizeof (int) == $ac_size):;
16547 ; return 0; }
16548 EOF
16549 if { (eval echo configure:16550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16550   rm -rf conftest*
16551   ac_cv_sizeof_int=$ac_size
16552 else
16553   echo "configure: failed program was:" >&5
16554   cat conftest.$ac_ext >&5
16555 fi
16556 rm -f conftest* 
16557   if test x$ac_cv_sizeof_int != x ; then break; fi 
16558 done 
16559
16560 fi
16561  
16562 if test x$ac_cv_sizeof_int = x ; then 
16563   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
16564 fi 
16565 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
16566 cat >> confdefs.h <<EOF
16567 #define SIZEOF_INT $ac_cv_sizeof_int
16568 EOF
16569  
16570  
16571 echo $ac_n "checking size of long""... $ac_c" 1>&6
16572 echo "configure:16573: checking size of long" >&5 
16573 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
16574   echo $ac_n "(cached) $ac_c" 1>&6
16575 else
16576   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16577   cat > conftest.$ac_ext <<EOF
16578 #line 16579 "configure"
16579 #include "confdefs.h"
16580 #include "confdefs.h" 
16581 #include <sys/types.h> 
16582  
16583
16584 int main() {
16585 switch (0) case 0: case (sizeof (long) == $ac_size):;
16586 ; return 0; }
16587 EOF
16588 if { (eval echo configure:16589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16589   rm -rf conftest*
16590   ac_cv_sizeof_long=$ac_size
16591 else
16592   echo "configure: failed program was:" >&5
16593   cat conftest.$ac_ext >&5
16594 fi
16595 rm -f conftest* 
16596   if test x$ac_cv_sizeof_long != x ; then break; fi 
16597 done 
16598
16599 fi
16600  
16601 if test x$ac_cv_sizeof_long = x ; then 
16602   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
16603 fi 
16604 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
16605 cat >> confdefs.h <<EOF
16606 #define SIZEOF_LONG $ac_cv_sizeof_long
16607 EOF
16608  
16609
16610
16611 if test "$ac_cv_sizeof_int" -lt 4 ; then
16612         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
16613
16614         cat >> confdefs.h <<\EOF
16615 #define LBER_INT_T long
16616 EOF
16617
16618 else
16619         cat >> confdefs.h <<\EOF
16620 #define LBER_INT_T int
16621 EOF
16622
16623 fi
16624
16625 cat >> confdefs.h <<\EOF
16626 #define LBER_LEN_T long
16627 EOF
16628
16629 cat >> confdefs.h <<\EOF
16630 #define LBER_SOCKET_T int
16631 EOF
16632
16633 cat >> confdefs.h <<\EOF
16634 #define LBER_TAG_T long
16635 EOF
16636
16637
16638 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
16639 echo "configure:16640: checking for 8-bit clean memcmp" >&5
16640 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
16641   echo $ac_n "(cached) $ac_c" 1>&6
16642 else
16643   if test "$cross_compiling" = yes; then
16644   ac_cv_func_memcmp_clean=no
16645 else
16646   cat > conftest.$ac_ext <<EOF
16647 #line 16648 "configure"
16648 #include "confdefs.h"
16649
16650 main()
16651 {
16652   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
16653   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
16654 }
16655
16656 EOF
16657 if { (eval echo configure:16658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16658 then
16659   ac_cv_func_memcmp_clean=yes
16660 else
16661   echo "configure: failed program was:" >&5
16662   cat conftest.$ac_ext >&5
16663   rm -fr conftest*
16664   ac_cv_func_memcmp_clean=no
16665 fi
16666 rm -fr conftest*
16667 fi
16668
16669 fi
16670
16671 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
16672 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
16673
16674 echo $ac_n "checking for strftime""... $ac_c" 1>&6
16675 echo "configure:16676: checking for strftime" >&5
16676 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
16677   echo $ac_n "(cached) $ac_c" 1>&6
16678 else
16679   cat > conftest.$ac_ext <<EOF
16680 #line 16681 "configure"
16681 #include "confdefs.h"
16682 /* System header to define __stub macros and hopefully few prototypes,
16683     which can conflict with char strftime(); below.  */
16684 #include <assert.h>
16685 /* Override any gcc2 internal prototype to avoid an error.  */
16686 /* We use char because int might match the return type of a gcc2
16687     builtin and then its argument prototype would still apply.  */
16688 char strftime();
16689 char (*f)();
16690
16691 int main() {
16692
16693 /* The GNU C library defines this for functions which it implements
16694     to always fail with ENOSYS.  Some functions are actually named
16695     something starting with __ and the normal name is an alias.  */
16696 #if defined (__stub_strftime) || defined (__stub___strftime)
16697 choke me
16698 #else
16699 f = strftime;
16700 #endif
16701
16702 ; return 0; }
16703 EOF
16704 if { (eval echo configure:16705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16705   rm -rf conftest*
16706   eval "ac_cv_func_strftime=yes"
16707 else
16708   echo "configure: failed program was:" >&5
16709   cat conftest.$ac_ext >&5
16710   rm -rf conftest*
16711   eval "ac_cv_func_strftime=no"
16712 fi
16713 rm -f conftest*
16714 fi
16715
16716 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
16717   echo "$ac_t""yes" 1>&6
16718   cat >> confdefs.h <<\EOF
16719 #define HAVE_STRFTIME 1
16720 EOF
16721
16722 else
16723   echo "$ac_t""no" 1>&6
16724 # strftime is in -lintl on SCO UNIX.
16725 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
16726 echo "configure:16727: checking for strftime in -lintl" >&5
16727 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
16728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16729   echo $ac_n "(cached) $ac_c" 1>&6
16730 else
16731   ac_save_LIBS="$LIBS"
16732 LIBS="-lintl  $LIBS"
16733 cat > conftest.$ac_ext <<EOF
16734 #line 16735 "configure"
16735 #include "confdefs.h"
16736 /* Override any gcc2 internal prototype to avoid an error.  */
16737 /* We use char because int might match the return type of a gcc2
16738     builtin and then its argument prototype would still apply.  */
16739 char strftime();
16740
16741 int main() {
16742 strftime()
16743 ; return 0; }
16744 EOF
16745 if { (eval echo configure:16746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16746   rm -rf conftest*
16747   eval "ac_cv_lib_$ac_lib_var=yes"
16748 else
16749   echo "configure: failed program was:" >&5
16750   cat conftest.$ac_ext >&5
16751   rm -rf conftest*
16752   eval "ac_cv_lib_$ac_lib_var=no"
16753 fi
16754 rm -f conftest*
16755 LIBS="$ac_save_LIBS"
16756
16757 fi
16758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16759   echo "$ac_t""yes" 1>&6
16760   cat >> confdefs.h <<\EOF
16761 #define HAVE_STRFTIME 1
16762 EOF
16763
16764 LIBS="-lintl $LIBS"
16765 else
16766   echo "$ac_t""no" 1>&6
16767 fi
16768
16769 fi
16770
16771
16772 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
16773 echo "configure:16774: checking for inet_aton()" >&5
16774 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
16775   echo $ac_n "(cached) $ac_c" 1>&6
16776 else
16777   cat > conftest.$ac_ext <<EOF
16778 #line 16779 "configure"
16779 #include "confdefs.h"
16780
16781 #ifdef HAVE_SYS_TYPES_H
16782 #       include <sys/types.h>
16783 #endif
16784 #ifdef HAVE_SYS_SOCKET_H
16785 #       include <sys/socket.h>
16786 #       ifdef HAVE_SYS_SELECT_H
16787 #               include <sys/select.h>
16788 #       endif
16789 #       include <netinet/in.h>
16790 #       ifdef HAVE_ARPA_INET_H
16791 #               include <arpa/inet.h>
16792 #       endif
16793 #endif
16794
16795 int main() {
16796 struct in_addr in;
16797 int rc = inet_aton( "255.255.255.255", &in );
16798 ; return 0; }
16799 EOF
16800 if { (eval echo configure:16801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16801   rm -rf conftest*
16802   ol_cv_func_inet_aton=yes
16803 else
16804   echo "configure: failed program was:" >&5
16805   cat conftest.$ac_ext >&5
16806   rm -rf conftest*
16807   ol_cv_func_inet_aton=no
16808 fi
16809 rm -f conftest*
16810 fi
16811
16812 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
16813   if test $ol_cv_func_inet_aton != no; then
16814     cat >> confdefs.h <<\EOF
16815 #define HAVE_INET_ATON 1
16816 EOF
16817
16818   fi
16819  
16820
16821 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
16822 echo "configure:16823: checking for _spawnlp" >&5
16823 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
16824   echo $ac_n "(cached) $ac_c" 1>&6
16825 else
16826   cat > conftest.$ac_ext <<EOF
16827 #line 16828 "configure"
16828 #include "confdefs.h"
16829 /* System header to define __stub macros and hopefully few prototypes,
16830     which can conflict with char _spawnlp(); below.  */
16831 #include <assert.h>
16832 /* Override any gcc2 internal prototype to avoid an error.  */
16833 /* We use char because int might match the return type of a gcc2
16834     builtin and then its argument prototype would still apply.  */
16835 char _spawnlp();
16836 char (*f)();
16837
16838 int main() {
16839
16840 /* The GNU C library defines this for functions which it implements
16841     to always fail with ENOSYS.  Some functions are actually named
16842     something starting with __ and the normal name is an alias.  */
16843 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
16844 choke me
16845 #else
16846 f = _spawnlp;
16847 #endif
16848
16849 ; return 0; }
16850 EOF
16851 if { (eval echo configure:16852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16852   rm -rf conftest*
16853   eval "ac_cv_func__spawnlp=yes"
16854 else
16855   echo "configure: failed program was:" >&5
16856   cat conftest.$ac_ext >&5
16857   rm -rf conftest*
16858   eval "ac_cv_func__spawnlp=no"
16859 fi
16860 rm -f conftest*
16861 fi
16862
16863 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
16864   echo "$ac_t""yes" 1>&6
16865   cat >> confdefs.h <<\EOF
16866 #define HAVE_SPAWNLP 1
16867 EOF
16868
16869 else
16870   echo "$ac_t""no" 1>&6
16871 fi
16872
16873
16874 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
16875 echo "configure:16876: checking for _snprintf" >&5
16876 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
16877   echo $ac_n "(cached) $ac_c" 1>&6
16878 else
16879   cat > conftest.$ac_ext <<EOF
16880 #line 16881 "configure"
16881 #include "confdefs.h"
16882 /* System header to define __stub macros and hopefully few prototypes,
16883     which can conflict with char _snprintf(); below.  */
16884 #include <assert.h>
16885 /* Override any gcc2 internal prototype to avoid an error.  */
16886 /* We use char because int might match the return type of a gcc2
16887     builtin and then its argument prototype would still apply.  */
16888 char _snprintf();
16889 char (*f)();
16890
16891 int main() {
16892
16893 /* The GNU C library defines this for functions which it implements
16894     to always fail with ENOSYS.  Some functions are actually named
16895     something starting with __ and the normal name is an alias.  */
16896 #if defined (__stub__snprintf) || defined (__stub____snprintf)
16897 choke me
16898 #else
16899 f = _snprintf;
16900 #endif
16901
16902 ; return 0; }
16903 EOF
16904 if { (eval echo configure:16905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16905   rm -rf conftest*
16906   eval "ac_cv_func__snprintf=yes"
16907 else
16908   echo "configure: failed program was:" >&5
16909   cat conftest.$ac_ext >&5
16910   rm -rf conftest*
16911   eval "ac_cv_func__snprintf=no"
16912 fi
16913 rm -f conftest*
16914 fi
16915
16916 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
16917   echo "$ac_t""yes" 1>&6
16918   ac_cv_func_snprintf=yes
16919         cat >> confdefs.h <<\EOF
16920 #define snprintf _snprintf
16921 EOF
16922
16923
16924 else
16925   echo "$ac_t""no" 1>&6
16926 fi
16927
16928
16929 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
16930 echo "configure:16931: checking for _vsnprintf" >&5
16931 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
16932   echo $ac_n "(cached) $ac_c" 1>&6
16933 else
16934   cat > conftest.$ac_ext <<EOF
16935 #line 16936 "configure"
16936 #include "confdefs.h"
16937 /* System header to define __stub macros and hopefully few prototypes,
16938     which can conflict with char _vsnprintf(); below.  */
16939 #include <assert.h>
16940 /* Override any gcc2 internal prototype to avoid an error.  */
16941 /* We use char because int might match the return type of a gcc2
16942     builtin and then its argument prototype would still apply.  */
16943 char _vsnprintf();
16944 char (*f)();
16945
16946 int main() {
16947
16948 /* The GNU C library defines this for functions which it implements
16949     to always fail with ENOSYS.  Some functions are actually named
16950     something starting with __ and the normal name is an alias.  */
16951 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
16952 choke me
16953 #else
16954 f = _vsnprintf;
16955 #endif
16956
16957 ; return 0; }
16958 EOF
16959 if { (eval echo configure:16960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16960   rm -rf conftest*
16961   eval "ac_cv_func__vsnprintf=yes"
16962 else
16963   echo "configure: failed program was:" >&5
16964   cat conftest.$ac_ext >&5
16965   rm -rf conftest*
16966   eval "ac_cv_func__vsnprintf=no"
16967 fi
16968 rm -f conftest*
16969 fi
16970
16971 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
16972   echo "$ac_t""yes" 1>&6
16973   ac_cv_func_vsnprintf=yes
16974         cat >> confdefs.h <<\EOF
16975 #define vsnprintf _vsnprintf
16976 EOF
16977
16978
16979 else
16980   echo "$ac_t""no" 1>&6
16981 fi
16982
16983
16984 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
16985 echo "configure:16986: checking for vprintf" >&5
16986 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
16987   echo $ac_n "(cached) $ac_c" 1>&6
16988 else
16989   cat > conftest.$ac_ext <<EOF
16990 #line 16991 "configure"
16991 #include "confdefs.h"
16992 /* System header to define __stub macros and hopefully few prototypes,
16993     which can conflict with char vprintf(); below.  */
16994 #include <assert.h>
16995 /* Override any gcc2 internal prototype to avoid an error.  */
16996 /* We use char because int might match the return type of a gcc2
16997     builtin and then its argument prototype would still apply.  */
16998 char vprintf();
16999 char (*f)();
17000
17001 int main() {
17002
17003 /* The GNU C library defines this for functions which it implements
17004     to always fail with ENOSYS.  Some functions are actually named
17005     something starting with __ and the normal name is an alias.  */
17006 #if defined (__stub_vprintf) || defined (__stub___vprintf)
17007 choke me
17008 #else
17009 f = vprintf;
17010 #endif
17011
17012 ; return 0; }
17013 EOF
17014 if { (eval echo configure:17015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17015   rm -rf conftest*
17016   eval "ac_cv_func_vprintf=yes"
17017 else
17018   echo "configure: failed program was:" >&5
17019   cat conftest.$ac_ext >&5
17020   rm -rf conftest*
17021   eval "ac_cv_func_vprintf=no"
17022 fi
17023 rm -f conftest*
17024 fi
17025
17026 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
17027   echo "$ac_t""yes" 1>&6
17028   cat >> confdefs.h <<\EOF
17029 #define HAVE_VPRINTF 1
17030 EOF
17031
17032 else
17033   echo "$ac_t""no" 1>&6
17034 fi
17035
17036 if test "$ac_cv_func_vprintf" != yes; then
17037 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
17038 echo "configure:17039: checking for _doprnt" >&5
17039 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
17040   echo $ac_n "(cached) $ac_c" 1>&6
17041 else
17042   cat > conftest.$ac_ext <<EOF
17043 #line 17044 "configure"
17044 #include "confdefs.h"
17045 /* System header to define __stub macros and hopefully few prototypes,
17046     which can conflict with char _doprnt(); below.  */
17047 #include <assert.h>
17048 /* Override any gcc2 internal prototype to avoid an error.  */
17049 /* We use char because int might match the return type of a gcc2
17050     builtin and then its argument prototype would still apply.  */
17051 char _doprnt();
17052 char (*f)();
17053
17054 int main() {
17055
17056 /* The GNU C library defines this for functions which it implements
17057     to always fail with ENOSYS.  Some functions are actually named
17058     something starting with __ and the normal name is an alias.  */
17059 #if defined (__stub__doprnt) || defined (__stub____doprnt)
17060 choke me
17061 #else
17062 f = _doprnt;
17063 #endif
17064
17065 ; return 0; }
17066 EOF
17067 if { (eval echo configure:17068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17068   rm -rf conftest*
17069   eval "ac_cv_func__doprnt=yes"
17070 else
17071   echo "configure: failed program was:" >&5
17072   cat conftest.$ac_ext >&5
17073   rm -rf conftest*
17074   eval "ac_cv_func__doprnt=no"
17075 fi
17076 rm -f conftest*
17077 fi
17078
17079 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
17080   echo "$ac_t""yes" 1>&6
17081   cat >> confdefs.h <<\EOF
17082 #define HAVE_DOPRNT 1
17083 EOF
17084
17085 else
17086   echo "$ac_t""no" 1>&6
17087 fi
17088
17089 fi
17090
17091
17092 if test $ac_cv_func_vprintf = yes ; then
17093                 for ac_func in vsnprintf vsprintf
17094 do
17095 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17096 echo "configure:17097: checking for $ac_func" >&5
17097 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17098   echo $ac_n "(cached) $ac_c" 1>&6
17099 else
17100   cat > conftest.$ac_ext <<EOF
17101 #line 17102 "configure"
17102 #include "confdefs.h"
17103 /* System header to define __stub macros and hopefully few prototypes,
17104     which can conflict with char $ac_func(); below.  */
17105 #include <assert.h>
17106 /* Override any gcc2 internal prototype to avoid an error.  */
17107 /* We use char because int might match the return type of a gcc2
17108     builtin and then its argument prototype would still apply.  */
17109 char $ac_func();
17110 char (*f)();
17111
17112 int main() {
17113
17114 /* The GNU C library defines this for functions which it implements
17115     to always fail with ENOSYS.  Some functions are actually named
17116     something starting with __ and the normal name is an alias.  */
17117 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17118 choke me
17119 #else
17120 f = $ac_func;
17121 #endif
17122
17123 ; return 0; }
17124 EOF
17125 if { (eval echo configure:17126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17126   rm -rf conftest*
17127   eval "ac_cv_func_$ac_func=yes"
17128 else
17129   echo "configure: failed program was:" >&5
17130   cat conftest.$ac_ext >&5
17131   rm -rf conftest*
17132   eval "ac_cv_func_$ac_func=no"
17133 fi
17134 rm -f conftest*
17135 fi
17136
17137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17138   echo "$ac_t""yes" 1>&6
17139     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17140   cat >> confdefs.h <<EOF
17141 #define $ac_tr_func 1
17142 EOF
17143  
17144 else
17145   echo "$ac_t""no" 1>&6
17146 fi
17147 done
17148
17149 fi
17150
17151 for ac_func in \
17152         bcopy                   \
17153         closesocket             \
17154         chroot                  \
17155         endgrent                \
17156         endpwent                \
17157         fcntl                   \
17158         flock                   \
17159         getdtablesize   \
17160         getgrgid                \
17161         gethostname             \
17162         getpass                 \
17163         getpassphrase   \
17164         getpwuid                \
17165         getpwnam                \
17166         getspnam                \
17167         gettimeofday    \
17168         initgroups              \
17169         lockf                   \
17170         memcpy                  \
17171         memmove                 \
17172         pipe                    \
17173         read                    \
17174         recv                    \
17175         recvfrom                \
17176         setpwfile               \
17177         setgid                  \
17178         setegid                 \
17179         setsid                  \
17180         setuid                  \
17181         seteuid                 \
17182         sigaction               \
17183         signal                  \
17184         sigset                  \
17185         strdup                  \
17186         strerror                \
17187         strpbrk                 \
17188         strrchr                 \
17189         strsep                  \
17190         strstr                  \
17191         strtol                  \
17192         strtoul                 \
17193         strspn                  \
17194         sysconf                 \
17195         waitpid                 \
17196         wait4                   \
17197         write                   \
17198         send                    \
17199         sendto                  \
17200
17201 do
17202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17203 echo "configure:17204: checking for $ac_func" >&5
17204 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17205   echo $ac_n "(cached) $ac_c" 1>&6
17206 else
17207   cat > conftest.$ac_ext <<EOF
17208 #line 17209 "configure"
17209 #include "confdefs.h"
17210 /* System header to define __stub macros and hopefully few prototypes,
17211     which can conflict with char $ac_func(); below.  */
17212 #include <assert.h>
17213 /* Override any gcc2 internal prototype to avoid an error.  */
17214 /* We use char because int might match the return type of a gcc2
17215     builtin and then its argument prototype would still apply.  */
17216 char $ac_func();
17217 char (*f)();
17218
17219 int main() {
17220
17221 /* The GNU C library defines this for functions which it implements
17222     to always fail with ENOSYS.  Some functions are actually named
17223     something starting with __ and the normal name is an alias.  */
17224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17225 choke me
17226 #else
17227 f = $ac_func;
17228 #endif
17229
17230 ; return 0; }
17231 EOF
17232 if { (eval echo configure:17233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17233   rm -rf conftest*
17234   eval "ac_cv_func_$ac_func=yes"
17235 else
17236   echo "configure: failed program was:" >&5
17237   cat conftest.$ac_ext >&5
17238   rm -rf conftest*
17239   eval "ac_cv_func_$ac_func=no"
17240 fi
17241 rm -f conftest*
17242 fi
17243
17244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17245   echo "$ac_t""yes" 1>&6
17246     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17247   cat >> confdefs.h <<EOF
17248 #define $ac_tr_func 1
17249 EOF
17250  
17251 else
17252   echo "$ac_t""no" 1>&6
17253 fi
17254 done
17255
17256
17257 for ac_func in getopt
17258 do
17259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17260 echo "configure:17261: checking for $ac_func" >&5
17261 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17262   echo $ac_n "(cached) $ac_c" 1>&6
17263 else
17264   cat > conftest.$ac_ext <<EOF
17265 #line 17266 "configure"
17266 #include "confdefs.h"
17267 /* System header to define __stub macros and hopefully few prototypes,
17268     which can conflict with char $ac_func(); below.  */
17269 #include <assert.h>
17270 /* Override any gcc2 internal prototype to avoid an error.  */
17271 /* We use char because int might match the return type of a gcc2
17272     builtin and then its argument prototype would still apply.  */
17273 char $ac_func();
17274 char (*f)();
17275
17276 int main() {
17277
17278 /* The GNU C library defines this for functions which it implements
17279     to always fail with ENOSYS.  Some functions are actually named
17280     something starting with __ and the normal name is an alias.  */
17281 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17282 choke me
17283 #else
17284 f = $ac_func;
17285 #endif
17286
17287 ; return 0; }
17288 EOF
17289 if { (eval echo configure:17290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17290   rm -rf conftest*
17291   eval "ac_cv_func_$ac_func=yes"
17292 else
17293   echo "configure: failed program was:" >&5
17294   cat conftest.$ac_ext >&5
17295   rm -rf conftest*
17296   eval "ac_cv_func_$ac_func=no"
17297 fi
17298 rm -f conftest*
17299 fi
17300
17301 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17302   echo "$ac_t""yes" 1>&6
17303     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17304   cat >> confdefs.h <<EOF
17305 #define $ac_tr_func 1
17306 EOF
17307  
17308 else
17309   echo "$ac_t""no" 1>&6
17310 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
17311 fi
17312 done
17313
17314
17315
17316 if test "$ac_cv_func_getopt" != yes; then
17317     LIBSRCS="$LIBSRCS getopt.c"
17318 fi
17319
17320 # Check Configuration
17321 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
17322 echo "configure:17323: checking declaration of sys_errlist" >&5
17323 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
17324   echo $ac_n "(cached) $ac_c" 1>&6
17325 else
17326   
17327         cat > conftest.$ac_ext <<EOF
17328 #line 17329 "configure"
17329 #include "confdefs.h"
17330
17331 #include <stdio.h>
17332 #include <sys/types.h>
17333 #include <errno.h>
17334 #ifdef WINNT
17335 #include <stdlib.h>
17336 #endif 
17337 int main() {
17338 char *c = (char *) *sys_errlist
17339 ; return 0; }
17340 EOF
17341 if { (eval echo configure:17342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17342   rm -rf conftest*
17343   ol_cv_dcl_sys_errlist=yes
17344         ol_cv_have_sys_errlist=yes
17345 else
17346   echo "configure: failed program was:" >&5
17347   cat conftest.$ac_ext >&5
17348   rm -rf conftest*
17349   ol_cv_dcl_sys_errlist=no
17350 fi
17351 rm -f conftest*
17352 fi
17353
17354 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
17355 #
17356 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
17357 if test $ol_cv_dcl_sys_errlist = no ; then
17358         cat >> confdefs.h <<\EOF
17359 #define DECL_SYS_ERRLIST 1
17360 EOF
17361
17362
17363         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
17364 echo "configure:17365: checking existence of sys_errlist" >&5
17365 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
17366   echo $ac_n "(cached) $ac_c" 1>&6
17367 else
17368   
17369                 cat > conftest.$ac_ext <<EOF
17370 #line 17371 "configure"
17371 #include "confdefs.h"
17372 #include <errno.h>
17373 int main() {
17374 char *c = (char *) *sys_errlist
17375 ; return 0; }
17376 EOF
17377 if { (eval echo configure:17378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17378   rm -rf conftest*
17379   ol_cv_have_sys_errlist=yes
17380 else
17381   echo "configure: failed program was:" >&5
17382   cat conftest.$ac_ext >&5
17383   rm -rf conftest*
17384   ol_cv_have_sys_errlist=no
17385 fi
17386 rm -f conftest*
17387 fi
17388
17389 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
17390 fi
17391 if test $ol_cv_have_sys_errlist = yes ; then
17392         cat >> confdefs.h <<\EOF
17393 #define HAVE_SYS_ERRLIST 1
17394 EOF
17395
17396 fi
17397
17398
17399
17400 if test "$ol_enable_debug" != no ; then
17401         cat >> confdefs.h <<\EOF
17402 #define LDAP_DEBUG 1
17403 EOF
17404
17405 fi
17406 if test "$ol_enable_syslog" = yes ; then
17407         cat >> confdefs.h <<\EOF
17408 #define LDAP_SYSLOG 1
17409 EOF
17410
17411 fi
17412 if test "$ol_enable_cache" = no ; then
17413         cat >> confdefs.h <<\EOF
17414 #define LDAP_NOCACHE 1
17415 EOF
17416
17417 fi
17418 if test "$ol_link_kbind" != no ; then
17419         cat >> confdefs.h <<\EOF
17420 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
17421 EOF
17422
17423 fi
17424 if test "$ol_enable_proctitle" != no ; then
17425         cat >> confdefs.h <<\EOF
17426 #define LDAP_PROCTITLE 1
17427 EOF
17428
17429 fi
17430 if test "$ol_enable_referrals" != no ; then
17431         cat >> confdefs.h <<\EOF
17432 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
17433 EOF
17434
17435 fi
17436 if test "$ol_enable_local" != no; then
17437         cat >> confdefs.h <<\EOF
17438 #define LDAP_PF_LOCAL 1
17439 EOF
17440
17441 fi
17442 if test "$ol_link_ipv6" != no; then
17443         cat >> confdefs.h <<\EOF
17444 #define LDAP_PF_INET6 1
17445 EOF
17446
17447 fi
17448 if test "$ol_enable_cleartext" != no ; then
17449         cat >> confdefs.h <<\EOF
17450 #define SLAPD_CLEARTEXT 1
17451 EOF
17452
17453 fi
17454 if test "$ol_enable_crypt" != no ; then
17455         cat >> confdefs.h <<\EOF
17456 #define SLAPD_CRYPT 1
17457 EOF
17458
17459 fi
17460 if test "$ol_link_kpasswd" != no ; then
17461         cat >> confdefs.h <<\EOF
17462 #define SLAPD_KPASSWD 1
17463 EOF
17464
17465 fi
17466 if test "$ol_link_spasswd" != no ; then
17467         cat >> confdefs.h <<\EOF
17468 #define SLAPD_SPASSWD 1
17469 EOF
17470
17471 fi
17472 if test "$ol_enable_phonetic" != no ; then
17473         cat >> confdefs.h <<\EOF
17474 #define SLAPD_PHONETIC 1
17475 EOF
17476
17477 fi
17478 if test "$ol_enable_rlookups" != no ; then
17479         cat >> confdefs.h <<\EOF
17480 #define SLAPD_RLOOKUPS 1
17481 EOF
17482
17483 fi
17484 if test "$ol_enable_aci" != no ; then
17485         cat >> confdefs.h <<\EOF
17486 #define SLAPD_ACI_ENABLED 1
17487 EOF
17488
17489 fi
17490
17491 if test "$ol_link_modules" != no ; then
17492         cat >> confdefs.h <<\EOF
17493 #define SLAPD_MODULES 1
17494 EOF
17495
17496         BUILD_SLAPD=yes
17497         SLAPD_MODULES_LDFLAGS="-dlopen self"
17498 fi
17499
17500 if test "$ol_enable_bdb" != no ; then
17501         cat >> confdefs.h <<\EOF
17502 #define SLAPD_BDB 1
17503 EOF
17504
17505         BUILD_SLAPD=yes
17506         BUILD_BDB=yes
17507         if test "$ol_with_bdb_module" != static ; then
17508                 cat >> confdefs.h <<\EOF
17509 #define SLAPD_BDB_DYNAMIC 1
17510 EOF
17511
17512                 BUILD_BDB=mod
17513                 BUILD_BDB_DYNAMIC=shared
17514                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
17515         fi
17516 fi
17517
17518 if test "$ol_link_dnssrv" != no ; then
17519         cat >> confdefs.h <<\EOF
17520 #define SLAPD_DNSSRV 1
17521 EOF
17522
17523         BUILD_SLAPD=yes
17524         BUILD_DNSSRV=yes
17525         if test "$ol_with_dnssrv_module" != static ; then
17526                 cat >> confdefs.h <<\EOF
17527 #define SLAPD_DNSSRV_DYNAMIC 1
17528 EOF
17529
17530                 BUILD_DNSSRV=mod
17531                 BUILD_DNSSRV_DYNAMIC=shared
17532                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
17533         fi
17534 fi
17535
17536 if test "$ol_enable_ldap" != no ; then
17537         cat >> confdefs.h <<\EOF
17538 #define SLAPD_LDAP 1
17539 EOF
17540
17541         BUILD_SLAPD=yes
17542         BUILD_LDAP=yes
17543         if test "$ol_with_ldap_module" != static ; then
17544                 cat >> confdefs.h <<\EOF
17545 #define SLAPD_LDAP_DYNAMIC 1
17546 EOF
17547
17548                 BUILD_LDAP=mod
17549                 BUILD_LDAP_DYNAMIC=shared
17550                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
17551         fi
17552 fi
17553
17554 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
17555         cat >> confdefs.h <<\EOF
17556 #define SLAPD_LDBM 1
17557 EOF
17558
17559         BUILD_SLAPD=yes
17560         BUILD_LDBM=yes
17561         if test "$ol_with_ldbm_module" != static ; then
17562                 cat >> confdefs.h <<\EOF
17563 #define SLAPD_LDBM_DYNAMIC 1
17564 EOF
17565
17566                 BUILD_LDBM=mod
17567                 BUILD_LDBM_DYNAMIC=shared
17568                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
17569         fi
17570 fi
17571
17572 if test "$ol_enable_meta" != no ; then
17573         if test "$ol_enable_ldap" = no ; then
17574                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
17575         fi
17576         if test "$ol_enable_rewrite" = no ; then
17577                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
17578         fi
17579         cat >> confdefs.h <<\EOF
17580 #define SLAPD_META 1
17581 EOF
17582
17583         BUILD_SLAPD=yes
17584         BUILD_META=yes
17585         if test "$ol_with_meta_module" != static ; then
17586                 cat >> confdefs.h <<\EOF
17587 #define SLAPD_META_DYNAMIC 1
17588 EOF
17589
17590                 BUILD_META=mod
17591                 BUILD_META_DYNAMIC=shared
17592                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
17593         fi
17594 fi
17595
17596 if test "$ol_enable_monitor" != no ; then
17597         cat >> confdefs.h <<\EOF
17598 #define SLAPD_MONITOR 1
17599 EOF
17600
17601         BUILD_SLAPD=yes
17602         BUILD_MONITOR=yes
17603         if test "$ol_with_monitor_module" != static ; then
17604                 cat >> confdefs.h <<\EOF
17605 #define SLAPD_MONITOR_DYNAMIC 1
17606 EOF
17607
17608                 BUILD_MONITOR=mod
17609                 BUILD_MONITOR_DYNAMIC=shared
17610                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
17611         fi
17612 fi
17613
17614 if test "$ol_enable_passwd" != no ; then
17615         cat >> confdefs.h <<\EOF
17616 #define SLAPD_PASSWD 1
17617 EOF
17618
17619         BUILD_SLAPD=yes
17620         BUILD_PASSWD=yes
17621         if test "$ol_with_passwd_module" != static ; then
17622                 cat >> confdefs.h <<\EOF
17623 #define SLAPD_PASSWD_DYNAMIC 1
17624 EOF
17625
17626                 BUILD_PASSWD=mod
17627                 BUILD_PASSWD_DYNAMIC=shared
17628                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
17629         fi
17630 fi
17631
17632 if test "$ol_link_perl" != no ; then
17633         cat >> confdefs.h <<\EOF
17634 #define SLAPD_PERL 1
17635 EOF
17636
17637         BUILD_SLAPD=yes
17638         BUILD_PERL=yes
17639         if test "$ol_with_perl_module" != static ; then
17640                 cat >> confdefs.h <<\EOF
17641 #define SLAPD_PERL_DYNAMIC 1
17642 EOF
17643
17644                 BUILD_PERL=mod
17645                 BUILD_PERL_DYNAMIC=shared
17646                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
17647         fi
17648 fi
17649
17650 if test "$ol_enable_shell" != no ; then
17651         cat >> confdefs.h <<\EOF
17652 #define SLAPD_SHELL 1
17653 EOF
17654
17655         BUILD_SLAPD=yes
17656         BUILD_SHELL=yes
17657         if test "$ol_with_shell_module" != static ; then
17658                 cat >> confdefs.h <<\EOF
17659 #define SLAPD_SHELL_DYNAMIC 1
17660 EOF
17661
17662                 BUILD_SHELL=mod
17663                 BUILD_SHELL_DYNAMIC=shared
17664                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
17665         fi
17666 fi
17667
17668 if test "$ol_enable_tcl" != no ; then
17669         cat >> confdefs.h <<\EOF
17670 #define SLAPD_TCL 1
17671 EOF
17672
17673         BUILD_SLAPD=yes
17674         BUILD_TCL=yes
17675         if test "$ol_with_tcl_module" != static; then
17676                 cat >> confdefs.h <<\EOF
17677 #define SLAPD_TCL_DYNAMIC 1
17678 EOF
17679
17680                 BUILD_TCL=mod
17681                 BUILD_TCL_DYNAMIC=shared
17682                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
17683         fi
17684 fi
17685
17686 if test "$ol_link_sql" != no ; then
17687         cat >> confdefs.h <<\EOF
17688 #define SLAPD_SQL 1
17689 EOF
17690
17691         BUILD_SLAPD=yes
17692         BUILD_SQL=yes
17693         if test "$ol_with_sql_module" != static; then
17694                 cat >> confdefs.h <<\EOF
17695 #define SLAPD_SQL_DYNAMIC 1
17696 EOF
17697
17698                 BUILD_SQL=mod
17699                 BUILD_SQL_DYNAMIC=shared
17700                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
17701         fi
17702 fi
17703
17704 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
17705         $BUILD_SLAPD = yes ; then
17706         BUILD_SLURPD=yes
17707 fi
17708
17709 if test "$ol_enable_rewrite" != no ; then
17710         cat >> confdefs.h <<\EOF
17711 #define ENABLE_REWRITE 1
17712 EOF
17713
17714         BUILD_REWRITE=yes
17715         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
17716 fi
17717
17718
17719 if test "$LINK_BINS_DYNAMIC" = yes; then
17720     LIB_LINKAGE=DYN
17721     LT_LIB_LINKAGE=shared
17722 else
17723     LIB_LINKAGE=STAT
17724     LT_LIB_LINKAGE=static
17725 fi
17726
17727 if test "$ac_cv_mingw32" = yes ; then
17728     PLAT=NT
17729     DYN_EXT=dll
17730 else
17731     PLAT=UNIX
17732     DYN_EXT=so
17733 fi
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743   
17744   
17745   
17746   
17747   
17748   
17749   
17750   
17751   
17752   
17753   
17754   
17755   
17756   
17757   
17758   
17759   
17760   
17761   
17762   
17763   
17764   
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802 trap '' 1 2 15
17803
17804 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
17805
17806 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17807 # Let make expand exec_prefix.
17808 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17809
17810 # Any assignment to VPATH causes Sun make to only execute
17811 # the first set of double-colon rules, so remove it if not needed.
17812 # If there is a colon in the path, we need to keep it.
17813 if test "x$srcdir" = x.; then
17814   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
17815 fi
17816
17817 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
17818
17819 DEFS=-DHAVE_CONFIG_H
17820
17821 # Without the "./", some shells look in PATH for config.status.
17822 : ${CONFIG_STATUS=./config.status}
17823
17824 echo creating $CONFIG_STATUS
17825 rm -f $CONFIG_STATUS
17826 cat > $CONFIG_STATUS <<EOF
17827 #! /bin/sh
17828 # Generated automatically by configure.
17829 # Run this file to recreate the current configuration.
17830 # This directory was configured as follows,
17831 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
17832 #
17833 # $0 $ac_configure_args
17834 #
17835 # Compiler output produced by configure, useful for debugging
17836 # configure, is in ./config.log if it exists.
17837
17838 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
17839 for ac_option
17840 do
17841   case "\$ac_option" in
17842   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17843     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
17844     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
17845   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
17846     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
17847     exit 0 ;;
17848   -help | --help | --hel | --he | --h)
17849     echo "\$ac_cs_usage"; exit 0 ;;
17850   *) echo "\$ac_cs_usage"; exit 1 ;;
17851   esac
17852 done
17853
17854 ac_given_srcdir=$srcdir
17855 ac_given_INSTALL="$INSTALL"
17856
17857 trap 'rm -fr `echo "\
17858 Makefile:build/top.mk:Makefile.in:build/dir.mk \
17859 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
17860 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
17861 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
17862 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
17863 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
17864 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
17865 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
17866 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
17867 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
17868 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
17869 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
17870 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
17871 include/Makefile:build/top.mk:include/Makefile.in \
17872 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
17873 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
17874 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17875 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17876 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
17877 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
17878 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
17879 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
17880 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
17881 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
17882 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17883 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17884 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
17885 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17886 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17887 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17888 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
17889 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
17890 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17891 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
17892 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17893 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17894 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
17895 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17896 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17897 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17898 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17899 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17900 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17901 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17902  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
17903 EOF
17904 cat >> $CONFIG_STATUS <<EOF
17905
17906 # Protect against being on the right side of a sed subst in config.status.
17907 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
17908  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
17909 $ac_vpsub
17910 $extrasub
17911 s%@SHELL@%$SHELL%g
17912 s%@CFLAGS@%$CFLAGS%g
17913 s%@CPPFLAGS@%$CPPFLAGS%g
17914 s%@CXXFLAGS@%$CXXFLAGS%g
17915 s%@FFLAGS@%$FFLAGS%g
17916 s%@DEFS@%$DEFS%g
17917 s%@LDFLAGS@%$LDFLAGS%g
17918 s%@LIBS@%$LIBS%g
17919 s%@exec_prefix@%$exec_prefix%g
17920 s%@prefix@%$prefix%g
17921 s%@program_transform_name@%$program_transform_name%g
17922 s%@bindir@%$bindir%g
17923 s%@sbindir@%$sbindir%g
17924 s%@libexecdir@%$libexecdir%g
17925 s%@datadir@%$datadir%g
17926 s%@sysconfdir@%$sysconfdir%g
17927 s%@sharedstatedir@%$sharedstatedir%g
17928 s%@localstatedir@%$localstatedir%g
17929 s%@libdir@%$libdir%g
17930 s%@includedir@%$includedir%g
17931 s%@oldincludedir@%$oldincludedir%g
17932 s%@infodir@%$infodir%g
17933 s%@mandir@%$mandir%g
17934 s%@host@%$host%g
17935 s%@host_alias@%$host_alias%g
17936 s%@host_cpu@%$host_cpu%g
17937 s%@host_vendor@%$host_vendor%g
17938 s%@host_os@%$host_os%g
17939 s%@target@%$target%g
17940 s%@target_alias@%$target_alias%g
17941 s%@target_cpu@%$target_cpu%g
17942 s%@target_vendor@%$target_vendor%g
17943 s%@target_os@%$target_os%g
17944 s%@build@%$build%g
17945 s%@build_alias@%$build_alias%g
17946 s%@build_cpu@%$build_cpu%g
17947 s%@build_vendor@%$build_vendor%g
17948 s%@build_os@%$build_os%g
17949 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
17950 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
17951 s%@INSTALL_DATA@%$INSTALL_DATA%g
17952 s%@PACKAGE@%$PACKAGE%g
17953 s%@VERSION@%$VERSION%g
17954 s%@ACLOCAL@%$ACLOCAL%g
17955 s%@AUTOCONF@%$AUTOCONF%g
17956 s%@AUTOMAKE@%$AUTOMAKE%g
17957 s%@AUTOHEADER@%$AUTOHEADER%g
17958 s%@MAKEINFO@%$MAKEINFO%g
17959 s%@install_sh@%$install_sh%g
17960 s%@AMTAR@%$AMTAR%g
17961 s%@AWK@%$AWK%g
17962 s%@AMTARFLAGS@%$AMTARFLAGS%g
17963 s%@SET_MAKE@%$SET_MAKE%g
17964 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
17965 s%@top_builddir@%$top_builddir%g
17966 s%@ldap_subdir@%$ldap_subdir%g
17967 s%@CC@%$CC%g
17968 s%@RANLIB@%$RANLIB%g
17969 s%@LN_S@%$LN_S%g
17970 s%@DLLTOOL@%$DLLTOOL%g
17971 s%@AS@%$AS%g
17972 s%@OBJDUMP@%$OBJDUMP%g
17973 s%@LIBTOOL@%$LIBTOOL%g
17974 s%@LN_H@%$LN_H%g
17975 s%@SENDMAIL@%$SENDMAIL%g
17976 s%@EDITOR@%$EDITOR%g
17977 s%@FINGER@%$FINGER%g
17978 s%@PERLBIN@%$PERLBIN%g
17979 s%@CPP@%$CPP%g
17980 s%@EXEEXT@%$EXEEXT%g
17981 s%@OBJEXT@%$OBJEXT%g
17982 s%@OL_MKDEP@%$OL_MKDEP%g
17983 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
17984 s%@LIBOBJS@%$LIBOBJS%g
17985 s%@LIBSRCS@%$LIBSRCS%g
17986 s%@PLAT@%$PLAT%g
17987 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
17988 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
17989 s%@DYN_EXT@%$DYN_EXT%g
17990 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
17991 s%@BUILD_BDB@%$BUILD_BDB%g
17992 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
17993 s%@BUILD_LDAP@%$BUILD_LDAP%g
17994 s%@BUILD_LDBM@%$BUILD_LDBM%g
17995 s%@BUILD_META@%$BUILD_META%g
17996 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
17997 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
17998 s%@BUILD_PERL@%$BUILD_PERL%g
17999 s%@BUILD_SHELL@%$BUILD_SHELL%g
18000 s%@BUILD_SQL@%$BUILD_SQL%g
18001 s%@BUILD_TCL@%$BUILD_TCL%g
18002 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
18003 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
18004 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
18005 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
18006 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
18007 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
18008 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
18009 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
18010 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
18011 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
18012 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
18013 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
18014 s%@LDAP_LIBS@%$LDAP_LIBS%g
18015 s%@LDIF_LIBS@%$LDIF_LIBS%g
18016 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
18017 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
18018 s%@LDBM_LIBS@%$LDBM_LIBS%g
18019 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
18020 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
18021 s%@WRAP_LIBS@%$WRAP_LIBS%g
18022 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
18023 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
18024 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
18025 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
18026 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
18027 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
18028 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
18029 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
18030 s%@KRB4_LIBS@%$KRB4_LIBS%g
18031 s%@KRB5_LIBS@%$KRB5_LIBS%g
18032 s%@READLINE_LIBS@%$READLINE_LIBS%g
18033 s%@SASL_LIBS@%$SASL_LIBS%g
18034 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
18035 s%@TLS_LIBS@%$TLS_LIBS%g
18036 s%@MODULES_LIBS@%$MODULES_LIBS%g
18037 s%@AUTH_LIBS@%$AUTH_LIBS%g
18038 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
18039 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
18040 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
18041 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
18042
18043 CEOF
18044 EOF
18045
18046 cat >> $CONFIG_STATUS <<\EOF
18047
18048 # Split the substitutions into bite-sized pieces for seds with
18049 # small command number limits, like on Digital OSF/1 and HP-UX.
18050 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
18051 ac_file=1 # Number of current file.
18052 ac_beg=1 # First line for current file.
18053 ac_end=$ac_max_sed_cmds # Line after last line for current file.
18054 ac_more_lines=:
18055 ac_sed_cmds=""
18056 while $ac_more_lines; do
18057   if test $ac_beg -gt 1; then
18058     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
18059   else
18060     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
18061   fi
18062   if test ! -s conftest.s$ac_file; then
18063     ac_more_lines=false
18064     rm -f conftest.s$ac_file
18065   else
18066     if test -z "$ac_sed_cmds"; then
18067       ac_sed_cmds="sed -f conftest.s$ac_file"
18068     else
18069       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
18070     fi
18071     ac_file=`expr $ac_file + 1`
18072     ac_beg=$ac_end
18073     ac_end=`expr $ac_end + $ac_max_sed_cmds`
18074   fi
18075 done
18076 if test -z "$ac_sed_cmds"; then
18077   ac_sed_cmds=cat
18078 fi
18079 EOF
18080
18081 cat >> $CONFIG_STATUS <<EOF
18082
18083 CONFIG_FILES=\${CONFIG_FILES-"\
18084 Makefile:build/top.mk:Makefile.in:build/dir.mk \
18085 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
18086 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
18087 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
18088 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
18089 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
18090 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
18091 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
18092 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
18093 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
18094 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
18095 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
18096 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
18097 include/Makefile:build/top.mk:include/Makefile.in \
18098 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
18099 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
18100 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18101 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18102 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
18103 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
18104 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
18105 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
18106 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
18107 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
18108 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
18109 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
18110 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
18111 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
18112 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
18113 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
18114 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
18115 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
18116 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
18117 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
18118 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
18119 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
18120 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
18121 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
18122 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
18123 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
18124 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
18125 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
18126 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
18127 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
18128 "}
18129 EOF
18130 cat >> $CONFIG_STATUS <<\EOF
18131 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
18132   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18133   case "$ac_file" in
18134   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18135        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18136   *) ac_file_in="${ac_file}.in" ;;
18137   esac
18138
18139   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
18140
18141   # Remove last slash and all that follows it.  Not all systems have dirname.
18142   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18143   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18144     # The file is in a subdirectory.
18145     test ! -d "$ac_dir" && mkdir "$ac_dir"
18146     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
18147     # A "../" for each directory in $ac_dir_suffix.
18148     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
18149   else
18150     ac_dir_suffix= ac_dots=
18151   fi
18152
18153   case "$ac_given_srcdir" in
18154   .)  srcdir=.
18155       if test -z "$ac_dots"; then top_srcdir=.
18156       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
18157   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
18158   *) # Relative path.
18159     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
18160     top_srcdir="$ac_dots$ac_given_srcdir" ;;
18161   esac
18162
18163   case "$ac_given_INSTALL" in
18164   [/$]*) INSTALL="$ac_given_INSTALL" ;;
18165   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
18166   esac
18167
18168   echo creating "$ac_file"
18169   rm -f "$ac_file"
18170   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
18171   case "$ac_file" in
18172   *[Mm]akefile*) ac_comsub="1i\\
18173 # $configure_input" ;;
18174   *) ac_comsub= ;;
18175   esac
18176
18177   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18178   sed -e "$ac_comsub
18179 s%@configure_input@%$configure_input%g
18180 s%@srcdir@%$srcdir%g
18181 s%@top_srcdir@%$top_srcdir%g
18182 s%@INSTALL@%$INSTALL%g
18183 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
18184 fi; done
18185 rm -f conftest.s*
18186
18187 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18188 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18189 #
18190 # ac_d sets the value in "#define NAME VALUE" lines.
18191 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18192 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
18193 ac_dC='\3'
18194 ac_dD='%g'
18195 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18196 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18197 ac_uB='\([      ]\)%\1#\2define\3'
18198 ac_uC=' '
18199 ac_uD='\4%g'
18200 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18201 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18202 ac_eB='$%\1#\2define\3'
18203 ac_eC=' '
18204 ac_eD='%g'
18205
18206 if test "${CONFIG_HEADERS+set}" != set; then
18207 EOF
18208 cat >> $CONFIG_STATUS <<EOF
18209   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
18210 EOF
18211 cat >> $CONFIG_STATUS <<\EOF
18212 fi
18213 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
18214   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18215   case "$ac_file" in
18216   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18217        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18218   *) ac_file_in="${ac_file}.in" ;;
18219   esac
18220
18221   echo creating $ac_file
18222
18223   rm -f conftest.frag conftest.in conftest.out
18224   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18225   cat $ac_file_inputs > conftest.in
18226
18227 EOF
18228
18229 # Transform confdefs.h into a sed script conftest.vals that substitutes
18230 # the proper values into config.h.in to produce config.h.  And first:
18231 # Protect against being on the right side of a sed subst in config.status.
18232 # Protect against being in an unquoted here document in config.status.
18233 rm -f conftest.vals
18234 cat > conftest.hdr <<\EOF
18235 s/[\\&%]/\\&/g
18236 s%[\\$`]%\\&%g
18237 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
18238 s%ac_d%ac_u%gp
18239 s%ac_u%ac_e%gp
18240 EOF
18241 sed -n -f conftest.hdr confdefs.h > conftest.vals
18242 rm -f conftest.hdr
18243
18244 # This sed command replaces #undef with comments.  This is necessary, for
18245 # example, in the case of _POSIX_SOURCE, which is predefined and required
18246 # on some systems where configure will not decide to define it.
18247 cat >> conftest.vals <<\EOF
18248 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
18249 EOF
18250
18251 # Break up conftest.vals because some shells have a limit on
18252 # the size of here documents, and old seds have small limits too.
18253
18254 rm -f conftest.tail
18255 while :
18256 do
18257   ac_lines=`grep -c . conftest.vals`
18258   # grep -c gives empty output for an empty file on some AIX systems.
18259   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
18260   # Write a limited-size here document to conftest.frag.
18261   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
18262   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
18263   echo 'CEOF
18264   sed -f conftest.frag conftest.in > conftest.out
18265   rm -f conftest.in
18266   mv conftest.out conftest.in
18267 ' >> $CONFIG_STATUS
18268   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18269   rm -f conftest.vals
18270   mv conftest.tail conftest.vals
18271 done
18272 rm -f conftest.vals
18273
18274 cat >> $CONFIG_STATUS <<\EOF
18275   rm -f conftest.frag conftest.h
18276   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
18277   cat conftest.in >> conftest.h
18278   rm -f conftest.in
18279   if cmp -s $ac_file conftest.h 2>/dev/null; then
18280     echo "$ac_file is unchanged"
18281     rm -f conftest.h
18282   else
18283     # Remove last slash and all that follows it.  Not all systems have dirname.
18284       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18285       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18286       # The file is in a subdirectory.
18287       test ! -d "$ac_dir" && mkdir "$ac_dir"
18288     fi
18289     rm -f $ac_file
18290     mv conftest.h $ac_file
18291   fi
18292 fi; done
18293
18294 EOF
18295 cat >> $CONFIG_STATUS <<EOF
18296
18297 EOF
18298 cat >> $CONFIG_STATUS <<\EOF
18299
18300 date > stamp-h
18301 echo Please \"make depend\" to build dependencies
18302
18303 exit 0
18304 EOF
18305 chmod +x $CONFIG_STATUS
18306 rm -fr confdefs* $ac_clean_files
18307 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
18308