]> git.sur5r.net Git - openldap/blob - configure
Add error handling to BDB_INDEX code
[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                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
13625 echo "configure:13626: checking for Berkeley DB thread support" >&5
13626 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
13627   echo $ac_n "(cached) $ac_c" 1>&6
13628 else
13629   
13630         ol_LIBS="$LIBS"
13631         if test $ol_cv_lib_db != yes ; then
13632                 LIBS="$ol_cv_lib_db"
13633         fi
13634
13635         if test "$cross_compiling" = yes; then
13636   ol_cv_berkeley_db_thread=cross
13637 else
13638   cat > conftest.$ac_ext <<EOF
13639 #line 13640 "configure"
13640 #include "confdefs.h"
13641
13642 #ifdef HAVE_DB_185_H
13643         choke me;
13644 #else
13645 #include <db.h>
13646 #endif
13647 #ifndef NULL
13648 #define NULL ((void *)0)
13649 #endif
13650 main()
13651 {
13652         int rc;
13653         u_int32_t flags = DB_CREATE |
13654 #ifdef DB_PRIVATE
13655                 DB_PRIVATE |
13656 #endif
13657                 DB_THREAD;
13658
13659 #if DB_VERSION_MAJOR > 2
13660         DB_ENV *env = NULL;
13661
13662         rc = db_env_create( &env, 0 );
13663
13664         flags |= DB_INIT_MPOOL;
13665 #ifdef DB_MPOOL_PRIVATE
13666         flags |= DB_MPOOL_PRIVATE;
13667 #endif
13668
13669         if( rc ) {
13670                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13671                 return rc;
13672         }
13673
13674 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
13675         rc = env->open( env, NULL, flags, 0 );
13676 #else
13677         rc = env->open( env, NULL, NULL, flags, 0 );
13678 #endif
13679
13680         if ( rc == 0 ) {
13681                 rc = env->close( env, 0 );
13682         }
13683
13684         if( rc ) {
13685                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13686                 return rc;
13687         }
13688
13689 #else
13690         DB_ENV env;
13691         memset( &env, '\0', sizeof(env) );
13692
13693         rc = db_appinit( NULL, NULL, &env, flags );
13694
13695         if( rc == 0 ) {
13696                 db_appexit( &env );
13697         }
13698
13699         unlink("__db_mpool.share");
13700         unlink("__db_lock.share");
13701 #endif
13702
13703         return rc;
13704 }
13705 EOF
13706 if { (eval echo configure:13707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13707 then
13708   ol_cv_berkeley_db_thread=yes
13709 else
13710   echo "configure: failed program was:" >&5
13711   cat conftest.$ac_ext >&5
13712   rm -fr conftest*
13713   ol_cv_berkeley_db_thread=no
13714 fi
13715 rm -fr conftest*
13716 fi
13717
13718
13719         LIBS="$ol_LIBS"
13720
13721         if test $ol_cv_berkeley_db_thread != no ; then
13722                 cat >> confdefs.h <<\EOF
13723 #define HAVE_BERKELEY_DB_THREAD 1
13724 EOF
13725
13726         fi
13727
13728 fi
13729
13730 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
13731         fi
13732 fi
13733
13734         fi
13735
13736         if test $ol_cv_berkeley_db != no ; then
13737                 cat >> confdefs.h <<\EOF
13738 #define HAVE_BERKELEY_DB 1
13739 EOF
13740
13741
13742                 ol_link_ldbm=berkeley
13743                 ol_with_ldbm_api=db
13744
13745                 if test $ol_with_ldbm_type = hash ; then
13746                         cat >> confdefs.h <<\EOF
13747 #define LDBM_USE_DBHASH 1
13748 EOF
13749
13750                 else
13751                         cat >> confdefs.h <<\EOF
13752 #define LDBM_USE_DBBTREE 1
13753 EOF
13754
13755                 fi
13756
13757                                                 if test $ol_cv_lib_db != yes ; then
13758                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
13759                 fi
13760         fi
13761 fi
13762
13763 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
13764         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
13765         ol_with_ldbm_api=none
13766 fi
13767
13768 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
13769         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
13770 echo "configure:13771: checking for MDBM library" >&5
13771 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
13772   echo $ac_n "(cached) $ac_c" 1>&6
13773 else
13774         ol_LIBS="$LIBS"
13775         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
13776 echo "configure:13777: checking for mdbm_set_chain" >&5
13777 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
13778   echo $ac_n "(cached) $ac_c" 1>&6
13779 else
13780   cat > conftest.$ac_ext <<EOF
13781 #line 13782 "configure"
13782 #include "confdefs.h"
13783 /* System header to define __stub macros and hopefully few prototypes,
13784     which can conflict with char mdbm_set_chain(); below.  */
13785 #include <assert.h>
13786 /* Override any gcc2 internal prototype to avoid an error.  */
13787 /* We use char because int might match the return type of a gcc2
13788     builtin and then its argument prototype would still apply.  */
13789 char mdbm_set_chain();
13790 char (*f)();
13791
13792 int main() {
13793
13794 /* The GNU C library defines this for functions which it implements
13795     to always fail with ENOSYS.  Some functions are actually named
13796     something starting with __ and the normal name is an alias.  */
13797 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
13798 choke me
13799 #else
13800 f = mdbm_set_chain;
13801 #endif
13802
13803 ; return 0; }
13804 EOF
13805 if { (eval echo configure:13806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13806   rm -rf conftest*
13807   eval "ac_cv_func_mdbm_set_chain=yes"
13808 else
13809   echo "configure: failed program was:" >&5
13810   cat conftest.$ac_ext >&5
13811   rm -rf conftest*
13812   eval "ac_cv_func_mdbm_set_chain=no"
13813 fi
13814 rm -f conftest*
13815 fi
13816
13817 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
13818   echo "$ac_t""yes" 1>&6
13819   ol_cv_lib_mdbm=yes
13820 else
13821   echo "$ac_t""no" 1>&6
13822
13823                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
13824 echo "configure:13825: checking for mdbm_set_chain in -lmdbm" >&5
13825 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
13826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13827   echo $ac_n "(cached) $ac_c" 1>&6
13828 else
13829   ac_save_LIBS="$LIBS"
13830 LIBS="-lmdbm  $LIBS"
13831 cat > conftest.$ac_ext <<EOF
13832 #line 13833 "configure"
13833 #include "confdefs.h"
13834 /* Override any gcc2 internal prototype to avoid an error.  */
13835 /* We use char because int might match the return type of a gcc2
13836     builtin and then its argument prototype would still apply.  */
13837 char mdbm_set_chain();
13838
13839 int main() {
13840 mdbm_set_chain()
13841 ; return 0; }
13842 EOF
13843 if { (eval echo configure:13844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13844   rm -rf conftest*
13845   eval "ac_cv_lib_$ac_lib_var=yes"
13846 else
13847   echo "configure: failed program was:" >&5
13848   cat conftest.$ac_ext >&5
13849   rm -rf conftest*
13850   eval "ac_cv_lib_$ac_lib_var=no"
13851 fi
13852 rm -f conftest*
13853 LIBS="$ac_save_LIBS"
13854
13855 fi
13856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13857   echo "$ac_t""yes" 1>&6
13858   ol_cv_lib_mdbm=-lmdbm
13859 else
13860   echo "$ac_t""no" 1>&6
13861 ol_cv_lib_mdbm=no
13862 fi
13863
13864         
13865 fi
13866
13867         LIBS="$ol_LIBS"
13868
13869 fi
13870
13871 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
13872
13873
13874  for ac_hdr in mdbm.h
13875 do
13876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13878 echo "configure:13879: checking for $ac_hdr" >&5
13879 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13880   echo $ac_n "(cached) $ac_c" 1>&6
13881 else
13882   cat > conftest.$ac_ext <<EOF
13883 #line 13884 "configure"
13884 #include "confdefs.h"
13885 #include <$ac_hdr>
13886 EOF
13887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13888 { (eval echo configure:13889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13890 if test -z "$ac_err"; then
13891   rm -rf conftest*
13892   eval "ac_cv_header_$ac_safe=yes"
13893 else
13894   echo "$ac_err" >&5
13895   echo "configure: failed program was:" >&5
13896   cat conftest.$ac_ext >&5
13897   rm -rf conftest*
13898   eval "ac_cv_header_$ac_safe=no"
13899 fi
13900 rm -f conftest*
13901 fi
13902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13903   echo "$ac_t""yes" 1>&6
13904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13905   cat >> confdefs.h <<EOF
13906 #define $ac_tr_hdr 1
13907 EOF
13908  
13909 else
13910   echo "$ac_t""no" 1>&6
13911 fi
13912 done
13913
13914  echo $ac_n "checking for db""... $ac_c" 1>&6
13915 echo "configure:13916: checking for db" >&5
13916 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
13917   echo $ac_n "(cached) $ac_c" 1>&6
13918 else
13919   
13920         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
13921                 ol_cv_mdbm=no
13922         else
13923                 ol_cv_mdbm=yes
13924         fi
13925
13926 fi
13927
13928 echo "$ac_t""$ol_cv_mdbm" 1>&6
13929  if test $ol_cv_mdbm = yes ; then
13930         cat >> confdefs.h <<\EOF
13931 #define HAVE_MDBM 1
13932 EOF
13933
13934  fi
13935
13936
13937         if test $ol_cv_mdbm = yes ; then
13938                 ol_link_ldbm=mdbm
13939                 ol_with_ldbm_api=mdbm
13940                 if test $ol_cv_lib_mdbm != yes ; then
13941                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
13942                 fi
13943         fi
13944 fi
13945
13946 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
13947         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
13948 echo "configure:13949: checking for GDBM library" >&5
13949 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
13950   echo $ac_n "(cached) $ac_c" 1>&6
13951 else
13952         ol_LIBS="$LIBS"
13953         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
13954 echo "configure:13955: checking for gdbm_open" >&5
13955 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
13956   echo $ac_n "(cached) $ac_c" 1>&6
13957 else
13958   cat > conftest.$ac_ext <<EOF
13959 #line 13960 "configure"
13960 #include "confdefs.h"
13961 /* System header to define __stub macros and hopefully few prototypes,
13962     which can conflict with char gdbm_open(); below.  */
13963 #include <assert.h>
13964 /* Override any gcc2 internal prototype to avoid an error.  */
13965 /* We use char because int might match the return type of a gcc2
13966     builtin and then its argument prototype would still apply.  */
13967 char gdbm_open();
13968 char (*f)();
13969
13970 int main() {
13971
13972 /* The GNU C library defines this for functions which it implements
13973     to always fail with ENOSYS.  Some functions are actually named
13974     something starting with __ and the normal name is an alias.  */
13975 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
13976 choke me
13977 #else
13978 f = gdbm_open;
13979 #endif
13980
13981 ; return 0; }
13982 EOF
13983 if { (eval echo configure:13984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13984   rm -rf conftest*
13985   eval "ac_cv_func_gdbm_open=yes"
13986 else
13987   echo "configure: failed program was:" >&5
13988   cat conftest.$ac_ext >&5
13989   rm -rf conftest*
13990   eval "ac_cv_func_gdbm_open=no"
13991 fi
13992 rm -f conftest*
13993 fi
13994
13995 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
13996   echo "$ac_t""yes" 1>&6
13997   ol_cv_lib_gdbm=yes
13998 else
13999   echo "$ac_t""no" 1>&6
14000
14001                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
14002 echo "configure:14003: checking for gdbm_open in -lgdbm" >&5
14003 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
14004 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14005   echo $ac_n "(cached) $ac_c" 1>&6
14006 else
14007   ac_save_LIBS="$LIBS"
14008 LIBS="-lgdbm  $LIBS"
14009 cat > conftest.$ac_ext <<EOF
14010 #line 14011 "configure"
14011 #include "confdefs.h"
14012 /* Override any gcc2 internal prototype to avoid an error.  */
14013 /* We use char because int might match the return type of a gcc2
14014     builtin and then its argument prototype would still apply.  */
14015 char gdbm_open();
14016
14017 int main() {
14018 gdbm_open()
14019 ; return 0; }
14020 EOF
14021 if { (eval echo configure:14022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14022   rm -rf conftest*
14023   eval "ac_cv_lib_$ac_lib_var=yes"
14024 else
14025   echo "configure: failed program was:" >&5
14026   cat conftest.$ac_ext >&5
14027   rm -rf conftest*
14028   eval "ac_cv_lib_$ac_lib_var=no"
14029 fi
14030 rm -f conftest*
14031 LIBS="$ac_save_LIBS"
14032
14033 fi
14034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14035   echo "$ac_t""yes" 1>&6
14036   ol_cv_lib_gdbm=-lgdbm
14037 else
14038   echo "$ac_t""no" 1>&6
14039 ol_cv_lib_gdbm=no
14040 fi
14041
14042         
14043 fi
14044
14045         LIBS="$ol_LIBS"
14046
14047 fi
14048
14049 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
14050
14051
14052  for ac_hdr in gdbm.h
14053 do
14054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14056 echo "configure:14057: checking for $ac_hdr" >&5
14057 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14058   echo $ac_n "(cached) $ac_c" 1>&6
14059 else
14060   cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063 #include <$ac_hdr>
14064 EOF
14065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14066 { (eval echo configure:14067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14068 if test -z "$ac_err"; then
14069   rm -rf conftest*
14070   eval "ac_cv_header_$ac_safe=yes"
14071 else
14072   echo "$ac_err" >&5
14073   echo "configure: failed program was:" >&5
14074   cat conftest.$ac_ext >&5
14075   rm -rf conftest*
14076   eval "ac_cv_header_$ac_safe=no"
14077 fi
14078 rm -f conftest*
14079 fi
14080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14081   echo "$ac_t""yes" 1>&6
14082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14083   cat >> confdefs.h <<EOF
14084 #define $ac_tr_hdr 1
14085 EOF
14086  
14087 else
14088   echo "$ac_t""no" 1>&6
14089 fi
14090 done
14091
14092  echo $ac_n "checking for db""... $ac_c" 1>&6
14093 echo "configure:14094: checking for db" >&5
14094 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
14095   echo $ac_n "(cached) $ac_c" 1>&6
14096 else
14097   
14098         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
14099                 ol_cv_gdbm=no
14100         else
14101                 ol_cv_gdbm=yes
14102         fi
14103
14104 fi
14105
14106 echo "$ac_t""$ol_cv_gdbm" 1>&6
14107  if test $ol_cv_gdbm = yes ; then
14108         cat >> confdefs.h <<\EOF
14109 #define HAVE_GDBM 1
14110 EOF
14111
14112  fi
14113
14114
14115         if test $ol_cv_gdbm = yes ; then
14116                 ol_link_ldbm=gdbm
14117                 ol_with_ldbm_api=gdbm
14118
14119                 if test $ol_cv_lib_gdbm != yes ; then
14120                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
14121                 fi
14122         fi
14123 fi
14124
14125 if test $ol_with_ldbm_api = ndbm ; then
14126         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
14127 echo "configure:14128: checking for NDBM library" >&5
14128 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
14129   echo $ac_n "(cached) $ac_c" 1>&6
14130 else
14131         ol_LIBS="$LIBS"
14132         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14133 echo "configure:14134: checking for dbm_open" >&5
14134 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
14135   echo $ac_n "(cached) $ac_c" 1>&6
14136 else
14137   cat > conftest.$ac_ext <<EOF
14138 #line 14139 "configure"
14139 #include "confdefs.h"
14140 /* System header to define __stub macros and hopefully few prototypes,
14141     which can conflict with char dbm_open(); below.  */
14142 #include <assert.h>
14143 /* Override any gcc2 internal prototype to avoid an error.  */
14144 /* We use char because int might match the return type of a gcc2
14145     builtin and then its argument prototype would still apply.  */
14146 char dbm_open();
14147 char (*f)();
14148
14149 int main() {
14150
14151 /* The GNU C library defines this for functions which it implements
14152     to always fail with ENOSYS.  Some functions are actually named
14153     something starting with __ and the normal name is an alias.  */
14154 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14155 choke me
14156 #else
14157 f = dbm_open;
14158 #endif
14159
14160 ; return 0; }
14161 EOF
14162 if { (eval echo configure:14163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14163   rm -rf conftest*
14164   eval "ac_cv_func_dbm_open=yes"
14165 else
14166   echo "configure: failed program was:" >&5
14167   cat conftest.$ac_ext >&5
14168   rm -rf conftest*
14169   eval "ac_cv_func_dbm_open=no"
14170 fi
14171 rm -f conftest*
14172 fi
14173
14174 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14175   echo "$ac_t""yes" 1>&6
14176   ol_cv_lib_ndbm=yes
14177 else
14178   echo "$ac_t""no" 1>&6
14179
14180                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
14181 echo "configure:14182: checking for dbm_open in -lndbm" >&5
14182 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14183 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14184   echo $ac_n "(cached) $ac_c" 1>&6
14185 else
14186   ac_save_LIBS="$LIBS"
14187 LIBS="-lndbm  $LIBS"
14188 cat > conftest.$ac_ext <<EOF
14189 #line 14190 "configure"
14190 #include "confdefs.h"
14191 /* Override any gcc2 internal prototype to avoid an error.  */
14192 /* We use char because int might match the return type of a gcc2
14193     builtin and then its argument prototype would still apply.  */
14194 char dbm_open();
14195
14196 int main() {
14197 dbm_open()
14198 ; return 0; }
14199 EOF
14200 if { (eval echo configure:14201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14201   rm -rf conftest*
14202   eval "ac_cv_lib_$ac_lib_var=yes"
14203 else
14204   echo "configure: failed program was:" >&5
14205   cat conftest.$ac_ext >&5
14206   rm -rf conftest*
14207   eval "ac_cv_lib_$ac_lib_var=no"
14208 fi
14209 rm -f conftest*
14210 LIBS="$ac_save_LIBS"
14211
14212 fi
14213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14214   echo "$ac_t""yes" 1>&6
14215   ol_cv_lib_ndbm=-lndbm
14216 else
14217   echo "$ac_t""no" 1>&6
14218
14219                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14220 echo "configure:14221: checking for dbm_open in -ldbm" >&5
14221 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14223   echo $ac_n "(cached) $ac_c" 1>&6
14224 else
14225   ac_save_LIBS="$LIBS"
14226 LIBS="-ldbm  $LIBS"
14227 cat > conftest.$ac_ext <<EOF
14228 #line 14229 "configure"
14229 #include "confdefs.h"
14230 /* Override any gcc2 internal prototype to avoid an error.  */
14231 /* We use char because int might match the return type of a gcc2
14232     builtin and then its argument prototype would still apply.  */
14233 char dbm_open();
14234
14235 int main() {
14236 dbm_open()
14237 ; return 0; }
14238 EOF
14239 if { (eval echo configure:14240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14240   rm -rf conftest*
14241   eval "ac_cv_lib_$ac_lib_var=yes"
14242 else
14243   echo "configure: failed program was:" >&5
14244   cat conftest.$ac_ext >&5
14245   rm -rf conftest*
14246   eval "ac_cv_lib_$ac_lib_var=no"
14247 fi
14248 rm -f conftest*
14249 LIBS="$ac_save_LIBS"
14250
14251 fi
14252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14253   echo "$ac_t""yes" 1>&6
14254   ol_cv_lib_ndbm=-ldbm
14255 else
14256   echo "$ac_t""no" 1>&6
14257 ol_cv_lib_ndbm=no
14258 fi
14259                 
14260 fi
14261
14262         
14263 fi
14264
14265         LIBS="$ol_LIBS"
14266
14267 fi
14268
14269 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
14270
14271
14272  for ac_hdr in ndbm.h
14273 do
14274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14276 echo "configure:14277: checking for $ac_hdr" >&5
14277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14278   echo $ac_n "(cached) $ac_c" 1>&6
14279 else
14280   cat > conftest.$ac_ext <<EOF
14281 #line 14282 "configure"
14282 #include "confdefs.h"
14283 #include <$ac_hdr>
14284 EOF
14285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14286 { (eval echo configure:14287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14288 if test -z "$ac_err"; then
14289   rm -rf conftest*
14290   eval "ac_cv_header_$ac_safe=yes"
14291 else
14292   echo "$ac_err" >&5
14293   echo "configure: failed program was:" >&5
14294   cat conftest.$ac_ext >&5
14295   rm -rf conftest*
14296   eval "ac_cv_header_$ac_safe=no"
14297 fi
14298 rm -f conftest*
14299 fi
14300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14301   echo "$ac_t""yes" 1>&6
14302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14303   cat >> confdefs.h <<EOF
14304 #define $ac_tr_hdr 1
14305 EOF
14306  
14307 else
14308   echo "$ac_t""no" 1>&6
14309 fi
14310 done
14311
14312  echo $ac_n "checking for db""... $ac_c" 1>&6
14313 echo "configure:14314: checking for db" >&5
14314 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
14315   echo $ac_n "(cached) $ac_c" 1>&6
14316 else
14317   
14318         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
14319                 ol_cv_ndbm=no
14320         else
14321                 ol_cv_ndbm=yes
14322         fi
14323
14324 fi
14325
14326 echo "$ac_t""$ol_cv_ndbm" 1>&6
14327  if test $ol_cv_ndbm = yes ; then
14328         cat >> confdefs.h <<\EOF
14329 #define HAVE_NDBM 1
14330 EOF
14331
14332  fi
14333
14334
14335         if test $ol_cv_ndbm = yes ; then
14336                 ol_link_ldbm=ndbm
14337                 ol_with_ldbm_api=ndbm
14338
14339                 if test $ol_cv_lib_ndbm != yes ; then
14340                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
14341                 fi
14342         fi
14343 fi
14344
14345 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
14346         echo "configure: warning: could not find suitable LDBM backend" 1>&2
14347         if test $ol_enable_ldbm = yes ; then
14348                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
14349         fi
14350
14351         echo "configure: warning: disabling LDBM" 1>&2
14352         ol_enable_ldbm=no
14353 fi
14354
14355 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
14356         LINK_BINS_DYNAMIC="yes"
14357 else
14358         LINK_BINS_DYNAMIC="no"
14359 fi
14360
14361 if test $ol_enable_wrappers != no ; then
14362         for ac_hdr in tcpd.h
14363 do
14364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14366 echo "configure:14367: checking for $ac_hdr" >&5
14367 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14368   echo $ac_n "(cached) $ac_c" 1>&6
14369 else
14370   cat > conftest.$ac_ext <<EOF
14371 #line 14372 "configure"
14372 #include "confdefs.h"
14373 #include <$ac_hdr>
14374 EOF
14375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14376 { (eval echo configure:14377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14378 if test -z "$ac_err"; then
14379   rm -rf conftest*
14380   eval "ac_cv_header_$ac_safe=yes"
14381 else
14382   echo "$ac_err" >&5
14383   echo "configure: failed program was:" >&5
14384   cat conftest.$ac_ext >&5
14385   rm -rf conftest*
14386   eval "ac_cv_header_$ac_safe=no"
14387 fi
14388 rm -f conftest*
14389 fi
14390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14391   echo "$ac_t""yes" 1>&6
14392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14393   cat >> confdefs.h <<EOF
14394 #define $ac_tr_hdr 1
14395 EOF
14396  
14397 else
14398   echo "$ac_t""no" 1>&6
14399 fi
14400 done
14401
14402
14403         if test $ac_cv_header_tcpd_h != yes ; then
14404                 have_wrappers=no
14405         else
14406                 cat > conftest.$ac_ext <<EOF
14407 #line 14408 "configure"
14408 #include "confdefs.h"
14409
14410 int allow_severity = 0;
14411 int deny_severity  = 0;
14412                 
14413 int main() {
14414 hosts_access()
14415 ; return 0; }
14416 EOF
14417 if { (eval echo configure:14418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14418   rm -rf conftest*
14419   have_wrappers=yes
14420 else
14421   echo "configure: failed program was:" >&5
14422   cat conftest.$ac_ext >&5
14423   rm -rf conftest*
14424   have_wrappers=no
14425 fi
14426 rm -f conftest*
14427         fi
14428
14429         if test $have_wrappers = yes ; then
14430                 cat >> confdefs.h <<\EOF
14431 #define HAVE_TCPD 1
14432 EOF
14433
14434                 WRAP_LIBS="-lwrap"
14435
14436                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
14437 echo "configure:14438: checking for main in -lnsl" >&5
14438 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
14439 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14440   echo $ac_n "(cached) $ac_c" 1>&6
14441 else
14442   ac_save_LIBS="$LIBS"
14443 LIBS="-lnsl  $LIBS"
14444 cat > conftest.$ac_ext <<EOF
14445 #line 14446 "configure"
14446 #include "confdefs.h"
14447
14448 int main() {
14449 main()
14450 ; return 0; }
14451 EOF
14452 if { (eval echo configure:14453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14453   rm -rf conftest*
14454   eval "ac_cv_lib_$ac_lib_var=yes"
14455 else
14456   echo "configure: failed program was:" >&5
14457   cat conftest.$ac_ext >&5
14458   rm -rf conftest*
14459   eval "ac_cv_lib_$ac_lib_var=no"
14460 fi
14461 rm -f conftest*
14462 LIBS="$ac_save_LIBS"
14463
14464 fi
14465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14466   echo "$ac_t""yes" 1>&6
14467     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14468     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14469   cat >> confdefs.h <<EOF
14470 #define $ac_tr_lib 1
14471 EOF
14472
14473   LIBS="-lnsl $LIBS"
14474
14475 else
14476   echo "$ac_t""no" 1>&6
14477 fi
14478
14479         else
14480                 echo "configure: warning: could not find -lwrap" 1>&2
14481                 if test $ol_enable_wrappers = yes ; then
14482                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
14483                 fi
14484
14485                 echo "configure: warning: disabling wrappers support" 1>&2
14486                 ol_enable_wrappers=no
14487                 WRAP_LIBS=""
14488         fi
14489 fi
14490
14491 if test $ol_enable_syslog != no ; then
14492         echo $ac_n "checking for openlog""... $ac_c" 1>&6
14493 echo "configure:14494: checking for openlog" >&5
14494 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
14495   echo $ac_n "(cached) $ac_c" 1>&6
14496 else
14497   cat > conftest.$ac_ext <<EOF
14498 #line 14499 "configure"
14499 #include "confdefs.h"
14500 /* System header to define __stub macros and hopefully few prototypes,
14501     which can conflict with char openlog(); below.  */
14502 #include <assert.h>
14503 /* Override any gcc2 internal prototype to avoid an error.  */
14504 /* We use char because int might match the return type of a gcc2
14505     builtin and then its argument prototype would still apply.  */
14506 char openlog();
14507 char (*f)();
14508
14509 int main() {
14510
14511 /* The GNU C library defines this for functions which it implements
14512     to always fail with ENOSYS.  Some functions are actually named
14513     something starting with __ and the normal name is an alias.  */
14514 #if defined (__stub_openlog) || defined (__stub___openlog)
14515 choke me
14516 #else
14517 f = openlog;
14518 #endif
14519
14520 ; return 0; }
14521 EOF
14522 if { (eval echo configure:14523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14523   rm -rf conftest*
14524   eval "ac_cv_func_openlog=yes"
14525 else
14526   echo "configure: failed program was:" >&5
14527   cat conftest.$ac_ext >&5
14528   rm -rf conftest*
14529   eval "ac_cv_func_openlog=no"
14530 fi
14531 rm -f conftest*
14532 fi
14533
14534 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
14535   echo "$ac_t""yes" 1>&6
14536   :
14537 else
14538   echo "$ac_t""no" 1>&6
14539 fi
14540
14541         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
14542                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
14543         fi
14544         ol_enable_syslog=$ac_cv_func_openlog
14545 fi
14546
14547
14548 ol_link_sql=no
14549 if test $ol_enable_sql != no ; then
14550         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
14551 echo "configure:14552: checking for SQLDriverConnect in -liodbc" >&5
14552 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14554   echo $ac_n "(cached) $ac_c" 1>&6
14555 else
14556   ac_save_LIBS="$LIBS"
14557 LIBS="-liodbc  $LIBS"
14558 cat > conftest.$ac_ext <<EOF
14559 #line 14560 "configure"
14560 #include "confdefs.h"
14561 /* Override any gcc2 internal prototype to avoid an error.  */
14562 /* We use char because int might match the return type of a gcc2
14563     builtin and then its argument prototype would still apply.  */
14564 char SQLDriverConnect();
14565
14566 int main() {
14567 SQLDriverConnect()
14568 ; return 0; }
14569 EOF
14570 if { (eval echo configure:14571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14571   rm -rf conftest*
14572   eval "ac_cv_lib_$ac_lib_var=yes"
14573 else
14574   echo "configure: failed program was:" >&5
14575   cat conftest.$ac_ext >&5
14576   rm -rf conftest*
14577   eval "ac_cv_lib_$ac_lib_var=no"
14578 fi
14579 rm -f conftest*
14580 LIBS="$ac_save_LIBS"
14581
14582 fi
14583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14584   echo "$ac_t""yes" 1>&6
14585   have_iodbc=yes
14586 else
14587   echo "$ac_t""no" 1>&6
14588 have_iodbc=no
14589 fi
14590
14591         if test $have_iodbc = yes ; then
14592                 ol_link_sql="-liodbc"
14593         else
14594                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
14595 echo "configure:14596: checking for SQLDriverConnect in -lodbc" >&5
14596 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14598   echo $ac_n "(cached) $ac_c" 1>&6
14599 else
14600   ac_save_LIBS="$LIBS"
14601 LIBS="-lodbc  $LIBS"
14602 cat > conftest.$ac_ext <<EOF
14603 #line 14604 "configure"
14604 #include "confdefs.h"
14605 /* Override any gcc2 internal prototype to avoid an error.  */
14606 /* We use char because int might match the return type of a gcc2
14607     builtin and then its argument prototype would still apply.  */
14608 char SQLDriverConnect();
14609
14610 int main() {
14611 SQLDriverConnect()
14612 ; return 0; }
14613 EOF
14614 if { (eval echo configure:14615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14615   rm -rf conftest*
14616   eval "ac_cv_lib_$ac_lib_var=yes"
14617 else
14618   echo "configure: failed program was:" >&5
14619   cat conftest.$ac_ext >&5
14620   rm -rf conftest*
14621   eval "ac_cv_lib_$ac_lib_var=no"
14622 fi
14623 rm -f conftest*
14624 LIBS="$ac_save_LIBS"
14625
14626 fi
14627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14628   echo "$ac_t""yes" 1>&6
14629   have_odbc=yes
14630 else
14631   echo "$ac_t""no" 1>&6
14632 have_odbc=no
14633 fi
14634
14635                 if test $have_odbc = yes ; then
14636                         ol_link_sql="-lodbc"
14637                 fi
14638         fi
14639
14640         if test $ol_link_sql != no ; then
14641                 SLAPD_SQL_LIBS="$ol_link_sql"
14642
14643         elif test $ol_enable_sql != auto ; then
14644                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
14645         fi
14646 fi
14647
14648 if test $ol_enable_tcl != no ; then
14649         for ac_hdr in tcl.h
14650 do
14651 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14652 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14653 echo "configure:14654: checking for $ac_hdr" >&5
14654 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14655   echo $ac_n "(cached) $ac_c" 1>&6
14656 else
14657   cat > conftest.$ac_ext <<EOF
14658 #line 14659 "configure"
14659 #include "confdefs.h"
14660 #include <$ac_hdr>
14661 EOF
14662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14663 { (eval echo configure:14664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14665 if test -z "$ac_err"; then
14666   rm -rf conftest*
14667   eval "ac_cv_header_$ac_safe=yes"
14668 else
14669   echo "$ac_err" >&5
14670   echo "configure: failed program was:" >&5
14671   cat conftest.$ac_ext >&5
14672   rm -rf conftest*
14673   eval "ac_cv_header_$ac_safe=no"
14674 fi
14675 rm -f conftest*
14676 fi
14677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14678   echo "$ac_t""yes" 1>&6
14679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14680   cat >> confdefs.h <<EOF
14681 #define $ac_tr_hdr 1
14682 EOF
14683  
14684 else
14685   echo "$ac_t""no" 1>&6
14686 fi
14687 done
14688
14689
14690         if test $ac_cv_header_tcl_h != yes ; then
14691                 have_tcl=no
14692         else
14693                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
14694                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
14695 echo "configure:14696: checking for main in -l$lib" >&5
14696 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
14697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14698   echo $ac_n "(cached) $ac_c" 1>&6
14699 else
14700   ac_save_LIBS="$LIBS"
14701 LIBS="-l$lib  $LIBS"
14702 cat > conftest.$ac_ext <<EOF
14703 #line 14704 "configure"
14704 #include "confdefs.h"
14705
14706 int main() {
14707 main()
14708 ; return 0; }
14709 EOF
14710 if { (eval echo configure:14711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14711   rm -rf conftest*
14712   eval "ac_cv_lib_$ac_lib_var=yes"
14713 else
14714   echo "configure: failed program was:" >&5
14715   cat conftest.$ac_ext >&5
14716   rm -rf conftest*
14717   eval "ac_cv_lib_$ac_lib_var=no"
14718 fi
14719 rm -f conftest*
14720 LIBS="$ac_save_LIBS"
14721
14722 fi
14723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14724   echo "$ac_t""yes" 1>&6
14725   have_tcl=yes
14726                            if test x"$ol_with_tcl_module" = "xstatic" ; then
14727                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
14728                            else
14729                                MOD_TCL_LIB="-l${lib}"
14730                            fi;break
14731 else
14732   echo "$ac_t""no" 1>&6
14733 have_tcl=no
14734 fi
14735
14736                 done
14737         fi
14738
14739         if test $have_tcl != yes ; then
14740                 echo "configure: warning: could not find -ltcl" 1>&2
14741                 if test $ol_enable_tcl = yes ; then
14742                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
14743                 fi
14744
14745                 ol_enable_tcl=no
14746         fi
14747 fi
14748
14749 ol_link_termcap=no
14750 for ac_hdr in termcap.h ncurses.h
14751 do
14752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14754 echo "configure:14755: checking for $ac_hdr" >&5
14755 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14756   echo $ac_n "(cached) $ac_c" 1>&6
14757 else
14758   cat > conftest.$ac_ext <<EOF
14759 #line 14760 "configure"
14760 #include "confdefs.h"
14761 #include <$ac_hdr>
14762 EOF
14763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14764 { (eval echo configure:14765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14766 if test -z "$ac_err"; then
14767   rm -rf conftest*
14768   eval "ac_cv_header_$ac_safe=yes"
14769 else
14770   echo "$ac_err" >&5
14771   echo "configure: failed program was:" >&5
14772   cat conftest.$ac_ext >&5
14773   rm -rf conftest*
14774   eval "ac_cv_header_$ac_safe=no"
14775 fi
14776 rm -f conftest*
14777 fi
14778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14779   echo "$ac_t""yes" 1>&6
14780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14781   cat >> confdefs.h <<EOF
14782 #define $ac_tr_hdr 1
14783 EOF
14784  
14785 else
14786   echo "$ac_t""no" 1>&6
14787 fi
14788 done
14789
14790
14791 if test $ol_link_termcap = no ; then
14792         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
14793 echo "configure:14794: checking for tputs in -ltermcap" >&5
14794 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
14795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14796   echo $ac_n "(cached) $ac_c" 1>&6
14797 else
14798   ac_save_LIBS="$LIBS"
14799 LIBS="-ltermcap  $LIBS"
14800 cat > conftest.$ac_ext <<EOF
14801 #line 14802 "configure"
14802 #include "confdefs.h"
14803 /* Override any gcc2 internal prototype to avoid an error.  */
14804 /* We use char because int might match the return type of a gcc2
14805     builtin and then its argument prototype would still apply.  */
14806 char tputs();
14807
14808 int main() {
14809 tputs()
14810 ; return 0; }
14811 EOF
14812 if { (eval echo configure:14813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14813   rm -rf conftest*
14814   eval "ac_cv_lib_$ac_lib_var=yes"
14815 else
14816   echo "configure: failed program was:" >&5
14817   cat conftest.$ac_ext >&5
14818   rm -rf conftest*
14819   eval "ac_cv_lib_$ac_lib_var=no"
14820 fi
14821 rm -f conftest*
14822 LIBS="$ac_save_LIBS"
14823
14824 fi
14825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14826   echo "$ac_t""yes" 1>&6
14827   have_termcap=yes
14828 else
14829   echo "$ac_t""no" 1>&6
14830 have_termcap=no
14831 fi
14832
14833         if test $have_termcap = yes ; then
14834                 cat >> confdefs.h <<\EOF
14835 #define HAVE_TERMCAP 1
14836 EOF
14837
14838                 ol_link_termcap=yes
14839                 TERMCAP_LIBS=-ltermcap
14840         fi
14841 fi
14842
14843 if test $ol_link_termcap = no ; then
14844         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
14845 echo "configure:14846: checking for initscr in -lncurses" >&5
14846 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
14847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14848   echo $ac_n "(cached) $ac_c" 1>&6
14849 else
14850   ac_save_LIBS="$LIBS"
14851 LIBS="-lncurses  $LIBS"
14852 cat > conftest.$ac_ext <<EOF
14853 #line 14854 "configure"
14854 #include "confdefs.h"
14855 /* Override any gcc2 internal prototype to avoid an error.  */
14856 /* We use char because int might match the return type of a gcc2
14857     builtin and then its argument prototype would still apply.  */
14858 char initscr();
14859
14860 int main() {
14861 initscr()
14862 ; return 0; }
14863 EOF
14864 if { (eval echo configure:14865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14865   rm -rf conftest*
14866   eval "ac_cv_lib_$ac_lib_var=yes"
14867 else
14868   echo "configure: failed program was:" >&5
14869   cat conftest.$ac_ext >&5
14870   rm -rf conftest*
14871   eval "ac_cv_lib_$ac_lib_var=no"
14872 fi
14873 rm -f conftest*
14874 LIBS="$ac_save_LIBS"
14875
14876 fi
14877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14878   echo "$ac_t""yes" 1>&6
14879   have_ncurses=yes
14880 else
14881   echo "$ac_t""no" 1>&6
14882 have_ncurses=no
14883 fi
14884
14885         if test $have_ncurses = yes ; then
14886                 cat >> confdefs.h <<\EOF
14887 #define HAVE_NCURSES 1
14888 EOF
14889
14890                 ol_link_termcap=yes
14891                 TERMCAP_LIBS=-lncurses
14892         fi
14893 fi
14894
14895 if test $ol_link_termcap = no ; then
14896         cat >> confdefs.h <<\EOF
14897 #define NO_TERMCAP 1
14898 EOF
14899
14900         TERMCAP_LIBS=
14901 fi
14902
14903 ol_link_sasl=no
14904 ol_link_spasswd=no
14905 if test $ol_with_cyrus_sasl != no ; then
14906         for ac_hdr in sasl.h
14907 do
14908 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14909 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14910 echo "configure:14911: checking for $ac_hdr" >&5
14911 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14912   echo $ac_n "(cached) $ac_c" 1>&6
14913 else
14914   cat > conftest.$ac_ext <<EOF
14915 #line 14916 "configure"
14916 #include "confdefs.h"
14917 #include <$ac_hdr>
14918 EOF
14919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14920 { (eval echo configure:14921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14922 if test -z "$ac_err"; then
14923   rm -rf conftest*
14924   eval "ac_cv_header_$ac_safe=yes"
14925 else
14926   echo "$ac_err" >&5
14927   echo "configure: failed program was:" >&5
14928   cat conftest.$ac_ext >&5
14929   rm -rf conftest*
14930   eval "ac_cv_header_$ac_safe=no"
14931 fi
14932 rm -f conftest*
14933 fi
14934 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14935   echo "$ac_t""yes" 1>&6
14936     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14937   cat >> confdefs.h <<EOF
14938 #define $ac_tr_hdr 1
14939 EOF
14940  
14941 else
14942   echo "$ac_t""no" 1>&6
14943 fi
14944 done
14945
14946
14947         if test $ac_cv_header_sasl_h = yes ; then
14948                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
14949 echo "configure:14950: checking for sasl_client_init in -lsasl" >&5
14950 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
14951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14952   echo $ac_n "(cached) $ac_c" 1>&6
14953 else
14954   ac_save_LIBS="$LIBS"
14955 LIBS="-lsasl  $LIBS"
14956 cat > conftest.$ac_ext <<EOF
14957 #line 14958 "configure"
14958 #include "confdefs.h"
14959 /* Override any gcc2 internal prototype to avoid an error.  */
14960 /* We use char because int might match the return type of a gcc2
14961     builtin and then its argument prototype would still apply.  */
14962 char sasl_client_init();
14963
14964 int main() {
14965 sasl_client_init()
14966 ; return 0; }
14967 EOF
14968 if { (eval echo configure:14969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14969   rm -rf conftest*
14970   eval "ac_cv_lib_$ac_lib_var=yes"
14971 else
14972   echo "configure: failed program was:" >&5
14973   cat conftest.$ac_ext >&5
14974   rm -rf conftest*
14975   eval "ac_cv_lib_$ac_lib_var=no"
14976 fi
14977 rm -f conftest*
14978 LIBS="$ac_save_LIBS"
14979
14980 fi
14981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14982   echo "$ac_t""yes" 1>&6
14983   have_cyrus_sasl=yes
14984 else
14985   echo "$ac_t""no" 1>&6
14986 have_cyrus_sasl=no
14987 fi
14988
14989
14990                 if test $have_cyrus_sasl != no ; then
14991                         SASL_LIBS="-lsasl"
14992                         cat >> confdefs.h <<\EOF
14993 #define HAVE_CYRUS_SASL 1
14994 EOF
14995
14996                         ol_link_sasl=yes
14997                 fi
14998         fi
14999
15000         if test $ol_link_sasl = no ; then
15001                 if test $ol_with_cyrus_sasl != auto ; then
15002                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
15003                 else
15004                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
15005                         echo "configure: warning: SASL authentication not supported!" 1>&2
15006                         if test $ol_link_tls = no ; then
15007                                 echo "configure: warning: Strong authentication not supported!" 1>&2
15008                         fi
15009                 fi
15010
15011         elif test $ol_enable_spasswd != no ; then
15012                 ol_link_spasswd=yes
15013         fi
15014
15015 else
15016         echo "configure: warning: SASL authentication not supported!" 1>&2
15017         if test $ol_link_tls = no ; then
15018                 echo "configure: warning: Strong authentication not supported!" 1>&2
15019         fi
15020 fi
15021
15022 if test $cross_compiling != yes ; then
15023         dev=no
15024         if test -r /dev/urandom ; then
15025                 dev="/dev/urandom";
15026         elif test -r /idev/urandom ; then
15027                 dev="/idev/urandom";
15028         elif test -r /dev/srandom ; then
15029                 dev="/dev/srandom";
15030         elif test -r /dev/random ; then
15031                 dev="/dev/random";
15032         elif test -r /idev/random ; then
15033                 dev="/idev/random";
15034         fi
15035
15036         if test $dev != no ; then
15037                 cat >> confdefs.h <<EOF
15038 #define URANDOM_DEVICE "$dev"
15039 EOF
15040
15041         fi
15042 fi
15043
15044 ol_link_fetch=no
15045 if test $ol_with_fetch != no ; then
15046         ol_LIBS=$LIBS
15047 LIBS="-lfetch -lcom_err $LIBS"
15048 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
15049 echo "configure:15050: checking fetch(3) library" >&5
15050 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
15051   echo $ac_n "(cached) $ac_c" 1>&6
15052 else
15053   
15054         cat > conftest.$ac_ext <<EOF
15055 #line 15056 "configure"
15056 #include "confdefs.h"
15057
15058 #include <sys/param.h>
15059 #include <stdio.h>
15060 #include <fetch.h>
15061 int main() {
15062 struct url *u = fetchParseURL("file:///"); 
15063 ; return 0; }
15064 EOF
15065 if { (eval echo configure:15066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15066   rm -rf conftest*
15067   ol_cv_lib_fetch=yes
15068 else
15069   echo "configure: failed program was:" >&5
15070   cat conftest.$ac_ext >&5
15071   rm -rf conftest*
15072   ol_cv_lib_fetch=no
15073 fi
15074 rm -f conftest*
15075 fi
15076
15077 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
15078 LIBS=$ol_LIBS
15079 if test $ol_cv_lib_fetch != no ; then
15080         ol_link_fetch="-lfetch -lcom_err"
15081         cat >> confdefs.h <<\EOF
15082 #define HAVE_FETCH 1
15083 EOF
15084
15085 fi
15086
15087
15088         if test $ol_cv_lib_fetch != no ; then
15089                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
15090                 ol_link_fetch=freebsd
15091
15092         elif test $ol_with_fetch != auto ; then
15093                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
15094         fi 
15095 fi
15096
15097 ol_link_readline=no
15098 if test $ol_with_readline != no ; then
15099         for ac_hdr in readline/readline.h readline/history.h
15100 do
15101 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15102 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15103 echo "configure:15104: checking for $ac_hdr" >&5
15104 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15105   echo $ac_n "(cached) $ac_c" 1>&6
15106 else
15107   cat > conftest.$ac_ext <<EOF
15108 #line 15109 "configure"
15109 #include "confdefs.h"
15110 #include <$ac_hdr>
15111 EOF
15112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15113 { (eval echo configure:15114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15115 if test -z "$ac_err"; then
15116   rm -rf conftest*
15117   eval "ac_cv_header_$ac_safe=yes"
15118 else
15119   echo "$ac_err" >&5
15120   echo "configure: failed program was:" >&5
15121   cat conftest.$ac_ext >&5
15122   rm -rf conftest*
15123   eval "ac_cv_header_$ac_safe=no"
15124 fi
15125 rm -f conftest*
15126 fi
15127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15128   echo "$ac_t""yes" 1>&6
15129     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15130   cat >> confdefs.h <<EOF
15131 #define $ac_tr_hdr 1
15132 EOF
15133  
15134 else
15135   echo "$ac_t""no" 1>&6
15136 fi
15137 done
15138
15139
15140         if test $ac_cv_header_readline_readline_h = yes ; then
15141                 save_LIBS="$LIBS"
15142                 LIBS="$TERMCAP_LIBS $LIBS"
15143                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
15144 echo "configure:15145: checking for readline in -lreadline" >&5
15145 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
15146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15147   echo $ac_n "(cached) $ac_c" 1>&6
15148 else
15149   ac_save_LIBS="$LIBS"
15150 LIBS="-lreadline  $LIBS"
15151 cat > conftest.$ac_ext <<EOF
15152 #line 15153 "configure"
15153 #include "confdefs.h"
15154 /* Override any gcc2 internal prototype to avoid an error.  */
15155 /* We use char because int might match the return type of a gcc2
15156     builtin and then its argument prototype would still apply.  */
15157 char readline();
15158
15159 int main() {
15160 readline()
15161 ; return 0; }
15162 EOF
15163 if { (eval echo configure:15164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15164   rm -rf conftest*
15165   eval "ac_cv_lib_$ac_lib_var=yes"
15166 else
15167   echo "configure: failed program was:" >&5
15168   cat conftest.$ac_ext >&5
15169   rm -rf conftest*
15170   eval "ac_cv_lib_$ac_lib_var=no"
15171 fi
15172 rm -f conftest*
15173 LIBS="$ac_save_LIBS"
15174
15175 fi
15176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15177   echo "$ac_t""yes" 1>&6
15178   have_readline=yes
15179 else
15180   echo "$ac_t""no" 1>&6
15181 have_readline=no
15182 fi
15183
15184                 LIBS="$save_LIBS"
15185                         
15186                 if test $have_readline = yes ; then
15187                         ol_with_readline=found
15188                         ol_link_readline=yes
15189
15190                         READLINE_LIBS="-lreadline"
15191                 fi
15192         fi
15193 fi
15194
15195 if test $ol_link_readline = yes ; then
15196         cat >> confdefs.h <<\EOF
15197 #define HAVE_READLINE 1
15198 EOF
15199
15200 fi
15201
15202
15203 if test $ol_enable_crypt != no ; then
15204         echo $ac_n "checking for crypt""... $ac_c" 1>&6
15205 echo "configure:15206: checking for crypt" >&5
15206 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
15207   echo $ac_n "(cached) $ac_c" 1>&6
15208 else
15209   cat > conftest.$ac_ext <<EOF
15210 #line 15211 "configure"
15211 #include "confdefs.h"
15212 /* System header to define __stub macros and hopefully few prototypes,
15213     which can conflict with char crypt(); below.  */
15214 #include <assert.h>
15215 /* Override any gcc2 internal prototype to avoid an error.  */
15216 /* We use char because int might match the return type of a gcc2
15217     builtin and then its argument prototype would still apply.  */
15218 char crypt();
15219 char (*f)();
15220
15221 int main() {
15222
15223 /* The GNU C library defines this for functions which it implements
15224     to always fail with ENOSYS.  Some functions are actually named
15225     something starting with __ and the normal name is an alias.  */
15226 #if defined (__stub_crypt) || defined (__stub___crypt)
15227 choke me
15228 #else
15229 f = crypt;
15230 #endif
15231
15232 ; return 0; }
15233 EOF
15234 if { (eval echo configure:15235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15235   rm -rf conftest*
15236   eval "ac_cv_func_crypt=yes"
15237 else
15238   echo "configure: failed program was:" >&5
15239   cat conftest.$ac_ext >&5
15240   rm -rf conftest*
15241   eval "ac_cv_func_crypt=no"
15242 fi
15243 rm -f conftest*
15244 fi
15245
15246 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
15247   echo "$ac_t""yes" 1>&6
15248   have_crypt=yes
15249 else
15250   echo "$ac_t""no" 1>&6
15251
15252                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
15253 echo "configure:15254: checking for crypt in -lcrypt" >&5
15254 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
15255 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15256   echo $ac_n "(cached) $ac_c" 1>&6
15257 else
15258   ac_save_LIBS="$LIBS"
15259 LIBS="-lcrypt  $LIBS"
15260 cat > conftest.$ac_ext <<EOF
15261 #line 15262 "configure"
15262 #include "confdefs.h"
15263 /* Override any gcc2 internal prototype to avoid an error.  */
15264 /* We use char because int might match the return type of a gcc2
15265     builtin and then its argument prototype would still apply.  */
15266 char crypt();
15267
15268 int main() {
15269 crypt()
15270 ; return 0; }
15271 EOF
15272 if { (eval echo configure:15273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15273   rm -rf conftest*
15274   eval "ac_cv_lib_$ac_lib_var=yes"
15275 else
15276   echo "configure: failed program was:" >&5
15277   cat conftest.$ac_ext >&5
15278   rm -rf conftest*
15279   eval "ac_cv_lib_$ac_lib_var=no"
15280 fi
15281 rm -f conftest*
15282 LIBS="$ac_save_LIBS"
15283
15284 fi
15285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15286   echo "$ac_t""yes" 1>&6
15287   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
15288                         have_crypt=yes
15289 else
15290   echo "$ac_t""no" 1>&6
15291 have_crypt=no
15292 fi
15293
15294 fi
15295
15296
15297         if test $have_crypt = yes ; then
15298                 cat >> confdefs.h <<\EOF
15299 #define HAVE_CRYPT 1
15300 EOF
15301
15302         else
15303                 echo "configure: warning: could not find crypt" 1>&2
15304                 if test $ol_enable_crypt = yes ; then
15305                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
15306                 fi
15307
15308                 echo "configure: warning: disabling crypt support" 1>&2
15309                 ol_enable_crypt=no
15310         fi
15311 fi
15312
15313 if test $ol_enable_proctitle != no ; then
15314         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
15315 echo "configure:15316: checking for setproctitle" >&5
15316 if eval "test \"\${ac_cv_func_setproctitle+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 /* System header to define __stub macros and hopefully few prototypes,
15323     which can conflict with char setproctitle(); below.  */
15324 #include <assert.h>
15325 /* Override any gcc2 internal prototype to avoid an error.  */
15326 /* We use char because int might match the return type of a gcc2
15327     builtin and then its argument prototype would still apply.  */
15328 char setproctitle();
15329 char (*f)();
15330
15331 int main() {
15332
15333 /* The GNU C library defines this for functions which it implements
15334     to always fail with ENOSYS.  Some functions are actually named
15335     something starting with __ and the normal name is an alias.  */
15336 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
15337 choke me
15338 #else
15339 f = setproctitle;
15340 #endif
15341
15342 ; return 0; }
15343 EOF
15344 if { (eval echo configure:15345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15345   rm -rf conftest*
15346   eval "ac_cv_func_setproctitle=yes"
15347 else
15348   echo "configure: failed program was:" >&5
15349   cat conftest.$ac_ext >&5
15350   rm -rf conftest*
15351   eval "ac_cv_func_setproctitle=no"
15352 fi
15353 rm -f conftest*
15354 fi
15355
15356 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
15357   echo "$ac_t""yes" 1>&6
15358   have_setproctitle=yes
15359 else
15360   echo "$ac_t""no" 1>&6
15361
15362                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
15363 echo "configure:15364: checking for setproctitle in -lutil" >&5
15364 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
15365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15366   echo $ac_n "(cached) $ac_c" 1>&6
15367 else
15368   ac_save_LIBS="$LIBS"
15369 LIBS="-lutil  $LIBS"
15370 cat > conftest.$ac_ext <<EOF
15371 #line 15372 "configure"
15372 #include "confdefs.h"
15373 /* Override any gcc2 internal prototype to avoid an error.  */
15374 /* We use char because int might match the return type of a gcc2
15375     builtin and then its argument prototype would still apply.  */
15376 char setproctitle();
15377
15378 int main() {
15379 setproctitle()
15380 ; return 0; }
15381 EOF
15382 if { (eval echo configure:15383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15383   rm -rf conftest*
15384   eval "ac_cv_lib_$ac_lib_var=yes"
15385 else
15386   echo "configure: failed program was:" >&5
15387   cat conftest.$ac_ext >&5
15388   rm -rf conftest*
15389   eval "ac_cv_lib_$ac_lib_var=no"
15390 fi
15391 rm -f conftest*
15392 LIBS="$ac_save_LIBS"
15393
15394 fi
15395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15396   echo "$ac_t""yes" 1>&6
15397   have_setproctitle=yes
15398                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
15399 else
15400   echo "$ac_t""no" 1>&6
15401 have_setproctitle=no
15402                         LIBOBJS="$LIBOBJS setproctitle.o"
15403                         LIBSRCS="$LIBSRCS setproctitle.c"
15404 fi
15405
15406 fi
15407
15408
15409         if test $have_setproctitle = yes ; then
15410                 cat >> confdefs.h <<\EOF
15411 #define HAVE_SETPROCTITLE 1
15412 EOF
15413
15414         fi
15415 fi
15416
15417 if test $ol_enable_slp != no ; then
15418         for ac_hdr in slp.h 
15419 do
15420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15422 echo "configure:15423: checking for $ac_hdr" >&5
15423 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15424   echo $ac_n "(cached) $ac_c" 1>&6
15425 else
15426   cat > conftest.$ac_ext <<EOF
15427 #line 15428 "configure"
15428 #include "confdefs.h"
15429 #include <$ac_hdr>
15430 EOF
15431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15432 { (eval echo configure:15433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15434 if test -z "$ac_err"; then
15435   rm -rf conftest*
15436   eval "ac_cv_header_$ac_safe=yes"
15437 else
15438   echo "$ac_err" >&5
15439   echo "configure: failed program was:" >&5
15440   cat conftest.$ac_ext >&5
15441   rm -rf conftest*
15442   eval "ac_cv_header_$ac_safe=no"
15443 fi
15444 rm -f conftest*
15445 fi
15446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15447   echo "$ac_t""yes" 1>&6
15448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15449   cat >> confdefs.h <<EOF
15450 #define $ac_tr_hdr 1
15451 EOF
15452  
15453 else
15454   echo "$ac_t""no" 1>&6
15455 fi
15456 done
15457
15458
15459         if test $ac_cv_header_slp_h = yes ; then
15460                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
15461 echo "configure:15462: checking for SLPOpen in -lslp" >&5
15462 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
15463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15464   echo $ac_n "(cached) $ac_c" 1>&6
15465 else
15466   ac_save_LIBS="$LIBS"
15467 LIBS="-lslp  $LIBS"
15468 cat > conftest.$ac_ext <<EOF
15469 #line 15470 "configure"
15470 #include "confdefs.h"
15471 /* Override any gcc2 internal prototype to avoid an error.  */
15472 /* We use char because int might match the return type of a gcc2
15473     builtin and then its argument prototype would still apply.  */
15474 char SLPOpen();
15475
15476 int main() {
15477 SLPOpen()
15478 ; return 0; }
15479 EOF
15480 if { (eval echo configure:15481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15481   rm -rf conftest*
15482   eval "ac_cv_lib_$ac_lib_var=yes"
15483 else
15484   echo "configure: failed program was:" >&5
15485   cat conftest.$ac_ext >&5
15486   rm -rf conftest*
15487   eval "ac_cv_lib_$ac_lib_var=no"
15488 fi
15489 rm -f conftest*
15490 LIBS="$ac_save_LIBS"
15491
15492 fi
15493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15494   echo "$ac_t""yes" 1>&6
15495   have_slp=yes
15496 else
15497   echo "$ac_t""no" 1>&6
15498 have_slp=no
15499 fi
15500
15501                 if test $have_slp = yes ; then
15502                         cat >> confdefs.h <<\EOF
15503 #define HAVE_SLP 1
15504 EOF
15505
15506                         SLAPD_SLP_LIBS=-lslp
15507                 fi
15508
15509         elif test $ol_enable_slp = yes ; then
15510                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
15511         fi
15512 fi
15513
15514 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
15515 echo "configure:15516: checking for ANSI C header files" >&5
15516 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
15517   echo $ac_n "(cached) $ac_c" 1>&6
15518 else
15519   cat > conftest.$ac_ext <<EOF
15520 #line 15521 "configure"
15521 #include "confdefs.h"
15522 #include <stdlib.h>
15523 #include <stdarg.h>
15524 #include <string.h>
15525 #include <float.h>
15526 EOF
15527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15528 { (eval echo configure:15529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15530 if test -z "$ac_err"; then
15531   rm -rf conftest*
15532   ac_cv_header_stdc=yes
15533 else
15534   echo "$ac_err" >&5
15535   echo "configure: failed program was:" >&5
15536   cat conftest.$ac_ext >&5
15537   rm -rf conftest*
15538   ac_cv_header_stdc=no
15539 fi
15540 rm -f conftest*
15541
15542 if test $ac_cv_header_stdc = yes; then
15543   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15544 cat > conftest.$ac_ext <<EOF
15545 #line 15546 "configure"
15546 #include "confdefs.h"
15547 #include <string.h>
15548 EOF
15549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15550   egrep "memchr" >/dev/null 2>&1; then
15551   :
15552 else
15553   rm -rf conftest*
15554   ac_cv_header_stdc=no
15555 fi
15556 rm -f conftest*
15557
15558 fi
15559
15560 if test $ac_cv_header_stdc = yes; then
15561   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15562 cat > conftest.$ac_ext <<EOF
15563 #line 15564 "configure"
15564 #include "confdefs.h"
15565 #include <stdlib.h>
15566 EOF
15567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15568   egrep "free" >/dev/null 2>&1; then
15569   :
15570 else
15571   rm -rf conftest*
15572   ac_cv_header_stdc=no
15573 fi
15574 rm -f conftest*
15575
15576 fi
15577
15578 if test $ac_cv_header_stdc = yes; then
15579   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15580 if test "$cross_compiling" = yes; then
15581   :
15582 else
15583   cat > conftest.$ac_ext <<EOF
15584 #line 15585 "configure"
15585 #include "confdefs.h"
15586 #include <ctype.h>
15587 #if ((' ' & 0x0FF) == 0x020)
15588 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15589 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15590 #else
15591 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15592  || ('j' <= (c) && (c) <= 'r') \
15593  || ('s' <= (c) && (c) <= 'z'))
15594 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15595 #endif
15596 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15597 int main () { int i; for (i = 0; i < 256; i++)
15598 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
15599 exit (0); }
15600
15601 EOF
15602 if { (eval echo configure:15603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15603 then
15604   :
15605 else
15606   echo "configure: failed program was:" >&5
15607   cat conftest.$ac_ext >&5
15608   rm -fr conftest*
15609   ac_cv_header_stdc=no
15610 fi
15611 rm -fr conftest*
15612 fi
15613
15614 fi
15615 fi
15616
15617 echo "$ac_t""$ac_cv_header_stdc" 1>&6
15618 if test $ac_cv_header_stdc = yes; then
15619   cat >> confdefs.h <<\EOF
15620 #define STDC_HEADERS 1
15621 EOF
15622
15623 fi
15624
15625 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
15626 echo "configure:15627: checking for mode_t" >&5
15627 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
15628   echo $ac_n "(cached) $ac_c" 1>&6
15629 else
15630   cat > conftest.$ac_ext <<EOF
15631 #line 15632 "configure"
15632 #include "confdefs.h"
15633 #include <sys/types.h>
15634 #if STDC_HEADERS
15635 #include <stdlib.h>
15636 #include <stddef.h>
15637 #endif
15638
15639 EOF
15640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15641   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15642   rm -rf conftest*
15643   eval "ac_cv_type_mode_t=yes"
15644 else
15645   rm -rf conftest*
15646   eval "ac_cv_type_mode_t=no"
15647 fi
15648 rm -f conftest*
15649
15650 fi
15651 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
15652   echo "$ac_t""yes" 1>&6
15653 else
15654   echo "$ac_t""no" 1>&6
15655   cat >> confdefs.h <<EOF
15656 #define mode_t int
15657 EOF
15658
15659 fi
15660
15661 echo $ac_n "checking for off_t""... $ac_c" 1>&6
15662 echo "configure:15663: checking for off_t" >&5
15663 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
15664   echo $ac_n "(cached) $ac_c" 1>&6
15665 else
15666   cat > conftest.$ac_ext <<EOF
15667 #line 15668 "configure"
15668 #include "confdefs.h"
15669 #include <sys/types.h>
15670 #if STDC_HEADERS
15671 #include <stdlib.h>
15672 #include <stddef.h>
15673 #endif
15674
15675 EOF
15676 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15677   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15678   rm -rf conftest*
15679   eval "ac_cv_type_off_t=yes"
15680 else
15681   rm -rf conftest*
15682   eval "ac_cv_type_off_t=no"
15683 fi
15684 rm -f conftest*
15685
15686 fi
15687 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
15688   echo "$ac_t""yes" 1>&6
15689 else
15690   echo "$ac_t""no" 1>&6
15691   cat >> confdefs.h <<EOF
15692 #define off_t long
15693 EOF
15694
15695 fi
15696
15697 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
15698 echo "configure:15699: checking for pid_t" >&5
15699 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
15700   echo $ac_n "(cached) $ac_c" 1>&6
15701 else
15702   cat > conftest.$ac_ext <<EOF
15703 #line 15704 "configure"
15704 #include "confdefs.h"
15705 #include <sys/types.h>
15706 #if STDC_HEADERS
15707 #include <stdlib.h>
15708 #include <stddef.h>
15709 #endif
15710
15711 EOF
15712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15713   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15714   rm -rf conftest*
15715   eval "ac_cv_type_pid_t=yes"
15716 else
15717   rm -rf conftest*
15718   eval "ac_cv_type_pid_t=no"
15719 fi
15720 rm -f conftest*
15721
15722 fi
15723 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
15724   echo "$ac_t""yes" 1>&6
15725 else
15726   echo "$ac_t""no" 1>&6
15727   cat >> confdefs.h <<EOF
15728 #define pid_t int
15729 EOF
15730
15731 fi
15732
15733 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
15734 echo "configure:15735: checking for ptrdiff_t" >&5
15735 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
15736   echo $ac_n "(cached) $ac_c" 1>&6
15737 else
15738   cat > conftest.$ac_ext <<EOF
15739 #line 15740 "configure"
15740 #include "confdefs.h"
15741 #include <stddef.h>
15742 int main() {
15743 ptrdiff_t p
15744 ; return 0; }
15745 EOF
15746 if { (eval echo configure:15747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15747   rm -rf conftest*
15748   am_cv_type_ptrdiff_t=yes
15749 else
15750   echo "configure: failed program was:" >&5
15751   cat conftest.$ac_ext >&5
15752   rm -rf conftest*
15753   am_cv_type_ptrdiff_t=no
15754 fi
15755 rm -f conftest*
15756 fi
15757
15758 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
15759    if test $am_cv_type_ptrdiff_t = yes; then
15760      cat >> confdefs.h <<\EOF
15761 #define HAVE_PTRDIFF_T 1
15762 EOF
15763
15764    fi
15765
15766 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
15767 echo "configure:15768: checking return type of signal handlers" >&5
15768 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
15769   echo $ac_n "(cached) $ac_c" 1>&6
15770 else
15771   cat > conftest.$ac_ext <<EOF
15772 #line 15773 "configure"
15773 #include "confdefs.h"
15774 #include <sys/types.h>
15775 #include <signal.h>
15776 #ifdef signal
15777 #undef signal
15778 #endif
15779 #ifdef __cplusplus
15780 extern "C" void (*signal (int, void (*)(int)))(int);
15781 #else
15782 void (*signal ()) ();
15783 #endif
15784
15785 int main() {
15786 int i;
15787 ; return 0; }
15788 EOF
15789 if { (eval echo configure:15790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15790   rm -rf conftest*
15791   ac_cv_type_signal=void
15792 else
15793   echo "configure: failed program was:" >&5
15794   cat conftest.$ac_ext >&5
15795   rm -rf conftest*
15796   ac_cv_type_signal=int
15797 fi
15798 rm -f conftest*
15799 fi
15800
15801 echo "$ac_t""$ac_cv_type_signal" 1>&6
15802 cat >> confdefs.h <<EOF
15803 #define RETSIGTYPE $ac_cv_type_signal
15804 EOF
15805
15806
15807 echo $ac_n "checking for size_t""... $ac_c" 1>&6
15808 echo "configure:15809: checking for size_t" >&5
15809 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
15810   echo $ac_n "(cached) $ac_c" 1>&6
15811 else
15812   cat > conftest.$ac_ext <<EOF
15813 #line 15814 "configure"
15814 #include "confdefs.h"
15815 #include <sys/types.h>
15816 #if STDC_HEADERS
15817 #include <stdlib.h>
15818 #include <stddef.h>
15819 #endif
15820
15821 EOF
15822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15823   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15824   rm -rf conftest*
15825   eval "ac_cv_type_size_t=yes"
15826 else
15827   rm -rf conftest*
15828   eval "ac_cv_type_size_t=no"
15829 fi
15830 rm -f conftest*
15831
15832 fi
15833 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
15834   echo "$ac_t""yes" 1>&6
15835 else
15836   echo "$ac_t""no" 1>&6
15837   cat >> confdefs.h <<EOF
15838 #define size_t unsigned
15839 EOF
15840
15841 fi
15842
15843
15844 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
15845 echo "configure:15846: checking for ssize_t" >&5
15846 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
15847   echo $ac_n "(cached) $ac_c" 1>&6
15848 else
15849   cat > conftest.$ac_ext <<EOF
15850 #line 15851 "configure"
15851 #include "confdefs.h"
15852 #include <sys/types.h>
15853 #if STDC_HEADERS
15854 #include <stdlib.h>
15855 #include <stddef.h>
15856 #endif
15857
15858 EOF
15859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15860   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15861   rm -rf conftest*
15862   eval "ac_cv_type_ssize_t=yes"
15863 else
15864   rm -rf conftest*
15865   eval "ac_cv_type_ssize_t=no"
15866 fi
15867 rm -f conftest*
15868
15869 fi
15870 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
15871   echo "$ac_t""yes" 1>&6
15872 else
15873   echo "$ac_t""no" 1>&6
15874   cat >> confdefs.h <<EOF
15875 #define ssize_t signed int
15876 EOF
15877
15878 fi
15879
15880 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
15881 echo "configure:15882: checking for caddr_t" >&5
15882 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
15883   echo $ac_n "(cached) $ac_c" 1>&6
15884 else
15885   cat > conftest.$ac_ext <<EOF
15886 #line 15887 "configure"
15887 #include "confdefs.h"
15888 #include <sys/types.h>
15889 #if STDC_HEADERS
15890 #include <stdlib.h>
15891 #include <stddef.h>
15892 #endif
15893
15894 EOF
15895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15896   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15897   rm -rf conftest*
15898   eval "ac_cv_type_caddr_t=yes"
15899 else
15900   rm -rf conftest*
15901   eval "ac_cv_type_caddr_t=no"
15902 fi
15903 rm -f conftest*
15904
15905 fi
15906 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
15907   echo "$ac_t""yes" 1>&6
15908 else
15909   echo "$ac_t""no" 1>&6
15910   cat >> confdefs.h <<EOF
15911 #define caddr_t char *
15912 EOF
15913
15914 fi
15915
15916
15917 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
15918 echo "configure:15919: checking for socklen_t" >&5
15919 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
15920   echo $ac_n "(cached) $ac_c" 1>&6
15921 else
15922   cat > conftest.$ac_ext <<EOF
15923 #line 15924 "configure"
15924 #include "confdefs.h"
15925
15926 #ifdef HAVE_SYS_TYPES_H
15927 #include <sys/types.h>
15928 #endif
15929 #ifdef HAVE_SYS_SOCKET_H
15930 #include <sys/socket.h>
15931 #endif
15932
15933 int main() {
15934 socklen_t len;
15935 ; return 0; }
15936 EOF
15937 if { (eval echo configure:15938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15938   rm -rf conftest*
15939   ol_cv_type_socklen_t=yes
15940 else
15941   echo "configure: failed program was:" >&5
15942   cat conftest.$ac_ext >&5
15943   rm -rf conftest*
15944   ol_cv_type_socklen_t=no
15945 fi
15946 rm -f conftest*
15947 fi
15948
15949 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
15950   if test $ol_cv_type_socklen_t = no; then
15951     cat >> confdefs.h <<\EOF
15952 #define socklen_t int
15953 EOF
15954
15955   fi
15956  
15957 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
15958 echo "configure:15959: checking for member st_blksize in aggregate type struct stat" >&5
15959 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
15960   echo $ac_n "(cached) $ac_c" 1>&6
15961 else
15962   cat > conftest.$ac_ext <<EOF
15963 #line 15964 "configure"
15964 #include "confdefs.h"
15965 #include <sys/types.h>
15966 #include <sys/stat.h>
15967 int main() {
15968 struct stat foo; foo.st_blksize;
15969 ; return 0; }
15970 EOF
15971 if { (eval echo configure:15972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15972   rm -rf conftest*
15973   ac_cv_c_struct_member_st_blksize=yes
15974 else
15975   echo "configure: failed program was:" >&5
15976   cat conftest.$ac_ext >&5
15977   rm -rf conftest*
15978   ac_cv_c_struct_member_st_blksize=no
15979 fi
15980 rm -f conftest*
15981 fi
15982
15983 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
15984 st_blksize="$ac_cv_c_struct_member_st_blksize"
15985 if test $ac_cv_c_struct_member_st_blksize = yes; then
15986   cat >> confdefs.h <<\EOF
15987 #define HAVE_ST_BLKSIZE 1
15988 EOF
15989
15990 fi
15991
15992 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
15993 echo "configure:15994: checking whether time.h and sys/time.h may both be included" >&5
15994 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
15995   echo $ac_n "(cached) $ac_c" 1>&6
15996 else
15997   cat > conftest.$ac_ext <<EOF
15998 #line 15999 "configure"
15999 #include "confdefs.h"
16000 #include <sys/types.h>
16001 #include <sys/time.h>
16002 #include <time.h>
16003 int main() {
16004 struct tm *tp;
16005 ; return 0; }
16006 EOF
16007 if { (eval echo configure:16008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16008   rm -rf conftest*
16009   ac_cv_header_time=yes
16010 else
16011   echo "configure: failed program was:" >&5
16012   cat conftest.$ac_ext >&5
16013   rm -rf conftest*
16014   ac_cv_header_time=no
16015 fi
16016 rm -f conftest*
16017 fi
16018
16019 echo "$ac_t""$ac_cv_header_time" 1>&6
16020 if test $ac_cv_header_time = yes; then
16021   cat >> confdefs.h <<\EOF
16022 #define TIME_WITH_SYS_TIME 1
16023 EOF
16024
16025 fi
16026
16027 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
16028 echo "configure:16029: checking whether struct tm is in sys/time.h or time.h" >&5
16029 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
16030   echo $ac_n "(cached) $ac_c" 1>&6
16031 else
16032   cat > conftest.$ac_ext <<EOF
16033 #line 16034 "configure"
16034 #include "confdefs.h"
16035 #include <sys/types.h>
16036 #include <time.h>
16037 int main() {
16038 struct tm *tp; tp->tm_sec;
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   ac_cv_struct_tm=time.h
16044 else
16045   echo "configure: failed program was:" >&5
16046   cat conftest.$ac_ext >&5
16047   rm -rf conftest*
16048   ac_cv_struct_tm=sys/time.h
16049 fi
16050 rm -f conftest*
16051 fi
16052
16053 echo "$ac_t""$ac_cv_struct_tm" 1>&6
16054 if test $ac_cv_struct_tm = sys/time.h; then
16055   cat >> confdefs.h <<\EOF
16056 #define TM_IN_SYS_TIME 1
16057 EOF
16058
16059 fi
16060
16061 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
16062 echo "configure:16063: checking for uid_t in sys/types.h" >&5
16063 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
16064   echo $ac_n "(cached) $ac_c" 1>&6
16065 else
16066   cat > conftest.$ac_ext <<EOF
16067 #line 16068 "configure"
16068 #include "confdefs.h"
16069 #include <sys/types.h>
16070 EOF
16071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16072   egrep "uid_t" >/dev/null 2>&1; then
16073   rm -rf conftest*
16074   ac_cv_type_uid_t=yes
16075 else
16076   rm -rf conftest*
16077   ac_cv_type_uid_t=no
16078 fi
16079 rm -f conftest*
16080
16081 fi
16082
16083 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
16084 if test $ac_cv_type_uid_t = no; then
16085   cat >> confdefs.h <<\EOF
16086 #define uid_t int
16087 EOF
16088
16089   cat >> confdefs.h <<\EOF
16090 #define gid_t int
16091 EOF
16092
16093 fi
16094
16095 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
16096 echo "configure:16097: checking for sig_atomic_t" >&5
16097 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
16098   echo $ac_n "(cached) $ac_c" 1>&6
16099 else
16100   cat > conftest.$ac_ext <<EOF
16101 #line 16102 "configure"
16102 #include "confdefs.h"
16103 #include <signal.h>
16104 int main() {
16105 sig_atomic_t atomic;
16106 ; return 0; }
16107 EOF
16108 if { (eval echo configure:16109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16109   rm -rf conftest*
16110   ol_cv_type_sig_atomic_t=yes
16111 else
16112   echo "configure: failed program was:" >&5
16113   cat conftest.$ac_ext >&5
16114   rm -rf conftest*
16115   ol_cv_type_sig_atomic_t=no
16116 fi
16117 rm -f conftest*
16118 fi
16119
16120 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
16121   if test $ol_cv_type_sig_atomic_t = no; then
16122     cat >> confdefs.h <<\EOF
16123 #define sig_atomic_t int
16124 EOF
16125
16126   fi
16127  
16128
16129
16130 # test for pw_gecos in struct passwd
16131 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
16132 echo "configure:16133: checking struct passwd for pw_gecos" >&5
16133 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
16134   echo $ac_n "(cached) $ac_c" 1>&6
16135 else
16136   
16137         cat > conftest.$ac_ext <<EOF
16138 #line 16139 "configure"
16139 #include "confdefs.h"
16140 #include <pwd.h>
16141 int main() {
16142
16143         struct passwd pwd;
16144         pwd.pw_gecos = pwd.pw_name;
16145
16146 ; return 0; }
16147 EOF
16148 if { (eval echo configure:16149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16149   rm -rf conftest*
16150   ol_cv_struct_passwd_pw_gecos=yes
16151 else
16152   echo "configure: failed program was:" >&5
16153   cat conftest.$ac_ext >&5
16154   rm -rf conftest*
16155   ol_cv_struct_passwd_pw_gecos=no
16156 fi
16157 rm -f conftest*
16158 fi
16159
16160 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
16161 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
16162         cat >> confdefs.h <<\EOF
16163 #define HAVE_PW_GECOS 1
16164 EOF
16165
16166 fi
16167
16168 # test for pw_passwd in struct passwd
16169 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
16170 echo "configure:16171: checking struct passwd for pw_passwd" >&5
16171 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
16172   echo $ac_n "(cached) $ac_c" 1>&6
16173 else
16174   
16175         cat > conftest.$ac_ext <<EOF
16176 #line 16177 "configure"
16177 #include "confdefs.h"
16178 #include <pwd.h>
16179 int main() {
16180
16181         struct passwd pwd;
16182         pwd.pw_passwd = pwd.pw_name;
16183
16184 ; return 0; }
16185 EOF
16186 if { (eval echo configure:16187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16187   rm -rf conftest*
16188   ol_cv_struct_passwd_pw_passwd=yes
16189 else
16190   echo "configure: failed program was:" >&5
16191   cat conftest.$ac_ext >&5
16192   rm -rf conftest*
16193   ol_cv_struct_passwd_pw_passwd=no
16194 fi
16195 rm -f conftest*
16196 fi
16197
16198 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
16199 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
16200         cat >> confdefs.h <<\EOF
16201 #define HAVE_PW_PASSWD 1
16202 EOF
16203
16204 fi
16205
16206
16207 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
16208 echo "configure:16209: checking if toupper() requires islower()" >&5
16209 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
16210   echo $ac_n "(cached) $ac_c" 1>&6
16211 else
16212   
16213         if test "$cross_compiling" = yes; then
16214   ol_cv_c_upper_lower=safe
16215 else
16216   cat > conftest.$ac_ext <<EOF
16217 #line 16218 "configure"
16218 #include "confdefs.h"
16219
16220 #include <ctype.h>
16221 main()
16222 {
16223         if ('C' == toupper('C'))
16224                 exit(0);
16225         else
16226                 exit(1);
16227 }
16228 EOF
16229 if { (eval echo configure:16230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16230 then
16231   ol_cv_c_upper_lower=no
16232 else
16233   echo "configure: failed program was:" >&5
16234   cat conftest.$ac_ext >&5
16235   rm -fr conftest*
16236   ol_cv_c_upper_lower=yes
16237 fi
16238 rm -fr conftest*
16239 fi
16240
16241 fi
16242
16243 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
16244 if test $ol_cv_c_upper_lower != no ; then
16245         cat >> confdefs.h <<\EOF
16246 #define C_UPPER_LOWER 1
16247 EOF
16248
16249 fi
16250
16251 echo $ac_n "checking for working const""... $ac_c" 1>&6
16252 echo "configure:16253: checking for working const" >&5
16253 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
16254   echo $ac_n "(cached) $ac_c" 1>&6
16255 else
16256   cat > conftest.$ac_ext <<EOF
16257 #line 16258 "configure"
16258 #include "confdefs.h"
16259
16260 int main() {
16261
16262 /* Ultrix mips cc rejects this.  */
16263 typedef int charset[2]; const charset x;
16264 /* SunOS 4.1.1 cc rejects this.  */
16265 char const *const *ccp;
16266 char **p;
16267 /* NEC SVR4.0.2 mips cc rejects this.  */
16268 struct point {int x, y;};
16269 static struct point const zero = {0,0};
16270 /* AIX XL C 1.02.0.0 rejects this.
16271    It does not let you subtract one const X* pointer from another in an arm
16272    of an if-expression whose if-part is not a constant expression */
16273 const char *g = "string";
16274 ccp = &g + (g ? g-g : 0);
16275 /* HPUX 7.0 cc rejects these. */
16276 ++ccp;
16277 p = (char**) ccp;
16278 ccp = (char const *const *) p;
16279 { /* SCO 3.2v4 cc rejects this.  */
16280   char *t;
16281   char const *s = 0 ? (char *) 0 : (char const *) 0;
16282
16283   *t++ = 0;
16284 }
16285 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16286   int x[] = {25, 17};
16287   const int *foo = &x[0];
16288   ++foo;
16289 }
16290 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16291   typedef const int *iptr;
16292   iptr p = 0;
16293   ++p;
16294 }
16295 { /* AIX XL C 1.02.0.0 rejects this saying
16296      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16297   struct s { int j; const int *ap[3]; };
16298   struct s *b; b->j = 5;
16299 }
16300 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16301   const int foo = 10;
16302 }
16303
16304 ; return 0; }
16305 EOF
16306 if { (eval echo configure:16307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16307   rm -rf conftest*
16308   ac_cv_c_const=yes
16309 else
16310   echo "configure: failed program was:" >&5
16311   cat conftest.$ac_ext >&5
16312   rm -rf conftest*
16313   ac_cv_c_const=no
16314 fi
16315 rm -f conftest*
16316 fi
16317
16318 echo "$ac_t""$ac_cv_c_const" 1>&6
16319 if test $ac_cv_c_const = no; then
16320   cat >> confdefs.h <<\EOF
16321 #define const 
16322 EOF
16323
16324 fi
16325
16326 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
16327 echo "configure:16328: checking if compiler understands volatile" >&5
16328 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
16329   echo $ac_n "(cached) $ac_c" 1>&6
16330 else
16331   cat > conftest.$ac_ext <<EOF
16332 #line 16333 "configure"
16333 #include "confdefs.h"
16334 int x, y, z;
16335 int main() {
16336 volatile int a; int * volatile b = x ? &y : &z;
16337       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
16338       *b = 0;
16339 ; return 0; }
16340 EOF
16341 if { (eval echo configure:16342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16342   rm -rf conftest*
16343   ol_cv_c_volatile=yes
16344 else
16345   echo "configure: failed program was:" >&5
16346   cat conftest.$ac_ext >&5
16347   rm -rf conftest*
16348   ol_cv_c_volatile=no
16349 fi
16350 rm -f conftest*
16351 fi
16352
16353 echo "$ac_t""$ol_cv_c_volatile" 1>&6
16354   if test $ol_cv_c_volatile = yes; then
16355     : 
16356   else
16357     cat >> confdefs.h <<\EOF
16358 #define volatile 
16359 EOF
16360
16361   fi
16362  
16363
16364 if test $cross_compiling = yes ; then
16365         cat >> confdefs.h <<\EOF
16366 #define CROSS_COMPILING 1
16367 EOF
16368
16369 else
16370         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
16371 echo "configure:16372: checking whether byte ordering is bigendian" >&5
16372 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
16373   echo $ac_n "(cached) $ac_c" 1>&6
16374 else
16375   ac_cv_c_bigendian=unknown
16376 # See if sys/param.h defines the BYTE_ORDER macro.
16377 cat > conftest.$ac_ext <<EOF
16378 #line 16379 "configure"
16379 #include "confdefs.h"
16380 #include <sys/types.h>
16381 #include <sys/param.h>
16382 int main() {
16383
16384 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16385  bogus endian macros
16386 #endif
16387 ; return 0; }
16388 EOF
16389 if { (eval echo configure:16390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16390   rm -rf conftest*
16391   # It does; now see whether it defined to BIG_ENDIAN or not.
16392 cat > conftest.$ac_ext <<EOF
16393 #line 16394 "configure"
16394 #include "confdefs.h"
16395 #include <sys/types.h>
16396 #include <sys/param.h>
16397 int main() {
16398
16399 #if BYTE_ORDER != BIG_ENDIAN
16400  not big endian
16401 #endif
16402 ; return 0; }
16403 EOF
16404 if { (eval echo configure:16405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16405   rm -rf conftest*
16406   ac_cv_c_bigendian=yes
16407 else
16408   echo "configure: failed program was:" >&5
16409   cat conftest.$ac_ext >&5
16410   rm -rf conftest*
16411   ac_cv_c_bigendian=no
16412 fi
16413 rm -f conftest*
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417 fi
16418 rm -f conftest*
16419 if test $ac_cv_c_bigendian = unknown; then
16420 if test "$cross_compiling" = yes; then
16421     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
16422 else
16423   cat > conftest.$ac_ext <<EOF
16424 #line 16425 "configure"
16425 #include "confdefs.h"
16426 main () {
16427   /* Are we little or big endian?  From Harbison&Steele.  */
16428   union
16429   {
16430     long l;
16431     char c[sizeof (long)];
16432   } u;
16433   u.l = 1;
16434   exit (u.c[sizeof (long) - 1] == 1);
16435 }
16436 EOF
16437 if { (eval echo configure:16438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16438 then
16439   ac_cv_c_bigendian=no
16440 else
16441   echo "configure: failed program was:" >&5
16442   cat conftest.$ac_ext >&5
16443   rm -fr conftest*
16444   ac_cv_c_bigendian=yes
16445 fi
16446 rm -fr conftest*
16447 fi
16448
16449 fi
16450 fi
16451
16452 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
16453 if test $ac_cv_c_bigendian = yes; then
16454   cat >> confdefs.h <<\EOF
16455 #define WORDS_BIGENDIAN 1
16456 EOF
16457
16458 fi
16459
16460 fi
16461
16462 echo $ac_n "checking size of short""... $ac_c" 1>&6
16463 echo "configure:16464: checking size of short" >&5 
16464 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
16465   echo $ac_n "(cached) $ac_c" 1>&6
16466 else
16467   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16468   cat > conftest.$ac_ext <<EOF
16469 #line 16470 "configure"
16470 #include "confdefs.h"
16471 #include "confdefs.h" 
16472 #include <sys/types.h> 
16473  
16474
16475 int main() {
16476 switch (0) case 0: case (sizeof (short) == $ac_size):;
16477 ; return 0; }
16478 EOF
16479 if { (eval echo configure:16480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16480   rm -rf conftest*
16481   ac_cv_sizeof_short=$ac_size
16482 else
16483   echo "configure: failed program was:" >&5
16484   cat conftest.$ac_ext >&5
16485 fi
16486 rm -f conftest* 
16487   if test x$ac_cv_sizeof_short != x ; then break; fi 
16488 done 
16489
16490 fi
16491  
16492 if test x$ac_cv_sizeof_short = x ; then 
16493   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
16494 fi 
16495 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
16496 cat >> confdefs.h <<EOF
16497 #define SIZEOF_SHORT $ac_cv_sizeof_short
16498 EOF
16499  
16500  
16501 echo $ac_n "checking size of int""... $ac_c" 1>&6
16502 echo "configure:16503: checking size of int" >&5 
16503 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
16504   echo $ac_n "(cached) $ac_c" 1>&6
16505 else
16506   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16507   cat > conftest.$ac_ext <<EOF
16508 #line 16509 "configure"
16509 #include "confdefs.h"
16510 #include "confdefs.h" 
16511 #include <sys/types.h> 
16512  
16513
16514 int main() {
16515 switch (0) case 0: case (sizeof (int) == $ac_size):;
16516 ; return 0; }
16517 EOF
16518 if { (eval echo configure:16519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16519   rm -rf conftest*
16520   ac_cv_sizeof_int=$ac_size
16521 else
16522   echo "configure: failed program was:" >&5
16523   cat conftest.$ac_ext >&5
16524 fi
16525 rm -f conftest* 
16526   if test x$ac_cv_sizeof_int != x ; then break; fi 
16527 done 
16528
16529 fi
16530  
16531 if test x$ac_cv_sizeof_int = x ; then 
16532   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
16533 fi 
16534 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
16535 cat >> confdefs.h <<EOF
16536 #define SIZEOF_INT $ac_cv_sizeof_int
16537 EOF
16538  
16539  
16540 echo $ac_n "checking size of long""... $ac_c" 1>&6
16541 echo "configure:16542: checking size of long" >&5 
16542 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
16543   echo $ac_n "(cached) $ac_c" 1>&6
16544 else
16545   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16546   cat > conftest.$ac_ext <<EOF
16547 #line 16548 "configure"
16548 #include "confdefs.h"
16549 #include "confdefs.h" 
16550 #include <sys/types.h> 
16551  
16552
16553 int main() {
16554 switch (0) case 0: case (sizeof (long) == $ac_size):;
16555 ; return 0; }
16556 EOF
16557 if { (eval echo configure:16558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16558   rm -rf conftest*
16559   ac_cv_sizeof_long=$ac_size
16560 else
16561   echo "configure: failed program was:" >&5
16562   cat conftest.$ac_ext >&5
16563 fi
16564 rm -f conftest* 
16565   if test x$ac_cv_sizeof_long != x ; then break; fi 
16566 done 
16567
16568 fi
16569  
16570 if test x$ac_cv_sizeof_long = x ; then 
16571   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
16572 fi 
16573 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
16574 cat >> confdefs.h <<EOF
16575 #define SIZEOF_LONG $ac_cv_sizeof_long
16576 EOF
16577  
16578
16579
16580 if test "$ac_cv_sizeof_int" -lt 4 ; then
16581         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
16582
16583         cat >> confdefs.h <<\EOF
16584 #define LBER_INT_T long
16585 EOF
16586
16587 else
16588         cat >> confdefs.h <<\EOF
16589 #define LBER_INT_T int
16590 EOF
16591
16592 fi
16593
16594 cat >> confdefs.h <<\EOF
16595 #define LBER_LEN_T long
16596 EOF
16597
16598 cat >> confdefs.h <<\EOF
16599 #define LBER_SOCKET_T int
16600 EOF
16601
16602 cat >> confdefs.h <<\EOF
16603 #define LBER_TAG_T long
16604 EOF
16605
16606
16607 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
16608 echo "configure:16609: checking for 8-bit clean memcmp" >&5
16609 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
16610   echo $ac_n "(cached) $ac_c" 1>&6
16611 else
16612   if test "$cross_compiling" = yes; then
16613   ac_cv_func_memcmp_clean=no
16614 else
16615   cat > conftest.$ac_ext <<EOF
16616 #line 16617 "configure"
16617 #include "confdefs.h"
16618
16619 main()
16620 {
16621   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
16622   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
16623 }
16624
16625 EOF
16626 if { (eval echo configure:16627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16627 then
16628   ac_cv_func_memcmp_clean=yes
16629 else
16630   echo "configure: failed program was:" >&5
16631   cat conftest.$ac_ext >&5
16632   rm -fr conftest*
16633   ac_cv_func_memcmp_clean=no
16634 fi
16635 rm -fr conftest*
16636 fi
16637
16638 fi
16639
16640 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
16641 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
16642
16643 echo $ac_n "checking for strftime""... $ac_c" 1>&6
16644 echo "configure:16645: checking for strftime" >&5
16645 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
16646   echo $ac_n "(cached) $ac_c" 1>&6
16647 else
16648   cat > conftest.$ac_ext <<EOF
16649 #line 16650 "configure"
16650 #include "confdefs.h"
16651 /* System header to define __stub macros and hopefully few prototypes,
16652     which can conflict with char strftime(); below.  */
16653 #include <assert.h>
16654 /* Override any gcc2 internal prototype to avoid an error.  */
16655 /* We use char because int might match the return type of a gcc2
16656     builtin and then its argument prototype would still apply.  */
16657 char strftime();
16658 char (*f)();
16659
16660 int main() {
16661
16662 /* The GNU C library defines this for functions which it implements
16663     to always fail with ENOSYS.  Some functions are actually named
16664     something starting with __ and the normal name is an alias.  */
16665 #if defined (__stub_strftime) || defined (__stub___strftime)
16666 choke me
16667 #else
16668 f = strftime;
16669 #endif
16670
16671 ; return 0; }
16672 EOF
16673 if { (eval echo configure:16674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16674   rm -rf conftest*
16675   eval "ac_cv_func_strftime=yes"
16676 else
16677   echo "configure: failed program was:" >&5
16678   cat conftest.$ac_ext >&5
16679   rm -rf conftest*
16680   eval "ac_cv_func_strftime=no"
16681 fi
16682 rm -f conftest*
16683 fi
16684
16685 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
16686   echo "$ac_t""yes" 1>&6
16687   cat >> confdefs.h <<\EOF
16688 #define HAVE_STRFTIME 1
16689 EOF
16690
16691 else
16692   echo "$ac_t""no" 1>&6
16693 # strftime is in -lintl on SCO UNIX.
16694 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
16695 echo "configure:16696: checking for strftime in -lintl" >&5
16696 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
16697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16698   echo $ac_n "(cached) $ac_c" 1>&6
16699 else
16700   ac_save_LIBS="$LIBS"
16701 LIBS="-lintl  $LIBS"
16702 cat > conftest.$ac_ext <<EOF
16703 #line 16704 "configure"
16704 #include "confdefs.h"
16705 /* Override any gcc2 internal prototype to avoid an error.  */
16706 /* We use char because int might match the return type of a gcc2
16707     builtin and then its argument prototype would still apply.  */
16708 char strftime();
16709
16710 int main() {
16711 strftime()
16712 ; return 0; }
16713 EOF
16714 if { (eval echo configure:16715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16715   rm -rf conftest*
16716   eval "ac_cv_lib_$ac_lib_var=yes"
16717 else
16718   echo "configure: failed program was:" >&5
16719   cat conftest.$ac_ext >&5
16720   rm -rf conftest*
16721   eval "ac_cv_lib_$ac_lib_var=no"
16722 fi
16723 rm -f conftest*
16724 LIBS="$ac_save_LIBS"
16725
16726 fi
16727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16728   echo "$ac_t""yes" 1>&6
16729   cat >> confdefs.h <<\EOF
16730 #define HAVE_STRFTIME 1
16731 EOF
16732
16733 LIBS="-lintl $LIBS"
16734 else
16735   echo "$ac_t""no" 1>&6
16736 fi
16737
16738 fi
16739
16740
16741 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
16742 echo "configure:16743: checking for inet_aton()" >&5
16743 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
16744   echo $ac_n "(cached) $ac_c" 1>&6
16745 else
16746   cat > conftest.$ac_ext <<EOF
16747 #line 16748 "configure"
16748 #include "confdefs.h"
16749
16750 #ifdef HAVE_SYS_TYPES_H
16751 #       include <sys/types.h>
16752 #endif
16753 #ifdef HAVE_SYS_SOCKET_H
16754 #       include <sys/socket.h>
16755 #       ifdef HAVE_SYS_SELECT_H
16756 #               include <sys/select.h>
16757 #       endif
16758 #       include <netinet/in.h>
16759 #       ifdef HAVE_ARPA_INET_H
16760 #               include <arpa/inet.h>
16761 #       endif
16762 #endif
16763
16764 int main() {
16765 struct in_addr in;
16766 int rc = inet_aton( "255.255.255.255", &in );
16767 ; return 0; }
16768 EOF
16769 if { (eval echo configure:16770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16770   rm -rf conftest*
16771   ol_cv_func_inet_aton=yes
16772 else
16773   echo "configure: failed program was:" >&5
16774   cat conftest.$ac_ext >&5
16775   rm -rf conftest*
16776   ol_cv_func_inet_aton=no
16777 fi
16778 rm -f conftest*
16779 fi
16780
16781 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
16782   if test $ol_cv_func_inet_aton != no; then
16783     cat >> confdefs.h <<\EOF
16784 #define HAVE_INET_ATON 1
16785 EOF
16786
16787   fi
16788  
16789
16790 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
16791 echo "configure:16792: checking for _spawnlp" >&5
16792 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
16793   echo $ac_n "(cached) $ac_c" 1>&6
16794 else
16795   cat > conftest.$ac_ext <<EOF
16796 #line 16797 "configure"
16797 #include "confdefs.h"
16798 /* System header to define __stub macros and hopefully few prototypes,
16799     which can conflict with char _spawnlp(); below.  */
16800 #include <assert.h>
16801 /* Override any gcc2 internal prototype to avoid an error.  */
16802 /* We use char because int might match the return type of a gcc2
16803     builtin and then its argument prototype would still apply.  */
16804 char _spawnlp();
16805 char (*f)();
16806
16807 int main() {
16808
16809 /* The GNU C library defines this for functions which it implements
16810     to always fail with ENOSYS.  Some functions are actually named
16811     something starting with __ and the normal name is an alias.  */
16812 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
16813 choke me
16814 #else
16815 f = _spawnlp;
16816 #endif
16817
16818 ; return 0; }
16819 EOF
16820 if { (eval echo configure:16821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16821   rm -rf conftest*
16822   eval "ac_cv_func__spawnlp=yes"
16823 else
16824   echo "configure: failed program was:" >&5
16825   cat conftest.$ac_ext >&5
16826   rm -rf conftest*
16827   eval "ac_cv_func__spawnlp=no"
16828 fi
16829 rm -f conftest*
16830 fi
16831
16832 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
16833   echo "$ac_t""yes" 1>&6
16834   cat >> confdefs.h <<\EOF
16835 #define HAVE_SPAWNLP 1
16836 EOF
16837
16838 else
16839   echo "$ac_t""no" 1>&6
16840 fi
16841
16842
16843 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
16844 echo "configure:16845: checking for _snprintf" >&5
16845 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
16846   echo $ac_n "(cached) $ac_c" 1>&6
16847 else
16848   cat > conftest.$ac_ext <<EOF
16849 #line 16850 "configure"
16850 #include "confdefs.h"
16851 /* System header to define __stub macros and hopefully few prototypes,
16852     which can conflict with char _snprintf(); below.  */
16853 #include <assert.h>
16854 /* Override any gcc2 internal prototype to avoid an error.  */
16855 /* We use char because int might match the return type of a gcc2
16856     builtin and then its argument prototype would still apply.  */
16857 char _snprintf();
16858 char (*f)();
16859
16860 int main() {
16861
16862 /* The GNU C library defines this for functions which it implements
16863     to always fail with ENOSYS.  Some functions are actually named
16864     something starting with __ and the normal name is an alias.  */
16865 #if defined (__stub__snprintf) || defined (__stub____snprintf)
16866 choke me
16867 #else
16868 f = _snprintf;
16869 #endif
16870
16871 ; return 0; }
16872 EOF
16873 if { (eval echo configure:16874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16874   rm -rf conftest*
16875   eval "ac_cv_func__snprintf=yes"
16876 else
16877   echo "configure: failed program was:" >&5
16878   cat conftest.$ac_ext >&5
16879   rm -rf conftest*
16880   eval "ac_cv_func__snprintf=no"
16881 fi
16882 rm -f conftest*
16883 fi
16884
16885 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
16886   echo "$ac_t""yes" 1>&6
16887   ac_cv_func_snprintf=yes
16888         cat >> confdefs.h <<\EOF
16889 #define snprintf _snprintf
16890 EOF
16891
16892
16893 else
16894   echo "$ac_t""no" 1>&6
16895 fi
16896
16897
16898 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
16899 echo "configure:16900: checking for _vsnprintf" >&5
16900 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
16901   echo $ac_n "(cached) $ac_c" 1>&6
16902 else
16903   cat > conftest.$ac_ext <<EOF
16904 #line 16905 "configure"
16905 #include "confdefs.h"
16906 /* System header to define __stub macros and hopefully few prototypes,
16907     which can conflict with char _vsnprintf(); below.  */
16908 #include <assert.h>
16909 /* Override any gcc2 internal prototype to avoid an error.  */
16910 /* We use char because int might match the return type of a gcc2
16911     builtin and then its argument prototype would still apply.  */
16912 char _vsnprintf();
16913 char (*f)();
16914
16915 int main() {
16916
16917 /* The GNU C library defines this for functions which it implements
16918     to always fail with ENOSYS.  Some functions are actually named
16919     something starting with __ and the normal name is an alias.  */
16920 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
16921 choke me
16922 #else
16923 f = _vsnprintf;
16924 #endif
16925
16926 ; return 0; }
16927 EOF
16928 if { (eval echo configure:16929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16929   rm -rf conftest*
16930   eval "ac_cv_func__vsnprintf=yes"
16931 else
16932   echo "configure: failed program was:" >&5
16933   cat conftest.$ac_ext >&5
16934   rm -rf conftest*
16935   eval "ac_cv_func__vsnprintf=no"
16936 fi
16937 rm -f conftest*
16938 fi
16939
16940 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
16941   echo "$ac_t""yes" 1>&6
16942   ac_cv_func_vsnprintf=yes
16943         cat >> confdefs.h <<\EOF
16944 #define vsnprintf _vsnprintf
16945 EOF
16946
16947
16948 else
16949   echo "$ac_t""no" 1>&6
16950 fi
16951
16952
16953 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
16954 echo "configure:16955: checking for vprintf" >&5
16955 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
16956   echo $ac_n "(cached) $ac_c" 1>&6
16957 else
16958   cat > conftest.$ac_ext <<EOF
16959 #line 16960 "configure"
16960 #include "confdefs.h"
16961 /* System header to define __stub macros and hopefully few prototypes,
16962     which can conflict with char vprintf(); below.  */
16963 #include <assert.h>
16964 /* Override any gcc2 internal prototype to avoid an error.  */
16965 /* We use char because int might match the return type of a gcc2
16966     builtin and then its argument prototype would still apply.  */
16967 char vprintf();
16968 char (*f)();
16969
16970 int main() {
16971
16972 /* The GNU C library defines this for functions which it implements
16973     to always fail with ENOSYS.  Some functions are actually named
16974     something starting with __ and the normal name is an alias.  */
16975 #if defined (__stub_vprintf) || defined (__stub___vprintf)
16976 choke me
16977 #else
16978 f = vprintf;
16979 #endif
16980
16981 ; return 0; }
16982 EOF
16983 if { (eval echo configure:16984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16984   rm -rf conftest*
16985   eval "ac_cv_func_vprintf=yes"
16986 else
16987   echo "configure: failed program was:" >&5
16988   cat conftest.$ac_ext >&5
16989   rm -rf conftest*
16990   eval "ac_cv_func_vprintf=no"
16991 fi
16992 rm -f conftest*
16993 fi
16994
16995 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
16996   echo "$ac_t""yes" 1>&6
16997   cat >> confdefs.h <<\EOF
16998 #define HAVE_VPRINTF 1
16999 EOF
17000
17001 else
17002   echo "$ac_t""no" 1>&6
17003 fi
17004
17005 if test "$ac_cv_func_vprintf" != yes; then
17006 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
17007 echo "configure:17008: checking for _doprnt" >&5
17008 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
17009   echo $ac_n "(cached) $ac_c" 1>&6
17010 else
17011   cat > conftest.$ac_ext <<EOF
17012 #line 17013 "configure"
17013 #include "confdefs.h"
17014 /* System header to define __stub macros and hopefully few prototypes,
17015     which can conflict with char _doprnt(); below.  */
17016 #include <assert.h>
17017 /* Override any gcc2 internal prototype to avoid an error.  */
17018 /* We use char because int might match the return type of a gcc2
17019     builtin and then its argument prototype would still apply.  */
17020 char _doprnt();
17021 char (*f)();
17022
17023 int main() {
17024
17025 /* The GNU C library defines this for functions which it implements
17026     to always fail with ENOSYS.  Some functions are actually named
17027     something starting with __ and the normal name is an alias.  */
17028 #if defined (__stub__doprnt) || defined (__stub____doprnt)
17029 choke me
17030 #else
17031 f = _doprnt;
17032 #endif
17033
17034 ; return 0; }
17035 EOF
17036 if { (eval echo configure:17037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17037   rm -rf conftest*
17038   eval "ac_cv_func__doprnt=yes"
17039 else
17040   echo "configure: failed program was:" >&5
17041   cat conftest.$ac_ext >&5
17042   rm -rf conftest*
17043   eval "ac_cv_func__doprnt=no"
17044 fi
17045 rm -f conftest*
17046 fi
17047
17048 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
17049   echo "$ac_t""yes" 1>&6
17050   cat >> confdefs.h <<\EOF
17051 #define HAVE_DOPRNT 1
17052 EOF
17053
17054 else
17055   echo "$ac_t""no" 1>&6
17056 fi
17057
17058 fi
17059
17060
17061 if test $ac_cv_func_vprintf = yes ; then
17062                 for ac_func in vsnprintf vsprintf
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 fi
17119
17120 for ac_func in \
17121         bcopy                   \
17122         closesocket             \
17123         chroot                  \
17124         endgrent                \
17125         endpwent                \
17126         fcntl                   \
17127         flock                   \
17128         getdtablesize   \
17129         getgrgid                \
17130         gethostname             \
17131         getpass                 \
17132         getpassphrase   \
17133         getpwuid                \
17134         getpwnam                \
17135         getspnam                \
17136         gettimeofday    \
17137         initgroups              \
17138         lockf                   \
17139         memcpy                  \
17140         memmove                 \
17141         pipe                    \
17142         read                    \
17143         recv                    \
17144         recvfrom                \
17145         setpwfile               \
17146         setgid                  \
17147         setegid                 \
17148         setsid                  \
17149         setuid                  \
17150         seteuid                 \
17151         sigaction               \
17152         signal                  \
17153         sigset                  \
17154         strdup                  \
17155         strerror                \
17156         strpbrk                 \
17157         strrchr                 \
17158         strsep                  \
17159         strstr                  \
17160         strtol                  \
17161         strtoul                 \
17162         strspn                  \
17163         sysconf                 \
17164         waitpid                 \
17165         wait4                   \
17166         write                   \
17167         send                    \
17168         sendto                  \
17169
17170 do
17171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17172 echo "configure:17173: checking for $ac_func" >&5
17173 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17174   echo $ac_n "(cached) $ac_c" 1>&6
17175 else
17176   cat > conftest.$ac_ext <<EOF
17177 #line 17178 "configure"
17178 #include "confdefs.h"
17179 /* System header to define __stub macros and hopefully few prototypes,
17180     which can conflict with char $ac_func(); below.  */
17181 #include <assert.h>
17182 /* Override any gcc2 internal prototype to avoid an error.  */
17183 /* We use char because int might match the return type of a gcc2
17184     builtin and then its argument prototype would still apply.  */
17185 char $ac_func();
17186 char (*f)();
17187
17188 int main() {
17189
17190 /* The GNU C library defines this for functions which it implements
17191     to always fail with ENOSYS.  Some functions are actually named
17192     something starting with __ and the normal name is an alias.  */
17193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17194 choke me
17195 #else
17196 f = $ac_func;
17197 #endif
17198
17199 ; return 0; }
17200 EOF
17201 if { (eval echo configure:17202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17202   rm -rf conftest*
17203   eval "ac_cv_func_$ac_func=yes"
17204 else
17205   echo "configure: failed program was:" >&5
17206   cat conftest.$ac_ext >&5
17207   rm -rf conftest*
17208   eval "ac_cv_func_$ac_func=no"
17209 fi
17210 rm -f conftest*
17211 fi
17212
17213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17214   echo "$ac_t""yes" 1>&6
17215     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17216   cat >> confdefs.h <<EOF
17217 #define $ac_tr_func 1
17218 EOF
17219  
17220 else
17221   echo "$ac_t""no" 1>&6
17222 fi
17223 done
17224
17225
17226 for ac_func in getopt
17227 do
17228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17229 echo "configure:17230: checking for $ac_func" >&5
17230 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17231   echo $ac_n "(cached) $ac_c" 1>&6
17232 else
17233   cat > conftest.$ac_ext <<EOF
17234 #line 17235 "configure"
17235 #include "confdefs.h"
17236 /* System header to define __stub macros and hopefully few prototypes,
17237     which can conflict with char $ac_func(); below.  */
17238 #include <assert.h>
17239 /* Override any gcc2 internal prototype to avoid an error.  */
17240 /* We use char because int might match the return type of a gcc2
17241     builtin and then its argument prototype would still apply.  */
17242 char $ac_func();
17243 char (*f)();
17244
17245 int main() {
17246
17247 /* The GNU C library defines this for functions which it implements
17248     to always fail with ENOSYS.  Some functions are actually named
17249     something starting with __ and the normal name is an alias.  */
17250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17251 choke me
17252 #else
17253 f = $ac_func;
17254 #endif
17255
17256 ; return 0; }
17257 EOF
17258 if { (eval echo configure:17259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17259   rm -rf conftest*
17260   eval "ac_cv_func_$ac_func=yes"
17261 else
17262   echo "configure: failed program was:" >&5
17263   cat conftest.$ac_ext >&5
17264   rm -rf conftest*
17265   eval "ac_cv_func_$ac_func=no"
17266 fi
17267 rm -f conftest*
17268 fi
17269
17270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17271   echo "$ac_t""yes" 1>&6
17272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17273   cat >> confdefs.h <<EOF
17274 #define $ac_tr_func 1
17275 EOF
17276  
17277 else
17278   echo "$ac_t""no" 1>&6
17279 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
17280 fi
17281 done
17282
17283
17284
17285 if test "$ac_cv_func_getopt" != yes; then
17286     LIBSRCS="$LIBSRCS getopt.c"
17287 fi
17288
17289 # Check Configuration
17290 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
17291 echo "configure:17292: checking declaration of sys_errlist" >&5
17292 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
17293   echo $ac_n "(cached) $ac_c" 1>&6
17294 else
17295   
17296         cat > conftest.$ac_ext <<EOF
17297 #line 17298 "configure"
17298 #include "confdefs.h"
17299
17300 #include <stdio.h>
17301 #include <sys/types.h>
17302 #include <errno.h>
17303 #ifdef WINNT
17304 #include <stdlib.h>
17305 #endif 
17306 int main() {
17307 char *c = (char *) *sys_errlist
17308 ; return 0; }
17309 EOF
17310 if { (eval echo configure:17311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17311   rm -rf conftest*
17312   ol_cv_dcl_sys_errlist=yes
17313         ol_cv_have_sys_errlist=yes
17314 else
17315   echo "configure: failed program was:" >&5
17316   cat conftest.$ac_ext >&5
17317   rm -rf conftest*
17318   ol_cv_dcl_sys_errlist=no
17319 fi
17320 rm -f conftest*
17321 fi
17322
17323 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
17324 #
17325 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
17326 if test $ol_cv_dcl_sys_errlist = no ; then
17327         cat >> confdefs.h <<\EOF
17328 #define DECL_SYS_ERRLIST 1
17329 EOF
17330
17331
17332         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
17333 echo "configure:17334: checking existence of sys_errlist" >&5
17334 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
17335   echo $ac_n "(cached) $ac_c" 1>&6
17336 else
17337   
17338                 cat > conftest.$ac_ext <<EOF
17339 #line 17340 "configure"
17340 #include "confdefs.h"
17341 #include <errno.h>
17342 int main() {
17343 char *c = (char *) *sys_errlist
17344 ; return 0; }
17345 EOF
17346 if { (eval echo configure:17347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17347   rm -rf conftest*
17348   ol_cv_have_sys_errlist=yes
17349 else
17350   echo "configure: failed program was:" >&5
17351   cat conftest.$ac_ext >&5
17352   rm -rf conftest*
17353   ol_cv_have_sys_errlist=no
17354 fi
17355 rm -f conftest*
17356 fi
17357
17358 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
17359 fi
17360 if test $ol_cv_have_sys_errlist = yes ; then
17361         cat >> confdefs.h <<\EOF
17362 #define HAVE_SYS_ERRLIST 1
17363 EOF
17364
17365 fi
17366
17367
17368
17369 if test "$ol_enable_debug" != no ; then
17370         cat >> confdefs.h <<\EOF
17371 #define LDAP_DEBUG 1
17372 EOF
17373
17374 fi
17375 if test "$ol_enable_syslog" = yes ; then
17376         cat >> confdefs.h <<\EOF
17377 #define LDAP_SYSLOG 1
17378 EOF
17379
17380 fi
17381 if test "$ol_enable_cache" = no ; then
17382         cat >> confdefs.h <<\EOF
17383 #define LDAP_NOCACHE 1
17384 EOF
17385
17386 fi
17387 if test "$ol_link_kbind" != no ; then
17388         cat >> confdefs.h <<\EOF
17389 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
17390 EOF
17391
17392 fi
17393 if test "$ol_enable_proctitle" != no ; then
17394         cat >> confdefs.h <<\EOF
17395 #define LDAP_PROCTITLE 1
17396 EOF
17397
17398 fi
17399 if test "$ol_enable_referrals" != no ; then
17400         cat >> confdefs.h <<\EOF
17401 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
17402 EOF
17403
17404 fi
17405 if test "$ol_enable_local" != no; then
17406         cat >> confdefs.h <<\EOF
17407 #define LDAP_PF_LOCAL 1
17408 EOF
17409
17410 fi
17411 if test "$ol_link_ipv6" != no; then
17412         cat >> confdefs.h <<\EOF
17413 #define LDAP_PF_INET6 1
17414 EOF
17415
17416 fi
17417 if test "$ol_enable_cleartext" != no ; then
17418         cat >> confdefs.h <<\EOF
17419 #define SLAPD_CLEARTEXT 1
17420 EOF
17421
17422 fi
17423 if test "$ol_enable_crypt" != no ; then
17424         cat >> confdefs.h <<\EOF
17425 #define SLAPD_CRYPT 1
17426 EOF
17427
17428 fi
17429 if test "$ol_link_kpasswd" != no ; then
17430         cat >> confdefs.h <<\EOF
17431 #define SLAPD_KPASSWD 1
17432 EOF
17433
17434 fi
17435 if test "$ol_link_spasswd" != no ; then
17436         cat >> confdefs.h <<\EOF
17437 #define SLAPD_SPASSWD 1
17438 EOF
17439
17440 fi
17441 if test "$ol_enable_phonetic" != no ; then
17442         cat >> confdefs.h <<\EOF
17443 #define SLAPD_PHONETIC 1
17444 EOF
17445
17446 fi
17447 if test "$ol_enable_rlookups" != no ; then
17448         cat >> confdefs.h <<\EOF
17449 #define SLAPD_RLOOKUPS 1
17450 EOF
17451
17452 fi
17453 if test "$ol_enable_aci" != no ; then
17454         cat >> confdefs.h <<\EOF
17455 #define SLAPD_ACI_ENABLED 1
17456 EOF
17457
17458 fi
17459
17460 if test "$ol_link_modules" != no ; then
17461         cat >> confdefs.h <<\EOF
17462 #define SLAPD_MODULES 1
17463 EOF
17464
17465         BUILD_SLAPD=yes
17466         SLAPD_MODULES_LDFLAGS="-dlopen self"
17467 fi
17468
17469 if test "$ol_enable_bdb" != no ; then
17470         cat >> confdefs.h <<\EOF
17471 #define SLAPD_BDB 1
17472 EOF
17473
17474         BUILD_SLAPD=yes
17475         BUILD_BDB=yes
17476         if test "$ol_with_bdb_module" != static ; then
17477                 cat >> confdefs.h <<\EOF
17478 #define SLAPD_BDB_DYNAMIC 1
17479 EOF
17480
17481                 BUILD_BDB=mod
17482                 BUILD_BDB_DYNAMIC=shared
17483                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
17484         fi
17485 fi
17486
17487 if test "$ol_link_dnssrv" != no ; then
17488         cat >> confdefs.h <<\EOF
17489 #define SLAPD_DNSSRV 1
17490 EOF
17491
17492         BUILD_SLAPD=yes
17493         BUILD_DNSSRV=yes
17494         if test "$ol_with_dnssrv_module" != static ; then
17495                 cat >> confdefs.h <<\EOF
17496 #define SLAPD_DNSSRV_DYNAMIC 1
17497 EOF
17498
17499                 BUILD_DNSSRV=mod
17500                 BUILD_DNSSRV_DYNAMIC=shared
17501                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
17502         fi
17503 fi
17504
17505 if test "$ol_enable_ldap" != no ; then
17506         cat >> confdefs.h <<\EOF
17507 #define SLAPD_LDAP 1
17508 EOF
17509
17510         BUILD_SLAPD=yes
17511         BUILD_LDAP=yes
17512         if test "$ol_with_ldap_module" != static ; then
17513                 cat >> confdefs.h <<\EOF
17514 #define SLAPD_LDAP_DYNAMIC 1
17515 EOF
17516
17517                 BUILD_LDAP=mod
17518                 BUILD_LDAP_DYNAMIC=shared
17519                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
17520         fi
17521 fi
17522
17523 if test "$ol_link_ldbm" != no ; then
17524         cat >> confdefs.h <<\EOF
17525 #define SLAPD_LDBM 1
17526 EOF
17527
17528         BUILD_SLAPD=yes
17529         BUILD_LDBM=yes
17530         if test "$ol_with_ldbm_module" != static ; then
17531                 cat >> confdefs.h <<\EOF
17532 #define SLAPD_LDBM_DYNAMIC 1
17533 EOF
17534
17535                 BUILD_LDBM=mod
17536                 BUILD_LDBM_DYNAMIC=shared
17537                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
17538         fi
17539 fi
17540
17541 if test "$ol_enable_meta" != no ; then
17542         if test "$ol_enable_ldap" = no ; then
17543                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
17544         fi
17545         if test "$ol_enable_rewrite" = no ; then
17546                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
17547         fi
17548         cat >> confdefs.h <<\EOF
17549 #define SLAPD_META 1
17550 EOF
17551
17552         BUILD_SLAPD=yes
17553         BUILD_META=yes
17554         if test "$ol_with_meta_module" != static ; then
17555                 cat >> confdefs.h <<\EOF
17556 #define SLAPD_META_DYNAMIC 1
17557 EOF
17558
17559                 BUILD_META=mod
17560                 BUILD_META_DYNAMIC=shared
17561                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
17562         fi
17563 fi
17564
17565 if test "$ol_enable_monitor" != no ; then
17566         cat >> confdefs.h <<\EOF
17567 #define SLAPD_MONITOR 1
17568 EOF
17569
17570         BUILD_SLAPD=yes
17571         BUILD_MONITOR=yes
17572         if test "$ol_with_monitor_module" != static ; then
17573                 cat >> confdefs.h <<\EOF
17574 #define SLAPD_MONITOR_DYNAMIC 1
17575 EOF
17576
17577                 BUILD_MONITOR=mod
17578                 BUILD_MONITOR_DYNAMIC=shared
17579                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
17580         fi
17581 fi
17582
17583 if test "$ol_enable_passwd" != no ; then
17584         cat >> confdefs.h <<\EOF
17585 #define SLAPD_PASSWD 1
17586 EOF
17587
17588         BUILD_SLAPD=yes
17589         BUILD_PASSWD=yes
17590         if test "$ol_with_passwd_module" != static ; then
17591                 cat >> confdefs.h <<\EOF
17592 #define SLAPD_PASSWD_DYNAMIC 1
17593 EOF
17594
17595                 BUILD_PASSWD=mod
17596                 BUILD_PASSWD_DYNAMIC=shared
17597                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
17598         fi
17599 fi
17600
17601 if test "$ol_link_perl" != no ; then
17602         cat >> confdefs.h <<\EOF
17603 #define SLAPD_PERL 1
17604 EOF
17605
17606         BUILD_SLAPD=yes
17607         BUILD_PERL=yes
17608         if test "$ol_with_perl_module" != static ; then
17609                 cat >> confdefs.h <<\EOF
17610 #define SLAPD_PERL_DYNAMIC 1
17611 EOF
17612
17613                 BUILD_PERL=mod
17614                 BUILD_PERL_DYNAMIC=shared
17615                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
17616         fi
17617 fi
17618
17619 if test "$ol_enable_shell" != no ; then
17620         cat >> confdefs.h <<\EOF
17621 #define SLAPD_SHELL 1
17622 EOF
17623
17624         BUILD_SLAPD=yes
17625         BUILD_SHELL=yes
17626         if test "$ol_with_shell_module" != static ; then
17627                 cat >> confdefs.h <<\EOF
17628 #define SLAPD_SHELL_DYNAMIC 1
17629 EOF
17630
17631                 BUILD_SHELL=mod
17632                 BUILD_SHELL_DYNAMIC=shared
17633                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
17634         fi
17635 fi
17636
17637 if test "$ol_enable_tcl" != no ; then
17638         cat >> confdefs.h <<\EOF
17639 #define SLAPD_TCL 1
17640 EOF
17641
17642         BUILD_SLAPD=yes
17643         BUILD_TCL=yes
17644         if test "$ol_with_tcl_module" != static; then
17645                 cat >> confdefs.h <<\EOF
17646 #define SLAPD_TCL_DYNAMIC 1
17647 EOF
17648
17649                 BUILD_TCL=mod
17650                 BUILD_TCL_DYNAMIC=shared
17651                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
17652         fi
17653 fi
17654
17655 if test "$ol_link_sql" != no ; then
17656         cat >> confdefs.h <<\EOF
17657 #define SLAPD_SQL 1
17658 EOF
17659
17660         BUILD_SLAPD=yes
17661         BUILD_SQL=yes
17662         if test "$ol_with_sql_module" != static; then
17663                 cat >> confdefs.h <<\EOF
17664 #define SLAPD_SQL_DYNAMIC 1
17665 EOF
17666
17667                 BUILD_SQL=mod
17668                 BUILD_SQL_DYNAMIC=shared
17669                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
17670         fi
17671 fi
17672
17673 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
17674         $BUILD_SLAPD = yes ; then
17675         BUILD_SLURPD=yes
17676 fi
17677
17678 if test "$ol_enable_rewrite" != no ; then
17679         cat >> confdefs.h <<\EOF
17680 #define ENABLE_REWRITE 1
17681 EOF
17682
17683         BUILD_REWRITE=yes
17684         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
17685 fi
17686
17687
17688 if test "$LINK_BINS_DYNAMIC" = yes; then
17689     LIB_LINKAGE=DYN
17690     LT_LIB_LINKAGE=shared
17691 else
17692     LIB_LINKAGE=STAT
17693     LT_LIB_LINKAGE=static
17694 fi
17695
17696 if test "$ac_cv_mingw32" = yes ; then
17697     PLAT=NT
17698     DYN_EXT=dll
17699 else
17700     PLAT=UNIX
17701     DYN_EXT=so
17702 fi
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712   
17713   
17714   
17715   
17716   
17717   
17718   
17719   
17720   
17721   
17722   
17723   
17724   
17725   
17726   
17727   
17728   
17729   
17730   
17731   
17732   
17733   
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771 trap '' 1 2 15
17772
17773 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
17774
17775 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17776 # Let make expand exec_prefix.
17777 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17778
17779 # Any assignment to VPATH causes Sun make to only execute
17780 # the first set of double-colon rules, so remove it if not needed.
17781 # If there is a colon in the path, we need to keep it.
17782 if test "x$srcdir" = x.; then
17783   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
17784 fi
17785
17786 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
17787
17788 DEFS=-DHAVE_CONFIG_H
17789
17790 # Without the "./", some shells look in PATH for config.status.
17791 : ${CONFIG_STATUS=./config.status}
17792
17793 echo creating $CONFIG_STATUS
17794 rm -f $CONFIG_STATUS
17795 cat > $CONFIG_STATUS <<EOF
17796 #! /bin/sh
17797 # Generated automatically by configure.
17798 # Run this file to recreate the current configuration.
17799 # This directory was configured as follows,
17800 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
17801 #
17802 # $0 $ac_configure_args
17803 #
17804 # Compiler output produced by configure, useful for debugging
17805 # configure, is in ./config.log if it exists.
17806
17807 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
17808 for ac_option
17809 do
17810   case "\$ac_option" in
17811   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17812     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
17813     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
17814   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
17815     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
17816     exit 0 ;;
17817   -help | --help | --hel | --he | --h)
17818     echo "\$ac_cs_usage"; exit 0 ;;
17819   *) echo "\$ac_cs_usage"; exit 1 ;;
17820   esac
17821 done
17822
17823 ac_given_srcdir=$srcdir
17824 ac_given_INSTALL="$INSTALL"
17825
17826 trap 'rm -fr `echo "\
17827 Makefile:build/top.mk:Makefile.in:build/dir.mk \
17828 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
17829 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
17830 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
17831 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
17832 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
17833 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
17834 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
17835 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
17836 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
17837 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
17838 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
17839 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
17840 include/Makefile:build/top.mk:include/Makefile.in \
17841 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
17842 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
17843 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17844 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17845 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
17846 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
17847 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
17848 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
17849 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
17850 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
17851 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17852 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17853 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
17854 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17855 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17856 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17857 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
17858 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
17859 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17860 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
17861 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17862 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17863 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
17864 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17865 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17866 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17867 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17868 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17869 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17870 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17871  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
17872 EOF
17873 cat >> $CONFIG_STATUS <<EOF
17874
17875 # Protect against being on the right side of a sed subst in config.status.
17876 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
17877  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
17878 $ac_vpsub
17879 $extrasub
17880 s%@SHELL@%$SHELL%g
17881 s%@CFLAGS@%$CFLAGS%g
17882 s%@CPPFLAGS@%$CPPFLAGS%g
17883 s%@CXXFLAGS@%$CXXFLAGS%g
17884 s%@FFLAGS@%$FFLAGS%g
17885 s%@DEFS@%$DEFS%g
17886 s%@LDFLAGS@%$LDFLAGS%g
17887 s%@LIBS@%$LIBS%g
17888 s%@exec_prefix@%$exec_prefix%g
17889 s%@prefix@%$prefix%g
17890 s%@program_transform_name@%$program_transform_name%g
17891 s%@bindir@%$bindir%g
17892 s%@sbindir@%$sbindir%g
17893 s%@libexecdir@%$libexecdir%g
17894 s%@datadir@%$datadir%g
17895 s%@sysconfdir@%$sysconfdir%g
17896 s%@sharedstatedir@%$sharedstatedir%g
17897 s%@localstatedir@%$localstatedir%g
17898 s%@libdir@%$libdir%g
17899 s%@includedir@%$includedir%g
17900 s%@oldincludedir@%$oldincludedir%g
17901 s%@infodir@%$infodir%g
17902 s%@mandir@%$mandir%g
17903 s%@host@%$host%g
17904 s%@host_alias@%$host_alias%g
17905 s%@host_cpu@%$host_cpu%g
17906 s%@host_vendor@%$host_vendor%g
17907 s%@host_os@%$host_os%g
17908 s%@target@%$target%g
17909 s%@target_alias@%$target_alias%g
17910 s%@target_cpu@%$target_cpu%g
17911 s%@target_vendor@%$target_vendor%g
17912 s%@target_os@%$target_os%g
17913 s%@build@%$build%g
17914 s%@build_alias@%$build_alias%g
17915 s%@build_cpu@%$build_cpu%g
17916 s%@build_vendor@%$build_vendor%g
17917 s%@build_os@%$build_os%g
17918 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
17919 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
17920 s%@INSTALL_DATA@%$INSTALL_DATA%g
17921 s%@PACKAGE@%$PACKAGE%g
17922 s%@VERSION@%$VERSION%g
17923 s%@ACLOCAL@%$ACLOCAL%g
17924 s%@AUTOCONF@%$AUTOCONF%g
17925 s%@AUTOMAKE@%$AUTOMAKE%g
17926 s%@AUTOHEADER@%$AUTOHEADER%g
17927 s%@MAKEINFO@%$MAKEINFO%g
17928 s%@install_sh@%$install_sh%g
17929 s%@AMTAR@%$AMTAR%g
17930 s%@AWK@%$AWK%g
17931 s%@AMTARFLAGS@%$AMTARFLAGS%g
17932 s%@SET_MAKE@%$SET_MAKE%g
17933 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
17934 s%@top_builddir@%$top_builddir%g
17935 s%@ldap_subdir@%$ldap_subdir%g
17936 s%@CC@%$CC%g
17937 s%@RANLIB@%$RANLIB%g
17938 s%@LN_S@%$LN_S%g
17939 s%@DLLTOOL@%$DLLTOOL%g
17940 s%@AS@%$AS%g
17941 s%@OBJDUMP@%$OBJDUMP%g
17942 s%@LIBTOOL@%$LIBTOOL%g
17943 s%@LN_H@%$LN_H%g
17944 s%@SENDMAIL@%$SENDMAIL%g
17945 s%@EDITOR@%$EDITOR%g
17946 s%@FINGER@%$FINGER%g
17947 s%@PERLBIN@%$PERLBIN%g
17948 s%@CPP@%$CPP%g
17949 s%@EXEEXT@%$EXEEXT%g
17950 s%@OBJEXT@%$OBJEXT%g
17951 s%@OL_MKDEP@%$OL_MKDEP%g
17952 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
17953 s%@LIBOBJS@%$LIBOBJS%g
17954 s%@LIBSRCS@%$LIBSRCS%g
17955 s%@PLAT@%$PLAT%g
17956 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
17957 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
17958 s%@DYN_EXT@%$DYN_EXT%g
17959 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
17960 s%@BUILD_BDB@%$BUILD_BDB%g
17961 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
17962 s%@BUILD_LDAP@%$BUILD_LDAP%g
17963 s%@BUILD_LDBM@%$BUILD_LDBM%g
17964 s%@BUILD_META@%$BUILD_META%g
17965 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
17966 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
17967 s%@BUILD_PERL@%$BUILD_PERL%g
17968 s%@BUILD_SHELL@%$BUILD_SHELL%g
17969 s%@BUILD_SQL@%$BUILD_SQL%g
17970 s%@BUILD_TCL@%$BUILD_TCL%g
17971 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
17972 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
17973 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
17974 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
17975 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
17976 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
17977 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
17978 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
17979 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
17980 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
17981 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
17982 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
17983 s%@LDAP_LIBS@%$LDAP_LIBS%g
17984 s%@LDIF_LIBS@%$LDIF_LIBS%g
17985 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
17986 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
17987 s%@LDBM_LIBS@%$LDBM_LIBS%g
17988 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
17989 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
17990 s%@WRAP_LIBS@%$WRAP_LIBS%g
17991 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
17992 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
17993 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
17994 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
17995 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
17996 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
17997 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
17998 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
17999 s%@KRB4_LIBS@%$KRB4_LIBS%g
18000 s%@KRB5_LIBS@%$KRB5_LIBS%g
18001 s%@READLINE_LIBS@%$READLINE_LIBS%g
18002 s%@SASL_LIBS@%$SASL_LIBS%g
18003 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
18004 s%@TLS_LIBS@%$TLS_LIBS%g
18005 s%@MODULES_LIBS@%$MODULES_LIBS%g
18006 s%@AUTH_LIBS@%$AUTH_LIBS%g
18007 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
18008 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
18009 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
18010 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
18011
18012 CEOF
18013 EOF
18014
18015 cat >> $CONFIG_STATUS <<\EOF
18016
18017 # Split the substitutions into bite-sized pieces for seds with
18018 # small command number limits, like on Digital OSF/1 and HP-UX.
18019 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
18020 ac_file=1 # Number of current file.
18021 ac_beg=1 # First line for current file.
18022 ac_end=$ac_max_sed_cmds # Line after last line for current file.
18023 ac_more_lines=:
18024 ac_sed_cmds=""
18025 while $ac_more_lines; do
18026   if test $ac_beg -gt 1; then
18027     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
18028   else
18029     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
18030   fi
18031   if test ! -s conftest.s$ac_file; then
18032     ac_more_lines=false
18033     rm -f conftest.s$ac_file
18034   else
18035     if test -z "$ac_sed_cmds"; then
18036       ac_sed_cmds="sed -f conftest.s$ac_file"
18037     else
18038       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
18039     fi
18040     ac_file=`expr $ac_file + 1`
18041     ac_beg=$ac_end
18042     ac_end=`expr $ac_end + $ac_max_sed_cmds`
18043   fi
18044 done
18045 if test -z "$ac_sed_cmds"; then
18046   ac_sed_cmds=cat
18047 fi
18048 EOF
18049
18050 cat >> $CONFIG_STATUS <<EOF
18051
18052 CONFIG_FILES=\${CONFIG_FILES-"\
18053 Makefile:build/top.mk:Makefile.in:build/dir.mk \
18054 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
18055 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
18056 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
18057 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
18058 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
18059 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
18060 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
18061 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
18062 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
18063 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
18064 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
18065 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
18066 include/Makefile:build/top.mk:include/Makefile.in \
18067 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
18068 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
18069 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18070 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18071 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
18072 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
18073 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
18074 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
18075 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
18076 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
18077 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
18078 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
18079 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
18080 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
18081 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
18082 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
18083 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
18084 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
18085 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
18086 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
18087 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
18088 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
18089 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
18090 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
18091 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
18092 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
18093 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
18094 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
18095 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
18096 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
18097 "}
18098 EOF
18099 cat >> $CONFIG_STATUS <<\EOF
18100 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
18101   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18102   case "$ac_file" in
18103   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18104        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18105   *) ac_file_in="${ac_file}.in" ;;
18106   esac
18107
18108   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
18109
18110   # Remove last slash and all that follows it.  Not all systems have dirname.
18111   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18112   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18113     # The file is in a subdirectory.
18114     test ! -d "$ac_dir" && mkdir "$ac_dir"
18115     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
18116     # A "../" for each directory in $ac_dir_suffix.
18117     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
18118   else
18119     ac_dir_suffix= ac_dots=
18120   fi
18121
18122   case "$ac_given_srcdir" in
18123   .)  srcdir=.
18124       if test -z "$ac_dots"; then top_srcdir=.
18125       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
18126   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
18127   *) # Relative path.
18128     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
18129     top_srcdir="$ac_dots$ac_given_srcdir" ;;
18130   esac
18131
18132   case "$ac_given_INSTALL" in
18133   [/$]*) INSTALL="$ac_given_INSTALL" ;;
18134   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
18135   esac
18136
18137   echo creating "$ac_file"
18138   rm -f "$ac_file"
18139   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
18140   case "$ac_file" in
18141   *[Mm]akefile*) ac_comsub="1i\\
18142 # $configure_input" ;;
18143   *) ac_comsub= ;;
18144   esac
18145
18146   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18147   sed -e "$ac_comsub
18148 s%@configure_input@%$configure_input%g
18149 s%@srcdir@%$srcdir%g
18150 s%@top_srcdir@%$top_srcdir%g
18151 s%@INSTALL@%$INSTALL%g
18152 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
18153 fi; done
18154 rm -f conftest.s*
18155
18156 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18157 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18158 #
18159 # ac_d sets the value in "#define NAME VALUE" lines.
18160 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18161 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
18162 ac_dC='\3'
18163 ac_dD='%g'
18164 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18165 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18166 ac_uB='\([      ]\)%\1#\2define\3'
18167 ac_uC=' '
18168 ac_uD='\4%g'
18169 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18170 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18171 ac_eB='$%\1#\2define\3'
18172 ac_eC=' '
18173 ac_eD='%g'
18174
18175 if test "${CONFIG_HEADERS+set}" != set; then
18176 EOF
18177 cat >> $CONFIG_STATUS <<EOF
18178   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
18179 EOF
18180 cat >> $CONFIG_STATUS <<\EOF
18181 fi
18182 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
18183   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18184   case "$ac_file" in
18185   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18186        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18187   *) ac_file_in="${ac_file}.in" ;;
18188   esac
18189
18190   echo creating $ac_file
18191
18192   rm -f conftest.frag conftest.in conftest.out
18193   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18194   cat $ac_file_inputs > conftest.in
18195
18196 EOF
18197
18198 # Transform confdefs.h into a sed script conftest.vals that substitutes
18199 # the proper values into config.h.in to produce config.h.  And first:
18200 # Protect against being on the right side of a sed subst in config.status.
18201 # Protect against being in an unquoted here document in config.status.
18202 rm -f conftest.vals
18203 cat > conftest.hdr <<\EOF
18204 s/[\\&%]/\\&/g
18205 s%[\\$`]%\\&%g
18206 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
18207 s%ac_d%ac_u%gp
18208 s%ac_u%ac_e%gp
18209 EOF
18210 sed -n -f conftest.hdr confdefs.h > conftest.vals
18211 rm -f conftest.hdr
18212
18213 # This sed command replaces #undef with comments.  This is necessary, for
18214 # example, in the case of _POSIX_SOURCE, which is predefined and required
18215 # on some systems where configure will not decide to define it.
18216 cat >> conftest.vals <<\EOF
18217 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
18218 EOF
18219
18220 # Break up conftest.vals because some shells have a limit on
18221 # the size of here documents, and old seds have small limits too.
18222
18223 rm -f conftest.tail
18224 while :
18225 do
18226   ac_lines=`grep -c . conftest.vals`
18227   # grep -c gives empty output for an empty file on some AIX systems.
18228   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
18229   # Write a limited-size here document to conftest.frag.
18230   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
18231   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
18232   echo 'CEOF
18233   sed -f conftest.frag conftest.in > conftest.out
18234   rm -f conftest.in
18235   mv conftest.out conftest.in
18236 ' >> $CONFIG_STATUS
18237   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18238   rm -f conftest.vals
18239   mv conftest.tail conftest.vals
18240 done
18241 rm -f conftest.vals
18242
18243 cat >> $CONFIG_STATUS <<\EOF
18244   rm -f conftest.frag conftest.h
18245   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
18246   cat conftest.in >> conftest.h
18247   rm -f conftest.in
18248   if cmp -s $ac_file conftest.h 2>/dev/null; then
18249     echo "$ac_file is unchanged"
18250     rm -f conftest.h
18251   else
18252     # Remove last slash and all that follows it.  Not all systems have dirname.
18253       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18254       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18255       # The file is in a subdirectory.
18256       test ! -d "$ac_dir" && mkdir "$ac_dir"
18257     fi
18258     rm -f $ac_file
18259     mv conftest.h $ac_file
18260   fi
18261 fi; done
18262
18263 EOF
18264 cat >> $CONFIG_STATUS <<EOF
18265
18266 EOF
18267 cat >> $CONFIG_STATUS <<\EOF
18268
18269 date > stamp-h
18270 echo Please \"make depend\" to build dependencies
18271
18272 exit 0
18273 EOF
18274 chmod +x $CONFIG_STATUS
18275 rm -fr confdefs* $ac_clean_files
18276 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
18277