]> git.sur5r.net Git - openldap/blob - configure
Disable (for now) check for HAVE_BERKELEY_DB_THREAD and hence disable
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.366 2001/09/24 16:26:24 kurt Exp  
4
5 # Copyright 1998-2001 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2001 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-kbind          enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-rewrite        enable rewrite [no]"
48 ac_help="$ac_help
49   --enable-x-compile      enable cross compiling [no]"
50 ac_help="$ac_help
51   --with-cyrus-sasl       with Cyrus SASL support [auto]"
52 ac_help="$ac_help
53   --with-fetch            with fetch URL support [auto]"
54 ac_help="$ac_help
55   --with-kerberos         with Kerberos support [auto]"
56 ac_help="$ac_help
57   --with-readline         with readline support [auto]"
58 ac_help="$ac_help
59   --with-threads          with threads [auto]"
60 ac_help="$ac_help
61   --with-tls              with TLS/SSL support [auto]"
62 ac_help="$ac_help
63   --with-yielding-select  with implicitly yielding select [auto]"
64 ac_help="$ac_help
65 SLAPD (Standalone LDAP Daemon) Options:"
66 ac_help="$ac_help
67   --enable-slapd          enable building slapd [yes]"
68 ac_help="$ac_help
69     --enable-aci          enable per-object ACIs (experimental) [no]"
70 ac_help="$ac_help
71     --enable-cleartext    enable cleartext passwords [yes]"
72 ac_help="$ac_help
73     --enable-crypt        enable crypt(3) passwords [no]"
74 ac_help="$ac_help
75     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
76 ac_help="$ac_help
77     --enable-kpasswd      enable Kerberos password verification [no]"
78 ac_help="$ac_help
79     --enable-lmpasswd     enable LAN Manager passwords [no]"
80 ac_help="$ac_help
81     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
82 ac_help="$ac_help
83     --enable-modules      enable dynamic module support [no]"
84 ac_help="$ac_help
85     --enable-phonetic     enable phonetic/soundex [no]"
86 ac_help="$ac_help
87     --enable-rlookups     enable reverse lookups [no]"
88 ac_help="$ac_help
89     --enable-slp          enable SLPv2 support [no]"
90 ac_help="$ac_help
91     --enable-wrappers     enable tcp wrapper support [no]"
92 ac_help="$ac_help
93     --enable-bdb          enable Berkeley DB backend [no]"
94 ac_help="$ac_help
95     --with-bdb-module     module type [static]"
96 ac_help="$ac_help
97     --enable-dnssrv       enable dnssrv backend [no]"
98 ac_help="$ac_help
99     --with-dnssrv-module  module type [static]"
100 ac_help="$ac_help
101     --enable-ldap         enable ldap backend [no]"
102 ac_help="$ac_help
103     --with-ldap-module    module type [static]"
104 ac_help="$ac_help
105     --enable-ldbm         enable ldbm backend [yes]"
106 ac_help="$ac_help
107     --with-ldbm-api       with LDBM API [auto]"
108 ac_help="$ac_help
109     --with-ldbm-module    module type [static]"
110 ac_help="$ac_help
111     --with-ldbm-type      use LDBM type [auto]"
112 ac_help="$ac_help
113     --enable-meta         enable metadirectory backend [no]"
114 ac_help="$ac_help
115     --with-meta-module    module type [static]"
116 ac_help="$ac_help
117     --enable-monitor      enable monitor backend [no]"
118 ac_help="$ac_help
119     --with-monitor-module         module type [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type [static]"
128 ac_help="$ac_help
129     --enable-shell        enable shell backend [no]"
130 ac_help="$ac_help
131     --with-shell-module   module type [static]"
132 ac_help="$ac_help
133     --enable-sql          enable sql backend [no]"
134 ac_help="$ac_help
135     --with-sql-module     module type [static]"
136 ac_help="$ac_help
137     --enable-tcl          enable tcl backend [no]"
138 ac_help="$ac_help
139     --with-tcl-module     module type [static]"
140 ac_help="$ac_help
141 SLURPD (Replication Daemon) Options:"
142 ac_help="$ac_help
143   --enable-slurpd         enable building slurpd [auto]"
144 ac_help="$ac_help
145 Library Generation & Linking Options"
146 ac_help="$ac_help
147   --enable-static[=PKGS]  build static libraries [default=yes]"
148 ac_help="$ac_help
149   --enable-shared[=PKGS]  build shared libraries [default=yes]"
150 ac_help="$ac_help
151   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
152 ac_help="$ac_help
153   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
154 ac_help="$ac_help
155   --disable-libtool-lock  avoid locking (might break parallel builds)"
156
157 # Initialize some variables set by options.
158 # The variables have the same names as the options, with
159 # dashes changed to underlines.
160 build=NONE
161 cache_file=./config.cache
162 exec_prefix=NONE
163 host=NONE
164 no_create=
165 nonopt=NONE
166 no_recursion=
167 prefix=NONE
168 program_prefix=NONE
169 program_suffix=NONE
170 program_transform_name=s,x,x,
171 silent=
172 site=
173 srcdir=
174 target=NONE
175 verbose=
176 x_includes=NONE
177 x_libraries=NONE
178 bindir='${exec_prefix}/bin'
179 sbindir='${exec_prefix}/sbin'
180 libexecdir='${exec_prefix}/libexec'
181 datadir='${prefix}/share'
182 sysconfdir='${prefix}/etc'
183 sharedstatedir='${prefix}/com'
184 localstatedir='${prefix}/var'
185 libdir='${exec_prefix}/lib'
186 includedir='${prefix}/include'
187 oldincludedir='/usr/include'
188 infodir='${prefix}/info'
189 mandir='${prefix}/man'
190
191 # Initialize some other variables.
192 subdirs=
193 MFLAGS= MAKEFLAGS=
194 SHELL=${CONFIG_SHELL-/bin/sh}
195 # Maximum number of lines to put in a shell here document.
196 ac_max_here_lines=12
197
198 ac_prev=
199 for ac_option
200 do
201
202   # If the previous option needs an argument, assign it.
203   if test -n "$ac_prev"; then
204     eval "$ac_prev=\$ac_option"
205     ac_prev=
206     continue
207   fi
208
209   case "$ac_option" in
210   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
211   *) ac_optarg= ;;
212   esac
213
214   # Accept the important Cygnus configure options, so we can diagnose typos.
215
216   case "$ac_option" in
217
218   -bindir | --bindir | --bindi | --bind | --bin | --bi)
219     ac_prev=bindir ;;
220   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
221     bindir="$ac_optarg" ;;
222
223   -build | --build | --buil | --bui | --bu)
224     ac_prev=build ;;
225   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
226     build="$ac_optarg" ;;
227
228   -cache-file | --cache-file | --cache-fil | --cache-fi \
229   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
230     ac_prev=cache_file ;;
231   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
232   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
233     cache_file="$ac_optarg" ;;
234
235   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
236     ac_prev=datadir ;;
237   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
238   | --da=*)
239     datadir="$ac_optarg" ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
243     # Reject names that are not valid shell variable names.
244     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
245       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
246     fi
247     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
248     eval "enable_${ac_feature}=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
252     # Reject names that are not valid shell variable names.
253     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
254       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
255     fi
256     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
257     case "$ac_option" in
258       *=*) ;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_${ac_feature}='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix="$ac_optarg" ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he)
277     # Omit some internal or obsolete options to make the list less imposing.
278     # This message is too long to be a string in the A/UX 3.1 sh.
279     cat << EOF
280 Usage: configure [options] [host]
281 Options: [defaults in brackets after descriptions]
282 Configuration:
283   --cache-file=FILE       cache test results in FILE
284   --help                  print this message
285   --no-create             do not create output files
286   --quiet, --silent       do not print \`checking...' messages
287   --version               print the version of autoconf that created configure
288 Directory and file names:
289   --prefix=PREFIX         install architecture-independent files in PREFIX
290                           [$ac_default_prefix]
291   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
292                           [same as prefix]
293   --bindir=DIR            user executables in DIR [EPREFIX/bin]
294   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
295   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
296   --datadir=DIR           read-only architecture-independent data in DIR
297                           [PREFIX/share]
298   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
299   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
300                           [PREFIX/com]
301   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
302   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
303   --includedir=DIR        C header files in DIR [PREFIX/include]
304   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
305   --infodir=DIR           info documentation in DIR [PREFIX/info]
306   --mandir=DIR            man documentation in DIR [PREFIX/man]
307   --srcdir=DIR            find the sources in DIR [configure dir or ..]
308   --program-prefix=PREFIX prepend PREFIX to installed program names
309   --program-suffix=SUFFIX append SUFFIX to installed program names
310   --program-transform-name=PROGRAM
311                           run sed PROGRAM on installed program names
312 EOF
313     cat << EOF
314 Host type:
315   --build=BUILD           configure for building on BUILD [BUILD=HOST]
316   --host=HOST             configure for HOST [guessed]
317   --target=TARGET         configure for TARGET [TARGET=HOST]
318 Features and packages:
319   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
320   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
321   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
322   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
323   --x-includes=DIR        X include files are in DIR
324   --x-libraries=DIR       X library files are in DIR
325 EOF
326     if test -n "$ac_help"; then
327       echo "--enable and --with options recognized:$ac_help"
328     fi
329     exit 0 ;;
330
331   -host | --host | --hos | --ho)
332     ac_prev=host ;;
333   -host=* | --host=* | --hos=* | --ho=*)
334     host="$ac_optarg" ;;
335
336   -includedir | --includedir | --includedi | --included | --include \
337   | --includ | --inclu | --incl | --inc)
338     ac_prev=includedir ;;
339   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
340   | --includ=* | --inclu=* | --incl=* | --inc=*)
341     includedir="$ac_optarg" ;;
342
343   -infodir | --infodir | --infodi | --infod | --info | --inf)
344     ac_prev=infodir ;;
345   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
346     infodir="$ac_optarg" ;;
347
348   -libdir | --libdir | --libdi | --libd)
349     ac_prev=libdir ;;
350   -libdir=* | --libdir=* | --libdi=* | --libd=*)
351     libdir="$ac_optarg" ;;
352
353   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
354   | --libexe | --libex | --libe)
355     ac_prev=libexecdir ;;
356   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
357   | --libexe=* | --libex=* | --libe=*)
358     libexecdir="$ac_optarg" ;;
359
360   -localstatedir | --localstatedir | --localstatedi | --localstated \
361   | --localstate | --localstat | --localsta | --localst \
362   | --locals | --local | --loca | --loc | --lo)
363     ac_prev=localstatedir ;;
364   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
365   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
366   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
367     localstatedir="$ac_optarg" ;;
368
369   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
370     ac_prev=mandir ;;
371   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
372     mandir="$ac_optarg" ;;
373
374   -nfp | --nfp | --nf)
375     # Obsolete; use --without-fp.
376     with_fp=no ;;
377
378   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
379   | --no-cr | --no-c)
380     no_create=yes ;;
381
382   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
383   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
384     no_recursion=yes ;;
385
386   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
387   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
388   | --oldin | --oldi | --old | --ol | --o)
389     ac_prev=oldincludedir ;;
390   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
391   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
392   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
393     oldincludedir="$ac_optarg" ;;
394
395   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
396     ac_prev=prefix ;;
397   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
398     prefix="$ac_optarg" ;;
399
400   -program-prefix | --program-prefix | --program-prefi | --program-pref \
401   | --program-pre | --program-pr | --program-p)
402     ac_prev=program_prefix ;;
403   -program-prefix=* | --program-prefix=* | --program-prefi=* \
404   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
405     program_prefix="$ac_optarg" ;;
406
407   -program-suffix | --program-suffix | --program-suffi | --program-suff \
408   | --program-suf | --program-su | --program-s)
409     ac_prev=program_suffix ;;
410   -program-suffix=* | --program-suffix=* | --program-suffi=* \
411   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
412     program_suffix="$ac_optarg" ;;
413
414   -program-transform-name | --program-transform-name \
415   | --program-transform-nam | --program-transform-na \
416   | --program-transform-n | --program-transform- \
417   | --program-transform | --program-transfor \
418   | --program-transfo | --program-transf \
419   | --program-trans | --program-tran \
420   | --progr-tra | --program-tr | --program-t)
421     ac_prev=program_transform_name ;;
422   -program-transform-name=* | --program-transform-name=* \
423   | --program-transform-nam=* | --program-transform-na=* \
424   | --program-transform-n=* | --program-transform-=* \
425   | --program-transform=* | --program-transfor=* \
426   | --program-transfo=* | --program-transf=* \
427   | --program-trans=* | --program-tran=* \
428   | --progr-tra=* | --program-tr=* | --program-t=*)
429     program_transform_name="$ac_optarg" ;;
430
431   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
432   | -silent | --silent | --silen | --sile | --sil)
433     silent=yes ;;
434
435   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
436     ac_prev=sbindir ;;
437   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
438   | --sbi=* | --sb=*)
439     sbindir="$ac_optarg" ;;
440
441   -sharedstatedir | --sharedstatedir | --sharedstatedi \
442   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
443   | --sharedst | --shareds | --shared | --share | --shar \
444   | --sha | --sh)
445     ac_prev=sharedstatedir ;;
446   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
447   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
448   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
449   | --sha=* | --sh=*)
450     sharedstatedir="$ac_optarg" ;;
451
452   -site | --site | --sit)
453     ac_prev=site ;;
454   -site=* | --site=* | --sit=*)
455     site="$ac_optarg" ;;
456
457   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
458     ac_prev=srcdir ;;
459   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
460     srcdir="$ac_optarg" ;;
461
462   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
463   | --syscon | --sysco | --sysc | --sys | --sy)
464     ac_prev=sysconfdir ;;
465   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
466   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
467     sysconfdir="$ac_optarg" ;;
468
469   -target | --target | --targe | --targ | --tar | --ta | --t)
470     ac_prev=target ;;
471   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
472     target="$ac_optarg" ;;
473
474   -v | -verbose | --verbose | --verbos | --verbo | --verb)
475     verbose=yes ;;
476
477   -version | --version | --versio | --versi | --vers)
478     echo "configure generated by autoconf version 2.13.1"
479     exit 0 ;;
480
481   -with-* | --with-*)
482     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
483     # Reject names that are not valid shell variable names.
484     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
485       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
486     fi
487     ac_package=`echo $ac_package| sed 's/-/_/g'`
488     case "$ac_option" in
489       *=*) ;;
490       *) ac_optarg=yes ;;
491     esac
492     eval "with_${ac_package}='$ac_optarg'" ;;
493
494   -without-* | --without-*)
495     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
496     # Reject names that are not valid shell variable names.
497     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
498       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
499     fi
500     ac_package=`echo $ac_package| sed 's/-/_/g'`
501     eval "with_${ac_package}=no" ;;
502
503   --x)
504     # Obsolete; use --with-x.
505     with_x=yes ;;
506
507   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
508   | --x-incl | --x-inc | --x-in | --x-i)
509     ac_prev=x_includes ;;
510   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
511   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
512     x_includes="$ac_optarg" ;;
513
514   -x-libraries | --x-libraries | --x-librarie | --x-librari \
515   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
516     ac_prev=x_libraries ;;
517   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
518   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
519     x_libraries="$ac_optarg" ;;
520
521   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
522     ;;
523
524   *)
525     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
526       echo "configure: warning: $ac_option: invalid host type" 1>&2
527     fi
528     if test "x$nonopt" != xNONE; then
529       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
530     fi
531     nonopt="$ac_option"
532     ;;
533
534   esac
535 done
536
537 if test -n "$ac_prev"; then
538   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
539 fi
540
541 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
542
543 # File descriptor usage:
544 # 0 standard input
545 # 1 file creation
546 # 2 errors and warnings
547 # 3 some systems may open it to /dev/tty
548 # 4 used on the Kubota Titan
549 # 6 checking for... messages and results
550 # 5 compiler messages saved in config.log
551 if test "$silent" = yes; then
552   exec 6>/dev/null
553 else
554   exec 6>&1
555 fi
556 exec 5>./config.log
557
558 echo "\
559 This file contains any messages produced by compilers while
560 running configure, to aid debugging if configure makes a mistake.
561 " 1>&5
562
563 # Strip out --no-create and --no-recursion so they do not pile up.
564 # Also quote any args containing shell metacharacters.
565 ac_configure_args=
566 for ac_arg
567 do
568   case "$ac_arg" in
569   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
570   | --no-cr | --no-c) ;;
571   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
572   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
573   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
574   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
575   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
576   esac
577 done
578
579 # NLS nuisances.
580 # Only set these to C if already set.  These must not be set unconditionally
581 # because not all systems understand e.g. LANG=C (notably SCO).
582 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
583 # Non-C LC_CTYPE values break the ctype check.
584 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
585 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
586 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
587 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
588
589 # confdefs.h avoids OS command line length limits that DEFS can exceed.
590 rm -rf conftest* confdefs.h
591 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
592 echo > confdefs.h
593
594 # A filename unique to this package, relative to the directory that
595 # configure is in, which we can look for to find out if srcdir is correct.
596 ac_unique_file=build/version.sh
597
598 # Find the source files, if location was not specified.
599 if test -z "$srcdir"; then
600   ac_srcdir_defaulted=yes
601   # Try the directory containing this script, then its parent.
602   ac_prog=$0
603   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
604   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
605   srcdir=$ac_confdir
606   if test ! -r $srcdir/$ac_unique_file; then
607     srcdir=..
608   fi
609 else
610   ac_srcdir_defaulted=no
611 fi
612 if test ! -r $srcdir/$ac_unique_file; then
613   if test "$ac_srcdir_defaulted" = yes; then
614     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
615   else
616     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
617   fi
618 fi
619 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
620
621 # Prefer explicitly selected file to automatically selected ones.
622 if test -z "$CONFIG_SITE"; then
623   if test "x$prefix" != xNONE; then
624     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
625   else
626     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
627   fi
628 fi
629 for ac_site_file in $CONFIG_SITE; do
630   if test -r "$ac_site_file"; then
631     echo "loading site script $ac_site_file"
632     . "$ac_site_file"
633   fi
634 done
635
636
637 ac_ext=c
638 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
639 ac_cpp='$CPP $CPPFLAGS'
640 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
641 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
642 cross_compiling=$ac_cv_prog_cc_cross
643
644 ac_exeext=
645 ac_objext=o
646 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
647   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
648   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
649     ac_n= ac_c='
650 ' ac_t='        '
651   else
652     ac_n=-n ac_c= ac_t=
653   fi
654 else
655   ac_n= ac_c='\c' ac_t=
656 fi
657
658
659 # set unset (borrowed from autoconf 2.49c)
660 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
661   ol_unset=unset
662 else
663   ol_unset=false
664 fi
665 # unset CDPATH
666 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
667
668 ac_aux_dir=
669 for ac_dir in build $srcdir/build; do
670   if test -f $ac_dir/install-sh; then
671     ac_aux_dir=$ac_dir
672     ac_install_sh="$ac_aux_dir/install-sh -c"
673     break
674   elif test -f $ac_dir/install.sh; then
675     ac_aux_dir=$ac_dir
676     ac_install_sh="$ac_aux_dir/install.sh -c"
677     break
678   elif test -f $ac_dir/shtool; then
679     ac_aux_dir=$ac_dir
680     ac_install_sh="$ac_aux_dir/shtool install -c"
681     break
682   fi
683 done
684 if test -z "$ac_aux_dir"; then
685   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
686 fi
687 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
688 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
689 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
690
691 eval `$ac_aux_dir/version.sh`
692 if test -z "$OL_STRING"; then
693         { echo "configure: error: could not determine version" 1>&2; exit 1; }
694 fi
695
696 echo "Configuring $OL_STRING ..."
697
698
699 echo $ac_n "checking host system type""... $ac_c" 1>&6
700 echo "configure:701: checking host system type" >&5
701 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
702
703 # Make sure we can run config.sub.
704   if $ac_config_sub sun4 >/dev/null 2>&1; then :
705     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
706   fi
707
708   ac_cv_host_alias=$host
709   case "$ac_cv_host_alias" in
710   NONE)
711     case $nonopt in
712     NONE)
713       if ac_cv_host_alias=`$ac_config_guess`; then :
714       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
715       fi ;;
716     *) ac_cv_host_alias=$nonopt ;;
717     esac ;;
718   esac
719
720   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
721   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
722   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
723   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
724 else
725   echo $ac_n "(cached) $ac_c" 1>&6
726 fi
727
728 echo "$ac_t""$ac_cv_host" 1>&6
729
730 host=$ac_cv_host
731 host_alias=$ac_cv_host_alias
732 host_cpu=$ac_cv_host_cpu
733 host_vendor=$ac_cv_host_vendor
734 host_os=$ac_cv_host_os
735
736
737
738
739
740 echo $ac_n "checking target system type""... $ac_c" 1>&6
741 echo "configure:742: checking target system type" >&5
742 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
743
744 # Make sure we can run config.sub.
745   if $ac_config_sub sun4 >/dev/null 2>&1; then :
746     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
747   fi
748
749   ac_cv_target_alias=$target
750   case "$ac_cv_target_alias" in
751   NONE)
752     case $nonopt in
753     NONE)
754       ac_cv_target_alias=$host_alias ;;
755
756     *) ac_cv_target_alias=$nonopt ;;
757     esac ;;
758   esac
759
760   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
761   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
762   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
763   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
764 else
765   echo $ac_n "(cached) $ac_c" 1>&6
766 fi
767
768 echo "$ac_t""$ac_cv_target" 1>&6
769
770 target=$ac_cv_target
771 target_alias=$ac_cv_target_alias
772 target_cpu=$ac_cv_target_cpu
773 target_vendor=$ac_cv_target_vendor
774 target_os=$ac_cv_target_os
775
776
777
778
779
780 echo $ac_n "checking build system type""... $ac_c" 1>&6
781 echo "configure:782: checking build system type" >&5
782 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
783
784 # Make sure we can run config.sub.
785   if $ac_config_sub sun4 >/dev/null 2>&1; then :
786     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
787   fi
788
789   ac_cv_build_alias=$build
790   case "$ac_cv_build_alias" in
791   NONE)
792     case $nonopt in
793     NONE)
794       ac_cv_build_alias=$host_alias ;;
795
796     *) ac_cv_build_alias=$nonopt ;;
797     esac ;;
798   esac
799
800   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
801   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
802   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
803   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
804 else
805   echo $ac_n "(cached) $ac_c" 1>&6
806 fi
807
808 echo "$ac_t""$ac_cv_build" 1>&6
809
810 build=$ac_cv_build
811 build_alias=$ac_cv_build_alias
812 build_cpu=$ac_cv_build_cpu
813 build_vendor=$ac_cv_build_vendor
814 build_os=$ac_cv_build_os
815
816
817
818
819
820 # Do some error checking and defaulting for the host and target type.
821 # The inputs are:
822 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
823 #
824 # The rules are:
825 # 1. You are not allowed to specify --host, --target, and nonopt at the
826 #    same time.
827 # 2. Host defaults to nonopt.
828 # 3. If nonopt is not specified, then host defaults to the current host,
829 #    as determined by config.guess.
830 # 4. Target and build default to nonopt.
831 # 5. If nonopt is not specified, then target and build default to host.
832
833 # The aliases save the names the user supplied, while $host etc.
834 # will get canonicalized.
835 case $host---$target---$nonopt in
836 NONE---*---* | *---NONE---* | *---*---NONE) ;;
837 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
838 esac
839
840 test "$host_alias" != "$target_alias" &&
841   test "$program_prefix$program_suffix$program_transform_name" = \
842     NONENONEs,x,x, &&
843   program_prefix=${target_alias}-
844
845
846 # Find a good install program.  We prefer a C program (faster),
847 # so one script is as good as another.  But avoid the broken or
848 # incompatible versions:
849 # SysV /etc/install, /usr/sbin/install
850 # SunOS /usr/etc/install
851 # IRIX /sbin/install
852 # AIX /bin/install
853 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
854 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
855 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
856 # ./install, which can be erroneously created by make from ./install.sh.
857 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
858 echo "configure:859: checking for a BSD compatible install" >&5
859 if test -z "$INSTALL"; then
860 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
861   echo $ac_n "(cached) $ac_c" 1>&6
862 else
863     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
864   for ac_dir in $PATH; do
865     # Account for people who put trailing slashes in PATH elements.
866     case "$ac_dir/" in
867     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
868     *)
869       # OSF1 and SCO ODT 3.0 have their own names for install.
870       # Don't use installbsd from OSF since it installs stuff as root
871       # by default.
872       for ac_prog in ginstall scoinst install; do
873         if test -f $ac_dir/$ac_prog; then
874           if test $ac_prog = install &&
875             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
876             # AIX install.  It has an incompatible calling convention.
877             :
878           elif test $ac_prog = install &&
879             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
880             # program-specific install script used by HP pwplus--don't use.
881             :
882           else
883             ac_cv_path_install="$ac_dir/$ac_prog -c"
884             break 2
885           fi
886         fi
887       done
888       ;;
889     esac
890   done
891   IFS="$ac_save_IFS"
892
893 fi
894   if test "${ac_cv_path_install+set}" = set; then
895     INSTALL="$ac_cv_path_install"
896   else
897     # As a last resort, use the slow shell script.  We don't cache a
898     # path for INSTALL within a source directory, because that will
899     # break other packages using the cache if that directory is
900     # removed, or if the path is relative.
901     INSTALL="$ac_install_sh"
902   fi
903 fi
904 echo "$ac_t""$INSTALL" 1>&6
905
906 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
907 # It thinks the first close brace ends the variable substitution.
908 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
909
910 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
911
912 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
913
914 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
915 echo "configure:916: checking whether build environment is sane" >&5
916 # Just in case
917 sleep 1
918 echo timestamp > conftestfile
919 # Do `set' in a subshell so we don't clobber the current shell's
920 # arguments.  Must try -L first in case configure is actually a
921 # symlink; some systems play weird games with the mod time of symlinks
922 # (eg FreeBSD returns the mod time of the symlink's containing
923 # directory).
924 if (
925    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
926    if test "$*" = "X"; then
927       # -L didn't work.
928       set X `ls -t $srcdir/configure conftestfile`
929    fi
930    if test "$*" != "X $srcdir/configure conftestfile" \
931       && test "$*" != "X conftestfile $srcdir/configure"; then
932
933       # If neither matched, then we have a broken ls.  This can happen
934       # if, for instance, CONFIG_SHELL is bash and it inherits a
935       # broken ls alias from the environment.  This has actually
936       # happened.  Such a system could not be considered "sane".
937       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
938 alias in your environment" 1>&2; exit 1; }
939    fi
940
941    test "$2" = conftestfile
942    )
943 then
944    # Ok.
945    :
946 else
947    { echo "configure: error: newly created file is older than distributed files!
948 Check your system clock" 1>&2; exit 1; }
949 fi
950 rm -f conftest*
951 echo "$ac_t""yes" 1>&6
952 if test "$program_transform_name" = s,x,x,; then
953   program_transform_name=
954 else
955   # Double any \ or $.  echo might interpret backslashes.
956   cat <<\EOF_SED > conftestsed
957 s,\\,\\\\,g; s,\$,$$,g
958 EOF_SED
959   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
960   rm -f conftestsed
961 fi
962 test "$program_prefix" != NONE &&
963   program_transform_name="s,^,${program_prefix},;$program_transform_name"
964 # Use a double $ so make ignores it.
965 test "$program_suffix" != NONE &&
966   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
967
968 # sed with no file args requires a program.
969 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
970
971 for ac_prog in mawk gawk nawk awk
972 do
973 # Extract the first word of "$ac_prog", so it can be a program name with args.
974 set dummy $ac_prog; ac_word=$2
975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
976 echo "configure:977: checking for $ac_word" >&5
977 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   if test -n "$AWK"; then
981   ac_cv_prog_AWK="$AWK" # Let the user override the test.
982 else
983   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
984   ac_dummy="$PATH"
985   for ac_dir in $ac_dummy; do
986     test -z "$ac_dir" && ac_dir=.
987     if test -f $ac_dir/$ac_word; then
988       ac_cv_prog_AWK="$ac_prog"
989       break
990     fi
991   done
992   IFS="$ac_save_ifs"
993 fi
994 fi
995 AWK="$ac_cv_prog_AWK"
996 if test -n "$AWK"; then
997   echo "$ac_t""$AWK" 1>&6
998 else
999   echo "$ac_t""no" 1>&6
1000 fi
1001
1002 test -n "$AWK" && break
1003 done
1004
1005 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1006 echo "configure:1007: checking whether ${MAKE-make} sets \${MAKE}" >&5
1007 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1008 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1009   echo $ac_n "(cached) $ac_c" 1>&6
1010 else
1011   cat > conftestmake <<\EOF
1012 all:
1013         @echo 'ac_maketemp="${MAKE}"'
1014 EOF
1015 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1016 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1017 if test -n "$ac_maketemp"; then
1018   eval ac_cv_prog_make_${ac_make}_set=yes
1019 else
1020   eval ac_cv_prog_make_${ac_make}_set=no
1021 fi
1022 rm -f conftestmake
1023 fi
1024 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1025   echo "$ac_t""yes" 1>&6
1026   SET_MAKE=
1027 else
1028   echo "$ac_t""no" 1>&6
1029   SET_MAKE="MAKE=${MAKE-make}"
1030 fi
1031
1032
1033
1034 PACKAGE=$OL_PACKAGE
1035
1036 VERSION=$OL_VERSION
1037
1038 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1039   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1040 fi
1041
1042
1043
1044 missing_dir=`cd $ac_aux_dir && pwd`
1045 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working aclocal" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1051    ACLOCAL=aclocal
1052    echo "$ac_t""found" 1>&6
1053 else
1054    ACLOCAL="$missing_dir/missing aclocal"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working autoconf" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOCONF=autoconf
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOCONF="$missing_dir/missing autoconf"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working automake" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (automake --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOMAKE=automake
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOMAKE="$missing_dir/missing automake"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working autoheader" >&5
1086 # Run test in a subshell; some versions of sh will print an error if
1087 # an executable is not found, even if stderr is redirected.
1088 # Redirect stdin to placate older versions of autoconf.  Sigh.
1089 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1090    AUTOHEADER=autoheader
1091    echo "$ac_t""found" 1>&6
1092 else
1093    AUTOHEADER="$missing_dir/missing autoheader"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1098 echo "configure:1099: checking for working makeinfo" >&5
1099 # Run test in a subshell; some versions of sh will print an error if
1100 # an executable is not found, even if stderr is redirected.
1101 # Redirect stdin to placate older versions of autoconf.  Sigh.
1102 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1103    MAKEINFO=makeinfo
1104    echo "$ac_t""found" 1>&6
1105 else
1106    MAKEINFO="$missing_dir/missing makeinfo"
1107    echo "$ac_t""missing" 1>&6
1108 fi
1109
1110 install_sh="$missing_dir/install-sh"
1111 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1112
1113 for ac_prog in gnutar gtar tar
1114 do
1115 # Extract the first word of "$ac_prog", so it can be a program name with args.
1116 set dummy $ac_prog; ac_word=$2
1117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1118 echo "configure:1119: checking for $ac_word" >&5
1119 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1120   echo $ac_n "(cached) $ac_c" 1>&6
1121 else
1122   if test -n "$AMTAR"; then
1123   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1124 else
1125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1126   ac_dummy="$PATH"
1127   for ac_dir in $ac_dummy; do
1128     test -z "$ac_dir" && ac_dir=.
1129     if test -f $ac_dir/$ac_word; then
1130       ac_cv_prog_AMTAR="$ac_prog"
1131       break
1132     fi
1133   done
1134   IFS="$ac_save_ifs"
1135 fi
1136 fi
1137 AMTAR="$ac_cv_prog_AMTAR"
1138 if test -n "$AMTAR"; then
1139   echo "$ac_t""$AMTAR" 1>&6
1140 else
1141   echo "$ac_t""no" 1>&6
1142 fi
1143
1144 test -n "$AMTAR" && break
1145 done
1146
1147
1148 AMTARFLAGS=
1149 if test -n "$AMTAR"; then
1150   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1151         AMTARFLAGS=o
1152   fi
1153 fi
1154
1155 cat >> confdefs.h <<EOF
1156 #define OPENLDAP_PACKAGE "$PACKAGE"
1157 EOF
1158
1159 cat >> confdefs.h <<EOF
1160 #define OPENLDAP_VERSION "$VERSION"
1161 EOF
1162
1163
1164 cat >> confdefs.h <<EOF
1165 #define LDAP_VENDOR_VERSION $OL_API_INC
1166 EOF
1167
1168 cat >> confdefs.h <<EOF
1169 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1170 EOF
1171
1172 cat >> confdefs.h <<EOF
1173 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1174 EOF
1175
1176 cat >> confdefs.h <<EOF
1177 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1178 EOF
1179
1180
1181 OPENLDAP_LIBVERSION=$OL_API_LIB
1182
1183
1184
1185 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1186 echo "configure:1187: checking configure arguments" >&5
1187
1188
1189 top_builddir=`pwd`
1190
1191 ldap_subdir="/openldap"
1192
1193 # Check whether --with-subdir or --without-subdir was given.
1194 if test "${with_subdir+set}" = set; then
1195   withval="$with_subdir"
1196   case "$withval" in
1197         no) ldap_subdir=""
1198                 ;;
1199         yes)
1200                 ;;
1201         /*|\\*)
1202                 ldap_subdir="$withval"
1203                 ;;
1204         *)
1205                 ldap_subdir="/$withval"
1206                 ;;
1207 esac
1208
1209 fi
1210
1211
1212 # OpenLDAP --enable-debug
1213         # Check whether --enable-debug or --disable-debug was given.
1214 if test "${enable_debug+set}" = set; then
1215   enableval="$enable_debug"
1216   
1217         ol_arg=invalid
1218         for ol_val in auto yes no ; do
1219                 if test "$enableval" = "$ol_val" ; then
1220                         ol_arg="$ol_val"
1221                 fi
1222         done
1223         if test "$ol_arg" = "invalid" ; then
1224                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1225         fi
1226         ol_enable_debug="$ol_arg"
1227
1228 else
1229         ol_enable_debug="yes"
1230 fi
1231 # end --enable-debug
1232 # OpenLDAP --enable-syslog
1233         # Check whether --enable-syslog or --disable-syslog was given.
1234 if test "${enable_syslog+set}" = set; then
1235   enableval="$enable_syslog"
1236   
1237         ol_arg=invalid
1238         for ol_val in auto yes no ; do
1239                 if test "$enableval" = "$ol_val" ; then
1240                         ol_arg="$ol_val"
1241                 fi
1242         done
1243         if test "$ol_arg" = "invalid" ; then
1244                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1245         fi
1246         ol_enable_syslog="$ol_arg"
1247
1248 else
1249         ol_enable_syslog="auto"
1250 fi
1251 # end --enable-syslog
1252 # OpenLDAP --enable-proctitle
1253         # Check whether --enable-proctitle or --disable-proctitle was given.
1254 if test "${enable_proctitle+set}" = set; then
1255   enableval="$enable_proctitle"
1256   
1257         ol_arg=invalid
1258         for ol_val in auto yes no ; do
1259                 if test "$enableval" = "$ol_val" ; then
1260                         ol_arg="$ol_val"
1261                 fi
1262         done
1263         if test "$ol_arg" = "invalid" ; then
1264                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1265         fi
1266         ol_enable_proctitle="$ol_arg"
1267
1268 else
1269         ol_enable_proctitle="yes"
1270 fi
1271 # end --enable-proctitle
1272 # OpenLDAP --enable-cache
1273         # Check whether --enable-cache or --disable-cache was given.
1274 if test "${enable_cache+set}" = set; then
1275   enableval="$enable_cache"
1276   
1277         ol_arg=invalid
1278         for ol_val in auto yes no ; do
1279                 if test "$enableval" = "$ol_val" ; then
1280                         ol_arg="$ol_val"
1281                 fi
1282         done
1283         if test "$ol_arg" = "invalid" ; then
1284                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1285         fi
1286         ol_enable_cache="$ol_arg"
1287
1288 else
1289         ol_enable_cache="no"
1290 fi
1291 # end --enable-cache
1292 # OpenLDAP --enable-referrals
1293         # Check whether --enable-referrals or --disable-referrals was given.
1294 if test "${enable_referrals+set}" = set; then
1295   enableval="$enable_referrals"
1296   
1297         ol_arg=invalid
1298         for ol_val in auto yes no ; do
1299                 if test "$enableval" = "$ol_val" ; then
1300                         ol_arg="$ol_val"
1301                 fi
1302         done
1303         if test "$ol_arg" = "invalid" ; then
1304                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1305         fi
1306         ol_enable_referrals="$ol_arg"
1307
1308 else
1309         ol_enable_referrals="no"
1310 fi
1311 # end --enable-referrals
1312 # OpenLDAP --enable-kbind
1313         # Check whether --enable-kbind or --disable-kbind was given.
1314 if test "${enable_kbind+set}" = set; then
1315   enableval="$enable_kbind"
1316   
1317         ol_arg=invalid
1318         for ol_val in auto yes no ; do
1319                 if test "$enableval" = "$ol_val" ; then
1320                         ol_arg="$ol_val"
1321                 fi
1322         done
1323         if test "$ol_arg" = "invalid" ; then
1324                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1325         fi
1326         ol_enable_kbind="$ol_arg"
1327
1328 else
1329         ol_enable_kbind="no"
1330 fi
1331 # end --enable-kbind
1332 # OpenLDAP --enable-ipv6
1333         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1334 if test "${enable_ipv6+set}" = set; then
1335   enableval="$enable_ipv6"
1336   
1337         ol_arg=invalid
1338         for ol_val in auto yes no ; do
1339                 if test "$enableval" = "$ol_val" ; then
1340                         ol_arg="$ol_val"
1341                 fi
1342         done
1343         if test "$ol_arg" = "invalid" ; then
1344                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1345         fi
1346         ol_enable_ipv6="$ol_arg"
1347
1348 else
1349         ol_enable_ipv6="auto"
1350 fi
1351 # end --enable-ipv6
1352 # OpenLDAP --enable-local
1353         # Check whether --enable-local or --disable-local was given.
1354 if test "${enable_local+set}" = set; then
1355   enableval="$enable_local"
1356   
1357         ol_arg=invalid
1358         for ol_val in auto yes no ; do
1359                 if test "$enableval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1365         fi
1366         ol_enable_local="$ol_arg"
1367
1368 else
1369         ol_enable_local="auto"
1370 fi
1371 # end --enable-local
1372 # OpenLDAP --enable-rewrite
1373         # Check whether --enable-rewrite or --disable-rewrite was given.
1374 if test "${enable_rewrite+set}" = set; then
1375   enableval="$enable_rewrite"
1376   
1377         ol_arg=invalid
1378         for ol_val in auto yes no ; do
1379                 if test "$enableval" = "$ol_val" ; then
1380                         ol_arg="$ol_val"
1381                 fi
1382         done
1383         if test "$ol_arg" = "invalid" ; then
1384                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1385         fi
1386         ol_enable_rewrite="$ol_arg"
1387
1388 else
1389         ol_enable_rewrite="no"
1390 fi
1391 # end --enable-rewrite
1392 # OpenLDAP --enable-x_compile
1393         # Check whether --enable-x_compile or --disable-x_compile was given.
1394 if test "${enable_x_compile+set}" = set; then
1395   enableval="$enable_x_compile"
1396   
1397         ol_arg=invalid
1398         for ol_val in yes no ; do
1399                 if test "$enableval" = "$ol_val" ; then
1400                         ol_arg="$ol_val"
1401                 fi
1402         done
1403         if test "$ol_arg" = "invalid" ; then
1404                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1405         fi
1406         ol_enable_x_compile="$ol_arg"
1407
1408 else
1409         ol_enable_x_compile="no"
1410 fi
1411 # end --enable-x_compile
1412
1413
1414 # OpenLDAP --with-cyrus_sasl
1415         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1416 if test "${with_cyrus_sasl+set}" = set; then
1417   withval="$with_cyrus_sasl"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no  ; do
1421                 if test "$withval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1427         fi
1428         ol_with_cyrus_sasl="$ol_arg"
1429
1430 else
1431         ol_with_cyrus_sasl="auto"
1432 fi
1433 # end --with-cyrus_sasl
1434
1435 # OpenLDAP --with-fetch
1436         # Check whether --with-fetch or --without-fetch was given.
1437 if test "${with_fetch+set}" = set; then
1438   withval="$with_fetch"
1439   
1440         ol_arg=invalid
1441         for ol_val in auto yes no  ; do
1442                 if test "$withval" = "$ol_val" ; then
1443                         ol_arg="$ol_val"
1444                 fi
1445         done
1446         if test "$ol_arg" = "invalid" ; then
1447                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1448         fi
1449         ol_with_fetch="$ol_arg"
1450
1451 else
1452         ol_with_fetch="auto"
1453 fi
1454 # end --with-fetch
1455
1456 # OpenLDAP --with-kerberos
1457         # Check whether --with-kerberos or --without-kerberos was given.
1458 if test "${with_kerberos+set}" = set; then
1459   withval="$with_kerberos"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1463                 if test "$withval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1469         fi
1470         ol_with_kerberos="$ol_arg"
1471
1472 else
1473         ol_with_kerberos="auto"
1474 fi
1475 # end --with-kerberos
1476
1477 # OpenLDAP --with-readline
1478         # Check whether --with-readline or --without-readline was given.
1479 if test "${with_readline+set}" = set; then
1480   withval="$with_readline"
1481   
1482         ol_arg=invalid
1483         for ol_val in auto yes no  ; do
1484                 if test "$withval" = "$ol_val" ; then
1485                         ol_arg="$ol_val"
1486                 fi
1487         done
1488         if test "$ol_arg" = "invalid" ; then
1489                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1490         fi
1491         ol_with_readline="$ol_arg"
1492
1493 else
1494         ol_with_readline="auto"
1495 fi
1496 # end --with-readline
1497
1498 # OpenLDAP --with-threads
1499         # Check whether --with-threads or --without-threads was given.
1500 if test "${with_threads+set}" = set; then
1501   withval="$with_threads"
1502   
1503         ol_arg=invalid
1504         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1505                 if test "$withval" = "$ol_val" ; then
1506                         ol_arg="$ol_val"
1507                 fi
1508         done
1509         if test "$ol_arg" = "invalid" ; then
1510                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1511         fi
1512         ol_with_threads="$ol_arg"
1513
1514 else
1515         ol_with_threads="auto"
1516 fi
1517 # end --with-threads
1518
1519 # OpenLDAP --with-tls
1520         # Check whether --with-tls or --without-tls was given.
1521 if test "${with_tls+set}" = set; then
1522   withval="$with_tls"
1523   
1524         ol_arg=invalid
1525         for ol_val in auto ssleay openssl yes no  ; do
1526                 if test "$withval" = "$ol_val" ; then
1527                         ol_arg="$ol_val"
1528                 fi
1529         done
1530         if test "$ol_arg" = "invalid" ; then
1531                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1532         fi
1533         ol_with_tls="$ol_arg"
1534
1535 else
1536         ol_with_tls="auto"
1537 fi
1538 # end --with-tls
1539
1540 # OpenLDAP --with-yielding_select
1541         # Check whether --with-yielding_select or --without-yielding_select was given.
1542 if test "${with_yielding_select+set}" = set; then
1543   withval="$with_yielding_select"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no manual  ; do
1547                 if test "$withval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1553         fi
1554         ol_with_yielding_select="$ol_arg"
1555
1556 else
1557         ol_with_yielding_select="auto"
1558 fi
1559 # end --with-yielding_select
1560
1561
1562
1563 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1564 if test "${with_xxslapdoptions+set}" = set; then
1565   withval="$with_xxslapdoptions"
1566   :
1567 fi
1568
1569 # OpenLDAP --enable-slapd
1570         # Check whether --enable-slapd or --disable-slapd was given.
1571 if test "${enable_slapd+set}" = set; then
1572   enableval="$enable_slapd"
1573   
1574         ol_arg=invalid
1575         for ol_val in auto yes no ; do
1576                 if test "$enableval" = "$ol_val" ; then
1577                         ol_arg="$ol_val"
1578                 fi
1579         done
1580         if test "$ol_arg" = "invalid" ; then
1581                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1582         fi
1583         ol_enable_slapd="$ol_arg"
1584
1585 else
1586         ol_enable_slapd="yes"
1587 fi
1588 # end --enable-slapd
1589 # OpenLDAP --enable-aci
1590         # Check whether --enable-aci or --disable-aci was given.
1591 if test "${enable_aci+set}" = set; then
1592   enableval="$enable_aci"
1593   
1594         ol_arg=invalid
1595         for ol_val in auto yes no ; do
1596                 if test "$enableval" = "$ol_val" ; then
1597                         ol_arg="$ol_val"
1598                 fi
1599         done
1600         if test "$ol_arg" = "invalid" ; then
1601                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1602         fi
1603         ol_enable_aci="$ol_arg"
1604
1605 else
1606         ol_enable_aci="no"
1607 fi
1608 # end --enable-aci
1609 # OpenLDAP --enable-cleartext
1610         # Check whether --enable-cleartext or --disable-cleartext was given.
1611 if test "${enable_cleartext+set}" = set; then
1612   enableval="$enable_cleartext"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no ; do
1616                 if test "$enableval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1622         fi
1623         ol_enable_cleartext="$ol_arg"
1624
1625 else
1626         ol_enable_cleartext="yes"
1627 fi
1628 # end --enable-cleartext
1629 # OpenLDAP --enable-crypt
1630         # Check whether --enable-crypt or --disable-crypt was given.
1631 if test "${enable_crypt+set}" = set; then
1632   enableval="$enable_crypt"
1633   
1634         ol_arg=invalid
1635         for ol_val in auto yes no ; do
1636                 if test "$enableval" = "$ol_val" ; then
1637                         ol_arg="$ol_val"
1638                 fi
1639         done
1640         if test "$ol_arg" = "invalid" ; then
1641                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1642         fi
1643         ol_enable_crypt="$ol_arg"
1644
1645 else
1646         ol_enable_crypt="no"
1647 fi
1648 # end --enable-crypt
1649 # OpenLDAP --enable-dynamic
1650         # Check whether --enable-dynamic or --disable-dynamic was given.
1651 if test "${enable_dynamic+set}" = set; then
1652   enableval="$enable_dynamic"
1653   
1654         ol_arg=invalid
1655         for ol_val in auto yes no ; do
1656                 if test "$enableval" = "$ol_val" ; then
1657                         ol_arg="$ol_val"
1658                 fi
1659         done
1660         if test "$ol_arg" = "invalid" ; then
1661                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1662         fi
1663         ol_enable_dynamic="$ol_arg"
1664
1665 else
1666         ol_enable_dynamic="no"
1667 fi
1668 # end --enable-dynamic
1669 # OpenLDAP --enable-kpasswd
1670         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1671 if test "${enable_kpasswd+set}" = set; then
1672   enableval="$enable_kpasswd"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1682         fi
1683         ol_enable_kpasswd="$ol_arg"
1684
1685 else
1686         ol_enable_kpasswd="no"
1687 fi
1688 # end --enable-kpasswd
1689 # OpenLDAP --enable-lmpasswd
1690         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1691 if test "${enable_lmpasswd+set}" = set; then
1692   enableval="$enable_lmpasswd"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1702         fi
1703         ol_enable_lmpasswd="$ol_arg"
1704
1705 else
1706         ol_enable_lmpasswd="no"
1707 fi
1708 # end --enable-lmpasswd
1709 # OpenLDAP --enable-spasswd
1710         # Check whether --enable-spasswd or --disable-spasswd was given.
1711 if test "${enable_spasswd+set}" = set; then
1712   enableval="$enable_spasswd"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1722         fi
1723         ol_enable_spasswd="$ol_arg"
1724
1725 else
1726         ol_enable_spasswd="no"
1727 fi
1728 # end --enable-spasswd
1729 # OpenLDAP --enable-modules
1730         # Check whether --enable-modules or --disable-modules was given.
1731 if test "${enable_modules+set}" = set; then
1732   enableval="$enable_modules"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1742         fi
1743         ol_enable_modules="$ol_arg"
1744
1745 else
1746         ol_enable_modules="no"
1747 fi
1748 # end --enable-modules
1749 # OpenLDAP --enable-phonetic
1750         # Check whether --enable-phonetic or --disable-phonetic was given.
1751 if test "${enable_phonetic+set}" = set; then
1752   enableval="$enable_phonetic"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1762         fi
1763         ol_enable_phonetic="$ol_arg"
1764
1765 else
1766         ol_enable_phonetic="no"
1767 fi
1768 # end --enable-phonetic
1769 # OpenLDAP --enable-rlookups
1770         # Check whether --enable-rlookups or --disable-rlookups was given.
1771 if test "${enable_rlookups+set}" = set; then
1772   enableval="$enable_rlookups"
1773   
1774         ol_arg=invalid
1775         for ol_val in auto yes no ; do
1776                 if test "$enableval" = "$ol_val" ; then
1777                         ol_arg="$ol_val"
1778                 fi
1779         done
1780         if test "$ol_arg" = "invalid" ; then
1781                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1782         fi
1783         ol_enable_rlookups="$ol_arg"
1784
1785 else
1786         ol_enable_rlookups="no"
1787 fi
1788 # end --enable-rlookups
1789 # OpenLDAP --enable-slp
1790         # Check whether --enable-slp or --disable-slp was given.
1791 if test "${enable_slp+set}" = set; then
1792   enableval="$enable_slp"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1802         fi
1803         ol_enable_slp="$ol_arg"
1804
1805 else
1806         ol_enable_slp="no"
1807 fi
1808 # end --enable-slp
1809 # OpenLDAP --enable-wrappers
1810         # Check whether --enable-wrappers or --disable-wrappers was given.
1811 if test "${enable_wrappers+set}" = set; then
1812   enableval="$enable_wrappers"
1813   
1814         ol_arg=invalid
1815         for ol_val in auto yes no ; do
1816                 if test "$enableval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1822         fi
1823         ol_enable_wrappers="$ol_arg"
1824
1825 else
1826         ol_enable_wrappers="no"
1827 fi
1828 # end --enable-wrappers
1829
1830 # OpenLDAP --enable-bdb
1831         # Check whether --enable-bdb or --disable-bdb was given.
1832 if test "${enable_bdb+set}" = set; then
1833   enableval="$enable_bdb"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1843         fi
1844         ol_enable_bdb="$ol_arg"
1845
1846 else
1847         ol_enable_bdb="no"
1848 fi
1849 # end --enable-bdb
1850 # OpenLDAP --with-bdb_module
1851         # Check whether --with-bdb_module or --without-bdb_module was given.
1852 if test "${with_bdb_module+set}" = set; then
1853   withval="$with_bdb_module"
1854   
1855         ol_arg=invalid
1856         for ol_val in static dynamic ; do
1857                 if test "$withval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1863         fi
1864         ol_with_bdb_module="$ol_arg"
1865
1866 else
1867         ol_with_bdb_module="static"
1868 fi
1869 # end --with-bdb_module
1870
1871 # OpenLDAP --enable-dnssrv
1872         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1873 if test "${enable_dnssrv+set}" = set; then
1874   enableval="$enable_dnssrv"
1875   
1876         ol_arg=invalid
1877         for ol_val in auto yes no ; do
1878                 if test "$enableval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1884         fi
1885         ol_enable_dnssrv="$ol_arg"
1886
1887 else
1888         ol_enable_dnssrv="no"
1889 fi
1890 # end --enable-dnssrv
1891 # OpenLDAP --with-dnssrv_module
1892         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1893 if test "${with_dnssrv_module+set}" = set; then
1894   withval="$with_dnssrv_module"
1895   
1896         ol_arg=invalid
1897         for ol_val in static dynamic ; do
1898                 if test "$withval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1904         fi
1905         ol_with_dnssrv_module="$ol_arg"
1906
1907 else
1908         ol_with_dnssrv_module="static"
1909 fi
1910 # end --with-dnssrv_module
1911
1912 # OpenLDAP --enable-ldap
1913         # Check whether --enable-ldap or --disable-ldap was given.
1914 if test "${enable_ldap+set}" = set; then
1915   enableval="$enable_ldap"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto yes no ; do
1919                 if test "$enableval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1925         fi
1926         ol_enable_ldap="$ol_arg"
1927
1928 else
1929         ol_enable_ldap="no"
1930 fi
1931 # end --enable-ldap
1932 # OpenLDAP --with-ldap_module
1933         # Check whether --with-ldap_module or --without-ldap_module was given.
1934 if test "${with_ldap_module+set}" = set; then
1935   withval="$with_ldap_module"
1936   
1937         ol_arg=invalid
1938         for ol_val in static dynamic ; do
1939                 if test "$withval" = "$ol_val" ; then
1940                         ol_arg="$ol_val"
1941                 fi
1942         done
1943         if test "$ol_arg" = "invalid" ; then
1944                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1945         fi
1946         ol_with_ldap_module="$ol_arg"
1947
1948 else
1949         ol_with_ldap_module="static"
1950 fi
1951 # end --with-ldap_module
1952
1953 # OpenLDAP --enable-ldbm
1954         # Check whether --enable-ldbm or --disable-ldbm was given.
1955 if test "${enable_ldbm+set}" = set; then
1956   enableval="$enable_ldbm"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1966         fi
1967         ol_enable_ldbm="$ol_arg"
1968
1969 else
1970         ol_enable_ldbm="yes"
1971 fi
1972 # end --enable-ldbm
1973 # OpenLDAP --with-ldbm_api
1974         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1975 if test "${with_ldbm_api+set}" = set; then
1976   withval="$with_ldbm_api"
1977   
1978         ol_arg=invalid
1979         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1980                 if test "$withval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1986         fi
1987         ol_with_ldbm_api="$ol_arg"
1988
1989 else
1990         ol_with_ldbm_api="auto"
1991 fi
1992 # end --with-ldbm_api
1993
1994 # OpenLDAP --with-ldbm_module
1995         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1996 if test "${with_ldbm_module+set}" = set; then
1997   withval="$with_ldbm_module"
1998   
1999         ol_arg=invalid
2000         for ol_val in static dynamic ; do
2001                 if test "$withval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2007         fi
2008         ol_with_ldbm_module="$ol_arg"
2009
2010 else
2011         ol_with_ldbm_module="static"
2012 fi
2013 # end --with-ldbm_module
2014
2015 # OpenLDAP --with-ldbm_type
2016         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2017 if test "${with_ldbm_type+set}" = set; then
2018   withval="$with_ldbm_type"
2019   
2020         ol_arg=invalid
2021         for ol_val in auto btree hash ; do
2022                 if test "$withval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2028         fi
2029         ol_with_ldbm_type="$ol_arg"
2030
2031 else
2032         ol_with_ldbm_type="auto"
2033 fi
2034 # end --with-ldbm_type
2035
2036 # OpenLDAP --enable-meta
2037         # Check whether --enable-meta or --disable-meta was given.
2038 if test "${enable_meta+set}" = set; then
2039   enableval="$enable_meta"
2040   
2041         ol_arg=invalid
2042         for ol_val in auto yes no ; do
2043                 if test "$enableval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2049         fi
2050         ol_enable_meta="$ol_arg"
2051
2052 else
2053         ol_enable_meta="no"
2054 fi
2055 # end --enable-meta
2056 # OpenLDAP --with-meta_module
2057         # Check whether --with-meta_module or --without-meta_module was given.
2058 if test "${with_meta_module+set}" = set; then
2059   withval="$with_meta_module"
2060   
2061         ol_arg=invalid
2062         for ol_val in static dynamic ; do
2063                 if test "$withval" = "$ol_val" ; then
2064                         ol_arg="$ol_val"
2065                 fi
2066         done
2067         if test "$ol_arg" = "invalid" ; then
2068                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2069         fi
2070         ol_with_meta_module="$ol_arg"
2071
2072 else
2073         ol_with_meta_module="static"
2074 fi
2075 # end --with-meta_module
2076
2077 # OpenLDAP --enable-monitor
2078         # Check whether --enable-monitor or --disable-monitor was given.
2079 if test "${enable_monitor+set}" = set; then
2080   enableval="$enable_monitor"
2081   
2082         ol_arg=invalid
2083         for ol_val in auto yes no ; do
2084                 if test "$enableval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2090         fi
2091         ol_enable_monitor="$ol_arg"
2092
2093 else
2094         ol_enable_monitor="no"
2095 fi
2096 # end --enable-monitor
2097 # OpenLDAP --with-monitor_module
2098         # Check whether --with-monitor_module or --without-monitor_module was given.
2099 if test "${with_monitor_module+set}" = set; then
2100   withval="$with_monitor_module"
2101   
2102         ol_arg=invalid
2103         for ol_val in static dynamic ; do
2104                 if test "$withval" = "$ol_val" ; then
2105                         ol_arg="$ol_val"
2106                 fi
2107         done
2108         if test "$ol_arg" = "invalid" ; then
2109                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2110         fi
2111         ol_with_monitor_module="$ol_arg"
2112
2113 else
2114         ol_with_monitor_module="static"
2115 fi
2116 # end --with-monitor_module
2117
2118 # OpenLDAP --enable-passwd
2119         # Check whether --enable-passwd or --disable-passwd was given.
2120 if test "${enable_passwd+set}" = set; then
2121   enableval="$enable_passwd"
2122   
2123         ol_arg=invalid
2124         for ol_val in auto yes no ; do
2125                 if test "$enableval" = "$ol_val" ; then
2126                         ol_arg="$ol_val"
2127                 fi
2128         done
2129         if test "$ol_arg" = "invalid" ; then
2130                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2131         fi
2132         ol_enable_passwd="$ol_arg"
2133
2134 else
2135         ol_enable_passwd="no"
2136 fi
2137 # end --enable-passwd
2138 # OpenLDAP --with-passwd_module
2139         # Check whether --with-passwd_module or --without-passwd_module was given.
2140 if test "${with_passwd_module+set}" = set; then
2141   withval="$with_passwd_module"
2142   
2143         ol_arg=invalid
2144         for ol_val in static dynamic ; do
2145                 if test "$withval" = "$ol_val" ; then
2146                         ol_arg="$ol_val"
2147                 fi
2148         done
2149         if test "$ol_arg" = "invalid" ; then
2150                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2151         fi
2152         ol_with_passwd_module="$ol_arg"
2153
2154 else
2155         ol_with_passwd_module="static"
2156 fi
2157 # end --with-passwd_module
2158
2159 # OpenLDAP --enable-perl
2160         # Check whether --enable-perl or --disable-perl was given.
2161 if test "${enable_perl+set}" = set; then
2162   enableval="$enable_perl"
2163   
2164         ol_arg=invalid
2165         for ol_val in auto yes no ; do
2166                 if test "$enableval" = "$ol_val" ; then
2167                         ol_arg="$ol_val"
2168                 fi
2169         done
2170         if test "$ol_arg" = "invalid" ; then
2171                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2172         fi
2173         ol_enable_perl="$ol_arg"
2174
2175 else
2176         ol_enable_perl="no"
2177 fi
2178 # end --enable-perl
2179 # OpenLDAP --with-perl_module
2180         # Check whether --with-perl_module or --without-perl_module was given.
2181 if test "${with_perl_module+set}" = set; then
2182   withval="$with_perl_module"
2183   
2184         ol_arg=invalid
2185         for ol_val in static dynamic ; do
2186                 if test "$withval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2192         fi
2193         ol_with_perl_module="$ol_arg"
2194
2195 else
2196         ol_with_perl_module="static"
2197 fi
2198 # end --with-perl_module
2199
2200 # OpenLDAP --enable-shell
2201         # Check whether --enable-shell or --disable-shell was given.
2202 if test "${enable_shell+set}" = set; then
2203   enableval="$enable_shell"
2204   
2205         ol_arg=invalid
2206         for ol_val in auto yes no ; do
2207                 if test "$enableval" = "$ol_val" ; then
2208                         ol_arg="$ol_val"
2209                 fi
2210         done
2211         if test "$ol_arg" = "invalid" ; then
2212                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2213         fi
2214         ol_enable_shell="$ol_arg"
2215
2216 else
2217         ol_enable_shell="no"
2218 fi
2219 # end --enable-shell
2220 # OpenLDAP --with-shell_module
2221         # Check whether --with-shell_module or --without-shell_module was given.
2222 if test "${with_shell_module+set}" = set; then
2223   withval="$with_shell_module"
2224   
2225         ol_arg=invalid
2226         for ol_val in static dynamic ; do
2227                 if test "$withval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2233         fi
2234         ol_with_shell_module="$ol_arg"
2235
2236 else
2237         ol_with_shell_module="static"
2238 fi
2239 # end --with-shell_module
2240
2241 # OpenLDAP --enable-sql
2242         # Check whether --enable-sql or --disable-sql was given.
2243 if test "${enable_sql+set}" = set; then
2244   enableval="$enable_sql"
2245   
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2254         fi
2255         ol_enable_sql="$ol_arg"
2256
2257 else
2258         ol_enable_sql="no"
2259 fi
2260 # end --enable-sql
2261 # OpenLDAP --with-sql_module
2262         # Check whether --with-sql_module or --without-sql_module was given.
2263 if test "${with_sql_module+set}" = set; then
2264   withval="$with_sql_module"
2265   
2266         ol_arg=invalid
2267         for ol_val in static dynamic ; do
2268                 if test "$withval" = "$ol_val" ; then
2269                         ol_arg="$ol_val"
2270                 fi
2271         done
2272         if test "$ol_arg" = "invalid" ; then
2273                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2274         fi
2275         ol_with_sql_module="$ol_arg"
2276
2277 else
2278         ol_with_sql_module="static"
2279 fi
2280 # end --with-sql_module
2281
2282 # OpenLDAP --enable-tcl
2283         # Check whether --enable-tcl or --disable-tcl was given.
2284 if test "${enable_tcl+set}" = set; then
2285   enableval="$enable_tcl"
2286   
2287         ol_arg=invalid
2288         for ol_val in auto yes no ; do
2289                 if test "$enableval" = "$ol_val" ; then
2290                         ol_arg="$ol_val"
2291                 fi
2292         done
2293         if test "$ol_arg" = "invalid" ; then
2294                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2295         fi
2296         ol_enable_tcl="$ol_arg"
2297
2298 else
2299         ol_enable_tcl="no"
2300 fi
2301 # end --enable-tcl
2302 # OpenLDAP --with-tcl_module
2303         # Check whether --with-tcl_module or --without-tcl_module was given.
2304 if test "${with_tcl_module+set}" = set; then
2305   withval="$with_tcl_module"
2306   
2307         ol_arg=invalid
2308         for ol_val in static dynamic ; do
2309                 if test "$withval" = "$ol_val" ; then
2310                         ol_arg="$ol_val"
2311                 fi
2312         done
2313         if test "$ol_arg" = "invalid" ; then
2314                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2315         fi
2316         ol_with_tcl_module="$ol_arg"
2317
2318 else
2319         ol_with_tcl_module="static"
2320 fi
2321 # end --with-tcl_module
2322
2323
2324 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2325 if test "${with_xxslurpdoptions+set}" = set; then
2326   withval="$with_xxslurpdoptions"
2327   :
2328 fi
2329
2330 # OpenLDAP --enable-slurpd
2331         # Check whether --enable-slurpd or --disable-slurpd was given.
2332 if test "${enable_slurpd+set}" = set; then
2333   enableval="$enable_slurpd"
2334   
2335         ol_arg=invalid
2336         for ol_val in auto yes no ; do
2337                 if test "$enableval" = "$ol_val" ; then
2338                         ol_arg="$ol_val"
2339                 fi
2340         done
2341         if test "$ol_arg" = "invalid" ; then
2342                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2343         fi
2344         ol_enable_slurpd="$ol_arg"
2345
2346 else
2347         ol_enable_slurpd="auto"
2348 fi
2349 # end --enable-slurpd
2350
2351 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2352 if test "${with_xxliboptions+set}" = set; then
2353   withval="$with_xxliboptions"
2354   :
2355 fi
2356
2357 # Check whether --enable-static or --disable-static was given.
2358 if test "${enable_static+set}" = set; then
2359   enableval="$enable_static"
2360   p=${PACKAGE-default}
2361 case "$enableval" in
2362 yes) enable_static=yes ;;
2363 no) enable_static=no ;;
2364 *)
2365   enable_static=no
2366   # Look at the argument we got.  We use all the common list separators.
2367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2368   for pkg in $enableval; do
2369     if test "X$pkg" = "X$p"; then
2370       enable_static=yes
2371     fi
2372   done
2373   IFS="$ac_save_ifs"
2374   ;;
2375 esac
2376 else
2377   enable_static=yes
2378 fi
2379
2380 # Check whether --enable-shared or --disable-shared was given.
2381 if test "${enable_shared+set}" = set; then
2382   enableval="$enable_shared"
2383   p=${PACKAGE-default}
2384 case "$enableval" in
2385 yes) enable_shared=yes ;;
2386 no) enable_shared=no ;;
2387 *)
2388   enable_shared=no
2389   # Look at the argument we got.  We use all the common list separators.
2390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2391   for pkg in $enableval; do
2392     if test "X$pkg" = "X$p"; then
2393       enable_shared=yes
2394     fi
2395   done
2396   IFS="$ac_save_ifs"
2397   ;;
2398 esac
2399 else
2400   enable_shared=yes
2401 fi
2402
2403
2404
2405 # validate options
2406 if test $ol_enable_slapd = no ; then
2407                 if test $ol_enable_bdb = yes ; then
2408                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2409         fi
2410         if test $ol_enable_dnssrv = yes ; then
2411                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2412         fi
2413         if test $ol_enable_ldap = yes ; then
2414                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2415         fi
2416         if test $ol_enable_ldbm = yes ; then
2417                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2418         fi
2419         if test $ol_enable_meta = yes ; then
2420                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2421         fi
2422         if test $ol_enable_module = yes ; then
2423                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2424         fi
2425         if test $ol_enable_passwd = yes ; then
2426                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2427         fi
2428         if test $ol_enable_perl = yes ; then
2429                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2430         fi
2431         if test $ol_enable_shell = yes ; then
2432                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2433         fi
2434         if test $ol_enable_tcl = yes ; then
2435                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2436         fi
2437         if test $ol_enable_sql = yes ; then
2438                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2439         fi
2440         if test $ol_enable_modules = yes ; then
2441                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2442         fi
2443         if test $ol_enable_wrappers = yes ; then
2444                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2445         fi
2446         if test $ol_enable_phonetic = yes ; then
2447                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2448         fi
2449         if test $ol_enable_rlookups = yes ; then
2450                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2451         fi
2452         if test $ol_enable_aci = yes ; then
2453                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2454         fi
2455         if test $ol_with_ldbm_api != auto ; then
2456                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2457         fi
2458         if test $ol_with_ldbm_type != auto ; then
2459                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2460         fi
2461         if test $ol_with_bdb_module != static ; then
2462                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2463         fi
2464         if test $ol_with_dnssrv_module != static ; then
2465                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2466         fi
2467         if test $ol_with_ldap_module != static ; then
2468                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2469         fi
2470         if test $ol_with_ldbm_module != static ; then
2471                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2472         fi
2473         if test $ol_with_meta_module != static ; then
2474                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2475         fi
2476         if test $ol_with_monitor_module != static ; then
2477                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2478         fi
2479         if test $ol_with_passwd_module != static ; then
2480                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2481         fi
2482         if test $ol_with_perl_module != static ; then
2483                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2484         fi
2485         if test $ol_with_shell_module != static ; then
2486                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2487         fi
2488         if test $ol_with_tcl_module != static ; then
2489                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2490         fi
2491         if test $ol_with_sql_module != static ; then
2492                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2493         fi
2494         if test $ol_enable_slurpd = yes ; then
2495                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2496         fi
2497         if test $ol_enable_rewrite = yes ; then
2498                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2499         fi
2500
2501         # force settings to no
2502         ol_enable_bdb=no
2503         ol_enable_dnssrv=no
2504         ol_enable_ldap=no
2505         ol_enable_ldbm=no
2506         ol_enable_meta=no
2507         ol_enable_monitor=no
2508         ol_enable_passwd=no
2509         ol_enable_perl=no
2510         ol_enable_shell=no
2511         ol_enable_tcl=no
2512         ol_enable_sql=no
2513
2514         ol_enable_modules=no
2515         ol_enable_phonetic=no
2516         ol_enable_rlookups=no
2517         ol_enable_aci=no
2518         ol_enable_wrappers=no
2519         ol_enable_dynamic=no
2520
2521         ol_with_ldbm_api=no
2522         ol_with_ldbm_type=no
2523
2524         ol_with_bdb_module=static
2525         ol_with_dnssrv_module=static
2526         ol_with_ldap_module=static
2527         ol_with_ldbm_module=static
2528         ol_with_meta_module=static
2529         ol_with_monitor_module=static
2530         ol_with_passwd_module=static
2531         ol_with_perl_module=static
2532         ol_with_shell_module=static
2533         ol_with_tcl_module=static
2534         ol_with_sql_module=static
2535
2536         ol_enable_slurpd=no
2537
2538         ol_enable_rewrite=no
2539
2540 elif test $ol_enable_ldbm = no ; then
2541         
2542         if test $ol_with_ldbm_api != auto ; then
2543                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2544         fi
2545
2546         if test $ol_with_ldbm_type != auto ; then
2547                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2548         fi
2549
2550         if test $ol_with_ldbm_module != static ; then
2551                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2552         fi
2553
2554         if test $ol_enable_modules != yes -a \
2555                 $ol_enable_bdb = no -a \
2556                 $ol_enable_dnssrv = no -a \
2557                 $ol_enable_ldap = no -a \
2558                 $ol_enable_meta = no -a \
2559                 $ol_enable_monitor = no -a \
2560                 $ol_enable_passwd = no -a \
2561                 $ol_enable_perl = no -a \
2562                 $ol_enable_shell = no -a \
2563                 $ol_enable_sql = no -a \
2564                 $ol_enable_tcl = no ; then
2565                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2566         fi
2567
2568         ol_with_ldbm_api=no
2569         ol_with_ldbm_type=no
2570         ol_with_ldbm_module=static
2571
2572 else
2573                 if test $ol_with_ldbm_api = gdbm -a \
2574                 $ol_with_ldbm_type = btree ; then
2575                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2576         fi
2577         if test $ol_with_ldbm_api = mdbm -a \
2578                 $ol_with_ldbm_type = btree ; then
2579                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2580         fi
2581         if test $ol_with_ldbm_api = ndbm -a \
2582                 $ol_with_ldbm_type = btree ; then
2583                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2584         fi
2585 fi
2586
2587 if test $ol_enable_slurpd = yes ; then
2588                 if test $ol_with_threads = no ; then
2589                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2590         fi
2591 fi
2592
2593 if test $ol_enable_lmpasswd = yes ; then
2594         if test $ol_with_tls = no ; then
2595                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2596         fi
2597 fi
2598
2599 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2600         if test $ol_with_kerberos = no ; then
2601                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2602         fi
2603         ol_with_kerberos=yes
2604 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2605         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2606                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2607         fi
2608         ol_with_kerberos=no
2609 fi
2610
2611 if test $ol_enable_spasswd = yes ; then
2612         if test $ol_with_cyrus_sasl = no ; then
2613                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2614         fi
2615         ol_with_cyrus_sasl=yes
2616 fi
2617
2618 echo "$ac_t""done" 1>&6
2619
2620 LDAP_LIBS=
2621 LDIF_LIBS=
2622 LDBM_LIBS=
2623 LTHREAD_LIBS=
2624 LUTIL_LIBS=
2625
2626 SLAPD_LIBS=
2627 SLURPD_LIBS=
2628
2629 BUILD_SLAPD=no
2630 BUILD_SLURPD=no
2631
2632 BUILD_THREAD=no
2633
2634 BUILD_BDB=no
2635 BUILD_DNSSRV=no
2636 BUILD_LDAP=no
2637 BUILD_LDBM=no
2638 BUILD_META=no
2639 BUILD_MONITOR=no
2640 BUILD_PASSWD=no
2641 BUILD_PERL=no
2642 BUILD_SHELL=no
2643 BUILD_SQL=no
2644 BUILD_TCL=no
2645
2646 BUILD_BDB_DYNAMIC=static
2647 BUILD_DNSSRV_DYNAMIC=static
2648 BUILD_LDAP_DYNAMIC=static
2649 BUILD_LDBM_DYNAMIC=static
2650 BUILD_META_DYNAMIC=static
2651 BUILD_MONITOR_DYNAMIC=static
2652 BUILD_PASSWD_DYNAMIC=static
2653 BUILD_PERL_DYNAMIC=static
2654 BUILD_SHELL_DYNAMIC=static
2655 BUILD_TCL_DYNAMIC=static
2656 BUILD_SQL_DYNAMIC=static
2657
2658 SLAPD_MODULES_LDFLAGS=
2659 SLAPD_MODULES_CPPFLAGS=
2660 SLAPD_MODULES_LIST=
2661
2662 SLAPD_PERL_LDFLAGS=
2663 MOD_PERL_LDFLAGS=
2664 PERL_CPPFLAGS=
2665
2666 SLAPD_SQL_LDFLAGS=
2667 SLAPD_SQL_LIBS=
2668 SLAPD_SQL_INCLUDES=
2669
2670 MOD_TCL_LIB=
2671 KRB4_LIBS=
2672 KRB5_LIBS=
2673 READLINE_LIBS=
2674 SASL_LIBS=
2675 TERMCAP_LIBS=
2676 TLS_LIBS=
2677 MODULES_LIBS=
2678 AUTH_LIBS=
2679
2680 SLAPD_SLP_LIBS=
2681
2682
2683
2684 cat >> confdefs.h <<\EOF
2685 #define HAVE_MKVERSION 1
2686 EOF
2687
2688
2689
2690
2691 ol_aix_threads=no
2692 case "$target" in
2693 *-*-aix*)       if test -z "$CC" ; then
2694                 case "$ol_with_threads" in
2695                 auto | yes |  posix) ol_aix_threads=yes ;;
2696                 esac
2697         fi
2698 ;;
2699 esac
2700
2701 if test $ol_aix_threads = yes ; then
2702         if test -z "${CC}" ; then
2703                 for ac_prog in cc_r xlc_r cc
2704 do
2705 # Extract the first word of "$ac_prog", so it can be a program name with args.
2706 set dummy $ac_prog; ac_word=$2
2707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2708 echo "configure:2709: checking for $ac_word" >&5
2709 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2710   echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712   if test -n "$CC"; then
2713   ac_cv_prog_CC="$CC" # Let the user override the test.
2714 else
2715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2716   ac_dummy="$PATH"
2717   for ac_dir in $ac_dummy; do
2718     test -z "$ac_dir" && ac_dir=.
2719     if test -f $ac_dir/$ac_word; then
2720       ac_cv_prog_CC="$ac_prog"
2721       break
2722     fi
2723   done
2724   IFS="$ac_save_ifs"
2725 fi
2726 fi
2727 CC="$ac_cv_prog_CC"
2728 if test -n "$CC"; then
2729   echo "$ac_t""$CC" 1>&6
2730 else
2731   echo "$ac_t""no" 1>&6
2732 fi
2733
2734 test -n "$CC" && break
2735 done
2736
2737
2738                 if test "$CC" = cc ; then
2739                                                 if test $ol_with_threads != auto ; then
2740                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2741                         else
2742                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2743                         fi
2744                         ol_with_threads=no
2745                 fi
2746         fi
2747
2748         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2749                 ol_with_threads=posix
2750                 ol_cv_pthread_create=yes
2751         fi
2752 fi
2753
2754 if test -z "${CC}"; then
2755         for ac_prog in cc
2756 do
2757 # Extract the first word of "$ac_prog", so it can be a program name with args.
2758 set dummy $ac_prog; ac_word=$2
2759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2760 echo "configure:2761: checking for $ac_word" >&5
2761 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2762   echo $ac_n "(cached) $ac_c" 1>&6
2763 else
2764   if test -n "$CC"; then
2765   ac_cv_prog_CC="$CC" # Let the user override the test.
2766 else
2767   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2768   ac_dummy="$PATH"
2769   for ac_dir in $ac_dummy; do
2770     test -z "$ac_dir" && ac_dir=.
2771     if test -f $ac_dir/$ac_word; then
2772       ac_cv_prog_CC="$ac_prog"
2773       break
2774     fi
2775   done
2776   IFS="$ac_save_ifs"
2777 fi
2778 fi
2779 CC="$ac_cv_prog_CC"
2780 if test -n "$CC"; then
2781   echo "$ac_t""$CC" 1>&6
2782 else
2783   echo "$ac_t""no" 1>&6
2784 fi
2785
2786 test -n "$CC" && break
2787 done
2788
2789 fi
2790
2791
2792
2793
2794 # Check whether --enable-fast-install or --disable-fast-install was given.
2795 if test "${enable_fast_install+set}" = set; then
2796   enableval="$enable_fast_install"
2797   p=${PACKAGE-default}
2798 case "$enableval" in
2799 yes) enable_fast_install=yes ;;
2800 no) enable_fast_install=no ;;
2801 *)
2802   enable_fast_install=no
2803   # Look at the argument we got.  We use all the common list separators.
2804   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2805   for pkg in $enableval; do
2806     if test "X$pkg" = "X$p"; then
2807       enable_fast_install=yes
2808     fi
2809   done
2810   IFS="$ac_save_ifs"
2811   ;;
2812 esac
2813 else
2814   enable_fast_install=yes
2815 fi
2816
2817 # Extract the first word of "ranlib", so it can be a program name with args.
2818 set dummy ranlib; ac_word=$2
2819 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2820 echo "configure:2821: checking for $ac_word" >&5
2821 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   if test -n "$RANLIB"; then
2825   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2826 else
2827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2828   ac_dummy="$PATH"
2829   for ac_dir in $ac_dummy; do
2830     test -z "$ac_dir" && ac_dir=.
2831     if test -f $ac_dir/$ac_word; then
2832       ac_cv_prog_RANLIB="ranlib"
2833       break
2834     fi
2835   done
2836   IFS="$ac_save_ifs"
2837   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2838 fi
2839 fi
2840 RANLIB="$ac_cv_prog_RANLIB"
2841 if test -n "$RANLIB"; then
2842   echo "$ac_t""$RANLIB" 1>&6
2843 else
2844   echo "$ac_t""no" 1>&6
2845 fi
2846
2847 # Extract the first word of "gcc", so it can be a program name with args.
2848 set dummy gcc; 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_CC+set}\" = set"; then
2852   echo $ac_n "(cached) $ac_c" 1>&6
2853 else
2854   if test -n "$CC"; then
2855   ac_cv_prog_CC="$CC" # 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_CC="gcc"
2863       break
2864     fi
2865   done
2866   IFS="$ac_save_ifs"
2867 fi
2868 fi
2869 CC="$ac_cv_prog_CC"
2870 if test -n "$CC"; then
2871   echo "$ac_t""$CC" 1>&6
2872 else
2873   echo "$ac_t""no" 1>&6
2874 fi
2875
2876 if test -z "$CC"; then
2877   # Extract the first word of "cc", so it can be a program name with args.
2878 set dummy cc; 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_prog_rejected=no
2889   ac_dummy="$PATH"
2890   for ac_dir in $ac_dummy; do
2891     test -z "$ac_dir" && ac_dir=.
2892     if test -f $ac_dir/$ac_word; then
2893       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2894         ac_prog_rejected=yes
2895         continue
2896       fi
2897       ac_cv_prog_CC="cc"
2898       break
2899     fi
2900   done
2901   IFS="$ac_save_ifs"
2902 if test $ac_prog_rejected = yes; then
2903   # We found a bogon in the path, so make sure we never use it.
2904   set dummy $ac_cv_prog_CC
2905   shift
2906   if test $# -gt 0; then
2907     # We chose a different compiler from the bogus one.
2908     # However, it has the same basename, so the bogon will be chosen
2909     # first if we set CC to just the basename; use the full file name.
2910     shift
2911     set dummy "$ac_dir/$ac_word" "$@"
2912     shift
2913     ac_cv_prog_CC="$@"
2914   fi
2915 fi
2916 fi
2917 fi
2918 CC="$ac_cv_prog_CC"
2919 if test -n "$CC"; then
2920   echo "$ac_t""$CC" 1>&6
2921 else
2922   echo "$ac_t""no" 1>&6
2923 fi
2924
2925   if test -z "$CC"; then
2926     case "`uname -s`" in
2927     *win32* | *WIN32* | *CYGWIN*)
2928       # Extract the first word of "cl", so it can be a program name with args.
2929 set dummy cl; ac_word=$2
2930 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2931 echo "configure:2932: checking for $ac_word" >&5
2932 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2933   echo $ac_n "(cached) $ac_c" 1>&6
2934 else
2935   if test -n "$CC"; then
2936   ac_cv_prog_CC="$CC" # Let the user override the test.
2937 else
2938   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2939   ac_dummy="$PATH"
2940   for ac_dir in $ac_dummy; do
2941     test -z "$ac_dir" && ac_dir=.
2942     if test -f $ac_dir/$ac_word; then
2943       ac_cv_prog_CC="cl"
2944       break
2945     fi
2946   done
2947   IFS="$ac_save_ifs"
2948 fi
2949 fi
2950 CC="$ac_cv_prog_CC"
2951 if test -n "$CC"; then
2952   echo "$ac_t""$CC" 1>&6
2953 else
2954   echo "$ac_t""no" 1>&6
2955 fi
2956  ;;
2957     esac
2958   fi
2959   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2960 fi
2961
2962 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2963 echo "configure:2964: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2964
2965 ac_ext=c
2966 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2967 ac_cpp='$CPP $CPPFLAGS'
2968 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2969 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2970 cross_compiling=$ac_cv_prog_cc_cross
2971
2972 cat > conftest.$ac_ext << EOF
2973
2974 #line 2975 "configure"
2975 #include "confdefs.h"
2976
2977 main(){return(0);}
2978 EOF
2979 if { (eval echo configure:2980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2980   ac_cv_prog_cc_works=yes
2981   # If we can't run a trivial program, we are probably using a cross compiler.
2982   if (./conftest; exit) 2>/dev/null; then
2983     ac_cv_prog_cc_cross=no
2984   else
2985     ac_cv_prog_cc_cross=yes
2986   fi
2987 else
2988   echo "configure: failed program was:" >&5
2989   cat conftest.$ac_ext >&5
2990   ac_cv_prog_cc_works=no
2991 fi
2992 rm -fr conftest*
2993 ac_ext=c
2994 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2995 ac_cpp='$CPP $CPPFLAGS'
2996 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2997 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2998 cross_compiling=$ac_cv_prog_cc_cross
2999
3000 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3001 if test $ac_cv_prog_cc_works = no; then
3002   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3003 fi
3004 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3005 echo "configure:3006: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3006 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3007 cross_compiling=$ac_cv_prog_cc_cross
3008
3009 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3010 echo "configure:3011: checking whether we are using GNU C" >&5
3011 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3012   echo $ac_n "(cached) $ac_c" 1>&6
3013 else
3014   cat > conftest.c <<EOF
3015 #ifdef __GNUC__
3016   yes;
3017 #endif
3018 EOF
3019 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3020   ac_cv_prog_gcc=yes
3021 else
3022   ac_cv_prog_gcc=no
3023 fi
3024 fi
3025
3026 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3027
3028 if test $ac_cv_prog_gcc = yes; then
3029   GCC=yes
3030 else
3031   GCC=
3032 fi
3033
3034 ac_test_CFLAGS="${CFLAGS+set}"
3035 ac_save_CFLAGS="$CFLAGS"
3036 CFLAGS=
3037 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3038 echo "configure:3039: checking whether ${CC-cc} accepts -g" >&5
3039 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3040   echo $ac_n "(cached) $ac_c" 1>&6
3041 else
3042   echo 'void f(){}' > conftest.c
3043 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3044   ac_cv_prog_cc_g=yes
3045 else
3046   ac_cv_prog_cc_g=no
3047 fi
3048 rm -f conftest*
3049
3050 fi
3051
3052 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3053 if test "$ac_test_CFLAGS" = set; then
3054   CFLAGS="$ac_save_CFLAGS"
3055 elif test $ac_cv_prog_cc_g = yes; then
3056   if test "$GCC" = yes; then
3057     CFLAGS="-g -O2"
3058   else
3059     CFLAGS="-g"
3060   fi
3061 else
3062   if test "$GCC" = yes; then
3063     CFLAGS="-O2"
3064   else
3065     CFLAGS=
3066   fi
3067 fi
3068
3069 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3070 if test "${with_gnu_ld+set}" = set; then
3071   withval="$with_gnu_ld"
3072   test "$withval" = no || with_gnu_ld=yes
3073 else
3074   with_gnu_ld=no
3075 fi
3076
3077 ac_prog=ld
3078 if test "$ac_cv_prog_gcc" = yes; then
3079   # Check if gcc -print-prog-name=ld gives a path.
3080   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3081 echo "configure:3082: checking for ld used by GCC" >&5
3082   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3083   case "$ac_prog" in
3084     # Accept absolute paths.
3085     [\\/]* | [A-Za-z]:[\\/]*)
3086       re_direlt='/[^/][^/]*/\.\./'
3087       # Canonicalize the path of ld
3088       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3089       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3090         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3091       done
3092       test -z "$LD" && LD="$ac_prog"
3093       ;;
3094   "")
3095     # If it fails, then pretend we aren't using GCC.
3096     ac_prog=ld
3097     ;;
3098   *)
3099     # If it is relative, then search for the first ld in PATH.
3100     with_gnu_ld=unknown
3101     ;;
3102   esac
3103 elif test "$with_gnu_ld" = yes; then
3104   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3105 echo "configure:3106: checking for GNU ld" >&5
3106 else
3107   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3108 echo "configure:3109: checking for non-GNU ld" >&5
3109 fi
3110 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   if test -z "$LD"; then
3114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3115   for ac_dir in $PATH; do
3116     test -z "$ac_dir" && ac_dir=.
3117     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3118       ac_cv_path_LD="$ac_dir/$ac_prog"
3119       # Check to see if the program is GNU ld.  I'd rather use --version,
3120       # but apparently some GNU ld's only accept -v.
3121       # Break only if it was the GNU/non-GNU ld that we prefer.
3122       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3123         test "$with_gnu_ld" != no && break
3124       else
3125         test "$with_gnu_ld" != yes && break
3126       fi
3127     fi
3128   done
3129   IFS="$ac_save_ifs"
3130 else
3131   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3132 fi
3133 fi
3134
3135 LD="$ac_cv_path_LD"
3136 if test -n "$LD"; then
3137   echo "$ac_t""$LD" 1>&6
3138 else
3139   echo "$ac_t""no" 1>&6
3140 fi
3141 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3142 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3143 echo "configure:3144: checking if the linker ($LD) is GNU ld" >&5
3144 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3148 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3149   ac_cv_prog_gnu_ld=yes
3150 else
3151   ac_cv_prog_gnu_ld=no
3152 fi
3153 fi
3154
3155 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3156
3157
3158 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3159 echo "configure:3160: checking for BSD-compatible nm" >&5
3160 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3161   echo $ac_n "(cached) $ac_c" 1>&6
3162 else
3163   if test -n "$NM"; then
3164   # Let the user override the test.
3165   ac_cv_path_NM="$NM"
3166 else
3167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3168   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3169     test -z "$ac_dir" && ac_dir=.
3170     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3171       # Check to see if the nm accepts a BSD-compat flag.
3172       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3173       #   nm: unknown option "B" ignored
3174       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3175         ac_cv_path_NM="$ac_dir/nm -B"
3176         break
3177       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3178         ac_cv_path_NM="$ac_dir/nm -p"
3179         break
3180       else
3181         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3182         continue # so that we can try to find one that supports BSD flags
3183       fi
3184     fi
3185   done
3186   IFS="$ac_save_ifs"
3187   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3188 fi
3189 fi
3190
3191 NM="$ac_cv_path_NM"
3192 echo "$ac_t""$NM" 1>&6
3193
3194 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3195 echo "configure:3196: checking whether ln -s works" >&5
3196 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   rm -f conftestdata
3200 if ln -s X conftestdata 2>/dev/null
3201 then
3202   rm -f conftestdata
3203   ac_cv_prog_LN_S="ln -s"
3204 else
3205   ac_cv_prog_LN_S=ln
3206 fi
3207 fi
3208 LN_S="$ac_cv_prog_LN_S"
3209 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3210   echo "$ac_t""yes" 1>&6
3211 else
3212   echo "$ac_t""no" 1>&6
3213 fi
3214
3215 if test $host != $build; then
3216   ac_tool_prefix=${host_alias}-
3217 else
3218   ac_tool_prefix=
3219 fi
3220
3221
3222 case "$target" in
3223 NONE) lt_target="$host" ;;
3224 *) lt_target="$target" ;;
3225 esac
3226
3227 # Check for any special flags to pass to ltconfig.
3228 libtool_flags="--cache-file=$cache_file"
3229 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3230 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3231 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3232 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3233 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3234 libtool_flags="$libtool_flags --enable-dlopen"
3235 libtool_flags="$libtool_flags --enable-win32-dll"
3236 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3237 if test "${enable_libtool_lock+set}" = set; then
3238   enableval="$enable_libtool_lock"
3239   :
3240 fi
3241
3242 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3243 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3244
3245 # Some flags need to be propagated to the compiler or linker for good
3246 # libtool support.
3247 case "$lt_target" in
3248 *-*-irix6*)
3249   # Find out which ABI we are using.
3250   echo '#line 3251 "configure"' > conftest.$ac_ext
3251   if { (eval echo configure:3252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3252     case "`/usr/bin/file conftest.o`" in
3253     *32-bit*)
3254       LD="${LD-ld} -32"
3255       ;;
3256     *N32*)
3257       LD="${LD-ld} -n32"
3258       ;;
3259     *64-bit*)
3260       LD="${LD-ld} -64"
3261       ;;
3262     esac
3263   fi
3264   rm -rf conftest*
3265   ;;
3266
3267 *-*-sco3.2v5*)
3268   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3269   SAVE_CFLAGS="$CFLAGS"
3270   CFLAGS="$CFLAGS -belf"
3271   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3272 echo "configure:3273: checking whether the C compiler needs -belf" >&5
3273 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3274   echo $ac_n "(cached) $ac_c" 1>&6
3275 else
3276   cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3279
3280 int main() {
3281
3282 ; return 0; }
3283 EOF
3284 if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3285   rm -rf conftest*
3286   lt_cv_cc_needs_belf=yes
3287 else
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290   rm -rf conftest*
3291   lt_cv_cc_needs_belf=no
3292 fi
3293 rm -f conftest*
3294 fi
3295
3296 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3297   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3298     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3299     CFLAGS="$SAVE_CFLAGS"
3300   fi
3301   ;;
3302
3303 *-*-cygwin* | *-*-mingw*)
3304   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3305 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $ac_word" >&5
3308 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   if test -n "$DLLTOOL"; then
3312   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3313 else
3314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3315   ac_dummy="$PATH"
3316   for ac_dir in $ac_dummy; do
3317     test -z "$ac_dir" && ac_dir=.
3318     if test -f $ac_dir/$ac_word; then
3319       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3320       break
3321     fi
3322   done
3323   IFS="$ac_save_ifs"
3324 fi
3325 fi
3326 DLLTOOL="$ac_cv_prog_DLLTOOL"
3327 if test -n "$DLLTOOL"; then
3328   echo "$ac_t""$DLLTOOL" 1>&6
3329 else
3330   echo "$ac_t""no" 1>&6
3331 fi
3332
3333
3334 if test -z "$ac_cv_prog_DLLTOOL"; then
3335 if test -n "$ac_tool_prefix"; then
3336   # Extract the first word of "dlltool", so it can be a program name with args.
3337 set dummy dlltool; ac_word=$2
3338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_word" >&5
3340 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3341   echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343   if test -n "$DLLTOOL"; then
3344   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3345 else
3346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3347   ac_dummy="$PATH"
3348   for ac_dir in $ac_dummy; do
3349     test -z "$ac_dir" && ac_dir=.
3350     if test -f $ac_dir/$ac_word; then
3351       ac_cv_prog_DLLTOOL="dlltool"
3352       break
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3357 fi
3358 fi
3359 DLLTOOL="$ac_cv_prog_DLLTOOL"
3360 if test -n "$DLLTOOL"; then
3361   echo "$ac_t""$DLLTOOL" 1>&6
3362 else
3363   echo "$ac_t""no" 1>&6
3364 fi
3365
3366 else
3367   DLLTOOL="false"
3368 fi
3369 fi
3370
3371   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3372 set dummy ${ac_tool_prefix}as; ac_word=$2
3373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3374 echo "configure:3375: checking for $ac_word" >&5
3375 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3376   echo $ac_n "(cached) $ac_c" 1>&6
3377 else
3378   if test -n "$AS"; then
3379   ac_cv_prog_AS="$AS" # Let the user override the test.
3380 else
3381   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3382   ac_dummy="$PATH"
3383   for ac_dir in $ac_dummy; do
3384     test -z "$ac_dir" && ac_dir=.
3385     if test -f $ac_dir/$ac_word; then
3386       ac_cv_prog_AS="${ac_tool_prefix}as"
3387       break
3388     fi
3389   done
3390   IFS="$ac_save_ifs"
3391 fi
3392 fi
3393 AS="$ac_cv_prog_AS"
3394 if test -n "$AS"; then
3395   echo "$ac_t""$AS" 1>&6
3396 else
3397   echo "$ac_t""no" 1>&6
3398 fi
3399
3400
3401 if test -z "$ac_cv_prog_AS"; then
3402 if test -n "$ac_tool_prefix"; then
3403   # Extract the first word of "as", so it can be a program name with args.
3404 set dummy as; ac_word=$2
3405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_word" >&5
3407 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   if test -n "$AS"; then
3411   ac_cv_prog_AS="$AS" # Let the user override the test.
3412 else
3413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3414   ac_dummy="$PATH"
3415   for ac_dir in $ac_dummy; do
3416     test -z "$ac_dir" && ac_dir=.
3417     if test -f $ac_dir/$ac_word; then
3418       ac_cv_prog_AS="as"
3419       break
3420     fi
3421   done
3422   IFS="$ac_save_ifs"
3423   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3424 fi
3425 fi
3426 AS="$ac_cv_prog_AS"
3427 if test -n "$AS"; then
3428   echo "$ac_t""$AS" 1>&6
3429 else
3430   echo "$ac_t""no" 1>&6
3431 fi
3432
3433 else
3434   AS="false"
3435 fi
3436 fi
3437
3438   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3439 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3441 echo "configure:3442: checking for $ac_word" >&5
3442 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   if test -n "$OBJDUMP"; then
3446   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3447 else
3448   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3449   ac_dummy="$PATH"
3450   for ac_dir in $ac_dummy; do
3451     test -z "$ac_dir" && ac_dir=.
3452     if test -f $ac_dir/$ac_word; then
3453       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3454       break
3455     fi
3456   done
3457   IFS="$ac_save_ifs"
3458 fi
3459 fi
3460 OBJDUMP="$ac_cv_prog_OBJDUMP"
3461 if test -n "$OBJDUMP"; then
3462   echo "$ac_t""$OBJDUMP" 1>&6
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466
3467
3468 if test -z "$ac_cv_prog_OBJDUMP"; then
3469 if test -n "$ac_tool_prefix"; then
3470   # Extract the first word of "objdump", so it can be a program name with args.
3471 set dummy objdump; ac_word=$2
3472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3473 echo "configure:3474: checking for $ac_word" >&5
3474 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3475   echo $ac_n "(cached) $ac_c" 1>&6
3476 else
3477   if test -n "$OBJDUMP"; then
3478   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3479 else
3480   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3481   ac_dummy="$PATH"
3482   for ac_dir in $ac_dummy; do
3483     test -z "$ac_dir" && ac_dir=.
3484     if test -f $ac_dir/$ac_word; then
3485       ac_cv_prog_OBJDUMP="objdump"
3486       break
3487     fi
3488   done
3489   IFS="$ac_save_ifs"
3490   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3491 fi
3492 fi
3493 OBJDUMP="$ac_cv_prog_OBJDUMP"
3494 if test -n "$OBJDUMP"; then
3495   echo "$ac_t""$OBJDUMP" 1>&6
3496 else
3497   echo "$ac_t""no" 1>&6
3498 fi
3499
3500 else
3501   OBJDUMP="false"
3502 fi
3503 fi
3504
3505   ;;
3506
3507 esac
3508
3509
3510 # Save cache, so that ltconfig can load it
3511
3512
3513 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3514 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3515 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3516 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3517 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3518 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3519 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3520 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3521
3522 # Reload cache, that may have been modified by ltconfig
3523
3524
3525 # This can be used to rebuild libtool when needed
3526 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3527
3528 # Always use our own libtool.
3529 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3530
3531 # Redirect the config.log output again, so that the ltconfig log is not
3532 # clobbered by the next message.
3533 exec 5>>./config.log
3534
3535
3536 for ac_prog in mawk gawk nawk awk
3537 do
3538 # Extract the first word of "$ac_prog", so it can be a program name with args.
3539 set dummy $ac_prog; ac_word=$2
3540 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3541 echo "configure:3542: checking for $ac_word" >&5
3542 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3543   echo $ac_n "(cached) $ac_c" 1>&6
3544 else
3545   if test -n "$AWK"; then
3546   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3547 else
3548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3549   ac_dummy="$PATH"
3550   for ac_dir in $ac_dummy; do
3551     test -z "$ac_dir" && ac_dir=.
3552     if test -f $ac_dir/$ac_word; then
3553       ac_cv_prog_AWK="$ac_prog"
3554       break
3555     fi
3556   done
3557   IFS="$ac_save_ifs"
3558 fi
3559 fi
3560 AWK="$ac_cv_prog_AWK"
3561 if test -n "$AWK"; then
3562   echo "$ac_t""$AWK" 1>&6
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566
3567 test -n "$AWK" && break
3568 done
3569
3570 # test for ln hardlink support
3571 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3572 echo "configure:3573: checking whether ln works" >&5
3573 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3574   echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576   rm -f conftest.src conftest.dst
3577 echo "conftest" > conftest.src
3578 if ln conftest.src conftest.dst 2>/dev/null
3579 then
3580   ol_cv_prog_LN_H="ln"
3581 else
3582   ol_cv_prog_LN_H="cp"
3583 fi
3584 rm -f conftest.src conftest.dst
3585
3586 fi
3587 LN_H="$ol_cv_prog_LN_H"
3588 if test "$ol_cv_prog_LN_H" = "ln"; then
3589         echo "$ac_t""yes" 1>&6
3590 else
3591         echo "$ac_t""no" 1>&6
3592 fi
3593
3594 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3595 echo "configure:3596: checking whether ln -s works" >&5
3596 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3597   echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599   rm -f conftestdata
3600 if ln -s X conftestdata 2>/dev/null
3601 then
3602   rm -f conftestdata
3603   ac_cv_prog_LN_S="ln -s"
3604 else
3605   ac_cv_prog_LN_S=ln
3606 fi
3607 fi
3608 LN_S="$ac_cv_prog_LN_S"
3609 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3610   echo "$ac_t""yes" 1>&6
3611 else
3612   echo "$ac_t""no" 1>&6
3613 fi
3614
3615
3616 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3617         LN_S="$LN_H"
3618 fi
3619
3620 # Extract the first word of "sendmail", so it can be a program name with args.
3621 set dummy sendmail; ac_word=$2
3622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3623 echo "configure:3624: checking for $ac_word" >&5
3624 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3625   echo $ac_n "(cached) $ac_c" 1>&6
3626 else
3627   case "$SENDMAIL" in
3628   /*)
3629   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3630   ;;
3631   ?:/*)
3632   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3633   ;;
3634   *)
3635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3636   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3637   for ac_dir in $ac_dummy; do 
3638     test -z "$ac_dir" && ac_dir=.
3639     if test -f $ac_dir/$ac_word; then
3640       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3641       break
3642     fi
3643   done
3644   IFS="$ac_save_ifs"
3645   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3646   ;;
3647 esac
3648 fi
3649 SENDMAIL="$ac_cv_path_SENDMAIL"
3650 if test -n "$SENDMAIL"; then
3651   echo "$ac_t""$SENDMAIL" 1>&6
3652 else
3653   echo "$ac_t""no" 1>&6
3654 fi
3655
3656 # Extract the first word of "vi", so it can be a program name with args.
3657 set dummy vi; ac_word=$2
3658 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3659 echo "configure:3660: checking for $ac_word" >&5
3660 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3661   echo $ac_n "(cached) $ac_c" 1>&6
3662 else
3663   case "$EDITOR" in
3664   /*)
3665   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3666   ;;
3667   ?:/*)
3668   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3669   ;;
3670   *)
3671   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3672   ac_dummy="$PATH:/usr/ucb"
3673   for ac_dir in $ac_dummy; do 
3674     test -z "$ac_dir" && ac_dir=.
3675     if test -f $ac_dir/$ac_word; then
3676       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3677       break
3678     fi
3679   done
3680   IFS="$ac_save_ifs"
3681   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3682   ;;
3683 esac
3684 fi
3685 EDITOR="$ac_cv_path_EDITOR"
3686 if test -n "$EDITOR"; then
3687   echo "$ac_t""$EDITOR" 1>&6
3688 else
3689   echo "$ac_t""no" 1>&6
3690 fi
3691
3692 # Extract the first word of "finger", so it can be a program name with args.
3693 set dummy finger; ac_word=$2
3694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3695 echo "configure:3696: checking for $ac_word" >&5
3696 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3697   echo $ac_n "(cached) $ac_c" 1>&6
3698 else
3699   case "$FINGER" in
3700   /*)
3701   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3702   ;;
3703   ?:/*)
3704   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3705   ;;
3706   *)
3707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3708   ac_dummy="$PATH:/usr/ucb"
3709   for ac_dir in $ac_dummy; do 
3710     test -z "$ac_dir" && ac_dir=.
3711     if test -f $ac_dir/$ac_word; then
3712       ac_cv_path_FINGER="$ac_dir/$ac_word"
3713       break
3714     fi
3715   done
3716   IFS="$ac_save_ifs"
3717   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3718   ;;
3719 esac
3720 fi
3721 FINGER="$ac_cv_path_FINGER"
3722 if test -n "$FINGER"; then
3723   echo "$ac_t""$FINGER" 1>&6
3724 else
3725   echo "$ac_t""no" 1>&6
3726 fi
3727
3728
3729 ol_link_perl=no
3730 if test $ol_enable_perl != no ; then
3731         # Extract the first word of "perl", so it can be a program name with args.
3732 set dummy perl; ac_word=$2
3733 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3734 echo "configure:3735: checking for $ac_word" >&5
3735 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3736   echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738   case "$PERLBIN" in
3739   /*)
3740   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3741   ;;
3742   ?:/*)
3743   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3744   ;;
3745   *)
3746   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3747   ac_dummy="$PATH"
3748   for ac_dir in $ac_dummy; do 
3749     test -z "$ac_dir" && ac_dir=.
3750     if test -f $ac_dir/$ac_word; then
3751       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3752       break
3753     fi
3754   done
3755   IFS="$ac_save_ifs"
3756   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3757   ;;
3758 esac
3759 fi
3760 PERLBIN="$ac_cv_path_PERLBIN"
3761 if test -n "$PERLBIN"; then
3762   echo "$ac_t""$PERLBIN" 1>&6
3763 else
3764   echo "$ac_t""no" 1>&6
3765 fi
3766
3767
3768         if test "no$PERLBIN" = "no" ; then
3769                 if test $ol_enable_perl = yes ; then
3770                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3771                 fi
3772
3773         else
3774                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3775                 if test x"$ol_with_perl_module" = "xstatic" ; then
3776                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3777                 else
3778                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3779                 fi
3780                                 ol_link_perl=yes
3781         fi
3782 fi
3783
3784 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3785 echo "configure:3786: checking how to run the C preprocessor" >&5
3786 # On Suns, sometimes $CPP names a directory.
3787 if test -n "$CPP" && test -d "$CPP"; then
3788   CPP=
3789 fi
3790 if test -z "$CPP"; then
3791 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3792   echo $ac_n "(cached) $ac_c" 1>&6
3793 else
3794     # This must be in double quotes, not single quotes, because CPP may get
3795   # substituted into the Makefile and "${CC-cc}" will confuse make.
3796   CPP="${CC-cc} -E"
3797   # On the NeXT, cc -E runs the code through the compiler's parser,
3798   # not just through cpp.
3799   cat > conftest.$ac_ext <<EOF
3800 #line 3801 "configure"
3801 #include "confdefs.h"
3802 #include <assert.h>
3803 Syntax Error
3804 EOF
3805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3806 { (eval echo configure:3807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3808 if test -z "$ac_err"; then
3809   :
3810 else
3811   echo "$ac_err" >&5
3812   echo "configure: failed program was:" >&5
3813   cat conftest.$ac_ext >&5
3814   rm -rf conftest*
3815   CPP="${CC-cc} -E -traditional-cpp"
3816   cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3819 #include <assert.h>
3820 Syntax Error
3821 EOF
3822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3823 { (eval echo configure:3824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3825 if test -z "$ac_err"; then
3826   :
3827 else
3828   echo "$ac_err" >&5
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   CPP="${CC-cc} -nologo -E"
3833   cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836 #include <assert.h>
3837 Syntax Error
3838 EOF
3839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3840 { (eval echo configure:3841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3842 if test -z "$ac_err"; then
3843   :
3844 else
3845   echo "$ac_err" >&5
3846   echo "configure: failed program was:" >&5
3847   cat conftest.$ac_ext >&5
3848   rm -rf conftest*
3849   CPP=/lib/cpp
3850 fi
3851 rm -f conftest*
3852 fi
3853 rm -f conftest*
3854 fi
3855 rm -f conftest*
3856   ac_cv_prog_CPP="$CPP"
3857 fi
3858   CPP="$ac_cv_prog_CPP"
3859 else
3860   ac_cv_prog_CPP="$CPP"
3861 fi
3862 echo "$ac_t""$CPP" 1>&6
3863
3864
3865 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3866         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3867
3868 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3869         echo "configure: warning: programs compiled here do run here..." 1>&2
3870         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3871
3872 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3873         echo "configure: warning: programs compiled here do not run here..." 1>&2
3874         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3875 fi
3876
3877 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3878 echo "configure:3879: checking for AIX" >&5
3879 cat > conftest.$ac_ext <<EOF
3880 #line 3881 "configure"
3881 #include "confdefs.h"
3882 #ifdef _AIX
3883   yes
3884 #endif
3885
3886 EOF
3887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3888   egrep "yes" >/dev/null 2>&1; then
3889   rm -rf conftest*
3890   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3891 #define _ALL_SOURCE 1
3892 EOF
3893
3894 else
3895   rm -rf conftest*
3896   echo "$ac_t""no" 1>&6
3897 fi
3898 rm -f conftest*
3899
3900
3901 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3902 echo "configure:3903: checking for POSIXized ISC" >&5
3903 if test -d /etc/conf/kconfig.d &&
3904   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3905 then
3906   echo "$ac_t""yes" 1>&6
3907   ISC=yes # If later tests want to check for ISC.
3908   cat >> confdefs.h <<\EOF
3909 #define _POSIX_SOURCE 1
3910 EOF
3911
3912   if test "$GCC" = yes; then
3913     CC="$CC -posix"
3914   else
3915     CC="$CC -Xp"
3916   fi
3917 else
3918   echo "$ac_t""no" 1>&6
3919   ISC=
3920 fi
3921
3922 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3923 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3924 echo "configure:3925: checking for minix/config.h" >&5
3925 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3926   echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928   cat > conftest.$ac_ext <<EOF
3929 #line 3930 "configure"
3930 #include "confdefs.h"
3931 #include <minix/config.h>
3932 EOF
3933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3934 { (eval echo configure:3935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3936 if test -z "$ac_err"; then
3937   rm -rf conftest*
3938   eval "ac_cv_header_$ac_safe=yes"
3939 else
3940   echo "$ac_err" >&5
3941   echo "configure: failed program was:" >&5
3942   cat conftest.$ac_ext >&5
3943   rm -rf conftest*
3944   eval "ac_cv_header_$ac_safe=no"
3945 fi
3946 rm -f conftest*
3947 fi
3948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3949   echo "$ac_t""yes" 1>&6
3950   MINIX=yes
3951 else
3952   echo "$ac_t""no" 1>&6
3953 MINIX=
3954 fi
3955
3956 if test "$MINIX" = yes; then
3957   cat >> confdefs.h <<\EOF
3958 #define _POSIX_SOURCE 1
3959 EOF
3960
3961   cat >> confdefs.h <<\EOF
3962 #define _POSIX_1_SOURCE 2
3963 EOF
3964
3965   cat >> confdefs.h <<\EOF
3966 #define _MINIX 1
3967 EOF
3968
3969 fi
3970
3971
3972 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3973 echo "configure:3974: checking for Cygwin environment" >&5
3974 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3975   echo $ac_n "(cached) $ac_c" 1>&6
3976 else
3977   cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980
3981 int main() {
3982
3983 #ifndef __CYGWIN__
3984 #define __CYGWIN__ __CYGWIN32__
3985 #endif
3986 return __CYGWIN__;
3987 ; return 0; }
3988 EOF
3989 if { (eval echo configure:3990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3990   rm -rf conftest*
3991   ac_cv_cygwin=yes
3992 else
3993   echo "configure: failed program was:" >&5
3994   cat conftest.$ac_ext >&5
3995   rm -rf conftest*
3996   ac_cv_cygwin=no
3997 fi
3998 rm -f conftest*
3999 fi
4000
4001 echo "$ac_t""$ac_cv_cygwin" 1>&6
4002 CYGWIN=
4003 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4004 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4005 echo "configure:4006: checking for mingw32 environment" >&5
4006 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
4007   echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009   cat > conftest.$ac_ext <<EOF
4010 #line 4011 "configure"
4011 #include "confdefs.h"
4012
4013 int main() {
4014 return __MINGW32__;
4015 ; return 0; }
4016 EOF
4017 if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4018   rm -rf conftest*
4019   ac_cv_mingw32=yes
4020 else
4021   echo "configure: failed program was:" >&5
4022   cat conftest.$ac_ext >&5
4023   rm -rf conftest*
4024   ac_cv_mingw32=no
4025 fi
4026 rm -f conftest*
4027 fi
4028
4029 echo "$ac_t""$ac_cv_mingw32" 1>&6
4030 MINGW32=
4031 test "$ac_cv_mingw32" = yes && MINGW32=yes
4032 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
4033 echo "configure:4034: checking for EMX OS/2 environment" >&5
4034 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
4035   echo $ac_n "(cached) $ac_c" 1>&6
4036 else
4037   cat > conftest.$ac_ext <<EOF
4038 #line 4039 "configure"
4039 #include "confdefs.h"
4040
4041 int main() {
4042 return __EMX__;
4043 ; return 0; }
4044 EOF
4045 if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4046   rm -rf conftest*
4047   ac_cv_emxos2=yes
4048 else
4049   echo "configure: failed program was:" >&5
4050   cat conftest.$ac_ext >&5
4051   rm -rf conftest*
4052   ac_cv_emxos2=no
4053 fi
4054 rm -f conftest*
4055 fi
4056
4057 echo "$ac_t""$ac_cv_emxos2" 1>&6
4058 EMXOS2=
4059 test "$ac_cv_emxos2" = yes && EMXOS2=yes
4060
4061
4062
4063 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4064 echo "configure:4065: checking for executable suffix" >&5
4065 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4066   echo $ac_n "(cached) $ac_c" 1>&6
4067 else
4068   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4069   ac_cv_exeext=.exe
4070 else
4071   rm -f conftest*
4072   echo 'int main () { return 0; }' > conftest.$ac_ext
4073   ac_cv_exeext=
4074   if { (eval echo configure:4075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4075     for file in conftest.*; do
4076       case $file in
4077       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4078       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4079       esac
4080     done
4081   else
4082     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4083   fi
4084   rm -f conftest*
4085   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4086 fi
4087 fi
4088
4089 EXEEXT=""
4090 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4091 echo "$ac_t""${ac_cv_exeext}" 1>&6
4092 ac_exeext=$EXEEXT
4093
4094 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4095 echo "configure:4096: checking for object suffix" >&5
4096 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4097   echo $ac_n "(cached) $ac_c" 1>&6
4098 else
4099   rm -f conftest*
4100 echo 'int i = 1;' > conftest.$ac_ext
4101 if { (eval echo configure:4102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4102   for ac_file in conftest.*; do
4103     case $ac_file in
4104     *.c) ;;
4105     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4106     esac
4107   done
4108 else
4109   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4110 fi
4111 rm -f conftest*
4112 fi
4113
4114 echo "$ac_t""$ac_cv_objext" 1>&6
4115 OBJEXT=$ac_cv_objext
4116 ac_objext=$ac_cv_objext
4117
4118
4119 cat >> confdefs.h <<EOF
4120 #define EXEEXT "${EXEEXT}"
4121 EOF
4122
4123
4124 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4125 echo "configure:4126: checking for be_app in -lbe" >&5
4126 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4128   echo $ac_n "(cached) $ac_c" 1>&6
4129 else
4130   ac_save_LIBS="$LIBS"
4131 LIBS="-lbe -lroot -lnet $LIBS"
4132 cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 /* Override any gcc2 internal prototype to avoid an error.  */
4136 /* We use char because int might match the return type of a gcc2
4137     builtin and then its argument prototype would still apply.  */
4138 char be_app();
4139
4140 int main() {
4141 be_app()
4142 ; return 0; }
4143 EOF
4144 if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4145   rm -rf conftest*
4146   eval "ac_cv_lib_$ac_lib_var=yes"
4147 else
4148   echo "configure: failed program was:" >&5
4149   cat conftest.$ac_ext >&5
4150   rm -rf conftest*
4151   eval "ac_cv_lib_$ac_lib_var=no"
4152 fi
4153 rm -f conftest*
4154 LIBS="$ac_save_LIBS"
4155
4156 fi
4157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4158   echo "$ac_t""yes" 1>&6
4159   LIBS="$LIBS -lbe -lroot -lnet"
4160 else
4161   echo "$ac_t""no" 1>&6
4162 :
4163 fi
4164
4165
4166
4167
4168
4169 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4170 echo "configure:4171: checking for ${CC-cc} option to accept ANSI C" >&5
4171 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4172   echo $ac_n "(cached) $ac_c" 1>&6
4173 else
4174   am_cv_prog_cc_stdc=no
4175 ac_save_CC="$CC"
4176 # Don't try gcc -ansi; that turns off useful extensions and
4177 # breaks some systems' header files.
4178 # AIX                   -qlanglvl=ansi
4179 # Ultrix and OSF/1      -std1
4180 # HP-UX 10.20 and later -Ae
4181 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4182 # SVR4                  -Xc -D__EXTENSIONS__
4183 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4184 do
4185   CC="$ac_save_CC $ac_arg"
4186   cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189 #include <stdarg.h>
4190 #include <stdio.h>
4191 #include <sys/types.h>
4192 #include <sys/stat.h>
4193 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4194 struct buf { int x; };
4195 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4196 static char *e (p, i)
4197      char **p;
4198      int i;
4199 {
4200   return p[i];
4201 }
4202 static char *f (char * (*g) (char **, int), char **p, ...)
4203 {
4204   char *s;
4205   va_list v;
4206   va_start (v,p);
4207   s = g (p, va_arg (v,int));
4208   va_end (v);
4209   return s;
4210 }
4211 int test (int i, double x);
4212 struct s1 {int (*f) (int a);};
4213 struct s2 {int (*f) (double a);};
4214 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4215 int argc;
4216 char **argv;
4217
4218 int main() {
4219
4220 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4221
4222 ; return 0; }
4223 EOF
4224 if { (eval echo configure:4225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4225   rm -rf conftest*
4226   am_cv_prog_cc_stdc="$ac_arg"; break
4227 else
4228   echo "configure: failed program was:" >&5
4229   cat conftest.$ac_ext >&5
4230 fi
4231 rm -f conftest*
4232 done
4233 CC="$ac_save_CC"
4234
4235 fi
4236
4237 if test -z "$am_cv_prog_cc_stdc"; then
4238   echo "$ac_t""none needed" 1>&6
4239 else
4240   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4241 fi
4242 case "x$am_cv_prog_cc_stdc" in
4243   x|xno) ;;
4244   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4245 esac
4246
4247 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4248         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4249 fi
4250
4251 # test for make depend flag
4252 OL_MKDEP=
4253 OL_MKDEP_FLAGS=
4254 if test -z "${MKDEP}"; then
4255         OL_MKDEP="${CC-cc}"
4256         if test -z "${MKDEP_FLAGS}"; then
4257                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4258 echo "configure:4259: checking for ${OL_MKDEP} depend flag" >&5
4259 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4260   echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262   
4263                         ol_cv_mkdep=no
4264                         for flag in "-M" "-xM"; do
4265                                 cat > conftest.c <<EOF
4266  noCode;
4267 EOF
4268                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4269                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4270                                 then
4271                                         if test ! -f conftest."${ac_object}" ; then
4272                                                 ol_cv_mkdep=$flag
4273                                                 OL_MKDEP_FLAGS="$flag"
4274                                                 break
4275                                         fi
4276                                 fi
4277                         done
4278                         rm -f conftest*
4279                 
4280 fi
4281
4282 echo "$ac_t""$ol_cv_mkdep" 1>&6
4283         else
4284                 cc_cv_mkdep=yes
4285                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4286         fi
4287 else
4288         cc_cv_mkdep=yes
4289         OL_MKDEP="${MKDEP}"
4290         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4291 fi
4292
4293
4294
4295 if test "${ol_cv_mkdep}" = no ; then
4296         # this will soon become an error
4297         echo "configure: warning: do not know how to generate dependencies" 1>&2
4298 fi
4299
4300 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4301 echo "configure:4302: checking for afopen in -ls" >&5
4302 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4303 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4304   echo $ac_n "(cached) $ac_c" 1>&6
4305 else
4306   ac_save_LIBS="$LIBS"
4307 LIBS="-ls  $LIBS"
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 /* Override any gcc2 internal prototype to avoid an error.  */
4312 /* We use char because int might match the return type of a gcc2
4313     builtin and then its argument prototype would still apply.  */
4314 char afopen();
4315
4316 int main() {
4317 afopen()
4318 ; return 0; }
4319 EOF
4320 if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4321   rm -rf conftest*
4322   eval "ac_cv_lib_$ac_lib_var=yes"
4323 else
4324   echo "configure: failed program was:" >&5
4325   cat conftest.$ac_ext >&5
4326   rm -rf conftest*
4327   eval "ac_cv_lib_$ac_lib_var=no"
4328 fi
4329 rm -f conftest*
4330 LIBS="$ac_save_LIBS"
4331
4332 fi
4333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4334   echo "$ac_t""yes" 1>&6
4335   
4336         AUTH_LIBS=-ls
4337         cat >> confdefs.h <<\EOF
4338 #define HAVE_AIX_SECURITY 1
4339 EOF
4340
4341
4342 else
4343   echo "$ac_t""no" 1>&6
4344 fi
4345
4346
4347
4348 ol_link_modules=no
4349 if test $ol_enable_modules != no ; then
4350         for ac_hdr in ltdl.h
4351 do
4352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4354 echo "configure:4355: checking for $ac_hdr" >&5
4355 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4356   echo $ac_n "(cached) $ac_c" 1>&6
4357 else
4358   cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 #include <$ac_hdr>
4362 EOF
4363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4364 { (eval echo configure:4365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4366 if test -z "$ac_err"; then
4367   rm -rf conftest*
4368   eval "ac_cv_header_$ac_safe=yes"
4369 else
4370   echo "$ac_err" >&5
4371   echo "configure: failed program was:" >&5
4372   cat conftest.$ac_ext >&5
4373   rm -rf conftest*
4374   eval "ac_cv_header_$ac_safe=no"
4375 fi
4376 rm -f conftest*
4377 fi
4378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4379   echo "$ac_t""yes" 1>&6
4380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4381   cat >> confdefs.h <<EOF
4382 #define $ac_tr_hdr 1
4383 EOF
4384  
4385 else
4386   echo "$ac_t""no" 1>&6
4387 fi
4388 done
4389
4390
4391         if test $ac_cv_header_ltdl_h = no ; then
4392                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4393         fi
4394
4395         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4396 echo "configure:4397: checking for lt_dlinit in -lltdl" >&5
4397 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4398 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   ac_save_LIBS="$LIBS"
4402 LIBS="-lltdl  $LIBS"
4403 cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4406 /* Override any gcc2 internal prototype to avoid an error.  */
4407 /* We use char because int might match the return type of a gcc2
4408     builtin and then its argument prototype would still apply.  */
4409 char lt_dlinit();
4410
4411 int main() {
4412 lt_dlinit()
4413 ; return 0; }
4414 EOF
4415 if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4416   rm -rf conftest*
4417   eval "ac_cv_lib_$ac_lib_var=yes"
4418 else
4419   echo "configure: failed program was:" >&5
4420   cat conftest.$ac_ext >&5
4421   rm -rf conftest*
4422   eval "ac_cv_lib_$ac_lib_var=no"
4423 fi
4424 rm -f conftest*
4425 LIBS="$ac_save_LIBS"
4426
4427 fi
4428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4429   echo "$ac_t""yes" 1>&6
4430   
4431             MODULES_LIBS=-lltdl
4432             cat >> confdefs.h <<\EOF
4433 #define HAVE_LIBLTDL 1
4434 EOF
4435
4436         
4437 else
4438   echo "$ac_t""no" 1>&6
4439 fi
4440
4441
4442         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4443                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4444         fi
4445         ol_link_modules=yes
4446 else
4447         ol_with_bdb_module=static
4448         ol_with_dnssrv_module=static
4449         ol_with_ldap_module=static
4450         ol_with_ldbm_module=static
4451         ol_with_meta_module=static
4452         ol_with_monitor_module=static
4453         ol_with_passwd_module=static
4454         ol_with_perl_module=static
4455         ol_with_shell_module=static
4456         ol_with_tcl_module=static
4457         ol_with_sql_module=static
4458 fi
4459
4460 # test for EBCDIC
4461 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4462 echo "configure:4463: checking for EBCDIC" >&5
4463 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466   
4467         cat > conftest.$ac_ext <<EOF
4468 #line 4469 "configure"
4469 #include "confdefs.h"
4470
4471 #if !('M' == 0xd4)
4472 #include <__ASCII__/generate_error.h>
4473 #endif
4474
4475 EOF
4476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4477 { (eval echo configure:4478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4479 if test -z "$ac_err"; then
4480   rm -rf conftest*
4481   ol_cv_cpp_ebcdic=yes
4482 else
4483   echo "$ac_err" >&5
4484   echo "configure: failed program was:" >&5
4485   cat conftest.$ac_ext >&5
4486   rm -rf conftest*
4487   ol_cv_cpp_ebcdic=no
4488 fi
4489 rm -f conftest*
4490 fi
4491
4492 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4493 if test $ol_cv_cpp_ebcdic = yes ; then
4494         cat >> confdefs.h <<\EOF
4495 #define HAVE_EBCDIC 1
4496 EOF
4497
4498 fi
4499
4500 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4501 echo "configure:4502: checking for ANSI C header files" >&5
4502 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4503   echo $ac_n "(cached) $ac_c" 1>&6
4504 else
4505   cat > conftest.$ac_ext <<EOF
4506 #line 4507 "configure"
4507 #include "confdefs.h"
4508 #include <stdlib.h>
4509 #include <stdarg.h>
4510 #include <string.h>
4511 #include <float.h>
4512 EOF
4513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4514 { (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4516 if test -z "$ac_err"; then
4517   rm -rf conftest*
4518   ol_cv_header_stdc=yes
4519 else
4520   echo "$ac_err" >&5
4521   echo "configure: failed program was:" >&5
4522   cat conftest.$ac_ext >&5
4523   rm -rf conftest*
4524   ol_cv_header_stdc=no
4525 fi
4526 rm -f conftest*
4527
4528 if test $ol_cv_header_stdc = yes; then
4529   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4530 cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4533 #include <string.h>
4534 EOF
4535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4536   egrep "memchr" >/dev/null 2>&1; then
4537   :
4538 else
4539   rm -rf conftest*
4540   ol_cv_header_stdc=no
4541 fi
4542 rm -f conftest*
4543
4544 fi
4545
4546 if test $ol_cv_header_stdc = yes; then
4547   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4548 cat > conftest.$ac_ext <<EOF
4549 #line 4550 "configure"
4550 #include "confdefs.h"
4551 #include <stdlib.h>
4552 EOF
4553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4554   egrep "free" >/dev/null 2>&1; then
4555   :
4556 else
4557   rm -rf conftest*
4558   ol_cv_header_stdc=no
4559 fi
4560 rm -f conftest*
4561
4562 fi
4563
4564 if test $ol_cv_header_stdc = yes; then
4565   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4566 if test "$cross_compiling" = yes; then
4567   :
4568 else
4569   cat > conftest.$ac_ext <<EOF
4570 #line 4571 "configure"
4571 #include "confdefs.h"
4572 #include <ctype.h>
4573 #ifndef HAVE_EBCDIC
4574 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4575 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4576 #else
4577 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4578                 || ('j' <= (c) && (c) <= 'r') \
4579                 || ('s' <= (c) && (c) <= 'z'))
4580 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4581 #endif
4582 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4583 int main () { int i; for (i = 0; i < 256; i++)
4584 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4585 exit (0); }
4586
4587 EOF
4588 if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4589 then
4590   :
4591 else
4592   echo "configure: failed program was:" >&5
4593   cat conftest.$ac_ext >&5
4594   rm -fr conftest*
4595   ol_cv_header_stdc=no
4596 fi
4597 rm -fr conftest*
4598 fi
4599
4600 fi
4601 fi
4602
4603 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4604 if test $ol_cv_header_stdc = yes; then
4605   cat >> confdefs.h <<\EOF
4606 #define STDC_HEADERS 1
4607 EOF
4608
4609 fi
4610 ac_cv_header_stdc=disable
4611
4612
4613 if test $ol_cv_header_stdc != yes; then
4614         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4615 fi
4616
4617 ac_header_dirent=no
4618 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4619 do
4620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4621 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4622 echo "configure:4623: checking for $ac_hdr that defines DIR" >&5
4623 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4624   echo $ac_n "(cached) $ac_c" 1>&6
4625 else
4626   cat > conftest.$ac_ext <<EOF
4627 #line 4628 "configure"
4628 #include "confdefs.h"
4629 #include <sys/types.h>
4630 #include <$ac_hdr>
4631 int main() {
4632 DIR *dirp = 0;
4633 ; return 0; }
4634 EOF
4635 if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4636   rm -rf conftest*
4637   eval "ac_cv_header_dirent_$ac_safe=yes"
4638 else
4639   echo "configure: failed program was:" >&5
4640   cat conftest.$ac_ext >&5
4641   rm -rf conftest*
4642   eval "ac_cv_header_dirent_$ac_safe=no"
4643 fi
4644 rm -f conftest*
4645 fi
4646 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4647   echo "$ac_t""yes" 1>&6
4648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4649   cat >> confdefs.h <<EOF
4650 #define $ac_tr_hdr 1
4651 EOF
4652  ac_header_dirent=$ac_hdr; break
4653 else
4654   echo "$ac_t""no" 1>&6
4655 fi
4656 done
4657 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4658 if test $ac_header_dirent = dirent.h; then
4659 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4660 echo "configure:4661: checking for opendir in -ldir" >&5
4661 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   ac_save_LIBS="$LIBS"
4666 LIBS="-ldir  $LIBS"
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670 /* Override any gcc2 internal prototype to avoid an error.  */
4671 /* We use char because int might match the return type of a gcc2
4672     builtin and then its argument prototype would still apply.  */
4673 char opendir();
4674
4675 int main() {
4676 opendir()
4677 ; return 0; }
4678 EOF
4679 if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4680   rm -rf conftest*
4681   eval "ac_cv_lib_$ac_lib_var=yes"
4682 else
4683   echo "configure: failed program was:" >&5
4684   cat conftest.$ac_ext >&5
4685   rm -rf conftest*
4686   eval "ac_cv_lib_$ac_lib_var=no"
4687 fi
4688 rm -f conftest*
4689 LIBS="$ac_save_LIBS"
4690
4691 fi
4692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4693   echo "$ac_t""yes" 1>&6
4694   LIBS="$LIBS -ldir"
4695 else
4696   echo "$ac_t""no" 1>&6
4697 fi
4698
4699 else
4700 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4701 echo "configure:4702: checking for opendir in -lx" >&5
4702 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4704   echo $ac_n "(cached) $ac_c" 1>&6
4705 else
4706   ac_save_LIBS="$LIBS"
4707 LIBS="-lx  $LIBS"
4708 cat > conftest.$ac_ext <<EOF
4709 #line 4710 "configure"
4710 #include "confdefs.h"
4711 /* Override any gcc2 internal prototype to avoid an error.  */
4712 /* We use char because int might match the return type of a gcc2
4713     builtin and then its argument prototype would still apply.  */
4714 char opendir();
4715
4716 int main() {
4717 opendir()
4718 ; return 0; }
4719 EOF
4720 if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4721   rm -rf conftest*
4722   eval "ac_cv_lib_$ac_lib_var=yes"
4723 else
4724   echo "configure: failed program was:" >&5
4725   cat conftest.$ac_ext >&5
4726   rm -rf conftest*
4727   eval "ac_cv_lib_$ac_lib_var=no"
4728 fi
4729 rm -f conftest*
4730 LIBS="$ac_save_LIBS"
4731
4732 fi
4733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4734   echo "$ac_t""yes" 1>&6
4735   LIBS="$LIBS -lx"
4736 else
4737   echo "$ac_t""no" 1>&6
4738 fi
4739
4740 fi
4741
4742 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4743 echo "configure:4744: checking for sys/wait.h that is POSIX.1 compatible" >&5
4744 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4745   echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4747   cat > conftest.$ac_ext <<EOF
4748 #line 4749 "configure"
4749 #include "confdefs.h"
4750 #include <sys/types.h>
4751 #include <sys/wait.h>
4752 #ifndef WEXITSTATUS
4753 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4754 #endif
4755 #ifndef WIFEXITED
4756 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4757 #endif
4758 int main() {
4759 int s;
4760 wait (&s);
4761 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4762 ; return 0; }
4763 EOF
4764 if { (eval echo configure:4765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4765   rm -rf conftest*
4766   ac_cv_header_sys_wait_h=yes
4767 else
4768   echo "configure: failed program was:" >&5
4769   cat conftest.$ac_ext >&5
4770   rm -rf conftest*
4771   ac_cv_header_sys_wait_h=no
4772 fi
4773 rm -f conftest*
4774 fi
4775
4776 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4777 if test $ac_cv_header_sys_wait_h = yes; then
4778   cat >> confdefs.h <<\EOF
4779 #define HAVE_SYS_WAIT_H 1
4780 EOF
4781
4782 fi
4783
4784 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4785 echo "configure:4786: checking POSIX termios" >&5
4786 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4787   echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789   cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4792 #include <sys/types.h>
4793 #include <unistd.h>
4794 #include <termios.h>
4795 int main() {
4796 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4797    tcgetattr(0, 0);
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   am_cv_sys_posix_termios=yes
4803 else
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806   rm -rf conftest*
4807   am_cv_sys_posix_termios=no
4808 fi
4809 rm -f conftest*
4810 fi
4811
4812 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4813
4814
4815  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4816 echo "configure:4817: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4817 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4818   echo $ac_n "(cached) $ac_c" 1>&6
4819 else
4820   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4821
4822   gwinsz_in_termios_h=no
4823   if test $am_cv_sys_posix_termios = yes; then
4824     cat > conftest.$ac_ext <<EOF
4825 #line 4826 "configure"
4826 #include "confdefs.h"
4827 #include <sys/types.h>
4828 #     include <termios.h>
4829 #     ifdef TIOCGWINSZ
4830         yes
4831 #     endif
4832     
4833 EOF
4834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4835   egrep "yes" >/dev/null 2>&1; then
4836   rm -rf conftest*
4837   gwinsz_in_termios_h=yes
4838 fi
4839 rm -f conftest*
4840
4841   fi
4842
4843   if test $gwinsz_in_termios_h = no; then
4844     cat > conftest.$ac_ext <<EOF
4845 #line 4846 "configure"
4846 #include "confdefs.h"
4847 #include <sys/types.h>
4848 #     include <sys/ioctl.h>
4849 #     ifdef TIOCGWINSZ
4850         yes
4851 #     endif
4852     
4853 EOF
4854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4855   egrep "yes" >/dev/null 2>&1; then
4856   rm -rf conftest*
4857   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4858 fi
4859 rm -f conftest*
4860
4861   fi
4862   
4863 fi
4864
4865 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4866   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4867     cat >> confdefs.h <<\EOF
4868 #define GWINSZ_IN_SYS_IOCTL 1
4869 EOF
4870
4871   fi
4872
4873 if test $am_cv_sys_posix_termios = yes ; then
4874         cat >> confdefs.h <<\EOF
4875 #define HAVE_POSIX_TERMIOS 1
4876 EOF
4877
4878 fi
4879
4880 for ac_hdr in \
4881         arpa/inet.h             \
4882         arpa/nameser.h  \
4883         assert.h                \
4884         conio.h                 \
4885         crypt.h                 \
4886         direct.h                \
4887         errno.h                 \
4888         fcntl.h                 \
4889         filio.h                 \
4890         getopt.h                \
4891         grp.h                   \
4892         io.h                    \
4893         libutil.h               \
4894         limits.h                \
4895         locale.h                \
4896         netinet/tcp.h   \
4897         malloc.h                \
4898         memory.h                \
4899         psap.h                  \
4900         pwd.h                   \
4901         process.h               \
4902         resolv.h                \
4903         sgtty.h                 \
4904         shadow.h                \
4905         stddef.h                \
4906         string.h                \
4907         strings.h               \
4908         sysexits.h              \
4909         sys/file.h              \
4910         sys/filio.h             \
4911         sys/errno.h             \
4912         sys/ioctl.h             \
4913         sys/param.h             \
4914         sys/resource.h  \
4915         sys/select.h    \
4916         sys/socket.h    \
4917         sys/syslog.h    \
4918         sys/time.h              \
4919         sys/types.h             \
4920         syslog.h                \
4921         termios.h               \
4922         unistd.h                \
4923         winsock.h               \
4924
4925 do
4926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4928 echo "configure:4929: checking for $ac_hdr" >&5
4929 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4930   echo $ac_n "(cached) $ac_c" 1>&6
4931 else
4932   cat > conftest.$ac_ext <<EOF
4933 #line 4934 "configure"
4934 #include "confdefs.h"
4935 #include <$ac_hdr>
4936 EOF
4937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4938 { (eval echo configure:4939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4940 if test -z "$ac_err"; then
4941   rm -rf conftest*
4942   eval "ac_cv_header_$ac_safe=yes"
4943 else
4944   echo "$ac_err" >&5
4945   echo "configure: failed program was:" >&5
4946   cat conftest.$ac_ext >&5
4947   rm -rf conftest*
4948   eval "ac_cv_header_$ac_safe=no"
4949 fi
4950 rm -f conftest*
4951 fi
4952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4953   echo "$ac_t""yes" 1>&6
4954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4955   cat >> confdefs.h <<EOF
4956 #define $ac_tr_hdr 1
4957 EOF
4958  
4959 else
4960   echo "$ac_t""no" 1>&6
4961 fi
4962 done
4963
4964
4965
4966
4967 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4968 echo "configure:4969: checking for dlopen" >&5
4969 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
4970   echo $ac_n "(cached) $ac_c" 1>&6
4971 else
4972   cat > conftest.$ac_ext <<EOF
4973 #line 4974 "configure"
4974 #include "confdefs.h"
4975 /* System header to define __stub macros and hopefully few prototypes,
4976     which can conflict with char dlopen(); below.  */
4977 #include <assert.h>
4978 /* Override any gcc2 internal prototype to avoid an error.  */
4979 /* We use char because int might match the return type of a gcc2
4980     builtin and then its argument prototype would still apply.  */
4981 char dlopen();
4982 char (*f)();
4983
4984 int main() {
4985
4986 /* The GNU C library defines this for functions which it implements
4987     to always fail with ENOSYS.  Some functions are actually named
4988     something starting with __ and the normal name is an alias.  */
4989 #if defined (__stub_dlopen) || defined (__stub___dlopen)
4990 choke me
4991 #else
4992 f = dlopen;
4993 #endif
4994
4995 ; return 0; }
4996 EOF
4997 if { (eval echo configure:4998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4998   rm -rf conftest*
4999   eval "ac_cv_func_dlopen=yes"
5000 else
5001   echo "configure: failed program was:" >&5
5002   cat conftest.$ac_ext >&5
5003   rm -rf conftest*
5004   eval "ac_cv_func_dlopen=no"
5005 fi
5006 rm -f conftest*
5007 fi
5008
5009 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
5010   echo "$ac_t""yes" 1>&6
5011   :
5012 else
5013   echo "$ac_t""no" 1>&6
5014 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5015 echo "configure:5016: checking for dlopen in -ldl" >&5
5016 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
5017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5018   echo $ac_n "(cached) $ac_c" 1>&6
5019 else
5020   ac_save_LIBS="$LIBS"
5021 LIBS="-ldl  $LIBS"
5022 cat > conftest.$ac_ext <<EOF
5023 #line 5024 "configure"
5024 #include "confdefs.h"
5025 /* Override any gcc2 internal prototype to avoid an error.  */
5026 /* We use char because int might match the return type of a gcc2
5027     builtin and then its argument prototype would still apply.  */
5028 char dlopen();
5029
5030 int main() {
5031 dlopen()
5032 ; return 0; }
5033 EOF
5034 if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5035   rm -rf conftest*
5036   eval "ac_cv_lib_$ac_lib_var=yes"
5037 else
5038   echo "configure: failed program was:" >&5
5039   cat conftest.$ac_ext >&5
5040   rm -rf conftest*
5041   eval "ac_cv_lib_$ac_lib_var=no"
5042 fi
5043 rm -f conftest*
5044 LIBS="$ac_save_LIBS"
5045
5046 fi
5047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5048   echo "$ac_t""yes" 1>&6
5049     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5050     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5051   cat >> confdefs.h <<EOF
5052 #define $ac_tr_lib 1
5053 EOF
5054
5055   LIBS="-ldl $LIBS"
5056
5057 else
5058   echo "$ac_t""no" 1>&6
5059 fi
5060
5061 fi
5062
5063
5064 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5065 echo "configure:5066: checking for sigset in -lV3" >&5
5066 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5068   echo $ac_n "(cached) $ac_c" 1>&6
5069 else
5070   ac_save_LIBS="$LIBS"
5071 LIBS="-lV3  $LIBS"
5072 cat > conftest.$ac_ext <<EOF
5073 #line 5074 "configure"
5074 #include "confdefs.h"
5075 /* Override any gcc2 internal prototype to avoid an error.  */
5076 /* We use char because int might match the return type of a gcc2
5077     builtin and then its argument prototype would still apply.  */
5078 char sigset();
5079
5080 int main() {
5081 sigset()
5082 ; return 0; }
5083 EOF
5084 if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5085   rm -rf conftest*
5086   eval "ac_cv_lib_$ac_lib_var=yes"
5087 else
5088   echo "configure: failed program was:" >&5
5089   cat conftest.$ac_ext >&5
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=no"
5092 fi
5093 rm -f conftest*
5094 LIBS="$ac_save_LIBS"
5095
5096 fi
5097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5098   echo "$ac_t""yes" 1>&6
5099     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5100     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5101   cat >> confdefs.h <<EOF
5102 #define $ac_tr_lib 1
5103 EOF
5104
5105   LIBS="-lV3 $LIBS"
5106
5107 else
5108   echo "$ac_t""no" 1>&6
5109 fi
5110
5111
5112 if test $ac_cv_header_winsock_h = yes; then
5113         echo $ac_n "checking for winsock""... $ac_c" 1>&6
5114 echo "configure:5115: checking for winsock" >&5
5115 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
5116   echo $ac_n "(cached) $ac_c" 1>&6
5117 else
5118   cat > conftest.$ac_ext <<EOF
5119 #line 5120 "configure"
5120 #include "confdefs.h"
5121 #include <winsock.h>
5122 int main() {
5123
5124                         socket(0,0,0);
5125                         select(0,NULL,NULL,NULL,NULL);
5126                         closesocket(0);
5127                         gethostname(NULL,0);
5128         
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5132   rm -rf conftest*
5133   ol_cv_winsock=yes
5134 else
5135   echo "configure: failed program was:" >&5
5136   cat conftest.$ac_ext >&5
5137   rm -rf conftest*
5138   ol_cv_winsock=no
5139 fi
5140 rm -f conftest*
5141 fi
5142
5143 echo "$ac_t""$ol_cv_winsock" 1>&6
5144
5145         if test $ol_cv_winsock = yes ; then
5146                 cat >> confdefs.h <<\EOF
5147 #define HAVE_WINSOCK 1
5148 EOF
5149
5150                 ac_cv_func_socket=yes
5151                 ac_cv_func_select=yes
5152                 ac_cv_func_closesocket=yes
5153                 ac_cv_func_gethostname=yes
5154         fi
5155 fi
5156
5157
5158 echo $ac_n "checking for socket""... $ac_c" 1>&6
5159 echo "configure:5160: checking for socket" >&5
5160 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5161   echo $ac_n "(cached) $ac_c" 1>&6
5162 else
5163   cat > conftest.$ac_ext <<EOF
5164 #line 5165 "configure"
5165 #include "confdefs.h"
5166 /* System header to define __stub macros and hopefully few prototypes,
5167     which can conflict with char socket(); below.  */
5168 #include <assert.h>
5169 /* Override any gcc2 internal prototype to avoid an error.  */
5170 /* We use char because int might match the return type of a gcc2
5171     builtin and then its argument prototype would still apply.  */
5172 char socket();
5173 char (*f)();
5174
5175 int main() {
5176
5177 /* The GNU C library defines this for functions which it implements
5178     to always fail with ENOSYS.  Some functions are actually named
5179     something starting with __ and the normal name is an alias.  */
5180 #if defined (__stub_socket) || defined (__stub___socket)
5181 choke me
5182 #else
5183 f = socket;
5184 #endif
5185
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5189   rm -rf conftest*
5190   eval "ac_cv_func_socket=yes"
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   eval "ac_cv_func_socket=no"
5196 fi
5197 rm -f conftest*
5198 fi
5199
5200 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5201   echo "$ac_t""yes" 1>&6
5202   :
5203 else
5204   echo "$ac_t""no" 1>&6
5205         
5206         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5207 echo "configure:5208: checking for main in -lsocket" >&5
5208 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5209 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5210   echo $ac_n "(cached) $ac_c" 1>&6
5211 else
5212   ac_save_LIBS="$LIBS"
5213 LIBS="-lsocket  $LIBS"
5214 cat > conftest.$ac_ext <<EOF
5215 #line 5216 "configure"
5216 #include "confdefs.h"
5217
5218 int main() {
5219 main()
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   eval "ac_cv_lib_$ac_lib_var=yes"
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   eval "ac_cv_lib_$ac_lib_var=no"
5230 fi
5231 rm -f conftest*
5232 LIBS="$ac_save_LIBS"
5233
5234 fi
5235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5236   echo "$ac_t""yes" 1>&6
5237     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5238     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5239   cat >> confdefs.h <<EOF
5240 #define $ac_tr_lib 1
5241 EOF
5242
5243   LIBS="-lsocket $LIBS"
5244
5245 else
5246   echo "$ac_t""no" 1>&6
5247 fi
5248
5249         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5250 echo "configure:5251: checking for main in -lnet" >&5
5251 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5253   echo $ac_n "(cached) $ac_c" 1>&6
5254 else
5255   ac_save_LIBS="$LIBS"
5256 LIBS="-lnet  $LIBS"
5257 cat > conftest.$ac_ext <<EOF
5258 #line 5259 "configure"
5259 #include "confdefs.h"
5260
5261 int main() {
5262 main()
5263 ; return 0; }
5264 EOF
5265 if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5266   rm -rf conftest*
5267   eval "ac_cv_lib_$ac_lib_var=yes"
5268 else
5269   echo "configure: failed program was:" >&5
5270   cat conftest.$ac_ext >&5
5271   rm -rf conftest*
5272   eval "ac_cv_lib_$ac_lib_var=no"
5273 fi
5274 rm -f conftest*
5275 LIBS="$ac_save_LIBS"
5276
5277 fi
5278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5279   echo "$ac_t""yes" 1>&6
5280     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5281     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5282   cat >> confdefs.h <<EOF
5283 #define $ac_tr_lib 1
5284 EOF
5285
5286   LIBS="-lnet $LIBS"
5287
5288 else
5289   echo "$ac_t""no" 1>&6
5290 fi
5291
5292         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5293 echo "configure:5294: checking for main in -lnsl_s" >&5
5294 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5295 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5296   echo $ac_n "(cached) $ac_c" 1>&6
5297 else
5298   ac_save_LIBS="$LIBS"
5299 LIBS="-lnsl_s  $LIBS"
5300 cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303
5304 int main() {
5305 main()
5306 ; return 0; }
5307 EOF
5308 if { (eval echo configure:5309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5309   rm -rf conftest*
5310   eval "ac_cv_lib_$ac_lib_var=yes"
5311 else
5312   echo "configure: failed program was:" >&5
5313   cat conftest.$ac_ext >&5
5314   rm -rf conftest*
5315   eval "ac_cv_lib_$ac_lib_var=no"
5316 fi
5317 rm -f conftest*
5318 LIBS="$ac_save_LIBS"
5319
5320 fi
5321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5322   echo "$ac_t""yes" 1>&6
5323     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5324     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5325   cat >> confdefs.h <<EOF
5326 #define $ac_tr_lib 1
5327 EOF
5328
5329   LIBS="-lnsl_s $LIBS"
5330
5331 else
5332   echo "$ac_t""no" 1>&6
5333 fi
5334
5335         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5336 echo "configure:5337: checking for main in -lnsl" >&5
5337 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5338 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5339   echo $ac_n "(cached) $ac_c" 1>&6
5340 else
5341   ac_save_LIBS="$LIBS"
5342 LIBS="-lnsl  $LIBS"
5343 cat > conftest.$ac_ext <<EOF
5344 #line 5345 "configure"
5345 #include "confdefs.h"
5346
5347 int main() {
5348 main()
5349 ; return 0; }
5350 EOF
5351 if { (eval echo configure:5352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5352   rm -rf conftest*
5353   eval "ac_cv_lib_$ac_lib_var=yes"
5354 else
5355   echo "configure: failed program was:" >&5
5356   cat conftest.$ac_ext >&5
5357   rm -rf conftest*
5358   eval "ac_cv_lib_$ac_lib_var=no"
5359 fi
5360 rm -f conftest*
5361 LIBS="$ac_save_LIBS"
5362
5363 fi
5364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5365   echo "$ac_t""yes" 1>&6
5366     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5367     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5368   cat >> confdefs.h <<EOF
5369 #define $ac_tr_lib 1
5370 EOF
5371
5372   LIBS="-lnsl $LIBS"
5373
5374 else
5375   echo "$ac_t""no" 1>&6
5376 fi
5377
5378         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5379 echo "configure:5380: checking for socket in -linet" >&5
5380 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5381 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5382   echo $ac_n "(cached) $ac_c" 1>&6
5383 else
5384   ac_save_LIBS="$LIBS"
5385 LIBS="-linet  $LIBS"
5386 cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389 /* Override any gcc2 internal prototype to avoid an error.  */
5390 /* We use char because int might match the return type of a gcc2
5391     builtin and then its argument prototype would still apply.  */
5392 char socket();
5393
5394 int main() {
5395 socket()
5396 ; return 0; }
5397 EOF
5398 if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5399   rm -rf conftest*
5400   eval "ac_cv_lib_$ac_lib_var=yes"
5401 else
5402   echo "configure: failed program was:" >&5
5403   cat conftest.$ac_ext >&5
5404   rm -rf conftest*
5405   eval "ac_cv_lib_$ac_lib_var=no"
5406 fi
5407 rm -f conftest*
5408 LIBS="$ac_save_LIBS"
5409
5410 fi
5411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5412   echo "$ac_t""yes" 1>&6
5413     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5414     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5415   cat >> confdefs.h <<EOF
5416 #define $ac_tr_lib 1
5417 EOF
5418
5419   LIBS="-linet $LIBS"
5420
5421 else
5422   echo "$ac_t""no" 1>&6
5423 fi
5424
5425         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5426 echo "configure:5427: checking for main in -lgen" >&5
5427 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5428 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5429   echo $ac_n "(cached) $ac_c" 1>&6
5430 else
5431   ac_save_LIBS="$LIBS"
5432 LIBS="-lgen  $LIBS"
5433 cat > conftest.$ac_ext <<EOF
5434 #line 5435 "configure"
5435 #include "confdefs.h"
5436
5437 int main() {
5438 main()
5439 ; return 0; }
5440 EOF
5441 if { (eval echo configure:5442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5442   rm -rf conftest*
5443   eval "ac_cv_lib_$ac_lib_var=yes"
5444 else
5445   echo "configure: failed program was:" >&5
5446   cat conftest.$ac_ext >&5
5447   rm -rf conftest*
5448   eval "ac_cv_lib_$ac_lib_var=no"
5449 fi
5450 rm -f conftest*
5451 LIBS="$ac_save_LIBS"
5452
5453 fi
5454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5455   echo "$ac_t""yes" 1>&6
5456     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5457     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5458   cat >> confdefs.h <<EOF
5459 #define $ac_tr_lib 1
5460 EOF
5461
5462   LIBS="-lgen $LIBS"
5463
5464 else
5465   echo "$ac_t""no" 1>&6
5466 fi
5467
5468
5469 fi
5470
5471
5472 echo $ac_n "checking for select""... $ac_c" 1>&6
5473 echo "configure:5474: checking for select" >&5
5474 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5475   echo $ac_n "(cached) $ac_c" 1>&6
5476 else
5477   cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5480 /* System header to define __stub macros and hopefully few prototypes,
5481     which can conflict with char select(); below.  */
5482 #include <assert.h>
5483 /* Override any gcc2 internal prototype to avoid an error.  */
5484 /* We use char because int might match the return type of a gcc2
5485     builtin and then its argument prototype would still apply.  */
5486 char select();
5487 char (*f)();
5488
5489 int main() {
5490
5491 /* The GNU C library defines this for functions which it implements
5492     to always fail with ENOSYS.  Some functions are actually named
5493     something starting with __ and the normal name is an alias.  */
5494 #if defined (__stub_select) || defined (__stub___select)
5495 choke me
5496 #else
5497 f = select;
5498 #endif
5499
5500 ; return 0; }
5501 EOF
5502 if { (eval echo configure:5503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5503   rm -rf conftest*
5504   eval "ac_cv_func_select=yes"
5505 else
5506   echo "configure: failed program was:" >&5
5507   cat conftest.$ac_ext >&5
5508   rm -rf conftest*
5509   eval "ac_cv_func_select=no"
5510 fi
5511 rm -f conftest*
5512 fi
5513
5514 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5515   echo "$ac_t""yes" 1>&6
5516   :
5517 else
5518   echo "$ac_t""no" 1>&6
5519 { echo "configure: error: select() required." 1>&2; exit 1; }
5520 fi
5521
5522
5523 if test "${ac_cv_header_winsock_h}" != yes; then
5524                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5525 echo "configure:5526: checking types of arguments for select()" >&5
5526  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5527   echo $ac_n "(cached) $ac_c" 1>&6
5528 else
5529    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5530   echo $ac_n "(cached) $ac_c" 1>&6
5531 else
5532     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5533   echo $ac_n "(cached) $ac_c" 1>&6
5534 else
5535      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5536      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5537       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5538        cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541 #ifdef HAVE_SYS_TYPES_H
5542 #include <sys/types.h>
5543 #endif
5544 #ifdef HAVE_SYS_TIME_H
5545 #include <sys/time.h>
5546 #endif
5547 #ifdef HAVE_SYS_SELECT_H
5548 #include <sys/select.h>
5549 #endif
5550 #ifdef HAVE_SYS_SOCKET_H
5551 #include <sys/socket.h>
5552 #endif
5553 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);
5554 int main() {
5555
5556 ; return 0; }
5557 EOF
5558 if { (eval echo configure:5559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5559   rm -rf conftest*
5560           ac_not_found=no ; break 3
5561 else
5562   echo "configure: failed program was:" >&5
5563   cat conftest.$ac_ext >&5
5564   rm -rf conftest*
5565   ac_not_found=yes
5566 fi
5567 rm -f conftest*
5568       done
5569      done
5570     done
5571    
5572 fi
5573   
5574 fi
5575  
5576 fi
5577  if test "$ac_not_found" = yes; then
5578   ac_cv_func_select_arg1=int 
5579   ac_cv_func_select_arg234='int *' 
5580   ac_cv_func_select_arg5='struct timeval *'
5581  fi
5582  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5583  cat >> confdefs.h <<EOF
5584 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5585 EOF
5586
5587  cat >> confdefs.h <<EOF
5588 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5589 EOF
5590
5591  cat >> confdefs.h <<EOF
5592 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5593 EOF
5594
5595
5596 fi
5597
5598
5599 for ac_hdr in regex.h 
5600 do
5601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5603 echo "configure:5604: checking for $ac_hdr" >&5
5604 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5605   echo $ac_n "(cached) $ac_c" 1>&6
5606 else
5607   cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 #include <$ac_hdr>
5611 EOF
5612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5613 { (eval echo configure:5614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5615 if test -z "$ac_err"; then
5616   rm -rf conftest*
5617   eval "ac_cv_header_$ac_safe=yes"
5618 else
5619   echo "$ac_err" >&5
5620   echo "configure: failed program was:" >&5
5621   cat conftest.$ac_ext >&5
5622   rm -rf conftest*
5623   eval "ac_cv_header_$ac_safe=no"
5624 fi
5625 rm -f conftest*
5626 fi
5627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5628   echo "$ac_t""yes" 1>&6
5629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5630   cat >> confdefs.h <<EOF
5631 #define $ac_tr_hdr 1
5632 EOF
5633  
5634 else
5635   echo "$ac_t""no" 1>&6
5636 fi
5637 done
5638
5639 if test "$ac_cv_header_regex_h" != yes ; then
5640         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5641 fi
5642 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5643 echo "configure:5644: checking for regfree" >&5
5644 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   cat > conftest.$ac_ext <<EOF
5648 #line 5649 "configure"
5649 #include "confdefs.h"
5650 /* System header to define __stub macros and hopefully few prototypes,
5651     which can conflict with char regfree(); below.  */
5652 #include <assert.h>
5653 /* Override any gcc2 internal prototype to avoid an error.  */
5654 /* We use char because int might match the return type of a gcc2
5655     builtin and then its argument prototype would still apply.  */
5656 char regfree();
5657 char (*f)();
5658
5659 int main() {
5660
5661 /* The GNU C library defines this for functions which it implements
5662     to always fail with ENOSYS.  Some functions are actually named
5663     something starting with __ and the normal name is an alias.  */
5664 #if defined (__stub_regfree) || defined (__stub___regfree)
5665 choke me
5666 #else
5667 f = regfree;
5668 #endif
5669
5670 ; return 0; }
5671 EOF
5672 if { (eval echo configure:5673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5673   rm -rf conftest*
5674   eval "ac_cv_func_regfree=yes"
5675 else
5676   echo "configure: failed program was:" >&5
5677   cat conftest.$ac_ext >&5
5678   rm -rf conftest*
5679   eval "ac_cv_func_regfree=no"
5680 fi
5681 rm -f conftest*
5682 fi
5683
5684 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5685   echo "$ac_t""yes" 1>&6
5686   :
5687 else
5688   echo "$ac_t""no" 1>&6
5689 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5690 fi
5691
5692
5693
5694 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5695 echo "configure:5696: checking for compatible POSIX regex" >&5
5696 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5697   echo $ac_n "(cached) $ac_c" 1>&6
5698 else
5699   
5700         if test "$cross_compiling" = yes; then
5701   ol_cv_c_posix_regex=cross
5702 else
5703   cat > conftest.$ac_ext <<EOF
5704 #line 5705 "configure"
5705 #include "confdefs.h"
5706
5707 #include <sys/types.h>
5708 #include <regex.h>
5709 static char *pattern, *string;
5710 main()
5711 {
5712         int rc;
5713         regex_t re;
5714
5715         pattern = "^A";
5716
5717         if(regcomp(&re, pattern, 0)) {
5718                 return -1;
5719         }
5720         
5721         string = "ALL MATCH";
5722         
5723         rc = regexec(&re, string, 0, (void*)0, 0);
5724
5725         regfree(&re);
5726
5727         return rc;
5728 }
5729 EOF
5730 if { (eval echo configure:5731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5731 then
5732   ol_cv_c_posix_regex=yes
5733 else
5734   echo "configure: failed program was:" >&5
5735   cat conftest.$ac_ext >&5
5736   rm -fr conftest*
5737   ol_cv_c_posix_regex=no
5738 fi
5739 rm -fr conftest*
5740 fi
5741
5742 fi
5743
5744 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5745
5746 if test "$ol_cv_c_posix_regex" = no ; then
5747         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5748 fi
5749
5750 ol_link_dnssrv=no
5751 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5752 echo "configure:5753: checking for res_query" >&5
5753 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5754   echo $ac_n "(cached) $ac_c" 1>&6
5755 else
5756   cat > conftest.$ac_ext <<EOF
5757 #line 5758 "configure"
5758 #include "confdefs.h"
5759 /* System header to define __stub macros and hopefully few prototypes,
5760     which can conflict with char res_query(); below.  */
5761 #include <assert.h>
5762 /* Override any gcc2 internal prototype to avoid an error.  */
5763 /* We use char because int might match the return type of a gcc2
5764     builtin and then its argument prototype would still apply.  */
5765 char res_query();
5766 char (*f)();
5767
5768 int main() {
5769
5770 /* The GNU C library defines this for functions which it implements
5771     to always fail with ENOSYS.  Some functions are actually named
5772     something starting with __ and the normal name is an alias.  */
5773 #if defined (__stub_res_query) || defined (__stub___res_query)
5774 choke me
5775 #else
5776 f = res_query;
5777 #endif
5778
5779 ; return 0; }
5780 EOF
5781 if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5782   rm -rf conftest*
5783   eval "ac_cv_func_res_query=yes"
5784 else
5785   echo "configure: failed program was:" >&5
5786   cat conftest.$ac_ext >&5
5787   rm -rf conftest*
5788   eval "ac_cv_func_res_query=no"
5789 fi
5790 rm -f conftest*
5791 fi
5792
5793 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5794   echo "$ac_t""yes" 1>&6
5795   :
5796 else
5797   echo "$ac_t""no" 1>&6
5798 fi
5799
5800 if test $ac_cv_func_res_query = no ; then 
5801         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5802 echo "configure:5803: checking for res_query in -lbind" >&5
5803 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5805   echo $ac_n "(cached) $ac_c" 1>&6
5806 else
5807   ac_save_LIBS="$LIBS"
5808 LIBS="-lbind  $LIBS"
5809 cat > conftest.$ac_ext <<EOF
5810 #line 5811 "configure"
5811 #include "confdefs.h"
5812 /* Override any gcc2 internal prototype to avoid an error.  */
5813 /* We use char because int might match the return type of a gcc2
5814     builtin and then its argument prototype would still apply.  */
5815 char res_query();
5816
5817 int main() {
5818 res_query()
5819 ; return 0; }
5820 EOF
5821 if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5822   rm -rf conftest*
5823   eval "ac_cv_lib_$ac_lib_var=yes"
5824 else
5825   echo "configure: failed program was:" >&5
5826   cat conftest.$ac_ext >&5
5827   rm -rf conftest*
5828   eval "ac_cv_lib_$ac_lib_var=no"
5829 fi
5830 rm -f conftest*
5831 LIBS="$ac_save_LIBS"
5832
5833 fi
5834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5835   echo "$ac_t""yes" 1>&6
5836     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5837     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5838   cat >> confdefs.h <<EOF
5839 #define $ac_tr_lib 1
5840 EOF
5841
5842   LIBS="-lbind $LIBS"
5843
5844 else
5845   echo "$ac_t""no" 1>&6
5846 fi
5847
5848         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5849 fi
5850
5851 if test $ac_cv_func_res_query = no ; then 
5852         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5853 echo "configure:5854: checking for __res_query in -lbind" >&5
5854 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5855 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5856   echo $ac_n "(cached) $ac_c" 1>&6
5857 else
5858   ac_save_LIBS="$LIBS"
5859 LIBS="-lbind  $LIBS"
5860 cat > conftest.$ac_ext <<EOF
5861 #line 5862 "configure"
5862 #include "confdefs.h"
5863 /* Override any gcc2 internal prototype to avoid an error.  */
5864 /* We use char because int might match the return type of a gcc2
5865     builtin and then its argument prototype would still apply.  */
5866 char __res_query();
5867
5868 int main() {
5869 __res_query()
5870 ; return 0; }
5871 EOF
5872 if { (eval echo configure:5873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5873   rm -rf conftest*
5874   eval "ac_cv_lib_$ac_lib_var=yes"
5875 else
5876   echo "configure: failed program was:" >&5
5877   cat conftest.$ac_ext >&5
5878   rm -rf conftest*
5879   eval "ac_cv_lib_$ac_lib_var=no"
5880 fi
5881 rm -f conftest*
5882 LIBS="$ac_save_LIBS"
5883
5884 fi
5885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5886   echo "$ac_t""yes" 1>&6
5887     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5888     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5889   cat >> confdefs.h <<EOF
5890 #define $ac_tr_lib 1
5891 EOF
5892
5893   LIBS="-lbind $LIBS"
5894
5895 else
5896   echo "$ac_t""no" 1>&6
5897 fi
5898
5899         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5900 fi
5901
5902 if test $ac_cv_func_res_query = no ; then 
5903         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5904 echo "configure:5905: checking for res_query in -lresolv" >&5
5905 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5907   echo $ac_n "(cached) $ac_c" 1>&6
5908 else
5909   ac_save_LIBS="$LIBS"
5910 LIBS="-lresolv  $LIBS"
5911 cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 /* Override any gcc2 internal prototype to avoid an error.  */
5915 /* We use char because int might match the return type of a gcc2
5916     builtin and then its argument prototype would still apply.  */
5917 char res_query();
5918
5919 int main() {
5920 res_query()
5921 ; return 0; }
5922 EOF
5923 if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5924   rm -rf conftest*
5925   eval "ac_cv_lib_$ac_lib_var=yes"
5926 else
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=no"
5931 fi
5932 rm -f conftest*
5933 LIBS="$ac_save_LIBS"
5934
5935 fi
5936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5937   echo "$ac_t""yes" 1>&6
5938     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5939     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5940   cat >> confdefs.h <<EOF
5941 #define $ac_tr_lib 1
5942 EOF
5943
5944   LIBS="-lresolv $LIBS"
5945
5946 else
5947   echo "$ac_t""no" 1>&6
5948 fi
5949
5950         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5951 fi
5952
5953 if test "$ac_cv_func_res_query" = yes ; then
5954         cat >> confdefs.h <<\EOF
5955 #define HAVE_RES_QUERY 1
5956 EOF
5957
5958
5959         if test $ol_enable_dnssrv != no ; then
5960                 ol_link_dnssrv=yes
5961         fi
5962 fi
5963
5964 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5965         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5966 fi
5967
5968 for ac_func in getaddrinfo inet_ntop 
5969 do
5970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5971 echo "configure:5972: checking for $ac_func" >&5
5972 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5973   echo $ac_n "(cached) $ac_c" 1>&6
5974 else
5975   cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978 /* System header to define __stub macros and hopefully few prototypes,
5979     which can conflict with char $ac_func(); below.  */
5980 #include <assert.h>
5981 /* Override any gcc2 internal prototype to avoid an error.  */
5982 /* We use char because int might match the return type of a gcc2
5983     builtin and then its argument prototype would still apply.  */
5984 char $ac_func();
5985 char (*f)();
5986
5987 int main() {
5988
5989 /* The GNU C library defines this for functions which it implements
5990     to always fail with ENOSYS.  Some functions are actually named
5991     something starting with __ and the normal name is an alias.  */
5992 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5993 choke me
5994 #else
5995 f = $ac_func;
5996 #endif
5997
5998 ; return 0; }
5999 EOF
6000 if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6001   rm -rf conftest*
6002   eval "ac_cv_func_$ac_func=yes"
6003 else
6004   echo "configure: failed program was:" >&5
6005   cat conftest.$ac_ext >&5
6006   rm -rf conftest*
6007   eval "ac_cv_func_$ac_func=no"
6008 fi
6009 rm -f conftest*
6010 fi
6011
6012 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6013   echo "$ac_t""yes" 1>&6
6014     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6015   cat >> confdefs.h <<EOF
6016 #define $ac_tr_func 1
6017 EOF
6018  
6019 else
6020   echo "$ac_t""no" 1>&6
6021 fi
6022 done
6023
6024
6025 ol_link_ipv6=no
6026 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
6027         if test $ol_enable_ipv6 = yes ; then
6028                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
6029         fi
6030 else
6031         for ac_func in gai_strerror 
6032 do
6033 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6034 echo "configure:6035: checking for $ac_func" >&5
6035 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6036   echo $ac_n "(cached) $ac_c" 1>&6
6037 else
6038   cat > conftest.$ac_ext <<EOF
6039 #line 6040 "configure"
6040 #include "confdefs.h"
6041 /* System header to define __stub macros and hopefully few prototypes,
6042     which can conflict with char $ac_func(); below.  */
6043 #include <assert.h>
6044 /* Override any gcc2 internal prototype to avoid an error.  */
6045 /* We use char because int might match the return type of a gcc2
6046     builtin and then its argument prototype would still apply.  */
6047 char $ac_func();
6048 char (*f)();
6049
6050 int main() {
6051
6052 /* The GNU C library defines this for functions which it implements
6053     to always fail with ENOSYS.  Some functions are actually named
6054     something starting with __ and the normal name is an alias.  */
6055 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6056 choke me
6057 #else
6058 f = $ac_func;
6059 #endif
6060
6061 ; return 0; }
6062 EOF
6063 if { (eval echo configure:6064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6064   rm -rf conftest*
6065   eval "ac_cv_func_$ac_func=yes"
6066 else
6067   echo "configure: failed program was:" >&5
6068   cat conftest.$ac_ext >&5
6069   rm -rf conftest*
6070   eval "ac_cv_func_$ac_func=no"
6071 fi
6072 rm -f conftest*
6073 fi
6074
6075 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6076   echo "$ac_t""yes" 1>&6
6077     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6078   cat >> confdefs.h <<EOF
6079 #define $ac_tr_func 1
6080 EOF
6081  
6082 else
6083   echo "$ac_t""no" 1>&6
6084 fi
6085 done
6086
6087
6088         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
6089 echo "configure:6090: checking INET6_ADDRSTRLEN" >&5
6090 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
6091   echo $ac_n "(cached) $ac_c" 1>&6
6092 else
6093   
6094                 cat > conftest.$ac_ext <<EOF
6095 #line 6096 "configure"
6096 #include "confdefs.h"
6097
6098 #                       include <netinet/in.h>
6099 #                       ifdef INET6_ADDRSTRLEN
6100                                 __has_inet6_addrstrlen__;
6101 #                       endif
6102                 
6103 EOF
6104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6105   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
6106   rm -rf conftest*
6107   ol_cv_inet6_addrstrlen=yes
6108 else
6109   rm -rf conftest*
6110   ol_cv_inet6_addrstrlen=no
6111 fi
6112 rm -f conftest*
6113
6114 fi
6115
6116 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
6117
6118         if test $ol_cv_inet6_addrstrlen = yes ; then
6119                 ol_link_ipv6=yes
6120         elif test $ol_enable_ipv6 = yes ; then
6121                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
6122         fi
6123 fi
6124
6125 if test $ol_enable_local != no ; then
6126         for ac_hdr in sys/un.h 
6127 do
6128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6130 echo "configure:6131: checking for $ac_hdr" >&5
6131 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6132   echo $ac_n "(cached) $ac_c" 1>&6
6133 else
6134   cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137 #include <$ac_hdr>
6138 EOF
6139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6140 { (eval echo configure:6141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6142 if test -z "$ac_err"; then
6143   rm -rf conftest*
6144   eval "ac_cv_header_$ac_safe=yes"
6145 else
6146   echo "$ac_err" >&5
6147   echo "configure: failed program was:" >&5
6148   cat conftest.$ac_ext >&5
6149   rm -rf conftest*
6150   eval "ac_cv_header_$ac_safe=no"
6151 fi
6152 rm -f conftest*
6153 fi
6154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6155   echo "$ac_t""yes" 1>&6
6156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6157   cat >> confdefs.h <<EOF
6158 #define $ac_tr_hdr 1
6159 EOF
6160  
6161 else
6162   echo "$ac_t""no" 1>&6
6163 fi
6164 done
6165
6166
6167         if test $ol_enable_local = auto ; then
6168                 ol_enable_local=$ac_cv_header_sys_un_h
6169         elif test $ac_cv_header_sys_un_h = no ; then
6170                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
6171         fi
6172 fi
6173
6174 ol_link_kbind=no
6175 ol_link_kpasswd=no
6176 ol_link_krb5=no
6177 ol_link_krb4=no
6178
6179 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6180         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
6181         -o $ol_with_kerberos = k425 ; then
6182
6183         for ac_hdr in krb5.h
6184 do
6185 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6186 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6187 echo "configure:6188: checking for $ac_hdr" >&5
6188 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6189   echo $ac_n "(cached) $ac_c" 1>&6
6190 else
6191   cat > conftest.$ac_ext <<EOF
6192 #line 6193 "configure"
6193 #include "confdefs.h"
6194 #include <$ac_hdr>
6195 EOF
6196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6197 { (eval echo configure:6198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6199 if test -z "$ac_err"; then
6200   rm -rf conftest*
6201   eval "ac_cv_header_$ac_safe=yes"
6202 else
6203   echo "$ac_err" >&5
6204   echo "configure: failed program was:" >&5
6205   cat conftest.$ac_ext >&5
6206   rm -rf conftest*
6207   eval "ac_cv_header_$ac_safe=no"
6208 fi
6209 rm -f conftest*
6210 fi
6211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6212   echo "$ac_t""yes" 1>&6
6213     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6214   cat >> confdefs.h <<EOF
6215 #define $ac_tr_hdr 1
6216 EOF
6217  
6218 else
6219   echo "$ac_t""no" 1>&6
6220 fi
6221 done
6222
6223
6224         if test $ac_cv_header_krb5_h = yes ; then
6225                                 for ac_hdr in heim_err.h
6226 do
6227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6229 echo "configure:6230: checking for $ac_hdr" >&5
6230 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6231   echo $ac_n "(cached) $ac_c" 1>&6
6232 else
6233   cat > conftest.$ac_ext <<EOF
6234 #line 6235 "configure"
6235 #include "confdefs.h"
6236 #include <$ac_hdr>
6237 EOF
6238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6239 { (eval echo configure:6240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6241 if test -z "$ac_err"; then
6242   rm -rf conftest*
6243   eval "ac_cv_header_$ac_safe=yes"
6244 else
6245   echo "$ac_err" >&5
6246   echo "configure: failed program was:" >&5
6247   cat conftest.$ac_ext >&5
6248   rm -rf conftest*
6249   eval "ac_cv_header_$ac_safe=no"
6250 fi
6251 rm -f conftest*
6252 fi
6253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6254   echo "$ac_t""yes" 1>&6
6255     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6256   cat >> confdefs.h <<EOF
6257 #define $ac_tr_hdr 1
6258 EOF
6259  
6260 else
6261   echo "$ac_t""no" 1>&6
6262 fi
6263 done
6264
6265                 if test $ac_cv_header_heim_err_h = yes ; then
6266                         krb5_impl=heimdal
6267                 else
6268                         krb5_impl=mit
6269                 fi
6270
6271                 if test $krb5_impl = mit; then
6272                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6273 echo "configure:6274: checking for main in -lkrb5" >&5
6274 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6275 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6276   echo $ac_n "(cached) $ac_c" 1>&6
6277 else
6278   ac_save_LIBS="$LIBS"
6279 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6280 cat > conftest.$ac_ext <<EOF
6281 #line 6282 "configure"
6282 #include "confdefs.h"
6283
6284 int main() {
6285 main()
6286 ; return 0; }
6287 EOF
6288 if { (eval echo configure:6289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6289   rm -rf conftest*
6290   eval "ac_cv_lib_$ac_lib_var=yes"
6291 else
6292   echo "configure: failed program was:" >&5
6293   cat conftest.$ac_ext >&5
6294   rm -rf conftest*
6295   eval "ac_cv_lib_$ac_lib_var=no"
6296 fi
6297 rm -f conftest*
6298 LIBS="$ac_save_LIBS"
6299
6300 fi
6301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6302   echo "$ac_t""yes" 1>&6
6303   have_krb5=yes
6304                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6305 else
6306   echo "$ac_t""no" 1>&6
6307 have_krb5=no
6308 fi
6309
6310
6311                 elif test $krb5_impl = heimdal; then
6312                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6313 echo "configure:6314: checking for main in -lkrb5" >&5
6314 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6315 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6316   echo $ac_n "(cached) $ac_c" 1>&6
6317 else
6318   ac_save_LIBS="$LIBS"
6319 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6320 cat > conftest.$ac_ext <<EOF
6321 #line 6322 "configure"
6322 #include "confdefs.h"
6323
6324 int main() {
6325 main()
6326 ; return 0; }
6327 EOF
6328 if { (eval echo configure:6329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6329   rm -rf conftest*
6330   eval "ac_cv_lib_$ac_lib_var=yes"
6331 else
6332   echo "configure: failed program was:" >&5
6333   cat conftest.$ac_ext >&5
6334   rm -rf conftest*
6335   eval "ac_cv_lib_$ac_lib_var=no"
6336 fi
6337 rm -f conftest*
6338 LIBS="$ac_save_LIBS"
6339
6340 fi
6341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6342   echo "$ac_t""yes" 1>&6
6343   have_krb5=yes
6344                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6345 else
6346   echo "$ac_t""no" 1>&6
6347 have_krb5=no
6348 fi
6349
6350
6351                         cat >> confdefs.h <<\EOF
6352 #define HAVE_HEIMDAL_KERBEROS 1
6353 EOF
6354
6355                 else
6356                         have_krb5=no
6357                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6358                 fi
6359
6360                 if test $have_krb5 = yes ; then
6361                         ol_link_krb5=yes
6362
6363                         cat >> confdefs.h <<\EOF
6364 #define HAVE_KRB5 1
6365 EOF
6366
6367
6368                         if test $ol_enable_kpasswd != no ; then
6369                                 ol_link_kpasswd=yes;
6370                         fi
6371
6372                         if test $ol_with_kerberos = k5only ; then
6373                                 ol_with_kerberos=found
6374                         fi
6375
6376                 elif test $ol_with_kerberos != auto ; then
6377                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6378                 fi
6379
6380         fi
6381 fi
6382
6383 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6384         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6385
6386         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6387 do
6388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6390 echo "configure:6391: checking for $ac_hdr" >&5
6391 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6392   echo $ac_n "(cached) $ac_c" 1>&6
6393 else
6394   cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397 #include <$ac_hdr>
6398 EOF
6399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6400 { (eval echo configure:6401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6402 if test -z "$ac_err"; then
6403   rm -rf conftest*
6404   eval "ac_cv_header_$ac_safe=yes"
6405 else
6406   echo "$ac_err" >&5
6407   echo "configure: failed program was:" >&5
6408   cat conftest.$ac_ext >&5
6409   rm -rf conftest*
6410   eval "ac_cv_header_$ac_safe=no"
6411 fi
6412 rm -f conftest*
6413 fi
6414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6415   echo "$ac_t""yes" 1>&6
6416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6417   cat >> confdefs.h <<EOF
6418 #define $ac_tr_hdr 1
6419 EOF
6420  
6421 else
6422   echo "$ac_t""no" 1>&6
6423 fi
6424 done
6425
6426
6427         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6428                 if test $krb5_impl = mit; then
6429                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6430 echo "configure:6431: checking for main in -lkrb4" >&5
6431 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6432 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6433   echo $ac_n "(cached) $ac_c" 1>&6
6434 else
6435   ac_save_LIBS="$LIBS"
6436 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6437 cat > conftest.$ac_ext <<EOF
6438 #line 6439 "configure"
6439 #include "confdefs.h"
6440
6441 int main() {
6442 main()
6443 ; return 0; }
6444 EOF
6445 if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6446   rm -rf conftest*
6447   eval "ac_cv_lib_$ac_lib_var=yes"
6448 else
6449   echo "configure: failed program was:" >&5
6450   cat conftest.$ac_ext >&5
6451   rm -rf conftest*
6452   eval "ac_cv_lib_$ac_lib_var=no"
6453 fi
6454 rm -f conftest*
6455 LIBS="$ac_save_LIBS"
6456
6457 fi
6458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6459   echo "$ac_t""yes" 1>&6
6460   have_k425=yes
6461                                 KRB4_LIBS="-lkrb4 -ldes425"
6462 else
6463   echo "$ac_t""no" 1>&6
6464 have_k425=no
6465 fi
6466
6467
6468                 elif test $krb5_impl = heimdal; then
6469                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6470 echo "configure:6471: checking for main in -lkrb4" >&5
6471 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6473   echo $ac_n "(cached) $ac_c" 1>&6
6474 else
6475   ac_save_LIBS="$LIBS"
6476 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6477 cat > conftest.$ac_ext <<EOF
6478 #line 6479 "configure"
6479 #include "confdefs.h"
6480
6481 int main() {
6482 main()
6483 ; return 0; }
6484 EOF
6485 if { (eval echo configure:6486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6486   rm -rf conftest*
6487   eval "ac_cv_lib_$ac_lib_var=yes"
6488 else
6489   echo "configure: failed program was:" >&5
6490   cat conftest.$ac_ext >&5
6491   rm -rf conftest*
6492   eval "ac_cv_lib_$ac_lib_var=no"
6493 fi
6494 rm -f conftest*
6495 LIBS="$ac_save_LIBS"
6496
6497 fi
6498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6499   echo "$ac_t""yes" 1>&6
6500   have_k425=yes
6501                                 KRB4_LIBS="-lkrb4"
6502 else
6503   echo "$ac_t""no" 1>&6
6504 have_k425=no
6505 fi
6506
6507
6508                 else
6509                         have_425=no
6510                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6511                 fi
6512
6513                 if test $have_k425 = yes ; then
6514                         ol_with_kerberos=found
6515                         ol_link_krb4=yes
6516
6517                         cat >> confdefs.h <<\EOF
6518 #define HAVE_KRB425 1
6519 EOF
6520
6521                         cat >> confdefs.h <<\EOF
6522 #define HAVE_KRB4 1
6523 EOF
6524
6525
6526                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6527 echo "configure:6528: checking for des_debug in Kerberos libraries" >&5
6528 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6529   echo $ac_n "(cached) $ac_c" 1>&6
6530 else
6531   
6532                                                                 save_LIBS="$LIBS"
6533                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6534                                 cat > conftest.$ac_ext <<EOF
6535 #line 6536 "configure"
6536 #include "confdefs.h"
6537
6538 #include <kerberosIV/krb.h>
6539 #include <kerberosIV/des.h>
6540 extern int des_debug;
6541
6542 int main() {
6543
6544 des_debug = 1;
6545
6546 ; return 0; }
6547 EOF
6548 if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6549   rm -rf conftest*
6550   ol_cv_var_des_debug=yes
6551 else
6552   echo "configure: failed program was:" >&5
6553   cat conftest.$ac_ext >&5
6554   rm -rf conftest*
6555   ol_cv_var_des_debug=no
6556 fi
6557 rm -f conftest*
6558                                                                 LIBS="$save_LIBS"
6559                         
6560 fi
6561
6562 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6563
6564                         if test $ol_cv_var_des_debug = yes ; then
6565                                 cat >> confdefs.h <<\EOF
6566 #define HAVE_DES_DEBUG 1
6567 EOF
6568
6569                         fi
6570
6571                         LIBS="$save_LIBS"
6572                 fi
6573         fi
6574 fi
6575
6576 if test $ol_link_krb5 = yes ; then
6577         ol_with_kerberos=found
6578 fi
6579
6580 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6581         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6582
6583         for ac_hdr in krb.h des.h krb-archaeology.h 
6584 do
6585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6587 echo "configure:6588: checking for $ac_hdr" >&5
6588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6589   echo $ac_n "(cached) $ac_c" 1>&6
6590 else
6591   cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594 #include <$ac_hdr>
6595 EOF
6596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6597 { (eval echo configure:6598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6599 if test -z "$ac_err"; then
6600   rm -rf conftest*
6601   eval "ac_cv_header_$ac_safe=yes"
6602 else
6603   echo "$ac_err" >&5
6604   echo "configure: failed program was:" >&5
6605   cat conftest.$ac_ext >&5
6606   rm -rf conftest*
6607   eval "ac_cv_header_$ac_safe=no"
6608 fi
6609 rm -f conftest*
6610 fi
6611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6612   echo "$ac_t""yes" 1>&6
6613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6614   cat >> confdefs.h <<EOF
6615 #define $ac_tr_hdr 1
6616 EOF
6617  
6618 else
6619   echo "$ac_t""no" 1>&6
6620 fi
6621 done
6622
6623
6624         if test $ac_cv_header_krb_h = yes ; then
6625                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6626 echo "configure:6627: checking for main in -lkrb" >&5
6627 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6629   echo $ac_n "(cached) $ac_c" 1>&6
6630 else
6631   ac_save_LIBS="$LIBS"
6632 LIBS="-lkrb -ldes $LIBS"
6633 cat > conftest.$ac_ext <<EOF
6634 #line 6635 "configure"
6635 #include "confdefs.h"
6636
6637 int main() {
6638 main()
6639 ; return 0; }
6640 EOF
6641 if { (eval echo configure:6642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6642   rm -rf conftest*
6643   eval "ac_cv_lib_$ac_lib_var=yes"
6644 else
6645   echo "configure: failed program was:" >&5
6646   cat conftest.$ac_ext >&5
6647   rm -rf conftest*
6648   eval "ac_cv_lib_$ac_lib_var=no"
6649 fi
6650 rm -f conftest*
6651 LIBS="$ac_save_LIBS"
6652
6653 fi
6654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6655   echo "$ac_t""yes" 1>&6
6656   have_k4=yes
6657 else
6658   echo "$ac_t""no" 1>&6
6659 have_k4=no
6660 fi
6661
6662
6663                 if test $have_k4 = yes ; then
6664                         ol_with_kerberos=found
6665                         ol_link_krb4=yes
6666
6667                         cat >> confdefs.h <<\EOF
6668 #define HAVE_KRB4 1
6669 EOF
6670
6671
6672                         KRB4_LIBS="-lkrb -ldes"
6673
6674                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6675                                 cat >> confdefs.h <<\EOF
6676 #define HAVE_KTH_KERBEROS 1
6677 EOF
6678
6679                         fi
6680                 fi
6681         fi
6682 fi
6683
6684 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6685         ol_link_kpasswd=yes
6686 fi
6687
6688 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6689         ol_link_kbind=yes
6690
6691 elif test $ol_enable_kbind = yes ; then
6692         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6693 fi
6694
6695 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6696         cat >> confdefs.h <<\EOF
6697 #define HAVE_KERBEROS 1
6698 EOF
6699
6700
6701 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6702         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6703 fi
6704
6705 ol_link_tls=no
6706 if test $ol_with_tls != no ; then
6707         for ac_hdr in openssl/ssl.h ssl.h
6708 do
6709 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6710 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6711 echo "configure:6712: checking for $ac_hdr" >&5
6712 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6713   echo $ac_n "(cached) $ac_c" 1>&6
6714 else
6715   cat > conftest.$ac_ext <<EOF
6716 #line 6717 "configure"
6717 #include "confdefs.h"
6718 #include <$ac_hdr>
6719 EOF
6720 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6721 { (eval echo configure:6722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6722 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6723 if test -z "$ac_err"; then
6724   rm -rf conftest*
6725   eval "ac_cv_header_$ac_safe=yes"
6726 else
6727   echo "$ac_err" >&5
6728   echo "configure: failed program was:" >&5
6729   cat conftest.$ac_ext >&5
6730   rm -rf conftest*
6731   eval "ac_cv_header_$ac_safe=no"
6732 fi
6733 rm -f conftest*
6734 fi
6735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6736   echo "$ac_t""yes" 1>&6
6737     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6738   cat >> confdefs.h <<EOF
6739 #define $ac_tr_hdr 1
6740 EOF
6741  
6742 else
6743   echo "$ac_t""no" 1>&6
6744 fi
6745 done
6746
6747         
6748         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6749                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6750 echo "configure:6751: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6751 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6752 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6753   echo $ac_n "(cached) $ac_c" 1>&6
6754 else
6755   ac_save_LIBS="$LIBS"
6756 LIBS="-lssl -lcrypto $LIBS"
6757 cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 /* Override any gcc2 internal prototype to avoid an error.  */
6761 /* We use char because int might match the return type of a gcc2
6762     builtin and then its argument prototype would still apply.  */
6763 char SSLeay_add_ssl_algorithms();
6764
6765 int main() {
6766 SSLeay_add_ssl_algorithms()
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770   rm -rf conftest*
6771   eval "ac_cv_lib_$ac_lib_var=yes"
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=no"
6777 fi
6778 rm -f conftest*
6779 LIBS="$ac_save_LIBS"
6780
6781 fi
6782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6783   echo "$ac_t""yes" 1>&6
6784   have_ssleay=yes
6785                         need_rsaref=no
6786 else
6787   echo "$ac_t""no" 1>&6
6788 have_ssleay=no
6789 fi
6790
6791                         
6792                 if test $have_ssleay = no ; then
6793                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6794 echo "configure:6795: checking for SSL_library_init in -lssl" >&5
6795 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6797   echo $ac_n "(cached) $ac_c" 1>&6
6798 else
6799   ac_save_LIBS="$LIBS"
6800 LIBS="-lssl -lcrypto $LIBS"
6801 cat > conftest.$ac_ext <<EOF
6802 #line 6803 "configure"
6803 #include "confdefs.h"
6804 /* Override any gcc2 internal prototype to avoid an error.  */
6805 /* We use char because int might match the return type of a gcc2
6806     builtin and then its argument prototype would still apply.  */
6807 char SSL_library_init();
6808
6809 int main() {
6810 SSL_library_init()
6811 ; return 0; }
6812 EOF
6813 if { (eval echo configure:6814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6814   rm -rf conftest*
6815   eval "ac_cv_lib_$ac_lib_var=yes"
6816 else
6817   echo "configure: failed program was:" >&5
6818   cat conftest.$ac_ext >&5
6819   rm -rf conftest*
6820   eval "ac_cv_lib_$ac_lib_var=no"
6821 fi
6822 rm -f conftest*
6823 LIBS="$ac_save_LIBS"
6824
6825 fi
6826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6827   echo "$ac_t""yes" 1>&6
6828   have_ssleay=yes
6829                                 need_rsaref=no
6830 else
6831   echo "$ac_t""no" 1>&6
6832 have_ssleay=no
6833 fi
6834
6835                 fi
6836
6837                 if test $have_ssleay = no ; then
6838                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6839 echo "configure:6840: checking for ssl3_accept in -lssl" >&5
6840 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6841 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6842   echo $ac_n "(cached) $ac_c" 1>&6
6843 else
6844   ac_save_LIBS="$LIBS"
6845 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6846 cat > conftest.$ac_ext <<EOF
6847 #line 6848 "configure"
6848 #include "confdefs.h"
6849 /* Override any gcc2 internal prototype to avoid an error.  */
6850 /* We use char because int might match the return type of a gcc2
6851     builtin and then its argument prototype would still apply.  */
6852 char ssl3_accept();
6853
6854 int main() {
6855 ssl3_accept()
6856 ; return 0; }
6857 EOF
6858 if { (eval echo configure:6859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6859   rm -rf conftest*
6860   eval "ac_cv_lib_$ac_lib_var=yes"
6861 else
6862   echo "configure: failed program was:" >&5
6863   cat conftest.$ac_ext >&5
6864   rm -rf conftest*
6865   eval "ac_cv_lib_$ac_lib_var=no"
6866 fi
6867 rm -f conftest*
6868 LIBS="$ac_save_LIBS"
6869
6870 fi
6871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6872   echo "$ac_t""yes" 1>&6
6873   have_ssleay=yes
6874                                 need_rsaref=yes
6875 else
6876   echo "$ac_t""no" 1>&6
6877 have_ssleay=no
6878 fi
6879
6880                 fi
6881
6882                 if test $have_ssleay = yes ; then
6883                         ol_with_tls=found
6884                         ol_link_tls=yes
6885
6886                         cat >> confdefs.h <<\EOF
6887 #define HAVE_SSLEAY 1
6888 EOF
6889
6890
6891                         if test $need_rsaref = yes; then
6892                                 cat >> confdefs.h <<\EOF
6893 #define HAVE_RSAREF 1
6894 EOF
6895
6896
6897                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6898                         else
6899                                 TLS_LIBS="-lssl -lcrypto"
6900                         fi
6901                 fi
6902         fi
6903
6904 else
6905         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6906 fi
6907
6908 if test $ol_link_tls = yes ; then
6909         cat >> confdefs.h <<\EOF
6910 #define HAVE_TLS 1
6911 EOF
6912
6913
6914 elif test $ol_with_tls = auto ; then
6915         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6916         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6917
6918 elif test $ol_with_tls != no ; then
6919         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6920 fi
6921
6922 if test $ol_enable_lmpasswd != no; then
6923         if test $ol_link_tls != yes ; then
6924                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
6925         fi
6926
6927         cat >> confdefs.h <<\EOF
6928 #define SLAPD_LMHASH 1
6929 EOF
6930
6931 fi
6932
6933 for ac_func in \
6934         ctime_r                 \
6935         gethostbyname_r gethostbyaddr_r \
6936
6937 do
6938 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6939 echo "configure:6940: checking for $ac_func" >&5
6940 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6941   echo $ac_n "(cached) $ac_c" 1>&6
6942 else
6943   cat > conftest.$ac_ext <<EOF
6944 #line 6945 "configure"
6945 #include "confdefs.h"
6946 /* System header to define __stub macros and hopefully few prototypes,
6947     which can conflict with char $ac_func(); below.  */
6948 #include <assert.h>
6949 /* Override any gcc2 internal prototype to avoid an error.  */
6950 /* We use char because int might match the return type of a gcc2
6951     builtin and then its argument prototype would still apply.  */
6952 char $ac_func();
6953 char (*f)();
6954
6955 int main() {
6956
6957 /* The GNU C library defines this for functions which it implements
6958     to always fail with ENOSYS.  Some functions are actually named
6959     something starting with __ and the normal name is an alias.  */
6960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6961 choke me
6962 #else
6963 f = $ac_func;
6964 #endif
6965
6966 ; return 0; }
6967 EOF
6968 if { (eval echo configure:6969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6969   rm -rf conftest*
6970   eval "ac_cv_func_$ac_func=yes"
6971 else
6972   echo "configure: failed program was:" >&5
6973   cat conftest.$ac_ext >&5
6974   rm -rf conftest*
6975   eval "ac_cv_func_$ac_func=no"
6976 fi
6977 rm -f conftest*
6978 fi
6979
6980 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6981   echo "$ac_t""yes" 1>&6
6982     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6983   cat >> confdefs.h <<EOF
6984 #define $ac_tr_func 1
6985 EOF
6986  
6987 else
6988   echo "$ac_t""no" 1>&6
6989 fi
6990 done
6991
6992
6993 if test "$ac_cv_func_ctime_r" = no ; then
6994         ol_cv_func_ctime_r_nargs=0
6995 else
6996         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6997 echo "configure:6998: checking number of arguments of ctime_r" >&5
6998 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6999   echo $ac_n "(cached) $ac_c" 1>&6
7000 else
7001   cat > conftest.$ac_ext <<EOF
7002 #line 7003 "configure"
7003 #include "confdefs.h"
7004 #include <time.h>
7005 int main() {
7006 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
7007 ; return 0; }
7008 EOF
7009 if { (eval echo configure:7010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7010   rm -rf conftest*
7011   ol_cv_func_ctime_r_nargs3=yes
7012 else
7013   echo "configure: failed program was:" >&5
7014   cat conftest.$ac_ext >&5
7015   rm -rf conftest*
7016   ol_cv_func_ctime_r_nargs3=no
7017 fi
7018 rm -f conftest*
7019
7020         cat > conftest.$ac_ext <<EOF
7021 #line 7022 "configure"
7022 #include "confdefs.h"
7023 #include <time.h>
7024 int main() {
7025 time_t ti; char *buffer; ctime_r(&ti,buffer);
7026 ; return 0; }
7027 EOF
7028 if { (eval echo configure:7029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7029   rm -rf conftest*
7030   ol_cv_func_ctime_r_nargs2=yes
7031 else
7032   echo "configure: failed program was:" >&5
7033   cat conftest.$ac_ext >&5
7034   rm -rf conftest*
7035   ol_cv_func_ctime_r_nargs2=no
7036 fi
7037 rm -f conftest*
7038
7039         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
7040                 $ol_cv_func_ctime_r_nargs2 = no ; then
7041
7042                 ol_cv_func_ctime_r_nargs=3
7043
7044         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
7045                 $ol_cv_func_ctime_r_nargs2 = yes ; then
7046
7047                 ol_cv_func_ctime_r_nargs=2
7048
7049         else
7050                 ol_cv_func_ctime_r_nargs=0
7051         fi
7052   
7053 fi
7054
7055 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
7056
7057   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
7058         cat >> confdefs.h <<EOF
7059 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
7060 EOF
7061
7062   fi
7063
7064 fi
7065
7066 if test "$ac_cv_func_gethostbyname_r" = yes ; then
7067         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
7068 echo "configure:7069: checking number of arguments of gethostbyname_r" >&5
7069 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
7070   echo $ac_n "(cached) $ac_c" 1>&6
7071 else
7072   cat > conftest.$ac_ext <<EOF
7073 #line 7074 "configure"
7074 #include "confdefs.h"
7075 #include <sys/types.h>
7076 #include <sys/socket.h>
7077 #include <netinet/in.h>
7078 #include <netdb.h>
7079 #define BUFSIZE (sizeof(struct hostent)+10)
7080 int main() {
7081 struct hostent hent; char buffer[BUFSIZE];
7082                 int bufsize=BUFSIZE;int h_errno;
7083                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
7084                         buffer, bufsize, &h_errno);
7085 ; return 0; }
7086 EOF
7087 if { (eval echo configure:7088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7088   rm -rf conftest*
7089   ol_cv_func_gethostbyname_r_nargs5=yes
7090 else
7091   echo "configure: failed program was:" >&5
7092   cat conftest.$ac_ext >&5
7093   rm -rf conftest*
7094   ol_cv_func_gethostbyname_r_nargs5=no
7095 fi
7096 rm -f conftest*
7097
7098         cat > conftest.$ac_ext <<EOF
7099 #line 7100 "configure"
7100 #include "confdefs.h"
7101 #include <sys/types.h>
7102 #include <sys/socket.h>
7103 #include <netinet/in.h>
7104 #include <netdb.h>
7105 #define BUFSIZE (sizeof(struct hostent)+10)
7106 int main() {
7107 struct hostent hent;struct hostent *rhent;
7108                 char buffer[BUFSIZE];
7109                 int bufsize=BUFSIZE;int h_errno;
7110                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
7111                         &rhent, &h_errno);
7112 ; return 0; }
7113 EOF
7114 if { (eval echo configure:7115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7115   rm -rf conftest*
7116   ol_cv_func_gethostbyname_r_nargs6=yes
7117 else
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -rf conftest*
7121   ol_cv_func_gethostbyname_r_nargs6=no
7122 fi
7123 rm -f conftest*
7124
7125         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
7126                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
7127
7128                 ol_cv_func_gethostbyname_r_nargs=5
7129
7130         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7131                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7132
7133                 ol_cv_func_gethostbyname_r_nargs=6
7134
7135         else
7136                 ol_cv_func_gethostbyname_r_nargs=0
7137         fi
7138   
7139 fi
7140
7141 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7142   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7143         cat >> confdefs.h <<EOF
7144 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7145 EOF
7146
7147   fi
7148
7149 else
7150         ol_cv_func_gethostbyname_r_nargs=0
7151 fi
7152  
7153 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7154         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7155 echo "configure:7156: checking number of arguments of gethostbyaddr_r" >&5
7156 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7157   echo $ac_n "(cached) $ac_c" 1>&6
7158 else
7159   cat > conftest.$ac_ext <<EOF
7160 #line 7161 "configure"
7161 #include "confdefs.h"
7162 #include <sys/types.h>
7163 #include <sys/socket.h>
7164 #include <netinet/in.h>
7165 #include <netdb.h>
7166 #define BUFSIZE (sizeof(struct hostent)+10)
7167 int main() {
7168 struct hostent hent; char buffer[BUFSIZE]; 
7169             struct in_addr add;
7170             size_t alen=sizeof(struct in_addr);
7171             int bufsize=BUFSIZE;int h_errno;
7172                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7173                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7174 ; return 0; }
7175 EOF
7176 if { (eval echo configure:7177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7177   rm -rf conftest*
7178   ol_cv_func_gethostbyaddr_r_nargs7=yes
7179 else
7180   echo "configure: failed program was:" >&5
7181   cat conftest.$ac_ext >&5
7182   rm -rf conftest*
7183   ol_cv_func_gethostbyaddr_r_nargs7=no
7184 fi
7185 rm -f conftest*
7186
7187         cat > conftest.$ac_ext <<EOF
7188 #line 7189 "configure"
7189 #include "confdefs.h"
7190 #include <sys/types.h>
7191 #include <sys/socket.h>
7192 #include <netinet/in.h>
7193 #include <netdb.h>
7194 #define BUFSIZE (sizeof(struct hostent)+10)
7195 int main() {
7196 struct hostent hent;
7197                 struct hostent *rhent; char buffer[BUFSIZE]; 
7198                 struct in_addr add;
7199                 size_t alen=sizeof(struct in_addr);
7200                 int bufsize=BUFSIZE;int h_errno;
7201                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7202                         alen, AF_INET, &hent, buffer, bufsize, 
7203                         &rhent, &h_errno);
7204 ; return 0; }
7205 EOF
7206 if { (eval echo configure:7207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7207   rm -rf conftest*
7208   ol_cv_func_gethostbyaddr_r_nargs8=yes
7209 else
7210   echo "configure: failed program was:" >&5
7211   cat conftest.$ac_ext >&5
7212   rm -rf conftest*
7213   ol_cv_func_gethostbyaddr_r_nargs8=no
7214 fi
7215 rm -f conftest*
7216
7217         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7218                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7219
7220                 ol_cv_func_gethostbyaddr_r_nargs=7
7221
7222         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7223                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7224
7225                 ol_cv_func_gethostbyaddr_r_nargs=8
7226
7227         else
7228                 ol_cv_func_gethostbyaddr_r_nargs=0
7229         fi
7230   
7231 fi
7232
7233 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7234   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7235     cat >> confdefs.h <<EOF
7236 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7237 EOF
7238
7239   fi
7240
7241 else
7242         ol_cv_func_gethostbyaddr_r_nargs=0
7243 fi
7244
7245 if test "$ac_cv_func_ctime_r" = yes \
7246         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7247         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7248         -a "$ac_cv_func_gethostbyname_r" = yes \
7249         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7250         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7251         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7252         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7253         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7254         ; then
7255  
7256         cat >> confdefs.h <<\EOF
7257 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7258 EOF
7259
7260 fi
7261
7262 ol_link_threads=no
7263
7264 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7265         -o $ol_with_threads = nt ; then
7266
7267         
7268         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7269 echo "configure:7270: checking for _beginthread" >&5
7270 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7271   echo $ac_n "(cached) $ac_c" 1>&6
7272 else
7273   cat > conftest.$ac_ext <<EOF
7274 #line 7275 "configure"
7275 #include "confdefs.h"
7276 /* System header to define __stub macros and hopefully few prototypes,
7277     which can conflict with char _beginthread(); below.  */
7278 #include <assert.h>
7279 /* Override any gcc2 internal prototype to avoid an error.  */
7280 /* We use char because int might match the return type of a gcc2
7281     builtin and then its argument prototype would still apply.  */
7282 char _beginthread();
7283 char (*f)();
7284
7285 int main() {
7286
7287 /* The GNU C library defines this for functions which it implements
7288     to always fail with ENOSYS.  Some functions are actually named
7289     something starting with __ and the normal name is an alias.  */
7290 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7291 choke me
7292 #else
7293 f = _beginthread;
7294 #endif
7295
7296 ; return 0; }
7297 EOF
7298 if { (eval echo configure:7299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7299   rm -rf conftest*
7300   eval "ac_cv_func__beginthread=yes"
7301 else
7302   echo "configure: failed program was:" >&5
7303   cat conftest.$ac_ext >&5
7304   rm -rf conftest*
7305   eval "ac_cv_func__beginthread=no"
7306 fi
7307 rm -f conftest*
7308 fi
7309
7310 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7311   echo "$ac_t""yes" 1>&6
7312   :
7313 else
7314   echo "$ac_t""no" 1>&6
7315 fi
7316
7317
7318         if test $ac_cv_func__beginthread = yes ; then
7319                 cat >> confdefs.h <<\EOF
7320 #define HAVE_NT_THREADS 1
7321 EOF
7322
7323         fi
7324
7325
7326         if test "$ol_cv_nt_threads" = yes ; then
7327         ol_link_threads=nt
7328         ol_with_threads=found
7329         ol_with_yielding_select=yes
7330
7331                 cat >> confdefs.h <<\EOF
7332 #define HAVE_NT_SERVICE_MANAGER 1
7333 EOF
7334
7335                 cat >> confdefs.h <<\EOF
7336 #define HAVE_NT_EVENT_LOG 1
7337 EOF
7338
7339         fi
7340
7341         if test $ol_with_threads = nt ; then
7342                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7343         fi
7344 fi
7345
7346 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7347         -o $ol_with_threads = posix ; then
7348
7349         for ac_hdr in pthread.h
7350 do
7351 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7352 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7353 echo "configure:7354: checking for $ac_hdr" >&5
7354 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7355   echo $ac_n "(cached) $ac_c" 1>&6
7356 else
7357   cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 #include <$ac_hdr>
7361 EOF
7362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7363 { (eval echo configure:7364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7365 if test -z "$ac_err"; then
7366   rm -rf conftest*
7367   eval "ac_cv_header_$ac_safe=yes"
7368 else
7369   echo "$ac_err" >&5
7370   echo "configure: failed program was:" >&5
7371   cat conftest.$ac_ext >&5
7372   rm -rf conftest*
7373   eval "ac_cv_header_$ac_safe=no"
7374 fi
7375 rm -f conftest*
7376 fi
7377 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7378   echo "$ac_t""yes" 1>&6
7379     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7380   cat >> confdefs.h <<EOF
7381 #define $ac_tr_hdr 1
7382 EOF
7383  
7384 else
7385   echo "$ac_t""no" 1>&6
7386 fi
7387 done
7388
7389
7390         if test $ac_cv_header_pthread_h = yes ; then
7391                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7392 echo "configure:7393: checking POSIX thread version" >&5
7393 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   
7397         cat > conftest.$ac_ext <<EOF
7398 #line 7399 "configure"
7399 #include "confdefs.h"
7400
7401 #               include <pthread.h>
7402                 /* this check could be improved */
7403 #               ifdef PTHREAD_ONCE_INIT
7404                         pthread_version_final;
7405 #               endif
7406         
7407 EOF
7408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7409   egrep "pthread_version_final" >/dev/null 2>&1; then
7410   rm -rf conftest*
7411   ol_pthread_final=yes
7412 else
7413   rm -rf conftest*
7414   ol_pthread_final=no
7415 fi
7416 rm -f conftest*
7417
7418
7419         cat > conftest.$ac_ext <<EOF
7420 #line 7421 "configure"
7421 #include "confdefs.h"
7422
7423 #               include <pthread.h>
7424                 /* this check could be improved */
7425 #               ifdef pthread_once_init
7426                         pthread_version_draft4;
7427 #               endif
7428         
7429 EOF
7430 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7431   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7432   rm -rf conftest*
7433   ol_pthread_draft4=yes
7434 else
7435   rm -rf conftest*
7436   ol_pthread_draft4=no
7437 fi
7438 rm -f conftest*
7439
7440
7441         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7442                 ol_cv_pthread_version=final
7443         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7444                 ol_cv_pthread_version=draft4
7445         else
7446                 ol_cv_pthread_version=unknown
7447         fi
7448
7449 fi
7450
7451 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7452
7453
7454                 if test $ol_cv_pthread_version = final ; then
7455                         cat >> confdefs.h <<\EOF
7456 #define HAVE_PTHREADS_FINAL 1
7457 EOF
7458
7459                 elif test $ol_cv_pthread_version = draft4 ; then
7460                         cat >> confdefs.h <<\EOF
7461 #define HAVE_PTHREADS_D4 1
7462 EOF
7463
7464                 else
7465                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7466                 fi
7467
7468                 # consider threads found
7469                 ol_with_threads=found
7470
7471                 
7472         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7473 echo "configure:7474: checking for LinuxThreads pthread.h" >&5
7474 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7475   echo $ac_n "(cached) $ac_c" 1>&6
7476 else
7477   cat > conftest.$ac_ext <<EOF
7478 #line 7479 "configure"
7479 #include "confdefs.h"
7480 #include <pthread.h>
7481 EOF
7482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7483   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7484   rm -rf conftest*
7485   ol_cv_header_linux_threads=yes
7486 else
7487   rm -rf conftest*
7488   ol_cv_header_linux_threads=no
7489 fi
7490 rm -f conftest*
7491
7492                 
7493 fi
7494
7495 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7496         if test $ol_cv_header_linux_threads = yes; then
7497                 cat >> confdefs.h <<\EOF
7498 #define HAVE_LINUX_THREADS 1
7499 EOF
7500
7501         fi
7502
7503                 
7504         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7505 echo "configure:7506: checking for GNU Pth pthread.h" >&5
7506 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7507   echo $ac_n "(cached) $ac_c" 1>&6
7508 else
7509   cat > conftest.$ac_ext <<EOF
7510 #line 7511 "configure"
7511 #include "confdefs.h"
7512 #include <pthread.h>
7513 #ifdef _POSIX_THREAD_IS_GNU_PTH
7514         __gnu_pth__;
7515 #endif
7516
7517 EOF
7518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7519   egrep "__gnu_pth__" >/dev/null 2>&1; then
7520   rm -rf conftest*
7521   ol_cv_header_gnu_pth_pthread_h=yes
7522 else
7523   rm -rf conftest*
7524   ol_cv_header_gnu_pth_pthread_h=no
7525 fi
7526 rm -f conftest*
7527
7528                 
7529 fi
7530
7531 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7532
7533
7534                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7535                         for ac_hdr in sched.h
7536 do
7537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7539 echo "configure:7540: checking for $ac_hdr" >&5
7540 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7541   echo $ac_n "(cached) $ac_c" 1>&6
7542 else
7543   cat > conftest.$ac_ext <<EOF
7544 #line 7545 "configure"
7545 #include "confdefs.h"
7546 #include <$ac_hdr>
7547 EOF
7548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7549 { (eval echo configure:7550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7551 if test -z "$ac_err"; then
7552   rm -rf conftest*
7553   eval "ac_cv_header_$ac_safe=yes"
7554 else
7555   echo "$ac_err" >&5
7556   echo "configure: failed program was:" >&5
7557   cat conftest.$ac_ext >&5
7558   rm -rf conftest*
7559   eval "ac_cv_header_$ac_safe=no"
7560 fi
7561 rm -f conftest*
7562 fi
7563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7564   echo "$ac_t""yes" 1>&6
7565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7566   cat >> confdefs.h <<EOF
7567 #define $ac_tr_hdr 1
7568 EOF
7569  
7570 else
7571   echo "$ac_t""no" 1>&6
7572 fi
7573 done
7574
7575                 fi
7576
7577                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7578                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7579 echo "configure:7580: checking for pthread_create in default libraries" >&5
7580 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7581   echo $ac_n "(cached) $ac_c" 1>&6
7582 else
7583   
7584                 if test "$cross_compiling" = yes; then
7585   cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 /* pthread test headers */
7589 #include <pthread.h>
7590 #ifndef NULL
7591 #define NULL (void*)0
7592 #endif
7593
7594 static void *task(p)
7595         void *p;
7596 {
7597         return (void *) (p == NULL);
7598 }
7599
7600 int main() {
7601
7602         /* pthread test function */
7603         pthread_t t;
7604         int status;
7605         int detach = 1;
7606
7607 #ifdef HAVE_PTHREADS_FINAL
7608         /* Final pthreads */
7609         pthread_attr_t attr;
7610
7611         status = pthread_attr_init(&attr);
7612         if( status ) return status;
7613
7614 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7615         if( !detach ) {
7616 #if defined( PTHREAD_CREATE_JOINABLE )
7617                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7618 #else
7619                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7620 #endif
7621
7622 #ifdef PTHREAD_CREATE_DETACHED
7623         } else {
7624                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7625 #endif
7626         }
7627         if( status ) return status;
7628 #endif
7629
7630         status = pthread_create( &t, &attr, task, NULL );
7631         if( status ) return status;
7632
7633 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7634         if( detach ) {
7635                 /* give thread a chance to complete */
7636                 /* it should remain joinable and hence detachable */
7637                 sleep( 1 );
7638
7639                 status = pthread_detach( t );
7640                 if( status ) return status;
7641         }
7642 #endif
7643
7644 #else
7645         /* Draft 4 pthreads */
7646         status = pthread_create( &t, pthread_attr_default, task, NULL );
7647         if( status ) return status;
7648
7649         if( detach ) {
7650                 /* give thread a chance to complete */
7651                 /* it should remain joinable and hence detachable */
7652                 sleep( 1 );
7653
7654                 status = pthread_detach( &t );
7655                 if( status ) return status;
7656         }
7657 #endif
7658
7659 #ifdef HAVE_LINUX_THREADS
7660         pthread_kill_other_threads_np();
7661 #endif
7662
7663         return 0;
7664
7665 ; return 0; }
7666 EOF
7667 if { (eval echo configure:7668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7668   rm -rf conftest*
7669   ol_cv_pthread_create=yes
7670 else
7671   echo "configure: failed program was:" >&5
7672   cat conftest.$ac_ext >&5
7673   rm -rf conftest*
7674   ol_cv_pthread_create=no
7675 fi
7676 rm -f conftest*
7677 else
7678   cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681 /* pthread test headers */
7682 #include <pthread.h>
7683 #ifndef NULL
7684 #define NULL (void*)0
7685 #endif
7686
7687 static void *task(p)
7688         void *p;
7689 {
7690         return (void *) (p == NULL);
7691 }
7692
7693
7694 int main(argc, argv)
7695         int argc;
7696         char **argv;
7697 {
7698
7699         /* pthread test function */
7700         pthread_t t;
7701         int status;
7702         int detach = 1;
7703
7704 #ifdef HAVE_PTHREADS_FINAL
7705         /* Final pthreads */
7706         pthread_attr_t attr;
7707
7708         status = pthread_attr_init(&attr);
7709         if( status ) return status;
7710
7711 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7712         if( !detach ) {
7713 #if defined( PTHREAD_CREATE_JOINABLE )
7714                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7715 #else
7716                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7717 #endif
7718
7719 #ifdef PTHREAD_CREATE_DETACHED
7720         } else {
7721                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7722 #endif
7723         }
7724         if( status ) return status;
7725 #endif
7726
7727         status = pthread_create( &t, &attr, task, NULL );
7728         if( status ) return status;
7729
7730 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7731         if( detach ) {
7732                 /* give thread a chance to complete */
7733                 /* it should remain joinable and hence detachable */
7734                 sleep( 1 );
7735
7736                 status = pthread_detach( t );
7737                 if( status ) return status;
7738         }
7739 #endif
7740
7741 #else
7742         /* Draft 4 pthreads */
7743         status = pthread_create( &t, pthread_attr_default, task, NULL );
7744         if( status ) return status;
7745
7746         if( detach ) {
7747                 /* give thread a chance to complete */
7748                 /* it should remain joinable and hence detachable */
7749                 sleep( 1 );
7750
7751                 status = pthread_detach( &t );
7752                 if( status ) return status;
7753         }
7754 #endif
7755
7756 #ifdef HAVE_LINUX_THREADS
7757         pthread_kill_other_threads_np();
7758 #endif
7759
7760         return 0;
7761
7762 }
7763
7764 EOF
7765 if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7766 then
7767   ol_cv_pthread_create=yes
7768 else
7769   echo "configure: failed program was:" >&5
7770   cat conftest.$ac_ext >&5
7771   rm -fr conftest*
7772   ol_cv_pthread_create=no
7773 fi
7774 rm -fr conftest*
7775 fi
7776
7777 fi
7778
7779 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7780
7781                 if test $ol_cv_pthread_create != no ; then
7782                         ol_link_threads=posix
7783                         ol_link_pthreads=""
7784                 fi
7785                 
7786                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7787 if test "$ol_link_threads" = no ; then
7788         # try -kthread
7789         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7790 echo "configure:7791: checking for pthread link with -kthread" >&5
7791 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7792   echo $ac_n "(cached) $ac_c" 1>&6
7793 else
7794   
7795                 # save the flags
7796                 ol_LIBS="$LIBS"
7797                 LIBS="-kthread $LIBS"
7798
7799                 if test "$cross_compiling" = yes; then
7800   cat > conftest.$ac_ext <<EOF
7801 #line 7802 "configure"
7802 #include "confdefs.h"
7803 /* pthread test headers */
7804 #include <pthread.h>
7805 #ifndef NULL
7806 #define NULL (void*)0
7807 #endif
7808
7809 static void *task(p)
7810         void *p;
7811 {
7812         return (void *) (p == NULL);
7813 }
7814
7815 int main() {
7816
7817         /* pthread test function */
7818         pthread_t t;
7819         int status;
7820         int detach = 1;
7821
7822 #ifdef HAVE_PTHREADS_FINAL
7823         /* Final pthreads */
7824         pthread_attr_t attr;
7825
7826         status = pthread_attr_init(&attr);
7827         if( status ) return status;
7828
7829 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7830         if( !detach ) {
7831 #if defined( PTHREAD_CREATE_JOINABLE )
7832                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7833 #else
7834                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7835 #endif
7836
7837 #ifdef PTHREAD_CREATE_DETACHED
7838         } else {
7839                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7840 #endif
7841         }
7842         if( status ) return status;
7843 #endif
7844
7845         status = pthread_create( &t, &attr, task, NULL );
7846         if( status ) return status;
7847
7848 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7849         if( detach ) {
7850                 /* give thread a chance to complete */
7851                 /* it should remain joinable and hence detachable */
7852                 sleep( 1 );
7853
7854                 status = pthread_detach( t );
7855                 if( status ) return status;
7856         }
7857 #endif
7858
7859 #else
7860         /* Draft 4 pthreads */
7861         status = pthread_create( &t, pthread_attr_default, task, NULL );
7862         if( status ) return status;
7863
7864         if( detach ) {
7865                 /* give thread a chance to complete */
7866                 /* it should remain joinable and hence detachable */
7867                 sleep( 1 );
7868
7869                 status = pthread_detach( &t );
7870                 if( status ) return status;
7871         }
7872 #endif
7873
7874 #ifdef HAVE_LINUX_THREADS
7875         pthread_kill_other_threads_np();
7876 #endif
7877
7878         return 0;
7879
7880 ; return 0; }
7881 EOF
7882 if { (eval echo configure:7883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7883   rm -rf conftest*
7884   ol_cv_pthread_kthread=yes
7885 else
7886   echo "configure: failed program was:" >&5
7887   cat conftest.$ac_ext >&5
7888   rm -rf conftest*
7889   ol_cv_pthread_kthread=no
7890 fi
7891 rm -f conftest*
7892 else
7893   cat > conftest.$ac_ext <<EOF
7894 #line 7895 "configure"
7895 #include "confdefs.h"
7896 /* pthread test headers */
7897 #include <pthread.h>
7898 #ifndef NULL
7899 #define NULL (void*)0
7900 #endif
7901
7902 static void *task(p)
7903         void *p;
7904 {
7905         return (void *) (p == NULL);
7906 }
7907
7908
7909 int main(argc, argv)
7910         int argc;
7911         char **argv;
7912 {
7913
7914         /* pthread test function */
7915         pthread_t t;
7916         int status;
7917         int detach = 1;
7918
7919 #ifdef HAVE_PTHREADS_FINAL
7920         /* Final pthreads */
7921         pthread_attr_t attr;
7922
7923         status = pthread_attr_init(&attr);
7924         if( status ) return status;
7925
7926 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7927         if( !detach ) {
7928 #if defined( PTHREAD_CREATE_JOINABLE )
7929                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7930 #else
7931                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7932 #endif
7933
7934 #ifdef PTHREAD_CREATE_DETACHED
7935         } else {
7936                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7937 #endif
7938         }
7939         if( status ) return status;
7940 #endif
7941
7942         status = pthread_create( &t, &attr, task, NULL );
7943         if( status ) return status;
7944
7945 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7946         if( detach ) {
7947                 /* give thread a chance to complete */
7948                 /* it should remain joinable and hence detachable */
7949                 sleep( 1 );
7950
7951                 status = pthread_detach( t );
7952                 if( status ) return status;
7953         }
7954 #endif
7955
7956 #else
7957         /* Draft 4 pthreads */
7958         status = pthread_create( &t, pthread_attr_default, task, NULL );
7959         if( status ) return status;
7960
7961         if( detach ) {
7962                 /* give thread a chance to complete */
7963                 /* it should remain joinable and hence detachable */
7964                 sleep( 1 );
7965
7966                 status = pthread_detach( &t );
7967                 if( status ) return status;
7968         }
7969 #endif
7970
7971 #ifdef HAVE_LINUX_THREADS
7972         pthread_kill_other_threads_np();
7973 #endif
7974
7975         return 0;
7976
7977 }
7978
7979 EOF
7980 if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7981 then
7982   ol_cv_pthread_kthread=yes
7983 else
7984   echo "configure: failed program was:" >&5
7985   cat conftest.$ac_ext >&5
7986   rm -fr conftest*
7987   ol_cv_pthread_kthread=no
7988 fi
7989 rm -fr conftest*
7990 fi
7991
7992
7993                 # restore the LIBS
7994                 LIBS="$ol_LIBS"
7995         
7996 fi
7997
7998 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7999
8000         if test $ol_cv_pthread_kthread = yes ; then
8001                 ol_link_pthreads="-kthread"
8002                 ol_link_threads=posix
8003         fi
8004 fi
8005
8006                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
8007 if test "$ol_link_threads" = no ; then
8008         # try -pthread
8009         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
8010 echo "configure:8011: checking for pthread link with -pthread" >&5
8011 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
8012   echo $ac_n "(cached) $ac_c" 1>&6
8013 else
8014   
8015                 # save the flags
8016                 ol_LIBS="$LIBS"
8017                 LIBS="-pthread $LIBS"
8018
8019                 if test "$cross_compiling" = yes; then
8020   cat > conftest.$ac_ext <<EOF
8021 #line 8022 "configure"
8022 #include "confdefs.h"
8023 /* pthread test headers */
8024 #include <pthread.h>
8025 #ifndef NULL
8026 #define NULL (void*)0
8027 #endif
8028
8029 static void *task(p)
8030         void *p;
8031 {
8032         return (void *) (p == NULL);
8033 }
8034
8035 int main() {
8036
8037         /* pthread test function */
8038         pthread_t t;
8039         int status;
8040         int detach = 1;
8041
8042 #ifdef HAVE_PTHREADS_FINAL
8043         /* Final pthreads */
8044         pthread_attr_t attr;
8045
8046         status = pthread_attr_init(&attr);
8047         if( status ) return status;
8048
8049 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8050         if( !detach ) {
8051 #if defined( PTHREAD_CREATE_JOINABLE )
8052                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8053 #else
8054                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8055 #endif
8056
8057 #ifdef PTHREAD_CREATE_DETACHED
8058         } else {
8059                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8060 #endif
8061         }
8062         if( status ) return status;
8063 #endif
8064
8065         status = pthread_create( &t, &attr, task, NULL );
8066         if( status ) return status;
8067
8068 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8069         if( detach ) {
8070                 /* give thread a chance to complete */
8071                 /* it should remain joinable and hence detachable */
8072                 sleep( 1 );
8073
8074                 status = pthread_detach( t );
8075                 if( status ) return status;
8076         }
8077 #endif
8078
8079 #else
8080         /* Draft 4 pthreads */
8081         status = pthread_create( &t, pthread_attr_default, task, NULL );
8082         if( status ) return status;
8083
8084         if( detach ) {
8085                 /* give thread a chance to complete */
8086                 /* it should remain joinable and hence detachable */
8087                 sleep( 1 );
8088
8089                 status = pthread_detach( &t );
8090                 if( status ) return status;
8091         }
8092 #endif
8093
8094 #ifdef HAVE_LINUX_THREADS
8095         pthread_kill_other_threads_np();
8096 #endif
8097
8098         return 0;
8099
8100 ; return 0; }
8101 EOF
8102 if { (eval echo configure:8103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8103   rm -rf conftest*
8104   ol_cv_pthread_pthread=yes
8105 else
8106   echo "configure: failed program was:" >&5
8107   cat conftest.$ac_ext >&5
8108   rm -rf conftest*
8109   ol_cv_pthread_pthread=no
8110 fi
8111 rm -f conftest*
8112 else
8113   cat > conftest.$ac_ext <<EOF
8114 #line 8115 "configure"
8115 #include "confdefs.h"
8116 /* pthread test headers */
8117 #include <pthread.h>
8118 #ifndef NULL
8119 #define NULL (void*)0
8120 #endif
8121
8122 static void *task(p)
8123         void *p;
8124 {
8125         return (void *) (p == NULL);
8126 }
8127
8128
8129 int main(argc, argv)
8130         int argc;
8131         char **argv;
8132 {
8133
8134         /* pthread test function */
8135         pthread_t t;
8136         int status;
8137         int detach = 1;
8138
8139 #ifdef HAVE_PTHREADS_FINAL
8140         /* Final pthreads */
8141         pthread_attr_t attr;
8142
8143         status = pthread_attr_init(&attr);
8144         if( status ) return status;
8145
8146 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8147         if( !detach ) {
8148 #if defined( PTHREAD_CREATE_JOINABLE )
8149                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8150 #else
8151                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8152 #endif
8153
8154 #ifdef PTHREAD_CREATE_DETACHED
8155         } else {
8156                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8157 #endif
8158         }
8159         if( status ) return status;
8160 #endif
8161
8162         status = pthread_create( &t, &attr, task, NULL );
8163         if( status ) return status;
8164
8165 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8166         if( detach ) {
8167                 /* give thread a chance to complete */
8168                 /* it should remain joinable and hence detachable */
8169                 sleep( 1 );
8170
8171                 status = pthread_detach( t );
8172                 if( status ) return status;
8173         }
8174 #endif
8175
8176 #else
8177         /* Draft 4 pthreads */
8178         status = pthread_create( &t, pthread_attr_default, task, NULL );
8179         if( status ) return status;
8180
8181         if( detach ) {
8182                 /* give thread a chance to complete */
8183                 /* it should remain joinable and hence detachable */
8184                 sleep( 1 );
8185
8186                 status = pthread_detach( &t );
8187                 if( status ) return status;
8188         }
8189 #endif
8190
8191 #ifdef HAVE_LINUX_THREADS
8192         pthread_kill_other_threads_np();
8193 #endif
8194
8195         return 0;
8196
8197 }
8198
8199 EOF
8200 if { (eval echo configure:8201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8201 then
8202   ol_cv_pthread_pthread=yes
8203 else
8204   echo "configure: failed program was:" >&5
8205   cat conftest.$ac_ext >&5
8206   rm -fr conftest*
8207   ol_cv_pthread_pthread=no
8208 fi
8209 rm -fr conftest*
8210 fi
8211
8212
8213                 # restore the LIBS
8214                 LIBS="$ol_LIBS"
8215         
8216 fi
8217
8218 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
8219
8220         if test $ol_cv_pthread_pthread = yes ; then
8221                 ol_link_pthreads="-pthread"
8222                 ol_link_threads=posix
8223         fi
8224 fi
8225
8226                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
8227 if test "$ol_link_threads" = no ; then
8228         # try -pthreads
8229         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
8230 echo "configure:8231: checking for pthread link with -pthreads" >&5
8231 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
8232   echo $ac_n "(cached) $ac_c" 1>&6
8233 else
8234   
8235                 # save the flags
8236                 ol_LIBS="$LIBS"
8237                 LIBS="-pthreads $LIBS"
8238
8239                 if test "$cross_compiling" = yes; then
8240   cat > conftest.$ac_ext <<EOF
8241 #line 8242 "configure"
8242 #include "confdefs.h"
8243 /* pthread test headers */
8244 #include <pthread.h>
8245 #ifndef NULL
8246 #define NULL (void*)0
8247 #endif
8248
8249 static void *task(p)
8250         void *p;
8251 {
8252         return (void *) (p == NULL);
8253 }
8254
8255 int main() {
8256
8257         /* pthread test function */
8258         pthread_t t;
8259         int status;
8260         int detach = 1;
8261
8262 #ifdef HAVE_PTHREADS_FINAL
8263         /* Final pthreads */
8264         pthread_attr_t attr;
8265
8266         status = pthread_attr_init(&attr);
8267         if( status ) return status;
8268
8269 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8270         if( !detach ) {
8271 #if defined( PTHREAD_CREATE_JOINABLE )
8272                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8273 #else
8274                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8275 #endif
8276
8277 #ifdef PTHREAD_CREATE_DETACHED
8278         } else {
8279                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8280 #endif
8281         }
8282         if( status ) return status;
8283 #endif
8284
8285         status = pthread_create( &t, &attr, task, NULL );
8286         if( status ) return status;
8287
8288 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8289         if( detach ) {
8290                 /* give thread a chance to complete */
8291                 /* it should remain joinable and hence detachable */
8292                 sleep( 1 );
8293
8294                 status = pthread_detach( t );
8295                 if( status ) return status;
8296         }
8297 #endif
8298
8299 #else
8300         /* Draft 4 pthreads */
8301         status = pthread_create( &t, pthread_attr_default, task, NULL );
8302         if( status ) return status;
8303
8304         if( detach ) {
8305                 /* give thread a chance to complete */
8306                 /* it should remain joinable and hence detachable */
8307                 sleep( 1 );
8308
8309                 status = pthread_detach( &t );
8310                 if( status ) return status;
8311         }
8312 #endif
8313
8314 #ifdef HAVE_LINUX_THREADS
8315         pthread_kill_other_threads_np();
8316 #endif
8317
8318         return 0;
8319
8320 ; return 0; }
8321 EOF
8322 if { (eval echo configure:8323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8323   rm -rf conftest*
8324   ol_cv_pthread_pthreads=yes
8325 else
8326   echo "configure: failed program was:" >&5
8327   cat conftest.$ac_ext >&5
8328   rm -rf conftest*
8329   ol_cv_pthread_pthreads=no
8330 fi
8331 rm -f conftest*
8332 else
8333   cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8336 /* pthread test headers */
8337 #include <pthread.h>
8338 #ifndef NULL
8339 #define NULL (void*)0
8340 #endif
8341
8342 static void *task(p)
8343         void *p;
8344 {
8345         return (void *) (p == NULL);
8346 }
8347
8348
8349 int main(argc, argv)
8350         int argc;
8351         char **argv;
8352 {
8353
8354         /* pthread test function */
8355         pthread_t t;
8356         int status;
8357         int detach = 1;
8358
8359 #ifdef HAVE_PTHREADS_FINAL
8360         /* Final pthreads */
8361         pthread_attr_t attr;
8362
8363         status = pthread_attr_init(&attr);
8364         if( status ) return status;
8365
8366 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8367         if( !detach ) {
8368 #if defined( PTHREAD_CREATE_JOINABLE )
8369                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8370 #else
8371                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8372 #endif
8373
8374 #ifdef PTHREAD_CREATE_DETACHED
8375         } else {
8376                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8377 #endif
8378         }
8379         if( status ) return status;
8380 #endif
8381
8382         status = pthread_create( &t, &attr, task, NULL );
8383         if( status ) return status;
8384
8385 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8386         if( detach ) {
8387                 /* give thread a chance to complete */
8388                 /* it should remain joinable and hence detachable */
8389                 sleep( 1 );
8390
8391                 status = pthread_detach( t );
8392                 if( status ) return status;
8393         }
8394 #endif
8395
8396 #else
8397         /* Draft 4 pthreads */
8398         status = pthread_create( &t, pthread_attr_default, task, NULL );
8399         if( status ) return status;
8400
8401         if( detach ) {
8402                 /* give thread a chance to complete */
8403                 /* it should remain joinable and hence detachable */
8404                 sleep( 1 );
8405
8406                 status = pthread_detach( &t );
8407                 if( status ) return status;
8408         }
8409 #endif
8410
8411 #ifdef HAVE_LINUX_THREADS
8412         pthread_kill_other_threads_np();
8413 #endif
8414
8415         return 0;
8416
8417 }
8418
8419 EOF
8420 if { (eval echo configure:8421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8421 then
8422   ol_cv_pthread_pthreads=yes
8423 else
8424   echo "configure: failed program was:" >&5
8425   cat conftest.$ac_ext >&5
8426   rm -fr conftest*
8427   ol_cv_pthread_pthreads=no
8428 fi
8429 rm -fr conftest*
8430 fi
8431
8432
8433                 # restore the LIBS
8434                 LIBS="$ol_LIBS"
8435         
8436 fi
8437
8438 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8439
8440         if test $ol_cv_pthread_pthreads = yes ; then
8441                 ol_link_pthreads="-pthreads"
8442                 ol_link_threads=posix
8443         fi
8444 fi
8445
8446                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8447 if test "$ol_link_threads" = no ; then
8448         # try -mthreads
8449         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8450 echo "configure:8451: checking for pthread link with -mthreads" >&5
8451 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8452   echo $ac_n "(cached) $ac_c" 1>&6
8453 else
8454   
8455                 # save the flags
8456                 ol_LIBS="$LIBS"
8457                 LIBS="-mthreads $LIBS"
8458
8459                 if test "$cross_compiling" = yes; then
8460   cat > conftest.$ac_ext <<EOF
8461 #line 8462 "configure"
8462 #include "confdefs.h"
8463 /* pthread test headers */
8464 #include <pthread.h>
8465 #ifndef NULL
8466 #define NULL (void*)0
8467 #endif
8468
8469 static void *task(p)
8470         void *p;
8471 {
8472         return (void *) (p == NULL);
8473 }
8474
8475 int main() {
8476
8477         /* pthread test function */
8478         pthread_t t;
8479         int status;
8480         int detach = 1;
8481
8482 #ifdef HAVE_PTHREADS_FINAL
8483         /* Final pthreads */
8484         pthread_attr_t attr;
8485
8486         status = pthread_attr_init(&attr);
8487         if( status ) return status;
8488
8489 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8490         if( !detach ) {
8491 #if defined( PTHREAD_CREATE_JOINABLE )
8492                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8493 #else
8494                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8495 #endif
8496
8497 #ifdef PTHREAD_CREATE_DETACHED
8498         } else {
8499                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8500 #endif
8501         }
8502         if( status ) return status;
8503 #endif
8504
8505         status = pthread_create( &t, &attr, task, NULL );
8506         if( status ) return status;
8507
8508 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8509         if( detach ) {
8510                 /* give thread a chance to complete */
8511                 /* it should remain joinable and hence detachable */
8512                 sleep( 1 );
8513
8514                 status = pthread_detach( t );
8515                 if( status ) return status;
8516         }
8517 #endif
8518
8519 #else
8520         /* Draft 4 pthreads */
8521         status = pthread_create( &t, pthread_attr_default, task, NULL );
8522         if( status ) return status;
8523
8524         if( detach ) {
8525                 /* give thread a chance to complete */
8526                 /* it should remain joinable and hence detachable */
8527                 sleep( 1 );
8528
8529                 status = pthread_detach( &t );
8530                 if( status ) return status;
8531         }
8532 #endif
8533
8534 #ifdef HAVE_LINUX_THREADS
8535         pthread_kill_other_threads_np();
8536 #endif
8537
8538         return 0;
8539
8540 ; return 0; }
8541 EOF
8542 if { (eval echo configure:8543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8543   rm -rf conftest*
8544   ol_cv_pthread_mthreads=yes
8545 else
8546   echo "configure: failed program was:" >&5
8547   cat conftest.$ac_ext >&5
8548   rm -rf conftest*
8549   ol_cv_pthread_mthreads=no
8550 fi
8551 rm -f conftest*
8552 else
8553   cat > conftest.$ac_ext <<EOF
8554 #line 8555 "configure"
8555 #include "confdefs.h"
8556 /* pthread test headers */
8557 #include <pthread.h>
8558 #ifndef NULL
8559 #define NULL (void*)0
8560 #endif
8561
8562 static void *task(p)
8563         void *p;
8564 {
8565         return (void *) (p == NULL);
8566 }
8567
8568
8569 int main(argc, argv)
8570         int argc;
8571         char **argv;
8572 {
8573
8574         /* pthread test function */
8575         pthread_t t;
8576         int status;
8577         int detach = 1;
8578
8579 #ifdef HAVE_PTHREADS_FINAL
8580         /* Final pthreads */
8581         pthread_attr_t attr;
8582
8583         status = pthread_attr_init(&attr);
8584         if( status ) return status;
8585
8586 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8587         if( !detach ) {
8588 #if defined( PTHREAD_CREATE_JOINABLE )
8589                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8590 #else
8591                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8592 #endif
8593
8594 #ifdef PTHREAD_CREATE_DETACHED
8595         } else {
8596                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8597 #endif
8598         }
8599         if( status ) return status;
8600 #endif
8601
8602         status = pthread_create( &t, &attr, task, NULL );
8603         if( status ) return status;
8604
8605 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8606         if( detach ) {
8607                 /* give thread a chance to complete */
8608                 /* it should remain joinable and hence detachable */
8609                 sleep( 1 );
8610
8611                 status = pthread_detach( t );
8612                 if( status ) return status;
8613         }
8614 #endif
8615
8616 #else
8617         /* Draft 4 pthreads */
8618         status = pthread_create( &t, pthread_attr_default, task, NULL );
8619         if( status ) return status;
8620
8621         if( detach ) {
8622                 /* give thread a chance to complete */
8623                 /* it should remain joinable and hence detachable */
8624                 sleep( 1 );
8625
8626                 status = pthread_detach( &t );
8627                 if( status ) return status;
8628         }
8629 #endif
8630
8631 #ifdef HAVE_LINUX_THREADS
8632         pthread_kill_other_threads_np();
8633 #endif
8634
8635         return 0;
8636
8637 }
8638
8639 EOF
8640 if { (eval echo configure:8641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8641 then
8642   ol_cv_pthread_mthreads=yes
8643 else
8644   echo "configure: failed program was:" >&5
8645   cat conftest.$ac_ext >&5
8646   rm -fr conftest*
8647   ol_cv_pthread_mthreads=no
8648 fi
8649 rm -fr conftest*
8650 fi
8651
8652
8653                 # restore the LIBS
8654                 LIBS="$ol_LIBS"
8655         
8656 fi
8657
8658 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8659
8660         if test $ol_cv_pthread_mthreads = yes ; then
8661                 ol_link_pthreads="-mthreads"
8662                 ol_link_threads=posix
8663         fi
8664 fi
8665
8666                 # Pthread try link: -thread (ol_cv_pthread_thread)
8667 if test "$ol_link_threads" = no ; then
8668         # try -thread
8669         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8670 echo "configure:8671: checking for pthread link with -thread" >&5
8671 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8672   echo $ac_n "(cached) $ac_c" 1>&6
8673 else
8674   
8675                 # save the flags
8676                 ol_LIBS="$LIBS"
8677                 LIBS="-thread $LIBS"
8678
8679                 if test "$cross_compiling" = yes; then
8680   cat > conftest.$ac_ext <<EOF
8681 #line 8682 "configure"
8682 #include "confdefs.h"
8683 /* pthread test headers */
8684 #include <pthread.h>
8685 #ifndef NULL
8686 #define NULL (void*)0
8687 #endif
8688
8689 static void *task(p)
8690         void *p;
8691 {
8692         return (void *) (p == NULL);
8693 }
8694
8695 int main() {
8696
8697         /* pthread test function */
8698         pthread_t t;
8699         int status;
8700         int detach = 1;
8701
8702 #ifdef HAVE_PTHREADS_FINAL
8703         /* Final pthreads */
8704         pthread_attr_t attr;
8705
8706         status = pthread_attr_init(&attr);
8707         if( status ) return status;
8708
8709 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8710         if( !detach ) {
8711 #if defined( PTHREAD_CREATE_JOINABLE )
8712                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8713 #else
8714                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8715 #endif
8716
8717 #ifdef PTHREAD_CREATE_DETACHED
8718         } else {
8719                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8720 #endif
8721         }
8722         if( status ) return status;
8723 #endif
8724
8725         status = pthread_create( &t, &attr, task, NULL );
8726         if( status ) return status;
8727
8728 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8729         if( detach ) {
8730                 /* give thread a chance to complete */
8731                 /* it should remain joinable and hence detachable */
8732                 sleep( 1 );
8733
8734                 status = pthread_detach( t );
8735                 if( status ) return status;
8736         }
8737 #endif
8738
8739 #else
8740         /* Draft 4 pthreads */
8741         status = pthread_create( &t, pthread_attr_default, task, NULL );
8742         if( status ) return status;
8743
8744         if( detach ) {
8745                 /* give thread a chance to complete */
8746                 /* it should remain joinable and hence detachable */
8747                 sleep( 1 );
8748
8749                 status = pthread_detach( &t );
8750                 if( status ) return status;
8751         }
8752 #endif
8753
8754 #ifdef HAVE_LINUX_THREADS
8755         pthread_kill_other_threads_np();
8756 #endif
8757
8758         return 0;
8759
8760 ; return 0; }
8761 EOF
8762 if { (eval echo configure:8763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8763   rm -rf conftest*
8764   ol_cv_pthread_thread=yes
8765 else
8766   echo "configure: failed program was:" >&5
8767   cat conftest.$ac_ext >&5
8768   rm -rf conftest*
8769   ol_cv_pthread_thread=no
8770 fi
8771 rm -f conftest*
8772 else
8773   cat > conftest.$ac_ext <<EOF
8774 #line 8775 "configure"
8775 #include "confdefs.h"
8776 /* pthread test headers */
8777 #include <pthread.h>
8778 #ifndef NULL
8779 #define NULL (void*)0
8780 #endif
8781
8782 static void *task(p)
8783         void *p;
8784 {
8785         return (void *) (p == NULL);
8786 }
8787
8788
8789 int main(argc, argv)
8790         int argc;
8791         char **argv;
8792 {
8793
8794         /* pthread test function */
8795         pthread_t t;
8796         int status;
8797         int detach = 1;
8798
8799 #ifdef HAVE_PTHREADS_FINAL
8800         /* Final pthreads */
8801         pthread_attr_t attr;
8802
8803         status = pthread_attr_init(&attr);
8804         if( status ) return status;
8805
8806 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8807         if( !detach ) {
8808 #if defined( PTHREAD_CREATE_JOINABLE )
8809                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8810 #else
8811                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8812 #endif
8813
8814 #ifdef PTHREAD_CREATE_DETACHED
8815         } else {
8816                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8817 #endif
8818         }
8819         if( status ) return status;
8820 #endif
8821
8822         status = pthread_create( &t, &attr, task, NULL );
8823         if( status ) return status;
8824
8825 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8826         if( detach ) {
8827                 /* give thread a chance to complete */
8828                 /* it should remain joinable and hence detachable */
8829                 sleep( 1 );
8830
8831                 status = pthread_detach( t );
8832                 if( status ) return status;
8833         }
8834 #endif
8835
8836 #else
8837         /* Draft 4 pthreads */
8838         status = pthread_create( &t, pthread_attr_default, task, NULL );
8839         if( status ) return status;
8840
8841         if( detach ) {
8842                 /* give thread a chance to complete */
8843                 /* it should remain joinable and hence detachable */
8844                 sleep( 1 );
8845
8846                 status = pthread_detach( &t );
8847                 if( status ) return status;
8848         }
8849 #endif
8850
8851 #ifdef HAVE_LINUX_THREADS
8852         pthread_kill_other_threads_np();
8853 #endif
8854
8855         return 0;
8856
8857 }
8858
8859 EOF
8860 if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8861 then
8862   ol_cv_pthread_thread=yes
8863 else
8864   echo "configure: failed program was:" >&5
8865   cat conftest.$ac_ext >&5
8866   rm -fr conftest*
8867   ol_cv_pthread_thread=no
8868 fi
8869 rm -fr conftest*
8870 fi
8871
8872
8873                 # restore the LIBS
8874                 LIBS="$ol_LIBS"
8875         
8876 fi
8877
8878 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8879
8880         if test $ol_cv_pthread_thread = yes ; then
8881                 ol_link_pthreads="-thread"
8882                 ol_link_threads=posix
8883         fi
8884 fi
8885
8886
8887                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8888 if test "$ol_link_threads" = no ; then
8889         # try -lpthread -lmach -lexc -lc_r
8890         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8891 echo "configure:8892: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8892 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8893   echo $ac_n "(cached) $ac_c" 1>&6
8894 else
8895   
8896                 # save the flags
8897                 ol_LIBS="$LIBS"
8898                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8899
8900                 if test "$cross_compiling" = yes; then
8901   cat > conftest.$ac_ext <<EOF
8902 #line 8903 "configure"
8903 #include "confdefs.h"
8904 /* pthread test headers */
8905 #include <pthread.h>
8906 #ifndef NULL
8907 #define NULL (void*)0
8908 #endif
8909
8910 static void *task(p)
8911         void *p;
8912 {
8913         return (void *) (p == NULL);
8914 }
8915
8916 int main() {
8917
8918         /* pthread test function */
8919         pthread_t t;
8920         int status;
8921         int detach = 1;
8922
8923 #ifdef HAVE_PTHREADS_FINAL
8924         /* Final pthreads */
8925         pthread_attr_t attr;
8926
8927         status = pthread_attr_init(&attr);
8928         if( status ) return status;
8929
8930 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8931         if( !detach ) {
8932 #if defined( PTHREAD_CREATE_JOINABLE )
8933                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8934 #else
8935                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8936 #endif
8937
8938 #ifdef PTHREAD_CREATE_DETACHED
8939         } else {
8940                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8941 #endif
8942         }
8943         if( status ) return status;
8944 #endif
8945
8946         status = pthread_create( &t, &attr, task, NULL );
8947         if( status ) return status;
8948
8949 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8950         if( detach ) {
8951                 /* give thread a chance to complete */
8952                 /* it should remain joinable and hence detachable */
8953                 sleep( 1 );
8954
8955                 status = pthread_detach( t );
8956                 if( status ) return status;
8957         }
8958 #endif
8959
8960 #else
8961         /* Draft 4 pthreads */
8962         status = pthread_create( &t, pthread_attr_default, task, NULL );
8963         if( status ) return status;
8964
8965         if( detach ) {
8966                 /* give thread a chance to complete */
8967                 /* it should remain joinable and hence detachable */
8968                 sleep( 1 );
8969
8970                 status = pthread_detach( &t );
8971                 if( status ) return status;
8972         }
8973 #endif
8974
8975 #ifdef HAVE_LINUX_THREADS
8976         pthread_kill_other_threads_np();
8977 #endif
8978
8979         return 0;
8980
8981 ; return 0; }
8982 EOF
8983 if { (eval echo configure:8984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8984   rm -rf conftest*
8985   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8986 else
8987   echo "configure: failed program was:" >&5
8988   cat conftest.$ac_ext >&5
8989   rm -rf conftest*
8990   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8991 fi
8992 rm -f conftest*
8993 else
8994   cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997 /* pthread test headers */
8998 #include <pthread.h>
8999 #ifndef NULL
9000 #define NULL (void*)0
9001 #endif
9002
9003 static void *task(p)
9004         void *p;
9005 {
9006         return (void *) (p == NULL);
9007 }
9008
9009
9010 int main(argc, argv)
9011         int argc;
9012         char **argv;
9013 {
9014
9015         /* pthread test function */
9016         pthread_t t;
9017         int status;
9018         int detach = 1;
9019
9020 #ifdef HAVE_PTHREADS_FINAL
9021         /* Final pthreads */
9022         pthread_attr_t attr;
9023
9024         status = pthread_attr_init(&attr);
9025         if( status ) return status;
9026
9027 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9028         if( !detach ) {
9029 #if defined( PTHREAD_CREATE_JOINABLE )
9030                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9031 #else
9032                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9033 #endif
9034
9035 #ifdef PTHREAD_CREATE_DETACHED
9036         } else {
9037                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9038 #endif
9039         }
9040         if( status ) return status;
9041 #endif
9042
9043         status = pthread_create( &t, &attr, task, NULL );
9044         if( status ) return status;
9045
9046 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9047         if( detach ) {
9048                 /* give thread a chance to complete */
9049                 /* it should remain joinable and hence detachable */
9050                 sleep( 1 );
9051
9052                 status = pthread_detach( t );
9053                 if( status ) return status;
9054         }
9055 #endif
9056
9057 #else
9058         /* Draft 4 pthreads */
9059         status = pthread_create( &t, pthread_attr_default, task, NULL );
9060         if( status ) return status;
9061
9062         if( detach ) {
9063                 /* give thread a chance to complete */
9064                 /* it should remain joinable and hence detachable */
9065                 sleep( 1 );
9066
9067                 status = pthread_detach( &t );
9068                 if( status ) return status;
9069         }
9070 #endif
9071
9072 #ifdef HAVE_LINUX_THREADS
9073         pthread_kill_other_threads_np();
9074 #endif
9075
9076         return 0;
9077
9078 }
9079
9080 EOF
9081 if { (eval echo configure:9082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9082 then
9083   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9084 else
9085   echo "configure: failed program was:" >&5
9086   cat conftest.$ac_ext >&5
9087   rm -fr conftest*
9088   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9089 fi
9090 rm -fr conftest*
9091 fi
9092
9093
9094                 # restore the LIBS
9095                 LIBS="$ol_LIBS"
9096         
9097 fi
9098
9099 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
9100
9101         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
9102                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
9103                 ol_link_threads=posix
9104         fi
9105 fi
9106
9107                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
9108 if test "$ol_link_threads" = no ; then
9109         # try -lpthread -lmach -lexc
9110         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
9111 echo "configure:9112: checking for pthread link with -lpthread -lmach -lexc" >&5
9112 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
9113   echo $ac_n "(cached) $ac_c" 1>&6
9114 else
9115   
9116                 # save the flags
9117                 ol_LIBS="$LIBS"
9118                 LIBS="-lpthread -lmach -lexc $LIBS"
9119
9120                 if test "$cross_compiling" = yes; then
9121   cat > conftest.$ac_ext <<EOF
9122 #line 9123 "configure"
9123 #include "confdefs.h"
9124 /* pthread test headers */
9125 #include <pthread.h>
9126 #ifndef NULL
9127 #define NULL (void*)0
9128 #endif
9129
9130 static void *task(p)
9131         void *p;
9132 {
9133         return (void *) (p == NULL);
9134 }
9135
9136 int main() {
9137
9138         /* pthread test function */
9139         pthread_t t;
9140         int status;
9141         int detach = 1;
9142
9143 #ifdef HAVE_PTHREADS_FINAL
9144         /* Final pthreads */
9145         pthread_attr_t attr;
9146
9147         status = pthread_attr_init(&attr);
9148         if( status ) return status;
9149
9150 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9151         if( !detach ) {
9152 #if defined( PTHREAD_CREATE_JOINABLE )
9153                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9154 #else
9155                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9156 #endif
9157
9158 #ifdef PTHREAD_CREATE_DETACHED
9159         } else {
9160                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9161 #endif
9162         }
9163         if( status ) return status;
9164 #endif
9165
9166         status = pthread_create( &t, &attr, task, NULL );
9167         if( status ) return status;
9168
9169 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9170         if( detach ) {
9171                 /* give thread a chance to complete */
9172                 /* it should remain joinable and hence detachable */
9173                 sleep( 1 );
9174
9175                 status = pthread_detach( t );
9176                 if( status ) return status;
9177         }
9178 #endif
9179
9180 #else
9181         /* Draft 4 pthreads */
9182         status = pthread_create( &t, pthread_attr_default, task, NULL );
9183         if( status ) return status;
9184
9185         if( detach ) {
9186                 /* give thread a chance to complete */
9187                 /* it should remain joinable and hence detachable */
9188                 sleep( 1 );
9189
9190                 status = pthread_detach( &t );
9191                 if( status ) return status;
9192         }
9193 #endif
9194
9195 #ifdef HAVE_LINUX_THREADS
9196         pthread_kill_other_threads_np();
9197 #endif
9198
9199         return 0;
9200
9201 ; return 0; }
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9204   rm -rf conftest*
9205   ol_cv_pthread_lpthread_lmach_lexc=yes
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   ol_cv_pthread_lpthread_lmach_lexc=no
9211 fi
9212 rm -f conftest*
9213 else
9214   cat > conftest.$ac_ext <<EOF
9215 #line 9216 "configure"
9216 #include "confdefs.h"
9217 /* pthread test headers */
9218 #include <pthread.h>
9219 #ifndef NULL
9220 #define NULL (void*)0
9221 #endif
9222
9223 static void *task(p)
9224         void *p;
9225 {
9226         return (void *) (p == NULL);
9227 }
9228
9229
9230 int main(argc, argv)
9231         int argc;
9232         char **argv;
9233 {
9234
9235         /* pthread test function */
9236         pthread_t t;
9237         int status;
9238         int detach = 1;
9239
9240 #ifdef HAVE_PTHREADS_FINAL
9241         /* Final pthreads */
9242         pthread_attr_t attr;
9243
9244         status = pthread_attr_init(&attr);
9245         if( status ) return status;
9246
9247 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9248         if( !detach ) {
9249 #if defined( PTHREAD_CREATE_JOINABLE )
9250                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9251 #else
9252                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9253 #endif
9254
9255 #ifdef PTHREAD_CREATE_DETACHED
9256         } else {
9257                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9258 #endif
9259         }
9260         if( status ) return status;
9261 #endif
9262
9263         status = pthread_create( &t, &attr, task, NULL );
9264         if( status ) return status;
9265
9266 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9267         if( detach ) {
9268                 /* give thread a chance to complete */
9269                 /* it should remain joinable and hence detachable */
9270                 sleep( 1 );
9271
9272                 status = pthread_detach( t );
9273                 if( status ) return status;
9274         }
9275 #endif
9276
9277 #else
9278         /* Draft 4 pthreads */
9279         status = pthread_create( &t, pthread_attr_default, task, NULL );
9280         if( status ) return status;
9281
9282         if( detach ) {
9283                 /* give thread a chance to complete */
9284                 /* it should remain joinable and hence detachable */
9285                 sleep( 1 );
9286
9287                 status = pthread_detach( &t );
9288                 if( status ) return status;
9289         }
9290 #endif
9291
9292 #ifdef HAVE_LINUX_THREADS
9293         pthread_kill_other_threads_np();
9294 #endif
9295
9296         return 0;
9297
9298 }
9299
9300 EOF
9301 if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9302 then
9303   ol_cv_pthread_lpthread_lmach_lexc=yes
9304 else
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -fr conftest*
9308   ol_cv_pthread_lpthread_lmach_lexc=no
9309 fi
9310 rm -fr conftest*
9311 fi
9312
9313
9314                 # restore the LIBS
9315                 LIBS="$ol_LIBS"
9316         
9317 fi
9318
9319 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
9320
9321         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
9322                 ol_link_pthreads="-lpthread -lmach -lexc"
9323                 ol_link_threads=posix
9324         fi
9325 fi
9326
9327
9328                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
9329 if test "$ol_link_threads" = no ; then
9330         # try -lpthread -Wl,-woff,85
9331         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
9332 echo "configure:9333: checking for pthread link with -lpthread -Wl,-woff,85" >&5
9333 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   
9337                 # save the flags
9338                 ol_LIBS="$LIBS"
9339                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
9340
9341                 if test "$cross_compiling" = yes; then
9342   cat > conftest.$ac_ext <<EOF
9343 #line 9344 "configure"
9344 #include "confdefs.h"
9345 /* pthread test headers */
9346 #include <pthread.h>
9347 #ifndef NULL
9348 #define NULL (void*)0
9349 #endif
9350
9351 static void *task(p)
9352         void *p;
9353 {
9354         return (void *) (p == NULL);
9355 }
9356
9357 int main() {
9358
9359         /* pthread test function */
9360         pthread_t t;
9361         int status;
9362         int detach = 1;
9363
9364 #ifdef HAVE_PTHREADS_FINAL
9365         /* Final pthreads */
9366         pthread_attr_t attr;
9367
9368         status = pthread_attr_init(&attr);
9369         if( status ) return status;
9370
9371 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9372         if( !detach ) {
9373 #if defined( PTHREAD_CREATE_JOINABLE )
9374                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9375 #else
9376                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9377 #endif
9378
9379 #ifdef PTHREAD_CREATE_DETACHED
9380         } else {
9381                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9382 #endif
9383         }
9384         if( status ) return status;
9385 #endif
9386
9387         status = pthread_create( &t, &attr, task, NULL );
9388         if( status ) return status;
9389
9390 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9391         if( detach ) {
9392                 /* give thread a chance to complete */
9393                 /* it should remain joinable and hence detachable */
9394                 sleep( 1 );
9395
9396                 status = pthread_detach( t );
9397                 if( status ) return status;
9398         }
9399 #endif
9400
9401 #else
9402         /* Draft 4 pthreads */
9403         status = pthread_create( &t, pthread_attr_default, task, NULL );
9404         if( status ) return status;
9405
9406         if( detach ) {
9407                 /* give thread a chance to complete */
9408                 /* it should remain joinable and hence detachable */
9409                 sleep( 1 );
9410
9411                 status = pthread_detach( &t );
9412                 if( status ) return status;
9413         }
9414 #endif
9415
9416 #ifdef HAVE_LINUX_THREADS
9417         pthread_kill_other_threads_np();
9418 #endif
9419
9420         return 0;
9421
9422 ; return 0; }
9423 EOF
9424 if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9425   rm -rf conftest*
9426   ol_cv_pthread_lib_lpthread_woff=yes
9427 else
9428   echo "configure: failed program was:" >&5
9429   cat conftest.$ac_ext >&5
9430   rm -rf conftest*
9431   ol_cv_pthread_lib_lpthread_woff=no
9432 fi
9433 rm -f conftest*
9434 else
9435   cat > conftest.$ac_ext <<EOF
9436 #line 9437 "configure"
9437 #include "confdefs.h"
9438 /* pthread test headers */
9439 #include <pthread.h>
9440 #ifndef NULL
9441 #define NULL (void*)0
9442 #endif
9443
9444 static void *task(p)
9445         void *p;
9446 {
9447         return (void *) (p == NULL);
9448 }
9449
9450
9451 int main(argc, argv)
9452         int argc;
9453         char **argv;
9454 {
9455
9456         /* pthread test function */
9457         pthread_t t;
9458         int status;
9459         int detach = 1;
9460
9461 #ifdef HAVE_PTHREADS_FINAL
9462         /* Final pthreads */
9463         pthread_attr_t attr;
9464
9465         status = pthread_attr_init(&attr);
9466         if( status ) return status;
9467
9468 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9469         if( !detach ) {
9470 #if defined( PTHREAD_CREATE_JOINABLE )
9471                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9472 #else
9473                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9474 #endif
9475
9476 #ifdef PTHREAD_CREATE_DETACHED
9477         } else {
9478                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9479 #endif
9480         }
9481         if( status ) return status;
9482 #endif
9483
9484         status = pthread_create( &t, &attr, task, NULL );
9485         if( status ) return status;
9486
9487 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9488         if( detach ) {
9489                 /* give thread a chance to complete */
9490                 /* it should remain joinable and hence detachable */
9491                 sleep( 1 );
9492
9493                 status = pthread_detach( t );
9494                 if( status ) return status;
9495         }
9496 #endif
9497
9498 #else
9499         /* Draft 4 pthreads */
9500         status = pthread_create( &t, pthread_attr_default, task, NULL );
9501         if( status ) return status;
9502
9503         if( detach ) {
9504                 /* give thread a chance to complete */
9505                 /* it should remain joinable and hence detachable */
9506                 sleep( 1 );
9507
9508                 status = pthread_detach( &t );
9509                 if( status ) return status;
9510         }
9511 #endif
9512
9513 #ifdef HAVE_LINUX_THREADS
9514         pthread_kill_other_threads_np();
9515 #endif
9516
9517         return 0;
9518
9519 }
9520
9521 EOF
9522 if { (eval echo configure:9523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9523 then
9524   ol_cv_pthread_lib_lpthread_woff=yes
9525 else
9526   echo "configure: failed program was:" >&5
9527   cat conftest.$ac_ext >&5
9528   rm -fr conftest*
9529   ol_cv_pthread_lib_lpthread_woff=no
9530 fi
9531 rm -fr conftest*
9532 fi
9533
9534
9535                 # restore the LIBS
9536                 LIBS="$ol_LIBS"
9537         
9538 fi
9539
9540 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9541
9542         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9543                 ol_link_pthreads="-lpthread -Wl,-woff,85"
9544                 ol_link_threads=posix
9545         fi
9546 fi
9547
9548
9549                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9550 if test "$ol_link_threads" = no ; then
9551         # try -lpthread
9552         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9553 echo "configure:9554: checking for pthread link with -lpthread" >&5
9554 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9555   echo $ac_n "(cached) $ac_c" 1>&6
9556 else
9557   
9558                 # save the flags
9559                 ol_LIBS="$LIBS"
9560                 LIBS="-lpthread $LIBS"
9561
9562                 if test "$cross_compiling" = yes; then
9563   cat > conftest.$ac_ext <<EOF
9564 #line 9565 "configure"
9565 #include "confdefs.h"
9566 /* pthread test headers */
9567 #include <pthread.h>
9568 #ifndef NULL
9569 #define NULL (void*)0
9570 #endif
9571
9572 static void *task(p)
9573         void *p;
9574 {
9575         return (void *) (p == NULL);
9576 }
9577
9578 int main() {
9579
9580         /* pthread test function */
9581         pthread_t t;
9582         int status;
9583         int detach = 1;
9584
9585 #ifdef HAVE_PTHREADS_FINAL
9586         /* Final pthreads */
9587         pthread_attr_t attr;
9588
9589         status = pthread_attr_init(&attr);
9590         if( status ) return status;
9591
9592 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9593         if( !detach ) {
9594 #if defined( PTHREAD_CREATE_JOINABLE )
9595                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9596 #else
9597                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9598 #endif
9599
9600 #ifdef PTHREAD_CREATE_DETACHED
9601         } else {
9602                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9603 #endif
9604         }
9605         if( status ) return status;
9606 #endif
9607
9608         status = pthread_create( &t, &attr, task, NULL );
9609         if( status ) return status;
9610
9611 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9612         if( detach ) {
9613                 /* give thread a chance to complete */
9614                 /* it should remain joinable and hence detachable */
9615                 sleep( 1 );
9616
9617                 status = pthread_detach( t );
9618                 if( status ) return status;
9619         }
9620 #endif
9621
9622 #else
9623         /* Draft 4 pthreads */
9624         status = pthread_create( &t, pthread_attr_default, task, NULL );
9625         if( status ) return status;
9626
9627         if( detach ) {
9628                 /* give thread a chance to complete */
9629                 /* it should remain joinable and hence detachable */
9630                 sleep( 1 );
9631
9632                 status = pthread_detach( &t );
9633                 if( status ) return status;
9634         }
9635 #endif
9636
9637 #ifdef HAVE_LINUX_THREADS
9638         pthread_kill_other_threads_np();
9639 #endif
9640
9641         return 0;
9642
9643 ; return 0; }
9644 EOF
9645 if { (eval echo configure:9646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9646   rm -rf conftest*
9647   ol_cv_pthread_lpthread=yes
9648 else
9649   echo "configure: failed program was:" >&5
9650   cat conftest.$ac_ext >&5
9651   rm -rf conftest*
9652   ol_cv_pthread_lpthread=no
9653 fi
9654 rm -f conftest*
9655 else
9656   cat > conftest.$ac_ext <<EOF
9657 #line 9658 "configure"
9658 #include "confdefs.h"
9659 /* pthread test headers */
9660 #include <pthread.h>
9661 #ifndef NULL
9662 #define NULL (void*)0
9663 #endif
9664
9665 static void *task(p)
9666         void *p;
9667 {
9668         return (void *) (p == NULL);
9669 }
9670
9671
9672 int main(argc, argv)
9673         int argc;
9674         char **argv;
9675 {
9676
9677         /* pthread test function */
9678         pthread_t t;
9679         int status;
9680         int detach = 1;
9681
9682 #ifdef HAVE_PTHREADS_FINAL
9683         /* Final pthreads */
9684         pthread_attr_t attr;
9685
9686         status = pthread_attr_init(&attr);
9687         if( status ) return status;
9688
9689 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9690         if( !detach ) {
9691 #if defined( PTHREAD_CREATE_JOINABLE )
9692                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9693 #else
9694                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9695 #endif
9696
9697 #ifdef PTHREAD_CREATE_DETACHED
9698         } else {
9699                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9700 #endif
9701         }
9702         if( status ) return status;
9703 #endif
9704
9705         status = pthread_create( &t, &attr, task, NULL );
9706         if( status ) return status;
9707
9708 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9709         if( detach ) {
9710                 /* give thread a chance to complete */
9711                 /* it should remain joinable and hence detachable */
9712                 sleep( 1 );
9713
9714                 status = pthread_detach( t );
9715                 if( status ) return status;
9716         }
9717 #endif
9718
9719 #else
9720         /* Draft 4 pthreads */
9721         status = pthread_create( &t, pthread_attr_default, task, NULL );
9722         if( status ) return status;
9723
9724         if( detach ) {
9725                 /* give thread a chance to complete */
9726                 /* it should remain joinable and hence detachable */
9727                 sleep( 1 );
9728
9729                 status = pthread_detach( &t );
9730                 if( status ) return status;
9731         }
9732 #endif
9733
9734 #ifdef HAVE_LINUX_THREADS
9735         pthread_kill_other_threads_np();
9736 #endif
9737
9738         return 0;
9739
9740 }
9741
9742 EOF
9743 if { (eval echo configure:9744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9744 then
9745   ol_cv_pthread_lpthread=yes
9746 else
9747   echo "configure: failed program was:" >&5
9748   cat conftest.$ac_ext >&5
9749   rm -fr conftest*
9750   ol_cv_pthread_lpthread=no
9751 fi
9752 rm -fr conftest*
9753 fi
9754
9755
9756                 # restore the LIBS
9757                 LIBS="$ol_LIBS"
9758         
9759 fi
9760
9761 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9762
9763         if test $ol_cv_pthread_lpthread = yes ; then
9764                 ol_link_pthreads="-lpthread"
9765                 ol_link_threads=posix
9766         fi
9767 fi
9768
9769                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9770 if test "$ol_link_threads" = no ; then
9771         # try -lc_r
9772         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9773 echo "configure:9774: checking for pthread link with -lc_r" >&5
9774 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9775   echo $ac_n "(cached) $ac_c" 1>&6
9776 else
9777   
9778                 # save the flags
9779                 ol_LIBS="$LIBS"
9780                 LIBS="-lc_r $LIBS"
9781
9782                 if test "$cross_compiling" = yes; then
9783   cat > conftest.$ac_ext <<EOF
9784 #line 9785 "configure"
9785 #include "confdefs.h"
9786 /* pthread test headers */
9787 #include <pthread.h>
9788 #ifndef NULL
9789 #define NULL (void*)0
9790 #endif
9791
9792 static void *task(p)
9793         void *p;
9794 {
9795         return (void *) (p == NULL);
9796 }
9797
9798 int main() {
9799
9800         /* pthread test function */
9801         pthread_t t;
9802         int status;
9803         int detach = 1;
9804
9805 #ifdef HAVE_PTHREADS_FINAL
9806         /* Final pthreads */
9807         pthread_attr_t attr;
9808
9809         status = pthread_attr_init(&attr);
9810         if( status ) return status;
9811
9812 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9813         if( !detach ) {
9814 #if defined( PTHREAD_CREATE_JOINABLE )
9815                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9816 #else
9817                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9818 #endif
9819
9820 #ifdef PTHREAD_CREATE_DETACHED
9821         } else {
9822                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9823 #endif
9824         }
9825         if( status ) return status;
9826 #endif
9827
9828         status = pthread_create( &t, &attr, task, NULL );
9829         if( status ) return status;
9830
9831 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9832         if( detach ) {
9833                 /* give thread a chance to complete */
9834                 /* it should remain joinable and hence detachable */
9835                 sleep( 1 );
9836
9837                 status = pthread_detach( t );
9838                 if( status ) return status;
9839         }
9840 #endif
9841
9842 #else
9843         /* Draft 4 pthreads */
9844         status = pthread_create( &t, pthread_attr_default, task, NULL );
9845         if( status ) return status;
9846
9847         if( detach ) {
9848                 /* give thread a chance to complete */
9849                 /* it should remain joinable and hence detachable */
9850                 sleep( 1 );
9851
9852                 status = pthread_detach( &t );
9853                 if( status ) return status;
9854         }
9855 #endif
9856
9857 #ifdef HAVE_LINUX_THREADS
9858         pthread_kill_other_threads_np();
9859 #endif
9860
9861         return 0;
9862
9863 ; return 0; }
9864 EOF
9865 if { (eval echo configure:9866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9866   rm -rf conftest*
9867   ol_cv_pthread_lc_r=yes
9868 else
9869   echo "configure: failed program was:" >&5
9870   cat conftest.$ac_ext >&5
9871   rm -rf conftest*
9872   ol_cv_pthread_lc_r=no
9873 fi
9874 rm -f conftest*
9875 else
9876   cat > conftest.$ac_ext <<EOF
9877 #line 9878 "configure"
9878 #include "confdefs.h"
9879 /* pthread test headers */
9880 #include <pthread.h>
9881 #ifndef NULL
9882 #define NULL (void*)0
9883 #endif
9884
9885 static void *task(p)
9886         void *p;
9887 {
9888         return (void *) (p == NULL);
9889 }
9890
9891
9892 int main(argc, argv)
9893         int argc;
9894         char **argv;
9895 {
9896
9897         /* pthread test function */
9898         pthread_t t;
9899         int status;
9900         int detach = 1;
9901
9902 #ifdef HAVE_PTHREADS_FINAL
9903         /* Final pthreads */
9904         pthread_attr_t attr;
9905
9906         status = pthread_attr_init(&attr);
9907         if( status ) return status;
9908
9909 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9910         if( !detach ) {
9911 #if defined( PTHREAD_CREATE_JOINABLE )
9912                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9913 #else
9914                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9915 #endif
9916
9917 #ifdef PTHREAD_CREATE_DETACHED
9918         } else {
9919                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9920 #endif
9921         }
9922         if( status ) return status;
9923 #endif
9924
9925         status = pthread_create( &t, &attr, task, NULL );
9926         if( status ) return status;
9927
9928 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9929         if( detach ) {
9930                 /* give thread a chance to complete */
9931                 /* it should remain joinable and hence detachable */
9932                 sleep( 1 );
9933
9934                 status = pthread_detach( t );
9935                 if( status ) return status;
9936         }
9937 #endif
9938
9939 #else
9940         /* Draft 4 pthreads */
9941         status = pthread_create( &t, pthread_attr_default, task, NULL );
9942         if( status ) return status;
9943
9944         if( detach ) {
9945                 /* give thread a chance to complete */
9946                 /* it should remain joinable and hence detachable */
9947                 sleep( 1 );
9948
9949                 status = pthread_detach( &t );
9950                 if( status ) return status;
9951         }
9952 #endif
9953
9954 #ifdef HAVE_LINUX_THREADS
9955         pthread_kill_other_threads_np();
9956 #endif
9957
9958         return 0;
9959
9960 }
9961
9962 EOF
9963 if { (eval echo configure:9964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9964 then
9965   ol_cv_pthread_lc_r=yes
9966 else
9967   echo "configure: failed program was:" >&5
9968   cat conftest.$ac_ext >&5
9969   rm -fr conftest*
9970   ol_cv_pthread_lc_r=no
9971 fi
9972 rm -fr conftest*
9973 fi
9974
9975
9976                 # restore the LIBS
9977                 LIBS="$ol_LIBS"
9978         
9979 fi
9980
9981 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9982
9983         if test $ol_cv_pthread_lc_r = yes ; then
9984                 ol_link_pthreads="-lc_r"
9985                 ol_link_threads=posix
9986         fi
9987 fi
9988
9989
9990                 # Pthread try link: -threads (ol_cv_pthread_threads)
9991 if test "$ol_link_threads" = no ; then
9992         # try -threads
9993         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9994 echo "configure:9995: checking for pthread link with -threads" >&5
9995 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9996   echo $ac_n "(cached) $ac_c" 1>&6
9997 else
9998   
9999                 # save the flags
10000                 ol_LIBS="$LIBS"
10001                 LIBS="-threads $LIBS"
10002
10003                 if test "$cross_compiling" = yes; then
10004   cat > conftest.$ac_ext <<EOF
10005 #line 10006 "configure"
10006 #include "confdefs.h"
10007 /* pthread test headers */
10008 #include <pthread.h>
10009 #ifndef NULL
10010 #define NULL (void*)0
10011 #endif
10012
10013 static void *task(p)
10014         void *p;
10015 {
10016         return (void *) (p == NULL);
10017 }
10018
10019 int main() {
10020
10021         /* pthread test function */
10022         pthread_t t;
10023         int status;
10024         int detach = 1;
10025
10026 #ifdef HAVE_PTHREADS_FINAL
10027         /* Final pthreads */
10028         pthread_attr_t attr;
10029
10030         status = pthread_attr_init(&attr);
10031         if( status ) return status;
10032
10033 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10034         if( !detach ) {
10035 #if defined( PTHREAD_CREATE_JOINABLE )
10036                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10037 #else
10038                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10039 #endif
10040
10041 #ifdef PTHREAD_CREATE_DETACHED
10042         } else {
10043                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10044 #endif
10045         }
10046         if( status ) return status;
10047 #endif
10048
10049         status = pthread_create( &t, &attr, task, NULL );
10050         if( status ) return status;
10051
10052 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10053         if( detach ) {
10054                 /* give thread a chance to complete */
10055                 /* it should remain joinable and hence detachable */
10056                 sleep( 1 );
10057
10058                 status = pthread_detach( t );
10059                 if( status ) return status;
10060         }
10061 #endif
10062
10063 #else
10064         /* Draft 4 pthreads */
10065         status = pthread_create( &t, pthread_attr_default, task, NULL );
10066         if( status ) return status;
10067
10068         if( detach ) {
10069                 /* give thread a chance to complete */
10070                 /* it should remain joinable and hence detachable */
10071                 sleep( 1 );
10072
10073                 status = pthread_detach( &t );
10074                 if( status ) return status;
10075         }
10076 #endif
10077
10078 #ifdef HAVE_LINUX_THREADS
10079         pthread_kill_other_threads_np();
10080 #endif
10081
10082         return 0;
10083
10084 ; return 0; }
10085 EOF
10086 if { (eval echo configure:10087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10087   rm -rf conftest*
10088   ol_cv_pthread_threads=yes
10089 else
10090   echo "configure: failed program was:" >&5
10091   cat conftest.$ac_ext >&5
10092   rm -rf conftest*
10093   ol_cv_pthread_threads=no
10094 fi
10095 rm -f conftest*
10096 else
10097   cat > conftest.$ac_ext <<EOF
10098 #line 10099 "configure"
10099 #include "confdefs.h"
10100 /* pthread test headers */
10101 #include <pthread.h>
10102 #ifndef NULL
10103 #define NULL (void*)0
10104 #endif
10105
10106 static void *task(p)
10107         void *p;
10108 {
10109         return (void *) (p == NULL);
10110 }
10111
10112
10113 int main(argc, argv)
10114         int argc;
10115         char **argv;
10116 {
10117
10118         /* pthread test function */
10119         pthread_t t;
10120         int status;
10121         int detach = 1;
10122
10123 #ifdef HAVE_PTHREADS_FINAL
10124         /* Final pthreads */
10125         pthread_attr_t attr;
10126
10127         status = pthread_attr_init(&attr);
10128         if( status ) return status;
10129
10130 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10131         if( !detach ) {
10132 #if defined( PTHREAD_CREATE_JOINABLE )
10133                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10134 #else
10135                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10136 #endif
10137
10138 #ifdef PTHREAD_CREATE_DETACHED
10139         } else {
10140                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10141 #endif
10142         }
10143         if( status ) return status;
10144 #endif
10145
10146         status = pthread_create( &t, &attr, task, NULL );
10147         if( status ) return status;
10148
10149 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10150         if( detach ) {
10151                 /* give thread a chance to complete */
10152                 /* it should remain joinable and hence detachable */
10153                 sleep( 1 );
10154
10155                 status = pthread_detach( t );
10156                 if( status ) return status;
10157         }
10158 #endif
10159
10160 #else
10161         /* Draft 4 pthreads */
10162         status = pthread_create( &t, pthread_attr_default, task, NULL );
10163         if( status ) return status;
10164
10165         if( detach ) {
10166                 /* give thread a chance to complete */
10167                 /* it should remain joinable and hence detachable */
10168                 sleep( 1 );
10169
10170                 status = pthread_detach( &t );
10171                 if( status ) return status;
10172         }
10173 #endif
10174
10175 #ifdef HAVE_LINUX_THREADS
10176         pthread_kill_other_threads_np();
10177 #endif
10178
10179         return 0;
10180
10181 }
10182
10183 EOF
10184 if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10185 then
10186   ol_cv_pthread_threads=yes
10187 else
10188   echo "configure: failed program was:" >&5
10189   cat conftest.$ac_ext >&5
10190   rm -fr conftest*
10191   ol_cv_pthread_threads=no
10192 fi
10193 rm -fr conftest*
10194 fi
10195
10196
10197                 # restore the LIBS
10198                 LIBS="$ol_LIBS"
10199         
10200 fi
10201
10202 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
10203
10204         if test $ol_cv_pthread_threads = yes ; then
10205                 ol_link_pthreads="-threads"
10206                 ol_link_threads=posix
10207         fi
10208 fi
10209
10210
10211                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
10212 if test "$ol_link_threads" = no ; then
10213         # try -lpthreads -lmach -lexc -lc_r
10214         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
10215 echo "configure:10216: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
10216 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
10217   echo $ac_n "(cached) $ac_c" 1>&6
10218 else
10219   
10220                 # save the flags
10221                 ol_LIBS="$LIBS"
10222                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
10223
10224                 if test "$cross_compiling" = yes; then
10225   cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228 /* pthread test headers */
10229 #include <pthread.h>
10230 #ifndef NULL
10231 #define NULL (void*)0
10232 #endif
10233
10234 static void *task(p)
10235         void *p;
10236 {
10237         return (void *) (p == NULL);
10238 }
10239
10240 int main() {
10241
10242         /* pthread test function */
10243         pthread_t t;
10244         int status;
10245         int detach = 1;
10246
10247 #ifdef HAVE_PTHREADS_FINAL
10248         /* Final pthreads */
10249         pthread_attr_t attr;
10250
10251         status = pthread_attr_init(&attr);
10252         if( status ) return status;
10253
10254 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10255         if( !detach ) {
10256 #if defined( PTHREAD_CREATE_JOINABLE )
10257                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10258 #else
10259                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10260 #endif
10261
10262 #ifdef PTHREAD_CREATE_DETACHED
10263         } else {
10264                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10265 #endif
10266         }
10267         if( status ) return status;
10268 #endif
10269
10270         status = pthread_create( &t, &attr, task, NULL );
10271         if( status ) return status;
10272
10273 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10274         if( detach ) {
10275                 /* give thread a chance to complete */
10276                 /* it should remain joinable and hence detachable */
10277                 sleep( 1 );
10278
10279                 status = pthread_detach( t );
10280                 if( status ) return status;
10281         }
10282 #endif
10283
10284 #else
10285         /* Draft 4 pthreads */
10286         status = pthread_create( &t, pthread_attr_default, task, NULL );
10287         if( status ) return status;
10288
10289         if( detach ) {
10290                 /* give thread a chance to complete */
10291                 /* it should remain joinable and hence detachable */
10292                 sleep( 1 );
10293
10294                 status = pthread_detach( &t );
10295                 if( status ) return status;
10296         }
10297 #endif
10298
10299 #ifdef HAVE_LINUX_THREADS
10300         pthread_kill_other_threads_np();
10301 #endif
10302
10303         return 0;
10304
10305 ; return 0; }
10306 EOF
10307 if { (eval echo configure:10308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10308   rm -rf conftest*
10309   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10310 else
10311   echo "configure: failed program was:" >&5
10312   cat conftest.$ac_ext >&5
10313   rm -rf conftest*
10314   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10315 fi
10316 rm -f conftest*
10317 else
10318   cat > conftest.$ac_ext <<EOF
10319 #line 10320 "configure"
10320 #include "confdefs.h"
10321 /* pthread test headers */
10322 #include <pthread.h>
10323 #ifndef NULL
10324 #define NULL (void*)0
10325 #endif
10326
10327 static void *task(p)
10328         void *p;
10329 {
10330         return (void *) (p == NULL);
10331 }
10332
10333
10334 int main(argc, argv)
10335         int argc;
10336         char **argv;
10337 {
10338
10339         /* pthread test function */
10340         pthread_t t;
10341         int status;
10342         int detach = 1;
10343
10344 #ifdef HAVE_PTHREADS_FINAL
10345         /* Final pthreads */
10346         pthread_attr_t attr;
10347
10348         status = pthread_attr_init(&attr);
10349         if( status ) return status;
10350
10351 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10352         if( !detach ) {
10353 #if defined( PTHREAD_CREATE_JOINABLE )
10354                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10355 #else
10356                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10357 #endif
10358
10359 #ifdef PTHREAD_CREATE_DETACHED
10360         } else {
10361                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10362 #endif
10363         }
10364         if( status ) return status;
10365 #endif
10366
10367         status = pthread_create( &t, &attr, task, NULL );
10368         if( status ) return status;
10369
10370 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10371         if( detach ) {
10372                 /* give thread a chance to complete */
10373                 /* it should remain joinable and hence detachable */
10374                 sleep( 1 );
10375
10376                 status = pthread_detach( t );
10377                 if( status ) return status;
10378         }
10379 #endif
10380
10381 #else
10382         /* Draft 4 pthreads */
10383         status = pthread_create( &t, pthread_attr_default, task, NULL );
10384         if( status ) return status;
10385
10386         if( detach ) {
10387                 /* give thread a chance to complete */
10388                 /* it should remain joinable and hence detachable */
10389                 sleep( 1 );
10390
10391                 status = pthread_detach( &t );
10392                 if( status ) return status;
10393         }
10394 #endif
10395
10396 #ifdef HAVE_LINUX_THREADS
10397         pthread_kill_other_threads_np();
10398 #endif
10399
10400         return 0;
10401
10402 }
10403
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10406 then
10407   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -fr conftest*
10412   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10413 fi
10414 rm -fr conftest*
10415 fi
10416
10417
10418                 # restore the LIBS
10419                 LIBS="$ol_LIBS"
10420         
10421 fi
10422
10423 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
10424
10425         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
10426                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
10427                 ol_link_threads=posix
10428         fi
10429 fi
10430
10431                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
10432 if test "$ol_link_threads" = no ; then
10433         # try -lpthreads -lmach -lexc
10434         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
10435 echo "configure:10436: checking for pthread link with -lpthreads -lmach -lexc" >&5
10436 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
10437   echo $ac_n "(cached) $ac_c" 1>&6
10438 else
10439   
10440                 # save the flags
10441                 ol_LIBS="$LIBS"
10442                 LIBS="-lpthreads -lmach -lexc $LIBS"
10443
10444                 if test "$cross_compiling" = yes; then
10445   cat > conftest.$ac_ext <<EOF
10446 #line 10447 "configure"
10447 #include "confdefs.h"
10448 /* pthread test headers */
10449 #include <pthread.h>
10450 #ifndef NULL
10451 #define NULL (void*)0
10452 #endif
10453
10454 static void *task(p)
10455         void *p;
10456 {
10457         return (void *) (p == NULL);
10458 }
10459
10460 int main() {
10461
10462         /* pthread test function */
10463         pthread_t t;
10464         int status;
10465         int detach = 1;
10466
10467 #ifdef HAVE_PTHREADS_FINAL
10468         /* Final pthreads */
10469         pthread_attr_t attr;
10470
10471         status = pthread_attr_init(&attr);
10472         if( status ) return status;
10473
10474 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10475         if( !detach ) {
10476 #if defined( PTHREAD_CREATE_JOINABLE )
10477                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10478 #else
10479                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10480 #endif
10481
10482 #ifdef PTHREAD_CREATE_DETACHED
10483         } else {
10484                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10485 #endif
10486         }
10487         if( status ) return status;
10488 #endif
10489
10490         status = pthread_create( &t, &attr, task, NULL );
10491         if( status ) return status;
10492
10493 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10494         if( detach ) {
10495                 /* give thread a chance to complete */
10496                 /* it should remain joinable and hence detachable */
10497                 sleep( 1 );
10498
10499                 status = pthread_detach( t );
10500                 if( status ) return status;
10501         }
10502 #endif
10503
10504 #else
10505         /* Draft 4 pthreads */
10506         status = pthread_create( &t, pthread_attr_default, task, NULL );
10507         if( status ) return status;
10508
10509         if( detach ) {
10510                 /* give thread a chance to complete */
10511                 /* it should remain joinable and hence detachable */
10512                 sleep( 1 );
10513
10514                 status = pthread_detach( &t );
10515                 if( status ) return status;
10516         }
10517 #endif
10518
10519 #ifdef HAVE_LINUX_THREADS
10520         pthread_kill_other_threads_np();
10521 #endif
10522
10523         return 0;
10524
10525 ; return 0; }
10526 EOF
10527 if { (eval echo configure:10528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10528   rm -rf conftest*
10529   ol_cv_pthread_lpthreads_lmach_lexc=yes
10530 else
10531   echo "configure: failed program was:" >&5
10532   cat conftest.$ac_ext >&5
10533   rm -rf conftest*
10534   ol_cv_pthread_lpthreads_lmach_lexc=no
10535 fi
10536 rm -f conftest*
10537 else
10538   cat > conftest.$ac_ext <<EOF
10539 #line 10540 "configure"
10540 #include "confdefs.h"
10541 /* pthread test headers */
10542 #include <pthread.h>
10543 #ifndef NULL
10544 #define NULL (void*)0
10545 #endif
10546
10547 static void *task(p)
10548         void *p;
10549 {
10550         return (void *) (p == NULL);
10551 }
10552
10553
10554 int main(argc, argv)
10555         int argc;
10556         char **argv;
10557 {
10558
10559         /* pthread test function */
10560         pthread_t t;
10561         int status;
10562         int detach = 1;
10563
10564 #ifdef HAVE_PTHREADS_FINAL
10565         /* Final pthreads */
10566         pthread_attr_t attr;
10567
10568         status = pthread_attr_init(&attr);
10569         if( status ) return status;
10570
10571 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10572         if( !detach ) {
10573 #if defined( PTHREAD_CREATE_JOINABLE )
10574                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10575 #else
10576                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10577 #endif
10578
10579 #ifdef PTHREAD_CREATE_DETACHED
10580         } else {
10581                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10582 #endif
10583         }
10584         if( status ) return status;
10585 #endif
10586
10587         status = pthread_create( &t, &attr, task, NULL );
10588         if( status ) return status;
10589
10590 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10591         if( detach ) {
10592                 /* give thread a chance to complete */
10593                 /* it should remain joinable and hence detachable */
10594                 sleep( 1 );
10595
10596                 status = pthread_detach( t );
10597                 if( status ) return status;
10598         }
10599 #endif
10600
10601 #else
10602         /* Draft 4 pthreads */
10603         status = pthread_create( &t, pthread_attr_default, task, NULL );
10604         if( status ) return status;
10605
10606         if( detach ) {
10607                 /* give thread a chance to complete */
10608                 /* it should remain joinable and hence detachable */
10609                 sleep( 1 );
10610
10611                 status = pthread_detach( &t );
10612                 if( status ) return status;
10613         }
10614 #endif
10615
10616 #ifdef HAVE_LINUX_THREADS
10617         pthread_kill_other_threads_np();
10618 #endif
10619
10620         return 0;
10621
10622 }
10623
10624 EOF
10625 if { (eval echo configure:10626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10626 then
10627   ol_cv_pthread_lpthreads_lmach_lexc=yes
10628 else
10629   echo "configure: failed program was:" >&5
10630   cat conftest.$ac_ext >&5
10631   rm -fr conftest*
10632   ol_cv_pthread_lpthreads_lmach_lexc=no
10633 fi
10634 rm -fr conftest*
10635 fi
10636
10637
10638                 # restore the LIBS
10639                 LIBS="$ol_LIBS"
10640         
10641 fi
10642
10643 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
10644
10645         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
10646                 ol_link_pthreads="-lpthreads -lmach -lexc"
10647                 ol_link_threads=posix
10648         fi
10649 fi
10650
10651                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
10652 if test "$ol_link_threads" = no ; then
10653         # try -lpthreads -lexc
10654         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
10655 echo "configure:10656: checking for pthread link with -lpthreads -lexc" >&5
10656 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
10657   echo $ac_n "(cached) $ac_c" 1>&6
10658 else
10659   
10660                 # save the flags
10661                 ol_LIBS="$LIBS"
10662                 LIBS="-lpthreads -lexc $LIBS"
10663
10664                 if test "$cross_compiling" = yes; then
10665   cat > conftest.$ac_ext <<EOF
10666 #line 10667 "configure"
10667 #include "confdefs.h"
10668 /* pthread test headers */
10669 #include <pthread.h>
10670 #ifndef NULL
10671 #define NULL (void*)0
10672 #endif
10673
10674 static void *task(p)
10675         void *p;
10676 {
10677         return (void *) (p == NULL);
10678 }
10679
10680 int main() {
10681
10682         /* pthread test function */
10683         pthread_t t;
10684         int status;
10685         int detach = 1;
10686
10687 #ifdef HAVE_PTHREADS_FINAL
10688         /* Final pthreads */
10689         pthread_attr_t attr;
10690
10691         status = pthread_attr_init(&attr);
10692         if( status ) return status;
10693
10694 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10695         if( !detach ) {
10696 #if defined( PTHREAD_CREATE_JOINABLE )
10697                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10698 #else
10699                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10700 #endif
10701
10702 #ifdef PTHREAD_CREATE_DETACHED
10703         } else {
10704                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10705 #endif
10706         }
10707         if( status ) return status;
10708 #endif
10709
10710         status = pthread_create( &t, &attr, task, NULL );
10711         if( status ) return status;
10712
10713 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10714         if( detach ) {
10715                 /* give thread a chance to complete */
10716                 /* it should remain joinable and hence detachable */
10717                 sleep( 1 );
10718
10719                 status = pthread_detach( t );
10720                 if( status ) return status;
10721         }
10722 #endif
10723
10724 #else
10725         /* Draft 4 pthreads */
10726         status = pthread_create( &t, pthread_attr_default, task, NULL );
10727         if( status ) return status;
10728
10729         if( detach ) {
10730                 /* give thread a chance to complete */
10731                 /* it should remain joinable and hence detachable */
10732                 sleep( 1 );
10733
10734                 status = pthread_detach( &t );
10735                 if( status ) return status;
10736         }
10737 #endif
10738
10739 #ifdef HAVE_LINUX_THREADS
10740         pthread_kill_other_threads_np();
10741 #endif
10742
10743         return 0;
10744
10745 ; return 0; }
10746 EOF
10747 if { (eval echo configure:10748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10748   rm -rf conftest*
10749   ol_cv_pthread_lpthreads_lexc=yes
10750 else
10751   echo "configure: failed program was:" >&5
10752   cat conftest.$ac_ext >&5
10753   rm -rf conftest*
10754   ol_cv_pthread_lpthreads_lexc=no
10755 fi
10756 rm -f conftest*
10757 else
10758   cat > conftest.$ac_ext <<EOF
10759 #line 10760 "configure"
10760 #include "confdefs.h"
10761 /* pthread test headers */
10762 #include <pthread.h>
10763 #ifndef NULL
10764 #define NULL (void*)0
10765 #endif
10766
10767 static void *task(p)
10768         void *p;
10769 {
10770         return (void *) (p == NULL);
10771 }
10772
10773
10774 int main(argc, argv)
10775         int argc;
10776         char **argv;
10777 {
10778
10779         /* pthread test function */
10780         pthread_t t;
10781         int status;
10782         int detach = 1;
10783
10784 #ifdef HAVE_PTHREADS_FINAL
10785         /* Final pthreads */
10786         pthread_attr_t attr;
10787
10788         status = pthread_attr_init(&attr);
10789         if( status ) return status;
10790
10791 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10792         if( !detach ) {
10793 #if defined( PTHREAD_CREATE_JOINABLE )
10794                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10795 #else
10796                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10797 #endif
10798
10799 #ifdef PTHREAD_CREATE_DETACHED
10800         } else {
10801                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10802 #endif
10803         }
10804         if( status ) return status;
10805 #endif
10806
10807         status = pthread_create( &t, &attr, task, NULL );
10808         if( status ) return status;
10809
10810 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10811         if( detach ) {
10812                 /* give thread a chance to complete */
10813                 /* it should remain joinable and hence detachable */
10814                 sleep( 1 );
10815
10816                 status = pthread_detach( t );
10817                 if( status ) return status;
10818         }
10819 #endif
10820
10821 #else
10822         /* Draft 4 pthreads */
10823         status = pthread_create( &t, pthread_attr_default, task, NULL );
10824         if( status ) return status;
10825
10826         if( detach ) {
10827                 /* give thread a chance to complete */
10828                 /* it should remain joinable and hence detachable */
10829                 sleep( 1 );
10830
10831                 status = pthread_detach( &t );
10832                 if( status ) return status;
10833         }
10834 #endif
10835
10836 #ifdef HAVE_LINUX_THREADS
10837         pthread_kill_other_threads_np();
10838 #endif
10839
10840         return 0;
10841
10842 }
10843
10844 EOF
10845 if { (eval echo configure:10846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10846 then
10847   ol_cv_pthread_lpthreads_lexc=yes
10848 else
10849   echo "configure: failed program was:" >&5
10850   cat conftest.$ac_ext >&5
10851   rm -fr conftest*
10852   ol_cv_pthread_lpthreads_lexc=no
10853 fi
10854 rm -fr conftest*
10855 fi
10856
10857
10858                 # restore the LIBS
10859                 LIBS="$ol_LIBS"
10860         
10861 fi
10862
10863 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
10864
10865         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10866                 ol_link_pthreads="-lpthreads -lexc"
10867                 ol_link_threads=posix
10868         fi
10869 fi
10870
10871
10872                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10873 if test "$ol_link_threads" = no ; then
10874         # try -lpthreads
10875         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10876 echo "configure:10877: checking for pthread link with -lpthreads" >&5
10877 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   
10881                 # save the flags
10882                 ol_LIBS="$LIBS"
10883                 LIBS="-lpthreads $LIBS"
10884
10885                 if test "$cross_compiling" = yes; then
10886   cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889 /* pthread test headers */
10890 #include <pthread.h>
10891 #ifndef NULL
10892 #define NULL (void*)0
10893 #endif
10894
10895 static void *task(p)
10896         void *p;
10897 {
10898         return (void *) (p == NULL);
10899 }
10900
10901 int main() {
10902
10903         /* pthread test function */
10904         pthread_t t;
10905         int status;
10906         int detach = 1;
10907
10908 #ifdef HAVE_PTHREADS_FINAL
10909         /* Final pthreads */
10910         pthread_attr_t attr;
10911
10912         status = pthread_attr_init(&attr);
10913         if( status ) return status;
10914
10915 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10916         if( !detach ) {
10917 #if defined( PTHREAD_CREATE_JOINABLE )
10918                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10919 #else
10920                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10921 #endif
10922
10923 #ifdef PTHREAD_CREATE_DETACHED
10924         } else {
10925                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10926 #endif
10927         }
10928         if( status ) return status;
10929 #endif
10930
10931         status = pthread_create( &t, &attr, task, NULL );
10932         if( status ) return status;
10933
10934 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10935         if( detach ) {
10936                 /* give thread a chance to complete */
10937                 /* it should remain joinable and hence detachable */
10938                 sleep( 1 );
10939
10940                 status = pthread_detach( t );
10941                 if( status ) return status;
10942         }
10943 #endif
10944
10945 #else
10946         /* Draft 4 pthreads */
10947         status = pthread_create( &t, pthread_attr_default, task, NULL );
10948         if( status ) return status;
10949
10950         if( detach ) {
10951                 /* give thread a chance to complete */
10952                 /* it should remain joinable and hence detachable */
10953                 sleep( 1 );
10954
10955                 status = pthread_detach( &t );
10956                 if( status ) return status;
10957         }
10958 #endif
10959
10960 #ifdef HAVE_LINUX_THREADS
10961         pthread_kill_other_threads_np();
10962 #endif
10963
10964         return 0;
10965
10966 ; return 0; }
10967 EOF
10968 if { (eval echo configure:10969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10969   rm -rf conftest*
10970   ol_cv_pthread_lib_lpthreads=yes
10971 else
10972   echo "configure: failed program was:" >&5
10973   cat conftest.$ac_ext >&5
10974   rm -rf conftest*
10975   ol_cv_pthread_lib_lpthreads=no
10976 fi
10977 rm -f conftest*
10978 else
10979   cat > conftest.$ac_ext <<EOF
10980 #line 10981 "configure"
10981 #include "confdefs.h"
10982 /* pthread test headers */
10983 #include <pthread.h>
10984 #ifndef NULL
10985 #define NULL (void*)0
10986 #endif
10987
10988 static void *task(p)
10989         void *p;
10990 {
10991         return (void *) (p == NULL);
10992 }
10993
10994
10995 int main(argc, argv)
10996         int argc;
10997         char **argv;
10998 {
10999
11000         /* pthread test function */
11001         pthread_t t;
11002         int status;
11003         int detach = 1;
11004
11005 #ifdef HAVE_PTHREADS_FINAL
11006         /* Final pthreads */
11007         pthread_attr_t attr;
11008
11009         status = pthread_attr_init(&attr);
11010         if( status ) return status;
11011
11012 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11013         if( !detach ) {
11014 #if defined( PTHREAD_CREATE_JOINABLE )
11015                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11016 #else
11017                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11018 #endif
11019
11020 #ifdef PTHREAD_CREATE_DETACHED
11021         } else {
11022                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11023 #endif
11024         }
11025         if( status ) return status;
11026 #endif
11027
11028         status = pthread_create( &t, &attr, task, NULL );
11029         if( status ) return status;
11030
11031 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11032         if( detach ) {
11033                 /* give thread a chance to complete */
11034                 /* it should remain joinable and hence detachable */
11035                 sleep( 1 );
11036
11037                 status = pthread_detach( t );
11038                 if( status ) return status;
11039         }
11040 #endif
11041
11042 #else
11043         /* Draft 4 pthreads */
11044         status = pthread_create( &t, pthread_attr_default, task, NULL );
11045         if( status ) return status;
11046
11047         if( detach ) {
11048                 /* give thread a chance to complete */
11049                 /* it should remain joinable and hence detachable */
11050                 sleep( 1 );
11051
11052                 status = pthread_detach( &t );
11053                 if( status ) return status;
11054         }
11055 #endif
11056
11057 #ifdef HAVE_LINUX_THREADS
11058         pthread_kill_other_threads_np();
11059 #endif
11060
11061         return 0;
11062
11063 }
11064
11065 EOF
11066 if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11067 then
11068   ol_cv_pthread_lib_lpthreads=yes
11069 else
11070   echo "configure: failed program was:" >&5
11071   cat conftest.$ac_ext >&5
11072   rm -fr conftest*
11073   ol_cv_pthread_lib_lpthreads=no
11074 fi
11075 rm -fr conftest*
11076 fi
11077
11078
11079                 # restore the LIBS
11080                 LIBS="$ol_LIBS"
11081         
11082 fi
11083
11084 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
11085
11086         if test $ol_cv_pthread_lib_lpthreads = yes ; then
11087                 ol_link_pthreads="-lpthreads"
11088                 ol_link_threads=posix
11089         fi
11090 fi
11091
11092
11093                 if test $ol_link_threads != no ; then
11094                         cat >> confdefs.h <<\EOF
11095 #define HAVE_PTHREADS 1
11096 EOF
11097
11098
11099                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
11100
11101                                                 save_CPPFLAGS="$CPPFLAGS"
11102                         save_LIBS="$LIBS"
11103                         LIBS="$LTHREAD_LIBS $LIBS"
11104
11105                                                                                                 for ac_func in sched_yield pthread_yield
11106 do
11107 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11108 echo "configure:11109: checking for $ac_func" >&5
11109 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115 /* System header to define __stub macros and hopefully few prototypes,
11116     which can conflict with char $ac_func(); below.  */
11117 #include <assert.h>
11118 /* Override any gcc2 internal prototype to avoid an error.  */
11119 /* We use char because int might match the return type of a gcc2
11120     builtin and then its argument prototype would still apply.  */
11121 char $ac_func();
11122 char (*f)();
11123
11124 int main() {
11125
11126 /* The GNU C library defines this for functions which it implements
11127     to always fail with ENOSYS.  Some functions are actually named
11128     something starting with __ and the normal name is an alias.  */
11129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11130 choke me
11131 #else
11132 f = $ac_func;
11133 #endif
11134
11135 ; return 0; }
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11138   rm -rf conftest*
11139   eval "ac_cv_func_$ac_func=yes"
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -rf conftest*
11144   eval "ac_cv_func_$ac_func=no"
11145 fi
11146 rm -f conftest*
11147 fi
11148
11149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11150   echo "$ac_t""yes" 1>&6
11151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11152   cat >> confdefs.h <<EOF
11153 #define $ac_tr_func 1
11154 EOF
11155  
11156 else
11157   echo "$ac_t""no" 1>&6
11158 fi
11159 done
11160
11161
11162                         if test $ac_cv_func_sched_yield = no -a \
11163                                 $ac_cv_func_pthread_yield = no ; then
11164                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
11165 echo "configure:11166: checking for sched_yield in -lrt" >&5
11166 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
11167 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170   ac_save_LIBS="$LIBS"
11171 LIBS="-lrt  $LIBS"
11172 cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 /* Override any gcc2 internal prototype to avoid an error.  */
11176 /* We use char because int might match the return type of a gcc2
11177     builtin and then its argument prototype would still apply.  */
11178 char sched_yield();
11179
11180 int main() {
11181 sched_yield()
11182 ; return 0; }
11183 EOF
11184 if { (eval echo configure:11185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11185   rm -rf conftest*
11186   eval "ac_cv_lib_$ac_lib_var=yes"
11187 else
11188   echo "configure: failed program was:" >&5
11189   cat conftest.$ac_ext >&5
11190   rm -rf conftest*
11191   eval "ac_cv_lib_$ac_lib_var=no"
11192 fi
11193 rm -f conftest*
11194 LIBS="$ac_save_LIBS"
11195
11196 fi
11197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11198   echo "$ac_t""yes" 1>&6
11199   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
11200                                         cat >> confdefs.h <<\EOF
11201 #define HAVE_SCHED_YIELD 1
11202 EOF
11203
11204                                         ac_cv_func_sched_yield=yes
11205 else
11206   echo "$ac_t""no" 1>&6
11207 ac_cv_func_sched_yield=no
11208 fi
11209
11210                         fi
11211                         if test $ac_cv_func_sched_yield = no -a \
11212                                 $ac_cv_func_pthread_yield = no ; then
11213                                                                                                 for ac_func in thr_yield
11214 do
11215 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11216 echo "configure:11217: checking for $ac_func" >&5
11217 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11218   echo $ac_n "(cached) $ac_c" 1>&6
11219 else
11220   cat > conftest.$ac_ext <<EOF
11221 #line 11222 "configure"
11222 #include "confdefs.h"
11223 /* System header to define __stub macros and hopefully few prototypes,
11224     which can conflict with char $ac_func(); below.  */
11225 #include <assert.h>
11226 /* Override any gcc2 internal prototype to avoid an error.  */
11227 /* We use char because int might match the return type of a gcc2
11228     builtin and then its argument prototype would still apply.  */
11229 char $ac_func();
11230 char (*f)();
11231
11232 int main() {
11233
11234 /* The GNU C library defines this for functions which it implements
11235     to always fail with ENOSYS.  Some functions are actually named
11236     something starting with __ and the normal name is an alias.  */
11237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11238 choke me
11239 #else
11240 f = $ac_func;
11241 #endif
11242
11243 ; return 0; }
11244 EOF
11245 if { (eval echo configure:11246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11246   rm -rf conftest*
11247   eval "ac_cv_func_$ac_func=yes"
11248 else
11249   echo "configure: failed program was:" >&5
11250   cat conftest.$ac_ext >&5
11251   rm -rf conftest*
11252   eval "ac_cv_func_$ac_func=no"
11253 fi
11254 rm -f conftest*
11255 fi
11256
11257 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11258   echo "$ac_t""yes" 1>&6
11259     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11260   cat >> confdefs.h <<EOF
11261 #define $ac_tr_func 1
11262 EOF
11263  
11264 else
11265   echo "$ac_t""no" 1>&6
11266 fi
11267 done
11268
11269                         fi
11270                         if test $ac_cv_func_sched_yield = no -a \
11271                                 $ac_cv_func_pthread_yield = no -a \
11272                                 "$ac_cv_func_thr_yield" = no ; then
11273                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
11274                         fi
11275
11276                                                 for ac_func in pthread_kill pthread_rwlock_destroy
11277 do
11278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11279 echo "configure:11280: checking for $ac_func" >&5
11280 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11281   echo $ac_n "(cached) $ac_c" 1>&6
11282 else
11283   cat > conftest.$ac_ext <<EOF
11284 #line 11285 "configure"
11285 #include "confdefs.h"
11286 /* System header to define __stub macros and hopefully few prototypes,
11287     which can conflict with char $ac_func(); below.  */
11288 #include <assert.h>
11289 /* Override any gcc2 internal prototype to avoid an error.  */
11290 /* We use char because int might match the return type of a gcc2
11291     builtin and then its argument prototype would still apply.  */
11292 char $ac_func();
11293 char (*f)();
11294
11295 int main() {
11296
11297 /* The GNU C library defines this for functions which it implements
11298     to always fail with ENOSYS.  Some functions are actually named
11299     something starting with __ and the normal name is an alias.  */
11300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11301 choke me
11302 #else
11303 f = $ac_func;
11304 #endif
11305
11306 ; return 0; }
11307 EOF
11308 if { (eval echo configure:11309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11309   rm -rf conftest*
11310   eval "ac_cv_func_$ac_func=yes"
11311 else
11312   echo "configure: failed program was:" >&5
11313   cat conftest.$ac_ext >&5
11314   rm -rf conftest*
11315   eval "ac_cv_func_$ac_func=no"
11316 fi
11317 rm -f conftest*
11318 fi
11319
11320 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11321   echo "$ac_t""yes" 1>&6
11322     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11323   cat >> confdefs.h <<EOF
11324 #define $ac_tr_func 1
11325 EOF
11326  
11327 else
11328   echo "$ac_t""no" 1>&6
11329 fi
11330 done
11331
11332
11333                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
11334 echo "configure:11335: checking for pthread_detach with <pthread.h>" >&5
11335 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
11336   echo $ac_n "(cached) $ac_c" 1>&6
11337 else
11338   
11339                                                                 cat > conftest.$ac_ext <<EOF
11340 #line 11341 "configure"
11341 #include "confdefs.h"
11342
11343 #include <pthread.h>
11344 #ifndef NULL
11345 #define NULL (void*)0
11346 #endif
11347
11348 int main() {
11349 pthread_detach(NULL);
11350 ; return 0; }
11351 EOF
11352 if { (eval echo configure:11353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11353   rm -rf conftest*
11354   ol_cv_func_pthread_detach=yes
11355 else
11356   echo "configure: failed program was:" >&5
11357   cat conftest.$ac_ext >&5
11358   rm -rf conftest*
11359   ol_cv_func_pthread_detach=no
11360 fi
11361 rm -f conftest*
11362                         
11363 fi
11364
11365 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
11366
11367                         if test $ol_cv_func_pthread_detach = no ; then
11368                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
11369                         fi
11370
11371                         cat >> confdefs.h <<\EOF
11372 #define HAVE_PTHREAD_DETACH 1
11373 EOF
11374
11375
11376                                                 for ac_func in \
11377                                 pthread_setconcurrency \
11378                                 pthread_getconcurrency \
11379                                 thr_setconcurrency \
11380                                 thr_getconcurrency \
11381                         
11382 do
11383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11384 echo "configure:11385: checking for $ac_func" >&5
11385 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11386   echo $ac_n "(cached) $ac_c" 1>&6
11387 else
11388   cat > conftest.$ac_ext <<EOF
11389 #line 11390 "configure"
11390 #include "confdefs.h"
11391 /* System header to define __stub macros and hopefully few prototypes,
11392     which can conflict with char $ac_func(); below.  */
11393 #include <assert.h>
11394 /* Override any gcc2 internal prototype to avoid an error.  */
11395 /* We use char because int might match the return type of a gcc2
11396     builtin and then its argument prototype would still apply.  */
11397 char $ac_func();
11398 char (*f)();
11399
11400 int main() {
11401
11402 /* The GNU C library defines this for functions which it implements
11403     to always fail with ENOSYS.  Some functions are actually named
11404     something starting with __ and the normal name is an alias.  */
11405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11406 choke me
11407 #else
11408 f = $ac_func;
11409 #endif
11410
11411 ; return 0; }
11412 EOF
11413 if { (eval echo configure:11414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11414   rm -rf conftest*
11415   eval "ac_cv_func_$ac_func=yes"
11416 else
11417   echo "configure: failed program was:" >&5
11418   cat conftest.$ac_ext >&5
11419   rm -rf conftest*
11420   eval "ac_cv_func_$ac_func=no"
11421 fi
11422 rm -f conftest*
11423 fi
11424
11425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11426   echo "$ac_t""yes" 1>&6
11427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11428   cat >> confdefs.h <<EOF
11429 #define $ac_tr_func 1
11430 EOF
11431  
11432 else
11433   echo "$ac_t""no" 1>&6
11434 fi
11435 done
11436
11437
11438                         
11439         for ac_func in pthread_kill_other_threads_np
11440 do
11441 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11442 echo "configure:11443: checking for $ac_func" >&5
11443 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11444   echo $ac_n "(cached) $ac_c" 1>&6
11445 else
11446   cat > conftest.$ac_ext <<EOF
11447 #line 11448 "configure"
11448 #include "confdefs.h"
11449 /* System header to define __stub macros and hopefully few prototypes,
11450     which can conflict with char $ac_func(); below.  */
11451 #include <assert.h>
11452 /* Override any gcc2 internal prototype to avoid an error.  */
11453 /* We use char because int might match the return type of a gcc2
11454     builtin and then its argument prototype would still apply.  */
11455 char $ac_func();
11456 char (*f)();
11457
11458 int main() {
11459
11460 /* The GNU C library defines this for functions which it implements
11461     to always fail with ENOSYS.  Some functions are actually named
11462     something starting with __ and the normal name is an alias.  */
11463 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11464 choke me
11465 #else
11466 f = $ac_func;
11467 #endif
11468
11469 ; return 0; }
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11472   rm -rf conftest*
11473   eval "ac_cv_func_$ac_func=yes"
11474 else
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   eval "ac_cv_func_$ac_func=no"
11479 fi
11480 rm -f conftest*
11481 fi
11482
11483 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11484   echo "$ac_t""yes" 1>&6
11485     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11486   cat >> confdefs.h <<EOF
11487 #define $ac_tr_func 1
11488 EOF
11489  
11490 else
11491   echo "$ac_t""no" 1>&6
11492 fi
11493 done
11494
11495         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
11496 echo "configure:11497: checking for LinuxThreads implementation" >&5
11497 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
11498   echo $ac_n "(cached) $ac_c" 1>&6
11499 else
11500   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
11501 fi
11502
11503 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
11504
11505                         
11506         
11507         
11508         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
11509 echo "configure:11510: checking for LinuxThreads consistency" >&5
11510 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
11511   echo $ac_n "(cached) $ac_c" 1>&6
11512 else
11513   
11514                 if test $ol_cv_header_linux_threads = yes -a \
11515                         $ol_cv_sys_linux_threads = yes; then
11516                         ol_cv_linux_threads=yes
11517                 elif test $ol_cv_header_linux_threads = no -a \
11518                         $ol_cv_sys_linux_threads = no; then
11519                         ol_cv_linux_threads=no
11520                 else
11521                         ol_cv_linux_threads=error
11522                 fi
11523         
11524 fi
11525
11526 echo "$ac_t""$ol_cv_linux_threads" 1>&6
11527
11528
11529                         if test $ol_cv_linux_threads = error; then
11530                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
11531                         fi
11532
11533                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
11534 echo "configure:11535: checking if pthread_create() works" >&5
11535 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
11536   echo $ac_n "(cached) $ac_c" 1>&6
11537 else
11538   
11539                         if test "$cross_compiling" = yes; then
11540                                 ol_cv_pthread_create_works=yes
11541 else
11542   cat > conftest.$ac_ext <<EOF
11543 #line 11544 "configure"
11544 #include "confdefs.h"
11545 /* pthread test headers */
11546 #include <pthread.h>
11547 #ifndef NULL
11548 #define NULL (void*)0
11549 #endif
11550
11551 static void *task(p)
11552         void *p;
11553 {
11554         return (void *) (p == NULL);
11555 }
11556
11557
11558 int main(argc, argv)
11559         int argc;
11560         char **argv;
11561 {
11562
11563         /* pthread test function */
11564         pthread_t t;
11565         int status;
11566         int detach = 1;
11567
11568 #ifdef HAVE_PTHREADS_FINAL
11569         /* Final pthreads */
11570         pthread_attr_t attr;
11571
11572         status = pthread_attr_init(&attr);
11573         if( status ) return status;
11574
11575 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11576         if( !detach ) {
11577 #if defined( PTHREAD_CREATE_JOINABLE )
11578                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11579 #else
11580                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11581 #endif
11582
11583 #ifdef PTHREAD_CREATE_DETACHED
11584         } else {
11585                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11586 #endif
11587         }
11588         if( status ) return status;
11589 #endif
11590
11591         status = pthread_create( &t, &attr, task, NULL );
11592         if( status ) return status;
11593
11594 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11595         if( detach ) {
11596                 /* give thread a chance to complete */
11597                 /* it should remain joinable and hence detachable */
11598                 sleep( 1 );
11599
11600                 status = pthread_detach( t );
11601                 if( status ) return status;
11602         }
11603 #endif
11604
11605 #else
11606         /* Draft 4 pthreads */
11607         status = pthread_create( &t, pthread_attr_default, task, NULL );
11608         if( status ) return status;
11609
11610         if( detach ) {
11611                 /* give thread a chance to complete */
11612                 /* it should remain joinable and hence detachable */
11613                 sleep( 1 );
11614
11615                 status = pthread_detach( &t );
11616                 if( status ) return status;
11617         }
11618 #endif
11619
11620 #ifdef HAVE_LINUX_THREADS
11621         pthread_kill_other_threads_np();
11622 #endif
11623
11624         return 0;
11625
11626 }
11627
11628 EOF
11629 if { (eval echo configure:11630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11630 then
11631   ol_cv_pthread_create_works=yes
11632 else
11633   echo "configure: failed program was:" >&5
11634   cat conftest.$ac_ext >&5
11635   rm -fr conftest*
11636   ol_cv_pthread_create_works=no
11637 fi
11638 rm -fr conftest*
11639 fi
11640
11641 fi
11642
11643 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
11644
11645                         if test $ol_cv_pthread_create_works = no ; then
11646                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
11647                         fi
11648
11649                                                 if test $ol_with_yielding_select = auto ; then
11650                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
11651 echo "configure:11652: checking if select yields when using pthreads" >&5
11652 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
11653   echo $ac_n "(cached) $ac_c" 1>&6
11654 else
11655   
11656                                 if test "$cross_compiling" = yes; then
11657   ol_cv_pthread_select_yields=cross
11658 else
11659   cat > conftest.$ac_ext <<EOF
11660 #line 11661 "configure"
11661 #include "confdefs.h"
11662
11663 #include <sys/types.h>
11664 #include <sys/time.h>
11665 #include <unistd.h>
11666 #include <pthread.h>
11667 #ifndef NULL
11668 #define NULL (void*) 0
11669 #endif
11670
11671 static int fildes[2];
11672
11673 static void *task(p)
11674         void *p;
11675 {
11676         int i;
11677         struct timeval tv;
11678
11679         fd_set rfds;
11680
11681         tv.tv_sec=10;
11682         tv.tv_usec=0;
11683
11684         FD_ZERO(&rfds);
11685         FD_SET(fildes[0], &rfds);
11686
11687         /* we're not interested in any fds */
11688         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
11689
11690         if(i < 0) {
11691                 perror("select");
11692                 exit(10);
11693         }
11694
11695         exit(0); /* if we exit here, the select blocked the whole process */
11696 }
11697
11698 int main(argc, argv)
11699         int argc;
11700         char **argv;
11701 {
11702         pthread_t t;
11703
11704         /* create a pipe to select */
11705         if(pipe(&fildes[0])) {
11706                 perror("select");
11707                 exit(1);
11708         }
11709
11710 #ifdef HAVE_PTHREAD_SETCONCURRENCY
11711         (void) pthread_setconcurrency(2);
11712 #else
11713 #ifdef HAVE_THR_SETCONCURRENCY
11714         /* Set Solaris LWP concurrency to 2 */
11715         thr_setconcurrency(2);
11716 #endif
11717 #endif
11718
11719 #if HAVE_PTHREADS_D4
11720         pthread_create(&t, pthread_attr_default, task, NULL);
11721 #else
11722         pthread_create(&t, NULL, task, NULL);
11723 #endif
11724
11725 #if HAVE_SCHED_YIELD
11726         sched_yield();  /* make sure task runs first */
11727 #else
11728 #ifdef HAVE_PTHREAD_YIELD
11729         pthread_yield();        /* make sure task runs first */
11730 #endif
11731 #endif
11732
11733         exit(2);
11734 }
11735 EOF
11736 if { (eval echo configure:11737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11737 then
11738   ol_cv_pthread_select_yields=no
11739 else
11740   echo "configure: failed program was:" >&5
11741   cat conftest.$ac_ext >&5
11742   rm -fr conftest*
11743   ol_cv_pthread_select_yields=yes
11744 fi
11745 rm -fr conftest*
11746 fi
11747
11748 fi
11749
11750 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
11751
11752                                 if test $ol_cv_pthread_select_yields = cross ; then
11753                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
11754                                 fi
11755
11756                                 if test $ol_cv_pthread_select_yields = yes ; then
11757                                         ol_with_yielding_select=yes
11758                                 fi
11759                         fi
11760
11761                                                 CPPFLAGS="$save_CPPFLAGS"
11762                         LIBS="$save_LIBS"
11763                 else
11764                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
11765                 fi
11766         fi
11767
11768         if test $ol_with_threads = posix ; then
11769                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
11770         fi
11771 fi
11772
11773 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11774         -o $ol_with_threads = mach ; then
11775
11776                 for ac_hdr in mach/cthreads.h
11777 do
11778 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11779 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11780 echo "configure:11781: checking for $ac_hdr" >&5
11781 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11782   echo $ac_n "(cached) $ac_c" 1>&6
11783 else
11784   cat > conftest.$ac_ext <<EOF
11785 #line 11786 "configure"
11786 #include "confdefs.h"
11787 #include <$ac_hdr>
11788 EOF
11789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11790 { (eval echo configure:11791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11792 if test -z "$ac_err"; then
11793   rm -rf conftest*
11794   eval "ac_cv_header_$ac_safe=yes"
11795 else
11796   echo "$ac_err" >&5
11797   echo "configure: failed program was:" >&5
11798   cat conftest.$ac_ext >&5
11799   rm -rf conftest*
11800   eval "ac_cv_header_$ac_safe=no"
11801 fi
11802 rm -f conftest*
11803 fi
11804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11805   echo "$ac_t""yes" 1>&6
11806     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11807   cat >> confdefs.h <<EOF
11808 #define $ac_tr_hdr 1
11809 EOF
11810  
11811 else
11812   echo "$ac_t""no" 1>&6
11813 fi
11814 done
11815
11816         if test $ac_cv_header_mach_cthreads_h = yes ; then
11817                 ol_with_threads=found
11818
11819                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
11820 echo "configure:11821: checking for cthread_fork" >&5
11821 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
11822   echo $ac_n "(cached) $ac_c" 1>&6
11823 else
11824   cat > conftest.$ac_ext <<EOF
11825 #line 11826 "configure"
11826 #include "confdefs.h"
11827 /* System header to define __stub macros and hopefully few prototypes,
11828     which can conflict with char cthread_fork(); below.  */
11829 #include <assert.h>
11830 /* Override any gcc2 internal prototype to avoid an error.  */
11831 /* We use char because int might match the return type of a gcc2
11832     builtin and then its argument prototype would still apply.  */
11833 char cthread_fork();
11834 char (*f)();
11835
11836 int main() {
11837
11838 /* The GNU C library defines this for functions which it implements
11839     to always fail with ENOSYS.  Some functions are actually named
11840     something starting with __ and the normal name is an alias.  */
11841 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
11842 choke me
11843 #else
11844 f = cthread_fork;
11845 #endif
11846
11847 ; return 0; }
11848 EOF
11849 if { (eval echo configure:11850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11850   rm -rf conftest*
11851   eval "ac_cv_func_cthread_fork=yes"
11852 else
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -rf conftest*
11856   eval "ac_cv_func_cthread_fork=no"
11857 fi
11858 rm -f conftest*
11859 fi
11860
11861 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
11862   echo "$ac_t""yes" 1>&6
11863   ol_link_threads=yes
11864 else
11865   echo "$ac_t""no" 1>&6
11866 fi
11867
11868
11869                 if test $ol_link_threads = no ; then
11870                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
11871 echo "configure:11872: checking for cthread_fork with -all_load" >&5
11872 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
11873   echo $ac_n "(cached) $ac_c" 1>&6
11874 else
11875   
11876                                                                 save_LIBS="$LIBS"
11877                                 LIBS="-all_load $LIBS"
11878                                 cat > conftest.$ac_ext <<EOF
11879 #line 11880 "configure"
11880 #include "confdefs.h"
11881 #include <mach/cthreads.h>
11882 int main() {
11883
11884                                         cthread_fork((void *)0, (void *)0);
11885                                         
11886 ; return 0; }
11887 EOF
11888 if { (eval echo configure:11889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11889   rm -rf conftest*
11890   ol_cv_cthread_all_load=yes
11891 else
11892   echo "configure: failed program was:" >&5
11893   cat conftest.$ac_ext >&5
11894   rm -rf conftest*
11895   ol_cv_cthread_all_load=no
11896 fi
11897 rm -f conftest*
11898                                                                 LIBS="$save_LIBS"
11899                         
11900 fi
11901
11902 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
11903
11904                         if test $ol_cv_cthread_all_load = yes ; then
11905                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
11906                                 ol_link_threads=mach
11907                         fi
11908                 fi
11909
11910                 if test $ol_link_threads != no ; then
11911                         : check for cthread specific functionality here
11912                         cat >> confdefs.h <<\EOF
11913 #define HAVE_MACH_CTHREADS 1
11914 EOF
11915
11916                 else
11917                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
11918                 fi
11919         fi
11920
11921         if test $ol_with_threads = mach ; then
11922                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
11923         fi
11924 fi
11925
11926 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11927         -o $ol_with_threads = pth ; then
11928
11929         for ac_hdr in pth.h
11930 do
11931 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11932 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11933 echo "configure:11934: checking for $ac_hdr" >&5
11934 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11935   echo $ac_n "(cached) $ac_c" 1>&6
11936 else
11937   cat > conftest.$ac_ext <<EOF
11938 #line 11939 "configure"
11939 #include "confdefs.h"
11940 #include <$ac_hdr>
11941 EOF
11942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11943 { (eval echo configure:11944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11945 if test -z "$ac_err"; then
11946   rm -rf conftest*
11947   eval "ac_cv_header_$ac_safe=yes"
11948 else
11949   echo "$ac_err" >&5
11950   echo "configure: failed program was:" >&5
11951   cat conftest.$ac_ext >&5
11952   rm -rf conftest*
11953   eval "ac_cv_header_$ac_safe=no"
11954 fi
11955 rm -f conftest*
11956 fi
11957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11958   echo "$ac_t""yes" 1>&6
11959     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11960   cat >> confdefs.h <<EOF
11961 #define $ac_tr_hdr 1
11962 EOF
11963  
11964 else
11965   echo "$ac_t""no" 1>&6
11966 fi
11967 done
11968
11969
11970         if test $ac_cv_header_pth_h = yes ; then
11971                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11972 echo "configure:11973: checking for pth_version in -lpth" >&5
11973 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11974 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11975   echo $ac_n "(cached) $ac_c" 1>&6
11976 else
11977   ac_save_LIBS="$LIBS"
11978 LIBS="-lpth  $LIBS"
11979 cat > conftest.$ac_ext <<EOF
11980 #line 11981 "configure"
11981 #include "confdefs.h"
11982 /* Override any gcc2 internal prototype to avoid an error.  */
11983 /* We use char because int might match the return type of a gcc2
11984     builtin and then its argument prototype would still apply.  */
11985 char pth_version();
11986
11987 int main() {
11988 pth_version()
11989 ; return 0; }
11990 EOF
11991 if { (eval echo configure:11992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11992   rm -rf conftest*
11993   eval "ac_cv_lib_$ac_lib_var=yes"
11994 else
11995   echo "configure: failed program was:" >&5
11996   cat conftest.$ac_ext >&5
11997   rm -rf conftest*
11998   eval "ac_cv_lib_$ac_lib_var=no"
11999 fi
12000 rm -f conftest*
12001 LIBS="$ac_save_LIBS"
12002
12003 fi
12004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12005   echo "$ac_t""yes" 1>&6
12006   have_pth=yes
12007 else
12008   echo "$ac_t""no" 1>&6
12009 have_pth=no
12010 fi
12011
12012
12013                 if test $have_pth = yes ; then
12014                         cat >> confdefs.h <<\EOF
12015 #define HAVE_GNU_PTH 1
12016 EOF
12017
12018                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
12019                         ol_link_threads=pth
12020
12021                         if test $ol_with_yielding_select = auto ; then
12022                                 ol_with_yielding_select=yes
12023                         fi
12024                 fi
12025         fi
12026 fi
12027
12028 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12029         -o $ol_with_threads = lwp ; then
12030
12031                 for ac_hdr in thread.h synch.h
12032 do
12033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12035 echo "configure:12036: checking for $ac_hdr" >&5
12036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12037   echo $ac_n "(cached) $ac_c" 1>&6
12038 else
12039   cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12042 #include <$ac_hdr>
12043 EOF
12044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12045 { (eval echo configure:12046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12047 if test -z "$ac_err"; then
12048   rm -rf conftest*
12049   eval "ac_cv_header_$ac_safe=yes"
12050 else
12051   echo "$ac_err" >&5
12052   echo "configure: failed program was:" >&5
12053   cat conftest.$ac_ext >&5
12054   rm -rf conftest*
12055   eval "ac_cv_header_$ac_safe=no"
12056 fi
12057 rm -f conftest*
12058 fi
12059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12060   echo "$ac_t""yes" 1>&6
12061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12062   cat >> confdefs.h <<EOF
12063 #define $ac_tr_hdr 1
12064 EOF
12065  
12066 else
12067   echo "$ac_t""no" 1>&6
12068 fi
12069 done
12070
12071         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
12072                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
12073 echo "configure:12074: checking for thr_create in -lthread" >&5
12074 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
12075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12076   echo $ac_n "(cached) $ac_c" 1>&6
12077 else
12078   ac_save_LIBS="$LIBS"
12079 LIBS="-lthread  $LIBS"
12080 cat > conftest.$ac_ext <<EOF
12081 #line 12082 "configure"
12082 #include "confdefs.h"
12083 /* Override any gcc2 internal prototype to avoid an error.  */
12084 /* We use char because int might match the return type of a gcc2
12085     builtin and then its argument prototype would still apply.  */
12086 char thr_create();
12087
12088 int main() {
12089 thr_create()
12090 ; return 0; }
12091 EOF
12092 if { (eval echo configure:12093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12093   rm -rf conftest*
12094   eval "ac_cv_lib_$ac_lib_var=yes"
12095 else
12096   echo "configure: failed program was:" >&5
12097   cat conftest.$ac_ext >&5
12098   rm -rf conftest*
12099   eval "ac_cv_lib_$ac_lib_var=no"
12100 fi
12101 rm -f conftest*
12102 LIBS="$ac_save_LIBS"
12103
12104 fi
12105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12106   echo "$ac_t""yes" 1>&6
12107   have_thr=yes
12108 else
12109   echo "$ac_t""no" 1>&6
12110 have_thr=no
12111 fi
12112
12113
12114                 if test $have_thr = yes ; then
12115                         cat >> confdefs.h <<\EOF
12116 #define HAVE_THR 1
12117 EOF
12118
12119                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
12120                         ol_link_threads=thr
12121
12122                         if test $ol_with_yielding_select = auto ; then
12123                                 ol_with_yielding_select=yes
12124                         fi
12125
12126                                                 for ac_func in \
12127                                 thr_setconcurrency \
12128                                 thr_getconcurrency \
12129                         
12130 do
12131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12132 echo "configure:12133: checking for $ac_func" >&5
12133 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12134   echo $ac_n "(cached) $ac_c" 1>&6
12135 else
12136   cat > conftest.$ac_ext <<EOF
12137 #line 12138 "configure"
12138 #include "confdefs.h"
12139 /* System header to define __stub macros and hopefully few prototypes,
12140     which can conflict with char $ac_func(); below.  */
12141 #include <assert.h>
12142 /* Override any gcc2 internal prototype to avoid an error.  */
12143 /* We use char because int might match the return type of a gcc2
12144     builtin and then its argument prototype would still apply.  */
12145 char $ac_func();
12146 char (*f)();
12147
12148 int main() {
12149
12150 /* The GNU C library defines this for functions which it implements
12151     to always fail with ENOSYS.  Some functions are actually named
12152     something starting with __ and the normal name is an alias.  */
12153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12154 choke me
12155 #else
12156 f = $ac_func;
12157 #endif
12158
12159 ; return 0; }
12160 EOF
12161 if { (eval echo configure:12162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12162   rm -rf conftest*
12163   eval "ac_cv_func_$ac_func=yes"
12164 else
12165   echo "configure: failed program was:" >&5
12166   cat conftest.$ac_ext >&5
12167   rm -rf conftest*
12168   eval "ac_cv_func_$ac_func=no"
12169 fi
12170 rm -f conftest*
12171 fi
12172
12173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12174   echo "$ac_t""yes" 1>&6
12175     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12176   cat >> confdefs.h <<EOF
12177 #define $ac_tr_func 1
12178 EOF
12179  
12180 else
12181   echo "$ac_t""no" 1>&6
12182 fi
12183 done
12184
12185                 fi
12186         fi
12187
12188                 for ac_hdr in lwp/lwp.h
12189 do
12190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12192 echo "configure:12193: checking for $ac_hdr" >&5
12193 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12194   echo $ac_n "(cached) $ac_c" 1>&6
12195 else
12196   cat > conftest.$ac_ext <<EOF
12197 #line 12198 "configure"
12198 #include "confdefs.h"
12199 #include <$ac_hdr>
12200 EOF
12201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12202 { (eval echo configure:12203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12204 if test -z "$ac_err"; then
12205   rm -rf conftest*
12206   eval "ac_cv_header_$ac_safe=yes"
12207 else
12208   echo "$ac_err" >&5
12209   echo "configure: failed program was:" >&5
12210   cat conftest.$ac_ext >&5
12211   rm -rf conftest*
12212   eval "ac_cv_header_$ac_safe=no"
12213 fi
12214 rm -f conftest*
12215 fi
12216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12217   echo "$ac_t""yes" 1>&6
12218     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12219   cat >> confdefs.h <<EOF
12220 #define $ac_tr_hdr 1
12221 EOF
12222  
12223 else
12224   echo "$ac_t""no" 1>&6
12225 fi
12226 done
12227
12228         if test $ac_cv_header_lwp_lwp_h = yes ; then
12229                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
12230 echo "configure:12231: checking for lwp_create in -llwp" >&5
12231 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
12232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12233   echo $ac_n "(cached) $ac_c" 1>&6
12234 else
12235   ac_save_LIBS="$LIBS"
12236 LIBS="-llwp  $LIBS"
12237 cat > conftest.$ac_ext <<EOF
12238 #line 12239 "configure"
12239 #include "confdefs.h"
12240 /* Override any gcc2 internal prototype to avoid an error.  */
12241 /* We use char because int might match the return type of a gcc2
12242     builtin and then its argument prototype would still apply.  */
12243 char lwp_create();
12244
12245 int main() {
12246 lwp_create()
12247 ; return 0; }
12248 EOF
12249 if { (eval echo configure:12250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12250   rm -rf conftest*
12251   eval "ac_cv_lib_$ac_lib_var=yes"
12252 else
12253   echo "configure: failed program was:" >&5
12254   cat conftest.$ac_ext >&5
12255   rm -rf conftest*
12256   eval "ac_cv_lib_$ac_lib_var=no"
12257 fi
12258 rm -f conftest*
12259 LIBS="$ac_save_LIBS"
12260
12261 fi
12262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12263   echo "$ac_t""yes" 1>&6
12264   have_lwp=yes
12265 else
12266   echo "$ac_t""no" 1>&6
12267 have_lwp=no
12268 fi
12269
12270
12271                 if test $have_lwp = yes ; then
12272                         cat >> confdefs.h <<\EOF
12273 #define HAVE_LWP 1
12274 EOF
12275
12276                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
12277                         ol_link_threads=lwp
12278
12279                         if test $ol_with_yielding_select = auto ; then
12280                                 ol_with_yielding_select=no
12281                         fi
12282                 fi
12283         fi
12284 fi
12285
12286 if test $ol_with_yielding_select = yes ; then
12287         cat >> confdefs.h <<\EOF
12288 #define HAVE_YIELDING_SELECT 1
12289 EOF
12290
12291 fi
12292
12293 if test $ol_with_threads = manual ; then
12294                 ol_link_threads=yes
12295
12296         echo "configure: warning: thread defines and link options must be set manually" 1>&2
12297
12298         for ac_hdr in pthread.h sched.h
12299 do
12300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12302 echo "configure:12303: checking for $ac_hdr" >&5
12303 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12304   echo $ac_n "(cached) $ac_c" 1>&6
12305 else
12306   cat > conftest.$ac_ext <<EOF
12307 #line 12308 "configure"
12308 #include "confdefs.h"
12309 #include <$ac_hdr>
12310 EOF
12311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12312 { (eval echo configure:12313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12314 if test -z "$ac_err"; then
12315   rm -rf conftest*
12316   eval "ac_cv_header_$ac_safe=yes"
12317 else
12318   echo "$ac_err" >&5
12319   echo "configure: failed program was:" >&5
12320   cat conftest.$ac_ext >&5
12321   rm -rf conftest*
12322   eval "ac_cv_header_$ac_safe=no"
12323 fi
12324 rm -f conftest*
12325 fi
12326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12327   echo "$ac_t""yes" 1>&6
12328     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12329   cat >> confdefs.h <<EOF
12330 #define $ac_tr_hdr 1
12331 EOF
12332  
12333 else
12334   echo "$ac_t""no" 1>&6
12335 fi
12336 done
12337
12338         for ac_func in sched_yield pthread_yield
12339 do
12340 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12341 echo "configure:12342: checking for $ac_func" >&5
12342 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12343   echo $ac_n "(cached) $ac_c" 1>&6
12344 else
12345   cat > conftest.$ac_ext <<EOF
12346 #line 12347 "configure"
12347 #include "confdefs.h"
12348 /* System header to define __stub macros and hopefully few prototypes,
12349     which can conflict with char $ac_func(); below.  */
12350 #include <assert.h>
12351 /* Override any gcc2 internal prototype to avoid an error.  */
12352 /* We use char because int might match the return type of a gcc2
12353     builtin and then its argument prototype would still apply.  */
12354 char $ac_func();
12355 char (*f)();
12356
12357 int main() {
12358
12359 /* The GNU C library defines this for functions which it implements
12360     to always fail with ENOSYS.  Some functions are actually named
12361     something starting with __ and the normal name is an alias.  */
12362 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12363 choke me
12364 #else
12365 f = $ac_func;
12366 #endif
12367
12368 ; return 0; }
12369 EOF
12370 if { (eval echo configure:12371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12371   rm -rf conftest*
12372   eval "ac_cv_func_$ac_func=yes"
12373 else
12374   echo "configure: failed program was:" >&5
12375   cat conftest.$ac_ext >&5
12376   rm -rf conftest*
12377   eval "ac_cv_func_$ac_func=no"
12378 fi
12379 rm -f conftest*
12380 fi
12381
12382 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12383   echo "$ac_t""yes" 1>&6
12384     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12385   cat >> confdefs.h <<EOF
12386 #define $ac_tr_func 1
12387 EOF
12388  
12389 else
12390   echo "$ac_t""no" 1>&6
12391 fi
12392 done
12393
12394         
12395         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
12396 echo "configure:12397: checking for LinuxThreads pthread.h" >&5
12397 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
12398   echo $ac_n "(cached) $ac_c" 1>&6
12399 else
12400   cat > conftest.$ac_ext <<EOF
12401 #line 12402 "configure"
12402 #include "confdefs.h"
12403 #include <pthread.h>
12404 EOF
12405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12406   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
12407   rm -rf conftest*
12408   ol_cv_header_linux_threads=yes
12409 else
12410   rm -rf conftest*
12411   ol_cv_header_linux_threads=no
12412 fi
12413 rm -f conftest*
12414
12415                 
12416 fi
12417
12418 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12419         if test $ol_cv_header_linux_threads = yes; then
12420                 cat >> confdefs.h <<\EOF
12421 #define HAVE_LINUX_THREADS 1
12422 EOF
12423
12424         fi
12425
12426
12427         for ac_hdr in mach/cthreads.h
12428 do
12429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12431 echo "configure:12432: checking for $ac_hdr" >&5
12432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12433   echo $ac_n "(cached) $ac_c" 1>&6
12434 else
12435   cat > conftest.$ac_ext <<EOF
12436 #line 12437 "configure"
12437 #include "confdefs.h"
12438 #include <$ac_hdr>
12439 EOF
12440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12441 { (eval echo configure:12442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12443 if test -z "$ac_err"; then
12444   rm -rf conftest*
12445   eval "ac_cv_header_$ac_safe=yes"
12446 else
12447   echo "$ac_err" >&5
12448   echo "configure: failed program was:" >&5
12449   cat conftest.$ac_ext >&5
12450   rm -rf conftest*
12451   eval "ac_cv_header_$ac_safe=no"
12452 fi
12453 rm -f conftest*
12454 fi
12455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12456   echo "$ac_t""yes" 1>&6
12457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12458   cat >> confdefs.h <<EOF
12459 #define $ac_tr_hdr 1
12460 EOF
12461  
12462 else
12463   echo "$ac_t""no" 1>&6
12464 fi
12465 done
12466
12467         for ac_hdr in lwp/lwp.h
12468 do
12469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12471 echo "configure:12472: checking for $ac_hdr" >&5
12472 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12473   echo $ac_n "(cached) $ac_c" 1>&6
12474 else
12475   cat > conftest.$ac_ext <<EOF
12476 #line 12477 "configure"
12477 #include "confdefs.h"
12478 #include <$ac_hdr>
12479 EOF
12480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12481 { (eval echo configure:12482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12483 if test -z "$ac_err"; then
12484   rm -rf conftest*
12485   eval "ac_cv_header_$ac_safe=yes"
12486 else
12487   echo "$ac_err" >&5
12488   echo "configure: failed program was:" >&5
12489   cat conftest.$ac_ext >&5
12490   rm -rf conftest*
12491   eval "ac_cv_header_$ac_safe=no"
12492 fi
12493 rm -f conftest*
12494 fi
12495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12496   echo "$ac_t""yes" 1>&6
12497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12498   cat >> confdefs.h <<EOF
12499 #define $ac_tr_hdr 1
12500 EOF
12501  
12502 else
12503   echo "$ac_t""no" 1>&6
12504 fi
12505 done
12506
12507         for ac_hdr in thread.h synch.h
12508 do
12509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12511 echo "configure:12512: checking for $ac_hdr" >&5
12512 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12513   echo $ac_n "(cached) $ac_c" 1>&6
12514 else
12515   cat > conftest.$ac_ext <<EOF
12516 #line 12517 "configure"
12517 #include "confdefs.h"
12518 #include <$ac_hdr>
12519 EOF
12520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12521 { (eval echo configure:12522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12523 if test -z "$ac_err"; then
12524   rm -rf conftest*
12525   eval "ac_cv_header_$ac_safe=yes"
12526 else
12527   echo "$ac_err" >&5
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -rf conftest*
12531   eval "ac_cv_header_$ac_safe=no"
12532 fi
12533 rm -f conftest*
12534 fi
12535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12536   echo "$ac_t""yes" 1>&6
12537     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12538   cat >> confdefs.h <<EOF
12539 #define $ac_tr_hdr 1
12540 EOF
12541  
12542 else
12543   echo "$ac_t""no" 1>&6
12544 fi
12545 done
12546
12547 fi
12548
12549 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
12550                         cat >> confdefs.h <<\EOF
12551 #define REENTRANT 1
12552 EOF
12553
12554         cat >> confdefs.h <<\EOF
12555 #define _REENTRANT 1
12556 EOF
12557
12558         cat >> confdefs.h <<\EOF
12559 #define THREAD_SAFE 1
12560 EOF
12561
12562         cat >> confdefs.h <<\EOF
12563 #define _THREAD_SAFE 1
12564 EOF
12565
12566         cat >> confdefs.h <<\EOF
12567 #define THREADSAFE 1
12568 EOF
12569
12570         cat >> confdefs.h <<\EOF
12571 #define _THREADSAFE 1
12572 EOF
12573
12574         cat >> confdefs.h <<\EOF
12575 #define _SGI_MP_SOURCE 1
12576 EOF
12577
12578
12579                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
12580 echo "configure:12581: checking for thread specific errno" >&5
12581 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
12582   echo $ac_n "(cached) $ac_c" 1>&6
12583 else
12584   
12585                 cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12588 #include <errno.h>
12589 int main() {
12590 errno = 0;
12591 ; return 0; }
12592 EOF
12593 if { (eval echo configure:12594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12594   rm -rf conftest*
12595   ol_cv_errno_thread_specific=yes
12596 else
12597   echo "configure: failed program was:" >&5
12598   cat conftest.$ac_ext >&5
12599   rm -rf conftest*
12600   ol_cv_errno_thread_specific=no
12601 fi
12602 rm -f conftest*
12603         
12604 fi
12605
12606 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
12607
12608                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
12609 echo "configure:12610: checking for thread specific h_errno" >&5
12610 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
12611   echo $ac_n "(cached) $ac_c" 1>&6
12612 else
12613   
12614                 cat > conftest.$ac_ext <<EOF
12615 #line 12616 "configure"
12616 #include "confdefs.h"
12617 #include <netdb.h>
12618 int main() {
12619 h_errno = 0;
12620 ; return 0; }
12621 EOF
12622 if { (eval echo configure:12623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12623   rm -rf conftest*
12624   ol_cv_h_errno_thread_specific=yes
12625 else
12626   echo "configure: failed program was:" >&5
12627   cat conftest.$ac_ext >&5
12628   rm -rf conftest*
12629   ol_cv_h_errno_thread_specific=no
12630 fi
12631 rm -f conftest*
12632         
12633 fi
12634
12635 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
12636
12637         if test $ol_cv_errno_thread_specific != yes \
12638                 -o $ol_cv_h_errno_thread_specific != yes ; then
12639                 LIBS="$LTHREAD_LIBS $LIBS"
12640                 LTHREAD_LIBS=""
12641         fi
12642
12643 fi  
12644
12645 if test $ol_link_threads = no ; then
12646         if test $ol_with_threads = yes ; then
12647                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
12648         fi
12649
12650         if test $ol_with_threads = auto ; then
12651                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
12652                 ol_with_threads=no
12653         fi
12654
12655         cat >> confdefs.h <<\EOF
12656 #define NO_THREADS 1
12657 EOF
12658
12659         LTHREAD_LIBS=""
12660 fi
12661
12662 if test $ol_link_threads != no ; then
12663         cat >> confdefs.h <<\EOF
12664 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
12665 EOF
12666
12667 fi
12668
12669 ol_link_ldbm=no 
12670
12671 if test $ol_with_ldbm_api = auto \
12672         -o $ol_with_ldbm_api = berkeley \
12673         -o $ol_with_ldbm_api = bcompat ; then
12674
12675         if test $ol_with_ldbm_api = bcompat; then \
12676                 ol_cv_berkeley_db=no
12677 for ac_hdr in db_185.h db.h
12678 do
12679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12681 echo "configure:12682: checking for $ac_hdr" >&5
12682 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12683   echo $ac_n "(cached) $ac_c" 1>&6
12684 else
12685   cat > conftest.$ac_ext <<EOF
12686 #line 12687 "configure"
12687 #include "confdefs.h"
12688 #include <$ac_hdr>
12689 EOF
12690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12691 { (eval echo configure:12692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12693 if test -z "$ac_err"; then
12694   rm -rf conftest*
12695   eval "ac_cv_header_$ac_safe=yes"
12696 else
12697   echo "$ac_err" >&5
12698   echo "configure: failed program was:" >&5
12699   cat conftest.$ac_ext >&5
12700   rm -rf conftest*
12701   eval "ac_cv_header_$ac_safe=no"
12702 fi
12703 rm -f conftest*
12704 fi
12705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12706   echo "$ac_t""yes" 1>&6
12707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12708   cat >> confdefs.h <<EOF
12709 #define $ac_tr_hdr 1
12710 EOF
12711  
12712 else
12713   echo "$ac_t""no" 1>&6
12714 fi
12715 done
12716
12717 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
12718         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
12719 echo "configure:12720: checking if Berkeley DB header compatibility" >&5
12720 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
12721   echo $ac_n "(cached) $ac_c" 1>&6
12722 else
12723   
12724                 cat > conftest.$ac_ext <<EOF
12725 #line 12726 "configure"
12726 #include "confdefs.h"
12727
12728 #if HAVE_DB_185_H
12729 #       include <db_185.h>
12730 #else
12731 #       include <db.h>
12732 #endif
12733
12734  /* this check could be improved */
12735 #ifndef DB_VERSION_MAJOR
12736 #       define DB_VERSION_MAJOR 1
12737 #endif
12738
12739 #if DB_VERSION_MAJOR == 1 
12740         __db_version_1
12741 #endif
12742
12743 EOF
12744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12745   egrep "__db_version_1" >/dev/null 2>&1; then
12746   rm -rf conftest*
12747   ol_cv_header_db1=yes
12748 else
12749   rm -rf conftest*
12750   ol_cv_header_db1=no
12751 fi
12752 rm -f conftest*
12753
12754 fi
12755
12756 echo "$ac_t""$ol_cv_header_db1" 1>&6
12757
12758         if test $ol_cv_header_db1 = yes ; then
12759                 ol_cv_lib_db=no
12760 if test $ol_cv_lib_db = no ; then
12761         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12762 echo "configure:12763: checking for Berkeley DB link (default)" >&5
12763 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12764   echo $ac_n "(cached) $ac_c" 1>&6
12765 else
12766   
12767         ol_DB_LIB=
12768         ol_LIBS=$LIBS
12769         LIBS="$ol_DB_LIB $LIBS"
12770
12771         cat > conftest.$ac_ext <<EOF
12772 #line 12773 "configure"
12773 #include "confdefs.h"
12774
12775 #ifdef HAVE_DB_185_H
12776 # include <db_185.h>
12777 #else
12778 # include <db.h>
12779 #endif
12780
12781 #ifndef DB_VERSION_MAJOR
12782 # define DB_VERSION_MAJOR 1
12783 #endif
12784
12785 #ifndef NULL
12786 #define NULL ((void*)0)
12787 #endif
12788
12789 int main() {
12790
12791 #if DB_VERSION_MAJOR > 1
12792         {
12793                 char *version;
12794                 int major, minor, patch;
12795
12796                 version = db_version( &major, &minor, &patch );
12797
12798                 if( major != DB_VERSION_MAJOR ||
12799                         minor < DB_VERSION_MINOR )
12800                 {
12801                         printf("Berkeley DB version mismatch\n"
12802                                 "\texpected: %s\n\tgot: %s\n",
12803                                 DB_VERSION_STRING, version);
12804                         return 1;
12805                 }
12806         }
12807 #endif
12808
12809 #if DB_VERSION_MAJOR > 2
12810         db_env_create( NULL, 0 );
12811 #elif DB_VERSION_MAJOR > 1
12812         db_appexit( NULL );
12813 #else
12814         (void) dbopen( NULL, 0, 0, 0, NULL);
12815 #endif
12816
12817 ; return 0; }
12818 EOF
12819 if { (eval echo configure:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12820   rm -rf conftest*
12821   ol_cv_db_none=yes
12822 else
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -rf conftest*
12826   ol_cv_db_none=no
12827 fi
12828 rm -f conftest*
12829
12830         LIBS="$ol_LIBS"
12831
12832 fi
12833
12834 echo "$ac_t""$ol_cv_db_none" 1>&6
12835
12836         if test $ol_cv_db_none = yes ; then
12837                 ol_cv_lib_db=yes
12838         fi
12839 fi
12840
12841 if test $ol_cv_lib_db = no ; then
12842         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12843 echo "configure:12844: checking for Berkeley DB link (-ldb)" >&5
12844 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12845   echo $ac_n "(cached) $ac_c" 1>&6
12846 else
12847   
12848         ol_DB_LIB=-ldb
12849         ol_LIBS=$LIBS
12850         LIBS="$ol_DB_LIB $LIBS"
12851
12852         cat > conftest.$ac_ext <<EOF
12853 #line 12854 "configure"
12854 #include "confdefs.h"
12855
12856 #ifdef HAVE_DB_185_H
12857 # include <db_185.h>
12858 #else
12859 # include <db.h>
12860 #endif
12861
12862 #ifndef DB_VERSION_MAJOR
12863 # define DB_VERSION_MAJOR 1
12864 #endif
12865
12866 #ifndef NULL
12867 #define NULL ((void*)0)
12868 #endif
12869
12870 int main() {
12871
12872 #if DB_VERSION_MAJOR > 1
12873         {
12874                 char *version;
12875                 int major, minor, patch;
12876
12877                 version = db_version( &major, &minor, &patch );
12878
12879                 if( major != DB_VERSION_MAJOR ||
12880                         minor < DB_VERSION_MINOR )
12881                 {
12882                         printf("Berkeley DB version mismatch\n"
12883                                 "\texpected: %s\n\tgot: %s\n",
12884                                 DB_VERSION_STRING, version);
12885                         return 1;
12886                 }
12887         }
12888 #endif
12889
12890 #if DB_VERSION_MAJOR > 2
12891         db_env_create( NULL, 0 );
12892 #elif DB_VERSION_MAJOR > 1
12893         db_appexit( NULL );
12894 #else
12895         (void) dbopen( NULL, 0, 0, 0, NULL);
12896 #endif
12897
12898 ; return 0; }
12899 EOF
12900 if { (eval echo configure:12901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12901   rm -rf conftest*
12902   ol_cv_db_db=yes
12903 else
12904   echo "configure: failed program was:" >&5
12905   cat conftest.$ac_ext >&5
12906   rm -rf conftest*
12907   ol_cv_db_db=no
12908 fi
12909 rm -f conftest*
12910
12911         LIBS="$ol_LIBS"
12912
12913 fi
12914
12915 echo "$ac_t""$ol_cv_db_db" 1>&6
12916
12917         if test $ol_cv_db_db = yes ; then
12918                 ol_cv_lib_db=-ldb
12919         fi
12920 fi
12921
12922 if test $ol_cv_lib_db = no ; then
12923         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12924 echo "configure:12925: checking for Berkeley DB link (-ldb3)" >&5
12925 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12926   echo $ac_n "(cached) $ac_c" 1>&6
12927 else
12928   
12929         ol_DB_LIB=-ldb3
12930         ol_LIBS=$LIBS
12931         LIBS="$ol_DB_LIB $LIBS"
12932
12933         cat > conftest.$ac_ext <<EOF
12934 #line 12935 "configure"
12935 #include "confdefs.h"
12936
12937 #ifdef HAVE_DB_185_H
12938 # include <db_185.h>
12939 #else
12940 # include <db.h>
12941 #endif
12942
12943 #ifndef DB_VERSION_MAJOR
12944 # define DB_VERSION_MAJOR 1
12945 #endif
12946
12947 #ifndef NULL
12948 #define NULL ((void*)0)
12949 #endif
12950
12951 int main() {
12952
12953 #if DB_VERSION_MAJOR > 1
12954         {
12955                 char *version;
12956                 int major, minor, patch;
12957
12958                 version = db_version( &major, &minor, &patch );
12959
12960                 if( major != DB_VERSION_MAJOR ||
12961                         minor < DB_VERSION_MINOR )
12962                 {
12963                         printf("Berkeley DB version mismatch\n"
12964                                 "\texpected: %s\n\tgot: %s\n",
12965                                 DB_VERSION_STRING, version);
12966                         return 1;
12967                 }
12968         }
12969 #endif
12970
12971 #if DB_VERSION_MAJOR > 2
12972         db_env_create( NULL, 0 );
12973 #elif DB_VERSION_MAJOR > 1
12974         db_appexit( NULL );
12975 #else
12976         (void) dbopen( NULL, 0, 0, 0, NULL);
12977 #endif
12978
12979 ; return 0; }
12980 EOF
12981 if { (eval echo configure:12982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12982   rm -rf conftest*
12983   ol_cv_db_db3=yes
12984 else
12985   echo "configure: failed program was:" >&5
12986   cat conftest.$ac_ext >&5
12987   rm -rf conftest*
12988   ol_cv_db_db3=no
12989 fi
12990 rm -f conftest*
12991
12992         LIBS="$ol_LIBS"
12993
12994 fi
12995
12996 echo "$ac_t""$ol_cv_db_db3" 1>&6
12997
12998         if test $ol_cv_db_db3 = yes ; then
12999                 ol_cv_lib_db=-ldb3
13000         fi
13001 fi
13002
13003 if test $ol_cv_lib_db = no ; then
13004         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13005 echo "configure:13006: checking for Berkeley DB link (-ldb2)" >&5
13006 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13007   echo $ac_n "(cached) $ac_c" 1>&6
13008 else
13009   
13010         ol_DB_LIB=-ldb2
13011         ol_LIBS=$LIBS
13012         LIBS="$ol_DB_LIB $LIBS"
13013
13014         cat > conftest.$ac_ext <<EOF
13015 #line 13016 "configure"
13016 #include "confdefs.h"
13017
13018 #ifdef HAVE_DB_185_H
13019 # include <db_185.h>
13020 #else
13021 # include <db.h>
13022 #endif
13023
13024 #ifndef DB_VERSION_MAJOR
13025 # define DB_VERSION_MAJOR 1
13026 #endif
13027
13028 #ifndef NULL
13029 #define NULL ((void*)0)
13030 #endif
13031
13032 int main() {
13033
13034 #if DB_VERSION_MAJOR > 1
13035         {
13036                 char *version;
13037                 int major, minor, patch;
13038
13039                 version = db_version( &major, &minor, &patch );
13040
13041                 if( major != DB_VERSION_MAJOR ||
13042                         minor < DB_VERSION_MINOR )
13043                 {
13044                         printf("Berkeley DB version mismatch\n"
13045                                 "\texpected: %s\n\tgot: %s\n",
13046                                 DB_VERSION_STRING, version);
13047                         return 1;
13048                 }
13049         }
13050 #endif
13051
13052 #if DB_VERSION_MAJOR > 2
13053         db_env_create( NULL, 0 );
13054 #elif DB_VERSION_MAJOR > 1
13055         db_appexit( NULL );
13056 #else
13057         (void) dbopen( NULL, 0, 0, 0, NULL);
13058 #endif
13059
13060 ; return 0; }
13061 EOF
13062 if { (eval echo configure:13063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13063   rm -rf conftest*
13064   ol_cv_db_db2=yes
13065 else
13066   echo "configure: failed program was:" >&5
13067   cat conftest.$ac_ext >&5
13068   rm -rf conftest*
13069   ol_cv_db_db2=no
13070 fi
13071 rm -f conftest*
13072
13073         LIBS="$ol_LIBS"
13074
13075 fi
13076
13077 echo "$ac_t""$ol_cv_db_db2" 1>&6
13078
13079         if test $ol_cv_db_db2 = yes ; then
13080                 ol_cv_lib_db=-ldb2
13081         fi
13082 fi
13083
13084 if test $ol_cv_lib_db = no ; then
13085         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13086 echo "configure:13087: checking for Berkeley DB link (-ldb1)" >&5
13087 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13088   echo $ac_n "(cached) $ac_c" 1>&6
13089 else
13090   
13091         ol_DB_LIB=-ldb1
13092         ol_LIBS=$LIBS
13093         LIBS="$ol_DB_LIB $LIBS"
13094
13095         cat > conftest.$ac_ext <<EOF
13096 #line 13097 "configure"
13097 #include "confdefs.h"
13098
13099 #ifdef HAVE_DB_185_H
13100 # include <db_185.h>
13101 #else
13102 # include <db.h>
13103 #endif
13104
13105 #ifndef DB_VERSION_MAJOR
13106 # define DB_VERSION_MAJOR 1
13107 #endif
13108
13109 #ifndef NULL
13110 #define NULL ((void*)0)
13111 #endif
13112
13113 int main() {
13114
13115 #if DB_VERSION_MAJOR > 1
13116         {
13117                 char *version;
13118                 int major, minor, patch;
13119
13120                 version = db_version( &major, &minor, &patch );
13121
13122                 if( major != DB_VERSION_MAJOR ||
13123                         minor < DB_VERSION_MINOR )
13124                 {
13125                         printf("Berkeley DB version mismatch\n"
13126                                 "\texpected: %s\n\tgot: %s\n",
13127                                 DB_VERSION_STRING, version);
13128                         return 1;
13129                 }
13130         }
13131 #endif
13132
13133 #if DB_VERSION_MAJOR > 2
13134         db_env_create( NULL, 0 );
13135 #elif DB_VERSION_MAJOR > 1
13136         db_appexit( NULL );
13137 #else
13138         (void) dbopen( NULL, 0, 0, 0, NULL);
13139 #endif
13140
13141 ; return 0; }
13142 EOF
13143 if { (eval echo configure:13144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13144   rm -rf conftest*
13145   ol_cv_db_db1=yes
13146 else
13147   echo "configure: failed program was:" >&5
13148   cat conftest.$ac_ext >&5
13149   rm -rf conftest*
13150   ol_cv_db_db1=no
13151 fi
13152 rm -f conftest*
13153
13154         LIBS="$ol_LIBS"
13155
13156 fi
13157
13158 echo "$ac_t""$ol_cv_db_db1" 1>&6
13159
13160         if test $ol_cv_db_db1 = yes ; then
13161                 ol_cv_lib_db=-ldb1
13162         fi
13163 fi
13164
13165
13166                 if test "$ol_cv_lib_db" != no ; then
13167                         ol_cv_berkeley_db=yes
13168                 fi
13169         fi
13170 fi
13171
13172         else
13173                 ol_cv_berkeley_db=no
13174 for ac_hdr in db.h
13175 do
13176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13178 echo "configure:13179: checking for $ac_hdr" >&5
13179 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13180   echo $ac_n "(cached) $ac_c" 1>&6
13181 else
13182   cat > conftest.$ac_ext <<EOF
13183 #line 13184 "configure"
13184 #include "confdefs.h"
13185 #include <$ac_hdr>
13186 EOF
13187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13188 { (eval echo configure:13189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13190 if test -z "$ac_err"; then
13191   rm -rf conftest*
13192   eval "ac_cv_header_$ac_safe=yes"
13193 else
13194   echo "$ac_err" >&5
13195   echo "configure: failed program was:" >&5
13196   cat conftest.$ac_ext >&5
13197   rm -rf conftest*
13198   eval "ac_cv_header_$ac_safe=no"
13199 fi
13200 rm -f conftest*
13201 fi
13202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13203   echo "$ac_t""yes" 1>&6
13204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13205   cat >> confdefs.h <<EOF
13206 #define $ac_tr_hdr 1
13207 EOF
13208  
13209 else
13210   echo "$ac_t""no" 1>&6
13211 fi
13212 done
13213
13214 if test $ac_cv_header_db_h = yes; then
13215         ol_cv_lib_db=no
13216 if test $ol_cv_lib_db = no ; then
13217         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
13218 echo "configure:13219: checking for Berkeley DB link (default)" >&5
13219 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
13220   echo $ac_n "(cached) $ac_c" 1>&6
13221 else
13222   
13223         ol_DB_LIB=
13224         ol_LIBS=$LIBS
13225         LIBS="$ol_DB_LIB $LIBS"
13226
13227         cat > conftest.$ac_ext <<EOF
13228 #line 13229 "configure"
13229 #include "confdefs.h"
13230
13231 #ifdef HAVE_DB_185_H
13232 # include <db_185.h>
13233 #else
13234 # include <db.h>
13235 #endif
13236
13237 #ifndef DB_VERSION_MAJOR
13238 # define DB_VERSION_MAJOR 1
13239 #endif
13240
13241 #ifndef NULL
13242 #define NULL ((void*)0)
13243 #endif
13244
13245 int main() {
13246
13247 #if DB_VERSION_MAJOR > 1
13248         {
13249                 char *version;
13250                 int major, minor, patch;
13251
13252                 version = db_version( &major, &minor, &patch );
13253
13254                 if( major != DB_VERSION_MAJOR ||
13255                         minor < DB_VERSION_MINOR )
13256                 {
13257                         printf("Berkeley DB version mismatch\n"
13258                                 "\texpected: %s\n\tgot: %s\n",
13259                                 DB_VERSION_STRING, version);
13260                         return 1;
13261                 }
13262         }
13263 #endif
13264
13265 #if DB_VERSION_MAJOR > 2
13266         db_env_create( NULL, 0 );
13267 #elif DB_VERSION_MAJOR > 1
13268         db_appexit( NULL );
13269 #else
13270         (void) dbopen( NULL, 0, 0, 0, NULL);
13271 #endif
13272
13273 ; return 0; }
13274 EOF
13275 if { (eval echo configure:13276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13276   rm -rf conftest*
13277   ol_cv_db_none=yes
13278 else
13279   echo "configure: failed program was:" >&5
13280   cat conftest.$ac_ext >&5
13281   rm -rf conftest*
13282   ol_cv_db_none=no
13283 fi
13284 rm -f conftest*
13285
13286         LIBS="$ol_LIBS"
13287
13288 fi
13289
13290 echo "$ac_t""$ol_cv_db_none" 1>&6
13291
13292         if test $ol_cv_db_none = yes ; then
13293                 ol_cv_lib_db=yes
13294         fi
13295 fi
13296
13297 if test $ol_cv_lib_db = no ; then
13298         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13299 echo "configure:13300: checking for Berkeley DB link (-ldb)" >&5
13300 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13301   echo $ac_n "(cached) $ac_c" 1>&6
13302 else
13303   
13304         ol_DB_LIB=-ldb
13305         ol_LIBS=$LIBS
13306         LIBS="$ol_DB_LIB $LIBS"
13307
13308         cat > conftest.$ac_ext <<EOF
13309 #line 13310 "configure"
13310 #include "confdefs.h"
13311
13312 #ifdef HAVE_DB_185_H
13313 # include <db_185.h>
13314 #else
13315 # include <db.h>
13316 #endif
13317
13318 #ifndef DB_VERSION_MAJOR
13319 # define DB_VERSION_MAJOR 1
13320 #endif
13321
13322 #ifndef NULL
13323 #define NULL ((void*)0)
13324 #endif
13325
13326 int main() {
13327
13328 #if DB_VERSION_MAJOR > 1
13329         {
13330                 char *version;
13331                 int major, minor, patch;
13332
13333                 version = db_version( &major, &minor, &patch );
13334
13335                 if( major != DB_VERSION_MAJOR ||
13336                         minor < DB_VERSION_MINOR )
13337                 {
13338                         printf("Berkeley DB version mismatch\n"
13339                                 "\texpected: %s\n\tgot: %s\n",
13340                                 DB_VERSION_STRING, version);
13341                         return 1;
13342                 }
13343         }
13344 #endif
13345
13346 #if DB_VERSION_MAJOR > 2
13347         db_env_create( NULL, 0 );
13348 #elif DB_VERSION_MAJOR > 1
13349         db_appexit( NULL );
13350 #else
13351         (void) dbopen( NULL, 0, 0, 0, NULL);
13352 #endif
13353
13354 ; return 0; }
13355 EOF
13356 if { (eval echo configure:13357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13357   rm -rf conftest*
13358   ol_cv_db_db=yes
13359 else
13360   echo "configure: failed program was:" >&5
13361   cat conftest.$ac_ext >&5
13362   rm -rf conftest*
13363   ol_cv_db_db=no
13364 fi
13365 rm -f conftest*
13366
13367         LIBS="$ol_LIBS"
13368
13369 fi
13370
13371 echo "$ac_t""$ol_cv_db_db" 1>&6
13372
13373         if test $ol_cv_db_db = yes ; then
13374                 ol_cv_lib_db=-ldb
13375         fi
13376 fi
13377
13378 if test $ol_cv_lib_db = no ; then
13379         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13380 echo "configure:13381: checking for Berkeley DB link (-ldb3)" >&5
13381 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13382   echo $ac_n "(cached) $ac_c" 1>&6
13383 else
13384   
13385         ol_DB_LIB=-ldb3
13386         ol_LIBS=$LIBS
13387         LIBS="$ol_DB_LIB $LIBS"
13388
13389         cat > conftest.$ac_ext <<EOF
13390 #line 13391 "configure"
13391 #include "confdefs.h"
13392
13393 #ifdef HAVE_DB_185_H
13394 # include <db_185.h>
13395 #else
13396 # include <db.h>
13397 #endif
13398
13399 #ifndef DB_VERSION_MAJOR
13400 # define DB_VERSION_MAJOR 1
13401 #endif
13402
13403 #ifndef NULL
13404 #define NULL ((void*)0)
13405 #endif
13406
13407 int main() {
13408
13409 #if DB_VERSION_MAJOR > 1
13410         {
13411                 char *version;
13412                 int major, minor, patch;
13413
13414                 version = db_version( &major, &minor, &patch );
13415
13416                 if( major != DB_VERSION_MAJOR ||
13417                         minor < DB_VERSION_MINOR )
13418                 {
13419                         printf("Berkeley DB version mismatch\n"
13420                                 "\texpected: %s\n\tgot: %s\n",
13421                                 DB_VERSION_STRING, version);
13422                         return 1;
13423                 }
13424         }
13425 #endif
13426
13427 #if DB_VERSION_MAJOR > 2
13428         db_env_create( NULL, 0 );
13429 #elif DB_VERSION_MAJOR > 1
13430         db_appexit( NULL );
13431 #else
13432         (void) dbopen( NULL, 0, 0, 0, NULL);
13433 #endif
13434
13435 ; return 0; }
13436 EOF
13437 if { (eval echo configure:13438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13438   rm -rf conftest*
13439   ol_cv_db_db3=yes
13440 else
13441   echo "configure: failed program was:" >&5
13442   cat conftest.$ac_ext >&5
13443   rm -rf conftest*
13444   ol_cv_db_db3=no
13445 fi
13446 rm -f conftest*
13447
13448         LIBS="$ol_LIBS"
13449
13450 fi
13451
13452 echo "$ac_t""$ol_cv_db_db3" 1>&6
13453
13454         if test $ol_cv_db_db3 = yes ; then
13455                 ol_cv_lib_db=-ldb3
13456         fi
13457 fi
13458
13459 if test $ol_cv_lib_db = no ; then
13460         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13461 echo "configure:13462: checking for Berkeley DB link (-ldb2)" >&5
13462 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13463   echo $ac_n "(cached) $ac_c" 1>&6
13464 else
13465   
13466         ol_DB_LIB=-ldb2
13467         ol_LIBS=$LIBS
13468         LIBS="$ol_DB_LIB $LIBS"
13469
13470         cat > conftest.$ac_ext <<EOF
13471 #line 13472 "configure"
13472 #include "confdefs.h"
13473
13474 #ifdef HAVE_DB_185_H
13475 # include <db_185.h>
13476 #else
13477 # include <db.h>
13478 #endif
13479
13480 #ifndef DB_VERSION_MAJOR
13481 # define DB_VERSION_MAJOR 1
13482 #endif
13483
13484 #ifndef NULL
13485 #define NULL ((void*)0)
13486 #endif
13487
13488 int main() {
13489
13490 #if DB_VERSION_MAJOR > 1
13491         {
13492                 char *version;
13493                 int major, minor, patch;
13494
13495                 version = db_version( &major, &minor, &patch );
13496
13497                 if( major != DB_VERSION_MAJOR ||
13498                         minor < DB_VERSION_MINOR )
13499                 {
13500                         printf("Berkeley DB version mismatch\n"
13501                                 "\texpected: %s\n\tgot: %s\n",
13502                                 DB_VERSION_STRING, version);
13503                         return 1;
13504                 }
13505         }
13506 #endif
13507
13508 #if DB_VERSION_MAJOR > 2
13509         db_env_create( NULL, 0 );
13510 #elif DB_VERSION_MAJOR > 1
13511         db_appexit( NULL );
13512 #else
13513         (void) dbopen( NULL, 0, 0, 0, NULL);
13514 #endif
13515
13516 ; return 0; }
13517 EOF
13518 if { (eval echo configure:13519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13519   rm -rf conftest*
13520   ol_cv_db_db2=yes
13521 else
13522   echo "configure: failed program was:" >&5
13523   cat conftest.$ac_ext >&5
13524   rm -rf conftest*
13525   ol_cv_db_db2=no
13526 fi
13527 rm -f conftest*
13528
13529         LIBS="$ol_LIBS"
13530
13531 fi
13532
13533 echo "$ac_t""$ol_cv_db_db2" 1>&6
13534
13535         if test $ol_cv_db_db2 = yes ; then
13536                 ol_cv_lib_db=-ldb2
13537         fi
13538 fi
13539
13540 if test $ol_cv_lib_db = no ; then
13541         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13542 echo "configure:13543: checking for Berkeley DB link (-ldb1)" >&5
13543 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13544   echo $ac_n "(cached) $ac_c" 1>&6
13545 else
13546   
13547         ol_DB_LIB=-ldb1
13548         ol_LIBS=$LIBS
13549         LIBS="$ol_DB_LIB $LIBS"
13550
13551         cat > conftest.$ac_ext <<EOF
13552 #line 13553 "configure"
13553 #include "confdefs.h"
13554
13555 #ifdef HAVE_DB_185_H
13556 # include <db_185.h>
13557 #else
13558 # include <db.h>
13559 #endif
13560
13561 #ifndef DB_VERSION_MAJOR
13562 # define DB_VERSION_MAJOR 1
13563 #endif
13564
13565 #ifndef NULL
13566 #define NULL ((void*)0)
13567 #endif
13568
13569 int main() {
13570
13571 #if DB_VERSION_MAJOR > 1
13572         {
13573                 char *version;
13574                 int major, minor, patch;
13575
13576                 version = db_version( &major, &minor, &patch );
13577
13578                 if( major != DB_VERSION_MAJOR ||
13579                         minor < DB_VERSION_MINOR )
13580                 {
13581                         printf("Berkeley DB version mismatch\n"
13582                                 "\texpected: %s\n\tgot: %s\n",
13583                                 DB_VERSION_STRING, version);
13584                         return 1;
13585                 }
13586         }
13587 #endif
13588
13589 #if DB_VERSION_MAJOR > 2
13590         db_env_create( NULL, 0 );
13591 #elif DB_VERSION_MAJOR > 1
13592         db_appexit( NULL );
13593 #else
13594         (void) dbopen( NULL, 0, 0, 0, NULL);
13595 #endif
13596
13597 ; return 0; }
13598 EOF
13599 if { (eval echo configure:13600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13600   rm -rf conftest*
13601   ol_cv_db_db1=yes
13602 else
13603   echo "configure: failed program was:" >&5
13604   cat conftest.$ac_ext >&5
13605   rm -rf conftest*
13606   ol_cv_db_db1=no
13607 fi
13608 rm -f conftest*
13609
13610         LIBS="$ol_LIBS"
13611
13612 fi
13613
13614 echo "$ac_t""$ol_cv_db_db1" 1>&6
13615
13616         if test $ol_cv_db_db1 = yes ; then
13617                 ol_cv_lib_db=-ldb1
13618         fi
13619 fi
13620
13621
13622         if test "$ol_cv_lib_db" != no ; then
13623                 ol_cv_berkeley_db=yes
13624         fi
13625 fi
13626
13627         fi
13628
13629         if test $ol_cv_berkeley_db != no ; then
13630                 cat >> confdefs.h <<\EOF
13631 #define HAVE_BERKELEY_DB 1
13632 EOF
13633
13634
13635                 ol_link_ldbm=berkeley
13636                 ol_with_ldbm_api=db
13637
13638                 if test $ol_with_ldbm_type = hash ; then
13639                         cat >> confdefs.h <<\EOF
13640 #define LDBM_USE_DBHASH 1
13641 EOF
13642
13643                 else
13644                         cat >> confdefs.h <<\EOF
13645 #define LDBM_USE_DBBTREE 1
13646 EOF
13647
13648                 fi
13649
13650                                                 if test $ol_cv_lib_db != yes ; then
13651                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
13652                 fi
13653         fi
13654 fi
13655
13656 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
13657         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
13658         ol_with_ldbm_api=none
13659 fi
13660
13661 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
13662         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
13663 echo "configure:13664: checking for MDBM library" >&5
13664 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
13665   echo $ac_n "(cached) $ac_c" 1>&6
13666 else
13667         ol_LIBS="$LIBS"
13668         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
13669 echo "configure:13670: checking for mdbm_set_chain" >&5
13670 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
13671   echo $ac_n "(cached) $ac_c" 1>&6
13672 else
13673   cat > conftest.$ac_ext <<EOF
13674 #line 13675 "configure"
13675 #include "confdefs.h"
13676 /* System header to define __stub macros and hopefully few prototypes,
13677     which can conflict with char mdbm_set_chain(); below.  */
13678 #include <assert.h>
13679 /* Override any gcc2 internal prototype to avoid an error.  */
13680 /* We use char because int might match the return type of a gcc2
13681     builtin and then its argument prototype would still apply.  */
13682 char mdbm_set_chain();
13683 char (*f)();
13684
13685 int main() {
13686
13687 /* The GNU C library defines this for functions which it implements
13688     to always fail with ENOSYS.  Some functions are actually named
13689     something starting with __ and the normal name is an alias.  */
13690 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
13691 choke me
13692 #else
13693 f = mdbm_set_chain;
13694 #endif
13695
13696 ; return 0; }
13697 EOF
13698 if { (eval echo configure:13699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13699   rm -rf conftest*
13700   eval "ac_cv_func_mdbm_set_chain=yes"
13701 else
13702   echo "configure: failed program was:" >&5
13703   cat conftest.$ac_ext >&5
13704   rm -rf conftest*
13705   eval "ac_cv_func_mdbm_set_chain=no"
13706 fi
13707 rm -f conftest*
13708 fi
13709
13710 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
13711   echo "$ac_t""yes" 1>&6
13712   ol_cv_lib_mdbm=yes
13713 else
13714   echo "$ac_t""no" 1>&6
13715
13716                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
13717 echo "configure:13718: checking for mdbm_set_chain in -lmdbm" >&5
13718 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
13719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13720   echo $ac_n "(cached) $ac_c" 1>&6
13721 else
13722   ac_save_LIBS="$LIBS"
13723 LIBS="-lmdbm  $LIBS"
13724 cat > conftest.$ac_ext <<EOF
13725 #line 13726 "configure"
13726 #include "confdefs.h"
13727 /* Override any gcc2 internal prototype to avoid an error.  */
13728 /* We use char because int might match the return type of a gcc2
13729     builtin and then its argument prototype would still apply.  */
13730 char mdbm_set_chain();
13731
13732 int main() {
13733 mdbm_set_chain()
13734 ; return 0; }
13735 EOF
13736 if { (eval echo configure:13737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13737   rm -rf conftest*
13738   eval "ac_cv_lib_$ac_lib_var=yes"
13739 else
13740   echo "configure: failed program was:" >&5
13741   cat conftest.$ac_ext >&5
13742   rm -rf conftest*
13743   eval "ac_cv_lib_$ac_lib_var=no"
13744 fi
13745 rm -f conftest*
13746 LIBS="$ac_save_LIBS"
13747
13748 fi
13749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13750   echo "$ac_t""yes" 1>&6
13751   ol_cv_lib_mdbm=-lmdbm
13752 else
13753   echo "$ac_t""no" 1>&6
13754 ol_cv_lib_mdbm=no
13755 fi
13756
13757         
13758 fi
13759
13760         LIBS="$ol_LIBS"
13761
13762 fi
13763
13764 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
13765
13766
13767  for ac_hdr in mdbm.h
13768 do
13769 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13770 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13771 echo "configure:13772: checking for $ac_hdr" >&5
13772 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13773   echo $ac_n "(cached) $ac_c" 1>&6
13774 else
13775   cat > conftest.$ac_ext <<EOF
13776 #line 13777 "configure"
13777 #include "confdefs.h"
13778 #include <$ac_hdr>
13779 EOF
13780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13781 { (eval echo configure:13782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13783 if test -z "$ac_err"; then
13784   rm -rf conftest*
13785   eval "ac_cv_header_$ac_safe=yes"
13786 else
13787   echo "$ac_err" >&5
13788   echo "configure: failed program was:" >&5
13789   cat conftest.$ac_ext >&5
13790   rm -rf conftest*
13791   eval "ac_cv_header_$ac_safe=no"
13792 fi
13793 rm -f conftest*
13794 fi
13795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13796   echo "$ac_t""yes" 1>&6
13797     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13798   cat >> confdefs.h <<EOF
13799 #define $ac_tr_hdr 1
13800 EOF
13801  
13802 else
13803   echo "$ac_t""no" 1>&6
13804 fi
13805 done
13806
13807  echo $ac_n "checking for db""... $ac_c" 1>&6
13808 echo "configure:13809: checking for db" >&5
13809 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
13810   echo $ac_n "(cached) $ac_c" 1>&6
13811 else
13812   
13813         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
13814                 ol_cv_mdbm=no
13815         else
13816                 ol_cv_mdbm=yes
13817         fi
13818
13819 fi
13820
13821 echo "$ac_t""$ol_cv_mdbm" 1>&6
13822  if test $ol_cv_mdbm = yes ; then
13823         cat >> confdefs.h <<\EOF
13824 #define HAVE_MDBM 1
13825 EOF
13826
13827  fi
13828
13829
13830         if test $ol_cv_mdbm = yes ; then
13831                 ol_link_ldbm=mdbm
13832                 ol_with_ldbm_api=mdbm
13833                 if test $ol_cv_lib_mdbm != yes ; then
13834                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
13835                 fi
13836         fi
13837 fi
13838
13839 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
13840         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
13841 echo "configure:13842: checking for GDBM library" >&5
13842 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
13843   echo $ac_n "(cached) $ac_c" 1>&6
13844 else
13845         ol_LIBS="$LIBS"
13846         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
13847 echo "configure:13848: checking for gdbm_open" >&5
13848 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
13849   echo $ac_n "(cached) $ac_c" 1>&6
13850 else
13851   cat > conftest.$ac_ext <<EOF
13852 #line 13853 "configure"
13853 #include "confdefs.h"
13854 /* System header to define __stub macros and hopefully few prototypes,
13855     which can conflict with char gdbm_open(); below.  */
13856 #include <assert.h>
13857 /* Override any gcc2 internal prototype to avoid an error.  */
13858 /* We use char because int might match the return type of a gcc2
13859     builtin and then its argument prototype would still apply.  */
13860 char gdbm_open();
13861 char (*f)();
13862
13863 int main() {
13864
13865 /* The GNU C library defines this for functions which it implements
13866     to always fail with ENOSYS.  Some functions are actually named
13867     something starting with __ and the normal name is an alias.  */
13868 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
13869 choke me
13870 #else
13871 f = gdbm_open;
13872 #endif
13873
13874 ; return 0; }
13875 EOF
13876 if { (eval echo configure:13877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13877   rm -rf conftest*
13878   eval "ac_cv_func_gdbm_open=yes"
13879 else
13880   echo "configure: failed program was:" >&5
13881   cat conftest.$ac_ext >&5
13882   rm -rf conftest*
13883   eval "ac_cv_func_gdbm_open=no"
13884 fi
13885 rm -f conftest*
13886 fi
13887
13888 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
13889   echo "$ac_t""yes" 1>&6
13890   ol_cv_lib_gdbm=yes
13891 else
13892   echo "$ac_t""no" 1>&6
13893
13894                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
13895 echo "configure:13896: checking for gdbm_open in -lgdbm" >&5
13896 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
13897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13898   echo $ac_n "(cached) $ac_c" 1>&6
13899 else
13900   ac_save_LIBS="$LIBS"
13901 LIBS="-lgdbm  $LIBS"
13902 cat > conftest.$ac_ext <<EOF
13903 #line 13904 "configure"
13904 #include "confdefs.h"
13905 /* Override any gcc2 internal prototype to avoid an error.  */
13906 /* We use char because int might match the return type of a gcc2
13907     builtin and then its argument prototype would still apply.  */
13908 char gdbm_open();
13909
13910 int main() {
13911 gdbm_open()
13912 ; return 0; }
13913 EOF
13914 if { (eval echo configure:13915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13915   rm -rf conftest*
13916   eval "ac_cv_lib_$ac_lib_var=yes"
13917 else
13918   echo "configure: failed program was:" >&5
13919   cat conftest.$ac_ext >&5
13920   rm -rf conftest*
13921   eval "ac_cv_lib_$ac_lib_var=no"
13922 fi
13923 rm -f conftest*
13924 LIBS="$ac_save_LIBS"
13925
13926 fi
13927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13928   echo "$ac_t""yes" 1>&6
13929   ol_cv_lib_gdbm=-lgdbm
13930 else
13931   echo "$ac_t""no" 1>&6
13932 ol_cv_lib_gdbm=no
13933 fi
13934
13935         
13936 fi
13937
13938         LIBS="$ol_LIBS"
13939
13940 fi
13941
13942 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
13943
13944
13945  for ac_hdr in gdbm.h
13946 do
13947 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13948 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13949 echo "configure:13950: checking for $ac_hdr" >&5
13950 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13951   echo $ac_n "(cached) $ac_c" 1>&6
13952 else
13953   cat > conftest.$ac_ext <<EOF
13954 #line 13955 "configure"
13955 #include "confdefs.h"
13956 #include <$ac_hdr>
13957 EOF
13958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13959 { (eval echo configure:13960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13961 if test -z "$ac_err"; then
13962   rm -rf conftest*
13963   eval "ac_cv_header_$ac_safe=yes"
13964 else
13965   echo "$ac_err" >&5
13966   echo "configure: failed program was:" >&5
13967   cat conftest.$ac_ext >&5
13968   rm -rf conftest*
13969   eval "ac_cv_header_$ac_safe=no"
13970 fi
13971 rm -f conftest*
13972 fi
13973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13974   echo "$ac_t""yes" 1>&6
13975     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13976   cat >> confdefs.h <<EOF
13977 #define $ac_tr_hdr 1
13978 EOF
13979  
13980 else
13981   echo "$ac_t""no" 1>&6
13982 fi
13983 done
13984
13985  echo $ac_n "checking for db""... $ac_c" 1>&6
13986 echo "configure:13987: checking for db" >&5
13987 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
13988   echo $ac_n "(cached) $ac_c" 1>&6
13989 else
13990   
13991         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
13992                 ol_cv_gdbm=no
13993         else
13994                 ol_cv_gdbm=yes
13995         fi
13996
13997 fi
13998
13999 echo "$ac_t""$ol_cv_gdbm" 1>&6
14000  if test $ol_cv_gdbm = yes ; then
14001         cat >> confdefs.h <<\EOF
14002 #define HAVE_GDBM 1
14003 EOF
14004
14005  fi
14006
14007
14008         if test $ol_cv_gdbm = yes ; then
14009                 ol_link_ldbm=gdbm
14010                 ol_with_ldbm_api=gdbm
14011
14012                 if test $ol_cv_lib_gdbm != yes ; then
14013                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
14014                 fi
14015         fi
14016 fi
14017
14018 if test $ol_with_ldbm_api = ndbm ; then
14019         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
14020 echo "configure:14021: checking for NDBM library" >&5
14021 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
14022   echo $ac_n "(cached) $ac_c" 1>&6
14023 else
14024         ol_LIBS="$LIBS"
14025         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14026 echo "configure:14027: checking for dbm_open" >&5
14027 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
14028   echo $ac_n "(cached) $ac_c" 1>&6
14029 else
14030   cat > conftest.$ac_ext <<EOF
14031 #line 14032 "configure"
14032 #include "confdefs.h"
14033 /* System header to define __stub macros and hopefully few prototypes,
14034     which can conflict with char dbm_open(); below.  */
14035 #include <assert.h>
14036 /* Override any gcc2 internal prototype to avoid an error.  */
14037 /* We use char because int might match the return type of a gcc2
14038     builtin and then its argument prototype would still apply.  */
14039 char dbm_open();
14040 char (*f)();
14041
14042 int main() {
14043
14044 /* The GNU C library defines this for functions which it implements
14045     to always fail with ENOSYS.  Some functions are actually named
14046     something starting with __ and the normal name is an alias.  */
14047 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14048 choke me
14049 #else
14050 f = dbm_open;
14051 #endif
14052
14053 ; return 0; }
14054 EOF
14055 if { (eval echo configure:14056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14056   rm -rf conftest*
14057   eval "ac_cv_func_dbm_open=yes"
14058 else
14059   echo "configure: failed program was:" >&5
14060   cat conftest.$ac_ext >&5
14061   rm -rf conftest*
14062   eval "ac_cv_func_dbm_open=no"
14063 fi
14064 rm -f conftest*
14065 fi
14066
14067 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14068   echo "$ac_t""yes" 1>&6
14069   ol_cv_lib_ndbm=yes
14070 else
14071   echo "$ac_t""no" 1>&6
14072
14073                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
14074 echo "configure:14075: checking for dbm_open in -lndbm" >&5
14075 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14077   echo $ac_n "(cached) $ac_c" 1>&6
14078 else
14079   ac_save_LIBS="$LIBS"
14080 LIBS="-lndbm  $LIBS"
14081 cat > conftest.$ac_ext <<EOF
14082 #line 14083 "configure"
14083 #include "confdefs.h"
14084 /* Override any gcc2 internal prototype to avoid an error.  */
14085 /* We use char because int might match the return type of a gcc2
14086     builtin and then its argument prototype would still apply.  */
14087 char dbm_open();
14088
14089 int main() {
14090 dbm_open()
14091 ; return 0; }
14092 EOF
14093 if { (eval echo configure:14094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14094   rm -rf conftest*
14095   eval "ac_cv_lib_$ac_lib_var=yes"
14096 else
14097   echo "configure: failed program was:" >&5
14098   cat conftest.$ac_ext >&5
14099   rm -rf conftest*
14100   eval "ac_cv_lib_$ac_lib_var=no"
14101 fi
14102 rm -f conftest*
14103 LIBS="$ac_save_LIBS"
14104
14105 fi
14106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14107   echo "$ac_t""yes" 1>&6
14108   ol_cv_lib_ndbm=-lndbm
14109 else
14110   echo "$ac_t""no" 1>&6
14111
14112                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14113 echo "configure:14114: checking for dbm_open in -ldbm" >&5
14114 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14115 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14116   echo $ac_n "(cached) $ac_c" 1>&6
14117 else
14118   ac_save_LIBS="$LIBS"
14119 LIBS="-ldbm  $LIBS"
14120 cat > conftest.$ac_ext <<EOF
14121 #line 14122 "configure"
14122 #include "confdefs.h"
14123 /* Override any gcc2 internal prototype to avoid an error.  */
14124 /* We use char because int might match the return type of a gcc2
14125     builtin and then its argument prototype would still apply.  */
14126 char dbm_open();
14127
14128 int main() {
14129 dbm_open()
14130 ; return 0; }
14131 EOF
14132 if { (eval echo configure:14133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14133   rm -rf conftest*
14134   eval "ac_cv_lib_$ac_lib_var=yes"
14135 else
14136   echo "configure: failed program was:" >&5
14137   cat conftest.$ac_ext >&5
14138   rm -rf conftest*
14139   eval "ac_cv_lib_$ac_lib_var=no"
14140 fi
14141 rm -f conftest*
14142 LIBS="$ac_save_LIBS"
14143
14144 fi
14145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14146   echo "$ac_t""yes" 1>&6
14147   ol_cv_lib_ndbm=-ldbm
14148 else
14149   echo "$ac_t""no" 1>&6
14150 ol_cv_lib_ndbm=no
14151 fi
14152                 
14153 fi
14154
14155         
14156 fi
14157
14158         LIBS="$ol_LIBS"
14159
14160 fi
14161
14162 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
14163
14164
14165  for ac_hdr in ndbm.h
14166 do
14167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14168 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14169 echo "configure:14170: checking for $ac_hdr" >&5
14170 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14171   echo $ac_n "(cached) $ac_c" 1>&6
14172 else
14173   cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 #include <$ac_hdr>
14177 EOF
14178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14179 { (eval echo configure:14180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14181 if test -z "$ac_err"; then
14182   rm -rf conftest*
14183   eval "ac_cv_header_$ac_safe=yes"
14184 else
14185   echo "$ac_err" >&5
14186   echo "configure: failed program was:" >&5
14187   cat conftest.$ac_ext >&5
14188   rm -rf conftest*
14189   eval "ac_cv_header_$ac_safe=no"
14190 fi
14191 rm -f conftest*
14192 fi
14193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14194   echo "$ac_t""yes" 1>&6
14195     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14196   cat >> confdefs.h <<EOF
14197 #define $ac_tr_hdr 1
14198 EOF
14199  
14200 else
14201   echo "$ac_t""no" 1>&6
14202 fi
14203 done
14204
14205  echo $ac_n "checking for db""... $ac_c" 1>&6
14206 echo "configure:14207: checking for db" >&5
14207 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
14208   echo $ac_n "(cached) $ac_c" 1>&6
14209 else
14210   
14211         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
14212                 ol_cv_ndbm=no
14213         else
14214                 ol_cv_ndbm=yes
14215         fi
14216
14217 fi
14218
14219 echo "$ac_t""$ol_cv_ndbm" 1>&6
14220  if test $ol_cv_ndbm = yes ; then
14221         cat >> confdefs.h <<\EOF
14222 #define HAVE_NDBM 1
14223 EOF
14224
14225  fi
14226
14227
14228         if test $ol_cv_ndbm = yes ; then
14229                 ol_link_ldbm=ndbm
14230                 ol_with_ldbm_api=ndbm
14231
14232                 if test $ol_cv_lib_ndbm != yes ; then
14233                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
14234                 fi
14235         fi
14236 fi
14237
14238 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
14239         echo "configure: warning: could not find suitable LDBM backend" 1>&2
14240         if test $ol_enable_ldbm = yes ; then
14241                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
14242         fi
14243
14244         echo "configure: warning: disabling LDBM" 1>&2
14245         ol_enable_ldbm=no
14246 fi
14247
14248 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
14249         LINK_BINS_DYNAMIC="yes"
14250 else
14251         LINK_BINS_DYNAMIC="no"
14252 fi
14253
14254 if test $ol_enable_wrappers != no ; then
14255         for ac_hdr in tcpd.h
14256 do
14257 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14258 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14259 echo "configure:14260: checking for $ac_hdr" >&5
14260 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14261   echo $ac_n "(cached) $ac_c" 1>&6
14262 else
14263   cat > conftest.$ac_ext <<EOF
14264 #line 14265 "configure"
14265 #include "confdefs.h"
14266 #include <$ac_hdr>
14267 EOF
14268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14269 { (eval echo configure:14270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14271 if test -z "$ac_err"; then
14272   rm -rf conftest*
14273   eval "ac_cv_header_$ac_safe=yes"
14274 else
14275   echo "$ac_err" >&5
14276   echo "configure: failed program was:" >&5
14277   cat conftest.$ac_ext >&5
14278   rm -rf conftest*
14279   eval "ac_cv_header_$ac_safe=no"
14280 fi
14281 rm -f conftest*
14282 fi
14283 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14284   echo "$ac_t""yes" 1>&6
14285     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14286   cat >> confdefs.h <<EOF
14287 #define $ac_tr_hdr 1
14288 EOF
14289  
14290 else
14291   echo "$ac_t""no" 1>&6
14292 fi
14293 done
14294
14295
14296         if test $ac_cv_header_tcpd_h != yes ; then
14297                 have_wrappers=no
14298         else
14299                 cat > conftest.$ac_ext <<EOF
14300 #line 14301 "configure"
14301 #include "confdefs.h"
14302
14303 int allow_severity = 0;
14304 int deny_severity  = 0;
14305                 
14306 int main() {
14307 hosts_access()
14308 ; return 0; }
14309 EOF
14310 if { (eval echo configure:14311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14311   rm -rf conftest*
14312   have_wrappers=yes
14313 else
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316   rm -rf conftest*
14317   have_wrappers=no
14318 fi
14319 rm -f conftest*
14320         fi
14321
14322         if test $have_wrappers = yes ; then
14323                 cat >> confdefs.h <<\EOF
14324 #define HAVE_TCPD 1
14325 EOF
14326
14327                 WRAP_LIBS="-lwrap"
14328
14329                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
14330 echo "configure:14331: checking for main in -lnsl" >&5
14331 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
14332 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14333   echo $ac_n "(cached) $ac_c" 1>&6
14334 else
14335   ac_save_LIBS="$LIBS"
14336 LIBS="-lnsl  $LIBS"
14337 cat > conftest.$ac_ext <<EOF
14338 #line 14339 "configure"
14339 #include "confdefs.h"
14340
14341 int main() {
14342 main()
14343 ; return 0; }
14344 EOF
14345 if { (eval echo configure:14346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14346   rm -rf conftest*
14347   eval "ac_cv_lib_$ac_lib_var=yes"
14348 else
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -rf conftest*
14352   eval "ac_cv_lib_$ac_lib_var=no"
14353 fi
14354 rm -f conftest*
14355 LIBS="$ac_save_LIBS"
14356
14357 fi
14358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14359   echo "$ac_t""yes" 1>&6
14360     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14361     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14362   cat >> confdefs.h <<EOF
14363 #define $ac_tr_lib 1
14364 EOF
14365
14366   LIBS="-lnsl $LIBS"
14367
14368 else
14369   echo "$ac_t""no" 1>&6
14370 fi
14371
14372         else
14373                 echo "configure: warning: could not find -lwrap" 1>&2
14374                 if test $ol_enable_wrappers = yes ; then
14375                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
14376                 fi
14377
14378                 echo "configure: warning: disabling wrappers support" 1>&2
14379                 ol_enable_wrappers=no
14380                 WRAP_LIBS=""
14381         fi
14382 fi
14383
14384 if test $ol_enable_syslog != no ; then
14385         echo $ac_n "checking for openlog""... $ac_c" 1>&6
14386 echo "configure:14387: checking for openlog" >&5
14387 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
14388   echo $ac_n "(cached) $ac_c" 1>&6
14389 else
14390   cat > conftest.$ac_ext <<EOF
14391 #line 14392 "configure"
14392 #include "confdefs.h"
14393 /* System header to define __stub macros and hopefully few prototypes,
14394     which can conflict with char openlog(); below.  */
14395 #include <assert.h>
14396 /* Override any gcc2 internal prototype to avoid an error.  */
14397 /* We use char because int might match the return type of a gcc2
14398     builtin and then its argument prototype would still apply.  */
14399 char openlog();
14400 char (*f)();
14401
14402 int main() {
14403
14404 /* The GNU C library defines this for functions which it implements
14405     to always fail with ENOSYS.  Some functions are actually named
14406     something starting with __ and the normal name is an alias.  */
14407 #if defined (__stub_openlog) || defined (__stub___openlog)
14408 choke me
14409 #else
14410 f = openlog;
14411 #endif
14412
14413 ; return 0; }
14414 EOF
14415 if { (eval echo configure:14416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14416   rm -rf conftest*
14417   eval "ac_cv_func_openlog=yes"
14418 else
14419   echo "configure: failed program was:" >&5
14420   cat conftest.$ac_ext >&5
14421   rm -rf conftest*
14422   eval "ac_cv_func_openlog=no"
14423 fi
14424 rm -f conftest*
14425 fi
14426
14427 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
14428   echo "$ac_t""yes" 1>&6
14429   :
14430 else
14431   echo "$ac_t""no" 1>&6
14432 fi
14433
14434         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
14435                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
14436         fi
14437         ol_enable_syslog=$ac_cv_func_openlog
14438 fi
14439
14440
14441 ol_link_sql=no
14442 if test $ol_enable_sql != no ; then
14443         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
14444 echo "configure:14445: checking for SQLDriverConnect in -liodbc" >&5
14445 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14446 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14447   echo $ac_n "(cached) $ac_c" 1>&6
14448 else
14449   ac_save_LIBS="$LIBS"
14450 LIBS="-liodbc  $LIBS"
14451 cat > conftest.$ac_ext <<EOF
14452 #line 14453 "configure"
14453 #include "confdefs.h"
14454 /* Override any gcc2 internal prototype to avoid an error.  */
14455 /* We use char because int might match the return type of a gcc2
14456     builtin and then its argument prototype would still apply.  */
14457 char SQLDriverConnect();
14458
14459 int main() {
14460 SQLDriverConnect()
14461 ; return 0; }
14462 EOF
14463 if { (eval echo configure:14464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14464   rm -rf conftest*
14465   eval "ac_cv_lib_$ac_lib_var=yes"
14466 else
14467   echo "configure: failed program was:" >&5
14468   cat conftest.$ac_ext >&5
14469   rm -rf conftest*
14470   eval "ac_cv_lib_$ac_lib_var=no"
14471 fi
14472 rm -f conftest*
14473 LIBS="$ac_save_LIBS"
14474
14475 fi
14476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14477   echo "$ac_t""yes" 1>&6
14478   have_iodbc=yes
14479 else
14480   echo "$ac_t""no" 1>&6
14481 have_iodbc=no
14482 fi
14483
14484         if test $have_iodbc = yes ; then
14485                 ol_link_sql="-liodbc"
14486         else
14487                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
14488 echo "configure:14489: checking for SQLDriverConnect in -lodbc" >&5
14489 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14490 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14491   echo $ac_n "(cached) $ac_c" 1>&6
14492 else
14493   ac_save_LIBS="$LIBS"
14494 LIBS="-lodbc  $LIBS"
14495 cat > conftest.$ac_ext <<EOF
14496 #line 14497 "configure"
14497 #include "confdefs.h"
14498 /* Override any gcc2 internal prototype to avoid an error.  */
14499 /* We use char because int might match the return type of a gcc2
14500     builtin and then its argument prototype would still apply.  */
14501 char SQLDriverConnect();
14502
14503 int main() {
14504 SQLDriverConnect()
14505 ; return 0; }
14506 EOF
14507 if { (eval echo configure:14508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14508   rm -rf conftest*
14509   eval "ac_cv_lib_$ac_lib_var=yes"
14510 else
14511   echo "configure: failed program was:" >&5
14512   cat conftest.$ac_ext >&5
14513   rm -rf conftest*
14514   eval "ac_cv_lib_$ac_lib_var=no"
14515 fi
14516 rm -f conftest*
14517 LIBS="$ac_save_LIBS"
14518
14519 fi
14520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14521   echo "$ac_t""yes" 1>&6
14522   have_odbc=yes
14523 else
14524   echo "$ac_t""no" 1>&6
14525 have_odbc=no
14526 fi
14527
14528                 if test $have_odbc = yes ; then
14529                         ol_link_sql="-lodbc"
14530                 fi
14531         fi
14532
14533         if test $ol_link_sql != no ; then
14534                 SLAPD_SQL_LIBS="$ol_link_sql"
14535
14536         elif test $ol_enable_sql != auto ; then
14537                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
14538         fi
14539 fi
14540
14541 if test $ol_enable_tcl != no ; then
14542         for ac_hdr in tcl.h
14543 do
14544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14545 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14546 echo "configure:14547: checking for $ac_hdr" >&5
14547 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14548   echo $ac_n "(cached) $ac_c" 1>&6
14549 else
14550   cat > conftest.$ac_ext <<EOF
14551 #line 14552 "configure"
14552 #include "confdefs.h"
14553 #include <$ac_hdr>
14554 EOF
14555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14556 { (eval echo configure:14557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14558 if test -z "$ac_err"; then
14559   rm -rf conftest*
14560   eval "ac_cv_header_$ac_safe=yes"
14561 else
14562   echo "$ac_err" >&5
14563   echo "configure: failed program was:" >&5
14564   cat conftest.$ac_ext >&5
14565   rm -rf conftest*
14566   eval "ac_cv_header_$ac_safe=no"
14567 fi
14568 rm -f conftest*
14569 fi
14570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14571   echo "$ac_t""yes" 1>&6
14572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14573   cat >> confdefs.h <<EOF
14574 #define $ac_tr_hdr 1
14575 EOF
14576  
14577 else
14578   echo "$ac_t""no" 1>&6
14579 fi
14580 done
14581
14582
14583         if test $ac_cv_header_tcl_h != yes ; then
14584                 have_tcl=no
14585         else
14586                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
14587                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
14588 echo "configure:14589: checking for main in -l$lib" >&5
14589 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
14590 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14591   echo $ac_n "(cached) $ac_c" 1>&6
14592 else
14593   ac_save_LIBS="$LIBS"
14594 LIBS="-l$lib  $LIBS"
14595 cat > conftest.$ac_ext <<EOF
14596 #line 14597 "configure"
14597 #include "confdefs.h"
14598
14599 int main() {
14600 main()
14601 ; return 0; }
14602 EOF
14603 if { (eval echo configure:14604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14604   rm -rf conftest*
14605   eval "ac_cv_lib_$ac_lib_var=yes"
14606 else
14607   echo "configure: failed program was:" >&5
14608   cat conftest.$ac_ext >&5
14609   rm -rf conftest*
14610   eval "ac_cv_lib_$ac_lib_var=no"
14611 fi
14612 rm -f conftest*
14613 LIBS="$ac_save_LIBS"
14614
14615 fi
14616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14617   echo "$ac_t""yes" 1>&6
14618   have_tcl=yes
14619                            if test x"$ol_with_tcl_module" = "xstatic" ; then
14620                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
14621                            else
14622                                MOD_TCL_LIB="-l${lib}"
14623                            fi;break
14624 else
14625   echo "$ac_t""no" 1>&6
14626 have_tcl=no
14627 fi
14628
14629                 done
14630         fi
14631
14632         if test $have_tcl != yes ; then
14633                 echo "configure: warning: could not find -ltcl" 1>&2
14634                 if test $ol_enable_tcl = yes ; then
14635                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
14636                 fi
14637
14638                 ol_enable_tcl=no
14639         fi
14640 fi
14641
14642 ol_link_termcap=no
14643 for ac_hdr in termcap.h ncurses.h
14644 do
14645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14647 echo "configure:14648: checking for $ac_hdr" >&5
14648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14649   echo $ac_n "(cached) $ac_c" 1>&6
14650 else
14651   cat > conftest.$ac_ext <<EOF
14652 #line 14653 "configure"
14653 #include "confdefs.h"
14654 #include <$ac_hdr>
14655 EOF
14656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14657 { (eval echo configure:14658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14659 if test -z "$ac_err"; then
14660   rm -rf conftest*
14661   eval "ac_cv_header_$ac_safe=yes"
14662 else
14663   echo "$ac_err" >&5
14664   echo "configure: failed program was:" >&5
14665   cat conftest.$ac_ext >&5
14666   rm -rf conftest*
14667   eval "ac_cv_header_$ac_safe=no"
14668 fi
14669 rm -f conftest*
14670 fi
14671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14672   echo "$ac_t""yes" 1>&6
14673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14674   cat >> confdefs.h <<EOF
14675 #define $ac_tr_hdr 1
14676 EOF
14677  
14678 else
14679   echo "$ac_t""no" 1>&6
14680 fi
14681 done
14682
14683
14684 if test $ol_link_termcap = no ; then
14685         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
14686 echo "configure:14687: checking for tputs in -ltermcap" >&5
14687 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
14688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14689   echo $ac_n "(cached) $ac_c" 1>&6
14690 else
14691   ac_save_LIBS="$LIBS"
14692 LIBS="-ltermcap  $LIBS"
14693 cat > conftest.$ac_ext <<EOF
14694 #line 14695 "configure"
14695 #include "confdefs.h"
14696 /* Override any gcc2 internal prototype to avoid an error.  */
14697 /* We use char because int might match the return type of a gcc2
14698     builtin and then its argument prototype would still apply.  */
14699 char tputs();
14700
14701 int main() {
14702 tputs()
14703 ; return 0; }
14704 EOF
14705 if { (eval echo configure:14706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14706   rm -rf conftest*
14707   eval "ac_cv_lib_$ac_lib_var=yes"
14708 else
14709   echo "configure: failed program was:" >&5
14710   cat conftest.$ac_ext >&5
14711   rm -rf conftest*
14712   eval "ac_cv_lib_$ac_lib_var=no"
14713 fi
14714 rm -f conftest*
14715 LIBS="$ac_save_LIBS"
14716
14717 fi
14718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14719   echo "$ac_t""yes" 1>&6
14720   have_termcap=yes
14721 else
14722   echo "$ac_t""no" 1>&6
14723 have_termcap=no
14724 fi
14725
14726         if test $have_termcap = yes ; then
14727                 cat >> confdefs.h <<\EOF
14728 #define HAVE_TERMCAP 1
14729 EOF
14730
14731                 ol_link_termcap=yes
14732                 TERMCAP_LIBS=-ltermcap
14733         fi
14734 fi
14735
14736 if test $ol_link_termcap = no ; then
14737         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
14738 echo "configure:14739: checking for initscr in -lncurses" >&5
14739 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
14740 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14741   echo $ac_n "(cached) $ac_c" 1>&6
14742 else
14743   ac_save_LIBS="$LIBS"
14744 LIBS="-lncurses  $LIBS"
14745 cat > conftest.$ac_ext <<EOF
14746 #line 14747 "configure"
14747 #include "confdefs.h"
14748 /* Override any gcc2 internal prototype to avoid an error.  */
14749 /* We use char because int might match the return type of a gcc2
14750     builtin and then its argument prototype would still apply.  */
14751 char initscr();
14752
14753 int main() {
14754 initscr()
14755 ; return 0; }
14756 EOF
14757 if { (eval echo configure:14758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14758   rm -rf conftest*
14759   eval "ac_cv_lib_$ac_lib_var=yes"
14760 else
14761   echo "configure: failed program was:" >&5
14762   cat conftest.$ac_ext >&5
14763   rm -rf conftest*
14764   eval "ac_cv_lib_$ac_lib_var=no"
14765 fi
14766 rm -f conftest*
14767 LIBS="$ac_save_LIBS"
14768
14769 fi
14770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14771   echo "$ac_t""yes" 1>&6
14772   have_ncurses=yes
14773 else
14774   echo "$ac_t""no" 1>&6
14775 have_ncurses=no
14776 fi
14777
14778         if test $have_ncurses = yes ; then
14779                 cat >> confdefs.h <<\EOF
14780 #define HAVE_NCURSES 1
14781 EOF
14782
14783                 ol_link_termcap=yes
14784                 TERMCAP_LIBS=-lncurses
14785         fi
14786 fi
14787
14788 if test $ol_link_termcap = no ; then
14789         cat >> confdefs.h <<\EOF
14790 #define NO_TERMCAP 1
14791 EOF
14792
14793         TERMCAP_LIBS=
14794 fi
14795
14796 ol_link_sasl=no
14797 ol_link_spasswd=no
14798 if test $ol_with_cyrus_sasl != no ; then
14799         for ac_hdr in sasl.h
14800 do
14801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14803 echo "configure:14804: checking for $ac_hdr" >&5
14804 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14805   echo $ac_n "(cached) $ac_c" 1>&6
14806 else
14807   cat > conftest.$ac_ext <<EOF
14808 #line 14809 "configure"
14809 #include "confdefs.h"
14810 #include <$ac_hdr>
14811 EOF
14812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14813 { (eval echo configure:14814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14815 if test -z "$ac_err"; then
14816   rm -rf conftest*
14817   eval "ac_cv_header_$ac_safe=yes"
14818 else
14819   echo "$ac_err" >&5
14820   echo "configure: failed program was:" >&5
14821   cat conftest.$ac_ext >&5
14822   rm -rf conftest*
14823   eval "ac_cv_header_$ac_safe=no"
14824 fi
14825 rm -f conftest*
14826 fi
14827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14828   echo "$ac_t""yes" 1>&6
14829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14830   cat >> confdefs.h <<EOF
14831 #define $ac_tr_hdr 1
14832 EOF
14833  
14834 else
14835   echo "$ac_t""no" 1>&6
14836 fi
14837 done
14838
14839
14840         if test $ac_cv_header_sasl_h = yes ; then
14841                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
14842 echo "configure:14843: checking for sasl_client_init in -lsasl" >&5
14843 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
14844 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14845   echo $ac_n "(cached) $ac_c" 1>&6
14846 else
14847   ac_save_LIBS="$LIBS"
14848 LIBS="-lsasl  $LIBS"
14849 cat > conftest.$ac_ext <<EOF
14850 #line 14851 "configure"
14851 #include "confdefs.h"
14852 /* Override any gcc2 internal prototype to avoid an error.  */
14853 /* We use char because int might match the return type of a gcc2
14854     builtin and then its argument prototype would still apply.  */
14855 char sasl_client_init();
14856
14857 int main() {
14858 sasl_client_init()
14859 ; return 0; }
14860 EOF
14861 if { (eval echo configure:14862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14862   rm -rf conftest*
14863   eval "ac_cv_lib_$ac_lib_var=yes"
14864 else
14865   echo "configure: failed program was:" >&5
14866   cat conftest.$ac_ext >&5
14867   rm -rf conftest*
14868   eval "ac_cv_lib_$ac_lib_var=no"
14869 fi
14870 rm -f conftest*
14871 LIBS="$ac_save_LIBS"
14872
14873 fi
14874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14875   echo "$ac_t""yes" 1>&6
14876   have_cyrus_sasl=yes
14877 else
14878   echo "$ac_t""no" 1>&6
14879 have_cyrus_sasl=no
14880 fi
14881
14882
14883                 if test $have_cyrus_sasl != no ; then
14884                         SASL_LIBS="-lsasl"
14885                         cat >> confdefs.h <<\EOF
14886 #define HAVE_CYRUS_SASL 1
14887 EOF
14888
14889                         ol_link_sasl=yes
14890                 fi
14891         fi
14892
14893         if test $ol_link_sasl = no ; then
14894                 if test $ol_with_cyrus_sasl != auto ; then
14895                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
14896                 else
14897                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
14898                         echo "configure: warning: SASL authentication not supported!" 1>&2
14899                         if test $ol_link_tls = no ; then
14900                                 echo "configure: warning: Strong authentication not supported!" 1>&2
14901                         fi
14902                 fi
14903
14904         elif test $ol_enable_spasswd != no ; then
14905                 ol_link_spasswd=yes
14906         fi
14907
14908 else
14909         echo "configure: warning: SASL authentication not supported!" 1>&2
14910         if test $ol_link_tls = no ; then
14911                 echo "configure: warning: Strong authentication not supported!" 1>&2
14912         fi
14913 fi
14914
14915 if test $cross_compiling != yes ; then
14916         dev=no
14917         if test -r /dev/urandom ; then
14918                 dev="/dev/urandom";
14919         elif test -r /idev/urandom ; then
14920                 dev="/idev/urandom";
14921         elif test -r /dev/srandom ; then
14922                 dev="/dev/srandom";
14923         elif test -r /dev/random ; then
14924                 dev="/dev/random";
14925         elif test -r /idev/random ; then
14926                 dev="/idev/random";
14927         fi
14928
14929         if test $dev != no ; then
14930                 cat >> confdefs.h <<EOF
14931 #define URANDOM_DEVICE "$dev"
14932 EOF
14933
14934         fi
14935 fi
14936
14937 ol_link_fetch=no
14938 if test $ol_with_fetch != no ; then
14939         ol_LIBS=$LIBS
14940 LIBS="-lfetch -lcom_err $LIBS"
14941 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
14942 echo "configure:14943: checking fetch(3) library" >&5
14943 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
14944   echo $ac_n "(cached) $ac_c" 1>&6
14945 else
14946   
14947         cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950
14951 #include <sys/param.h>
14952 #include <stdio.h>
14953 #include <fetch.h>
14954 int main() {
14955 struct url *u = fetchParseURL("file:///"); 
14956 ; return 0; }
14957 EOF
14958 if { (eval echo configure:14959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14959   rm -rf conftest*
14960   ol_cv_lib_fetch=yes
14961 else
14962   echo "configure: failed program was:" >&5
14963   cat conftest.$ac_ext >&5
14964   rm -rf conftest*
14965   ol_cv_lib_fetch=no
14966 fi
14967 rm -f conftest*
14968 fi
14969
14970 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
14971 LIBS=$ol_LIBS
14972 if test $ol_cv_lib_fetch != no ; then
14973         ol_link_fetch="-lfetch -lcom_err"
14974         cat >> confdefs.h <<\EOF
14975 #define HAVE_FETCH 1
14976 EOF
14977
14978 fi
14979
14980
14981         if test $ol_cv_lib_fetch != no ; then
14982                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
14983                 ol_link_fetch=freebsd
14984
14985         elif test $ol_with_fetch != auto ; then
14986                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
14987         fi 
14988 fi
14989
14990 ol_link_readline=no
14991 if test $ol_with_readline != no ; then
14992         for ac_hdr in readline/readline.h readline/history.h
14993 do
14994 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14995 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14996 echo "configure:14997: checking for $ac_hdr" >&5
14997 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14998   echo $ac_n "(cached) $ac_c" 1>&6
14999 else
15000   cat > conftest.$ac_ext <<EOF
15001 #line 15002 "configure"
15002 #include "confdefs.h"
15003 #include <$ac_hdr>
15004 EOF
15005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15006 { (eval echo configure:15007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15008 if test -z "$ac_err"; then
15009   rm -rf conftest*
15010   eval "ac_cv_header_$ac_safe=yes"
15011 else
15012   echo "$ac_err" >&5
15013   echo "configure: failed program was:" >&5
15014   cat conftest.$ac_ext >&5
15015   rm -rf conftest*
15016   eval "ac_cv_header_$ac_safe=no"
15017 fi
15018 rm -f conftest*
15019 fi
15020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15021   echo "$ac_t""yes" 1>&6
15022     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15023   cat >> confdefs.h <<EOF
15024 #define $ac_tr_hdr 1
15025 EOF
15026  
15027 else
15028   echo "$ac_t""no" 1>&6
15029 fi
15030 done
15031
15032
15033         if test $ac_cv_header_readline_readline_h = yes ; then
15034                 save_LIBS="$LIBS"
15035                 LIBS="$TERMCAP_LIBS $LIBS"
15036                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
15037 echo "configure:15038: checking for readline in -lreadline" >&5
15038 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
15039 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15040   echo $ac_n "(cached) $ac_c" 1>&6
15041 else
15042   ac_save_LIBS="$LIBS"
15043 LIBS="-lreadline  $LIBS"
15044 cat > conftest.$ac_ext <<EOF
15045 #line 15046 "configure"
15046 #include "confdefs.h"
15047 /* Override any gcc2 internal prototype to avoid an error.  */
15048 /* We use char because int might match the return type of a gcc2
15049     builtin and then its argument prototype would still apply.  */
15050 char readline();
15051
15052 int main() {
15053 readline()
15054 ; return 0; }
15055 EOF
15056 if { (eval echo configure:15057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15057   rm -rf conftest*
15058   eval "ac_cv_lib_$ac_lib_var=yes"
15059 else
15060   echo "configure: failed program was:" >&5
15061   cat conftest.$ac_ext >&5
15062   rm -rf conftest*
15063   eval "ac_cv_lib_$ac_lib_var=no"
15064 fi
15065 rm -f conftest*
15066 LIBS="$ac_save_LIBS"
15067
15068 fi
15069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15070   echo "$ac_t""yes" 1>&6
15071   have_readline=yes
15072 else
15073   echo "$ac_t""no" 1>&6
15074 have_readline=no
15075 fi
15076
15077                 LIBS="$save_LIBS"
15078                         
15079                 if test $have_readline = yes ; then
15080                         ol_with_readline=found
15081                         ol_link_readline=yes
15082
15083                         READLINE_LIBS="-lreadline"
15084                 fi
15085         fi
15086 fi
15087
15088 if test $ol_link_readline = yes ; then
15089         cat >> confdefs.h <<\EOF
15090 #define HAVE_READLINE 1
15091 EOF
15092
15093 fi
15094
15095
15096 if test $ol_enable_crypt != no ; then
15097         echo $ac_n "checking for crypt""... $ac_c" 1>&6
15098 echo "configure:15099: checking for crypt" >&5
15099 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
15100   echo $ac_n "(cached) $ac_c" 1>&6
15101 else
15102   cat > conftest.$ac_ext <<EOF
15103 #line 15104 "configure"
15104 #include "confdefs.h"
15105 /* System header to define __stub macros and hopefully few prototypes,
15106     which can conflict with char crypt(); below.  */
15107 #include <assert.h>
15108 /* Override any gcc2 internal prototype to avoid an error.  */
15109 /* We use char because int might match the return type of a gcc2
15110     builtin and then its argument prototype would still apply.  */
15111 char crypt();
15112 char (*f)();
15113
15114 int main() {
15115
15116 /* The GNU C library defines this for functions which it implements
15117     to always fail with ENOSYS.  Some functions are actually named
15118     something starting with __ and the normal name is an alias.  */
15119 #if defined (__stub_crypt) || defined (__stub___crypt)
15120 choke me
15121 #else
15122 f = crypt;
15123 #endif
15124
15125 ; return 0; }
15126 EOF
15127 if { (eval echo configure:15128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15128   rm -rf conftest*
15129   eval "ac_cv_func_crypt=yes"
15130 else
15131   echo "configure: failed program was:" >&5
15132   cat conftest.$ac_ext >&5
15133   rm -rf conftest*
15134   eval "ac_cv_func_crypt=no"
15135 fi
15136 rm -f conftest*
15137 fi
15138
15139 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
15140   echo "$ac_t""yes" 1>&6
15141   have_crypt=yes
15142 else
15143   echo "$ac_t""no" 1>&6
15144
15145                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
15146 echo "configure:15147: checking for crypt in -lcrypt" >&5
15147 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
15148 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15149   echo $ac_n "(cached) $ac_c" 1>&6
15150 else
15151   ac_save_LIBS="$LIBS"
15152 LIBS="-lcrypt  $LIBS"
15153 cat > conftest.$ac_ext <<EOF
15154 #line 15155 "configure"
15155 #include "confdefs.h"
15156 /* Override any gcc2 internal prototype to avoid an error.  */
15157 /* We use char because int might match the return type of a gcc2
15158     builtin and then its argument prototype would still apply.  */
15159 char crypt();
15160
15161 int main() {
15162 crypt()
15163 ; return 0; }
15164 EOF
15165 if { (eval echo configure:15166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15166   rm -rf conftest*
15167   eval "ac_cv_lib_$ac_lib_var=yes"
15168 else
15169   echo "configure: failed program was:" >&5
15170   cat conftest.$ac_ext >&5
15171   rm -rf conftest*
15172   eval "ac_cv_lib_$ac_lib_var=no"
15173 fi
15174 rm -f conftest*
15175 LIBS="$ac_save_LIBS"
15176
15177 fi
15178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15179   echo "$ac_t""yes" 1>&6
15180   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
15181                         have_crypt=yes
15182 else
15183   echo "$ac_t""no" 1>&6
15184 have_crypt=no
15185 fi
15186
15187 fi
15188
15189
15190         if test $have_crypt = yes ; then
15191                 cat >> confdefs.h <<\EOF
15192 #define HAVE_CRYPT 1
15193 EOF
15194
15195         else
15196                 echo "configure: warning: could not find crypt" 1>&2
15197                 if test $ol_enable_crypt = yes ; then
15198                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
15199                 fi
15200
15201                 echo "configure: warning: disabling crypt support" 1>&2
15202                 ol_enable_crypt=no
15203         fi
15204 fi
15205
15206 if test $ol_enable_proctitle != no ; then
15207         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
15208 echo "configure:15209: checking for setproctitle" >&5
15209 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
15210   echo $ac_n "(cached) $ac_c" 1>&6
15211 else
15212   cat > conftest.$ac_ext <<EOF
15213 #line 15214 "configure"
15214 #include "confdefs.h"
15215 /* System header to define __stub macros and hopefully few prototypes,
15216     which can conflict with char setproctitle(); below.  */
15217 #include <assert.h>
15218 /* Override any gcc2 internal prototype to avoid an error.  */
15219 /* We use char because int might match the return type of a gcc2
15220     builtin and then its argument prototype would still apply.  */
15221 char setproctitle();
15222 char (*f)();
15223
15224 int main() {
15225
15226 /* The GNU C library defines this for functions which it implements
15227     to always fail with ENOSYS.  Some functions are actually named
15228     something starting with __ and the normal name is an alias.  */
15229 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
15230 choke me
15231 #else
15232 f = setproctitle;
15233 #endif
15234
15235 ; return 0; }
15236 EOF
15237 if { (eval echo configure:15238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15238   rm -rf conftest*
15239   eval "ac_cv_func_setproctitle=yes"
15240 else
15241   echo "configure: failed program was:" >&5
15242   cat conftest.$ac_ext >&5
15243   rm -rf conftest*
15244   eval "ac_cv_func_setproctitle=no"
15245 fi
15246 rm -f conftest*
15247 fi
15248
15249 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
15250   echo "$ac_t""yes" 1>&6
15251   have_setproctitle=yes
15252 else
15253   echo "$ac_t""no" 1>&6
15254
15255                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
15256 echo "configure:15257: checking for setproctitle in -lutil" >&5
15257 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
15258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15259   echo $ac_n "(cached) $ac_c" 1>&6
15260 else
15261   ac_save_LIBS="$LIBS"
15262 LIBS="-lutil  $LIBS"
15263 cat > conftest.$ac_ext <<EOF
15264 #line 15265 "configure"
15265 #include "confdefs.h"
15266 /* Override any gcc2 internal prototype to avoid an error.  */
15267 /* We use char because int might match the return type of a gcc2
15268     builtin and then its argument prototype would still apply.  */
15269 char setproctitle();
15270
15271 int main() {
15272 setproctitle()
15273 ; return 0; }
15274 EOF
15275 if { (eval echo configure:15276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15276   rm -rf conftest*
15277   eval "ac_cv_lib_$ac_lib_var=yes"
15278 else
15279   echo "configure: failed program was:" >&5
15280   cat conftest.$ac_ext >&5
15281   rm -rf conftest*
15282   eval "ac_cv_lib_$ac_lib_var=no"
15283 fi
15284 rm -f conftest*
15285 LIBS="$ac_save_LIBS"
15286
15287 fi
15288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15289   echo "$ac_t""yes" 1>&6
15290   have_setproctitle=yes
15291                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
15292 else
15293   echo "$ac_t""no" 1>&6
15294 have_setproctitle=no
15295                         LIBOBJS="$LIBOBJS setproctitle.o"
15296                         LIBSRCS="$LIBSRCS setproctitle.c"
15297 fi
15298
15299 fi
15300
15301
15302         if test $have_setproctitle = yes ; then
15303                 cat >> confdefs.h <<\EOF
15304 #define HAVE_SETPROCTITLE 1
15305 EOF
15306
15307         fi
15308 fi
15309
15310 if test $ol_enable_slp != no ; then
15311         for ac_hdr in slp.h 
15312 do
15313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15315 echo "configure:15316: checking for $ac_hdr" >&5
15316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15317   echo $ac_n "(cached) $ac_c" 1>&6
15318 else
15319   cat > conftest.$ac_ext <<EOF
15320 #line 15321 "configure"
15321 #include "confdefs.h"
15322 #include <$ac_hdr>
15323 EOF
15324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15325 { (eval echo configure:15326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15327 if test -z "$ac_err"; then
15328   rm -rf conftest*
15329   eval "ac_cv_header_$ac_safe=yes"
15330 else
15331   echo "$ac_err" >&5
15332   echo "configure: failed program was:" >&5
15333   cat conftest.$ac_ext >&5
15334   rm -rf conftest*
15335   eval "ac_cv_header_$ac_safe=no"
15336 fi
15337 rm -f conftest*
15338 fi
15339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15340   echo "$ac_t""yes" 1>&6
15341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15342   cat >> confdefs.h <<EOF
15343 #define $ac_tr_hdr 1
15344 EOF
15345  
15346 else
15347   echo "$ac_t""no" 1>&6
15348 fi
15349 done
15350
15351
15352         if test $ac_cv_header_slp_h = yes ; then
15353                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
15354 echo "configure:15355: checking for SLPOpen in -lslp" >&5
15355 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
15356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15357   echo $ac_n "(cached) $ac_c" 1>&6
15358 else
15359   ac_save_LIBS="$LIBS"
15360 LIBS="-lslp  $LIBS"
15361 cat > conftest.$ac_ext <<EOF
15362 #line 15363 "configure"
15363 #include "confdefs.h"
15364 /* Override any gcc2 internal prototype to avoid an error.  */
15365 /* We use char because int might match the return type of a gcc2
15366     builtin and then its argument prototype would still apply.  */
15367 char SLPOpen();
15368
15369 int main() {
15370 SLPOpen()
15371 ; return 0; }
15372 EOF
15373 if { (eval echo configure:15374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15374   rm -rf conftest*
15375   eval "ac_cv_lib_$ac_lib_var=yes"
15376 else
15377   echo "configure: failed program was:" >&5
15378   cat conftest.$ac_ext >&5
15379   rm -rf conftest*
15380   eval "ac_cv_lib_$ac_lib_var=no"
15381 fi
15382 rm -f conftest*
15383 LIBS="$ac_save_LIBS"
15384
15385 fi
15386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15387   echo "$ac_t""yes" 1>&6
15388   have_slp=yes
15389 else
15390   echo "$ac_t""no" 1>&6
15391 have_slp=no
15392 fi
15393
15394                 if test $have_slp = yes ; then
15395                         cat >> confdefs.h <<\EOF
15396 #define HAVE_SLP 1
15397 EOF
15398
15399                         SLAPD_SLP_LIBS=-lslp
15400                 fi
15401
15402         elif test $ol_enable_slp = yes ; then
15403                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
15404         fi
15405 fi
15406
15407 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
15408 echo "configure:15409: checking for ANSI C header files" >&5
15409 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
15410   echo $ac_n "(cached) $ac_c" 1>&6
15411 else
15412   cat > conftest.$ac_ext <<EOF
15413 #line 15414 "configure"
15414 #include "confdefs.h"
15415 #include <stdlib.h>
15416 #include <stdarg.h>
15417 #include <string.h>
15418 #include <float.h>
15419 EOF
15420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15421 { (eval echo configure:15422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15423 if test -z "$ac_err"; then
15424   rm -rf conftest*
15425   ac_cv_header_stdc=yes
15426 else
15427   echo "$ac_err" >&5
15428   echo "configure: failed program was:" >&5
15429   cat conftest.$ac_ext >&5
15430   rm -rf conftest*
15431   ac_cv_header_stdc=no
15432 fi
15433 rm -f conftest*
15434
15435 if test $ac_cv_header_stdc = yes; then
15436   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15437 cat > conftest.$ac_ext <<EOF
15438 #line 15439 "configure"
15439 #include "confdefs.h"
15440 #include <string.h>
15441 EOF
15442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15443   egrep "memchr" >/dev/null 2>&1; then
15444   :
15445 else
15446   rm -rf conftest*
15447   ac_cv_header_stdc=no
15448 fi
15449 rm -f conftest*
15450
15451 fi
15452
15453 if test $ac_cv_header_stdc = yes; then
15454   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15455 cat > conftest.$ac_ext <<EOF
15456 #line 15457 "configure"
15457 #include "confdefs.h"
15458 #include <stdlib.h>
15459 EOF
15460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15461   egrep "free" >/dev/null 2>&1; then
15462   :
15463 else
15464   rm -rf conftest*
15465   ac_cv_header_stdc=no
15466 fi
15467 rm -f conftest*
15468
15469 fi
15470
15471 if test $ac_cv_header_stdc = yes; then
15472   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15473 if test "$cross_compiling" = yes; then
15474   :
15475 else
15476   cat > conftest.$ac_ext <<EOF
15477 #line 15478 "configure"
15478 #include "confdefs.h"
15479 #include <ctype.h>
15480 #if ((' ' & 0x0FF) == 0x020)
15481 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15482 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15483 #else
15484 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15485  || ('j' <= (c) && (c) <= 'r') \
15486  || ('s' <= (c) && (c) <= 'z'))
15487 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15488 #endif
15489 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15490 int main () { int i; for (i = 0; i < 256; i++)
15491 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
15492 exit (0); }
15493
15494 EOF
15495 if { (eval echo configure:15496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15496 then
15497   :
15498 else
15499   echo "configure: failed program was:" >&5
15500   cat conftest.$ac_ext >&5
15501   rm -fr conftest*
15502   ac_cv_header_stdc=no
15503 fi
15504 rm -fr conftest*
15505 fi
15506
15507 fi
15508 fi
15509
15510 echo "$ac_t""$ac_cv_header_stdc" 1>&6
15511 if test $ac_cv_header_stdc = yes; then
15512   cat >> confdefs.h <<\EOF
15513 #define STDC_HEADERS 1
15514 EOF
15515
15516 fi
15517
15518 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
15519 echo "configure:15520: checking for mode_t" >&5
15520 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
15521   echo $ac_n "(cached) $ac_c" 1>&6
15522 else
15523   cat > conftest.$ac_ext <<EOF
15524 #line 15525 "configure"
15525 #include "confdefs.h"
15526 #include <sys/types.h>
15527 #if STDC_HEADERS
15528 #include <stdlib.h>
15529 #include <stddef.h>
15530 #endif
15531
15532 EOF
15533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15534   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15535   rm -rf conftest*
15536   eval "ac_cv_type_mode_t=yes"
15537 else
15538   rm -rf conftest*
15539   eval "ac_cv_type_mode_t=no"
15540 fi
15541 rm -f conftest*
15542
15543 fi
15544 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
15545   echo "$ac_t""yes" 1>&6
15546 else
15547   echo "$ac_t""no" 1>&6
15548   cat >> confdefs.h <<EOF
15549 #define mode_t int
15550 EOF
15551
15552 fi
15553
15554 echo $ac_n "checking for off_t""... $ac_c" 1>&6
15555 echo "configure:15556: checking for off_t" >&5
15556 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
15557   echo $ac_n "(cached) $ac_c" 1>&6
15558 else
15559   cat > conftest.$ac_ext <<EOF
15560 #line 15561 "configure"
15561 #include "confdefs.h"
15562 #include <sys/types.h>
15563 #if STDC_HEADERS
15564 #include <stdlib.h>
15565 #include <stddef.h>
15566 #endif
15567
15568 EOF
15569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15570   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15571   rm -rf conftest*
15572   eval "ac_cv_type_off_t=yes"
15573 else
15574   rm -rf conftest*
15575   eval "ac_cv_type_off_t=no"
15576 fi
15577 rm -f conftest*
15578
15579 fi
15580 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
15581   echo "$ac_t""yes" 1>&6
15582 else
15583   echo "$ac_t""no" 1>&6
15584   cat >> confdefs.h <<EOF
15585 #define off_t long
15586 EOF
15587
15588 fi
15589
15590 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
15591 echo "configure:15592: checking for pid_t" >&5
15592 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
15593   echo $ac_n "(cached) $ac_c" 1>&6
15594 else
15595   cat > conftest.$ac_ext <<EOF
15596 #line 15597 "configure"
15597 #include "confdefs.h"
15598 #include <sys/types.h>
15599 #if STDC_HEADERS
15600 #include <stdlib.h>
15601 #include <stddef.h>
15602 #endif
15603
15604 EOF
15605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15606   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15607   rm -rf conftest*
15608   eval "ac_cv_type_pid_t=yes"
15609 else
15610   rm -rf conftest*
15611   eval "ac_cv_type_pid_t=no"
15612 fi
15613 rm -f conftest*
15614
15615 fi
15616 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
15617   echo "$ac_t""yes" 1>&6
15618 else
15619   echo "$ac_t""no" 1>&6
15620   cat >> confdefs.h <<EOF
15621 #define pid_t int
15622 EOF
15623
15624 fi
15625
15626 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
15627 echo "configure:15628: checking for ptrdiff_t" >&5
15628 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
15629   echo $ac_n "(cached) $ac_c" 1>&6
15630 else
15631   cat > conftest.$ac_ext <<EOF
15632 #line 15633 "configure"
15633 #include "confdefs.h"
15634 #include <stddef.h>
15635 int main() {
15636 ptrdiff_t p
15637 ; return 0; }
15638 EOF
15639 if { (eval echo configure:15640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15640   rm -rf conftest*
15641   am_cv_type_ptrdiff_t=yes
15642 else
15643   echo "configure: failed program was:" >&5
15644   cat conftest.$ac_ext >&5
15645   rm -rf conftest*
15646   am_cv_type_ptrdiff_t=no
15647 fi
15648 rm -f conftest*
15649 fi
15650
15651 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
15652    if test $am_cv_type_ptrdiff_t = yes; then
15653      cat >> confdefs.h <<\EOF
15654 #define HAVE_PTRDIFF_T 1
15655 EOF
15656
15657    fi
15658
15659 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
15660 echo "configure:15661: checking return type of signal handlers" >&5
15661 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
15662   echo $ac_n "(cached) $ac_c" 1>&6
15663 else
15664   cat > conftest.$ac_ext <<EOF
15665 #line 15666 "configure"
15666 #include "confdefs.h"
15667 #include <sys/types.h>
15668 #include <signal.h>
15669 #ifdef signal
15670 #undef signal
15671 #endif
15672 #ifdef __cplusplus
15673 extern "C" void (*signal (int, void (*)(int)))(int);
15674 #else
15675 void (*signal ()) ();
15676 #endif
15677
15678 int main() {
15679 int i;
15680 ; return 0; }
15681 EOF
15682 if { (eval echo configure:15683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15683   rm -rf conftest*
15684   ac_cv_type_signal=void
15685 else
15686   echo "configure: failed program was:" >&5
15687   cat conftest.$ac_ext >&5
15688   rm -rf conftest*
15689   ac_cv_type_signal=int
15690 fi
15691 rm -f conftest*
15692 fi
15693
15694 echo "$ac_t""$ac_cv_type_signal" 1>&6
15695 cat >> confdefs.h <<EOF
15696 #define RETSIGTYPE $ac_cv_type_signal
15697 EOF
15698
15699
15700 echo $ac_n "checking for size_t""... $ac_c" 1>&6
15701 echo "configure:15702: checking for size_t" >&5
15702 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
15703   echo $ac_n "(cached) $ac_c" 1>&6
15704 else
15705   cat > conftest.$ac_ext <<EOF
15706 #line 15707 "configure"
15707 #include "confdefs.h"
15708 #include <sys/types.h>
15709 #if STDC_HEADERS
15710 #include <stdlib.h>
15711 #include <stddef.h>
15712 #endif
15713
15714 EOF
15715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15716   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15717   rm -rf conftest*
15718   eval "ac_cv_type_size_t=yes"
15719 else
15720   rm -rf conftest*
15721   eval "ac_cv_type_size_t=no"
15722 fi
15723 rm -f conftest*
15724
15725 fi
15726 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
15727   echo "$ac_t""yes" 1>&6
15728 else
15729   echo "$ac_t""no" 1>&6
15730   cat >> confdefs.h <<EOF
15731 #define size_t unsigned
15732 EOF
15733
15734 fi
15735
15736
15737 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
15738 echo "configure:15739: checking for ssize_t" >&5
15739 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
15740   echo $ac_n "(cached) $ac_c" 1>&6
15741 else
15742   cat > conftest.$ac_ext <<EOF
15743 #line 15744 "configure"
15744 #include "confdefs.h"
15745 #include <sys/types.h>
15746 #if STDC_HEADERS
15747 #include <stdlib.h>
15748 #include <stddef.h>
15749 #endif
15750
15751 EOF
15752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15753   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15754   rm -rf conftest*
15755   eval "ac_cv_type_ssize_t=yes"
15756 else
15757   rm -rf conftest*
15758   eval "ac_cv_type_ssize_t=no"
15759 fi
15760 rm -f conftest*
15761
15762 fi
15763 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
15764   echo "$ac_t""yes" 1>&6
15765 else
15766   echo "$ac_t""no" 1>&6
15767   cat >> confdefs.h <<EOF
15768 #define ssize_t signed int
15769 EOF
15770
15771 fi
15772
15773 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
15774 echo "configure:15775: checking for caddr_t" >&5
15775 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
15776   echo $ac_n "(cached) $ac_c" 1>&6
15777 else
15778   cat > conftest.$ac_ext <<EOF
15779 #line 15780 "configure"
15780 #include "confdefs.h"
15781 #include <sys/types.h>
15782 #if STDC_HEADERS
15783 #include <stdlib.h>
15784 #include <stddef.h>
15785 #endif
15786
15787 EOF
15788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15789   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15790   rm -rf conftest*
15791   eval "ac_cv_type_caddr_t=yes"
15792 else
15793   rm -rf conftest*
15794   eval "ac_cv_type_caddr_t=no"
15795 fi
15796 rm -f conftest*
15797
15798 fi
15799 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
15800   echo "$ac_t""yes" 1>&6
15801 else
15802   echo "$ac_t""no" 1>&6
15803   cat >> confdefs.h <<EOF
15804 #define caddr_t char *
15805 EOF
15806
15807 fi
15808
15809
15810 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
15811 echo "configure:15812: checking for socklen_t" >&5
15812 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
15813   echo $ac_n "(cached) $ac_c" 1>&6
15814 else
15815   cat > conftest.$ac_ext <<EOF
15816 #line 15817 "configure"
15817 #include "confdefs.h"
15818
15819 #ifdef HAVE_SYS_TYPES_H
15820 #include <sys/types.h>
15821 #endif
15822 #ifdef HAVE_SYS_SOCKET_H
15823 #include <sys/socket.h>
15824 #endif
15825
15826 int main() {
15827 socklen_t len;
15828 ; return 0; }
15829 EOF
15830 if { (eval echo configure:15831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15831   rm -rf conftest*
15832   ol_cv_type_socklen_t=yes
15833 else
15834   echo "configure: failed program was:" >&5
15835   cat conftest.$ac_ext >&5
15836   rm -rf conftest*
15837   ol_cv_type_socklen_t=no
15838 fi
15839 rm -f conftest*
15840 fi
15841
15842 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
15843   if test $ol_cv_type_socklen_t = no; then
15844     cat >> confdefs.h <<\EOF
15845 #define socklen_t int
15846 EOF
15847
15848   fi
15849  
15850 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
15851 echo "configure:15852: checking for member st_blksize in aggregate type struct stat" >&5
15852 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
15853   echo $ac_n "(cached) $ac_c" 1>&6
15854 else
15855   cat > conftest.$ac_ext <<EOF
15856 #line 15857 "configure"
15857 #include "confdefs.h"
15858 #include <sys/types.h>
15859 #include <sys/stat.h>
15860 int main() {
15861 struct stat foo; foo.st_blksize;
15862 ; return 0; }
15863 EOF
15864 if { (eval echo configure:15865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15865   rm -rf conftest*
15866   ac_cv_c_struct_member_st_blksize=yes
15867 else
15868   echo "configure: failed program was:" >&5
15869   cat conftest.$ac_ext >&5
15870   rm -rf conftest*
15871   ac_cv_c_struct_member_st_blksize=no
15872 fi
15873 rm -f conftest*
15874 fi
15875
15876 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
15877 st_blksize="$ac_cv_c_struct_member_st_blksize"
15878 if test $ac_cv_c_struct_member_st_blksize = yes; then
15879   cat >> confdefs.h <<\EOF
15880 #define HAVE_ST_BLKSIZE 1
15881 EOF
15882
15883 fi
15884
15885 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
15886 echo "configure:15887: checking whether time.h and sys/time.h may both be included" >&5
15887 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
15888   echo $ac_n "(cached) $ac_c" 1>&6
15889 else
15890   cat > conftest.$ac_ext <<EOF
15891 #line 15892 "configure"
15892 #include "confdefs.h"
15893 #include <sys/types.h>
15894 #include <sys/time.h>
15895 #include <time.h>
15896 int main() {
15897 struct tm *tp;
15898 ; return 0; }
15899 EOF
15900 if { (eval echo configure:15901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15901   rm -rf conftest*
15902   ac_cv_header_time=yes
15903 else
15904   echo "configure: failed program was:" >&5
15905   cat conftest.$ac_ext >&5
15906   rm -rf conftest*
15907   ac_cv_header_time=no
15908 fi
15909 rm -f conftest*
15910 fi
15911
15912 echo "$ac_t""$ac_cv_header_time" 1>&6
15913 if test $ac_cv_header_time = yes; then
15914   cat >> confdefs.h <<\EOF
15915 #define TIME_WITH_SYS_TIME 1
15916 EOF
15917
15918 fi
15919
15920 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
15921 echo "configure:15922: checking whether struct tm is in sys/time.h or time.h" >&5
15922 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
15923   echo $ac_n "(cached) $ac_c" 1>&6
15924 else
15925   cat > conftest.$ac_ext <<EOF
15926 #line 15927 "configure"
15927 #include "confdefs.h"
15928 #include <sys/types.h>
15929 #include <time.h>
15930 int main() {
15931 struct tm *tp; tp->tm_sec;
15932 ; return 0; }
15933 EOF
15934 if { (eval echo configure:15935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15935   rm -rf conftest*
15936   ac_cv_struct_tm=time.h
15937 else
15938   echo "configure: failed program was:" >&5
15939   cat conftest.$ac_ext >&5
15940   rm -rf conftest*
15941   ac_cv_struct_tm=sys/time.h
15942 fi
15943 rm -f conftest*
15944 fi
15945
15946 echo "$ac_t""$ac_cv_struct_tm" 1>&6
15947 if test $ac_cv_struct_tm = sys/time.h; then
15948   cat >> confdefs.h <<\EOF
15949 #define TM_IN_SYS_TIME 1
15950 EOF
15951
15952 fi
15953
15954 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
15955 echo "configure:15956: checking for uid_t in sys/types.h" >&5
15956 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
15957   echo $ac_n "(cached) $ac_c" 1>&6
15958 else
15959   cat > conftest.$ac_ext <<EOF
15960 #line 15961 "configure"
15961 #include "confdefs.h"
15962 #include <sys/types.h>
15963 EOF
15964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15965   egrep "uid_t" >/dev/null 2>&1; then
15966   rm -rf conftest*
15967   ac_cv_type_uid_t=yes
15968 else
15969   rm -rf conftest*
15970   ac_cv_type_uid_t=no
15971 fi
15972 rm -f conftest*
15973
15974 fi
15975
15976 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
15977 if test $ac_cv_type_uid_t = no; then
15978   cat >> confdefs.h <<\EOF
15979 #define uid_t int
15980 EOF
15981
15982   cat >> confdefs.h <<\EOF
15983 #define gid_t int
15984 EOF
15985
15986 fi
15987
15988 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
15989 echo "configure:15990: checking for sig_atomic_t" >&5
15990 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
15991   echo $ac_n "(cached) $ac_c" 1>&6
15992 else
15993   cat > conftest.$ac_ext <<EOF
15994 #line 15995 "configure"
15995 #include "confdefs.h"
15996 #include <signal.h>
15997 int main() {
15998 sig_atomic_t atomic;
15999 ; return 0; }
16000 EOF
16001 if { (eval echo configure:16002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16002   rm -rf conftest*
16003   ol_cv_type_sig_atomic_t=yes
16004 else
16005   echo "configure: failed program was:" >&5
16006   cat conftest.$ac_ext >&5
16007   rm -rf conftest*
16008   ol_cv_type_sig_atomic_t=no
16009 fi
16010 rm -f conftest*
16011 fi
16012
16013 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
16014   if test $ol_cv_type_sig_atomic_t = no; then
16015     cat >> confdefs.h <<\EOF
16016 #define sig_atomic_t int
16017 EOF
16018
16019   fi
16020  
16021
16022
16023 # test for pw_gecos in struct passwd
16024 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
16025 echo "configure:16026: checking struct passwd for pw_gecos" >&5
16026 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
16027   echo $ac_n "(cached) $ac_c" 1>&6
16028 else
16029   
16030         cat > conftest.$ac_ext <<EOF
16031 #line 16032 "configure"
16032 #include "confdefs.h"
16033 #include <pwd.h>
16034 int main() {
16035
16036         struct passwd pwd;
16037         pwd.pw_gecos = pwd.pw_name;
16038
16039 ; return 0; }
16040 EOF
16041 if { (eval echo configure:16042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16042   rm -rf conftest*
16043   ol_cv_struct_passwd_pw_gecos=yes
16044 else
16045   echo "configure: failed program was:" >&5
16046   cat conftest.$ac_ext >&5
16047   rm -rf conftest*
16048   ol_cv_struct_passwd_pw_gecos=no
16049 fi
16050 rm -f conftest*
16051 fi
16052
16053 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
16054 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
16055         cat >> confdefs.h <<\EOF
16056 #define HAVE_PW_GECOS 1
16057 EOF
16058
16059 fi
16060
16061 # test for pw_passwd in struct passwd
16062 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
16063 echo "configure:16064: checking struct passwd for pw_passwd" >&5
16064 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
16065   echo $ac_n "(cached) $ac_c" 1>&6
16066 else
16067   
16068         cat > conftest.$ac_ext <<EOF
16069 #line 16070 "configure"
16070 #include "confdefs.h"
16071 #include <pwd.h>
16072 int main() {
16073
16074         struct passwd pwd;
16075         pwd.pw_passwd = pwd.pw_name;
16076
16077 ; return 0; }
16078 EOF
16079 if { (eval echo configure:16080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16080   rm -rf conftest*
16081   ol_cv_struct_passwd_pw_passwd=yes
16082 else
16083   echo "configure: failed program was:" >&5
16084   cat conftest.$ac_ext >&5
16085   rm -rf conftest*
16086   ol_cv_struct_passwd_pw_passwd=no
16087 fi
16088 rm -f conftest*
16089 fi
16090
16091 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
16092 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
16093         cat >> confdefs.h <<\EOF
16094 #define HAVE_PW_PASSWD 1
16095 EOF
16096
16097 fi
16098
16099
16100 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
16101 echo "configure:16102: checking if toupper() requires islower()" >&5
16102 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
16103   echo $ac_n "(cached) $ac_c" 1>&6
16104 else
16105   
16106         if test "$cross_compiling" = yes; then
16107   ol_cv_c_upper_lower=safe
16108 else
16109   cat > conftest.$ac_ext <<EOF
16110 #line 16111 "configure"
16111 #include "confdefs.h"
16112
16113 #include <ctype.h>
16114 main()
16115 {
16116         if ('C' == toupper('C'))
16117                 exit(0);
16118         else
16119                 exit(1);
16120 }
16121 EOF
16122 if { (eval echo configure:16123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16123 then
16124   ol_cv_c_upper_lower=no
16125 else
16126   echo "configure: failed program was:" >&5
16127   cat conftest.$ac_ext >&5
16128   rm -fr conftest*
16129   ol_cv_c_upper_lower=yes
16130 fi
16131 rm -fr conftest*
16132 fi
16133
16134 fi
16135
16136 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
16137 if test $ol_cv_c_upper_lower != no ; then
16138         cat >> confdefs.h <<\EOF
16139 #define C_UPPER_LOWER 1
16140 EOF
16141
16142 fi
16143
16144 echo $ac_n "checking for working const""... $ac_c" 1>&6
16145 echo "configure:16146: checking for working const" >&5
16146 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
16147   echo $ac_n "(cached) $ac_c" 1>&6
16148 else
16149   cat > conftest.$ac_ext <<EOF
16150 #line 16151 "configure"
16151 #include "confdefs.h"
16152
16153 int main() {
16154
16155 /* Ultrix mips cc rejects this.  */
16156 typedef int charset[2]; const charset x;
16157 /* SunOS 4.1.1 cc rejects this.  */
16158 char const *const *ccp;
16159 char **p;
16160 /* NEC SVR4.0.2 mips cc rejects this.  */
16161 struct point {int x, y;};
16162 static struct point const zero = {0,0};
16163 /* AIX XL C 1.02.0.0 rejects this.
16164    It does not let you subtract one const X* pointer from another in an arm
16165    of an if-expression whose if-part is not a constant expression */
16166 const char *g = "string";
16167 ccp = &g + (g ? g-g : 0);
16168 /* HPUX 7.0 cc rejects these. */
16169 ++ccp;
16170 p = (char**) ccp;
16171 ccp = (char const *const *) p;
16172 { /* SCO 3.2v4 cc rejects this.  */
16173   char *t;
16174   char const *s = 0 ? (char *) 0 : (char const *) 0;
16175
16176   *t++ = 0;
16177 }
16178 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16179   int x[] = {25, 17};
16180   const int *foo = &x[0];
16181   ++foo;
16182 }
16183 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16184   typedef const int *iptr;
16185   iptr p = 0;
16186   ++p;
16187 }
16188 { /* AIX XL C 1.02.0.0 rejects this saying
16189      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16190   struct s { int j; const int *ap[3]; };
16191   struct s *b; b->j = 5;
16192 }
16193 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16194   const int foo = 10;
16195 }
16196
16197 ; return 0; }
16198 EOF
16199 if { (eval echo configure:16200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16200   rm -rf conftest*
16201   ac_cv_c_const=yes
16202 else
16203   echo "configure: failed program was:" >&5
16204   cat conftest.$ac_ext >&5
16205   rm -rf conftest*
16206   ac_cv_c_const=no
16207 fi
16208 rm -f conftest*
16209 fi
16210
16211 echo "$ac_t""$ac_cv_c_const" 1>&6
16212 if test $ac_cv_c_const = no; then
16213   cat >> confdefs.h <<\EOF
16214 #define const 
16215 EOF
16216
16217 fi
16218
16219 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
16220 echo "configure:16221: checking if compiler understands volatile" >&5
16221 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
16222   echo $ac_n "(cached) $ac_c" 1>&6
16223 else
16224   cat > conftest.$ac_ext <<EOF
16225 #line 16226 "configure"
16226 #include "confdefs.h"
16227 int x, y, z;
16228 int main() {
16229 volatile int a; int * volatile b = x ? &y : &z;
16230       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
16231       *b = 0;
16232 ; return 0; }
16233 EOF
16234 if { (eval echo configure:16235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16235   rm -rf conftest*
16236   ol_cv_c_volatile=yes
16237 else
16238   echo "configure: failed program was:" >&5
16239   cat conftest.$ac_ext >&5
16240   rm -rf conftest*
16241   ol_cv_c_volatile=no
16242 fi
16243 rm -f conftest*
16244 fi
16245
16246 echo "$ac_t""$ol_cv_c_volatile" 1>&6
16247   if test $ol_cv_c_volatile = yes; then
16248     : 
16249   else
16250     cat >> confdefs.h <<\EOF
16251 #define volatile 
16252 EOF
16253
16254   fi
16255  
16256
16257 if test $cross_compiling = yes ; then
16258         cat >> confdefs.h <<\EOF
16259 #define CROSS_COMPILING 1
16260 EOF
16261
16262 else
16263         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
16264 echo "configure:16265: checking whether byte ordering is bigendian" >&5
16265 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
16266   echo $ac_n "(cached) $ac_c" 1>&6
16267 else
16268   ac_cv_c_bigendian=unknown
16269 # See if sys/param.h defines the BYTE_ORDER macro.
16270 cat > conftest.$ac_ext <<EOF
16271 #line 16272 "configure"
16272 #include "confdefs.h"
16273 #include <sys/types.h>
16274 #include <sys/param.h>
16275 int main() {
16276
16277 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16278  bogus endian macros
16279 #endif
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   # It does; now see whether it defined to BIG_ENDIAN or not.
16285 cat > conftest.$ac_ext <<EOF
16286 #line 16287 "configure"
16287 #include "confdefs.h"
16288 #include <sys/types.h>
16289 #include <sys/param.h>
16290 int main() {
16291
16292 #if BYTE_ORDER != BIG_ENDIAN
16293  not big endian
16294 #endif
16295 ; return 0; }
16296 EOF
16297 if { (eval echo configure:16298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16298   rm -rf conftest*
16299   ac_cv_c_bigendian=yes
16300 else
16301   echo "configure: failed program was:" >&5
16302   cat conftest.$ac_ext >&5
16303   rm -rf conftest*
16304   ac_cv_c_bigendian=no
16305 fi
16306 rm -f conftest*
16307 else
16308   echo "configure: failed program was:" >&5
16309   cat conftest.$ac_ext >&5
16310 fi
16311 rm -f conftest*
16312 if test $ac_cv_c_bigendian = unknown; then
16313 if test "$cross_compiling" = yes; then
16314     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
16315 else
16316   cat > conftest.$ac_ext <<EOF
16317 #line 16318 "configure"
16318 #include "confdefs.h"
16319 main () {
16320   /* Are we little or big endian?  From Harbison&Steele.  */
16321   union
16322   {
16323     long l;
16324     char c[sizeof (long)];
16325   } u;
16326   u.l = 1;
16327   exit (u.c[sizeof (long) - 1] == 1);
16328 }
16329 EOF
16330 if { (eval echo configure:16331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16331 then
16332   ac_cv_c_bigendian=no
16333 else
16334   echo "configure: failed program was:" >&5
16335   cat conftest.$ac_ext >&5
16336   rm -fr conftest*
16337   ac_cv_c_bigendian=yes
16338 fi
16339 rm -fr conftest*
16340 fi
16341
16342 fi
16343 fi
16344
16345 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
16346 if test $ac_cv_c_bigendian = yes; then
16347   cat >> confdefs.h <<\EOF
16348 #define WORDS_BIGENDIAN 1
16349 EOF
16350
16351 fi
16352
16353 fi
16354
16355 echo $ac_n "checking size of short""... $ac_c" 1>&6
16356 echo "configure:16357: checking size of short" >&5 
16357 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
16358   echo $ac_n "(cached) $ac_c" 1>&6
16359 else
16360   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16361   cat > conftest.$ac_ext <<EOF
16362 #line 16363 "configure"
16363 #include "confdefs.h"
16364 #include "confdefs.h" 
16365 #include <sys/types.h> 
16366  
16367
16368 int main() {
16369 switch (0) case 0: case (sizeof (short) == $ac_size):;
16370 ; return 0; }
16371 EOF
16372 if { (eval echo configure:16373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16373   rm -rf conftest*
16374   ac_cv_sizeof_short=$ac_size
16375 else
16376   echo "configure: failed program was:" >&5
16377   cat conftest.$ac_ext >&5
16378 fi
16379 rm -f conftest* 
16380   if test x$ac_cv_sizeof_short != x ; then break; fi 
16381 done 
16382
16383 fi
16384  
16385 if test x$ac_cv_sizeof_short = x ; then 
16386   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
16387 fi 
16388 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
16389 cat >> confdefs.h <<EOF
16390 #define SIZEOF_SHORT $ac_cv_sizeof_short
16391 EOF
16392  
16393  
16394 echo $ac_n "checking size of int""... $ac_c" 1>&6
16395 echo "configure:16396: checking size of int" >&5 
16396 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
16397   echo $ac_n "(cached) $ac_c" 1>&6
16398 else
16399   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16400   cat > conftest.$ac_ext <<EOF
16401 #line 16402 "configure"
16402 #include "confdefs.h"
16403 #include "confdefs.h" 
16404 #include <sys/types.h> 
16405  
16406
16407 int main() {
16408 switch (0) case 0: case (sizeof (int) == $ac_size):;
16409 ; return 0; }
16410 EOF
16411 if { (eval echo configure:16412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16412   rm -rf conftest*
16413   ac_cv_sizeof_int=$ac_size
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417 fi
16418 rm -f conftest* 
16419   if test x$ac_cv_sizeof_int != x ; then break; fi 
16420 done 
16421
16422 fi
16423  
16424 if test x$ac_cv_sizeof_int = x ; then 
16425   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
16426 fi 
16427 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
16428 cat >> confdefs.h <<EOF
16429 #define SIZEOF_INT $ac_cv_sizeof_int
16430 EOF
16431  
16432  
16433 echo $ac_n "checking size of long""... $ac_c" 1>&6
16434 echo "configure:16435: checking size of long" >&5 
16435 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
16436   echo $ac_n "(cached) $ac_c" 1>&6
16437 else
16438   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16439   cat > conftest.$ac_ext <<EOF
16440 #line 16441 "configure"
16441 #include "confdefs.h"
16442 #include "confdefs.h" 
16443 #include <sys/types.h> 
16444  
16445
16446 int main() {
16447 switch (0) case 0: case (sizeof (long) == $ac_size):;
16448 ; return 0; }
16449 EOF
16450 if { (eval echo configure:16451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16451   rm -rf conftest*
16452   ac_cv_sizeof_long=$ac_size
16453 else
16454   echo "configure: failed program was:" >&5
16455   cat conftest.$ac_ext >&5
16456 fi
16457 rm -f conftest* 
16458   if test x$ac_cv_sizeof_long != x ; then break; fi 
16459 done 
16460
16461 fi
16462  
16463 if test x$ac_cv_sizeof_long = x ; then 
16464   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
16465 fi 
16466 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
16467 cat >> confdefs.h <<EOF
16468 #define SIZEOF_LONG $ac_cv_sizeof_long
16469 EOF
16470  
16471
16472
16473 if test "$ac_cv_sizeof_int" -lt 4 ; then
16474         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
16475
16476         cat >> confdefs.h <<\EOF
16477 #define LBER_INT_T long
16478 EOF
16479
16480 else
16481         cat >> confdefs.h <<\EOF
16482 #define LBER_INT_T int
16483 EOF
16484
16485 fi
16486
16487 cat >> confdefs.h <<\EOF
16488 #define LBER_LEN_T long
16489 EOF
16490
16491 cat >> confdefs.h <<\EOF
16492 #define LBER_SOCKET_T int
16493 EOF
16494
16495 cat >> confdefs.h <<\EOF
16496 #define LBER_TAG_T long
16497 EOF
16498
16499
16500 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
16501 echo "configure:16502: checking for 8-bit clean memcmp" >&5
16502 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
16503   echo $ac_n "(cached) $ac_c" 1>&6
16504 else
16505   if test "$cross_compiling" = yes; then
16506   ac_cv_func_memcmp_clean=no
16507 else
16508   cat > conftest.$ac_ext <<EOF
16509 #line 16510 "configure"
16510 #include "confdefs.h"
16511
16512 main()
16513 {
16514   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
16515   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
16516 }
16517
16518 EOF
16519 if { (eval echo configure:16520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16520 then
16521   ac_cv_func_memcmp_clean=yes
16522 else
16523   echo "configure: failed program was:" >&5
16524   cat conftest.$ac_ext >&5
16525   rm -fr conftest*
16526   ac_cv_func_memcmp_clean=no
16527 fi
16528 rm -fr conftest*
16529 fi
16530
16531 fi
16532
16533 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
16534 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
16535
16536 echo $ac_n "checking for strftime""... $ac_c" 1>&6
16537 echo "configure:16538: checking for strftime" >&5
16538 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
16539   echo $ac_n "(cached) $ac_c" 1>&6
16540 else
16541   cat > conftest.$ac_ext <<EOF
16542 #line 16543 "configure"
16543 #include "confdefs.h"
16544 /* System header to define __stub macros and hopefully few prototypes,
16545     which can conflict with char strftime(); below.  */
16546 #include <assert.h>
16547 /* Override any gcc2 internal prototype to avoid an error.  */
16548 /* We use char because int might match the return type of a gcc2
16549     builtin and then its argument prototype would still apply.  */
16550 char strftime();
16551 char (*f)();
16552
16553 int main() {
16554
16555 /* The GNU C library defines this for functions which it implements
16556     to always fail with ENOSYS.  Some functions are actually named
16557     something starting with __ and the normal name is an alias.  */
16558 #if defined (__stub_strftime) || defined (__stub___strftime)
16559 choke me
16560 #else
16561 f = strftime;
16562 #endif
16563
16564 ; return 0; }
16565 EOF
16566 if { (eval echo configure:16567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16567   rm -rf conftest*
16568   eval "ac_cv_func_strftime=yes"
16569 else
16570   echo "configure: failed program was:" >&5
16571   cat conftest.$ac_ext >&5
16572   rm -rf conftest*
16573   eval "ac_cv_func_strftime=no"
16574 fi
16575 rm -f conftest*
16576 fi
16577
16578 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
16579   echo "$ac_t""yes" 1>&6
16580   cat >> confdefs.h <<\EOF
16581 #define HAVE_STRFTIME 1
16582 EOF
16583
16584 else
16585   echo "$ac_t""no" 1>&6
16586 # strftime is in -lintl on SCO UNIX.
16587 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
16588 echo "configure:16589: checking for strftime in -lintl" >&5
16589 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
16590 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16591   echo $ac_n "(cached) $ac_c" 1>&6
16592 else
16593   ac_save_LIBS="$LIBS"
16594 LIBS="-lintl  $LIBS"
16595 cat > conftest.$ac_ext <<EOF
16596 #line 16597 "configure"
16597 #include "confdefs.h"
16598 /* Override any gcc2 internal prototype to avoid an error.  */
16599 /* We use char because int might match the return type of a gcc2
16600     builtin and then its argument prototype would still apply.  */
16601 char strftime();
16602
16603 int main() {
16604 strftime()
16605 ; return 0; }
16606 EOF
16607 if { (eval echo configure:16608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16608   rm -rf conftest*
16609   eval "ac_cv_lib_$ac_lib_var=yes"
16610 else
16611   echo "configure: failed program was:" >&5
16612   cat conftest.$ac_ext >&5
16613   rm -rf conftest*
16614   eval "ac_cv_lib_$ac_lib_var=no"
16615 fi
16616 rm -f conftest*
16617 LIBS="$ac_save_LIBS"
16618
16619 fi
16620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16621   echo "$ac_t""yes" 1>&6
16622   cat >> confdefs.h <<\EOF
16623 #define HAVE_STRFTIME 1
16624 EOF
16625
16626 LIBS="-lintl $LIBS"
16627 else
16628   echo "$ac_t""no" 1>&6
16629 fi
16630
16631 fi
16632
16633
16634 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
16635 echo "configure:16636: checking for inet_aton()" >&5
16636 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
16637   echo $ac_n "(cached) $ac_c" 1>&6
16638 else
16639   cat > conftest.$ac_ext <<EOF
16640 #line 16641 "configure"
16641 #include "confdefs.h"
16642
16643 #ifdef HAVE_SYS_TYPES_H
16644 #       include <sys/types.h>
16645 #endif
16646 #ifdef HAVE_SYS_SOCKET_H
16647 #       include <sys/socket.h>
16648 #       ifdef HAVE_SYS_SELECT_H
16649 #               include <sys/select.h>
16650 #       endif
16651 #       include <netinet/in.h>
16652 #       ifdef HAVE_ARPA_INET_H
16653 #               include <arpa/inet.h>
16654 #       endif
16655 #endif
16656
16657 int main() {
16658 struct in_addr in;
16659 int rc = inet_aton( "255.255.255.255", &in );
16660 ; return 0; }
16661 EOF
16662 if { (eval echo configure:16663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16663   rm -rf conftest*
16664   ol_cv_func_inet_aton=yes
16665 else
16666   echo "configure: failed program was:" >&5
16667   cat conftest.$ac_ext >&5
16668   rm -rf conftest*
16669   ol_cv_func_inet_aton=no
16670 fi
16671 rm -f conftest*
16672 fi
16673
16674 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
16675   if test $ol_cv_func_inet_aton != no; then
16676     cat >> confdefs.h <<\EOF
16677 #define HAVE_INET_ATON 1
16678 EOF
16679
16680   fi
16681  
16682
16683 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
16684 echo "configure:16685: checking for _spawnlp" >&5
16685 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
16686   echo $ac_n "(cached) $ac_c" 1>&6
16687 else
16688   cat > conftest.$ac_ext <<EOF
16689 #line 16690 "configure"
16690 #include "confdefs.h"
16691 /* System header to define __stub macros and hopefully few prototypes,
16692     which can conflict with char _spawnlp(); below.  */
16693 #include <assert.h>
16694 /* Override any gcc2 internal prototype to avoid an error.  */
16695 /* We use char because int might match the return type of a gcc2
16696     builtin and then its argument prototype would still apply.  */
16697 char _spawnlp();
16698 char (*f)();
16699
16700 int main() {
16701
16702 /* The GNU C library defines this for functions which it implements
16703     to always fail with ENOSYS.  Some functions are actually named
16704     something starting with __ and the normal name is an alias.  */
16705 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
16706 choke me
16707 #else
16708 f = _spawnlp;
16709 #endif
16710
16711 ; return 0; }
16712 EOF
16713 if { (eval echo configure:16714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16714   rm -rf conftest*
16715   eval "ac_cv_func__spawnlp=yes"
16716 else
16717   echo "configure: failed program was:" >&5
16718   cat conftest.$ac_ext >&5
16719   rm -rf conftest*
16720   eval "ac_cv_func__spawnlp=no"
16721 fi
16722 rm -f conftest*
16723 fi
16724
16725 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
16726   echo "$ac_t""yes" 1>&6
16727   cat >> confdefs.h <<\EOF
16728 #define HAVE_SPAWNLP 1
16729 EOF
16730
16731 else
16732   echo "$ac_t""no" 1>&6
16733 fi
16734
16735
16736 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
16737 echo "configure:16738: checking for _snprintf" >&5
16738 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
16739   echo $ac_n "(cached) $ac_c" 1>&6
16740 else
16741   cat > conftest.$ac_ext <<EOF
16742 #line 16743 "configure"
16743 #include "confdefs.h"
16744 /* System header to define __stub macros and hopefully few prototypes,
16745     which can conflict with char _snprintf(); below.  */
16746 #include <assert.h>
16747 /* Override any gcc2 internal prototype to avoid an error.  */
16748 /* We use char because int might match the return type of a gcc2
16749     builtin and then its argument prototype would still apply.  */
16750 char _snprintf();
16751 char (*f)();
16752
16753 int main() {
16754
16755 /* The GNU C library defines this for functions which it implements
16756     to always fail with ENOSYS.  Some functions are actually named
16757     something starting with __ and the normal name is an alias.  */
16758 #if defined (__stub__snprintf) || defined (__stub____snprintf)
16759 choke me
16760 #else
16761 f = _snprintf;
16762 #endif
16763
16764 ; return 0; }
16765 EOF
16766 if { (eval echo configure:16767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16767   rm -rf conftest*
16768   eval "ac_cv_func__snprintf=yes"
16769 else
16770   echo "configure: failed program was:" >&5
16771   cat conftest.$ac_ext >&5
16772   rm -rf conftest*
16773   eval "ac_cv_func__snprintf=no"
16774 fi
16775 rm -f conftest*
16776 fi
16777
16778 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
16779   echo "$ac_t""yes" 1>&6
16780   ac_cv_func_snprintf=yes
16781         cat >> confdefs.h <<\EOF
16782 #define snprintf _snprintf
16783 EOF
16784
16785
16786 else
16787   echo "$ac_t""no" 1>&6
16788 fi
16789
16790
16791 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
16792 echo "configure:16793: checking for _vsnprintf" >&5
16793 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
16794   echo $ac_n "(cached) $ac_c" 1>&6
16795 else
16796   cat > conftest.$ac_ext <<EOF
16797 #line 16798 "configure"
16798 #include "confdefs.h"
16799 /* System header to define __stub macros and hopefully few prototypes,
16800     which can conflict with char _vsnprintf(); below.  */
16801 #include <assert.h>
16802 /* Override any gcc2 internal prototype to avoid an error.  */
16803 /* We use char because int might match the return type of a gcc2
16804     builtin and then its argument prototype would still apply.  */
16805 char _vsnprintf();
16806 char (*f)();
16807
16808 int main() {
16809
16810 /* The GNU C library defines this for functions which it implements
16811     to always fail with ENOSYS.  Some functions are actually named
16812     something starting with __ and the normal name is an alias.  */
16813 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
16814 choke me
16815 #else
16816 f = _vsnprintf;
16817 #endif
16818
16819 ; return 0; }
16820 EOF
16821 if { (eval echo configure:16822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16822   rm -rf conftest*
16823   eval "ac_cv_func__vsnprintf=yes"
16824 else
16825   echo "configure: failed program was:" >&5
16826   cat conftest.$ac_ext >&5
16827   rm -rf conftest*
16828   eval "ac_cv_func__vsnprintf=no"
16829 fi
16830 rm -f conftest*
16831 fi
16832
16833 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
16834   echo "$ac_t""yes" 1>&6
16835   ac_cv_func_vsnprintf=yes
16836         cat >> confdefs.h <<\EOF
16837 #define vsnprintf _vsnprintf
16838 EOF
16839
16840
16841 else
16842   echo "$ac_t""no" 1>&6
16843 fi
16844
16845
16846 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
16847 echo "configure:16848: checking for vprintf" >&5
16848 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
16849   echo $ac_n "(cached) $ac_c" 1>&6
16850 else
16851   cat > conftest.$ac_ext <<EOF
16852 #line 16853 "configure"
16853 #include "confdefs.h"
16854 /* System header to define __stub macros and hopefully few prototypes,
16855     which can conflict with char vprintf(); below.  */
16856 #include <assert.h>
16857 /* Override any gcc2 internal prototype to avoid an error.  */
16858 /* We use char because int might match the return type of a gcc2
16859     builtin and then its argument prototype would still apply.  */
16860 char vprintf();
16861 char (*f)();
16862
16863 int main() {
16864
16865 /* The GNU C library defines this for functions which it implements
16866     to always fail with ENOSYS.  Some functions are actually named
16867     something starting with __ and the normal name is an alias.  */
16868 #if defined (__stub_vprintf) || defined (__stub___vprintf)
16869 choke me
16870 #else
16871 f = vprintf;
16872 #endif
16873
16874 ; return 0; }
16875 EOF
16876 if { (eval echo configure:16877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16877   rm -rf conftest*
16878   eval "ac_cv_func_vprintf=yes"
16879 else
16880   echo "configure: failed program was:" >&5
16881   cat conftest.$ac_ext >&5
16882   rm -rf conftest*
16883   eval "ac_cv_func_vprintf=no"
16884 fi
16885 rm -f conftest*
16886 fi
16887
16888 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
16889   echo "$ac_t""yes" 1>&6
16890   cat >> confdefs.h <<\EOF
16891 #define HAVE_VPRINTF 1
16892 EOF
16893
16894 else
16895   echo "$ac_t""no" 1>&6
16896 fi
16897
16898 if test "$ac_cv_func_vprintf" != yes; then
16899 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
16900 echo "configure:16901: checking for _doprnt" >&5
16901 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
16902   echo $ac_n "(cached) $ac_c" 1>&6
16903 else
16904   cat > conftest.$ac_ext <<EOF
16905 #line 16906 "configure"
16906 #include "confdefs.h"
16907 /* System header to define __stub macros and hopefully few prototypes,
16908     which can conflict with char _doprnt(); below.  */
16909 #include <assert.h>
16910 /* Override any gcc2 internal prototype to avoid an error.  */
16911 /* We use char because int might match the return type of a gcc2
16912     builtin and then its argument prototype would still apply.  */
16913 char _doprnt();
16914 char (*f)();
16915
16916 int main() {
16917
16918 /* The GNU C library defines this for functions which it implements
16919     to always fail with ENOSYS.  Some functions are actually named
16920     something starting with __ and the normal name is an alias.  */
16921 #if defined (__stub__doprnt) || defined (__stub____doprnt)
16922 choke me
16923 #else
16924 f = _doprnt;
16925 #endif
16926
16927 ; return 0; }
16928 EOF
16929 if { (eval echo configure:16930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16930   rm -rf conftest*
16931   eval "ac_cv_func__doprnt=yes"
16932 else
16933   echo "configure: failed program was:" >&5
16934   cat conftest.$ac_ext >&5
16935   rm -rf conftest*
16936   eval "ac_cv_func__doprnt=no"
16937 fi
16938 rm -f conftest*
16939 fi
16940
16941 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
16942   echo "$ac_t""yes" 1>&6
16943   cat >> confdefs.h <<\EOF
16944 #define HAVE_DOPRNT 1
16945 EOF
16946
16947 else
16948   echo "$ac_t""no" 1>&6
16949 fi
16950
16951 fi
16952
16953
16954 if test $ac_cv_func_vprintf = yes ; then
16955                 for ac_func in vsnprintf vsprintf
16956 do
16957 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16958 echo "configure:16959: checking for $ac_func" >&5
16959 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16960   echo $ac_n "(cached) $ac_c" 1>&6
16961 else
16962   cat > conftest.$ac_ext <<EOF
16963 #line 16964 "configure"
16964 #include "confdefs.h"
16965 /* System header to define __stub macros and hopefully few prototypes,
16966     which can conflict with char $ac_func(); below.  */
16967 #include <assert.h>
16968 /* Override any gcc2 internal prototype to avoid an error.  */
16969 /* We use char because int might match the return type of a gcc2
16970     builtin and then its argument prototype would still apply.  */
16971 char $ac_func();
16972 char (*f)();
16973
16974 int main() {
16975
16976 /* The GNU C library defines this for functions which it implements
16977     to always fail with ENOSYS.  Some functions are actually named
16978     something starting with __ and the normal name is an alias.  */
16979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16980 choke me
16981 #else
16982 f = $ac_func;
16983 #endif
16984
16985 ; return 0; }
16986 EOF
16987 if { (eval echo configure:16988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16988   rm -rf conftest*
16989   eval "ac_cv_func_$ac_func=yes"
16990 else
16991   echo "configure: failed program was:" >&5
16992   cat conftest.$ac_ext >&5
16993   rm -rf conftest*
16994   eval "ac_cv_func_$ac_func=no"
16995 fi
16996 rm -f conftest*
16997 fi
16998
16999 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17000   echo "$ac_t""yes" 1>&6
17001     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17002   cat >> confdefs.h <<EOF
17003 #define $ac_tr_func 1
17004 EOF
17005  
17006 else
17007   echo "$ac_t""no" 1>&6
17008 fi
17009 done
17010
17011 fi
17012
17013 for ac_func in \
17014         bcopy                   \
17015         closesocket             \
17016         chroot                  \
17017         endgrent                \
17018         endpwent                \
17019         fcntl                   \
17020         flock                   \
17021         getdtablesize   \
17022         getgrgid                \
17023         gethostname             \
17024         getpass                 \
17025         getpassphrase   \
17026         getpwuid                \
17027         getpwnam                \
17028         getspnam                \
17029         gettimeofday    \
17030         initgroups              \
17031         lockf                   \
17032         memcpy                  \
17033         memmove                 \
17034         pipe                    \
17035         read                    \
17036         recv                    \
17037         recvfrom                \
17038         setpwfile               \
17039         setgid                  \
17040         setegid                 \
17041         setsid                  \
17042         setuid                  \
17043         seteuid                 \
17044         sigaction               \
17045         signal                  \
17046         sigset                  \
17047         strdup                  \
17048         strerror                \
17049         strpbrk                 \
17050         strrchr                 \
17051         strsep                  \
17052         strstr                  \
17053         strtol                  \
17054         strtoul                 \
17055         strspn                  \
17056         sysconf                 \
17057         waitpid                 \
17058         wait4                   \
17059         write                   \
17060         send                    \
17061         sendto                  \
17062
17063 do
17064 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17065 echo "configure:17066: checking for $ac_func" >&5
17066 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17067   echo $ac_n "(cached) $ac_c" 1>&6
17068 else
17069   cat > conftest.$ac_ext <<EOF
17070 #line 17071 "configure"
17071 #include "confdefs.h"
17072 /* System header to define __stub macros and hopefully few prototypes,
17073     which can conflict with char $ac_func(); below.  */
17074 #include <assert.h>
17075 /* Override any gcc2 internal prototype to avoid an error.  */
17076 /* We use char because int might match the return type of a gcc2
17077     builtin and then its argument prototype would still apply.  */
17078 char $ac_func();
17079 char (*f)();
17080
17081 int main() {
17082
17083 /* The GNU C library defines this for functions which it implements
17084     to always fail with ENOSYS.  Some functions are actually named
17085     something starting with __ and the normal name is an alias.  */
17086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17087 choke me
17088 #else
17089 f = $ac_func;
17090 #endif
17091
17092 ; return 0; }
17093 EOF
17094 if { (eval echo configure:17095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17095   rm -rf conftest*
17096   eval "ac_cv_func_$ac_func=yes"
17097 else
17098   echo "configure: failed program was:" >&5
17099   cat conftest.$ac_ext >&5
17100   rm -rf conftest*
17101   eval "ac_cv_func_$ac_func=no"
17102 fi
17103 rm -f conftest*
17104 fi
17105
17106 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17107   echo "$ac_t""yes" 1>&6
17108     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17109   cat >> confdefs.h <<EOF
17110 #define $ac_tr_func 1
17111 EOF
17112  
17113 else
17114   echo "$ac_t""no" 1>&6
17115 fi
17116 done
17117
17118
17119 for ac_func in getopt
17120 do
17121 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17122 echo "configure:17123: checking for $ac_func" >&5
17123 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17124   echo $ac_n "(cached) $ac_c" 1>&6
17125 else
17126   cat > conftest.$ac_ext <<EOF
17127 #line 17128 "configure"
17128 #include "confdefs.h"
17129 /* System header to define __stub macros and hopefully few prototypes,
17130     which can conflict with char $ac_func(); below.  */
17131 #include <assert.h>
17132 /* Override any gcc2 internal prototype to avoid an error.  */
17133 /* We use char because int might match the return type of a gcc2
17134     builtin and then its argument prototype would still apply.  */
17135 char $ac_func();
17136 char (*f)();
17137
17138 int main() {
17139
17140 /* The GNU C library defines this for functions which it implements
17141     to always fail with ENOSYS.  Some functions are actually named
17142     something starting with __ and the normal name is an alias.  */
17143 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17144 choke me
17145 #else
17146 f = $ac_func;
17147 #endif
17148
17149 ; return 0; }
17150 EOF
17151 if { (eval echo configure:17152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17152   rm -rf conftest*
17153   eval "ac_cv_func_$ac_func=yes"
17154 else
17155   echo "configure: failed program was:" >&5
17156   cat conftest.$ac_ext >&5
17157   rm -rf conftest*
17158   eval "ac_cv_func_$ac_func=no"
17159 fi
17160 rm -f conftest*
17161 fi
17162
17163 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17164   echo "$ac_t""yes" 1>&6
17165     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17166   cat >> confdefs.h <<EOF
17167 #define $ac_tr_func 1
17168 EOF
17169  
17170 else
17171   echo "$ac_t""no" 1>&6
17172 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
17173 fi
17174 done
17175
17176
17177
17178 if test "$ac_cv_func_getopt" != yes; then
17179     LIBSRCS="$LIBSRCS getopt.c"
17180 fi
17181
17182 # Check Configuration
17183 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
17184 echo "configure:17185: checking declaration of sys_errlist" >&5
17185 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
17186   echo $ac_n "(cached) $ac_c" 1>&6
17187 else
17188   
17189         cat > conftest.$ac_ext <<EOF
17190 #line 17191 "configure"
17191 #include "confdefs.h"
17192
17193 #include <stdio.h>
17194 #include <sys/types.h>
17195 #include <errno.h>
17196 #ifdef WINNT
17197 #include <stdlib.h>
17198 #endif 
17199 int main() {
17200 char *c = (char *) *sys_errlist
17201 ; return 0; }
17202 EOF
17203 if { (eval echo configure:17204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17204   rm -rf conftest*
17205   ol_cv_dcl_sys_errlist=yes
17206         ol_cv_have_sys_errlist=yes
17207 else
17208   echo "configure: failed program was:" >&5
17209   cat conftest.$ac_ext >&5
17210   rm -rf conftest*
17211   ol_cv_dcl_sys_errlist=no
17212 fi
17213 rm -f conftest*
17214 fi
17215
17216 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
17217 #
17218 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
17219 if test $ol_cv_dcl_sys_errlist = no ; then
17220         cat >> confdefs.h <<\EOF
17221 #define DECL_SYS_ERRLIST 1
17222 EOF
17223
17224
17225         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
17226 echo "configure:17227: checking existence of sys_errlist" >&5
17227 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
17228   echo $ac_n "(cached) $ac_c" 1>&6
17229 else
17230   
17231                 cat > conftest.$ac_ext <<EOF
17232 #line 17233 "configure"
17233 #include "confdefs.h"
17234 #include <errno.h>
17235 int main() {
17236 char *c = (char *) *sys_errlist
17237 ; return 0; }
17238 EOF
17239 if { (eval echo configure:17240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17240   rm -rf conftest*
17241   ol_cv_have_sys_errlist=yes
17242 else
17243   echo "configure: failed program was:" >&5
17244   cat conftest.$ac_ext >&5
17245   rm -rf conftest*
17246   ol_cv_have_sys_errlist=no
17247 fi
17248 rm -f conftest*
17249 fi
17250
17251 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
17252 fi
17253 if test $ol_cv_have_sys_errlist = yes ; then
17254         cat >> confdefs.h <<\EOF
17255 #define HAVE_SYS_ERRLIST 1
17256 EOF
17257
17258 fi
17259
17260
17261
17262 if test "$ol_enable_debug" != no ; then
17263         cat >> confdefs.h <<\EOF
17264 #define LDAP_DEBUG 1
17265 EOF
17266
17267 fi
17268 if test "$ol_enable_syslog" = yes ; then
17269         cat >> confdefs.h <<\EOF
17270 #define LDAP_SYSLOG 1
17271 EOF
17272
17273 fi
17274 if test "$ol_enable_cache" = no ; then
17275         cat >> confdefs.h <<\EOF
17276 #define LDAP_NOCACHE 1
17277 EOF
17278
17279 fi
17280 if test "$ol_link_kbind" != no ; then
17281         cat >> confdefs.h <<\EOF
17282 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
17283 EOF
17284
17285 fi
17286 if test "$ol_enable_proctitle" != no ; then
17287         cat >> confdefs.h <<\EOF
17288 #define LDAP_PROCTITLE 1
17289 EOF
17290
17291 fi
17292 if test "$ol_enable_referrals" != no ; then
17293         cat >> confdefs.h <<\EOF
17294 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
17295 EOF
17296
17297 fi
17298 if test "$ol_enable_local" != no; then
17299         cat >> confdefs.h <<\EOF
17300 #define LDAP_PF_LOCAL 1
17301 EOF
17302
17303 fi
17304 if test "$ol_link_ipv6" != no; then
17305         cat >> confdefs.h <<\EOF
17306 #define LDAP_PF_INET6 1
17307 EOF
17308
17309 fi
17310 if test "$ol_enable_cleartext" != no ; then
17311         cat >> confdefs.h <<\EOF
17312 #define SLAPD_CLEARTEXT 1
17313 EOF
17314
17315 fi
17316 if test "$ol_enable_crypt" != no ; then
17317         cat >> confdefs.h <<\EOF
17318 #define SLAPD_CRYPT 1
17319 EOF
17320
17321 fi
17322 if test "$ol_link_kpasswd" != no ; then
17323         cat >> confdefs.h <<\EOF
17324 #define SLAPD_KPASSWD 1
17325 EOF
17326
17327 fi
17328 if test "$ol_link_spasswd" != no ; then
17329         cat >> confdefs.h <<\EOF
17330 #define SLAPD_SPASSWD 1
17331 EOF
17332
17333 fi
17334 if test "$ol_enable_phonetic" != no ; then
17335         cat >> confdefs.h <<\EOF
17336 #define SLAPD_PHONETIC 1
17337 EOF
17338
17339 fi
17340 if test "$ol_enable_rlookups" != no ; then
17341         cat >> confdefs.h <<\EOF
17342 #define SLAPD_RLOOKUPS 1
17343 EOF
17344
17345 fi
17346 if test "$ol_enable_aci" != no ; then
17347         cat >> confdefs.h <<\EOF
17348 #define SLAPD_ACI_ENABLED 1
17349 EOF
17350
17351 fi
17352
17353 if test "$ol_link_modules" != no ; then
17354         cat >> confdefs.h <<\EOF
17355 #define SLAPD_MODULES 1
17356 EOF
17357
17358         BUILD_SLAPD=yes
17359         SLAPD_MODULES_LDFLAGS="-dlopen self"
17360 fi
17361
17362 if test "$ol_enable_bdb" != no ; then
17363         cat >> confdefs.h <<\EOF
17364 #define SLAPD_BDB 1
17365 EOF
17366
17367         BUILD_SLAPD=yes
17368         BUILD_BDB=yes
17369         if test "$ol_with_bdb_module" != static ; then
17370                 cat >> confdefs.h <<\EOF
17371 #define SLAPD_BDB_DYNAMIC 1
17372 EOF
17373
17374                 BUILD_BDB=mod
17375                 BUILD_BDB_DYNAMIC=shared
17376                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
17377         fi
17378 fi
17379
17380 if test "$ol_link_dnssrv" != no ; then
17381         cat >> confdefs.h <<\EOF
17382 #define SLAPD_DNSSRV 1
17383 EOF
17384
17385         BUILD_SLAPD=yes
17386         BUILD_DNSSRV=yes
17387         if test "$ol_with_dnssrv_module" != static ; then
17388                 cat >> confdefs.h <<\EOF
17389 #define SLAPD_DNSSRV_DYNAMIC 1
17390 EOF
17391
17392                 BUILD_DNSSRV=mod
17393                 BUILD_DNSSRV_DYNAMIC=shared
17394                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
17395         fi
17396 fi
17397
17398 if test "$ol_enable_ldap" != no ; then
17399         cat >> confdefs.h <<\EOF
17400 #define SLAPD_LDAP 1
17401 EOF
17402
17403         BUILD_SLAPD=yes
17404         BUILD_LDAP=yes
17405         if test "$ol_with_ldap_module" != static ; then
17406                 cat >> confdefs.h <<\EOF
17407 #define SLAPD_LDAP_DYNAMIC 1
17408 EOF
17409
17410                 BUILD_LDAP=mod
17411                 BUILD_LDAP_DYNAMIC=shared
17412                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
17413         fi
17414 fi
17415
17416 if test "$ol_link_ldbm" != no ; then
17417         cat >> confdefs.h <<\EOF
17418 #define SLAPD_LDBM 1
17419 EOF
17420
17421         BUILD_SLAPD=yes
17422         BUILD_LDBM=yes
17423         if test "$ol_with_ldbm_module" != static ; then
17424                 cat >> confdefs.h <<\EOF
17425 #define SLAPD_LDBM_DYNAMIC 1
17426 EOF
17427
17428                 BUILD_LDBM=mod
17429                 BUILD_LDBM_DYNAMIC=shared
17430                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
17431         fi
17432 fi
17433
17434 if test "$ol_enable_meta" != no ; then
17435         if test "$ol_enable_ldap" = no ; then
17436                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
17437         fi
17438         if test "$ol_enable_rewrite" = no ; then
17439                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
17440         fi
17441         cat >> confdefs.h <<\EOF
17442 #define SLAPD_META 1
17443 EOF
17444
17445         BUILD_SLAPD=yes
17446         BUILD_META=yes
17447         if test "$ol_with_meta_module" != static ; then
17448                 cat >> confdefs.h <<\EOF
17449 #define SLAPD_META_DYNAMIC 1
17450 EOF
17451
17452                 BUILD_META=mod
17453                 BUILD_META_DYNAMIC=shared
17454                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
17455         fi
17456 fi
17457
17458 if test "$ol_enable_monitor" != no ; then
17459         cat >> confdefs.h <<\EOF
17460 #define SLAPD_MONITOR 1
17461 EOF
17462
17463         BUILD_SLAPD=yes
17464         BUILD_MONITOR=yes
17465         if test "$ol_with_monitor_module" != static ; then
17466                 cat >> confdefs.h <<\EOF
17467 #define SLAPD_MONITOR_DYNAMIC 1
17468 EOF
17469
17470                 BUILD_MONITOR=mod
17471                 BUILD_MONITOR_DYNAMIC=shared
17472                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
17473         fi
17474 fi
17475
17476 if test "$ol_enable_passwd" != no ; then
17477         cat >> confdefs.h <<\EOF
17478 #define SLAPD_PASSWD 1
17479 EOF
17480
17481         BUILD_SLAPD=yes
17482         BUILD_PASSWD=yes
17483         if test "$ol_with_passwd_module" != static ; then
17484                 cat >> confdefs.h <<\EOF
17485 #define SLAPD_PASSWD_DYNAMIC 1
17486 EOF
17487
17488                 BUILD_PASSWD=mod
17489                 BUILD_PASSWD_DYNAMIC=shared
17490                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
17491         fi
17492 fi
17493
17494 if test "$ol_link_perl" != no ; then
17495         cat >> confdefs.h <<\EOF
17496 #define SLAPD_PERL 1
17497 EOF
17498
17499         BUILD_SLAPD=yes
17500         BUILD_PERL=yes
17501         if test "$ol_with_perl_module" != static ; then
17502                 cat >> confdefs.h <<\EOF
17503 #define SLAPD_PERL_DYNAMIC 1
17504 EOF
17505
17506                 BUILD_PERL=mod
17507                 BUILD_PERL_DYNAMIC=shared
17508                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
17509         fi
17510 fi
17511
17512 if test "$ol_enable_shell" != no ; then
17513         cat >> confdefs.h <<\EOF
17514 #define SLAPD_SHELL 1
17515 EOF
17516
17517         BUILD_SLAPD=yes
17518         BUILD_SHELL=yes
17519         if test "$ol_with_shell_module" != static ; then
17520                 cat >> confdefs.h <<\EOF
17521 #define SLAPD_SHELL_DYNAMIC 1
17522 EOF
17523
17524                 BUILD_SHELL=mod
17525                 BUILD_SHELL_DYNAMIC=shared
17526                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
17527         fi
17528 fi
17529
17530 if test "$ol_enable_tcl" != no ; then
17531         cat >> confdefs.h <<\EOF
17532 #define SLAPD_TCL 1
17533 EOF
17534
17535         BUILD_SLAPD=yes
17536         BUILD_TCL=yes
17537         if test "$ol_with_tcl_module" != static; then
17538                 cat >> confdefs.h <<\EOF
17539 #define SLAPD_TCL_DYNAMIC 1
17540 EOF
17541
17542                 BUILD_TCL=mod
17543                 BUILD_TCL_DYNAMIC=shared
17544                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
17545         fi
17546 fi
17547
17548 if test "$ol_link_sql" != no ; then
17549         cat >> confdefs.h <<\EOF
17550 #define SLAPD_SQL 1
17551 EOF
17552
17553         BUILD_SLAPD=yes
17554         BUILD_SQL=yes
17555         if test "$ol_with_sql_module" != static; then
17556                 cat >> confdefs.h <<\EOF
17557 #define SLAPD_SQL_DYNAMIC 1
17558 EOF
17559
17560                 BUILD_SQL=mod
17561                 BUILD_SQL_DYNAMIC=shared
17562                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
17563         fi
17564 fi
17565
17566 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
17567         $BUILD_SLAPD = yes ; then
17568         BUILD_SLURPD=yes
17569 fi
17570
17571 if test "$ol_enable_rewrite" != no ; then
17572         cat >> confdefs.h <<\EOF
17573 #define ENABLE_REWRITE 1
17574 EOF
17575
17576         BUILD_REWRITE=yes
17577         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
17578 fi
17579
17580
17581 if test "$LINK_BINS_DYNAMIC" = yes; then
17582     LIB_LINKAGE=DYN
17583     LT_LIB_LINKAGE=shared
17584 else
17585     LIB_LINKAGE=STAT
17586     LT_LIB_LINKAGE=static
17587 fi
17588
17589 if test "$ac_cv_mingw32" = yes ; then
17590     PLAT=NT
17591     DYN_EXT=dll
17592 else
17593     PLAT=UNIX
17594     DYN_EXT=so
17595 fi
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605   
17606   
17607   
17608   
17609   
17610   
17611   
17612   
17613   
17614   
17615   
17616   
17617   
17618   
17619   
17620   
17621   
17622   
17623   
17624   
17625   
17626   
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664 trap '' 1 2 15
17665
17666 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
17667
17668 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17669 # Let make expand exec_prefix.
17670 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17671
17672 # Any assignment to VPATH causes Sun make to only execute
17673 # the first set of double-colon rules, so remove it if not needed.
17674 # If there is a colon in the path, we need to keep it.
17675 if test "x$srcdir" = x.; then
17676   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
17677 fi
17678
17679 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
17680
17681 DEFS=-DHAVE_CONFIG_H
17682
17683 # Without the "./", some shells look in PATH for config.status.
17684 : ${CONFIG_STATUS=./config.status}
17685
17686 echo creating $CONFIG_STATUS
17687 rm -f $CONFIG_STATUS
17688 cat > $CONFIG_STATUS <<EOF
17689 #! /bin/sh
17690 # Generated automatically by configure.
17691 # Run this file to recreate the current configuration.
17692 # This directory was configured as follows,
17693 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
17694 #
17695 # $0 $ac_configure_args
17696 #
17697 # Compiler output produced by configure, useful for debugging
17698 # configure, is in ./config.log if it exists.
17699
17700 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
17701 for ac_option
17702 do
17703   case "\$ac_option" in
17704   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17705     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
17706     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
17707   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
17708     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
17709     exit 0 ;;
17710   -help | --help | --hel | --he | --h)
17711     echo "\$ac_cs_usage"; exit 0 ;;
17712   *) echo "\$ac_cs_usage"; exit 1 ;;
17713   esac
17714 done
17715
17716 ac_given_srcdir=$srcdir
17717 ac_given_INSTALL="$INSTALL"
17718
17719 trap 'rm -fr `echo "\
17720 Makefile:build/top.mk:Makefile.in:build/dir.mk \
17721 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
17722 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
17723 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
17724 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
17725 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
17726 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
17727 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
17728 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
17729 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
17730 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
17731 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
17732 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
17733 include/Makefile:build/top.mk:include/Makefile.in \
17734 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
17735 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
17736 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17737 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17738 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
17739 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
17740 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
17741 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
17742 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
17743 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
17744 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17745 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17746 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
17747 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17748 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17749 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17750 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
17751 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
17752 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17753 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
17754 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17755 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17756 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
17757 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17758 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17759 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17760 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17761 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17762 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17763 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17764  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
17765 EOF
17766 cat >> $CONFIG_STATUS <<EOF
17767
17768 # Protect against being on the right side of a sed subst in config.status.
17769 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
17770  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
17771 $ac_vpsub
17772 $extrasub
17773 s%@SHELL@%$SHELL%g
17774 s%@CFLAGS@%$CFLAGS%g
17775 s%@CPPFLAGS@%$CPPFLAGS%g
17776 s%@CXXFLAGS@%$CXXFLAGS%g
17777 s%@FFLAGS@%$FFLAGS%g
17778 s%@DEFS@%$DEFS%g
17779 s%@LDFLAGS@%$LDFLAGS%g
17780 s%@LIBS@%$LIBS%g
17781 s%@exec_prefix@%$exec_prefix%g
17782 s%@prefix@%$prefix%g
17783 s%@program_transform_name@%$program_transform_name%g
17784 s%@bindir@%$bindir%g
17785 s%@sbindir@%$sbindir%g
17786 s%@libexecdir@%$libexecdir%g
17787 s%@datadir@%$datadir%g
17788 s%@sysconfdir@%$sysconfdir%g
17789 s%@sharedstatedir@%$sharedstatedir%g
17790 s%@localstatedir@%$localstatedir%g
17791 s%@libdir@%$libdir%g
17792 s%@includedir@%$includedir%g
17793 s%@oldincludedir@%$oldincludedir%g
17794 s%@infodir@%$infodir%g
17795 s%@mandir@%$mandir%g
17796 s%@host@%$host%g
17797 s%@host_alias@%$host_alias%g
17798 s%@host_cpu@%$host_cpu%g
17799 s%@host_vendor@%$host_vendor%g
17800 s%@host_os@%$host_os%g
17801 s%@target@%$target%g
17802 s%@target_alias@%$target_alias%g
17803 s%@target_cpu@%$target_cpu%g
17804 s%@target_vendor@%$target_vendor%g
17805 s%@target_os@%$target_os%g
17806 s%@build@%$build%g
17807 s%@build_alias@%$build_alias%g
17808 s%@build_cpu@%$build_cpu%g
17809 s%@build_vendor@%$build_vendor%g
17810 s%@build_os@%$build_os%g
17811 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
17812 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
17813 s%@INSTALL_DATA@%$INSTALL_DATA%g
17814 s%@PACKAGE@%$PACKAGE%g
17815 s%@VERSION@%$VERSION%g
17816 s%@ACLOCAL@%$ACLOCAL%g
17817 s%@AUTOCONF@%$AUTOCONF%g
17818 s%@AUTOMAKE@%$AUTOMAKE%g
17819 s%@AUTOHEADER@%$AUTOHEADER%g
17820 s%@MAKEINFO@%$MAKEINFO%g
17821 s%@install_sh@%$install_sh%g
17822 s%@AMTAR@%$AMTAR%g
17823 s%@AWK@%$AWK%g
17824 s%@AMTARFLAGS@%$AMTARFLAGS%g
17825 s%@SET_MAKE@%$SET_MAKE%g
17826 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
17827 s%@top_builddir@%$top_builddir%g
17828 s%@ldap_subdir@%$ldap_subdir%g
17829 s%@CC@%$CC%g
17830 s%@RANLIB@%$RANLIB%g
17831 s%@LN_S@%$LN_S%g
17832 s%@DLLTOOL@%$DLLTOOL%g
17833 s%@AS@%$AS%g
17834 s%@OBJDUMP@%$OBJDUMP%g
17835 s%@LIBTOOL@%$LIBTOOL%g
17836 s%@LN_H@%$LN_H%g
17837 s%@SENDMAIL@%$SENDMAIL%g
17838 s%@EDITOR@%$EDITOR%g
17839 s%@FINGER@%$FINGER%g
17840 s%@PERLBIN@%$PERLBIN%g
17841 s%@CPP@%$CPP%g
17842 s%@EXEEXT@%$EXEEXT%g
17843 s%@OBJEXT@%$OBJEXT%g
17844 s%@OL_MKDEP@%$OL_MKDEP%g
17845 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
17846 s%@LIBOBJS@%$LIBOBJS%g
17847 s%@LIBSRCS@%$LIBSRCS%g
17848 s%@PLAT@%$PLAT%g
17849 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
17850 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
17851 s%@DYN_EXT@%$DYN_EXT%g
17852 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
17853 s%@BUILD_BDB@%$BUILD_BDB%g
17854 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
17855 s%@BUILD_LDAP@%$BUILD_LDAP%g
17856 s%@BUILD_LDBM@%$BUILD_LDBM%g
17857 s%@BUILD_META@%$BUILD_META%g
17858 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
17859 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
17860 s%@BUILD_PERL@%$BUILD_PERL%g
17861 s%@BUILD_SHELL@%$BUILD_SHELL%g
17862 s%@BUILD_SQL@%$BUILD_SQL%g
17863 s%@BUILD_TCL@%$BUILD_TCL%g
17864 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
17865 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
17866 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
17867 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
17868 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
17869 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
17870 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
17871 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
17872 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
17873 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
17874 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
17875 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
17876 s%@LDAP_LIBS@%$LDAP_LIBS%g
17877 s%@LDIF_LIBS@%$LDIF_LIBS%g
17878 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
17879 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
17880 s%@LDBM_LIBS@%$LDBM_LIBS%g
17881 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
17882 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
17883 s%@WRAP_LIBS@%$WRAP_LIBS%g
17884 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
17885 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
17886 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
17887 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
17888 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
17889 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
17890 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
17891 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
17892 s%@KRB4_LIBS@%$KRB4_LIBS%g
17893 s%@KRB5_LIBS@%$KRB5_LIBS%g
17894 s%@READLINE_LIBS@%$READLINE_LIBS%g
17895 s%@SASL_LIBS@%$SASL_LIBS%g
17896 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
17897 s%@TLS_LIBS@%$TLS_LIBS%g
17898 s%@MODULES_LIBS@%$MODULES_LIBS%g
17899 s%@AUTH_LIBS@%$AUTH_LIBS%g
17900 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
17901 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
17902 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
17903 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
17904
17905 CEOF
17906 EOF
17907
17908 cat >> $CONFIG_STATUS <<\EOF
17909
17910 # Split the substitutions into bite-sized pieces for seds with
17911 # small command number limits, like on Digital OSF/1 and HP-UX.
17912 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
17913 ac_file=1 # Number of current file.
17914 ac_beg=1 # First line for current file.
17915 ac_end=$ac_max_sed_cmds # Line after last line for current file.
17916 ac_more_lines=:
17917 ac_sed_cmds=""
17918 while $ac_more_lines; do
17919   if test $ac_beg -gt 1; then
17920     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
17921   else
17922     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
17923   fi
17924   if test ! -s conftest.s$ac_file; then
17925     ac_more_lines=false
17926     rm -f conftest.s$ac_file
17927   else
17928     if test -z "$ac_sed_cmds"; then
17929       ac_sed_cmds="sed -f conftest.s$ac_file"
17930     else
17931       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
17932     fi
17933     ac_file=`expr $ac_file + 1`
17934     ac_beg=$ac_end
17935     ac_end=`expr $ac_end + $ac_max_sed_cmds`
17936   fi
17937 done
17938 if test -z "$ac_sed_cmds"; then
17939   ac_sed_cmds=cat
17940 fi
17941 EOF
17942
17943 cat >> $CONFIG_STATUS <<EOF
17944
17945 CONFIG_FILES=\${CONFIG_FILES-"\
17946 Makefile:build/top.mk:Makefile.in:build/dir.mk \
17947 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
17948 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
17949 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
17950 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
17951 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
17952 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
17953 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
17954 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
17955 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
17956 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
17957 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
17958 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
17959 include/Makefile:build/top.mk:include/Makefile.in \
17960 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
17961 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
17962 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17963 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17964 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
17965 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
17966 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
17967 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
17968 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
17969 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
17970 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17971 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17972 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
17973 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17974 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17975 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17976 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
17977 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
17978 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17979 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
17980 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17981 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17982 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
17983 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17984 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17985 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17986 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17987 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17988 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17989 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17990 "}
17991 EOF
17992 cat >> $CONFIG_STATUS <<\EOF
17993 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
17994   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17995   case "$ac_file" in
17996   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17997        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17998   *) ac_file_in="${ac_file}.in" ;;
17999   esac
18000
18001   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
18002
18003   # Remove last slash and all that follows it.  Not all systems have dirname.
18004   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18005   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18006     # The file is in a subdirectory.
18007     test ! -d "$ac_dir" && mkdir "$ac_dir"
18008     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
18009     # A "../" for each directory in $ac_dir_suffix.
18010     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
18011   else
18012     ac_dir_suffix= ac_dots=
18013   fi
18014
18015   case "$ac_given_srcdir" in
18016   .)  srcdir=.
18017       if test -z "$ac_dots"; then top_srcdir=.
18018       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
18019   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
18020   *) # Relative path.
18021     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
18022     top_srcdir="$ac_dots$ac_given_srcdir" ;;
18023   esac
18024
18025   case "$ac_given_INSTALL" in
18026   [/$]*) INSTALL="$ac_given_INSTALL" ;;
18027   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
18028   esac
18029
18030   echo creating "$ac_file"
18031   rm -f "$ac_file"
18032   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
18033   case "$ac_file" in
18034   *[Mm]akefile*) ac_comsub="1i\\
18035 # $configure_input" ;;
18036   *) ac_comsub= ;;
18037   esac
18038
18039   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18040   sed -e "$ac_comsub
18041 s%@configure_input@%$configure_input%g
18042 s%@srcdir@%$srcdir%g
18043 s%@top_srcdir@%$top_srcdir%g
18044 s%@INSTALL@%$INSTALL%g
18045 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
18046 fi; done
18047 rm -f conftest.s*
18048
18049 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18050 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18051 #
18052 # ac_d sets the value in "#define NAME VALUE" lines.
18053 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18054 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
18055 ac_dC='\3'
18056 ac_dD='%g'
18057 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18058 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18059 ac_uB='\([      ]\)%\1#\2define\3'
18060 ac_uC=' '
18061 ac_uD='\4%g'
18062 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18063 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18064 ac_eB='$%\1#\2define\3'
18065 ac_eC=' '
18066 ac_eD='%g'
18067
18068 if test "${CONFIG_HEADERS+set}" != set; then
18069 EOF
18070 cat >> $CONFIG_STATUS <<EOF
18071   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
18072 EOF
18073 cat >> $CONFIG_STATUS <<\EOF
18074 fi
18075 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
18076   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18077   case "$ac_file" in
18078   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18079        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18080   *) ac_file_in="${ac_file}.in" ;;
18081   esac
18082
18083   echo creating $ac_file
18084
18085   rm -f conftest.frag conftest.in conftest.out
18086   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18087   cat $ac_file_inputs > conftest.in
18088
18089 EOF
18090
18091 # Transform confdefs.h into a sed script conftest.vals that substitutes
18092 # the proper values into config.h.in to produce config.h.  And first:
18093 # Protect against being on the right side of a sed subst in config.status.
18094 # Protect against being in an unquoted here document in config.status.
18095 rm -f conftest.vals
18096 cat > conftest.hdr <<\EOF
18097 s/[\\&%]/\\&/g
18098 s%[\\$`]%\\&%g
18099 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
18100 s%ac_d%ac_u%gp
18101 s%ac_u%ac_e%gp
18102 EOF
18103 sed -n -f conftest.hdr confdefs.h > conftest.vals
18104 rm -f conftest.hdr
18105
18106 # This sed command replaces #undef with comments.  This is necessary, for
18107 # example, in the case of _POSIX_SOURCE, which is predefined and required
18108 # on some systems where configure will not decide to define it.
18109 cat >> conftest.vals <<\EOF
18110 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
18111 EOF
18112
18113 # Break up conftest.vals because some shells have a limit on
18114 # the size of here documents, and old seds have small limits too.
18115
18116 rm -f conftest.tail
18117 while :
18118 do
18119   ac_lines=`grep -c . conftest.vals`
18120   # grep -c gives empty output for an empty file on some AIX systems.
18121   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
18122   # Write a limited-size here document to conftest.frag.
18123   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
18124   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
18125   echo 'CEOF
18126   sed -f conftest.frag conftest.in > conftest.out
18127   rm -f conftest.in
18128   mv conftest.out conftest.in
18129 ' >> $CONFIG_STATUS
18130   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18131   rm -f conftest.vals
18132   mv conftest.tail conftest.vals
18133 done
18134 rm -f conftest.vals
18135
18136 cat >> $CONFIG_STATUS <<\EOF
18137   rm -f conftest.frag conftest.h
18138   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
18139   cat conftest.in >> conftest.h
18140   rm -f conftest.in
18141   if cmp -s $ac_file conftest.h 2>/dev/null; then
18142     echo "$ac_file is unchanged"
18143     rm -f conftest.h
18144   else
18145     # Remove last slash and all that follows it.  Not all systems have dirname.
18146       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18147       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18148       # The file is in a subdirectory.
18149       test ! -d "$ac_dir" && mkdir "$ac_dir"
18150     fi
18151     rm -f $ac_file
18152     mv conftest.h $ac_file
18153   fi
18154 fi; done
18155
18156 EOF
18157 cat >> $CONFIG_STATUS <<EOF
18158
18159 EOF
18160 cat >> $CONFIG_STATUS <<\EOF
18161
18162 date > stamp-h
18163 echo Please \"make depend\" to build dependencies
18164
18165 exit 0
18166 EOF
18167 chmod +x $CONFIG_STATUS
18168 rm -fr confdefs* $ac_clean_files
18169 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
18170