]> git.sur5r.net Git - openldap/blob - configure
Use -h URL, not -p port
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.375 2001/10/24 05:31:28 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_monitor = 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         elif $ol_with_kerberos = auto ; then
2628                 ol_with_kerberos=yes
2629         fi
2630
2631 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2632         if test $ol_with_kerberos = auto ; then
2633                 ol_with_kerberos=no
2634         elif test $ol_with_kerberos != no ; then
2635                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2636                 ol_with_kerberos=no
2637         fi
2638 fi
2639
2640 if test $ol_enable_spasswd = yes ; then
2641         if test $ol_with_cyrus_sasl = no ; then
2642                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2643         fi
2644         ol_with_cyrus_sasl=yes
2645 fi
2646
2647 echo "$ac_t""done" 1>&6
2648
2649 LDAP_LIBS=
2650 LDIF_LIBS=
2651 LDBM_LIB=
2652 LDBM_LIBS=
2653 LTHREAD_LIBS=
2654 LUTIL_LIBS=
2655
2656 SLAPD_LIBS=
2657 SLURPD_LIBS=
2658
2659 BUILD_SLAPD=no
2660 BUILD_SLURPD=no
2661
2662 BUILD_THREAD=no
2663
2664 BUILD_BDB=no
2665 BUILD_DNSSRV=no
2666 BUILD_LDAP=no
2667 BUILD_LDBM=no
2668 BUILD_META=no
2669 BUILD_MONITOR=no
2670 BUILD_PASSWD=no
2671 BUILD_PERL=no
2672 BUILD_SHELL=no
2673 BUILD_SQL=no
2674 BUILD_TCL=no
2675
2676 BUILD_BDB_DYNAMIC=static
2677 BUILD_DNSSRV_DYNAMIC=static
2678 BUILD_LDAP_DYNAMIC=static
2679 BUILD_LDBM_DYNAMIC=static
2680 BUILD_META_DYNAMIC=static
2681 BUILD_MONITOR_DYNAMIC=static
2682 BUILD_PASSWD_DYNAMIC=static
2683 BUILD_PERL_DYNAMIC=static
2684 BUILD_SHELL_DYNAMIC=static
2685 BUILD_TCL_DYNAMIC=static
2686 BUILD_SQL_DYNAMIC=static
2687
2688 SLAPD_MODULES_LDFLAGS=
2689 SLAPD_MODULES_CPPFLAGS=
2690 SLAPD_MODULES_LIST=
2691
2692 SLAPD_PERL_LDFLAGS=
2693 MOD_PERL_LDFLAGS=
2694 PERL_CPPFLAGS=
2695
2696 SLAPD_SQL_LDFLAGS=
2697 SLAPD_SQL_LIBS=
2698 SLAPD_SQL_INCLUDES=
2699
2700 MOD_TCL_LIB=
2701 KRB4_LIBS=
2702 KRB5_LIBS=
2703 READLINE_LIBS=
2704 SASL_LIBS=
2705 TERMCAP_LIBS=
2706 TLS_LIBS=
2707 MODULES_LIBS=
2708 AUTH_LIBS=
2709
2710 SLAPD_SLP_LIBS=
2711
2712
2713
2714 cat >> confdefs.h <<\EOF
2715 #define HAVE_MKVERSION 1
2716 EOF
2717
2718
2719
2720
2721 ol_aix_threads=no
2722 case "$target" in
2723 *-*-aix*)       if test -z "$CC" ; then
2724                 case "$ol_with_threads" in
2725                 auto | yes |  posix) ol_aix_threads=yes ;;
2726                 esac
2727         fi
2728 ;;
2729 esac
2730
2731 if test $ol_aix_threads = yes ; then
2732         if test -z "${CC}" ; then
2733                 for ac_prog in cc_r xlc_r cc
2734 do
2735 # Extract the first word of "$ac_prog", so it can be a program name with args.
2736 set dummy $ac_prog; ac_word=$2
2737 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2738 echo "configure:2739: checking for $ac_word" >&5
2739 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2740   echo $ac_n "(cached) $ac_c" 1>&6
2741 else
2742   if test -n "$CC"; then
2743   ac_cv_prog_CC="$CC" # Let the user override the test.
2744 else
2745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2746   ac_dummy="$PATH"
2747   for ac_dir in $ac_dummy; do
2748     test -z "$ac_dir" && ac_dir=.
2749     if test -f $ac_dir/$ac_word; then
2750       ac_cv_prog_CC="$ac_prog"
2751       break
2752     fi
2753   done
2754   IFS="$ac_save_ifs"
2755 fi
2756 fi
2757 CC="$ac_cv_prog_CC"
2758 if test -n "$CC"; then
2759   echo "$ac_t""$CC" 1>&6
2760 else
2761   echo "$ac_t""no" 1>&6
2762 fi
2763
2764 test -n "$CC" && break
2765 done
2766
2767
2768                 if test "$CC" = cc ; then
2769                                                 if test $ol_with_threads != auto ; then
2770                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2771                         else
2772                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2773                         fi
2774                         ol_with_threads=no
2775                 fi
2776         fi
2777
2778         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2779                 ol_with_threads=posix
2780                 ol_cv_pthread_create=yes
2781         fi
2782 fi
2783
2784 if test -z "${CC}"; then
2785         for ac_prog in cc
2786 do
2787 # Extract the first word of "$ac_prog", so it can be a program name with args.
2788 set dummy $ac_prog; ac_word=$2
2789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2790 echo "configure:2791: checking for $ac_word" >&5
2791 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2792   echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794   if test -n "$CC"; then
2795   ac_cv_prog_CC="$CC" # Let the user override the test.
2796 else
2797   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2798   ac_dummy="$PATH"
2799   for ac_dir in $ac_dummy; do
2800     test -z "$ac_dir" && ac_dir=.
2801     if test -f $ac_dir/$ac_word; then
2802       ac_cv_prog_CC="$ac_prog"
2803       break
2804     fi
2805   done
2806   IFS="$ac_save_ifs"
2807 fi
2808 fi
2809 CC="$ac_cv_prog_CC"
2810 if test -n "$CC"; then
2811   echo "$ac_t""$CC" 1>&6
2812 else
2813   echo "$ac_t""no" 1>&6
2814 fi
2815
2816 test -n "$CC" && break
2817 done
2818
2819 fi
2820
2821
2822
2823
2824 # Check whether --enable-fast-install or --disable-fast-install was given.
2825 if test "${enable_fast_install+set}" = set; then
2826   enableval="$enable_fast_install"
2827   p=${PACKAGE-default}
2828 case "$enableval" in
2829 yes) enable_fast_install=yes ;;
2830 no) enable_fast_install=no ;;
2831 *)
2832   enable_fast_install=no
2833   # Look at the argument we got.  We use all the common list separators.
2834   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2835   for pkg in $enableval; do
2836     if test "X$pkg" = "X$p"; then
2837       enable_fast_install=yes
2838     fi
2839   done
2840   IFS="$ac_save_ifs"
2841   ;;
2842 esac
2843 else
2844   enable_fast_install=yes
2845 fi
2846
2847 # Extract the first word of "ranlib", so it can be a program name with args.
2848 set dummy ranlib; ac_word=$2
2849 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2850 echo "configure:2851: checking for $ac_word" >&5
2851 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2852   echo $ac_n "(cached) $ac_c" 1>&6
2853 else
2854   if test -n "$RANLIB"; then
2855   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2856 else
2857   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2858   ac_dummy="$PATH"
2859   for ac_dir in $ac_dummy; do
2860     test -z "$ac_dir" && ac_dir=.
2861     if test -f $ac_dir/$ac_word; then
2862       ac_cv_prog_RANLIB="ranlib"
2863       break
2864     fi
2865   done
2866   IFS="$ac_save_ifs"
2867   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2868 fi
2869 fi
2870 RANLIB="$ac_cv_prog_RANLIB"
2871 if test -n "$RANLIB"; then
2872   echo "$ac_t""$RANLIB" 1>&6
2873 else
2874   echo "$ac_t""no" 1>&6
2875 fi
2876
2877 # Extract the first word of "gcc", so it can be a program name with args.
2878 set dummy gcc; ac_word=$2
2879 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2880 echo "configure:2881: checking for $ac_word" >&5
2881 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2882   echo $ac_n "(cached) $ac_c" 1>&6
2883 else
2884   if test -n "$CC"; then
2885   ac_cv_prog_CC="$CC" # Let the user override the test.
2886 else
2887   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2888   ac_dummy="$PATH"
2889   for ac_dir in $ac_dummy; do
2890     test -z "$ac_dir" && ac_dir=.
2891     if test -f $ac_dir/$ac_word; then
2892       ac_cv_prog_CC="gcc"
2893       break
2894     fi
2895   done
2896   IFS="$ac_save_ifs"
2897 fi
2898 fi
2899 CC="$ac_cv_prog_CC"
2900 if test -n "$CC"; then
2901   echo "$ac_t""$CC" 1>&6
2902 else
2903   echo "$ac_t""no" 1>&6
2904 fi
2905
2906 if test -z "$CC"; then
2907   # Extract the first word of "cc", so it can be a program name with args.
2908 set dummy cc; ac_word=$2
2909 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2910 echo "configure:2911: checking for $ac_word" >&5
2911 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2912   echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914   if test -n "$CC"; then
2915   ac_cv_prog_CC="$CC" # Let the user override the test.
2916 else
2917   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2918   ac_prog_rejected=no
2919   ac_dummy="$PATH"
2920   for ac_dir in $ac_dummy; do
2921     test -z "$ac_dir" && ac_dir=.
2922     if test -f $ac_dir/$ac_word; then
2923       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2924         ac_prog_rejected=yes
2925         continue
2926       fi
2927       ac_cv_prog_CC="cc"
2928       break
2929     fi
2930   done
2931   IFS="$ac_save_ifs"
2932 if test $ac_prog_rejected = yes; then
2933   # We found a bogon in the path, so make sure we never use it.
2934   set dummy $ac_cv_prog_CC
2935   shift
2936   if test $# -gt 0; then
2937     # We chose a different compiler from the bogus one.
2938     # However, it has the same basename, so the bogon will be chosen
2939     # first if we set CC to just the basename; use the full file name.
2940     shift
2941     set dummy "$ac_dir/$ac_word" "$@"
2942     shift
2943     ac_cv_prog_CC="$@"
2944   fi
2945 fi
2946 fi
2947 fi
2948 CC="$ac_cv_prog_CC"
2949 if test -n "$CC"; then
2950   echo "$ac_t""$CC" 1>&6
2951 else
2952   echo "$ac_t""no" 1>&6
2953 fi
2954
2955   if test -z "$CC"; then
2956     case "`uname -s`" in
2957     *win32* | *WIN32* | *CYGWIN*)
2958       # Extract the first word of "cl", so it can be a program name with args.
2959 set dummy cl; ac_word=$2
2960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2961 echo "configure:2962: checking for $ac_word" >&5
2962 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2963   echo $ac_n "(cached) $ac_c" 1>&6
2964 else
2965   if test -n "$CC"; then
2966   ac_cv_prog_CC="$CC" # Let the user override the test.
2967 else
2968   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2969   ac_dummy="$PATH"
2970   for ac_dir in $ac_dummy; do
2971     test -z "$ac_dir" && ac_dir=.
2972     if test -f $ac_dir/$ac_word; then
2973       ac_cv_prog_CC="cl"
2974       break
2975     fi
2976   done
2977   IFS="$ac_save_ifs"
2978 fi
2979 fi
2980 CC="$ac_cv_prog_CC"
2981 if test -n "$CC"; then
2982   echo "$ac_t""$CC" 1>&6
2983 else
2984   echo "$ac_t""no" 1>&6
2985 fi
2986  ;;
2987     esac
2988   fi
2989   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2990 fi
2991
2992 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2993 echo "configure:2994: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2994
2995 ac_ext=c
2996 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2997 ac_cpp='$CPP $CPPFLAGS'
2998 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2999 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3000 cross_compiling=$ac_cv_prog_cc_cross
3001
3002 cat > conftest.$ac_ext << EOF
3003
3004 #line 3005 "configure"
3005 #include "confdefs.h"
3006
3007 main(){return(0);}
3008 EOF
3009 if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3010   ac_cv_prog_cc_works=yes
3011   # If we can't run a trivial program, we are probably using a cross compiler.
3012   if (./conftest; exit) 2>/dev/null; then
3013     ac_cv_prog_cc_cross=no
3014   else
3015     ac_cv_prog_cc_cross=yes
3016   fi
3017 else
3018   echo "configure: failed program was:" >&5
3019   cat conftest.$ac_ext >&5
3020   ac_cv_prog_cc_works=no
3021 fi
3022 rm -fr conftest*
3023 ac_ext=c
3024 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3025 ac_cpp='$CPP $CPPFLAGS'
3026 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3027 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3028 cross_compiling=$ac_cv_prog_cc_cross
3029
3030 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3031 if test $ac_cv_prog_cc_works = no; then
3032   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3033 fi
3034 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3035 echo "configure:3036: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3036 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3037 cross_compiling=$ac_cv_prog_cc_cross
3038
3039 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3040 echo "configure:3041: checking whether we are using GNU C" >&5
3041 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3042   echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044   cat > conftest.c <<EOF
3045 #ifdef __GNUC__
3046   yes;
3047 #endif
3048 EOF
3049 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3050   ac_cv_prog_gcc=yes
3051 else
3052   ac_cv_prog_gcc=no
3053 fi
3054 fi
3055
3056 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3057
3058 if test $ac_cv_prog_gcc = yes; then
3059   GCC=yes
3060 else
3061   GCC=
3062 fi
3063
3064 ac_test_CFLAGS="${CFLAGS+set}"
3065 ac_save_CFLAGS="$CFLAGS"
3066 CFLAGS=
3067 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3068 echo "configure:3069: checking whether ${CC-cc} accepts -g" >&5
3069 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3070   echo $ac_n "(cached) $ac_c" 1>&6
3071 else
3072   echo 'void f(){}' > conftest.c
3073 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3074   ac_cv_prog_cc_g=yes
3075 else
3076   ac_cv_prog_cc_g=no
3077 fi
3078 rm -f conftest*
3079
3080 fi
3081
3082 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3083 if test "$ac_test_CFLAGS" = set; then
3084   CFLAGS="$ac_save_CFLAGS"
3085 elif test $ac_cv_prog_cc_g = yes; then
3086   if test "$GCC" = yes; then
3087     CFLAGS="-g -O2"
3088   else
3089     CFLAGS="-g"
3090   fi
3091 else
3092   if test "$GCC" = yes; then
3093     CFLAGS="-O2"
3094   else
3095     CFLAGS=
3096   fi
3097 fi
3098
3099 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3100 if test "${with_gnu_ld+set}" = set; then
3101   withval="$with_gnu_ld"
3102   test "$withval" = no || with_gnu_ld=yes
3103 else
3104   with_gnu_ld=no
3105 fi
3106
3107 ac_prog=ld
3108 if test "$ac_cv_prog_gcc" = yes; then
3109   # Check if gcc -print-prog-name=ld gives a path.
3110   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3111 echo "configure:3112: checking for ld used by GCC" >&5
3112   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3113   case "$ac_prog" in
3114     # Accept absolute paths.
3115     [\\/]* | [A-Za-z]:[\\/]*)
3116       re_direlt='/[^/][^/]*/\.\./'
3117       # Canonicalize the path of ld
3118       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3119       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3120         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3121       done
3122       test -z "$LD" && LD="$ac_prog"
3123       ;;
3124   "")
3125     # If it fails, then pretend we aren't using GCC.
3126     ac_prog=ld
3127     ;;
3128   *)
3129     # If it is relative, then search for the first ld in PATH.
3130     with_gnu_ld=unknown
3131     ;;
3132   esac
3133 elif test "$with_gnu_ld" = yes; then
3134   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3135 echo "configure:3136: checking for GNU ld" >&5
3136 else
3137   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3138 echo "configure:3139: checking for non-GNU ld" >&5
3139 fi
3140 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3141   echo $ac_n "(cached) $ac_c" 1>&6
3142 else
3143   if test -z "$LD"; then
3144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3145   for ac_dir in $PATH; do
3146     test -z "$ac_dir" && ac_dir=.
3147     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3148       ac_cv_path_LD="$ac_dir/$ac_prog"
3149       # Check to see if the program is GNU ld.  I'd rather use --version,
3150       # but apparently some GNU ld's only accept -v.
3151       # Break only if it was the GNU/non-GNU ld that we prefer.
3152       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3153         test "$with_gnu_ld" != no && break
3154       else
3155         test "$with_gnu_ld" != yes && break
3156       fi
3157     fi
3158   done
3159   IFS="$ac_save_ifs"
3160 else
3161   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3162 fi
3163 fi
3164
3165 LD="$ac_cv_path_LD"
3166 if test -n "$LD"; then
3167   echo "$ac_t""$LD" 1>&6
3168 else
3169   echo "$ac_t""no" 1>&6
3170 fi
3171 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3172 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3173 echo "configure:3174: checking if the linker ($LD) is GNU ld" >&5
3174 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3178 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3179   ac_cv_prog_gnu_ld=yes
3180 else
3181   ac_cv_prog_gnu_ld=no
3182 fi
3183 fi
3184
3185 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3186
3187
3188 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3189 echo "configure:3190: checking for BSD-compatible nm" >&5
3190 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3191   echo $ac_n "(cached) $ac_c" 1>&6
3192 else
3193   if test -n "$NM"; then
3194   # Let the user override the test.
3195   ac_cv_path_NM="$NM"
3196 else
3197   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3198   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3199     test -z "$ac_dir" && ac_dir=.
3200     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3201       # Check to see if the nm accepts a BSD-compat flag.
3202       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3203       #   nm: unknown option "B" ignored
3204       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3205         ac_cv_path_NM="$ac_dir/nm -B"
3206         break
3207       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3208         ac_cv_path_NM="$ac_dir/nm -p"
3209         break
3210       else
3211         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3212         continue # so that we can try to find one that supports BSD flags
3213       fi
3214     fi
3215   done
3216   IFS="$ac_save_ifs"
3217   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3218 fi
3219 fi
3220
3221 NM="$ac_cv_path_NM"
3222 echo "$ac_t""$NM" 1>&6
3223
3224 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3225 echo "configure:3226: checking whether ln -s works" >&5
3226 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   rm -f conftestdata
3230 if ln -s X conftestdata 2>/dev/null
3231 then
3232   rm -f conftestdata
3233   ac_cv_prog_LN_S="ln -s"
3234 else
3235   ac_cv_prog_LN_S=ln
3236 fi
3237 fi
3238 LN_S="$ac_cv_prog_LN_S"
3239 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3240   echo "$ac_t""yes" 1>&6
3241 else
3242   echo "$ac_t""no" 1>&6
3243 fi
3244
3245 if test $host != $build; then
3246   ac_tool_prefix=${host_alias}-
3247 else
3248   ac_tool_prefix=
3249 fi
3250
3251
3252 case "$target" in
3253 NONE) lt_target="$host" ;;
3254 *) lt_target="$target" ;;
3255 esac
3256
3257 # Check for any special flags to pass to ltconfig.
3258 libtool_flags="--cache-file=$cache_file"
3259 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3260 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3261 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3262 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3263 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3264 libtool_flags="$libtool_flags --enable-dlopen"
3265 libtool_flags="$libtool_flags --enable-win32-dll"
3266 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3267 if test "${enable_libtool_lock+set}" = set; then
3268   enableval="$enable_libtool_lock"
3269   :
3270 fi
3271
3272 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3273 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3274
3275 # Some flags need to be propagated to the compiler or linker for good
3276 # libtool support.
3277 case "$lt_target" in
3278 *-*-irix6*)
3279   # Find out which ABI we are using.
3280   echo '#line 3281 "configure"' > conftest.$ac_ext
3281   if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3282     case "`/usr/bin/file conftest.o`" in
3283     *32-bit*)
3284       LD="${LD-ld} -32"
3285       ;;
3286     *N32*)
3287       LD="${LD-ld} -n32"
3288       ;;
3289     *64-bit*)
3290       LD="${LD-ld} -64"
3291       ;;
3292     esac
3293   fi
3294   rm -rf conftest*
3295   ;;
3296
3297 *-*-sco3.2v5*)
3298   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3299   SAVE_CFLAGS="$CFLAGS"
3300   CFLAGS="$CFLAGS -belf"
3301   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3302 echo "configure:3303: checking whether the C compiler needs -belf" >&5
3303 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3304   echo $ac_n "(cached) $ac_c" 1>&6
3305 else
3306   cat > conftest.$ac_ext <<EOF
3307 #line 3308 "configure"
3308 #include "confdefs.h"
3309
3310 int main() {
3311
3312 ; return 0; }
3313 EOF
3314 if { (eval echo configure:3315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3315   rm -rf conftest*
3316   lt_cv_cc_needs_belf=yes
3317 else
3318   echo "configure: failed program was:" >&5
3319   cat conftest.$ac_ext >&5
3320   rm -rf conftest*
3321   lt_cv_cc_needs_belf=no
3322 fi
3323 rm -f conftest*
3324 fi
3325
3326 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3327   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3328     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3329     CFLAGS="$SAVE_CFLAGS"
3330   fi
3331   ;;
3332
3333 *-*-cygwin* | *-*-mingw*)
3334   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3335 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3336 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3337 echo "configure:3338: checking for $ac_word" >&5
3338 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3339   echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341   if test -n "$DLLTOOL"; then
3342   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3343 else
3344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3345   ac_dummy="$PATH"
3346   for ac_dir in $ac_dummy; do
3347     test -z "$ac_dir" && ac_dir=.
3348     if test -f $ac_dir/$ac_word; then
3349       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3350       break
3351     fi
3352   done
3353   IFS="$ac_save_ifs"
3354 fi
3355 fi
3356 DLLTOOL="$ac_cv_prog_DLLTOOL"
3357 if test -n "$DLLTOOL"; then
3358   echo "$ac_t""$DLLTOOL" 1>&6
3359 else
3360   echo "$ac_t""no" 1>&6
3361 fi
3362
3363
3364 if test -z "$ac_cv_prog_DLLTOOL"; then
3365 if test -n "$ac_tool_prefix"; then
3366   # Extract the first word of "dlltool", so it can be a program name with args.
3367 set dummy dlltool; ac_word=$2
3368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3369 echo "configure:3370: checking for $ac_word" >&5
3370 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   if test -n "$DLLTOOL"; then
3374   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3375 else
3376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3377   ac_dummy="$PATH"
3378   for ac_dir in $ac_dummy; do
3379     test -z "$ac_dir" && ac_dir=.
3380     if test -f $ac_dir/$ac_word; then
3381       ac_cv_prog_DLLTOOL="dlltool"
3382       break
3383     fi
3384   done
3385   IFS="$ac_save_ifs"
3386   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3387 fi
3388 fi
3389 DLLTOOL="$ac_cv_prog_DLLTOOL"
3390 if test -n "$DLLTOOL"; then
3391   echo "$ac_t""$DLLTOOL" 1>&6
3392 else
3393   echo "$ac_t""no" 1>&6
3394 fi
3395
3396 else
3397   DLLTOOL="false"
3398 fi
3399 fi
3400
3401   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3402 set dummy ${ac_tool_prefix}as; ac_word=$2
3403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3404 echo "configure:3405: checking for $ac_word" >&5
3405 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3406   echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408   if test -n "$AS"; then
3409   ac_cv_prog_AS="$AS" # Let the user override the test.
3410 else
3411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3412   ac_dummy="$PATH"
3413   for ac_dir in $ac_dummy; do
3414     test -z "$ac_dir" && ac_dir=.
3415     if test -f $ac_dir/$ac_word; then
3416       ac_cv_prog_AS="${ac_tool_prefix}as"
3417       break
3418     fi
3419   done
3420   IFS="$ac_save_ifs"
3421 fi
3422 fi
3423 AS="$ac_cv_prog_AS"
3424 if test -n "$AS"; then
3425   echo "$ac_t""$AS" 1>&6
3426 else
3427   echo "$ac_t""no" 1>&6
3428 fi
3429
3430
3431 if test -z "$ac_cv_prog_AS"; then
3432 if test -n "$ac_tool_prefix"; then
3433   # Extract the first word of "as", so it can be a program name with args.
3434 set dummy as; ac_word=$2
3435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3436 echo "configure:3437: checking for $ac_word" >&5
3437 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3438   echo $ac_n "(cached) $ac_c" 1>&6
3439 else
3440   if test -n "$AS"; then
3441   ac_cv_prog_AS="$AS" # Let the user override the test.
3442 else
3443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3444   ac_dummy="$PATH"
3445   for ac_dir in $ac_dummy; do
3446     test -z "$ac_dir" && ac_dir=.
3447     if test -f $ac_dir/$ac_word; then
3448       ac_cv_prog_AS="as"
3449       break
3450     fi
3451   done
3452   IFS="$ac_save_ifs"
3453   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3454 fi
3455 fi
3456 AS="$ac_cv_prog_AS"
3457 if test -n "$AS"; then
3458   echo "$ac_t""$AS" 1>&6
3459 else
3460   echo "$ac_t""no" 1>&6
3461 fi
3462
3463 else
3464   AS="false"
3465 fi
3466 fi
3467
3468   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3469 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3470 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3471 echo "configure:3472: checking for $ac_word" >&5
3472 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3473   echo $ac_n "(cached) $ac_c" 1>&6
3474 else
3475   if test -n "$OBJDUMP"; then
3476   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3477 else
3478   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3479   ac_dummy="$PATH"
3480   for ac_dir in $ac_dummy; do
3481     test -z "$ac_dir" && ac_dir=.
3482     if test -f $ac_dir/$ac_word; then
3483       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3484       break
3485     fi
3486   done
3487   IFS="$ac_save_ifs"
3488 fi
3489 fi
3490 OBJDUMP="$ac_cv_prog_OBJDUMP"
3491 if test -n "$OBJDUMP"; then
3492   echo "$ac_t""$OBJDUMP" 1>&6
3493 else
3494   echo "$ac_t""no" 1>&6
3495 fi
3496
3497
3498 if test -z "$ac_cv_prog_OBJDUMP"; then
3499 if test -n "$ac_tool_prefix"; then
3500   # Extract the first word of "objdump", so it can be a program name with args.
3501 set dummy objdump; ac_word=$2
3502 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3503 echo "configure:3504: checking for $ac_word" >&5
3504 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   if test -n "$OBJDUMP"; then
3508   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3509 else
3510   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3511   ac_dummy="$PATH"
3512   for ac_dir in $ac_dummy; do
3513     test -z "$ac_dir" && ac_dir=.
3514     if test -f $ac_dir/$ac_word; then
3515       ac_cv_prog_OBJDUMP="objdump"
3516       break
3517     fi
3518   done
3519   IFS="$ac_save_ifs"
3520   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3521 fi
3522 fi
3523 OBJDUMP="$ac_cv_prog_OBJDUMP"
3524 if test -n "$OBJDUMP"; then
3525   echo "$ac_t""$OBJDUMP" 1>&6
3526 else
3527   echo "$ac_t""no" 1>&6
3528 fi
3529
3530 else
3531   OBJDUMP="false"
3532 fi
3533 fi
3534
3535   ;;
3536
3537 esac
3538
3539
3540 # Save cache, so that ltconfig can load it
3541
3542
3543 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3544 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3545 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3546 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3547 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3548 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3549 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3550 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3551
3552 # Reload cache, that may have been modified by ltconfig
3553
3554
3555 # This can be used to rebuild libtool when needed
3556 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3557
3558 # Always use our own libtool.
3559 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3560
3561 # Redirect the config.log output again, so that the ltconfig log is not
3562 # clobbered by the next message.
3563 exec 5>>./config.log
3564
3565
3566 for ac_prog in mawk gawk nawk awk
3567 do
3568 # Extract the first word of "$ac_prog", so it can be a program name with args.
3569 set dummy $ac_prog; ac_word=$2
3570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3571 echo "configure:3572: checking for $ac_word" >&5
3572 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3573   echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575   if test -n "$AWK"; then
3576   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3577 else
3578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3579   ac_dummy="$PATH"
3580   for ac_dir in $ac_dummy; do
3581     test -z "$ac_dir" && ac_dir=.
3582     if test -f $ac_dir/$ac_word; then
3583       ac_cv_prog_AWK="$ac_prog"
3584       break
3585     fi
3586   done
3587   IFS="$ac_save_ifs"
3588 fi
3589 fi
3590 AWK="$ac_cv_prog_AWK"
3591 if test -n "$AWK"; then
3592   echo "$ac_t""$AWK" 1>&6
3593 else
3594   echo "$ac_t""no" 1>&6
3595 fi
3596
3597 test -n "$AWK" && break
3598 done
3599
3600 # test for ln hardlink support
3601 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3602 echo "configure:3603: checking whether ln works" >&5
3603 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   rm -f conftest.src conftest.dst
3607 echo "conftest" > conftest.src
3608 if ln conftest.src conftest.dst 2>/dev/null
3609 then
3610   ol_cv_prog_LN_H="ln"
3611 else
3612   ol_cv_prog_LN_H="cp"
3613 fi
3614 rm -f conftest.src conftest.dst
3615
3616 fi
3617 LN_H="$ol_cv_prog_LN_H"
3618 if test "$ol_cv_prog_LN_H" = "ln"; then
3619         echo "$ac_t""yes" 1>&6
3620 else
3621         echo "$ac_t""no" 1>&6
3622 fi
3623
3624 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3625 echo "configure:3626: checking whether ln -s works" >&5
3626 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629   rm -f conftestdata
3630 if ln -s X conftestdata 2>/dev/null
3631 then
3632   rm -f conftestdata
3633   ac_cv_prog_LN_S="ln -s"
3634 else
3635   ac_cv_prog_LN_S=ln
3636 fi
3637 fi
3638 LN_S="$ac_cv_prog_LN_S"
3639 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3640   echo "$ac_t""yes" 1>&6
3641 else
3642   echo "$ac_t""no" 1>&6
3643 fi
3644
3645
3646 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3647         LN_S="$LN_H"
3648 fi
3649
3650 # Extract the first word of "sendmail", so it can be a program name with args.
3651 set dummy sendmail; ac_word=$2
3652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3653 echo "configure:3654: checking for $ac_word" >&5
3654 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   case "$SENDMAIL" in
3658   /*)
3659   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3660   ;;
3661   ?:/*)
3662   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3663   ;;
3664   *)
3665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3666   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3667   for ac_dir in $ac_dummy; do 
3668     test -z "$ac_dir" && ac_dir=.
3669     if test -f $ac_dir/$ac_word; then
3670       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3671       break
3672     fi
3673   done
3674   IFS="$ac_save_ifs"
3675   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3676   ;;
3677 esac
3678 fi
3679 SENDMAIL="$ac_cv_path_SENDMAIL"
3680 if test -n "$SENDMAIL"; then
3681   echo "$ac_t""$SENDMAIL" 1>&6
3682 else
3683   echo "$ac_t""no" 1>&6
3684 fi
3685
3686 # Extract the first word of "vi", so it can be a program name with args.
3687 set dummy vi; ac_word=$2
3688 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3689 echo "configure:3690: checking for $ac_word" >&5
3690 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   case "$EDITOR" in
3694   /*)
3695   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3696   ;;
3697   ?:/*)
3698   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3699   ;;
3700   *)
3701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3702   ac_dummy="$PATH:/usr/ucb"
3703   for ac_dir in $ac_dummy; do 
3704     test -z "$ac_dir" && ac_dir=.
3705     if test -f $ac_dir/$ac_word; then
3706       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3707       break
3708     fi
3709   done
3710   IFS="$ac_save_ifs"
3711   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3712   ;;
3713 esac
3714 fi
3715 EDITOR="$ac_cv_path_EDITOR"
3716 if test -n "$EDITOR"; then
3717   echo "$ac_t""$EDITOR" 1>&6
3718 else
3719   echo "$ac_t""no" 1>&6
3720 fi
3721
3722 # Extract the first word of "finger", so it can be a program name with args.
3723 set dummy finger; ac_word=$2
3724 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3725 echo "configure:3726: checking for $ac_word" >&5
3726 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3727   echo $ac_n "(cached) $ac_c" 1>&6
3728 else
3729   case "$FINGER" in
3730   /*)
3731   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3732   ;;
3733   ?:/*)
3734   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3735   ;;
3736   *)
3737   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3738   ac_dummy="$PATH:/usr/ucb"
3739   for ac_dir in $ac_dummy; do 
3740     test -z "$ac_dir" && ac_dir=.
3741     if test -f $ac_dir/$ac_word; then
3742       ac_cv_path_FINGER="$ac_dir/$ac_word"
3743       break
3744     fi
3745   done
3746   IFS="$ac_save_ifs"
3747   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3748   ;;
3749 esac
3750 fi
3751 FINGER="$ac_cv_path_FINGER"
3752 if test -n "$FINGER"; then
3753   echo "$ac_t""$FINGER" 1>&6
3754 else
3755   echo "$ac_t""no" 1>&6
3756 fi
3757
3758
3759 ol_link_perl=no
3760 if test $ol_enable_perl != no ; then
3761         # Extract the first word of "perl", so it can be a program name with args.
3762 set dummy perl; ac_word=$2
3763 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3764 echo "configure:3765: checking for $ac_word" >&5
3765 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3766   echo $ac_n "(cached) $ac_c" 1>&6
3767 else
3768   case "$PERLBIN" in
3769   /*)
3770   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3771   ;;
3772   ?:/*)
3773   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3774   ;;
3775   *)
3776   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3777   ac_dummy="$PATH"
3778   for ac_dir in $ac_dummy; do 
3779     test -z "$ac_dir" && ac_dir=.
3780     if test -f $ac_dir/$ac_word; then
3781       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3782       break
3783     fi
3784   done
3785   IFS="$ac_save_ifs"
3786   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3787   ;;
3788 esac
3789 fi
3790 PERLBIN="$ac_cv_path_PERLBIN"
3791 if test -n "$PERLBIN"; then
3792   echo "$ac_t""$PERLBIN" 1>&6
3793 else
3794   echo "$ac_t""no" 1>&6
3795 fi
3796
3797
3798         if test "no$PERLBIN" = "no" ; then
3799                 if test $ol_enable_perl = yes ; then
3800                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3801                 fi
3802
3803         else
3804                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3805                 if test x"$ol_with_perl_module" = "xstatic" ; then
3806                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3807                 else
3808                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3809                 fi
3810                                 ol_link_perl=yes
3811         fi
3812 fi
3813
3814 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3815 echo "configure:3816: checking how to run the C preprocessor" >&5
3816 # On Suns, sometimes $CPP names a directory.
3817 if test -n "$CPP" && test -d "$CPP"; then
3818   CPP=
3819 fi
3820 if test -z "$CPP"; then
3821 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3822   echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824     # This must be in double quotes, not single quotes, because CPP may get
3825   # substituted into the Makefile and "${CC-cc}" will confuse make.
3826   CPP="${CC-cc} -E"
3827   # On the NeXT, cc -E runs the code through the compiler's parser,
3828   # not just through cpp.
3829   cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832 #include <assert.h>
3833 Syntax Error
3834 EOF
3835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3836 { (eval echo configure:3837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3838 if test -z "$ac_err"; then
3839   :
3840 else
3841   echo "$ac_err" >&5
3842   echo "configure: failed program was:" >&5
3843   cat conftest.$ac_ext >&5
3844   rm -rf conftest*
3845   CPP="${CC-cc} -E -traditional-cpp"
3846   cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849 #include <assert.h>
3850 Syntax Error
3851 EOF
3852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3853 { (eval echo configure:3854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3855 if test -z "$ac_err"; then
3856   :
3857 else
3858   echo "$ac_err" >&5
3859   echo "configure: failed program was:" >&5
3860   cat conftest.$ac_ext >&5
3861   rm -rf conftest*
3862   CPP="${CC-cc} -nologo -E"
3863   cat > conftest.$ac_ext <<EOF
3864 #line 3865 "configure"
3865 #include "confdefs.h"
3866 #include <assert.h>
3867 Syntax Error
3868 EOF
3869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3870 { (eval echo configure:3871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3872 if test -z "$ac_err"; then
3873   :
3874 else
3875   echo "$ac_err" >&5
3876   echo "configure: failed program was:" >&5
3877   cat conftest.$ac_ext >&5
3878   rm -rf conftest*
3879   CPP=/lib/cpp
3880 fi
3881 rm -f conftest*
3882 fi
3883 rm -f conftest*
3884 fi
3885 rm -f conftest*
3886   ac_cv_prog_CPP="$CPP"
3887 fi
3888   CPP="$ac_cv_prog_CPP"
3889 else
3890   ac_cv_prog_CPP="$CPP"
3891 fi
3892 echo "$ac_t""$CPP" 1>&6
3893
3894
3895 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3896         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3897
3898 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3899         echo "configure: warning: programs compiled here do run here..." 1>&2
3900         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3901
3902 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3903         echo "configure: warning: programs compiled here do not run here..." 1>&2
3904         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3905 fi
3906
3907 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3908 echo "configure:3909: checking for AIX" >&5
3909 cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 #ifdef _AIX
3913   yes
3914 #endif
3915
3916 EOF
3917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3918   egrep "yes" >/dev/null 2>&1; then
3919   rm -rf conftest*
3920   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3921 #define _ALL_SOURCE 1
3922 EOF
3923
3924 else
3925   rm -rf conftest*
3926   echo "$ac_t""no" 1>&6
3927 fi
3928 rm -f conftest*
3929
3930
3931 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3932 echo "configure:3933: checking for POSIXized ISC" >&5
3933 if test -d /etc/conf/kconfig.d &&
3934   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3935 then
3936   echo "$ac_t""yes" 1>&6
3937   ISC=yes # If later tests want to check for ISC.
3938   cat >> confdefs.h <<\EOF
3939 #define _POSIX_SOURCE 1
3940 EOF
3941
3942   if test "$GCC" = yes; then
3943     CC="$CC -posix"
3944   else
3945     CC="$CC -Xp"
3946   fi
3947 else
3948   echo "$ac_t""no" 1>&6
3949   ISC=
3950 fi
3951
3952 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3953 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3954 echo "configure:3955: checking for minix/config.h" >&5
3955 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3956   echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958   cat > conftest.$ac_ext <<EOF
3959 #line 3960 "configure"
3960 #include "confdefs.h"
3961 #include <minix/config.h>
3962 EOF
3963 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3964 { (eval echo configure:3965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3965 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3966 if test -z "$ac_err"; then
3967   rm -rf conftest*
3968   eval "ac_cv_header_$ac_safe=yes"
3969 else
3970   echo "$ac_err" >&5
3971   echo "configure: failed program was:" >&5
3972   cat conftest.$ac_ext >&5
3973   rm -rf conftest*
3974   eval "ac_cv_header_$ac_safe=no"
3975 fi
3976 rm -f conftest*
3977 fi
3978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3979   echo "$ac_t""yes" 1>&6
3980   MINIX=yes
3981 else
3982   echo "$ac_t""no" 1>&6
3983 MINIX=
3984 fi
3985
3986 if test "$MINIX" = yes; then
3987   cat >> confdefs.h <<\EOF
3988 #define _POSIX_SOURCE 1
3989 EOF
3990
3991   cat >> confdefs.h <<\EOF
3992 #define _POSIX_1_SOURCE 2
3993 EOF
3994
3995   cat >> confdefs.h <<\EOF
3996 #define _MINIX 1
3997 EOF
3998
3999 fi
4000
4001
4002 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4003 echo "configure:4004: checking for Cygwin environment" >&5
4004 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
4005   echo $ac_n "(cached) $ac_c" 1>&6
4006 else
4007   cat > conftest.$ac_ext <<EOF
4008 #line 4009 "configure"
4009 #include "confdefs.h"
4010
4011 int main() {
4012
4013 #ifndef __CYGWIN__
4014 #define __CYGWIN__ __CYGWIN32__
4015 #endif
4016 return __CYGWIN__;
4017 ; return 0; }
4018 EOF
4019 if { (eval echo configure:4020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4020   rm -rf conftest*
4021   ac_cv_cygwin=yes
4022 else
4023   echo "configure: failed program was:" >&5
4024   cat conftest.$ac_ext >&5
4025   rm -rf conftest*
4026   ac_cv_cygwin=no
4027 fi
4028 rm -f conftest*
4029 fi
4030
4031 echo "$ac_t""$ac_cv_cygwin" 1>&6
4032 CYGWIN=
4033 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4034 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4035 echo "configure:4036: checking for mingw32 environment" >&5
4036 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
4037   echo $ac_n "(cached) $ac_c" 1>&6
4038 else
4039   cat > conftest.$ac_ext <<EOF
4040 #line 4041 "configure"
4041 #include "confdefs.h"
4042
4043 int main() {
4044 return __MINGW32__;
4045 ; return 0; }
4046 EOF
4047 if { (eval echo configure:4048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4048   rm -rf conftest*
4049   ac_cv_mingw32=yes
4050 else
4051   echo "configure: failed program was:" >&5
4052   cat conftest.$ac_ext >&5
4053   rm -rf conftest*
4054   ac_cv_mingw32=no
4055 fi
4056 rm -f conftest*
4057 fi
4058
4059 echo "$ac_t""$ac_cv_mingw32" 1>&6
4060 MINGW32=
4061 test "$ac_cv_mingw32" = yes && MINGW32=yes
4062 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
4063 echo "configure:4064: checking for EMX OS/2 environment" >&5
4064 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
4065   echo $ac_n "(cached) $ac_c" 1>&6
4066 else
4067   cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070
4071 int main() {
4072 return __EMX__;
4073 ; return 0; }
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4076   rm -rf conftest*
4077   ac_cv_emxos2=yes
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   ac_cv_emxos2=no
4083 fi
4084 rm -f conftest*
4085 fi
4086
4087 echo "$ac_t""$ac_cv_emxos2" 1>&6
4088 EMXOS2=
4089 test "$ac_cv_emxos2" = yes && EMXOS2=yes
4090
4091
4092
4093 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4094 echo "configure:4095: checking for executable suffix" >&5
4095 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4099   ac_cv_exeext=.exe
4100 else
4101   rm -f conftest*
4102   echo 'int main () { return 0; }' > conftest.$ac_ext
4103   ac_cv_exeext=
4104   if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4105     for file in conftest.*; do
4106       case $file in
4107       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4108       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4109       esac
4110     done
4111   else
4112     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4113   fi
4114   rm -f conftest*
4115   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4116 fi
4117 fi
4118
4119 EXEEXT=""
4120 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4121 echo "$ac_t""${ac_cv_exeext}" 1>&6
4122 ac_exeext=$EXEEXT
4123
4124 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4125 echo "configure:4126: checking for object suffix" >&5
4126 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4127   echo $ac_n "(cached) $ac_c" 1>&6
4128 else
4129   rm -f conftest*
4130 echo 'int i = 1;' > conftest.$ac_ext
4131 if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132   for ac_file in conftest.*; do
4133     case $ac_file in
4134     *.c) ;;
4135     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4136     esac
4137   done
4138 else
4139   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4140 fi
4141 rm -f conftest*
4142 fi
4143
4144 echo "$ac_t""$ac_cv_objext" 1>&6
4145 OBJEXT=$ac_cv_objext
4146 ac_objext=$ac_cv_objext
4147
4148
4149 cat >> confdefs.h <<EOF
4150 #define EXEEXT "${EXEEXT}"
4151 EOF
4152
4153
4154 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4155 echo "configure:4156: checking for be_app in -lbe" >&5
4156 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4157 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4158   echo $ac_n "(cached) $ac_c" 1>&6
4159 else
4160   ac_save_LIBS="$LIBS"
4161 LIBS="-lbe -lroot -lnet $LIBS"
4162 cat > conftest.$ac_ext <<EOF
4163 #line 4164 "configure"
4164 #include "confdefs.h"
4165 /* Override any gcc2 internal prototype to avoid an error.  */
4166 /* We use char because int might match the return type of a gcc2
4167     builtin and then its argument prototype would still apply.  */
4168 char be_app();
4169
4170 int main() {
4171 be_app()
4172 ; return 0; }
4173 EOF
4174 if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4175   rm -rf conftest*
4176   eval "ac_cv_lib_$ac_lib_var=yes"
4177 else
4178   echo "configure: failed program was:" >&5
4179   cat conftest.$ac_ext >&5
4180   rm -rf conftest*
4181   eval "ac_cv_lib_$ac_lib_var=no"
4182 fi
4183 rm -f conftest*
4184 LIBS="$ac_save_LIBS"
4185
4186 fi
4187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4188   echo "$ac_t""yes" 1>&6
4189   LIBS="$LIBS -lbe -lroot -lnet"
4190 else
4191   echo "$ac_t""no" 1>&6
4192 :
4193 fi
4194
4195
4196
4197
4198
4199 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4200 echo "configure:4201: checking for ${CC-cc} option to accept ANSI C" >&5
4201 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4202   echo $ac_n "(cached) $ac_c" 1>&6
4203 else
4204   am_cv_prog_cc_stdc=no
4205 ac_save_CC="$CC"
4206 # Don't try gcc -ansi; that turns off useful extensions and
4207 # breaks some systems' header files.
4208 # AIX                   -qlanglvl=ansi
4209 # Ultrix and OSF/1      -std1
4210 # HP-UX 10.20 and later -Ae
4211 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4212 # SVR4                  -Xc -D__EXTENSIONS__
4213 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4214 do
4215   CC="$ac_save_CC $ac_arg"
4216   cat > conftest.$ac_ext <<EOF
4217 #line 4218 "configure"
4218 #include "confdefs.h"
4219 #include <stdarg.h>
4220 #include <stdio.h>
4221 #include <sys/types.h>
4222 #include <sys/stat.h>
4223 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4224 struct buf { int x; };
4225 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4226 static char *e (p, i)
4227      char **p;
4228      int i;
4229 {
4230   return p[i];
4231 }
4232 static char *f (char * (*g) (char **, int), char **p, ...)
4233 {
4234   char *s;
4235   va_list v;
4236   va_start (v,p);
4237   s = g (p, va_arg (v,int));
4238   va_end (v);
4239   return s;
4240 }
4241 int test (int i, double x);
4242 struct s1 {int (*f) (int a);};
4243 struct s2 {int (*f) (double a);};
4244 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4245 int argc;
4246 char **argv;
4247
4248 int main() {
4249
4250 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4251
4252 ; return 0; }
4253 EOF
4254 if { (eval echo configure:4255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4255   rm -rf conftest*
4256   am_cv_prog_cc_stdc="$ac_arg"; break
4257 else
4258   echo "configure: failed program was:" >&5
4259   cat conftest.$ac_ext >&5
4260 fi
4261 rm -f conftest*
4262 done
4263 CC="$ac_save_CC"
4264
4265 fi
4266
4267 if test -z "$am_cv_prog_cc_stdc"; then
4268   echo "$ac_t""none needed" 1>&6
4269 else
4270   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4271 fi
4272 case "x$am_cv_prog_cc_stdc" in
4273   x|xno) ;;
4274   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4275 esac
4276
4277 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4278         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4279 fi
4280
4281 # test for make depend flag
4282 OL_MKDEP=
4283 OL_MKDEP_FLAGS=
4284 if test -z "${MKDEP}"; then
4285         OL_MKDEP="${CC-cc}"
4286         if test -z "${MKDEP_FLAGS}"; then
4287                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4288 echo "configure:4289: checking for ${OL_MKDEP} depend flag" >&5
4289 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4290   echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292   
4293                         ol_cv_mkdep=no
4294                         for flag in "-M" "-xM"; do
4295                                 cat > conftest.c <<EOF
4296  noCode;
4297 EOF
4298                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4299                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4300                                 then
4301                                         if test ! -f conftest."${ac_object}" ; then
4302                                                 ol_cv_mkdep=$flag
4303                                                 OL_MKDEP_FLAGS="$flag"
4304                                                 break
4305                                         fi
4306                                 fi
4307                         done
4308                         rm -f conftest*
4309                 
4310 fi
4311
4312 echo "$ac_t""$ol_cv_mkdep" 1>&6
4313         else
4314                 cc_cv_mkdep=yes
4315                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4316         fi
4317 else
4318         cc_cv_mkdep=yes
4319         OL_MKDEP="${MKDEP}"
4320         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4321 fi
4322
4323
4324
4325 if test "${ol_cv_mkdep}" = no ; then
4326         # this will soon become an error
4327         echo "configure: warning: do not know how to generate dependencies" 1>&2
4328 fi
4329
4330 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4331 echo "configure:4332: checking for afopen in -ls" >&5
4332 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4333 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4334   echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336   ac_save_LIBS="$LIBS"
4337 LIBS="-ls  $LIBS"
4338 cat > conftest.$ac_ext <<EOF
4339 #line 4340 "configure"
4340 #include "confdefs.h"
4341 /* Override any gcc2 internal prototype to avoid an error.  */
4342 /* We use char because int might match the return type of a gcc2
4343     builtin and then its argument prototype would still apply.  */
4344 char afopen();
4345
4346 int main() {
4347 afopen()
4348 ; return 0; }
4349 EOF
4350 if { (eval echo configure:4351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4351   rm -rf conftest*
4352   eval "ac_cv_lib_$ac_lib_var=yes"
4353 else
4354   echo "configure: failed program was:" >&5
4355   cat conftest.$ac_ext >&5
4356   rm -rf conftest*
4357   eval "ac_cv_lib_$ac_lib_var=no"
4358 fi
4359 rm -f conftest*
4360 LIBS="$ac_save_LIBS"
4361
4362 fi
4363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4364   echo "$ac_t""yes" 1>&6
4365   
4366         AUTH_LIBS=-ls
4367         cat >> confdefs.h <<\EOF
4368 #define HAVE_AIX_SECURITY 1
4369 EOF
4370
4371
4372 else
4373   echo "$ac_t""no" 1>&6
4374 fi
4375
4376
4377
4378 ol_link_modules=no
4379 if test $ol_enable_modules != no ; then
4380         for ac_hdr in ltdl.h
4381 do
4382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4384 echo "configure:4385: checking for $ac_hdr" >&5
4385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4386   echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388   cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391 #include <$ac_hdr>
4392 EOF
4393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4394 { (eval echo configure:4395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4396 if test -z "$ac_err"; then
4397   rm -rf conftest*
4398   eval "ac_cv_header_$ac_safe=yes"
4399 else
4400   echo "$ac_err" >&5
4401   echo "configure: failed program was:" >&5
4402   cat conftest.$ac_ext >&5
4403   rm -rf conftest*
4404   eval "ac_cv_header_$ac_safe=no"
4405 fi
4406 rm -f conftest*
4407 fi
4408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4409   echo "$ac_t""yes" 1>&6
4410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4411   cat >> confdefs.h <<EOF
4412 #define $ac_tr_hdr 1
4413 EOF
4414  
4415 else
4416   echo "$ac_t""no" 1>&6
4417 fi
4418 done
4419
4420
4421         if test $ac_cv_header_ltdl_h = no ; then
4422                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4423         fi
4424
4425         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4426 echo "configure:4427: checking for lt_dlinit in -lltdl" >&5
4427 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4428 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4429   echo $ac_n "(cached) $ac_c" 1>&6
4430 else
4431   ac_save_LIBS="$LIBS"
4432 LIBS="-lltdl  $LIBS"
4433 cat > conftest.$ac_ext <<EOF
4434 #line 4435 "configure"
4435 #include "confdefs.h"
4436 /* Override any gcc2 internal prototype to avoid an error.  */
4437 /* We use char because int might match the return type of a gcc2
4438     builtin and then its argument prototype would still apply.  */
4439 char lt_dlinit();
4440
4441 int main() {
4442 lt_dlinit()
4443 ; return 0; }
4444 EOF
4445 if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4446   rm -rf conftest*
4447   eval "ac_cv_lib_$ac_lib_var=yes"
4448 else
4449   echo "configure: failed program was:" >&5
4450   cat conftest.$ac_ext >&5
4451   rm -rf conftest*
4452   eval "ac_cv_lib_$ac_lib_var=no"
4453 fi
4454 rm -f conftest*
4455 LIBS="$ac_save_LIBS"
4456
4457 fi
4458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4459   echo "$ac_t""yes" 1>&6
4460   
4461             MODULES_LIBS=-lltdl
4462             cat >> confdefs.h <<\EOF
4463 #define HAVE_LIBLTDL 1
4464 EOF
4465
4466         
4467 else
4468   echo "$ac_t""no" 1>&6
4469 fi
4470
4471
4472         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4473                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4474         fi
4475         ol_link_modules=yes
4476 else
4477         ol_with_bdb_module=static
4478         ol_with_dnssrv_module=static
4479         ol_with_ldap_module=static
4480         ol_with_ldbm_module=static
4481         ol_with_meta_module=static
4482         ol_with_monitor_module=static
4483         ol_with_passwd_module=static
4484         ol_with_perl_module=static
4485         ol_with_shell_module=static
4486         ol_with_tcl_module=static
4487         ol_with_sql_module=static
4488 fi
4489
4490 # test for EBCDIC
4491 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4492 echo "configure:4493: checking for EBCDIC" >&5
4493 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4494   echo $ac_n "(cached) $ac_c" 1>&6
4495 else
4496   
4497         cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500
4501 #if !('M' == 0xd4)
4502 #include <__ASCII__/generate_error.h>
4503 #endif
4504
4505 EOF
4506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4507 { (eval echo configure:4508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4509 if test -z "$ac_err"; then
4510   rm -rf conftest*
4511   ol_cv_cpp_ebcdic=yes
4512 else
4513   echo "$ac_err" >&5
4514   echo "configure: failed program was:" >&5
4515   cat conftest.$ac_ext >&5
4516   rm -rf conftest*
4517   ol_cv_cpp_ebcdic=no
4518 fi
4519 rm -f conftest*
4520 fi
4521
4522 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4523 if test $ol_cv_cpp_ebcdic = yes ; then
4524         cat >> confdefs.h <<\EOF
4525 #define HAVE_EBCDIC 1
4526 EOF
4527
4528 fi
4529
4530 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4531 echo "configure:4532: checking for ANSI C header files" >&5
4532 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4533   echo $ac_n "(cached) $ac_c" 1>&6
4534 else
4535   cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 #include <stdlib.h>
4539 #include <stdarg.h>
4540 #include <string.h>
4541 #include <float.h>
4542 EOF
4543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4544 { (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4546 if test -z "$ac_err"; then
4547   rm -rf conftest*
4548   ol_cv_header_stdc=yes
4549 else
4550   echo "$ac_err" >&5
4551   echo "configure: failed program was:" >&5
4552   cat conftest.$ac_ext >&5
4553   rm -rf conftest*
4554   ol_cv_header_stdc=no
4555 fi
4556 rm -f conftest*
4557
4558 if test $ol_cv_header_stdc = yes; then
4559   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 #include <string.h>
4564 EOF
4565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4566   egrep "memchr" >/dev/null 2>&1; then
4567   :
4568 else
4569   rm -rf conftest*
4570   ol_cv_header_stdc=no
4571 fi
4572 rm -f conftest*
4573
4574 fi
4575
4576 if test $ol_cv_header_stdc = yes; then
4577   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4578 cat > conftest.$ac_ext <<EOF
4579 #line 4580 "configure"
4580 #include "confdefs.h"
4581 #include <stdlib.h>
4582 EOF
4583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4584   egrep "free" >/dev/null 2>&1; then
4585   :
4586 else
4587   rm -rf conftest*
4588   ol_cv_header_stdc=no
4589 fi
4590 rm -f conftest*
4591
4592 fi
4593
4594 if test $ol_cv_header_stdc = yes; then
4595   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4596 if test "$cross_compiling" = yes; then
4597   :
4598 else
4599   cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 #include <ctype.h>
4603 #ifndef HAVE_EBCDIC
4604 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4605 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4606 #else
4607 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4608                 || ('j' <= (c) && (c) <= 'r') \
4609                 || ('s' <= (c) && (c) <= 'z'))
4610 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4611 #endif
4612 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4613 int main () { int i; for (i = 0; i < 256; i++)
4614 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4615 exit (0); }
4616
4617 EOF
4618 if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4619 then
4620   :
4621 else
4622   echo "configure: failed program was:" >&5
4623   cat conftest.$ac_ext >&5
4624   rm -fr conftest*
4625   ol_cv_header_stdc=no
4626 fi
4627 rm -fr conftest*
4628 fi
4629
4630 fi
4631 fi
4632
4633 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4634 if test $ol_cv_header_stdc = yes; then
4635   cat >> confdefs.h <<\EOF
4636 #define STDC_HEADERS 1
4637 EOF
4638
4639 fi
4640 ac_cv_header_stdc=disable
4641
4642
4643 if test $ol_cv_header_stdc != yes; then
4644         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4645 fi
4646
4647 ac_header_dirent=no
4648 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4649 do
4650 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4651 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4652 echo "configure:4653: checking for $ac_hdr that defines DIR" >&5
4653 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 #include <sys/types.h>
4660 #include <$ac_hdr>
4661 int main() {
4662 DIR *dirp = 0;
4663 ; return 0; }
4664 EOF
4665 if { (eval echo configure:4666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4666   rm -rf conftest*
4667   eval "ac_cv_header_dirent_$ac_safe=yes"
4668 else
4669   echo "configure: failed program was:" >&5
4670   cat conftest.$ac_ext >&5
4671   rm -rf conftest*
4672   eval "ac_cv_header_dirent_$ac_safe=no"
4673 fi
4674 rm -f conftest*
4675 fi
4676 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4677   echo "$ac_t""yes" 1>&6
4678     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4679   cat >> confdefs.h <<EOF
4680 #define $ac_tr_hdr 1
4681 EOF
4682  ac_header_dirent=$ac_hdr; break
4683 else
4684   echo "$ac_t""no" 1>&6
4685 fi
4686 done
4687 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4688 if test $ac_header_dirent = dirent.h; then
4689 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4690 echo "configure:4691: checking for opendir in -ldir" >&5
4691 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4692 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4693   echo $ac_n "(cached) $ac_c" 1>&6
4694 else
4695   ac_save_LIBS="$LIBS"
4696 LIBS="-ldir  $LIBS"
4697 cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 /* Override any gcc2 internal prototype to avoid an error.  */
4701 /* We use char because int might match the return type of a gcc2
4702     builtin and then its argument prototype would still apply.  */
4703 char opendir();
4704
4705 int main() {
4706 opendir()
4707 ; return 0; }
4708 EOF
4709 if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4710   rm -rf conftest*
4711   eval "ac_cv_lib_$ac_lib_var=yes"
4712 else
4713   echo "configure: failed program was:" >&5
4714   cat conftest.$ac_ext >&5
4715   rm -rf conftest*
4716   eval "ac_cv_lib_$ac_lib_var=no"
4717 fi
4718 rm -f conftest*
4719 LIBS="$ac_save_LIBS"
4720
4721 fi
4722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4723   echo "$ac_t""yes" 1>&6
4724   LIBS="$LIBS -ldir"
4725 else
4726   echo "$ac_t""no" 1>&6
4727 fi
4728
4729 else
4730 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4731 echo "configure:4732: checking for opendir in -lx" >&5
4732 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4733 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   ac_save_LIBS="$LIBS"
4737 LIBS="-lx  $LIBS"
4738 cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 /* Override any gcc2 internal prototype to avoid an error.  */
4742 /* We use char because int might match the return type of a gcc2
4743     builtin and then its argument prototype would still apply.  */
4744 char opendir();
4745
4746 int main() {
4747 opendir()
4748 ; return 0; }
4749 EOF
4750 if { (eval echo configure:4751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4751   rm -rf conftest*
4752   eval "ac_cv_lib_$ac_lib_var=yes"
4753 else
4754   echo "configure: failed program was:" >&5
4755   cat conftest.$ac_ext >&5
4756   rm -rf conftest*
4757   eval "ac_cv_lib_$ac_lib_var=no"
4758 fi
4759 rm -f conftest*
4760 LIBS="$ac_save_LIBS"
4761
4762 fi
4763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4764   echo "$ac_t""yes" 1>&6
4765   LIBS="$LIBS -lx"
4766 else
4767   echo "$ac_t""no" 1>&6
4768 fi
4769
4770 fi
4771
4772 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4773 echo "configure:4774: checking for sys/wait.h that is POSIX.1 compatible" >&5
4774 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4775   echo $ac_n "(cached) $ac_c" 1>&6
4776 else
4777   cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780 #include <sys/types.h>
4781 #include <sys/wait.h>
4782 #ifndef WEXITSTATUS
4783 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4784 #endif
4785 #ifndef WIFEXITED
4786 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4787 #endif
4788 int main() {
4789 int s;
4790 wait (&s);
4791 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4792 ; return 0; }
4793 EOF
4794 if { (eval echo configure:4795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4795   rm -rf conftest*
4796   ac_cv_header_sys_wait_h=yes
4797 else
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -rf conftest*
4801   ac_cv_header_sys_wait_h=no
4802 fi
4803 rm -f conftest*
4804 fi
4805
4806 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4807 if test $ac_cv_header_sys_wait_h = yes; then
4808   cat >> confdefs.h <<\EOF
4809 #define HAVE_SYS_WAIT_H 1
4810 EOF
4811
4812 fi
4813
4814 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4815 echo "configure:4816: checking POSIX termios" >&5
4816 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 #include <sys/types.h>
4823 #include <unistd.h>
4824 #include <termios.h>
4825 int main() {
4826 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4827    tcgetattr(0, 0);
4828 ; return 0; }
4829 EOF
4830 if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4831   rm -rf conftest*
4832   am_cv_sys_posix_termios=yes
4833 else
4834   echo "configure: failed program was:" >&5
4835   cat conftest.$ac_ext >&5
4836   rm -rf conftest*
4837   am_cv_sys_posix_termios=no
4838 fi
4839 rm -f conftest*
4840 fi
4841
4842 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4843
4844
4845  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4846 echo "configure:4847: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4847 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4848   echo $ac_n "(cached) $ac_c" 1>&6
4849 else
4850   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4851
4852   gwinsz_in_termios_h=no
4853   if test $am_cv_sys_posix_termios = yes; then
4854     cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857 #include <sys/types.h>
4858 #     include <termios.h>
4859 #     ifdef TIOCGWINSZ
4860         yes
4861 #     endif
4862     
4863 EOF
4864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4865   egrep "yes" >/dev/null 2>&1; then
4866   rm -rf conftest*
4867   gwinsz_in_termios_h=yes
4868 fi
4869 rm -f conftest*
4870
4871   fi
4872
4873   if test $gwinsz_in_termios_h = no; then
4874     cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877 #include <sys/types.h>
4878 #     include <sys/ioctl.h>
4879 #     ifdef TIOCGWINSZ
4880         yes
4881 #     endif
4882     
4883 EOF
4884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4885   egrep "yes" >/dev/null 2>&1; then
4886   rm -rf conftest*
4887   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4888 fi
4889 rm -f conftest*
4890
4891   fi
4892   
4893 fi
4894
4895 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4896   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4897     cat >> confdefs.h <<\EOF
4898 #define GWINSZ_IN_SYS_IOCTL 1
4899 EOF
4900
4901   fi
4902
4903 if test $am_cv_sys_posix_termios = yes ; then
4904         cat >> confdefs.h <<\EOF
4905 #define HAVE_POSIX_TERMIOS 1
4906 EOF
4907
4908 fi
4909
4910 for ac_hdr in \
4911         arpa/inet.h             \
4912         arpa/nameser.h  \
4913         assert.h                \
4914         conio.h                 \
4915         crypt.h                 \
4916         direct.h                \
4917         errno.h                 \
4918         fcntl.h                 \
4919         filio.h                 \
4920         getopt.h                \
4921         grp.h                   \
4922         io.h                    \
4923         libutil.h               \
4924         limits.h                \
4925         locale.h                \
4926         netinet/tcp.h   \
4927         malloc.h                \
4928         memory.h                \
4929         psap.h                  \
4930         pwd.h                   \
4931         process.h               \
4932         resolv.h                \
4933         sgtty.h                 \
4934         shadow.h                \
4935         stddef.h                \
4936         string.h                \
4937         strings.h               \
4938         sysexits.h              \
4939         sys/file.h              \
4940         sys/filio.h             \
4941         sys/errno.h             \
4942         sys/ioctl.h             \
4943         sys/param.h             \
4944         sys/resource.h  \
4945         sys/select.h    \
4946         sys/socket.h    \
4947         sys/syslog.h    \
4948         sys/time.h              \
4949         sys/types.h             \
4950         syslog.h                \
4951         termios.h               \
4952         unistd.h                \
4953         winsock.h               \
4954
4955 do
4956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4958 echo "configure:4959: checking for $ac_hdr" >&5
4959 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4960   echo $ac_n "(cached) $ac_c" 1>&6
4961 else
4962   cat > conftest.$ac_ext <<EOF
4963 #line 4964 "configure"
4964 #include "confdefs.h"
4965 #include <$ac_hdr>
4966 EOF
4967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4968 { (eval echo configure:4969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4970 if test -z "$ac_err"; then
4971   rm -rf conftest*
4972   eval "ac_cv_header_$ac_safe=yes"
4973 else
4974   echo "$ac_err" >&5
4975   echo "configure: failed program was:" >&5
4976   cat conftest.$ac_ext >&5
4977   rm -rf conftest*
4978   eval "ac_cv_header_$ac_safe=no"
4979 fi
4980 rm -f conftest*
4981 fi
4982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4983   echo "$ac_t""yes" 1>&6
4984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4985   cat >> confdefs.h <<EOF
4986 #define $ac_tr_hdr 1
4987 EOF
4988  
4989 else
4990   echo "$ac_t""no" 1>&6
4991 fi
4992 done
4993
4994
4995
4996
4997 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4998 echo "configure:4999: checking for dlopen" >&5
4999 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
5000   echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002   cat > conftest.$ac_ext <<EOF
5003 #line 5004 "configure"
5004 #include "confdefs.h"
5005 /* System header to define __stub macros and hopefully few prototypes,
5006     which can conflict with char dlopen(); below.  */
5007 #include <assert.h>
5008 /* Override any gcc2 internal prototype to avoid an error.  */
5009 /* We use char because int might match the return type of a gcc2
5010     builtin and then its argument prototype would still apply.  */
5011 char dlopen();
5012 char (*f)();
5013
5014 int main() {
5015
5016 /* The GNU C library defines this for functions which it implements
5017     to always fail with ENOSYS.  Some functions are actually named
5018     something starting with __ and the normal name is an alias.  */
5019 #if defined (__stub_dlopen) || defined (__stub___dlopen)
5020 choke me
5021 #else
5022 f = dlopen;
5023 #endif
5024
5025 ; return 0; }
5026 EOF
5027 if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5028   rm -rf conftest*
5029   eval "ac_cv_func_dlopen=yes"
5030 else
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -rf conftest*
5034   eval "ac_cv_func_dlopen=no"
5035 fi
5036 rm -f conftest*
5037 fi
5038
5039 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
5040   echo "$ac_t""yes" 1>&6
5041   :
5042 else
5043   echo "$ac_t""no" 1>&6
5044 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5045 echo "configure:5046: checking for dlopen in -ldl" >&5
5046 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
5047 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5048   echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5050   ac_save_LIBS="$LIBS"
5051 LIBS="-ldl  $LIBS"
5052 cat > conftest.$ac_ext <<EOF
5053 #line 5054 "configure"
5054 #include "confdefs.h"
5055 /* Override any gcc2 internal prototype to avoid an error.  */
5056 /* We use char because int might match the return type of a gcc2
5057     builtin and then its argument prototype would still apply.  */
5058 char dlopen();
5059
5060 int main() {
5061 dlopen()
5062 ; return 0; }
5063 EOF
5064 if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065   rm -rf conftest*
5066   eval "ac_cv_lib_$ac_lib_var=yes"
5067 else
5068   echo "configure: failed program was:" >&5
5069   cat conftest.$ac_ext >&5
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=no"
5072 fi
5073 rm -f conftest*
5074 LIBS="$ac_save_LIBS"
5075
5076 fi
5077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5078   echo "$ac_t""yes" 1>&6
5079     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5080     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5081   cat >> confdefs.h <<EOF
5082 #define $ac_tr_lib 1
5083 EOF
5084
5085   LIBS="-ldl $LIBS"
5086
5087 else
5088   echo "$ac_t""no" 1>&6
5089 fi
5090
5091 fi
5092
5093
5094 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5095 echo "configure:5096: checking for sigset in -lV3" >&5
5096 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5097 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100   ac_save_LIBS="$LIBS"
5101 LIBS="-lV3  $LIBS"
5102 cat > conftest.$ac_ext <<EOF
5103 #line 5104 "configure"
5104 #include "confdefs.h"
5105 /* Override any gcc2 internal prototype to avoid an error.  */
5106 /* We use char because int might match the return type of a gcc2
5107     builtin and then its argument prototype would still apply.  */
5108 char sigset();
5109
5110 int main() {
5111 sigset()
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5115   rm -rf conftest*
5116   eval "ac_cv_lib_$ac_lib_var=yes"
5117 else
5118   echo "configure: failed program was:" >&5
5119   cat conftest.$ac_ext >&5
5120   rm -rf conftest*
5121   eval "ac_cv_lib_$ac_lib_var=no"
5122 fi
5123 rm -f conftest*
5124 LIBS="$ac_save_LIBS"
5125
5126 fi
5127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5128   echo "$ac_t""yes" 1>&6
5129     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5130     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5131   cat >> confdefs.h <<EOF
5132 #define $ac_tr_lib 1
5133 EOF
5134
5135   LIBS="-lV3 $LIBS"
5136
5137 else
5138   echo "$ac_t""no" 1>&6
5139 fi
5140
5141
5142 if test $ac_cv_header_winsock_h = yes; then
5143         echo $ac_n "checking for winsock""... $ac_c" 1>&6
5144 echo "configure:5145: checking for winsock" >&5
5145 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
5146   echo $ac_n "(cached) $ac_c" 1>&6
5147 else
5148   cat > conftest.$ac_ext <<EOF
5149 #line 5150 "configure"
5150 #include "confdefs.h"
5151 #include <winsock.h>
5152 int main() {
5153
5154                         socket(0,0,0);
5155                         select(0,NULL,NULL,NULL,NULL);
5156                         closesocket(0);
5157                         gethostname(NULL,0);
5158         
5159 ; return 0; }
5160 EOF
5161 if { (eval echo configure:5162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5162   rm -rf conftest*
5163   ol_cv_winsock=yes
5164 else
5165   echo "configure: failed program was:" >&5
5166   cat conftest.$ac_ext >&5
5167   rm -rf conftest*
5168   ol_cv_winsock=no
5169 fi
5170 rm -f conftest*
5171 fi
5172
5173 echo "$ac_t""$ol_cv_winsock" 1>&6
5174
5175         if test $ol_cv_winsock = yes ; then
5176                 cat >> confdefs.h <<\EOF
5177 #define HAVE_WINSOCK 1
5178 EOF
5179
5180                 ac_cv_func_socket=yes
5181                 ac_cv_func_select=yes
5182                 ac_cv_func_closesocket=yes
5183                 ac_cv_func_gethostname=yes
5184         fi
5185 fi
5186
5187
5188 echo $ac_n "checking for socket""... $ac_c" 1>&6
5189 echo "configure:5190: checking for socket" >&5
5190 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5191   echo $ac_n "(cached) $ac_c" 1>&6
5192 else
5193   cat > conftest.$ac_ext <<EOF
5194 #line 5195 "configure"
5195 #include "confdefs.h"
5196 /* System header to define __stub macros and hopefully few prototypes,
5197     which can conflict with char socket(); below.  */
5198 #include <assert.h>
5199 /* Override any gcc2 internal prototype to avoid an error.  */
5200 /* We use char because int might match the return type of a gcc2
5201     builtin and then its argument prototype would still apply.  */
5202 char socket();
5203 char (*f)();
5204
5205 int main() {
5206
5207 /* The GNU C library defines this for functions which it implements
5208     to always fail with ENOSYS.  Some functions are actually named
5209     something starting with __ and the normal name is an alias.  */
5210 #if defined (__stub_socket) || defined (__stub___socket)
5211 choke me
5212 #else
5213 f = socket;
5214 #endif
5215
5216 ; return 0; }
5217 EOF
5218 if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5219   rm -rf conftest*
5220   eval "ac_cv_func_socket=yes"
5221 else
5222   echo "configure: failed program was:" >&5
5223   cat conftest.$ac_ext >&5
5224   rm -rf conftest*
5225   eval "ac_cv_func_socket=no"
5226 fi
5227 rm -f conftest*
5228 fi
5229
5230 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5231   echo "$ac_t""yes" 1>&6
5232   :
5233 else
5234   echo "$ac_t""no" 1>&6
5235         
5236         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5237 echo "configure:5238: checking for main in -lsocket" >&5
5238 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5239 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242   ac_save_LIBS="$LIBS"
5243 LIBS="-lsocket  $LIBS"
5244 cat > conftest.$ac_ext <<EOF
5245 #line 5246 "configure"
5246 #include "confdefs.h"
5247
5248 int main() {
5249 main()
5250 ; return 0; }
5251 EOF
5252 if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5253   rm -rf conftest*
5254   eval "ac_cv_lib_$ac_lib_var=yes"
5255 else
5256   echo "configure: failed program was:" >&5
5257   cat conftest.$ac_ext >&5
5258   rm -rf conftest*
5259   eval "ac_cv_lib_$ac_lib_var=no"
5260 fi
5261 rm -f conftest*
5262 LIBS="$ac_save_LIBS"
5263
5264 fi
5265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5266   echo "$ac_t""yes" 1>&6
5267     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5268     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5269   cat >> confdefs.h <<EOF
5270 #define $ac_tr_lib 1
5271 EOF
5272
5273   LIBS="-lsocket $LIBS"
5274
5275 else
5276   echo "$ac_t""no" 1>&6
5277 fi
5278
5279         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5280 echo "configure:5281: checking for main in -lnet" >&5
5281 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5282 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285   ac_save_LIBS="$LIBS"
5286 LIBS="-lnet  $LIBS"
5287 cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290
5291 int main() {
5292 main()
5293 ; return 0; }
5294 EOF
5295 if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5296   rm -rf conftest*
5297   eval "ac_cv_lib_$ac_lib_var=yes"
5298 else
5299   echo "configure: failed program was:" >&5
5300   cat conftest.$ac_ext >&5
5301   rm -rf conftest*
5302   eval "ac_cv_lib_$ac_lib_var=no"
5303 fi
5304 rm -f conftest*
5305 LIBS="$ac_save_LIBS"
5306
5307 fi
5308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5309   echo "$ac_t""yes" 1>&6
5310     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5311     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5312   cat >> confdefs.h <<EOF
5313 #define $ac_tr_lib 1
5314 EOF
5315
5316   LIBS="-lnet $LIBS"
5317
5318 else
5319   echo "$ac_t""no" 1>&6
5320 fi
5321
5322         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5323 echo "configure:5324: checking for main in -lnsl_s" >&5
5324 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5326   echo $ac_n "(cached) $ac_c" 1>&6
5327 else
5328   ac_save_LIBS="$LIBS"
5329 LIBS="-lnsl_s  $LIBS"
5330 cat > conftest.$ac_ext <<EOF
5331 #line 5332 "configure"
5332 #include "confdefs.h"
5333
5334 int main() {
5335 main()
5336 ; return 0; }
5337 EOF
5338 if { (eval echo configure:5339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5339   rm -rf conftest*
5340   eval "ac_cv_lib_$ac_lib_var=yes"
5341 else
5342   echo "configure: failed program was:" >&5
5343   cat conftest.$ac_ext >&5
5344   rm -rf conftest*
5345   eval "ac_cv_lib_$ac_lib_var=no"
5346 fi
5347 rm -f conftest*
5348 LIBS="$ac_save_LIBS"
5349
5350 fi
5351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5352   echo "$ac_t""yes" 1>&6
5353     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5354     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5355   cat >> confdefs.h <<EOF
5356 #define $ac_tr_lib 1
5357 EOF
5358
5359   LIBS="-lnsl_s $LIBS"
5360
5361 else
5362   echo "$ac_t""no" 1>&6
5363 fi
5364
5365         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5366 echo "configure:5367: checking for main in -lnsl" >&5
5367 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5369   echo $ac_n "(cached) $ac_c" 1>&6
5370 else
5371   ac_save_LIBS="$LIBS"
5372 LIBS="-lnsl  $LIBS"
5373 cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5376
5377 int main() {
5378 main()
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5382   rm -rf conftest*
5383   eval "ac_cv_lib_$ac_lib_var=yes"
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   eval "ac_cv_lib_$ac_lib_var=no"
5389 fi
5390 rm -f conftest*
5391 LIBS="$ac_save_LIBS"
5392
5393 fi
5394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5395   echo "$ac_t""yes" 1>&6
5396     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5397     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5398   cat >> confdefs.h <<EOF
5399 #define $ac_tr_lib 1
5400 EOF
5401
5402   LIBS="-lnsl $LIBS"
5403
5404 else
5405   echo "$ac_t""no" 1>&6
5406 fi
5407
5408         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5409 echo "configure:5410: checking for socket in -linet" >&5
5410 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5411 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5412   echo $ac_n "(cached) $ac_c" 1>&6
5413 else
5414   ac_save_LIBS="$LIBS"
5415 LIBS="-linet  $LIBS"
5416 cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419 /* Override any gcc2 internal prototype to avoid an error.  */
5420 /* We use char because int might match the return type of a gcc2
5421     builtin and then its argument prototype would still apply.  */
5422 char socket();
5423
5424 int main() {
5425 socket()
5426 ; return 0; }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5429   rm -rf conftest*
5430   eval "ac_cv_lib_$ac_lib_var=yes"
5431 else
5432   echo "configure: failed program was:" >&5
5433   cat conftest.$ac_ext >&5
5434   rm -rf conftest*
5435   eval "ac_cv_lib_$ac_lib_var=no"
5436 fi
5437 rm -f conftest*
5438 LIBS="$ac_save_LIBS"
5439
5440 fi
5441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5442   echo "$ac_t""yes" 1>&6
5443     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5444     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5445   cat >> confdefs.h <<EOF
5446 #define $ac_tr_lib 1
5447 EOF
5448
5449   LIBS="-linet $LIBS"
5450
5451 else
5452   echo "$ac_t""no" 1>&6
5453 fi
5454
5455         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5456 echo "configure:5457: checking for main in -lgen" >&5
5457 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5458 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5459   echo $ac_n "(cached) $ac_c" 1>&6
5460 else
5461   ac_save_LIBS="$LIBS"
5462 LIBS="-lgen  $LIBS"
5463 cat > conftest.$ac_ext <<EOF
5464 #line 5465 "configure"
5465 #include "confdefs.h"
5466
5467 int main() {
5468 main()
5469 ; return 0; }
5470 EOF
5471 if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5472   rm -rf conftest*
5473   eval "ac_cv_lib_$ac_lib_var=yes"
5474 else
5475   echo "configure: failed program was:" >&5
5476   cat conftest.$ac_ext >&5
5477   rm -rf conftest*
5478   eval "ac_cv_lib_$ac_lib_var=no"
5479 fi
5480 rm -f conftest*
5481 LIBS="$ac_save_LIBS"
5482
5483 fi
5484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5485   echo "$ac_t""yes" 1>&6
5486     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5487     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5488   cat >> confdefs.h <<EOF
5489 #define $ac_tr_lib 1
5490 EOF
5491
5492   LIBS="-lgen $LIBS"
5493
5494 else
5495   echo "$ac_t""no" 1>&6
5496 fi
5497
5498
5499 fi
5500
5501
5502 echo $ac_n "checking for select""... $ac_c" 1>&6
5503 echo "configure:5504: checking for select" >&5
5504 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5505   echo $ac_n "(cached) $ac_c" 1>&6
5506 else
5507   cat > conftest.$ac_ext <<EOF
5508 #line 5509 "configure"
5509 #include "confdefs.h"
5510 /* System header to define __stub macros and hopefully few prototypes,
5511     which can conflict with char select(); below.  */
5512 #include <assert.h>
5513 /* Override any gcc2 internal prototype to avoid an error.  */
5514 /* We use char because int might match the return type of a gcc2
5515     builtin and then its argument prototype would still apply.  */
5516 char select();
5517 char (*f)();
5518
5519 int main() {
5520
5521 /* The GNU C library defines this for functions which it implements
5522     to always fail with ENOSYS.  Some functions are actually named
5523     something starting with __ and the normal name is an alias.  */
5524 #if defined (__stub_select) || defined (__stub___select)
5525 choke me
5526 #else
5527 f = select;
5528 #endif
5529
5530 ; return 0; }
5531 EOF
5532 if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5533   rm -rf conftest*
5534   eval "ac_cv_func_select=yes"
5535 else
5536   echo "configure: failed program was:" >&5
5537   cat conftest.$ac_ext >&5
5538   rm -rf conftest*
5539   eval "ac_cv_func_select=no"
5540 fi
5541 rm -f conftest*
5542 fi
5543
5544 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5545   echo "$ac_t""yes" 1>&6
5546   :
5547 else
5548   echo "$ac_t""no" 1>&6
5549 { echo "configure: error: select() required." 1>&2; exit 1; }
5550 fi
5551
5552
5553 if test "${ac_cv_header_winsock_h}" != yes; then
5554                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5555 echo "configure:5556: checking types of arguments for select()" >&5
5556  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5557   echo $ac_n "(cached) $ac_c" 1>&6
5558 else
5559    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5560   echo $ac_n "(cached) $ac_c" 1>&6
5561 else
5562     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5563   echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5566      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5567       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5568        cat > conftest.$ac_ext <<EOF
5569 #line 5570 "configure"
5570 #include "confdefs.h"
5571 #ifdef HAVE_SYS_TYPES_H
5572 #include <sys/types.h>
5573 #endif
5574 #ifdef HAVE_SYS_TIME_H
5575 #include <sys/time.h>
5576 #endif
5577 #ifdef HAVE_SYS_SELECT_H
5578 #include <sys/select.h>
5579 #endif
5580 #ifdef HAVE_SYS_SOCKET_H
5581 #include <sys/socket.h>
5582 #endif
5583 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);
5584 int main() {
5585
5586 ; return 0; }
5587 EOF
5588 if { (eval echo configure:5589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5589   rm -rf conftest*
5590           ac_not_found=no ; break 3
5591 else
5592   echo "configure: failed program was:" >&5
5593   cat conftest.$ac_ext >&5
5594   rm -rf conftest*
5595   ac_not_found=yes
5596 fi
5597 rm -f conftest*
5598       done
5599      done
5600     done
5601    
5602 fi
5603   
5604 fi
5605  
5606 fi
5607  if test "$ac_not_found" = yes; then
5608   ac_cv_func_select_arg1=int 
5609   ac_cv_func_select_arg234='int *' 
5610   ac_cv_func_select_arg5='struct timeval *'
5611  fi
5612  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5613  cat >> confdefs.h <<EOF
5614 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5615 EOF
5616
5617  cat >> confdefs.h <<EOF
5618 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5619 EOF
5620
5621  cat >> confdefs.h <<EOF
5622 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5623 EOF
5624
5625
5626 fi
5627
5628
5629 for ac_hdr in regex.h 
5630 do
5631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5633 echo "configure:5634: checking for $ac_hdr" >&5
5634 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5635   echo $ac_n "(cached) $ac_c" 1>&6
5636 else
5637   cat > conftest.$ac_ext <<EOF
5638 #line 5639 "configure"
5639 #include "confdefs.h"
5640 #include <$ac_hdr>
5641 EOF
5642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5643 { (eval echo configure:5644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5645 if test -z "$ac_err"; then
5646   rm -rf conftest*
5647   eval "ac_cv_header_$ac_safe=yes"
5648 else
5649   echo "$ac_err" >&5
5650   echo "configure: failed program was:" >&5
5651   cat conftest.$ac_ext >&5
5652   rm -rf conftest*
5653   eval "ac_cv_header_$ac_safe=no"
5654 fi
5655 rm -f conftest*
5656 fi
5657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5658   echo "$ac_t""yes" 1>&6
5659     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5660   cat >> confdefs.h <<EOF
5661 #define $ac_tr_hdr 1
5662 EOF
5663  
5664 else
5665   echo "$ac_t""no" 1>&6
5666 fi
5667 done
5668
5669 if test "$ac_cv_header_regex_h" != yes ; then
5670         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5671 fi
5672 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5673 echo "configure:5674: checking for regfree" >&5
5674 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5675   echo $ac_n "(cached) $ac_c" 1>&6
5676 else
5677   cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680 /* System header to define __stub macros and hopefully few prototypes,
5681     which can conflict with char regfree(); below.  */
5682 #include <assert.h>
5683 /* Override any gcc2 internal prototype to avoid an error.  */
5684 /* We use char because int might match the return type of a gcc2
5685     builtin and then its argument prototype would still apply.  */
5686 char regfree();
5687 char (*f)();
5688
5689 int main() {
5690
5691 /* The GNU C library defines this for functions which it implements
5692     to always fail with ENOSYS.  Some functions are actually named
5693     something starting with __ and the normal name is an alias.  */
5694 #if defined (__stub_regfree) || defined (__stub___regfree)
5695 choke me
5696 #else
5697 f = regfree;
5698 #endif
5699
5700 ; return 0; }
5701 EOF
5702 if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5703   rm -rf conftest*
5704   eval "ac_cv_func_regfree=yes"
5705 else
5706   echo "configure: failed program was:" >&5
5707   cat conftest.$ac_ext >&5
5708   rm -rf conftest*
5709   eval "ac_cv_func_regfree=no"
5710 fi
5711 rm -f conftest*
5712 fi
5713
5714 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5715   echo "$ac_t""yes" 1>&6
5716   :
5717 else
5718   echo "$ac_t""no" 1>&6
5719 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5720 fi
5721
5722
5723
5724 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5725 echo "configure:5726: checking for compatible POSIX regex" >&5
5726 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5727   echo $ac_n "(cached) $ac_c" 1>&6
5728 else
5729   
5730         if test "$cross_compiling" = yes; then
5731   ol_cv_c_posix_regex=cross
5732 else
5733   cat > conftest.$ac_ext <<EOF
5734 #line 5735 "configure"
5735 #include "confdefs.h"
5736
5737 #include <sys/types.h>
5738 #include <regex.h>
5739 static char *pattern, *string;
5740 main()
5741 {
5742         int rc;
5743         regex_t re;
5744
5745         pattern = "^A";
5746
5747         if(regcomp(&re, pattern, 0)) {
5748                 return -1;
5749         }
5750         
5751         string = "ALL MATCH";
5752         
5753         rc = regexec(&re, string, 0, (void*)0, 0);
5754
5755         regfree(&re);
5756
5757         return rc;
5758 }
5759 EOF
5760 if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5761 then
5762   ol_cv_c_posix_regex=yes
5763 else
5764   echo "configure: failed program was:" >&5
5765   cat conftest.$ac_ext >&5
5766   rm -fr conftest*
5767   ol_cv_c_posix_regex=no
5768 fi
5769 rm -fr conftest*
5770 fi
5771
5772 fi
5773
5774 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5775
5776 if test "$ol_cv_c_posix_regex" = no ; then
5777         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5778 fi
5779
5780 ol_link_dnssrv=no
5781 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5782 echo "configure:5783: checking for res_query" >&5
5783 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5784   echo $ac_n "(cached) $ac_c" 1>&6
5785 else
5786   cat > conftest.$ac_ext <<EOF
5787 #line 5788 "configure"
5788 #include "confdefs.h"
5789 /* System header to define __stub macros and hopefully few prototypes,
5790     which can conflict with char res_query(); below.  */
5791 #include <assert.h>
5792 /* Override any gcc2 internal prototype to avoid an error.  */
5793 /* We use char because int might match the return type of a gcc2
5794     builtin and then its argument prototype would still apply.  */
5795 char res_query();
5796 char (*f)();
5797
5798 int main() {
5799
5800 /* The GNU C library defines this for functions which it implements
5801     to always fail with ENOSYS.  Some functions are actually named
5802     something starting with __ and the normal name is an alias.  */
5803 #if defined (__stub_res_query) || defined (__stub___res_query)
5804 choke me
5805 #else
5806 f = res_query;
5807 #endif
5808
5809 ; return 0; }
5810 EOF
5811 if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5812   rm -rf conftest*
5813   eval "ac_cv_func_res_query=yes"
5814 else
5815   echo "configure: failed program was:" >&5
5816   cat conftest.$ac_ext >&5
5817   rm -rf conftest*
5818   eval "ac_cv_func_res_query=no"
5819 fi
5820 rm -f conftest*
5821 fi
5822
5823 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5824   echo "$ac_t""yes" 1>&6
5825   :
5826 else
5827   echo "$ac_t""no" 1>&6
5828 fi
5829
5830 if test $ac_cv_func_res_query = no ; then 
5831         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
5832 echo "configure:5833: checking for __res_query" >&5
5833 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
5834   echo $ac_n "(cached) $ac_c" 1>&6
5835 else
5836   cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 /* System header to define __stub macros and hopefully few prototypes,
5840     which can conflict with char __res_query(); below.  */
5841 #include <assert.h>
5842 /* Override any gcc2 internal prototype to avoid an error.  */
5843 /* We use char because int might match the return type of a gcc2
5844     builtin and then its argument prototype would still apply.  */
5845 char __res_query();
5846 char (*f)();
5847
5848 int main() {
5849
5850 /* The GNU C library defines this for functions which it implements
5851     to always fail with ENOSYS.  Some functions are actually named
5852     something starting with __ and the normal name is an alias.  */
5853 #if defined (__stub___res_query) || defined (__stub_____res_query)
5854 choke me
5855 #else
5856 f = __res_query;
5857 #endif
5858
5859 ; return 0; }
5860 EOF
5861 if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5862   rm -rf conftest*
5863   eval "ac_cv_func___res_query=yes"
5864 else
5865   echo "configure: failed program was:" >&5
5866   cat conftest.$ac_ext >&5
5867   rm -rf conftest*
5868   eval "ac_cv_func___res_query=no"
5869 fi
5870 rm -f conftest*
5871 fi
5872
5873 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
5874   echo "$ac_t""yes" 1>&6
5875   :
5876 else
5877   echo "$ac_t""no" 1>&6
5878 fi
5879
5880         ac_cv_func_res_query=$ac_cv_func___res_query
5881 fi
5882
5883 if test $ac_cv_func_res_query = no ; then 
5884         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5885 echo "configure:5886: checking for res_query in -lbind" >&5
5886 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5888   echo $ac_n "(cached) $ac_c" 1>&6
5889 else
5890   ac_save_LIBS="$LIBS"
5891 LIBS="-lbind  $LIBS"
5892 cat > conftest.$ac_ext <<EOF
5893 #line 5894 "configure"
5894 #include "confdefs.h"
5895 /* Override any gcc2 internal prototype to avoid an error.  */
5896 /* We use char because int might match the return type of a gcc2
5897     builtin and then its argument prototype would still apply.  */
5898 char res_query();
5899
5900 int main() {
5901 res_query()
5902 ; return 0; }
5903 EOF
5904 if { (eval echo configure:5905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5905   rm -rf conftest*
5906   eval "ac_cv_lib_$ac_lib_var=yes"
5907 else
5908   echo "configure: failed program was:" >&5
5909   cat conftest.$ac_ext >&5
5910   rm -rf conftest*
5911   eval "ac_cv_lib_$ac_lib_var=no"
5912 fi
5913 rm -f conftest*
5914 LIBS="$ac_save_LIBS"
5915
5916 fi
5917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5918   echo "$ac_t""yes" 1>&6
5919     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5920     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5921   cat >> confdefs.h <<EOF
5922 #define $ac_tr_lib 1
5923 EOF
5924
5925   LIBS="-lbind $LIBS"
5926
5927 else
5928   echo "$ac_t""no" 1>&6
5929 fi
5930
5931         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5932 fi
5933
5934 if test $ac_cv_func_res_query = no ; then 
5935         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5936 echo "configure:5937: checking for __res_query in -lbind" >&5
5937 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5939   echo $ac_n "(cached) $ac_c" 1>&6
5940 else
5941   ac_save_LIBS="$LIBS"
5942 LIBS="-lbind  $LIBS"
5943 cat > conftest.$ac_ext <<EOF
5944 #line 5945 "configure"
5945 #include "confdefs.h"
5946 /* Override any gcc2 internal prototype to avoid an error.  */
5947 /* We use char because int might match the return type of a gcc2
5948     builtin and then its argument prototype would still apply.  */
5949 char __res_query();
5950
5951 int main() {
5952 __res_query()
5953 ; return 0; }
5954 EOF
5955 if { (eval echo configure:5956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5956   rm -rf conftest*
5957   eval "ac_cv_lib_$ac_lib_var=yes"
5958 else
5959   echo "configure: failed program was:" >&5
5960   cat conftest.$ac_ext >&5
5961   rm -rf conftest*
5962   eval "ac_cv_lib_$ac_lib_var=no"
5963 fi
5964 rm -f conftest*
5965 LIBS="$ac_save_LIBS"
5966
5967 fi
5968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5969   echo "$ac_t""yes" 1>&6
5970     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5971     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5972   cat >> confdefs.h <<EOF
5973 #define $ac_tr_lib 1
5974 EOF
5975
5976   LIBS="-lbind $LIBS"
5977
5978 else
5979   echo "$ac_t""no" 1>&6
5980 fi
5981
5982         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5983 fi
5984
5985 if test $ac_cv_func_res_query = no ; then 
5986         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5987 echo "configure:5988: checking for res_query in -lresolv" >&5
5988 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5990   echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5992   ac_save_LIBS="$LIBS"
5993 LIBS="-lresolv  $LIBS"
5994 cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 /* Override any gcc2 internal prototype to avoid an error.  */
5998 /* We use char because int might match the return type of a gcc2
5999     builtin and then its argument prototype would still apply.  */
6000 char res_query();
6001
6002 int main() {
6003 res_query()
6004 ; return 0; }
6005 EOF
6006 if { (eval echo configure:6007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6007   rm -rf conftest*
6008   eval "ac_cv_lib_$ac_lib_var=yes"
6009 else
6010   echo "configure: failed program was:" >&5
6011   cat conftest.$ac_ext >&5
6012   rm -rf conftest*
6013   eval "ac_cv_lib_$ac_lib_var=no"
6014 fi
6015 rm -f conftest*
6016 LIBS="$ac_save_LIBS"
6017
6018 fi
6019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6020   echo "$ac_t""yes" 1>&6
6021     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6022     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6023   cat >> confdefs.h <<EOF
6024 #define $ac_tr_lib 1
6025 EOF
6026
6027   LIBS="-lresolv $LIBS"
6028
6029 else
6030   echo "$ac_t""no" 1>&6
6031 fi
6032
6033         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
6034 fi
6035
6036 if test $ac_cv_func_res_query = no ; then 
6037         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
6038 echo "configure:6039: checking for __res_query in -lresolv" >&5
6039 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
6040 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6041   echo $ac_n "(cached) $ac_c" 1>&6
6042 else
6043   ac_save_LIBS="$LIBS"
6044 LIBS="-lresolv  $LIBS"
6045 cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 /* Override any gcc2 internal prototype to avoid an error.  */
6049 /* We use char because int might match the return type of a gcc2
6050     builtin and then its argument prototype would still apply.  */
6051 char __res_query();
6052
6053 int main() {
6054 __res_query()
6055 ; return 0; }
6056 EOF
6057 if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6058   rm -rf conftest*
6059   eval "ac_cv_lib_$ac_lib_var=yes"
6060 else
6061   echo "configure: failed program was:" >&5
6062   cat conftest.$ac_ext >&5
6063   rm -rf conftest*
6064   eval "ac_cv_lib_$ac_lib_var=no"
6065 fi
6066 rm -f conftest*
6067 LIBS="$ac_save_LIBS"
6068
6069 fi
6070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6071   echo "$ac_t""yes" 1>&6
6072     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6073     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6074   cat >> confdefs.h <<EOF
6075 #define $ac_tr_lib 1
6076 EOF
6077
6078   LIBS="-lresolv $LIBS"
6079
6080 else
6081   echo "$ac_t""no" 1>&6
6082 fi
6083
6084         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
6085 fi
6086
6087 if test "$ac_cv_func_res_query" = yes ; then
6088         cat >> confdefs.h <<\EOF
6089 #define HAVE_RES_QUERY 1
6090 EOF
6091
6092
6093         if test $ol_enable_dnssrv != no ; then
6094                 ol_link_dnssrv=yes
6095         fi
6096 fi
6097
6098 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
6099         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
6100 fi
6101
6102 for ac_func in getaddrinfo inet_ntop 
6103 do
6104 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6105 echo "configure:6106: checking for $ac_func" >&5
6106 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6107   echo $ac_n "(cached) $ac_c" 1>&6
6108 else
6109   cat > conftest.$ac_ext <<EOF
6110 #line 6111 "configure"
6111 #include "confdefs.h"
6112 /* System header to define __stub macros and hopefully few prototypes,
6113     which can conflict with char $ac_func(); below.  */
6114 #include <assert.h>
6115 /* Override any gcc2 internal prototype to avoid an error.  */
6116 /* We use char because int might match the return type of a gcc2
6117     builtin and then its argument prototype would still apply.  */
6118 char $ac_func();
6119 char (*f)();
6120
6121 int main() {
6122
6123 /* The GNU C library defines this for functions which it implements
6124     to always fail with ENOSYS.  Some functions are actually named
6125     something starting with __ and the normal name is an alias.  */
6126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6127 choke me
6128 #else
6129 f = $ac_func;
6130 #endif
6131
6132 ; return 0; }
6133 EOF
6134 if { (eval echo configure:6135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6135   rm -rf conftest*
6136   eval "ac_cv_func_$ac_func=yes"
6137 else
6138   echo "configure: failed program was:" >&5
6139   cat conftest.$ac_ext >&5
6140   rm -rf conftest*
6141   eval "ac_cv_func_$ac_func=no"
6142 fi
6143 rm -f conftest*
6144 fi
6145
6146 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6147   echo "$ac_t""yes" 1>&6
6148     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6149   cat >> confdefs.h <<EOF
6150 #define $ac_tr_func 1
6151 EOF
6152  
6153 else
6154   echo "$ac_t""no" 1>&6
6155 fi
6156 done
6157
6158
6159 ol_link_ipv6=no
6160 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
6161         if test $ol_enable_ipv6 = yes ; then
6162                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
6163         fi
6164 else
6165         for ac_func in gai_strerror 
6166 do
6167 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6168 echo "configure:6169: checking for $ac_func" >&5
6169 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6170   echo $ac_n "(cached) $ac_c" 1>&6
6171 else
6172   cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175 /* System header to define __stub macros and hopefully few prototypes,
6176     which can conflict with char $ac_func(); below.  */
6177 #include <assert.h>
6178 /* Override any gcc2 internal prototype to avoid an error.  */
6179 /* We use char because int might match the return type of a gcc2
6180     builtin and then its argument prototype would still apply.  */
6181 char $ac_func();
6182 char (*f)();
6183
6184 int main() {
6185
6186 /* The GNU C library defines this for functions which it implements
6187     to always fail with ENOSYS.  Some functions are actually named
6188     something starting with __ and the normal name is an alias.  */
6189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6190 choke me
6191 #else
6192 f = $ac_func;
6193 #endif
6194
6195 ; return 0; }
6196 EOF
6197 if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6198   rm -rf conftest*
6199   eval "ac_cv_func_$ac_func=yes"
6200 else
6201   echo "configure: failed program was:" >&5
6202   cat conftest.$ac_ext >&5
6203   rm -rf conftest*
6204   eval "ac_cv_func_$ac_func=no"
6205 fi
6206 rm -f conftest*
6207 fi
6208
6209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6210   echo "$ac_t""yes" 1>&6
6211     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6212   cat >> confdefs.h <<EOF
6213 #define $ac_tr_func 1
6214 EOF
6215  
6216 else
6217   echo "$ac_t""no" 1>&6
6218 fi
6219 done
6220
6221
6222         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
6223 echo "configure:6224: checking INET6_ADDRSTRLEN" >&5
6224 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
6225   echo $ac_n "(cached) $ac_c" 1>&6
6226 else
6227   
6228                 cat > conftest.$ac_ext <<EOF
6229 #line 6230 "configure"
6230 #include "confdefs.h"
6231
6232 #                       include <netinet/in.h>
6233 #                       ifdef INET6_ADDRSTRLEN
6234                                 __has_inet6_addrstrlen__;
6235 #                       endif
6236                 
6237 EOF
6238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6239   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
6240   rm -rf conftest*
6241   ol_cv_inet6_addrstrlen=yes
6242 else
6243   rm -rf conftest*
6244   ol_cv_inet6_addrstrlen=no
6245 fi
6246 rm -f conftest*
6247
6248 fi
6249
6250 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
6251
6252         if test $ol_cv_inet6_addrstrlen = yes ; then
6253                 ol_link_ipv6=yes
6254         elif test $ol_enable_ipv6 = yes ; then
6255                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
6256         fi
6257 fi
6258
6259 if test $ol_enable_local != no ; then
6260         for ac_hdr in sys/un.h 
6261 do
6262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6264 echo "configure:6265: checking for $ac_hdr" >&5
6265 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6266   echo $ac_n "(cached) $ac_c" 1>&6
6267 else
6268   cat > conftest.$ac_ext <<EOF
6269 #line 6270 "configure"
6270 #include "confdefs.h"
6271 #include <$ac_hdr>
6272 EOF
6273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6274 { (eval echo configure:6275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6276 if test -z "$ac_err"; then
6277   rm -rf conftest*
6278   eval "ac_cv_header_$ac_safe=yes"
6279 else
6280   echo "$ac_err" >&5
6281   echo "configure: failed program was:" >&5
6282   cat conftest.$ac_ext >&5
6283   rm -rf conftest*
6284   eval "ac_cv_header_$ac_safe=no"
6285 fi
6286 rm -f conftest*
6287 fi
6288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6289   echo "$ac_t""yes" 1>&6
6290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6291   cat >> confdefs.h <<EOF
6292 #define $ac_tr_hdr 1
6293 EOF
6294  
6295 else
6296   echo "$ac_t""no" 1>&6
6297 fi
6298 done
6299
6300
6301         if test $ol_enable_local = auto ; then
6302                 ol_enable_local=$ac_cv_header_sys_un_h
6303         elif test $ac_cv_header_sys_un_h = no ; then
6304                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
6305         fi
6306 fi
6307
6308 ol_link_kbind=no
6309 ol_link_kpasswd=no
6310 ol_link_krb5=no
6311 ol_link_krb4=no
6312
6313 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6314         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
6315         -o $ol_with_kerberos = k425 ; then
6316
6317         for ac_hdr in krb5.h
6318 do
6319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6321 echo "configure:6322: checking for $ac_hdr" >&5
6322 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6323   echo $ac_n "(cached) $ac_c" 1>&6
6324 else
6325   cat > conftest.$ac_ext <<EOF
6326 #line 6327 "configure"
6327 #include "confdefs.h"
6328 #include <$ac_hdr>
6329 EOF
6330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6331 { (eval echo configure:6332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6333 if test -z "$ac_err"; then
6334   rm -rf conftest*
6335   eval "ac_cv_header_$ac_safe=yes"
6336 else
6337   echo "$ac_err" >&5
6338   echo "configure: failed program was:" >&5
6339   cat conftest.$ac_ext >&5
6340   rm -rf conftest*
6341   eval "ac_cv_header_$ac_safe=no"
6342 fi
6343 rm -f conftest*
6344 fi
6345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6346   echo "$ac_t""yes" 1>&6
6347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6348   cat >> confdefs.h <<EOF
6349 #define $ac_tr_hdr 1
6350 EOF
6351  
6352 else
6353   echo "$ac_t""no" 1>&6
6354 fi
6355 done
6356
6357
6358         if test $ac_cv_header_krb5_h = yes ; then
6359                                 for ac_hdr in heim_err.h
6360 do
6361 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6362 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6363 echo "configure:6364: checking for $ac_hdr" >&5
6364 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6365   echo $ac_n "(cached) $ac_c" 1>&6
6366 else
6367   cat > conftest.$ac_ext <<EOF
6368 #line 6369 "configure"
6369 #include "confdefs.h"
6370 #include <$ac_hdr>
6371 EOF
6372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6373 { (eval echo configure:6374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6375 if test -z "$ac_err"; then
6376   rm -rf conftest*
6377   eval "ac_cv_header_$ac_safe=yes"
6378 else
6379   echo "$ac_err" >&5
6380   echo "configure: failed program was:" >&5
6381   cat conftest.$ac_ext >&5
6382   rm -rf conftest*
6383   eval "ac_cv_header_$ac_safe=no"
6384 fi
6385 rm -f conftest*
6386 fi
6387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6388   echo "$ac_t""yes" 1>&6
6389     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6390   cat >> confdefs.h <<EOF
6391 #define $ac_tr_hdr 1
6392 EOF
6393  
6394 else
6395   echo "$ac_t""no" 1>&6
6396 fi
6397 done
6398
6399                 if test $ac_cv_header_heim_err_h = yes ; then
6400                         krb5_impl=heimdal
6401                 else
6402                         krb5_impl=mit
6403                 fi
6404
6405                 if test $krb5_impl = mit; then
6406                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
6407 echo "configure:6408: checking for main in -lk5crypto" >&5
6408 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
6409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6410   echo $ac_n "(cached) $ac_c" 1>&6
6411 else
6412   ac_save_LIBS="$LIBS"
6413 LIBS="-lk5crypto  $LIBS"
6414 cat > conftest.$ac_ext <<EOF
6415 #line 6416 "configure"
6416 #include "confdefs.h"
6417
6418 int main() {
6419 main()
6420 ; return 0; }
6421 EOF
6422 if { (eval echo configure:6423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6423   rm -rf conftest*
6424   eval "ac_cv_lib_$ac_lib_var=yes"
6425 else
6426   echo "configure: failed program was:" >&5
6427   cat conftest.$ac_ext >&5
6428   rm -rf conftest*
6429   eval "ac_cv_lib_$ac_lib_var=no"
6430 fi
6431 rm -f conftest*
6432 LIBS="$ac_save_LIBS"
6433
6434 fi
6435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6436   echo "$ac_t""yes" 1>&6
6437   krb5crypto=k5crypto
6438 else
6439   echo "$ac_t""no" 1>&6
6440 krb5crypto=crypto
6441 fi
6442
6443
6444                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6445 echo "configure:6446: checking for main in -lkrb5" >&5
6446 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6447 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6448   echo $ac_n "(cached) $ac_c" 1>&6
6449 else
6450   ac_save_LIBS="$LIBS"
6451 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
6452 cat > conftest.$ac_ext <<EOF
6453 #line 6454 "configure"
6454 #include "confdefs.h"
6455
6456 int main() {
6457 main()
6458 ; return 0; }
6459 EOF
6460 if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6461   rm -rf conftest*
6462   eval "ac_cv_lib_$ac_lib_var=yes"
6463 else
6464   echo "configure: failed program was:" >&5
6465   cat conftest.$ac_ext >&5
6466   rm -rf conftest*
6467   eval "ac_cv_lib_$ac_lib_var=no"
6468 fi
6469 rm -f conftest*
6470 LIBS="$ac_save_LIBS"
6471
6472 fi
6473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6474   echo "$ac_t""yes" 1>&6
6475   have_krb5=yes
6476                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
6477 else
6478   echo "$ac_t""no" 1>&6
6479 have_krb5=no
6480 fi
6481
6482
6483                 elif test $krb5_impl = heimdal; then
6484                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6485 echo "configure:6486: checking for main in -lkrb5" >&5
6486 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6487 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6488   echo $ac_n "(cached) $ac_c" 1>&6
6489 else
6490   ac_save_LIBS="$LIBS"
6491 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6492 cat > conftest.$ac_ext <<EOF
6493 #line 6494 "configure"
6494 #include "confdefs.h"
6495
6496 int main() {
6497 main()
6498 ; return 0; }
6499 EOF
6500 if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6501   rm -rf conftest*
6502   eval "ac_cv_lib_$ac_lib_var=yes"
6503 else
6504   echo "configure: failed program was:" >&5
6505   cat conftest.$ac_ext >&5
6506   rm -rf conftest*
6507   eval "ac_cv_lib_$ac_lib_var=no"
6508 fi
6509 rm -f conftest*
6510 LIBS="$ac_save_LIBS"
6511
6512 fi
6513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6514   echo "$ac_t""yes" 1>&6
6515   have_krb5=yes
6516                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6517 else
6518   echo "$ac_t""no" 1>&6
6519 have_krb5=no
6520 fi
6521
6522
6523                         cat >> confdefs.h <<\EOF
6524 #define HAVE_HEIMDAL_KERBEROS 1
6525 EOF
6526
6527
6528                 else
6529                         have_krb5=no
6530                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6531                 fi
6532
6533                 if test $have_krb5 = yes ; then
6534                         ol_link_krb5=yes
6535
6536                         cat >> confdefs.h <<\EOF
6537 #define HAVE_KRB5 1
6538 EOF
6539
6540
6541                         if test $ol_enable_kpasswd != no ; then
6542                                 ol_link_kpasswd=yes;
6543                         fi
6544
6545                         if test $ol_with_kerberos = k5only ; then
6546                                 ol_with_kerberos=found
6547                         fi
6548
6549                 elif test $ol_with_kerberos != auto ; then
6550                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6551                 fi
6552
6553         fi
6554 fi
6555
6556 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6557         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6558
6559         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6560 do
6561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6563 echo "configure:6564: checking for $ac_hdr" >&5
6564 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6565   echo $ac_n "(cached) $ac_c" 1>&6
6566 else
6567   cat > conftest.$ac_ext <<EOF
6568 #line 6569 "configure"
6569 #include "confdefs.h"
6570 #include <$ac_hdr>
6571 EOF
6572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6573 { (eval echo configure:6574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6575 if test -z "$ac_err"; then
6576   rm -rf conftest*
6577   eval "ac_cv_header_$ac_safe=yes"
6578 else
6579   echo "$ac_err" >&5
6580   echo "configure: failed program was:" >&5
6581   cat conftest.$ac_ext >&5
6582   rm -rf conftest*
6583   eval "ac_cv_header_$ac_safe=no"
6584 fi
6585 rm -f conftest*
6586 fi
6587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6588   echo "$ac_t""yes" 1>&6
6589     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6590   cat >> confdefs.h <<EOF
6591 #define $ac_tr_hdr 1
6592 EOF
6593  
6594 else
6595   echo "$ac_t""no" 1>&6
6596 fi
6597 done
6598
6599
6600         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6601                 if test $krb5_impl = mit; then
6602                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6603 echo "configure:6604: checking for main in -lkrb4" >&5
6604 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6605 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6606   echo $ac_n "(cached) $ac_c" 1>&6
6607 else
6608   ac_save_LIBS="$LIBS"
6609 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
6610 cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613
6614 int main() {
6615 main()
6616 ; return 0; }
6617 EOF
6618 if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6619   rm -rf conftest*
6620   eval "ac_cv_lib_$ac_lib_var=yes"
6621 else
6622   echo "configure: failed program was:" >&5
6623   cat conftest.$ac_ext >&5
6624   rm -rf conftest*
6625   eval "ac_cv_lib_$ac_lib_var=no"
6626 fi
6627 rm -f conftest*
6628 LIBS="$ac_save_LIBS"
6629
6630 fi
6631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6632   echo "$ac_t""yes" 1>&6
6633   have_k425=yes
6634                                 KRB4_LIBS="-lkrb4 -ldes425"
6635 else
6636   echo "$ac_t""no" 1>&6
6637 have_k425=no
6638 fi
6639
6640
6641                 elif test $krb5_impl = heimdal; then
6642                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6643 echo "configure:6644: checking for main in -lkrb4" >&5
6644 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6645 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6646   echo $ac_n "(cached) $ac_c" 1>&6
6647 else
6648   ac_save_LIBS="$LIBS"
6649 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6650 cat > conftest.$ac_ext <<EOF
6651 #line 6652 "configure"
6652 #include "confdefs.h"
6653
6654 int main() {
6655 main()
6656 ; return 0; }
6657 EOF
6658 if { (eval echo configure:6659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6659   rm -rf conftest*
6660   eval "ac_cv_lib_$ac_lib_var=yes"
6661 else
6662   echo "configure: failed program was:" >&5
6663   cat conftest.$ac_ext >&5
6664   rm -rf conftest*
6665   eval "ac_cv_lib_$ac_lib_var=no"
6666 fi
6667 rm -f conftest*
6668 LIBS="$ac_save_LIBS"
6669
6670 fi
6671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6672   echo "$ac_t""yes" 1>&6
6673   have_k425=yes
6674                                 KRB4_LIBS="-lkrb4"
6675 else
6676   echo "$ac_t""no" 1>&6
6677 have_k425=no
6678 fi
6679
6680
6681                 else
6682                         have_425=no
6683                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6684                 fi
6685
6686                 if test $have_k425 = yes ; then
6687                         ol_with_kerberos=found
6688                         ol_link_krb4=yes
6689
6690                         cat >> confdefs.h <<\EOF
6691 #define HAVE_KRB425 1
6692 EOF
6693
6694                         cat >> confdefs.h <<\EOF
6695 #define HAVE_KRB4 1
6696 EOF
6697
6698
6699                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6700 echo "configure:6701: checking for des_debug in Kerberos libraries" >&5
6701 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   
6705                                                                 save_LIBS="$LIBS"
6706                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6707                                 cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710
6711 #include <kerberosIV/krb.h>
6712 #include <kerberosIV/des.h>
6713 extern int des_debug;
6714
6715 int main() {
6716
6717 des_debug = 1;
6718
6719 ; return 0; }
6720 EOF
6721 if { (eval echo configure:6722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6722   rm -rf conftest*
6723   ol_cv_var_des_debug=yes
6724 else
6725   echo "configure: failed program was:" >&5
6726   cat conftest.$ac_ext >&5
6727   rm -rf conftest*
6728   ol_cv_var_des_debug=no
6729 fi
6730 rm -f conftest*
6731                                                                 LIBS="$save_LIBS"
6732                         
6733 fi
6734
6735 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6736
6737                         if test $ol_cv_var_des_debug = yes ; then
6738                                 cat >> confdefs.h <<\EOF
6739 #define HAVE_DES_DEBUG 1
6740 EOF
6741
6742                         fi
6743
6744                         LIBS="$save_LIBS"
6745                 fi
6746         fi
6747 fi
6748
6749 if test $ol_link_krb5 = yes ; then
6750         ol_with_kerberos=found
6751 fi
6752
6753 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6754         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6755
6756         for ac_hdr in krb.h des.h krb-archaeology.h 
6757 do
6758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6760 echo "configure:6761: checking for $ac_hdr" >&5
6761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6762   echo $ac_n "(cached) $ac_c" 1>&6
6763 else
6764   cat > conftest.$ac_ext <<EOF
6765 #line 6766 "configure"
6766 #include "confdefs.h"
6767 #include <$ac_hdr>
6768 EOF
6769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6770 { (eval echo configure:6771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6772 if test -z "$ac_err"; then
6773   rm -rf conftest*
6774   eval "ac_cv_header_$ac_safe=yes"
6775 else
6776   echo "$ac_err" >&5
6777   echo "configure: failed program was:" >&5
6778   cat conftest.$ac_ext >&5
6779   rm -rf conftest*
6780   eval "ac_cv_header_$ac_safe=no"
6781 fi
6782 rm -f conftest*
6783 fi
6784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6785   echo "$ac_t""yes" 1>&6
6786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6787   cat >> confdefs.h <<EOF
6788 #define $ac_tr_hdr 1
6789 EOF
6790  
6791 else
6792   echo "$ac_t""no" 1>&6
6793 fi
6794 done
6795
6796
6797         if test $ac_cv_header_krb_h = yes ; then
6798                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6799 echo "configure:6800: checking for main in -lkrb" >&5
6800 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6802   echo $ac_n "(cached) $ac_c" 1>&6
6803 else
6804   ac_save_LIBS="$LIBS"
6805 LIBS="-lkrb -ldes $LIBS"
6806 cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809
6810 int main() {
6811 main()
6812 ; return 0; }
6813 EOF
6814 if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6815   rm -rf conftest*
6816   eval "ac_cv_lib_$ac_lib_var=yes"
6817 else
6818   echo "configure: failed program was:" >&5
6819   cat conftest.$ac_ext >&5
6820   rm -rf conftest*
6821   eval "ac_cv_lib_$ac_lib_var=no"
6822 fi
6823 rm -f conftest*
6824 LIBS="$ac_save_LIBS"
6825
6826 fi
6827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6828   echo "$ac_t""yes" 1>&6
6829   have_k4=yes
6830 else
6831   echo "$ac_t""no" 1>&6
6832 have_k4=no
6833 fi
6834
6835
6836                 if test $have_k4 = yes ; then
6837                         ol_with_kerberos=found
6838                         ol_link_krb4=yes
6839
6840                         cat >> confdefs.h <<\EOF
6841 #define HAVE_KRB4 1
6842 EOF
6843
6844
6845                         KRB4_LIBS="-lkrb -ldes"
6846
6847                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6848                                 cat >> confdefs.h <<\EOF
6849 #define HAVE_KTH_KERBEROS 1
6850 EOF
6851
6852                         fi
6853                 fi
6854         fi
6855 fi
6856
6857 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6858         ol_link_kpasswd=yes
6859 fi
6860
6861 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6862         ol_link_kbind=yes
6863
6864 elif test $ol_enable_kbind = yes ; then
6865         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6866 fi
6867
6868 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6869         cat >> confdefs.h <<\EOF
6870 #define HAVE_KERBEROS 1
6871 EOF
6872
6873
6874 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6875         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6876 fi
6877
6878 ol_link_tls=no
6879 if test $ol_with_tls != no ; then
6880         for ac_hdr in openssl/ssl.h ssl.h
6881 do
6882 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6883 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6884 echo "configure:6885: checking for $ac_hdr" >&5
6885 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6886   echo $ac_n "(cached) $ac_c" 1>&6
6887 else
6888   cat > conftest.$ac_ext <<EOF
6889 #line 6890 "configure"
6890 #include "confdefs.h"
6891 #include <$ac_hdr>
6892 EOF
6893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6894 { (eval echo configure:6895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6896 if test -z "$ac_err"; then
6897   rm -rf conftest*
6898   eval "ac_cv_header_$ac_safe=yes"
6899 else
6900   echo "$ac_err" >&5
6901   echo "configure: failed program was:" >&5
6902   cat conftest.$ac_ext >&5
6903   rm -rf conftest*
6904   eval "ac_cv_header_$ac_safe=no"
6905 fi
6906 rm -f conftest*
6907 fi
6908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6909   echo "$ac_t""yes" 1>&6
6910     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6911   cat >> confdefs.h <<EOF
6912 #define $ac_tr_hdr 1
6913 EOF
6914  
6915 else
6916   echo "$ac_t""no" 1>&6
6917 fi
6918 done
6919
6920         
6921         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6922                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6923 echo "configure:6924: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6924 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6925 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6926   echo $ac_n "(cached) $ac_c" 1>&6
6927 else
6928   ac_save_LIBS="$LIBS"
6929 LIBS="-lssl -lcrypto $LIBS"
6930 cat > conftest.$ac_ext <<EOF
6931 #line 6932 "configure"
6932 #include "confdefs.h"
6933 /* Override any gcc2 internal prototype to avoid an error.  */
6934 /* We use char because int might match the return type of a gcc2
6935     builtin and then its argument prototype would still apply.  */
6936 char SSLeay_add_ssl_algorithms();
6937
6938 int main() {
6939 SSLeay_add_ssl_algorithms()
6940 ; return 0; }
6941 EOF
6942 if { (eval echo configure:6943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6943   rm -rf conftest*
6944   eval "ac_cv_lib_$ac_lib_var=yes"
6945 else
6946   echo "configure: failed program was:" >&5
6947   cat conftest.$ac_ext >&5
6948   rm -rf conftest*
6949   eval "ac_cv_lib_$ac_lib_var=no"
6950 fi
6951 rm -f conftest*
6952 LIBS="$ac_save_LIBS"
6953
6954 fi
6955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6956   echo "$ac_t""yes" 1>&6
6957   have_ssleay=yes
6958                         need_rsaref=no
6959 else
6960   echo "$ac_t""no" 1>&6
6961 have_ssleay=no
6962 fi
6963
6964                         
6965                 if test $have_ssleay = no ; then
6966                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6967 echo "configure:6968: checking for SSL_library_init in -lssl" >&5
6968 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6969 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6970   echo $ac_n "(cached) $ac_c" 1>&6
6971 else
6972   ac_save_LIBS="$LIBS"
6973 LIBS="-lssl -lcrypto $LIBS"
6974 cat > conftest.$ac_ext <<EOF
6975 #line 6976 "configure"
6976 #include "confdefs.h"
6977 /* Override any gcc2 internal prototype to avoid an error.  */
6978 /* We use char because int might match the return type of a gcc2
6979     builtin and then its argument prototype would still apply.  */
6980 char SSL_library_init();
6981
6982 int main() {
6983 SSL_library_init()
6984 ; return 0; }
6985 EOF
6986 if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6987   rm -rf conftest*
6988   eval "ac_cv_lib_$ac_lib_var=yes"
6989 else
6990   echo "configure: failed program was:" >&5
6991   cat conftest.$ac_ext >&5
6992   rm -rf conftest*
6993   eval "ac_cv_lib_$ac_lib_var=no"
6994 fi
6995 rm -f conftest*
6996 LIBS="$ac_save_LIBS"
6997
6998 fi
6999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7000   echo "$ac_t""yes" 1>&6
7001   have_ssleay=yes
7002                                 need_rsaref=no
7003 else
7004   echo "$ac_t""no" 1>&6
7005 have_ssleay=no
7006 fi
7007
7008                 fi
7009
7010                 if test $have_ssleay = no ; then
7011                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
7012 echo "configure:7013: checking for ssl3_accept in -lssl" >&5
7013 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
7014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7015   echo $ac_n "(cached) $ac_c" 1>&6
7016 else
7017   ac_save_LIBS="$LIBS"
7018 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
7019 cat > conftest.$ac_ext <<EOF
7020 #line 7021 "configure"
7021 #include "confdefs.h"
7022 /* Override any gcc2 internal prototype to avoid an error.  */
7023 /* We use char because int might match the return type of a gcc2
7024     builtin and then its argument prototype would still apply.  */
7025 char ssl3_accept();
7026
7027 int main() {
7028 ssl3_accept()
7029 ; return 0; }
7030 EOF
7031 if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7032   rm -rf conftest*
7033   eval "ac_cv_lib_$ac_lib_var=yes"
7034 else
7035   echo "configure: failed program was:" >&5
7036   cat conftest.$ac_ext >&5
7037   rm -rf conftest*
7038   eval "ac_cv_lib_$ac_lib_var=no"
7039 fi
7040 rm -f conftest*
7041 LIBS="$ac_save_LIBS"
7042
7043 fi
7044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7045   echo "$ac_t""yes" 1>&6
7046   have_ssleay=yes
7047                                 need_rsaref=yes
7048 else
7049   echo "$ac_t""no" 1>&6
7050 have_ssleay=no
7051 fi
7052
7053                 fi
7054
7055                 if test $have_ssleay = yes ; then
7056                         ol_with_tls=found
7057                         ol_link_tls=yes
7058
7059                         cat >> confdefs.h <<\EOF
7060 #define HAVE_SSLEAY 1
7061 EOF
7062
7063
7064                         if test $need_rsaref = yes; then
7065                                 cat >> confdefs.h <<\EOF
7066 #define HAVE_RSAREF 1
7067 EOF
7068
7069
7070                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
7071                         else
7072                                 TLS_LIBS="-lssl -lcrypto"
7073                         fi
7074                 fi
7075         fi
7076
7077 else
7078         echo "configure: warning: TLS privacy protection not supported!" 1>&2
7079 fi
7080
7081 if test $ol_link_tls = yes ; then
7082         cat >> confdefs.h <<\EOF
7083 #define HAVE_TLS 1
7084 EOF
7085
7086
7087 elif test $ol_with_tls = auto ; then
7088         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
7089         echo "configure: warning: TLS privacy protection not supported!" 1>&2
7090
7091 elif test $ol_with_tls != no ; then
7092         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
7093 fi
7094
7095 if test $ol_enable_lmpasswd != no; then
7096         if test $ol_link_tls != yes ; then
7097                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
7098         fi
7099
7100         cat >> confdefs.h <<\EOF
7101 #define SLAPD_LMHASH 1
7102 EOF
7103
7104 fi
7105
7106 for ac_func in \
7107         ctime_r                 \
7108         gethostbyname_r gethostbyaddr_r \
7109
7110 do
7111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7112 echo "configure:7113: checking for $ac_func" >&5
7113 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7114   echo $ac_n "(cached) $ac_c" 1>&6
7115 else
7116   cat > conftest.$ac_ext <<EOF
7117 #line 7118 "configure"
7118 #include "confdefs.h"
7119 /* System header to define __stub macros and hopefully few prototypes,
7120     which can conflict with char $ac_func(); below.  */
7121 #include <assert.h>
7122 /* Override any gcc2 internal prototype to avoid an error.  */
7123 /* We use char because int might match the return type of a gcc2
7124     builtin and then its argument prototype would still apply.  */
7125 char $ac_func();
7126 char (*f)();
7127
7128 int main() {
7129
7130 /* The GNU C library defines this for functions which it implements
7131     to always fail with ENOSYS.  Some functions are actually named
7132     something starting with __ and the normal name is an alias.  */
7133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7134 choke me
7135 #else
7136 f = $ac_func;
7137 #endif
7138
7139 ; return 0; }
7140 EOF
7141 if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7142   rm -rf conftest*
7143   eval "ac_cv_func_$ac_func=yes"
7144 else
7145   echo "configure: failed program was:" >&5
7146   cat conftest.$ac_ext >&5
7147   rm -rf conftest*
7148   eval "ac_cv_func_$ac_func=no"
7149 fi
7150 rm -f conftest*
7151 fi
7152
7153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7154   echo "$ac_t""yes" 1>&6
7155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7156   cat >> confdefs.h <<EOF
7157 #define $ac_tr_func 1
7158 EOF
7159  
7160 else
7161   echo "$ac_t""no" 1>&6
7162 fi
7163 done
7164
7165
7166 if test "$ac_cv_func_ctime_r" = no ; then
7167         ol_cv_func_ctime_r_nargs=0
7168 else
7169         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
7170 echo "configure:7171: checking number of arguments of ctime_r" >&5
7171 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
7172   echo $ac_n "(cached) $ac_c" 1>&6
7173 else
7174   cat > conftest.$ac_ext <<EOF
7175 #line 7176 "configure"
7176 #include "confdefs.h"
7177 #include <time.h>
7178 int main() {
7179 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
7180 ; return 0; }
7181 EOF
7182 if { (eval echo configure:7183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7183   rm -rf conftest*
7184   ol_cv_func_ctime_r_nargs3=yes
7185 else
7186   echo "configure: failed program was:" >&5
7187   cat conftest.$ac_ext >&5
7188   rm -rf conftest*
7189   ol_cv_func_ctime_r_nargs3=no
7190 fi
7191 rm -f conftest*
7192
7193         cat > conftest.$ac_ext <<EOF
7194 #line 7195 "configure"
7195 #include "confdefs.h"
7196 #include <time.h>
7197 int main() {
7198 time_t ti; char *buffer; ctime_r(&ti,buffer);
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_ctime_r_nargs2=yes
7204 else
7205   echo "configure: failed program was:" >&5
7206   cat conftest.$ac_ext >&5
7207   rm -rf conftest*
7208   ol_cv_func_ctime_r_nargs2=no
7209 fi
7210 rm -f conftest*
7211
7212         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
7213                 $ol_cv_func_ctime_r_nargs2 = no ; then
7214
7215                 ol_cv_func_ctime_r_nargs=3
7216
7217         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
7218                 $ol_cv_func_ctime_r_nargs2 = yes ; then
7219
7220                 ol_cv_func_ctime_r_nargs=2
7221
7222         else
7223                 ol_cv_func_ctime_r_nargs=0
7224         fi
7225   
7226 fi
7227
7228 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
7229
7230   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
7231         cat >> confdefs.h <<EOF
7232 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
7233 EOF
7234
7235   fi
7236
7237 fi
7238
7239 if test "$ac_cv_func_gethostbyname_r" = yes ; then
7240         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
7241 echo "configure:7242: checking number of arguments of gethostbyname_r" >&5
7242 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
7243   echo $ac_n "(cached) $ac_c" 1>&6
7244 else
7245   cat > conftest.$ac_ext <<EOF
7246 #line 7247 "configure"
7247 #include "confdefs.h"
7248 #include <sys/types.h>
7249 #include <sys/socket.h>
7250 #include <netinet/in.h>
7251 #include <netdb.h>
7252 #define BUFSIZE (sizeof(struct hostent)+10)
7253 int main() {
7254 struct hostent hent; char buffer[BUFSIZE];
7255                 int bufsize=BUFSIZE;int h_errno;
7256                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
7257                         buffer, bufsize, &h_errno);
7258 ; return 0; }
7259 EOF
7260 if { (eval echo configure:7261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7261   rm -rf conftest*
7262   ol_cv_func_gethostbyname_r_nargs5=yes
7263 else
7264   echo "configure: failed program was:" >&5
7265   cat conftest.$ac_ext >&5
7266   rm -rf conftest*
7267   ol_cv_func_gethostbyname_r_nargs5=no
7268 fi
7269 rm -f conftest*
7270
7271         cat > conftest.$ac_ext <<EOF
7272 #line 7273 "configure"
7273 #include "confdefs.h"
7274 #include <sys/types.h>
7275 #include <sys/socket.h>
7276 #include <netinet/in.h>
7277 #include <netdb.h>
7278 #define BUFSIZE (sizeof(struct hostent)+10)
7279 int main() {
7280 struct hostent hent;struct hostent *rhent;
7281                 char buffer[BUFSIZE];
7282                 int bufsize=BUFSIZE;int h_errno;
7283                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
7284                         &rhent, &h_errno);
7285 ; return 0; }
7286 EOF
7287 if { (eval echo configure:7288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7288   rm -rf conftest*
7289   ol_cv_func_gethostbyname_r_nargs6=yes
7290 else
7291   echo "configure: failed program was:" >&5
7292   cat conftest.$ac_ext >&5
7293   rm -rf conftest*
7294   ol_cv_func_gethostbyname_r_nargs6=no
7295 fi
7296 rm -f conftest*
7297
7298         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
7299                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
7300
7301                 ol_cv_func_gethostbyname_r_nargs=5
7302
7303         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7304                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7305
7306                 ol_cv_func_gethostbyname_r_nargs=6
7307
7308         else
7309                 ol_cv_func_gethostbyname_r_nargs=0
7310         fi
7311   
7312 fi
7313
7314 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7315   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7316         cat >> confdefs.h <<EOF
7317 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7318 EOF
7319
7320   fi
7321
7322 else
7323         ol_cv_func_gethostbyname_r_nargs=0
7324 fi
7325  
7326 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7327         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7328 echo "configure:7329: checking number of arguments of gethostbyaddr_r" >&5
7329 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7330   echo $ac_n "(cached) $ac_c" 1>&6
7331 else
7332   cat > conftest.$ac_ext <<EOF
7333 #line 7334 "configure"
7334 #include "confdefs.h"
7335 #include <sys/types.h>
7336 #include <sys/socket.h>
7337 #include <netinet/in.h>
7338 #include <netdb.h>
7339 #define BUFSIZE (sizeof(struct hostent)+10)
7340 int main() {
7341 struct hostent hent; char buffer[BUFSIZE]; 
7342             struct in_addr add;
7343             size_t alen=sizeof(struct in_addr);
7344             int bufsize=BUFSIZE;int h_errno;
7345                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7346                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7347 ; return 0; }
7348 EOF
7349 if { (eval echo configure:7350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7350   rm -rf conftest*
7351   ol_cv_func_gethostbyaddr_r_nargs7=yes
7352 else
7353   echo "configure: failed program was:" >&5
7354   cat conftest.$ac_ext >&5
7355   rm -rf conftest*
7356   ol_cv_func_gethostbyaddr_r_nargs7=no
7357 fi
7358 rm -f conftest*
7359
7360         cat > conftest.$ac_ext <<EOF
7361 #line 7362 "configure"
7362 #include "confdefs.h"
7363 #include <sys/types.h>
7364 #include <sys/socket.h>
7365 #include <netinet/in.h>
7366 #include <netdb.h>
7367 #define BUFSIZE (sizeof(struct hostent)+10)
7368 int main() {
7369 struct hostent hent;
7370                 struct hostent *rhent; char buffer[BUFSIZE]; 
7371                 struct in_addr add;
7372                 size_t alen=sizeof(struct in_addr);
7373                 int bufsize=BUFSIZE;int h_errno;
7374                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7375                         alen, AF_INET, &hent, buffer, bufsize, 
7376                         &rhent, &h_errno);
7377 ; return 0; }
7378 EOF
7379 if { (eval echo configure:7380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7380   rm -rf conftest*
7381   ol_cv_func_gethostbyaddr_r_nargs8=yes
7382 else
7383   echo "configure: failed program was:" >&5
7384   cat conftest.$ac_ext >&5
7385   rm -rf conftest*
7386   ol_cv_func_gethostbyaddr_r_nargs8=no
7387 fi
7388 rm -f conftest*
7389
7390         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7391                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7392
7393                 ol_cv_func_gethostbyaddr_r_nargs=7
7394
7395         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7396                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7397
7398                 ol_cv_func_gethostbyaddr_r_nargs=8
7399
7400         else
7401                 ol_cv_func_gethostbyaddr_r_nargs=0
7402         fi
7403   
7404 fi
7405
7406 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7407   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7408     cat >> confdefs.h <<EOF
7409 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7410 EOF
7411
7412   fi
7413
7414 else
7415         ol_cv_func_gethostbyaddr_r_nargs=0
7416 fi
7417
7418 if test "$ac_cv_func_ctime_r" = yes \
7419         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7420         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7421         -a "$ac_cv_func_gethostbyname_r" = yes \
7422         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7423         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7424         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7425         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7426         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7427         ; then
7428  
7429         cat >> confdefs.h <<\EOF
7430 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7431 EOF
7432
7433 fi
7434
7435 ol_link_threads=no
7436
7437 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7438         -o $ol_with_threads = nt ; then
7439
7440         
7441         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7442 echo "configure:7443: checking for _beginthread" >&5
7443 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7444   echo $ac_n "(cached) $ac_c" 1>&6
7445 else
7446   cat > conftest.$ac_ext <<EOF
7447 #line 7448 "configure"
7448 #include "confdefs.h"
7449 /* System header to define __stub macros and hopefully few prototypes,
7450     which can conflict with char _beginthread(); below.  */
7451 #include <assert.h>
7452 /* Override any gcc2 internal prototype to avoid an error.  */
7453 /* We use char because int might match the return type of a gcc2
7454     builtin and then its argument prototype would still apply.  */
7455 char _beginthread();
7456 char (*f)();
7457
7458 int main() {
7459
7460 /* The GNU C library defines this for functions which it implements
7461     to always fail with ENOSYS.  Some functions are actually named
7462     something starting with __ and the normal name is an alias.  */
7463 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7464 choke me
7465 #else
7466 f = _beginthread;
7467 #endif
7468
7469 ; return 0; }
7470 EOF
7471 if { (eval echo configure:7472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7472   rm -rf conftest*
7473   eval "ac_cv_func__beginthread=yes"
7474 else
7475   echo "configure: failed program was:" >&5
7476   cat conftest.$ac_ext >&5
7477   rm -rf conftest*
7478   eval "ac_cv_func__beginthread=no"
7479 fi
7480 rm -f conftest*
7481 fi
7482
7483 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7484   echo "$ac_t""yes" 1>&6
7485   :
7486 else
7487   echo "$ac_t""no" 1>&6
7488 fi
7489
7490
7491         if test $ac_cv_func__beginthread = yes ; then
7492                 cat >> confdefs.h <<\EOF
7493 #define HAVE_NT_THREADS 1
7494 EOF
7495
7496         fi
7497
7498
7499         if test "$ol_cv_nt_threads" = yes ; then
7500         ol_link_threads=nt
7501         ol_with_threads=found
7502         ol_with_yielding_select=yes
7503
7504                 cat >> confdefs.h <<\EOF
7505 #define HAVE_NT_SERVICE_MANAGER 1
7506 EOF
7507
7508                 cat >> confdefs.h <<\EOF
7509 #define HAVE_NT_EVENT_LOG 1
7510 EOF
7511
7512         fi
7513
7514         if test $ol_with_threads = nt ; then
7515                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7516         fi
7517 fi
7518
7519 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7520         -o $ol_with_threads = posix ; then
7521
7522         for ac_hdr in pthread.h
7523 do
7524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7526 echo "configure:7527: checking for $ac_hdr" >&5
7527 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7528   echo $ac_n "(cached) $ac_c" 1>&6
7529 else
7530   cat > conftest.$ac_ext <<EOF
7531 #line 7532 "configure"
7532 #include "confdefs.h"
7533 #include <$ac_hdr>
7534 EOF
7535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7536 { (eval echo configure:7537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7538 if test -z "$ac_err"; then
7539   rm -rf conftest*
7540   eval "ac_cv_header_$ac_safe=yes"
7541 else
7542   echo "$ac_err" >&5
7543   echo "configure: failed program was:" >&5
7544   cat conftest.$ac_ext >&5
7545   rm -rf conftest*
7546   eval "ac_cv_header_$ac_safe=no"
7547 fi
7548 rm -f conftest*
7549 fi
7550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7551   echo "$ac_t""yes" 1>&6
7552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7553   cat >> confdefs.h <<EOF
7554 #define $ac_tr_hdr 1
7555 EOF
7556  
7557 else
7558   echo "$ac_t""no" 1>&6
7559 fi
7560 done
7561
7562
7563         if test $ac_cv_header_pthread_h = yes ; then
7564                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7565 echo "configure:7566: checking POSIX thread version" >&5
7566 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7567   echo $ac_n "(cached) $ac_c" 1>&6
7568 else
7569   
7570         cat > conftest.$ac_ext <<EOF
7571 #line 7572 "configure"
7572 #include "confdefs.h"
7573
7574 #               include <pthread.h>
7575                 /* this check could be improved */
7576 #               ifdef PTHREAD_ONCE_INIT
7577                         pthread_version_final;
7578 #               endif
7579         
7580 EOF
7581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7582   egrep "pthread_version_final" >/dev/null 2>&1; then
7583   rm -rf conftest*
7584   ol_pthread_final=yes
7585 else
7586   rm -rf conftest*
7587   ol_pthread_final=no
7588 fi
7589 rm -f conftest*
7590
7591
7592         cat > conftest.$ac_ext <<EOF
7593 #line 7594 "configure"
7594 #include "confdefs.h"
7595
7596 #               include <pthread.h>
7597                 /* this check could be improved */
7598 #               ifdef pthread_once_init
7599                         pthread_version_draft4;
7600 #               endif
7601         
7602 EOF
7603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7604   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7605   rm -rf conftest*
7606   ol_pthread_draft4=yes
7607 else
7608   rm -rf conftest*
7609   ol_pthread_draft4=no
7610 fi
7611 rm -f conftest*
7612
7613
7614         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7615                 ol_cv_pthread_version=final
7616         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7617                 ol_cv_pthread_version=draft4
7618         else
7619                 ol_cv_pthread_version=unknown
7620         fi
7621
7622 fi
7623
7624 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7625
7626
7627                 if test $ol_cv_pthread_version = final ; then
7628                         cat >> confdefs.h <<\EOF
7629 #define HAVE_PTHREADS_FINAL 1
7630 EOF
7631
7632                 elif test $ol_cv_pthread_version = draft4 ; then
7633                         cat >> confdefs.h <<\EOF
7634 #define HAVE_PTHREADS_D4 1
7635 EOF
7636
7637                 else
7638                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7639                 fi
7640
7641                 # consider threads found
7642                 ol_with_threads=found
7643
7644                 
7645         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7646 echo "configure:7647: checking for LinuxThreads pthread.h" >&5
7647 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7648   echo $ac_n "(cached) $ac_c" 1>&6
7649 else
7650   cat > conftest.$ac_ext <<EOF
7651 #line 7652 "configure"
7652 #include "confdefs.h"
7653 #include <pthread.h>
7654 EOF
7655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7656   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7657   rm -rf conftest*
7658   ol_cv_header_linux_threads=yes
7659 else
7660   rm -rf conftest*
7661   ol_cv_header_linux_threads=no
7662 fi
7663 rm -f conftest*
7664
7665                 
7666 fi
7667
7668 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7669         if test $ol_cv_header_linux_threads = yes; then
7670                 cat >> confdefs.h <<\EOF
7671 #define HAVE_LINUX_THREADS 1
7672 EOF
7673
7674         fi
7675
7676                 
7677         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7678 echo "configure:7679: checking for GNU Pth pthread.h" >&5
7679 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7680   echo $ac_n "(cached) $ac_c" 1>&6
7681 else
7682   cat > conftest.$ac_ext <<EOF
7683 #line 7684 "configure"
7684 #include "confdefs.h"
7685 #include <pthread.h>
7686 #ifdef _POSIX_THREAD_IS_GNU_PTH
7687         __gnu_pth__;
7688 #endif
7689
7690 EOF
7691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7692   egrep "__gnu_pth__" >/dev/null 2>&1; then
7693   rm -rf conftest*
7694   ol_cv_header_gnu_pth_pthread_h=yes
7695 else
7696   rm -rf conftest*
7697   ol_cv_header_gnu_pth_pthread_h=no
7698 fi
7699 rm -f conftest*
7700
7701                 
7702 fi
7703
7704 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7705
7706
7707                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7708                         for ac_hdr in sched.h
7709 do
7710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7712 echo "configure:7713: checking for $ac_hdr" >&5
7713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7714   echo $ac_n "(cached) $ac_c" 1>&6
7715 else
7716   cat > conftest.$ac_ext <<EOF
7717 #line 7718 "configure"
7718 #include "confdefs.h"
7719 #include <$ac_hdr>
7720 EOF
7721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7722 { (eval echo configure:7723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7724 if test -z "$ac_err"; then
7725   rm -rf conftest*
7726   eval "ac_cv_header_$ac_safe=yes"
7727 else
7728   echo "$ac_err" >&5
7729   echo "configure: failed program was:" >&5
7730   cat conftest.$ac_ext >&5
7731   rm -rf conftest*
7732   eval "ac_cv_header_$ac_safe=no"
7733 fi
7734 rm -f conftest*
7735 fi
7736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7737   echo "$ac_t""yes" 1>&6
7738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7739   cat >> confdefs.h <<EOF
7740 #define $ac_tr_hdr 1
7741 EOF
7742  
7743 else
7744   echo "$ac_t""no" 1>&6
7745 fi
7746 done
7747
7748                 fi
7749
7750                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7751                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7752 echo "configure:7753: checking for pthread_create in default libraries" >&5
7753 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7754   echo $ac_n "(cached) $ac_c" 1>&6
7755 else
7756   
7757                 if test "$cross_compiling" = yes; then
7758   cat > conftest.$ac_ext <<EOF
7759 #line 7760 "configure"
7760 #include "confdefs.h"
7761 /* pthread test headers */
7762 #include <pthread.h>
7763 #ifndef NULL
7764 #define NULL (void*)0
7765 #endif
7766
7767 static void *task(p)
7768         void *p;
7769 {
7770         return (void *) (p == NULL);
7771 }
7772
7773 int main() {
7774
7775         /* pthread test function */
7776         pthread_t t;
7777         int status;
7778         int detach = 1;
7779
7780 #ifdef HAVE_PTHREADS_FINAL
7781         /* Final pthreads */
7782         pthread_attr_t attr;
7783
7784         status = pthread_attr_init(&attr);
7785         if( status ) return status;
7786
7787 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7788         if( !detach ) {
7789 #if defined( PTHREAD_CREATE_JOINABLE )
7790                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7791 #else
7792                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7793 #endif
7794
7795 #ifdef PTHREAD_CREATE_DETACHED
7796         } else {
7797                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7798 #endif
7799         }
7800         if( status ) return status;
7801 #endif
7802
7803         status = pthread_create( &t, &attr, task, NULL );
7804         if( status ) return status;
7805
7806 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7807         if( detach ) {
7808                 /* give thread a chance to complete */
7809                 /* it should remain joinable and hence detachable */
7810                 sleep( 1 );
7811
7812                 status = pthread_detach( t );
7813                 if( status ) return status;
7814         }
7815 #endif
7816
7817 #else
7818         /* Draft 4 pthreads */
7819         status = pthread_create( &t, pthread_attr_default, task, NULL );
7820         if( status ) return status;
7821
7822         if( detach ) {
7823                 /* give thread a chance to complete */
7824                 /* it should remain joinable and hence detachable */
7825                 sleep( 1 );
7826
7827                 status = pthread_detach( &t );
7828                 if( status ) return status;
7829         }
7830 #endif
7831
7832 #ifdef HAVE_LINUX_THREADS
7833         pthread_kill_other_threads_np();
7834 #endif
7835
7836         return 0;
7837
7838 ; return 0; }
7839 EOF
7840 if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7841   rm -rf conftest*
7842   ol_cv_pthread_create=yes
7843 else
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   ol_cv_pthread_create=no
7848 fi
7849 rm -f conftest*
7850 else
7851   cat > conftest.$ac_ext <<EOF
7852 #line 7853 "configure"
7853 #include "confdefs.h"
7854 /* pthread test headers */
7855 #include <pthread.h>
7856 #ifndef NULL
7857 #define NULL (void*)0
7858 #endif
7859
7860 static void *task(p)
7861         void *p;
7862 {
7863         return (void *) (p == NULL);
7864 }
7865
7866
7867 int main(argc, argv)
7868         int argc;
7869         char **argv;
7870 {
7871
7872         /* pthread test function */
7873         pthread_t t;
7874         int status;
7875         int detach = 1;
7876
7877 #ifdef HAVE_PTHREADS_FINAL
7878         /* Final pthreads */
7879         pthread_attr_t attr;
7880
7881         status = pthread_attr_init(&attr);
7882         if( status ) return status;
7883
7884 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7885         if( !detach ) {
7886 #if defined( PTHREAD_CREATE_JOINABLE )
7887                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7888 #else
7889                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7890 #endif
7891
7892 #ifdef PTHREAD_CREATE_DETACHED
7893         } else {
7894                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7895 #endif
7896         }
7897         if( status ) return status;
7898 #endif
7899
7900         status = pthread_create( &t, &attr, task, NULL );
7901         if( status ) return status;
7902
7903 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7904         if( detach ) {
7905                 /* give thread a chance to complete */
7906                 /* it should remain joinable and hence detachable */
7907                 sleep( 1 );
7908
7909                 status = pthread_detach( t );
7910                 if( status ) return status;
7911         }
7912 #endif
7913
7914 #else
7915         /* Draft 4 pthreads */
7916         status = pthread_create( &t, pthread_attr_default, task, NULL );
7917         if( status ) return status;
7918
7919         if( detach ) {
7920                 /* give thread a chance to complete */
7921                 /* it should remain joinable and hence detachable */
7922                 sleep( 1 );
7923
7924                 status = pthread_detach( &t );
7925                 if( status ) return status;
7926         }
7927 #endif
7928
7929 #ifdef HAVE_LINUX_THREADS
7930         pthread_kill_other_threads_np();
7931 #endif
7932
7933         return 0;
7934
7935 }
7936
7937 EOF
7938 if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7939 then
7940   ol_cv_pthread_create=yes
7941 else
7942   echo "configure: failed program was:" >&5
7943   cat conftest.$ac_ext >&5
7944   rm -fr conftest*
7945   ol_cv_pthread_create=no
7946 fi
7947 rm -fr conftest*
7948 fi
7949
7950 fi
7951
7952 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7953
7954                 if test $ol_cv_pthread_create != no ; then
7955                         ol_link_threads=posix
7956                         ol_link_pthreads=""
7957                 fi
7958                 
7959                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7960 if test "$ol_link_threads" = no ; then
7961         # try -kthread
7962         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7963 echo "configure:7964: checking for pthread link with -kthread" >&5
7964 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7965   echo $ac_n "(cached) $ac_c" 1>&6
7966 else
7967   
7968                 # save the flags
7969                 ol_LIBS="$LIBS"
7970                 LIBS="-kthread $LIBS"
7971
7972                 if test "$cross_compiling" = yes; then
7973   cat > conftest.$ac_ext <<EOF
7974 #line 7975 "configure"
7975 #include "confdefs.h"
7976 /* pthread test headers */
7977 #include <pthread.h>
7978 #ifndef NULL
7979 #define NULL (void*)0
7980 #endif
7981
7982 static void *task(p)
7983         void *p;
7984 {
7985         return (void *) (p == NULL);
7986 }
7987
7988 int main() {
7989
7990         /* pthread test function */
7991         pthread_t t;
7992         int status;
7993         int detach = 1;
7994
7995 #ifdef HAVE_PTHREADS_FINAL
7996         /* Final pthreads */
7997         pthread_attr_t attr;
7998
7999         status = pthread_attr_init(&attr);
8000         if( status ) return status;
8001
8002 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8003         if( !detach ) {
8004 #if defined( PTHREAD_CREATE_JOINABLE )
8005                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8006 #else
8007                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8008 #endif
8009
8010 #ifdef PTHREAD_CREATE_DETACHED
8011         } else {
8012                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8013 #endif
8014         }
8015         if( status ) return status;
8016 #endif
8017
8018         status = pthread_create( &t, &attr, task, NULL );
8019         if( status ) return status;
8020
8021 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8022         if( detach ) {
8023                 /* give thread a chance to complete */
8024                 /* it should remain joinable and hence detachable */
8025                 sleep( 1 );
8026
8027                 status = pthread_detach( t );
8028                 if( status ) return status;
8029         }
8030 #endif
8031
8032 #else
8033         /* Draft 4 pthreads */
8034         status = pthread_create( &t, pthread_attr_default, task, NULL );
8035         if( status ) return status;
8036
8037         if( detach ) {
8038                 /* give thread a chance to complete */
8039                 /* it should remain joinable and hence detachable */
8040                 sleep( 1 );
8041
8042                 status = pthread_detach( &t );
8043                 if( status ) return status;
8044         }
8045 #endif
8046
8047 #ifdef HAVE_LINUX_THREADS
8048         pthread_kill_other_threads_np();
8049 #endif
8050
8051         return 0;
8052
8053 ; return 0; }
8054 EOF
8055 if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8056   rm -rf conftest*
8057   ol_cv_pthread_kthread=yes
8058 else
8059   echo "configure: failed program was:" >&5
8060   cat conftest.$ac_ext >&5
8061   rm -rf conftest*
8062   ol_cv_pthread_kthread=no
8063 fi
8064 rm -f conftest*
8065 else
8066   cat > conftest.$ac_ext <<EOF
8067 #line 8068 "configure"
8068 #include "confdefs.h"
8069 /* pthread test headers */
8070 #include <pthread.h>
8071 #ifndef NULL
8072 #define NULL (void*)0
8073 #endif
8074
8075 static void *task(p)
8076         void *p;
8077 {
8078         return (void *) (p == NULL);
8079 }
8080
8081
8082 int main(argc, argv)
8083         int argc;
8084         char **argv;
8085 {
8086
8087         /* pthread test function */
8088         pthread_t t;
8089         int status;
8090         int detach = 1;
8091
8092 #ifdef HAVE_PTHREADS_FINAL
8093         /* Final pthreads */
8094         pthread_attr_t attr;
8095
8096         status = pthread_attr_init(&attr);
8097         if( status ) return status;
8098
8099 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8100         if( !detach ) {
8101 #if defined( PTHREAD_CREATE_JOINABLE )
8102                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8103 #else
8104                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8105 #endif
8106
8107 #ifdef PTHREAD_CREATE_DETACHED
8108         } else {
8109                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8110 #endif
8111         }
8112         if( status ) return status;
8113 #endif
8114
8115         status = pthread_create( &t, &attr, task, NULL );
8116         if( status ) return status;
8117
8118 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8119         if( detach ) {
8120                 /* give thread a chance to complete */
8121                 /* it should remain joinable and hence detachable */
8122                 sleep( 1 );
8123
8124                 status = pthread_detach( t );
8125                 if( status ) return status;
8126         }
8127 #endif
8128
8129 #else
8130         /* Draft 4 pthreads */
8131         status = pthread_create( &t, pthread_attr_default, task, NULL );
8132         if( status ) return status;
8133
8134         if( detach ) {
8135                 /* give thread a chance to complete */
8136                 /* it should remain joinable and hence detachable */
8137                 sleep( 1 );
8138
8139                 status = pthread_detach( &t );
8140                 if( status ) return status;
8141         }
8142 #endif
8143
8144 #ifdef HAVE_LINUX_THREADS
8145         pthread_kill_other_threads_np();
8146 #endif
8147
8148         return 0;
8149
8150 }
8151
8152 EOF
8153 if { (eval echo configure:8154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8154 then
8155   ol_cv_pthread_kthread=yes
8156 else
8157   echo "configure: failed program was:" >&5
8158   cat conftest.$ac_ext >&5
8159   rm -fr conftest*
8160   ol_cv_pthread_kthread=no
8161 fi
8162 rm -fr conftest*
8163 fi
8164
8165
8166                 # restore the LIBS
8167                 LIBS="$ol_LIBS"
8168         
8169 fi
8170
8171 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
8172
8173         if test $ol_cv_pthread_kthread = yes ; then
8174                 ol_link_pthreads="-kthread"
8175                 ol_link_threads=posix
8176         fi
8177 fi
8178
8179                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
8180 if test "$ol_link_threads" = no ; then
8181         # try -pthread
8182         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
8183 echo "configure:8184: checking for pthread link with -pthread" >&5
8184 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
8185   echo $ac_n "(cached) $ac_c" 1>&6
8186 else
8187   
8188                 # save the flags
8189                 ol_LIBS="$LIBS"
8190                 LIBS="-pthread $LIBS"
8191
8192                 if test "$cross_compiling" = yes; then
8193   cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 /* pthread test headers */
8197 #include <pthread.h>
8198 #ifndef NULL
8199 #define NULL (void*)0
8200 #endif
8201
8202 static void *task(p)
8203         void *p;
8204 {
8205         return (void *) (p == NULL);
8206 }
8207
8208 int main() {
8209
8210         /* pthread test function */
8211         pthread_t t;
8212         int status;
8213         int detach = 1;
8214
8215 #ifdef HAVE_PTHREADS_FINAL
8216         /* Final pthreads */
8217         pthread_attr_t attr;
8218
8219         status = pthread_attr_init(&attr);
8220         if( status ) return status;
8221
8222 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8223         if( !detach ) {
8224 #if defined( PTHREAD_CREATE_JOINABLE )
8225                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8226 #else
8227                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8228 #endif
8229
8230 #ifdef PTHREAD_CREATE_DETACHED
8231         } else {
8232                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8233 #endif
8234         }
8235         if( status ) return status;
8236 #endif
8237
8238         status = pthread_create( &t, &attr, task, NULL );
8239         if( status ) return status;
8240
8241 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8242         if( detach ) {
8243                 /* give thread a chance to complete */
8244                 /* it should remain joinable and hence detachable */
8245                 sleep( 1 );
8246
8247                 status = pthread_detach( t );
8248                 if( status ) return status;
8249         }
8250 #endif
8251
8252 #else
8253         /* Draft 4 pthreads */
8254         status = pthread_create( &t, pthread_attr_default, task, NULL );
8255         if( status ) return status;
8256
8257         if( detach ) {
8258                 /* give thread a chance to complete */
8259                 /* it should remain joinable and hence detachable */
8260                 sleep( 1 );
8261
8262                 status = pthread_detach( &t );
8263                 if( status ) return status;
8264         }
8265 #endif
8266
8267 #ifdef HAVE_LINUX_THREADS
8268         pthread_kill_other_threads_np();
8269 #endif
8270
8271         return 0;
8272
8273 ; return 0; }
8274 EOF
8275 if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8276   rm -rf conftest*
8277   ol_cv_pthread_pthread=yes
8278 else
8279   echo "configure: failed program was:" >&5
8280   cat conftest.$ac_ext >&5
8281   rm -rf conftest*
8282   ol_cv_pthread_pthread=no
8283 fi
8284 rm -f conftest*
8285 else
8286   cat > conftest.$ac_ext <<EOF
8287 #line 8288 "configure"
8288 #include "confdefs.h"
8289 /* pthread test headers */
8290 #include <pthread.h>
8291 #ifndef NULL
8292 #define NULL (void*)0
8293 #endif
8294
8295 static void *task(p)
8296         void *p;
8297 {
8298         return (void *) (p == NULL);
8299 }
8300
8301
8302 int main(argc, argv)
8303         int argc;
8304         char **argv;
8305 {
8306
8307         /* pthread test function */
8308         pthread_t t;
8309         int status;
8310         int detach = 1;
8311
8312 #ifdef HAVE_PTHREADS_FINAL
8313         /* Final pthreads */
8314         pthread_attr_t attr;
8315
8316         status = pthread_attr_init(&attr);
8317         if( status ) return status;
8318
8319 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8320         if( !detach ) {
8321 #if defined( PTHREAD_CREATE_JOINABLE )
8322                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8323 #else
8324                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8325 #endif
8326
8327 #ifdef PTHREAD_CREATE_DETACHED
8328         } else {
8329                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8330 #endif
8331         }
8332         if( status ) return status;
8333 #endif
8334
8335         status = pthread_create( &t, &attr, task, NULL );
8336         if( status ) return status;
8337
8338 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8339         if( detach ) {
8340                 /* give thread a chance to complete */
8341                 /* it should remain joinable and hence detachable */
8342                 sleep( 1 );
8343
8344                 status = pthread_detach( t );
8345                 if( status ) return status;
8346         }
8347 #endif
8348
8349 #else
8350         /* Draft 4 pthreads */
8351         status = pthread_create( &t, pthread_attr_default, task, NULL );
8352         if( status ) return status;
8353
8354         if( detach ) {
8355                 /* give thread a chance to complete */
8356                 /* it should remain joinable and hence detachable */
8357                 sleep( 1 );
8358
8359                 status = pthread_detach( &t );
8360                 if( status ) return status;
8361         }
8362 #endif
8363
8364 #ifdef HAVE_LINUX_THREADS
8365         pthread_kill_other_threads_np();
8366 #endif
8367
8368         return 0;
8369
8370 }
8371
8372 EOF
8373 if { (eval echo configure:8374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8374 then
8375   ol_cv_pthread_pthread=yes
8376 else
8377   echo "configure: failed program was:" >&5
8378   cat conftest.$ac_ext >&5
8379   rm -fr conftest*
8380   ol_cv_pthread_pthread=no
8381 fi
8382 rm -fr conftest*
8383 fi
8384
8385
8386                 # restore the LIBS
8387                 LIBS="$ol_LIBS"
8388         
8389 fi
8390
8391 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
8392
8393         if test $ol_cv_pthread_pthread = yes ; then
8394                 ol_link_pthreads="-pthread"
8395                 ol_link_threads=posix
8396         fi
8397 fi
8398
8399                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
8400 if test "$ol_link_threads" = no ; then
8401         # try -pthreads
8402         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
8403 echo "configure:8404: checking for pthread link with -pthreads" >&5
8404 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
8405   echo $ac_n "(cached) $ac_c" 1>&6
8406 else
8407   
8408                 # save the flags
8409                 ol_LIBS="$LIBS"
8410                 LIBS="-pthreads $LIBS"
8411
8412                 if test "$cross_compiling" = yes; then
8413   cat > conftest.$ac_ext <<EOF
8414 #line 8415 "configure"
8415 #include "confdefs.h"
8416 /* pthread test headers */
8417 #include <pthread.h>
8418 #ifndef NULL
8419 #define NULL (void*)0
8420 #endif
8421
8422 static void *task(p)
8423         void *p;
8424 {
8425         return (void *) (p == NULL);
8426 }
8427
8428 int main() {
8429
8430         /* pthread test function */
8431         pthread_t t;
8432         int status;
8433         int detach = 1;
8434
8435 #ifdef HAVE_PTHREADS_FINAL
8436         /* Final pthreads */
8437         pthread_attr_t attr;
8438
8439         status = pthread_attr_init(&attr);
8440         if( status ) return status;
8441
8442 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8443         if( !detach ) {
8444 #if defined( PTHREAD_CREATE_JOINABLE )
8445                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8446 #else
8447                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8448 #endif
8449
8450 #ifdef PTHREAD_CREATE_DETACHED
8451         } else {
8452                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8453 #endif
8454         }
8455         if( status ) return status;
8456 #endif
8457
8458         status = pthread_create( &t, &attr, task, NULL );
8459         if( status ) return status;
8460
8461 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8462         if( detach ) {
8463                 /* give thread a chance to complete */
8464                 /* it should remain joinable and hence detachable */
8465                 sleep( 1 );
8466
8467                 status = pthread_detach( t );
8468                 if( status ) return status;
8469         }
8470 #endif
8471
8472 #else
8473         /* Draft 4 pthreads */
8474         status = pthread_create( &t, pthread_attr_default, task, NULL );
8475         if( status ) return status;
8476
8477         if( detach ) {
8478                 /* give thread a chance to complete */
8479                 /* it should remain joinable and hence detachable */
8480                 sleep( 1 );
8481
8482                 status = pthread_detach( &t );
8483                 if( status ) return status;
8484         }
8485 #endif
8486
8487 #ifdef HAVE_LINUX_THREADS
8488         pthread_kill_other_threads_np();
8489 #endif
8490
8491         return 0;
8492
8493 ; return 0; }
8494 EOF
8495 if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8496   rm -rf conftest*
8497   ol_cv_pthread_pthreads=yes
8498 else
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -rf conftest*
8502   ol_cv_pthread_pthreads=no
8503 fi
8504 rm -f conftest*
8505 else
8506   cat > conftest.$ac_ext <<EOF
8507 #line 8508 "configure"
8508 #include "confdefs.h"
8509 /* pthread test headers */
8510 #include <pthread.h>
8511 #ifndef NULL
8512 #define NULL (void*)0
8513 #endif
8514
8515 static void *task(p)
8516         void *p;
8517 {
8518         return (void *) (p == NULL);
8519 }
8520
8521
8522 int main(argc, argv)
8523         int argc;
8524         char **argv;
8525 {
8526
8527         /* pthread test function */
8528         pthread_t t;
8529         int status;
8530         int detach = 1;
8531
8532 #ifdef HAVE_PTHREADS_FINAL
8533         /* Final pthreads */
8534         pthread_attr_t attr;
8535
8536         status = pthread_attr_init(&attr);
8537         if( status ) return status;
8538
8539 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8540         if( !detach ) {
8541 #if defined( PTHREAD_CREATE_JOINABLE )
8542                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8543 #else
8544                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8545 #endif
8546
8547 #ifdef PTHREAD_CREATE_DETACHED
8548         } else {
8549                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8550 #endif
8551         }
8552         if( status ) return status;
8553 #endif
8554
8555         status = pthread_create( &t, &attr, task, NULL );
8556         if( status ) return status;
8557
8558 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8559         if( detach ) {
8560                 /* give thread a chance to complete */
8561                 /* it should remain joinable and hence detachable */
8562                 sleep( 1 );
8563
8564                 status = pthread_detach( t );
8565                 if( status ) return status;
8566         }
8567 #endif
8568
8569 #else
8570         /* Draft 4 pthreads */
8571         status = pthread_create( &t, pthread_attr_default, task, NULL );
8572         if( status ) return status;
8573
8574         if( detach ) {
8575                 /* give thread a chance to complete */
8576                 /* it should remain joinable and hence detachable */
8577                 sleep( 1 );
8578
8579                 status = pthread_detach( &t );
8580                 if( status ) return status;
8581         }
8582 #endif
8583
8584 #ifdef HAVE_LINUX_THREADS
8585         pthread_kill_other_threads_np();
8586 #endif
8587
8588         return 0;
8589
8590 }
8591
8592 EOF
8593 if { (eval echo configure:8594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8594 then
8595   ol_cv_pthread_pthreads=yes
8596 else
8597   echo "configure: failed program was:" >&5
8598   cat conftest.$ac_ext >&5
8599   rm -fr conftest*
8600   ol_cv_pthread_pthreads=no
8601 fi
8602 rm -fr conftest*
8603 fi
8604
8605
8606                 # restore the LIBS
8607                 LIBS="$ol_LIBS"
8608         
8609 fi
8610
8611 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8612
8613         if test $ol_cv_pthread_pthreads = yes ; then
8614                 ol_link_pthreads="-pthreads"
8615                 ol_link_threads=posix
8616         fi
8617 fi
8618
8619                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8620 if test "$ol_link_threads" = no ; then
8621         # try -mthreads
8622         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8623 echo "configure:8624: checking for pthread link with -mthreads" >&5
8624 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8625   echo $ac_n "(cached) $ac_c" 1>&6
8626 else
8627   
8628                 # save the flags
8629                 ol_LIBS="$LIBS"
8630                 LIBS="-mthreads $LIBS"
8631
8632                 if test "$cross_compiling" = yes; then
8633   cat > conftest.$ac_ext <<EOF
8634 #line 8635 "configure"
8635 #include "confdefs.h"
8636 /* pthread test headers */
8637 #include <pthread.h>
8638 #ifndef NULL
8639 #define NULL (void*)0
8640 #endif
8641
8642 static void *task(p)
8643         void *p;
8644 {
8645         return (void *) (p == NULL);
8646 }
8647
8648 int main() {
8649
8650         /* pthread test function */
8651         pthread_t t;
8652         int status;
8653         int detach = 1;
8654
8655 #ifdef HAVE_PTHREADS_FINAL
8656         /* Final pthreads */
8657         pthread_attr_t attr;
8658
8659         status = pthread_attr_init(&attr);
8660         if( status ) return status;
8661
8662 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8663         if( !detach ) {
8664 #if defined( PTHREAD_CREATE_JOINABLE )
8665                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8666 #else
8667                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8668 #endif
8669
8670 #ifdef PTHREAD_CREATE_DETACHED
8671         } else {
8672                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8673 #endif
8674         }
8675         if( status ) return status;
8676 #endif
8677
8678         status = pthread_create( &t, &attr, task, NULL );
8679         if( status ) return status;
8680
8681 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8682         if( detach ) {
8683                 /* give thread a chance to complete */
8684                 /* it should remain joinable and hence detachable */
8685                 sleep( 1 );
8686
8687                 status = pthread_detach( t );
8688                 if( status ) return status;
8689         }
8690 #endif
8691
8692 #else
8693         /* Draft 4 pthreads */
8694         status = pthread_create( &t, pthread_attr_default, task, NULL );
8695         if( status ) return status;
8696
8697         if( detach ) {
8698                 /* give thread a chance to complete */
8699                 /* it should remain joinable and hence detachable */
8700                 sleep( 1 );
8701
8702                 status = pthread_detach( &t );
8703                 if( status ) return status;
8704         }
8705 #endif
8706
8707 #ifdef HAVE_LINUX_THREADS
8708         pthread_kill_other_threads_np();
8709 #endif
8710
8711         return 0;
8712
8713 ; return 0; }
8714 EOF
8715 if { (eval echo configure:8716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8716   rm -rf conftest*
8717   ol_cv_pthread_mthreads=yes
8718 else
8719   echo "configure: failed program was:" >&5
8720   cat conftest.$ac_ext >&5
8721   rm -rf conftest*
8722   ol_cv_pthread_mthreads=no
8723 fi
8724 rm -f conftest*
8725 else
8726   cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729 /* pthread test headers */
8730 #include <pthread.h>
8731 #ifndef NULL
8732 #define NULL (void*)0
8733 #endif
8734
8735 static void *task(p)
8736         void *p;
8737 {
8738         return (void *) (p == NULL);
8739 }
8740
8741
8742 int main(argc, argv)
8743         int argc;
8744         char **argv;
8745 {
8746
8747         /* pthread test function */
8748         pthread_t t;
8749         int status;
8750         int detach = 1;
8751
8752 #ifdef HAVE_PTHREADS_FINAL
8753         /* Final pthreads */
8754         pthread_attr_t attr;
8755
8756         status = pthread_attr_init(&attr);
8757         if( status ) return status;
8758
8759 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8760         if( !detach ) {
8761 #if defined( PTHREAD_CREATE_JOINABLE )
8762                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8763 #else
8764                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8765 #endif
8766
8767 #ifdef PTHREAD_CREATE_DETACHED
8768         } else {
8769                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8770 #endif
8771         }
8772         if( status ) return status;
8773 #endif
8774
8775         status = pthread_create( &t, &attr, task, NULL );
8776         if( status ) return status;
8777
8778 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8779         if( detach ) {
8780                 /* give thread a chance to complete */
8781                 /* it should remain joinable and hence detachable */
8782                 sleep( 1 );
8783
8784                 status = pthread_detach( t );
8785                 if( status ) return status;
8786         }
8787 #endif
8788
8789 #else
8790         /* Draft 4 pthreads */
8791         status = pthread_create( &t, pthread_attr_default, task, NULL );
8792         if( status ) return status;
8793
8794         if( detach ) {
8795                 /* give thread a chance to complete */
8796                 /* it should remain joinable and hence detachable */
8797                 sleep( 1 );
8798
8799                 status = pthread_detach( &t );
8800                 if( status ) return status;
8801         }
8802 #endif
8803
8804 #ifdef HAVE_LINUX_THREADS
8805         pthread_kill_other_threads_np();
8806 #endif
8807
8808         return 0;
8809
8810 }
8811
8812 EOF
8813 if { (eval echo configure:8814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8814 then
8815   ol_cv_pthread_mthreads=yes
8816 else
8817   echo "configure: failed program was:" >&5
8818   cat conftest.$ac_ext >&5
8819   rm -fr conftest*
8820   ol_cv_pthread_mthreads=no
8821 fi
8822 rm -fr conftest*
8823 fi
8824
8825
8826                 # restore the LIBS
8827                 LIBS="$ol_LIBS"
8828         
8829 fi
8830
8831 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8832
8833         if test $ol_cv_pthread_mthreads = yes ; then
8834                 ol_link_pthreads="-mthreads"
8835                 ol_link_threads=posix
8836         fi
8837 fi
8838
8839                 # Pthread try link: -thread (ol_cv_pthread_thread)
8840 if test "$ol_link_threads" = no ; then
8841         # try -thread
8842         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8843 echo "configure:8844: checking for pthread link with -thread" >&5
8844 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8845   echo $ac_n "(cached) $ac_c" 1>&6
8846 else
8847   
8848                 # save the flags
8849                 ol_LIBS="$LIBS"
8850                 LIBS="-thread $LIBS"
8851
8852                 if test "$cross_compiling" = yes; then
8853   cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 /* pthread test headers */
8857 #include <pthread.h>
8858 #ifndef NULL
8859 #define NULL (void*)0
8860 #endif
8861
8862 static void *task(p)
8863         void *p;
8864 {
8865         return (void *) (p == NULL);
8866 }
8867
8868 int main() {
8869
8870         /* pthread test function */
8871         pthread_t t;
8872         int status;
8873         int detach = 1;
8874
8875 #ifdef HAVE_PTHREADS_FINAL
8876         /* Final pthreads */
8877         pthread_attr_t attr;
8878
8879         status = pthread_attr_init(&attr);
8880         if( status ) return status;
8881
8882 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8883         if( !detach ) {
8884 #if defined( PTHREAD_CREATE_JOINABLE )
8885                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8886 #else
8887                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8888 #endif
8889
8890 #ifdef PTHREAD_CREATE_DETACHED
8891         } else {
8892                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8893 #endif
8894         }
8895         if( status ) return status;
8896 #endif
8897
8898         status = pthread_create( &t, &attr, task, NULL );
8899         if( status ) return status;
8900
8901 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8902         if( detach ) {
8903                 /* give thread a chance to complete */
8904                 /* it should remain joinable and hence detachable */
8905                 sleep( 1 );
8906
8907                 status = pthread_detach( t );
8908                 if( status ) return status;
8909         }
8910 #endif
8911
8912 #else
8913         /* Draft 4 pthreads */
8914         status = pthread_create( &t, pthread_attr_default, task, NULL );
8915         if( status ) return status;
8916
8917         if( detach ) {
8918                 /* give thread a chance to complete */
8919                 /* it should remain joinable and hence detachable */
8920                 sleep( 1 );
8921
8922                 status = pthread_detach( &t );
8923                 if( status ) return status;
8924         }
8925 #endif
8926
8927 #ifdef HAVE_LINUX_THREADS
8928         pthread_kill_other_threads_np();
8929 #endif
8930
8931         return 0;
8932
8933 ; return 0; }
8934 EOF
8935 if { (eval echo configure:8936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8936   rm -rf conftest*
8937   ol_cv_pthread_thread=yes
8938 else
8939   echo "configure: failed program was:" >&5
8940   cat conftest.$ac_ext >&5
8941   rm -rf conftest*
8942   ol_cv_pthread_thread=no
8943 fi
8944 rm -f conftest*
8945 else
8946   cat > conftest.$ac_ext <<EOF
8947 #line 8948 "configure"
8948 #include "confdefs.h"
8949 /* pthread test headers */
8950 #include <pthread.h>
8951 #ifndef NULL
8952 #define NULL (void*)0
8953 #endif
8954
8955 static void *task(p)
8956         void *p;
8957 {
8958         return (void *) (p == NULL);
8959 }
8960
8961
8962 int main(argc, argv)
8963         int argc;
8964         char **argv;
8965 {
8966
8967         /* pthread test function */
8968         pthread_t t;
8969         int status;
8970         int detach = 1;
8971
8972 #ifdef HAVE_PTHREADS_FINAL
8973         /* Final pthreads */
8974         pthread_attr_t attr;
8975
8976         status = pthread_attr_init(&attr);
8977         if( status ) return status;
8978
8979 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8980         if( !detach ) {
8981 #if defined( PTHREAD_CREATE_JOINABLE )
8982                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8983 #else
8984                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8985 #endif
8986
8987 #ifdef PTHREAD_CREATE_DETACHED
8988         } else {
8989                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8990 #endif
8991         }
8992         if( status ) return status;
8993 #endif
8994
8995         status = pthread_create( &t, &attr, task, NULL );
8996         if( status ) return status;
8997
8998 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8999         if( detach ) {
9000                 /* give thread a chance to complete */
9001                 /* it should remain joinable and hence detachable */
9002                 sleep( 1 );
9003
9004                 status = pthread_detach( t );
9005                 if( status ) return status;
9006         }
9007 #endif
9008
9009 #else
9010         /* Draft 4 pthreads */
9011         status = pthread_create( &t, pthread_attr_default, task, NULL );
9012         if( status ) return status;
9013
9014         if( detach ) {
9015                 /* give thread a chance to complete */
9016                 /* it should remain joinable and hence detachable */
9017                 sleep( 1 );
9018
9019                 status = pthread_detach( &t );
9020                 if( status ) return status;
9021         }
9022 #endif
9023
9024 #ifdef HAVE_LINUX_THREADS
9025         pthread_kill_other_threads_np();
9026 #endif
9027
9028         return 0;
9029
9030 }
9031
9032 EOF
9033 if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9034 then
9035   ol_cv_pthread_thread=yes
9036 else
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -fr conftest*
9040   ol_cv_pthread_thread=no
9041 fi
9042 rm -fr conftest*
9043 fi
9044
9045
9046                 # restore the LIBS
9047                 LIBS="$ol_LIBS"
9048         
9049 fi
9050
9051 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
9052
9053         if test $ol_cv_pthread_thread = yes ; then
9054                 ol_link_pthreads="-thread"
9055                 ol_link_threads=posix
9056         fi
9057 fi
9058
9059
9060                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
9061 if test "$ol_link_threads" = no ; then
9062         # try -lpthread -lmach -lexc -lc_r
9063         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
9064 echo "configure:9065: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
9065 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
9066   echo $ac_n "(cached) $ac_c" 1>&6
9067 else
9068   
9069                 # save the flags
9070                 ol_LIBS="$LIBS"
9071                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
9072
9073                 if test "$cross_compiling" = yes; then
9074   cat > conftest.$ac_ext <<EOF
9075 #line 9076 "configure"
9076 #include "confdefs.h"
9077 /* pthread test headers */
9078 #include <pthread.h>
9079 #ifndef NULL
9080 #define NULL (void*)0
9081 #endif
9082
9083 static void *task(p)
9084         void *p;
9085 {
9086         return (void *) (p == NULL);
9087 }
9088
9089 int main() {
9090
9091         /* pthread test function */
9092         pthread_t t;
9093         int status;
9094         int detach = 1;
9095
9096 #ifdef HAVE_PTHREADS_FINAL
9097         /* Final pthreads */
9098         pthread_attr_t attr;
9099
9100         status = pthread_attr_init(&attr);
9101         if( status ) return status;
9102
9103 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9104         if( !detach ) {
9105 #if defined( PTHREAD_CREATE_JOINABLE )
9106                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9107 #else
9108                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9109 #endif
9110
9111 #ifdef PTHREAD_CREATE_DETACHED
9112         } else {
9113                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9114 #endif
9115         }
9116         if( status ) return status;
9117 #endif
9118
9119         status = pthread_create( &t, &attr, task, NULL );
9120         if( status ) return status;
9121
9122 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9123         if( detach ) {
9124                 /* give thread a chance to complete */
9125                 /* it should remain joinable and hence detachable */
9126                 sleep( 1 );
9127
9128                 status = pthread_detach( t );
9129                 if( status ) return status;
9130         }
9131 #endif
9132
9133 #else
9134         /* Draft 4 pthreads */
9135         status = pthread_create( &t, pthread_attr_default, task, NULL );
9136         if( status ) return status;
9137
9138         if( detach ) {
9139                 /* give thread a chance to complete */
9140                 /* it should remain joinable and hence detachable */
9141                 sleep( 1 );
9142
9143                 status = pthread_detach( &t );
9144                 if( status ) return status;
9145         }
9146 #endif
9147
9148 #ifdef HAVE_LINUX_THREADS
9149         pthread_kill_other_threads_np();
9150 #endif
9151
9152         return 0;
9153
9154 ; return 0; }
9155 EOF
9156 if { (eval echo configure:9157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9157   rm -rf conftest*
9158   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9159 else
9160   echo "configure: failed program was:" >&5
9161   cat conftest.$ac_ext >&5
9162   rm -rf conftest*
9163   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9164 fi
9165 rm -f conftest*
9166 else
9167   cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 /* pthread test headers */
9171 #include <pthread.h>
9172 #ifndef NULL
9173 #define NULL (void*)0
9174 #endif
9175
9176 static void *task(p)
9177         void *p;
9178 {
9179         return (void *) (p == NULL);
9180 }
9181
9182
9183 int main(argc, argv)
9184         int argc;
9185         char **argv;
9186 {
9187
9188         /* pthread test function */
9189         pthread_t t;
9190         int status;
9191         int detach = 1;
9192
9193 #ifdef HAVE_PTHREADS_FINAL
9194         /* Final pthreads */
9195         pthread_attr_t attr;
9196
9197         status = pthread_attr_init(&attr);
9198         if( status ) return status;
9199
9200 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9201         if( !detach ) {
9202 #if defined( PTHREAD_CREATE_JOINABLE )
9203                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9204 #else
9205                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9206 #endif
9207
9208 #ifdef PTHREAD_CREATE_DETACHED
9209         } else {
9210                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9211 #endif
9212         }
9213         if( status ) return status;
9214 #endif
9215
9216         status = pthread_create( &t, &attr, task, NULL );
9217         if( status ) return status;
9218
9219 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9220         if( detach ) {
9221                 /* give thread a chance to complete */
9222                 /* it should remain joinable and hence detachable */
9223                 sleep( 1 );
9224
9225                 status = pthread_detach( t );
9226                 if( status ) return status;
9227         }
9228 #endif
9229
9230 #else
9231         /* Draft 4 pthreads */
9232         status = pthread_create( &t, pthread_attr_default, task, NULL );
9233         if( status ) return status;
9234
9235         if( detach ) {
9236                 /* give thread a chance to complete */
9237                 /* it should remain joinable and hence detachable */
9238                 sleep( 1 );
9239
9240                 status = pthread_detach( &t );
9241                 if( status ) return status;
9242         }
9243 #endif
9244
9245 #ifdef HAVE_LINUX_THREADS
9246         pthread_kill_other_threads_np();
9247 #endif
9248
9249         return 0;
9250
9251 }
9252
9253 EOF
9254 if { (eval echo configure:9255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9255 then
9256   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9257 else
9258   echo "configure: failed program was:" >&5
9259   cat conftest.$ac_ext >&5
9260   rm -fr conftest*
9261   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9262 fi
9263 rm -fr conftest*
9264 fi
9265
9266
9267                 # restore the LIBS
9268                 LIBS="$ol_LIBS"
9269         
9270 fi
9271
9272 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
9273
9274         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
9275                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
9276                 ol_link_threads=posix
9277         fi
9278 fi
9279
9280                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
9281 if test "$ol_link_threads" = no ; then
9282         # try -lpthread -lmach -lexc
9283         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
9284 echo "configure:9285: checking for pthread link with -lpthread -lmach -lexc" >&5
9285 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288   
9289                 # save the flags
9290                 ol_LIBS="$LIBS"
9291                 LIBS="-lpthread -lmach -lexc $LIBS"
9292
9293                 if test "$cross_compiling" = yes; then
9294   cat > conftest.$ac_ext <<EOF
9295 #line 9296 "configure"
9296 #include "confdefs.h"
9297 /* pthread test headers */
9298 #include <pthread.h>
9299 #ifndef NULL
9300 #define NULL (void*)0
9301 #endif
9302
9303 static void *task(p)
9304         void *p;
9305 {
9306         return (void *) (p == NULL);
9307 }
9308
9309 int main() {
9310
9311         /* pthread test function */
9312         pthread_t t;
9313         int status;
9314         int detach = 1;
9315
9316 #ifdef HAVE_PTHREADS_FINAL
9317         /* Final pthreads */
9318         pthread_attr_t attr;
9319
9320         status = pthread_attr_init(&attr);
9321         if( status ) return status;
9322
9323 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9324         if( !detach ) {
9325 #if defined( PTHREAD_CREATE_JOINABLE )
9326                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9327 #else
9328                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9329 #endif
9330
9331 #ifdef PTHREAD_CREATE_DETACHED
9332         } else {
9333                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9334 #endif
9335         }
9336         if( status ) return status;
9337 #endif
9338
9339         status = pthread_create( &t, &attr, task, NULL );
9340         if( status ) return status;
9341
9342 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9343         if( detach ) {
9344                 /* give thread a chance to complete */
9345                 /* it should remain joinable and hence detachable */
9346                 sleep( 1 );
9347
9348                 status = pthread_detach( t );
9349                 if( status ) return status;
9350         }
9351 #endif
9352
9353 #else
9354         /* Draft 4 pthreads */
9355         status = pthread_create( &t, pthread_attr_default, task, NULL );
9356         if( status ) return status;
9357
9358         if( detach ) {
9359                 /* give thread a chance to complete */
9360                 /* it should remain joinable and hence detachable */
9361                 sleep( 1 );
9362
9363                 status = pthread_detach( &t );
9364                 if( status ) return status;
9365         }
9366 #endif
9367
9368 #ifdef HAVE_LINUX_THREADS
9369         pthread_kill_other_threads_np();
9370 #endif
9371
9372         return 0;
9373
9374 ; return 0; }
9375 EOF
9376 if { (eval echo configure:9377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9377   rm -rf conftest*
9378   ol_cv_pthread_lpthread_lmach_lexc=yes
9379 else
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382   rm -rf conftest*
9383   ol_cv_pthread_lpthread_lmach_lexc=no
9384 fi
9385 rm -f conftest*
9386 else
9387   cat > conftest.$ac_ext <<EOF
9388 #line 9389 "configure"
9389 #include "confdefs.h"
9390 /* pthread test headers */
9391 #include <pthread.h>
9392 #ifndef NULL
9393 #define NULL (void*)0
9394 #endif
9395
9396 static void *task(p)
9397         void *p;
9398 {
9399         return (void *) (p == NULL);
9400 }
9401
9402
9403 int main(argc, argv)
9404         int argc;
9405         char **argv;
9406 {
9407
9408         /* pthread test function */
9409         pthread_t t;
9410         int status;
9411         int detach = 1;
9412
9413 #ifdef HAVE_PTHREADS_FINAL
9414         /* Final pthreads */
9415         pthread_attr_t attr;
9416
9417         status = pthread_attr_init(&attr);
9418         if( status ) return status;
9419
9420 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9421         if( !detach ) {
9422 #if defined( PTHREAD_CREATE_JOINABLE )
9423                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9424 #else
9425                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9426 #endif
9427
9428 #ifdef PTHREAD_CREATE_DETACHED
9429         } else {
9430                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9431 #endif
9432         }
9433         if( status ) return status;
9434 #endif
9435
9436         status = pthread_create( &t, &attr, task, NULL );
9437         if( status ) return status;
9438
9439 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9440         if( detach ) {
9441                 /* give thread a chance to complete */
9442                 /* it should remain joinable and hence detachable */
9443                 sleep( 1 );
9444
9445                 status = pthread_detach( t );
9446                 if( status ) return status;
9447         }
9448 #endif
9449
9450 #else
9451         /* Draft 4 pthreads */
9452         status = pthread_create( &t, pthread_attr_default, task, NULL );
9453         if( status ) return status;
9454
9455         if( detach ) {
9456                 /* give thread a chance to complete */
9457                 /* it should remain joinable and hence detachable */
9458                 sleep( 1 );
9459
9460                 status = pthread_detach( &t );
9461                 if( status ) return status;
9462         }
9463 #endif
9464
9465 #ifdef HAVE_LINUX_THREADS
9466         pthread_kill_other_threads_np();
9467 #endif
9468
9469         return 0;
9470
9471 }
9472
9473 EOF
9474 if { (eval echo configure:9475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9475 then
9476   ol_cv_pthread_lpthread_lmach_lexc=yes
9477 else
9478   echo "configure: failed program was:" >&5
9479   cat conftest.$ac_ext >&5
9480   rm -fr conftest*
9481   ol_cv_pthread_lpthread_lmach_lexc=no
9482 fi
9483 rm -fr conftest*
9484 fi
9485
9486
9487                 # restore the LIBS
9488                 LIBS="$ol_LIBS"
9489         
9490 fi
9491
9492 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
9493
9494         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
9495                 ol_link_pthreads="-lpthread -lmach -lexc"
9496                 ol_link_threads=posix
9497         fi
9498 fi
9499
9500
9501                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
9502 if test "$ol_link_threads" = no ; then
9503         # try -lpthread -Wl,-woff,85
9504         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
9505 echo "configure:9506: checking for pthread link with -lpthread -Wl,-woff,85" >&5
9506 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
9507   echo $ac_n "(cached) $ac_c" 1>&6
9508 else
9509   
9510                 # save the flags
9511                 ol_LIBS="$LIBS"
9512                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
9513
9514                 if test "$cross_compiling" = yes; then
9515   cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518 /* pthread test headers */
9519 #include <pthread.h>
9520 #ifndef NULL
9521 #define NULL (void*)0
9522 #endif
9523
9524 static void *task(p)
9525         void *p;
9526 {
9527         return (void *) (p == NULL);
9528 }
9529
9530 int main() {
9531
9532         /* pthread test function */
9533         pthread_t t;
9534         int status;
9535         int detach = 1;
9536
9537 #ifdef HAVE_PTHREADS_FINAL
9538         /* Final pthreads */
9539         pthread_attr_t attr;
9540
9541         status = pthread_attr_init(&attr);
9542         if( status ) return status;
9543
9544 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9545         if( !detach ) {
9546 #if defined( PTHREAD_CREATE_JOINABLE )
9547                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9548 #else
9549                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9550 #endif
9551
9552 #ifdef PTHREAD_CREATE_DETACHED
9553         } else {
9554                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9555 #endif
9556         }
9557         if( status ) return status;
9558 #endif
9559
9560         status = pthread_create( &t, &attr, task, NULL );
9561         if( status ) return status;
9562
9563 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9564         if( detach ) {
9565                 /* give thread a chance to complete */
9566                 /* it should remain joinable and hence detachable */
9567                 sleep( 1 );
9568
9569                 status = pthread_detach( t );
9570                 if( status ) return status;
9571         }
9572 #endif
9573
9574 #else
9575         /* Draft 4 pthreads */
9576         status = pthread_create( &t, pthread_attr_default, task, NULL );
9577         if( status ) return status;
9578
9579         if( detach ) {
9580                 /* give thread a chance to complete */
9581                 /* it should remain joinable and hence detachable */
9582                 sleep( 1 );
9583
9584                 status = pthread_detach( &t );
9585                 if( status ) return status;
9586         }
9587 #endif
9588
9589 #ifdef HAVE_LINUX_THREADS
9590         pthread_kill_other_threads_np();
9591 #endif
9592
9593         return 0;
9594
9595 ; return 0; }
9596 EOF
9597 if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9598   rm -rf conftest*
9599   ol_cv_pthread_lib_lpthread_woff=yes
9600 else
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -rf conftest*
9604   ol_cv_pthread_lib_lpthread_woff=no
9605 fi
9606 rm -f conftest*
9607 else
9608   cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611 /* pthread test headers */
9612 #include <pthread.h>
9613 #ifndef NULL
9614 #define NULL (void*)0
9615 #endif
9616
9617 static void *task(p)
9618         void *p;
9619 {
9620         return (void *) (p == NULL);
9621 }
9622
9623
9624 int main(argc, argv)
9625         int argc;
9626         char **argv;
9627 {
9628
9629         /* pthread test function */
9630         pthread_t t;
9631         int status;
9632         int detach = 1;
9633
9634 #ifdef HAVE_PTHREADS_FINAL
9635         /* Final pthreads */
9636         pthread_attr_t attr;
9637
9638         status = pthread_attr_init(&attr);
9639         if( status ) return status;
9640
9641 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9642         if( !detach ) {
9643 #if defined( PTHREAD_CREATE_JOINABLE )
9644                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9645 #else
9646                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9647 #endif
9648
9649 #ifdef PTHREAD_CREATE_DETACHED
9650         } else {
9651                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9652 #endif
9653         }
9654         if( status ) return status;
9655 #endif
9656
9657         status = pthread_create( &t, &attr, task, NULL );
9658         if( status ) return status;
9659
9660 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9661         if( detach ) {
9662                 /* give thread a chance to complete */
9663                 /* it should remain joinable and hence detachable */
9664                 sleep( 1 );
9665
9666                 status = pthread_detach( t );
9667                 if( status ) return status;
9668         }
9669 #endif
9670
9671 #else
9672         /* Draft 4 pthreads */
9673         status = pthread_create( &t, pthread_attr_default, task, NULL );
9674         if( status ) return status;
9675
9676         if( detach ) {
9677                 /* give thread a chance to complete */
9678                 /* it should remain joinable and hence detachable */
9679                 sleep( 1 );
9680
9681                 status = pthread_detach( &t );
9682                 if( status ) return status;
9683         }
9684 #endif
9685
9686 #ifdef HAVE_LINUX_THREADS
9687         pthread_kill_other_threads_np();
9688 #endif
9689
9690         return 0;
9691
9692 }
9693
9694 EOF
9695 if { (eval echo configure:9696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9696 then
9697   ol_cv_pthread_lib_lpthread_woff=yes
9698 else
9699   echo "configure: failed program was:" >&5
9700   cat conftest.$ac_ext >&5
9701   rm -fr conftest*
9702   ol_cv_pthread_lib_lpthread_woff=no
9703 fi
9704 rm -fr conftest*
9705 fi
9706
9707
9708                 # restore the LIBS
9709                 LIBS="$ol_LIBS"
9710         
9711 fi
9712
9713 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9714
9715         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9716                 ol_link_pthreads="-lpthread -Wl,-woff,85"
9717                 ol_link_threads=posix
9718         fi
9719 fi
9720
9721
9722                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9723 if test "$ol_link_threads" = no ; then
9724         # try -lpthread
9725         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9726 echo "configure:9727: checking for pthread link with -lpthread" >&5
9727 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9728   echo $ac_n "(cached) $ac_c" 1>&6
9729 else
9730   
9731                 # save the flags
9732                 ol_LIBS="$LIBS"
9733                 LIBS="-lpthread $LIBS"
9734
9735                 if test "$cross_compiling" = yes; then
9736   cat > conftest.$ac_ext <<EOF
9737 #line 9738 "configure"
9738 #include "confdefs.h"
9739 /* pthread test headers */
9740 #include <pthread.h>
9741 #ifndef NULL
9742 #define NULL (void*)0
9743 #endif
9744
9745 static void *task(p)
9746         void *p;
9747 {
9748         return (void *) (p == NULL);
9749 }
9750
9751 int main() {
9752
9753         /* pthread test function */
9754         pthread_t t;
9755         int status;
9756         int detach = 1;
9757
9758 #ifdef HAVE_PTHREADS_FINAL
9759         /* Final pthreads */
9760         pthread_attr_t attr;
9761
9762         status = pthread_attr_init(&attr);
9763         if( status ) return status;
9764
9765 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9766         if( !detach ) {
9767 #if defined( PTHREAD_CREATE_JOINABLE )
9768                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9769 #else
9770                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9771 #endif
9772
9773 #ifdef PTHREAD_CREATE_DETACHED
9774         } else {
9775                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9776 #endif
9777         }
9778         if( status ) return status;
9779 #endif
9780
9781         status = pthread_create( &t, &attr, task, NULL );
9782         if( status ) return status;
9783
9784 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9785         if( detach ) {
9786                 /* give thread a chance to complete */
9787                 /* it should remain joinable and hence detachable */
9788                 sleep( 1 );
9789
9790                 status = pthread_detach( t );
9791                 if( status ) return status;
9792         }
9793 #endif
9794
9795 #else
9796         /* Draft 4 pthreads */
9797         status = pthread_create( &t, pthread_attr_default, task, NULL );
9798         if( status ) return status;
9799
9800         if( detach ) {
9801                 /* give thread a chance to complete */
9802                 /* it should remain joinable and hence detachable */
9803                 sleep( 1 );
9804
9805                 status = pthread_detach( &t );
9806                 if( status ) return status;
9807         }
9808 #endif
9809
9810 #ifdef HAVE_LINUX_THREADS
9811         pthread_kill_other_threads_np();
9812 #endif
9813
9814         return 0;
9815
9816 ; return 0; }
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9819   rm -rf conftest*
9820   ol_cv_pthread_lpthread=yes
9821 else
9822   echo "configure: failed program was:" >&5
9823   cat conftest.$ac_ext >&5
9824   rm -rf conftest*
9825   ol_cv_pthread_lpthread=no
9826 fi
9827 rm -f conftest*
9828 else
9829   cat > conftest.$ac_ext <<EOF
9830 #line 9831 "configure"
9831 #include "confdefs.h"
9832 /* pthread test headers */
9833 #include <pthread.h>
9834 #ifndef NULL
9835 #define NULL (void*)0
9836 #endif
9837
9838 static void *task(p)
9839         void *p;
9840 {
9841         return (void *) (p == NULL);
9842 }
9843
9844
9845 int main(argc, argv)
9846         int argc;
9847         char **argv;
9848 {
9849
9850         /* pthread test function */
9851         pthread_t t;
9852         int status;
9853         int detach = 1;
9854
9855 #ifdef HAVE_PTHREADS_FINAL
9856         /* Final pthreads */
9857         pthread_attr_t attr;
9858
9859         status = pthread_attr_init(&attr);
9860         if( status ) return status;
9861
9862 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9863         if( !detach ) {
9864 #if defined( PTHREAD_CREATE_JOINABLE )
9865                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9866 #else
9867                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9868 #endif
9869
9870 #ifdef PTHREAD_CREATE_DETACHED
9871         } else {
9872                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9873 #endif
9874         }
9875         if( status ) return status;
9876 #endif
9877
9878         status = pthread_create( &t, &attr, task, NULL );
9879         if( status ) return status;
9880
9881 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9882         if( detach ) {
9883                 /* give thread a chance to complete */
9884                 /* it should remain joinable and hence detachable */
9885                 sleep( 1 );
9886
9887                 status = pthread_detach( t );
9888                 if( status ) return status;
9889         }
9890 #endif
9891
9892 #else
9893         /* Draft 4 pthreads */
9894         status = pthread_create( &t, pthread_attr_default, task, NULL );
9895         if( status ) return status;
9896
9897         if( detach ) {
9898                 /* give thread a chance to complete */
9899                 /* it should remain joinable and hence detachable */
9900                 sleep( 1 );
9901
9902                 status = pthread_detach( &t );
9903                 if( status ) return status;
9904         }
9905 #endif
9906
9907 #ifdef HAVE_LINUX_THREADS
9908         pthread_kill_other_threads_np();
9909 #endif
9910
9911         return 0;
9912
9913 }
9914
9915 EOF
9916 if { (eval echo configure:9917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9917 then
9918   ol_cv_pthread_lpthread=yes
9919 else
9920   echo "configure: failed program was:" >&5
9921   cat conftest.$ac_ext >&5
9922   rm -fr conftest*
9923   ol_cv_pthread_lpthread=no
9924 fi
9925 rm -fr conftest*
9926 fi
9927
9928
9929                 # restore the LIBS
9930                 LIBS="$ol_LIBS"
9931         
9932 fi
9933
9934 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9935
9936         if test $ol_cv_pthread_lpthread = yes ; then
9937                 ol_link_pthreads="-lpthread"
9938                 ol_link_threads=posix
9939         fi
9940 fi
9941
9942                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9943 if test "$ol_link_threads" = no ; then
9944         # try -lc_r
9945         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9946 echo "configure:9947: checking for pthread link with -lc_r" >&5
9947 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9948   echo $ac_n "(cached) $ac_c" 1>&6
9949 else
9950   
9951                 # save the flags
9952                 ol_LIBS="$LIBS"
9953                 LIBS="-lc_r $LIBS"
9954
9955                 if test "$cross_compiling" = yes; then
9956   cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 /* pthread test headers */
9960 #include <pthread.h>
9961 #ifndef NULL
9962 #define NULL (void*)0
9963 #endif
9964
9965 static void *task(p)
9966         void *p;
9967 {
9968         return (void *) (p == NULL);
9969 }
9970
9971 int main() {
9972
9973         /* pthread test function */
9974         pthread_t t;
9975         int status;
9976         int detach = 1;
9977
9978 #ifdef HAVE_PTHREADS_FINAL
9979         /* Final pthreads */
9980         pthread_attr_t attr;
9981
9982         status = pthread_attr_init(&attr);
9983         if( status ) return status;
9984
9985 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9986         if( !detach ) {
9987 #if defined( PTHREAD_CREATE_JOINABLE )
9988                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9989 #else
9990                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9991 #endif
9992
9993 #ifdef PTHREAD_CREATE_DETACHED
9994         } else {
9995                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9996 #endif
9997         }
9998         if( status ) return status;
9999 #endif
10000
10001         status = pthread_create( &t, &attr, task, NULL );
10002         if( status ) return status;
10003
10004 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10005         if( detach ) {
10006                 /* give thread a chance to complete */
10007                 /* it should remain joinable and hence detachable */
10008                 sleep( 1 );
10009
10010                 status = pthread_detach( t );
10011                 if( status ) return status;
10012         }
10013 #endif
10014
10015 #else
10016         /* Draft 4 pthreads */
10017         status = pthread_create( &t, pthread_attr_default, task, NULL );
10018         if( status ) return status;
10019
10020         if( detach ) {
10021                 /* give thread a chance to complete */
10022                 /* it should remain joinable and hence detachable */
10023                 sleep( 1 );
10024
10025                 status = pthread_detach( &t );
10026                 if( status ) return status;
10027         }
10028 #endif
10029
10030 #ifdef HAVE_LINUX_THREADS
10031         pthread_kill_other_threads_np();
10032 #endif
10033
10034         return 0;
10035
10036 ; return 0; }
10037 EOF
10038 if { (eval echo configure:10039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10039   rm -rf conftest*
10040   ol_cv_pthread_lc_r=yes
10041 else
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -rf conftest*
10045   ol_cv_pthread_lc_r=no
10046 fi
10047 rm -f conftest*
10048 else
10049   cat > conftest.$ac_ext <<EOF
10050 #line 10051 "configure"
10051 #include "confdefs.h"
10052 /* pthread test headers */
10053 #include <pthread.h>
10054 #ifndef NULL
10055 #define NULL (void*)0
10056 #endif
10057
10058 static void *task(p)
10059         void *p;
10060 {
10061         return (void *) (p == NULL);
10062 }
10063
10064
10065 int main(argc, argv)
10066         int argc;
10067         char **argv;
10068 {
10069
10070         /* pthread test function */
10071         pthread_t t;
10072         int status;
10073         int detach = 1;
10074
10075 #ifdef HAVE_PTHREADS_FINAL
10076         /* Final pthreads */
10077         pthread_attr_t attr;
10078
10079         status = pthread_attr_init(&attr);
10080         if( status ) return status;
10081
10082 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10083         if( !detach ) {
10084 #if defined( PTHREAD_CREATE_JOINABLE )
10085                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10086 #else
10087                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10088 #endif
10089
10090 #ifdef PTHREAD_CREATE_DETACHED
10091         } else {
10092                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10093 #endif
10094         }
10095         if( status ) return status;
10096 #endif
10097
10098         status = pthread_create( &t, &attr, task, NULL );
10099         if( status ) return status;
10100
10101 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10102         if( detach ) {
10103                 /* give thread a chance to complete */
10104                 /* it should remain joinable and hence detachable */
10105                 sleep( 1 );
10106
10107                 status = pthread_detach( t );
10108                 if( status ) return status;
10109         }
10110 #endif
10111
10112 #else
10113         /* Draft 4 pthreads */
10114         status = pthread_create( &t, pthread_attr_default, task, NULL );
10115         if( status ) return status;
10116
10117         if( detach ) {
10118                 /* give thread a chance to complete */
10119                 /* it should remain joinable and hence detachable */
10120                 sleep( 1 );
10121
10122                 status = pthread_detach( &t );
10123                 if( status ) return status;
10124         }
10125 #endif
10126
10127 #ifdef HAVE_LINUX_THREADS
10128         pthread_kill_other_threads_np();
10129 #endif
10130
10131         return 0;
10132
10133 }
10134
10135 EOF
10136 if { (eval echo configure:10137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10137 then
10138   ol_cv_pthread_lc_r=yes
10139 else
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -fr conftest*
10143   ol_cv_pthread_lc_r=no
10144 fi
10145 rm -fr conftest*
10146 fi
10147
10148
10149                 # restore the LIBS
10150                 LIBS="$ol_LIBS"
10151         
10152 fi
10153
10154 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
10155
10156         if test $ol_cv_pthread_lc_r = yes ; then
10157                 ol_link_pthreads="-lc_r"
10158                 ol_link_threads=posix
10159         fi
10160 fi
10161
10162
10163                 # Pthread try link: -threads (ol_cv_pthread_threads)
10164 if test "$ol_link_threads" = no ; then
10165         # try -threads
10166         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
10167 echo "configure:10168: checking for pthread link with -threads" >&5
10168 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
10169   echo $ac_n "(cached) $ac_c" 1>&6
10170 else
10171   
10172                 # save the flags
10173                 ol_LIBS="$LIBS"
10174                 LIBS="-threads $LIBS"
10175
10176                 if test "$cross_compiling" = yes; then
10177   cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 /* pthread test headers */
10181 #include <pthread.h>
10182 #ifndef NULL
10183 #define NULL (void*)0
10184 #endif
10185
10186 static void *task(p)
10187         void *p;
10188 {
10189         return (void *) (p == NULL);
10190 }
10191
10192 int main() {
10193
10194         /* pthread test function */
10195         pthread_t t;
10196         int status;
10197         int detach = 1;
10198
10199 #ifdef HAVE_PTHREADS_FINAL
10200         /* Final pthreads */
10201         pthread_attr_t attr;
10202
10203         status = pthread_attr_init(&attr);
10204         if( status ) return status;
10205
10206 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10207         if( !detach ) {
10208 #if defined( PTHREAD_CREATE_JOINABLE )
10209                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10210 #else
10211                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10212 #endif
10213
10214 #ifdef PTHREAD_CREATE_DETACHED
10215         } else {
10216                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10217 #endif
10218         }
10219         if( status ) return status;
10220 #endif
10221
10222         status = pthread_create( &t, &attr, task, NULL );
10223         if( status ) return status;
10224
10225 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10226         if( detach ) {
10227                 /* give thread a chance to complete */
10228                 /* it should remain joinable and hence detachable */
10229                 sleep( 1 );
10230
10231                 status = pthread_detach( t );
10232                 if( status ) return status;
10233         }
10234 #endif
10235
10236 #else
10237         /* Draft 4 pthreads */
10238         status = pthread_create( &t, pthread_attr_default, task, NULL );
10239         if( status ) return status;
10240
10241         if( detach ) {
10242                 /* give thread a chance to complete */
10243                 /* it should remain joinable and hence detachable */
10244                 sleep( 1 );
10245
10246                 status = pthread_detach( &t );
10247                 if( status ) return status;
10248         }
10249 #endif
10250
10251 #ifdef HAVE_LINUX_THREADS
10252         pthread_kill_other_threads_np();
10253 #endif
10254
10255         return 0;
10256
10257 ; return 0; }
10258 EOF
10259 if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10260   rm -rf conftest*
10261   ol_cv_pthread_threads=yes
10262 else
10263   echo "configure: failed program was:" >&5
10264   cat conftest.$ac_ext >&5
10265   rm -rf conftest*
10266   ol_cv_pthread_threads=no
10267 fi
10268 rm -f conftest*
10269 else
10270   cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273 /* pthread test headers */
10274 #include <pthread.h>
10275 #ifndef NULL
10276 #define NULL (void*)0
10277 #endif
10278
10279 static void *task(p)
10280         void *p;
10281 {
10282         return (void *) (p == NULL);
10283 }
10284
10285
10286 int main(argc, argv)
10287         int argc;
10288         char **argv;
10289 {
10290
10291         /* pthread test function */
10292         pthread_t t;
10293         int status;
10294         int detach = 1;
10295
10296 #ifdef HAVE_PTHREADS_FINAL
10297         /* Final pthreads */
10298         pthread_attr_t attr;
10299
10300         status = pthread_attr_init(&attr);
10301         if( status ) return status;
10302
10303 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10304         if( !detach ) {
10305 #if defined( PTHREAD_CREATE_JOINABLE )
10306                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10307 #else
10308                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10309 #endif
10310
10311 #ifdef PTHREAD_CREATE_DETACHED
10312         } else {
10313                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10314 #endif
10315         }
10316         if( status ) return status;
10317 #endif
10318
10319         status = pthread_create( &t, &attr, task, NULL );
10320         if( status ) return status;
10321
10322 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10323         if( detach ) {
10324                 /* give thread a chance to complete */
10325                 /* it should remain joinable and hence detachable */
10326                 sleep( 1 );
10327
10328                 status = pthread_detach( t );
10329                 if( status ) return status;
10330         }
10331 #endif
10332
10333 #else
10334         /* Draft 4 pthreads */
10335         status = pthread_create( &t, pthread_attr_default, task, NULL );
10336         if( status ) return status;
10337
10338         if( detach ) {
10339                 /* give thread a chance to complete */
10340                 /* it should remain joinable and hence detachable */
10341                 sleep( 1 );
10342
10343                 status = pthread_detach( &t );
10344                 if( status ) return status;
10345         }
10346 #endif
10347
10348 #ifdef HAVE_LINUX_THREADS
10349         pthread_kill_other_threads_np();
10350 #endif
10351
10352         return 0;
10353
10354 }
10355
10356 EOF
10357 if { (eval echo configure:10358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10358 then
10359   ol_cv_pthread_threads=yes
10360 else
10361   echo "configure: failed program was:" >&5
10362   cat conftest.$ac_ext >&5
10363   rm -fr conftest*
10364   ol_cv_pthread_threads=no
10365 fi
10366 rm -fr conftest*
10367 fi
10368
10369
10370                 # restore the LIBS
10371                 LIBS="$ol_LIBS"
10372         
10373 fi
10374
10375 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
10376
10377         if test $ol_cv_pthread_threads = yes ; then
10378                 ol_link_pthreads="-threads"
10379                 ol_link_threads=posix
10380         fi
10381 fi
10382
10383
10384                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
10385 if test "$ol_link_threads" = no ; then
10386         # try -lpthreads -lmach -lexc -lc_r
10387         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
10388 echo "configure:10389: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
10389 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
10390   echo $ac_n "(cached) $ac_c" 1>&6
10391 else
10392   
10393                 # save the flags
10394                 ol_LIBS="$LIBS"
10395                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
10396
10397                 if test "$cross_compiling" = yes; then
10398   cat > conftest.$ac_ext <<EOF
10399 #line 10400 "configure"
10400 #include "confdefs.h"
10401 /* pthread test headers */
10402 #include <pthread.h>
10403 #ifndef NULL
10404 #define NULL (void*)0
10405 #endif
10406
10407 static void *task(p)
10408         void *p;
10409 {
10410         return (void *) (p == NULL);
10411 }
10412
10413 int main() {
10414
10415         /* pthread test function */
10416         pthread_t t;
10417         int status;
10418         int detach = 1;
10419
10420 #ifdef HAVE_PTHREADS_FINAL
10421         /* Final pthreads */
10422         pthread_attr_t attr;
10423
10424         status = pthread_attr_init(&attr);
10425         if( status ) return status;
10426
10427 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10428         if( !detach ) {
10429 #if defined( PTHREAD_CREATE_JOINABLE )
10430                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10431 #else
10432                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10433 #endif
10434
10435 #ifdef PTHREAD_CREATE_DETACHED
10436         } else {
10437                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10438 #endif
10439         }
10440         if( status ) return status;
10441 #endif
10442
10443         status = pthread_create( &t, &attr, task, NULL );
10444         if( status ) return status;
10445
10446 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10447         if( detach ) {
10448                 /* give thread a chance to complete */
10449                 /* it should remain joinable and hence detachable */
10450                 sleep( 1 );
10451
10452                 status = pthread_detach( t );
10453                 if( status ) return status;
10454         }
10455 #endif
10456
10457 #else
10458         /* Draft 4 pthreads */
10459         status = pthread_create( &t, pthread_attr_default, task, NULL );
10460         if( status ) return status;
10461
10462         if( detach ) {
10463                 /* give thread a chance to complete */
10464                 /* it should remain joinable and hence detachable */
10465                 sleep( 1 );
10466
10467                 status = pthread_detach( &t );
10468                 if( status ) return status;
10469         }
10470 #endif
10471
10472 #ifdef HAVE_LINUX_THREADS
10473         pthread_kill_other_threads_np();
10474 #endif
10475
10476         return 0;
10477
10478 ; return 0; }
10479 EOF
10480 if { (eval echo configure:10481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10481   rm -rf conftest*
10482   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10483 else
10484   echo "configure: failed program was:" >&5
10485   cat conftest.$ac_ext >&5
10486   rm -rf conftest*
10487   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10488 fi
10489 rm -f conftest*
10490 else
10491   cat > conftest.$ac_ext <<EOF
10492 #line 10493 "configure"
10493 #include "confdefs.h"
10494 /* pthread test headers */
10495 #include <pthread.h>
10496 #ifndef NULL
10497 #define NULL (void*)0
10498 #endif
10499
10500 static void *task(p)
10501         void *p;
10502 {
10503         return (void *) (p == NULL);
10504 }
10505
10506
10507 int main(argc, argv)
10508         int argc;
10509         char **argv;
10510 {
10511
10512         /* pthread test function */
10513         pthread_t t;
10514         int status;
10515         int detach = 1;
10516
10517 #ifdef HAVE_PTHREADS_FINAL
10518         /* Final pthreads */
10519         pthread_attr_t attr;
10520
10521         status = pthread_attr_init(&attr);
10522         if( status ) return status;
10523
10524 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10525         if( !detach ) {
10526 #if defined( PTHREAD_CREATE_JOINABLE )
10527                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10528 #else
10529                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10530 #endif
10531
10532 #ifdef PTHREAD_CREATE_DETACHED
10533         } else {
10534                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10535 #endif
10536         }
10537         if( status ) return status;
10538 #endif
10539
10540         status = pthread_create( &t, &attr, task, NULL );
10541         if( status ) return status;
10542
10543 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10544         if( detach ) {
10545                 /* give thread a chance to complete */
10546                 /* it should remain joinable and hence detachable */
10547                 sleep( 1 );
10548
10549                 status = pthread_detach( t );
10550                 if( status ) return status;
10551         }
10552 #endif
10553
10554 #else
10555         /* Draft 4 pthreads */
10556         status = pthread_create( &t, pthread_attr_default, task, NULL );
10557         if( status ) return status;
10558
10559         if( detach ) {
10560                 /* give thread a chance to complete */
10561                 /* it should remain joinable and hence detachable */
10562                 sleep( 1 );
10563
10564                 status = pthread_detach( &t );
10565                 if( status ) return status;
10566         }
10567 #endif
10568
10569 #ifdef HAVE_LINUX_THREADS
10570         pthread_kill_other_threads_np();
10571 #endif
10572
10573         return 0;
10574
10575 }
10576
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10579 then
10580   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -fr conftest*
10585   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10586 fi
10587 rm -fr conftest*
10588 fi
10589
10590
10591                 # restore the LIBS
10592                 LIBS="$ol_LIBS"
10593         
10594 fi
10595
10596 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
10597
10598         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
10599                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
10600                 ol_link_threads=posix
10601         fi
10602 fi
10603
10604                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
10605 if test "$ol_link_threads" = no ; then
10606         # try -lpthreads -lmach -lexc
10607         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
10608 echo "configure:10609: checking for pthread link with -lpthreads -lmach -lexc" >&5
10609 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
10610   echo $ac_n "(cached) $ac_c" 1>&6
10611 else
10612   
10613                 # save the flags
10614                 ol_LIBS="$LIBS"
10615                 LIBS="-lpthreads -lmach -lexc $LIBS"
10616
10617                 if test "$cross_compiling" = yes; then
10618   cat > conftest.$ac_ext <<EOF
10619 #line 10620 "configure"
10620 #include "confdefs.h"
10621 /* pthread test headers */
10622 #include <pthread.h>
10623 #ifndef NULL
10624 #define NULL (void*)0
10625 #endif
10626
10627 static void *task(p)
10628         void *p;
10629 {
10630         return (void *) (p == NULL);
10631 }
10632
10633 int main() {
10634
10635         /* pthread test function */
10636         pthread_t t;
10637         int status;
10638         int detach = 1;
10639
10640 #ifdef HAVE_PTHREADS_FINAL
10641         /* Final pthreads */
10642         pthread_attr_t attr;
10643
10644         status = pthread_attr_init(&attr);
10645         if( status ) return status;
10646
10647 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10648         if( !detach ) {
10649 #if defined( PTHREAD_CREATE_JOINABLE )
10650                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10651 #else
10652                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10653 #endif
10654
10655 #ifdef PTHREAD_CREATE_DETACHED
10656         } else {
10657                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10658 #endif
10659         }
10660         if( status ) return status;
10661 #endif
10662
10663         status = pthread_create( &t, &attr, task, NULL );
10664         if( status ) return status;
10665
10666 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10667         if( detach ) {
10668                 /* give thread a chance to complete */
10669                 /* it should remain joinable and hence detachable */
10670                 sleep( 1 );
10671
10672                 status = pthread_detach( t );
10673                 if( status ) return status;
10674         }
10675 #endif
10676
10677 #else
10678         /* Draft 4 pthreads */
10679         status = pthread_create( &t, pthread_attr_default, task, NULL );
10680         if( status ) return status;
10681
10682         if( detach ) {
10683                 /* give thread a chance to complete */
10684                 /* it should remain joinable and hence detachable */
10685                 sleep( 1 );
10686
10687                 status = pthread_detach( &t );
10688                 if( status ) return status;
10689         }
10690 #endif
10691
10692 #ifdef HAVE_LINUX_THREADS
10693         pthread_kill_other_threads_np();
10694 #endif
10695
10696         return 0;
10697
10698 ; return 0; }
10699 EOF
10700 if { (eval echo configure:10701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10701   rm -rf conftest*
10702   ol_cv_pthread_lpthreads_lmach_lexc=yes
10703 else
10704   echo "configure: failed program was:" >&5
10705   cat conftest.$ac_ext >&5
10706   rm -rf conftest*
10707   ol_cv_pthread_lpthreads_lmach_lexc=no
10708 fi
10709 rm -f conftest*
10710 else
10711   cat > conftest.$ac_ext <<EOF
10712 #line 10713 "configure"
10713 #include "confdefs.h"
10714 /* pthread test headers */
10715 #include <pthread.h>
10716 #ifndef NULL
10717 #define NULL (void*)0
10718 #endif
10719
10720 static void *task(p)
10721         void *p;
10722 {
10723         return (void *) (p == NULL);
10724 }
10725
10726
10727 int main(argc, argv)
10728         int argc;
10729         char **argv;
10730 {
10731
10732         /* pthread test function */
10733         pthread_t t;
10734         int status;
10735         int detach = 1;
10736
10737 #ifdef HAVE_PTHREADS_FINAL
10738         /* Final pthreads */
10739         pthread_attr_t attr;
10740
10741         status = pthread_attr_init(&attr);
10742         if( status ) return status;
10743
10744 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10745         if( !detach ) {
10746 #if defined( PTHREAD_CREATE_JOINABLE )
10747                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10748 #else
10749                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10750 #endif
10751
10752 #ifdef PTHREAD_CREATE_DETACHED
10753         } else {
10754                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10755 #endif
10756         }
10757         if( status ) return status;
10758 #endif
10759
10760         status = pthread_create( &t, &attr, task, NULL );
10761         if( status ) return status;
10762
10763 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10764         if( detach ) {
10765                 /* give thread a chance to complete */
10766                 /* it should remain joinable and hence detachable */
10767                 sleep( 1 );
10768
10769                 status = pthread_detach( t );
10770                 if( status ) return status;
10771         }
10772 #endif
10773
10774 #else
10775         /* Draft 4 pthreads */
10776         status = pthread_create( &t, pthread_attr_default, task, NULL );
10777         if( status ) return status;
10778
10779         if( detach ) {
10780                 /* give thread a chance to complete */
10781                 /* it should remain joinable and hence detachable */
10782                 sleep( 1 );
10783
10784                 status = pthread_detach( &t );
10785                 if( status ) return status;
10786         }
10787 #endif
10788
10789 #ifdef HAVE_LINUX_THREADS
10790         pthread_kill_other_threads_np();
10791 #endif
10792
10793         return 0;
10794
10795 }
10796
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10799 then
10800   ol_cv_pthread_lpthreads_lmach_lexc=yes
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -fr conftest*
10805   ol_cv_pthread_lpthreads_lmach_lexc=no
10806 fi
10807 rm -fr conftest*
10808 fi
10809
10810
10811                 # restore the LIBS
10812                 LIBS="$ol_LIBS"
10813         
10814 fi
10815
10816 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
10817
10818         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
10819                 ol_link_pthreads="-lpthreads -lmach -lexc"
10820                 ol_link_threads=posix
10821         fi
10822 fi
10823
10824                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
10825 if test "$ol_link_threads" = no ; then
10826         # try -lpthreads -lexc
10827         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
10828 echo "configure:10829: checking for pthread link with -lpthreads -lexc" >&5
10829 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
10830   echo $ac_n "(cached) $ac_c" 1>&6
10831 else
10832   
10833                 # save the flags
10834                 ol_LIBS="$LIBS"
10835                 LIBS="-lpthreads -lexc $LIBS"
10836
10837                 if test "$cross_compiling" = yes; then
10838   cat > conftest.$ac_ext <<EOF
10839 #line 10840 "configure"
10840 #include "confdefs.h"
10841 /* pthread test headers */
10842 #include <pthread.h>
10843 #ifndef NULL
10844 #define NULL (void*)0
10845 #endif
10846
10847 static void *task(p)
10848         void *p;
10849 {
10850         return (void *) (p == NULL);
10851 }
10852
10853 int main() {
10854
10855         /* pthread test function */
10856         pthread_t t;
10857         int status;
10858         int detach = 1;
10859
10860 #ifdef HAVE_PTHREADS_FINAL
10861         /* Final pthreads */
10862         pthread_attr_t attr;
10863
10864         status = pthread_attr_init(&attr);
10865         if( status ) return status;
10866
10867 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10868         if( !detach ) {
10869 #if defined( PTHREAD_CREATE_JOINABLE )
10870                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10871 #else
10872                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10873 #endif
10874
10875 #ifdef PTHREAD_CREATE_DETACHED
10876         } else {
10877                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10878 #endif
10879         }
10880         if( status ) return status;
10881 #endif
10882
10883         status = pthread_create( &t, &attr, task, NULL );
10884         if( status ) return status;
10885
10886 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10887         if( detach ) {
10888                 /* give thread a chance to complete */
10889                 /* it should remain joinable and hence detachable */
10890                 sleep( 1 );
10891
10892                 status = pthread_detach( t );
10893                 if( status ) return status;
10894         }
10895 #endif
10896
10897 #else
10898         /* Draft 4 pthreads */
10899         status = pthread_create( &t, pthread_attr_default, task, NULL );
10900         if( status ) return status;
10901
10902         if( detach ) {
10903                 /* give thread a chance to complete */
10904                 /* it should remain joinable and hence detachable */
10905                 sleep( 1 );
10906
10907                 status = pthread_detach( &t );
10908                 if( status ) return status;
10909         }
10910 #endif
10911
10912 #ifdef HAVE_LINUX_THREADS
10913         pthread_kill_other_threads_np();
10914 #endif
10915
10916         return 0;
10917
10918 ; return 0; }
10919 EOF
10920 if { (eval echo configure:10921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10921   rm -rf conftest*
10922   ol_cv_pthread_lpthreads_lexc=yes
10923 else
10924   echo "configure: failed program was:" >&5
10925   cat conftest.$ac_ext >&5
10926   rm -rf conftest*
10927   ol_cv_pthread_lpthreads_lexc=no
10928 fi
10929 rm -f conftest*
10930 else
10931   cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 /* pthread test headers */
10935 #include <pthread.h>
10936 #ifndef NULL
10937 #define NULL (void*)0
10938 #endif
10939
10940 static void *task(p)
10941         void *p;
10942 {
10943         return (void *) (p == NULL);
10944 }
10945
10946
10947 int main(argc, argv)
10948         int argc;
10949         char **argv;
10950 {
10951
10952         /* pthread test function */
10953         pthread_t t;
10954         int status;
10955         int detach = 1;
10956
10957 #ifdef HAVE_PTHREADS_FINAL
10958         /* Final pthreads */
10959         pthread_attr_t attr;
10960
10961         status = pthread_attr_init(&attr);
10962         if( status ) return status;
10963
10964 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10965         if( !detach ) {
10966 #if defined( PTHREAD_CREATE_JOINABLE )
10967                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10968 #else
10969                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10970 #endif
10971
10972 #ifdef PTHREAD_CREATE_DETACHED
10973         } else {
10974                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10975 #endif
10976         }
10977         if( status ) return status;
10978 #endif
10979
10980         status = pthread_create( &t, &attr, task, NULL );
10981         if( status ) return status;
10982
10983 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10984         if( detach ) {
10985                 /* give thread a chance to complete */
10986                 /* it should remain joinable and hence detachable */
10987                 sleep( 1 );
10988
10989                 status = pthread_detach( t );
10990                 if( status ) return status;
10991         }
10992 #endif
10993
10994 #else
10995         /* Draft 4 pthreads */
10996         status = pthread_create( &t, pthread_attr_default, task, NULL );
10997         if( status ) return status;
10998
10999         if( detach ) {
11000                 /* give thread a chance to complete */
11001                 /* it should remain joinable and hence detachable */
11002                 sleep( 1 );
11003
11004                 status = pthread_detach( &t );
11005                 if( status ) return status;
11006         }
11007 #endif
11008
11009 #ifdef HAVE_LINUX_THREADS
11010         pthread_kill_other_threads_np();
11011 #endif
11012
11013         return 0;
11014
11015 }
11016
11017 EOF
11018 if { (eval echo configure:11019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11019 then
11020   ol_cv_pthread_lpthreads_lexc=yes
11021 else
11022   echo "configure: failed program was:" >&5
11023   cat conftest.$ac_ext >&5
11024   rm -fr conftest*
11025   ol_cv_pthread_lpthreads_lexc=no
11026 fi
11027 rm -fr conftest*
11028 fi
11029
11030
11031                 # restore the LIBS
11032                 LIBS="$ol_LIBS"
11033         
11034 fi
11035
11036 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
11037
11038         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
11039                 ol_link_pthreads="-lpthreads -lexc"
11040                 ol_link_threads=posix
11041         fi
11042 fi
11043
11044
11045                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
11046 if test "$ol_link_threads" = no ; then
11047         # try -lpthreads
11048         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
11049 echo "configure:11050: checking for pthread link with -lpthreads" >&5
11050 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
11051   echo $ac_n "(cached) $ac_c" 1>&6
11052 else
11053   
11054                 # save the flags
11055                 ol_LIBS="$LIBS"
11056                 LIBS="-lpthreads $LIBS"
11057
11058                 if test "$cross_compiling" = yes; then
11059   cat > conftest.$ac_ext <<EOF
11060 #line 11061 "configure"
11061 #include "confdefs.h"
11062 /* pthread test headers */
11063 #include <pthread.h>
11064 #ifndef NULL
11065 #define NULL (void*)0
11066 #endif
11067
11068 static void *task(p)
11069         void *p;
11070 {
11071         return (void *) (p == NULL);
11072 }
11073
11074 int main() {
11075
11076         /* pthread test function */
11077         pthread_t t;
11078         int status;
11079         int detach = 1;
11080
11081 #ifdef HAVE_PTHREADS_FINAL
11082         /* Final pthreads */
11083         pthread_attr_t attr;
11084
11085         status = pthread_attr_init(&attr);
11086         if( status ) return status;
11087
11088 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11089         if( !detach ) {
11090 #if defined( PTHREAD_CREATE_JOINABLE )
11091                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11092 #else
11093                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11094 #endif
11095
11096 #ifdef PTHREAD_CREATE_DETACHED
11097         } else {
11098                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11099 #endif
11100         }
11101         if( status ) return status;
11102 #endif
11103
11104         status = pthread_create( &t, &attr, task, NULL );
11105         if( status ) return status;
11106
11107 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11108         if( detach ) {
11109                 /* give thread a chance to complete */
11110                 /* it should remain joinable and hence detachable */
11111                 sleep( 1 );
11112
11113                 status = pthread_detach( t );
11114                 if( status ) return status;
11115         }
11116 #endif
11117
11118 #else
11119         /* Draft 4 pthreads */
11120         status = pthread_create( &t, pthread_attr_default, task, NULL );
11121         if( status ) return status;
11122
11123         if( detach ) {
11124                 /* give thread a chance to complete */
11125                 /* it should remain joinable and hence detachable */
11126                 sleep( 1 );
11127
11128                 status = pthread_detach( &t );
11129                 if( status ) return status;
11130         }
11131 #endif
11132
11133 #ifdef HAVE_LINUX_THREADS
11134         pthread_kill_other_threads_np();
11135 #endif
11136
11137         return 0;
11138
11139 ; return 0; }
11140 EOF
11141 if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11142   rm -rf conftest*
11143   ol_cv_pthread_lib_lpthreads=yes
11144 else
11145   echo "configure: failed program was:" >&5
11146   cat conftest.$ac_ext >&5
11147   rm -rf conftest*
11148   ol_cv_pthread_lib_lpthreads=no
11149 fi
11150 rm -f conftest*
11151 else
11152   cat > conftest.$ac_ext <<EOF
11153 #line 11154 "configure"
11154 #include "confdefs.h"
11155 /* pthread test headers */
11156 #include <pthread.h>
11157 #ifndef NULL
11158 #define NULL (void*)0
11159 #endif
11160
11161 static void *task(p)
11162         void *p;
11163 {
11164         return (void *) (p == NULL);
11165 }
11166
11167
11168 int main(argc, argv)
11169         int argc;
11170         char **argv;
11171 {
11172
11173         /* pthread test function */
11174         pthread_t t;
11175         int status;
11176         int detach = 1;
11177
11178 #ifdef HAVE_PTHREADS_FINAL
11179         /* Final pthreads */
11180         pthread_attr_t attr;
11181
11182         status = pthread_attr_init(&attr);
11183         if( status ) return status;
11184
11185 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11186         if( !detach ) {
11187 #if defined( PTHREAD_CREATE_JOINABLE )
11188                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11189 #else
11190                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11191 #endif
11192
11193 #ifdef PTHREAD_CREATE_DETACHED
11194         } else {
11195                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11196 #endif
11197         }
11198         if( status ) return status;
11199 #endif
11200
11201         status = pthread_create( &t, &attr, task, NULL );
11202         if( status ) return status;
11203
11204 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11205         if( detach ) {
11206                 /* give thread a chance to complete */
11207                 /* it should remain joinable and hence detachable */
11208                 sleep( 1 );
11209
11210                 status = pthread_detach( t );
11211                 if( status ) return status;
11212         }
11213 #endif
11214
11215 #else
11216         /* Draft 4 pthreads */
11217         status = pthread_create( &t, pthread_attr_default, task, NULL );
11218         if( status ) return status;
11219
11220         if( detach ) {
11221                 /* give thread a chance to complete */
11222                 /* it should remain joinable and hence detachable */
11223                 sleep( 1 );
11224
11225                 status = pthread_detach( &t );
11226                 if( status ) return status;
11227         }
11228 #endif
11229
11230 #ifdef HAVE_LINUX_THREADS
11231         pthread_kill_other_threads_np();
11232 #endif
11233
11234         return 0;
11235
11236 }
11237
11238 EOF
11239 if { (eval echo configure:11240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11240 then
11241   ol_cv_pthread_lib_lpthreads=yes
11242 else
11243   echo "configure: failed program was:" >&5
11244   cat conftest.$ac_ext >&5
11245   rm -fr conftest*
11246   ol_cv_pthread_lib_lpthreads=no
11247 fi
11248 rm -fr conftest*
11249 fi
11250
11251
11252                 # restore the LIBS
11253                 LIBS="$ol_LIBS"
11254         
11255 fi
11256
11257 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
11258
11259         if test $ol_cv_pthread_lib_lpthreads = yes ; then
11260                 ol_link_pthreads="-lpthreads"
11261                 ol_link_threads=posix
11262         fi
11263 fi
11264
11265
11266                 if test $ol_link_threads != no ; then
11267                         cat >> confdefs.h <<\EOF
11268 #define HAVE_PTHREADS 1
11269 EOF
11270
11271
11272                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
11273
11274                                                 save_CPPFLAGS="$CPPFLAGS"
11275                         save_LIBS="$LIBS"
11276                         LIBS="$LTHREAD_LIBS $LIBS"
11277
11278                                                                                                 for ac_func in sched_yield pthread_yield
11279 do
11280 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11281 echo "configure:11282: checking for $ac_func" >&5
11282 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11283   echo $ac_n "(cached) $ac_c" 1>&6
11284 else
11285   cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11287 #include "confdefs.h"
11288 /* System header to define __stub macros and hopefully few prototypes,
11289     which can conflict with char $ac_func(); below.  */
11290 #include <assert.h>
11291 /* Override any gcc2 internal prototype to avoid an error.  */
11292 /* We use char because int might match the return type of a gcc2
11293     builtin and then its argument prototype would still apply.  */
11294 char $ac_func();
11295 char (*f)();
11296
11297 int main() {
11298
11299 /* The GNU C library defines this for functions which it implements
11300     to always fail with ENOSYS.  Some functions are actually named
11301     something starting with __ and the normal name is an alias.  */
11302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11303 choke me
11304 #else
11305 f = $ac_func;
11306 #endif
11307
11308 ; return 0; }
11309 EOF
11310 if { (eval echo configure:11311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11311   rm -rf conftest*
11312   eval "ac_cv_func_$ac_func=yes"
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   eval "ac_cv_func_$ac_func=no"
11318 fi
11319 rm -f conftest*
11320 fi
11321
11322 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11323   echo "$ac_t""yes" 1>&6
11324     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11325   cat >> confdefs.h <<EOF
11326 #define $ac_tr_func 1
11327 EOF
11328  
11329 else
11330   echo "$ac_t""no" 1>&6
11331 fi
11332 done
11333
11334
11335                         if test $ac_cv_func_sched_yield = no -a \
11336                                 $ac_cv_func_pthread_yield = no ; then
11337                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
11338 echo "configure:11339: checking for sched_yield in -lrt" >&5
11339 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
11340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11341   echo $ac_n "(cached) $ac_c" 1>&6
11342 else
11343   ac_save_LIBS="$LIBS"
11344 LIBS="-lrt  $LIBS"
11345 cat > conftest.$ac_ext <<EOF
11346 #line 11347 "configure"
11347 #include "confdefs.h"
11348 /* Override any gcc2 internal prototype to avoid an error.  */
11349 /* We use char because int might match the return type of a gcc2
11350     builtin and then its argument prototype would still apply.  */
11351 char sched_yield();
11352
11353 int main() {
11354 sched_yield()
11355 ; return 0; }
11356 EOF
11357 if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11358   rm -rf conftest*
11359   eval "ac_cv_lib_$ac_lib_var=yes"
11360 else
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -rf conftest*
11364   eval "ac_cv_lib_$ac_lib_var=no"
11365 fi
11366 rm -f conftest*
11367 LIBS="$ac_save_LIBS"
11368
11369 fi
11370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11371   echo "$ac_t""yes" 1>&6
11372   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
11373                                         cat >> confdefs.h <<\EOF
11374 #define HAVE_SCHED_YIELD 1
11375 EOF
11376
11377                                         ac_cv_func_sched_yield=yes
11378 else
11379   echo "$ac_t""no" 1>&6
11380 ac_cv_func_sched_yield=no
11381 fi
11382
11383                         fi
11384                         if test $ac_cv_func_sched_yield = no -a \
11385                                 $ac_cv_func_pthread_yield = no ; then
11386                                                                                                 for ac_func in thr_yield
11387 do
11388 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11389 echo "configure:11390: checking for $ac_func" >&5
11390 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11391   echo $ac_n "(cached) $ac_c" 1>&6
11392 else
11393   cat > conftest.$ac_ext <<EOF
11394 #line 11395 "configure"
11395 #include "confdefs.h"
11396 /* System header to define __stub macros and hopefully few prototypes,
11397     which can conflict with char $ac_func(); below.  */
11398 #include <assert.h>
11399 /* Override any gcc2 internal prototype to avoid an error.  */
11400 /* We use char because int might match the return type of a gcc2
11401     builtin and then its argument prototype would still apply.  */
11402 char $ac_func();
11403 char (*f)();
11404
11405 int main() {
11406
11407 /* The GNU C library defines this for functions which it implements
11408     to always fail with ENOSYS.  Some functions are actually named
11409     something starting with __ and the normal name is an alias.  */
11410 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11411 choke me
11412 #else
11413 f = $ac_func;
11414 #endif
11415
11416 ; return 0; }
11417 EOF
11418 if { (eval echo configure:11419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11419   rm -rf conftest*
11420   eval "ac_cv_func_$ac_func=yes"
11421 else
11422   echo "configure: failed program was:" >&5
11423   cat conftest.$ac_ext >&5
11424   rm -rf conftest*
11425   eval "ac_cv_func_$ac_func=no"
11426 fi
11427 rm -f conftest*
11428 fi
11429
11430 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11431   echo "$ac_t""yes" 1>&6
11432     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11433   cat >> confdefs.h <<EOF
11434 #define $ac_tr_func 1
11435 EOF
11436  
11437 else
11438   echo "$ac_t""no" 1>&6
11439 fi
11440 done
11441
11442                         fi
11443                         if test $ac_cv_func_sched_yield = no -a \
11444                                 $ac_cv_func_pthread_yield = no -a \
11445                                 "$ac_cv_func_thr_yield" = no ; then
11446                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
11447                         fi
11448
11449                                                 for ac_func in pthread_kill pthread_rwlock_destroy
11450 do
11451 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11452 echo "configure:11453: checking for $ac_func" >&5
11453 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11454   echo $ac_n "(cached) $ac_c" 1>&6
11455 else
11456   cat > conftest.$ac_ext <<EOF
11457 #line 11458 "configure"
11458 #include "confdefs.h"
11459 /* System header to define __stub macros and hopefully few prototypes,
11460     which can conflict with char $ac_func(); below.  */
11461 #include <assert.h>
11462 /* Override any gcc2 internal prototype to avoid an error.  */
11463 /* We use char because int might match the return type of a gcc2
11464     builtin and then its argument prototype would still apply.  */
11465 char $ac_func();
11466 char (*f)();
11467
11468 int main() {
11469
11470 /* The GNU C library defines this for functions which it implements
11471     to always fail with ENOSYS.  Some functions are actually named
11472     something starting with __ and the normal name is an alias.  */
11473 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11474 choke me
11475 #else
11476 f = $ac_func;
11477 #endif
11478
11479 ; return 0; }
11480 EOF
11481 if { (eval echo configure:11482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11482   rm -rf conftest*
11483   eval "ac_cv_func_$ac_func=yes"
11484 else
11485   echo "configure: failed program was:" >&5
11486   cat conftest.$ac_ext >&5
11487   rm -rf conftest*
11488   eval "ac_cv_func_$ac_func=no"
11489 fi
11490 rm -f conftest*
11491 fi
11492
11493 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11494   echo "$ac_t""yes" 1>&6
11495     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11496   cat >> confdefs.h <<EOF
11497 #define $ac_tr_func 1
11498 EOF
11499  
11500 else
11501   echo "$ac_t""no" 1>&6
11502 fi
11503 done
11504
11505
11506                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
11507 echo "configure:11508: checking for pthread_detach with <pthread.h>" >&5
11508 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
11509   echo $ac_n "(cached) $ac_c" 1>&6
11510 else
11511   
11512                                                                 cat > conftest.$ac_ext <<EOF
11513 #line 11514 "configure"
11514 #include "confdefs.h"
11515
11516 #include <pthread.h>
11517 #ifndef NULL
11518 #define NULL (void*)0
11519 #endif
11520
11521 int main() {
11522 pthread_detach(NULL);
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11526   rm -rf conftest*
11527   ol_cv_func_pthread_detach=yes
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   ol_cv_func_pthread_detach=no
11533 fi
11534 rm -f conftest*
11535                         
11536 fi
11537
11538 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
11539
11540                         if test $ol_cv_func_pthread_detach = no ; then
11541                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
11542                         fi
11543
11544                         cat >> confdefs.h <<\EOF
11545 #define HAVE_PTHREAD_DETACH 1
11546 EOF
11547
11548
11549                                                 for ac_func in \
11550                                 pthread_setconcurrency \
11551                                 pthread_getconcurrency \
11552                                 thr_setconcurrency \
11553                                 thr_getconcurrency \
11554                         
11555 do
11556 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11557 echo "configure:11558: checking for $ac_func" >&5
11558 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11559   echo $ac_n "(cached) $ac_c" 1>&6
11560 else
11561   cat > conftest.$ac_ext <<EOF
11562 #line 11563 "configure"
11563 #include "confdefs.h"
11564 /* System header to define __stub macros and hopefully few prototypes,
11565     which can conflict with char $ac_func(); below.  */
11566 #include <assert.h>
11567 /* Override any gcc2 internal prototype to avoid an error.  */
11568 /* We use char because int might match the return type of a gcc2
11569     builtin and then its argument prototype would still apply.  */
11570 char $ac_func();
11571 char (*f)();
11572
11573 int main() {
11574
11575 /* The GNU C library defines this for functions which it implements
11576     to always fail with ENOSYS.  Some functions are actually named
11577     something starting with __ and the normal name is an alias.  */
11578 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11579 choke me
11580 #else
11581 f = $ac_func;
11582 #endif
11583
11584 ; return 0; }
11585 EOF
11586 if { (eval echo configure:11587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11587   rm -rf conftest*
11588   eval "ac_cv_func_$ac_func=yes"
11589 else
11590   echo "configure: failed program was:" >&5
11591   cat conftest.$ac_ext >&5
11592   rm -rf conftest*
11593   eval "ac_cv_func_$ac_func=no"
11594 fi
11595 rm -f conftest*
11596 fi
11597
11598 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11599   echo "$ac_t""yes" 1>&6
11600     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11601   cat >> confdefs.h <<EOF
11602 #define $ac_tr_func 1
11603 EOF
11604  
11605 else
11606   echo "$ac_t""no" 1>&6
11607 fi
11608 done
11609
11610
11611                         
11612         for ac_func in pthread_kill_other_threads_np
11613 do
11614 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11615 echo "configure:11616: checking for $ac_func" >&5
11616 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11617   echo $ac_n "(cached) $ac_c" 1>&6
11618 else
11619   cat > conftest.$ac_ext <<EOF
11620 #line 11621 "configure"
11621 #include "confdefs.h"
11622 /* System header to define __stub macros and hopefully few prototypes,
11623     which can conflict with char $ac_func(); below.  */
11624 #include <assert.h>
11625 /* Override any gcc2 internal prototype to avoid an error.  */
11626 /* We use char because int might match the return type of a gcc2
11627     builtin and then its argument prototype would still apply.  */
11628 char $ac_func();
11629 char (*f)();
11630
11631 int main() {
11632
11633 /* The GNU C library defines this for functions which it implements
11634     to always fail with ENOSYS.  Some functions are actually named
11635     something starting with __ and the normal name is an alias.  */
11636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11637 choke me
11638 #else
11639 f = $ac_func;
11640 #endif
11641
11642 ; return 0; }
11643 EOF
11644 if { (eval echo configure:11645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11645   rm -rf conftest*
11646   eval "ac_cv_func_$ac_func=yes"
11647 else
11648   echo "configure: failed program was:" >&5
11649   cat conftest.$ac_ext >&5
11650   rm -rf conftest*
11651   eval "ac_cv_func_$ac_func=no"
11652 fi
11653 rm -f conftest*
11654 fi
11655
11656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11657   echo "$ac_t""yes" 1>&6
11658     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11659   cat >> confdefs.h <<EOF
11660 #define $ac_tr_func 1
11661 EOF
11662  
11663 else
11664   echo "$ac_t""no" 1>&6
11665 fi
11666 done
11667
11668         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
11669 echo "configure:11670: checking for LinuxThreads implementation" >&5
11670 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
11671   echo $ac_n "(cached) $ac_c" 1>&6
11672 else
11673   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
11674 fi
11675
11676 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
11677
11678                         
11679         
11680         
11681         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
11682 echo "configure:11683: checking for LinuxThreads consistency" >&5
11683 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
11684   echo $ac_n "(cached) $ac_c" 1>&6
11685 else
11686   
11687                 if test $ol_cv_header_linux_threads = yes -a \
11688                         $ol_cv_sys_linux_threads = yes; then
11689                         ol_cv_linux_threads=yes
11690                 elif test $ol_cv_header_linux_threads = no -a \
11691                         $ol_cv_sys_linux_threads = no; then
11692                         ol_cv_linux_threads=no
11693                 else
11694                         ol_cv_linux_threads=error
11695                 fi
11696         
11697 fi
11698
11699 echo "$ac_t""$ol_cv_linux_threads" 1>&6
11700
11701
11702                         if test $ol_cv_linux_threads = error; then
11703                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
11704                         fi
11705
11706                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
11707 echo "configure:11708: checking if pthread_create() works" >&5
11708 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
11709   echo $ac_n "(cached) $ac_c" 1>&6
11710 else
11711   
11712                         if test "$cross_compiling" = yes; then
11713                                 ol_cv_pthread_create_works=yes
11714 else
11715   cat > conftest.$ac_ext <<EOF
11716 #line 11717 "configure"
11717 #include "confdefs.h"
11718 /* pthread test headers */
11719 #include <pthread.h>
11720 #ifndef NULL
11721 #define NULL (void*)0
11722 #endif
11723
11724 static void *task(p)
11725         void *p;
11726 {
11727         return (void *) (p == NULL);
11728 }
11729
11730
11731 int main(argc, argv)
11732         int argc;
11733         char **argv;
11734 {
11735
11736         /* pthread test function */
11737         pthread_t t;
11738         int status;
11739         int detach = 1;
11740
11741 #ifdef HAVE_PTHREADS_FINAL
11742         /* Final pthreads */
11743         pthread_attr_t attr;
11744
11745         status = pthread_attr_init(&attr);
11746         if( status ) return status;
11747
11748 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11749         if( !detach ) {
11750 #if defined( PTHREAD_CREATE_JOINABLE )
11751                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11752 #else
11753                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11754 #endif
11755
11756 #ifdef PTHREAD_CREATE_DETACHED
11757         } else {
11758                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11759 #endif
11760         }
11761         if( status ) return status;
11762 #endif
11763
11764         status = pthread_create( &t, &attr, task, NULL );
11765         if( status ) return status;
11766
11767 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11768         if( detach ) {
11769                 /* give thread a chance to complete */
11770                 /* it should remain joinable and hence detachable */
11771                 sleep( 1 );
11772
11773                 status = pthread_detach( t );
11774                 if( status ) return status;
11775         }
11776 #endif
11777
11778 #else
11779         /* Draft 4 pthreads */
11780         status = pthread_create( &t, pthread_attr_default, task, NULL );
11781         if( status ) return status;
11782
11783         if( detach ) {
11784                 /* give thread a chance to complete */
11785                 /* it should remain joinable and hence detachable */
11786                 sleep( 1 );
11787
11788                 status = pthread_detach( &t );
11789                 if( status ) return status;
11790         }
11791 #endif
11792
11793 #ifdef HAVE_LINUX_THREADS
11794         pthread_kill_other_threads_np();
11795 #endif
11796
11797         return 0;
11798
11799 }
11800
11801 EOF
11802 if { (eval echo configure:11803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11803 then
11804   ol_cv_pthread_create_works=yes
11805 else
11806   echo "configure: failed program was:" >&5
11807   cat conftest.$ac_ext >&5
11808   rm -fr conftest*
11809   ol_cv_pthread_create_works=no
11810 fi
11811 rm -fr conftest*
11812 fi
11813
11814 fi
11815
11816 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
11817
11818                         if test $ol_cv_pthread_create_works = no ; then
11819                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
11820                         fi
11821
11822                                                 if test $ol_with_yielding_select = auto ; then
11823                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
11824 echo "configure:11825: checking if select yields when using pthreads" >&5
11825 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
11826   echo $ac_n "(cached) $ac_c" 1>&6
11827 else
11828   
11829                                 if test "$cross_compiling" = yes; then
11830   ol_cv_pthread_select_yields=cross
11831 else
11832   cat > conftest.$ac_ext <<EOF
11833 #line 11834 "configure"
11834 #include "confdefs.h"
11835
11836 #include <sys/types.h>
11837 #include <sys/time.h>
11838 #include <unistd.h>
11839 #include <pthread.h>
11840 #ifndef NULL
11841 #define NULL (void*) 0
11842 #endif
11843
11844 static int fildes[2];
11845
11846 static void *task(p)
11847         void *p;
11848 {
11849         int i;
11850         struct timeval tv;
11851
11852         fd_set rfds;
11853
11854         tv.tv_sec=10;
11855         tv.tv_usec=0;
11856
11857         FD_ZERO(&rfds);
11858         FD_SET(fildes[0], &rfds);
11859
11860         /* we're not interested in any fds */
11861         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
11862
11863         if(i < 0) {
11864                 perror("select");
11865                 exit(10);
11866         }
11867
11868         exit(0); /* if we exit here, the select blocked the whole process */
11869 }
11870
11871 int main(argc, argv)
11872         int argc;
11873         char **argv;
11874 {
11875         pthread_t t;
11876
11877         /* create a pipe to select */
11878         if(pipe(&fildes[0])) {
11879                 perror("select");
11880                 exit(1);
11881         }
11882
11883 #ifdef HAVE_PTHREAD_SETCONCURRENCY
11884         (void) pthread_setconcurrency(2);
11885 #else
11886 #ifdef HAVE_THR_SETCONCURRENCY
11887         /* Set Solaris LWP concurrency to 2 */
11888         thr_setconcurrency(2);
11889 #endif
11890 #endif
11891
11892 #if HAVE_PTHREADS_D4
11893         pthread_create(&t, pthread_attr_default, task, NULL);
11894 #else
11895         pthread_create(&t, NULL, task, NULL);
11896 #endif
11897
11898 #if HAVE_SCHED_YIELD
11899         sched_yield();  /* make sure task runs first */
11900 #else
11901 #ifdef HAVE_PTHREAD_YIELD
11902         pthread_yield();        /* make sure task runs first */
11903 #endif
11904 #endif
11905
11906         exit(2);
11907 }
11908 EOF
11909 if { (eval echo configure:11910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11910 then
11911   ol_cv_pthread_select_yields=no
11912 else
11913   echo "configure: failed program was:" >&5
11914   cat conftest.$ac_ext >&5
11915   rm -fr conftest*
11916   ol_cv_pthread_select_yields=yes
11917 fi
11918 rm -fr conftest*
11919 fi
11920
11921 fi
11922
11923 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
11924
11925                                 if test $ol_cv_pthread_select_yields = cross ; then
11926                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
11927                                 fi
11928
11929                                 if test $ol_cv_pthread_select_yields = yes ; then
11930                                         ol_with_yielding_select=yes
11931                                 fi
11932                         fi
11933
11934                                                 CPPFLAGS="$save_CPPFLAGS"
11935                         LIBS="$save_LIBS"
11936                 else
11937                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
11938                 fi
11939         fi
11940
11941         if test $ol_with_threads = posix ; then
11942                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
11943         fi
11944 fi
11945
11946 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11947         -o $ol_with_threads = mach ; then
11948
11949                 for ac_hdr in mach/cthreads.h cthread.h
11950 do
11951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11953 echo "configure:11954: checking for $ac_hdr" >&5
11954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11955   echo $ac_n "(cached) $ac_c" 1>&6
11956 else
11957   cat > conftest.$ac_ext <<EOF
11958 #line 11959 "configure"
11959 #include "confdefs.h"
11960 #include <$ac_hdr>
11961 EOF
11962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11963 { (eval echo configure:11964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11965 if test -z "$ac_err"; then
11966   rm -rf conftest*
11967   eval "ac_cv_header_$ac_safe=yes"
11968 else
11969   echo "$ac_err" >&5
11970   echo "configure: failed program was:" >&5
11971   cat conftest.$ac_ext >&5
11972   rm -rf conftest*
11973   eval "ac_cv_header_$ac_safe=no"
11974 fi
11975 rm -f conftest*
11976 fi
11977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11978   echo "$ac_t""yes" 1>&6
11979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11980   cat >> confdefs.h <<EOF
11981 #define $ac_tr_hdr 1
11982 EOF
11983  
11984 else
11985   echo "$ac_t""no" 1>&6
11986 fi
11987 done
11988
11989         if test $ac_cv_header_mach_cthreads_h = yes ; then
11990                 ol_with_threads=found
11991
11992                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
11993 echo "configure:11994: checking for cthread_fork" >&5
11994 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
11995   echo $ac_n "(cached) $ac_c" 1>&6
11996 else
11997   cat > conftest.$ac_ext <<EOF
11998 #line 11999 "configure"
11999 #include "confdefs.h"
12000 /* System header to define __stub macros and hopefully few prototypes,
12001     which can conflict with char cthread_fork(); below.  */
12002 #include <assert.h>
12003 /* Override any gcc2 internal prototype to avoid an error.  */
12004 /* We use char because int might match the return type of a gcc2
12005     builtin and then its argument prototype would still apply.  */
12006 char cthread_fork();
12007 char (*f)();
12008
12009 int main() {
12010
12011 /* The GNU C library defines this for functions which it implements
12012     to always fail with ENOSYS.  Some functions are actually named
12013     something starting with __ and the normal name is an alias.  */
12014 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
12015 choke me
12016 #else
12017 f = cthread_fork;
12018 #endif
12019
12020 ; return 0; }
12021 EOF
12022 if { (eval echo configure:12023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12023   rm -rf conftest*
12024   eval "ac_cv_func_cthread_fork=yes"
12025 else
12026   echo "configure: failed program was:" >&5
12027   cat conftest.$ac_ext >&5
12028   rm -rf conftest*
12029   eval "ac_cv_func_cthread_fork=no"
12030 fi
12031 rm -f conftest*
12032 fi
12033
12034 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
12035   echo "$ac_t""yes" 1>&6
12036   ol_link_threads=yes
12037 else
12038   echo "$ac_t""no" 1>&6
12039 fi
12040
12041
12042                 if test $ol_link_threads = no ; then
12043                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
12044 echo "configure:12045: checking for cthread_fork with -all_load" >&5
12045 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
12046   echo $ac_n "(cached) $ac_c" 1>&6
12047 else
12048   
12049                                                                 save_LIBS="$LIBS"
12050                                 LIBS="-all_load $LIBS"
12051                                 cat > conftest.$ac_ext <<EOF
12052 #line 12053 "configure"
12053 #include "confdefs.h"
12054 #include <mach/cthreads.h>
12055 int main() {
12056
12057                                         cthread_fork((void *)0, (void *)0);
12058                                         
12059 ; return 0; }
12060 EOF
12061 if { (eval echo configure:12062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12062   rm -rf conftest*
12063   ol_cv_cthread_all_load=yes
12064 else
12065   echo "configure: failed program was:" >&5
12066   cat conftest.$ac_ext >&5
12067   rm -rf conftest*
12068   ol_cv_cthread_all_load=no
12069 fi
12070 rm -f conftest*
12071                                                                 LIBS="$save_LIBS"
12072                         
12073 fi
12074
12075 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
12076
12077                         if test $ol_cv_cthread_all_load = yes ; then
12078                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
12079                                 ol_link_threads=mach
12080                         fi
12081                 fi
12082
12083     elif test $ac_cv_header_cthreads_h = yes ; then
12084                                 
12085                 ol_with_threads=found
12086  
12087                                 save_LIBS="$LIBS"
12088                 LIBS="$LIBS -lthreads"
12089                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
12090 echo "configure:12091: checking for cthread_fork" >&5
12091 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
12092   echo $ac_n "(cached) $ac_c" 1>&6
12093 else
12094   cat > conftest.$ac_ext <<EOF
12095 #line 12096 "configure"
12096 #include "confdefs.h"
12097 /* System header to define __stub macros and hopefully few prototypes,
12098     which can conflict with char cthread_fork(); below.  */
12099 #include <assert.h>
12100 /* Override any gcc2 internal prototype to avoid an error.  */
12101 /* We use char because int might match the return type of a gcc2
12102     builtin and then its argument prototype would still apply.  */
12103 char cthread_fork();
12104 char (*f)();
12105
12106 int main() {
12107
12108 /* The GNU C library defines this for functions which it implements
12109     to always fail with ENOSYS.  Some functions are actually named
12110     something starting with __ and the normal name is an alias.  */
12111 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
12112 choke me
12113 #else
12114 f = cthread_fork;
12115 #endif
12116
12117 ; return 0; }
12118 EOF
12119 if { (eval echo configure:12120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12120   rm -rf conftest*
12121   eval "ac_cv_func_cthread_fork=yes"
12122 else
12123   echo "configure: failed program was:" >&5
12124   cat conftest.$ac_ext >&5
12125   rm -rf conftest*
12126   eval "ac_cv_func_cthread_fork=no"
12127 fi
12128 rm -f conftest*
12129 fi
12130
12131 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
12132   echo "$ac_t""yes" 1>&6
12133   ol_link_threads=yes
12134 else
12135   echo "$ac_t""no" 1>&6
12136 fi
12137
12138                 LIBS="$save_LIBS"
12139
12140                 if test $ol_link_threads = yes ; then
12141                         LTHREAD_LIBS="-lthreads"
12142                         ol_link_threads=mach
12143                 else
12144                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
12145                 fi
12146
12147         elif test $ol_with_threads = mach ; then
12148                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
12149         fi
12150
12151         if test $ol_link_threads = mach ; then
12152                 cat >> confdefs.h <<\EOF
12153 #define HAVE_MACH_CTHREADS 1
12154 EOF
12155
12156         elif test $ol_with_threads = found ; then
12157                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
12158         fi
12159 fi
12160
12161 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12162         -o $ol_with_threads = pth ; then
12163
12164         for ac_hdr in pth.h
12165 do
12166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12168 echo "configure:12169: checking for $ac_hdr" >&5
12169 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12170   echo $ac_n "(cached) $ac_c" 1>&6
12171 else
12172   cat > conftest.$ac_ext <<EOF
12173 #line 12174 "configure"
12174 #include "confdefs.h"
12175 #include <$ac_hdr>
12176 EOF
12177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12178 { (eval echo configure:12179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12180 if test -z "$ac_err"; then
12181   rm -rf conftest*
12182   eval "ac_cv_header_$ac_safe=yes"
12183 else
12184   echo "$ac_err" >&5
12185   echo "configure: failed program was:" >&5
12186   cat conftest.$ac_ext >&5
12187   rm -rf conftest*
12188   eval "ac_cv_header_$ac_safe=no"
12189 fi
12190 rm -f conftest*
12191 fi
12192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12193   echo "$ac_t""yes" 1>&6
12194     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12195   cat >> confdefs.h <<EOF
12196 #define $ac_tr_hdr 1
12197 EOF
12198  
12199 else
12200   echo "$ac_t""no" 1>&6
12201 fi
12202 done
12203
12204
12205         if test $ac_cv_header_pth_h = yes ; then
12206                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
12207 echo "configure:12208: checking for pth_version in -lpth" >&5
12208 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
12209 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12210   echo $ac_n "(cached) $ac_c" 1>&6
12211 else
12212   ac_save_LIBS="$LIBS"
12213 LIBS="-lpth  $LIBS"
12214 cat > conftest.$ac_ext <<EOF
12215 #line 12216 "configure"
12216 #include "confdefs.h"
12217 /* Override any gcc2 internal prototype to avoid an error.  */
12218 /* We use char because int might match the return type of a gcc2
12219     builtin and then its argument prototype would still apply.  */
12220 char pth_version();
12221
12222 int main() {
12223 pth_version()
12224 ; return 0; }
12225 EOF
12226 if { (eval echo configure:12227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12227   rm -rf conftest*
12228   eval "ac_cv_lib_$ac_lib_var=yes"
12229 else
12230   echo "configure: failed program was:" >&5
12231   cat conftest.$ac_ext >&5
12232   rm -rf conftest*
12233   eval "ac_cv_lib_$ac_lib_var=no"
12234 fi
12235 rm -f conftest*
12236 LIBS="$ac_save_LIBS"
12237
12238 fi
12239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12240   echo "$ac_t""yes" 1>&6
12241   have_pth=yes
12242 else
12243   echo "$ac_t""no" 1>&6
12244 have_pth=no
12245 fi
12246
12247
12248                 if test $have_pth = yes ; then
12249                         cat >> confdefs.h <<\EOF
12250 #define HAVE_GNU_PTH 1
12251 EOF
12252
12253                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
12254                         ol_link_threads=pth
12255
12256                         if test $ol_with_yielding_select = auto ; then
12257                                 ol_with_yielding_select=yes
12258                         fi
12259                 fi
12260         fi
12261 fi
12262
12263 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12264         -o $ol_with_threads = lwp ; then
12265
12266                 for ac_hdr in thread.h synch.h
12267 do
12268 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12269 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12270 echo "configure:12271: checking for $ac_hdr" >&5
12271 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12272   echo $ac_n "(cached) $ac_c" 1>&6
12273 else
12274   cat > conftest.$ac_ext <<EOF
12275 #line 12276 "configure"
12276 #include "confdefs.h"
12277 #include <$ac_hdr>
12278 EOF
12279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12280 { (eval echo configure:12281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12282 if test -z "$ac_err"; then
12283   rm -rf conftest*
12284   eval "ac_cv_header_$ac_safe=yes"
12285 else
12286   echo "$ac_err" >&5
12287   echo "configure: failed program was:" >&5
12288   cat conftest.$ac_ext >&5
12289   rm -rf conftest*
12290   eval "ac_cv_header_$ac_safe=no"
12291 fi
12292 rm -f conftest*
12293 fi
12294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12295   echo "$ac_t""yes" 1>&6
12296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12297   cat >> confdefs.h <<EOF
12298 #define $ac_tr_hdr 1
12299 EOF
12300  
12301 else
12302   echo "$ac_t""no" 1>&6
12303 fi
12304 done
12305
12306         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
12307                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
12308 echo "configure:12309: checking for thr_create in -lthread" >&5
12309 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
12310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12311   echo $ac_n "(cached) $ac_c" 1>&6
12312 else
12313   ac_save_LIBS="$LIBS"
12314 LIBS="-lthread  $LIBS"
12315 cat > conftest.$ac_ext <<EOF
12316 #line 12317 "configure"
12317 #include "confdefs.h"
12318 /* Override any gcc2 internal prototype to avoid an error.  */
12319 /* We use char because int might match the return type of a gcc2
12320     builtin and then its argument prototype would still apply.  */
12321 char thr_create();
12322
12323 int main() {
12324 thr_create()
12325 ; return 0; }
12326 EOF
12327 if { (eval echo configure:12328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12328   rm -rf conftest*
12329   eval "ac_cv_lib_$ac_lib_var=yes"
12330 else
12331   echo "configure: failed program was:" >&5
12332   cat conftest.$ac_ext >&5
12333   rm -rf conftest*
12334   eval "ac_cv_lib_$ac_lib_var=no"
12335 fi
12336 rm -f conftest*
12337 LIBS="$ac_save_LIBS"
12338
12339 fi
12340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12341   echo "$ac_t""yes" 1>&6
12342   have_thr=yes
12343 else
12344   echo "$ac_t""no" 1>&6
12345 have_thr=no
12346 fi
12347
12348
12349                 if test $have_thr = yes ; then
12350                         cat >> confdefs.h <<\EOF
12351 #define HAVE_THR 1
12352 EOF
12353
12354                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
12355                         ol_link_threads=thr
12356
12357                         if test $ol_with_yielding_select = auto ; then
12358                                 ol_with_yielding_select=yes
12359                         fi
12360
12361                                                 for ac_func in \
12362                                 thr_setconcurrency \
12363                                 thr_getconcurrency \
12364                         
12365 do
12366 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12367 echo "configure:12368: checking for $ac_func" >&5
12368 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12369   echo $ac_n "(cached) $ac_c" 1>&6
12370 else
12371   cat > conftest.$ac_ext <<EOF
12372 #line 12373 "configure"
12373 #include "confdefs.h"
12374 /* System header to define __stub macros and hopefully few prototypes,
12375     which can conflict with char $ac_func(); below.  */
12376 #include <assert.h>
12377 /* Override any gcc2 internal prototype to avoid an error.  */
12378 /* We use char because int might match the return type of a gcc2
12379     builtin and then its argument prototype would still apply.  */
12380 char $ac_func();
12381 char (*f)();
12382
12383 int main() {
12384
12385 /* The GNU C library defines this for functions which it implements
12386     to always fail with ENOSYS.  Some functions are actually named
12387     something starting with __ and the normal name is an alias.  */
12388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12389 choke me
12390 #else
12391 f = $ac_func;
12392 #endif
12393
12394 ; return 0; }
12395 EOF
12396 if { (eval echo configure:12397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12397   rm -rf conftest*
12398   eval "ac_cv_func_$ac_func=yes"
12399 else
12400   echo "configure: failed program was:" >&5
12401   cat conftest.$ac_ext >&5
12402   rm -rf conftest*
12403   eval "ac_cv_func_$ac_func=no"
12404 fi
12405 rm -f conftest*
12406 fi
12407
12408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12409   echo "$ac_t""yes" 1>&6
12410     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12411   cat >> confdefs.h <<EOF
12412 #define $ac_tr_func 1
12413 EOF
12414  
12415 else
12416   echo "$ac_t""no" 1>&6
12417 fi
12418 done
12419
12420                 fi
12421         fi
12422
12423                 for ac_hdr in lwp/lwp.h
12424 do
12425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12427 echo "configure:12428: checking for $ac_hdr" >&5
12428 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12429   echo $ac_n "(cached) $ac_c" 1>&6
12430 else
12431   cat > conftest.$ac_ext <<EOF
12432 #line 12433 "configure"
12433 #include "confdefs.h"
12434 #include <$ac_hdr>
12435 EOF
12436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12437 { (eval echo configure:12438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12439 if test -z "$ac_err"; then
12440   rm -rf conftest*
12441   eval "ac_cv_header_$ac_safe=yes"
12442 else
12443   echo "$ac_err" >&5
12444   echo "configure: failed program was:" >&5
12445   cat conftest.$ac_ext >&5
12446   rm -rf conftest*
12447   eval "ac_cv_header_$ac_safe=no"
12448 fi
12449 rm -f conftest*
12450 fi
12451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12452   echo "$ac_t""yes" 1>&6
12453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12454   cat >> confdefs.h <<EOF
12455 #define $ac_tr_hdr 1
12456 EOF
12457  
12458 else
12459   echo "$ac_t""no" 1>&6
12460 fi
12461 done
12462
12463         if test $ac_cv_header_lwp_lwp_h = yes ; then
12464                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
12465 echo "configure:12466: checking for lwp_create in -llwp" >&5
12466 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
12467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12468   echo $ac_n "(cached) $ac_c" 1>&6
12469 else
12470   ac_save_LIBS="$LIBS"
12471 LIBS="-llwp  $LIBS"
12472 cat > conftest.$ac_ext <<EOF
12473 #line 12474 "configure"
12474 #include "confdefs.h"
12475 /* Override any gcc2 internal prototype to avoid an error.  */
12476 /* We use char because int might match the return type of a gcc2
12477     builtin and then its argument prototype would still apply.  */
12478 char lwp_create();
12479
12480 int main() {
12481 lwp_create()
12482 ; return 0; }
12483 EOF
12484 if { (eval echo configure:12485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12485   rm -rf conftest*
12486   eval "ac_cv_lib_$ac_lib_var=yes"
12487 else
12488   echo "configure: failed program was:" >&5
12489   cat conftest.$ac_ext >&5
12490   rm -rf conftest*
12491   eval "ac_cv_lib_$ac_lib_var=no"
12492 fi
12493 rm -f conftest*
12494 LIBS="$ac_save_LIBS"
12495
12496 fi
12497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12498   echo "$ac_t""yes" 1>&6
12499   have_lwp=yes
12500 else
12501   echo "$ac_t""no" 1>&6
12502 have_lwp=no
12503 fi
12504
12505
12506                 if test $have_lwp = yes ; then
12507                         cat >> confdefs.h <<\EOF
12508 #define HAVE_LWP 1
12509 EOF
12510
12511                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
12512                         ol_link_threads=lwp
12513
12514                         if test $ol_with_yielding_select = auto ; then
12515                                 ol_with_yielding_select=no
12516                         fi
12517                 fi
12518         fi
12519 fi
12520
12521 if test $ol_with_yielding_select = yes ; then
12522         cat >> confdefs.h <<\EOF
12523 #define HAVE_YIELDING_SELECT 1
12524 EOF
12525
12526 fi
12527
12528 if test $ol_with_threads = manual ; then
12529                 ol_link_threads=yes
12530
12531         echo "configure: warning: thread defines and link options must be set manually" 1>&2
12532
12533         for ac_hdr in pthread.h sched.h
12534 do
12535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12537 echo "configure:12538: checking for $ac_hdr" >&5
12538 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12539   echo $ac_n "(cached) $ac_c" 1>&6
12540 else
12541   cat > conftest.$ac_ext <<EOF
12542 #line 12543 "configure"
12543 #include "confdefs.h"
12544 #include <$ac_hdr>
12545 EOF
12546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12547 { (eval echo configure:12548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12549 if test -z "$ac_err"; then
12550   rm -rf conftest*
12551   eval "ac_cv_header_$ac_safe=yes"
12552 else
12553   echo "$ac_err" >&5
12554   echo "configure: failed program was:" >&5
12555   cat conftest.$ac_ext >&5
12556   rm -rf conftest*
12557   eval "ac_cv_header_$ac_safe=no"
12558 fi
12559 rm -f conftest*
12560 fi
12561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12562   echo "$ac_t""yes" 1>&6
12563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12564   cat >> confdefs.h <<EOF
12565 #define $ac_tr_hdr 1
12566 EOF
12567  
12568 else
12569   echo "$ac_t""no" 1>&6
12570 fi
12571 done
12572
12573         for ac_func in sched_yield pthread_yield
12574 do
12575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12576 echo "configure:12577: checking for $ac_func" >&5
12577 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12578   echo $ac_n "(cached) $ac_c" 1>&6
12579 else
12580   cat > conftest.$ac_ext <<EOF
12581 #line 12582 "configure"
12582 #include "confdefs.h"
12583 /* System header to define __stub macros and hopefully few prototypes,
12584     which can conflict with char $ac_func(); below.  */
12585 #include <assert.h>
12586 /* Override any gcc2 internal prototype to avoid an error.  */
12587 /* We use char because int might match the return type of a gcc2
12588     builtin and then its argument prototype would still apply.  */
12589 char $ac_func();
12590 char (*f)();
12591
12592 int main() {
12593
12594 /* The GNU C library defines this for functions which it implements
12595     to always fail with ENOSYS.  Some functions are actually named
12596     something starting with __ and the normal name is an alias.  */
12597 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12598 choke me
12599 #else
12600 f = $ac_func;
12601 #endif
12602
12603 ; return 0; }
12604 EOF
12605 if { (eval echo configure:12606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12606   rm -rf conftest*
12607   eval "ac_cv_func_$ac_func=yes"
12608 else
12609   echo "configure: failed program was:" >&5
12610   cat conftest.$ac_ext >&5
12611   rm -rf conftest*
12612   eval "ac_cv_func_$ac_func=no"
12613 fi
12614 rm -f conftest*
12615 fi
12616
12617 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12618   echo "$ac_t""yes" 1>&6
12619     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12620   cat >> confdefs.h <<EOF
12621 #define $ac_tr_func 1
12622 EOF
12623  
12624 else
12625   echo "$ac_t""no" 1>&6
12626 fi
12627 done
12628
12629         
12630         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
12631 echo "configure:12632: checking for LinuxThreads pthread.h" >&5
12632 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
12633   echo $ac_n "(cached) $ac_c" 1>&6
12634 else
12635   cat > conftest.$ac_ext <<EOF
12636 #line 12637 "configure"
12637 #include "confdefs.h"
12638 #include <pthread.h>
12639 EOF
12640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12641   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
12642   rm -rf conftest*
12643   ol_cv_header_linux_threads=yes
12644 else
12645   rm -rf conftest*
12646   ol_cv_header_linux_threads=no
12647 fi
12648 rm -f conftest*
12649
12650                 
12651 fi
12652
12653 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12654         if test $ol_cv_header_linux_threads = yes; then
12655                 cat >> confdefs.h <<\EOF
12656 #define HAVE_LINUX_THREADS 1
12657 EOF
12658
12659         fi
12660
12661
12662         for ac_hdr in mach/cthreads.h
12663 do
12664 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12665 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12666 echo "configure:12667: checking for $ac_hdr" >&5
12667 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12668   echo $ac_n "(cached) $ac_c" 1>&6
12669 else
12670   cat > conftest.$ac_ext <<EOF
12671 #line 12672 "configure"
12672 #include "confdefs.h"
12673 #include <$ac_hdr>
12674 EOF
12675 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12676 { (eval echo configure:12677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12677 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12678 if test -z "$ac_err"; then
12679   rm -rf conftest*
12680   eval "ac_cv_header_$ac_safe=yes"
12681 else
12682   echo "$ac_err" >&5
12683   echo "configure: failed program was:" >&5
12684   cat conftest.$ac_ext >&5
12685   rm -rf conftest*
12686   eval "ac_cv_header_$ac_safe=no"
12687 fi
12688 rm -f conftest*
12689 fi
12690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12691   echo "$ac_t""yes" 1>&6
12692     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12693   cat >> confdefs.h <<EOF
12694 #define $ac_tr_hdr 1
12695 EOF
12696  
12697 else
12698   echo "$ac_t""no" 1>&6
12699 fi
12700 done
12701
12702         for ac_hdr in lwp/lwp.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         for ac_hdr in thread.h synch.h
12743 do
12744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12746 echo "configure:12747: checking for $ac_hdr" >&5
12747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12748   echo $ac_n "(cached) $ac_c" 1>&6
12749 else
12750   cat > conftest.$ac_ext <<EOF
12751 #line 12752 "configure"
12752 #include "confdefs.h"
12753 #include <$ac_hdr>
12754 EOF
12755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12756 { (eval echo configure:12757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12758 if test -z "$ac_err"; then
12759   rm -rf conftest*
12760   eval "ac_cv_header_$ac_safe=yes"
12761 else
12762   echo "$ac_err" >&5
12763   echo "configure: failed program was:" >&5
12764   cat conftest.$ac_ext >&5
12765   rm -rf conftest*
12766   eval "ac_cv_header_$ac_safe=no"
12767 fi
12768 rm -f conftest*
12769 fi
12770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12771   echo "$ac_t""yes" 1>&6
12772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12773   cat >> confdefs.h <<EOF
12774 #define $ac_tr_hdr 1
12775 EOF
12776  
12777 else
12778   echo "$ac_t""no" 1>&6
12779 fi
12780 done
12781
12782 fi
12783
12784 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
12785                         cat >> confdefs.h <<\EOF
12786 #define REENTRANT 1
12787 EOF
12788
12789         cat >> confdefs.h <<\EOF
12790 #define _REENTRANT 1
12791 EOF
12792
12793         cat >> confdefs.h <<\EOF
12794 #define THREAD_SAFE 1
12795 EOF
12796
12797         cat >> confdefs.h <<\EOF
12798 #define _THREAD_SAFE 1
12799 EOF
12800
12801         cat >> confdefs.h <<\EOF
12802 #define THREADSAFE 1
12803 EOF
12804
12805         cat >> confdefs.h <<\EOF
12806 #define _THREADSAFE 1
12807 EOF
12808
12809         cat >> confdefs.h <<\EOF
12810 #define _SGI_MP_SOURCE 1
12811 EOF
12812
12813
12814                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
12815 echo "configure:12816: checking for thread specific errno" >&5
12816 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
12817   echo $ac_n "(cached) $ac_c" 1>&6
12818 else
12819   
12820                 cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823 #include <errno.h>
12824 int main() {
12825 errno = 0;
12826 ; return 0; }
12827 EOF
12828 if { (eval echo configure:12829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12829   rm -rf conftest*
12830   ol_cv_errno_thread_specific=yes
12831 else
12832   echo "configure: failed program was:" >&5
12833   cat conftest.$ac_ext >&5
12834   rm -rf conftest*
12835   ol_cv_errno_thread_specific=no
12836 fi
12837 rm -f conftest*
12838         
12839 fi
12840
12841 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
12842
12843                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
12844 echo "configure:12845: checking for thread specific h_errno" >&5
12845 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
12846   echo $ac_n "(cached) $ac_c" 1>&6
12847 else
12848   
12849                 cat > conftest.$ac_ext <<EOF
12850 #line 12851 "configure"
12851 #include "confdefs.h"
12852 #include <netdb.h>
12853 int main() {
12854 h_errno = 0;
12855 ; return 0; }
12856 EOF
12857 if { (eval echo configure:12858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12858   rm -rf conftest*
12859   ol_cv_h_errno_thread_specific=yes
12860 else
12861   echo "configure: failed program was:" >&5
12862   cat conftest.$ac_ext >&5
12863   rm -rf conftest*
12864   ol_cv_h_errno_thread_specific=no
12865 fi
12866 rm -f conftest*
12867         
12868 fi
12869
12870 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
12871
12872         if test $ol_cv_errno_thread_specific != yes \
12873                 -o $ol_cv_h_errno_thread_specific != yes ; then
12874                 LIBS="$LTHREAD_LIBS $LIBS"
12875                 LTHREAD_LIBS=""
12876         fi
12877
12878 fi  
12879
12880 if test $ol_link_threads = no ; then
12881         if test $ol_with_threads = yes ; then
12882                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
12883         fi
12884
12885         if test $ol_with_threads = auto ; then
12886                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
12887                 ol_with_threads=no
12888         fi
12889
12890         cat >> confdefs.h <<\EOF
12891 #define NO_THREADS 1
12892 EOF
12893
12894         LTHREAD_LIBS=""
12895 fi
12896
12897 if test $ol_link_threads != no ; then
12898         cat >> confdefs.h <<\EOF
12899 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
12900 EOF
12901
12902 fi
12903
12904 ol_link_ldbm=no 
12905
12906 if test $ol_with_ldbm_api = auto \
12907         -o $ol_with_ldbm_api = berkeley \
12908         -o $ol_with_ldbm_api = bcompat ; then
12909
12910         if test $ol_with_ldbm_api = bcompat; then \
12911                 ol_cv_berkeley_db=no
12912 for ac_hdr in db_185.h db.h
12913 do
12914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12916 echo "configure:12917: checking for $ac_hdr" >&5
12917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12918   echo $ac_n "(cached) $ac_c" 1>&6
12919 else
12920   cat > conftest.$ac_ext <<EOF
12921 #line 12922 "configure"
12922 #include "confdefs.h"
12923 #include <$ac_hdr>
12924 EOF
12925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12926 { (eval echo configure:12927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12928 if test -z "$ac_err"; then
12929   rm -rf conftest*
12930   eval "ac_cv_header_$ac_safe=yes"
12931 else
12932   echo "$ac_err" >&5
12933   echo "configure: failed program was:" >&5
12934   cat conftest.$ac_ext >&5
12935   rm -rf conftest*
12936   eval "ac_cv_header_$ac_safe=no"
12937 fi
12938 rm -f conftest*
12939 fi
12940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12941   echo "$ac_t""yes" 1>&6
12942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12943   cat >> confdefs.h <<EOF
12944 #define $ac_tr_hdr 1
12945 EOF
12946  
12947 else
12948   echo "$ac_t""no" 1>&6
12949 fi
12950 done
12951
12952 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
12953         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
12954 echo "configure:12955: checking if Berkeley DB header compatibility" >&5
12955 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
12956   echo $ac_n "(cached) $ac_c" 1>&6
12957 else
12958   
12959                 cat > conftest.$ac_ext <<EOF
12960 #line 12961 "configure"
12961 #include "confdefs.h"
12962
12963 #if HAVE_DB_185_H
12964 #       include <db_185.h>
12965 #else
12966 #       include <db.h>
12967 #endif
12968
12969  /* this check could be improved */
12970 #ifndef DB_VERSION_MAJOR
12971 #       define DB_VERSION_MAJOR 1
12972 #endif
12973
12974 #if DB_VERSION_MAJOR == 1 
12975         __db_version_1
12976 #endif
12977
12978 EOF
12979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12980   egrep "__db_version_1" >/dev/null 2>&1; then
12981   rm -rf conftest*
12982   ol_cv_header_db1=yes
12983 else
12984   rm -rf conftest*
12985   ol_cv_header_db1=no
12986 fi
12987 rm -f conftest*
12988
12989 fi
12990
12991 echo "$ac_t""$ol_cv_header_db1" 1>&6
12992
12993         if test $ol_cv_header_db1 = yes ; then
12994                 ol_cv_lib_db=no
12995 if test $ol_cv_lib_db = no ; then
12996         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12997 echo "configure:12998: checking for Berkeley DB link (default)" >&5
12998 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12999   echo $ac_n "(cached) $ac_c" 1>&6
13000 else
13001   
13002         ol_DB_LIB=
13003         ol_LIBS=$LIBS
13004         LIBS="$ol_DB_LIB $LIBS"
13005
13006         cat > conftest.$ac_ext <<EOF
13007 #line 13008 "configure"
13008 #include "confdefs.h"
13009
13010 #ifdef HAVE_DB_185_H
13011 # include <db_185.h>
13012 #else
13013 # include <db.h>
13014 #endif
13015
13016 #ifndef DB_VERSION_MAJOR
13017 # define DB_VERSION_MAJOR 1
13018 #endif
13019
13020 #ifndef NULL
13021 #define NULL ((void*)0)
13022 #endif
13023
13024 int main() {
13025
13026 #if DB_VERSION_MAJOR > 1
13027         {
13028                 char *version;
13029                 int major, minor, patch;
13030
13031                 version = db_version( &major, &minor, &patch );
13032
13033                 if( major != DB_VERSION_MAJOR ||
13034                         minor < DB_VERSION_MINOR )
13035                 {
13036                         printf("Berkeley DB version mismatch\n"
13037                                 "\texpected: %s\n\tgot: %s\n",
13038                                 DB_VERSION_STRING, version);
13039                         return 1;
13040                 }
13041         }
13042 #endif
13043
13044 #if DB_VERSION_MAJOR > 2
13045         db_env_create( NULL, 0 );
13046 #elif DB_VERSION_MAJOR > 1
13047         db_appexit( NULL );
13048 #else
13049         (void) dbopen( NULL, 0, 0, 0, NULL);
13050 #endif
13051
13052 ; return 0; }
13053 EOF
13054 if { (eval echo configure:13055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13055   rm -rf conftest*
13056   ol_cv_db_none=yes
13057 else
13058   echo "configure: failed program was:" >&5
13059   cat conftest.$ac_ext >&5
13060   rm -rf conftest*
13061   ol_cv_db_none=no
13062 fi
13063 rm -f conftest*
13064
13065         LIBS="$ol_LIBS"
13066
13067 fi
13068
13069 echo "$ac_t""$ol_cv_db_none" 1>&6
13070
13071         if test $ol_cv_db_none = yes ; then
13072                 ol_cv_lib_db=yes
13073         fi
13074 fi
13075
13076 if test $ol_cv_lib_db = no ; then
13077         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13078 echo "configure:13079: checking for Berkeley DB link (-ldb)" >&5
13079 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13080   echo $ac_n "(cached) $ac_c" 1>&6
13081 else
13082   
13083         ol_DB_LIB=-ldb
13084         ol_LIBS=$LIBS
13085         LIBS="$ol_DB_LIB $LIBS"
13086
13087         cat > conftest.$ac_ext <<EOF
13088 #line 13089 "configure"
13089 #include "confdefs.h"
13090
13091 #ifdef HAVE_DB_185_H
13092 # include <db_185.h>
13093 #else
13094 # include <db.h>
13095 #endif
13096
13097 #ifndef DB_VERSION_MAJOR
13098 # define DB_VERSION_MAJOR 1
13099 #endif
13100
13101 #ifndef NULL
13102 #define NULL ((void*)0)
13103 #endif
13104
13105 int main() {
13106
13107 #if DB_VERSION_MAJOR > 1
13108         {
13109                 char *version;
13110                 int major, minor, patch;
13111
13112                 version = db_version( &major, &minor, &patch );
13113
13114                 if( major != DB_VERSION_MAJOR ||
13115                         minor < DB_VERSION_MINOR )
13116                 {
13117                         printf("Berkeley DB version mismatch\n"
13118                                 "\texpected: %s\n\tgot: %s\n",
13119                                 DB_VERSION_STRING, version);
13120                         return 1;
13121                 }
13122         }
13123 #endif
13124
13125 #if DB_VERSION_MAJOR > 2
13126         db_env_create( NULL, 0 );
13127 #elif DB_VERSION_MAJOR > 1
13128         db_appexit( NULL );
13129 #else
13130         (void) dbopen( NULL, 0, 0, 0, NULL);
13131 #endif
13132
13133 ; return 0; }
13134 EOF
13135 if { (eval echo configure:13136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13136   rm -rf conftest*
13137   ol_cv_db_db=yes
13138 else
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -rf conftest*
13142   ol_cv_db_db=no
13143 fi
13144 rm -f conftest*
13145
13146         LIBS="$ol_LIBS"
13147
13148 fi
13149
13150 echo "$ac_t""$ol_cv_db_db" 1>&6
13151
13152         if test $ol_cv_db_db = yes ; then
13153                 ol_cv_lib_db=-ldb
13154         fi
13155 fi
13156
13157 if test $ol_cv_lib_db = no ; then
13158         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13159 echo "configure:13160: checking for Berkeley DB link (-ldb3)" >&5
13160 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13161   echo $ac_n "(cached) $ac_c" 1>&6
13162 else
13163   
13164         ol_DB_LIB=-ldb3
13165         ol_LIBS=$LIBS
13166         LIBS="$ol_DB_LIB $LIBS"
13167
13168         cat > conftest.$ac_ext <<EOF
13169 #line 13170 "configure"
13170 #include "confdefs.h"
13171
13172 #ifdef HAVE_DB_185_H
13173 # include <db_185.h>
13174 #else
13175 # include <db.h>
13176 #endif
13177
13178 #ifndef DB_VERSION_MAJOR
13179 # define DB_VERSION_MAJOR 1
13180 #endif
13181
13182 #ifndef NULL
13183 #define NULL ((void*)0)
13184 #endif
13185
13186 int main() {
13187
13188 #if DB_VERSION_MAJOR > 1
13189         {
13190                 char *version;
13191                 int major, minor, patch;
13192
13193                 version = db_version( &major, &minor, &patch );
13194
13195                 if( major != DB_VERSION_MAJOR ||
13196                         minor < DB_VERSION_MINOR )
13197                 {
13198                         printf("Berkeley DB version mismatch\n"
13199                                 "\texpected: %s\n\tgot: %s\n",
13200                                 DB_VERSION_STRING, version);
13201                         return 1;
13202                 }
13203         }
13204 #endif
13205
13206 #if DB_VERSION_MAJOR > 2
13207         db_env_create( NULL, 0 );
13208 #elif DB_VERSION_MAJOR > 1
13209         db_appexit( NULL );
13210 #else
13211         (void) dbopen( NULL, 0, 0, 0, NULL);
13212 #endif
13213
13214 ; return 0; }
13215 EOF
13216 if { (eval echo configure:13217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13217   rm -rf conftest*
13218   ol_cv_db_db3=yes
13219 else
13220   echo "configure: failed program was:" >&5
13221   cat conftest.$ac_ext >&5
13222   rm -rf conftest*
13223   ol_cv_db_db3=no
13224 fi
13225 rm -f conftest*
13226
13227         LIBS="$ol_LIBS"
13228
13229 fi
13230
13231 echo "$ac_t""$ol_cv_db_db3" 1>&6
13232
13233         if test $ol_cv_db_db3 = yes ; then
13234                 ol_cv_lib_db=-ldb3
13235         fi
13236 fi
13237
13238 if test $ol_cv_lib_db = no ; then
13239         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13240 echo "configure:13241: checking for Berkeley DB link (-ldb2)" >&5
13241 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13242   echo $ac_n "(cached) $ac_c" 1>&6
13243 else
13244   
13245         ol_DB_LIB=-ldb2
13246         ol_LIBS=$LIBS
13247         LIBS="$ol_DB_LIB $LIBS"
13248
13249         cat > conftest.$ac_ext <<EOF
13250 #line 13251 "configure"
13251 #include "confdefs.h"
13252
13253 #ifdef HAVE_DB_185_H
13254 # include <db_185.h>
13255 #else
13256 # include <db.h>
13257 #endif
13258
13259 #ifndef DB_VERSION_MAJOR
13260 # define DB_VERSION_MAJOR 1
13261 #endif
13262
13263 #ifndef NULL
13264 #define NULL ((void*)0)
13265 #endif
13266
13267 int main() {
13268
13269 #if DB_VERSION_MAJOR > 1
13270         {
13271                 char *version;
13272                 int major, minor, patch;
13273
13274                 version = db_version( &major, &minor, &patch );
13275
13276                 if( major != DB_VERSION_MAJOR ||
13277                         minor < DB_VERSION_MINOR )
13278                 {
13279                         printf("Berkeley DB version mismatch\n"
13280                                 "\texpected: %s\n\tgot: %s\n",
13281                                 DB_VERSION_STRING, version);
13282                         return 1;
13283                 }
13284         }
13285 #endif
13286
13287 #if DB_VERSION_MAJOR > 2
13288         db_env_create( NULL, 0 );
13289 #elif DB_VERSION_MAJOR > 1
13290         db_appexit( NULL );
13291 #else
13292         (void) dbopen( NULL, 0, 0, 0, NULL);
13293 #endif
13294
13295 ; return 0; }
13296 EOF
13297 if { (eval echo configure:13298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13298   rm -rf conftest*
13299   ol_cv_db_db2=yes
13300 else
13301   echo "configure: failed program was:" >&5
13302   cat conftest.$ac_ext >&5
13303   rm -rf conftest*
13304   ol_cv_db_db2=no
13305 fi
13306 rm -f conftest*
13307
13308         LIBS="$ol_LIBS"
13309
13310 fi
13311
13312 echo "$ac_t""$ol_cv_db_db2" 1>&6
13313
13314         if test $ol_cv_db_db2 = yes ; then
13315                 ol_cv_lib_db=-ldb2
13316         fi
13317 fi
13318
13319 if test $ol_cv_lib_db = no ; then
13320         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13321 echo "configure:13322: checking for Berkeley DB link (-ldb1)" >&5
13322 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13323   echo $ac_n "(cached) $ac_c" 1>&6
13324 else
13325   
13326         ol_DB_LIB=-ldb1
13327         ol_LIBS=$LIBS
13328         LIBS="$ol_DB_LIB $LIBS"
13329
13330         cat > conftest.$ac_ext <<EOF
13331 #line 13332 "configure"
13332 #include "confdefs.h"
13333
13334 #ifdef HAVE_DB_185_H
13335 # include <db_185.h>
13336 #else
13337 # include <db.h>
13338 #endif
13339
13340 #ifndef DB_VERSION_MAJOR
13341 # define DB_VERSION_MAJOR 1
13342 #endif
13343
13344 #ifndef NULL
13345 #define NULL ((void*)0)
13346 #endif
13347
13348 int main() {
13349
13350 #if DB_VERSION_MAJOR > 1
13351         {
13352                 char *version;
13353                 int major, minor, patch;
13354
13355                 version = db_version( &major, &minor, &patch );
13356
13357                 if( major != DB_VERSION_MAJOR ||
13358                         minor < DB_VERSION_MINOR )
13359                 {
13360                         printf("Berkeley DB version mismatch\n"
13361                                 "\texpected: %s\n\tgot: %s\n",
13362                                 DB_VERSION_STRING, version);
13363                         return 1;
13364                 }
13365         }
13366 #endif
13367
13368 #if DB_VERSION_MAJOR > 2
13369         db_env_create( NULL, 0 );
13370 #elif DB_VERSION_MAJOR > 1
13371         db_appexit( NULL );
13372 #else
13373         (void) dbopen( NULL, 0, 0, 0, NULL);
13374 #endif
13375
13376 ; return 0; }
13377 EOF
13378 if { (eval echo configure:13379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13379   rm -rf conftest*
13380   ol_cv_db_db1=yes
13381 else
13382   echo "configure: failed program was:" >&5
13383   cat conftest.$ac_ext >&5
13384   rm -rf conftest*
13385   ol_cv_db_db1=no
13386 fi
13387 rm -f conftest*
13388
13389         LIBS="$ol_LIBS"
13390
13391 fi
13392
13393 echo "$ac_t""$ol_cv_db_db1" 1>&6
13394
13395         if test $ol_cv_db_db1 = yes ; then
13396                 ol_cv_lib_db=-ldb1
13397         fi
13398 fi
13399
13400
13401                 if test "$ol_cv_lib_db" != no ; then
13402                         ol_cv_berkeley_db=yes
13403                 fi
13404         fi
13405 fi
13406
13407         else
13408                 ol_cv_berkeley_db=no
13409 for ac_hdr in db.h
13410 do
13411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13413 echo "configure:13414: checking for $ac_hdr" >&5
13414 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13415   echo $ac_n "(cached) $ac_c" 1>&6
13416 else
13417   cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420 #include <$ac_hdr>
13421 EOF
13422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13423 { (eval echo configure:13424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13425 if test -z "$ac_err"; then
13426   rm -rf conftest*
13427   eval "ac_cv_header_$ac_safe=yes"
13428 else
13429   echo "$ac_err" >&5
13430   echo "configure: failed program was:" >&5
13431   cat conftest.$ac_ext >&5
13432   rm -rf conftest*
13433   eval "ac_cv_header_$ac_safe=no"
13434 fi
13435 rm -f conftest*
13436 fi
13437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13438   echo "$ac_t""yes" 1>&6
13439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13440   cat >> confdefs.h <<EOF
13441 #define $ac_tr_hdr 1
13442 EOF
13443  
13444 else
13445   echo "$ac_t""no" 1>&6
13446 fi
13447 done
13448
13449 if test $ac_cv_header_db_h = yes; then
13450         ol_cv_lib_db=no
13451 if test $ol_cv_lib_db = no ; then
13452         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
13453 echo "configure:13454: checking for Berkeley DB link (default)" >&5
13454 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
13455   echo $ac_n "(cached) $ac_c" 1>&6
13456 else
13457   
13458         ol_DB_LIB=
13459         ol_LIBS=$LIBS
13460         LIBS="$ol_DB_LIB $LIBS"
13461
13462         cat > conftest.$ac_ext <<EOF
13463 #line 13464 "configure"
13464 #include "confdefs.h"
13465
13466 #ifdef HAVE_DB_185_H
13467 # include <db_185.h>
13468 #else
13469 # include <db.h>
13470 #endif
13471
13472 #ifndef DB_VERSION_MAJOR
13473 # define DB_VERSION_MAJOR 1
13474 #endif
13475
13476 #ifndef NULL
13477 #define NULL ((void*)0)
13478 #endif
13479
13480 int main() {
13481
13482 #if DB_VERSION_MAJOR > 1
13483         {
13484                 char *version;
13485                 int major, minor, patch;
13486
13487                 version = db_version( &major, &minor, &patch );
13488
13489                 if( major != DB_VERSION_MAJOR ||
13490                         minor < DB_VERSION_MINOR )
13491                 {
13492                         printf("Berkeley DB version mismatch\n"
13493                                 "\texpected: %s\n\tgot: %s\n",
13494                                 DB_VERSION_STRING, version);
13495                         return 1;
13496                 }
13497         }
13498 #endif
13499
13500 #if DB_VERSION_MAJOR > 2
13501         db_env_create( NULL, 0 );
13502 #elif DB_VERSION_MAJOR > 1
13503         db_appexit( NULL );
13504 #else
13505         (void) dbopen( NULL, 0, 0, 0, NULL);
13506 #endif
13507
13508 ; return 0; }
13509 EOF
13510 if { (eval echo configure:13511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13511   rm -rf conftest*
13512   ol_cv_db_none=yes
13513 else
13514   echo "configure: failed program was:" >&5
13515   cat conftest.$ac_ext >&5
13516   rm -rf conftest*
13517   ol_cv_db_none=no
13518 fi
13519 rm -f conftest*
13520
13521         LIBS="$ol_LIBS"
13522
13523 fi
13524
13525 echo "$ac_t""$ol_cv_db_none" 1>&6
13526
13527         if test $ol_cv_db_none = yes ; then
13528                 ol_cv_lib_db=yes
13529         fi
13530 fi
13531
13532 if test $ol_cv_lib_db = no ; then
13533         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13534 echo "configure:13535: checking for Berkeley DB link (-ldb)" >&5
13535 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13536   echo $ac_n "(cached) $ac_c" 1>&6
13537 else
13538   
13539         ol_DB_LIB=-ldb
13540         ol_LIBS=$LIBS
13541         LIBS="$ol_DB_LIB $LIBS"
13542
13543         cat > conftest.$ac_ext <<EOF
13544 #line 13545 "configure"
13545 #include "confdefs.h"
13546
13547 #ifdef HAVE_DB_185_H
13548 # include <db_185.h>
13549 #else
13550 # include <db.h>
13551 #endif
13552
13553 #ifndef DB_VERSION_MAJOR
13554 # define DB_VERSION_MAJOR 1
13555 #endif
13556
13557 #ifndef NULL
13558 #define NULL ((void*)0)
13559 #endif
13560
13561 int main() {
13562
13563 #if DB_VERSION_MAJOR > 1
13564         {
13565                 char *version;
13566                 int major, minor, patch;
13567
13568                 version = db_version( &major, &minor, &patch );
13569
13570                 if( major != DB_VERSION_MAJOR ||
13571                         minor < DB_VERSION_MINOR )
13572                 {
13573                         printf("Berkeley DB version mismatch\n"
13574                                 "\texpected: %s\n\tgot: %s\n",
13575                                 DB_VERSION_STRING, version);
13576                         return 1;
13577                 }
13578         }
13579 #endif
13580
13581 #if DB_VERSION_MAJOR > 2
13582         db_env_create( NULL, 0 );
13583 #elif DB_VERSION_MAJOR > 1
13584         db_appexit( NULL );
13585 #else
13586         (void) dbopen( NULL, 0, 0, 0, NULL);
13587 #endif
13588
13589 ; return 0; }
13590 EOF
13591 if { (eval echo configure:13592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13592   rm -rf conftest*
13593   ol_cv_db_db=yes
13594 else
13595   echo "configure: failed program was:" >&5
13596   cat conftest.$ac_ext >&5
13597   rm -rf conftest*
13598   ol_cv_db_db=no
13599 fi
13600 rm -f conftest*
13601
13602         LIBS="$ol_LIBS"
13603
13604 fi
13605
13606 echo "$ac_t""$ol_cv_db_db" 1>&6
13607
13608         if test $ol_cv_db_db = yes ; then
13609                 ol_cv_lib_db=-ldb
13610         fi
13611 fi
13612
13613 if test $ol_cv_lib_db = no ; then
13614         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13615 echo "configure:13616: checking for Berkeley DB link (-ldb3)" >&5
13616 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13617   echo $ac_n "(cached) $ac_c" 1>&6
13618 else
13619   
13620         ol_DB_LIB=-ldb3
13621         ol_LIBS=$LIBS
13622         LIBS="$ol_DB_LIB $LIBS"
13623
13624         cat > conftest.$ac_ext <<EOF
13625 #line 13626 "configure"
13626 #include "confdefs.h"
13627
13628 #ifdef HAVE_DB_185_H
13629 # include <db_185.h>
13630 #else
13631 # include <db.h>
13632 #endif
13633
13634 #ifndef DB_VERSION_MAJOR
13635 # define DB_VERSION_MAJOR 1
13636 #endif
13637
13638 #ifndef NULL
13639 #define NULL ((void*)0)
13640 #endif
13641
13642 int main() {
13643
13644 #if DB_VERSION_MAJOR > 1
13645         {
13646                 char *version;
13647                 int major, minor, patch;
13648
13649                 version = db_version( &major, &minor, &patch );
13650
13651                 if( major != DB_VERSION_MAJOR ||
13652                         minor < DB_VERSION_MINOR )
13653                 {
13654                         printf("Berkeley DB version mismatch\n"
13655                                 "\texpected: %s\n\tgot: %s\n",
13656                                 DB_VERSION_STRING, version);
13657                         return 1;
13658                 }
13659         }
13660 #endif
13661
13662 #if DB_VERSION_MAJOR > 2
13663         db_env_create( NULL, 0 );
13664 #elif DB_VERSION_MAJOR > 1
13665         db_appexit( NULL );
13666 #else
13667         (void) dbopen( NULL, 0, 0, 0, NULL);
13668 #endif
13669
13670 ; return 0; }
13671 EOF
13672 if { (eval echo configure:13673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13673   rm -rf conftest*
13674   ol_cv_db_db3=yes
13675 else
13676   echo "configure: failed program was:" >&5
13677   cat conftest.$ac_ext >&5
13678   rm -rf conftest*
13679   ol_cv_db_db3=no
13680 fi
13681 rm -f conftest*
13682
13683         LIBS="$ol_LIBS"
13684
13685 fi
13686
13687 echo "$ac_t""$ol_cv_db_db3" 1>&6
13688
13689         if test $ol_cv_db_db3 = yes ; then
13690                 ol_cv_lib_db=-ldb3
13691         fi
13692 fi
13693
13694 if test $ol_cv_lib_db = no ; then
13695         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13696 echo "configure:13697: checking for Berkeley DB link (-ldb2)" >&5
13697 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13698   echo $ac_n "(cached) $ac_c" 1>&6
13699 else
13700   
13701         ol_DB_LIB=-ldb2
13702         ol_LIBS=$LIBS
13703         LIBS="$ol_DB_LIB $LIBS"
13704
13705         cat > conftest.$ac_ext <<EOF
13706 #line 13707 "configure"
13707 #include "confdefs.h"
13708
13709 #ifdef HAVE_DB_185_H
13710 # include <db_185.h>
13711 #else
13712 # include <db.h>
13713 #endif
13714
13715 #ifndef DB_VERSION_MAJOR
13716 # define DB_VERSION_MAJOR 1
13717 #endif
13718
13719 #ifndef NULL
13720 #define NULL ((void*)0)
13721 #endif
13722
13723 int main() {
13724
13725 #if DB_VERSION_MAJOR > 1
13726         {
13727                 char *version;
13728                 int major, minor, patch;
13729
13730                 version = db_version( &major, &minor, &patch );
13731
13732                 if( major != DB_VERSION_MAJOR ||
13733                         minor < DB_VERSION_MINOR )
13734                 {
13735                         printf("Berkeley DB version mismatch\n"
13736                                 "\texpected: %s\n\tgot: %s\n",
13737                                 DB_VERSION_STRING, version);
13738                         return 1;
13739                 }
13740         }
13741 #endif
13742
13743 #if DB_VERSION_MAJOR > 2
13744         db_env_create( NULL, 0 );
13745 #elif DB_VERSION_MAJOR > 1
13746         db_appexit( NULL );
13747 #else
13748         (void) dbopen( NULL, 0, 0, 0, NULL);
13749 #endif
13750
13751 ; return 0; }
13752 EOF
13753 if { (eval echo configure:13754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13754   rm -rf conftest*
13755   ol_cv_db_db2=yes
13756 else
13757   echo "configure: failed program was:" >&5
13758   cat conftest.$ac_ext >&5
13759   rm -rf conftest*
13760   ol_cv_db_db2=no
13761 fi
13762 rm -f conftest*
13763
13764         LIBS="$ol_LIBS"
13765
13766 fi
13767
13768 echo "$ac_t""$ol_cv_db_db2" 1>&6
13769
13770         if test $ol_cv_db_db2 = yes ; then
13771                 ol_cv_lib_db=-ldb2
13772         fi
13773 fi
13774
13775 if test $ol_cv_lib_db = no ; then
13776         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13777 echo "configure:13778: checking for Berkeley DB link (-ldb1)" >&5
13778 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13779   echo $ac_n "(cached) $ac_c" 1>&6
13780 else
13781   
13782         ol_DB_LIB=-ldb1
13783         ol_LIBS=$LIBS
13784         LIBS="$ol_DB_LIB $LIBS"
13785
13786         cat > conftest.$ac_ext <<EOF
13787 #line 13788 "configure"
13788 #include "confdefs.h"
13789
13790 #ifdef HAVE_DB_185_H
13791 # include <db_185.h>
13792 #else
13793 # include <db.h>
13794 #endif
13795
13796 #ifndef DB_VERSION_MAJOR
13797 # define DB_VERSION_MAJOR 1
13798 #endif
13799
13800 #ifndef NULL
13801 #define NULL ((void*)0)
13802 #endif
13803
13804 int main() {
13805
13806 #if DB_VERSION_MAJOR > 1
13807         {
13808                 char *version;
13809                 int major, minor, patch;
13810
13811                 version = db_version( &major, &minor, &patch );
13812
13813                 if( major != DB_VERSION_MAJOR ||
13814                         minor < DB_VERSION_MINOR )
13815                 {
13816                         printf("Berkeley DB version mismatch\n"
13817                                 "\texpected: %s\n\tgot: %s\n",
13818                                 DB_VERSION_STRING, version);
13819                         return 1;
13820                 }
13821         }
13822 #endif
13823
13824 #if DB_VERSION_MAJOR > 2
13825         db_env_create( NULL, 0 );
13826 #elif DB_VERSION_MAJOR > 1
13827         db_appexit( NULL );
13828 #else
13829         (void) dbopen( NULL, 0, 0, 0, NULL);
13830 #endif
13831
13832 ; return 0; }
13833 EOF
13834 if { (eval echo configure:13835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13835   rm -rf conftest*
13836   ol_cv_db_db1=yes
13837 else
13838   echo "configure: failed program was:" >&5
13839   cat conftest.$ac_ext >&5
13840   rm -rf conftest*
13841   ol_cv_db_db1=no
13842 fi
13843 rm -f conftest*
13844
13845         LIBS="$ol_LIBS"
13846
13847 fi
13848
13849 echo "$ac_t""$ol_cv_db_db1" 1>&6
13850
13851         if test $ol_cv_db_db1 = yes ; then
13852                 ol_cv_lib_db=-ldb1
13853         fi
13854 fi
13855
13856
13857         if test "$ol_cv_lib_db" != no ; then
13858                 ol_cv_berkeley_db=yes
13859                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
13860 echo "configure:13861: checking for Berkeley DB thread support" >&5
13861 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
13862   echo $ac_n "(cached) $ac_c" 1>&6
13863 else
13864   
13865         ol_LIBS="$LIBS"
13866         if test $ol_cv_lib_db != yes ; then
13867                 LIBS="$ol_cv_lib_db"
13868         fi
13869
13870         if test "$cross_compiling" = yes; then
13871   ol_cv_berkeley_db_thread=cross
13872 else
13873   cat > conftest.$ac_ext <<EOF
13874 #line 13875 "configure"
13875 #include "confdefs.h"
13876
13877 #ifdef HAVE_DB_185_H
13878         choke me;
13879 #else
13880 #include <db.h>
13881 #endif
13882 #ifndef NULL
13883 #define NULL ((void *)0)
13884 #endif
13885 main()
13886 {
13887         int rc;
13888         u_int32_t flags = DB_CREATE |
13889 #ifdef DB_PRIVATE
13890                 DB_PRIVATE |
13891 #endif
13892                 DB_THREAD;
13893
13894 #if DB_VERSION_MAJOR > 2
13895         DB_ENV *env = NULL;
13896
13897         rc = db_env_create( &env, 0 );
13898
13899         flags |= DB_INIT_MPOOL;
13900 #ifdef DB_MPOOL_PRIVATE
13901         flags |= DB_MPOOL_PRIVATE;
13902 #endif
13903
13904         if( rc ) {
13905                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13906                 return rc;
13907         }
13908
13909 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
13910         rc = env->open( env, NULL, flags, 0 );
13911 #else
13912         rc = env->open( env, NULL, NULL, flags, 0 );
13913 #endif
13914
13915         if ( rc == 0 ) {
13916                 rc = env->close( env, 0 );
13917         }
13918
13919         if( rc ) {
13920                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13921                 return rc;
13922         }
13923
13924 #else
13925         DB_ENV env;
13926         memset( &env, '\0', sizeof(env) );
13927
13928         rc = db_appinit( NULL, NULL, &env, flags );
13929
13930         if( rc == 0 ) {
13931                 db_appexit( &env );
13932         }
13933
13934         unlink("__db_mpool.share");
13935         unlink("__db_lock.share");
13936 #endif
13937
13938         return rc;
13939 }
13940 EOF
13941 if { (eval echo configure:13942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13942 then
13943   ol_cv_berkeley_db_thread=yes
13944 else
13945   echo "configure: failed program was:" >&5
13946   cat conftest.$ac_ext >&5
13947   rm -fr conftest*
13948   ol_cv_berkeley_db_thread=no
13949 fi
13950 rm -fr conftest*
13951 fi
13952
13953
13954         LIBS="$ol_LIBS"
13955
13956         if test $ol_cv_berkeley_db_thread != no ; then
13957                 cat >> confdefs.h <<\EOF
13958 #define HAVE_BERKELEY_DB_THREAD 1
13959 EOF
13960
13961         fi
13962
13963 fi
13964
13965 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
13966         fi
13967 fi
13968
13969         fi
13970
13971         if test $ol_cv_berkeley_db != no ; then
13972                 cat >> confdefs.h <<\EOF
13973 #define HAVE_BERKELEY_DB 1
13974 EOF
13975
13976
13977                 ol_link_ldbm=berkeley
13978                 ol_with_ldbm_api=berkeley
13979
13980                 if test $ol_with_ldbm_type = hash ; then
13981                         cat >> confdefs.h <<\EOF
13982 #define LDBM_USE_DBHASH 1
13983 EOF
13984
13985                 else
13986                         cat >> confdefs.h <<\EOF
13987 #define LDBM_USE_DBBTREE 1
13988 EOF
13989
13990                 fi
13991
13992                                                 if test $ol_cv_lib_db != yes ; then
13993                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
13994                 fi
13995         fi
13996 fi
13997
13998 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
13999         { echo "configure: error: BerkeleyDB not availabl" 1>&2; exit 1; }
14000 elif test $ol_enable_bdb != no -a $ol_link_ldbm != no ; then
14001         ol_enable_bdb=yes
14002 fi
14003
14004 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
14005         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
14006         ol_with_ldbm_api=none
14007 fi
14008
14009 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
14010         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
14011 echo "configure:14012: checking for MDBM library" >&5
14012 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
14013   echo $ac_n "(cached) $ac_c" 1>&6
14014 else
14015         ol_LIBS="$LIBS"
14016         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
14017 echo "configure:14018: checking for mdbm_set_chain" >&5
14018 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
14019   echo $ac_n "(cached) $ac_c" 1>&6
14020 else
14021   cat > conftest.$ac_ext <<EOF
14022 #line 14023 "configure"
14023 #include "confdefs.h"
14024 /* System header to define __stub macros and hopefully few prototypes,
14025     which can conflict with char mdbm_set_chain(); below.  */
14026 #include <assert.h>
14027 /* Override any gcc2 internal prototype to avoid an error.  */
14028 /* We use char because int might match the return type of a gcc2
14029     builtin and then its argument prototype would still apply.  */
14030 char mdbm_set_chain();
14031 char (*f)();
14032
14033 int main() {
14034
14035 /* The GNU C library defines this for functions which it implements
14036     to always fail with ENOSYS.  Some functions are actually named
14037     something starting with __ and the normal name is an alias.  */
14038 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
14039 choke me
14040 #else
14041 f = mdbm_set_chain;
14042 #endif
14043
14044 ; return 0; }
14045 EOF
14046 if { (eval echo configure:14047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14047   rm -rf conftest*
14048   eval "ac_cv_func_mdbm_set_chain=yes"
14049 else
14050   echo "configure: failed program was:" >&5
14051   cat conftest.$ac_ext >&5
14052   rm -rf conftest*
14053   eval "ac_cv_func_mdbm_set_chain=no"
14054 fi
14055 rm -f conftest*
14056 fi
14057
14058 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
14059   echo "$ac_t""yes" 1>&6
14060   ol_cv_lib_mdbm=yes
14061 else
14062   echo "$ac_t""no" 1>&6
14063
14064                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
14065 echo "configure:14066: checking for mdbm_set_chain in -lmdbm" >&5
14066 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
14067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14068   echo $ac_n "(cached) $ac_c" 1>&6
14069 else
14070   ac_save_LIBS="$LIBS"
14071 LIBS="-lmdbm  $LIBS"
14072 cat > conftest.$ac_ext <<EOF
14073 #line 14074 "configure"
14074 #include "confdefs.h"
14075 /* Override any gcc2 internal prototype to avoid an error.  */
14076 /* We use char because int might match the return type of a gcc2
14077     builtin and then its argument prototype would still apply.  */
14078 char mdbm_set_chain();
14079
14080 int main() {
14081 mdbm_set_chain()
14082 ; return 0; }
14083 EOF
14084 if { (eval echo configure:14085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14085   rm -rf conftest*
14086   eval "ac_cv_lib_$ac_lib_var=yes"
14087 else
14088   echo "configure: failed program was:" >&5
14089   cat conftest.$ac_ext >&5
14090   rm -rf conftest*
14091   eval "ac_cv_lib_$ac_lib_var=no"
14092 fi
14093 rm -f conftest*
14094 LIBS="$ac_save_LIBS"
14095
14096 fi
14097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14098   echo "$ac_t""yes" 1>&6
14099   ol_cv_lib_mdbm=-lmdbm
14100 else
14101   echo "$ac_t""no" 1>&6
14102 ol_cv_lib_mdbm=no
14103 fi
14104
14105         
14106 fi
14107
14108         LIBS="$ol_LIBS"
14109
14110 fi
14111
14112 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
14113
14114
14115  for ac_hdr in mdbm.h
14116 do
14117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14119 echo "configure:14120: checking for $ac_hdr" >&5
14120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14121   echo $ac_n "(cached) $ac_c" 1>&6
14122 else
14123   cat > conftest.$ac_ext <<EOF
14124 #line 14125 "configure"
14125 #include "confdefs.h"
14126 #include <$ac_hdr>
14127 EOF
14128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14129 { (eval echo configure:14130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14131 if test -z "$ac_err"; then
14132   rm -rf conftest*
14133   eval "ac_cv_header_$ac_safe=yes"
14134 else
14135   echo "$ac_err" >&5
14136   echo "configure: failed program was:" >&5
14137   cat conftest.$ac_ext >&5
14138   rm -rf conftest*
14139   eval "ac_cv_header_$ac_safe=no"
14140 fi
14141 rm -f conftest*
14142 fi
14143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14144   echo "$ac_t""yes" 1>&6
14145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14146   cat >> confdefs.h <<EOF
14147 #define $ac_tr_hdr 1
14148 EOF
14149  
14150 else
14151   echo "$ac_t""no" 1>&6
14152 fi
14153 done
14154
14155  echo $ac_n "checking for db""... $ac_c" 1>&6
14156 echo "configure:14157: checking for db" >&5
14157 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
14158   echo $ac_n "(cached) $ac_c" 1>&6
14159 else
14160   
14161         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
14162                 ol_cv_mdbm=no
14163         else
14164                 ol_cv_mdbm=yes
14165         fi
14166
14167 fi
14168
14169 echo "$ac_t""$ol_cv_mdbm" 1>&6
14170  if test $ol_cv_mdbm = yes ; then
14171         cat >> confdefs.h <<\EOF
14172 #define HAVE_MDBM 1
14173 EOF
14174
14175  fi
14176
14177
14178         if test $ol_cv_mdbm = yes ; then
14179                 ol_link_ldbm=mdbm
14180                 ol_with_ldbm_api=mdbm
14181                 if test $ol_cv_lib_mdbm != yes ; then
14182                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
14183                 fi
14184         fi
14185 fi
14186
14187 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
14188         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
14189 echo "configure:14190: checking for GDBM library" >&5
14190 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
14191   echo $ac_n "(cached) $ac_c" 1>&6
14192 else
14193         ol_LIBS="$LIBS"
14194         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
14195 echo "configure:14196: checking for gdbm_open" >&5
14196 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
14197   echo $ac_n "(cached) $ac_c" 1>&6
14198 else
14199   cat > conftest.$ac_ext <<EOF
14200 #line 14201 "configure"
14201 #include "confdefs.h"
14202 /* System header to define __stub macros and hopefully few prototypes,
14203     which can conflict with char gdbm_open(); below.  */
14204 #include <assert.h>
14205 /* Override any gcc2 internal prototype to avoid an error.  */
14206 /* We use char because int might match the return type of a gcc2
14207     builtin and then its argument prototype would still apply.  */
14208 char gdbm_open();
14209 char (*f)();
14210
14211 int main() {
14212
14213 /* The GNU C library defines this for functions which it implements
14214     to always fail with ENOSYS.  Some functions are actually named
14215     something starting with __ and the normal name is an alias.  */
14216 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
14217 choke me
14218 #else
14219 f = gdbm_open;
14220 #endif
14221
14222 ; return 0; }
14223 EOF
14224 if { (eval echo configure:14225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14225   rm -rf conftest*
14226   eval "ac_cv_func_gdbm_open=yes"
14227 else
14228   echo "configure: failed program was:" >&5
14229   cat conftest.$ac_ext >&5
14230   rm -rf conftest*
14231   eval "ac_cv_func_gdbm_open=no"
14232 fi
14233 rm -f conftest*
14234 fi
14235
14236 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
14237   echo "$ac_t""yes" 1>&6
14238   ol_cv_lib_gdbm=yes
14239 else
14240   echo "$ac_t""no" 1>&6
14241
14242                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
14243 echo "configure:14244: checking for gdbm_open in -lgdbm" >&5
14244 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
14245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14246   echo $ac_n "(cached) $ac_c" 1>&6
14247 else
14248   ac_save_LIBS="$LIBS"
14249 LIBS="-lgdbm  $LIBS"
14250 cat > conftest.$ac_ext <<EOF
14251 #line 14252 "configure"
14252 #include "confdefs.h"
14253 /* Override any gcc2 internal prototype to avoid an error.  */
14254 /* We use char because int might match the return type of a gcc2
14255     builtin and then its argument prototype would still apply.  */
14256 char gdbm_open();
14257
14258 int main() {
14259 gdbm_open()
14260 ; return 0; }
14261 EOF
14262 if { (eval echo configure:14263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14263   rm -rf conftest*
14264   eval "ac_cv_lib_$ac_lib_var=yes"
14265 else
14266   echo "configure: failed program was:" >&5
14267   cat conftest.$ac_ext >&5
14268   rm -rf conftest*
14269   eval "ac_cv_lib_$ac_lib_var=no"
14270 fi
14271 rm -f conftest*
14272 LIBS="$ac_save_LIBS"
14273
14274 fi
14275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14276   echo "$ac_t""yes" 1>&6
14277   ol_cv_lib_gdbm=-lgdbm
14278 else
14279   echo "$ac_t""no" 1>&6
14280 ol_cv_lib_gdbm=no
14281 fi
14282
14283         
14284 fi
14285
14286         LIBS="$ol_LIBS"
14287
14288 fi
14289
14290 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
14291
14292
14293  for ac_hdr in gdbm.h
14294 do
14295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14297 echo "configure:14298: checking for $ac_hdr" >&5
14298 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14299   echo $ac_n "(cached) $ac_c" 1>&6
14300 else
14301   cat > conftest.$ac_ext <<EOF
14302 #line 14303 "configure"
14303 #include "confdefs.h"
14304 #include <$ac_hdr>
14305 EOF
14306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14307 { (eval echo configure:14308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14309 if test -z "$ac_err"; then
14310   rm -rf conftest*
14311   eval "ac_cv_header_$ac_safe=yes"
14312 else
14313   echo "$ac_err" >&5
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316   rm -rf conftest*
14317   eval "ac_cv_header_$ac_safe=no"
14318 fi
14319 rm -f conftest*
14320 fi
14321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14322   echo "$ac_t""yes" 1>&6
14323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14324   cat >> confdefs.h <<EOF
14325 #define $ac_tr_hdr 1
14326 EOF
14327  
14328 else
14329   echo "$ac_t""no" 1>&6
14330 fi
14331 done
14332
14333  echo $ac_n "checking for db""... $ac_c" 1>&6
14334 echo "configure:14335: checking for db" >&5
14335 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
14336   echo $ac_n "(cached) $ac_c" 1>&6
14337 else
14338   
14339         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
14340                 ol_cv_gdbm=no
14341         else
14342                 ol_cv_gdbm=yes
14343         fi
14344
14345 fi
14346
14347 echo "$ac_t""$ol_cv_gdbm" 1>&6
14348  if test $ol_cv_gdbm = yes ; then
14349         cat >> confdefs.h <<\EOF
14350 #define HAVE_GDBM 1
14351 EOF
14352
14353  fi
14354
14355
14356         if test $ol_cv_gdbm = yes ; then
14357                 ol_link_ldbm=gdbm
14358                 ol_with_ldbm_api=gdbm
14359
14360                 if test $ol_cv_lib_gdbm != yes ; then
14361                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
14362                 fi
14363         fi
14364 fi
14365
14366 if test $ol_with_ldbm_api = ndbm ; then
14367         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
14368 echo "configure:14369: checking for NDBM library" >&5
14369 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
14370   echo $ac_n "(cached) $ac_c" 1>&6
14371 else
14372         ol_LIBS="$LIBS"
14373         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14374 echo "configure:14375: checking for dbm_open" >&5
14375 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
14376   echo $ac_n "(cached) $ac_c" 1>&6
14377 else
14378   cat > conftest.$ac_ext <<EOF
14379 #line 14380 "configure"
14380 #include "confdefs.h"
14381 /* System header to define __stub macros and hopefully few prototypes,
14382     which can conflict with char dbm_open(); below.  */
14383 #include <assert.h>
14384 /* Override any gcc2 internal prototype to avoid an error.  */
14385 /* We use char because int might match the return type of a gcc2
14386     builtin and then its argument prototype would still apply.  */
14387 char dbm_open();
14388 char (*f)();
14389
14390 int main() {
14391
14392 /* The GNU C library defines this for functions which it implements
14393     to always fail with ENOSYS.  Some functions are actually named
14394     something starting with __ and the normal name is an alias.  */
14395 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14396 choke me
14397 #else
14398 f = dbm_open;
14399 #endif
14400
14401 ; return 0; }
14402 EOF
14403 if { (eval echo configure:14404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14404   rm -rf conftest*
14405   eval "ac_cv_func_dbm_open=yes"
14406 else
14407   echo "configure: failed program was:" >&5
14408   cat conftest.$ac_ext >&5
14409   rm -rf conftest*
14410   eval "ac_cv_func_dbm_open=no"
14411 fi
14412 rm -f conftest*
14413 fi
14414
14415 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14416   echo "$ac_t""yes" 1>&6
14417   ol_cv_lib_ndbm=yes
14418 else
14419   echo "$ac_t""no" 1>&6
14420
14421                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
14422 echo "configure:14423: checking for dbm_open in -lndbm" >&5
14423 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14424 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14425   echo $ac_n "(cached) $ac_c" 1>&6
14426 else
14427   ac_save_LIBS="$LIBS"
14428 LIBS="-lndbm  $LIBS"
14429 cat > conftest.$ac_ext <<EOF
14430 #line 14431 "configure"
14431 #include "confdefs.h"
14432 /* Override any gcc2 internal prototype to avoid an error.  */
14433 /* We use char because int might match the return type of a gcc2
14434     builtin and then its argument prototype would still apply.  */
14435 char dbm_open();
14436
14437 int main() {
14438 dbm_open()
14439 ; return 0; }
14440 EOF
14441 if { (eval echo configure:14442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14442   rm -rf conftest*
14443   eval "ac_cv_lib_$ac_lib_var=yes"
14444 else
14445   echo "configure: failed program was:" >&5
14446   cat conftest.$ac_ext >&5
14447   rm -rf conftest*
14448   eval "ac_cv_lib_$ac_lib_var=no"
14449 fi
14450 rm -f conftest*
14451 LIBS="$ac_save_LIBS"
14452
14453 fi
14454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14455   echo "$ac_t""yes" 1>&6
14456   ol_cv_lib_ndbm=-lndbm
14457 else
14458   echo "$ac_t""no" 1>&6
14459
14460                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14461 echo "configure:14462: checking for dbm_open in -ldbm" >&5
14462 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14464   echo $ac_n "(cached) $ac_c" 1>&6
14465 else
14466   ac_save_LIBS="$LIBS"
14467 LIBS="-ldbm  $LIBS"
14468 cat > conftest.$ac_ext <<EOF
14469 #line 14470 "configure"
14470 #include "confdefs.h"
14471 /* Override any gcc2 internal prototype to avoid an error.  */
14472 /* We use char because int might match the return type of a gcc2
14473     builtin and then its argument prototype would still apply.  */
14474 char dbm_open();
14475
14476 int main() {
14477 dbm_open()
14478 ; return 0; }
14479 EOF
14480 if { (eval echo configure:14481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14481   rm -rf conftest*
14482   eval "ac_cv_lib_$ac_lib_var=yes"
14483 else
14484   echo "configure: failed program was:" >&5
14485   cat conftest.$ac_ext >&5
14486   rm -rf conftest*
14487   eval "ac_cv_lib_$ac_lib_var=no"
14488 fi
14489 rm -f conftest*
14490 LIBS="$ac_save_LIBS"
14491
14492 fi
14493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14494   echo "$ac_t""yes" 1>&6
14495   ol_cv_lib_ndbm=-ldbm
14496 else
14497   echo "$ac_t""no" 1>&6
14498 ol_cv_lib_ndbm=no
14499 fi
14500                 
14501 fi
14502
14503         
14504 fi
14505
14506         LIBS="$ol_LIBS"
14507
14508 fi
14509
14510 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
14511
14512
14513  for ac_hdr in ndbm.h
14514 do
14515 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14516 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14517 echo "configure:14518: checking for $ac_hdr" >&5
14518 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14519   echo $ac_n "(cached) $ac_c" 1>&6
14520 else
14521   cat > conftest.$ac_ext <<EOF
14522 #line 14523 "configure"
14523 #include "confdefs.h"
14524 #include <$ac_hdr>
14525 EOF
14526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14527 { (eval echo configure:14528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14529 if test -z "$ac_err"; then
14530   rm -rf conftest*
14531   eval "ac_cv_header_$ac_safe=yes"
14532 else
14533   echo "$ac_err" >&5
14534   echo "configure: failed program was:" >&5
14535   cat conftest.$ac_ext >&5
14536   rm -rf conftest*
14537   eval "ac_cv_header_$ac_safe=no"
14538 fi
14539 rm -f conftest*
14540 fi
14541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14542   echo "$ac_t""yes" 1>&6
14543     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14544   cat >> confdefs.h <<EOF
14545 #define $ac_tr_hdr 1
14546 EOF
14547  
14548 else
14549   echo "$ac_t""no" 1>&6
14550 fi
14551 done
14552
14553  echo $ac_n "checking for db""... $ac_c" 1>&6
14554 echo "configure:14555: checking for db" >&5
14555 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
14556   echo $ac_n "(cached) $ac_c" 1>&6
14557 else
14558   
14559         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
14560                 ol_cv_ndbm=no
14561         else
14562                 ol_cv_ndbm=yes
14563         fi
14564
14565 fi
14566
14567 echo "$ac_t""$ol_cv_ndbm" 1>&6
14568  if test $ol_cv_ndbm = yes ; then
14569         cat >> confdefs.h <<\EOF
14570 #define HAVE_NDBM 1
14571 EOF
14572
14573  fi
14574
14575
14576         if test $ol_cv_ndbm = yes ; then
14577                 ol_link_ldbm=ndbm
14578                 ol_with_ldbm_api=ndbm
14579
14580                 if test $ol_cv_lib_ndbm != yes ; then
14581                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
14582                 fi
14583         fi
14584 fi
14585
14586 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
14587         echo "configure: warning: could not find suitable LDBM backend" 1>&2
14588         if test $ol_enable_ldbm = yes ; then
14589                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
14590         fi
14591
14592         echo "configure: warning: disabling LDBM" 1>&2
14593         ol_enable_ldbm=no
14594 fi
14595
14596 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
14597         LINK_BINS_DYNAMIC="yes"
14598 else
14599         LINK_BINS_DYNAMIC="no"
14600 fi
14601
14602 if test $ol_enable_wrappers != no ; then
14603         for ac_hdr in tcpd.h
14604 do
14605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14607 echo "configure:14608: checking for $ac_hdr" >&5
14608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14609   echo $ac_n "(cached) $ac_c" 1>&6
14610 else
14611   cat > conftest.$ac_ext <<EOF
14612 #line 14613 "configure"
14613 #include "confdefs.h"
14614 #include <$ac_hdr>
14615 EOF
14616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14617 { (eval echo configure:14618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14619 if test -z "$ac_err"; then
14620   rm -rf conftest*
14621   eval "ac_cv_header_$ac_safe=yes"
14622 else
14623   echo "$ac_err" >&5
14624   echo "configure: failed program was:" >&5
14625   cat conftest.$ac_ext >&5
14626   rm -rf conftest*
14627   eval "ac_cv_header_$ac_safe=no"
14628 fi
14629 rm -f conftest*
14630 fi
14631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14632   echo "$ac_t""yes" 1>&6
14633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14634   cat >> confdefs.h <<EOF
14635 #define $ac_tr_hdr 1
14636 EOF
14637  
14638 else
14639   echo "$ac_t""no" 1>&6
14640 fi
14641 done
14642
14643
14644         if test $ac_cv_header_tcpd_h != yes ; then
14645                 have_wrappers=no
14646         else
14647                 cat > conftest.$ac_ext <<EOF
14648 #line 14649 "configure"
14649 #include "confdefs.h"
14650
14651 int allow_severity = 0;
14652 int deny_severity  = 0;
14653                 
14654 int main() {
14655 hosts_access()
14656 ; return 0; }
14657 EOF
14658 if { (eval echo configure:14659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14659   rm -rf conftest*
14660   have_wrappers=yes
14661 else
14662   echo "configure: failed program was:" >&5
14663   cat conftest.$ac_ext >&5
14664   rm -rf conftest*
14665   have_wrappers=no
14666 fi
14667 rm -f conftest*
14668         fi
14669
14670         if test $have_wrappers = yes ; then
14671                 cat >> confdefs.h <<\EOF
14672 #define HAVE_TCPD 1
14673 EOF
14674
14675                 WRAP_LIBS="-lwrap"
14676
14677                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
14678 echo "configure:14679: checking for main in -lnsl" >&5
14679 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
14680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14681   echo $ac_n "(cached) $ac_c" 1>&6
14682 else
14683   ac_save_LIBS="$LIBS"
14684 LIBS="-lnsl  $LIBS"
14685 cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14688
14689 int main() {
14690 main()
14691 ; return 0; }
14692 EOF
14693 if { (eval echo configure:14694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14694   rm -rf conftest*
14695   eval "ac_cv_lib_$ac_lib_var=yes"
14696 else
14697   echo "configure: failed program was:" >&5
14698   cat conftest.$ac_ext >&5
14699   rm -rf conftest*
14700   eval "ac_cv_lib_$ac_lib_var=no"
14701 fi
14702 rm -f conftest*
14703 LIBS="$ac_save_LIBS"
14704
14705 fi
14706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14707   echo "$ac_t""yes" 1>&6
14708     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14709     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14710   cat >> confdefs.h <<EOF
14711 #define $ac_tr_lib 1
14712 EOF
14713
14714   LIBS="-lnsl $LIBS"
14715
14716 else
14717   echo "$ac_t""no" 1>&6
14718 fi
14719
14720         else
14721                 echo "configure: warning: could not find -lwrap" 1>&2
14722                 if test $ol_enable_wrappers = yes ; then
14723                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
14724                 fi
14725
14726                 echo "configure: warning: disabling wrappers support" 1>&2
14727                 ol_enable_wrappers=no
14728                 WRAP_LIBS=""
14729         fi
14730 fi
14731
14732 if test $ol_enable_syslog != no ; then
14733         echo $ac_n "checking for openlog""... $ac_c" 1>&6
14734 echo "configure:14735: checking for openlog" >&5
14735 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
14736   echo $ac_n "(cached) $ac_c" 1>&6
14737 else
14738   cat > conftest.$ac_ext <<EOF
14739 #line 14740 "configure"
14740 #include "confdefs.h"
14741 /* System header to define __stub macros and hopefully few prototypes,
14742     which can conflict with char openlog(); below.  */
14743 #include <assert.h>
14744 /* Override any gcc2 internal prototype to avoid an error.  */
14745 /* We use char because int might match the return type of a gcc2
14746     builtin and then its argument prototype would still apply.  */
14747 char openlog();
14748 char (*f)();
14749
14750 int main() {
14751
14752 /* The GNU C library defines this for functions which it implements
14753     to always fail with ENOSYS.  Some functions are actually named
14754     something starting with __ and the normal name is an alias.  */
14755 #if defined (__stub_openlog) || defined (__stub___openlog)
14756 choke me
14757 #else
14758 f = openlog;
14759 #endif
14760
14761 ; return 0; }
14762 EOF
14763 if { (eval echo configure:14764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14764   rm -rf conftest*
14765   eval "ac_cv_func_openlog=yes"
14766 else
14767   echo "configure: failed program was:" >&5
14768   cat conftest.$ac_ext >&5
14769   rm -rf conftest*
14770   eval "ac_cv_func_openlog=no"
14771 fi
14772 rm -f conftest*
14773 fi
14774
14775 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
14776   echo "$ac_t""yes" 1>&6
14777   :
14778 else
14779   echo "$ac_t""no" 1>&6
14780 fi
14781
14782         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
14783                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
14784         fi
14785         ol_enable_syslog=$ac_cv_func_openlog
14786 fi
14787
14788
14789 ol_link_sql=no
14790 if test $ol_enable_sql != no ; then
14791         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
14792 echo "configure:14793: checking for SQLDriverConnect in -liodbc" >&5
14793 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14795   echo $ac_n "(cached) $ac_c" 1>&6
14796 else
14797   ac_save_LIBS="$LIBS"
14798 LIBS="-liodbc  $LIBS"
14799 cat > conftest.$ac_ext <<EOF
14800 #line 14801 "configure"
14801 #include "confdefs.h"
14802 /* Override any gcc2 internal prototype to avoid an error.  */
14803 /* We use char because int might match the return type of a gcc2
14804     builtin and then its argument prototype would still apply.  */
14805 char SQLDriverConnect();
14806
14807 int main() {
14808 SQLDriverConnect()
14809 ; return 0; }
14810 EOF
14811 if { (eval echo configure:14812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14812   rm -rf conftest*
14813   eval "ac_cv_lib_$ac_lib_var=yes"
14814 else
14815   echo "configure: failed program was:" >&5
14816   cat conftest.$ac_ext >&5
14817   rm -rf conftest*
14818   eval "ac_cv_lib_$ac_lib_var=no"
14819 fi
14820 rm -f conftest*
14821 LIBS="$ac_save_LIBS"
14822
14823 fi
14824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14825   echo "$ac_t""yes" 1>&6
14826   have_iodbc=yes
14827 else
14828   echo "$ac_t""no" 1>&6
14829 have_iodbc=no
14830 fi
14831
14832         if test $have_iodbc = yes ; then
14833                 ol_link_sql="-liodbc"
14834         else
14835                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
14836 echo "configure:14837: checking for SQLDriverConnect in -lodbc" >&5
14837 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14839   echo $ac_n "(cached) $ac_c" 1>&6
14840 else
14841   ac_save_LIBS="$LIBS"
14842 LIBS="-lodbc  $LIBS"
14843 cat > conftest.$ac_ext <<EOF
14844 #line 14845 "configure"
14845 #include "confdefs.h"
14846 /* Override any gcc2 internal prototype to avoid an error.  */
14847 /* We use char because int might match the return type of a gcc2
14848     builtin and then its argument prototype would still apply.  */
14849 char SQLDriverConnect();
14850
14851 int main() {
14852 SQLDriverConnect()
14853 ; return 0; }
14854 EOF
14855 if { (eval echo configure:14856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14856   rm -rf conftest*
14857   eval "ac_cv_lib_$ac_lib_var=yes"
14858 else
14859   echo "configure: failed program was:" >&5
14860   cat conftest.$ac_ext >&5
14861   rm -rf conftest*
14862   eval "ac_cv_lib_$ac_lib_var=no"
14863 fi
14864 rm -f conftest*
14865 LIBS="$ac_save_LIBS"
14866
14867 fi
14868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14869   echo "$ac_t""yes" 1>&6
14870   have_odbc=yes
14871 else
14872   echo "$ac_t""no" 1>&6
14873 have_odbc=no
14874 fi
14875
14876                 if test $have_odbc = yes ; then
14877                         ol_link_sql="-lodbc"
14878                 fi
14879         fi
14880
14881         if test $ol_link_sql != no ; then
14882                 SLAPD_SQL_LIBS="$ol_link_sql"
14883
14884         elif test $ol_enable_sql != auto ; then
14885                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
14886         fi
14887 fi
14888
14889 if test $ol_enable_tcl != no ; then
14890         for ac_hdr in tcl.h
14891 do
14892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14894 echo "configure:14895: checking for $ac_hdr" >&5
14895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14896   echo $ac_n "(cached) $ac_c" 1>&6
14897 else
14898   cat > conftest.$ac_ext <<EOF
14899 #line 14900 "configure"
14900 #include "confdefs.h"
14901 #include <$ac_hdr>
14902 EOF
14903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14904 { (eval echo configure:14905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14906 if test -z "$ac_err"; then
14907   rm -rf conftest*
14908   eval "ac_cv_header_$ac_safe=yes"
14909 else
14910   echo "$ac_err" >&5
14911   echo "configure: failed program was:" >&5
14912   cat conftest.$ac_ext >&5
14913   rm -rf conftest*
14914   eval "ac_cv_header_$ac_safe=no"
14915 fi
14916 rm -f conftest*
14917 fi
14918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14919   echo "$ac_t""yes" 1>&6
14920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14921   cat >> confdefs.h <<EOF
14922 #define $ac_tr_hdr 1
14923 EOF
14924  
14925 else
14926   echo "$ac_t""no" 1>&6
14927 fi
14928 done
14929
14930
14931         if test $ac_cv_header_tcl_h != yes ; then
14932                 have_tcl=no
14933         else
14934                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
14935                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
14936 echo "configure:14937: checking for main in -l$lib" >&5
14937 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
14938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14939   echo $ac_n "(cached) $ac_c" 1>&6
14940 else
14941   ac_save_LIBS="$LIBS"
14942 LIBS="-l$lib  $LIBS"
14943 cat > conftest.$ac_ext <<EOF
14944 #line 14945 "configure"
14945 #include "confdefs.h"
14946
14947 int main() {
14948 main()
14949 ; return 0; }
14950 EOF
14951 if { (eval echo configure:14952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14952   rm -rf conftest*
14953   eval "ac_cv_lib_$ac_lib_var=yes"
14954 else
14955   echo "configure: failed program was:" >&5
14956   cat conftest.$ac_ext >&5
14957   rm -rf conftest*
14958   eval "ac_cv_lib_$ac_lib_var=no"
14959 fi
14960 rm -f conftest*
14961 LIBS="$ac_save_LIBS"
14962
14963 fi
14964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14965   echo "$ac_t""yes" 1>&6
14966   have_tcl=yes
14967                            if test x"$ol_with_tcl_module" = "xstatic" ; then
14968                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
14969                            else
14970                                MOD_TCL_LIB="-l${lib}"
14971                            fi;break
14972 else
14973   echo "$ac_t""no" 1>&6
14974 have_tcl=no
14975 fi
14976
14977                 done
14978         fi
14979
14980         if test $have_tcl != yes ; then
14981                 echo "configure: warning: could not find -ltcl" 1>&2
14982                 if test $ol_enable_tcl = yes ; then
14983                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
14984                 fi
14985
14986                 ol_enable_tcl=no
14987         fi
14988 fi
14989
14990 ol_link_termcap=no
14991 for ac_hdr in termcap.h ncurses.h
14992 do
14993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14994 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14995 echo "configure:14996: checking for $ac_hdr" >&5
14996 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14997   echo $ac_n "(cached) $ac_c" 1>&6
14998 else
14999   cat > conftest.$ac_ext <<EOF
15000 #line 15001 "configure"
15001 #include "confdefs.h"
15002 #include <$ac_hdr>
15003 EOF
15004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15005 { (eval echo configure:15006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15007 if test -z "$ac_err"; then
15008   rm -rf conftest*
15009   eval "ac_cv_header_$ac_safe=yes"
15010 else
15011   echo "$ac_err" >&5
15012   echo "configure: failed program was:" >&5
15013   cat conftest.$ac_ext >&5
15014   rm -rf conftest*
15015   eval "ac_cv_header_$ac_safe=no"
15016 fi
15017 rm -f conftest*
15018 fi
15019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15020   echo "$ac_t""yes" 1>&6
15021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15022   cat >> confdefs.h <<EOF
15023 #define $ac_tr_hdr 1
15024 EOF
15025  
15026 else
15027   echo "$ac_t""no" 1>&6
15028 fi
15029 done
15030
15031
15032 if test $ol_link_termcap = no ; then
15033         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
15034 echo "configure:15035: checking for tputs in -ltermcap" >&5
15035 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
15036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15037   echo $ac_n "(cached) $ac_c" 1>&6
15038 else
15039   ac_save_LIBS="$LIBS"
15040 LIBS="-ltermcap  $LIBS"
15041 cat > conftest.$ac_ext <<EOF
15042 #line 15043 "configure"
15043 #include "confdefs.h"
15044 /* Override any gcc2 internal prototype to avoid an error.  */
15045 /* We use char because int might match the return type of a gcc2
15046     builtin and then its argument prototype would still apply.  */
15047 char tputs();
15048
15049 int main() {
15050 tputs()
15051 ; return 0; }
15052 EOF
15053 if { (eval echo configure:15054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15054   rm -rf conftest*
15055   eval "ac_cv_lib_$ac_lib_var=yes"
15056 else
15057   echo "configure: failed program was:" >&5
15058   cat conftest.$ac_ext >&5
15059   rm -rf conftest*
15060   eval "ac_cv_lib_$ac_lib_var=no"
15061 fi
15062 rm -f conftest*
15063 LIBS="$ac_save_LIBS"
15064
15065 fi
15066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15067   echo "$ac_t""yes" 1>&6
15068   have_termcap=yes
15069 else
15070   echo "$ac_t""no" 1>&6
15071 have_termcap=no
15072 fi
15073
15074         if test $have_termcap = yes ; then
15075                 cat >> confdefs.h <<\EOF
15076 #define HAVE_TERMCAP 1
15077 EOF
15078
15079                 ol_link_termcap=yes
15080                 TERMCAP_LIBS=-ltermcap
15081         fi
15082 fi
15083
15084 if test $ol_link_termcap = no ; then
15085         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
15086 echo "configure:15087: checking for initscr in -lncurses" >&5
15087 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
15088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15089   echo $ac_n "(cached) $ac_c" 1>&6
15090 else
15091   ac_save_LIBS="$LIBS"
15092 LIBS="-lncurses  $LIBS"
15093 cat > conftest.$ac_ext <<EOF
15094 #line 15095 "configure"
15095 #include "confdefs.h"
15096 /* Override any gcc2 internal prototype to avoid an error.  */
15097 /* We use char because int might match the return type of a gcc2
15098     builtin and then its argument prototype would still apply.  */
15099 char initscr();
15100
15101 int main() {
15102 initscr()
15103 ; return 0; }
15104 EOF
15105 if { (eval echo configure:15106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15106   rm -rf conftest*
15107   eval "ac_cv_lib_$ac_lib_var=yes"
15108 else
15109   echo "configure: failed program was:" >&5
15110   cat conftest.$ac_ext >&5
15111   rm -rf conftest*
15112   eval "ac_cv_lib_$ac_lib_var=no"
15113 fi
15114 rm -f conftest*
15115 LIBS="$ac_save_LIBS"
15116
15117 fi
15118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15119   echo "$ac_t""yes" 1>&6
15120   have_ncurses=yes
15121 else
15122   echo "$ac_t""no" 1>&6
15123 have_ncurses=no
15124 fi
15125
15126         if test $have_ncurses = yes ; then
15127                 cat >> confdefs.h <<\EOF
15128 #define HAVE_NCURSES 1
15129 EOF
15130
15131                 ol_link_termcap=yes
15132                 TERMCAP_LIBS=-lncurses
15133         fi
15134 fi
15135
15136 if test $ol_link_termcap = no ; then
15137         cat >> confdefs.h <<\EOF
15138 #define NO_TERMCAP 1
15139 EOF
15140
15141         TERMCAP_LIBS=
15142 fi
15143
15144 ol_link_sasl=no
15145 ol_link_spasswd=no
15146 if test $ol_with_cyrus_sasl != no ; then
15147         for ac_hdr in sasl.h
15148 do
15149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15151 echo "configure:15152: checking for $ac_hdr" >&5
15152 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15153   echo $ac_n "(cached) $ac_c" 1>&6
15154 else
15155   cat > conftest.$ac_ext <<EOF
15156 #line 15157 "configure"
15157 #include "confdefs.h"
15158 #include <$ac_hdr>
15159 EOF
15160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15161 { (eval echo configure:15162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15163 if test -z "$ac_err"; then
15164   rm -rf conftest*
15165   eval "ac_cv_header_$ac_safe=yes"
15166 else
15167   echo "$ac_err" >&5
15168   echo "configure: failed program was:" >&5
15169   cat conftest.$ac_ext >&5
15170   rm -rf conftest*
15171   eval "ac_cv_header_$ac_safe=no"
15172 fi
15173 rm -f conftest*
15174 fi
15175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15176   echo "$ac_t""yes" 1>&6
15177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15178   cat >> confdefs.h <<EOF
15179 #define $ac_tr_hdr 1
15180 EOF
15181  
15182 else
15183   echo "$ac_t""no" 1>&6
15184 fi
15185 done
15186
15187
15188         if test $ac_cv_header_sasl_h = yes ; then
15189                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
15190 echo "configure:15191: checking for sasl_client_init in -lsasl" >&5
15191 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
15192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15193   echo $ac_n "(cached) $ac_c" 1>&6
15194 else
15195   ac_save_LIBS="$LIBS"
15196 LIBS="-lsasl  $LIBS"
15197 cat > conftest.$ac_ext <<EOF
15198 #line 15199 "configure"
15199 #include "confdefs.h"
15200 /* Override any gcc2 internal prototype to avoid an error.  */
15201 /* We use char because int might match the return type of a gcc2
15202     builtin and then its argument prototype would still apply.  */
15203 char sasl_client_init();
15204
15205 int main() {
15206 sasl_client_init()
15207 ; return 0; }
15208 EOF
15209 if { (eval echo configure:15210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15210   rm -rf conftest*
15211   eval "ac_cv_lib_$ac_lib_var=yes"
15212 else
15213   echo "configure: failed program was:" >&5
15214   cat conftest.$ac_ext >&5
15215   rm -rf conftest*
15216   eval "ac_cv_lib_$ac_lib_var=no"
15217 fi
15218 rm -f conftest*
15219 LIBS="$ac_save_LIBS"
15220
15221 fi
15222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15223   echo "$ac_t""yes" 1>&6
15224   have_cyrus_sasl=yes
15225 else
15226   echo "$ac_t""no" 1>&6
15227 have_cyrus_sasl=no
15228 fi
15229
15230
15231                 if test $have_cyrus_sasl != no ; then
15232                         SASL_LIBS="-lsasl"
15233                         cat >> confdefs.h <<\EOF
15234 #define HAVE_CYRUS_SASL 1
15235 EOF
15236
15237                         ol_link_sasl=yes
15238                 fi
15239         fi
15240
15241         if test $ol_link_sasl = no ; then
15242                 if test $ol_with_cyrus_sasl != auto ; then
15243                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
15244                 else
15245                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
15246                         echo "configure: warning: SASL authentication not supported!" 1>&2
15247                         if test $ol_link_tls = no ; then
15248                                 echo "configure: warning: Strong authentication not supported!" 1>&2
15249                         fi
15250                 fi
15251
15252         elif test $ol_enable_spasswd != no ; then
15253                 ol_link_spasswd=yes
15254         fi
15255
15256 else
15257         echo "configure: warning: SASL authentication not supported!" 1>&2
15258         if test $ol_link_tls = no ; then
15259                 echo "configure: warning: Strong authentication not supported!" 1>&2
15260         fi
15261 fi
15262
15263 if test $cross_compiling != yes ; then
15264         dev=no
15265         if test -r /dev/urandom ; then
15266                 dev="/dev/urandom";
15267         elif test -r /idev/urandom ; then
15268                 dev="/idev/urandom";
15269         elif test -r /dev/srandom ; then
15270                 dev="/dev/srandom";
15271         elif test -r /dev/random ; then
15272                 dev="/dev/random";
15273         elif test -r /idev/random ; then
15274                 dev="/idev/random";
15275         fi
15276
15277         if test $dev != no ; then
15278                 cat >> confdefs.h <<EOF
15279 #define URANDOM_DEVICE "$dev"
15280 EOF
15281
15282         fi
15283 fi
15284
15285 ol_link_fetch=no
15286 if test $ol_with_fetch != no ; then
15287         ol_LIBS=$LIBS
15288 LIBS="-lfetch -lcom_err $LIBS"
15289 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
15290 echo "configure:15291: checking fetch(3) library" >&5
15291 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
15292   echo $ac_n "(cached) $ac_c" 1>&6
15293 else
15294   
15295         cat > conftest.$ac_ext <<EOF
15296 #line 15297 "configure"
15297 #include "confdefs.h"
15298
15299 #include <sys/param.h>
15300 #include <stdio.h>
15301 #include <fetch.h>
15302 int main() {
15303 struct url *u = fetchParseURL("file:///"); 
15304 ; return 0; }
15305 EOF
15306 if { (eval echo configure:15307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15307   rm -rf conftest*
15308   ol_cv_lib_fetch=yes
15309 else
15310   echo "configure: failed program was:" >&5
15311   cat conftest.$ac_ext >&5
15312   rm -rf conftest*
15313   ol_cv_lib_fetch=no
15314 fi
15315 rm -f conftest*
15316 fi
15317
15318 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
15319 LIBS=$ol_LIBS
15320 if test $ol_cv_lib_fetch != no ; then
15321         ol_link_fetch="-lfetch -lcom_err"
15322         cat >> confdefs.h <<\EOF
15323 #define HAVE_FETCH 1
15324 EOF
15325
15326 fi
15327
15328
15329         if test $ol_cv_lib_fetch != no ; then
15330                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
15331                 ol_link_fetch=freebsd
15332
15333         elif test $ol_with_fetch != auto ; then
15334                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
15335         fi 
15336 fi
15337
15338 ol_link_readline=no
15339 if test $ol_with_readline != no ; then
15340         for ac_hdr in readline/readline.h readline/history.h
15341 do
15342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15344 echo "configure:15345: checking for $ac_hdr" >&5
15345 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15346   echo $ac_n "(cached) $ac_c" 1>&6
15347 else
15348   cat > conftest.$ac_ext <<EOF
15349 #line 15350 "configure"
15350 #include "confdefs.h"
15351 #include <$ac_hdr>
15352 EOF
15353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15354 { (eval echo configure:15355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15356 if test -z "$ac_err"; then
15357   rm -rf conftest*
15358   eval "ac_cv_header_$ac_safe=yes"
15359 else
15360   echo "$ac_err" >&5
15361   echo "configure: failed program was:" >&5
15362   cat conftest.$ac_ext >&5
15363   rm -rf conftest*
15364   eval "ac_cv_header_$ac_safe=no"
15365 fi
15366 rm -f conftest*
15367 fi
15368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15369   echo "$ac_t""yes" 1>&6
15370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15371   cat >> confdefs.h <<EOF
15372 #define $ac_tr_hdr 1
15373 EOF
15374  
15375 else
15376   echo "$ac_t""no" 1>&6
15377 fi
15378 done
15379
15380
15381         if test $ac_cv_header_readline_readline_h = yes ; then
15382                 save_LIBS="$LIBS"
15383                 LIBS="$TERMCAP_LIBS $LIBS"
15384                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
15385 echo "configure:15386: checking for readline in -lreadline" >&5
15386 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
15387 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15388   echo $ac_n "(cached) $ac_c" 1>&6
15389 else
15390   ac_save_LIBS="$LIBS"
15391 LIBS="-lreadline  $LIBS"
15392 cat > conftest.$ac_ext <<EOF
15393 #line 15394 "configure"
15394 #include "confdefs.h"
15395 /* Override any gcc2 internal prototype to avoid an error.  */
15396 /* We use char because int might match the return type of a gcc2
15397     builtin and then its argument prototype would still apply.  */
15398 char readline();
15399
15400 int main() {
15401 readline()
15402 ; return 0; }
15403 EOF
15404 if { (eval echo configure:15405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15405   rm -rf conftest*
15406   eval "ac_cv_lib_$ac_lib_var=yes"
15407 else
15408   echo "configure: failed program was:" >&5
15409   cat conftest.$ac_ext >&5
15410   rm -rf conftest*
15411   eval "ac_cv_lib_$ac_lib_var=no"
15412 fi
15413 rm -f conftest*
15414 LIBS="$ac_save_LIBS"
15415
15416 fi
15417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15418   echo "$ac_t""yes" 1>&6
15419   have_readline=yes
15420 else
15421   echo "$ac_t""no" 1>&6
15422 have_readline=no
15423 fi
15424
15425                 LIBS="$save_LIBS"
15426                         
15427                 if test $have_readline = yes ; then
15428                         ol_with_readline=found
15429                         ol_link_readline=yes
15430
15431                         READLINE_LIBS="-lreadline"
15432                 fi
15433         fi
15434 fi
15435
15436 if test $ol_link_readline = yes ; then
15437         cat >> confdefs.h <<\EOF
15438 #define HAVE_READLINE 1
15439 EOF
15440
15441 fi
15442
15443
15444 if test $ol_enable_crypt != no ; then
15445         echo $ac_n "checking for crypt""... $ac_c" 1>&6
15446 echo "configure:15447: checking for crypt" >&5
15447 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
15448   echo $ac_n "(cached) $ac_c" 1>&6
15449 else
15450   cat > conftest.$ac_ext <<EOF
15451 #line 15452 "configure"
15452 #include "confdefs.h"
15453 /* System header to define __stub macros and hopefully few prototypes,
15454     which can conflict with char crypt(); below.  */
15455 #include <assert.h>
15456 /* Override any gcc2 internal prototype to avoid an error.  */
15457 /* We use char because int might match the return type of a gcc2
15458     builtin and then its argument prototype would still apply.  */
15459 char crypt();
15460 char (*f)();
15461
15462 int main() {
15463
15464 /* The GNU C library defines this for functions which it implements
15465     to always fail with ENOSYS.  Some functions are actually named
15466     something starting with __ and the normal name is an alias.  */
15467 #if defined (__stub_crypt) || defined (__stub___crypt)
15468 choke me
15469 #else
15470 f = crypt;
15471 #endif
15472
15473 ; return 0; }
15474 EOF
15475 if { (eval echo configure:15476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15476   rm -rf conftest*
15477   eval "ac_cv_func_crypt=yes"
15478 else
15479   echo "configure: failed program was:" >&5
15480   cat conftest.$ac_ext >&5
15481   rm -rf conftest*
15482   eval "ac_cv_func_crypt=no"
15483 fi
15484 rm -f conftest*
15485 fi
15486
15487 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
15488   echo "$ac_t""yes" 1>&6
15489   have_crypt=yes
15490 else
15491   echo "$ac_t""no" 1>&6
15492
15493                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
15494 echo "configure:15495: checking for crypt in -lcrypt" >&5
15495 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
15496 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15497   echo $ac_n "(cached) $ac_c" 1>&6
15498 else
15499   ac_save_LIBS="$LIBS"
15500 LIBS="-lcrypt  $LIBS"
15501 cat > conftest.$ac_ext <<EOF
15502 #line 15503 "configure"
15503 #include "confdefs.h"
15504 /* Override any gcc2 internal prototype to avoid an error.  */
15505 /* We use char because int might match the return type of a gcc2
15506     builtin and then its argument prototype would still apply.  */
15507 char crypt();
15508
15509 int main() {
15510 crypt()
15511 ; return 0; }
15512 EOF
15513 if { (eval echo configure:15514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15514   rm -rf conftest*
15515   eval "ac_cv_lib_$ac_lib_var=yes"
15516 else
15517   echo "configure: failed program was:" >&5
15518   cat conftest.$ac_ext >&5
15519   rm -rf conftest*
15520   eval "ac_cv_lib_$ac_lib_var=no"
15521 fi
15522 rm -f conftest*
15523 LIBS="$ac_save_LIBS"
15524
15525 fi
15526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15527   echo "$ac_t""yes" 1>&6
15528   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
15529                         have_crypt=yes
15530 else
15531   echo "$ac_t""no" 1>&6
15532 have_crypt=no
15533 fi
15534
15535 fi
15536
15537
15538         if test $have_crypt = yes ; then
15539                 cat >> confdefs.h <<\EOF
15540 #define HAVE_CRYPT 1
15541 EOF
15542
15543         else
15544                 echo "configure: warning: could not find crypt" 1>&2
15545                 if test $ol_enable_crypt = yes ; then
15546                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
15547                 fi
15548
15549                 echo "configure: warning: disabling crypt support" 1>&2
15550                 ol_enable_crypt=no
15551         fi
15552 fi
15553
15554 if test $ol_enable_proctitle != no ; then
15555         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
15556 echo "configure:15557: checking for setproctitle" >&5
15557 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
15558   echo $ac_n "(cached) $ac_c" 1>&6
15559 else
15560   cat > conftest.$ac_ext <<EOF
15561 #line 15562 "configure"
15562 #include "confdefs.h"
15563 /* System header to define __stub macros and hopefully few prototypes,
15564     which can conflict with char setproctitle(); below.  */
15565 #include <assert.h>
15566 /* Override any gcc2 internal prototype to avoid an error.  */
15567 /* We use char because int might match the return type of a gcc2
15568     builtin and then its argument prototype would still apply.  */
15569 char setproctitle();
15570 char (*f)();
15571
15572 int main() {
15573
15574 /* The GNU C library defines this for functions which it implements
15575     to always fail with ENOSYS.  Some functions are actually named
15576     something starting with __ and the normal name is an alias.  */
15577 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
15578 choke me
15579 #else
15580 f = setproctitle;
15581 #endif
15582
15583 ; return 0; }
15584 EOF
15585 if { (eval echo configure:15586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15586   rm -rf conftest*
15587   eval "ac_cv_func_setproctitle=yes"
15588 else
15589   echo "configure: failed program was:" >&5
15590   cat conftest.$ac_ext >&5
15591   rm -rf conftest*
15592   eval "ac_cv_func_setproctitle=no"
15593 fi
15594 rm -f conftest*
15595 fi
15596
15597 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
15598   echo "$ac_t""yes" 1>&6
15599   have_setproctitle=yes
15600 else
15601   echo "$ac_t""no" 1>&6
15602
15603                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
15604 echo "configure:15605: checking for setproctitle in -lutil" >&5
15605 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
15606 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15607   echo $ac_n "(cached) $ac_c" 1>&6
15608 else
15609   ac_save_LIBS="$LIBS"
15610 LIBS="-lutil  $LIBS"
15611 cat > conftest.$ac_ext <<EOF
15612 #line 15613 "configure"
15613 #include "confdefs.h"
15614 /* Override any gcc2 internal prototype to avoid an error.  */
15615 /* We use char because int might match the return type of a gcc2
15616     builtin and then its argument prototype would still apply.  */
15617 char setproctitle();
15618
15619 int main() {
15620 setproctitle()
15621 ; return 0; }
15622 EOF
15623 if { (eval echo configure:15624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15624   rm -rf conftest*
15625   eval "ac_cv_lib_$ac_lib_var=yes"
15626 else
15627   echo "configure: failed program was:" >&5
15628   cat conftest.$ac_ext >&5
15629   rm -rf conftest*
15630   eval "ac_cv_lib_$ac_lib_var=no"
15631 fi
15632 rm -f conftest*
15633 LIBS="$ac_save_LIBS"
15634
15635 fi
15636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15637   echo "$ac_t""yes" 1>&6
15638   have_setproctitle=yes
15639                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
15640 else
15641   echo "$ac_t""no" 1>&6
15642 have_setproctitle=no
15643                         LIBOBJS="$LIBOBJS setproctitle.o"
15644                         LIBSRCS="$LIBSRCS setproctitle.c"
15645 fi
15646
15647 fi
15648
15649
15650         if test $have_setproctitle = yes ; then
15651                 cat >> confdefs.h <<\EOF
15652 #define HAVE_SETPROCTITLE 1
15653 EOF
15654
15655         fi
15656 fi
15657
15658 if test $ol_enable_slp != no ; then
15659         for ac_hdr in slp.h 
15660 do
15661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15663 echo "configure:15664: checking for $ac_hdr" >&5
15664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15665   echo $ac_n "(cached) $ac_c" 1>&6
15666 else
15667   cat > conftest.$ac_ext <<EOF
15668 #line 15669 "configure"
15669 #include "confdefs.h"
15670 #include <$ac_hdr>
15671 EOF
15672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15673 { (eval echo configure:15674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15675 if test -z "$ac_err"; then
15676   rm -rf conftest*
15677   eval "ac_cv_header_$ac_safe=yes"
15678 else
15679   echo "$ac_err" >&5
15680   echo "configure: failed program was:" >&5
15681   cat conftest.$ac_ext >&5
15682   rm -rf conftest*
15683   eval "ac_cv_header_$ac_safe=no"
15684 fi
15685 rm -f conftest*
15686 fi
15687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15688   echo "$ac_t""yes" 1>&6
15689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15690   cat >> confdefs.h <<EOF
15691 #define $ac_tr_hdr 1
15692 EOF
15693  
15694 else
15695   echo "$ac_t""no" 1>&6
15696 fi
15697 done
15698
15699
15700         if test $ac_cv_header_slp_h = yes ; then
15701                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
15702 echo "configure:15703: checking for SLPOpen in -lslp" >&5
15703 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
15704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15705   echo $ac_n "(cached) $ac_c" 1>&6
15706 else
15707   ac_save_LIBS="$LIBS"
15708 LIBS="-lslp  $LIBS"
15709 cat > conftest.$ac_ext <<EOF
15710 #line 15711 "configure"
15711 #include "confdefs.h"
15712 /* Override any gcc2 internal prototype to avoid an error.  */
15713 /* We use char because int might match the return type of a gcc2
15714     builtin and then its argument prototype would still apply.  */
15715 char SLPOpen();
15716
15717 int main() {
15718 SLPOpen()
15719 ; return 0; }
15720 EOF
15721 if { (eval echo configure:15722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15722   rm -rf conftest*
15723   eval "ac_cv_lib_$ac_lib_var=yes"
15724 else
15725   echo "configure: failed program was:" >&5
15726   cat conftest.$ac_ext >&5
15727   rm -rf conftest*
15728   eval "ac_cv_lib_$ac_lib_var=no"
15729 fi
15730 rm -f conftest*
15731 LIBS="$ac_save_LIBS"
15732
15733 fi
15734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15735   echo "$ac_t""yes" 1>&6
15736   have_slp=yes
15737 else
15738   echo "$ac_t""no" 1>&6
15739 have_slp=no
15740 fi
15741
15742                 if test $have_slp = yes ; then
15743                         cat >> confdefs.h <<\EOF
15744 #define HAVE_SLP 1
15745 EOF
15746
15747                         SLAPD_SLP_LIBS=-lslp
15748                 fi
15749
15750         elif test $ol_enable_slp = yes ; then
15751                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
15752         fi
15753 fi
15754
15755 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
15756 echo "configure:15757: checking for ANSI C header files" >&5
15757 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
15758   echo $ac_n "(cached) $ac_c" 1>&6
15759 else
15760   cat > conftest.$ac_ext <<EOF
15761 #line 15762 "configure"
15762 #include "confdefs.h"
15763 #include <stdlib.h>
15764 #include <stdarg.h>
15765 #include <string.h>
15766 #include <float.h>
15767 EOF
15768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15769 { (eval echo configure:15770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15771 if test -z "$ac_err"; then
15772   rm -rf conftest*
15773   ac_cv_header_stdc=yes
15774 else
15775   echo "$ac_err" >&5
15776   echo "configure: failed program was:" >&5
15777   cat conftest.$ac_ext >&5
15778   rm -rf conftest*
15779   ac_cv_header_stdc=no
15780 fi
15781 rm -f conftest*
15782
15783 if test $ac_cv_header_stdc = yes; then
15784   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15785 cat > conftest.$ac_ext <<EOF
15786 #line 15787 "configure"
15787 #include "confdefs.h"
15788 #include <string.h>
15789 EOF
15790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15791   egrep "memchr" >/dev/null 2>&1; then
15792   :
15793 else
15794   rm -rf conftest*
15795   ac_cv_header_stdc=no
15796 fi
15797 rm -f conftest*
15798
15799 fi
15800
15801 if test $ac_cv_header_stdc = yes; then
15802   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15803 cat > conftest.$ac_ext <<EOF
15804 #line 15805 "configure"
15805 #include "confdefs.h"
15806 #include <stdlib.h>
15807 EOF
15808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15809   egrep "free" >/dev/null 2>&1; then
15810   :
15811 else
15812   rm -rf conftest*
15813   ac_cv_header_stdc=no
15814 fi
15815 rm -f conftest*
15816
15817 fi
15818
15819 if test $ac_cv_header_stdc = yes; then
15820   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15821 if test "$cross_compiling" = yes; then
15822   :
15823 else
15824   cat > conftest.$ac_ext <<EOF
15825 #line 15826 "configure"
15826 #include "confdefs.h"
15827 #include <ctype.h>
15828 #if ((' ' & 0x0FF) == 0x020)
15829 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15830 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15831 #else
15832 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15833  || ('j' <= (c) && (c) <= 'r') \
15834  || ('s' <= (c) && (c) <= 'z'))
15835 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15836 #endif
15837 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15838 int main () { int i; for (i = 0; i < 256; i++)
15839 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
15840 exit (0); }
15841
15842 EOF
15843 if { (eval echo configure:15844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15844 then
15845   :
15846 else
15847   echo "configure: failed program was:" >&5
15848   cat conftest.$ac_ext >&5
15849   rm -fr conftest*
15850   ac_cv_header_stdc=no
15851 fi
15852 rm -fr conftest*
15853 fi
15854
15855 fi
15856 fi
15857
15858 echo "$ac_t""$ac_cv_header_stdc" 1>&6
15859 if test $ac_cv_header_stdc = yes; then
15860   cat >> confdefs.h <<\EOF
15861 #define STDC_HEADERS 1
15862 EOF
15863
15864 fi
15865
15866 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
15867 echo "configure:15868: checking for mode_t" >&5
15868 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
15869   echo $ac_n "(cached) $ac_c" 1>&6
15870 else
15871   cat > conftest.$ac_ext <<EOF
15872 #line 15873 "configure"
15873 #include "confdefs.h"
15874 #include <sys/types.h>
15875 #if STDC_HEADERS
15876 #include <stdlib.h>
15877 #include <stddef.h>
15878 #endif
15879
15880 EOF
15881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15882   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15883   rm -rf conftest*
15884   eval "ac_cv_type_mode_t=yes"
15885 else
15886   rm -rf conftest*
15887   eval "ac_cv_type_mode_t=no"
15888 fi
15889 rm -f conftest*
15890
15891 fi
15892 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
15893   echo "$ac_t""yes" 1>&6
15894 else
15895   echo "$ac_t""no" 1>&6
15896   cat >> confdefs.h <<EOF
15897 #define mode_t int
15898 EOF
15899
15900 fi
15901
15902 echo $ac_n "checking for off_t""... $ac_c" 1>&6
15903 echo "configure:15904: checking for off_t" >&5
15904 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
15905   echo $ac_n "(cached) $ac_c" 1>&6
15906 else
15907   cat > conftest.$ac_ext <<EOF
15908 #line 15909 "configure"
15909 #include "confdefs.h"
15910 #include <sys/types.h>
15911 #if STDC_HEADERS
15912 #include <stdlib.h>
15913 #include <stddef.h>
15914 #endif
15915
15916 EOF
15917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15918   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15919   rm -rf conftest*
15920   eval "ac_cv_type_off_t=yes"
15921 else
15922   rm -rf conftest*
15923   eval "ac_cv_type_off_t=no"
15924 fi
15925 rm -f conftest*
15926
15927 fi
15928 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
15929   echo "$ac_t""yes" 1>&6
15930 else
15931   echo "$ac_t""no" 1>&6
15932   cat >> confdefs.h <<EOF
15933 #define off_t long
15934 EOF
15935
15936 fi
15937
15938 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
15939 echo "configure:15940: checking for pid_t" >&5
15940 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
15941   echo $ac_n "(cached) $ac_c" 1>&6
15942 else
15943   cat > conftest.$ac_ext <<EOF
15944 #line 15945 "configure"
15945 #include "confdefs.h"
15946 #include <sys/types.h>
15947 #if STDC_HEADERS
15948 #include <stdlib.h>
15949 #include <stddef.h>
15950 #endif
15951
15952 EOF
15953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15954   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15955   rm -rf conftest*
15956   eval "ac_cv_type_pid_t=yes"
15957 else
15958   rm -rf conftest*
15959   eval "ac_cv_type_pid_t=no"
15960 fi
15961 rm -f conftest*
15962
15963 fi
15964 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
15965   echo "$ac_t""yes" 1>&6
15966 else
15967   echo "$ac_t""no" 1>&6
15968   cat >> confdefs.h <<EOF
15969 #define pid_t int
15970 EOF
15971
15972 fi
15973
15974 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
15975 echo "configure:15976: checking for ptrdiff_t" >&5
15976 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
15977   echo $ac_n "(cached) $ac_c" 1>&6
15978 else
15979   cat > conftest.$ac_ext <<EOF
15980 #line 15981 "configure"
15981 #include "confdefs.h"
15982 #include <stddef.h>
15983 int main() {
15984 ptrdiff_t p
15985 ; return 0; }
15986 EOF
15987 if { (eval echo configure:15988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15988   rm -rf conftest*
15989   am_cv_type_ptrdiff_t=yes
15990 else
15991   echo "configure: failed program was:" >&5
15992   cat conftest.$ac_ext >&5
15993   rm -rf conftest*
15994   am_cv_type_ptrdiff_t=no
15995 fi
15996 rm -f conftest*
15997 fi
15998
15999 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
16000    if test $am_cv_type_ptrdiff_t = yes; then
16001      cat >> confdefs.h <<\EOF
16002 #define HAVE_PTRDIFF_T 1
16003 EOF
16004
16005    fi
16006
16007 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
16008 echo "configure:16009: checking return type of signal handlers" >&5
16009 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
16010   echo $ac_n "(cached) $ac_c" 1>&6
16011 else
16012   cat > conftest.$ac_ext <<EOF
16013 #line 16014 "configure"
16014 #include "confdefs.h"
16015 #include <sys/types.h>
16016 #include <signal.h>
16017 #ifdef signal
16018 #undef signal
16019 #endif
16020 #ifdef __cplusplus
16021 extern "C" void (*signal (int, void (*)(int)))(int);
16022 #else
16023 void (*signal ()) ();
16024 #endif
16025
16026 int main() {
16027 int i;
16028 ; return 0; }
16029 EOF
16030 if { (eval echo configure:16031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16031   rm -rf conftest*
16032   ac_cv_type_signal=void
16033 else
16034   echo "configure: failed program was:" >&5
16035   cat conftest.$ac_ext >&5
16036   rm -rf conftest*
16037   ac_cv_type_signal=int
16038 fi
16039 rm -f conftest*
16040 fi
16041
16042 echo "$ac_t""$ac_cv_type_signal" 1>&6
16043 cat >> confdefs.h <<EOF
16044 #define RETSIGTYPE $ac_cv_type_signal
16045 EOF
16046
16047
16048 echo $ac_n "checking for size_t""... $ac_c" 1>&6
16049 echo "configure:16050: checking for size_t" >&5
16050 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
16051   echo $ac_n "(cached) $ac_c" 1>&6
16052 else
16053   cat > conftest.$ac_ext <<EOF
16054 #line 16055 "configure"
16055 #include "confdefs.h"
16056 #include <sys/types.h>
16057 #if STDC_HEADERS
16058 #include <stdlib.h>
16059 #include <stddef.h>
16060 #endif
16061
16062 EOF
16063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16064   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16065   rm -rf conftest*
16066   eval "ac_cv_type_size_t=yes"
16067 else
16068   rm -rf conftest*
16069   eval "ac_cv_type_size_t=no"
16070 fi
16071 rm -f conftest*
16072
16073 fi
16074 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
16075   echo "$ac_t""yes" 1>&6
16076 else
16077   echo "$ac_t""no" 1>&6
16078   cat >> confdefs.h <<EOF
16079 #define size_t unsigned
16080 EOF
16081
16082 fi
16083
16084
16085 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
16086 echo "configure:16087: checking for ssize_t" >&5
16087 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
16088   echo $ac_n "(cached) $ac_c" 1>&6
16089 else
16090   cat > conftest.$ac_ext <<EOF
16091 #line 16092 "configure"
16092 #include "confdefs.h"
16093 #include <sys/types.h>
16094 #if STDC_HEADERS
16095 #include <stdlib.h>
16096 #include <stddef.h>
16097 #endif
16098
16099 EOF
16100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16101   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16102   rm -rf conftest*
16103   eval "ac_cv_type_ssize_t=yes"
16104 else
16105   rm -rf conftest*
16106   eval "ac_cv_type_ssize_t=no"
16107 fi
16108 rm -f conftest*
16109
16110 fi
16111 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
16112   echo "$ac_t""yes" 1>&6
16113 else
16114   echo "$ac_t""no" 1>&6
16115   cat >> confdefs.h <<EOF
16116 #define ssize_t signed int
16117 EOF
16118
16119 fi
16120
16121 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
16122 echo "configure:16123: checking for caddr_t" >&5
16123 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
16124   echo $ac_n "(cached) $ac_c" 1>&6
16125 else
16126   cat > conftest.$ac_ext <<EOF
16127 #line 16128 "configure"
16128 #include "confdefs.h"
16129 #include <sys/types.h>
16130 #if STDC_HEADERS
16131 #include <stdlib.h>
16132 #include <stddef.h>
16133 #endif
16134
16135 EOF
16136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16137   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16138   rm -rf conftest*
16139   eval "ac_cv_type_caddr_t=yes"
16140 else
16141   rm -rf conftest*
16142   eval "ac_cv_type_caddr_t=no"
16143 fi
16144 rm -f conftest*
16145
16146 fi
16147 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
16148   echo "$ac_t""yes" 1>&6
16149 else
16150   echo "$ac_t""no" 1>&6
16151   cat >> confdefs.h <<EOF
16152 #define caddr_t char *
16153 EOF
16154
16155 fi
16156
16157
16158 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
16159 echo "configure:16160: checking for socklen_t" >&5
16160 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
16161   echo $ac_n "(cached) $ac_c" 1>&6
16162 else
16163   cat > conftest.$ac_ext <<EOF
16164 #line 16165 "configure"
16165 #include "confdefs.h"
16166
16167 #ifdef HAVE_SYS_TYPES_H
16168 #include <sys/types.h>
16169 #endif
16170 #ifdef HAVE_SYS_SOCKET_H
16171 #include <sys/socket.h>
16172 #endif
16173
16174 int main() {
16175 socklen_t len;
16176 ; return 0; }
16177 EOF
16178 if { (eval echo configure:16179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16179   rm -rf conftest*
16180   ol_cv_type_socklen_t=yes
16181 else
16182   echo "configure: failed program was:" >&5
16183   cat conftest.$ac_ext >&5
16184   rm -rf conftest*
16185   ol_cv_type_socklen_t=no
16186 fi
16187 rm -f conftest*
16188 fi
16189
16190 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
16191   if test $ol_cv_type_socklen_t = no; then
16192     cat >> confdefs.h <<\EOF
16193 #define socklen_t int
16194 EOF
16195
16196   fi
16197  
16198 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
16199 echo "configure:16200: checking for member st_blksize in aggregate type struct stat" >&5
16200 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
16201   echo $ac_n "(cached) $ac_c" 1>&6
16202 else
16203   cat > conftest.$ac_ext <<EOF
16204 #line 16205 "configure"
16205 #include "confdefs.h"
16206 #include <sys/types.h>
16207 #include <sys/stat.h>
16208 int main() {
16209 struct stat foo; foo.st_blksize;
16210 ; return 0; }
16211 EOF
16212 if { (eval echo configure:16213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16213   rm -rf conftest*
16214   ac_cv_c_struct_member_st_blksize=yes
16215 else
16216   echo "configure: failed program was:" >&5
16217   cat conftest.$ac_ext >&5
16218   rm -rf conftest*
16219   ac_cv_c_struct_member_st_blksize=no
16220 fi
16221 rm -f conftest*
16222 fi
16223
16224 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
16225 st_blksize="$ac_cv_c_struct_member_st_blksize"
16226 if test $ac_cv_c_struct_member_st_blksize = yes; then
16227   cat >> confdefs.h <<\EOF
16228 #define HAVE_ST_BLKSIZE 1
16229 EOF
16230
16231 fi
16232
16233 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
16234 echo "configure:16235: checking whether time.h and sys/time.h may both be included" >&5
16235 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
16236   echo $ac_n "(cached) $ac_c" 1>&6
16237 else
16238   cat > conftest.$ac_ext <<EOF
16239 #line 16240 "configure"
16240 #include "confdefs.h"
16241 #include <sys/types.h>
16242 #include <sys/time.h>
16243 #include <time.h>
16244 int main() {
16245 struct tm *tp;
16246 ; return 0; }
16247 EOF
16248 if { (eval echo configure:16249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16249   rm -rf conftest*
16250   ac_cv_header_time=yes
16251 else
16252   echo "configure: failed program was:" >&5
16253   cat conftest.$ac_ext >&5
16254   rm -rf conftest*
16255   ac_cv_header_time=no
16256 fi
16257 rm -f conftest*
16258 fi
16259
16260 echo "$ac_t""$ac_cv_header_time" 1>&6
16261 if test $ac_cv_header_time = yes; then
16262   cat >> confdefs.h <<\EOF
16263 #define TIME_WITH_SYS_TIME 1
16264 EOF
16265
16266 fi
16267
16268 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
16269 echo "configure:16270: checking whether struct tm is in sys/time.h or time.h" >&5
16270 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
16271   echo $ac_n "(cached) $ac_c" 1>&6
16272 else
16273   cat > conftest.$ac_ext <<EOF
16274 #line 16275 "configure"
16275 #include "confdefs.h"
16276 #include <sys/types.h>
16277 #include <time.h>
16278 int main() {
16279 struct tm *tp; tp->tm_sec;
16280 ; return 0; }
16281 EOF
16282 if { (eval echo configure:16283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16283   rm -rf conftest*
16284   ac_cv_struct_tm=time.h
16285 else
16286   echo "configure: failed program was:" >&5
16287   cat conftest.$ac_ext >&5
16288   rm -rf conftest*
16289   ac_cv_struct_tm=sys/time.h
16290 fi
16291 rm -f conftest*
16292 fi
16293
16294 echo "$ac_t""$ac_cv_struct_tm" 1>&6
16295 if test $ac_cv_struct_tm = sys/time.h; then
16296   cat >> confdefs.h <<\EOF
16297 #define TM_IN_SYS_TIME 1
16298 EOF
16299
16300 fi
16301
16302 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
16303 echo "configure:16304: checking for uid_t in sys/types.h" >&5
16304 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
16305   echo $ac_n "(cached) $ac_c" 1>&6
16306 else
16307   cat > conftest.$ac_ext <<EOF
16308 #line 16309 "configure"
16309 #include "confdefs.h"
16310 #include <sys/types.h>
16311 EOF
16312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16313   egrep "uid_t" >/dev/null 2>&1; then
16314   rm -rf conftest*
16315   ac_cv_type_uid_t=yes
16316 else
16317   rm -rf conftest*
16318   ac_cv_type_uid_t=no
16319 fi
16320 rm -f conftest*
16321
16322 fi
16323
16324 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
16325 if test $ac_cv_type_uid_t = no; then
16326   cat >> confdefs.h <<\EOF
16327 #define uid_t int
16328 EOF
16329
16330   cat >> confdefs.h <<\EOF
16331 #define gid_t int
16332 EOF
16333
16334 fi
16335
16336 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
16337 echo "configure:16338: checking for sig_atomic_t" >&5
16338 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
16339   echo $ac_n "(cached) $ac_c" 1>&6
16340 else
16341   cat > conftest.$ac_ext <<EOF
16342 #line 16343 "configure"
16343 #include "confdefs.h"
16344 #include <signal.h>
16345 int main() {
16346 sig_atomic_t atomic;
16347 ; return 0; }
16348 EOF
16349 if { (eval echo configure:16350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16350   rm -rf conftest*
16351   ol_cv_type_sig_atomic_t=yes
16352 else
16353   echo "configure: failed program was:" >&5
16354   cat conftest.$ac_ext >&5
16355   rm -rf conftest*
16356   ol_cv_type_sig_atomic_t=no
16357 fi
16358 rm -f conftest*
16359 fi
16360
16361 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
16362   if test $ol_cv_type_sig_atomic_t = no; then
16363     cat >> confdefs.h <<\EOF
16364 #define sig_atomic_t int
16365 EOF
16366
16367   fi
16368  
16369
16370
16371 # test for pw_gecos in struct passwd
16372 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
16373 echo "configure:16374: checking struct passwd for pw_gecos" >&5
16374 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
16375   echo $ac_n "(cached) $ac_c" 1>&6
16376 else
16377   
16378         cat > conftest.$ac_ext <<EOF
16379 #line 16380 "configure"
16380 #include "confdefs.h"
16381 #include <pwd.h>
16382 int main() {
16383
16384         struct passwd pwd;
16385         pwd.pw_gecos = pwd.pw_name;
16386
16387 ; return 0; }
16388 EOF
16389 if { (eval echo configure:16390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16390   rm -rf conftest*
16391   ol_cv_struct_passwd_pw_gecos=yes
16392 else
16393   echo "configure: failed program was:" >&5
16394   cat conftest.$ac_ext >&5
16395   rm -rf conftest*
16396   ol_cv_struct_passwd_pw_gecos=no
16397 fi
16398 rm -f conftest*
16399 fi
16400
16401 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
16402 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
16403         cat >> confdefs.h <<\EOF
16404 #define HAVE_PW_GECOS 1
16405 EOF
16406
16407 fi
16408
16409 # test for pw_passwd in struct passwd
16410 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
16411 echo "configure:16412: checking struct passwd for pw_passwd" >&5
16412 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
16413   echo $ac_n "(cached) $ac_c" 1>&6
16414 else
16415   
16416         cat > conftest.$ac_ext <<EOF
16417 #line 16418 "configure"
16418 #include "confdefs.h"
16419 #include <pwd.h>
16420 int main() {
16421
16422         struct passwd pwd;
16423         pwd.pw_passwd = pwd.pw_name;
16424
16425 ; return 0; }
16426 EOF
16427 if { (eval echo configure:16428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16428   rm -rf conftest*
16429   ol_cv_struct_passwd_pw_passwd=yes
16430 else
16431   echo "configure: failed program was:" >&5
16432   cat conftest.$ac_ext >&5
16433   rm -rf conftest*
16434   ol_cv_struct_passwd_pw_passwd=no
16435 fi
16436 rm -f conftest*
16437 fi
16438
16439 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
16440 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
16441         cat >> confdefs.h <<\EOF
16442 #define HAVE_PW_PASSWD 1
16443 EOF
16444
16445 fi
16446
16447
16448 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
16449 echo "configure:16450: checking if toupper() requires islower()" >&5
16450 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
16451   echo $ac_n "(cached) $ac_c" 1>&6
16452 else
16453   
16454         if test "$cross_compiling" = yes; then
16455   ol_cv_c_upper_lower=safe
16456 else
16457   cat > conftest.$ac_ext <<EOF
16458 #line 16459 "configure"
16459 #include "confdefs.h"
16460
16461 #include <ctype.h>
16462 main()
16463 {
16464         if ('C' == toupper('C'))
16465                 exit(0);
16466         else
16467                 exit(1);
16468 }
16469 EOF
16470 if { (eval echo configure:16471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16471 then
16472   ol_cv_c_upper_lower=no
16473 else
16474   echo "configure: failed program was:" >&5
16475   cat conftest.$ac_ext >&5
16476   rm -fr conftest*
16477   ol_cv_c_upper_lower=yes
16478 fi
16479 rm -fr conftest*
16480 fi
16481
16482 fi
16483
16484 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
16485 if test $ol_cv_c_upper_lower != no ; then
16486         cat >> confdefs.h <<\EOF
16487 #define C_UPPER_LOWER 1
16488 EOF
16489
16490 fi
16491
16492 echo $ac_n "checking for working const""... $ac_c" 1>&6
16493 echo "configure:16494: checking for working const" >&5
16494 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
16495   echo $ac_n "(cached) $ac_c" 1>&6
16496 else
16497   cat > conftest.$ac_ext <<EOF
16498 #line 16499 "configure"
16499 #include "confdefs.h"
16500
16501 int main() {
16502
16503 /* Ultrix mips cc rejects this.  */
16504 typedef int charset[2]; const charset x;
16505 /* SunOS 4.1.1 cc rejects this.  */
16506 char const *const *ccp;
16507 char **p;
16508 /* NEC SVR4.0.2 mips cc rejects this.  */
16509 struct point {int x, y;};
16510 static struct point const zero = {0,0};
16511 /* AIX XL C 1.02.0.0 rejects this.
16512    It does not let you subtract one const X* pointer from another in an arm
16513    of an if-expression whose if-part is not a constant expression */
16514 const char *g = "string";
16515 ccp = &g + (g ? g-g : 0);
16516 /* HPUX 7.0 cc rejects these. */
16517 ++ccp;
16518 p = (char**) ccp;
16519 ccp = (char const *const *) p;
16520 { /* SCO 3.2v4 cc rejects this.  */
16521   char *t;
16522   char const *s = 0 ? (char *) 0 : (char const *) 0;
16523
16524   *t++ = 0;
16525 }
16526 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16527   int x[] = {25, 17};
16528   const int *foo = &x[0];
16529   ++foo;
16530 }
16531 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16532   typedef const int *iptr;
16533   iptr p = 0;
16534   ++p;
16535 }
16536 { /* AIX XL C 1.02.0.0 rejects this saying
16537      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16538   struct s { int j; const int *ap[3]; };
16539   struct s *b; b->j = 5;
16540 }
16541 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16542   const int foo = 10;
16543 }
16544
16545 ; return 0; }
16546 EOF
16547 if { (eval echo configure:16548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16548   rm -rf conftest*
16549   ac_cv_c_const=yes
16550 else
16551   echo "configure: failed program was:" >&5
16552   cat conftest.$ac_ext >&5
16553   rm -rf conftest*
16554   ac_cv_c_const=no
16555 fi
16556 rm -f conftest*
16557 fi
16558
16559 echo "$ac_t""$ac_cv_c_const" 1>&6
16560 if test $ac_cv_c_const = no; then
16561   cat >> confdefs.h <<\EOF
16562 #define const 
16563 EOF
16564
16565 fi
16566
16567 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
16568 echo "configure:16569: checking if compiler understands volatile" >&5
16569 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
16570   echo $ac_n "(cached) $ac_c" 1>&6
16571 else
16572   cat > conftest.$ac_ext <<EOF
16573 #line 16574 "configure"
16574 #include "confdefs.h"
16575 int x, y, z;
16576 int main() {
16577 volatile int a; int * volatile b = x ? &y : &z;
16578       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
16579       *b = 0;
16580 ; return 0; }
16581 EOF
16582 if { (eval echo configure:16583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16583   rm -rf conftest*
16584   ol_cv_c_volatile=yes
16585 else
16586   echo "configure: failed program was:" >&5
16587   cat conftest.$ac_ext >&5
16588   rm -rf conftest*
16589   ol_cv_c_volatile=no
16590 fi
16591 rm -f conftest*
16592 fi
16593
16594 echo "$ac_t""$ol_cv_c_volatile" 1>&6
16595   if test $ol_cv_c_volatile = yes; then
16596     : 
16597   else
16598     cat >> confdefs.h <<\EOF
16599 #define volatile 
16600 EOF
16601
16602   fi
16603  
16604
16605 if test $cross_compiling = yes ; then
16606         cat >> confdefs.h <<\EOF
16607 #define CROSS_COMPILING 1
16608 EOF
16609
16610 else
16611         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
16612 echo "configure:16613: checking whether byte ordering is bigendian" >&5
16613 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
16614   echo $ac_n "(cached) $ac_c" 1>&6
16615 else
16616   ac_cv_c_bigendian=unknown
16617 # See if sys/param.h defines the BYTE_ORDER macro.
16618 cat > conftest.$ac_ext <<EOF
16619 #line 16620 "configure"
16620 #include "confdefs.h"
16621 #include <sys/types.h>
16622 #include <sys/param.h>
16623 int main() {
16624
16625 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16626  bogus endian macros
16627 #endif
16628 ; return 0; }
16629 EOF
16630 if { (eval echo configure:16631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16631   rm -rf conftest*
16632   # It does; now see whether it defined to BIG_ENDIAN or not.
16633 cat > conftest.$ac_ext <<EOF
16634 #line 16635 "configure"
16635 #include "confdefs.h"
16636 #include <sys/types.h>
16637 #include <sys/param.h>
16638 int main() {
16639
16640 #if BYTE_ORDER != BIG_ENDIAN
16641  not big endian
16642 #endif
16643 ; return 0; }
16644 EOF
16645 if { (eval echo configure:16646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16646   rm -rf conftest*
16647   ac_cv_c_bigendian=yes
16648 else
16649   echo "configure: failed program was:" >&5
16650   cat conftest.$ac_ext >&5
16651   rm -rf conftest*
16652   ac_cv_c_bigendian=no
16653 fi
16654 rm -f conftest*
16655 else
16656   echo "configure: failed program was:" >&5
16657   cat conftest.$ac_ext >&5
16658 fi
16659 rm -f conftest*
16660 if test $ac_cv_c_bigendian = unknown; then
16661 if test "$cross_compiling" = yes; then
16662     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
16663 else
16664   cat > conftest.$ac_ext <<EOF
16665 #line 16666 "configure"
16666 #include "confdefs.h"
16667 main () {
16668   /* Are we little or big endian?  From Harbison&Steele.  */
16669   union
16670   {
16671     long l;
16672     char c[sizeof (long)];
16673   } u;
16674   u.l = 1;
16675   exit (u.c[sizeof (long) - 1] == 1);
16676 }
16677 EOF
16678 if { (eval echo configure:16679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16679 then
16680   ac_cv_c_bigendian=no
16681 else
16682   echo "configure: failed program was:" >&5
16683   cat conftest.$ac_ext >&5
16684   rm -fr conftest*
16685   ac_cv_c_bigendian=yes
16686 fi
16687 rm -fr conftest*
16688 fi
16689
16690 fi
16691 fi
16692
16693 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
16694 if test $ac_cv_c_bigendian = yes; then
16695   cat >> confdefs.h <<\EOF
16696 #define WORDS_BIGENDIAN 1
16697 EOF
16698
16699 fi
16700
16701 fi
16702
16703 echo $ac_n "checking size of short""... $ac_c" 1>&6
16704 echo "configure:16705: checking size of short" >&5 
16705 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
16706   echo $ac_n "(cached) $ac_c" 1>&6
16707 else
16708   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16709   cat > conftest.$ac_ext <<EOF
16710 #line 16711 "configure"
16711 #include "confdefs.h"
16712 #include "confdefs.h" 
16713 #include <sys/types.h> 
16714  
16715
16716 int main() {
16717 switch (0) case 0: case (sizeof (short) == $ac_size):;
16718 ; return 0; }
16719 EOF
16720 if { (eval echo configure:16721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16721   rm -rf conftest*
16722   ac_cv_sizeof_short=$ac_size
16723 else
16724   echo "configure: failed program was:" >&5
16725   cat conftest.$ac_ext >&5
16726 fi
16727 rm -f conftest* 
16728   if test x$ac_cv_sizeof_short != x ; then break; fi 
16729 done 
16730
16731 fi
16732  
16733 if test x$ac_cv_sizeof_short = x ; then 
16734   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
16735 fi 
16736 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
16737 cat >> confdefs.h <<EOF
16738 #define SIZEOF_SHORT $ac_cv_sizeof_short
16739 EOF
16740  
16741  
16742 echo $ac_n "checking size of int""... $ac_c" 1>&6
16743 echo "configure:16744: checking size of int" >&5 
16744 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
16745   echo $ac_n "(cached) $ac_c" 1>&6
16746 else
16747   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16748   cat > conftest.$ac_ext <<EOF
16749 #line 16750 "configure"
16750 #include "confdefs.h"
16751 #include "confdefs.h" 
16752 #include <sys/types.h> 
16753  
16754
16755 int main() {
16756 switch (0) case 0: case (sizeof (int) == $ac_size):;
16757 ; return 0; }
16758 EOF
16759 if { (eval echo configure:16760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16760   rm -rf conftest*
16761   ac_cv_sizeof_int=$ac_size
16762 else
16763   echo "configure: failed program was:" >&5
16764   cat conftest.$ac_ext >&5
16765 fi
16766 rm -f conftest* 
16767   if test x$ac_cv_sizeof_int != x ; then break; fi 
16768 done 
16769
16770 fi
16771  
16772 if test x$ac_cv_sizeof_int = x ; then 
16773   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
16774 fi 
16775 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
16776 cat >> confdefs.h <<EOF
16777 #define SIZEOF_INT $ac_cv_sizeof_int
16778 EOF
16779  
16780  
16781 echo $ac_n "checking size of long""... $ac_c" 1>&6
16782 echo "configure:16783: checking size of long" >&5 
16783 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
16784   echo $ac_n "(cached) $ac_c" 1>&6
16785 else
16786   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16787   cat > conftest.$ac_ext <<EOF
16788 #line 16789 "configure"
16789 #include "confdefs.h"
16790 #include "confdefs.h" 
16791 #include <sys/types.h> 
16792  
16793
16794 int main() {
16795 switch (0) case 0: case (sizeof (long) == $ac_size):;
16796 ; return 0; }
16797 EOF
16798 if { (eval echo configure:16799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16799   rm -rf conftest*
16800   ac_cv_sizeof_long=$ac_size
16801 else
16802   echo "configure: failed program was:" >&5
16803   cat conftest.$ac_ext >&5
16804 fi
16805 rm -f conftest* 
16806   if test x$ac_cv_sizeof_long != x ; then break; fi 
16807 done 
16808
16809 fi
16810  
16811 if test x$ac_cv_sizeof_long = x ; then 
16812   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
16813 fi 
16814 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
16815 cat >> confdefs.h <<EOF
16816 #define SIZEOF_LONG $ac_cv_sizeof_long
16817 EOF
16818  
16819
16820
16821 if test "$ac_cv_sizeof_int" -lt 4 ; then
16822         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
16823
16824         cat >> confdefs.h <<\EOF
16825 #define LBER_INT_T long
16826 EOF
16827
16828 else
16829         cat >> confdefs.h <<\EOF
16830 #define LBER_INT_T int
16831 EOF
16832
16833 fi
16834
16835 cat >> confdefs.h <<\EOF
16836 #define LBER_LEN_T long
16837 EOF
16838
16839 cat >> confdefs.h <<\EOF
16840 #define LBER_SOCKET_T int
16841 EOF
16842
16843 cat >> confdefs.h <<\EOF
16844 #define LBER_TAG_T long
16845 EOF
16846
16847
16848 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
16849 echo "configure:16850: checking for 8-bit clean memcmp" >&5
16850 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
16851   echo $ac_n "(cached) $ac_c" 1>&6
16852 else
16853   if test "$cross_compiling" = yes; then
16854   ac_cv_func_memcmp_clean=no
16855 else
16856   cat > conftest.$ac_ext <<EOF
16857 #line 16858 "configure"
16858 #include "confdefs.h"
16859
16860 main()
16861 {
16862   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
16863   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
16864 }
16865
16866 EOF
16867 if { (eval echo configure:16868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16868 then
16869   ac_cv_func_memcmp_clean=yes
16870 else
16871   echo "configure: failed program was:" >&5
16872   cat conftest.$ac_ext >&5
16873   rm -fr conftest*
16874   ac_cv_func_memcmp_clean=no
16875 fi
16876 rm -fr conftest*
16877 fi
16878
16879 fi
16880
16881 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
16882 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
16883
16884 echo $ac_n "checking for strftime""... $ac_c" 1>&6
16885 echo "configure:16886: checking for strftime" >&5
16886 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
16887   echo $ac_n "(cached) $ac_c" 1>&6
16888 else
16889   cat > conftest.$ac_ext <<EOF
16890 #line 16891 "configure"
16891 #include "confdefs.h"
16892 /* System header to define __stub macros and hopefully few prototypes,
16893     which can conflict with char strftime(); below.  */
16894 #include <assert.h>
16895 /* Override any gcc2 internal prototype to avoid an error.  */
16896 /* We use char because int might match the return type of a gcc2
16897     builtin and then its argument prototype would still apply.  */
16898 char strftime();
16899 char (*f)();
16900
16901 int main() {
16902
16903 /* The GNU C library defines this for functions which it implements
16904     to always fail with ENOSYS.  Some functions are actually named
16905     something starting with __ and the normal name is an alias.  */
16906 #if defined (__stub_strftime) || defined (__stub___strftime)
16907 choke me
16908 #else
16909 f = strftime;
16910 #endif
16911
16912 ; return 0; }
16913 EOF
16914 if { (eval echo configure:16915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16915   rm -rf conftest*
16916   eval "ac_cv_func_strftime=yes"
16917 else
16918   echo "configure: failed program was:" >&5
16919   cat conftest.$ac_ext >&5
16920   rm -rf conftest*
16921   eval "ac_cv_func_strftime=no"
16922 fi
16923 rm -f conftest*
16924 fi
16925
16926 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
16927   echo "$ac_t""yes" 1>&6
16928   cat >> confdefs.h <<\EOF
16929 #define HAVE_STRFTIME 1
16930 EOF
16931
16932 else
16933   echo "$ac_t""no" 1>&6
16934 # strftime is in -lintl on SCO UNIX.
16935 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
16936 echo "configure:16937: checking for strftime in -lintl" >&5
16937 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
16938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16939   echo $ac_n "(cached) $ac_c" 1>&6
16940 else
16941   ac_save_LIBS="$LIBS"
16942 LIBS="-lintl  $LIBS"
16943 cat > conftest.$ac_ext <<EOF
16944 #line 16945 "configure"
16945 #include "confdefs.h"
16946 /* Override any gcc2 internal prototype to avoid an error.  */
16947 /* We use char because int might match the return type of a gcc2
16948     builtin and then its argument prototype would still apply.  */
16949 char strftime();
16950
16951 int main() {
16952 strftime()
16953 ; return 0; }
16954 EOF
16955 if { (eval echo configure:16956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16956   rm -rf conftest*
16957   eval "ac_cv_lib_$ac_lib_var=yes"
16958 else
16959   echo "configure: failed program was:" >&5
16960   cat conftest.$ac_ext >&5
16961   rm -rf conftest*
16962   eval "ac_cv_lib_$ac_lib_var=no"
16963 fi
16964 rm -f conftest*
16965 LIBS="$ac_save_LIBS"
16966
16967 fi
16968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16969   echo "$ac_t""yes" 1>&6
16970   cat >> confdefs.h <<\EOF
16971 #define HAVE_STRFTIME 1
16972 EOF
16973
16974 LIBS="-lintl $LIBS"
16975 else
16976   echo "$ac_t""no" 1>&6
16977 fi
16978
16979 fi
16980
16981
16982 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
16983 echo "configure:16984: checking for inet_aton()" >&5
16984 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
16985   echo $ac_n "(cached) $ac_c" 1>&6
16986 else
16987   cat > conftest.$ac_ext <<EOF
16988 #line 16989 "configure"
16989 #include "confdefs.h"
16990
16991 #ifdef HAVE_SYS_TYPES_H
16992 #       include <sys/types.h>
16993 #endif
16994 #ifdef HAVE_SYS_SOCKET_H
16995 #       include <sys/socket.h>
16996 #       ifdef HAVE_SYS_SELECT_H
16997 #               include <sys/select.h>
16998 #       endif
16999 #       include <netinet/in.h>
17000 #       ifdef HAVE_ARPA_INET_H
17001 #               include <arpa/inet.h>
17002 #       endif
17003 #endif
17004
17005 int main() {
17006 struct in_addr in;
17007 int rc = inet_aton( "255.255.255.255", &in );
17008 ; return 0; }
17009 EOF
17010 if { (eval echo configure:17011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17011   rm -rf conftest*
17012   ol_cv_func_inet_aton=yes
17013 else
17014   echo "configure: failed program was:" >&5
17015   cat conftest.$ac_ext >&5
17016   rm -rf conftest*
17017   ol_cv_func_inet_aton=no
17018 fi
17019 rm -f conftest*
17020 fi
17021
17022 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
17023   if test $ol_cv_func_inet_aton != no; then
17024     cat >> confdefs.h <<\EOF
17025 #define HAVE_INET_ATON 1
17026 EOF
17027
17028   fi
17029  
17030
17031 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
17032 echo "configure:17033: checking for _spawnlp" >&5
17033 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
17034   echo $ac_n "(cached) $ac_c" 1>&6
17035 else
17036   cat > conftest.$ac_ext <<EOF
17037 #line 17038 "configure"
17038 #include "confdefs.h"
17039 /* System header to define __stub macros and hopefully few prototypes,
17040     which can conflict with char _spawnlp(); below.  */
17041 #include <assert.h>
17042 /* Override any gcc2 internal prototype to avoid an error.  */
17043 /* We use char because int might match the return type of a gcc2
17044     builtin and then its argument prototype would still apply.  */
17045 char _spawnlp();
17046 char (*f)();
17047
17048 int main() {
17049
17050 /* The GNU C library defines this for functions which it implements
17051     to always fail with ENOSYS.  Some functions are actually named
17052     something starting with __ and the normal name is an alias.  */
17053 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
17054 choke me
17055 #else
17056 f = _spawnlp;
17057 #endif
17058
17059 ; return 0; }
17060 EOF
17061 if { (eval echo configure:17062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17062   rm -rf conftest*
17063   eval "ac_cv_func__spawnlp=yes"
17064 else
17065   echo "configure: failed program was:" >&5
17066   cat conftest.$ac_ext >&5
17067   rm -rf conftest*
17068   eval "ac_cv_func__spawnlp=no"
17069 fi
17070 rm -f conftest*
17071 fi
17072
17073 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
17074   echo "$ac_t""yes" 1>&6
17075   cat >> confdefs.h <<\EOF
17076 #define HAVE_SPAWNLP 1
17077 EOF
17078
17079 else
17080   echo "$ac_t""no" 1>&6
17081 fi
17082
17083
17084 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
17085 echo "configure:17086: checking for _snprintf" >&5
17086 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
17087   echo $ac_n "(cached) $ac_c" 1>&6
17088 else
17089   cat > conftest.$ac_ext <<EOF
17090 #line 17091 "configure"
17091 #include "confdefs.h"
17092 /* System header to define __stub macros and hopefully few prototypes,
17093     which can conflict with char _snprintf(); below.  */
17094 #include <assert.h>
17095 /* Override any gcc2 internal prototype to avoid an error.  */
17096 /* We use char because int might match the return type of a gcc2
17097     builtin and then its argument prototype would still apply.  */
17098 char _snprintf();
17099 char (*f)();
17100
17101 int main() {
17102
17103 /* The GNU C library defines this for functions which it implements
17104     to always fail with ENOSYS.  Some functions are actually named
17105     something starting with __ and the normal name is an alias.  */
17106 #if defined (__stub__snprintf) || defined (__stub____snprintf)
17107 choke me
17108 #else
17109 f = _snprintf;
17110 #endif
17111
17112 ; return 0; }
17113 EOF
17114 if { (eval echo configure:17115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17115   rm -rf conftest*
17116   eval "ac_cv_func__snprintf=yes"
17117 else
17118   echo "configure: failed program was:" >&5
17119   cat conftest.$ac_ext >&5
17120   rm -rf conftest*
17121   eval "ac_cv_func__snprintf=no"
17122 fi
17123 rm -f conftest*
17124 fi
17125
17126 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
17127   echo "$ac_t""yes" 1>&6
17128   ac_cv_func_snprintf=yes
17129         cat >> confdefs.h <<\EOF
17130 #define snprintf _snprintf
17131 EOF
17132
17133
17134 else
17135   echo "$ac_t""no" 1>&6
17136 fi
17137
17138
17139 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
17140 echo "configure:17141: checking for _vsnprintf" >&5
17141 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
17142   echo $ac_n "(cached) $ac_c" 1>&6
17143 else
17144   cat > conftest.$ac_ext <<EOF
17145 #line 17146 "configure"
17146 #include "confdefs.h"
17147 /* System header to define __stub macros and hopefully few prototypes,
17148     which can conflict with char _vsnprintf(); below.  */
17149 #include <assert.h>
17150 /* Override any gcc2 internal prototype to avoid an error.  */
17151 /* We use char because int might match the return type of a gcc2
17152     builtin and then its argument prototype would still apply.  */
17153 char _vsnprintf();
17154 char (*f)();
17155
17156 int main() {
17157
17158 /* The GNU C library defines this for functions which it implements
17159     to always fail with ENOSYS.  Some functions are actually named
17160     something starting with __ and the normal name is an alias.  */
17161 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
17162 choke me
17163 #else
17164 f = _vsnprintf;
17165 #endif
17166
17167 ; return 0; }
17168 EOF
17169 if { (eval echo configure:17170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17170   rm -rf conftest*
17171   eval "ac_cv_func__vsnprintf=yes"
17172 else
17173   echo "configure: failed program was:" >&5
17174   cat conftest.$ac_ext >&5
17175   rm -rf conftest*
17176   eval "ac_cv_func__vsnprintf=no"
17177 fi
17178 rm -f conftest*
17179 fi
17180
17181 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
17182   echo "$ac_t""yes" 1>&6
17183   ac_cv_func_vsnprintf=yes
17184         cat >> confdefs.h <<\EOF
17185 #define vsnprintf _vsnprintf
17186 EOF
17187
17188
17189 else
17190   echo "$ac_t""no" 1>&6
17191 fi
17192
17193
17194 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
17195 echo "configure:17196: checking for vprintf" >&5
17196 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
17197   echo $ac_n "(cached) $ac_c" 1>&6
17198 else
17199   cat > conftest.$ac_ext <<EOF
17200 #line 17201 "configure"
17201 #include "confdefs.h"
17202 /* System header to define __stub macros and hopefully few prototypes,
17203     which can conflict with char vprintf(); below.  */
17204 #include <assert.h>
17205 /* Override any gcc2 internal prototype to avoid an error.  */
17206 /* We use char because int might match the return type of a gcc2
17207     builtin and then its argument prototype would still apply.  */
17208 char vprintf();
17209 char (*f)();
17210
17211 int main() {
17212
17213 /* The GNU C library defines this for functions which it implements
17214     to always fail with ENOSYS.  Some functions are actually named
17215     something starting with __ and the normal name is an alias.  */
17216 #if defined (__stub_vprintf) || defined (__stub___vprintf)
17217 choke me
17218 #else
17219 f = vprintf;
17220 #endif
17221
17222 ; return 0; }
17223 EOF
17224 if { (eval echo configure:17225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17225   rm -rf conftest*
17226   eval "ac_cv_func_vprintf=yes"
17227 else
17228   echo "configure: failed program was:" >&5
17229   cat conftest.$ac_ext >&5
17230   rm -rf conftest*
17231   eval "ac_cv_func_vprintf=no"
17232 fi
17233 rm -f conftest*
17234 fi
17235
17236 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
17237   echo "$ac_t""yes" 1>&6
17238   cat >> confdefs.h <<\EOF
17239 #define HAVE_VPRINTF 1
17240 EOF
17241
17242 else
17243   echo "$ac_t""no" 1>&6
17244 fi
17245
17246 if test "$ac_cv_func_vprintf" != yes; then
17247 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
17248 echo "configure:17249: checking for _doprnt" >&5
17249 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
17250   echo $ac_n "(cached) $ac_c" 1>&6
17251 else
17252   cat > conftest.$ac_ext <<EOF
17253 #line 17254 "configure"
17254 #include "confdefs.h"
17255 /* System header to define __stub macros and hopefully few prototypes,
17256     which can conflict with char _doprnt(); below.  */
17257 #include <assert.h>
17258 /* Override any gcc2 internal prototype to avoid an error.  */
17259 /* We use char because int might match the return type of a gcc2
17260     builtin and then its argument prototype would still apply.  */
17261 char _doprnt();
17262 char (*f)();
17263
17264 int main() {
17265
17266 /* The GNU C library defines this for functions which it implements
17267     to always fail with ENOSYS.  Some functions are actually named
17268     something starting with __ and the normal name is an alias.  */
17269 #if defined (__stub__doprnt) || defined (__stub____doprnt)
17270 choke me
17271 #else
17272 f = _doprnt;
17273 #endif
17274
17275 ; return 0; }
17276 EOF
17277 if { (eval echo configure:17278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17278   rm -rf conftest*
17279   eval "ac_cv_func__doprnt=yes"
17280 else
17281   echo "configure: failed program was:" >&5
17282   cat conftest.$ac_ext >&5
17283   rm -rf conftest*
17284   eval "ac_cv_func__doprnt=no"
17285 fi
17286 rm -f conftest*
17287 fi
17288
17289 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
17290   echo "$ac_t""yes" 1>&6
17291   cat >> confdefs.h <<\EOF
17292 #define HAVE_DOPRNT 1
17293 EOF
17294
17295 else
17296   echo "$ac_t""no" 1>&6
17297 fi
17298
17299 fi
17300
17301
17302 if test $ac_cv_func_vprintf = yes ; then
17303                 for ac_func in vsnprintf vsprintf
17304 do
17305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17306 echo "configure:17307: checking for $ac_func" >&5
17307 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17308   echo $ac_n "(cached) $ac_c" 1>&6
17309 else
17310   cat > conftest.$ac_ext <<EOF
17311 #line 17312 "configure"
17312 #include "confdefs.h"
17313 /* System header to define __stub macros and hopefully few prototypes,
17314     which can conflict with char $ac_func(); below.  */
17315 #include <assert.h>
17316 /* Override any gcc2 internal prototype to avoid an error.  */
17317 /* We use char because int might match the return type of a gcc2
17318     builtin and then its argument prototype would still apply.  */
17319 char $ac_func();
17320 char (*f)();
17321
17322 int main() {
17323
17324 /* The GNU C library defines this for functions which it implements
17325     to always fail with ENOSYS.  Some functions are actually named
17326     something starting with __ and the normal name is an alias.  */
17327 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17328 choke me
17329 #else
17330 f = $ac_func;
17331 #endif
17332
17333 ; return 0; }
17334 EOF
17335 if { (eval echo configure:17336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17336   rm -rf conftest*
17337   eval "ac_cv_func_$ac_func=yes"
17338 else
17339   echo "configure: failed program was:" >&5
17340   cat conftest.$ac_ext >&5
17341   rm -rf conftest*
17342   eval "ac_cv_func_$ac_func=no"
17343 fi
17344 rm -f conftest*
17345 fi
17346
17347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17348   echo "$ac_t""yes" 1>&6
17349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17350   cat >> confdefs.h <<EOF
17351 #define $ac_tr_func 1
17352 EOF
17353  
17354 else
17355   echo "$ac_t""no" 1>&6
17356 fi
17357 done
17358
17359 fi
17360
17361 for ac_func in \
17362         bcopy                   \
17363         closesocket             \
17364         chroot                  \
17365         endgrent                \
17366         endpwent                \
17367         fcntl                   \
17368         flock                   \
17369         getdtablesize   \
17370         getgrgid                \
17371         gethostname             \
17372         getpass                 \
17373         getpassphrase   \
17374         getpwuid                \
17375         getpwnam                \
17376         getspnam                \
17377         gettimeofday    \
17378         initgroups              \
17379         lockf                   \
17380         memcpy                  \
17381         memmove                 \
17382         pipe                    \
17383         read                    \
17384         recv                    \
17385         recvfrom                \
17386         setpwfile               \
17387         setgid                  \
17388         setegid                 \
17389         setsid                  \
17390         setuid                  \
17391         seteuid                 \
17392         sigaction               \
17393         signal                  \
17394         sigset                  \
17395         strdup                  \
17396         strerror                \
17397         strpbrk                 \
17398         strrchr                 \
17399         strsep                  \
17400         strstr                  \
17401         strtol                  \
17402         strtoul                 \
17403         strspn                  \
17404         sysconf                 \
17405         usleep                  \
17406         waitpid                 \
17407         wait4                   \
17408         write                   \
17409         send                    \
17410         sendto                  \
17411
17412 do
17413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17414 echo "configure:17415: checking for $ac_func" >&5
17415 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17416   echo $ac_n "(cached) $ac_c" 1>&6
17417 else
17418   cat > conftest.$ac_ext <<EOF
17419 #line 17420 "configure"
17420 #include "confdefs.h"
17421 /* System header to define __stub macros and hopefully few prototypes,
17422     which can conflict with char $ac_func(); below.  */
17423 #include <assert.h>
17424 /* Override any gcc2 internal prototype to avoid an error.  */
17425 /* We use char because int might match the return type of a gcc2
17426     builtin and then its argument prototype would still apply.  */
17427 char $ac_func();
17428 char (*f)();
17429
17430 int main() {
17431
17432 /* The GNU C library defines this for functions which it implements
17433     to always fail with ENOSYS.  Some functions are actually named
17434     something starting with __ and the normal name is an alias.  */
17435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17436 choke me
17437 #else
17438 f = $ac_func;
17439 #endif
17440
17441 ; return 0; }
17442 EOF
17443 if { (eval echo configure:17444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17444   rm -rf conftest*
17445   eval "ac_cv_func_$ac_func=yes"
17446 else
17447   echo "configure: failed program was:" >&5
17448   cat conftest.$ac_ext >&5
17449   rm -rf conftest*
17450   eval "ac_cv_func_$ac_func=no"
17451 fi
17452 rm -f conftest*
17453 fi
17454
17455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17456   echo "$ac_t""yes" 1>&6
17457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17458   cat >> confdefs.h <<EOF
17459 #define $ac_tr_func 1
17460 EOF
17461  
17462 else
17463   echo "$ac_t""no" 1>&6
17464 fi
17465 done
17466
17467
17468 for ac_func in getopt
17469 do
17470 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17471 echo "configure:17472: checking for $ac_func" >&5
17472 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17473   echo $ac_n "(cached) $ac_c" 1>&6
17474 else
17475   cat > conftest.$ac_ext <<EOF
17476 #line 17477 "configure"
17477 #include "confdefs.h"
17478 /* System header to define __stub macros and hopefully few prototypes,
17479     which can conflict with char $ac_func(); below.  */
17480 #include <assert.h>
17481 /* Override any gcc2 internal prototype to avoid an error.  */
17482 /* We use char because int might match the return type of a gcc2
17483     builtin and then its argument prototype would still apply.  */
17484 char $ac_func();
17485 char (*f)();
17486
17487 int main() {
17488
17489 /* The GNU C library defines this for functions which it implements
17490     to always fail with ENOSYS.  Some functions are actually named
17491     something starting with __ and the normal name is an alias.  */
17492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17493 choke me
17494 #else
17495 f = $ac_func;
17496 #endif
17497
17498 ; return 0; }
17499 EOF
17500 if { (eval echo configure:17501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17501   rm -rf conftest*
17502   eval "ac_cv_func_$ac_func=yes"
17503 else
17504   echo "configure: failed program was:" >&5
17505   cat conftest.$ac_ext >&5
17506   rm -rf conftest*
17507   eval "ac_cv_func_$ac_func=no"
17508 fi
17509 rm -f conftest*
17510 fi
17511
17512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17513   echo "$ac_t""yes" 1>&6
17514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17515   cat >> confdefs.h <<EOF
17516 #define $ac_tr_func 1
17517 EOF
17518  
17519 else
17520   echo "$ac_t""no" 1>&6
17521 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
17522 fi
17523 done
17524
17525
17526
17527 if test "$ac_cv_func_getopt" != yes; then
17528     LIBSRCS="$LIBSRCS getopt.c"
17529 fi
17530
17531 # Check Configuration
17532 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
17533 echo "configure:17534: checking declaration of sys_errlist" >&5
17534 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
17535   echo $ac_n "(cached) $ac_c" 1>&6
17536 else
17537   
17538         cat > conftest.$ac_ext <<EOF
17539 #line 17540 "configure"
17540 #include "confdefs.h"
17541
17542 #include <stdio.h>
17543 #include <sys/types.h>
17544 #include <errno.h>
17545 #ifdef WINNT
17546 #include <stdlib.h>
17547 #endif 
17548 int main() {
17549 char *c = (char *) *sys_errlist
17550 ; return 0; }
17551 EOF
17552 if { (eval echo configure:17553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17553   rm -rf conftest*
17554   ol_cv_dcl_sys_errlist=yes
17555         ol_cv_have_sys_errlist=yes
17556 else
17557   echo "configure: failed program was:" >&5
17558   cat conftest.$ac_ext >&5
17559   rm -rf conftest*
17560   ol_cv_dcl_sys_errlist=no
17561 fi
17562 rm -f conftest*
17563 fi
17564
17565 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
17566 #
17567 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
17568 if test $ol_cv_dcl_sys_errlist = no ; then
17569         cat >> confdefs.h <<\EOF
17570 #define DECL_SYS_ERRLIST 1
17571 EOF
17572
17573
17574         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
17575 echo "configure:17576: checking existence of sys_errlist" >&5
17576 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
17577   echo $ac_n "(cached) $ac_c" 1>&6
17578 else
17579   
17580                 cat > conftest.$ac_ext <<EOF
17581 #line 17582 "configure"
17582 #include "confdefs.h"
17583 #include <errno.h>
17584 int main() {
17585 char *c = (char *) *sys_errlist
17586 ; return 0; }
17587 EOF
17588 if { (eval echo configure:17589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17589   rm -rf conftest*
17590   ol_cv_have_sys_errlist=yes
17591 else
17592   echo "configure: failed program was:" >&5
17593   cat conftest.$ac_ext >&5
17594   rm -rf conftest*
17595   ol_cv_have_sys_errlist=no
17596 fi
17597 rm -f conftest*
17598 fi
17599
17600 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
17601 fi
17602 if test $ol_cv_have_sys_errlist = yes ; then
17603         cat >> confdefs.h <<\EOF
17604 #define HAVE_SYS_ERRLIST 1
17605 EOF
17606
17607 fi
17608
17609
17610
17611 if test "$ol_enable_debug" != no ; then
17612         cat >> confdefs.h <<\EOF
17613 #define LDAP_DEBUG 1
17614 EOF
17615
17616 fi
17617 if test "$ol_enable_syslog" = yes ; then
17618         cat >> confdefs.h <<\EOF
17619 #define LDAP_SYSLOG 1
17620 EOF
17621
17622 fi
17623 if test "$ol_enable_cache" = no ; then
17624         cat >> confdefs.h <<\EOF
17625 #define LDAP_NOCACHE 1
17626 EOF
17627
17628 fi
17629 if test "$ol_link_kbind" != no ; then
17630         cat >> confdefs.h <<\EOF
17631 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
17632 EOF
17633
17634 fi
17635 if test "$ol_enable_proctitle" != no ; then
17636         cat >> confdefs.h <<\EOF
17637 #define LDAP_PROCTITLE 1
17638 EOF
17639
17640 fi
17641 if test "$ol_enable_referrals" != no ; then
17642         cat >> confdefs.h <<\EOF
17643 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
17644 EOF
17645
17646 fi
17647 if test "$ol_enable_local" != no; then
17648         cat >> confdefs.h <<\EOF
17649 #define LDAP_PF_LOCAL 1
17650 EOF
17651
17652 fi
17653 if test "$ol_link_ipv6" != no; then
17654         cat >> confdefs.h <<\EOF
17655 #define LDAP_PF_INET6 1
17656 EOF
17657
17658 fi
17659 if test "$ol_enable_cleartext" != no ; then
17660         cat >> confdefs.h <<\EOF
17661 #define SLAPD_CLEARTEXT 1
17662 EOF
17663
17664 fi
17665 if test "$ol_enable_crypt" != no ; then
17666         cat >> confdefs.h <<\EOF
17667 #define SLAPD_CRYPT 1
17668 EOF
17669
17670 fi
17671 if test "$ol_link_kpasswd" != no ; then
17672         cat >> confdefs.h <<\EOF
17673 #define SLAPD_KPASSWD 1
17674 EOF
17675
17676 fi
17677 if test "$ol_link_spasswd" != no ; then
17678         cat >> confdefs.h <<\EOF
17679 #define SLAPD_SPASSWD 1
17680 EOF
17681
17682 fi
17683 if test "$ol_enable_phonetic" != no ; then
17684         cat >> confdefs.h <<\EOF
17685 #define SLAPD_PHONETIC 1
17686 EOF
17687
17688 fi
17689 if test "$ol_enable_rlookups" != no ; then
17690         cat >> confdefs.h <<\EOF
17691 #define SLAPD_RLOOKUPS 1
17692 EOF
17693
17694 fi
17695 if test "$ol_enable_aci" != no ; then
17696         cat >> confdefs.h <<\EOF
17697 #define SLAPD_ACI_ENABLED 1
17698 EOF
17699
17700 fi
17701
17702 if test "$ol_link_modules" != no ; then
17703         cat >> confdefs.h <<\EOF
17704 #define SLAPD_MODULES 1
17705 EOF
17706
17707         BUILD_SLAPD=yes
17708         SLAPD_MODULES_LDFLAGS="-dlopen self"
17709 fi
17710
17711 if test "$ol_enable_bdb" != no ; then
17712         cat >> confdefs.h <<\EOF
17713 #define SLAPD_BDB 1
17714 EOF
17715
17716         BUILD_SLAPD=yes
17717         BUILD_BDB=yes
17718         if test "$ol_with_bdb_module" != static ; then
17719                 cat >> confdefs.h <<\EOF
17720 #define SLAPD_BDB_DYNAMIC 1
17721 EOF
17722
17723                 BUILD_BDB=mod
17724                 BUILD_BDB_DYNAMIC=shared
17725                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
17726         fi
17727 fi
17728
17729 if test "$ol_link_dnssrv" != no ; then
17730         cat >> confdefs.h <<\EOF
17731 #define SLAPD_DNSSRV 1
17732 EOF
17733
17734         BUILD_SLAPD=yes
17735         BUILD_DNSSRV=yes
17736         if test "$ol_with_dnssrv_module" != static ; then
17737                 cat >> confdefs.h <<\EOF
17738 #define SLAPD_DNSSRV_DYNAMIC 1
17739 EOF
17740
17741                 BUILD_DNSSRV=mod
17742                 BUILD_DNSSRV_DYNAMIC=shared
17743                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
17744         fi
17745 fi
17746
17747 if test "$ol_enable_ldap" != no ; then
17748         cat >> confdefs.h <<\EOF
17749 #define SLAPD_LDAP 1
17750 EOF
17751
17752         BUILD_SLAPD=yes
17753         BUILD_LDAP=yes
17754         if test "$ol_with_ldap_module" != static ; then
17755                 cat >> confdefs.h <<\EOF
17756 #define SLAPD_LDAP_DYNAMIC 1
17757 EOF
17758
17759                 BUILD_LDAP=mod
17760                 BUILD_LDAP_DYNAMIC=shared
17761                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
17762         fi
17763 fi
17764
17765 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
17766         cat >> confdefs.h <<\EOF
17767 #define SLAPD_LDBM 1
17768 EOF
17769
17770         BUILD_SLAPD=yes
17771         BUILD_LDBM=yes
17772         LDBM_LIB="-lldbm"
17773         if test "$ol_with_ldbm_module" != static ; then
17774                 cat >> confdefs.h <<\EOF
17775 #define SLAPD_LDBM_DYNAMIC 1
17776 EOF
17777
17778                 BUILD_LDBM=mod
17779                 BUILD_LDBM_DYNAMIC=shared
17780                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
17781         fi
17782 fi
17783
17784 if test "$ol_enable_meta" != no ; then
17785         if test "$ol_enable_ldap" = no ; then
17786                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
17787         fi
17788         if test "$ol_enable_rewrite" = no ; then
17789                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
17790         fi
17791         cat >> confdefs.h <<\EOF
17792 #define SLAPD_META 1
17793 EOF
17794
17795         BUILD_SLAPD=yes
17796         BUILD_META=yes
17797         if test "$ol_with_meta_module" != static ; then
17798                 cat >> confdefs.h <<\EOF
17799 #define SLAPD_META_DYNAMIC 1
17800 EOF
17801
17802                 BUILD_META=mod
17803                 BUILD_META_DYNAMIC=shared
17804                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
17805         fi
17806 fi
17807
17808 if test "$ol_enable_monitor" != no ; then
17809         cat >> confdefs.h <<\EOF
17810 #define SLAPD_MONITOR 1
17811 EOF
17812
17813         BUILD_SLAPD=yes
17814         BUILD_MONITOR=yes
17815         if test "$ol_with_monitor_module" != static ; then
17816                 cat >> confdefs.h <<\EOF
17817 #define SLAPD_MONITOR_DYNAMIC 1
17818 EOF
17819
17820                 BUILD_MONITOR=mod
17821                 BUILD_MONITOR_DYNAMIC=shared
17822                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
17823         fi
17824 fi
17825
17826 if test "$ol_enable_passwd" != no ; then
17827         cat >> confdefs.h <<\EOF
17828 #define SLAPD_PASSWD 1
17829 EOF
17830
17831         BUILD_SLAPD=yes
17832         BUILD_PASSWD=yes
17833         if test "$ol_with_passwd_module" != static ; then
17834                 cat >> confdefs.h <<\EOF
17835 #define SLAPD_PASSWD_DYNAMIC 1
17836 EOF
17837
17838                 BUILD_PASSWD=mod
17839                 BUILD_PASSWD_DYNAMIC=shared
17840                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
17841         fi
17842 fi
17843
17844 if test "$ol_link_perl" != no ; then
17845         cat >> confdefs.h <<\EOF
17846 #define SLAPD_PERL 1
17847 EOF
17848
17849         BUILD_SLAPD=yes
17850         BUILD_PERL=yes
17851         if test "$ol_with_perl_module" != static ; then
17852                 cat >> confdefs.h <<\EOF
17853 #define SLAPD_PERL_DYNAMIC 1
17854 EOF
17855
17856                 BUILD_PERL=mod
17857                 BUILD_PERL_DYNAMIC=shared
17858                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
17859         fi
17860 fi
17861
17862 if test "$ol_enable_shell" != no ; then
17863         cat >> confdefs.h <<\EOF
17864 #define SLAPD_SHELL 1
17865 EOF
17866
17867         BUILD_SLAPD=yes
17868         BUILD_SHELL=yes
17869         if test "$ol_with_shell_module" != static ; then
17870                 cat >> confdefs.h <<\EOF
17871 #define SLAPD_SHELL_DYNAMIC 1
17872 EOF
17873
17874                 BUILD_SHELL=mod
17875                 BUILD_SHELL_DYNAMIC=shared
17876                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
17877         fi
17878 fi
17879
17880 if test "$ol_enable_tcl" != no ; then
17881         cat >> confdefs.h <<\EOF
17882 #define SLAPD_TCL 1
17883 EOF
17884
17885         BUILD_SLAPD=yes
17886         BUILD_TCL=yes
17887         if test "$ol_with_tcl_module" != static; then
17888                 cat >> confdefs.h <<\EOF
17889 #define SLAPD_TCL_DYNAMIC 1
17890 EOF
17891
17892                 BUILD_TCL=mod
17893                 BUILD_TCL_DYNAMIC=shared
17894                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
17895         fi
17896 fi
17897
17898 if test "$ol_link_sql" != no ; then
17899         cat >> confdefs.h <<\EOF
17900 #define SLAPD_SQL 1
17901 EOF
17902
17903         BUILD_SLAPD=yes
17904         BUILD_SQL=yes
17905         if test "$ol_with_sql_module" != static; then
17906                 cat >> confdefs.h <<\EOF
17907 #define SLAPD_SQL_DYNAMIC 1
17908 EOF
17909
17910                 BUILD_SQL=mod
17911                 BUILD_SQL_DYNAMIC=shared
17912                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
17913         fi
17914 fi
17915
17916 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
17917         $BUILD_SLAPD = yes ; then
17918         BUILD_SLURPD=yes
17919 fi
17920
17921 if test "$ol_enable_rewrite" != no ; then
17922         cat >> confdefs.h <<\EOF
17923 #define ENABLE_REWRITE 1
17924 EOF
17925
17926         BUILD_REWRITE=yes
17927         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
17928 fi
17929
17930
17931 if test "$LINK_BINS_DYNAMIC" = yes; then
17932     LIB_LINKAGE=DYN
17933     LT_LIB_LINKAGE=shared
17934 else
17935     LIB_LINKAGE=STAT
17936     LT_LIB_LINKAGE=static
17937 fi
17938
17939 if test "$ac_cv_mingw32" = yes ; then
17940     PLAT=NT
17941     DYN_EXT=dll
17942 else
17943     PLAT=UNIX
17944     DYN_EXT=so
17945 fi
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955   
17956   
17957   
17958   
17959   
17960   
17961   
17962   
17963   
17964   
17965   
17966   
17967   
17968   
17969   
17970   
17971   
17972   
17973   
17974   
17975   
17976   
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016 trap '' 1 2 15
18017
18018 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
18019
18020 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18021 # Let make expand exec_prefix.
18022 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18023
18024 # Any assignment to VPATH causes Sun make to only execute
18025 # the first set of double-colon rules, so remove it if not needed.
18026 # If there is a colon in the path, we need to keep it.
18027 if test "x$srcdir" = x.; then
18028   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
18029 fi
18030
18031 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
18032
18033 DEFS=-DHAVE_CONFIG_H
18034
18035 # Without the "./", some shells look in PATH for config.status.
18036 : ${CONFIG_STATUS=./config.status}
18037
18038 echo creating $CONFIG_STATUS
18039 rm -f $CONFIG_STATUS
18040 cat > $CONFIG_STATUS <<EOF
18041 #! /bin/sh
18042 # Generated automatically by configure.
18043 # Run this file to recreate the current configuration.
18044 # This directory was configured as follows,
18045 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18046 #
18047 # $0 $ac_configure_args
18048 #
18049 # Compiler output produced by configure, useful for debugging
18050 # configure, is in ./config.log if it exists.
18051
18052 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
18053 for ac_option
18054 do
18055   case "\$ac_option" in
18056   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18057     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
18058     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
18059   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
18060     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
18061     exit 0 ;;
18062   -help | --help | --hel | --he | --h)
18063     echo "\$ac_cs_usage"; exit 0 ;;
18064   *) echo "\$ac_cs_usage"; exit 1 ;;
18065   esac
18066 done
18067
18068 ac_given_srcdir=$srcdir
18069 ac_given_INSTALL="$INSTALL"
18070
18071 trap 'rm -fr `echo "\
18072 Makefile:build/top.mk:Makefile.in:build/dir.mk \
18073 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
18074 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
18075 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
18076 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
18077 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
18078 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
18079 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
18080 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
18081 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
18082 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
18083 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
18084 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
18085 include/Makefile:build/top.mk:include/Makefile.in \
18086 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
18087 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
18088 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18089 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18090 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
18091 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
18092 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
18093 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
18094 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
18095 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
18096 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
18097 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
18098 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
18099 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
18100 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
18101 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
18102 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
18103 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
18104 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
18105 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
18106 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
18107 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
18108 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
18109 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
18110 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
18111 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
18112 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
18113 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
18114  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
18115 EOF
18116 cat >> $CONFIG_STATUS <<EOF
18117
18118 # Protect against being on the right side of a sed subst in config.status.
18119 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
18120  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
18121 $ac_vpsub
18122 $extrasub
18123 s%@SHELL@%$SHELL%g
18124 s%@CFLAGS@%$CFLAGS%g
18125 s%@CPPFLAGS@%$CPPFLAGS%g
18126 s%@CXXFLAGS@%$CXXFLAGS%g
18127 s%@FFLAGS@%$FFLAGS%g
18128 s%@DEFS@%$DEFS%g
18129 s%@LDFLAGS@%$LDFLAGS%g
18130 s%@LIBS@%$LIBS%g
18131 s%@exec_prefix@%$exec_prefix%g
18132 s%@prefix@%$prefix%g
18133 s%@program_transform_name@%$program_transform_name%g
18134 s%@bindir@%$bindir%g
18135 s%@sbindir@%$sbindir%g
18136 s%@libexecdir@%$libexecdir%g
18137 s%@datadir@%$datadir%g
18138 s%@sysconfdir@%$sysconfdir%g
18139 s%@sharedstatedir@%$sharedstatedir%g
18140 s%@localstatedir@%$localstatedir%g
18141 s%@libdir@%$libdir%g
18142 s%@includedir@%$includedir%g
18143 s%@oldincludedir@%$oldincludedir%g
18144 s%@infodir@%$infodir%g
18145 s%@mandir@%$mandir%g
18146 s%@host@%$host%g
18147 s%@host_alias@%$host_alias%g
18148 s%@host_cpu@%$host_cpu%g
18149 s%@host_vendor@%$host_vendor%g
18150 s%@host_os@%$host_os%g
18151 s%@target@%$target%g
18152 s%@target_alias@%$target_alias%g
18153 s%@target_cpu@%$target_cpu%g
18154 s%@target_vendor@%$target_vendor%g
18155 s%@target_os@%$target_os%g
18156 s%@build@%$build%g
18157 s%@build_alias@%$build_alias%g
18158 s%@build_cpu@%$build_cpu%g
18159 s%@build_vendor@%$build_vendor%g
18160 s%@build_os@%$build_os%g
18161 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
18162 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
18163 s%@INSTALL_DATA@%$INSTALL_DATA%g
18164 s%@PACKAGE@%$PACKAGE%g
18165 s%@VERSION@%$VERSION%g
18166 s%@ACLOCAL@%$ACLOCAL%g
18167 s%@AUTOCONF@%$AUTOCONF%g
18168 s%@AUTOMAKE@%$AUTOMAKE%g
18169 s%@AUTOHEADER@%$AUTOHEADER%g
18170 s%@MAKEINFO@%$MAKEINFO%g
18171 s%@install_sh@%$install_sh%g
18172 s%@AMTAR@%$AMTAR%g
18173 s%@AWK@%$AWK%g
18174 s%@AMTARFLAGS@%$AMTARFLAGS%g
18175 s%@SET_MAKE@%$SET_MAKE%g
18176 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
18177 s%@top_builddir@%$top_builddir%g
18178 s%@ldap_subdir@%$ldap_subdir%g
18179 s%@CC@%$CC%g
18180 s%@RANLIB@%$RANLIB%g
18181 s%@LN_S@%$LN_S%g
18182 s%@DLLTOOL@%$DLLTOOL%g
18183 s%@AS@%$AS%g
18184 s%@OBJDUMP@%$OBJDUMP%g
18185 s%@LIBTOOL@%$LIBTOOL%g
18186 s%@LN_H@%$LN_H%g
18187 s%@SENDMAIL@%$SENDMAIL%g
18188 s%@EDITOR@%$EDITOR%g
18189 s%@FINGER@%$FINGER%g
18190 s%@PERLBIN@%$PERLBIN%g
18191 s%@CPP@%$CPP%g
18192 s%@EXEEXT@%$EXEEXT%g
18193 s%@OBJEXT@%$OBJEXT%g
18194 s%@OL_MKDEP@%$OL_MKDEP%g
18195 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
18196 s%@LIBOBJS@%$LIBOBJS%g
18197 s%@LIBSRCS@%$LIBSRCS%g
18198 s%@PLAT@%$PLAT%g
18199 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
18200 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
18201 s%@DYN_EXT@%$DYN_EXT%g
18202 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
18203 s%@BUILD_BDB@%$BUILD_BDB%g
18204 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
18205 s%@BUILD_LDAP@%$BUILD_LDAP%g
18206 s%@BUILD_LDBM@%$BUILD_LDBM%g
18207 s%@BUILD_META@%$BUILD_META%g
18208 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
18209 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
18210 s%@BUILD_PERL@%$BUILD_PERL%g
18211 s%@BUILD_SHELL@%$BUILD_SHELL%g
18212 s%@BUILD_SQL@%$BUILD_SQL%g
18213 s%@BUILD_TCL@%$BUILD_TCL%g
18214 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
18215 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
18216 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
18217 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
18218 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
18219 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
18220 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
18221 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
18222 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
18223 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
18224 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
18225 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
18226 s%@LDBM_LIB@%$LDBM_LIB%g
18227 s%@LDAP_LIBS@%$LDAP_LIBS%g
18228 s%@LDIF_LIBS@%$LDIF_LIBS%g
18229 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
18230 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
18231 s%@LDBM_LIBS@%$LDBM_LIBS%g
18232 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
18233 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
18234 s%@WRAP_LIBS@%$WRAP_LIBS%g
18235 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
18236 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
18237 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
18238 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
18239 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
18240 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
18241 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
18242 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
18243 s%@KRB4_LIBS@%$KRB4_LIBS%g
18244 s%@KRB5_LIBS@%$KRB5_LIBS%g
18245 s%@READLINE_LIBS@%$READLINE_LIBS%g
18246 s%@SASL_LIBS@%$SASL_LIBS%g
18247 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
18248 s%@TLS_LIBS@%$TLS_LIBS%g
18249 s%@MODULES_LIBS@%$MODULES_LIBS%g
18250 s%@AUTH_LIBS@%$AUTH_LIBS%g
18251 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
18252 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
18253 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
18254 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
18255
18256 CEOF
18257 EOF
18258
18259 cat >> $CONFIG_STATUS <<\EOF
18260
18261 # Split the substitutions into bite-sized pieces for seds with
18262 # small command number limits, like on Digital OSF/1 and HP-UX.
18263 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
18264 ac_file=1 # Number of current file.
18265 ac_beg=1 # First line for current file.
18266 ac_end=$ac_max_sed_cmds # Line after last line for current file.
18267 ac_more_lines=:
18268 ac_sed_cmds=""
18269 while $ac_more_lines; do
18270   if test $ac_beg -gt 1; then
18271     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
18272   else
18273     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
18274   fi
18275   if test ! -s conftest.s$ac_file; then
18276     ac_more_lines=false
18277     rm -f conftest.s$ac_file
18278   else
18279     if test -z "$ac_sed_cmds"; then
18280       ac_sed_cmds="sed -f conftest.s$ac_file"
18281     else
18282       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
18283     fi
18284     ac_file=`expr $ac_file + 1`
18285     ac_beg=$ac_end
18286     ac_end=`expr $ac_end + $ac_max_sed_cmds`
18287   fi
18288 done
18289 if test -z "$ac_sed_cmds"; then
18290   ac_sed_cmds=cat
18291 fi
18292 EOF
18293
18294 cat >> $CONFIG_STATUS <<EOF
18295
18296 CONFIG_FILES=\${CONFIG_FILES-"\
18297 Makefile:build/top.mk:Makefile.in:build/dir.mk \
18298 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
18299 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
18300 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
18301 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
18302 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
18303 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
18304 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
18305 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
18306 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
18307 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
18308 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
18309 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
18310 include/Makefile:build/top.mk:include/Makefile.in \
18311 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
18312 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
18313 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18314 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18315 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
18316 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
18317 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
18318 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
18319 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
18320 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
18321 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
18322 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
18323 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
18324 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
18325 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
18326 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
18327 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
18328 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
18329 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
18330 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
18331 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
18332 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
18333 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
18334 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
18335 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
18336 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
18337 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
18338 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
18339 "}
18340 EOF
18341 cat >> $CONFIG_STATUS <<\EOF
18342 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
18343   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18344   case "$ac_file" in
18345   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18346        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18347   *) ac_file_in="${ac_file}.in" ;;
18348   esac
18349
18350   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
18351
18352   # Remove last slash and all that follows it.  Not all systems have dirname.
18353   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18354   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18355     # The file is in a subdirectory.
18356     test ! -d "$ac_dir" && mkdir "$ac_dir"
18357     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
18358     # A "../" for each directory in $ac_dir_suffix.
18359     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
18360   else
18361     ac_dir_suffix= ac_dots=
18362   fi
18363
18364   case "$ac_given_srcdir" in
18365   .)  srcdir=.
18366       if test -z "$ac_dots"; then top_srcdir=.
18367       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
18368   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
18369   *) # Relative path.
18370     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
18371     top_srcdir="$ac_dots$ac_given_srcdir" ;;
18372   esac
18373
18374   case "$ac_given_INSTALL" in
18375   [/$]*) INSTALL="$ac_given_INSTALL" ;;
18376   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
18377   esac
18378
18379   echo creating "$ac_file"
18380   rm -f "$ac_file"
18381   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
18382   case "$ac_file" in
18383   *[Mm]akefile*) ac_comsub="1i\\
18384 # $configure_input" ;;
18385   *) ac_comsub= ;;
18386   esac
18387
18388   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18389   sed -e "$ac_comsub
18390 s%@configure_input@%$configure_input%g
18391 s%@srcdir@%$srcdir%g
18392 s%@top_srcdir@%$top_srcdir%g
18393 s%@INSTALL@%$INSTALL%g
18394 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
18395 fi; done
18396 rm -f conftest.s*
18397
18398 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18399 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18400 #
18401 # ac_d sets the value in "#define NAME VALUE" lines.
18402 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18403 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
18404 ac_dC='\3'
18405 ac_dD='%g'
18406 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18407 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18408 ac_uB='\([      ]\)%\1#\2define\3'
18409 ac_uC=' '
18410 ac_uD='\4%g'
18411 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18412 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18413 ac_eB='$%\1#\2define\3'
18414 ac_eC=' '
18415 ac_eD='%g'
18416
18417 if test "${CONFIG_HEADERS+set}" != set; then
18418 EOF
18419 cat >> $CONFIG_STATUS <<EOF
18420   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
18421 EOF
18422 cat >> $CONFIG_STATUS <<\EOF
18423 fi
18424 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
18425   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18426   case "$ac_file" in
18427   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18428        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18429   *) ac_file_in="${ac_file}.in" ;;
18430   esac
18431
18432   echo creating $ac_file
18433
18434   rm -f conftest.frag conftest.in conftest.out
18435   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18436   cat $ac_file_inputs > conftest.in
18437
18438 EOF
18439
18440 # Transform confdefs.h into a sed script conftest.vals that substitutes
18441 # the proper values into config.h.in to produce config.h.  And first:
18442 # Protect against being on the right side of a sed subst in config.status.
18443 # Protect against being in an unquoted here document in config.status.
18444 rm -f conftest.vals
18445 cat > conftest.hdr <<\EOF
18446 s/[\\&%]/\\&/g
18447 s%[\\$`]%\\&%g
18448 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
18449 s%ac_d%ac_u%gp
18450 s%ac_u%ac_e%gp
18451 EOF
18452 sed -n -f conftest.hdr confdefs.h > conftest.vals
18453 rm -f conftest.hdr
18454
18455 # This sed command replaces #undef with comments.  This is necessary, for
18456 # example, in the case of _POSIX_SOURCE, which is predefined and required
18457 # on some systems where configure will not decide to define it.
18458 cat >> conftest.vals <<\EOF
18459 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
18460 EOF
18461
18462 # Break up conftest.vals because some shells have a limit on
18463 # the size of here documents, and old seds have small limits too.
18464
18465 rm -f conftest.tail
18466 while :
18467 do
18468   ac_lines=`grep -c . conftest.vals`
18469   # grep -c gives empty output for an empty file on some AIX systems.
18470   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
18471   # Write a limited-size here document to conftest.frag.
18472   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
18473   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
18474   echo 'CEOF
18475   sed -f conftest.frag conftest.in > conftest.out
18476   rm -f conftest.in
18477   mv conftest.out conftest.in
18478 ' >> $CONFIG_STATUS
18479   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18480   rm -f conftest.vals
18481   mv conftest.tail conftest.vals
18482 done
18483 rm -f conftest.vals
18484
18485 cat >> $CONFIG_STATUS <<\EOF
18486   rm -f conftest.frag conftest.h
18487   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
18488   cat conftest.in >> conftest.h
18489   rm -f conftest.in
18490   if cmp -s $ac_file conftest.h 2>/dev/null; then
18491     echo "$ac_file is unchanged"
18492     rm -f conftest.h
18493   else
18494     # Remove last slash and all that follows it.  Not all systems have dirname.
18495       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18496       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18497       # The file is in a subdirectory.
18498       test ! -d "$ac_dir" && mkdir "$ac_dir"
18499     fi
18500     rm -f $ac_file
18501     mv conftest.h $ac_file
18502   fi
18503 fi; done
18504
18505 EOF
18506 cat >> $CONFIG_STATUS <<EOF
18507
18508 EOF
18509 cat >> $CONFIG_STATUS <<\EOF
18510
18511 date > stamp-h
18512 echo Please \"make depend\" to build dependencies
18513
18514 exit 0
18515 EOF
18516 chmod +x $CONFIG_STATUS
18517 rm -fr confdefs* $ac_clean_files
18518 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
18519