]> git.sur5r.net Git - openldap/blob - configure
rebuild
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.383 2001/12/08 03:29:34 kurt Exp  
4
5 # Copyright 1998-2001 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2001 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-kbind          enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-rewrite        enable rewrite [no]"
48 ac_help="$ac_help
49   --enable-x-compile      enable cross compiling [no]"
50 ac_help="$ac_help
51   --with-cyrus-sasl       with Cyrus SASL support [auto]"
52 ac_help="$ac_help
53   --with-fetch            with fetch URL support [auto]"
54 ac_help="$ac_help
55   --with-kerberos         with Kerberos support [auto]"
56 ac_help="$ac_help
57   --with-readline         with readline support [auto]"
58 ac_help="$ac_help
59   --with-threads          with threads [auto]"
60 ac_help="$ac_help
61   --with-tls              with TLS/SSL support [auto]"
62 ac_help="$ac_help
63   --with-yielding-select  with implicitly yielding select [auto]"
64 ac_help="$ac_help
65 SLAPD (Standalone LDAP Daemon) Options:"
66 ac_help="$ac_help
67   --enable-slapd          enable building slapd [yes]"
68 ac_help="$ac_help
69     --enable-aci          enable per-object ACIs (experimental) [no]"
70 ac_help="$ac_help
71     --enable-cleartext    enable cleartext passwords [yes]"
72 ac_help="$ac_help
73     --enable-crypt        enable crypt(3) passwords [no]"
74 ac_help="$ac_help
75     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
76 ac_help="$ac_help
77     --enable-kpasswd      enable Kerberos password verification [no]"
78 ac_help="$ac_help
79     --enable-lmpasswd     enable LAN Manager passwords [no]"
80 ac_help="$ac_help
81     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
82 ac_help="$ac_help
83     --enable-modules      enable dynamic module support [no]"
84 ac_help="$ac_help
85     --enable-phonetic     enable phonetic/soundex [no]"
86 ac_help="$ac_help
87     --enable-rlookups     enable reverse lookups [no]"
88 ac_help="$ac_help
89     --enable-slp          enable SLPv2 support [no]"
90 ac_help="$ac_help
91     --enable-wrappers     enable tcp wrapper support [no]"
92 ac_help="$ac_help
93     --enable-bdb          enable Berkeley DB backend [no]"
94 ac_help="$ac_help
95     --with-bdb-module     module type [static]"
96 ac_help="$ac_help
97     --enable-dnssrv       enable dnssrv backend [no]"
98 ac_help="$ac_help
99     --with-dnssrv-module  module type [static]"
100 ac_help="$ac_help
101     --enable-ldap         enable ldap backend [no]"
102 ac_help="$ac_help
103     --with-ldap-module    module type [static]"
104 ac_help="$ac_help
105     --enable-ldbm         enable ldbm backend [yes]"
106 ac_help="$ac_help
107     --with-ldbm-api       with LDBM API [auto]"
108 ac_help="$ac_help
109     --with-ldbm-module    module type [static]"
110 ac_help="$ac_help
111     --with-ldbm-type      use LDBM type [auto]"
112 ac_help="$ac_help
113     --enable-meta         enable metadirectory backend [no]"
114 ac_help="$ac_help
115     --with-meta-module    module type [static]"
116 ac_help="$ac_help
117     --enable-monitor      enable monitor backend [no]"
118 ac_help="$ac_help
119     --with-monitor-module module type [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type [static]"
128 ac_help="$ac_help
129     --enable-shell        enable shell backend [no]"
130 ac_help="$ac_help
131     --with-shell-module   module type [static]"
132 ac_help="$ac_help
133     --enable-sql          enable sql backend [no]"
134 ac_help="$ac_help
135     --with-sql-module     module type [static]"
136 ac_help="$ac_help
137     --enable-tcl          enable tcl backend [no]"
138 ac_help="$ac_help
139     --with-tcl-module     module type [static]"
140 ac_help="$ac_help
141 SLURPD (Replication Daemon) Options:"
142 ac_help="$ac_help
143   --enable-slurpd         enable building slurpd [auto]"
144 ac_help="$ac_help
145 Library Generation & Linking Options"
146 ac_help="$ac_help
147   --enable-static[=PKGS]  build static libraries [default=yes]"
148 ac_help="$ac_help
149   --enable-shared[=PKGS]  build shared libraries [default=yes]"
150 ac_help="$ac_help
151   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
152 ac_help="$ac_help
153   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
154 ac_help="$ac_help
155   --disable-libtool-lock  avoid locking (might break parallel builds)"
156
157 # Initialize some variables set by options.
158 # The variables have the same names as the options, with
159 # dashes changed to underlines.
160 build=NONE
161 cache_file=./config.cache
162 exec_prefix=NONE
163 host=NONE
164 no_create=
165 nonopt=NONE
166 no_recursion=
167 prefix=NONE
168 program_prefix=NONE
169 program_suffix=NONE
170 program_transform_name=s,x,x,
171 silent=
172 site=
173 srcdir=
174 target=NONE
175 verbose=
176 x_includes=NONE
177 x_libraries=NONE
178 bindir='${exec_prefix}/bin'
179 sbindir='${exec_prefix}/sbin'
180 libexecdir='${exec_prefix}/libexec'
181 datadir='${prefix}/share'
182 sysconfdir='${prefix}/etc'
183 sharedstatedir='${prefix}/com'
184 localstatedir='${prefix}/var'
185 libdir='${exec_prefix}/lib'
186 includedir='${prefix}/include'
187 oldincludedir='/usr/include'
188 infodir='${prefix}/info'
189 mandir='${prefix}/man'
190
191 # Initialize some other variables.
192 subdirs=
193 MFLAGS= MAKEFLAGS=
194 SHELL=${CONFIG_SHELL-/bin/sh}
195 # Maximum number of lines to put in a shell here document.
196 ac_max_here_lines=12
197
198 ac_prev=
199 for ac_option
200 do
201
202   # If the previous option needs an argument, assign it.
203   if test -n "$ac_prev"; then
204     eval "$ac_prev=\$ac_option"
205     ac_prev=
206     continue
207   fi
208
209   case "$ac_option" in
210   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
211   *) ac_optarg= ;;
212   esac
213
214   # Accept the important Cygnus configure options, so we can diagnose typos.
215
216   case "$ac_option" in
217
218   -bindir | --bindir | --bindi | --bind | --bin | --bi)
219     ac_prev=bindir ;;
220   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
221     bindir="$ac_optarg" ;;
222
223   -build | --build | --buil | --bui | --bu)
224     ac_prev=build ;;
225   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
226     build="$ac_optarg" ;;
227
228   -cache-file | --cache-file | --cache-fil | --cache-fi \
229   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
230     ac_prev=cache_file ;;
231   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
232   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
233     cache_file="$ac_optarg" ;;
234
235   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
236     ac_prev=datadir ;;
237   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
238   | --da=*)
239     datadir="$ac_optarg" ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
243     # Reject names that are not valid shell variable names.
244     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
245       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
246     fi
247     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
248     eval "enable_${ac_feature}=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
252     # Reject names that are not valid shell variable names.
253     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
254       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
255     fi
256     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
257     case "$ac_option" in
258       *=*) ;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_${ac_feature}='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix="$ac_optarg" ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he)
277     # Omit some internal or obsolete options to make the list less imposing.
278     # This message is too long to be a string in the A/UX 3.1 sh.
279     cat << EOF
280 Usage: configure [options] [host]
281 Options: [defaults in brackets after descriptions]
282 Configuration:
283   --cache-file=FILE       cache test results in FILE
284   --help                  print this message
285   --no-create             do not create output files
286   --quiet, --silent       do not print \`checking...' messages
287   --version               print the version of autoconf that created configure
288 Directory and file names:
289   --prefix=PREFIX         install architecture-independent files in PREFIX
290                           [$ac_default_prefix]
291   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
292                           [same as prefix]
293   --bindir=DIR            user executables in DIR [EPREFIX/bin]
294   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
295   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
296   --datadir=DIR           read-only architecture-independent data in DIR
297                           [PREFIX/share]
298   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
299   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
300                           [PREFIX/com]
301   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
302   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
303   --includedir=DIR        C header files in DIR [PREFIX/include]
304   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
305   --infodir=DIR           info documentation in DIR [PREFIX/info]
306   --mandir=DIR            man documentation in DIR [PREFIX/man]
307   --srcdir=DIR            find the sources in DIR [configure dir or ..]
308   --program-prefix=PREFIX prepend PREFIX to installed program names
309   --program-suffix=SUFFIX append SUFFIX to installed program names
310   --program-transform-name=PROGRAM
311                           run sed PROGRAM on installed program names
312 EOF
313     cat << EOF
314 Host type:
315   --build=BUILD           configure for building on BUILD [BUILD=HOST]
316   --host=HOST             configure for HOST [guessed]
317   --target=TARGET         configure for TARGET [TARGET=HOST]
318 Features and packages:
319   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
320   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
321   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
322   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
323   --x-includes=DIR        X include files are in DIR
324   --x-libraries=DIR       X library files are in DIR
325 EOF
326     if test -n "$ac_help"; then
327       echo "--enable and --with options recognized:$ac_help"
328     fi
329     exit 0 ;;
330
331   -host | --host | --hos | --ho)
332     ac_prev=host ;;
333   -host=* | --host=* | --hos=* | --ho=*)
334     host="$ac_optarg" ;;
335
336   -includedir | --includedir | --includedi | --included | --include \
337   | --includ | --inclu | --incl | --inc)
338     ac_prev=includedir ;;
339   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
340   | --includ=* | --inclu=* | --incl=* | --inc=*)
341     includedir="$ac_optarg" ;;
342
343   -infodir | --infodir | --infodi | --infod | --info | --inf)
344     ac_prev=infodir ;;
345   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
346     infodir="$ac_optarg" ;;
347
348   -libdir | --libdir | --libdi | --libd)
349     ac_prev=libdir ;;
350   -libdir=* | --libdir=* | --libdi=* | --libd=*)
351     libdir="$ac_optarg" ;;
352
353   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
354   | --libexe | --libex | --libe)
355     ac_prev=libexecdir ;;
356   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
357   | --libexe=* | --libex=* | --libe=*)
358     libexecdir="$ac_optarg" ;;
359
360   -localstatedir | --localstatedir | --localstatedi | --localstated \
361   | --localstate | --localstat | --localsta | --localst \
362   | --locals | --local | --loca | --loc | --lo)
363     ac_prev=localstatedir ;;
364   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
365   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
366   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
367     localstatedir="$ac_optarg" ;;
368
369   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
370     ac_prev=mandir ;;
371   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
372     mandir="$ac_optarg" ;;
373
374   -nfp | --nfp | --nf)
375     # Obsolete; use --without-fp.
376     with_fp=no ;;
377
378   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
379   | --no-cr | --no-c)
380     no_create=yes ;;
381
382   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
383   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
384     no_recursion=yes ;;
385
386   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
387   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
388   | --oldin | --oldi | --old | --ol | --o)
389     ac_prev=oldincludedir ;;
390   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
391   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
392   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
393     oldincludedir="$ac_optarg" ;;
394
395   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
396     ac_prev=prefix ;;
397   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
398     prefix="$ac_optarg" ;;
399
400   -program-prefix | --program-prefix | --program-prefi | --program-pref \
401   | --program-pre | --program-pr | --program-p)
402     ac_prev=program_prefix ;;
403   -program-prefix=* | --program-prefix=* | --program-prefi=* \
404   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
405     program_prefix="$ac_optarg" ;;
406
407   -program-suffix | --program-suffix | --program-suffi | --program-suff \
408   | --program-suf | --program-su | --program-s)
409     ac_prev=program_suffix ;;
410   -program-suffix=* | --program-suffix=* | --program-suffi=* \
411   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
412     program_suffix="$ac_optarg" ;;
413
414   -program-transform-name | --program-transform-name \
415   | --program-transform-nam | --program-transform-na \
416   | --program-transform-n | --program-transform- \
417   | --program-transform | --program-transfor \
418   | --program-transfo | --program-transf \
419   | --program-trans | --program-tran \
420   | --progr-tra | --program-tr | --program-t)
421     ac_prev=program_transform_name ;;
422   -program-transform-name=* | --program-transform-name=* \
423   | --program-transform-nam=* | --program-transform-na=* \
424   | --program-transform-n=* | --program-transform-=* \
425   | --program-transform=* | --program-transfor=* \
426   | --program-transfo=* | --program-transf=* \
427   | --program-trans=* | --program-tran=* \
428   | --progr-tra=* | --program-tr=* | --program-t=*)
429     program_transform_name="$ac_optarg" ;;
430
431   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
432   | -silent | --silent | --silen | --sile | --sil)
433     silent=yes ;;
434
435   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
436     ac_prev=sbindir ;;
437   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
438   | --sbi=* | --sb=*)
439     sbindir="$ac_optarg" ;;
440
441   -sharedstatedir | --sharedstatedir | --sharedstatedi \
442   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
443   | --sharedst | --shareds | --shared | --share | --shar \
444   | --sha | --sh)
445     ac_prev=sharedstatedir ;;
446   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
447   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
448   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
449   | --sha=* | --sh=*)
450     sharedstatedir="$ac_optarg" ;;
451
452   -site | --site | --sit)
453     ac_prev=site ;;
454   -site=* | --site=* | --sit=*)
455     site="$ac_optarg" ;;
456
457   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
458     ac_prev=srcdir ;;
459   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
460     srcdir="$ac_optarg" ;;
461
462   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
463   | --syscon | --sysco | --sysc | --sys | --sy)
464     ac_prev=sysconfdir ;;
465   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
466   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
467     sysconfdir="$ac_optarg" ;;
468
469   -target | --target | --targe | --targ | --tar | --ta | --t)
470     ac_prev=target ;;
471   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
472     target="$ac_optarg" ;;
473
474   -v | -verbose | --verbose | --verbos | --verbo | --verb)
475     verbose=yes ;;
476
477   -version | --version | --versio | --versi | --vers)
478     echo "configure generated by autoconf version 2.13.1"
479     exit 0 ;;
480
481   -with-* | --with-*)
482     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
483     # Reject names that are not valid shell variable names.
484     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
485       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
486     fi
487     ac_package=`echo $ac_package| sed 's/-/_/g'`
488     case "$ac_option" in
489       *=*) ;;
490       *) ac_optarg=yes ;;
491     esac
492     eval "with_${ac_package}='$ac_optarg'" ;;
493
494   -without-* | --without-*)
495     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
496     # Reject names that are not valid shell variable names.
497     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
498       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
499     fi
500     ac_package=`echo $ac_package| sed 's/-/_/g'`
501     eval "with_${ac_package}=no" ;;
502
503   --x)
504     # Obsolete; use --with-x.
505     with_x=yes ;;
506
507   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
508   | --x-incl | --x-inc | --x-in | --x-i)
509     ac_prev=x_includes ;;
510   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
511   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
512     x_includes="$ac_optarg" ;;
513
514   -x-libraries | --x-libraries | --x-librarie | --x-librari \
515   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
516     ac_prev=x_libraries ;;
517   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
518   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
519     x_libraries="$ac_optarg" ;;
520
521   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
522     ;;
523
524   *)
525     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
526       echo "configure: warning: $ac_option: invalid host type" 1>&2
527     fi
528     if test "x$nonopt" != xNONE; then
529       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
530     fi
531     nonopt="$ac_option"
532     ;;
533
534   esac
535 done
536
537 if test -n "$ac_prev"; then
538   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
539 fi
540
541 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
542
543 # File descriptor usage:
544 # 0 standard input
545 # 1 file creation
546 # 2 errors and warnings
547 # 3 some systems may open it to /dev/tty
548 # 4 used on the Kubota Titan
549 # 6 checking for... messages and results
550 # 5 compiler messages saved in config.log
551 if test "$silent" = yes; then
552   exec 6>/dev/null
553 else
554   exec 6>&1
555 fi
556 exec 5>./config.log
557
558 echo "\
559 This file contains any messages produced by compilers while
560 running configure, to aid debugging if configure makes a mistake.
561 " 1>&5
562
563 # Strip out --no-create and --no-recursion so they do not pile up.
564 # Also quote any args containing shell metacharacters.
565 ac_configure_args=
566 for ac_arg
567 do
568   case "$ac_arg" in
569   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
570   | --no-cr | --no-c) ;;
571   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
572   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
573   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
574   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
575   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
576   esac
577 done
578
579 # NLS nuisances.
580 # Only set these to C if already set.  These must not be set unconditionally
581 # because not all systems understand e.g. LANG=C (notably SCO).
582 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
583 # Non-C LC_CTYPE values break the ctype check.
584 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
585 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
586 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
587 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
588
589 # confdefs.h avoids OS command line length limits that DEFS can exceed.
590 rm -rf conftest* confdefs.h
591 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
592 echo > confdefs.h
593
594 # A filename unique to this package, relative to the directory that
595 # configure is in, which we can look for to find out if srcdir is correct.
596 ac_unique_file=build/version.sh
597
598 # Find the source files, if location was not specified.
599 if test -z "$srcdir"; then
600   ac_srcdir_defaulted=yes
601   # Try the directory containing this script, then its parent.
602   ac_prog=$0
603   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
604   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
605   srcdir=$ac_confdir
606   if test ! -r $srcdir/$ac_unique_file; then
607     srcdir=..
608   fi
609 else
610   ac_srcdir_defaulted=no
611 fi
612 if test ! -r $srcdir/$ac_unique_file; then
613   if test "$ac_srcdir_defaulted" = yes; then
614     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
615   else
616     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
617   fi
618 fi
619 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
620
621 # Prefer explicitly selected file to automatically selected ones.
622 if test -z "$CONFIG_SITE"; then
623   if test "x$prefix" != xNONE; then
624     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
625   else
626     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
627   fi
628 fi
629 for ac_site_file in $CONFIG_SITE; do
630   if test -r "$ac_site_file"; then
631     echo "loading site script $ac_site_file"
632     . "$ac_site_file"
633   fi
634 done
635
636
637 ac_ext=c
638 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
639 ac_cpp='$CPP $CPPFLAGS'
640 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
641 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
642 cross_compiling=$ac_cv_prog_cc_cross
643
644 ac_exeext=
645 ac_objext=o
646 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
647   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
648   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
649     ac_n= ac_c='
650 ' ac_t='        '
651   else
652     ac_n=-n ac_c= ac_t=
653   fi
654 else
655   ac_n= ac_c='\c' ac_t=
656 fi
657
658
659 # set unset (borrowed from autoconf 2.49c)
660 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
661   ol_unset=unset
662 else
663   ol_unset=false
664 fi
665 # unset CDPATH
666 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
667
668 ac_aux_dir=
669 for ac_dir in build $srcdir/build; do
670   if test -f $ac_dir/install-sh; then
671     ac_aux_dir=$ac_dir
672     ac_install_sh="$ac_aux_dir/install-sh -c"
673     break
674   elif test -f $ac_dir/install.sh; then
675     ac_aux_dir=$ac_dir
676     ac_install_sh="$ac_aux_dir/install.sh -c"
677     break
678   elif test -f $ac_dir/shtool; then
679     ac_aux_dir=$ac_dir
680     ac_install_sh="$ac_aux_dir/shtool install -c"
681     break
682   fi
683 done
684 if test -z "$ac_aux_dir"; then
685   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
686 fi
687 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
688 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
689 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
690
691 eval `$ac_aux_dir/version.sh`
692 if test -z "$OL_STRING"; then
693         { echo "configure: error: could not determine version" 1>&2; exit 1; }
694 fi
695
696 echo "Configuring $OL_STRING ..."
697
698
699 echo $ac_n "checking host system type""... $ac_c" 1>&6
700 echo "configure:701: checking host system type" >&5
701 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
702
703 # Make sure we can run config.sub.
704   if $ac_config_sub sun4 >/dev/null 2>&1; then :
705     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
706   fi
707
708   ac_cv_host_alias=$host
709   case "$ac_cv_host_alias" in
710   NONE)
711     case $nonopt in
712     NONE)
713       if ac_cv_host_alias=`$ac_config_guess`; then :
714       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
715       fi ;;
716     *) ac_cv_host_alias=$nonopt ;;
717     esac ;;
718   esac
719
720   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
721   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
722   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
723   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
724 else
725   echo $ac_n "(cached) $ac_c" 1>&6
726 fi
727
728 echo "$ac_t""$ac_cv_host" 1>&6
729
730 host=$ac_cv_host
731 host_alias=$ac_cv_host_alias
732 host_cpu=$ac_cv_host_cpu
733 host_vendor=$ac_cv_host_vendor
734 host_os=$ac_cv_host_os
735
736
737
738
739
740 echo $ac_n "checking target system type""... $ac_c" 1>&6
741 echo "configure:742: checking target system type" >&5
742 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
743
744 # Make sure we can run config.sub.
745   if $ac_config_sub sun4 >/dev/null 2>&1; then :
746     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
747   fi
748
749   ac_cv_target_alias=$target
750   case "$ac_cv_target_alias" in
751   NONE)
752     case $nonopt in
753     NONE)
754       ac_cv_target_alias=$host_alias ;;
755
756     *) ac_cv_target_alias=$nonopt ;;
757     esac ;;
758   esac
759
760   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
761   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
762   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
763   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
764 else
765   echo $ac_n "(cached) $ac_c" 1>&6
766 fi
767
768 echo "$ac_t""$ac_cv_target" 1>&6
769
770 target=$ac_cv_target
771 target_alias=$ac_cv_target_alias
772 target_cpu=$ac_cv_target_cpu
773 target_vendor=$ac_cv_target_vendor
774 target_os=$ac_cv_target_os
775
776
777
778
779
780 echo $ac_n "checking build system type""... $ac_c" 1>&6
781 echo "configure:782: checking build system type" >&5
782 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
783
784 # Make sure we can run config.sub.
785   if $ac_config_sub sun4 >/dev/null 2>&1; then :
786     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
787   fi
788
789   ac_cv_build_alias=$build
790   case "$ac_cv_build_alias" in
791   NONE)
792     case $nonopt in
793     NONE)
794       ac_cv_build_alias=$host_alias ;;
795
796     *) ac_cv_build_alias=$nonopt ;;
797     esac ;;
798   esac
799
800   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
801   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
802   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
803   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
804 else
805   echo $ac_n "(cached) $ac_c" 1>&6
806 fi
807
808 echo "$ac_t""$ac_cv_build" 1>&6
809
810 build=$ac_cv_build
811 build_alias=$ac_cv_build_alias
812 build_cpu=$ac_cv_build_cpu
813 build_vendor=$ac_cv_build_vendor
814 build_os=$ac_cv_build_os
815
816
817
818
819
820 # Do some error checking and defaulting for the host and target type.
821 # The inputs are:
822 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
823 #
824 # The rules are:
825 # 1. You are not allowed to specify --host, --target, and nonopt at the
826 #    same time.
827 # 2. Host defaults to nonopt.
828 # 3. If nonopt is not specified, then host defaults to the current host,
829 #    as determined by config.guess.
830 # 4. Target and build default to nonopt.
831 # 5. If nonopt is not specified, then target and build default to host.
832
833 # The aliases save the names the user supplied, while $host etc.
834 # will get canonicalized.
835 case $host---$target---$nonopt in
836 NONE---*---* | *---NONE---* | *---*---NONE) ;;
837 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
838 esac
839
840 test "$host_alias" != "$target_alias" &&
841   test "$program_prefix$program_suffix$program_transform_name" = \
842     NONENONEs,x,x, &&
843   program_prefix=${target_alias}-
844
845
846 # Find a good install program.  We prefer a C program (faster),
847 # so one script is as good as another.  But avoid the broken or
848 # incompatible versions:
849 # SysV /etc/install, /usr/sbin/install
850 # SunOS /usr/etc/install
851 # IRIX /sbin/install
852 # AIX /bin/install
853 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
854 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
855 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
856 # ./install, which can be erroneously created by make from ./install.sh.
857 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
858 echo "configure:859: checking for a BSD compatible install" >&5
859 if test -z "$INSTALL"; then
860 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
861   echo $ac_n "(cached) $ac_c" 1>&6
862 else
863     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
864   for ac_dir in $PATH; do
865     # Account for people who put trailing slashes in PATH elements.
866     case "$ac_dir/" in
867     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
868     *)
869       # OSF1 and SCO ODT 3.0 have their own names for install.
870       # Don't use installbsd from OSF since it installs stuff as root
871       # by default.
872       for ac_prog in ginstall scoinst install; do
873         if test -f $ac_dir/$ac_prog; then
874           if test $ac_prog = install &&
875             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
876             # AIX install.  It has an incompatible calling convention.
877             :
878           elif test $ac_prog = install &&
879             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
880             # program-specific install script used by HP pwplus--don't use.
881             :
882           else
883             ac_cv_path_install="$ac_dir/$ac_prog -c"
884             break 2
885           fi
886         fi
887       done
888       ;;
889     esac
890   done
891   IFS="$ac_save_IFS"
892
893 fi
894   if test "${ac_cv_path_install+set}" = set; then
895     INSTALL="$ac_cv_path_install"
896   else
897     # As a last resort, use the slow shell script.  We don't cache a
898     # path for INSTALL within a source directory, because that will
899     # break other packages using the cache if that directory is
900     # removed, or if the path is relative.
901     INSTALL="$ac_install_sh"
902   fi
903 fi
904 echo "$ac_t""$INSTALL" 1>&6
905
906 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
907 # It thinks the first close brace ends the variable substitution.
908 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
909
910 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
911
912 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
913
914 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
915 echo "configure:916: checking whether build environment is sane" >&5
916 # Just in case
917 sleep 1
918 echo timestamp > conftestfile
919 # Do `set' in a subshell so we don't clobber the current shell's
920 # arguments.  Must try -L first in case configure is actually a
921 # symlink; some systems play weird games with the mod time of symlinks
922 # (eg FreeBSD returns the mod time of the symlink's containing
923 # directory).
924 if (
925    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
926    if test "$*" = "X"; then
927       # -L didn't work.
928       set X `ls -t $srcdir/configure conftestfile`
929    fi
930    if test "$*" != "X $srcdir/configure conftestfile" \
931       && test "$*" != "X conftestfile $srcdir/configure"; then
932
933       # If neither matched, then we have a broken ls.  This can happen
934       # if, for instance, CONFIG_SHELL is bash and it inherits a
935       # broken ls alias from the environment.  This has actually
936       # happened.  Such a system could not be considered "sane".
937       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
938 alias in your environment" 1>&2; exit 1; }
939    fi
940
941    test "$2" = conftestfile
942    )
943 then
944    # Ok.
945    :
946 else
947    { echo "configure: error: newly created file is older than distributed files!
948 Check your system clock" 1>&2; exit 1; }
949 fi
950 rm -f conftest*
951 echo "$ac_t""yes" 1>&6
952 if test "$program_transform_name" = s,x,x,; then
953   program_transform_name=
954 else
955   # Double any \ or $.  echo might interpret backslashes.
956   cat <<\EOF_SED > conftestsed
957 s,\\,\\\\,g; s,\$,$$,g
958 EOF_SED
959   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
960   rm -f conftestsed
961 fi
962 test "$program_prefix" != NONE &&
963   program_transform_name="s,^,${program_prefix},;$program_transform_name"
964 # Use a double $ so make ignores it.
965 test "$program_suffix" != NONE &&
966   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
967
968 # sed with no file args requires a program.
969 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
970
971 for ac_prog in mawk gawk nawk awk
972 do
973 # Extract the first word of "$ac_prog", so it can be a program name with args.
974 set dummy $ac_prog; ac_word=$2
975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
976 echo "configure:977: checking for $ac_word" >&5
977 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   if test -n "$AWK"; then
981   ac_cv_prog_AWK="$AWK" # Let the user override the test.
982 else
983   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
984   ac_dummy="$PATH"
985   for ac_dir in $ac_dummy; do
986     test -z "$ac_dir" && ac_dir=.
987     if test -f $ac_dir/$ac_word; then
988       ac_cv_prog_AWK="$ac_prog"
989       break
990     fi
991   done
992   IFS="$ac_save_ifs"
993 fi
994 fi
995 AWK="$ac_cv_prog_AWK"
996 if test -n "$AWK"; then
997   echo "$ac_t""$AWK" 1>&6
998 else
999   echo "$ac_t""no" 1>&6
1000 fi
1001
1002 test -n "$AWK" && break
1003 done
1004
1005 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1006 echo "configure:1007: checking whether ${MAKE-make} sets \${MAKE}" >&5
1007 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1008 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1009   echo $ac_n "(cached) $ac_c" 1>&6
1010 else
1011   cat > conftestmake <<\EOF
1012 all:
1013         @echo 'ac_maketemp="${MAKE}"'
1014 EOF
1015 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1016 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1017 if test -n "$ac_maketemp"; then
1018   eval ac_cv_prog_make_${ac_make}_set=yes
1019 else
1020   eval ac_cv_prog_make_${ac_make}_set=no
1021 fi
1022 rm -f conftestmake
1023 fi
1024 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1025   echo "$ac_t""yes" 1>&6
1026   SET_MAKE=
1027 else
1028   echo "$ac_t""no" 1>&6
1029   SET_MAKE="MAKE=${MAKE-make}"
1030 fi
1031
1032
1033
1034 PACKAGE=$OL_PACKAGE
1035
1036 VERSION=$OL_VERSION
1037
1038 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1039   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1040 fi
1041
1042
1043
1044 missing_dir=`cd $ac_aux_dir && pwd`
1045 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working aclocal" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1051    ACLOCAL=aclocal
1052    echo "$ac_t""found" 1>&6
1053 else
1054    ACLOCAL="$missing_dir/missing aclocal"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working autoconf" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOCONF=autoconf
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOCONF="$missing_dir/missing autoconf"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working automake" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (automake --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOMAKE=automake
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOMAKE="$missing_dir/missing automake"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working autoheader" >&5
1086 # Run test in a subshell; some versions of sh will print an error if
1087 # an executable is not found, even if stderr is redirected.
1088 # Redirect stdin to placate older versions of autoconf.  Sigh.
1089 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1090    AUTOHEADER=autoheader
1091    echo "$ac_t""found" 1>&6
1092 else
1093    AUTOHEADER="$missing_dir/missing autoheader"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1098 echo "configure:1099: checking for working makeinfo" >&5
1099 # Run test in a subshell; some versions of sh will print an error if
1100 # an executable is not found, even if stderr is redirected.
1101 # Redirect stdin to placate older versions of autoconf.  Sigh.
1102 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1103    MAKEINFO=makeinfo
1104    echo "$ac_t""found" 1>&6
1105 else
1106    MAKEINFO="$missing_dir/missing makeinfo"
1107    echo "$ac_t""missing" 1>&6
1108 fi
1109
1110 install_sh="$missing_dir/install-sh"
1111 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1112
1113 for ac_prog in gnutar gtar tar
1114 do
1115 # Extract the first word of "$ac_prog", so it can be a program name with args.
1116 set dummy $ac_prog; ac_word=$2
1117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1118 echo "configure:1119: checking for $ac_word" >&5
1119 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1120   echo $ac_n "(cached) $ac_c" 1>&6
1121 else
1122   if test -n "$AMTAR"; then
1123   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1124 else
1125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1126   ac_dummy="$PATH"
1127   for ac_dir in $ac_dummy; do
1128     test -z "$ac_dir" && ac_dir=.
1129     if test -f $ac_dir/$ac_word; then
1130       ac_cv_prog_AMTAR="$ac_prog"
1131       break
1132     fi
1133   done
1134   IFS="$ac_save_ifs"
1135 fi
1136 fi
1137 AMTAR="$ac_cv_prog_AMTAR"
1138 if test -n "$AMTAR"; then
1139   echo "$ac_t""$AMTAR" 1>&6
1140 else
1141   echo "$ac_t""no" 1>&6
1142 fi
1143
1144 test -n "$AMTAR" && break
1145 done
1146
1147
1148 AMTARFLAGS=
1149 if test -n "$AMTAR"; then
1150   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1151         AMTARFLAGS=o
1152   fi
1153 fi
1154
1155 cat >> confdefs.h <<EOF
1156 #define OPENLDAP_PACKAGE "$PACKAGE"
1157 EOF
1158
1159 cat >> confdefs.h <<EOF
1160 #define OPENLDAP_VERSION "$VERSION"
1161 EOF
1162
1163
1164 cat >> confdefs.h <<EOF
1165 #define LDAP_VENDOR_VERSION $OL_API_INC
1166 EOF
1167
1168 cat >> confdefs.h <<EOF
1169 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1170 EOF
1171
1172 cat >> confdefs.h <<EOF
1173 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1174 EOF
1175
1176 cat >> confdefs.h <<EOF
1177 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1178 EOF
1179
1180
1181 OPENLDAP_LIBVERSION=$OL_API_LIB
1182
1183
1184
1185 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1186 echo "configure:1187: checking configure arguments" >&5
1187
1188
1189 top_builddir=`pwd`
1190
1191 ldap_subdir="/openldap"
1192
1193 # Check whether --with-subdir or --without-subdir was given.
1194 if test "${with_subdir+set}" = set; then
1195   withval="$with_subdir"
1196   case "$withval" in
1197         no) ldap_subdir=""
1198                 ;;
1199         yes)
1200                 ;;
1201         /*|\\*)
1202                 ldap_subdir="$withval"
1203                 ;;
1204         *)
1205                 ldap_subdir="/$withval"
1206                 ;;
1207 esac
1208
1209 fi
1210
1211
1212 # OpenLDAP --enable-debug
1213         # Check whether --enable-debug or --disable-debug was given.
1214 if test "${enable_debug+set}" = set; then
1215   enableval="$enable_debug"
1216   
1217         ol_arg=invalid
1218         for ol_val in auto yes no ; do
1219                 if test "$enableval" = "$ol_val" ; then
1220                         ol_arg="$ol_val"
1221                 fi
1222         done
1223         if test "$ol_arg" = "invalid" ; then
1224                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1225         fi
1226         ol_enable_debug="$ol_arg"
1227
1228 else
1229         ol_enable_debug="yes"
1230 fi
1231 # end --enable-debug
1232 # OpenLDAP --enable-syslog
1233         # Check whether --enable-syslog or --disable-syslog was given.
1234 if test "${enable_syslog+set}" = set; then
1235   enableval="$enable_syslog"
1236   
1237         ol_arg=invalid
1238         for ol_val in auto yes no ; do
1239                 if test "$enableval" = "$ol_val" ; then
1240                         ol_arg="$ol_val"
1241                 fi
1242         done
1243         if test "$ol_arg" = "invalid" ; then
1244                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1245         fi
1246         ol_enable_syslog="$ol_arg"
1247
1248 else
1249         ol_enable_syslog="auto"
1250 fi
1251 # end --enable-syslog
1252 # OpenLDAP --enable-proctitle
1253         # Check whether --enable-proctitle or --disable-proctitle was given.
1254 if test "${enable_proctitle+set}" = set; then
1255   enableval="$enable_proctitle"
1256   
1257         ol_arg=invalid
1258         for ol_val in auto yes no ; do
1259                 if test "$enableval" = "$ol_val" ; then
1260                         ol_arg="$ol_val"
1261                 fi
1262         done
1263         if test "$ol_arg" = "invalid" ; then
1264                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1265         fi
1266         ol_enable_proctitle="$ol_arg"
1267
1268 else
1269         ol_enable_proctitle="yes"
1270 fi
1271 # end --enable-proctitle
1272 # OpenLDAP --enable-cache
1273         # Check whether --enable-cache or --disable-cache was given.
1274 if test "${enable_cache+set}" = set; then
1275   enableval="$enable_cache"
1276   
1277         ol_arg=invalid
1278         for ol_val in auto yes no ; do
1279                 if test "$enableval" = "$ol_val" ; then
1280                         ol_arg="$ol_val"
1281                 fi
1282         done
1283         if test "$ol_arg" = "invalid" ; then
1284                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1285         fi
1286         ol_enable_cache="$ol_arg"
1287
1288 else
1289         ol_enable_cache="no"
1290 fi
1291 # end --enable-cache
1292 # OpenLDAP --enable-referrals
1293         # Check whether --enable-referrals or --disable-referrals was given.
1294 if test "${enable_referrals+set}" = set; then
1295   enableval="$enable_referrals"
1296   
1297         ol_arg=invalid
1298         for ol_val in auto yes no ; do
1299                 if test "$enableval" = "$ol_val" ; then
1300                         ol_arg="$ol_val"
1301                 fi
1302         done
1303         if test "$ol_arg" = "invalid" ; then
1304                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1305         fi
1306         ol_enable_referrals="$ol_arg"
1307
1308 else
1309         ol_enable_referrals="no"
1310 fi
1311 # end --enable-referrals
1312 # OpenLDAP --enable-kbind
1313         # Check whether --enable-kbind or --disable-kbind was given.
1314 if test "${enable_kbind+set}" = set; then
1315   enableval="$enable_kbind"
1316   
1317         ol_arg=invalid
1318         for ol_val in auto yes no ; do
1319                 if test "$enableval" = "$ol_val" ; then
1320                         ol_arg="$ol_val"
1321                 fi
1322         done
1323         if test "$ol_arg" = "invalid" ; then
1324                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1325         fi
1326         ol_enable_kbind="$ol_arg"
1327
1328 else
1329         ol_enable_kbind="no"
1330 fi
1331 # end --enable-kbind
1332 # OpenLDAP --enable-ipv6
1333         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1334 if test "${enable_ipv6+set}" = set; then
1335   enableval="$enable_ipv6"
1336   
1337         ol_arg=invalid
1338         for ol_val in auto yes no ; do
1339                 if test "$enableval" = "$ol_val" ; then
1340                         ol_arg="$ol_val"
1341                 fi
1342         done
1343         if test "$ol_arg" = "invalid" ; then
1344                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1345         fi
1346         ol_enable_ipv6="$ol_arg"
1347
1348 else
1349         ol_enable_ipv6="auto"
1350 fi
1351 # end --enable-ipv6
1352 # OpenLDAP --enable-local
1353         # Check whether --enable-local or --disable-local was given.
1354 if test "${enable_local+set}" = set; then
1355   enableval="$enable_local"
1356   
1357         ol_arg=invalid
1358         for ol_val in auto yes no ; do
1359                 if test "$enableval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1365         fi
1366         ol_enable_local="$ol_arg"
1367
1368 else
1369         ol_enable_local="auto"
1370 fi
1371 # end --enable-local
1372 # OpenLDAP --enable-rewrite
1373         # Check whether --enable-rewrite or --disable-rewrite was given.
1374 if test "${enable_rewrite+set}" = set; then
1375   enableval="$enable_rewrite"
1376   
1377         ol_arg=invalid
1378         for ol_val in auto yes no ; do
1379                 if test "$enableval" = "$ol_val" ; then
1380                         ol_arg="$ol_val"
1381                 fi
1382         done
1383         if test "$ol_arg" = "invalid" ; then
1384                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1385         fi
1386         ol_enable_rewrite="$ol_arg"
1387
1388 else
1389         ol_enable_rewrite="no"
1390 fi
1391 # end --enable-rewrite
1392 # OpenLDAP --enable-x_compile
1393         # Check whether --enable-x_compile or --disable-x_compile was given.
1394 if test "${enable_x_compile+set}" = set; then
1395   enableval="$enable_x_compile"
1396   
1397         ol_arg=invalid
1398         for ol_val in yes no ; do
1399                 if test "$enableval" = "$ol_val" ; then
1400                         ol_arg="$ol_val"
1401                 fi
1402         done
1403         if test "$ol_arg" = "invalid" ; then
1404                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1405         fi
1406         ol_enable_x_compile="$ol_arg"
1407
1408 else
1409         ol_enable_x_compile="no"
1410 fi
1411 # end --enable-x_compile
1412
1413
1414 # OpenLDAP --with-cyrus_sasl
1415         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1416 if test "${with_cyrus_sasl+set}" = set; then
1417   withval="$with_cyrus_sasl"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no  ; do
1421                 if test "$withval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1427         fi
1428         ol_with_cyrus_sasl="$ol_arg"
1429
1430 else
1431         ol_with_cyrus_sasl="auto"
1432 fi
1433 # end --with-cyrus_sasl
1434
1435 # OpenLDAP --with-fetch
1436         # Check whether --with-fetch or --without-fetch was given.
1437 if test "${with_fetch+set}" = set; then
1438   withval="$with_fetch"
1439   
1440         ol_arg=invalid
1441         for ol_val in auto yes no  ; do
1442                 if test "$withval" = "$ol_val" ; then
1443                         ol_arg="$ol_val"
1444                 fi
1445         done
1446         if test "$ol_arg" = "invalid" ; then
1447                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1448         fi
1449         ol_with_fetch="$ol_arg"
1450
1451 else
1452         ol_with_fetch="auto"
1453 fi
1454 # end --with-fetch
1455
1456 # OpenLDAP --with-kerberos
1457         # Check whether --with-kerberos or --without-kerberos was given.
1458 if test "${with_kerberos+set}" = set; then
1459   withval="$with_kerberos"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1463                 if test "$withval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1469         fi
1470         ol_with_kerberos="$ol_arg"
1471
1472 else
1473         ol_with_kerberos="auto"
1474 fi
1475 # end --with-kerberos
1476
1477 # OpenLDAP --with-readline
1478         # Check whether --with-readline or --without-readline was given.
1479 if test "${with_readline+set}" = set; then
1480   withval="$with_readline"
1481   
1482         ol_arg=invalid
1483         for ol_val in auto yes no  ; do
1484                 if test "$withval" = "$ol_val" ; then
1485                         ol_arg="$ol_val"
1486                 fi
1487         done
1488         if test "$ol_arg" = "invalid" ; then
1489                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1490         fi
1491         ol_with_readline="$ol_arg"
1492
1493 else
1494         ol_with_readline="auto"
1495 fi
1496 # end --with-readline
1497
1498 # OpenLDAP --with-threads
1499         # Check whether --with-threads or --without-threads was given.
1500 if test "${with_threads+set}" = set; then
1501   withval="$with_threads"
1502   
1503         ol_arg=invalid
1504         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1505                 if test "$withval" = "$ol_val" ; then
1506                         ol_arg="$ol_val"
1507                 fi
1508         done
1509         if test "$ol_arg" = "invalid" ; then
1510                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1511         fi
1512         ol_with_threads="$ol_arg"
1513
1514 else
1515         ol_with_threads="auto"
1516 fi
1517 # end --with-threads
1518
1519 # OpenLDAP --with-tls
1520         # Check whether --with-tls or --without-tls was given.
1521 if test "${with_tls+set}" = set; then
1522   withval="$with_tls"
1523   
1524         ol_arg=invalid
1525         for ol_val in auto ssleay openssl yes no  ; do
1526                 if test "$withval" = "$ol_val" ; then
1527                         ol_arg="$ol_val"
1528                 fi
1529         done
1530         if test "$ol_arg" = "invalid" ; then
1531                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1532         fi
1533         ol_with_tls="$ol_arg"
1534
1535 else
1536         ol_with_tls="auto"
1537 fi
1538 # end --with-tls
1539
1540 # OpenLDAP --with-yielding_select
1541         # Check whether --with-yielding_select or --without-yielding_select was given.
1542 if test "${with_yielding_select+set}" = set; then
1543   withval="$with_yielding_select"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no manual  ; do
1547                 if test "$withval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1553         fi
1554         ol_with_yielding_select="$ol_arg"
1555
1556 else
1557         ol_with_yielding_select="auto"
1558 fi
1559 # end --with-yielding_select
1560
1561
1562
1563 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1564 if test "${with_xxslapdoptions+set}" = set; then
1565   withval="$with_xxslapdoptions"
1566   :
1567 fi
1568
1569 # OpenLDAP --enable-slapd
1570         # Check whether --enable-slapd or --disable-slapd was given.
1571 if test "${enable_slapd+set}" = set; then
1572   enableval="$enable_slapd"
1573   
1574         ol_arg=invalid
1575         for ol_val in auto yes no ; do
1576                 if test "$enableval" = "$ol_val" ; then
1577                         ol_arg="$ol_val"
1578                 fi
1579         done
1580         if test "$ol_arg" = "invalid" ; then
1581                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1582         fi
1583         ol_enable_slapd="$ol_arg"
1584
1585 else
1586         ol_enable_slapd="yes"
1587 fi
1588 # end --enable-slapd
1589 # OpenLDAP --enable-aci
1590         # Check whether --enable-aci or --disable-aci was given.
1591 if test "${enable_aci+set}" = set; then
1592   enableval="$enable_aci"
1593   
1594         ol_arg=invalid
1595         for ol_val in auto yes no ; do
1596                 if test "$enableval" = "$ol_val" ; then
1597                         ol_arg="$ol_val"
1598                 fi
1599         done
1600         if test "$ol_arg" = "invalid" ; then
1601                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1602         fi
1603         ol_enable_aci="$ol_arg"
1604
1605 else
1606         ol_enable_aci="no"
1607 fi
1608 # end --enable-aci
1609 # OpenLDAP --enable-cleartext
1610         # Check whether --enable-cleartext or --disable-cleartext was given.
1611 if test "${enable_cleartext+set}" = set; then
1612   enableval="$enable_cleartext"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no ; do
1616                 if test "$enableval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1622         fi
1623         ol_enable_cleartext="$ol_arg"
1624
1625 else
1626         ol_enable_cleartext="yes"
1627 fi
1628 # end --enable-cleartext
1629 # OpenLDAP --enable-crypt
1630         # Check whether --enable-crypt or --disable-crypt was given.
1631 if test "${enable_crypt+set}" = set; then
1632   enableval="$enable_crypt"
1633   
1634         ol_arg=invalid
1635         for ol_val in auto yes no ; do
1636                 if test "$enableval" = "$ol_val" ; then
1637                         ol_arg="$ol_val"
1638                 fi
1639         done
1640         if test "$ol_arg" = "invalid" ; then
1641                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1642         fi
1643         ol_enable_crypt="$ol_arg"
1644
1645 else
1646         ol_enable_crypt="no"
1647 fi
1648 # end --enable-crypt
1649 # OpenLDAP --enable-dynamic
1650         # Check whether --enable-dynamic or --disable-dynamic was given.
1651 if test "${enable_dynamic+set}" = set; then
1652   enableval="$enable_dynamic"
1653   
1654         ol_arg=invalid
1655         for ol_val in auto yes no ; do
1656                 if test "$enableval" = "$ol_val" ; then
1657                         ol_arg="$ol_val"
1658                 fi
1659         done
1660         if test "$ol_arg" = "invalid" ; then
1661                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1662         fi
1663         ol_enable_dynamic="$ol_arg"
1664
1665 else
1666         ol_enable_dynamic="no"
1667 fi
1668 # end --enable-dynamic
1669 # OpenLDAP --enable-kpasswd
1670         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1671 if test "${enable_kpasswd+set}" = set; then
1672   enableval="$enable_kpasswd"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1682         fi
1683         ol_enable_kpasswd="$ol_arg"
1684
1685 else
1686         ol_enable_kpasswd="no"
1687 fi
1688 # end --enable-kpasswd
1689 # OpenLDAP --enable-lmpasswd
1690         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1691 if test "${enable_lmpasswd+set}" = set; then
1692   enableval="$enable_lmpasswd"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1702         fi
1703         ol_enable_lmpasswd="$ol_arg"
1704
1705 else
1706         ol_enable_lmpasswd="no"
1707 fi
1708 # end --enable-lmpasswd
1709 # OpenLDAP --enable-spasswd
1710         # Check whether --enable-spasswd or --disable-spasswd was given.
1711 if test "${enable_spasswd+set}" = set; then
1712   enableval="$enable_spasswd"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1722         fi
1723         ol_enable_spasswd="$ol_arg"
1724
1725 else
1726         ol_enable_spasswd="no"
1727 fi
1728 # end --enable-spasswd
1729 # OpenLDAP --enable-modules
1730         # Check whether --enable-modules or --disable-modules was given.
1731 if test "${enable_modules+set}" = set; then
1732   enableval="$enable_modules"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1742         fi
1743         ol_enable_modules="$ol_arg"
1744
1745 else
1746         ol_enable_modules="no"
1747 fi
1748 # end --enable-modules
1749 # OpenLDAP --enable-phonetic
1750         # Check whether --enable-phonetic or --disable-phonetic was given.
1751 if test "${enable_phonetic+set}" = set; then
1752   enableval="$enable_phonetic"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1762         fi
1763         ol_enable_phonetic="$ol_arg"
1764
1765 else
1766         ol_enable_phonetic="no"
1767 fi
1768 # end --enable-phonetic
1769 # OpenLDAP --enable-rlookups
1770         # Check whether --enable-rlookups or --disable-rlookups was given.
1771 if test "${enable_rlookups+set}" = set; then
1772   enableval="$enable_rlookups"
1773   
1774         ol_arg=invalid
1775         for ol_val in auto yes no ; do
1776                 if test "$enableval" = "$ol_val" ; then
1777                         ol_arg="$ol_val"
1778                 fi
1779         done
1780         if test "$ol_arg" = "invalid" ; then
1781                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1782         fi
1783         ol_enable_rlookups="$ol_arg"
1784
1785 else
1786         ol_enable_rlookups="no"
1787 fi
1788 # end --enable-rlookups
1789 # OpenLDAP --enable-slp
1790         # Check whether --enable-slp or --disable-slp was given.
1791 if test "${enable_slp+set}" = set; then
1792   enableval="$enable_slp"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1802         fi
1803         ol_enable_slp="$ol_arg"
1804
1805 else
1806         ol_enable_slp="no"
1807 fi
1808 # end --enable-slp
1809 # OpenLDAP --enable-wrappers
1810         # Check whether --enable-wrappers or --disable-wrappers was given.
1811 if test "${enable_wrappers+set}" = set; then
1812   enableval="$enable_wrappers"
1813   
1814         ol_arg=invalid
1815         for ol_val in auto yes no ; do
1816                 if test "$enableval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1822         fi
1823         ol_enable_wrappers="$ol_arg"
1824
1825 else
1826         ol_enable_wrappers="no"
1827 fi
1828 # end --enable-wrappers
1829
1830 # OpenLDAP --enable-bdb
1831         # Check whether --enable-bdb or --disable-bdb was given.
1832 if test "${enable_bdb+set}" = set; then
1833   enableval="$enable_bdb"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1843         fi
1844         ol_enable_bdb="$ol_arg"
1845
1846 else
1847         ol_enable_bdb="no"
1848 fi
1849 # end --enable-bdb
1850 # OpenLDAP --with-bdb_module
1851         # Check whether --with-bdb_module or --without-bdb_module was given.
1852 if test "${with_bdb_module+set}" = set; then
1853   withval="$with_bdb_module"
1854   
1855         ol_arg=invalid
1856         for ol_val in static dynamic ; do
1857                 if test "$withval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1863         fi
1864         ol_with_bdb_module="$ol_arg"
1865
1866 else
1867         ol_with_bdb_module="static"
1868 fi
1869 # end --with-bdb_module
1870
1871 # OpenLDAP --enable-dnssrv
1872         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1873 if test "${enable_dnssrv+set}" = set; then
1874   enableval="$enable_dnssrv"
1875   
1876         ol_arg=invalid
1877         for ol_val in auto yes no ; do
1878                 if test "$enableval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1884         fi
1885         ol_enable_dnssrv="$ol_arg"
1886
1887 else
1888         ol_enable_dnssrv="no"
1889 fi
1890 # end --enable-dnssrv
1891 # OpenLDAP --with-dnssrv_module
1892         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1893 if test "${with_dnssrv_module+set}" = set; then
1894   withval="$with_dnssrv_module"
1895   
1896         ol_arg=invalid
1897         for ol_val in static dynamic ; do
1898                 if test "$withval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1904         fi
1905         ol_with_dnssrv_module="$ol_arg"
1906
1907 else
1908         ol_with_dnssrv_module="static"
1909 fi
1910 # end --with-dnssrv_module
1911
1912 # OpenLDAP --enable-ldap
1913         # Check whether --enable-ldap or --disable-ldap was given.
1914 if test "${enable_ldap+set}" = set; then
1915   enableval="$enable_ldap"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto yes no ; do
1919                 if test "$enableval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1925         fi
1926         ol_enable_ldap="$ol_arg"
1927
1928 else
1929         ol_enable_ldap="no"
1930 fi
1931 # end --enable-ldap
1932 # OpenLDAP --with-ldap_module
1933         # Check whether --with-ldap_module or --without-ldap_module was given.
1934 if test "${with_ldap_module+set}" = set; then
1935   withval="$with_ldap_module"
1936   
1937         ol_arg=invalid
1938         for ol_val in static dynamic ; do
1939                 if test "$withval" = "$ol_val" ; then
1940                         ol_arg="$ol_val"
1941                 fi
1942         done
1943         if test "$ol_arg" = "invalid" ; then
1944                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1945         fi
1946         ol_with_ldap_module="$ol_arg"
1947
1948 else
1949         ol_with_ldap_module="static"
1950 fi
1951 # end --with-ldap_module
1952
1953 # OpenLDAP --enable-ldbm
1954         # Check whether --enable-ldbm or --disable-ldbm was given.
1955 if test "${enable_ldbm+set}" = set; then
1956   enableval="$enable_ldbm"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1966         fi
1967         ol_enable_ldbm="$ol_arg"
1968
1969 else
1970         ol_enable_ldbm="yes"
1971 fi
1972 # end --enable-ldbm
1973 # OpenLDAP --with-ldbm_api
1974         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1975 if test "${with_ldbm_api+set}" = set; then
1976   withval="$with_ldbm_api"
1977   
1978         ol_arg=invalid
1979         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1980                 if test "$withval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1986         fi
1987         ol_with_ldbm_api="$ol_arg"
1988
1989 else
1990         ol_with_ldbm_api="auto"
1991 fi
1992 # end --with-ldbm_api
1993
1994 # OpenLDAP --with-ldbm_module
1995         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1996 if test "${with_ldbm_module+set}" = set; then
1997   withval="$with_ldbm_module"
1998   
1999         ol_arg=invalid
2000         for ol_val in static dynamic ; do
2001                 if test "$withval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2007         fi
2008         ol_with_ldbm_module="$ol_arg"
2009
2010 else
2011         ol_with_ldbm_module="static"
2012 fi
2013 # end --with-ldbm_module
2014
2015 # OpenLDAP --with-ldbm_type
2016         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2017 if test "${with_ldbm_type+set}" = set; then
2018   withval="$with_ldbm_type"
2019   
2020         ol_arg=invalid
2021         for ol_val in auto btree hash ; do
2022                 if test "$withval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2028         fi
2029         ol_with_ldbm_type="$ol_arg"
2030
2031 else
2032         ol_with_ldbm_type="auto"
2033 fi
2034 # end --with-ldbm_type
2035
2036 # OpenLDAP --enable-meta
2037         # Check whether --enable-meta or --disable-meta was given.
2038 if test "${enable_meta+set}" = set; then
2039   enableval="$enable_meta"
2040   
2041         ol_arg=invalid
2042         for ol_val in auto yes no ; do
2043                 if test "$enableval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2049         fi
2050         ol_enable_meta="$ol_arg"
2051
2052 else
2053         ol_enable_meta="no"
2054 fi
2055 # end --enable-meta
2056 # OpenLDAP --with-meta_module
2057         # Check whether --with-meta_module or --without-meta_module was given.
2058 if test "${with_meta_module+set}" = set; then
2059   withval="$with_meta_module"
2060   
2061         ol_arg=invalid
2062         for ol_val in static dynamic ; do
2063                 if test "$withval" = "$ol_val" ; then
2064                         ol_arg="$ol_val"
2065                 fi
2066         done
2067         if test "$ol_arg" = "invalid" ; then
2068                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2069         fi
2070         ol_with_meta_module="$ol_arg"
2071
2072 else
2073         ol_with_meta_module="static"
2074 fi
2075 # end --with-meta_module
2076
2077 # OpenLDAP --enable-monitor
2078         # Check whether --enable-monitor or --disable-monitor was given.
2079 if test "${enable_monitor+set}" = set; then
2080   enableval="$enable_monitor"
2081   
2082         ol_arg=invalid
2083         for ol_val in auto yes no ; do
2084                 if test "$enableval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2090         fi
2091         ol_enable_monitor="$ol_arg"
2092
2093 else
2094         ol_enable_monitor="no"
2095 fi
2096 # end --enable-monitor
2097 # OpenLDAP --with-monitor_module
2098         # Check whether --with-monitor_module or --without-monitor_module was given.
2099 if test "${with_monitor_module+set}" = set; then
2100   withval="$with_monitor_module"
2101   
2102         ol_arg=invalid
2103         for ol_val in static dynamic ; do
2104                 if test "$withval" = "$ol_val" ; then
2105                         ol_arg="$ol_val"
2106                 fi
2107         done
2108         if test "$ol_arg" = "invalid" ; then
2109                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2110         fi
2111         ol_with_monitor_module="$ol_arg"
2112
2113 else
2114         ol_with_monitor_module="static"
2115 fi
2116 # end --with-monitor_module
2117
2118 # OpenLDAP --enable-passwd
2119         # Check whether --enable-passwd or --disable-passwd was given.
2120 if test "${enable_passwd+set}" = set; then
2121   enableval="$enable_passwd"
2122   
2123         ol_arg=invalid
2124         for ol_val in auto yes no ; do
2125                 if test "$enableval" = "$ol_val" ; then
2126                         ol_arg="$ol_val"
2127                 fi
2128         done
2129         if test "$ol_arg" = "invalid" ; then
2130                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2131         fi
2132         ol_enable_passwd="$ol_arg"
2133
2134 else
2135         ol_enable_passwd="no"
2136 fi
2137 # end --enable-passwd
2138 # OpenLDAP --with-passwd_module
2139         # Check whether --with-passwd_module or --without-passwd_module was given.
2140 if test "${with_passwd_module+set}" = set; then
2141   withval="$with_passwd_module"
2142   
2143         ol_arg=invalid
2144         for ol_val in static dynamic ; do
2145                 if test "$withval" = "$ol_val" ; then
2146                         ol_arg="$ol_val"
2147                 fi
2148         done
2149         if test "$ol_arg" = "invalid" ; then
2150                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2151         fi
2152         ol_with_passwd_module="$ol_arg"
2153
2154 else
2155         ol_with_passwd_module="static"
2156 fi
2157 # end --with-passwd_module
2158
2159 # OpenLDAP --enable-perl
2160         # Check whether --enable-perl or --disable-perl was given.
2161 if test "${enable_perl+set}" = set; then
2162   enableval="$enable_perl"
2163   
2164         ol_arg=invalid
2165         for ol_val in auto yes no ; do
2166                 if test "$enableval" = "$ol_val" ; then
2167                         ol_arg="$ol_val"
2168                 fi
2169         done
2170         if test "$ol_arg" = "invalid" ; then
2171                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2172         fi
2173         ol_enable_perl="$ol_arg"
2174
2175 else
2176         ol_enable_perl="no"
2177 fi
2178 # end --enable-perl
2179 # OpenLDAP --with-perl_module
2180         # Check whether --with-perl_module or --without-perl_module was given.
2181 if test "${with_perl_module+set}" = set; then
2182   withval="$with_perl_module"
2183   
2184         ol_arg=invalid
2185         for ol_val in static dynamic ; do
2186                 if test "$withval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2192         fi
2193         ol_with_perl_module="$ol_arg"
2194
2195 else
2196         ol_with_perl_module="static"
2197 fi
2198 # end --with-perl_module
2199
2200 # OpenLDAP --enable-shell
2201         # Check whether --enable-shell or --disable-shell was given.
2202 if test "${enable_shell+set}" = set; then
2203   enableval="$enable_shell"
2204   
2205         ol_arg=invalid
2206         for ol_val in auto yes no ; do
2207                 if test "$enableval" = "$ol_val" ; then
2208                         ol_arg="$ol_val"
2209                 fi
2210         done
2211         if test "$ol_arg" = "invalid" ; then
2212                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2213         fi
2214         ol_enable_shell="$ol_arg"
2215
2216 else
2217         ol_enable_shell="no"
2218 fi
2219 # end --enable-shell
2220 # OpenLDAP --with-shell_module
2221         # Check whether --with-shell_module or --without-shell_module was given.
2222 if test "${with_shell_module+set}" = set; then
2223   withval="$with_shell_module"
2224   
2225         ol_arg=invalid
2226         for ol_val in static dynamic ; do
2227                 if test "$withval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2233         fi
2234         ol_with_shell_module="$ol_arg"
2235
2236 else
2237         ol_with_shell_module="static"
2238 fi
2239 # end --with-shell_module
2240
2241 # OpenLDAP --enable-sql
2242         # Check whether --enable-sql or --disable-sql was given.
2243 if test "${enable_sql+set}" = set; then
2244   enableval="$enable_sql"
2245   
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2254         fi
2255         ol_enable_sql="$ol_arg"
2256
2257 else
2258         ol_enable_sql="no"
2259 fi
2260 # end --enable-sql
2261 # OpenLDAP --with-sql_module
2262         # Check whether --with-sql_module or --without-sql_module was given.
2263 if test "${with_sql_module+set}" = set; then
2264   withval="$with_sql_module"
2265   
2266         ol_arg=invalid
2267         for ol_val in static dynamic ; do
2268                 if test "$withval" = "$ol_val" ; then
2269                         ol_arg="$ol_val"
2270                 fi
2271         done
2272         if test "$ol_arg" = "invalid" ; then
2273                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2274         fi
2275         ol_with_sql_module="$ol_arg"
2276
2277 else
2278         ol_with_sql_module="static"
2279 fi
2280 # end --with-sql_module
2281
2282 # OpenLDAP --enable-tcl
2283         # Check whether --enable-tcl or --disable-tcl was given.
2284 if test "${enable_tcl+set}" = set; then
2285   enableval="$enable_tcl"
2286   
2287         ol_arg=invalid
2288         for ol_val in auto yes no ; do
2289                 if test "$enableval" = "$ol_val" ; then
2290                         ol_arg="$ol_val"
2291                 fi
2292         done
2293         if test "$ol_arg" = "invalid" ; then
2294                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2295         fi
2296         ol_enable_tcl="$ol_arg"
2297
2298 else
2299         ol_enable_tcl="no"
2300 fi
2301 # end --enable-tcl
2302 # OpenLDAP --with-tcl_module
2303         # Check whether --with-tcl_module or --without-tcl_module was given.
2304 if test "${with_tcl_module+set}" = set; then
2305   withval="$with_tcl_module"
2306   
2307         ol_arg=invalid
2308         for ol_val in static dynamic ; do
2309                 if test "$withval" = "$ol_val" ; then
2310                         ol_arg="$ol_val"
2311                 fi
2312         done
2313         if test "$ol_arg" = "invalid" ; then
2314                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2315         fi
2316         ol_with_tcl_module="$ol_arg"
2317
2318 else
2319         ol_with_tcl_module="static"
2320 fi
2321 # end --with-tcl_module
2322
2323
2324 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2325 if test "${with_xxslurpdoptions+set}" = set; then
2326   withval="$with_xxslurpdoptions"
2327   :
2328 fi
2329
2330 # OpenLDAP --enable-slurpd
2331         # Check whether --enable-slurpd or --disable-slurpd was given.
2332 if test "${enable_slurpd+set}" = set; then
2333   enableval="$enable_slurpd"
2334   
2335         ol_arg=invalid
2336         for ol_val in auto yes no ; do
2337                 if test "$enableval" = "$ol_val" ; then
2338                         ol_arg="$ol_val"
2339                 fi
2340         done
2341         if test "$ol_arg" = "invalid" ; then
2342                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2343         fi
2344         ol_enable_slurpd="$ol_arg"
2345
2346 else
2347         ol_enable_slurpd="auto"
2348 fi
2349 # end --enable-slurpd
2350
2351 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2352 if test "${with_xxliboptions+set}" = set; then
2353   withval="$with_xxliboptions"
2354   :
2355 fi
2356
2357 # Check whether --enable-static or --disable-static was given.
2358 if test "${enable_static+set}" = set; then
2359   enableval="$enable_static"
2360   p=${PACKAGE-default}
2361 case "$enableval" in
2362 yes) enable_static=yes ;;
2363 no) enable_static=no ;;
2364 *)
2365   enable_static=no
2366   # Look at the argument we got.  We use all the common list separators.
2367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2368   for pkg in $enableval; do
2369     if test "X$pkg" = "X$p"; then
2370       enable_static=yes
2371     fi
2372   done
2373   IFS="$ac_save_ifs"
2374   ;;
2375 esac
2376 else
2377   enable_static=yes
2378 fi
2379
2380 # Check whether --enable-shared or --disable-shared was given.
2381 if test "${enable_shared+set}" = set; then
2382   enableval="$enable_shared"
2383   p=${PACKAGE-default}
2384 case "$enableval" in
2385 yes) enable_shared=yes ;;
2386 no) enable_shared=no ;;
2387 *)
2388   enable_shared=no
2389   # Look at the argument we got.  We use all the common list separators.
2390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2391   for pkg in $enableval; do
2392     if test "X$pkg" = "X$p"; then
2393       enable_shared=yes
2394     fi
2395   done
2396   IFS="$ac_save_ifs"
2397   ;;
2398 esac
2399 else
2400   enable_shared=yes
2401 fi
2402
2403
2404
2405 # validate options
2406 if test $ol_enable_slapd = no ; then
2407                 if test $ol_enable_bdb = yes ; then
2408                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2409         fi
2410         if test $ol_enable_dnssrv = yes ; then
2411                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2412         fi
2413         if test $ol_enable_ldap = yes ; then
2414                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2415         fi
2416         if test $ol_enable_ldbm = yes ; then
2417                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2418         fi
2419         if test $ol_enable_meta = yes ; then
2420                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2421         fi
2422         if test $ol_enable_monitor = yes ; then
2423                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2424         fi
2425         if test $ol_enable_passwd = yes ; then
2426                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2427         fi
2428         if test $ol_enable_perl = yes ; then
2429                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2430         fi
2431         if test $ol_enable_shell = yes ; then
2432                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2433         fi
2434         if test $ol_enable_tcl = yes ; then
2435                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2436         fi
2437         if test $ol_enable_sql = yes ; then
2438                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2439         fi
2440         if test $ol_enable_modules = yes ; then
2441                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2442         fi
2443         if test $ol_enable_wrappers = yes ; then
2444                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2445         fi
2446         if test $ol_enable_phonetic = yes ; then
2447                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2448         fi
2449         if test $ol_enable_rlookups = yes ; then
2450                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2451         fi
2452         if test $ol_enable_aci = yes ; then
2453                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2454         fi
2455         if test $ol_with_ldbm_api != auto ; then
2456                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2457         fi
2458         if test $ol_with_ldbm_type != auto ; then
2459                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2460         fi
2461         if test $ol_with_bdb_module != static ; then
2462                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2463         fi
2464         if test $ol_with_dnssrv_module != static ; then
2465                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2466         fi
2467         if test $ol_with_ldap_module != static ; then
2468                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2469         fi
2470         if test $ol_with_ldbm_module != static ; then
2471                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2472         fi
2473         if test $ol_with_meta_module != static ; then
2474                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2475         fi
2476         if test $ol_with_monitor_module != static ; then
2477                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2478         fi
2479         if test $ol_with_passwd_module != static ; then
2480                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2481         fi
2482         if test $ol_with_perl_module != static ; then
2483                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2484         fi
2485         if test $ol_with_shell_module != static ; then
2486                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2487         fi
2488         if test $ol_with_tcl_module != static ; then
2489                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2490         fi
2491         if test $ol_with_sql_module != static ; then
2492                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2493         fi
2494         if test $ol_enable_slurpd = yes ; then
2495                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2496         fi
2497         if test $ol_enable_rewrite = yes ; then
2498                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2499         fi
2500
2501         # force settings to no
2502         ol_enable_bdb=no
2503         ol_enable_dnssrv=no
2504         ol_enable_ldap=no
2505         ol_enable_ldbm=no
2506         ol_enable_meta=no
2507         ol_enable_monitor=no
2508         ol_enable_passwd=no
2509         ol_enable_perl=no
2510         ol_enable_shell=no
2511         ol_enable_tcl=no
2512         ol_enable_sql=no
2513
2514         ol_enable_modules=no
2515         ol_enable_phonetic=no
2516         ol_enable_rlookups=no
2517         ol_enable_aci=no
2518         ol_enable_wrappers=no
2519         ol_enable_dynamic=no
2520
2521         ol_with_ldbm_api=no
2522         ol_with_ldbm_type=no
2523
2524         ol_with_bdb_module=static
2525         ol_with_dnssrv_module=static
2526         ol_with_ldap_module=static
2527         ol_with_ldbm_module=static
2528         ol_with_meta_module=static
2529         ol_with_monitor_module=static
2530         ol_with_passwd_module=static
2531         ol_with_perl_module=static
2532         ol_with_shell_module=static
2533         ol_with_tcl_module=static
2534         ol_with_sql_module=static
2535
2536         ol_enable_slurpd=no
2537
2538         ol_enable_rewrite=no
2539
2540 elif test $ol_enable_ldbm = no ; then
2541         
2542         if test $ol_with_ldbm_api != auto ; then
2543                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2544         fi
2545
2546         if test $ol_with_ldbm_type != auto ; then
2547                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2548         fi
2549
2550         if test $ol_with_ldbm_module != static ; then
2551                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2552         fi
2553
2554         if test $ol_enable_modules != yes -a \
2555                 $ol_enable_bdb = no -a \
2556                 $ol_enable_dnssrv = no -a \
2557                 $ol_enable_ldap = no -a \
2558                 $ol_enable_meta = no -a \
2559                 $ol_enable_monitor = no -a \
2560                 $ol_enable_passwd = no -a \
2561                 $ol_enable_perl = no -a \
2562                 $ol_enable_shell = no -a \
2563                 $ol_enable_sql = no -a \
2564                 $ol_enable_tcl = no ; then
2565
2566                 if test $ol_enable_slapd = yes ; then
2567                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2568                 else
2569                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2570                         ol_enable_slapd=no
2571                 fi
2572         fi
2573
2574         ol_with_ldbm_api=no
2575         ol_with_ldbm_type=no
2576         ol_with_ldbm_module=static
2577
2578         if test $ol_enable_bdb != no ; then
2579                 ol_with_ldbm_api=berkeley
2580         fi
2581
2582 else
2583                 if test $ol_with_ldbm_api = gdbm -a \
2584                 $ol_with_ldbm_type = btree ; then
2585                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2586         fi
2587         if test $ol_with_ldbm_api = mdbm -a \
2588                 $ol_with_ldbm_type = btree ; then
2589                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2590         fi
2591         if test $ol_with_ldbm_api = ndbm -a \
2592                 $ol_with_ldbm_type = btree ; then
2593                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2594         fi
2595
2596         if test $ol_enable_bdb = yes ; then
2597                 if test $ol_with_ldbm_api = auto ; then
2598                         ol_with_ldbm_api=berkeley
2599                 elif test $ol_with_ldbm_api != berkeley ; then
2600                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2601                 fi
2602
2603         elif test $ol_enable_bdb = auto ; then
2604                 if test $ol_with_ldbm_api != berkeley \
2605                         -o $ol_with_ldbm_api != auto ; then
2606                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2607                         ol_enable_bdb=no
2608                 fi
2609         fi
2610 fi
2611
2612 if test $ol_enable_slurpd = yes ; then
2613                 if test $ol_with_threads = no ; then
2614                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2615         fi
2616 fi
2617
2618 if test $ol_enable_lmpasswd = yes ; then
2619         if test $ol_with_tls = no ; then
2620                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2621         fi
2622 fi
2623
2624 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2625         if test $ol_with_kerberos = no ; then
2626                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2627         elif test $ol_with_kerberos = auto ; then
2628                 ol_with_kerberos=yes
2629         fi
2630
2631 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2632         if test $ol_with_kerberos = auto ; then
2633                 ol_with_kerberos=no
2634         elif test $ol_with_kerberos != no ; then
2635                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2636                 ol_with_kerberos=no
2637         fi
2638 fi
2639
2640 if test $ol_enable_spasswd = yes ; then
2641         if test $ol_with_cyrus_sasl = no ; then
2642                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2643         fi
2644         ol_with_cyrus_sasl=yes
2645 fi
2646
2647 echo "$ac_t""done" 1>&6
2648
2649 LDAP_LIBS=
2650 LDIF_LIBS=
2651 LDBM_LIB=
2652 LDBM_LIBS=
2653 LTHREAD_LIBS=
2654 LUTIL_LIBS=
2655
2656 SLAPD_LIBS=
2657 SLURPD_LIBS=
2658
2659 BUILD_SLAPD=no
2660 BUILD_SLURPD=no
2661
2662 BUILD_THREAD=no
2663
2664 BUILD_BDB=no
2665 BUILD_DNSSRV=no
2666 BUILD_LDAP=no
2667 BUILD_LDBM=no
2668 BUILD_META=no
2669 BUILD_MONITOR=no
2670 BUILD_PASSWD=no
2671 BUILD_PERL=no
2672 BUILD_SHELL=no
2673 BUILD_SQL=no
2674 BUILD_TCL=no
2675
2676 BUILD_BDB_DYNAMIC=static
2677 BUILD_DNSSRV_DYNAMIC=static
2678 BUILD_LDAP_DYNAMIC=static
2679 BUILD_LDBM_DYNAMIC=static
2680 BUILD_META_DYNAMIC=static
2681 BUILD_MONITOR_DYNAMIC=static
2682 BUILD_PASSWD_DYNAMIC=static
2683 BUILD_PERL_DYNAMIC=static
2684 BUILD_SHELL_DYNAMIC=static
2685 BUILD_TCL_DYNAMIC=static
2686 BUILD_SQL_DYNAMIC=static
2687
2688 SLAPD_MODULES_LDFLAGS=
2689 SLAPD_MODULES_CPPFLAGS=
2690 SLAPD_MODULES_LIST=
2691
2692 SLAPD_STATIC_BACKENDS=
2693 SLAPD_DYNAMIC_BACKENDS=
2694
2695 SLAPD_PERL_LDFLAGS=
2696 MOD_PERL_LDFLAGS=
2697 PERL_CPPFLAGS=
2698
2699 SLAPD_SQL_LDFLAGS=
2700 SLAPD_SQL_LIBS=
2701 SLAPD_SQL_INCLUDES=
2702
2703 MOD_TCL_LIB=
2704 KRB4_LIBS=
2705 KRB5_LIBS=
2706 READLINE_LIBS=
2707 SASL_LIBS=
2708 TERMCAP_LIBS=
2709 TLS_LIBS=
2710 MODULES_LIBS=
2711 AUTH_LIBS=
2712
2713 SLAPD_SLP_LIBS=
2714
2715
2716
2717 cat >> confdefs.h <<\EOF
2718 #define HAVE_MKVERSION 1
2719 EOF
2720
2721
2722
2723
2724 ol_aix_threads=no
2725 case "$target" in
2726 *-*-aix*)       if test -z "$CC" ; then
2727                 case "$ol_with_threads" in
2728                 auto | yes |  posix) ol_aix_threads=yes ;;
2729                 esac
2730         fi
2731 ;;
2732 esac
2733
2734 if test $ol_aix_threads = yes ; then
2735         if test -z "${CC}" ; then
2736                 for ac_prog in cc_r xlc_r cc
2737 do
2738 # Extract the first word of "$ac_prog", so it can be a program name with args.
2739 set dummy $ac_prog; ac_word=$2
2740 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2741 echo "configure:2742: checking for $ac_word" >&5
2742 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2743   echo $ac_n "(cached) $ac_c" 1>&6
2744 else
2745   if test -n "$CC"; then
2746   ac_cv_prog_CC="$CC" # Let the user override the test.
2747 else
2748   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2749   ac_dummy="$PATH"
2750   for ac_dir in $ac_dummy; do
2751     test -z "$ac_dir" && ac_dir=.
2752     if test -f $ac_dir/$ac_word; then
2753       ac_cv_prog_CC="$ac_prog"
2754       break
2755     fi
2756   done
2757   IFS="$ac_save_ifs"
2758 fi
2759 fi
2760 CC="$ac_cv_prog_CC"
2761 if test -n "$CC"; then
2762   echo "$ac_t""$CC" 1>&6
2763 else
2764   echo "$ac_t""no" 1>&6
2765 fi
2766
2767 test -n "$CC" && break
2768 done
2769
2770
2771                 if test "$CC" = cc ; then
2772                                                 if test $ol_with_threads != auto ; then
2773                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2774                         else
2775                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2776                         fi
2777                         ol_with_threads=no
2778                 fi
2779         fi
2780
2781         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2782                 ol_with_threads=posix
2783                 ol_cv_pthread_create=yes
2784         fi
2785 fi
2786
2787 if test -z "${CC}"; then
2788         for ac_prog in cc
2789 do
2790 # Extract the first word of "$ac_prog", so it can be a program name with args.
2791 set dummy $ac_prog; ac_word=$2
2792 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2793 echo "configure:2794: checking for $ac_word" >&5
2794 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2795   echo $ac_n "(cached) $ac_c" 1>&6
2796 else
2797   if test -n "$CC"; then
2798   ac_cv_prog_CC="$CC" # Let the user override the test.
2799 else
2800   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2801   ac_dummy="$PATH"
2802   for ac_dir in $ac_dummy; do
2803     test -z "$ac_dir" && ac_dir=.
2804     if test -f $ac_dir/$ac_word; then
2805       ac_cv_prog_CC="$ac_prog"
2806       break
2807     fi
2808   done
2809   IFS="$ac_save_ifs"
2810 fi
2811 fi
2812 CC="$ac_cv_prog_CC"
2813 if test -n "$CC"; then
2814   echo "$ac_t""$CC" 1>&6
2815 else
2816   echo "$ac_t""no" 1>&6
2817 fi
2818
2819 test -n "$CC" && break
2820 done
2821
2822 fi
2823
2824
2825 for ac_prog in ar gar
2826 do
2827 # Extract the first word of "$ac_prog", so it can be a program name with args.
2828 set dummy $ac_prog; ac_word=$2
2829 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2830 echo "configure:2831: checking for $ac_word" >&5
2831 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2832   echo $ac_n "(cached) $ac_c" 1>&6
2833 else
2834   if test -n "$AR"; then
2835   ac_cv_prog_AR="$AR" # Let the user override the test.
2836 else
2837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2838   ac_dummy="$PATH"
2839   for ac_dir in $ac_dummy; do
2840     test -z "$ac_dir" && ac_dir=.
2841     if test -f $ac_dir/$ac_word; then
2842       ac_cv_prog_AR="$ac_prog"
2843       break
2844     fi
2845   done
2846   IFS="$ac_save_ifs"
2847 fi
2848 fi
2849 AR="$ac_cv_prog_AR"
2850 if test -n "$AR"; then
2851   echo "$ac_t""$AR" 1>&6
2852 else
2853   echo "$ac_t""no" 1>&6
2854 fi
2855
2856 test -n "$AR" && break
2857 done
2858 test -n "$AR" || AR="ar"
2859
2860
2861
2862
2863 # Check whether --enable-fast-install or --disable-fast-install was given.
2864 if test "${enable_fast_install+set}" = set; then
2865   enableval="$enable_fast_install"
2866   p=${PACKAGE-default}
2867 case "$enableval" in
2868 yes) enable_fast_install=yes ;;
2869 no) enable_fast_install=no ;;
2870 *)
2871   enable_fast_install=no
2872   # Look at the argument we got.  We use all the common list separators.
2873   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2874   for pkg in $enableval; do
2875     if test "X$pkg" = "X$p"; then
2876       enable_fast_install=yes
2877     fi
2878   done
2879   IFS="$ac_save_ifs"
2880   ;;
2881 esac
2882 else
2883   enable_fast_install=yes
2884 fi
2885
2886 # Extract the first word of "ranlib", so it can be a program name with args.
2887 set dummy ranlib; ac_word=$2
2888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2889 echo "configure:2890: checking for $ac_word" >&5
2890 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2891   echo $ac_n "(cached) $ac_c" 1>&6
2892 else
2893   if test -n "$RANLIB"; then
2894   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2895 else
2896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2897   ac_dummy="$PATH"
2898   for ac_dir in $ac_dummy; do
2899     test -z "$ac_dir" && ac_dir=.
2900     if test -f $ac_dir/$ac_word; then
2901       ac_cv_prog_RANLIB="ranlib"
2902       break
2903     fi
2904   done
2905   IFS="$ac_save_ifs"
2906   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2907 fi
2908 fi
2909 RANLIB="$ac_cv_prog_RANLIB"
2910 if test -n "$RANLIB"; then
2911   echo "$ac_t""$RANLIB" 1>&6
2912 else
2913   echo "$ac_t""no" 1>&6
2914 fi
2915
2916 # Extract the first word of "gcc", so it can be a program name with args.
2917 set dummy gcc; ac_word=$2
2918 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2919 echo "configure:2920: checking for $ac_word" >&5
2920 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2921   echo $ac_n "(cached) $ac_c" 1>&6
2922 else
2923   if test -n "$CC"; then
2924   ac_cv_prog_CC="$CC" # Let the user override the test.
2925 else
2926   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2927   ac_dummy="$PATH"
2928   for ac_dir in $ac_dummy; do
2929     test -z "$ac_dir" && ac_dir=.
2930     if test -f $ac_dir/$ac_word; then
2931       ac_cv_prog_CC="gcc"
2932       break
2933     fi
2934   done
2935   IFS="$ac_save_ifs"
2936 fi
2937 fi
2938 CC="$ac_cv_prog_CC"
2939 if test -n "$CC"; then
2940   echo "$ac_t""$CC" 1>&6
2941 else
2942   echo "$ac_t""no" 1>&6
2943 fi
2944
2945 if test -z "$CC"; then
2946   # Extract the first word of "cc", so it can be a program name with args.
2947 set dummy cc; ac_word=$2
2948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2949 echo "configure:2950: checking for $ac_word" >&5
2950 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953   if test -n "$CC"; then
2954   ac_cv_prog_CC="$CC" # Let the user override the test.
2955 else
2956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2957   ac_prog_rejected=no
2958   ac_dummy="$PATH"
2959   for ac_dir in $ac_dummy; do
2960     test -z "$ac_dir" && ac_dir=.
2961     if test -f $ac_dir/$ac_word; then
2962       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2963         ac_prog_rejected=yes
2964         continue
2965       fi
2966       ac_cv_prog_CC="cc"
2967       break
2968     fi
2969   done
2970   IFS="$ac_save_ifs"
2971 if test $ac_prog_rejected = yes; then
2972   # We found a bogon in the path, so make sure we never use it.
2973   set dummy $ac_cv_prog_CC
2974   shift
2975   if test $# -gt 0; then
2976     # We chose a different compiler from the bogus one.
2977     # However, it has the same basename, so the bogon will be chosen
2978     # first if we set CC to just the basename; use the full file name.
2979     shift
2980     set dummy "$ac_dir/$ac_word" "$@"
2981     shift
2982     ac_cv_prog_CC="$@"
2983   fi
2984 fi
2985 fi
2986 fi
2987 CC="$ac_cv_prog_CC"
2988 if test -n "$CC"; then
2989   echo "$ac_t""$CC" 1>&6
2990 else
2991   echo "$ac_t""no" 1>&6
2992 fi
2993
2994   if test -z "$CC"; then
2995     case "`uname -s`" in
2996     *win32* | *WIN32* | *CYGWIN*)
2997       # Extract the first word of "cl", so it can be a program name with args.
2998 set dummy cl; ac_word=$2
2999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3000 echo "configure:3001: checking for $ac_word" >&5
3001 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3002   echo $ac_n "(cached) $ac_c" 1>&6
3003 else
3004   if test -n "$CC"; then
3005   ac_cv_prog_CC="$CC" # Let the user override the test.
3006 else
3007   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3008   ac_dummy="$PATH"
3009   for ac_dir in $ac_dummy; do
3010     test -z "$ac_dir" && ac_dir=.
3011     if test -f $ac_dir/$ac_word; then
3012       ac_cv_prog_CC="cl"
3013       break
3014     fi
3015   done
3016   IFS="$ac_save_ifs"
3017 fi
3018 fi
3019 CC="$ac_cv_prog_CC"
3020 if test -n "$CC"; then
3021   echo "$ac_t""$CC" 1>&6
3022 else
3023   echo "$ac_t""no" 1>&6
3024 fi
3025  ;;
3026     esac
3027   fi
3028   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3029 fi
3030
3031 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3032 echo "configure:3033: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3033
3034 ac_ext=c
3035 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3036 ac_cpp='$CPP $CPPFLAGS'
3037 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3038 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3039 cross_compiling=$ac_cv_prog_cc_cross
3040
3041 cat > conftest.$ac_ext << EOF
3042
3043 #line 3044 "configure"
3044 #include "confdefs.h"
3045
3046 main(){return(0);}
3047 EOF
3048 if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3049   ac_cv_prog_cc_works=yes
3050   # If we can't run a trivial program, we are probably using a cross compiler.
3051   if (./conftest; exit) 2>/dev/null; then
3052     ac_cv_prog_cc_cross=no
3053   else
3054     ac_cv_prog_cc_cross=yes
3055   fi
3056 else
3057   echo "configure: failed program was:" >&5
3058   cat conftest.$ac_ext >&5
3059   ac_cv_prog_cc_works=no
3060 fi
3061 rm -fr conftest*
3062 ac_ext=c
3063 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3064 ac_cpp='$CPP $CPPFLAGS'
3065 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3066 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3067 cross_compiling=$ac_cv_prog_cc_cross
3068
3069 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3070 if test $ac_cv_prog_cc_works = no; then
3071   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3072 fi
3073 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3074 echo "configure:3075: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3075 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3076 cross_compiling=$ac_cv_prog_cc_cross
3077
3078 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3079 echo "configure:3080: checking whether we are using GNU C" >&5
3080 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   cat > conftest.c <<EOF
3084 #ifdef __GNUC__
3085   yes;
3086 #endif
3087 EOF
3088 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3089   ac_cv_prog_gcc=yes
3090 else
3091   ac_cv_prog_gcc=no
3092 fi
3093 fi
3094
3095 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3096
3097 if test $ac_cv_prog_gcc = yes; then
3098   GCC=yes
3099 else
3100   GCC=
3101 fi
3102
3103 ac_test_CFLAGS="${CFLAGS+set}"
3104 ac_save_CFLAGS="$CFLAGS"
3105 CFLAGS=
3106 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3107 echo "configure:3108: checking whether ${CC-cc} accepts -g" >&5
3108 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3109   echo $ac_n "(cached) $ac_c" 1>&6
3110 else
3111   echo 'void f(){}' > conftest.c
3112 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3113   ac_cv_prog_cc_g=yes
3114 else
3115   ac_cv_prog_cc_g=no
3116 fi
3117 rm -f conftest*
3118
3119 fi
3120
3121 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3122 if test "$ac_test_CFLAGS" = set; then
3123   CFLAGS="$ac_save_CFLAGS"
3124 elif test $ac_cv_prog_cc_g = yes; then
3125   if test "$GCC" = yes; then
3126     CFLAGS="-g -O2"
3127   else
3128     CFLAGS="-g"
3129   fi
3130 else
3131   if test "$GCC" = yes; then
3132     CFLAGS="-O2"
3133   else
3134     CFLAGS=
3135   fi
3136 fi
3137
3138 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3139 if test "${with_gnu_ld+set}" = set; then
3140   withval="$with_gnu_ld"
3141   test "$withval" = no || with_gnu_ld=yes
3142 else
3143   with_gnu_ld=no
3144 fi
3145
3146 ac_prog=ld
3147 if test "$ac_cv_prog_gcc" = yes; then
3148   # Check if gcc -print-prog-name=ld gives a path.
3149   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3150 echo "configure:3151: checking for ld used by GCC" >&5
3151   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3152   case "$ac_prog" in
3153     # Accept absolute paths.
3154     [\\/]* | [A-Za-z]:[\\/]*)
3155       re_direlt='/[^/][^/]*/\.\./'
3156       # Canonicalize the path of ld
3157       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3158       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3159         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3160       done
3161       test -z "$LD" && LD="$ac_prog"
3162       ;;
3163   "")
3164     # If it fails, then pretend we aren't using GCC.
3165     ac_prog=ld
3166     ;;
3167   *)
3168     # If it is relative, then search for the first ld in PATH.
3169     with_gnu_ld=unknown
3170     ;;
3171   esac
3172 elif test "$with_gnu_ld" = yes; then
3173   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3174 echo "configure:3175: checking for GNU ld" >&5
3175 else
3176   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3177 echo "configure:3178: checking for non-GNU ld" >&5
3178 fi
3179 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3180   echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182   if test -z "$LD"; then
3183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3184   for ac_dir in $PATH; do
3185     test -z "$ac_dir" && ac_dir=.
3186     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3187       ac_cv_path_LD="$ac_dir/$ac_prog"
3188       # Check to see if the program is GNU ld.  I'd rather use --version,
3189       # but apparently some GNU ld's only accept -v.
3190       # Break only if it was the GNU/non-GNU ld that we prefer.
3191       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3192         test "$with_gnu_ld" != no && break
3193       else
3194         test "$with_gnu_ld" != yes && break
3195       fi
3196     fi
3197   done
3198   IFS="$ac_save_ifs"
3199 else
3200   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3201 fi
3202 fi
3203
3204 LD="$ac_cv_path_LD"
3205 if test -n "$LD"; then
3206   echo "$ac_t""$LD" 1>&6
3207 else
3208   echo "$ac_t""no" 1>&6
3209 fi
3210 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3211 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3212 echo "configure:3213: checking if the linker ($LD) is GNU ld" >&5
3213 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3217 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3218   ac_cv_prog_gnu_ld=yes
3219 else
3220   ac_cv_prog_gnu_ld=no
3221 fi
3222 fi
3223
3224 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3225
3226
3227 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3228 echo "configure:3229: checking for BSD-compatible nm" >&5
3229 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3230   echo $ac_n "(cached) $ac_c" 1>&6
3231 else
3232   if test -n "$NM"; then
3233   # Let the user override the test.
3234   ac_cv_path_NM="$NM"
3235 else
3236   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3237   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3238     test -z "$ac_dir" && ac_dir=.
3239     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3240       # Check to see if the nm accepts a BSD-compat flag.
3241       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3242       #   nm: unknown option "B" ignored
3243       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3244         ac_cv_path_NM="$ac_dir/nm -B"
3245         break
3246       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3247         ac_cv_path_NM="$ac_dir/nm -p"
3248         break
3249       else
3250         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3251         continue # so that we can try to find one that supports BSD flags
3252       fi
3253     fi
3254   done
3255   IFS="$ac_save_ifs"
3256   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3257 fi
3258 fi
3259
3260 NM="$ac_cv_path_NM"
3261 echo "$ac_t""$NM" 1>&6
3262
3263 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3264 echo "configure:3265: checking whether ln -s works" >&5
3265 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3266   echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268   rm -f conftestdata
3269 if ln -s X conftestdata 2>/dev/null
3270 then
3271   rm -f conftestdata
3272   ac_cv_prog_LN_S="ln -s"
3273 else
3274   ac_cv_prog_LN_S=ln
3275 fi
3276 fi
3277 LN_S="$ac_cv_prog_LN_S"
3278 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3279   echo "$ac_t""yes" 1>&6
3280 else
3281   echo "$ac_t""no" 1>&6
3282 fi
3283
3284 if test $host != $build; then
3285   ac_tool_prefix=${host_alias}-
3286 else
3287   ac_tool_prefix=
3288 fi
3289
3290
3291 case "$target" in
3292 NONE) lt_target="$host" ;;
3293 *) lt_target="$target" ;;
3294 esac
3295
3296 # Check for any special flags to pass to ltconfig.
3297 libtool_flags="--cache-file=$cache_file"
3298 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3299 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3300 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3301 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3302 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3303 libtool_flags="$libtool_flags --enable-dlopen"
3304 libtool_flags="$libtool_flags --enable-win32-dll"
3305 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3306 if test "${enable_libtool_lock+set}" = set; then
3307   enableval="$enable_libtool_lock"
3308   :
3309 fi
3310
3311 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3312 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3313
3314 # Some flags need to be propagated to the compiler or linker for good
3315 # libtool support.
3316 case "$lt_target" in
3317 *-*-irix6*)
3318   # Find out which ABI we are using.
3319   echo '#line 3320 "configure"' > conftest.$ac_ext
3320   if { (eval echo configure:3321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3321     case "`/usr/bin/file conftest.o`" in
3322     *32-bit*)
3323       LD="${LD-ld} -32"
3324       ;;
3325     *N32*)
3326       LD="${LD-ld} -n32"
3327       ;;
3328     *64-bit*)
3329       LD="${LD-ld} -64"
3330       ;;
3331     esac
3332   fi
3333   rm -rf conftest*
3334   ;;
3335
3336 *-*-sco3.2v5*)
3337   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3338   SAVE_CFLAGS="$CFLAGS"
3339   CFLAGS="$CFLAGS -belf"
3340   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3341 echo "configure:3342: checking whether the C compiler needs -belf" >&5
3342 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3343   echo $ac_n "(cached) $ac_c" 1>&6
3344 else
3345   cat > conftest.$ac_ext <<EOF
3346 #line 3347 "configure"
3347 #include "confdefs.h"
3348
3349 int main() {
3350
3351 ; return 0; }
3352 EOF
3353 if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3354   rm -rf conftest*
3355   lt_cv_cc_needs_belf=yes
3356 else
3357   echo "configure: failed program was:" >&5
3358   cat conftest.$ac_ext >&5
3359   rm -rf conftest*
3360   lt_cv_cc_needs_belf=no
3361 fi
3362 rm -f conftest*
3363 fi
3364
3365 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3366   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3367     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3368     CFLAGS="$SAVE_CFLAGS"
3369   fi
3370   ;;
3371
3372 *-*-cygwin* | *-*-mingw*)
3373   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3374 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3376 echo "configure:3377: checking for $ac_word" >&5
3377 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   if test -n "$DLLTOOL"; then
3381   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3382 else
3383   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3384   ac_dummy="$PATH"
3385   for ac_dir in $ac_dummy; do
3386     test -z "$ac_dir" && ac_dir=.
3387     if test -f $ac_dir/$ac_word; then
3388       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3389       break
3390     fi
3391   done
3392   IFS="$ac_save_ifs"
3393 fi
3394 fi
3395 DLLTOOL="$ac_cv_prog_DLLTOOL"
3396 if test -n "$DLLTOOL"; then
3397   echo "$ac_t""$DLLTOOL" 1>&6
3398 else
3399   echo "$ac_t""no" 1>&6
3400 fi
3401
3402
3403 if test -z "$ac_cv_prog_DLLTOOL"; then
3404 if test -n "$ac_tool_prefix"; then
3405   # Extract the first word of "dlltool", so it can be a program name with args.
3406 set dummy dlltool; ac_word=$2
3407 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3408 echo "configure:3409: checking for $ac_word" >&5
3409 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3410   echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412   if test -n "$DLLTOOL"; then
3413   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3414 else
3415   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3416   ac_dummy="$PATH"
3417   for ac_dir in $ac_dummy; do
3418     test -z "$ac_dir" && ac_dir=.
3419     if test -f $ac_dir/$ac_word; then
3420       ac_cv_prog_DLLTOOL="dlltool"
3421       break
3422     fi
3423   done
3424   IFS="$ac_save_ifs"
3425   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3426 fi
3427 fi
3428 DLLTOOL="$ac_cv_prog_DLLTOOL"
3429 if test -n "$DLLTOOL"; then
3430   echo "$ac_t""$DLLTOOL" 1>&6
3431 else
3432   echo "$ac_t""no" 1>&6
3433 fi
3434
3435 else
3436   DLLTOOL="false"
3437 fi
3438 fi
3439
3440   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3441 set dummy ${ac_tool_prefix}as; ac_word=$2
3442 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3443 echo "configure:3444: checking for $ac_word" >&5
3444 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3445   echo $ac_n "(cached) $ac_c" 1>&6
3446 else
3447   if test -n "$AS"; then
3448   ac_cv_prog_AS="$AS" # Let the user override the test.
3449 else
3450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3451   ac_dummy="$PATH"
3452   for ac_dir in $ac_dummy; do
3453     test -z "$ac_dir" && ac_dir=.
3454     if test -f $ac_dir/$ac_word; then
3455       ac_cv_prog_AS="${ac_tool_prefix}as"
3456       break
3457     fi
3458   done
3459   IFS="$ac_save_ifs"
3460 fi
3461 fi
3462 AS="$ac_cv_prog_AS"
3463 if test -n "$AS"; then
3464   echo "$ac_t""$AS" 1>&6
3465 else
3466   echo "$ac_t""no" 1>&6
3467 fi
3468
3469
3470 if test -z "$ac_cv_prog_AS"; then
3471 if test -n "$ac_tool_prefix"; then
3472   # Extract the first word of "as", so it can be a program name with args.
3473 set dummy as; ac_word=$2
3474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3475 echo "configure:3476: checking for $ac_word" >&5
3476 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   if test -n "$AS"; then
3480   ac_cv_prog_AS="$AS" # Let the user override the test.
3481 else
3482   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3483   ac_dummy="$PATH"
3484   for ac_dir in $ac_dummy; do
3485     test -z "$ac_dir" && ac_dir=.
3486     if test -f $ac_dir/$ac_word; then
3487       ac_cv_prog_AS="as"
3488       break
3489     fi
3490   done
3491   IFS="$ac_save_ifs"
3492   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3493 fi
3494 fi
3495 AS="$ac_cv_prog_AS"
3496 if test -n "$AS"; then
3497   echo "$ac_t""$AS" 1>&6
3498 else
3499   echo "$ac_t""no" 1>&6
3500 fi
3501
3502 else
3503   AS="false"
3504 fi
3505 fi
3506
3507   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3508 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3509 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3510 echo "configure:3511: checking for $ac_word" >&5
3511 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3512   echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514   if test -n "$OBJDUMP"; then
3515   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3516 else
3517   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3518   ac_dummy="$PATH"
3519   for ac_dir in $ac_dummy; do
3520     test -z "$ac_dir" && ac_dir=.
3521     if test -f $ac_dir/$ac_word; then
3522       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3523       break
3524     fi
3525   done
3526   IFS="$ac_save_ifs"
3527 fi
3528 fi
3529 OBJDUMP="$ac_cv_prog_OBJDUMP"
3530 if test -n "$OBJDUMP"; then
3531   echo "$ac_t""$OBJDUMP" 1>&6
3532 else
3533   echo "$ac_t""no" 1>&6
3534 fi
3535
3536
3537 if test -z "$ac_cv_prog_OBJDUMP"; then
3538 if test -n "$ac_tool_prefix"; then
3539   # Extract the first word of "objdump", so it can be a program name with args.
3540 set dummy objdump; ac_word=$2
3541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3542 echo "configure:3543: checking for $ac_word" >&5
3543 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   if test -n "$OBJDUMP"; then
3547   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3548 else
3549   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3550   ac_dummy="$PATH"
3551   for ac_dir in $ac_dummy; do
3552     test -z "$ac_dir" && ac_dir=.
3553     if test -f $ac_dir/$ac_word; then
3554       ac_cv_prog_OBJDUMP="objdump"
3555       break
3556     fi
3557   done
3558   IFS="$ac_save_ifs"
3559   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3560 fi
3561 fi
3562 OBJDUMP="$ac_cv_prog_OBJDUMP"
3563 if test -n "$OBJDUMP"; then
3564   echo "$ac_t""$OBJDUMP" 1>&6
3565 else
3566   echo "$ac_t""no" 1>&6
3567 fi
3568
3569 else
3570   OBJDUMP="false"
3571 fi
3572 fi
3573
3574   ;;
3575
3576 esac
3577
3578
3579 # Save cache, so that ltconfig can load it
3580
3581
3582 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3583 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3584 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3585 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3586 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3587 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3588 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3589 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3590
3591 # Reload cache, that may have been modified by ltconfig
3592
3593
3594 # This can be used to rebuild libtool when needed
3595 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3596
3597 # Always use our own libtool.
3598 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3599
3600 # Redirect the config.log output again, so that the ltconfig log is not
3601 # clobbered by the next message.
3602 exec 5>>./config.log
3603
3604
3605 for ac_prog in mawk gawk nawk awk
3606 do
3607 # Extract the first word of "$ac_prog", so it can be a program name with args.
3608 set dummy $ac_prog; ac_word=$2
3609 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3610 echo "configure:3611: checking for $ac_word" >&5
3611 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3612   echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614   if test -n "$AWK"; then
3615   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3616 else
3617   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3618   ac_dummy="$PATH"
3619   for ac_dir in $ac_dummy; do
3620     test -z "$ac_dir" && ac_dir=.
3621     if test -f $ac_dir/$ac_word; then
3622       ac_cv_prog_AWK="$ac_prog"
3623       break
3624     fi
3625   done
3626   IFS="$ac_save_ifs"
3627 fi
3628 fi
3629 AWK="$ac_cv_prog_AWK"
3630 if test -n "$AWK"; then
3631   echo "$ac_t""$AWK" 1>&6
3632 else
3633   echo "$ac_t""no" 1>&6
3634 fi
3635
3636 test -n "$AWK" && break
3637 done
3638
3639 # test for ln hardlink support
3640 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3641 echo "configure:3642: checking whether ln works" >&5
3642 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3643   echo $ac_n "(cached) $ac_c" 1>&6
3644 else
3645   rm -f conftest.src conftest.dst
3646 echo "conftest" > conftest.src
3647 if ln conftest.src conftest.dst 2>/dev/null
3648 then
3649   ol_cv_prog_LN_H="ln"
3650 else
3651   ol_cv_prog_LN_H="cp"
3652 fi
3653 rm -f conftest.src conftest.dst
3654
3655 fi
3656 LN_H="$ol_cv_prog_LN_H"
3657 if test "$ol_cv_prog_LN_H" = "ln"; then
3658         echo "$ac_t""yes" 1>&6
3659 else
3660         echo "$ac_t""no" 1>&6
3661 fi
3662
3663 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3664 echo "configure:3665: checking whether ln -s works" >&5
3665 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   rm -f conftestdata
3669 if ln -s X conftestdata 2>/dev/null
3670 then
3671   rm -f conftestdata
3672   ac_cv_prog_LN_S="ln -s"
3673 else
3674   ac_cv_prog_LN_S=ln
3675 fi
3676 fi
3677 LN_S="$ac_cv_prog_LN_S"
3678 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3679   echo "$ac_t""yes" 1>&6
3680 else
3681   echo "$ac_t""no" 1>&6
3682 fi
3683
3684
3685 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3686         LN_S="$LN_H"
3687 fi
3688
3689 # Extract the first word of "sendmail", so it can be a program name with args.
3690 set dummy sendmail; ac_word=$2
3691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3692 echo "configure:3693: checking for $ac_word" >&5
3693 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3694   echo $ac_n "(cached) $ac_c" 1>&6
3695 else
3696   case "$SENDMAIL" in
3697   /*)
3698   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3699   ;;
3700   ?:/*)
3701   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3702   ;;
3703   *)
3704   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3705   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3706   for ac_dir in $ac_dummy; do 
3707     test -z "$ac_dir" && ac_dir=.
3708     if test -f $ac_dir/$ac_word; then
3709       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3710       break
3711     fi
3712   done
3713   IFS="$ac_save_ifs"
3714   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3715   ;;
3716 esac
3717 fi
3718 SENDMAIL="$ac_cv_path_SENDMAIL"
3719 if test -n "$SENDMAIL"; then
3720   echo "$ac_t""$SENDMAIL" 1>&6
3721 else
3722   echo "$ac_t""no" 1>&6
3723 fi
3724
3725 # Extract the first word of "vi", so it can be a program name with args.
3726 set dummy vi; ac_word=$2
3727 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3728 echo "configure:3729: checking for $ac_word" >&5
3729 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3730   echo $ac_n "(cached) $ac_c" 1>&6
3731 else
3732   case "$EDITOR" in
3733   /*)
3734   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3735   ;;
3736   ?:/*)
3737   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3738   ;;
3739   *)
3740   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3741   ac_dummy="$PATH:/usr/ucb"
3742   for ac_dir in $ac_dummy; do 
3743     test -z "$ac_dir" && ac_dir=.
3744     if test -f $ac_dir/$ac_word; then
3745       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3746       break
3747     fi
3748   done
3749   IFS="$ac_save_ifs"
3750   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3751   ;;
3752 esac
3753 fi
3754 EDITOR="$ac_cv_path_EDITOR"
3755 if test -n "$EDITOR"; then
3756   echo "$ac_t""$EDITOR" 1>&6
3757 else
3758   echo "$ac_t""no" 1>&6
3759 fi
3760
3761 # Extract the first word of "finger", so it can be a program name with args.
3762 set dummy finger; ac_word=$2
3763 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3764 echo "configure:3765: checking for $ac_word" >&5
3765 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3766   echo $ac_n "(cached) $ac_c" 1>&6
3767 else
3768   case "$FINGER" in
3769   /*)
3770   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3771   ;;
3772   ?:/*)
3773   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3774   ;;
3775   *)
3776   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3777   ac_dummy="$PATH:/usr/ucb"
3778   for ac_dir in $ac_dummy; do 
3779     test -z "$ac_dir" && ac_dir=.
3780     if test -f $ac_dir/$ac_word; then
3781       ac_cv_path_FINGER="$ac_dir/$ac_word"
3782       break
3783     fi
3784   done
3785   IFS="$ac_save_ifs"
3786   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3787   ;;
3788 esac
3789 fi
3790 FINGER="$ac_cv_path_FINGER"
3791 if test -n "$FINGER"; then
3792   echo "$ac_t""$FINGER" 1>&6
3793 else
3794   echo "$ac_t""no" 1>&6
3795 fi
3796
3797
3798 ol_link_perl=no
3799 if test $ol_enable_perl != no ; then
3800         # Extract the first word of "perl", so it can be a program name with args.
3801 set dummy perl; ac_word=$2
3802 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3803 echo "configure:3804: checking for $ac_word" >&5
3804 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3805   echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807   case "$PERLBIN" in
3808   /*)
3809   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3810   ;;
3811   ?:/*)
3812   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3813   ;;
3814   *)
3815   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3816   ac_dummy="$PATH"
3817   for ac_dir in $ac_dummy; do 
3818     test -z "$ac_dir" && ac_dir=.
3819     if test -f $ac_dir/$ac_word; then
3820       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3821       break
3822     fi
3823   done
3824   IFS="$ac_save_ifs"
3825   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3826   ;;
3827 esac
3828 fi
3829 PERLBIN="$ac_cv_path_PERLBIN"
3830 if test -n "$PERLBIN"; then
3831   echo "$ac_t""$PERLBIN" 1>&6
3832 else
3833   echo "$ac_t""no" 1>&6
3834 fi
3835
3836
3837         if test "no$PERLBIN" = "no" ; then
3838                 if test $ol_enable_perl = yes ; then
3839                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3840                 fi
3841
3842         else
3843                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3844                 if test x"$ol_with_perl_module" = "xstatic" ; then
3845                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3846                 else
3847                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3848                 fi
3849                                 ol_link_perl=yes
3850         fi
3851 fi
3852
3853 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3854 echo "configure:3855: checking how to run the C preprocessor" >&5
3855 # On Suns, sometimes $CPP names a directory.
3856 if test -n "$CPP" && test -d "$CPP"; then
3857   CPP=
3858 fi
3859 if test -z "$CPP"; then
3860 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3861   echo $ac_n "(cached) $ac_c" 1>&6
3862 else
3863     # This must be in double quotes, not single quotes, because CPP may get
3864   # substituted into the Makefile and "${CC-cc}" will confuse make.
3865   CPP="${CC-cc} -E"
3866   # On the NeXT, cc -E runs the code through the compiler's parser,
3867   # not just through cpp.
3868   cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 #include <assert.h>
3872 Syntax Error
3873 EOF
3874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3875 { (eval echo configure:3876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3877 if test -z "$ac_err"; then
3878   :
3879 else
3880   echo "$ac_err" >&5
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   CPP="${CC-cc} -E -traditional-cpp"
3885   cat > conftest.$ac_ext <<EOF
3886 #line 3887 "configure"
3887 #include "confdefs.h"
3888 #include <assert.h>
3889 Syntax Error
3890 EOF
3891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3892 { (eval echo configure:3893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3894 if test -z "$ac_err"; then
3895   :
3896 else
3897   echo "$ac_err" >&5
3898   echo "configure: failed program was:" >&5
3899   cat conftest.$ac_ext >&5
3900   rm -rf conftest*
3901   CPP="${CC-cc} -nologo -E"
3902   cat > conftest.$ac_ext <<EOF
3903 #line 3904 "configure"
3904 #include "confdefs.h"
3905 #include <assert.h>
3906 Syntax Error
3907 EOF
3908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3909 { (eval echo configure:3910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3911 if test -z "$ac_err"; then
3912   :
3913 else
3914   echo "$ac_err" >&5
3915   echo "configure: failed program was:" >&5
3916   cat conftest.$ac_ext >&5
3917   rm -rf conftest*
3918   CPP=/lib/cpp
3919 fi
3920 rm -f conftest*
3921 fi
3922 rm -f conftest*
3923 fi
3924 rm -f conftest*
3925   ac_cv_prog_CPP="$CPP"
3926 fi
3927   CPP="$ac_cv_prog_CPP"
3928 else
3929   ac_cv_prog_CPP="$CPP"
3930 fi
3931 echo "$ac_t""$CPP" 1>&6
3932
3933
3934 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3935         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3936
3937 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3938         echo "configure: warning: programs compiled here do run here..." 1>&2
3939         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3940
3941 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3942         echo "configure: warning: programs compiled here do not run here..." 1>&2
3943         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3944 fi
3945
3946 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3947 echo "configure:3948: checking for AIX" >&5
3948 cat > conftest.$ac_ext <<EOF
3949 #line 3950 "configure"
3950 #include "confdefs.h"
3951 #ifdef _AIX
3952   yes
3953 #endif
3954
3955 EOF
3956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3957   egrep "yes" >/dev/null 2>&1; then
3958   rm -rf conftest*
3959   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3960 #define _ALL_SOURCE 1
3961 EOF
3962
3963 else
3964   rm -rf conftest*
3965   echo "$ac_t""no" 1>&6
3966 fi
3967 rm -f conftest*
3968
3969
3970 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3971 echo "configure:3972: checking for POSIXized ISC" >&5
3972 if test -d /etc/conf/kconfig.d &&
3973   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3974 then
3975   echo "$ac_t""yes" 1>&6
3976   ISC=yes # If later tests want to check for ISC.
3977   cat >> confdefs.h <<\EOF
3978 #define _POSIX_SOURCE 1
3979 EOF
3980
3981   if test "$GCC" = yes; then
3982     CC="$CC -posix"
3983   else
3984     CC="$CC -Xp"
3985   fi
3986 else
3987   echo "$ac_t""no" 1>&6
3988   ISC=
3989 fi
3990
3991 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3992 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3993 echo "configure:3994: checking for minix/config.h" >&5
3994 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3995   echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997   cat > conftest.$ac_ext <<EOF
3998 #line 3999 "configure"
3999 #include "confdefs.h"
4000 #include <minix/config.h>
4001 EOF
4002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4003 { (eval echo configure:4004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4005 if test -z "$ac_err"; then
4006   rm -rf conftest*
4007   eval "ac_cv_header_$ac_safe=yes"
4008 else
4009   echo "$ac_err" >&5
4010   echo "configure: failed program was:" >&5
4011   cat conftest.$ac_ext >&5
4012   rm -rf conftest*
4013   eval "ac_cv_header_$ac_safe=no"
4014 fi
4015 rm -f conftest*
4016 fi
4017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4018   echo "$ac_t""yes" 1>&6
4019   MINIX=yes
4020 else
4021   echo "$ac_t""no" 1>&6
4022 MINIX=
4023 fi
4024
4025 if test "$MINIX" = yes; then
4026   cat >> confdefs.h <<\EOF
4027 #define _POSIX_SOURCE 1
4028 EOF
4029
4030   cat >> confdefs.h <<\EOF
4031 #define _POSIX_1_SOURCE 2
4032 EOF
4033
4034   cat >> confdefs.h <<\EOF
4035 #define _MINIX 1
4036 EOF
4037
4038 fi
4039
4040
4041 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4042 echo "configure:4043: checking for Cygwin environment" >&5
4043 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
4044   echo $ac_n "(cached) $ac_c" 1>&6
4045 else
4046   cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049
4050 int main() {
4051
4052 #ifndef __CYGWIN__
4053 #define __CYGWIN__ __CYGWIN32__
4054 #endif
4055 return __CYGWIN__;
4056 ; return 0; }
4057 EOF
4058 if { (eval echo configure:4059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4059   rm -rf conftest*
4060   ac_cv_cygwin=yes
4061 else
4062   echo "configure: failed program was:" >&5
4063   cat conftest.$ac_ext >&5
4064   rm -rf conftest*
4065   ac_cv_cygwin=no
4066 fi
4067 rm -f conftest*
4068 fi
4069
4070 echo "$ac_t""$ac_cv_cygwin" 1>&6
4071 CYGWIN=
4072 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4073 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4074 echo "configure:4075: checking for mingw32 environment" >&5
4075 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
4076   echo $ac_n "(cached) $ac_c" 1>&6
4077 else
4078   cat > conftest.$ac_ext <<EOF
4079 #line 4080 "configure"
4080 #include "confdefs.h"
4081
4082 int main() {
4083 return __MINGW32__;
4084 ; return 0; }
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4087   rm -rf conftest*
4088   ac_cv_mingw32=yes
4089 else
4090   echo "configure: failed program was:" >&5
4091   cat conftest.$ac_ext >&5
4092   rm -rf conftest*
4093   ac_cv_mingw32=no
4094 fi
4095 rm -f conftest*
4096 fi
4097
4098 echo "$ac_t""$ac_cv_mingw32" 1>&6
4099 MINGW32=
4100 test "$ac_cv_mingw32" = yes && MINGW32=yes
4101 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
4102 echo "configure:4103: checking for EMX OS/2 environment" >&5
4103 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
4104   echo $ac_n "(cached) $ac_c" 1>&6
4105 else
4106   cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109
4110 int main() {
4111 return __EMX__;
4112 ; return 0; }
4113 EOF
4114 if { (eval echo configure:4115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4115   rm -rf conftest*
4116   ac_cv_emxos2=yes
4117 else
4118   echo "configure: failed program was:" >&5
4119   cat conftest.$ac_ext >&5
4120   rm -rf conftest*
4121   ac_cv_emxos2=no
4122 fi
4123 rm -f conftest*
4124 fi
4125
4126 echo "$ac_t""$ac_cv_emxos2" 1>&6
4127 EMXOS2=
4128 test "$ac_cv_emxos2" = yes && EMXOS2=yes
4129
4130
4131
4132 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4133 echo "configure:4134: checking for executable suffix" >&5
4134 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4135   echo $ac_n "(cached) $ac_c" 1>&6
4136 else
4137   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4138   ac_cv_exeext=.exe
4139 else
4140   rm -f conftest*
4141   echo 'int main () { return 0; }' > conftest.$ac_ext
4142   ac_cv_exeext=
4143   if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4144     for file in conftest.*; do
4145       case $file in
4146       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4147       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4148       esac
4149     done
4150   else
4151     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4152   fi
4153   rm -f conftest*
4154   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4155 fi
4156 fi
4157
4158 EXEEXT=""
4159 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4160 echo "$ac_t""${ac_cv_exeext}" 1>&6
4161 ac_exeext=$EXEEXT
4162
4163 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4164 echo "configure:4165: checking for object suffix" >&5
4165 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4166   echo $ac_n "(cached) $ac_c" 1>&6
4167 else
4168   rm -f conftest*
4169 echo 'int i = 1;' > conftest.$ac_ext
4170 if { (eval echo configure:4171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4171   for ac_file in conftest.*; do
4172     case $ac_file in
4173     *.c) ;;
4174     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4175     esac
4176   done
4177 else
4178   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4179 fi
4180 rm -f conftest*
4181 fi
4182
4183 echo "$ac_t""$ac_cv_objext" 1>&6
4184 OBJEXT=$ac_cv_objext
4185 ac_objext=$ac_cv_objext
4186
4187
4188 cat >> confdefs.h <<EOF
4189 #define EXEEXT "${EXEEXT}"
4190 EOF
4191
4192
4193 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4194 echo "configure:4195: checking for be_app in -lbe" >&5
4195 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4197   echo $ac_n "(cached) $ac_c" 1>&6
4198 else
4199   ac_save_LIBS="$LIBS"
4200 LIBS="-lbe -lroot -lnet $LIBS"
4201 cat > conftest.$ac_ext <<EOF
4202 #line 4203 "configure"
4203 #include "confdefs.h"
4204 /* Override any gcc2 internal prototype to avoid an error.  */
4205 /* We use char because int might match the return type of a gcc2
4206     builtin and then its argument prototype would still apply.  */
4207 char be_app();
4208
4209 int main() {
4210 be_app()
4211 ; return 0; }
4212 EOF
4213 if { (eval echo configure:4214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4214   rm -rf conftest*
4215   eval "ac_cv_lib_$ac_lib_var=yes"
4216 else
4217   echo "configure: failed program was:" >&5
4218   cat conftest.$ac_ext >&5
4219   rm -rf conftest*
4220   eval "ac_cv_lib_$ac_lib_var=no"
4221 fi
4222 rm -f conftest*
4223 LIBS="$ac_save_LIBS"
4224
4225 fi
4226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4227   echo "$ac_t""yes" 1>&6
4228   LIBS="$LIBS -lbe -lroot -lnet"
4229 else
4230   echo "$ac_t""no" 1>&6
4231 :
4232 fi
4233
4234
4235
4236
4237
4238 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4239 echo "configure:4240: checking for ${CC-cc} option to accept ANSI C" >&5
4240 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4241   echo $ac_n "(cached) $ac_c" 1>&6
4242 else
4243   am_cv_prog_cc_stdc=no
4244 ac_save_CC="$CC"
4245 # Don't try gcc -ansi; that turns off useful extensions and
4246 # breaks some systems' header files.
4247 # AIX                   -qlanglvl=ansi
4248 # Ultrix and OSF/1      -std1
4249 # HP-UX 10.20 and later -Ae
4250 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4251 # SVR4                  -Xc -D__EXTENSIONS__
4252 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4253 do
4254   CC="$ac_save_CC $ac_arg"
4255   cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 #include <stdarg.h>
4259 #include <stdio.h>
4260 #include <sys/types.h>
4261 #include <sys/stat.h>
4262 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4263 struct buf { int x; };
4264 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4265 static char *e (p, i)
4266      char **p;
4267      int i;
4268 {
4269   return p[i];
4270 }
4271 static char *f (char * (*g) (char **, int), char **p, ...)
4272 {
4273   char *s;
4274   va_list v;
4275   va_start (v,p);
4276   s = g (p, va_arg (v,int));
4277   va_end (v);
4278   return s;
4279 }
4280 int test (int i, double x);
4281 struct s1 {int (*f) (int a);};
4282 struct s2 {int (*f) (double a);};
4283 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4284 int argc;
4285 char **argv;
4286
4287 int main() {
4288
4289 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4290
4291 ; return 0; }
4292 EOF
4293 if { (eval echo configure:4294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4294   rm -rf conftest*
4295   am_cv_prog_cc_stdc="$ac_arg"; break
4296 else
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299 fi
4300 rm -f conftest*
4301 done
4302 CC="$ac_save_CC"
4303
4304 fi
4305
4306 if test -z "$am_cv_prog_cc_stdc"; then
4307   echo "$ac_t""none needed" 1>&6
4308 else
4309   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4310 fi
4311 case "x$am_cv_prog_cc_stdc" in
4312   x|xno) ;;
4313   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4314 esac
4315
4316 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4317         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4318 fi
4319
4320 # test for make depend flag
4321 OL_MKDEP=
4322 OL_MKDEP_FLAGS=
4323 if test -z "${MKDEP}"; then
4324         OL_MKDEP="${CC-cc}"
4325         if test -z "${MKDEP_FLAGS}"; then
4326                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4327 echo "configure:4328: checking for ${OL_MKDEP} depend flag" >&5
4328 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4329   echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331   
4332                         ol_cv_mkdep=no
4333                         for flag in "-M" "-xM"; do
4334                                 cat > conftest.c <<EOF
4335  noCode;
4336 EOF
4337                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4338                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4339                                 then
4340                                         if test ! -f conftest."${ac_object}" ; then
4341                                                 ol_cv_mkdep=$flag
4342                                                 OL_MKDEP_FLAGS="$flag"
4343                                                 break
4344                                         fi
4345                                 fi
4346                         done
4347                         rm -f conftest*
4348                 
4349 fi
4350
4351 echo "$ac_t""$ol_cv_mkdep" 1>&6
4352         else
4353                 cc_cv_mkdep=yes
4354                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4355         fi
4356 else
4357         cc_cv_mkdep=yes
4358         OL_MKDEP="${MKDEP}"
4359         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4360 fi
4361
4362
4363
4364 if test "${ol_cv_mkdep}" = no ; then
4365         # this will soon become an error
4366         echo "configure: warning: do not know how to generate dependencies" 1>&2
4367 fi
4368
4369 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4370 echo "configure:4371: checking for afopen in -ls" >&5
4371 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4373   echo $ac_n "(cached) $ac_c" 1>&6
4374 else
4375   ac_save_LIBS="$LIBS"
4376 LIBS="-ls  $LIBS"
4377 cat > conftest.$ac_ext <<EOF
4378 #line 4379 "configure"
4379 #include "confdefs.h"
4380 /* Override any gcc2 internal prototype to avoid an error.  */
4381 /* We use char because int might match the return type of a gcc2
4382     builtin and then its argument prototype would still apply.  */
4383 char afopen();
4384
4385 int main() {
4386 afopen()
4387 ; return 0; }
4388 EOF
4389 if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4390   rm -rf conftest*
4391   eval "ac_cv_lib_$ac_lib_var=yes"
4392 else
4393   echo "configure: failed program was:" >&5
4394   cat conftest.$ac_ext >&5
4395   rm -rf conftest*
4396   eval "ac_cv_lib_$ac_lib_var=no"
4397 fi
4398 rm -f conftest*
4399 LIBS="$ac_save_LIBS"
4400
4401 fi
4402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4403   echo "$ac_t""yes" 1>&6
4404   
4405         AUTH_LIBS=-ls
4406         cat >> confdefs.h <<\EOF
4407 #define HAVE_AIX_SECURITY 1
4408 EOF
4409
4410
4411 else
4412   echo "$ac_t""no" 1>&6
4413 fi
4414
4415
4416
4417 ol_link_modules=no
4418 if test $ol_enable_modules != no ; then
4419         for ac_hdr in ltdl.h
4420 do
4421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4423 echo "configure:4424: checking for $ac_hdr" >&5
4424 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <$ac_hdr>
4431 EOF
4432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4433 { (eval echo configure:4434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4435 if test -z "$ac_err"; then
4436   rm -rf conftest*
4437   eval "ac_cv_header_$ac_safe=yes"
4438 else
4439   echo "$ac_err" >&5
4440   echo "configure: failed program was:" >&5
4441   cat conftest.$ac_ext >&5
4442   rm -rf conftest*
4443   eval "ac_cv_header_$ac_safe=no"
4444 fi
4445 rm -f conftest*
4446 fi
4447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4448   echo "$ac_t""yes" 1>&6
4449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4450   cat >> confdefs.h <<EOF
4451 #define $ac_tr_hdr 1
4452 EOF
4453  
4454 else
4455   echo "$ac_t""no" 1>&6
4456 fi
4457 done
4458
4459
4460         if test $ac_cv_header_ltdl_h = no ; then
4461                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4462         fi
4463
4464         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4465 echo "configure:4466: checking for lt_dlinit in -lltdl" >&5
4466 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4468   echo $ac_n "(cached) $ac_c" 1>&6
4469 else
4470   ac_save_LIBS="$LIBS"
4471 LIBS="-lltdl  $LIBS"
4472 cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 /* Override any gcc2 internal prototype to avoid an error.  */
4476 /* We use char because int might match the return type of a gcc2
4477     builtin and then its argument prototype would still apply.  */
4478 char lt_dlinit();
4479
4480 int main() {
4481 lt_dlinit()
4482 ; return 0; }
4483 EOF
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4485   rm -rf conftest*
4486   eval "ac_cv_lib_$ac_lib_var=yes"
4487 else
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490   rm -rf conftest*
4491   eval "ac_cv_lib_$ac_lib_var=no"
4492 fi
4493 rm -f conftest*
4494 LIBS="$ac_save_LIBS"
4495
4496 fi
4497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4498   echo "$ac_t""yes" 1>&6
4499   
4500                 MODULES_LIBS=-lltdl
4501                 cat >> confdefs.h <<\EOF
4502 #define HAVE_LIBLTDL 1
4503 EOF
4504
4505         
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509
4510
4511         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4512                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4513         fi
4514         ol_link_modules=yes
4515 else
4516         ol_with_bdb_module=static
4517         ol_with_dnssrv_module=static
4518         ol_with_ldap_module=static
4519         ol_with_ldbm_module=static
4520         ol_with_meta_module=static
4521         ol_with_monitor_module=static
4522         ol_with_passwd_module=static
4523         ol_with_perl_module=static
4524         ol_with_shell_module=static
4525         ol_with_tcl_module=static
4526         ol_with_sql_module=static
4527 fi
4528
4529 # test for EBCDIC
4530 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4531 echo "configure:4532: checking for EBCDIC" >&5
4532 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4533   echo $ac_n "(cached) $ac_c" 1>&6
4534 else
4535   
4536         cat > conftest.$ac_ext <<EOF
4537 #line 4538 "configure"
4538 #include "confdefs.h"
4539
4540 #if !('M' == 0xd4)
4541 #include <__ASCII__/generate_error.h>
4542 #endif
4543
4544 EOF
4545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4546 { (eval echo configure:4547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4548 if test -z "$ac_err"; then
4549   rm -rf conftest*
4550   ol_cv_cpp_ebcdic=yes
4551 else
4552   echo "$ac_err" >&5
4553   echo "configure: failed program was:" >&5
4554   cat conftest.$ac_ext >&5
4555   rm -rf conftest*
4556   ol_cv_cpp_ebcdic=no
4557 fi
4558 rm -f conftest*
4559 fi
4560
4561 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4562 if test $ol_cv_cpp_ebcdic = yes ; then
4563         cat >> confdefs.h <<\EOF
4564 #define HAVE_EBCDIC 1
4565 EOF
4566
4567 fi
4568
4569 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4570 echo "configure:4571: checking for ANSI C header files" >&5
4571 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4572   echo $ac_n "(cached) $ac_c" 1>&6
4573 else
4574   cat > conftest.$ac_ext <<EOF
4575 #line 4576 "configure"
4576 #include "confdefs.h"
4577 #include <stdlib.h>
4578 #include <stdarg.h>
4579 #include <string.h>
4580 #include <float.h>
4581 EOF
4582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4583 { (eval echo configure:4584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4585 if test -z "$ac_err"; then
4586   rm -rf conftest*
4587   ol_cv_header_stdc=yes
4588 else
4589   echo "$ac_err" >&5
4590   echo "configure: failed program was:" >&5
4591   cat conftest.$ac_ext >&5
4592   rm -rf conftest*
4593   ol_cv_header_stdc=no
4594 fi
4595 rm -f conftest*
4596
4597 if test $ol_cv_header_stdc = yes; then
4598   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4599 cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 #include <string.h>
4603 EOF
4604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4605   egrep "memchr" >/dev/null 2>&1; then
4606   :
4607 else
4608   rm -rf conftest*
4609   ol_cv_header_stdc=no
4610 fi
4611 rm -f conftest*
4612
4613 fi
4614
4615 if test $ol_cv_header_stdc = yes; then
4616   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4617 cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620 #include <stdlib.h>
4621 EOF
4622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4623   egrep "free" >/dev/null 2>&1; then
4624   :
4625 else
4626   rm -rf conftest*
4627   ol_cv_header_stdc=no
4628 fi
4629 rm -f conftest*
4630
4631 fi
4632
4633 if test $ol_cv_header_stdc = yes; then
4634   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4635 if test "$cross_compiling" = yes; then
4636   :
4637 else
4638   cat > conftest.$ac_ext <<EOF
4639 #line 4640 "configure"
4640 #include "confdefs.h"
4641 #include <ctype.h>
4642 #ifndef HAVE_EBCDIC
4643 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4644 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4645 #else
4646 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4647                 || ('j' <= (c) && (c) <= 'r') \
4648                 || ('s' <= (c) && (c) <= 'z'))
4649 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4650 #endif
4651 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4652 int main () { int i; for (i = 0; i < 256; i++)
4653 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4654 exit (0); }
4655
4656 EOF
4657 if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4658 then
4659   :
4660 else
4661   echo "configure: failed program was:" >&5
4662   cat conftest.$ac_ext >&5
4663   rm -fr conftest*
4664   ol_cv_header_stdc=no
4665 fi
4666 rm -fr conftest*
4667 fi
4668
4669 fi
4670 fi
4671
4672 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4673 if test $ol_cv_header_stdc = yes; then
4674   cat >> confdefs.h <<\EOF
4675 #define STDC_HEADERS 1
4676 EOF
4677
4678 fi
4679 ac_cv_header_stdc=disable
4680
4681
4682 if test $ol_cv_header_stdc != yes; then
4683         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4684 fi
4685
4686 ac_header_dirent=no
4687 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4688 do
4689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4690 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4691 echo "configure:4692: checking for $ac_hdr that defines DIR" >&5
4692 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4693   echo $ac_n "(cached) $ac_c" 1>&6
4694 else
4695   cat > conftest.$ac_ext <<EOF
4696 #line 4697 "configure"
4697 #include "confdefs.h"
4698 #include <sys/types.h>
4699 #include <$ac_hdr>
4700 int main() {
4701 DIR *dirp = 0;
4702 ; return 0; }
4703 EOF
4704 if { (eval echo configure:4705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4705   rm -rf conftest*
4706   eval "ac_cv_header_dirent_$ac_safe=yes"
4707 else
4708   echo "configure: failed program was:" >&5
4709   cat conftest.$ac_ext >&5
4710   rm -rf conftest*
4711   eval "ac_cv_header_dirent_$ac_safe=no"
4712 fi
4713 rm -f conftest*
4714 fi
4715 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4716   echo "$ac_t""yes" 1>&6
4717     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4718   cat >> confdefs.h <<EOF
4719 #define $ac_tr_hdr 1
4720 EOF
4721  ac_header_dirent=$ac_hdr; break
4722 else
4723   echo "$ac_t""no" 1>&6
4724 fi
4725 done
4726 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4727 if test $ac_header_dirent = dirent.h; then
4728 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4729 echo "configure:4730: checking for opendir in -ldir" >&5
4730 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4732   echo $ac_n "(cached) $ac_c" 1>&6
4733 else
4734   ac_save_LIBS="$LIBS"
4735 LIBS="-ldir  $LIBS"
4736 cat > conftest.$ac_ext <<EOF
4737 #line 4738 "configure"
4738 #include "confdefs.h"
4739 /* Override any gcc2 internal prototype to avoid an error.  */
4740 /* We use char because int might match the return type of a gcc2
4741     builtin and then its argument prototype would still apply.  */
4742 char opendir();
4743
4744 int main() {
4745 opendir()
4746 ; return 0; }
4747 EOF
4748 if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4749   rm -rf conftest*
4750   eval "ac_cv_lib_$ac_lib_var=yes"
4751 else
4752   echo "configure: failed program was:" >&5
4753   cat conftest.$ac_ext >&5
4754   rm -rf conftest*
4755   eval "ac_cv_lib_$ac_lib_var=no"
4756 fi
4757 rm -f conftest*
4758 LIBS="$ac_save_LIBS"
4759
4760 fi
4761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4762   echo "$ac_t""yes" 1>&6
4763   LIBS="$LIBS -ldir"
4764 else
4765   echo "$ac_t""no" 1>&6
4766 fi
4767
4768 else
4769 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4770 echo "configure:4771: checking for opendir in -lx" >&5
4771 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4772 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4773   echo $ac_n "(cached) $ac_c" 1>&6
4774 else
4775   ac_save_LIBS="$LIBS"
4776 LIBS="-lx  $LIBS"
4777 cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780 /* Override any gcc2 internal prototype to avoid an error.  */
4781 /* We use char because int might match the return type of a gcc2
4782     builtin and then its argument prototype would still apply.  */
4783 char opendir();
4784
4785 int main() {
4786 opendir()
4787 ; return 0; }
4788 EOF
4789 if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790   rm -rf conftest*
4791   eval "ac_cv_lib_$ac_lib_var=yes"
4792 else
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   eval "ac_cv_lib_$ac_lib_var=no"
4797 fi
4798 rm -f conftest*
4799 LIBS="$ac_save_LIBS"
4800
4801 fi
4802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4803   echo "$ac_t""yes" 1>&6
4804   LIBS="$LIBS -lx"
4805 else
4806   echo "$ac_t""no" 1>&6
4807 fi
4808
4809 fi
4810
4811 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4812 echo "configure:4813: checking for sys/wait.h that is POSIX.1 compatible" >&5
4813 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4814   echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816   cat > conftest.$ac_ext <<EOF
4817 #line 4818 "configure"
4818 #include "confdefs.h"
4819 #include <sys/types.h>
4820 #include <sys/wait.h>
4821 #ifndef WEXITSTATUS
4822 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4823 #endif
4824 #ifndef WIFEXITED
4825 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4826 #endif
4827 int main() {
4828 int s;
4829 wait (&s);
4830 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4834   rm -rf conftest*
4835   ac_cv_header_sys_wait_h=yes
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   ac_cv_header_sys_wait_h=no
4841 fi
4842 rm -f conftest*
4843 fi
4844
4845 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4846 if test $ac_cv_header_sys_wait_h = yes; then
4847   cat >> confdefs.h <<\EOF
4848 #define HAVE_SYS_WAIT_H 1
4849 EOF
4850
4851 fi
4852
4853 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4854 echo "configure:4855: checking POSIX termios" >&5
4855 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4856   echo $ac_n "(cached) $ac_c" 1>&6
4857 else
4858   cat > conftest.$ac_ext <<EOF
4859 #line 4860 "configure"
4860 #include "confdefs.h"
4861 #include <sys/types.h>
4862 #include <unistd.h>
4863 #include <termios.h>
4864 int main() {
4865 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4866    tcgetattr(0, 0);
4867 ; return 0; }
4868 EOF
4869 if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4870   rm -rf conftest*
4871   am_cv_sys_posix_termios=yes
4872 else
4873   echo "configure: failed program was:" >&5
4874   cat conftest.$ac_ext >&5
4875   rm -rf conftest*
4876   am_cv_sys_posix_termios=no
4877 fi
4878 rm -f conftest*
4879 fi
4880
4881 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4882
4883
4884  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4885 echo "configure:4886: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4886 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4887   echo $ac_n "(cached) $ac_c" 1>&6
4888 else
4889   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4890
4891   gwinsz_in_termios_h=no
4892   if test $am_cv_sys_posix_termios = yes; then
4893     cat > conftest.$ac_ext <<EOF
4894 #line 4895 "configure"
4895 #include "confdefs.h"
4896 #include <sys/types.h>
4897 #     include <termios.h>
4898 #     ifdef TIOCGWINSZ
4899         yes
4900 #     endif
4901     
4902 EOF
4903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4904   egrep "yes" >/dev/null 2>&1; then
4905   rm -rf conftest*
4906   gwinsz_in_termios_h=yes
4907 fi
4908 rm -f conftest*
4909
4910   fi
4911
4912   if test $gwinsz_in_termios_h = no; then
4913     cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 #include <sys/types.h>
4917 #     include <sys/ioctl.h>
4918 #     ifdef TIOCGWINSZ
4919         yes
4920 #     endif
4921     
4922 EOF
4923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4924   egrep "yes" >/dev/null 2>&1; then
4925   rm -rf conftest*
4926   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4927 fi
4928 rm -f conftest*
4929
4930   fi
4931   
4932 fi
4933
4934 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4935   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4936     cat >> confdefs.h <<\EOF
4937 #define GWINSZ_IN_SYS_IOCTL 1
4938 EOF
4939
4940   fi
4941
4942 if test $am_cv_sys_posix_termios = yes ; then
4943         cat >> confdefs.h <<\EOF
4944 #define HAVE_POSIX_TERMIOS 1
4945 EOF
4946
4947 fi
4948
4949 for ac_hdr in \
4950         arpa/inet.h             \
4951         arpa/nameser.h  \
4952         assert.h                \
4953         conio.h                 \
4954         crypt.h                 \
4955         direct.h                \
4956         errno.h                 \
4957         fcntl.h                 \
4958         filio.h                 \
4959         getopt.h                \
4960         grp.h                   \
4961         io.h                    \
4962         libutil.h               \
4963         limits.h                \
4964         locale.h                \
4965         netinet/tcp.h   \
4966         malloc.h                \
4967         memory.h                \
4968         psap.h                  \
4969         pwd.h                   \
4970         process.h               \
4971         resolv.h                \
4972         sgtty.h                 \
4973         shadow.h                \
4974         stddef.h                \
4975         string.h                \
4976         strings.h               \
4977         sysexits.h              \
4978         sys/file.h              \
4979         sys/filio.h             \
4980         sys/errno.h             \
4981         sys/ioctl.h             \
4982         sys/param.h             \
4983         sys/queue.h             \
4984         sys/resource.h  \
4985         sys/select.h    \
4986         sys/socket.h    \
4987         sys/syslog.h    \
4988         sys/time.h              \
4989         sys/types.h             \
4990         syslog.h                \
4991         termios.h               \
4992         unistd.h                \
4993         winsock.h               \
4994         winsock2.h              \
4995
4996 do
4997 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4998 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4999 echo "configure:5000: checking for $ac_hdr" >&5
5000 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5001   echo $ac_n "(cached) $ac_c" 1>&6
5002 else
5003   cat > conftest.$ac_ext <<EOF
5004 #line 5005 "configure"
5005 #include "confdefs.h"
5006 #include <$ac_hdr>
5007 EOF
5008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5009 { (eval echo configure:5010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5011 if test -z "$ac_err"; then
5012   rm -rf conftest*
5013   eval "ac_cv_header_$ac_safe=yes"
5014 else
5015   echo "$ac_err" >&5
5016   echo "configure: failed program was:" >&5
5017   cat conftest.$ac_ext >&5
5018   rm -rf conftest*
5019   eval "ac_cv_header_$ac_safe=no"
5020 fi
5021 rm -f conftest*
5022 fi
5023 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5024   echo "$ac_t""yes" 1>&6
5025     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5026   cat >> confdefs.h <<EOF
5027 #define $ac_tr_hdr 1
5028 EOF
5029  
5030 else
5031   echo "$ac_t""no" 1>&6
5032 fi
5033 done
5034
5035
5036
5037
5038 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
5039 echo "configure:5040: checking for dlopen" >&5
5040 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
5041   echo $ac_n "(cached) $ac_c" 1>&6
5042 else
5043   cat > conftest.$ac_ext <<EOF
5044 #line 5045 "configure"
5045 #include "confdefs.h"
5046 /* System header to define __stub macros and hopefully few prototypes,
5047     which can conflict with char dlopen(); below.  */
5048 #include <assert.h>
5049 /* Override any gcc2 internal prototype to avoid an error.  */
5050 /* We use char because int might match the return type of a gcc2
5051     builtin and then its argument prototype would still apply.  */
5052 char dlopen();
5053 char (*f)();
5054
5055 int main() {
5056
5057 /* The GNU C library defines this for functions which it implements
5058     to always fail with ENOSYS.  Some functions are actually named
5059     something starting with __ and the normal name is an alias.  */
5060 #if defined (__stub_dlopen) || defined (__stub___dlopen)
5061 choke me
5062 #else
5063 f = dlopen;
5064 #endif
5065
5066 ; return 0; }
5067 EOF
5068 if { (eval echo configure:5069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5069   rm -rf conftest*
5070   eval "ac_cv_func_dlopen=yes"
5071 else
5072   echo "configure: failed program was:" >&5
5073   cat conftest.$ac_ext >&5
5074   rm -rf conftest*
5075   eval "ac_cv_func_dlopen=no"
5076 fi
5077 rm -f conftest*
5078 fi
5079
5080 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
5081   echo "$ac_t""yes" 1>&6
5082   :
5083 else
5084   echo "$ac_t""no" 1>&6
5085 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5086 echo "configure:5087: checking for dlopen in -ldl" >&5
5087 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
5088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5089   echo $ac_n "(cached) $ac_c" 1>&6
5090 else
5091   ac_save_LIBS="$LIBS"
5092 LIBS="-ldl  $LIBS"
5093 cat > conftest.$ac_ext <<EOF
5094 #line 5095 "configure"
5095 #include "confdefs.h"
5096 /* Override any gcc2 internal prototype to avoid an error.  */
5097 /* We use char because int might match the return type of a gcc2
5098     builtin and then its argument prototype would still apply.  */
5099 char dlopen();
5100
5101 int main() {
5102 dlopen()
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5106   rm -rf conftest*
5107   eval "ac_cv_lib_$ac_lib_var=yes"
5108 else
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111   rm -rf conftest*
5112   eval "ac_cv_lib_$ac_lib_var=no"
5113 fi
5114 rm -f conftest*
5115 LIBS="$ac_save_LIBS"
5116
5117 fi
5118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5119   echo "$ac_t""yes" 1>&6
5120     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5122   cat >> confdefs.h <<EOF
5123 #define $ac_tr_lib 1
5124 EOF
5125
5126   LIBS="-ldl $LIBS"
5127
5128 else
5129   echo "$ac_t""no" 1>&6
5130 fi
5131
5132 fi
5133
5134
5135 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5136 echo "configure:5137: checking for sigset in -lV3" >&5
5137 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5138 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5139   echo $ac_n "(cached) $ac_c" 1>&6
5140 else
5141   ac_save_LIBS="$LIBS"
5142 LIBS="-lV3  $LIBS"
5143 cat > conftest.$ac_ext <<EOF
5144 #line 5145 "configure"
5145 #include "confdefs.h"
5146 /* Override any gcc2 internal prototype to avoid an error.  */
5147 /* We use char because int might match the return type of a gcc2
5148     builtin and then its argument prototype would still apply.  */
5149 char sigset();
5150
5151 int main() {
5152 sigset()
5153 ; return 0; }
5154 EOF
5155 if { (eval echo configure:5156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5156   rm -rf conftest*
5157   eval "ac_cv_lib_$ac_lib_var=yes"
5158 else
5159   echo "configure: failed program was:" >&5
5160   cat conftest.$ac_ext >&5
5161   rm -rf conftest*
5162   eval "ac_cv_lib_$ac_lib_var=no"
5163 fi
5164 rm -f conftest*
5165 LIBS="$ac_save_LIBS"
5166
5167 fi
5168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5169   echo "$ac_t""yes" 1>&6
5170     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5171     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5172   cat >> confdefs.h <<EOF
5173 #define $ac_tr_lib 1
5174 EOF
5175
5176   LIBS="-lV3 $LIBS"
5177
5178 else
5179   echo "$ac_t""no" 1>&6
5180 fi
5181
5182
5183 echo $ac_n "checking for winsock""... $ac_c" 1>&6
5184 echo "configure:5185: checking for winsock" >&5
5185 save_LIBS="$LIBS"
5186 for curlib in ws2_32 wsock32; do
5187         LIBS="$LIBS -l$curlib"
5188         cat > conftest.$ac_ext <<EOF
5189 #line 5190 "configure"
5190 #include "confdefs.h"
5191
5192                         char socket@12();
5193                         char select@20();
5194                         char closesocket@4();
5195                         char gethostname@8();
5196                         
5197 int main() {
5198
5199                         socket@12();
5200                         select@20();
5201                         closesocket@4();
5202                         gethostname@8();
5203                         
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207   rm -rf conftest*
5208   have_winsock=yes
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212   rm -rf conftest*
5213   have_winsock=no
5214 fi
5215 rm -f conftest*
5216
5217         if test $have_winsock = yes; then
5218                 cat >> confdefs.h <<\EOF
5219 #define HAVE_WINSOCK 1
5220 EOF
5221
5222                 ac_cv_func_socket=yes
5223                 ac_cv_func_select=yes
5224                 ac_cv_func_closesocket=yes
5225                 ac_cv_func_gethostname=yes
5226                 if test $curlib = ws2_32; then
5227                         have_winsock=winsock2
5228                         cat >> confdefs.h <<\EOF
5229 #define HAVE_WINSOCK2 1
5230 EOF
5231
5232                 fi
5233                 break
5234         fi
5235         LIBS="$save_LIBS"
5236 done
5237 echo "$ac_t""$have_winsock" 1>&6
5238
5239
5240 echo $ac_n "checking for socket""... $ac_c" 1>&6
5241 echo "configure:5242: checking for socket" >&5
5242 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5243   echo $ac_n "(cached) $ac_c" 1>&6
5244 else
5245   cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248 /* System header to define __stub macros and hopefully few prototypes,
5249     which can conflict with char socket(); below.  */
5250 #include <assert.h>
5251 /* Override any gcc2 internal prototype to avoid an error.  */
5252 /* We use char because int might match the return type of a gcc2
5253     builtin and then its argument prototype would still apply.  */
5254 char socket();
5255 char (*f)();
5256
5257 int main() {
5258
5259 /* The GNU C library defines this for functions which it implements
5260     to always fail with ENOSYS.  Some functions are actually named
5261     something starting with __ and the normal name is an alias.  */
5262 #if defined (__stub_socket) || defined (__stub___socket)
5263 choke me
5264 #else
5265 f = socket;
5266 #endif
5267
5268 ; return 0; }
5269 EOF
5270 if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5271   rm -rf conftest*
5272   eval "ac_cv_func_socket=yes"
5273 else
5274   echo "configure: failed program was:" >&5
5275   cat conftest.$ac_ext >&5
5276   rm -rf conftest*
5277   eval "ac_cv_func_socket=no"
5278 fi
5279 rm -f conftest*
5280 fi
5281
5282 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5283   echo "$ac_t""yes" 1>&6
5284   :
5285 else
5286   echo "$ac_t""no" 1>&6
5287         
5288         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5289 echo "configure:5290: checking for main in -lsocket" >&5
5290 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5291 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5292   echo $ac_n "(cached) $ac_c" 1>&6
5293 else
5294   ac_save_LIBS="$LIBS"
5295 LIBS="-lsocket  $LIBS"
5296 cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 main()
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=yes"
5307 else
5308   echo "configure: failed program was:" >&5
5309   cat conftest.$ac_ext >&5
5310   rm -rf conftest*
5311   eval "ac_cv_lib_$ac_lib_var=no"
5312 fi
5313 rm -f conftest*
5314 LIBS="$ac_save_LIBS"
5315
5316 fi
5317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5318   echo "$ac_t""yes" 1>&6
5319     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5320     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5321   cat >> confdefs.h <<EOF
5322 #define $ac_tr_lib 1
5323 EOF
5324
5325   LIBS="-lsocket $LIBS"
5326
5327 else
5328   echo "$ac_t""no" 1>&6
5329 fi
5330
5331         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5332 echo "configure:5333: checking for main in -lnet" >&5
5333 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5335   echo $ac_n "(cached) $ac_c" 1>&6
5336 else
5337   ac_save_LIBS="$LIBS"
5338 LIBS="-lnet  $LIBS"
5339 cat > conftest.$ac_ext <<EOF
5340 #line 5341 "configure"
5341 #include "confdefs.h"
5342
5343 int main() {
5344 main()
5345 ; return 0; }
5346 EOF
5347 if { (eval echo configure:5348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5348   rm -rf conftest*
5349   eval "ac_cv_lib_$ac_lib_var=yes"
5350 else
5351   echo "configure: failed program was:" >&5
5352   cat conftest.$ac_ext >&5
5353   rm -rf conftest*
5354   eval "ac_cv_lib_$ac_lib_var=no"
5355 fi
5356 rm -f conftest*
5357 LIBS="$ac_save_LIBS"
5358
5359 fi
5360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5361   echo "$ac_t""yes" 1>&6
5362     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5363     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5364   cat >> confdefs.h <<EOF
5365 #define $ac_tr_lib 1
5366 EOF
5367
5368   LIBS="-lnet $LIBS"
5369
5370 else
5371   echo "$ac_t""no" 1>&6
5372 fi
5373
5374         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5375 echo "configure:5376: checking for main in -lnsl_s" >&5
5376 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5377 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   ac_save_LIBS="$LIBS"
5381 LIBS="-lnsl_s  $LIBS"
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385
5386 int main() {
5387 main()
5388 ; return 0; }
5389 EOF
5390 if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5391   rm -rf conftest*
5392   eval "ac_cv_lib_$ac_lib_var=yes"
5393 else
5394   echo "configure: failed program was:" >&5
5395   cat conftest.$ac_ext >&5
5396   rm -rf conftest*
5397   eval "ac_cv_lib_$ac_lib_var=no"
5398 fi
5399 rm -f conftest*
5400 LIBS="$ac_save_LIBS"
5401
5402 fi
5403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5404   echo "$ac_t""yes" 1>&6
5405     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5406     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5407   cat >> confdefs.h <<EOF
5408 #define $ac_tr_lib 1
5409 EOF
5410
5411   LIBS="-lnsl_s $LIBS"
5412
5413 else
5414   echo "$ac_t""no" 1>&6
5415 fi
5416
5417         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5418 echo "configure:5419: checking for main in -lnsl" >&5
5419 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5420 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5421   echo $ac_n "(cached) $ac_c" 1>&6
5422 else
5423   ac_save_LIBS="$LIBS"
5424 LIBS="-lnsl  $LIBS"
5425 cat > conftest.$ac_ext <<EOF
5426 #line 5427 "configure"
5427 #include "confdefs.h"
5428
5429 int main() {
5430 main()
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434   rm -rf conftest*
5435   eval "ac_cv_lib_$ac_lib_var=yes"
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   eval "ac_cv_lib_$ac_lib_var=no"
5441 fi
5442 rm -f conftest*
5443 LIBS="$ac_save_LIBS"
5444
5445 fi
5446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5447   echo "$ac_t""yes" 1>&6
5448     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5449     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5450   cat >> confdefs.h <<EOF
5451 #define $ac_tr_lib 1
5452 EOF
5453
5454   LIBS="-lnsl $LIBS"
5455
5456 else
5457   echo "$ac_t""no" 1>&6
5458 fi
5459
5460         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5461 echo "configure:5462: checking for socket in -linet" >&5
5462 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5464   echo $ac_n "(cached) $ac_c" 1>&6
5465 else
5466   ac_save_LIBS="$LIBS"
5467 LIBS="-linet  $LIBS"
5468 cat > conftest.$ac_ext <<EOF
5469 #line 5470 "configure"
5470 #include "confdefs.h"
5471 /* Override any gcc2 internal prototype to avoid an error.  */
5472 /* We use char because int might match the return type of a gcc2
5473     builtin and then its argument prototype would still apply.  */
5474 char socket();
5475
5476 int main() {
5477 socket()
5478 ; return 0; }
5479 EOF
5480 if { (eval echo configure:5481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5481   rm -rf conftest*
5482   eval "ac_cv_lib_$ac_lib_var=yes"
5483 else
5484   echo "configure: failed program was:" >&5
5485   cat conftest.$ac_ext >&5
5486   rm -rf conftest*
5487   eval "ac_cv_lib_$ac_lib_var=no"
5488 fi
5489 rm -f conftest*
5490 LIBS="$ac_save_LIBS"
5491
5492 fi
5493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5494   echo "$ac_t""yes" 1>&6
5495     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5496     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5497   cat >> confdefs.h <<EOF
5498 #define $ac_tr_lib 1
5499 EOF
5500
5501   LIBS="-linet $LIBS"
5502
5503 else
5504   echo "$ac_t""no" 1>&6
5505 fi
5506
5507         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5508 echo "configure:5509: checking for main in -lgen" >&5
5509 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5510 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5511   echo $ac_n "(cached) $ac_c" 1>&6
5512 else
5513   ac_save_LIBS="$LIBS"
5514 LIBS="-lgen  $LIBS"
5515 cat > conftest.$ac_ext <<EOF
5516 #line 5517 "configure"
5517 #include "confdefs.h"
5518
5519 int main() {
5520 main()
5521 ; return 0; }
5522 EOF
5523 if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5524   rm -rf conftest*
5525   eval "ac_cv_lib_$ac_lib_var=yes"
5526 else
5527   echo "configure: failed program was:" >&5
5528   cat conftest.$ac_ext >&5
5529   rm -rf conftest*
5530   eval "ac_cv_lib_$ac_lib_var=no"
5531 fi
5532 rm -f conftest*
5533 LIBS="$ac_save_LIBS"
5534
5535 fi
5536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5537   echo "$ac_t""yes" 1>&6
5538     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5539     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5540   cat >> confdefs.h <<EOF
5541 #define $ac_tr_lib 1
5542 EOF
5543
5544   LIBS="-lgen $LIBS"
5545
5546 else
5547   echo "$ac_t""no" 1>&6
5548 fi
5549
5550
5551 fi
5552
5553
5554 echo $ac_n "checking for select""... $ac_c" 1>&6
5555 echo "configure:5556: checking for select" >&5
5556 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5557   echo $ac_n "(cached) $ac_c" 1>&6
5558 else
5559   cat > conftest.$ac_ext <<EOF
5560 #line 5561 "configure"
5561 #include "confdefs.h"
5562 /* System header to define __stub macros and hopefully few prototypes,
5563     which can conflict with char select(); below.  */
5564 #include <assert.h>
5565 /* Override any gcc2 internal prototype to avoid an error.  */
5566 /* We use char because int might match the return type of a gcc2
5567     builtin and then its argument prototype would still apply.  */
5568 char select();
5569 char (*f)();
5570
5571 int main() {
5572
5573 /* The GNU C library defines this for functions which it implements
5574     to always fail with ENOSYS.  Some functions are actually named
5575     something starting with __ and the normal name is an alias.  */
5576 #if defined (__stub_select) || defined (__stub___select)
5577 choke me
5578 #else
5579 f = select;
5580 #endif
5581
5582 ; return 0; }
5583 EOF
5584 if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5585   rm -rf conftest*
5586   eval "ac_cv_func_select=yes"
5587 else
5588   echo "configure: failed program was:" >&5
5589   cat conftest.$ac_ext >&5
5590   rm -rf conftest*
5591   eval "ac_cv_func_select=no"
5592 fi
5593 rm -f conftest*
5594 fi
5595
5596 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5597   echo "$ac_t""yes" 1>&6
5598   :
5599 else
5600   echo "$ac_t""no" 1>&6
5601 { echo "configure: error: select() required." 1>&2; exit 1; }
5602 fi
5603
5604
5605 if test "${ac_cv_header_winsock_h}" != yes; then
5606                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5607 echo "configure:5608: checking types of arguments for select()" >&5
5608  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5609   echo $ac_n "(cached) $ac_c" 1>&6
5610 else
5611    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5612   echo $ac_n "(cached) $ac_c" 1>&6
5613 else
5614     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5615   echo $ac_n "(cached) $ac_c" 1>&6
5616 else
5617      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5618      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5619       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5620        cat > conftest.$ac_ext <<EOF
5621 #line 5622 "configure"
5622 #include "confdefs.h"
5623 #ifdef HAVE_SYS_TYPES_H
5624 #include <sys/types.h>
5625 #endif
5626 #ifdef HAVE_SYS_TIME_H
5627 #include <sys/time.h>
5628 #endif
5629 #ifdef HAVE_SYS_SELECT_H
5630 #include <sys/select.h>
5631 #endif
5632 #ifdef HAVE_SYS_SOCKET_H
5633 #include <sys/socket.h>
5634 #endif
5635 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);
5636 int main() {
5637
5638 ; return 0; }
5639 EOF
5640 if { (eval echo configure:5641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5641   rm -rf conftest*
5642           ac_not_found=no ; break 3
5643 else
5644   echo "configure: failed program was:" >&5
5645   cat conftest.$ac_ext >&5
5646   rm -rf conftest*
5647   ac_not_found=yes
5648 fi
5649 rm -f conftest*
5650       done
5651      done
5652     done
5653    
5654 fi
5655   
5656 fi
5657  
5658 fi
5659  if test "$ac_not_found" = yes; then
5660   ac_cv_func_select_arg1=int 
5661   ac_cv_func_select_arg234='int *' 
5662   ac_cv_func_select_arg5='struct timeval *'
5663  fi
5664  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5665  cat >> confdefs.h <<EOF
5666 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5667 EOF
5668
5669  cat >> confdefs.h <<EOF
5670 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5671 EOF
5672
5673  cat >> confdefs.h <<EOF
5674 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5675 EOF
5676
5677
5678 fi
5679
5680
5681 for ac_hdr in regex.h 
5682 do
5683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5685 echo "configure:5686: checking for $ac_hdr" >&5
5686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5687   echo $ac_n "(cached) $ac_c" 1>&6
5688 else
5689   cat > conftest.$ac_ext <<EOF
5690 #line 5691 "configure"
5691 #include "confdefs.h"
5692 #include <$ac_hdr>
5693 EOF
5694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5695 { (eval echo configure:5696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5697 if test -z "$ac_err"; then
5698   rm -rf conftest*
5699   eval "ac_cv_header_$ac_safe=yes"
5700 else
5701   echo "$ac_err" >&5
5702   echo "configure: failed program was:" >&5
5703   cat conftest.$ac_ext >&5
5704   rm -rf conftest*
5705   eval "ac_cv_header_$ac_safe=no"
5706 fi
5707 rm -f conftest*
5708 fi
5709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5710   echo "$ac_t""yes" 1>&6
5711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5712   cat >> confdefs.h <<EOF
5713 #define $ac_tr_hdr 1
5714 EOF
5715  
5716 else
5717   echo "$ac_t""no" 1>&6
5718 fi
5719 done
5720
5721 if test "$ac_cv_header_regex_h" != yes ; then
5722         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5723 fi
5724
5725 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
5726 echo "configure:5727: checking for library containing regfree" >&5
5727 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
5728   echo $ac_n "(cached) $ac_c" 1>&6
5729 else
5730   ac_func_search_save_LIBS="$LIBS"
5731 ac_cv_search_regfree="no"
5732 cat > conftest.$ac_ext <<EOF
5733 #line 5734 "configure"
5734 #include "confdefs.h"
5735 /* Override any gcc2 internal prototype to avoid an error.  */
5736 /* We use char because int might match the return type of a gcc2
5737     builtin and then its argument prototype would still apply.  */
5738 char regfree();
5739
5740 int main() {
5741 regfree()
5742 ; return 0; }
5743 EOF
5744 if { (eval echo configure:5745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5745   rm -rf conftest*
5746   ac_cv_search_regfree="none required"
5747 else
5748   echo "configure: failed program was:" >&5
5749   cat conftest.$ac_ext >&5
5750 fi
5751 rm -f conftest*
5752 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
5753 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5754 cat > conftest.$ac_ext <<EOF
5755 #line 5756 "configure"
5756 #include "confdefs.h"
5757 /* Override any gcc2 internal prototype to avoid an error.  */
5758 /* We use char because int might match the return type of a gcc2
5759     builtin and then its argument prototype would still apply.  */
5760 char regfree();
5761
5762 int main() {
5763 regfree()
5764 ; return 0; }
5765 EOF
5766 if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5767   rm -rf conftest*
5768   ac_cv_search_regfree="-l$ac_lib"
5769 break
5770 else
5771   echo "configure: failed program was:" >&5
5772   cat conftest.$ac_ext >&5
5773 fi
5774 rm -f conftest*
5775 done
5776 LIBS="$ac_func_search_save_LIBS"
5777 fi
5778
5779 echo "$ac_t""$ac_cv_search_regfree" 1>&6
5780 if test "$ac_cv_search_regfree" != "no"; then
5781   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
5782   :
5783 else :
5784   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5785 fi
5786
5787
5788 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5789 echo "configure:5790: checking for compatible POSIX regex" >&5
5790 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5791   echo $ac_n "(cached) $ac_c" 1>&6
5792 else
5793   
5794         if test "$cross_compiling" = yes; then
5795   ol_cv_c_posix_regex=cross
5796 else
5797   cat > conftest.$ac_ext <<EOF
5798 #line 5799 "configure"
5799 #include "confdefs.h"
5800
5801 #include <sys/types.h>
5802 #include <regex.h>
5803 static char *pattern, *string;
5804 main()
5805 {
5806         int rc;
5807         regex_t re;
5808
5809         pattern = "^A";
5810
5811         if(regcomp(&re, pattern, 0)) {
5812                 return -1;
5813         }
5814         
5815         string = "ALL MATCH";
5816         
5817         rc = regexec(&re, string, 0, (void*)0, 0);
5818
5819         regfree(&re);
5820
5821         return rc;
5822 }
5823 EOF
5824 if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5825 then
5826   ol_cv_c_posix_regex=yes
5827 else
5828   echo "configure: failed program was:" >&5
5829   cat conftest.$ac_ext >&5
5830   rm -fr conftest*
5831   ol_cv_c_posix_regex=no
5832 fi
5833 rm -fr conftest*
5834 fi
5835
5836 fi
5837
5838 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5839
5840 if test "$ol_cv_c_posix_regex" = no ; then
5841         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5842 fi
5843
5844 ol_link_dnssrv=no
5845 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5846 echo "configure:5847: checking for res_query" >&5
5847 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5848   echo $ac_n "(cached) $ac_c" 1>&6
5849 else
5850   cat > conftest.$ac_ext <<EOF
5851 #line 5852 "configure"
5852 #include "confdefs.h"
5853 /* System header to define __stub macros and hopefully few prototypes,
5854     which can conflict with char res_query(); below.  */
5855 #include <assert.h>
5856 /* Override any gcc2 internal prototype to avoid an error.  */
5857 /* We use char because int might match the return type of a gcc2
5858     builtin and then its argument prototype would still apply.  */
5859 char res_query();
5860 char (*f)();
5861
5862 int main() {
5863
5864 /* The GNU C library defines this for functions which it implements
5865     to always fail with ENOSYS.  Some functions are actually named
5866     something starting with __ and the normal name is an alias.  */
5867 #if defined (__stub_res_query) || defined (__stub___res_query)
5868 choke me
5869 #else
5870 f = res_query;
5871 #endif
5872
5873 ; return 0; }
5874 EOF
5875 if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5876   rm -rf conftest*
5877   eval "ac_cv_func_res_query=yes"
5878 else
5879   echo "configure: failed program was:" >&5
5880   cat conftest.$ac_ext >&5
5881   rm -rf conftest*
5882   eval "ac_cv_func_res_query=no"
5883 fi
5884 rm -f conftest*
5885 fi
5886
5887 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5888   echo "$ac_t""yes" 1>&6
5889   :
5890 else
5891   echo "$ac_t""no" 1>&6
5892 fi
5893
5894 if test $ac_cv_func_res_query = no ; then 
5895         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
5896 echo "configure:5897: checking for __res_query" >&5
5897 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
5898   echo $ac_n "(cached) $ac_c" 1>&6
5899 else
5900   cat > conftest.$ac_ext <<EOF
5901 #line 5902 "configure"
5902 #include "confdefs.h"
5903 /* System header to define __stub macros and hopefully few prototypes,
5904     which can conflict with char __res_query(); below.  */
5905 #include <assert.h>
5906 /* Override any gcc2 internal prototype to avoid an error.  */
5907 /* We use char because int might match the return type of a gcc2
5908     builtin and then its argument prototype would still apply.  */
5909 char __res_query();
5910 char (*f)();
5911
5912 int main() {
5913
5914 /* The GNU C library defines this for functions which it implements
5915     to always fail with ENOSYS.  Some functions are actually named
5916     something starting with __ and the normal name is an alias.  */
5917 #if defined (__stub___res_query) || defined (__stub_____res_query)
5918 choke me
5919 #else
5920 f = __res_query;
5921 #endif
5922
5923 ; return 0; }
5924 EOF
5925 if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5926   rm -rf conftest*
5927   eval "ac_cv_func___res_query=yes"
5928 else
5929   echo "configure: failed program was:" >&5
5930   cat conftest.$ac_ext >&5
5931   rm -rf conftest*
5932   eval "ac_cv_func___res_query=no"
5933 fi
5934 rm -f conftest*
5935 fi
5936
5937 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
5938   echo "$ac_t""yes" 1>&6
5939   :
5940 else
5941   echo "$ac_t""no" 1>&6
5942 fi
5943
5944         ac_cv_func_res_query=$ac_cv_func___res_query
5945 fi
5946
5947 if test $ac_cv_func_res_query = no ; then 
5948         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5949 echo "configure:5950: checking for res_query in -lbind" >&5
5950 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5952   echo $ac_n "(cached) $ac_c" 1>&6
5953 else
5954   ac_save_LIBS="$LIBS"
5955 LIBS="-lbind  $LIBS"
5956 cat > conftest.$ac_ext <<EOF
5957 #line 5958 "configure"
5958 #include "confdefs.h"
5959 /* Override any gcc2 internal prototype to avoid an error.  */
5960 /* We use char because int might match the return type of a gcc2
5961     builtin and then its argument prototype would still apply.  */
5962 char res_query();
5963
5964 int main() {
5965 res_query()
5966 ; return 0; }
5967 EOF
5968 if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5969   rm -rf conftest*
5970   eval "ac_cv_lib_$ac_lib_var=yes"
5971 else
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   eval "ac_cv_lib_$ac_lib_var=no"
5976 fi
5977 rm -f conftest*
5978 LIBS="$ac_save_LIBS"
5979
5980 fi
5981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5982   echo "$ac_t""yes" 1>&6
5983     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5984     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5985   cat >> confdefs.h <<EOF
5986 #define $ac_tr_lib 1
5987 EOF
5988
5989   LIBS="-lbind $LIBS"
5990
5991 else
5992   echo "$ac_t""no" 1>&6
5993 fi
5994
5995         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5996 fi
5997
5998 if test $ac_cv_func_res_query = no ; then 
5999         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
6000 echo "configure:6001: checking for __res_query in -lbind" >&5
6001 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
6002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6003   echo $ac_n "(cached) $ac_c" 1>&6
6004 else
6005   ac_save_LIBS="$LIBS"
6006 LIBS="-lbind  $LIBS"
6007 cat > conftest.$ac_ext <<EOF
6008 #line 6009 "configure"
6009 #include "confdefs.h"
6010 /* Override any gcc2 internal prototype to avoid an error.  */
6011 /* We use char because int might match the return type of a gcc2
6012     builtin and then its argument prototype would still apply.  */
6013 char __res_query();
6014
6015 int main() {
6016 __res_query()
6017 ; return 0; }
6018 EOF
6019 if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6020   rm -rf conftest*
6021   eval "ac_cv_lib_$ac_lib_var=yes"
6022 else
6023   echo "configure: failed program was:" >&5
6024   cat conftest.$ac_ext >&5
6025   rm -rf conftest*
6026   eval "ac_cv_lib_$ac_lib_var=no"
6027 fi
6028 rm -f conftest*
6029 LIBS="$ac_save_LIBS"
6030
6031 fi
6032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6033   echo "$ac_t""yes" 1>&6
6034     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6035     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6036   cat >> confdefs.h <<EOF
6037 #define $ac_tr_lib 1
6038 EOF
6039
6040   LIBS="-lbind $LIBS"
6041
6042 else
6043   echo "$ac_t""no" 1>&6
6044 fi
6045
6046         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
6047 fi
6048
6049 if test $ac_cv_func_res_query = no ; then 
6050         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
6051 echo "configure:6052: checking for res_query in -lresolv" >&5
6052 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
6053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6054   echo $ac_n "(cached) $ac_c" 1>&6
6055 else
6056   ac_save_LIBS="$LIBS"
6057 LIBS="-lresolv  $LIBS"
6058 cat > conftest.$ac_ext <<EOF
6059 #line 6060 "configure"
6060 #include "confdefs.h"
6061 /* Override any gcc2 internal prototype to avoid an error.  */
6062 /* We use char because int might match the return type of a gcc2
6063     builtin and then its argument prototype would still apply.  */
6064 char res_query();
6065
6066 int main() {
6067 res_query()
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071   rm -rf conftest*
6072   eval "ac_cv_lib_$ac_lib_var=yes"
6073 else
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076   rm -rf conftest*
6077   eval "ac_cv_lib_$ac_lib_var=no"
6078 fi
6079 rm -f conftest*
6080 LIBS="$ac_save_LIBS"
6081
6082 fi
6083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6084   echo "$ac_t""yes" 1>&6
6085     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6086     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6087   cat >> confdefs.h <<EOF
6088 #define $ac_tr_lib 1
6089 EOF
6090
6091   LIBS="-lresolv $LIBS"
6092
6093 else
6094   echo "$ac_t""no" 1>&6
6095 fi
6096
6097         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
6098 fi
6099
6100 if test $ac_cv_func_res_query = no ; then 
6101         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
6102 echo "configure:6103: checking for __res_query in -lresolv" >&5
6103 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
6104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6105   echo $ac_n "(cached) $ac_c" 1>&6
6106 else
6107   ac_save_LIBS="$LIBS"
6108 LIBS="-lresolv  $LIBS"
6109 cat > conftest.$ac_ext <<EOF
6110 #line 6111 "configure"
6111 #include "confdefs.h"
6112 /* Override any gcc2 internal prototype to avoid an error.  */
6113 /* We use char because int might match the return type of a gcc2
6114     builtin and then its argument prototype would still apply.  */
6115 char __res_query();
6116
6117 int main() {
6118 __res_query()
6119 ; return 0; }
6120 EOF
6121 if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6122   rm -rf conftest*
6123   eval "ac_cv_lib_$ac_lib_var=yes"
6124 else
6125   echo "configure: failed program was:" >&5
6126   cat conftest.$ac_ext >&5
6127   rm -rf conftest*
6128   eval "ac_cv_lib_$ac_lib_var=no"
6129 fi
6130 rm -f conftest*
6131 LIBS="$ac_save_LIBS"
6132
6133 fi
6134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6135   echo "$ac_t""yes" 1>&6
6136     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6137     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6138   cat >> confdefs.h <<EOF
6139 #define $ac_tr_lib 1
6140 EOF
6141
6142   LIBS="-lresolv $LIBS"
6143
6144 else
6145   echo "$ac_t""no" 1>&6
6146 fi
6147
6148         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
6149 fi
6150
6151 if test "$ac_cv_func_res_query" = yes ; then
6152         cat >> confdefs.h <<\EOF
6153 #define HAVE_RES_QUERY 1
6154 EOF
6155
6156
6157         if test $ol_enable_dnssrv != no ; then
6158                 ol_link_dnssrv=yes
6159         fi
6160 fi
6161
6162 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
6163         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
6164 fi
6165
6166 for ac_func in getaddrinfo inet_ntop 
6167 do
6168 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6169 echo "configure:6170: checking for $ac_func" >&5
6170 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6171   echo $ac_n "(cached) $ac_c" 1>&6
6172 else
6173   cat > conftest.$ac_ext <<EOF
6174 #line 6175 "configure"
6175 #include "confdefs.h"
6176 /* System header to define __stub macros and hopefully few prototypes,
6177     which can conflict with char $ac_func(); below.  */
6178 #include <assert.h>
6179 /* Override any gcc2 internal prototype to avoid an error.  */
6180 /* We use char because int might match the return type of a gcc2
6181     builtin and then its argument prototype would still apply.  */
6182 char $ac_func();
6183 char (*f)();
6184
6185 int main() {
6186
6187 /* The GNU C library defines this for functions which it implements
6188     to always fail with ENOSYS.  Some functions are actually named
6189     something starting with __ and the normal name is an alias.  */
6190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6191 choke me
6192 #else
6193 f = $ac_func;
6194 #endif
6195
6196 ; return 0; }
6197 EOF
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6199   rm -rf conftest*
6200   eval "ac_cv_func_$ac_func=yes"
6201 else
6202   echo "configure: failed program was:" >&5
6203   cat conftest.$ac_ext >&5
6204   rm -rf conftest*
6205   eval "ac_cv_func_$ac_func=no"
6206 fi
6207 rm -f conftest*
6208 fi
6209
6210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6211   echo "$ac_t""yes" 1>&6
6212     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6213   cat >> confdefs.h <<EOF
6214 #define $ac_tr_func 1
6215 EOF
6216  
6217 else
6218   echo "$ac_t""no" 1>&6
6219 fi
6220 done
6221
6222
6223 ol_link_ipv6=no
6224 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
6225         if test $ol_enable_ipv6 = yes ; then
6226                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
6227         fi
6228 else
6229         for ac_func in gai_strerror 
6230 do
6231 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6232 echo "configure:6233: checking for $ac_func" >&5
6233 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6234   echo $ac_n "(cached) $ac_c" 1>&6
6235 else
6236   cat > conftest.$ac_ext <<EOF
6237 #line 6238 "configure"
6238 #include "confdefs.h"
6239 /* System header to define __stub macros and hopefully few prototypes,
6240     which can conflict with char $ac_func(); below.  */
6241 #include <assert.h>
6242 /* Override any gcc2 internal prototype to avoid an error.  */
6243 /* We use char because int might match the return type of a gcc2
6244     builtin and then its argument prototype would still apply.  */
6245 char $ac_func();
6246 char (*f)();
6247
6248 int main() {
6249
6250 /* The GNU C library defines this for functions which it implements
6251     to always fail with ENOSYS.  Some functions are actually named
6252     something starting with __ and the normal name is an alias.  */
6253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6254 choke me
6255 #else
6256 f = $ac_func;
6257 #endif
6258
6259 ; return 0; }
6260 EOF
6261 if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6262   rm -rf conftest*
6263   eval "ac_cv_func_$ac_func=yes"
6264 else
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267   rm -rf conftest*
6268   eval "ac_cv_func_$ac_func=no"
6269 fi
6270 rm -f conftest*
6271 fi
6272
6273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6274   echo "$ac_t""yes" 1>&6
6275     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6276   cat >> confdefs.h <<EOF
6277 #define $ac_tr_func 1
6278 EOF
6279  
6280 else
6281   echo "$ac_t""no" 1>&6
6282 fi
6283 done
6284
6285
6286         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
6287 echo "configure:6288: checking INET6_ADDRSTRLEN" >&5
6288 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
6289   echo $ac_n "(cached) $ac_c" 1>&6
6290 else
6291   
6292                 cat > conftest.$ac_ext <<EOF
6293 #line 6294 "configure"
6294 #include "confdefs.h"
6295
6296 #                       include <netinet/in.h>
6297 #                       ifdef INET6_ADDRSTRLEN
6298                                 __has_inet6_addrstrlen__;
6299 #                       endif
6300                 
6301 EOF
6302 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6303   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
6304   rm -rf conftest*
6305   ol_cv_inet6_addrstrlen=yes
6306 else
6307   rm -rf conftest*
6308   ol_cv_inet6_addrstrlen=no
6309 fi
6310 rm -f conftest*
6311
6312 fi
6313
6314 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
6315
6316         if test $ol_cv_inet6_addrstrlen = yes ; then
6317                 ol_link_ipv6=yes
6318         elif test $ol_enable_ipv6 = yes ; then
6319                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
6320         fi
6321 fi
6322
6323 if test $ol_enable_local != no ; then
6324         for ac_hdr in sys/un.h 
6325 do
6326 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6327 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6328 echo "configure:6329: checking for $ac_hdr" >&5
6329 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6330   echo $ac_n "(cached) $ac_c" 1>&6
6331 else
6332   cat > conftest.$ac_ext <<EOF
6333 #line 6334 "configure"
6334 #include "confdefs.h"
6335 #include <$ac_hdr>
6336 EOF
6337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6338 { (eval echo configure:6339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6340 if test -z "$ac_err"; then
6341   rm -rf conftest*
6342   eval "ac_cv_header_$ac_safe=yes"
6343 else
6344   echo "$ac_err" >&5
6345   echo "configure: failed program was:" >&5
6346   cat conftest.$ac_ext >&5
6347   rm -rf conftest*
6348   eval "ac_cv_header_$ac_safe=no"
6349 fi
6350 rm -f conftest*
6351 fi
6352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6353   echo "$ac_t""yes" 1>&6
6354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6355   cat >> confdefs.h <<EOF
6356 #define $ac_tr_hdr 1
6357 EOF
6358  
6359 else
6360   echo "$ac_t""no" 1>&6
6361 fi
6362 done
6363
6364
6365         if test $ol_enable_local = auto ; then
6366                 ol_enable_local=$ac_cv_header_sys_un_h
6367         elif test $ac_cv_header_sys_un_h = no ; then
6368                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
6369         fi
6370 fi
6371
6372 ol_link_kbind=no
6373 ol_link_kpasswd=no
6374 ol_link_krb5=no
6375 ol_link_krb4=no
6376
6377 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6378         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
6379         -o $ol_with_kerberos = k425 ; then
6380
6381         for ac_hdr in krb5.h
6382 do
6383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6385 echo "configure:6386: checking for $ac_hdr" >&5
6386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6387   echo $ac_n "(cached) $ac_c" 1>&6
6388 else
6389   cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6392 #include <$ac_hdr>
6393 EOF
6394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6395 { (eval echo configure:6396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6397 if test -z "$ac_err"; then
6398   rm -rf conftest*
6399   eval "ac_cv_header_$ac_safe=yes"
6400 else
6401   echo "$ac_err" >&5
6402   echo "configure: failed program was:" >&5
6403   cat conftest.$ac_ext >&5
6404   rm -rf conftest*
6405   eval "ac_cv_header_$ac_safe=no"
6406 fi
6407 rm -f conftest*
6408 fi
6409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6410   echo "$ac_t""yes" 1>&6
6411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6412   cat >> confdefs.h <<EOF
6413 #define $ac_tr_hdr 1
6414 EOF
6415  
6416 else
6417   echo "$ac_t""no" 1>&6
6418 fi
6419 done
6420
6421
6422         if test $ac_cv_header_krb5_h = yes ; then
6423                                 for ac_hdr in heim_err.h
6424 do
6425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6427 echo "configure:6428: checking for $ac_hdr" >&5
6428 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6429   echo $ac_n "(cached) $ac_c" 1>&6
6430 else
6431   cat > conftest.$ac_ext <<EOF
6432 #line 6433 "configure"
6433 #include "confdefs.h"
6434 #include <$ac_hdr>
6435 EOF
6436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6437 { (eval echo configure:6438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6439 if test -z "$ac_err"; then
6440   rm -rf conftest*
6441   eval "ac_cv_header_$ac_safe=yes"
6442 else
6443   echo "$ac_err" >&5
6444   echo "configure: failed program was:" >&5
6445   cat conftest.$ac_ext >&5
6446   rm -rf conftest*
6447   eval "ac_cv_header_$ac_safe=no"
6448 fi
6449 rm -f conftest*
6450 fi
6451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6452   echo "$ac_t""yes" 1>&6
6453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6454   cat >> confdefs.h <<EOF
6455 #define $ac_tr_hdr 1
6456 EOF
6457  
6458 else
6459   echo "$ac_t""no" 1>&6
6460 fi
6461 done
6462
6463                 if test $ac_cv_header_heim_err_h = yes ; then
6464                         krb5_impl=heimdal
6465                 else
6466                         krb5_impl=mit
6467                 fi
6468
6469                 if test $krb5_impl = mit; then
6470                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
6471 echo "configure:6472: checking for main in -lk5crypto" >&5
6472 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
6473 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6474   echo $ac_n "(cached) $ac_c" 1>&6
6475 else
6476   ac_save_LIBS="$LIBS"
6477 LIBS="-lk5crypto  $LIBS"
6478 cat > conftest.$ac_ext <<EOF
6479 #line 6480 "configure"
6480 #include "confdefs.h"
6481
6482 int main() {
6483 main()
6484 ; return 0; }
6485 EOF
6486 if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6487   rm -rf conftest*
6488   eval "ac_cv_lib_$ac_lib_var=yes"
6489 else
6490   echo "configure: failed program was:" >&5
6491   cat conftest.$ac_ext >&5
6492   rm -rf conftest*
6493   eval "ac_cv_lib_$ac_lib_var=no"
6494 fi
6495 rm -f conftest*
6496 LIBS="$ac_save_LIBS"
6497
6498 fi
6499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6500   echo "$ac_t""yes" 1>&6
6501   krb5crypto=k5crypto
6502 else
6503   echo "$ac_t""no" 1>&6
6504 krb5crypto=crypto
6505 fi
6506
6507
6508                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6509 echo "configure:6510: checking for main in -lkrb5" >&5
6510 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6511 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6512   echo $ac_n "(cached) $ac_c" 1>&6
6513 else
6514   ac_save_LIBS="$LIBS"
6515 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
6516 cat > conftest.$ac_ext <<EOF
6517 #line 6518 "configure"
6518 #include "confdefs.h"
6519
6520 int main() {
6521 main()
6522 ; return 0; }
6523 EOF
6524 if { (eval echo configure:6525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6525   rm -rf conftest*
6526   eval "ac_cv_lib_$ac_lib_var=yes"
6527 else
6528   echo "configure: failed program was:" >&5
6529   cat conftest.$ac_ext >&5
6530   rm -rf conftest*
6531   eval "ac_cv_lib_$ac_lib_var=no"
6532 fi
6533 rm -f conftest*
6534 LIBS="$ac_save_LIBS"
6535
6536 fi
6537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6538   echo "$ac_t""yes" 1>&6
6539   have_krb5=yes
6540                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
6541 else
6542   echo "$ac_t""no" 1>&6
6543 have_krb5=no
6544 fi
6545
6546
6547                 elif test $krb5_impl = heimdal; then
6548                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6549 echo "configure:6550: checking for main in -lkrb5" >&5
6550 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6551 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6552   echo $ac_n "(cached) $ac_c" 1>&6
6553 else
6554   ac_save_LIBS="$LIBS"
6555 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6556 cat > conftest.$ac_ext <<EOF
6557 #line 6558 "configure"
6558 #include "confdefs.h"
6559
6560 int main() {
6561 main()
6562 ; return 0; }
6563 EOF
6564 if { (eval echo configure:6565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6565   rm -rf conftest*
6566   eval "ac_cv_lib_$ac_lib_var=yes"
6567 else
6568   echo "configure: failed program was:" >&5
6569   cat conftest.$ac_ext >&5
6570   rm -rf conftest*
6571   eval "ac_cv_lib_$ac_lib_var=no"
6572 fi
6573 rm -f conftest*
6574 LIBS="$ac_save_LIBS"
6575
6576 fi
6577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6578   echo "$ac_t""yes" 1>&6
6579   have_krb5=yes
6580                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6581 else
6582   echo "$ac_t""no" 1>&6
6583 have_krb5=no
6584 fi
6585
6586
6587                         cat >> confdefs.h <<\EOF
6588 #define HAVE_HEIMDAL_KERBEROS 1
6589 EOF
6590
6591
6592                 else
6593                         have_krb5=no
6594                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6595                 fi
6596
6597                 if test $have_krb5 = yes ; then
6598                         ol_link_krb5=yes
6599
6600                         cat >> confdefs.h <<\EOF
6601 #define HAVE_KRB5 1
6602 EOF
6603
6604
6605                         if test $ol_enable_kpasswd != no ; then
6606                                 ol_link_kpasswd=yes;
6607                         fi
6608
6609                         if test $ol_with_kerberos = k5only ; then
6610                                 ol_with_kerberos=found
6611                         fi
6612
6613                 elif test $ol_with_kerberos != auto ; then
6614                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6615                 fi
6616
6617         fi
6618 fi
6619
6620 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6621         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6622
6623         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6624 do
6625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6626 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6627 echo "configure:6628: checking for $ac_hdr" >&5
6628 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6629   echo $ac_n "(cached) $ac_c" 1>&6
6630 else
6631   cat > conftest.$ac_ext <<EOF
6632 #line 6633 "configure"
6633 #include "confdefs.h"
6634 #include <$ac_hdr>
6635 EOF
6636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6637 { (eval echo configure:6638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6639 if test -z "$ac_err"; then
6640   rm -rf conftest*
6641   eval "ac_cv_header_$ac_safe=yes"
6642 else
6643   echo "$ac_err" >&5
6644   echo "configure: failed program was:" >&5
6645   cat conftest.$ac_ext >&5
6646   rm -rf conftest*
6647   eval "ac_cv_header_$ac_safe=no"
6648 fi
6649 rm -f conftest*
6650 fi
6651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6652   echo "$ac_t""yes" 1>&6
6653     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6654   cat >> confdefs.h <<EOF
6655 #define $ac_tr_hdr 1
6656 EOF
6657  
6658 else
6659   echo "$ac_t""no" 1>&6
6660 fi
6661 done
6662
6663
6664         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6665                 if test $krb5_impl = mit; then
6666                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6667 echo "configure:6668: checking for main in -lkrb4" >&5
6668 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6670   echo $ac_n "(cached) $ac_c" 1>&6
6671 else
6672   ac_save_LIBS="$LIBS"
6673 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
6674 cat > conftest.$ac_ext <<EOF
6675 #line 6676 "configure"
6676 #include "confdefs.h"
6677
6678 int main() {
6679 main()
6680 ; return 0; }
6681 EOF
6682 if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6683   rm -rf conftest*
6684   eval "ac_cv_lib_$ac_lib_var=yes"
6685 else
6686   echo "configure: failed program was:" >&5
6687   cat conftest.$ac_ext >&5
6688   rm -rf conftest*
6689   eval "ac_cv_lib_$ac_lib_var=no"
6690 fi
6691 rm -f conftest*
6692 LIBS="$ac_save_LIBS"
6693
6694 fi
6695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6696   echo "$ac_t""yes" 1>&6
6697   have_k425=yes
6698                                 KRB4_LIBS="-lkrb4 -ldes425"
6699 else
6700   echo "$ac_t""no" 1>&6
6701 have_k425=no
6702 fi
6703
6704
6705                 elif test $krb5_impl = heimdal; then
6706                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6707 echo "configure:6708: checking for main in -lkrb4" >&5
6708 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6709 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6710   echo $ac_n "(cached) $ac_c" 1>&6
6711 else
6712   ac_save_LIBS="$LIBS"
6713 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6714 cat > conftest.$ac_ext <<EOF
6715 #line 6716 "configure"
6716 #include "confdefs.h"
6717
6718 int main() {
6719 main()
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723   rm -rf conftest*
6724   eval "ac_cv_lib_$ac_lib_var=yes"
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728   rm -rf conftest*
6729   eval "ac_cv_lib_$ac_lib_var=no"
6730 fi
6731 rm -f conftest*
6732 LIBS="$ac_save_LIBS"
6733
6734 fi
6735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6736   echo "$ac_t""yes" 1>&6
6737   have_k425=yes
6738                                 KRB4_LIBS="-lkrb4"
6739 else
6740   echo "$ac_t""no" 1>&6
6741 have_k425=no
6742 fi
6743
6744
6745                 else
6746                         have_425=no
6747                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6748                 fi
6749
6750                 if test $have_k425 = yes ; then
6751                         ol_with_kerberos=found
6752                         ol_link_krb4=yes
6753
6754                         cat >> confdefs.h <<\EOF
6755 #define HAVE_KRB425 1
6756 EOF
6757
6758                         cat >> confdefs.h <<\EOF
6759 #define HAVE_KRB4 1
6760 EOF
6761
6762
6763                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6764 echo "configure:6765: checking for des_debug in Kerberos libraries" >&5
6765 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6766   echo $ac_n "(cached) $ac_c" 1>&6
6767 else
6768   
6769                                                                 save_LIBS="$LIBS"
6770                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6771                                 cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774
6775 #include <kerberosIV/krb.h>
6776 #include <kerberosIV/des.h>
6777 extern int des_debug;
6778
6779 int main() {
6780
6781 des_debug = 1;
6782
6783 ; return 0; }
6784 EOF
6785 if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6786   rm -rf conftest*
6787   ol_cv_var_des_debug=yes
6788 else
6789   echo "configure: failed program was:" >&5
6790   cat conftest.$ac_ext >&5
6791   rm -rf conftest*
6792   ol_cv_var_des_debug=no
6793 fi
6794 rm -f conftest*
6795                                                                 LIBS="$save_LIBS"
6796                         
6797 fi
6798
6799 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6800
6801                         if test $ol_cv_var_des_debug = yes ; then
6802                                 cat >> confdefs.h <<\EOF
6803 #define HAVE_DES_DEBUG 1
6804 EOF
6805
6806                         fi
6807
6808                         LIBS="$save_LIBS"
6809                 fi
6810         fi
6811 fi
6812
6813 if test $ol_link_krb5 = yes ; then
6814         ol_with_kerberos=found
6815 fi
6816
6817 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6818         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6819
6820         for ac_hdr in krb.h des.h krb-archaeology.h 
6821 do
6822 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6823 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6824 echo "configure:6825: checking for $ac_hdr" >&5
6825 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 #include <$ac_hdr>
6832 EOF
6833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6834 { (eval echo configure:6835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6836 if test -z "$ac_err"; then
6837   rm -rf conftest*
6838   eval "ac_cv_header_$ac_safe=yes"
6839 else
6840   echo "$ac_err" >&5
6841   echo "configure: failed program was:" >&5
6842   cat conftest.$ac_ext >&5
6843   rm -rf conftest*
6844   eval "ac_cv_header_$ac_safe=no"
6845 fi
6846 rm -f conftest*
6847 fi
6848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6849   echo "$ac_t""yes" 1>&6
6850     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6851   cat >> confdefs.h <<EOF
6852 #define $ac_tr_hdr 1
6853 EOF
6854  
6855 else
6856   echo "$ac_t""no" 1>&6
6857 fi
6858 done
6859
6860
6861         if test $ac_cv_header_krb_h = yes ; then
6862                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6863 echo "configure:6864: checking for main in -lkrb" >&5
6864 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6865 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6866   echo $ac_n "(cached) $ac_c" 1>&6
6867 else
6868   ac_save_LIBS="$LIBS"
6869 LIBS="-lkrb -ldes $LIBS"
6870 cat > conftest.$ac_ext <<EOF
6871 #line 6872 "configure"
6872 #include "confdefs.h"
6873
6874 int main() {
6875 main()
6876 ; return 0; }
6877 EOF
6878 if { (eval echo configure:6879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6879   rm -rf conftest*
6880   eval "ac_cv_lib_$ac_lib_var=yes"
6881 else
6882   echo "configure: failed program was:" >&5
6883   cat conftest.$ac_ext >&5
6884   rm -rf conftest*
6885   eval "ac_cv_lib_$ac_lib_var=no"
6886 fi
6887 rm -f conftest*
6888 LIBS="$ac_save_LIBS"
6889
6890 fi
6891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893   have_k4=yes
6894 else
6895   echo "$ac_t""no" 1>&6
6896 have_k4=no
6897 fi
6898
6899
6900                 if test $have_k4 = yes ; then
6901                         ol_with_kerberos=found
6902                         ol_link_krb4=yes
6903
6904                         cat >> confdefs.h <<\EOF
6905 #define HAVE_KRB4 1
6906 EOF
6907
6908
6909                         KRB4_LIBS="-lkrb -ldes"
6910
6911                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6912                                 cat >> confdefs.h <<\EOF
6913 #define HAVE_KTH_KERBEROS 1
6914 EOF
6915
6916                         fi
6917                 fi
6918         fi
6919 fi
6920
6921 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6922         ol_link_kpasswd=yes
6923 fi
6924
6925 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6926         ol_link_kbind=yes
6927
6928 elif test $ol_enable_kbind = yes ; then
6929         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6930 fi
6931
6932 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6933         cat >> confdefs.h <<\EOF
6934 #define HAVE_KERBEROS 1
6935 EOF
6936
6937
6938 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6939         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6940 fi
6941
6942 ol_link_tls=no
6943 if test $ol_with_tls != no ; then
6944         for ac_hdr in openssl/ssl.h ssl.h
6945 do
6946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6948 echo "configure:6949: checking for $ac_hdr" >&5
6949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6950   echo $ac_n "(cached) $ac_c" 1>&6
6951 else
6952   cat > conftest.$ac_ext <<EOF
6953 #line 6954 "configure"
6954 #include "confdefs.h"
6955 #include <$ac_hdr>
6956 EOF
6957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6958 { (eval echo configure:6959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6960 if test -z "$ac_err"; then
6961   rm -rf conftest*
6962   eval "ac_cv_header_$ac_safe=yes"
6963 else
6964   echo "$ac_err" >&5
6965   echo "configure: failed program was:" >&5
6966   cat conftest.$ac_ext >&5
6967   rm -rf conftest*
6968   eval "ac_cv_header_$ac_safe=no"
6969 fi
6970 rm -f conftest*
6971 fi
6972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6973   echo "$ac_t""yes" 1>&6
6974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6975   cat >> confdefs.h <<EOF
6976 #define $ac_tr_hdr 1
6977 EOF
6978  
6979 else
6980   echo "$ac_t""no" 1>&6
6981 fi
6982 done
6983
6984         
6985         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6986                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6987 echo "configure:6988: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6988 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6990   echo $ac_n "(cached) $ac_c" 1>&6
6991 else
6992   ac_save_LIBS="$LIBS"
6993 LIBS="-lssl -lcrypto $LIBS"
6994 cat > conftest.$ac_ext <<EOF
6995 #line 6996 "configure"
6996 #include "confdefs.h"
6997 /* Override any gcc2 internal prototype to avoid an error.  */
6998 /* We use char because int might match the return type of a gcc2
6999     builtin and then its argument prototype would still apply.  */
7000 char SSLeay_add_ssl_algorithms();
7001
7002 int main() {
7003 SSLeay_add_ssl_algorithms()
7004 ; return 0; }
7005 EOF
7006 if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7007   rm -rf conftest*
7008   eval "ac_cv_lib_$ac_lib_var=yes"
7009 else
7010   echo "configure: failed program was:" >&5
7011   cat conftest.$ac_ext >&5
7012   rm -rf conftest*
7013   eval "ac_cv_lib_$ac_lib_var=no"
7014 fi
7015 rm -f conftest*
7016 LIBS="$ac_save_LIBS"
7017
7018 fi
7019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7020   echo "$ac_t""yes" 1>&6
7021   have_ssleay=yes
7022                         need_rsaref=no
7023 else
7024   echo "$ac_t""no" 1>&6
7025 have_ssleay=no
7026 fi
7027
7028                         
7029                 if test $have_ssleay = no ; then
7030                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
7031 echo "configure:7032: checking for SSL_library_init in -lssl" >&5
7032 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
7033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7034   echo $ac_n "(cached) $ac_c" 1>&6
7035 else
7036   ac_save_LIBS="$LIBS"
7037 LIBS="-lssl -lcrypto $LIBS"
7038 cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041 /* Override any gcc2 internal prototype to avoid an error.  */
7042 /* We use char because int might match the return type of a gcc2
7043     builtin and then its argument prototype would still apply.  */
7044 char SSL_library_init();
7045
7046 int main() {
7047 SSL_library_init()
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   eval "ac_cv_lib_$ac_lib_var=yes"
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_lib_$ac_lib_var=no"
7058 fi
7059 rm -f conftest*
7060 LIBS="$ac_save_LIBS"
7061
7062 fi
7063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7064   echo "$ac_t""yes" 1>&6
7065   have_ssleay=yes
7066                                 need_rsaref=no
7067 else
7068   echo "$ac_t""no" 1>&6
7069 have_ssleay=no
7070 fi
7071
7072                 fi
7073
7074                 if test $have_ssleay = no ; then
7075                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
7076 echo "configure:7077: checking for ssl3_accept in -lssl" >&5
7077 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
7078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7079   echo $ac_n "(cached) $ac_c" 1>&6
7080 else
7081   ac_save_LIBS="$LIBS"
7082 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
7083 cat > conftest.$ac_ext <<EOF
7084 #line 7085 "configure"
7085 #include "confdefs.h"
7086 /* Override any gcc2 internal prototype to avoid an error.  */
7087 /* We use char because int might match the return type of a gcc2
7088     builtin and then its argument prototype would still apply.  */
7089 char ssl3_accept();
7090
7091 int main() {
7092 ssl3_accept()
7093 ; return 0; }
7094 EOF
7095 if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7096   rm -rf conftest*
7097   eval "ac_cv_lib_$ac_lib_var=yes"
7098 else
7099   echo "configure: failed program was:" >&5
7100   cat conftest.$ac_ext >&5
7101   rm -rf conftest*
7102   eval "ac_cv_lib_$ac_lib_var=no"
7103 fi
7104 rm -f conftest*
7105 LIBS="$ac_save_LIBS"
7106
7107 fi
7108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7109   echo "$ac_t""yes" 1>&6
7110   have_ssleay=yes
7111                                 need_rsaref=yes
7112 else
7113   echo "$ac_t""no" 1>&6
7114 have_ssleay=no
7115 fi
7116
7117                 fi
7118
7119                 if test $have_ssleay = yes ; then
7120                         ol_with_tls=found
7121                         ol_link_tls=yes
7122
7123                         cat >> confdefs.h <<\EOF
7124 #define HAVE_SSLEAY 1
7125 EOF
7126
7127
7128                         if test $need_rsaref = yes; then
7129                                 cat >> confdefs.h <<\EOF
7130 #define HAVE_RSAREF 1
7131 EOF
7132
7133
7134                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
7135                         else
7136                                 TLS_LIBS="-lssl -lcrypto"
7137                         fi
7138                 fi
7139         fi
7140
7141 else
7142         echo "configure: warning: TLS privacy protection not supported!" 1>&2
7143 fi
7144
7145 if test $ol_link_tls = yes ; then
7146         cat >> confdefs.h <<\EOF
7147 #define HAVE_TLS 1
7148 EOF
7149
7150
7151 elif test $ol_with_tls = auto ; then
7152         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
7153         echo "configure: warning: TLS privacy protection not supported!" 1>&2
7154
7155 elif test $ol_with_tls != no ; then
7156         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
7157 fi
7158
7159 if test $ol_enable_lmpasswd != no; then
7160         if test $ol_link_tls != yes ; then
7161                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
7162         fi
7163
7164         cat >> confdefs.h <<\EOF
7165 #define SLAPD_LMHASH 1
7166 EOF
7167
7168 fi
7169
7170 for ac_func in \
7171         ctime_r                 \
7172         gethostbyname_r gethostbyaddr_r \
7173
7174 do
7175 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7176 echo "configure:7177: checking for $ac_func" >&5
7177 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7178   echo $ac_n "(cached) $ac_c" 1>&6
7179 else
7180   cat > conftest.$ac_ext <<EOF
7181 #line 7182 "configure"
7182 #include "confdefs.h"
7183 /* System header to define __stub macros and hopefully few prototypes,
7184     which can conflict with char $ac_func(); below.  */
7185 #include <assert.h>
7186 /* Override any gcc2 internal prototype to avoid an error.  */
7187 /* We use char because int might match the return type of a gcc2
7188     builtin and then its argument prototype would still apply.  */
7189 char $ac_func();
7190 char (*f)();
7191
7192 int main() {
7193
7194 /* The GNU C library defines this for functions which it implements
7195     to always fail with ENOSYS.  Some functions are actually named
7196     something starting with __ and the normal name is an alias.  */
7197 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7198 choke me
7199 #else
7200 f = $ac_func;
7201 #endif
7202
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7206   rm -rf conftest*
7207   eval "ac_cv_func_$ac_func=yes"
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211   rm -rf conftest*
7212   eval "ac_cv_func_$ac_func=no"
7213 fi
7214 rm -f conftest*
7215 fi
7216
7217 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7218   echo "$ac_t""yes" 1>&6
7219     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7220   cat >> confdefs.h <<EOF
7221 #define $ac_tr_func 1
7222 EOF
7223  
7224 else
7225   echo "$ac_t""no" 1>&6
7226 fi
7227 done
7228
7229
7230 if test "$ac_cv_func_ctime_r" = no ; then
7231         ol_cv_func_ctime_r_nargs=0
7232 else
7233         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
7234 echo "configure:7235: checking number of arguments of ctime_r" >&5
7235 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
7236   echo $ac_n "(cached) $ac_c" 1>&6
7237 else
7238   cat > conftest.$ac_ext <<EOF
7239 #line 7240 "configure"
7240 #include "confdefs.h"
7241 #include <time.h>
7242 int main() {
7243 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
7244 ; return 0; }
7245 EOF
7246 if { (eval echo configure:7247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7247   rm -rf conftest*
7248   ol_cv_func_ctime_r_nargs3=yes
7249 else
7250   echo "configure: failed program was:" >&5
7251   cat conftest.$ac_ext >&5
7252   rm -rf conftest*
7253   ol_cv_func_ctime_r_nargs3=no
7254 fi
7255 rm -f conftest*
7256
7257         cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 #include <time.h>
7261 int main() {
7262 time_t ti; char *buffer; ctime_r(&ti,buffer);
7263 ; return 0; }
7264 EOF
7265 if { (eval echo configure:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7266   rm -rf conftest*
7267   ol_cv_func_ctime_r_nargs2=yes
7268 else
7269   echo "configure: failed program was:" >&5
7270   cat conftest.$ac_ext >&5
7271   rm -rf conftest*
7272   ol_cv_func_ctime_r_nargs2=no
7273 fi
7274 rm -f conftest*
7275
7276         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
7277                 $ol_cv_func_ctime_r_nargs2 = no ; then
7278
7279                 ol_cv_func_ctime_r_nargs=3
7280
7281         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
7282                 $ol_cv_func_ctime_r_nargs2 = yes ; then
7283
7284                 ol_cv_func_ctime_r_nargs=2
7285
7286         else
7287                 ol_cv_func_ctime_r_nargs=0
7288         fi
7289   
7290 fi
7291
7292 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
7293
7294   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
7295         cat >> confdefs.h <<EOF
7296 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
7297 EOF
7298
7299   fi
7300
7301 fi
7302
7303 if test "$ac_cv_func_gethostbyname_r" = yes ; then
7304         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
7305 echo "configure:7306: checking number of arguments of gethostbyname_r" >&5
7306 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
7307   echo $ac_n "(cached) $ac_c" 1>&6
7308 else
7309   cat > conftest.$ac_ext <<EOF
7310 #line 7311 "configure"
7311 #include "confdefs.h"
7312 #include <sys/types.h>
7313 #include <sys/socket.h>
7314 #include <netinet/in.h>
7315 #include <netdb.h>
7316 #define BUFSIZE (sizeof(struct hostent)+10)
7317 int main() {
7318 struct hostent hent; char buffer[BUFSIZE];
7319                 int bufsize=BUFSIZE;int h_errno;
7320                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
7321                         buffer, bufsize, &h_errno);
7322 ; return 0; }
7323 EOF
7324 if { (eval echo configure:7325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7325   rm -rf conftest*
7326   ol_cv_func_gethostbyname_r_nargs5=yes
7327 else
7328   echo "configure: failed program was:" >&5
7329   cat conftest.$ac_ext >&5
7330   rm -rf conftest*
7331   ol_cv_func_gethostbyname_r_nargs5=no
7332 fi
7333 rm -f conftest*
7334
7335         cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 #include <sys/types.h>
7339 #include <sys/socket.h>
7340 #include <netinet/in.h>
7341 #include <netdb.h>
7342 #define BUFSIZE (sizeof(struct hostent)+10)
7343 int main() {
7344 struct hostent hent;struct hostent *rhent;
7345                 char buffer[BUFSIZE];
7346                 int bufsize=BUFSIZE;int h_errno;
7347                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
7348                         &rhent, &h_errno);
7349 ; return 0; }
7350 EOF
7351 if { (eval echo configure:7352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7352   rm -rf conftest*
7353   ol_cv_func_gethostbyname_r_nargs6=yes
7354 else
7355   echo "configure: failed program was:" >&5
7356   cat conftest.$ac_ext >&5
7357   rm -rf conftest*
7358   ol_cv_func_gethostbyname_r_nargs6=no
7359 fi
7360 rm -f conftest*
7361
7362         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
7363                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
7364
7365                 ol_cv_func_gethostbyname_r_nargs=5
7366
7367         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7368                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7369
7370                 ol_cv_func_gethostbyname_r_nargs=6
7371
7372         else
7373                 ol_cv_func_gethostbyname_r_nargs=0
7374         fi
7375   
7376 fi
7377
7378 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7379   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7380         cat >> confdefs.h <<EOF
7381 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7382 EOF
7383
7384   fi
7385
7386 else
7387         ol_cv_func_gethostbyname_r_nargs=0
7388 fi
7389  
7390 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7391         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7392 echo "configure:7393: checking number of arguments of gethostbyaddr_r" >&5
7393 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   cat > conftest.$ac_ext <<EOF
7397 #line 7398 "configure"
7398 #include "confdefs.h"
7399 #include <sys/types.h>
7400 #include <sys/socket.h>
7401 #include <netinet/in.h>
7402 #include <netdb.h>
7403 #define BUFSIZE (sizeof(struct hostent)+10)
7404 int main() {
7405 struct hostent hent; char buffer[BUFSIZE]; 
7406             struct in_addr add;
7407             size_t alen=sizeof(struct in_addr);
7408             int bufsize=BUFSIZE;int h_errno;
7409                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7410                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7411 ; return 0; }
7412 EOF
7413 if { (eval echo configure:7414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7414   rm -rf conftest*
7415   ol_cv_func_gethostbyaddr_r_nargs7=yes
7416 else
7417   echo "configure: failed program was:" >&5
7418   cat conftest.$ac_ext >&5
7419   rm -rf conftest*
7420   ol_cv_func_gethostbyaddr_r_nargs7=no
7421 fi
7422 rm -f conftest*
7423
7424         cat > conftest.$ac_ext <<EOF
7425 #line 7426 "configure"
7426 #include "confdefs.h"
7427 #include <sys/types.h>
7428 #include <sys/socket.h>
7429 #include <netinet/in.h>
7430 #include <netdb.h>
7431 #define BUFSIZE (sizeof(struct hostent)+10)
7432 int main() {
7433 struct hostent hent;
7434                 struct hostent *rhent; char buffer[BUFSIZE]; 
7435                 struct in_addr add;
7436                 size_t alen=sizeof(struct in_addr);
7437                 int bufsize=BUFSIZE;int h_errno;
7438                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7439                         alen, AF_INET, &hent, buffer, bufsize, 
7440                         &rhent, &h_errno);
7441 ; return 0; }
7442 EOF
7443 if { (eval echo configure:7444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7444   rm -rf conftest*
7445   ol_cv_func_gethostbyaddr_r_nargs8=yes
7446 else
7447   echo "configure: failed program was:" >&5
7448   cat conftest.$ac_ext >&5
7449   rm -rf conftest*
7450   ol_cv_func_gethostbyaddr_r_nargs8=no
7451 fi
7452 rm -f conftest*
7453
7454         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7455                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7456
7457                 ol_cv_func_gethostbyaddr_r_nargs=7
7458
7459         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7460                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7461
7462                 ol_cv_func_gethostbyaddr_r_nargs=8
7463
7464         else
7465                 ol_cv_func_gethostbyaddr_r_nargs=0
7466         fi
7467   
7468 fi
7469
7470 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7471   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7472     cat >> confdefs.h <<EOF
7473 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7474 EOF
7475
7476   fi
7477
7478 else
7479         ol_cv_func_gethostbyaddr_r_nargs=0
7480 fi
7481
7482 if test "$ac_cv_func_ctime_r" = yes \
7483         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7484         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7485         -a "$ac_cv_func_gethostbyname_r" = yes \
7486         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7487         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7488         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7489         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7490         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7491         ; then
7492  
7493         cat >> confdefs.h <<\EOF
7494 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7495 EOF
7496
7497 fi
7498
7499 ol_link_threads=no
7500
7501 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7502         -o $ol_with_threads = nt ; then
7503
7504         
7505         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7506 echo "configure:7507: checking for _beginthread" >&5
7507 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7508   echo $ac_n "(cached) $ac_c" 1>&6
7509 else
7510   cat > conftest.$ac_ext <<EOF
7511 #line 7512 "configure"
7512 #include "confdefs.h"
7513 /* System header to define __stub macros and hopefully few prototypes,
7514     which can conflict with char _beginthread(); below.  */
7515 #include <assert.h>
7516 /* Override any gcc2 internal prototype to avoid an error.  */
7517 /* We use char because int might match the return type of a gcc2
7518     builtin and then its argument prototype would still apply.  */
7519 char _beginthread();
7520 char (*f)();
7521
7522 int main() {
7523
7524 /* The GNU C library defines this for functions which it implements
7525     to always fail with ENOSYS.  Some functions are actually named
7526     something starting with __ and the normal name is an alias.  */
7527 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7528 choke me
7529 #else
7530 f = _beginthread;
7531 #endif
7532
7533 ; return 0; }
7534 EOF
7535 if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7536   rm -rf conftest*
7537   eval "ac_cv_func__beginthread=yes"
7538 else
7539   echo "configure: failed program was:" >&5
7540   cat conftest.$ac_ext >&5
7541   rm -rf conftest*
7542   eval "ac_cv_func__beginthread=no"
7543 fi
7544 rm -f conftest*
7545 fi
7546
7547 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7548   echo "$ac_t""yes" 1>&6
7549   :
7550 else
7551   echo "$ac_t""no" 1>&6
7552 fi
7553
7554
7555         if test $ac_cv_func__beginthread = yes ; then
7556                 cat >> confdefs.h <<\EOF
7557 #define HAVE_NT_THREADS 1
7558 EOF
7559
7560                 ol_cv_nt_threads=yes
7561         fi
7562
7563
7564         if test "$ol_cv_nt_threads" = yes ; then
7565                 ol_link_threads=nt
7566                 ol_with_threads=found
7567                 ol_with_yielding_select=yes
7568
7569                 cat >> confdefs.h <<\EOF
7570 #define HAVE_NT_SERVICE_MANAGER 1
7571 EOF
7572
7573                 cat >> confdefs.h <<\EOF
7574 #define HAVE_NT_EVENT_LOG 1
7575 EOF
7576
7577         fi
7578
7579         if test $ol_with_threads = nt ; then
7580                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7581         fi
7582 fi
7583
7584 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7585         -o $ol_with_threads = posix ; then
7586
7587         for ac_hdr in pthread.h
7588 do
7589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7591 echo "configure:7592: checking for $ac_hdr" >&5
7592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7593   echo $ac_n "(cached) $ac_c" 1>&6
7594 else
7595   cat > conftest.$ac_ext <<EOF
7596 #line 7597 "configure"
7597 #include "confdefs.h"
7598 #include <$ac_hdr>
7599 EOF
7600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7601 { (eval echo configure:7602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7603 if test -z "$ac_err"; then
7604   rm -rf conftest*
7605   eval "ac_cv_header_$ac_safe=yes"
7606 else
7607   echo "$ac_err" >&5
7608   echo "configure: failed program was:" >&5
7609   cat conftest.$ac_ext >&5
7610   rm -rf conftest*
7611   eval "ac_cv_header_$ac_safe=no"
7612 fi
7613 rm -f conftest*
7614 fi
7615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7616   echo "$ac_t""yes" 1>&6
7617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7618   cat >> confdefs.h <<EOF
7619 #define $ac_tr_hdr 1
7620 EOF
7621  
7622 else
7623   echo "$ac_t""no" 1>&6
7624 fi
7625 done
7626
7627
7628         if test $ac_cv_header_pthread_h = yes ; then
7629                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7630 echo "configure:7631: checking POSIX thread version" >&5
7631 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7632   echo $ac_n "(cached) $ac_c" 1>&6
7633 else
7634   
7635         cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638
7639 #               include <pthread.h>
7640                 /* this check could be improved */
7641 #               ifdef PTHREAD_ONCE_INIT
7642                         pthread_version_final;
7643 #               endif
7644         
7645 EOF
7646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7647   egrep "pthread_version_final" >/dev/null 2>&1; then
7648   rm -rf conftest*
7649   ol_pthread_final=yes
7650 else
7651   rm -rf conftest*
7652   ol_pthread_final=no
7653 fi
7654 rm -f conftest*
7655
7656
7657         cat > conftest.$ac_ext <<EOF
7658 #line 7659 "configure"
7659 #include "confdefs.h"
7660
7661 #               include <pthread.h>
7662                 /* this check could be improved */
7663 #               ifdef pthread_once_init
7664                         pthread_version_draft4;
7665 #               endif
7666         
7667 EOF
7668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7669   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7670   rm -rf conftest*
7671   ol_pthread_draft4=yes
7672 else
7673   rm -rf conftest*
7674   ol_pthread_draft4=no
7675 fi
7676 rm -f conftest*
7677
7678
7679         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7680                 ol_cv_pthread_version=final
7681         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7682                 ol_cv_pthread_version=draft4
7683         else
7684                 ol_cv_pthread_version=unknown
7685         fi
7686
7687 fi
7688
7689 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7690
7691
7692                 if test $ol_cv_pthread_version = final ; then
7693                         cat >> confdefs.h <<\EOF
7694 #define HAVE_PTHREADS_FINAL 1
7695 EOF
7696
7697                 elif test $ol_cv_pthread_version = draft4 ; then
7698                         cat >> confdefs.h <<\EOF
7699 #define HAVE_PTHREADS_D4 1
7700 EOF
7701
7702                 else
7703                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7704                 fi
7705
7706                 # consider threads found
7707                 ol_with_threads=found
7708
7709                 
7710         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7711 echo "configure:7712: checking for LinuxThreads pthread.h" >&5
7712 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7713   echo $ac_n "(cached) $ac_c" 1>&6
7714 else
7715   cat > conftest.$ac_ext <<EOF
7716 #line 7717 "configure"
7717 #include "confdefs.h"
7718 #include <pthread.h>
7719 EOF
7720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7721   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7722   rm -rf conftest*
7723   ol_cv_header_linux_threads=yes
7724 else
7725   rm -rf conftest*
7726   ol_cv_header_linux_threads=no
7727 fi
7728 rm -f conftest*
7729
7730                 
7731 fi
7732
7733 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7734         if test $ol_cv_header_linux_threads = yes; then
7735                 cat >> confdefs.h <<\EOF
7736 #define HAVE_LINUX_THREADS 1
7737 EOF
7738
7739         fi
7740
7741                 
7742         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7743 echo "configure:7744: checking for GNU Pth pthread.h" >&5
7744 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7745   echo $ac_n "(cached) $ac_c" 1>&6
7746 else
7747   cat > conftest.$ac_ext <<EOF
7748 #line 7749 "configure"
7749 #include "confdefs.h"
7750 #include <pthread.h>
7751 #ifdef _POSIX_THREAD_IS_GNU_PTH
7752         __gnu_pth__;
7753 #endif
7754
7755 EOF
7756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7757   egrep "__gnu_pth__" >/dev/null 2>&1; then
7758   rm -rf conftest*
7759   ol_cv_header_gnu_pth_pthread_h=yes
7760 else
7761   rm -rf conftest*
7762   ol_cv_header_gnu_pth_pthread_h=no
7763 fi
7764 rm -f conftest*
7765
7766                 
7767 fi
7768
7769 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7770
7771
7772                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7773                         for ac_hdr in sched.h
7774 do
7775 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7776 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7777 echo "configure:7778: checking for $ac_hdr" >&5
7778 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7779   echo $ac_n "(cached) $ac_c" 1>&6
7780 else
7781   cat > conftest.$ac_ext <<EOF
7782 #line 7783 "configure"
7783 #include "confdefs.h"
7784 #include <$ac_hdr>
7785 EOF
7786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7787 { (eval echo configure:7788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7789 if test -z "$ac_err"; then
7790   rm -rf conftest*
7791   eval "ac_cv_header_$ac_safe=yes"
7792 else
7793   echo "$ac_err" >&5
7794   echo "configure: failed program was:" >&5
7795   cat conftest.$ac_ext >&5
7796   rm -rf conftest*
7797   eval "ac_cv_header_$ac_safe=no"
7798 fi
7799 rm -f conftest*
7800 fi
7801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7802   echo "$ac_t""yes" 1>&6
7803     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7804   cat >> confdefs.h <<EOF
7805 #define $ac_tr_hdr 1
7806 EOF
7807  
7808 else
7809   echo "$ac_t""no" 1>&6
7810 fi
7811 done
7812
7813                 fi
7814
7815                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7816                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7817 echo "configure:7818: checking for pthread_create in default libraries" >&5
7818 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7819   echo $ac_n "(cached) $ac_c" 1>&6
7820 else
7821   
7822                 if test "$cross_compiling" = yes; then
7823   cat > conftest.$ac_ext <<EOF
7824 #line 7825 "configure"
7825 #include "confdefs.h"
7826 /* pthread test headers */
7827 #include <pthread.h>
7828 #ifndef NULL
7829 #define NULL (void*)0
7830 #endif
7831
7832 static void *task(p)
7833         void *p;
7834 {
7835         return (void *) (p == NULL);
7836 }
7837
7838 int main() {
7839
7840         /* pthread test function */
7841         pthread_t t;
7842         int status;
7843         int detach = 1;
7844
7845 #ifdef HAVE_PTHREADS_FINAL
7846         /* Final pthreads */
7847         pthread_attr_t attr;
7848
7849         status = pthread_attr_init(&attr);
7850         if( status ) return status;
7851
7852 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7853         if( !detach ) {
7854 #if defined( PTHREAD_CREATE_JOINABLE )
7855                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7856 #else
7857                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7858 #endif
7859
7860 #ifdef PTHREAD_CREATE_DETACHED
7861         } else {
7862                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7863 #endif
7864         }
7865         if( status ) return status;
7866 #endif
7867
7868         status = pthread_create( &t, &attr, task, NULL );
7869         if( status ) return status;
7870
7871 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7872         if( detach ) {
7873                 /* give thread a chance to complete */
7874                 /* it should remain joinable and hence detachable */
7875                 sleep( 1 );
7876
7877                 status = pthread_detach( t );
7878                 if( status ) return status;
7879         }
7880 #endif
7881
7882 #else
7883         /* Draft 4 pthreads */
7884         status = pthread_create( &t, pthread_attr_default, task, NULL );
7885         if( status ) return status;
7886
7887         if( detach ) {
7888                 /* give thread a chance to complete */
7889                 /* it should remain joinable and hence detachable */
7890                 sleep( 1 );
7891
7892                 status = pthread_detach( &t );
7893                 if( status ) return status;
7894         }
7895 #endif
7896
7897 #ifdef HAVE_LINUX_THREADS
7898         pthread_kill_other_threads_np();
7899 #endif
7900
7901         return 0;
7902
7903 ; return 0; }
7904 EOF
7905 if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7906   rm -rf conftest*
7907   ol_cv_pthread_create=yes
7908 else
7909   echo "configure: failed program was:" >&5
7910   cat conftest.$ac_ext >&5
7911   rm -rf conftest*
7912   ol_cv_pthread_create=no
7913 fi
7914 rm -f conftest*
7915 else
7916   cat > conftest.$ac_ext <<EOF
7917 #line 7918 "configure"
7918 #include "confdefs.h"
7919 /* pthread test headers */
7920 #include <pthread.h>
7921 #ifndef NULL
7922 #define NULL (void*)0
7923 #endif
7924
7925 static void *task(p)
7926         void *p;
7927 {
7928         return (void *) (p == NULL);
7929 }
7930
7931
7932 int main(argc, argv)
7933         int argc;
7934         char **argv;
7935 {
7936
7937         /* pthread test function */
7938         pthread_t t;
7939         int status;
7940         int detach = 1;
7941
7942 #ifdef HAVE_PTHREADS_FINAL
7943         /* Final pthreads */
7944         pthread_attr_t attr;
7945
7946         status = pthread_attr_init(&attr);
7947         if( status ) return status;
7948
7949 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7950         if( !detach ) {
7951 #if defined( PTHREAD_CREATE_JOINABLE )
7952                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7953 #else
7954                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7955 #endif
7956
7957 #ifdef PTHREAD_CREATE_DETACHED
7958         } else {
7959                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7960 #endif
7961         }
7962         if( status ) return status;
7963 #endif
7964
7965         status = pthread_create( &t, &attr, task, NULL );
7966         if( status ) return status;
7967
7968 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7969         if( detach ) {
7970                 /* give thread a chance to complete */
7971                 /* it should remain joinable and hence detachable */
7972                 sleep( 1 );
7973
7974                 status = pthread_detach( t );
7975                 if( status ) return status;
7976         }
7977 #endif
7978
7979 #else
7980         /* Draft 4 pthreads */
7981         status = pthread_create( &t, pthread_attr_default, task, NULL );
7982         if( status ) return status;
7983
7984         if( detach ) {
7985                 /* give thread a chance to complete */
7986                 /* it should remain joinable and hence detachable */
7987                 sleep( 1 );
7988
7989                 status = pthread_detach( &t );
7990                 if( status ) return status;
7991         }
7992 #endif
7993
7994 #ifdef HAVE_LINUX_THREADS
7995         pthread_kill_other_threads_np();
7996 #endif
7997
7998         return 0;
7999
8000 }
8001
8002 EOF
8003 if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8004 then
8005   ol_cv_pthread_create=yes
8006 else
8007   echo "configure: failed program was:" >&5
8008   cat conftest.$ac_ext >&5
8009   rm -fr conftest*
8010   ol_cv_pthread_create=no
8011 fi
8012 rm -fr conftest*
8013 fi
8014
8015 fi
8016
8017 echo "$ac_t""$ol_cv_pthread_create" 1>&6
8018
8019                 if test $ol_cv_pthread_create != no ; then
8020                         ol_link_threads=posix
8021                         ol_link_pthreads=""
8022                 fi
8023                 
8024                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
8025 if test "$ol_link_threads" = no ; then
8026         # try -kthread
8027         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
8028 echo "configure:8029: checking for pthread link with -kthread" >&5
8029 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
8030   echo $ac_n "(cached) $ac_c" 1>&6
8031 else
8032   
8033                 # save the flags
8034                 ol_LIBS="$LIBS"
8035                 LIBS="-kthread $LIBS"
8036
8037                 if test "$cross_compiling" = yes; then
8038   cat > conftest.$ac_ext <<EOF
8039 #line 8040 "configure"
8040 #include "confdefs.h"
8041 /* pthread test headers */
8042 #include <pthread.h>
8043 #ifndef NULL
8044 #define NULL (void*)0
8045 #endif
8046
8047 static void *task(p)
8048         void *p;
8049 {
8050         return (void *) (p == NULL);
8051 }
8052
8053 int main() {
8054
8055         /* pthread test function */
8056         pthread_t t;
8057         int status;
8058         int detach = 1;
8059
8060 #ifdef HAVE_PTHREADS_FINAL
8061         /* Final pthreads */
8062         pthread_attr_t attr;
8063
8064         status = pthread_attr_init(&attr);
8065         if( status ) return status;
8066
8067 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8068         if( !detach ) {
8069 #if defined( PTHREAD_CREATE_JOINABLE )
8070                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8071 #else
8072                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8073 #endif
8074
8075 #ifdef PTHREAD_CREATE_DETACHED
8076         } else {
8077                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8078 #endif
8079         }
8080         if( status ) return status;
8081 #endif
8082
8083         status = pthread_create( &t, &attr, task, NULL );
8084         if( status ) return status;
8085
8086 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8087         if( detach ) {
8088                 /* give thread a chance to complete */
8089                 /* it should remain joinable and hence detachable */
8090                 sleep( 1 );
8091
8092                 status = pthread_detach( t );
8093                 if( status ) return status;
8094         }
8095 #endif
8096
8097 #else
8098         /* Draft 4 pthreads */
8099         status = pthread_create( &t, pthread_attr_default, task, NULL );
8100         if( status ) return status;
8101
8102         if( detach ) {
8103                 /* give thread a chance to complete */
8104                 /* it should remain joinable and hence detachable */
8105                 sleep( 1 );
8106
8107                 status = pthread_detach( &t );
8108                 if( status ) return status;
8109         }
8110 #endif
8111
8112 #ifdef HAVE_LINUX_THREADS
8113         pthread_kill_other_threads_np();
8114 #endif
8115
8116         return 0;
8117
8118 ; return 0; }
8119 EOF
8120 if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8121   rm -rf conftest*
8122   ol_cv_pthread_kthread=yes
8123 else
8124   echo "configure: failed program was:" >&5
8125   cat conftest.$ac_ext >&5
8126   rm -rf conftest*
8127   ol_cv_pthread_kthread=no
8128 fi
8129 rm -f conftest*
8130 else
8131   cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 /* pthread test headers */
8135 #include <pthread.h>
8136 #ifndef NULL
8137 #define NULL (void*)0
8138 #endif
8139
8140 static void *task(p)
8141         void *p;
8142 {
8143         return (void *) (p == NULL);
8144 }
8145
8146
8147 int main(argc, argv)
8148         int argc;
8149         char **argv;
8150 {
8151
8152         /* pthread test function */
8153         pthread_t t;
8154         int status;
8155         int detach = 1;
8156
8157 #ifdef HAVE_PTHREADS_FINAL
8158         /* Final pthreads */
8159         pthread_attr_t attr;
8160
8161         status = pthread_attr_init(&attr);
8162         if( status ) return status;
8163
8164 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8165         if( !detach ) {
8166 #if defined( PTHREAD_CREATE_JOINABLE )
8167                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8168 #else
8169                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8170 #endif
8171
8172 #ifdef PTHREAD_CREATE_DETACHED
8173         } else {
8174                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8175 #endif
8176         }
8177         if( status ) return status;
8178 #endif
8179
8180         status = pthread_create( &t, &attr, task, NULL );
8181         if( status ) return status;
8182
8183 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8184         if( detach ) {
8185                 /* give thread a chance to complete */
8186                 /* it should remain joinable and hence detachable */
8187                 sleep( 1 );
8188
8189                 status = pthread_detach( t );
8190                 if( status ) return status;
8191         }
8192 #endif
8193
8194 #else
8195         /* Draft 4 pthreads */
8196         status = pthread_create( &t, pthread_attr_default, task, NULL );
8197         if( status ) return status;
8198
8199         if( detach ) {
8200                 /* give thread a chance to complete */
8201                 /* it should remain joinable and hence detachable */
8202                 sleep( 1 );
8203
8204                 status = pthread_detach( &t );
8205                 if( status ) return status;
8206         }
8207 #endif
8208
8209 #ifdef HAVE_LINUX_THREADS
8210         pthread_kill_other_threads_np();
8211 #endif
8212
8213         return 0;
8214
8215 }
8216
8217 EOF
8218 if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8219 then
8220   ol_cv_pthread_kthread=yes
8221 else
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224   rm -fr conftest*
8225   ol_cv_pthread_kthread=no
8226 fi
8227 rm -fr conftest*
8228 fi
8229
8230
8231                 # restore the LIBS
8232                 LIBS="$ol_LIBS"
8233         
8234 fi
8235
8236 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
8237
8238         if test $ol_cv_pthread_kthread = yes ; then
8239                 ol_link_pthreads="-kthread"
8240                 ol_link_threads=posix
8241         fi
8242 fi
8243
8244                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
8245 if test "$ol_link_threads" = no ; then
8246         # try -pthread
8247         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
8248 echo "configure:8249: checking for pthread link with -pthread" >&5
8249 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
8250   echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252   
8253                 # save the flags
8254                 ol_LIBS="$LIBS"
8255                 LIBS="-pthread $LIBS"
8256
8257                 if test "$cross_compiling" = yes; then
8258   cat > conftest.$ac_ext <<EOF
8259 #line 8260 "configure"
8260 #include "confdefs.h"
8261 /* pthread test headers */
8262 #include <pthread.h>
8263 #ifndef NULL
8264 #define NULL (void*)0
8265 #endif
8266
8267 static void *task(p)
8268         void *p;
8269 {
8270         return (void *) (p == NULL);
8271 }
8272
8273 int main() {
8274
8275         /* pthread test function */
8276         pthread_t t;
8277         int status;
8278         int detach = 1;
8279
8280 #ifdef HAVE_PTHREADS_FINAL
8281         /* Final pthreads */
8282         pthread_attr_t attr;
8283
8284         status = pthread_attr_init(&attr);
8285         if( status ) return status;
8286
8287 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8288         if( !detach ) {
8289 #if defined( PTHREAD_CREATE_JOINABLE )
8290                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8291 #else
8292                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8293 #endif
8294
8295 #ifdef PTHREAD_CREATE_DETACHED
8296         } else {
8297                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8298 #endif
8299         }
8300         if( status ) return status;
8301 #endif
8302
8303         status = pthread_create( &t, &attr, task, NULL );
8304         if( status ) return status;
8305
8306 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8307         if( detach ) {
8308                 /* give thread a chance to complete */
8309                 /* it should remain joinable and hence detachable */
8310                 sleep( 1 );
8311
8312                 status = pthread_detach( t );
8313                 if( status ) return status;
8314         }
8315 #endif
8316
8317 #else
8318         /* Draft 4 pthreads */
8319         status = pthread_create( &t, pthread_attr_default, task, NULL );
8320         if( status ) return status;
8321
8322         if( detach ) {
8323                 /* give thread a chance to complete */
8324                 /* it should remain joinable and hence detachable */
8325                 sleep( 1 );
8326
8327                 status = pthread_detach( &t );
8328                 if( status ) return status;
8329         }
8330 #endif
8331
8332 #ifdef HAVE_LINUX_THREADS
8333         pthread_kill_other_threads_np();
8334 #endif
8335
8336         return 0;
8337
8338 ; return 0; }
8339 EOF
8340 if { (eval echo configure:8341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8341   rm -rf conftest*
8342   ol_cv_pthread_pthread=yes
8343 else
8344   echo "configure: failed program was:" >&5
8345   cat conftest.$ac_ext >&5
8346   rm -rf conftest*
8347   ol_cv_pthread_pthread=no
8348 fi
8349 rm -f conftest*
8350 else
8351   cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 /* pthread test headers */
8355 #include <pthread.h>
8356 #ifndef NULL
8357 #define NULL (void*)0
8358 #endif
8359
8360 static void *task(p)
8361         void *p;
8362 {
8363         return (void *) (p == NULL);
8364 }
8365
8366
8367 int main(argc, argv)
8368         int argc;
8369         char **argv;
8370 {
8371
8372         /* pthread test function */
8373         pthread_t t;
8374         int status;
8375         int detach = 1;
8376
8377 #ifdef HAVE_PTHREADS_FINAL
8378         /* Final pthreads */
8379         pthread_attr_t attr;
8380
8381         status = pthread_attr_init(&attr);
8382         if( status ) return status;
8383
8384 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8385         if( !detach ) {
8386 #if defined( PTHREAD_CREATE_JOINABLE )
8387                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8388 #else
8389                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8390 #endif
8391
8392 #ifdef PTHREAD_CREATE_DETACHED
8393         } else {
8394                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8395 #endif
8396         }
8397         if( status ) return status;
8398 #endif
8399
8400         status = pthread_create( &t, &attr, task, NULL );
8401         if( status ) return status;
8402
8403 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8404         if( detach ) {
8405                 /* give thread a chance to complete */
8406                 /* it should remain joinable and hence detachable */
8407                 sleep( 1 );
8408
8409                 status = pthread_detach( t );
8410                 if( status ) return status;
8411         }
8412 #endif
8413
8414 #else
8415         /* Draft 4 pthreads */
8416         status = pthread_create( &t, pthread_attr_default, task, NULL );
8417         if( status ) return status;
8418
8419         if( detach ) {
8420                 /* give thread a chance to complete */
8421                 /* it should remain joinable and hence detachable */
8422                 sleep( 1 );
8423
8424                 status = pthread_detach( &t );
8425                 if( status ) return status;
8426         }
8427 #endif
8428
8429 #ifdef HAVE_LINUX_THREADS
8430         pthread_kill_other_threads_np();
8431 #endif
8432
8433         return 0;
8434
8435 }
8436
8437 EOF
8438 if { (eval echo configure:8439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8439 then
8440   ol_cv_pthread_pthread=yes
8441 else
8442   echo "configure: failed program was:" >&5
8443   cat conftest.$ac_ext >&5
8444   rm -fr conftest*
8445   ol_cv_pthread_pthread=no
8446 fi
8447 rm -fr conftest*
8448 fi
8449
8450
8451                 # restore the LIBS
8452                 LIBS="$ol_LIBS"
8453         
8454 fi
8455
8456 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
8457
8458         if test $ol_cv_pthread_pthread = yes ; then
8459                 ol_link_pthreads="-pthread"
8460                 ol_link_threads=posix
8461         fi
8462 fi
8463
8464                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
8465 if test "$ol_link_threads" = no ; then
8466         # try -pthreads
8467         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
8468 echo "configure:8469: checking for pthread link with -pthreads" >&5
8469 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
8470   echo $ac_n "(cached) $ac_c" 1>&6
8471 else
8472   
8473                 # save the flags
8474                 ol_LIBS="$LIBS"
8475                 LIBS="-pthreads $LIBS"
8476
8477                 if test "$cross_compiling" = yes; then
8478   cat > conftest.$ac_ext <<EOF
8479 #line 8480 "configure"
8480 #include "confdefs.h"
8481 /* pthread test headers */
8482 #include <pthread.h>
8483 #ifndef NULL
8484 #define NULL (void*)0
8485 #endif
8486
8487 static void *task(p)
8488         void *p;
8489 {
8490         return (void *) (p == NULL);
8491 }
8492
8493 int main() {
8494
8495         /* pthread test function */
8496         pthread_t t;
8497         int status;
8498         int detach = 1;
8499
8500 #ifdef HAVE_PTHREADS_FINAL
8501         /* Final pthreads */
8502         pthread_attr_t attr;
8503
8504         status = pthread_attr_init(&attr);
8505         if( status ) return status;
8506
8507 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8508         if( !detach ) {
8509 #if defined( PTHREAD_CREATE_JOINABLE )
8510                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8511 #else
8512                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8513 #endif
8514
8515 #ifdef PTHREAD_CREATE_DETACHED
8516         } else {
8517                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8518 #endif
8519         }
8520         if( status ) return status;
8521 #endif
8522
8523         status = pthread_create( &t, &attr, task, NULL );
8524         if( status ) return status;
8525
8526 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8527         if( detach ) {
8528                 /* give thread a chance to complete */
8529                 /* it should remain joinable and hence detachable */
8530                 sleep( 1 );
8531
8532                 status = pthread_detach( t );
8533                 if( status ) return status;
8534         }
8535 #endif
8536
8537 #else
8538         /* Draft 4 pthreads */
8539         status = pthread_create( &t, pthread_attr_default, task, NULL );
8540         if( status ) return status;
8541
8542         if( detach ) {
8543                 /* give thread a chance to complete */
8544                 /* it should remain joinable and hence detachable */
8545                 sleep( 1 );
8546
8547                 status = pthread_detach( &t );
8548                 if( status ) return status;
8549         }
8550 #endif
8551
8552 #ifdef HAVE_LINUX_THREADS
8553         pthread_kill_other_threads_np();
8554 #endif
8555
8556         return 0;
8557
8558 ; return 0; }
8559 EOF
8560 if { (eval echo configure:8561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8561   rm -rf conftest*
8562   ol_cv_pthread_pthreads=yes
8563 else
8564   echo "configure: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   rm -rf conftest*
8567   ol_cv_pthread_pthreads=no
8568 fi
8569 rm -f conftest*
8570 else
8571   cat > conftest.$ac_ext <<EOF
8572 #line 8573 "configure"
8573 #include "confdefs.h"
8574 /* pthread test headers */
8575 #include <pthread.h>
8576 #ifndef NULL
8577 #define NULL (void*)0
8578 #endif
8579
8580 static void *task(p)
8581         void *p;
8582 {
8583         return (void *) (p == NULL);
8584 }
8585
8586
8587 int main(argc, argv)
8588         int argc;
8589         char **argv;
8590 {
8591
8592         /* pthread test function */
8593         pthread_t t;
8594         int status;
8595         int detach = 1;
8596
8597 #ifdef HAVE_PTHREADS_FINAL
8598         /* Final pthreads */
8599         pthread_attr_t attr;
8600
8601         status = pthread_attr_init(&attr);
8602         if( status ) return status;
8603
8604 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8605         if( !detach ) {
8606 #if defined( PTHREAD_CREATE_JOINABLE )
8607                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8608 #else
8609                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8610 #endif
8611
8612 #ifdef PTHREAD_CREATE_DETACHED
8613         } else {
8614                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8615 #endif
8616         }
8617         if( status ) return status;
8618 #endif
8619
8620         status = pthread_create( &t, &attr, task, NULL );
8621         if( status ) return status;
8622
8623 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8624         if( detach ) {
8625                 /* give thread a chance to complete */
8626                 /* it should remain joinable and hence detachable */
8627                 sleep( 1 );
8628
8629                 status = pthread_detach( t );
8630                 if( status ) return status;
8631         }
8632 #endif
8633
8634 #else
8635         /* Draft 4 pthreads */
8636         status = pthread_create( &t, pthread_attr_default, task, NULL );
8637         if( status ) return status;
8638
8639         if( detach ) {
8640                 /* give thread a chance to complete */
8641                 /* it should remain joinable and hence detachable */
8642                 sleep( 1 );
8643
8644                 status = pthread_detach( &t );
8645                 if( status ) return status;
8646         }
8647 #endif
8648
8649 #ifdef HAVE_LINUX_THREADS
8650         pthread_kill_other_threads_np();
8651 #endif
8652
8653         return 0;
8654
8655 }
8656
8657 EOF
8658 if { (eval echo configure:8659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8659 then
8660   ol_cv_pthread_pthreads=yes
8661 else
8662   echo "configure: failed program was:" >&5
8663   cat conftest.$ac_ext >&5
8664   rm -fr conftest*
8665   ol_cv_pthread_pthreads=no
8666 fi
8667 rm -fr conftest*
8668 fi
8669
8670
8671                 # restore the LIBS
8672                 LIBS="$ol_LIBS"
8673         
8674 fi
8675
8676 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8677
8678         if test $ol_cv_pthread_pthreads = yes ; then
8679                 ol_link_pthreads="-pthreads"
8680                 ol_link_threads=posix
8681         fi
8682 fi
8683
8684                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8685 if test "$ol_link_threads" = no ; then
8686         # try -mthreads
8687         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8688 echo "configure:8689: checking for pthread link with -mthreads" >&5
8689 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8690   echo $ac_n "(cached) $ac_c" 1>&6
8691 else
8692   
8693                 # save the flags
8694                 ol_LIBS="$LIBS"
8695                 LIBS="-mthreads $LIBS"
8696
8697                 if test "$cross_compiling" = yes; then
8698   cat > conftest.$ac_ext <<EOF
8699 #line 8700 "configure"
8700 #include "confdefs.h"
8701 /* pthread test headers */
8702 #include <pthread.h>
8703 #ifndef NULL
8704 #define NULL (void*)0
8705 #endif
8706
8707 static void *task(p)
8708         void *p;
8709 {
8710         return (void *) (p == NULL);
8711 }
8712
8713 int main() {
8714
8715         /* pthread test function */
8716         pthread_t t;
8717         int status;
8718         int detach = 1;
8719
8720 #ifdef HAVE_PTHREADS_FINAL
8721         /* Final pthreads */
8722         pthread_attr_t attr;
8723
8724         status = pthread_attr_init(&attr);
8725         if( status ) return status;
8726
8727 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8728         if( !detach ) {
8729 #if defined( PTHREAD_CREATE_JOINABLE )
8730                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8731 #else
8732                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8733 #endif
8734
8735 #ifdef PTHREAD_CREATE_DETACHED
8736         } else {
8737                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8738 #endif
8739         }
8740         if( status ) return status;
8741 #endif
8742
8743         status = pthread_create( &t, &attr, task, NULL );
8744         if( status ) return status;
8745
8746 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8747         if( detach ) {
8748                 /* give thread a chance to complete */
8749                 /* it should remain joinable and hence detachable */
8750                 sleep( 1 );
8751
8752                 status = pthread_detach( t );
8753                 if( status ) return status;
8754         }
8755 #endif
8756
8757 #else
8758         /* Draft 4 pthreads */
8759         status = pthread_create( &t, pthread_attr_default, task, NULL );
8760         if( status ) return status;
8761
8762         if( detach ) {
8763                 /* give thread a chance to complete */
8764                 /* it should remain joinable and hence detachable */
8765                 sleep( 1 );
8766
8767                 status = pthread_detach( &t );
8768                 if( status ) return status;
8769         }
8770 #endif
8771
8772 #ifdef HAVE_LINUX_THREADS
8773         pthread_kill_other_threads_np();
8774 #endif
8775
8776         return 0;
8777
8778 ; return 0; }
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8781   rm -rf conftest*
8782   ol_cv_pthread_mthreads=yes
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -rf conftest*
8787   ol_cv_pthread_mthreads=no
8788 fi
8789 rm -f conftest*
8790 else
8791   cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794 /* pthread test headers */
8795 #include <pthread.h>
8796 #ifndef NULL
8797 #define NULL (void*)0
8798 #endif
8799
8800 static void *task(p)
8801         void *p;
8802 {
8803         return (void *) (p == NULL);
8804 }
8805
8806
8807 int main(argc, argv)
8808         int argc;
8809         char **argv;
8810 {
8811
8812         /* pthread test function */
8813         pthread_t t;
8814         int status;
8815         int detach = 1;
8816
8817 #ifdef HAVE_PTHREADS_FINAL
8818         /* Final pthreads */
8819         pthread_attr_t attr;
8820
8821         status = pthread_attr_init(&attr);
8822         if( status ) return status;
8823
8824 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8825         if( !detach ) {
8826 #if defined( PTHREAD_CREATE_JOINABLE )
8827                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8828 #else
8829                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8830 #endif
8831
8832 #ifdef PTHREAD_CREATE_DETACHED
8833         } else {
8834                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8835 #endif
8836         }
8837         if( status ) return status;
8838 #endif
8839
8840         status = pthread_create( &t, &attr, task, NULL );
8841         if( status ) return status;
8842
8843 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8844         if( detach ) {
8845                 /* give thread a chance to complete */
8846                 /* it should remain joinable and hence detachable */
8847                 sleep( 1 );
8848
8849                 status = pthread_detach( t );
8850                 if( status ) return status;
8851         }
8852 #endif
8853
8854 #else
8855         /* Draft 4 pthreads */
8856         status = pthread_create( &t, pthread_attr_default, task, NULL );
8857         if( status ) return status;
8858
8859         if( detach ) {
8860                 /* give thread a chance to complete */
8861                 /* it should remain joinable and hence detachable */
8862                 sleep( 1 );
8863
8864                 status = pthread_detach( &t );
8865                 if( status ) return status;
8866         }
8867 #endif
8868
8869 #ifdef HAVE_LINUX_THREADS
8870         pthread_kill_other_threads_np();
8871 #endif
8872
8873         return 0;
8874
8875 }
8876
8877 EOF
8878 if { (eval echo configure:8879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8879 then
8880   ol_cv_pthread_mthreads=yes
8881 else
8882   echo "configure: failed program was:" >&5
8883   cat conftest.$ac_ext >&5
8884   rm -fr conftest*
8885   ol_cv_pthread_mthreads=no
8886 fi
8887 rm -fr conftest*
8888 fi
8889
8890
8891                 # restore the LIBS
8892                 LIBS="$ol_LIBS"
8893         
8894 fi
8895
8896 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8897
8898         if test $ol_cv_pthread_mthreads = yes ; then
8899                 ol_link_pthreads="-mthreads"
8900                 ol_link_threads=posix
8901         fi
8902 fi
8903
8904                 # Pthread try link: -thread (ol_cv_pthread_thread)
8905 if test "$ol_link_threads" = no ; then
8906         # try -thread
8907         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8908 echo "configure:8909: checking for pthread link with -thread" >&5
8909 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8910   echo $ac_n "(cached) $ac_c" 1>&6
8911 else
8912   
8913                 # save the flags
8914                 ol_LIBS="$LIBS"
8915                 LIBS="-thread $LIBS"
8916
8917                 if test "$cross_compiling" = yes; then
8918   cat > conftest.$ac_ext <<EOF
8919 #line 8920 "configure"
8920 #include "confdefs.h"
8921 /* pthread test headers */
8922 #include <pthread.h>
8923 #ifndef NULL
8924 #define NULL (void*)0
8925 #endif
8926
8927 static void *task(p)
8928         void *p;
8929 {
8930         return (void *) (p == NULL);
8931 }
8932
8933 int main() {
8934
8935         /* pthread test function */
8936         pthread_t t;
8937         int status;
8938         int detach = 1;
8939
8940 #ifdef HAVE_PTHREADS_FINAL
8941         /* Final pthreads */
8942         pthread_attr_t attr;
8943
8944         status = pthread_attr_init(&attr);
8945         if( status ) return status;
8946
8947 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8948         if( !detach ) {
8949 #if defined( PTHREAD_CREATE_JOINABLE )
8950                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8951 #else
8952                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8953 #endif
8954
8955 #ifdef PTHREAD_CREATE_DETACHED
8956         } else {
8957                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8958 #endif
8959         }
8960         if( status ) return status;
8961 #endif
8962
8963         status = pthread_create( &t, &attr, task, NULL );
8964         if( status ) return status;
8965
8966 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8967         if( detach ) {
8968                 /* give thread a chance to complete */
8969                 /* it should remain joinable and hence detachable */
8970                 sleep( 1 );
8971
8972                 status = pthread_detach( t );
8973                 if( status ) return status;
8974         }
8975 #endif
8976
8977 #else
8978         /* Draft 4 pthreads */
8979         status = pthread_create( &t, pthread_attr_default, task, NULL );
8980         if( status ) return status;
8981
8982         if( detach ) {
8983                 /* give thread a chance to complete */
8984                 /* it should remain joinable and hence detachable */
8985                 sleep( 1 );
8986
8987                 status = pthread_detach( &t );
8988                 if( status ) return status;
8989         }
8990 #endif
8991
8992 #ifdef HAVE_LINUX_THREADS
8993         pthread_kill_other_threads_np();
8994 #endif
8995
8996         return 0;
8997
8998 ; return 0; }
8999 EOF
9000 if { (eval echo configure:9001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9001   rm -rf conftest*
9002   ol_cv_pthread_thread=yes
9003 else
9004   echo "configure: failed program was:" >&5
9005   cat conftest.$ac_ext >&5
9006   rm -rf conftest*
9007   ol_cv_pthread_thread=no
9008 fi
9009 rm -f conftest*
9010 else
9011   cat > conftest.$ac_ext <<EOF
9012 #line 9013 "configure"
9013 #include "confdefs.h"
9014 /* pthread test headers */
9015 #include <pthread.h>
9016 #ifndef NULL
9017 #define NULL (void*)0
9018 #endif
9019
9020 static void *task(p)
9021         void *p;
9022 {
9023         return (void *) (p == NULL);
9024 }
9025
9026
9027 int main(argc, argv)
9028         int argc;
9029         char **argv;
9030 {
9031
9032         /* pthread test function */
9033         pthread_t t;
9034         int status;
9035         int detach = 1;
9036
9037 #ifdef HAVE_PTHREADS_FINAL
9038         /* Final pthreads */
9039         pthread_attr_t attr;
9040
9041         status = pthread_attr_init(&attr);
9042         if( status ) return status;
9043
9044 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9045         if( !detach ) {
9046 #if defined( PTHREAD_CREATE_JOINABLE )
9047                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9048 #else
9049                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9050 #endif
9051
9052 #ifdef PTHREAD_CREATE_DETACHED
9053         } else {
9054                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9055 #endif
9056         }
9057         if( status ) return status;
9058 #endif
9059
9060         status = pthread_create( &t, &attr, task, NULL );
9061         if( status ) return status;
9062
9063 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9064         if( detach ) {
9065                 /* give thread a chance to complete */
9066                 /* it should remain joinable and hence detachable */
9067                 sleep( 1 );
9068
9069                 status = pthread_detach( t );
9070                 if( status ) return status;
9071         }
9072 #endif
9073
9074 #else
9075         /* Draft 4 pthreads */
9076         status = pthread_create( &t, pthread_attr_default, task, NULL );
9077         if( status ) return status;
9078
9079         if( detach ) {
9080                 /* give thread a chance to complete */
9081                 /* it should remain joinable and hence detachable */
9082                 sleep( 1 );
9083
9084                 status = pthread_detach( &t );
9085                 if( status ) return status;
9086         }
9087 #endif
9088
9089 #ifdef HAVE_LINUX_THREADS
9090         pthread_kill_other_threads_np();
9091 #endif
9092
9093         return 0;
9094
9095 }
9096
9097 EOF
9098 if { (eval echo configure:9099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9099 then
9100   ol_cv_pthread_thread=yes
9101 else
9102   echo "configure: failed program was:" >&5
9103   cat conftest.$ac_ext >&5
9104   rm -fr conftest*
9105   ol_cv_pthread_thread=no
9106 fi
9107 rm -fr conftest*
9108 fi
9109
9110
9111                 # restore the LIBS
9112                 LIBS="$ol_LIBS"
9113         
9114 fi
9115
9116 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
9117
9118         if test $ol_cv_pthread_thread = yes ; then
9119                 ol_link_pthreads="-thread"
9120                 ol_link_threads=posix
9121         fi
9122 fi
9123
9124
9125                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
9126 if test "$ol_link_threads" = no ; then
9127         # try -lpthread -lmach -lexc -lc_r
9128         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
9129 echo "configure:9130: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
9130 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
9131   echo $ac_n "(cached) $ac_c" 1>&6
9132 else
9133   
9134                 # save the flags
9135                 ol_LIBS="$LIBS"
9136                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
9137
9138                 if test "$cross_compiling" = yes; then
9139   cat > conftest.$ac_ext <<EOF
9140 #line 9141 "configure"
9141 #include "confdefs.h"
9142 /* pthread test headers */
9143 #include <pthread.h>
9144 #ifndef NULL
9145 #define NULL (void*)0
9146 #endif
9147
9148 static void *task(p)
9149         void *p;
9150 {
9151         return (void *) (p == NULL);
9152 }
9153
9154 int main() {
9155
9156         /* pthread test function */
9157         pthread_t t;
9158         int status;
9159         int detach = 1;
9160
9161 #ifdef HAVE_PTHREADS_FINAL
9162         /* Final pthreads */
9163         pthread_attr_t attr;
9164
9165         status = pthread_attr_init(&attr);
9166         if( status ) return status;
9167
9168 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9169         if( !detach ) {
9170 #if defined( PTHREAD_CREATE_JOINABLE )
9171                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9172 #else
9173                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9174 #endif
9175
9176 #ifdef PTHREAD_CREATE_DETACHED
9177         } else {
9178                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9179 #endif
9180         }
9181         if( status ) return status;
9182 #endif
9183
9184         status = pthread_create( &t, &attr, task, NULL );
9185         if( status ) return status;
9186
9187 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9188         if( detach ) {
9189                 /* give thread a chance to complete */
9190                 /* it should remain joinable and hence detachable */
9191                 sleep( 1 );
9192
9193                 status = pthread_detach( t );
9194                 if( status ) return status;
9195         }
9196 #endif
9197
9198 #else
9199         /* Draft 4 pthreads */
9200         status = pthread_create( &t, pthread_attr_default, task, NULL );
9201         if( status ) return status;
9202
9203         if( detach ) {
9204                 /* give thread a chance to complete */
9205                 /* it should remain joinable and hence detachable */
9206                 sleep( 1 );
9207
9208                 status = pthread_detach( &t );
9209                 if( status ) return status;
9210         }
9211 #endif
9212
9213 #ifdef HAVE_LINUX_THREADS
9214         pthread_kill_other_threads_np();
9215 #endif
9216
9217         return 0;
9218
9219 ; return 0; }
9220 EOF
9221 if { (eval echo configure:9222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9222   rm -rf conftest*
9223   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9224 else
9225   echo "configure: failed program was:" >&5
9226   cat conftest.$ac_ext >&5
9227   rm -rf conftest*
9228   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9229 fi
9230 rm -f conftest*
9231 else
9232   cat > conftest.$ac_ext <<EOF
9233 #line 9234 "configure"
9234 #include "confdefs.h"
9235 /* pthread test headers */
9236 #include <pthread.h>
9237 #ifndef NULL
9238 #define NULL (void*)0
9239 #endif
9240
9241 static void *task(p)
9242         void *p;
9243 {
9244         return (void *) (p == NULL);
9245 }
9246
9247
9248 int main(argc, argv)
9249         int argc;
9250         char **argv;
9251 {
9252
9253         /* pthread test function */
9254         pthread_t t;
9255         int status;
9256         int detach = 1;
9257
9258 #ifdef HAVE_PTHREADS_FINAL
9259         /* Final pthreads */
9260         pthread_attr_t attr;
9261
9262         status = pthread_attr_init(&attr);
9263         if( status ) return status;
9264
9265 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9266         if( !detach ) {
9267 #if defined( PTHREAD_CREATE_JOINABLE )
9268                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9269 #else
9270                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9271 #endif
9272
9273 #ifdef PTHREAD_CREATE_DETACHED
9274         } else {
9275                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9276 #endif
9277         }
9278         if( status ) return status;
9279 #endif
9280
9281         status = pthread_create( &t, &attr, task, NULL );
9282         if( status ) return status;
9283
9284 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9285         if( detach ) {
9286                 /* give thread a chance to complete */
9287                 /* it should remain joinable and hence detachable */
9288                 sleep( 1 );
9289
9290                 status = pthread_detach( t );
9291                 if( status ) return status;
9292         }
9293 #endif
9294
9295 #else
9296         /* Draft 4 pthreads */
9297         status = pthread_create( &t, pthread_attr_default, task, NULL );
9298         if( status ) return status;
9299
9300         if( detach ) {
9301                 /* give thread a chance to complete */
9302                 /* it should remain joinable and hence detachable */
9303                 sleep( 1 );
9304
9305                 status = pthread_detach( &t );
9306                 if( status ) return status;
9307         }
9308 #endif
9309
9310 #ifdef HAVE_LINUX_THREADS
9311         pthread_kill_other_threads_np();
9312 #endif
9313
9314         return 0;
9315
9316 }
9317
9318 EOF
9319 if { (eval echo configure:9320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9320 then
9321   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9322 else
9323   echo "configure: failed program was:" >&5
9324   cat conftest.$ac_ext >&5
9325   rm -fr conftest*
9326   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9327 fi
9328 rm -fr conftest*
9329 fi
9330
9331
9332                 # restore the LIBS
9333                 LIBS="$ol_LIBS"
9334         
9335 fi
9336
9337 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
9338
9339         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
9340                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
9341                 ol_link_threads=posix
9342         fi
9343 fi
9344
9345                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
9346 if test "$ol_link_threads" = no ; then
9347         # try -lpthread -lmach -lexc
9348         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
9349 echo "configure:9350: checking for pthread link with -lpthread -lmach -lexc" >&5
9350 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
9351   echo $ac_n "(cached) $ac_c" 1>&6
9352 else
9353   
9354                 # save the flags
9355                 ol_LIBS="$LIBS"
9356                 LIBS="-lpthread -lmach -lexc $LIBS"
9357
9358                 if test "$cross_compiling" = yes; then
9359   cat > conftest.$ac_ext <<EOF
9360 #line 9361 "configure"
9361 #include "confdefs.h"
9362 /* pthread test headers */
9363 #include <pthread.h>
9364 #ifndef NULL
9365 #define NULL (void*)0
9366 #endif
9367
9368 static void *task(p)
9369         void *p;
9370 {
9371         return (void *) (p == NULL);
9372 }
9373
9374 int main() {
9375
9376         /* pthread test function */
9377         pthread_t t;
9378         int status;
9379         int detach = 1;
9380
9381 #ifdef HAVE_PTHREADS_FINAL
9382         /* Final pthreads */
9383         pthread_attr_t attr;
9384
9385         status = pthread_attr_init(&attr);
9386         if( status ) return status;
9387
9388 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9389         if( !detach ) {
9390 #if defined( PTHREAD_CREATE_JOINABLE )
9391                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9392 #else
9393                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9394 #endif
9395
9396 #ifdef PTHREAD_CREATE_DETACHED
9397         } else {
9398                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9399 #endif
9400         }
9401         if( status ) return status;
9402 #endif
9403
9404         status = pthread_create( &t, &attr, task, NULL );
9405         if( status ) return status;
9406
9407 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9408         if( detach ) {
9409                 /* give thread a chance to complete */
9410                 /* it should remain joinable and hence detachable */
9411                 sleep( 1 );
9412
9413                 status = pthread_detach( t );
9414                 if( status ) return status;
9415         }
9416 #endif
9417
9418 #else
9419         /* Draft 4 pthreads */
9420         status = pthread_create( &t, pthread_attr_default, task, NULL );
9421         if( status ) return status;
9422
9423         if( detach ) {
9424                 /* give thread a chance to complete */
9425                 /* it should remain joinable and hence detachable */
9426                 sleep( 1 );
9427
9428                 status = pthread_detach( &t );
9429                 if( status ) return status;
9430         }
9431 #endif
9432
9433 #ifdef HAVE_LINUX_THREADS
9434         pthread_kill_other_threads_np();
9435 #endif
9436
9437         return 0;
9438
9439 ; return 0; }
9440 EOF
9441 if { (eval echo configure:9442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9442   rm -rf conftest*
9443   ol_cv_pthread_lpthread_lmach_lexc=yes
9444 else
9445   echo "configure: failed program was:" >&5
9446   cat conftest.$ac_ext >&5
9447   rm -rf conftest*
9448   ol_cv_pthread_lpthread_lmach_lexc=no
9449 fi
9450 rm -f conftest*
9451 else
9452   cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455 /* pthread test headers */
9456 #include <pthread.h>
9457 #ifndef NULL
9458 #define NULL (void*)0
9459 #endif
9460
9461 static void *task(p)
9462         void *p;
9463 {
9464         return (void *) (p == NULL);
9465 }
9466
9467
9468 int main(argc, argv)
9469         int argc;
9470         char **argv;
9471 {
9472
9473         /* pthread test function */
9474         pthread_t t;
9475         int status;
9476         int detach = 1;
9477
9478 #ifdef HAVE_PTHREADS_FINAL
9479         /* Final pthreads */
9480         pthread_attr_t attr;
9481
9482         status = pthread_attr_init(&attr);
9483         if( status ) return status;
9484
9485 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9486         if( !detach ) {
9487 #if defined( PTHREAD_CREATE_JOINABLE )
9488                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9489 #else
9490                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9491 #endif
9492
9493 #ifdef PTHREAD_CREATE_DETACHED
9494         } else {
9495                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9496 #endif
9497         }
9498         if( status ) return status;
9499 #endif
9500
9501         status = pthread_create( &t, &attr, task, NULL );
9502         if( status ) return status;
9503
9504 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9505         if( detach ) {
9506                 /* give thread a chance to complete */
9507                 /* it should remain joinable and hence detachable */
9508                 sleep( 1 );
9509
9510                 status = pthread_detach( t );
9511                 if( status ) return status;
9512         }
9513 #endif
9514
9515 #else
9516         /* Draft 4 pthreads */
9517         status = pthread_create( &t, pthread_attr_default, task, NULL );
9518         if( status ) return status;
9519
9520         if( detach ) {
9521                 /* give thread a chance to complete */
9522                 /* it should remain joinable and hence detachable */
9523                 sleep( 1 );
9524
9525                 status = pthread_detach( &t );
9526                 if( status ) return status;
9527         }
9528 #endif
9529
9530 #ifdef HAVE_LINUX_THREADS
9531         pthread_kill_other_threads_np();
9532 #endif
9533
9534         return 0;
9535
9536 }
9537
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9540 then
9541   ol_cv_pthread_lpthread_lmach_lexc=yes
9542 else
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -fr conftest*
9546   ol_cv_pthread_lpthread_lmach_lexc=no
9547 fi
9548 rm -fr conftest*
9549 fi
9550
9551
9552                 # restore the LIBS
9553                 LIBS="$ol_LIBS"
9554         
9555 fi
9556
9557 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
9558
9559         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
9560                 ol_link_pthreads="-lpthread -lmach -lexc"
9561                 ol_link_threads=posix
9562         fi
9563 fi
9564
9565
9566                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
9567 if test "$ol_link_threads" = no ; then
9568         # try -lpthread -Wl,-woff,85
9569         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
9570 echo "configure:9571: checking for pthread link with -lpthread -Wl,-woff,85" >&5
9571 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
9572   echo $ac_n "(cached) $ac_c" 1>&6
9573 else
9574   
9575                 # save the flags
9576                 ol_LIBS="$LIBS"
9577                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
9578
9579                 if test "$cross_compiling" = yes; then
9580   cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 /* pthread test headers */
9584 #include <pthread.h>
9585 #ifndef NULL
9586 #define NULL (void*)0
9587 #endif
9588
9589 static void *task(p)
9590         void *p;
9591 {
9592         return (void *) (p == NULL);
9593 }
9594
9595 int main() {
9596
9597         /* pthread test function */
9598         pthread_t t;
9599         int status;
9600         int detach = 1;
9601
9602 #ifdef HAVE_PTHREADS_FINAL
9603         /* Final pthreads */
9604         pthread_attr_t attr;
9605
9606         status = pthread_attr_init(&attr);
9607         if( status ) return status;
9608
9609 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9610         if( !detach ) {
9611 #if defined( PTHREAD_CREATE_JOINABLE )
9612                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9613 #else
9614                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9615 #endif
9616
9617 #ifdef PTHREAD_CREATE_DETACHED
9618         } else {
9619                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9620 #endif
9621         }
9622         if( status ) return status;
9623 #endif
9624
9625         status = pthread_create( &t, &attr, task, NULL );
9626         if( status ) return status;
9627
9628 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9629         if( detach ) {
9630                 /* give thread a chance to complete */
9631                 /* it should remain joinable and hence detachable */
9632                 sleep( 1 );
9633
9634                 status = pthread_detach( t );
9635                 if( status ) return status;
9636         }
9637 #endif
9638
9639 #else
9640         /* Draft 4 pthreads */
9641         status = pthread_create( &t, pthread_attr_default, task, NULL );
9642         if( status ) return status;
9643
9644         if( detach ) {
9645                 /* give thread a chance to complete */
9646                 /* it should remain joinable and hence detachable */
9647                 sleep( 1 );
9648
9649                 status = pthread_detach( &t );
9650                 if( status ) return status;
9651         }
9652 #endif
9653
9654 #ifdef HAVE_LINUX_THREADS
9655         pthread_kill_other_threads_np();
9656 #endif
9657
9658         return 0;
9659
9660 ; return 0; }
9661 EOF
9662 if { (eval echo configure:9663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9663   rm -rf conftest*
9664   ol_cv_pthread_lib_lpthread_woff=yes
9665 else
9666   echo "configure: failed program was:" >&5
9667   cat conftest.$ac_ext >&5
9668   rm -rf conftest*
9669   ol_cv_pthread_lib_lpthread_woff=no
9670 fi
9671 rm -f conftest*
9672 else
9673   cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676 /* pthread test headers */
9677 #include <pthread.h>
9678 #ifndef NULL
9679 #define NULL (void*)0
9680 #endif
9681
9682 static void *task(p)
9683         void *p;
9684 {
9685         return (void *) (p == NULL);
9686 }
9687
9688
9689 int main(argc, argv)
9690         int argc;
9691         char **argv;
9692 {
9693
9694         /* pthread test function */
9695         pthread_t t;
9696         int status;
9697         int detach = 1;
9698
9699 #ifdef HAVE_PTHREADS_FINAL
9700         /* Final pthreads */
9701         pthread_attr_t attr;
9702
9703         status = pthread_attr_init(&attr);
9704         if( status ) return status;
9705
9706 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9707         if( !detach ) {
9708 #if defined( PTHREAD_CREATE_JOINABLE )
9709                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9710 #else
9711                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9712 #endif
9713
9714 #ifdef PTHREAD_CREATE_DETACHED
9715         } else {
9716                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9717 #endif
9718         }
9719         if( status ) return status;
9720 #endif
9721
9722         status = pthread_create( &t, &attr, task, NULL );
9723         if( status ) return status;
9724
9725 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9726         if( detach ) {
9727                 /* give thread a chance to complete */
9728                 /* it should remain joinable and hence detachable */
9729                 sleep( 1 );
9730
9731                 status = pthread_detach( t );
9732                 if( status ) return status;
9733         }
9734 #endif
9735
9736 #else
9737         /* Draft 4 pthreads */
9738         status = pthread_create( &t, pthread_attr_default, task, NULL );
9739         if( status ) return status;
9740
9741         if( detach ) {
9742                 /* give thread a chance to complete */
9743                 /* it should remain joinable and hence detachable */
9744                 sleep( 1 );
9745
9746                 status = pthread_detach( &t );
9747                 if( status ) return status;
9748         }
9749 #endif
9750
9751 #ifdef HAVE_LINUX_THREADS
9752         pthread_kill_other_threads_np();
9753 #endif
9754
9755         return 0;
9756
9757 }
9758
9759 EOF
9760 if { (eval echo configure:9761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9761 then
9762   ol_cv_pthread_lib_lpthread_woff=yes
9763 else
9764   echo "configure: failed program was:" >&5
9765   cat conftest.$ac_ext >&5
9766   rm -fr conftest*
9767   ol_cv_pthread_lib_lpthread_woff=no
9768 fi
9769 rm -fr conftest*
9770 fi
9771
9772
9773                 # restore the LIBS
9774                 LIBS="$ol_LIBS"
9775         
9776 fi
9777
9778 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9779
9780         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9781                 ol_link_pthreads="-lpthread -Wl,-woff,85"
9782                 ol_link_threads=posix
9783         fi
9784 fi
9785
9786
9787                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9788 if test "$ol_link_threads" = no ; then
9789         # try -lpthread
9790         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9791 echo "configure:9792: checking for pthread link with -lpthread" >&5
9792 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9793   echo $ac_n "(cached) $ac_c" 1>&6
9794 else
9795   
9796                 # save the flags
9797                 ol_LIBS="$LIBS"
9798                 LIBS="-lpthread $LIBS"
9799
9800                 if test "$cross_compiling" = yes; then
9801   cat > conftest.$ac_ext <<EOF
9802 #line 9803 "configure"
9803 #include "confdefs.h"
9804 /* pthread test headers */
9805 #include <pthread.h>
9806 #ifndef NULL
9807 #define NULL (void*)0
9808 #endif
9809
9810 static void *task(p)
9811         void *p;
9812 {
9813         return (void *) (p == NULL);
9814 }
9815
9816 int main() {
9817
9818         /* pthread test function */
9819         pthread_t t;
9820         int status;
9821         int detach = 1;
9822
9823 #ifdef HAVE_PTHREADS_FINAL
9824         /* Final pthreads */
9825         pthread_attr_t attr;
9826
9827         status = pthread_attr_init(&attr);
9828         if( status ) return status;
9829
9830 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9831         if( !detach ) {
9832 #if defined( PTHREAD_CREATE_JOINABLE )
9833                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9834 #else
9835                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9836 #endif
9837
9838 #ifdef PTHREAD_CREATE_DETACHED
9839         } else {
9840                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9841 #endif
9842         }
9843         if( status ) return status;
9844 #endif
9845
9846         status = pthread_create( &t, &attr, task, NULL );
9847         if( status ) return status;
9848
9849 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9850         if( detach ) {
9851                 /* give thread a chance to complete */
9852                 /* it should remain joinable and hence detachable */
9853                 sleep( 1 );
9854
9855                 status = pthread_detach( t );
9856                 if( status ) return status;
9857         }
9858 #endif
9859
9860 #else
9861         /* Draft 4 pthreads */
9862         status = pthread_create( &t, pthread_attr_default, task, NULL );
9863         if( status ) return status;
9864
9865         if( detach ) {
9866                 /* give thread a chance to complete */
9867                 /* it should remain joinable and hence detachable */
9868                 sleep( 1 );
9869
9870                 status = pthread_detach( &t );
9871                 if( status ) return status;
9872         }
9873 #endif
9874
9875 #ifdef HAVE_LINUX_THREADS
9876         pthread_kill_other_threads_np();
9877 #endif
9878
9879         return 0;
9880
9881 ; return 0; }
9882 EOF
9883 if { (eval echo configure:9884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9884   rm -rf conftest*
9885   ol_cv_pthread_lpthread=yes
9886 else
9887   echo "configure: failed program was:" >&5
9888   cat conftest.$ac_ext >&5
9889   rm -rf conftest*
9890   ol_cv_pthread_lpthread=no
9891 fi
9892 rm -f conftest*
9893 else
9894   cat > conftest.$ac_ext <<EOF
9895 #line 9896 "configure"
9896 #include "confdefs.h"
9897 /* pthread test headers */
9898 #include <pthread.h>
9899 #ifndef NULL
9900 #define NULL (void*)0
9901 #endif
9902
9903 static void *task(p)
9904         void *p;
9905 {
9906         return (void *) (p == NULL);
9907 }
9908
9909
9910 int main(argc, argv)
9911         int argc;
9912         char **argv;
9913 {
9914
9915         /* pthread test function */
9916         pthread_t t;
9917         int status;
9918         int detach = 1;
9919
9920 #ifdef HAVE_PTHREADS_FINAL
9921         /* Final pthreads */
9922         pthread_attr_t attr;
9923
9924         status = pthread_attr_init(&attr);
9925         if( status ) return status;
9926
9927 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9928         if( !detach ) {
9929 #if defined( PTHREAD_CREATE_JOINABLE )
9930                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9931 #else
9932                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9933 #endif
9934
9935 #ifdef PTHREAD_CREATE_DETACHED
9936         } else {
9937                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9938 #endif
9939         }
9940         if( status ) return status;
9941 #endif
9942
9943         status = pthread_create( &t, &attr, task, NULL );
9944         if( status ) return status;
9945
9946 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9947         if( detach ) {
9948                 /* give thread a chance to complete */
9949                 /* it should remain joinable and hence detachable */
9950                 sleep( 1 );
9951
9952                 status = pthread_detach( t );
9953                 if( status ) return status;
9954         }
9955 #endif
9956
9957 #else
9958         /* Draft 4 pthreads */
9959         status = pthread_create( &t, pthread_attr_default, task, NULL );
9960         if( status ) return status;
9961
9962         if( detach ) {
9963                 /* give thread a chance to complete */
9964                 /* it should remain joinable and hence detachable */
9965                 sleep( 1 );
9966
9967                 status = pthread_detach( &t );
9968                 if( status ) return status;
9969         }
9970 #endif
9971
9972 #ifdef HAVE_LINUX_THREADS
9973         pthread_kill_other_threads_np();
9974 #endif
9975
9976         return 0;
9977
9978 }
9979
9980 EOF
9981 if { (eval echo configure:9982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9982 then
9983   ol_cv_pthread_lpthread=yes
9984 else
9985   echo "configure: failed program was:" >&5
9986   cat conftest.$ac_ext >&5
9987   rm -fr conftest*
9988   ol_cv_pthread_lpthread=no
9989 fi
9990 rm -fr conftest*
9991 fi
9992
9993
9994                 # restore the LIBS
9995                 LIBS="$ol_LIBS"
9996         
9997 fi
9998
9999 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
10000
10001         if test $ol_cv_pthread_lpthread = yes ; then
10002                 ol_link_pthreads="-lpthread"
10003                 ol_link_threads=posix
10004         fi
10005 fi
10006
10007                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
10008 if test "$ol_link_threads" = no ; then
10009         # try -lc_r
10010         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
10011 echo "configure:10012: checking for pthread link with -lc_r" >&5
10012 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
10013   echo $ac_n "(cached) $ac_c" 1>&6
10014 else
10015   
10016                 # save the flags
10017                 ol_LIBS="$LIBS"
10018                 LIBS="-lc_r $LIBS"
10019
10020                 if test "$cross_compiling" = yes; then
10021   cat > conftest.$ac_ext <<EOF
10022 #line 10023 "configure"
10023 #include "confdefs.h"
10024 /* pthread test headers */
10025 #include <pthread.h>
10026 #ifndef NULL
10027 #define NULL (void*)0
10028 #endif
10029
10030 static void *task(p)
10031         void *p;
10032 {
10033         return (void *) (p == NULL);
10034 }
10035
10036 int main() {
10037
10038         /* pthread test function */
10039         pthread_t t;
10040         int status;
10041         int detach = 1;
10042
10043 #ifdef HAVE_PTHREADS_FINAL
10044         /* Final pthreads */
10045         pthread_attr_t attr;
10046
10047         status = pthread_attr_init(&attr);
10048         if( status ) return status;
10049
10050 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10051         if( !detach ) {
10052 #if defined( PTHREAD_CREATE_JOINABLE )
10053                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10054 #else
10055                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10056 #endif
10057
10058 #ifdef PTHREAD_CREATE_DETACHED
10059         } else {
10060                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10061 #endif
10062         }
10063         if( status ) return status;
10064 #endif
10065
10066         status = pthread_create( &t, &attr, task, NULL );
10067         if( status ) return status;
10068
10069 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10070         if( detach ) {
10071                 /* give thread a chance to complete */
10072                 /* it should remain joinable and hence detachable */
10073                 sleep( 1 );
10074
10075                 status = pthread_detach( t );
10076                 if( status ) return status;
10077         }
10078 #endif
10079
10080 #else
10081         /* Draft 4 pthreads */
10082         status = pthread_create( &t, pthread_attr_default, task, NULL );
10083         if( status ) return status;
10084
10085         if( detach ) {
10086                 /* give thread a chance to complete */
10087                 /* it should remain joinable and hence detachable */
10088                 sleep( 1 );
10089
10090                 status = pthread_detach( &t );
10091                 if( status ) return status;
10092         }
10093 #endif
10094
10095 #ifdef HAVE_LINUX_THREADS
10096         pthread_kill_other_threads_np();
10097 #endif
10098
10099         return 0;
10100
10101 ; return 0; }
10102 EOF
10103 if { (eval echo configure:10104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10104   rm -rf conftest*
10105   ol_cv_pthread_lc_r=yes
10106 else
10107   echo "configure: failed program was:" >&5
10108   cat conftest.$ac_ext >&5
10109   rm -rf conftest*
10110   ol_cv_pthread_lc_r=no
10111 fi
10112 rm -f conftest*
10113 else
10114   cat > conftest.$ac_ext <<EOF
10115 #line 10116 "configure"
10116 #include "confdefs.h"
10117 /* pthread test headers */
10118 #include <pthread.h>
10119 #ifndef NULL
10120 #define NULL (void*)0
10121 #endif
10122
10123 static void *task(p)
10124         void *p;
10125 {
10126         return (void *) (p == NULL);
10127 }
10128
10129
10130 int main(argc, argv)
10131         int argc;
10132         char **argv;
10133 {
10134
10135         /* pthread test function */
10136         pthread_t t;
10137         int status;
10138         int detach = 1;
10139
10140 #ifdef HAVE_PTHREADS_FINAL
10141         /* Final pthreads */
10142         pthread_attr_t attr;
10143
10144         status = pthread_attr_init(&attr);
10145         if( status ) return status;
10146
10147 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10148         if( !detach ) {
10149 #if defined( PTHREAD_CREATE_JOINABLE )
10150                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10151 #else
10152                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10153 #endif
10154
10155 #ifdef PTHREAD_CREATE_DETACHED
10156         } else {
10157                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10158 #endif
10159         }
10160         if( status ) return status;
10161 #endif
10162
10163         status = pthread_create( &t, &attr, task, NULL );
10164         if( status ) return status;
10165
10166 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10167         if( detach ) {
10168                 /* give thread a chance to complete */
10169                 /* it should remain joinable and hence detachable */
10170                 sleep( 1 );
10171
10172                 status = pthread_detach( t );
10173                 if( status ) return status;
10174         }
10175 #endif
10176
10177 #else
10178         /* Draft 4 pthreads */
10179         status = pthread_create( &t, pthread_attr_default, task, NULL );
10180         if( status ) return status;
10181
10182         if( detach ) {
10183                 /* give thread a chance to complete */
10184                 /* it should remain joinable and hence detachable */
10185                 sleep( 1 );
10186
10187                 status = pthread_detach( &t );
10188                 if( status ) return status;
10189         }
10190 #endif
10191
10192 #ifdef HAVE_LINUX_THREADS
10193         pthread_kill_other_threads_np();
10194 #endif
10195
10196         return 0;
10197
10198 }
10199
10200 EOF
10201 if { (eval echo configure:10202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10202 then
10203   ol_cv_pthread_lc_r=yes
10204 else
10205   echo "configure: failed program was:" >&5
10206   cat conftest.$ac_ext >&5
10207   rm -fr conftest*
10208   ol_cv_pthread_lc_r=no
10209 fi
10210 rm -fr conftest*
10211 fi
10212
10213
10214                 # restore the LIBS
10215                 LIBS="$ol_LIBS"
10216         
10217 fi
10218
10219 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
10220
10221         if test $ol_cv_pthread_lc_r = yes ; then
10222                 ol_link_pthreads="-lc_r"
10223                 ol_link_threads=posix
10224         fi
10225 fi
10226
10227
10228                 # Pthread try link: -threads (ol_cv_pthread_threads)
10229 if test "$ol_link_threads" = no ; then
10230         # try -threads
10231         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
10232 echo "configure:10233: checking for pthread link with -threads" >&5
10233 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
10234   echo $ac_n "(cached) $ac_c" 1>&6
10235 else
10236   
10237                 # save the flags
10238                 ol_LIBS="$LIBS"
10239                 LIBS="-threads $LIBS"
10240
10241                 if test "$cross_compiling" = yes; then
10242   cat > conftest.$ac_ext <<EOF
10243 #line 10244 "configure"
10244 #include "confdefs.h"
10245 /* pthread test headers */
10246 #include <pthread.h>
10247 #ifndef NULL
10248 #define NULL (void*)0
10249 #endif
10250
10251 static void *task(p)
10252         void *p;
10253 {
10254         return (void *) (p == NULL);
10255 }
10256
10257 int main() {
10258
10259         /* pthread test function */
10260         pthread_t t;
10261         int status;
10262         int detach = 1;
10263
10264 #ifdef HAVE_PTHREADS_FINAL
10265         /* Final pthreads */
10266         pthread_attr_t attr;
10267
10268         status = pthread_attr_init(&attr);
10269         if( status ) return status;
10270
10271 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10272         if( !detach ) {
10273 #if defined( PTHREAD_CREATE_JOINABLE )
10274                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10275 #else
10276                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10277 #endif
10278
10279 #ifdef PTHREAD_CREATE_DETACHED
10280         } else {
10281                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10282 #endif
10283         }
10284         if( status ) return status;
10285 #endif
10286
10287         status = pthread_create( &t, &attr, task, NULL );
10288         if( status ) return status;
10289
10290 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10291         if( detach ) {
10292                 /* give thread a chance to complete */
10293                 /* it should remain joinable and hence detachable */
10294                 sleep( 1 );
10295
10296                 status = pthread_detach( t );
10297                 if( status ) return status;
10298         }
10299 #endif
10300
10301 #else
10302         /* Draft 4 pthreads */
10303         status = pthread_create( &t, pthread_attr_default, task, NULL );
10304         if( status ) return status;
10305
10306         if( detach ) {
10307                 /* give thread a chance to complete */
10308                 /* it should remain joinable and hence detachable */
10309                 sleep( 1 );
10310
10311                 status = pthread_detach( &t );
10312                 if( status ) return status;
10313         }
10314 #endif
10315
10316 #ifdef HAVE_LINUX_THREADS
10317         pthread_kill_other_threads_np();
10318 #endif
10319
10320         return 0;
10321
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10325   rm -rf conftest*
10326   ol_cv_pthread_threads=yes
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   ol_cv_pthread_threads=no
10332 fi
10333 rm -f conftest*
10334 else
10335   cat > conftest.$ac_ext <<EOF
10336 #line 10337 "configure"
10337 #include "confdefs.h"
10338 /* pthread test headers */
10339 #include <pthread.h>
10340 #ifndef NULL
10341 #define NULL (void*)0
10342 #endif
10343
10344 static void *task(p)
10345         void *p;
10346 {
10347         return (void *) (p == NULL);
10348 }
10349
10350
10351 int main(argc, argv)
10352         int argc;
10353         char **argv;
10354 {
10355
10356         /* pthread test function */
10357         pthread_t t;
10358         int status;
10359         int detach = 1;
10360
10361 #ifdef HAVE_PTHREADS_FINAL
10362         /* Final pthreads */
10363         pthread_attr_t attr;
10364
10365         status = pthread_attr_init(&attr);
10366         if( status ) return status;
10367
10368 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10369         if( !detach ) {
10370 #if defined( PTHREAD_CREATE_JOINABLE )
10371                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10372 #else
10373                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10374 #endif
10375
10376 #ifdef PTHREAD_CREATE_DETACHED
10377         } else {
10378                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10379 #endif
10380         }
10381         if( status ) return status;
10382 #endif
10383
10384         status = pthread_create( &t, &attr, task, NULL );
10385         if( status ) return status;
10386
10387 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10388         if( detach ) {
10389                 /* give thread a chance to complete */
10390                 /* it should remain joinable and hence detachable */
10391                 sleep( 1 );
10392
10393                 status = pthread_detach( t );
10394                 if( status ) return status;
10395         }
10396 #endif
10397
10398 #else
10399         /* Draft 4 pthreads */
10400         status = pthread_create( &t, pthread_attr_default, task, NULL );
10401         if( status ) return status;
10402
10403         if( detach ) {
10404                 /* give thread a chance to complete */
10405                 /* it should remain joinable and hence detachable */
10406                 sleep( 1 );
10407
10408                 status = pthread_detach( &t );
10409                 if( status ) return status;
10410         }
10411 #endif
10412
10413 #ifdef HAVE_LINUX_THREADS
10414         pthread_kill_other_threads_np();
10415 #endif
10416
10417         return 0;
10418
10419 }
10420
10421 EOF
10422 if { (eval echo configure:10423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10423 then
10424   ol_cv_pthread_threads=yes
10425 else
10426   echo "configure: failed program was:" >&5
10427   cat conftest.$ac_ext >&5
10428   rm -fr conftest*
10429   ol_cv_pthread_threads=no
10430 fi
10431 rm -fr conftest*
10432 fi
10433
10434
10435                 # restore the LIBS
10436                 LIBS="$ol_LIBS"
10437         
10438 fi
10439
10440 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
10441
10442         if test $ol_cv_pthread_threads = yes ; then
10443                 ol_link_pthreads="-threads"
10444                 ol_link_threads=posix
10445         fi
10446 fi
10447
10448
10449                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
10450 if test "$ol_link_threads" = no ; then
10451         # try -lpthreads -lmach -lexc -lc_r
10452         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
10453 echo "configure:10454: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
10454 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
10455   echo $ac_n "(cached) $ac_c" 1>&6
10456 else
10457   
10458                 # save the flags
10459                 ol_LIBS="$LIBS"
10460                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
10461
10462                 if test "$cross_compiling" = yes; then
10463   cat > conftest.$ac_ext <<EOF
10464 #line 10465 "configure"
10465 #include "confdefs.h"
10466 /* pthread test headers */
10467 #include <pthread.h>
10468 #ifndef NULL
10469 #define NULL (void*)0
10470 #endif
10471
10472 static void *task(p)
10473         void *p;
10474 {
10475         return (void *) (p == NULL);
10476 }
10477
10478 int main() {
10479
10480         /* pthread test function */
10481         pthread_t t;
10482         int status;
10483         int detach = 1;
10484
10485 #ifdef HAVE_PTHREADS_FINAL
10486         /* Final pthreads */
10487         pthread_attr_t attr;
10488
10489         status = pthread_attr_init(&attr);
10490         if( status ) return status;
10491
10492 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10493         if( !detach ) {
10494 #if defined( PTHREAD_CREATE_JOINABLE )
10495                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10496 #else
10497                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10498 #endif
10499
10500 #ifdef PTHREAD_CREATE_DETACHED
10501         } else {
10502                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10503 #endif
10504         }
10505         if( status ) return status;
10506 #endif
10507
10508         status = pthread_create( &t, &attr, task, NULL );
10509         if( status ) return status;
10510
10511 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10512         if( detach ) {
10513                 /* give thread a chance to complete */
10514                 /* it should remain joinable and hence detachable */
10515                 sleep( 1 );
10516
10517                 status = pthread_detach( t );
10518                 if( status ) return status;
10519         }
10520 #endif
10521
10522 #else
10523         /* Draft 4 pthreads */
10524         status = pthread_create( &t, pthread_attr_default, task, NULL );
10525         if( status ) return status;
10526
10527         if( detach ) {
10528                 /* give thread a chance to complete */
10529                 /* it should remain joinable and hence detachable */
10530                 sleep( 1 );
10531
10532                 status = pthread_detach( &t );
10533                 if( status ) return status;
10534         }
10535 #endif
10536
10537 #ifdef HAVE_LINUX_THREADS
10538         pthread_kill_other_threads_np();
10539 #endif
10540
10541         return 0;
10542
10543 ; return 0; }
10544 EOF
10545 if { (eval echo configure:10546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10546   rm -rf conftest*
10547   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10548 else
10549   echo "configure: failed program was:" >&5
10550   cat conftest.$ac_ext >&5
10551   rm -rf conftest*
10552   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10553 fi
10554 rm -f conftest*
10555 else
10556   cat > conftest.$ac_ext <<EOF
10557 #line 10558 "configure"
10558 #include "confdefs.h"
10559 /* pthread test headers */
10560 #include <pthread.h>
10561 #ifndef NULL
10562 #define NULL (void*)0
10563 #endif
10564
10565 static void *task(p)
10566         void *p;
10567 {
10568         return (void *) (p == NULL);
10569 }
10570
10571
10572 int main(argc, argv)
10573         int argc;
10574         char **argv;
10575 {
10576
10577         /* pthread test function */
10578         pthread_t t;
10579         int status;
10580         int detach = 1;
10581
10582 #ifdef HAVE_PTHREADS_FINAL
10583         /* Final pthreads */
10584         pthread_attr_t attr;
10585
10586         status = pthread_attr_init(&attr);
10587         if( status ) return status;
10588
10589 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10590         if( !detach ) {
10591 #if defined( PTHREAD_CREATE_JOINABLE )
10592                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10593 #else
10594                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10595 #endif
10596
10597 #ifdef PTHREAD_CREATE_DETACHED
10598         } else {
10599                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10600 #endif
10601         }
10602         if( status ) return status;
10603 #endif
10604
10605         status = pthread_create( &t, &attr, task, NULL );
10606         if( status ) return status;
10607
10608 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10609         if( detach ) {
10610                 /* give thread a chance to complete */
10611                 /* it should remain joinable and hence detachable */
10612                 sleep( 1 );
10613
10614                 status = pthread_detach( t );
10615                 if( status ) return status;
10616         }
10617 #endif
10618
10619 #else
10620         /* Draft 4 pthreads */
10621         status = pthread_create( &t, pthread_attr_default, task, NULL );
10622         if( status ) return status;
10623
10624         if( detach ) {
10625                 /* give thread a chance to complete */
10626                 /* it should remain joinable and hence detachable */
10627                 sleep( 1 );
10628
10629                 status = pthread_detach( &t );
10630                 if( status ) return status;
10631         }
10632 #endif
10633
10634 #ifdef HAVE_LINUX_THREADS
10635         pthread_kill_other_threads_np();
10636 #endif
10637
10638         return 0;
10639
10640 }
10641
10642 EOF
10643 if { (eval echo configure:10644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10644 then
10645   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10646 else
10647   echo "configure: failed program was:" >&5
10648   cat conftest.$ac_ext >&5
10649   rm -fr conftest*
10650   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10651 fi
10652 rm -fr conftest*
10653 fi
10654
10655
10656                 # restore the LIBS
10657                 LIBS="$ol_LIBS"
10658         
10659 fi
10660
10661 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
10662
10663         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
10664                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
10665                 ol_link_threads=posix
10666         fi
10667 fi
10668
10669                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
10670 if test "$ol_link_threads" = no ; then
10671         # try -lpthreads -lmach -lexc
10672         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
10673 echo "configure:10674: checking for pthread link with -lpthreads -lmach -lexc" >&5
10674 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
10675   echo $ac_n "(cached) $ac_c" 1>&6
10676 else
10677   
10678                 # save the flags
10679                 ol_LIBS="$LIBS"
10680                 LIBS="-lpthreads -lmach -lexc $LIBS"
10681
10682                 if test "$cross_compiling" = yes; then
10683   cat > conftest.$ac_ext <<EOF
10684 #line 10685 "configure"
10685 #include "confdefs.h"
10686 /* pthread test headers */
10687 #include <pthread.h>
10688 #ifndef NULL
10689 #define NULL (void*)0
10690 #endif
10691
10692 static void *task(p)
10693         void *p;
10694 {
10695         return (void *) (p == NULL);
10696 }
10697
10698 int main() {
10699
10700         /* pthread test function */
10701         pthread_t t;
10702         int status;
10703         int detach = 1;
10704
10705 #ifdef HAVE_PTHREADS_FINAL
10706         /* Final pthreads */
10707         pthread_attr_t attr;
10708
10709         status = pthread_attr_init(&attr);
10710         if( status ) return status;
10711
10712 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10713         if( !detach ) {
10714 #if defined( PTHREAD_CREATE_JOINABLE )
10715                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10716 #else
10717                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10718 #endif
10719
10720 #ifdef PTHREAD_CREATE_DETACHED
10721         } else {
10722                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10723 #endif
10724         }
10725         if( status ) return status;
10726 #endif
10727
10728         status = pthread_create( &t, &attr, task, NULL );
10729         if( status ) return status;
10730
10731 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10732         if( detach ) {
10733                 /* give thread a chance to complete */
10734                 /* it should remain joinable and hence detachable */
10735                 sleep( 1 );
10736
10737                 status = pthread_detach( t );
10738                 if( status ) return status;
10739         }
10740 #endif
10741
10742 #else
10743         /* Draft 4 pthreads */
10744         status = pthread_create( &t, pthread_attr_default, task, NULL );
10745         if( status ) return status;
10746
10747         if( detach ) {
10748                 /* give thread a chance to complete */
10749                 /* it should remain joinable and hence detachable */
10750                 sleep( 1 );
10751
10752                 status = pthread_detach( &t );
10753                 if( status ) return status;
10754         }
10755 #endif
10756
10757 #ifdef HAVE_LINUX_THREADS
10758         pthread_kill_other_threads_np();
10759 #endif
10760
10761         return 0;
10762
10763 ; return 0; }
10764 EOF
10765 if { (eval echo configure:10766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10766   rm -rf conftest*
10767   ol_cv_pthread_lpthreads_lmach_lexc=yes
10768 else
10769   echo "configure: failed program was:" >&5
10770   cat conftest.$ac_ext >&5
10771   rm -rf conftest*
10772   ol_cv_pthread_lpthreads_lmach_lexc=no
10773 fi
10774 rm -f conftest*
10775 else
10776   cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779 /* pthread test headers */
10780 #include <pthread.h>
10781 #ifndef NULL
10782 #define NULL (void*)0
10783 #endif
10784
10785 static void *task(p)
10786         void *p;
10787 {
10788         return (void *) (p == NULL);
10789 }
10790
10791
10792 int main(argc, argv)
10793         int argc;
10794         char **argv;
10795 {
10796
10797         /* pthread test function */
10798         pthread_t t;
10799         int status;
10800         int detach = 1;
10801
10802 #ifdef HAVE_PTHREADS_FINAL
10803         /* Final pthreads */
10804         pthread_attr_t attr;
10805
10806         status = pthread_attr_init(&attr);
10807         if( status ) return status;
10808
10809 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10810         if( !detach ) {
10811 #if defined( PTHREAD_CREATE_JOINABLE )
10812                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10813 #else
10814                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10815 #endif
10816
10817 #ifdef PTHREAD_CREATE_DETACHED
10818         } else {
10819                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10820 #endif
10821         }
10822         if( status ) return status;
10823 #endif
10824
10825         status = pthread_create( &t, &attr, task, NULL );
10826         if( status ) return status;
10827
10828 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10829         if( detach ) {
10830                 /* give thread a chance to complete */
10831                 /* it should remain joinable and hence detachable */
10832                 sleep( 1 );
10833
10834                 status = pthread_detach( t );
10835                 if( status ) return status;
10836         }
10837 #endif
10838
10839 #else
10840         /* Draft 4 pthreads */
10841         status = pthread_create( &t, pthread_attr_default, task, NULL );
10842         if( status ) return status;
10843
10844         if( detach ) {
10845                 /* give thread a chance to complete */
10846                 /* it should remain joinable and hence detachable */
10847                 sleep( 1 );
10848
10849                 status = pthread_detach( &t );
10850                 if( status ) return status;
10851         }
10852 #endif
10853
10854 #ifdef HAVE_LINUX_THREADS
10855         pthread_kill_other_threads_np();
10856 #endif
10857
10858         return 0;
10859
10860 }
10861
10862 EOF
10863 if { (eval echo configure:10864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10864 then
10865   ol_cv_pthread_lpthreads_lmach_lexc=yes
10866 else
10867   echo "configure: failed program was:" >&5
10868   cat conftest.$ac_ext >&5
10869   rm -fr conftest*
10870   ol_cv_pthread_lpthreads_lmach_lexc=no
10871 fi
10872 rm -fr conftest*
10873 fi
10874
10875
10876                 # restore the LIBS
10877                 LIBS="$ol_LIBS"
10878         
10879 fi
10880
10881 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
10882
10883         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
10884                 ol_link_pthreads="-lpthreads -lmach -lexc"
10885                 ol_link_threads=posix
10886         fi
10887 fi
10888
10889                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
10890 if test "$ol_link_threads" = no ; then
10891         # try -lpthreads -lexc
10892         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
10893 echo "configure:10894: checking for pthread link with -lpthreads -lexc" >&5
10894 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
10895   echo $ac_n "(cached) $ac_c" 1>&6
10896 else
10897   
10898                 # save the flags
10899                 ol_LIBS="$LIBS"
10900                 LIBS="-lpthreads -lexc $LIBS"
10901
10902                 if test "$cross_compiling" = yes; then
10903   cat > conftest.$ac_ext <<EOF
10904 #line 10905 "configure"
10905 #include "confdefs.h"
10906 /* pthread test headers */
10907 #include <pthread.h>
10908 #ifndef NULL
10909 #define NULL (void*)0
10910 #endif
10911
10912 static void *task(p)
10913         void *p;
10914 {
10915         return (void *) (p == NULL);
10916 }
10917
10918 int main() {
10919
10920         /* pthread test function */
10921         pthread_t t;
10922         int status;
10923         int detach = 1;
10924
10925 #ifdef HAVE_PTHREADS_FINAL
10926         /* Final pthreads */
10927         pthread_attr_t attr;
10928
10929         status = pthread_attr_init(&attr);
10930         if( status ) return status;
10931
10932 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10933         if( !detach ) {
10934 #if defined( PTHREAD_CREATE_JOINABLE )
10935                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10936 #else
10937                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10938 #endif
10939
10940 #ifdef PTHREAD_CREATE_DETACHED
10941         } else {
10942                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10943 #endif
10944         }
10945         if( status ) return status;
10946 #endif
10947
10948         status = pthread_create( &t, &attr, task, NULL );
10949         if( status ) return status;
10950
10951 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10952         if( detach ) {
10953                 /* give thread a chance to complete */
10954                 /* it should remain joinable and hence detachable */
10955                 sleep( 1 );
10956
10957                 status = pthread_detach( t );
10958                 if( status ) return status;
10959         }
10960 #endif
10961
10962 #else
10963         /* Draft 4 pthreads */
10964         status = pthread_create( &t, pthread_attr_default, task, NULL );
10965         if( status ) return status;
10966
10967         if( detach ) {
10968                 /* give thread a chance to complete */
10969                 /* it should remain joinable and hence detachable */
10970                 sleep( 1 );
10971
10972                 status = pthread_detach( &t );
10973                 if( status ) return status;
10974         }
10975 #endif
10976
10977 #ifdef HAVE_LINUX_THREADS
10978         pthread_kill_other_threads_np();
10979 #endif
10980
10981         return 0;
10982
10983 ; return 0; }
10984 EOF
10985 if { (eval echo configure:10986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10986   rm -rf conftest*
10987   ol_cv_pthread_lpthreads_lexc=yes
10988 else
10989   echo "configure: failed program was:" >&5
10990   cat conftest.$ac_ext >&5
10991   rm -rf conftest*
10992   ol_cv_pthread_lpthreads_lexc=no
10993 fi
10994 rm -f conftest*
10995 else
10996   cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999 /* pthread test headers */
11000 #include <pthread.h>
11001 #ifndef NULL
11002 #define NULL (void*)0
11003 #endif
11004
11005 static void *task(p)
11006         void *p;
11007 {
11008         return (void *) (p == NULL);
11009 }
11010
11011
11012 int main(argc, argv)
11013         int argc;
11014         char **argv;
11015 {
11016
11017         /* pthread test function */
11018         pthread_t t;
11019         int status;
11020         int detach = 1;
11021
11022 #ifdef HAVE_PTHREADS_FINAL
11023         /* Final pthreads */
11024         pthread_attr_t attr;
11025
11026         status = pthread_attr_init(&attr);
11027         if( status ) return status;
11028
11029 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11030         if( !detach ) {
11031 #if defined( PTHREAD_CREATE_JOINABLE )
11032                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11033 #else
11034                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11035 #endif
11036
11037 #ifdef PTHREAD_CREATE_DETACHED
11038         } else {
11039                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11040 #endif
11041         }
11042         if( status ) return status;
11043 #endif
11044
11045         status = pthread_create( &t, &attr, task, NULL );
11046         if( status ) return status;
11047
11048 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11049         if( detach ) {
11050                 /* give thread a chance to complete */
11051                 /* it should remain joinable and hence detachable */
11052                 sleep( 1 );
11053
11054                 status = pthread_detach( t );
11055                 if( status ) return status;
11056         }
11057 #endif
11058
11059 #else
11060         /* Draft 4 pthreads */
11061         status = pthread_create( &t, pthread_attr_default, task, NULL );
11062         if( status ) return status;
11063
11064         if( detach ) {
11065                 /* give thread a chance to complete */
11066                 /* it should remain joinable and hence detachable */
11067                 sleep( 1 );
11068
11069                 status = pthread_detach( &t );
11070                 if( status ) return status;
11071         }
11072 #endif
11073
11074 #ifdef HAVE_LINUX_THREADS
11075         pthread_kill_other_threads_np();
11076 #endif
11077
11078         return 0;
11079
11080 }
11081
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11084 then
11085   ol_cv_pthread_lpthreads_lexc=yes
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -fr conftest*
11090   ol_cv_pthread_lpthreads_lexc=no
11091 fi
11092 rm -fr conftest*
11093 fi
11094
11095
11096                 # restore the LIBS
11097                 LIBS="$ol_LIBS"
11098         
11099 fi
11100
11101 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
11102
11103         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
11104                 ol_link_pthreads="-lpthreads -lexc"
11105                 ol_link_threads=posix
11106         fi
11107 fi
11108
11109
11110                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
11111 if test "$ol_link_threads" = no ; then
11112         # try -lpthreads
11113         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
11114 echo "configure:11115: checking for pthread link with -lpthreads" >&5
11115 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
11116   echo $ac_n "(cached) $ac_c" 1>&6
11117 else
11118   
11119                 # save the flags
11120                 ol_LIBS="$LIBS"
11121                 LIBS="-lpthreads $LIBS"
11122
11123                 if test "$cross_compiling" = yes; then
11124   cat > conftest.$ac_ext <<EOF
11125 #line 11126 "configure"
11126 #include "confdefs.h"
11127 /* pthread test headers */
11128 #include <pthread.h>
11129 #ifndef NULL
11130 #define NULL (void*)0
11131 #endif
11132
11133 static void *task(p)
11134         void *p;
11135 {
11136         return (void *) (p == NULL);
11137 }
11138
11139 int main() {
11140
11141         /* pthread test function */
11142         pthread_t t;
11143         int status;
11144         int detach = 1;
11145
11146 #ifdef HAVE_PTHREADS_FINAL
11147         /* Final pthreads */
11148         pthread_attr_t attr;
11149
11150         status = pthread_attr_init(&attr);
11151         if( status ) return status;
11152
11153 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11154         if( !detach ) {
11155 #if defined( PTHREAD_CREATE_JOINABLE )
11156                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11157 #else
11158                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11159 #endif
11160
11161 #ifdef PTHREAD_CREATE_DETACHED
11162         } else {
11163                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11164 #endif
11165         }
11166         if( status ) return status;
11167 #endif
11168
11169         status = pthread_create( &t, &attr, task, NULL );
11170         if( status ) return status;
11171
11172 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11173         if( detach ) {
11174                 /* give thread a chance to complete */
11175                 /* it should remain joinable and hence detachable */
11176                 sleep( 1 );
11177
11178                 status = pthread_detach( t );
11179                 if( status ) return status;
11180         }
11181 #endif
11182
11183 #else
11184         /* Draft 4 pthreads */
11185         status = pthread_create( &t, pthread_attr_default, task, NULL );
11186         if( status ) return status;
11187
11188         if( detach ) {
11189                 /* give thread a chance to complete */
11190                 /* it should remain joinable and hence detachable */
11191                 sleep( 1 );
11192
11193                 status = pthread_detach( &t );
11194                 if( status ) return status;
11195         }
11196 #endif
11197
11198 #ifdef HAVE_LINUX_THREADS
11199         pthread_kill_other_threads_np();
11200 #endif
11201
11202         return 0;
11203
11204 ; return 0; }
11205 EOF
11206 if { (eval echo configure:11207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11207   rm -rf conftest*
11208   ol_cv_pthread_lib_lpthreads=yes
11209 else
11210   echo "configure: failed program was:" >&5
11211   cat conftest.$ac_ext >&5
11212   rm -rf conftest*
11213   ol_cv_pthread_lib_lpthreads=no
11214 fi
11215 rm -f conftest*
11216 else
11217   cat > conftest.$ac_ext <<EOF
11218 #line 11219 "configure"
11219 #include "confdefs.h"
11220 /* pthread test headers */
11221 #include <pthread.h>
11222 #ifndef NULL
11223 #define NULL (void*)0
11224 #endif
11225
11226 static void *task(p)
11227         void *p;
11228 {
11229         return (void *) (p == NULL);
11230 }
11231
11232
11233 int main(argc, argv)
11234         int argc;
11235         char **argv;
11236 {
11237
11238         /* pthread test function */
11239         pthread_t t;
11240         int status;
11241         int detach = 1;
11242
11243 #ifdef HAVE_PTHREADS_FINAL
11244         /* Final pthreads */
11245         pthread_attr_t attr;
11246
11247         status = pthread_attr_init(&attr);
11248         if( status ) return status;
11249
11250 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11251         if( !detach ) {
11252 #if defined( PTHREAD_CREATE_JOINABLE )
11253                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11254 #else
11255                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11256 #endif
11257
11258 #ifdef PTHREAD_CREATE_DETACHED
11259         } else {
11260                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11261 #endif
11262         }
11263         if( status ) return status;
11264 #endif
11265
11266         status = pthread_create( &t, &attr, task, NULL );
11267         if( status ) return status;
11268
11269 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11270         if( detach ) {
11271                 /* give thread a chance to complete */
11272                 /* it should remain joinable and hence detachable */
11273                 sleep( 1 );
11274
11275                 status = pthread_detach( t );
11276                 if( status ) return status;
11277         }
11278 #endif
11279
11280 #else
11281         /* Draft 4 pthreads */
11282         status = pthread_create( &t, pthread_attr_default, task, NULL );
11283         if( status ) return status;
11284
11285         if( detach ) {
11286                 /* give thread a chance to complete */
11287                 /* it should remain joinable and hence detachable */
11288                 sleep( 1 );
11289
11290                 status = pthread_detach( &t );
11291                 if( status ) return status;
11292         }
11293 #endif
11294
11295 #ifdef HAVE_LINUX_THREADS
11296         pthread_kill_other_threads_np();
11297 #endif
11298
11299         return 0;
11300
11301 }
11302
11303 EOF
11304 if { (eval echo configure:11305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11305 then
11306   ol_cv_pthread_lib_lpthreads=yes
11307 else
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -fr conftest*
11311   ol_cv_pthread_lib_lpthreads=no
11312 fi
11313 rm -fr conftest*
11314 fi
11315
11316
11317                 # restore the LIBS
11318                 LIBS="$ol_LIBS"
11319         
11320 fi
11321
11322 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
11323
11324         if test $ol_cv_pthread_lib_lpthreads = yes ; then
11325                 ol_link_pthreads="-lpthreads"
11326                 ol_link_threads=posix
11327         fi
11328 fi
11329
11330
11331                 if test $ol_link_threads != no ; then
11332                         cat >> confdefs.h <<\EOF
11333 #define HAVE_PTHREADS 1
11334 EOF
11335
11336
11337                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
11338
11339                                                 save_CPPFLAGS="$CPPFLAGS"
11340                         save_LIBS="$LIBS"
11341                         LIBS="$LTHREAD_LIBS $LIBS"
11342
11343                                                                                                 for ac_func in sched_yield pthread_yield
11344 do
11345 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11346 echo "configure:11347: checking for $ac_func" >&5
11347 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11348   echo $ac_n "(cached) $ac_c" 1>&6
11349 else
11350   cat > conftest.$ac_ext <<EOF
11351 #line 11352 "configure"
11352 #include "confdefs.h"
11353 /* System header to define __stub macros and hopefully few prototypes,
11354     which can conflict with char $ac_func(); below.  */
11355 #include <assert.h>
11356 /* Override any gcc2 internal prototype to avoid an error.  */
11357 /* We use char because int might match the return type of a gcc2
11358     builtin and then its argument prototype would still apply.  */
11359 char $ac_func();
11360 char (*f)();
11361
11362 int main() {
11363
11364 /* The GNU C library defines this for functions which it implements
11365     to always fail with ENOSYS.  Some functions are actually named
11366     something starting with __ and the normal name is an alias.  */
11367 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11368 choke me
11369 #else
11370 f = $ac_func;
11371 #endif
11372
11373 ; return 0; }
11374 EOF
11375 if { (eval echo configure:11376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11376   rm -rf conftest*
11377   eval "ac_cv_func_$ac_func=yes"
11378 else
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -rf conftest*
11382   eval "ac_cv_func_$ac_func=no"
11383 fi
11384 rm -f conftest*
11385 fi
11386
11387 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11388   echo "$ac_t""yes" 1>&6
11389     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11390   cat >> confdefs.h <<EOF
11391 #define $ac_tr_func 1
11392 EOF
11393  
11394 else
11395   echo "$ac_t""no" 1>&6
11396 fi
11397 done
11398
11399
11400                         if test $ac_cv_func_sched_yield = no -a \
11401                                 $ac_cv_func_pthread_yield = no ; then
11402                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
11403 echo "configure:11404: checking for sched_yield in -lrt" >&5
11404 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
11405 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11406   echo $ac_n "(cached) $ac_c" 1>&6
11407 else
11408   ac_save_LIBS="$LIBS"
11409 LIBS="-lrt  $LIBS"
11410 cat > conftest.$ac_ext <<EOF
11411 #line 11412 "configure"
11412 #include "confdefs.h"
11413 /* Override any gcc2 internal prototype to avoid an error.  */
11414 /* We use char because int might match the return type of a gcc2
11415     builtin and then its argument prototype would still apply.  */
11416 char sched_yield();
11417
11418 int main() {
11419 sched_yield()
11420 ; return 0; }
11421 EOF
11422 if { (eval echo configure:11423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11423   rm -rf conftest*
11424   eval "ac_cv_lib_$ac_lib_var=yes"
11425 else
11426   echo "configure: failed program was:" >&5
11427   cat conftest.$ac_ext >&5
11428   rm -rf conftest*
11429   eval "ac_cv_lib_$ac_lib_var=no"
11430 fi
11431 rm -f conftest*
11432 LIBS="$ac_save_LIBS"
11433
11434 fi
11435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11436   echo "$ac_t""yes" 1>&6
11437   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
11438                                         cat >> confdefs.h <<\EOF
11439 #define HAVE_SCHED_YIELD 1
11440 EOF
11441
11442                                         ac_cv_func_sched_yield=yes
11443 else
11444   echo "$ac_t""no" 1>&6
11445 ac_cv_func_sched_yield=no
11446 fi
11447
11448                         fi
11449                         if test $ac_cv_func_sched_yield = no -a \
11450                                 $ac_cv_func_pthread_yield = no ; then
11451                                                                                                 for ac_func in thr_yield
11452 do
11453 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11454 echo "configure:11455: checking for $ac_func" >&5
11455 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11456   echo $ac_n "(cached) $ac_c" 1>&6
11457 else
11458   cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461 /* System header to define __stub macros and hopefully few prototypes,
11462     which can conflict with char $ac_func(); below.  */
11463 #include <assert.h>
11464 /* Override any gcc2 internal prototype to avoid an error.  */
11465 /* We use char because int might match the return type of a gcc2
11466     builtin and then its argument prototype would still apply.  */
11467 char $ac_func();
11468 char (*f)();
11469
11470 int main() {
11471
11472 /* The GNU C library defines this for functions which it implements
11473     to always fail with ENOSYS.  Some functions are actually named
11474     something starting with __ and the normal name is an alias.  */
11475 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11476 choke me
11477 #else
11478 f = $ac_func;
11479 #endif
11480
11481 ; return 0; }
11482 EOF
11483 if { (eval echo configure:11484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11484   rm -rf conftest*
11485   eval "ac_cv_func_$ac_func=yes"
11486 else
11487   echo "configure: failed program was:" >&5
11488   cat conftest.$ac_ext >&5
11489   rm -rf conftest*
11490   eval "ac_cv_func_$ac_func=no"
11491 fi
11492 rm -f conftest*
11493 fi
11494
11495 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11496   echo "$ac_t""yes" 1>&6
11497     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11498   cat >> confdefs.h <<EOF
11499 #define $ac_tr_func 1
11500 EOF
11501  
11502 else
11503   echo "$ac_t""no" 1>&6
11504 fi
11505 done
11506
11507                         fi
11508                         if test $ac_cv_func_sched_yield = no -a \
11509                                 $ac_cv_func_pthread_yield = no -a \
11510                                 "$ac_cv_func_thr_yield" = no ; then
11511                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
11512                         fi
11513
11514                                                 for ac_func in pthread_kill pthread_rwlock_destroy
11515 do
11516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11517 echo "configure:11518: checking for $ac_func" >&5
11518 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11519   echo $ac_n "(cached) $ac_c" 1>&6
11520 else
11521   cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524 /* System header to define __stub macros and hopefully few prototypes,
11525     which can conflict with char $ac_func(); below.  */
11526 #include <assert.h>
11527 /* Override any gcc2 internal prototype to avoid an error.  */
11528 /* We use char because int might match the return type of a gcc2
11529     builtin and then its argument prototype would still apply.  */
11530 char $ac_func();
11531 char (*f)();
11532
11533 int main() {
11534
11535 /* The GNU C library defines this for functions which it implements
11536     to always fail with ENOSYS.  Some functions are actually named
11537     something starting with __ and the normal name is an alias.  */
11538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11539 choke me
11540 #else
11541 f = $ac_func;
11542 #endif
11543
11544 ; return 0; }
11545 EOF
11546 if { (eval echo configure:11547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11547   rm -rf conftest*
11548   eval "ac_cv_func_$ac_func=yes"
11549 else
11550   echo "configure: failed program was:" >&5
11551   cat conftest.$ac_ext >&5
11552   rm -rf conftest*
11553   eval "ac_cv_func_$ac_func=no"
11554 fi
11555 rm -f conftest*
11556 fi
11557
11558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11559   echo "$ac_t""yes" 1>&6
11560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11561   cat >> confdefs.h <<EOF
11562 #define $ac_tr_func 1
11563 EOF
11564  
11565 else
11566   echo "$ac_t""no" 1>&6
11567 fi
11568 done
11569
11570
11571                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
11572 echo "configure:11573: checking for pthread_detach with <pthread.h>" >&5
11573 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
11574   echo $ac_n "(cached) $ac_c" 1>&6
11575 else
11576   
11577                                                                 cat > conftest.$ac_ext <<EOF
11578 #line 11579 "configure"
11579 #include "confdefs.h"
11580
11581 #include <pthread.h>
11582 #ifndef NULL
11583 #define NULL (void*)0
11584 #endif
11585
11586 int main() {
11587 pthread_detach(NULL);
11588 ; return 0; }
11589 EOF
11590 if { (eval echo configure:11591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11591   rm -rf conftest*
11592   ol_cv_func_pthread_detach=yes
11593 else
11594   echo "configure: failed program was:" >&5
11595   cat conftest.$ac_ext >&5
11596   rm -rf conftest*
11597   ol_cv_func_pthread_detach=no
11598 fi
11599 rm -f conftest*
11600                         
11601 fi
11602
11603 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
11604
11605                         if test $ol_cv_func_pthread_detach = no ; then
11606                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
11607                         fi
11608
11609                         cat >> confdefs.h <<\EOF
11610 #define HAVE_PTHREAD_DETACH 1
11611 EOF
11612
11613
11614                                                 for ac_func in \
11615                                 pthread_setconcurrency \
11616                                 pthread_getconcurrency \
11617                                 thr_setconcurrency \
11618                                 thr_getconcurrency \
11619                         
11620 do
11621 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11622 echo "configure:11623: checking for $ac_func" >&5
11623 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11624   echo $ac_n "(cached) $ac_c" 1>&6
11625 else
11626   cat > conftest.$ac_ext <<EOF
11627 #line 11628 "configure"
11628 #include "confdefs.h"
11629 /* System header to define __stub macros and hopefully few prototypes,
11630     which can conflict with char $ac_func(); below.  */
11631 #include <assert.h>
11632 /* Override any gcc2 internal prototype to avoid an error.  */
11633 /* We use char because int might match the return type of a gcc2
11634     builtin and then its argument prototype would still apply.  */
11635 char $ac_func();
11636 char (*f)();
11637
11638 int main() {
11639
11640 /* The GNU C library defines this for functions which it implements
11641     to always fail with ENOSYS.  Some functions are actually named
11642     something starting with __ and the normal name is an alias.  */
11643 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11644 choke me
11645 #else
11646 f = $ac_func;
11647 #endif
11648
11649 ; return 0; }
11650 EOF
11651 if { (eval echo configure:11652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11652   rm -rf conftest*
11653   eval "ac_cv_func_$ac_func=yes"
11654 else
11655   echo "configure: failed program was:" >&5
11656   cat conftest.$ac_ext >&5
11657   rm -rf conftest*
11658   eval "ac_cv_func_$ac_func=no"
11659 fi
11660 rm -f conftest*
11661 fi
11662
11663 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11664   echo "$ac_t""yes" 1>&6
11665     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11666   cat >> confdefs.h <<EOF
11667 #define $ac_tr_func 1
11668 EOF
11669  
11670 else
11671   echo "$ac_t""no" 1>&6
11672 fi
11673 done
11674
11675
11676                         
11677         for ac_func in pthread_kill_other_threads_np
11678 do
11679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11680 echo "configure:11681: checking for $ac_func" >&5
11681 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11682   echo $ac_n "(cached) $ac_c" 1>&6
11683 else
11684   cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687 /* System header to define __stub macros and hopefully few prototypes,
11688     which can conflict with char $ac_func(); below.  */
11689 #include <assert.h>
11690 /* Override any gcc2 internal prototype to avoid an error.  */
11691 /* We use char because int might match the return type of a gcc2
11692     builtin and then its argument prototype would still apply.  */
11693 char $ac_func();
11694 char (*f)();
11695
11696 int main() {
11697
11698 /* The GNU C library defines this for functions which it implements
11699     to always fail with ENOSYS.  Some functions are actually named
11700     something starting with __ and the normal name is an alias.  */
11701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11702 choke me
11703 #else
11704 f = $ac_func;
11705 #endif
11706
11707 ; return 0; }
11708 EOF
11709 if { (eval echo configure:11710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11710   rm -rf conftest*
11711   eval "ac_cv_func_$ac_func=yes"
11712 else
11713   echo "configure: failed program was:" >&5
11714   cat conftest.$ac_ext >&5
11715   rm -rf conftest*
11716   eval "ac_cv_func_$ac_func=no"
11717 fi
11718 rm -f conftest*
11719 fi
11720
11721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11722   echo "$ac_t""yes" 1>&6
11723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11724   cat >> confdefs.h <<EOF
11725 #define $ac_tr_func 1
11726 EOF
11727  
11728 else
11729   echo "$ac_t""no" 1>&6
11730 fi
11731 done
11732
11733         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
11734 echo "configure:11735: checking for LinuxThreads implementation" >&5
11735 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
11736   echo $ac_n "(cached) $ac_c" 1>&6
11737 else
11738   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
11739 fi
11740
11741 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
11742
11743                         
11744         
11745         
11746         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
11747 echo "configure:11748: checking for LinuxThreads consistency" >&5
11748 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
11749   echo $ac_n "(cached) $ac_c" 1>&6
11750 else
11751   
11752                 if test $ol_cv_header_linux_threads = yes -a \
11753                         $ol_cv_sys_linux_threads = yes; then
11754                         ol_cv_linux_threads=yes
11755                 elif test $ol_cv_header_linux_threads = no -a \
11756                         $ol_cv_sys_linux_threads = no; then
11757                         ol_cv_linux_threads=no
11758                 else
11759                         ol_cv_linux_threads=error
11760                 fi
11761         
11762 fi
11763
11764 echo "$ac_t""$ol_cv_linux_threads" 1>&6
11765
11766
11767                         if test $ol_cv_linux_threads = error; then
11768                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
11769                         fi
11770
11771                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
11772 echo "configure:11773: checking if pthread_create() works" >&5
11773 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
11774   echo $ac_n "(cached) $ac_c" 1>&6
11775 else
11776   
11777                         if test "$cross_compiling" = yes; then
11778                                 ol_cv_pthread_create_works=yes
11779 else
11780   cat > conftest.$ac_ext <<EOF
11781 #line 11782 "configure"
11782 #include "confdefs.h"
11783 /* pthread test headers */
11784 #include <pthread.h>
11785 #ifndef NULL
11786 #define NULL (void*)0
11787 #endif
11788
11789 static void *task(p)
11790         void *p;
11791 {
11792         return (void *) (p == NULL);
11793 }
11794
11795
11796 int main(argc, argv)
11797         int argc;
11798         char **argv;
11799 {
11800
11801         /* pthread test function */
11802         pthread_t t;
11803         int status;
11804         int detach = 1;
11805
11806 #ifdef HAVE_PTHREADS_FINAL
11807         /* Final pthreads */
11808         pthread_attr_t attr;
11809
11810         status = pthread_attr_init(&attr);
11811         if( status ) return status;
11812
11813 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11814         if( !detach ) {
11815 #if defined( PTHREAD_CREATE_JOINABLE )
11816                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11817 #else
11818                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11819 #endif
11820
11821 #ifdef PTHREAD_CREATE_DETACHED
11822         } else {
11823                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11824 #endif
11825         }
11826         if( status ) return status;
11827 #endif
11828
11829         status = pthread_create( &t, &attr, task, NULL );
11830         if( status ) return status;
11831
11832 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11833         if( detach ) {
11834                 /* give thread a chance to complete */
11835                 /* it should remain joinable and hence detachable */
11836                 sleep( 1 );
11837
11838                 status = pthread_detach( t );
11839                 if( status ) return status;
11840         }
11841 #endif
11842
11843 #else
11844         /* Draft 4 pthreads */
11845         status = pthread_create( &t, pthread_attr_default, task, NULL );
11846         if( status ) return status;
11847
11848         if( detach ) {
11849                 /* give thread a chance to complete */
11850                 /* it should remain joinable and hence detachable */
11851                 sleep( 1 );
11852
11853                 status = pthread_detach( &t );
11854                 if( status ) return status;
11855         }
11856 #endif
11857
11858 #ifdef HAVE_LINUX_THREADS
11859         pthread_kill_other_threads_np();
11860 #endif
11861
11862         return 0;
11863
11864 }
11865
11866 EOF
11867 if { (eval echo configure:11868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11868 then
11869   ol_cv_pthread_create_works=yes
11870 else
11871   echo "configure: failed program was:" >&5
11872   cat conftest.$ac_ext >&5
11873   rm -fr conftest*
11874   ol_cv_pthread_create_works=no
11875 fi
11876 rm -fr conftest*
11877 fi
11878
11879 fi
11880
11881 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
11882
11883                         if test $ol_cv_pthread_create_works = no ; then
11884                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
11885                         fi
11886
11887                                                 if test $ol_with_yielding_select = auto ; then
11888                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
11889 echo "configure:11890: checking if select yields when using pthreads" >&5
11890 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
11891   echo $ac_n "(cached) $ac_c" 1>&6
11892 else
11893   
11894                                 if test "$cross_compiling" = yes; then
11895   ol_cv_pthread_select_yields=cross
11896 else
11897   cat > conftest.$ac_ext <<EOF
11898 #line 11899 "configure"
11899 #include "confdefs.h"
11900
11901 #include <sys/types.h>
11902 #include <sys/time.h>
11903 #include <unistd.h>
11904 #include <pthread.h>
11905 #ifndef NULL
11906 #define NULL (void*) 0
11907 #endif
11908
11909 static int fildes[2];
11910
11911 static void *task(p)
11912         void *p;
11913 {
11914         int i;
11915         struct timeval tv;
11916
11917         fd_set rfds;
11918
11919         tv.tv_sec=10;
11920         tv.tv_usec=0;
11921
11922         FD_ZERO(&rfds);
11923         FD_SET(fildes[0], &rfds);
11924
11925         /* we're not interested in any fds */
11926         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
11927
11928         if(i < 0) {
11929                 perror("select");
11930                 exit(10);
11931         }
11932
11933         exit(0); /* if we exit here, the select blocked the whole process */
11934 }
11935
11936 int main(argc, argv)
11937         int argc;
11938         char **argv;
11939 {
11940         pthread_t t;
11941
11942         /* create a pipe to select */
11943         if(pipe(&fildes[0])) {
11944                 perror("select");
11945                 exit(1);
11946         }
11947
11948 #ifdef HAVE_PTHREAD_SETCONCURRENCY
11949         (void) pthread_setconcurrency(2);
11950 #else
11951 #ifdef HAVE_THR_SETCONCURRENCY
11952         /* Set Solaris LWP concurrency to 2 */
11953         thr_setconcurrency(2);
11954 #endif
11955 #endif
11956
11957 #if HAVE_PTHREADS_D4
11958         pthread_create(&t, pthread_attr_default, task, NULL);
11959 #else
11960         pthread_create(&t, NULL, task, NULL);
11961 #endif
11962
11963 #if HAVE_SCHED_YIELD
11964         sched_yield();  /* make sure task runs first */
11965 #else
11966 #ifdef HAVE_PTHREAD_YIELD
11967         pthread_yield();        /* make sure task runs first */
11968 #endif
11969 #endif
11970
11971         exit(2);
11972 }
11973 EOF
11974 if { (eval echo configure:11975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11975 then
11976   ol_cv_pthread_select_yields=no
11977 else
11978   echo "configure: failed program was:" >&5
11979   cat conftest.$ac_ext >&5
11980   rm -fr conftest*
11981   ol_cv_pthread_select_yields=yes
11982 fi
11983 rm -fr conftest*
11984 fi
11985
11986 fi
11987
11988 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
11989
11990                                 if test $ol_cv_pthread_select_yields = cross ; then
11991                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
11992                                 fi
11993
11994                                 if test $ol_cv_pthread_select_yields = yes ; then
11995                                         ol_with_yielding_select=yes
11996                                 fi
11997                         fi
11998
11999                                                 CPPFLAGS="$save_CPPFLAGS"
12000                         LIBS="$save_LIBS"
12001                 else
12002                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
12003                 fi
12004         fi
12005
12006         if test $ol_with_threads = posix ; then
12007                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
12008         fi
12009 fi
12010
12011 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12012         -o $ol_with_threads = mach ; then
12013
12014                 for ac_hdr in mach/cthreads.h cthread.h
12015 do
12016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12018 echo "configure:12019: checking for $ac_hdr" >&5
12019 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12020   echo $ac_n "(cached) $ac_c" 1>&6
12021 else
12022   cat > conftest.$ac_ext <<EOF
12023 #line 12024 "configure"
12024 #include "confdefs.h"
12025 #include <$ac_hdr>
12026 EOF
12027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12028 { (eval echo configure:12029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12030 if test -z "$ac_err"; then
12031   rm -rf conftest*
12032   eval "ac_cv_header_$ac_safe=yes"
12033 else
12034   echo "$ac_err" >&5
12035   echo "configure: failed program was:" >&5
12036   cat conftest.$ac_ext >&5
12037   rm -rf conftest*
12038   eval "ac_cv_header_$ac_safe=no"
12039 fi
12040 rm -f conftest*
12041 fi
12042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12043   echo "$ac_t""yes" 1>&6
12044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12045   cat >> confdefs.h <<EOF
12046 #define $ac_tr_hdr 1
12047 EOF
12048  
12049 else
12050   echo "$ac_t""no" 1>&6
12051 fi
12052 done
12053
12054         if test $ac_cv_header_mach_cthreads_h = yes ; then
12055                 ol_with_threads=found
12056
12057                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
12058 echo "configure:12059: checking for cthread_fork" >&5
12059 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
12060   echo $ac_n "(cached) $ac_c" 1>&6
12061 else
12062   cat > conftest.$ac_ext <<EOF
12063 #line 12064 "configure"
12064 #include "confdefs.h"
12065 /* System header to define __stub macros and hopefully few prototypes,
12066     which can conflict with char cthread_fork(); below.  */
12067 #include <assert.h>
12068 /* Override any gcc2 internal prototype to avoid an error.  */
12069 /* We use char because int might match the return type of a gcc2
12070     builtin and then its argument prototype would still apply.  */
12071 char cthread_fork();
12072 char (*f)();
12073
12074 int main() {
12075
12076 /* The GNU C library defines this for functions which it implements
12077     to always fail with ENOSYS.  Some functions are actually named
12078     something starting with __ and the normal name is an alias.  */
12079 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
12080 choke me
12081 #else
12082 f = cthread_fork;
12083 #endif
12084
12085 ; return 0; }
12086 EOF
12087 if { (eval echo configure:12088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12088   rm -rf conftest*
12089   eval "ac_cv_func_cthread_fork=yes"
12090 else
12091   echo "configure: failed program was:" >&5
12092   cat conftest.$ac_ext >&5
12093   rm -rf conftest*
12094   eval "ac_cv_func_cthread_fork=no"
12095 fi
12096 rm -f conftest*
12097 fi
12098
12099 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
12100   echo "$ac_t""yes" 1>&6
12101   ol_link_threads=yes
12102 else
12103   echo "$ac_t""no" 1>&6
12104 fi
12105
12106
12107                 if test $ol_link_threads = no ; then
12108                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
12109 echo "configure:12110: checking for cthread_fork with -all_load" >&5
12110 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
12111   echo $ac_n "(cached) $ac_c" 1>&6
12112 else
12113   
12114                                                                 save_LIBS="$LIBS"
12115                                 LIBS="-all_load $LIBS"
12116                                 cat > conftest.$ac_ext <<EOF
12117 #line 12118 "configure"
12118 #include "confdefs.h"
12119 #include <mach/cthreads.h>
12120 int main() {
12121
12122                                         cthread_fork((void *)0, (void *)0);
12123                                         
12124 ; return 0; }
12125 EOF
12126 if { (eval echo configure:12127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12127   rm -rf conftest*
12128   ol_cv_cthread_all_load=yes
12129 else
12130   echo "configure: failed program was:" >&5
12131   cat conftest.$ac_ext >&5
12132   rm -rf conftest*
12133   ol_cv_cthread_all_load=no
12134 fi
12135 rm -f conftest*
12136                                                                 LIBS="$save_LIBS"
12137                         
12138 fi
12139
12140 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
12141
12142                         if test $ol_cv_cthread_all_load = yes ; then
12143                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
12144                                 ol_link_threads=mach
12145                         fi
12146                 fi
12147
12148         elif test $ac_cv_header_cthreads_h = yes ; then
12149                                 
12150                 ol_with_threads=found
12151  
12152                                 save_LIBS="$LIBS"
12153                 LIBS="$LIBS -lthreads"
12154                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
12155 echo "configure:12156: checking for cthread_fork" >&5
12156 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
12157   echo $ac_n "(cached) $ac_c" 1>&6
12158 else
12159   cat > conftest.$ac_ext <<EOF
12160 #line 12161 "configure"
12161 #include "confdefs.h"
12162 /* System header to define __stub macros and hopefully few prototypes,
12163     which can conflict with char cthread_fork(); below.  */
12164 #include <assert.h>
12165 /* Override any gcc2 internal prototype to avoid an error.  */
12166 /* We use char because int might match the return type of a gcc2
12167     builtin and then its argument prototype would still apply.  */
12168 char cthread_fork();
12169 char (*f)();
12170
12171 int main() {
12172
12173 /* The GNU C library defines this for functions which it implements
12174     to always fail with ENOSYS.  Some functions are actually named
12175     something starting with __ and the normal name is an alias.  */
12176 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
12177 choke me
12178 #else
12179 f = cthread_fork;
12180 #endif
12181
12182 ; return 0; }
12183 EOF
12184 if { (eval echo configure:12185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12185   rm -rf conftest*
12186   eval "ac_cv_func_cthread_fork=yes"
12187 else
12188   echo "configure: failed program was:" >&5
12189   cat conftest.$ac_ext >&5
12190   rm -rf conftest*
12191   eval "ac_cv_func_cthread_fork=no"
12192 fi
12193 rm -f conftest*
12194 fi
12195
12196 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
12197   echo "$ac_t""yes" 1>&6
12198   ol_link_threads=yes
12199 else
12200   echo "$ac_t""no" 1>&6
12201 fi
12202
12203                 LIBS="$save_LIBS"
12204
12205                 if test $ol_link_threads = yes ; then
12206                         LTHREAD_LIBS="-lthreads"
12207                         ol_link_threads=mach
12208                 else
12209                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
12210                 fi
12211
12212         elif test $ol_with_threads = mach ; then
12213                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
12214         fi
12215
12216         if test $ol_link_threads = mach ; then
12217                 cat >> confdefs.h <<\EOF
12218 #define HAVE_MACH_CTHREADS 1
12219 EOF
12220
12221         elif test $ol_with_threads = found ; then
12222                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
12223         fi
12224 fi
12225
12226 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12227         -o $ol_with_threads = pth ; then
12228
12229         for ac_hdr in pth.h
12230 do
12231 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12232 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12233 echo "configure:12234: checking for $ac_hdr" >&5
12234 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12235   echo $ac_n "(cached) $ac_c" 1>&6
12236 else
12237   cat > conftest.$ac_ext <<EOF
12238 #line 12239 "configure"
12239 #include "confdefs.h"
12240 #include <$ac_hdr>
12241 EOF
12242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12243 { (eval echo configure:12244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12245 if test -z "$ac_err"; then
12246   rm -rf conftest*
12247   eval "ac_cv_header_$ac_safe=yes"
12248 else
12249   echo "$ac_err" >&5
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -rf conftest*
12253   eval "ac_cv_header_$ac_safe=no"
12254 fi
12255 rm -f conftest*
12256 fi
12257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12258   echo "$ac_t""yes" 1>&6
12259     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12260   cat >> confdefs.h <<EOF
12261 #define $ac_tr_hdr 1
12262 EOF
12263  
12264 else
12265   echo "$ac_t""no" 1>&6
12266 fi
12267 done
12268
12269
12270         if test $ac_cv_header_pth_h = yes ; then
12271                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
12272 echo "configure:12273: checking for pth_version in -lpth" >&5
12273 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
12274 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12275   echo $ac_n "(cached) $ac_c" 1>&6
12276 else
12277   ac_save_LIBS="$LIBS"
12278 LIBS="-lpth  $LIBS"
12279 cat > conftest.$ac_ext <<EOF
12280 #line 12281 "configure"
12281 #include "confdefs.h"
12282 /* Override any gcc2 internal prototype to avoid an error.  */
12283 /* We use char because int might match the return type of a gcc2
12284     builtin and then its argument prototype would still apply.  */
12285 char pth_version();
12286
12287 int main() {
12288 pth_version()
12289 ; return 0; }
12290 EOF
12291 if { (eval echo configure:12292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12292   rm -rf conftest*
12293   eval "ac_cv_lib_$ac_lib_var=yes"
12294 else
12295   echo "configure: failed program was:" >&5
12296   cat conftest.$ac_ext >&5
12297   rm -rf conftest*
12298   eval "ac_cv_lib_$ac_lib_var=no"
12299 fi
12300 rm -f conftest*
12301 LIBS="$ac_save_LIBS"
12302
12303 fi
12304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12305   echo "$ac_t""yes" 1>&6
12306   have_pth=yes
12307 else
12308   echo "$ac_t""no" 1>&6
12309 have_pth=no
12310 fi
12311
12312
12313                 if test $have_pth = yes ; then
12314                         cat >> confdefs.h <<\EOF
12315 #define HAVE_GNU_PTH 1
12316 EOF
12317
12318                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
12319                         ol_link_threads=pth
12320
12321                         if test $ol_with_yielding_select = auto ; then
12322                                 ol_with_yielding_select=yes
12323                         fi
12324                 fi
12325         fi
12326 fi
12327
12328 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12329         -o $ol_with_threads = lwp ; then
12330
12331                 for ac_hdr in thread.h synch.h
12332 do
12333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12335 echo "configure:12336: checking for $ac_hdr" >&5
12336 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12337   echo $ac_n "(cached) $ac_c" 1>&6
12338 else
12339   cat > conftest.$ac_ext <<EOF
12340 #line 12341 "configure"
12341 #include "confdefs.h"
12342 #include <$ac_hdr>
12343 EOF
12344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12345 { (eval echo configure:12346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12347 if test -z "$ac_err"; then
12348   rm -rf conftest*
12349   eval "ac_cv_header_$ac_safe=yes"
12350 else
12351   echo "$ac_err" >&5
12352   echo "configure: failed program was:" >&5
12353   cat conftest.$ac_ext >&5
12354   rm -rf conftest*
12355   eval "ac_cv_header_$ac_safe=no"
12356 fi
12357 rm -f conftest*
12358 fi
12359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12360   echo "$ac_t""yes" 1>&6
12361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12362   cat >> confdefs.h <<EOF
12363 #define $ac_tr_hdr 1
12364 EOF
12365  
12366 else
12367   echo "$ac_t""no" 1>&6
12368 fi
12369 done
12370
12371         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
12372                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
12373 echo "configure:12374: checking for thr_create in -lthread" >&5
12374 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
12375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12376   echo $ac_n "(cached) $ac_c" 1>&6
12377 else
12378   ac_save_LIBS="$LIBS"
12379 LIBS="-lthread  $LIBS"
12380 cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383 /* Override any gcc2 internal prototype to avoid an error.  */
12384 /* We use char because int might match the return type of a gcc2
12385     builtin and then its argument prototype would still apply.  */
12386 char thr_create();
12387
12388 int main() {
12389 thr_create()
12390 ; return 0; }
12391 EOF
12392 if { (eval echo configure:12393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12393   rm -rf conftest*
12394   eval "ac_cv_lib_$ac_lib_var=yes"
12395 else
12396   echo "configure: failed program was:" >&5
12397   cat conftest.$ac_ext >&5
12398   rm -rf conftest*
12399   eval "ac_cv_lib_$ac_lib_var=no"
12400 fi
12401 rm -f conftest*
12402 LIBS="$ac_save_LIBS"
12403
12404 fi
12405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12406   echo "$ac_t""yes" 1>&6
12407   have_thr=yes
12408 else
12409   echo "$ac_t""no" 1>&6
12410 have_thr=no
12411 fi
12412
12413
12414                 if test $have_thr = yes ; then
12415                         cat >> confdefs.h <<\EOF
12416 #define HAVE_THR 1
12417 EOF
12418
12419                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
12420                         ol_link_threads=thr
12421
12422                         if test $ol_with_yielding_select = auto ; then
12423                                 ol_with_yielding_select=yes
12424                         fi
12425
12426                                                 for ac_func in \
12427                                 thr_setconcurrency \
12428                                 thr_getconcurrency \
12429                         
12430 do
12431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12432 echo "configure:12433: checking for $ac_func" >&5
12433 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12434   echo $ac_n "(cached) $ac_c" 1>&6
12435 else
12436   cat > conftest.$ac_ext <<EOF
12437 #line 12438 "configure"
12438 #include "confdefs.h"
12439 /* System header to define __stub macros and hopefully few prototypes,
12440     which can conflict with char $ac_func(); below.  */
12441 #include <assert.h>
12442 /* Override any gcc2 internal prototype to avoid an error.  */
12443 /* We use char because int might match the return type of a gcc2
12444     builtin and then its argument prototype would still apply.  */
12445 char $ac_func();
12446 char (*f)();
12447
12448 int main() {
12449
12450 /* The GNU C library defines this for functions which it implements
12451     to always fail with ENOSYS.  Some functions are actually named
12452     something starting with __ and the normal name is an alias.  */
12453 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12454 choke me
12455 #else
12456 f = $ac_func;
12457 #endif
12458
12459 ; return 0; }
12460 EOF
12461 if { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12462   rm -rf conftest*
12463   eval "ac_cv_func_$ac_func=yes"
12464 else
12465   echo "configure: failed program was:" >&5
12466   cat conftest.$ac_ext >&5
12467   rm -rf conftest*
12468   eval "ac_cv_func_$ac_func=no"
12469 fi
12470 rm -f conftest*
12471 fi
12472
12473 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12474   echo "$ac_t""yes" 1>&6
12475     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12476   cat >> confdefs.h <<EOF
12477 #define $ac_tr_func 1
12478 EOF
12479  
12480 else
12481   echo "$ac_t""no" 1>&6
12482 fi
12483 done
12484
12485                 fi
12486         fi
12487
12488                 for ac_hdr in lwp/lwp.h
12489 do
12490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12492 echo "configure:12493: checking for $ac_hdr" >&5
12493 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12494   echo $ac_n "(cached) $ac_c" 1>&6
12495 else
12496   cat > conftest.$ac_ext <<EOF
12497 #line 12498 "configure"
12498 #include "confdefs.h"
12499 #include <$ac_hdr>
12500 EOF
12501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12502 { (eval echo configure:12503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12504 if test -z "$ac_err"; then
12505   rm -rf conftest*
12506   eval "ac_cv_header_$ac_safe=yes"
12507 else
12508   echo "$ac_err" >&5
12509   echo "configure: failed program was:" >&5
12510   cat conftest.$ac_ext >&5
12511   rm -rf conftest*
12512   eval "ac_cv_header_$ac_safe=no"
12513 fi
12514 rm -f conftest*
12515 fi
12516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12517   echo "$ac_t""yes" 1>&6
12518     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12519   cat >> confdefs.h <<EOF
12520 #define $ac_tr_hdr 1
12521 EOF
12522  
12523 else
12524   echo "$ac_t""no" 1>&6
12525 fi
12526 done
12527
12528         if test $ac_cv_header_lwp_lwp_h = yes ; then
12529                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
12530 echo "configure:12531: checking for lwp_create in -llwp" >&5
12531 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
12532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12533   echo $ac_n "(cached) $ac_c" 1>&6
12534 else
12535   ac_save_LIBS="$LIBS"
12536 LIBS="-llwp  $LIBS"
12537 cat > conftest.$ac_ext <<EOF
12538 #line 12539 "configure"
12539 #include "confdefs.h"
12540 /* Override any gcc2 internal prototype to avoid an error.  */
12541 /* We use char because int might match the return type of a gcc2
12542     builtin and then its argument prototype would still apply.  */
12543 char lwp_create();
12544
12545 int main() {
12546 lwp_create()
12547 ; return 0; }
12548 EOF
12549 if { (eval echo configure:12550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12550   rm -rf conftest*
12551   eval "ac_cv_lib_$ac_lib_var=yes"
12552 else
12553   echo "configure: failed program was:" >&5
12554   cat conftest.$ac_ext >&5
12555   rm -rf conftest*
12556   eval "ac_cv_lib_$ac_lib_var=no"
12557 fi
12558 rm -f conftest*
12559 LIBS="$ac_save_LIBS"
12560
12561 fi
12562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12563   echo "$ac_t""yes" 1>&6
12564   have_lwp=yes
12565 else
12566   echo "$ac_t""no" 1>&6
12567 have_lwp=no
12568 fi
12569
12570
12571                 if test $have_lwp = yes ; then
12572                         cat >> confdefs.h <<\EOF
12573 #define HAVE_LWP 1
12574 EOF
12575
12576                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
12577                         ol_link_threads=lwp
12578
12579                         if test $ol_with_yielding_select = auto ; then
12580                                 ol_with_yielding_select=no
12581                         fi
12582                 fi
12583         fi
12584 fi
12585
12586 if test $ol_with_yielding_select = yes ; then
12587         cat >> confdefs.h <<\EOF
12588 #define HAVE_YIELDING_SELECT 1
12589 EOF
12590
12591 fi
12592
12593 if test $ol_with_threads = manual ; then
12594                 ol_link_threads=yes
12595
12596         echo "configure: warning: thread defines and link options must be set manually" 1>&2
12597
12598         for ac_hdr in pthread.h sched.h
12599 do
12600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12602 echo "configure:12603: checking for $ac_hdr" >&5
12603 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12604   echo $ac_n "(cached) $ac_c" 1>&6
12605 else
12606   cat > conftest.$ac_ext <<EOF
12607 #line 12608 "configure"
12608 #include "confdefs.h"
12609 #include <$ac_hdr>
12610 EOF
12611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12612 { (eval echo configure:12613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12614 if test -z "$ac_err"; then
12615   rm -rf conftest*
12616   eval "ac_cv_header_$ac_safe=yes"
12617 else
12618   echo "$ac_err" >&5
12619   echo "configure: failed program was:" >&5
12620   cat conftest.$ac_ext >&5
12621   rm -rf conftest*
12622   eval "ac_cv_header_$ac_safe=no"
12623 fi
12624 rm -f conftest*
12625 fi
12626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12627   echo "$ac_t""yes" 1>&6
12628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12629   cat >> confdefs.h <<EOF
12630 #define $ac_tr_hdr 1
12631 EOF
12632  
12633 else
12634   echo "$ac_t""no" 1>&6
12635 fi
12636 done
12637
12638         for ac_func in sched_yield pthread_yield
12639 do
12640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12641 echo "configure:12642: checking for $ac_func" >&5
12642 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12643   echo $ac_n "(cached) $ac_c" 1>&6
12644 else
12645   cat > conftest.$ac_ext <<EOF
12646 #line 12647 "configure"
12647 #include "confdefs.h"
12648 /* System header to define __stub macros and hopefully few prototypes,
12649     which can conflict with char $ac_func(); below.  */
12650 #include <assert.h>
12651 /* Override any gcc2 internal prototype to avoid an error.  */
12652 /* We use char because int might match the return type of a gcc2
12653     builtin and then its argument prototype would still apply.  */
12654 char $ac_func();
12655 char (*f)();
12656
12657 int main() {
12658
12659 /* The GNU C library defines this for functions which it implements
12660     to always fail with ENOSYS.  Some functions are actually named
12661     something starting with __ and the normal name is an alias.  */
12662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12663 choke me
12664 #else
12665 f = $ac_func;
12666 #endif
12667
12668 ; return 0; }
12669 EOF
12670 if { (eval echo configure:12671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12671   rm -rf conftest*
12672   eval "ac_cv_func_$ac_func=yes"
12673 else
12674   echo "configure: failed program was:" >&5
12675   cat conftest.$ac_ext >&5
12676   rm -rf conftest*
12677   eval "ac_cv_func_$ac_func=no"
12678 fi
12679 rm -f conftest*
12680 fi
12681
12682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12683   echo "$ac_t""yes" 1>&6
12684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12685   cat >> confdefs.h <<EOF
12686 #define $ac_tr_func 1
12687 EOF
12688  
12689 else
12690   echo "$ac_t""no" 1>&6
12691 fi
12692 done
12693
12694         
12695         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
12696 echo "configure:12697: checking for LinuxThreads pthread.h" >&5
12697 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
12698   echo $ac_n "(cached) $ac_c" 1>&6
12699 else
12700   cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 #include <pthread.h>
12704 EOF
12705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12706   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
12707   rm -rf conftest*
12708   ol_cv_header_linux_threads=yes
12709 else
12710   rm -rf conftest*
12711   ol_cv_header_linux_threads=no
12712 fi
12713 rm -f conftest*
12714
12715                 
12716 fi
12717
12718 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12719         if test $ol_cv_header_linux_threads = yes; then
12720                 cat >> confdefs.h <<\EOF
12721 #define HAVE_LINUX_THREADS 1
12722 EOF
12723
12724         fi
12725
12726
12727         for ac_hdr in mach/cthreads.h
12728 do
12729 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12730 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12731 echo "configure:12732: checking for $ac_hdr" >&5
12732 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12733   echo $ac_n "(cached) $ac_c" 1>&6
12734 else
12735   cat > conftest.$ac_ext <<EOF
12736 #line 12737 "configure"
12737 #include "confdefs.h"
12738 #include <$ac_hdr>
12739 EOF
12740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12741 { (eval echo configure:12742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12743 if test -z "$ac_err"; then
12744   rm -rf conftest*
12745   eval "ac_cv_header_$ac_safe=yes"
12746 else
12747   echo "$ac_err" >&5
12748   echo "configure: failed program was:" >&5
12749   cat conftest.$ac_ext >&5
12750   rm -rf conftest*
12751   eval "ac_cv_header_$ac_safe=no"
12752 fi
12753 rm -f conftest*
12754 fi
12755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12756   echo "$ac_t""yes" 1>&6
12757     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12758   cat >> confdefs.h <<EOF
12759 #define $ac_tr_hdr 1
12760 EOF
12761  
12762 else
12763   echo "$ac_t""no" 1>&6
12764 fi
12765 done
12766
12767         for ac_hdr in lwp/lwp.h
12768 do
12769 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12770 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12771 echo "configure:12772: checking for $ac_hdr" >&5
12772 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12773   echo $ac_n "(cached) $ac_c" 1>&6
12774 else
12775   cat > conftest.$ac_ext <<EOF
12776 #line 12777 "configure"
12777 #include "confdefs.h"
12778 #include <$ac_hdr>
12779 EOF
12780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12781 { (eval echo configure:12782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12783 if test -z "$ac_err"; then
12784   rm -rf conftest*
12785   eval "ac_cv_header_$ac_safe=yes"
12786 else
12787   echo "$ac_err" >&5
12788   echo "configure: failed program was:" >&5
12789   cat conftest.$ac_ext >&5
12790   rm -rf conftest*
12791   eval "ac_cv_header_$ac_safe=no"
12792 fi
12793 rm -f conftest*
12794 fi
12795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12796   echo "$ac_t""yes" 1>&6
12797     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12798   cat >> confdefs.h <<EOF
12799 #define $ac_tr_hdr 1
12800 EOF
12801  
12802 else
12803   echo "$ac_t""no" 1>&6
12804 fi
12805 done
12806
12807         for ac_hdr in thread.h synch.h
12808 do
12809 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12810 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12811 echo "configure:12812: checking for $ac_hdr" >&5
12812 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12813   echo $ac_n "(cached) $ac_c" 1>&6
12814 else
12815   cat > conftest.$ac_ext <<EOF
12816 #line 12817 "configure"
12817 #include "confdefs.h"
12818 #include <$ac_hdr>
12819 EOF
12820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12821 { (eval echo configure:12822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12823 if test -z "$ac_err"; then
12824   rm -rf conftest*
12825   eval "ac_cv_header_$ac_safe=yes"
12826 else
12827   echo "$ac_err" >&5
12828   echo "configure: failed program was:" >&5
12829   cat conftest.$ac_ext >&5
12830   rm -rf conftest*
12831   eval "ac_cv_header_$ac_safe=no"
12832 fi
12833 rm -f conftest*
12834 fi
12835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12836   echo "$ac_t""yes" 1>&6
12837     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12838   cat >> confdefs.h <<EOF
12839 #define $ac_tr_hdr 1
12840 EOF
12841  
12842 else
12843   echo "$ac_t""no" 1>&6
12844 fi
12845 done
12846
12847 fi
12848
12849 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
12850                         cat >> confdefs.h <<\EOF
12851 #define REENTRANT 1
12852 EOF
12853
12854         cat >> confdefs.h <<\EOF
12855 #define _REENTRANT 1
12856 EOF
12857
12858         cat >> confdefs.h <<\EOF
12859 #define THREAD_SAFE 1
12860 EOF
12861
12862         cat >> confdefs.h <<\EOF
12863 #define _THREAD_SAFE 1
12864 EOF
12865
12866         cat >> confdefs.h <<\EOF
12867 #define THREADSAFE 1
12868 EOF
12869
12870         cat >> confdefs.h <<\EOF
12871 #define _THREADSAFE 1
12872 EOF
12873
12874         cat >> confdefs.h <<\EOF
12875 #define _SGI_MP_SOURCE 1
12876 EOF
12877
12878
12879                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
12880 echo "configure:12881: checking for thread specific errno" >&5
12881 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
12882   echo $ac_n "(cached) $ac_c" 1>&6
12883 else
12884   
12885                 cat > conftest.$ac_ext <<EOF
12886 #line 12887 "configure"
12887 #include "confdefs.h"
12888 #include <errno.h>
12889 int main() {
12890 errno = 0;
12891 ; return 0; }
12892 EOF
12893 if { (eval echo configure:12894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12894   rm -rf conftest*
12895   ol_cv_errno_thread_specific=yes
12896 else
12897   echo "configure: failed program was:" >&5
12898   cat conftest.$ac_ext >&5
12899   rm -rf conftest*
12900   ol_cv_errno_thread_specific=no
12901 fi
12902 rm -f conftest*
12903         
12904 fi
12905
12906 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
12907
12908                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
12909 echo "configure:12910: checking for thread specific h_errno" >&5
12910 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
12911   echo $ac_n "(cached) $ac_c" 1>&6
12912 else
12913   
12914                 cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 #include <netdb.h>
12918 int main() {
12919 h_errno = 0;
12920 ; return 0; }
12921 EOF
12922 if { (eval echo configure:12923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12923   rm -rf conftest*
12924   ol_cv_h_errno_thread_specific=yes
12925 else
12926   echo "configure: failed program was:" >&5
12927   cat conftest.$ac_ext >&5
12928   rm -rf conftest*
12929   ol_cv_h_errno_thread_specific=no
12930 fi
12931 rm -f conftest*
12932         
12933 fi
12934
12935 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
12936
12937         if test $ol_cv_errno_thread_specific != yes \
12938                 -o $ol_cv_h_errno_thread_specific != yes ; then
12939                 LIBS="$LTHREAD_LIBS $LIBS"
12940                 LTHREAD_LIBS=""
12941         fi
12942
12943 fi  
12944
12945 if test $ol_link_threads = no ; then
12946         if test $ol_with_threads = yes ; then
12947                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
12948         fi
12949
12950         if test $ol_with_threads = auto ; then
12951                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
12952                 ol_with_threads=no
12953         fi
12954
12955         cat >> confdefs.h <<\EOF
12956 #define NO_THREADS 1
12957 EOF
12958
12959         LTHREAD_LIBS=""
12960 fi
12961
12962 if test $ol_link_threads != no ; then
12963         cat >> confdefs.h <<\EOF
12964 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
12965 EOF
12966
12967 fi
12968
12969 ol_link_ldbm=no 
12970
12971 if test $ol_with_ldbm_api = auto \
12972         -o $ol_with_ldbm_api = berkeley \
12973         -o $ol_with_ldbm_api = bcompat ; then
12974
12975         if test $ol_with_ldbm_api = bcompat; then \
12976                 ol_cv_berkeley_db=no
12977 for ac_hdr in db_185.h db.h
12978 do
12979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12981 echo "configure:12982: checking for $ac_hdr" >&5
12982 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12983   echo $ac_n "(cached) $ac_c" 1>&6
12984 else
12985   cat > conftest.$ac_ext <<EOF
12986 #line 12987 "configure"
12987 #include "confdefs.h"
12988 #include <$ac_hdr>
12989 EOF
12990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12991 { (eval echo configure:12992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12993 if test -z "$ac_err"; then
12994   rm -rf conftest*
12995   eval "ac_cv_header_$ac_safe=yes"
12996 else
12997   echo "$ac_err" >&5
12998   echo "configure: failed program was:" >&5
12999   cat conftest.$ac_ext >&5
13000   rm -rf conftest*
13001   eval "ac_cv_header_$ac_safe=no"
13002 fi
13003 rm -f conftest*
13004 fi
13005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13006   echo "$ac_t""yes" 1>&6
13007     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13008   cat >> confdefs.h <<EOF
13009 #define $ac_tr_hdr 1
13010 EOF
13011  
13012 else
13013   echo "$ac_t""no" 1>&6
13014 fi
13015 done
13016
13017 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
13018         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
13019 echo "configure:13020: checking if Berkeley DB header compatibility" >&5
13020 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
13021   echo $ac_n "(cached) $ac_c" 1>&6
13022 else
13023   
13024                 cat > conftest.$ac_ext <<EOF
13025 #line 13026 "configure"
13026 #include "confdefs.h"
13027
13028 #if HAVE_DB_185_H
13029 #       include <db_185.h>
13030 #else
13031 #       include <db.h>
13032 #endif
13033
13034  /* this check could be improved */
13035 #ifndef DB_VERSION_MAJOR
13036 #       define DB_VERSION_MAJOR 1
13037 #endif
13038
13039 #if DB_VERSION_MAJOR == 1 
13040         __db_version_1
13041 #endif
13042
13043 EOF
13044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13045   egrep "__db_version_1" >/dev/null 2>&1; then
13046   rm -rf conftest*
13047   ol_cv_header_db1=yes
13048 else
13049   rm -rf conftest*
13050   ol_cv_header_db1=no
13051 fi
13052 rm -f conftest*
13053
13054 fi
13055
13056 echo "$ac_t""$ol_cv_header_db1" 1>&6
13057
13058         if test $ol_cv_header_db1 = yes ; then
13059                 ol_cv_lib_db=no
13060 if test $ol_cv_lib_db = no ; then
13061         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
13062 echo "configure:13063: checking for Berkeley DB link (default)" >&5
13063 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
13064   echo $ac_n "(cached) $ac_c" 1>&6
13065 else
13066   
13067         ol_DB_LIB=
13068         ol_LIBS=$LIBS
13069         LIBS="$ol_DB_LIB $LIBS"
13070
13071         cat > conftest.$ac_ext <<EOF
13072 #line 13073 "configure"
13073 #include "confdefs.h"
13074
13075 #ifdef HAVE_DB_185_H
13076 # include <db_185.h>
13077 #else
13078 # include <db.h>
13079 #endif
13080
13081 #ifndef DB_VERSION_MAJOR
13082 # define DB_VERSION_MAJOR 1
13083 #endif
13084
13085 #ifndef NULL
13086 #define NULL ((void*)0)
13087 #endif
13088
13089 int main() {
13090
13091 #if DB_VERSION_MAJOR > 1
13092         {
13093                 char *version;
13094                 int major, minor, patch;
13095
13096                 version = db_version( &major, &minor, &patch );
13097
13098                 if( major != DB_VERSION_MAJOR ||
13099                         minor < DB_VERSION_MINOR )
13100                 {
13101                         printf("Berkeley DB version mismatch\n"
13102                                 "\texpected: %s\n\tgot: %s\n",
13103                                 DB_VERSION_STRING, version);
13104                         return 1;
13105                 }
13106         }
13107 #endif
13108
13109 #if DB_VERSION_MAJOR > 2
13110         db_env_create( NULL, 0 );
13111 #elif DB_VERSION_MAJOR > 1
13112         db_appexit( NULL );
13113 #else
13114         (void) dbopen( NULL, 0, 0, 0, NULL);
13115 #endif
13116
13117 ; return 0; }
13118 EOF
13119 if { (eval echo configure:13120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13120   rm -rf conftest*
13121   ol_cv_db_none=yes
13122 else
13123   echo "configure: failed program was:" >&5
13124   cat conftest.$ac_ext >&5
13125   rm -rf conftest*
13126   ol_cv_db_none=no
13127 fi
13128 rm -f conftest*
13129
13130         LIBS="$ol_LIBS"
13131
13132 fi
13133
13134 echo "$ac_t""$ol_cv_db_none" 1>&6
13135
13136         if test $ol_cv_db_none = yes ; then
13137                 ol_cv_lib_db=yes
13138         fi
13139 fi
13140
13141 if test $ol_cv_lib_db = no ; then
13142         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13143 echo "configure:13144: checking for Berkeley DB link (-ldb)" >&5
13144 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13145   echo $ac_n "(cached) $ac_c" 1>&6
13146 else
13147   
13148         ol_DB_LIB=-ldb
13149         ol_LIBS=$LIBS
13150         LIBS="$ol_DB_LIB $LIBS"
13151
13152         cat > conftest.$ac_ext <<EOF
13153 #line 13154 "configure"
13154 #include "confdefs.h"
13155
13156 #ifdef HAVE_DB_185_H
13157 # include <db_185.h>
13158 #else
13159 # include <db.h>
13160 #endif
13161
13162 #ifndef DB_VERSION_MAJOR
13163 # define DB_VERSION_MAJOR 1
13164 #endif
13165
13166 #ifndef NULL
13167 #define NULL ((void*)0)
13168 #endif
13169
13170 int main() {
13171
13172 #if DB_VERSION_MAJOR > 1
13173         {
13174                 char *version;
13175                 int major, minor, patch;
13176
13177                 version = db_version( &major, &minor, &patch );
13178
13179                 if( major != DB_VERSION_MAJOR ||
13180                         minor < DB_VERSION_MINOR )
13181                 {
13182                         printf("Berkeley DB version mismatch\n"
13183                                 "\texpected: %s\n\tgot: %s\n",
13184                                 DB_VERSION_STRING, version);
13185                         return 1;
13186                 }
13187         }
13188 #endif
13189
13190 #if DB_VERSION_MAJOR > 2
13191         db_env_create( NULL, 0 );
13192 #elif DB_VERSION_MAJOR > 1
13193         db_appexit( NULL );
13194 #else
13195         (void) dbopen( NULL, 0, 0, 0, NULL);
13196 #endif
13197
13198 ; return 0; }
13199 EOF
13200 if { (eval echo configure:13201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13201   rm -rf conftest*
13202   ol_cv_db_db=yes
13203 else
13204   echo "configure: failed program was:" >&5
13205   cat conftest.$ac_ext >&5
13206   rm -rf conftest*
13207   ol_cv_db_db=no
13208 fi
13209 rm -f conftest*
13210
13211         LIBS="$ol_LIBS"
13212
13213 fi
13214
13215 echo "$ac_t""$ol_cv_db_db" 1>&6
13216
13217         if test $ol_cv_db_db = yes ; then
13218                 ol_cv_lib_db=-ldb
13219         fi
13220 fi
13221
13222 if test $ol_cv_lib_db = no ; then
13223         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13224 echo "configure:13225: checking for Berkeley DB link (-ldb3)" >&5
13225 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13226   echo $ac_n "(cached) $ac_c" 1>&6
13227 else
13228   
13229         ol_DB_LIB=-ldb3
13230         ol_LIBS=$LIBS
13231         LIBS="$ol_DB_LIB $LIBS"
13232
13233         cat > conftest.$ac_ext <<EOF
13234 #line 13235 "configure"
13235 #include "confdefs.h"
13236
13237 #ifdef HAVE_DB_185_H
13238 # include <db_185.h>
13239 #else
13240 # include <db.h>
13241 #endif
13242
13243 #ifndef DB_VERSION_MAJOR
13244 # define DB_VERSION_MAJOR 1
13245 #endif
13246
13247 #ifndef NULL
13248 #define NULL ((void*)0)
13249 #endif
13250
13251 int main() {
13252
13253 #if DB_VERSION_MAJOR > 1
13254         {
13255                 char *version;
13256                 int major, minor, patch;
13257
13258                 version = db_version( &major, &minor, &patch );
13259
13260                 if( major != DB_VERSION_MAJOR ||
13261                         minor < DB_VERSION_MINOR )
13262                 {
13263                         printf("Berkeley DB version mismatch\n"
13264                                 "\texpected: %s\n\tgot: %s\n",
13265                                 DB_VERSION_STRING, version);
13266                         return 1;
13267                 }
13268         }
13269 #endif
13270
13271 #if DB_VERSION_MAJOR > 2
13272         db_env_create( NULL, 0 );
13273 #elif DB_VERSION_MAJOR > 1
13274         db_appexit( NULL );
13275 #else
13276         (void) dbopen( NULL, 0, 0, 0, NULL);
13277 #endif
13278
13279 ; return 0; }
13280 EOF
13281 if { (eval echo configure:13282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13282   rm -rf conftest*
13283   ol_cv_db_db3=yes
13284 else
13285   echo "configure: failed program was:" >&5
13286   cat conftest.$ac_ext >&5
13287   rm -rf conftest*
13288   ol_cv_db_db3=no
13289 fi
13290 rm -f conftest*
13291
13292         LIBS="$ol_LIBS"
13293
13294 fi
13295
13296 echo "$ac_t""$ol_cv_db_db3" 1>&6
13297
13298         if test $ol_cv_db_db3 = yes ; then
13299                 ol_cv_lib_db=-ldb3
13300         fi
13301 fi
13302
13303 if test $ol_cv_lib_db = no ; then
13304         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13305 echo "configure:13306: checking for Berkeley DB link (-ldb2)" >&5
13306 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13307   echo $ac_n "(cached) $ac_c" 1>&6
13308 else
13309   
13310         ol_DB_LIB=-ldb2
13311         ol_LIBS=$LIBS
13312         LIBS="$ol_DB_LIB $LIBS"
13313
13314         cat > conftest.$ac_ext <<EOF
13315 #line 13316 "configure"
13316 #include "confdefs.h"
13317
13318 #ifdef HAVE_DB_185_H
13319 # include <db_185.h>
13320 #else
13321 # include <db.h>
13322 #endif
13323
13324 #ifndef DB_VERSION_MAJOR
13325 # define DB_VERSION_MAJOR 1
13326 #endif
13327
13328 #ifndef NULL
13329 #define NULL ((void*)0)
13330 #endif
13331
13332 int main() {
13333
13334 #if DB_VERSION_MAJOR > 1
13335         {
13336                 char *version;
13337                 int major, minor, patch;
13338
13339                 version = db_version( &major, &minor, &patch );
13340
13341                 if( major != DB_VERSION_MAJOR ||
13342                         minor < DB_VERSION_MINOR )
13343                 {
13344                         printf("Berkeley DB version mismatch\n"
13345                                 "\texpected: %s\n\tgot: %s\n",
13346                                 DB_VERSION_STRING, version);
13347                         return 1;
13348                 }
13349         }
13350 #endif
13351
13352 #if DB_VERSION_MAJOR > 2
13353         db_env_create( NULL, 0 );
13354 #elif DB_VERSION_MAJOR > 1
13355         db_appexit( NULL );
13356 #else
13357         (void) dbopen( NULL, 0, 0, 0, NULL);
13358 #endif
13359
13360 ; return 0; }
13361 EOF
13362 if { (eval echo configure:13363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13363   rm -rf conftest*
13364   ol_cv_db_db2=yes
13365 else
13366   echo "configure: failed program was:" >&5
13367   cat conftest.$ac_ext >&5
13368   rm -rf conftest*
13369   ol_cv_db_db2=no
13370 fi
13371 rm -f conftest*
13372
13373         LIBS="$ol_LIBS"
13374
13375 fi
13376
13377 echo "$ac_t""$ol_cv_db_db2" 1>&6
13378
13379         if test $ol_cv_db_db2 = yes ; then
13380                 ol_cv_lib_db=-ldb2
13381         fi
13382 fi
13383
13384 if test $ol_cv_lib_db = no ; then
13385         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13386 echo "configure:13387: checking for Berkeley DB link (-ldb1)" >&5
13387 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13388   echo $ac_n "(cached) $ac_c" 1>&6
13389 else
13390   
13391         ol_DB_LIB=-ldb1
13392         ol_LIBS=$LIBS
13393         LIBS="$ol_DB_LIB $LIBS"
13394
13395         cat > conftest.$ac_ext <<EOF
13396 #line 13397 "configure"
13397 #include "confdefs.h"
13398
13399 #ifdef HAVE_DB_185_H
13400 # include <db_185.h>
13401 #else
13402 # include <db.h>
13403 #endif
13404
13405 #ifndef DB_VERSION_MAJOR
13406 # define DB_VERSION_MAJOR 1
13407 #endif
13408
13409 #ifndef NULL
13410 #define NULL ((void*)0)
13411 #endif
13412
13413 int main() {
13414
13415 #if DB_VERSION_MAJOR > 1
13416         {
13417                 char *version;
13418                 int major, minor, patch;
13419
13420                 version = db_version( &major, &minor, &patch );
13421
13422                 if( major != DB_VERSION_MAJOR ||
13423                         minor < DB_VERSION_MINOR )
13424                 {
13425                         printf("Berkeley DB version mismatch\n"
13426                                 "\texpected: %s\n\tgot: %s\n",
13427                                 DB_VERSION_STRING, version);
13428                         return 1;
13429                 }
13430         }
13431 #endif
13432
13433 #if DB_VERSION_MAJOR > 2
13434         db_env_create( NULL, 0 );
13435 #elif DB_VERSION_MAJOR > 1
13436         db_appexit( NULL );
13437 #else
13438         (void) dbopen( NULL, 0, 0, 0, NULL);
13439 #endif
13440
13441 ; return 0; }
13442 EOF
13443 if { (eval echo configure:13444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13444   rm -rf conftest*
13445   ol_cv_db_db1=yes
13446 else
13447   echo "configure: failed program was:" >&5
13448   cat conftest.$ac_ext >&5
13449   rm -rf conftest*
13450   ol_cv_db_db1=no
13451 fi
13452 rm -f conftest*
13453
13454         LIBS="$ol_LIBS"
13455
13456 fi
13457
13458 echo "$ac_t""$ol_cv_db_db1" 1>&6
13459
13460         if test $ol_cv_db_db1 = yes ; then
13461                 ol_cv_lib_db=-ldb1
13462         fi
13463 fi
13464
13465
13466                 if test "$ol_cv_lib_db" != no ; then
13467                         ol_cv_berkeley_db=yes
13468                 fi
13469         fi
13470 fi
13471
13472         else
13473                 ol_cv_berkeley_db=no
13474 for ac_hdr in db.h
13475 do
13476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13478 echo "configure:13479: checking for $ac_hdr" >&5
13479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13480   echo $ac_n "(cached) $ac_c" 1>&6
13481 else
13482   cat > conftest.$ac_ext <<EOF
13483 #line 13484 "configure"
13484 #include "confdefs.h"
13485 #include <$ac_hdr>
13486 EOF
13487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13488 { (eval echo configure:13489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13490 if test -z "$ac_err"; then
13491   rm -rf conftest*
13492   eval "ac_cv_header_$ac_safe=yes"
13493 else
13494   echo "$ac_err" >&5
13495   echo "configure: failed program was:" >&5
13496   cat conftest.$ac_ext >&5
13497   rm -rf conftest*
13498   eval "ac_cv_header_$ac_safe=no"
13499 fi
13500 rm -f conftest*
13501 fi
13502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13503   echo "$ac_t""yes" 1>&6
13504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13505   cat >> confdefs.h <<EOF
13506 #define $ac_tr_hdr 1
13507 EOF
13508  
13509 else
13510   echo "$ac_t""no" 1>&6
13511 fi
13512 done
13513
13514 if test $ac_cv_header_db_h = yes; then
13515         ol_cv_lib_db=no
13516 if test $ol_cv_lib_db = no ; then
13517         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
13518 echo "configure:13519: checking for Berkeley DB link (default)" >&5
13519 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
13520   echo $ac_n "(cached) $ac_c" 1>&6
13521 else
13522   
13523         ol_DB_LIB=
13524         ol_LIBS=$LIBS
13525         LIBS="$ol_DB_LIB $LIBS"
13526
13527         cat > conftest.$ac_ext <<EOF
13528 #line 13529 "configure"
13529 #include "confdefs.h"
13530
13531 #ifdef HAVE_DB_185_H
13532 # include <db_185.h>
13533 #else
13534 # include <db.h>
13535 #endif
13536
13537 #ifndef DB_VERSION_MAJOR
13538 # define DB_VERSION_MAJOR 1
13539 #endif
13540
13541 #ifndef NULL
13542 #define NULL ((void*)0)
13543 #endif
13544
13545 int main() {
13546
13547 #if DB_VERSION_MAJOR > 1
13548         {
13549                 char *version;
13550                 int major, minor, patch;
13551
13552                 version = db_version( &major, &minor, &patch );
13553
13554                 if( major != DB_VERSION_MAJOR ||
13555                         minor < DB_VERSION_MINOR )
13556                 {
13557                         printf("Berkeley DB version mismatch\n"
13558                                 "\texpected: %s\n\tgot: %s\n",
13559                                 DB_VERSION_STRING, version);
13560                         return 1;
13561                 }
13562         }
13563 #endif
13564
13565 #if DB_VERSION_MAJOR > 2
13566         db_env_create( NULL, 0 );
13567 #elif DB_VERSION_MAJOR > 1
13568         db_appexit( NULL );
13569 #else
13570         (void) dbopen( NULL, 0, 0, 0, NULL);
13571 #endif
13572
13573 ; return 0; }
13574 EOF
13575 if { (eval echo configure:13576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13576   rm -rf conftest*
13577   ol_cv_db_none=yes
13578 else
13579   echo "configure: failed program was:" >&5
13580   cat conftest.$ac_ext >&5
13581   rm -rf conftest*
13582   ol_cv_db_none=no
13583 fi
13584 rm -f conftest*
13585
13586         LIBS="$ol_LIBS"
13587
13588 fi
13589
13590 echo "$ac_t""$ol_cv_db_none" 1>&6
13591
13592         if test $ol_cv_db_none = yes ; then
13593                 ol_cv_lib_db=yes
13594         fi
13595 fi
13596
13597 if test $ol_cv_lib_db = no ; then
13598         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13599 echo "configure:13600: checking for Berkeley DB link (-ldb)" >&5
13600 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13601   echo $ac_n "(cached) $ac_c" 1>&6
13602 else
13603   
13604         ol_DB_LIB=-ldb
13605         ol_LIBS=$LIBS
13606         LIBS="$ol_DB_LIB $LIBS"
13607
13608         cat > conftest.$ac_ext <<EOF
13609 #line 13610 "configure"
13610 #include "confdefs.h"
13611
13612 #ifdef HAVE_DB_185_H
13613 # include <db_185.h>
13614 #else
13615 # include <db.h>
13616 #endif
13617
13618 #ifndef DB_VERSION_MAJOR
13619 # define DB_VERSION_MAJOR 1
13620 #endif
13621
13622 #ifndef NULL
13623 #define NULL ((void*)0)
13624 #endif
13625
13626 int main() {
13627
13628 #if DB_VERSION_MAJOR > 1
13629         {
13630                 char *version;
13631                 int major, minor, patch;
13632
13633                 version = db_version( &major, &minor, &patch );
13634
13635                 if( major != DB_VERSION_MAJOR ||
13636                         minor < DB_VERSION_MINOR )
13637                 {
13638                         printf("Berkeley DB version mismatch\n"
13639                                 "\texpected: %s\n\tgot: %s\n",
13640                                 DB_VERSION_STRING, version);
13641                         return 1;
13642                 }
13643         }
13644 #endif
13645
13646 #if DB_VERSION_MAJOR > 2
13647         db_env_create( NULL, 0 );
13648 #elif DB_VERSION_MAJOR > 1
13649         db_appexit( NULL );
13650 #else
13651         (void) dbopen( NULL, 0, 0, 0, NULL);
13652 #endif
13653
13654 ; return 0; }
13655 EOF
13656 if { (eval echo configure:13657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13657   rm -rf conftest*
13658   ol_cv_db_db=yes
13659 else
13660   echo "configure: failed program was:" >&5
13661   cat conftest.$ac_ext >&5
13662   rm -rf conftest*
13663   ol_cv_db_db=no
13664 fi
13665 rm -f conftest*
13666
13667         LIBS="$ol_LIBS"
13668
13669 fi
13670
13671 echo "$ac_t""$ol_cv_db_db" 1>&6
13672
13673         if test $ol_cv_db_db = yes ; then
13674                 ol_cv_lib_db=-ldb
13675         fi
13676 fi
13677
13678 if test $ol_cv_lib_db = no ; then
13679         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13680 echo "configure:13681: checking for Berkeley DB link (-ldb3)" >&5
13681 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13682   echo $ac_n "(cached) $ac_c" 1>&6
13683 else
13684   
13685         ol_DB_LIB=-ldb3
13686         ol_LIBS=$LIBS
13687         LIBS="$ol_DB_LIB $LIBS"
13688
13689         cat > conftest.$ac_ext <<EOF
13690 #line 13691 "configure"
13691 #include "confdefs.h"
13692
13693 #ifdef HAVE_DB_185_H
13694 # include <db_185.h>
13695 #else
13696 # include <db.h>
13697 #endif
13698
13699 #ifndef DB_VERSION_MAJOR
13700 # define DB_VERSION_MAJOR 1
13701 #endif
13702
13703 #ifndef NULL
13704 #define NULL ((void*)0)
13705 #endif
13706
13707 int main() {
13708
13709 #if DB_VERSION_MAJOR > 1
13710         {
13711                 char *version;
13712                 int major, minor, patch;
13713
13714                 version = db_version( &major, &minor, &patch );
13715
13716                 if( major != DB_VERSION_MAJOR ||
13717                         minor < DB_VERSION_MINOR )
13718                 {
13719                         printf("Berkeley DB version mismatch\n"
13720                                 "\texpected: %s\n\tgot: %s\n",
13721                                 DB_VERSION_STRING, version);
13722                         return 1;
13723                 }
13724         }
13725 #endif
13726
13727 #if DB_VERSION_MAJOR > 2
13728         db_env_create( NULL, 0 );
13729 #elif DB_VERSION_MAJOR > 1
13730         db_appexit( NULL );
13731 #else
13732         (void) dbopen( NULL, 0, 0, 0, NULL);
13733 #endif
13734
13735 ; return 0; }
13736 EOF
13737 if { (eval echo configure:13738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13738   rm -rf conftest*
13739   ol_cv_db_db3=yes
13740 else
13741   echo "configure: failed program was:" >&5
13742   cat conftest.$ac_ext >&5
13743   rm -rf conftest*
13744   ol_cv_db_db3=no
13745 fi
13746 rm -f conftest*
13747
13748         LIBS="$ol_LIBS"
13749
13750 fi
13751
13752 echo "$ac_t""$ol_cv_db_db3" 1>&6
13753
13754         if test $ol_cv_db_db3 = yes ; then
13755                 ol_cv_lib_db=-ldb3
13756         fi
13757 fi
13758
13759 if test $ol_cv_lib_db = no ; then
13760         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13761 echo "configure:13762: checking for Berkeley DB link (-ldb2)" >&5
13762 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13763   echo $ac_n "(cached) $ac_c" 1>&6
13764 else
13765   
13766         ol_DB_LIB=-ldb2
13767         ol_LIBS=$LIBS
13768         LIBS="$ol_DB_LIB $LIBS"
13769
13770         cat > conftest.$ac_ext <<EOF
13771 #line 13772 "configure"
13772 #include "confdefs.h"
13773
13774 #ifdef HAVE_DB_185_H
13775 # include <db_185.h>
13776 #else
13777 # include <db.h>
13778 #endif
13779
13780 #ifndef DB_VERSION_MAJOR
13781 # define DB_VERSION_MAJOR 1
13782 #endif
13783
13784 #ifndef NULL
13785 #define NULL ((void*)0)
13786 #endif
13787
13788 int main() {
13789
13790 #if DB_VERSION_MAJOR > 1
13791         {
13792                 char *version;
13793                 int major, minor, patch;
13794
13795                 version = db_version( &major, &minor, &patch );
13796
13797                 if( major != DB_VERSION_MAJOR ||
13798                         minor < DB_VERSION_MINOR )
13799                 {
13800                         printf("Berkeley DB version mismatch\n"
13801                                 "\texpected: %s\n\tgot: %s\n",
13802                                 DB_VERSION_STRING, version);
13803                         return 1;
13804                 }
13805         }
13806 #endif
13807
13808 #if DB_VERSION_MAJOR > 2
13809         db_env_create( NULL, 0 );
13810 #elif DB_VERSION_MAJOR > 1
13811         db_appexit( NULL );
13812 #else
13813         (void) dbopen( NULL, 0, 0, 0, NULL);
13814 #endif
13815
13816 ; return 0; }
13817 EOF
13818 if { (eval echo configure:13819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13819   rm -rf conftest*
13820   ol_cv_db_db2=yes
13821 else
13822   echo "configure: failed program was:" >&5
13823   cat conftest.$ac_ext >&5
13824   rm -rf conftest*
13825   ol_cv_db_db2=no
13826 fi
13827 rm -f conftest*
13828
13829         LIBS="$ol_LIBS"
13830
13831 fi
13832
13833 echo "$ac_t""$ol_cv_db_db2" 1>&6
13834
13835         if test $ol_cv_db_db2 = yes ; then
13836                 ol_cv_lib_db=-ldb2
13837         fi
13838 fi
13839
13840 if test $ol_cv_lib_db = no ; then
13841         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13842 echo "configure:13843: checking for Berkeley DB link (-ldb1)" >&5
13843 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13844   echo $ac_n "(cached) $ac_c" 1>&6
13845 else
13846   
13847         ol_DB_LIB=-ldb1
13848         ol_LIBS=$LIBS
13849         LIBS="$ol_DB_LIB $LIBS"
13850
13851         cat > conftest.$ac_ext <<EOF
13852 #line 13853 "configure"
13853 #include "confdefs.h"
13854
13855 #ifdef HAVE_DB_185_H
13856 # include <db_185.h>
13857 #else
13858 # include <db.h>
13859 #endif
13860
13861 #ifndef DB_VERSION_MAJOR
13862 # define DB_VERSION_MAJOR 1
13863 #endif
13864
13865 #ifndef NULL
13866 #define NULL ((void*)0)
13867 #endif
13868
13869 int main() {
13870
13871 #if DB_VERSION_MAJOR > 1
13872         {
13873                 char *version;
13874                 int major, minor, patch;
13875
13876                 version = db_version( &major, &minor, &patch );
13877
13878                 if( major != DB_VERSION_MAJOR ||
13879                         minor < DB_VERSION_MINOR )
13880                 {
13881                         printf("Berkeley DB version mismatch\n"
13882                                 "\texpected: %s\n\tgot: %s\n",
13883                                 DB_VERSION_STRING, version);
13884                         return 1;
13885                 }
13886         }
13887 #endif
13888
13889 #if DB_VERSION_MAJOR > 2
13890         db_env_create( NULL, 0 );
13891 #elif DB_VERSION_MAJOR > 1
13892         db_appexit( NULL );
13893 #else
13894         (void) dbopen( NULL, 0, 0, 0, NULL);
13895 #endif
13896
13897 ; return 0; }
13898 EOF
13899 if { (eval echo configure:13900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13900   rm -rf conftest*
13901   ol_cv_db_db1=yes
13902 else
13903   echo "configure: failed program was:" >&5
13904   cat conftest.$ac_ext >&5
13905   rm -rf conftest*
13906   ol_cv_db_db1=no
13907 fi
13908 rm -f conftest*
13909
13910         LIBS="$ol_LIBS"
13911
13912 fi
13913
13914 echo "$ac_t""$ol_cv_db_db1" 1>&6
13915
13916         if test $ol_cv_db_db1 = yes ; then
13917                 ol_cv_lib_db=-ldb1
13918         fi
13919 fi
13920
13921
13922         if test "$ol_cv_lib_db" != no ; then
13923                 ol_cv_berkeley_db=yes
13924                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
13925 echo "configure:13926: checking for Berkeley DB thread support" >&5
13926 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
13927   echo $ac_n "(cached) $ac_c" 1>&6
13928 else
13929   
13930         ol_LIBS="$LIBS"
13931         if test $ol_cv_lib_db != yes ; then
13932                 LIBS="$ol_cv_lib_db"
13933         fi
13934
13935         if test "$cross_compiling" = yes; then
13936   ol_cv_berkeley_db_thread=cross
13937 else
13938   cat > conftest.$ac_ext <<EOF
13939 #line 13940 "configure"
13940 #include "confdefs.h"
13941
13942 #ifdef HAVE_DB_185_H
13943         choke me;
13944 #else
13945 #include <db.h>
13946 #endif
13947 #ifndef NULL
13948 #define NULL ((void *)0)
13949 #endif
13950 main()
13951 {
13952         int rc;
13953         u_int32_t flags = DB_CREATE |
13954 #ifdef DB_PRIVATE
13955                 DB_PRIVATE |
13956 #endif
13957                 DB_THREAD;
13958
13959 #if DB_VERSION_MAJOR > 2
13960         DB_ENV *env = NULL;
13961
13962         rc = db_env_create( &env, 0 );
13963
13964         flags |= DB_INIT_MPOOL;
13965 #ifdef DB_MPOOL_PRIVATE
13966         flags |= DB_MPOOL_PRIVATE;
13967 #endif
13968
13969         if( rc ) {
13970                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13971                 return rc;
13972         }
13973
13974 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
13975         rc = env->open( env, NULL, flags, 0 );
13976 #else
13977         rc = env->open( env, NULL, NULL, flags, 0 );
13978 #endif
13979
13980         if ( rc == 0 ) {
13981                 rc = env->close( env, 0 );
13982         }
13983
13984         if( rc ) {
13985                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13986                 return rc;
13987         }
13988
13989 #else
13990         DB_ENV env;
13991         memset( &env, '\0', sizeof(env) );
13992
13993         rc = db_appinit( NULL, NULL, &env, flags );
13994
13995         if( rc == 0 ) {
13996                 db_appexit( &env );
13997         }
13998
13999         unlink("__db_mpool.share");
14000         unlink("__db_lock.share");
14001 #endif
14002
14003         return rc;
14004 }
14005 EOF
14006 if { (eval echo configure:14007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14007 then
14008   ol_cv_berkeley_db_thread=yes
14009 else
14010   echo "configure: failed program was:" >&5
14011   cat conftest.$ac_ext >&5
14012   rm -fr conftest*
14013   ol_cv_berkeley_db_thread=no
14014 fi
14015 rm -fr conftest*
14016 fi
14017
14018
14019         LIBS="$ol_LIBS"
14020
14021         if test $ol_cv_berkeley_db_thread != no ; then
14022                 cat >> confdefs.h <<\EOF
14023 #define HAVE_BERKELEY_DB_THREAD 1
14024 EOF
14025
14026         fi
14027
14028 fi
14029
14030 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
14031         fi
14032 fi
14033
14034         fi
14035
14036         if test $ol_cv_berkeley_db != no ; then
14037                 cat >> confdefs.h <<\EOF
14038 #define HAVE_BERKELEY_DB 1
14039 EOF
14040
14041
14042                 ol_link_ldbm=berkeley
14043                 ol_with_ldbm_api=berkeley
14044
14045                 if test $ol_with_ldbm_type = hash ; then
14046                         cat >> confdefs.h <<\EOF
14047 #define LDBM_USE_DBHASH 1
14048 EOF
14049
14050                 else
14051                         cat >> confdefs.h <<\EOF
14052 #define LDBM_USE_DBBTREE 1
14053 EOF
14054
14055                 fi
14056
14057                                                 if test $ol_cv_lib_db != yes ; then
14058                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
14059                 fi
14060         fi
14061 fi
14062
14063 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
14064         { echo "configure: error: BerkeleyDB not availabl" 1>&2; exit 1; }
14065 elif test $ol_enable_bdb != no -a $ol_link_ldbm != no ; then
14066         ol_enable_bdb=yes
14067 fi
14068
14069 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
14070         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
14071         ol_with_ldbm_api=none
14072 fi
14073
14074 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
14075         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
14076 echo "configure:14077: checking for MDBM library" >&5
14077 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
14078   echo $ac_n "(cached) $ac_c" 1>&6
14079 else
14080         ol_LIBS="$LIBS"
14081         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
14082 echo "configure:14083: checking for mdbm_set_chain" >&5
14083 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
14084   echo $ac_n "(cached) $ac_c" 1>&6
14085 else
14086   cat > conftest.$ac_ext <<EOF
14087 #line 14088 "configure"
14088 #include "confdefs.h"
14089 /* System header to define __stub macros and hopefully few prototypes,
14090     which can conflict with char mdbm_set_chain(); below.  */
14091 #include <assert.h>
14092 /* Override any gcc2 internal prototype to avoid an error.  */
14093 /* We use char because int might match the return type of a gcc2
14094     builtin and then its argument prototype would still apply.  */
14095 char mdbm_set_chain();
14096 char (*f)();
14097
14098 int main() {
14099
14100 /* The GNU C library defines this for functions which it implements
14101     to always fail with ENOSYS.  Some functions are actually named
14102     something starting with __ and the normal name is an alias.  */
14103 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
14104 choke me
14105 #else
14106 f = mdbm_set_chain;
14107 #endif
14108
14109 ; return 0; }
14110 EOF
14111 if { (eval echo configure:14112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14112   rm -rf conftest*
14113   eval "ac_cv_func_mdbm_set_chain=yes"
14114 else
14115   echo "configure: failed program was:" >&5
14116   cat conftest.$ac_ext >&5
14117   rm -rf conftest*
14118   eval "ac_cv_func_mdbm_set_chain=no"
14119 fi
14120 rm -f conftest*
14121 fi
14122
14123 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
14124   echo "$ac_t""yes" 1>&6
14125   ol_cv_lib_mdbm=yes
14126 else
14127   echo "$ac_t""no" 1>&6
14128
14129                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
14130 echo "configure:14131: checking for mdbm_set_chain in -lmdbm" >&5
14131 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
14132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14133   echo $ac_n "(cached) $ac_c" 1>&6
14134 else
14135   ac_save_LIBS="$LIBS"
14136 LIBS="-lmdbm  $LIBS"
14137 cat > conftest.$ac_ext <<EOF
14138 #line 14139 "configure"
14139 #include "confdefs.h"
14140 /* Override any gcc2 internal prototype to avoid an error.  */
14141 /* We use char because int might match the return type of a gcc2
14142     builtin and then its argument prototype would still apply.  */
14143 char mdbm_set_chain();
14144
14145 int main() {
14146 mdbm_set_chain()
14147 ; return 0; }
14148 EOF
14149 if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14150   rm -rf conftest*
14151   eval "ac_cv_lib_$ac_lib_var=yes"
14152 else
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -rf conftest*
14156   eval "ac_cv_lib_$ac_lib_var=no"
14157 fi
14158 rm -f conftest*
14159 LIBS="$ac_save_LIBS"
14160
14161 fi
14162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14163   echo "$ac_t""yes" 1>&6
14164   ol_cv_lib_mdbm=-lmdbm
14165 else
14166   echo "$ac_t""no" 1>&6
14167 ol_cv_lib_mdbm=no
14168 fi
14169
14170         
14171 fi
14172
14173         LIBS="$ol_LIBS"
14174
14175 fi
14176
14177 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
14178
14179
14180  for ac_hdr in mdbm.h
14181 do
14182 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14183 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14184 echo "configure:14185: checking for $ac_hdr" >&5
14185 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14186   echo $ac_n "(cached) $ac_c" 1>&6
14187 else
14188   cat > conftest.$ac_ext <<EOF
14189 #line 14190 "configure"
14190 #include "confdefs.h"
14191 #include <$ac_hdr>
14192 EOF
14193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14194 { (eval echo configure:14195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14196 if test -z "$ac_err"; then
14197   rm -rf conftest*
14198   eval "ac_cv_header_$ac_safe=yes"
14199 else
14200   echo "$ac_err" >&5
14201   echo "configure: failed program was:" >&5
14202   cat conftest.$ac_ext >&5
14203   rm -rf conftest*
14204   eval "ac_cv_header_$ac_safe=no"
14205 fi
14206 rm -f conftest*
14207 fi
14208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14209   echo "$ac_t""yes" 1>&6
14210     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14211   cat >> confdefs.h <<EOF
14212 #define $ac_tr_hdr 1
14213 EOF
14214  
14215 else
14216   echo "$ac_t""no" 1>&6
14217 fi
14218 done
14219
14220  echo $ac_n "checking for db""... $ac_c" 1>&6
14221 echo "configure:14222: checking for db" >&5
14222 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
14223   echo $ac_n "(cached) $ac_c" 1>&6
14224 else
14225   
14226         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
14227                 ol_cv_mdbm=no
14228         else
14229                 ol_cv_mdbm=yes
14230         fi
14231
14232 fi
14233
14234 echo "$ac_t""$ol_cv_mdbm" 1>&6
14235  if test $ol_cv_mdbm = yes ; then
14236         cat >> confdefs.h <<\EOF
14237 #define HAVE_MDBM 1
14238 EOF
14239
14240  fi
14241
14242
14243         if test $ol_cv_mdbm = yes ; then
14244                 ol_link_ldbm=mdbm
14245                 ol_with_ldbm_api=mdbm
14246                 if test $ol_cv_lib_mdbm != yes ; then
14247                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
14248                 fi
14249         fi
14250 fi
14251
14252 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
14253         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
14254 echo "configure:14255: checking for GDBM library" >&5
14255 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
14256   echo $ac_n "(cached) $ac_c" 1>&6
14257 else
14258         ol_LIBS="$LIBS"
14259         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
14260 echo "configure:14261: checking for gdbm_open" >&5
14261 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
14262   echo $ac_n "(cached) $ac_c" 1>&6
14263 else
14264   cat > conftest.$ac_ext <<EOF
14265 #line 14266 "configure"
14266 #include "confdefs.h"
14267 /* System header to define __stub macros and hopefully few prototypes,
14268     which can conflict with char gdbm_open(); below.  */
14269 #include <assert.h>
14270 /* Override any gcc2 internal prototype to avoid an error.  */
14271 /* We use char because int might match the return type of a gcc2
14272     builtin and then its argument prototype would still apply.  */
14273 char gdbm_open();
14274 char (*f)();
14275
14276 int main() {
14277
14278 /* The GNU C library defines this for functions which it implements
14279     to always fail with ENOSYS.  Some functions are actually named
14280     something starting with __ and the normal name is an alias.  */
14281 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
14282 choke me
14283 #else
14284 f = gdbm_open;
14285 #endif
14286
14287 ; return 0; }
14288 EOF
14289 if { (eval echo configure:14290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14290   rm -rf conftest*
14291   eval "ac_cv_func_gdbm_open=yes"
14292 else
14293   echo "configure: failed program was:" >&5
14294   cat conftest.$ac_ext >&5
14295   rm -rf conftest*
14296   eval "ac_cv_func_gdbm_open=no"
14297 fi
14298 rm -f conftest*
14299 fi
14300
14301 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
14302   echo "$ac_t""yes" 1>&6
14303   ol_cv_lib_gdbm=yes
14304 else
14305   echo "$ac_t""no" 1>&6
14306
14307                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
14308 echo "configure:14309: checking for gdbm_open in -lgdbm" >&5
14309 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
14310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14311   echo $ac_n "(cached) $ac_c" 1>&6
14312 else
14313   ac_save_LIBS="$LIBS"
14314 LIBS="-lgdbm  $LIBS"
14315 cat > conftest.$ac_ext <<EOF
14316 #line 14317 "configure"
14317 #include "confdefs.h"
14318 /* Override any gcc2 internal prototype to avoid an error.  */
14319 /* We use char because int might match the return type of a gcc2
14320     builtin and then its argument prototype would still apply.  */
14321 char gdbm_open();
14322
14323 int main() {
14324 gdbm_open()
14325 ; return 0; }
14326 EOF
14327 if { (eval echo configure:14328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14328   rm -rf conftest*
14329   eval "ac_cv_lib_$ac_lib_var=yes"
14330 else
14331   echo "configure: failed program was:" >&5
14332   cat conftest.$ac_ext >&5
14333   rm -rf conftest*
14334   eval "ac_cv_lib_$ac_lib_var=no"
14335 fi
14336 rm -f conftest*
14337 LIBS="$ac_save_LIBS"
14338
14339 fi
14340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14341   echo "$ac_t""yes" 1>&6
14342   ol_cv_lib_gdbm=-lgdbm
14343 else
14344   echo "$ac_t""no" 1>&6
14345 ol_cv_lib_gdbm=no
14346 fi
14347
14348         
14349 fi
14350
14351         LIBS="$ol_LIBS"
14352
14353 fi
14354
14355 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
14356
14357
14358  for ac_hdr in gdbm.h
14359 do
14360 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14361 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14362 echo "configure:14363: checking for $ac_hdr" >&5
14363 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14364   echo $ac_n "(cached) $ac_c" 1>&6
14365 else
14366   cat > conftest.$ac_ext <<EOF
14367 #line 14368 "configure"
14368 #include "confdefs.h"
14369 #include <$ac_hdr>
14370 EOF
14371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14372 { (eval echo configure:14373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14374 if test -z "$ac_err"; then
14375   rm -rf conftest*
14376   eval "ac_cv_header_$ac_safe=yes"
14377 else
14378   echo "$ac_err" >&5
14379   echo "configure: failed program was:" >&5
14380   cat conftest.$ac_ext >&5
14381   rm -rf conftest*
14382   eval "ac_cv_header_$ac_safe=no"
14383 fi
14384 rm -f conftest*
14385 fi
14386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14387   echo "$ac_t""yes" 1>&6
14388     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14389   cat >> confdefs.h <<EOF
14390 #define $ac_tr_hdr 1
14391 EOF
14392  
14393 else
14394   echo "$ac_t""no" 1>&6
14395 fi
14396 done
14397
14398  echo $ac_n "checking for db""... $ac_c" 1>&6
14399 echo "configure:14400: checking for db" >&5
14400 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
14401   echo $ac_n "(cached) $ac_c" 1>&6
14402 else
14403   
14404         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
14405                 ol_cv_gdbm=no
14406         else
14407                 ol_cv_gdbm=yes
14408         fi
14409
14410 fi
14411
14412 echo "$ac_t""$ol_cv_gdbm" 1>&6
14413  if test $ol_cv_gdbm = yes ; then
14414         cat >> confdefs.h <<\EOF
14415 #define HAVE_GDBM 1
14416 EOF
14417
14418  fi
14419
14420
14421         if test $ol_cv_gdbm = yes ; then
14422                 ol_link_ldbm=gdbm
14423                 ol_with_ldbm_api=gdbm
14424
14425                 if test $ol_cv_lib_gdbm != yes ; then
14426                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
14427                 fi
14428         fi
14429 fi
14430
14431 if test $ol_with_ldbm_api = ndbm ; then
14432         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
14433 echo "configure:14434: checking for NDBM library" >&5
14434 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
14435   echo $ac_n "(cached) $ac_c" 1>&6
14436 else
14437         ol_LIBS="$LIBS"
14438         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14439 echo "configure:14440: checking for dbm_open" >&5
14440 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
14441   echo $ac_n "(cached) $ac_c" 1>&6
14442 else
14443   cat > conftest.$ac_ext <<EOF
14444 #line 14445 "configure"
14445 #include "confdefs.h"
14446 /* System header to define __stub macros and hopefully few prototypes,
14447     which can conflict with char dbm_open(); below.  */
14448 #include <assert.h>
14449 /* Override any gcc2 internal prototype to avoid an error.  */
14450 /* We use char because int might match the return type of a gcc2
14451     builtin and then its argument prototype would still apply.  */
14452 char dbm_open();
14453 char (*f)();
14454
14455 int main() {
14456
14457 /* The GNU C library defines this for functions which it implements
14458     to always fail with ENOSYS.  Some functions are actually named
14459     something starting with __ and the normal name is an alias.  */
14460 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14461 choke me
14462 #else
14463 f = dbm_open;
14464 #endif
14465
14466 ; return 0; }
14467 EOF
14468 if { (eval echo configure:14469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14469   rm -rf conftest*
14470   eval "ac_cv_func_dbm_open=yes"
14471 else
14472   echo "configure: failed program was:" >&5
14473   cat conftest.$ac_ext >&5
14474   rm -rf conftest*
14475   eval "ac_cv_func_dbm_open=no"
14476 fi
14477 rm -f conftest*
14478 fi
14479
14480 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14481   echo "$ac_t""yes" 1>&6
14482   ol_cv_lib_ndbm=yes
14483 else
14484   echo "$ac_t""no" 1>&6
14485
14486                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
14487 echo "configure:14488: checking for dbm_open in -lndbm" >&5
14488 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14490   echo $ac_n "(cached) $ac_c" 1>&6
14491 else
14492   ac_save_LIBS="$LIBS"
14493 LIBS="-lndbm  $LIBS"
14494 cat > conftest.$ac_ext <<EOF
14495 #line 14496 "configure"
14496 #include "confdefs.h"
14497 /* Override any gcc2 internal prototype to avoid an error.  */
14498 /* We use char because int might match the return type of a gcc2
14499     builtin and then its argument prototype would still apply.  */
14500 char dbm_open();
14501
14502 int main() {
14503 dbm_open()
14504 ; return 0; }
14505 EOF
14506 if { (eval echo configure:14507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14507   rm -rf conftest*
14508   eval "ac_cv_lib_$ac_lib_var=yes"
14509 else
14510   echo "configure: failed program was:" >&5
14511   cat conftest.$ac_ext >&5
14512   rm -rf conftest*
14513   eval "ac_cv_lib_$ac_lib_var=no"
14514 fi
14515 rm -f conftest*
14516 LIBS="$ac_save_LIBS"
14517
14518 fi
14519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14520   echo "$ac_t""yes" 1>&6
14521   ol_cv_lib_ndbm=-lndbm
14522 else
14523   echo "$ac_t""no" 1>&6
14524
14525                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14526 echo "configure:14527: checking for dbm_open in -ldbm" >&5
14527 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14528 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14529   echo $ac_n "(cached) $ac_c" 1>&6
14530 else
14531   ac_save_LIBS="$LIBS"
14532 LIBS="-ldbm  $LIBS"
14533 cat > conftest.$ac_ext <<EOF
14534 #line 14535 "configure"
14535 #include "confdefs.h"
14536 /* Override any gcc2 internal prototype to avoid an error.  */
14537 /* We use char because int might match the return type of a gcc2
14538     builtin and then its argument prototype would still apply.  */
14539 char dbm_open();
14540
14541 int main() {
14542 dbm_open()
14543 ; return 0; }
14544 EOF
14545 if { (eval echo configure:14546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14546   rm -rf conftest*
14547   eval "ac_cv_lib_$ac_lib_var=yes"
14548 else
14549   echo "configure: failed program was:" >&5
14550   cat conftest.$ac_ext >&5
14551   rm -rf conftest*
14552   eval "ac_cv_lib_$ac_lib_var=no"
14553 fi
14554 rm -f conftest*
14555 LIBS="$ac_save_LIBS"
14556
14557 fi
14558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14559   echo "$ac_t""yes" 1>&6
14560   ol_cv_lib_ndbm=-ldbm
14561 else
14562   echo "$ac_t""no" 1>&6
14563 ol_cv_lib_ndbm=no
14564 fi
14565                 
14566 fi
14567
14568         
14569 fi
14570
14571         LIBS="$ol_LIBS"
14572
14573 fi
14574
14575 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
14576
14577
14578  for ac_hdr in ndbm.h
14579 do
14580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14582 echo "configure:14583: checking for $ac_hdr" >&5
14583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14584   echo $ac_n "(cached) $ac_c" 1>&6
14585 else
14586   cat > conftest.$ac_ext <<EOF
14587 #line 14588 "configure"
14588 #include "confdefs.h"
14589 #include <$ac_hdr>
14590 EOF
14591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14592 { (eval echo configure:14593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14594 if test -z "$ac_err"; then
14595   rm -rf conftest*
14596   eval "ac_cv_header_$ac_safe=yes"
14597 else
14598   echo "$ac_err" >&5
14599   echo "configure: failed program was:" >&5
14600   cat conftest.$ac_ext >&5
14601   rm -rf conftest*
14602   eval "ac_cv_header_$ac_safe=no"
14603 fi
14604 rm -f conftest*
14605 fi
14606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14607   echo "$ac_t""yes" 1>&6
14608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14609   cat >> confdefs.h <<EOF
14610 #define $ac_tr_hdr 1
14611 EOF
14612  
14613 else
14614   echo "$ac_t""no" 1>&6
14615 fi
14616 done
14617
14618  echo $ac_n "checking for db""... $ac_c" 1>&6
14619 echo "configure:14620: checking for db" >&5
14620 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
14621   echo $ac_n "(cached) $ac_c" 1>&6
14622 else
14623   
14624         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
14625                 ol_cv_ndbm=no
14626         else
14627                 ol_cv_ndbm=yes
14628         fi
14629
14630 fi
14631
14632 echo "$ac_t""$ol_cv_ndbm" 1>&6
14633  if test $ol_cv_ndbm = yes ; then
14634         cat >> confdefs.h <<\EOF
14635 #define HAVE_NDBM 1
14636 EOF
14637
14638  fi
14639
14640
14641         if test $ol_cv_ndbm = yes ; then
14642                 ol_link_ldbm=ndbm
14643                 ol_with_ldbm_api=ndbm
14644
14645                 if test $ol_cv_lib_ndbm != yes ; then
14646                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
14647                 fi
14648         fi
14649 fi
14650
14651 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
14652         echo "configure: warning: could not find suitable LDBM backend" 1>&2
14653         if test $ol_enable_ldbm = yes ; then
14654                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
14655         fi
14656
14657         echo "configure: warning: disabling LDBM" 1>&2
14658         ol_enable_ldbm=no
14659 fi
14660
14661 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
14662         BUILD_LIBS_DYNAMIC=shared
14663         cat >> confdefs.h <<\EOF
14664 #define LDAP_LIBS_DYNAMIC 1
14665 EOF
14666
14667 else
14668         BUILD_LIBS_DYNAMIC=static
14669 fi
14670
14671 if test $ol_enable_wrappers != no ; then
14672         for ac_hdr in tcpd.h
14673 do
14674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14675 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14676 echo "configure:14677: checking for $ac_hdr" >&5
14677 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14678   echo $ac_n "(cached) $ac_c" 1>&6
14679 else
14680   cat > conftest.$ac_ext <<EOF
14681 #line 14682 "configure"
14682 #include "confdefs.h"
14683 #include <$ac_hdr>
14684 EOF
14685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14686 { (eval echo configure:14687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14688 if test -z "$ac_err"; then
14689   rm -rf conftest*
14690   eval "ac_cv_header_$ac_safe=yes"
14691 else
14692   echo "$ac_err" >&5
14693   echo "configure: failed program was:" >&5
14694   cat conftest.$ac_ext >&5
14695   rm -rf conftest*
14696   eval "ac_cv_header_$ac_safe=no"
14697 fi
14698 rm -f conftest*
14699 fi
14700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14701   echo "$ac_t""yes" 1>&6
14702     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14703   cat >> confdefs.h <<EOF
14704 #define $ac_tr_hdr 1
14705 EOF
14706  
14707 else
14708   echo "$ac_t""no" 1>&6
14709 fi
14710 done
14711
14712
14713         if test $ac_cv_header_tcpd_h != yes ; then
14714                 have_wrappers=no
14715         else
14716                 cat > conftest.$ac_ext <<EOF
14717 #line 14718 "configure"
14718 #include "confdefs.h"
14719
14720 int allow_severity = 0;
14721 int deny_severity  = 0;
14722                 
14723 int main() {
14724 hosts_access()
14725 ; return 0; }
14726 EOF
14727 if { (eval echo configure:14728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14728   rm -rf conftest*
14729   have_wrappers=yes
14730 else
14731   echo "configure: failed program was:" >&5
14732   cat conftest.$ac_ext >&5
14733   rm -rf conftest*
14734   have_wrappers=no
14735 fi
14736 rm -f conftest*
14737         fi
14738
14739         if test $have_wrappers = yes ; then
14740                 cat >> confdefs.h <<\EOF
14741 #define HAVE_TCPD 1
14742 EOF
14743
14744                 WRAP_LIBS="-lwrap"
14745
14746                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
14747 echo "configure:14748: checking for main in -lnsl" >&5
14748 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
14749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14750   echo $ac_n "(cached) $ac_c" 1>&6
14751 else
14752   ac_save_LIBS="$LIBS"
14753 LIBS="-lnsl  $LIBS"
14754 cat > conftest.$ac_ext <<EOF
14755 #line 14756 "configure"
14756 #include "confdefs.h"
14757
14758 int main() {
14759 main()
14760 ; return 0; }
14761 EOF
14762 if { (eval echo configure:14763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14763   rm -rf conftest*
14764   eval "ac_cv_lib_$ac_lib_var=yes"
14765 else
14766   echo "configure: failed program was:" >&5
14767   cat conftest.$ac_ext >&5
14768   rm -rf conftest*
14769   eval "ac_cv_lib_$ac_lib_var=no"
14770 fi
14771 rm -f conftest*
14772 LIBS="$ac_save_LIBS"
14773
14774 fi
14775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14776   echo "$ac_t""yes" 1>&6
14777     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14778     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14779   cat >> confdefs.h <<EOF
14780 #define $ac_tr_lib 1
14781 EOF
14782
14783   LIBS="-lnsl $LIBS"
14784
14785 else
14786   echo "$ac_t""no" 1>&6
14787 fi
14788
14789         else
14790                 echo "configure: warning: could not find -lwrap" 1>&2
14791                 if test $ol_enable_wrappers = yes ; then
14792                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
14793                 fi
14794
14795                 echo "configure: warning: disabling wrappers support" 1>&2
14796                 ol_enable_wrappers=no
14797                 WRAP_LIBS=""
14798         fi
14799 fi
14800
14801 if test $ol_enable_syslog != no ; then
14802         echo $ac_n "checking for openlog""... $ac_c" 1>&6
14803 echo "configure:14804: checking for openlog" >&5
14804 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
14805   echo $ac_n "(cached) $ac_c" 1>&6
14806 else
14807   cat > conftest.$ac_ext <<EOF
14808 #line 14809 "configure"
14809 #include "confdefs.h"
14810 /* System header to define __stub macros and hopefully few prototypes,
14811     which can conflict with char openlog(); below.  */
14812 #include <assert.h>
14813 /* Override any gcc2 internal prototype to avoid an error.  */
14814 /* We use char because int might match the return type of a gcc2
14815     builtin and then its argument prototype would still apply.  */
14816 char openlog();
14817 char (*f)();
14818
14819 int main() {
14820
14821 /* The GNU C library defines this for functions which it implements
14822     to always fail with ENOSYS.  Some functions are actually named
14823     something starting with __ and the normal name is an alias.  */
14824 #if defined (__stub_openlog) || defined (__stub___openlog)
14825 choke me
14826 #else
14827 f = openlog;
14828 #endif
14829
14830 ; return 0; }
14831 EOF
14832 if { (eval echo configure:14833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14833   rm -rf conftest*
14834   eval "ac_cv_func_openlog=yes"
14835 else
14836   echo "configure: failed program was:" >&5
14837   cat conftest.$ac_ext >&5
14838   rm -rf conftest*
14839   eval "ac_cv_func_openlog=no"
14840 fi
14841 rm -f conftest*
14842 fi
14843
14844 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
14845   echo "$ac_t""yes" 1>&6
14846   :
14847 else
14848   echo "$ac_t""no" 1>&6
14849 fi
14850
14851         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
14852                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
14853         fi
14854         ol_enable_syslog=$ac_cv_func_openlog
14855 fi
14856
14857
14858 ol_link_sql=no
14859 if test $ol_enable_sql != no ; then
14860         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
14861 echo "configure:14862: checking for SQLDriverConnect in -liodbc" >&5
14862 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14863 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14864   echo $ac_n "(cached) $ac_c" 1>&6
14865 else
14866   ac_save_LIBS="$LIBS"
14867 LIBS="-liodbc  $LIBS"
14868 cat > conftest.$ac_ext <<EOF
14869 #line 14870 "configure"
14870 #include "confdefs.h"
14871 /* Override any gcc2 internal prototype to avoid an error.  */
14872 /* We use char because int might match the return type of a gcc2
14873     builtin and then its argument prototype would still apply.  */
14874 char SQLDriverConnect();
14875
14876 int main() {
14877 SQLDriverConnect()
14878 ; return 0; }
14879 EOF
14880 if { (eval echo configure:14881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14881   rm -rf conftest*
14882   eval "ac_cv_lib_$ac_lib_var=yes"
14883 else
14884   echo "configure: failed program was:" >&5
14885   cat conftest.$ac_ext >&5
14886   rm -rf conftest*
14887   eval "ac_cv_lib_$ac_lib_var=no"
14888 fi
14889 rm -f conftest*
14890 LIBS="$ac_save_LIBS"
14891
14892 fi
14893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14894   echo "$ac_t""yes" 1>&6
14895   have_iodbc=yes
14896 else
14897   echo "$ac_t""no" 1>&6
14898 have_iodbc=no
14899 fi
14900
14901         if test $have_iodbc = yes ; then
14902                 ol_link_sql="-liodbc"
14903         else
14904                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
14905 echo "configure:14906: checking for SQLDriverConnect in -lodbc" >&5
14906 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14908   echo $ac_n "(cached) $ac_c" 1>&6
14909 else
14910   ac_save_LIBS="$LIBS"
14911 LIBS="-lodbc  $LIBS"
14912 cat > conftest.$ac_ext <<EOF
14913 #line 14914 "configure"
14914 #include "confdefs.h"
14915 /* Override any gcc2 internal prototype to avoid an error.  */
14916 /* We use char because int might match the return type of a gcc2
14917     builtin and then its argument prototype would still apply.  */
14918 char SQLDriverConnect();
14919
14920 int main() {
14921 SQLDriverConnect()
14922 ; return 0; }
14923 EOF
14924 if { (eval echo configure:14925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14925   rm -rf conftest*
14926   eval "ac_cv_lib_$ac_lib_var=yes"
14927 else
14928   echo "configure: failed program was:" >&5
14929   cat conftest.$ac_ext >&5
14930   rm -rf conftest*
14931   eval "ac_cv_lib_$ac_lib_var=no"
14932 fi
14933 rm -f conftest*
14934 LIBS="$ac_save_LIBS"
14935
14936 fi
14937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14938   echo "$ac_t""yes" 1>&6
14939   have_odbc=yes
14940 else
14941   echo "$ac_t""no" 1>&6
14942 have_odbc=no
14943 fi
14944
14945                 if test $have_odbc = yes ; then
14946                         ol_link_sql="-lodbc"
14947                 fi
14948         fi
14949
14950         if test $ol_link_sql != no ; then
14951                 SLAPD_SQL_LIBS="$ol_link_sql"
14952
14953         elif test $ol_enable_sql != auto ; then
14954                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
14955         fi
14956 fi
14957
14958 if test $ol_enable_tcl != no ; then
14959         for ac_hdr in tcl.h
14960 do
14961 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14962 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14963 echo "configure:14964: checking for $ac_hdr" >&5
14964 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14965   echo $ac_n "(cached) $ac_c" 1>&6
14966 else
14967   cat > conftest.$ac_ext <<EOF
14968 #line 14969 "configure"
14969 #include "confdefs.h"
14970 #include <$ac_hdr>
14971 EOF
14972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14973 { (eval echo configure:14974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14975 if test -z "$ac_err"; then
14976   rm -rf conftest*
14977   eval "ac_cv_header_$ac_safe=yes"
14978 else
14979   echo "$ac_err" >&5
14980   echo "configure: failed program was:" >&5
14981   cat conftest.$ac_ext >&5
14982   rm -rf conftest*
14983   eval "ac_cv_header_$ac_safe=no"
14984 fi
14985 rm -f conftest*
14986 fi
14987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14988   echo "$ac_t""yes" 1>&6
14989     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14990   cat >> confdefs.h <<EOF
14991 #define $ac_tr_hdr 1
14992 EOF
14993  
14994 else
14995   echo "$ac_t""no" 1>&6
14996 fi
14997 done
14998
14999
15000         if test $ac_cv_header_tcl_h != yes ; then
15001                 have_tcl=no
15002         else
15003                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
15004                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
15005 echo "configure:15006: checking for main in -l$lib" >&5
15006 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
15007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15008   echo $ac_n "(cached) $ac_c" 1>&6
15009 else
15010   ac_save_LIBS="$LIBS"
15011 LIBS="-l$lib  $LIBS"
15012 cat > conftest.$ac_ext <<EOF
15013 #line 15014 "configure"
15014 #include "confdefs.h"
15015
15016 int main() {
15017 main()
15018 ; return 0; }
15019 EOF
15020 if { (eval echo configure:15021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15021   rm -rf conftest*
15022   eval "ac_cv_lib_$ac_lib_var=yes"
15023 else
15024   echo "configure: failed program was:" >&5
15025   cat conftest.$ac_ext >&5
15026   rm -rf conftest*
15027   eval "ac_cv_lib_$ac_lib_var=no"
15028 fi
15029 rm -f conftest*
15030 LIBS="$ac_save_LIBS"
15031
15032 fi
15033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15034   echo "$ac_t""yes" 1>&6
15035   have_tcl=yes
15036                            if test x"$ol_with_tcl_module" = "xstatic" ; then
15037                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
15038                            else
15039                                         MOD_TCL_LIB="-l${lib}"
15040                            fi;break
15041 else
15042   echo "$ac_t""no" 1>&6
15043 have_tcl=no
15044 fi
15045
15046                 done
15047         fi
15048
15049         if test $have_tcl != yes ; then
15050                 echo "configure: warning: could not find -ltcl" 1>&2
15051                 if test $ol_enable_tcl = yes ; then
15052                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
15053                 fi
15054
15055                 ol_enable_tcl=no
15056         fi
15057 fi
15058
15059 ol_link_termcap=no
15060 for ac_hdr in termcap.h ncurses.h
15061 do
15062 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15063 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15064 echo "configure:15065: checking for $ac_hdr" >&5
15065 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15066   echo $ac_n "(cached) $ac_c" 1>&6
15067 else
15068   cat > conftest.$ac_ext <<EOF
15069 #line 15070 "configure"
15070 #include "confdefs.h"
15071 #include <$ac_hdr>
15072 EOF
15073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15074 { (eval echo configure:15075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15076 if test -z "$ac_err"; then
15077   rm -rf conftest*
15078   eval "ac_cv_header_$ac_safe=yes"
15079 else
15080   echo "$ac_err" >&5
15081   echo "configure: failed program was:" >&5
15082   cat conftest.$ac_ext >&5
15083   rm -rf conftest*
15084   eval "ac_cv_header_$ac_safe=no"
15085 fi
15086 rm -f conftest*
15087 fi
15088 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15089   echo "$ac_t""yes" 1>&6
15090     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15091   cat >> confdefs.h <<EOF
15092 #define $ac_tr_hdr 1
15093 EOF
15094  
15095 else
15096   echo "$ac_t""no" 1>&6
15097 fi
15098 done
15099
15100
15101 if test $ol_link_termcap = no ; then
15102         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
15103 echo "configure:15104: checking for tputs in -ltermcap" >&5
15104 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
15105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15106   echo $ac_n "(cached) $ac_c" 1>&6
15107 else
15108   ac_save_LIBS="$LIBS"
15109 LIBS="-ltermcap  $LIBS"
15110 cat > conftest.$ac_ext <<EOF
15111 #line 15112 "configure"
15112 #include "confdefs.h"
15113 /* Override any gcc2 internal prototype to avoid an error.  */
15114 /* We use char because int might match the return type of a gcc2
15115     builtin and then its argument prototype would still apply.  */
15116 char tputs();
15117
15118 int main() {
15119 tputs()
15120 ; return 0; }
15121 EOF
15122 if { (eval echo configure:15123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15123   rm -rf conftest*
15124   eval "ac_cv_lib_$ac_lib_var=yes"
15125 else
15126   echo "configure: failed program was:" >&5
15127   cat conftest.$ac_ext >&5
15128   rm -rf conftest*
15129   eval "ac_cv_lib_$ac_lib_var=no"
15130 fi
15131 rm -f conftest*
15132 LIBS="$ac_save_LIBS"
15133
15134 fi
15135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15136   echo "$ac_t""yes" 1>&6
15137   have_termcap=yes
15138 else
15139   echo "$ac_t""no" 1>&6
15140 have_termcap=no
15141 fi
15142
15143         if test $have_termcap = yes ; then
15144                 cat >> confdefs.h <<\EOF
15145 #define HAVE_TERMCAP 1
15146 EOF
15147
15148                 ol_link_termcap=yes
15149                 TERMCAP_LIBS=-ltermcap
15150         fi
15151 fi
15152
15153 if test $ol_link_termcap = no ; then
15154         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
15155 echo "configure:15156: checking for initscr in -lncurses" >&5
15156 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
15157 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15158   echo $ac_n "(cached) $ac_c" 1>&6
15159 else
15160   ac_save_LIBS="$LIBS"
15161 LIBS="-lncurses  $LIBS"
15162 cat > conftest.$ac_ext <<EOF
15163 #line 15164 "configure"
15164 #include "confdefs.h"
15165 /* Override any gcc2 internal prototype to avoid an error.  */
15166 /* We use char because int might match the return type of a gcc2
15167     builtin and then its argument prototype would still apply.  */
15168 char initscr();
15169
15170 int main() {
15171 initscr()
15172 ; return 0; }
15173 EOF
15174 if { (eval echo configure:15175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15175   rm -rf conftest*
15176   eval "ac_cv_lib_$ac_lib_var=yes"
15177 else
15178   echo "configure: failed program was:" >&5
15179   cat conftest.$ac_ext >&5
15180   rm -rf conftest*
15181   eval "ac_cv_lib_$ac_lib_var=no"
15182 fi
15183 rm -f conftest*
15184 LIBS="$ac_save_LIBS"
15185
15186 fi
15187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15188   echo "$ac_t""yes" 1>&6
15189   have_ncurses=yes
15190 else
15191   echo "$ac_t""no" 1>&6
15192 have_ncurses=no
15193 fi
15194
15195         if test $have_ncurses = yes ; then
15196                 cat >> confdefs.h <<\EOF
15197 #define HAVE_NCURSES 1
15198 EOF
15199
15200                 ol_link_termcap=yes
15201                 TERMCAP_LIBS=-lncurses
15202         fi
15203 fi
15204
15205 if test $ol_link_termcap = no ; then
15206         cat >> confdefs.h <<\EOF
15207 #define NO_TERMCAP 1
15208 EOF
15209
15210         TERMCAP_LIBS=
15211 fi
15212
15213 ol_link_sasl=no
15214 ol_link_spasswd=no
15215 if test $ol_with_cyrus_sasl != no ; then
15216         for ac_hdr in sasl.h
15217 do
15218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15220 echo "configure:15221: checking for $ac_hdr" >&5
15221 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15222   echo $ac_n "(cached) $ac_c" 1>&6
15223 else
15224   cat > conftest.$ac_ext <<EOF
15225 #line 15226 "configure"
15226 #include "confdefs.h"
15227 #include <$ac_hdr>
15228 EOF
15229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15230 { (eval echo configure:15231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15232 if test -z "$ac_err"; then
15233   rm -rf conftest*
15234   eval "ac_cv_header_$ac_safe=yes"
15235 else
15236   echo "$ac_err" >&5
15237   echo "configure: failed program was:" >&5
15238   cat conftest.$ac_ext >&5
15239   rm -rf conftest*
15240   eval "ac_cv_header_$ac_safe=no"
15241 fi
15242 rm -f conftest*
15243 fi
15244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15245   echo "$ac_t""yes" 1>&6
15246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15247   cat >> confdefs.h <<EOF
15248 #define $ac_tr_hdr 1
15249 EOF
15250  
15251 else
15252   echo "$ac_t""no" 1>&6
15253 fi
15254 done
15255
15256
15257         if test $ac_cv_header_sasl_h = yes ; then
15258                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
15259 echo "configure:15260: checking for sasl_client_init in -lsasl" >&5
15260 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
15261 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15262   echo $ac_n "(cached) $ac_c" 1>&6
15263 else
15264   ac_save_LIBS="$LIBS"
15265 LIBS="-lsasl  $LIBS"
15266 cat > conftest.$ac_ext <<EOF
15267 #line 15268 "configure"
15268 #include "confdefs.h"
15269 /* Override any gcc2 internal prototype to avoid an error.  */
15270 /* We use char because int might match the return type of a gcc2
15271     builtin and then its argument prototype would still apply.  */
15272 char sasl_client_init();
15273
15274 int main() {
15275 sasl_client_init()
15276 ; return 0; }
15277 EOF
15278 if { (eval echo configure:15279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15279   rm -rf conftest*
15280   eval "ac_cv_lib_$ac_lib_var=yes"
15281 else
15282   echo "configure: failed program was:" >&5
15283   cat conftest.$ac_ext >&5
15284   rm -rf conftest*
15285   eval "ac_cv_lib_$ac_lib_var=no"
15286 fi
15287 rm -f conftest*
15288 LIBS="$ac_save_LIBS"
15289
15290 fi
15291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15292   echo "$ac_t""yes" 1>&6
15293   have_cyrus_sasl=yes
15294 else
15295   echo "$ac_t""no" 1>&6
15296 have_cyrus_sasl=no
15297 fi
15298
15299
15300                 if test $have_cyrus_sasl != no ; then
15301                         SASL_LIBS="-lsasl"
15302                         cat >> confdefs.h <<\EOF
15303 #define HAVE_CYRUS_SASL 1
15304 EOF
15305
15306                         ol_link_sasl=yes
15307                 fi
15308         fi
15309
15310         if test $ol_link_sasl = no ; then
15311                 if test $ol_with_cyrus_sasl != auto ; then
15312                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
15313                 else
15314                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
15315                         echo "configure: warning: SASL authentication not supported!" 1>&2
15316                         if test $ol_link_tls = no ; then
15317                                 echo "configure: warning: Strong authentication not supported!" 1>&2
15318                         fi
15319                 fi
15320
15321         elif test $ol_enable_spasswd != no ; then
15322                 ol_link_spasswd=yes
15323         fi
15324
15325 else
15326         echo "configure: warning: SASL authentication not supported!" 1>&2
15327         if test $ol_link_tls = no ; then
15328                 echo "configure: warning: Strong authentication not supported!" 1>&2
15329         fi
15330 fi
15331
15332 if test $cross_compiling != yes -a $ac_cv_mingw32 != yes ; then
15333         dev=no
15334         if test -r /dev/urandom ; then
15335                 dev="/dev/urandom";
15336         elif test -r /idev/urandom ; then
15337                 dev="/idev/urandom";
15338         elif test -r /dev/srandom ; then
15339                 dev="/dev/srandom";
15340         elif test -r /dev/random ; then
15341                 dev="/dev/random";
15342         elif test -r /idev/random ; then
15343                 dev="/idev/random";
15344         fi
15345
15346         if test $dev != no ; then
15347                 cat >> confdefs.h <<EOF
15348 #define URANDOM_DEVICE "$dev"
15349 EOF
15350
15351         fi
15352 fi
15353
15354 ol_link_fetch=no
15355 if test $ol_with_fetch != no ; then
15356         ol_LIBS=$LIBS
15357 LIBS="-lfetch -lcom_err $LIBS"
15358 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
15359 echo "configure:15360: checking fetch(3) library" >&5
15360 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
15361   echo $ac_n "(cached) $ac_c" 1>&6
15362 else
15363   
15364         cat > conftest.$ac_ext <<EOF
15365 #line 15366 "configure"
15366 #include "confdefs.h"
15367
15368 #include <sys/param.h>
15369 #include <stdio.h>
15370 #include <fetch.h>
15371 int main() {
15372 struct url *u = fetchParseURL("file:///"); 
15373 ; return 0; }
15374 EOF
15375 if { (eval echo configure:15376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15376   rm -rf conftest*
15377   ol_cv_lib_fetch=yes
15378 else
15379   echo "configure: failed program was:" >&5
15380   cat conftest.$ac_ext >&5
15381   rm -rf conftest*
15382   ol_cv_lib_fetch=no
15383 fi
15384 rm -f conftest*
15385 fi
15386
15387 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
15388 LIBS=$ol_LIBS
15389 if test $ol_cv_lib_fetch != no ; then
15390         ol_link_fetch="-lfetch -lcom_err"
15391         cat >> confdefs.h <<\EOF
15392 #define HAVE_FETCH 1
15393 EOF
15394
15395 fi
15396
15397
15398         if test $ol_cv_lib_fetch != no ; then
15399                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
15400                 ol_link_fetch=freebsd
15401
15402         elif test $ol_with_fetch != auto ; then
15403                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
15404         fi 
15405 fi
15406
15407 ol_link_readline=no
15408 if test $ol_with_readline != no ; then
15409         for ac_hdr in readline/readline.h readline/history.h
15410 do
15411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15413 echo "configure:15414: checking for $ac_hdr" >&5
15414 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15415   echo $ac_n "(cached) $ac_c" 1>&6
15416 else
15417   cat > conftest.$ac_ext <<EOF
15418 #line 15419 "configure"
15419 #include "confdefs.h"
15420 #include <$ac_hdr>
15421 EOF
15422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15423 { (eval echo configure:15424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15425 if test -z "$ac_err"; then
15426   rm -rf conftest*
15427   eval "ac_cv_header_$ac_safe=yes"
15428 else
15429   echo "$ac_err" >&5
15430   echo "configure: failed program was:" >&5
15431   cat conftest.$ac_ext >&5
15432   rm -rf conftest*
15433   eval "ac_cv_header_$ac_safe=no"
15434 fi
15435 rm -f conftest*
15436 fi
15437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15438   echo "$ac_t""yes" 1>&6
15439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15440   cat >> confdefs.h <<EOF
15441 #define $ac_tr_hdr 1
15442 EOF
15443  
15444 else
15445   echo "$ac_t""no" 1>&6
15446 fi
15447 done
15448
15449
15450         if test $ac_cv_header_readline_readline_h = yes ; then
15451                 save_LIBS="$LIBS"
15452                 LIBS="$TERMCAP_LIBS $LIBS"
15453                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
15454 echo "configure:15455: checking for readline in -lreadline" >&5
15455 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
15456 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15457   echo $ac_n "(cached) $ac_c" 1>&6
15458 else
15459   ac_save_LIBS="$LIBS"
15460 LIBS="-lreadline  $LIBS"
15461 cat > conftest.$ac_ext <<EOF
15462 #line 15463 "configure"
15463 #include "confdefs.h"
15464 /* Override any gcc2 internal prototype to avoid an error.  */
15465 /* We use char because int might match the return type of a gcc2
15466     builtin and then its argument prototype would still apply.  */
15467 char readline();
15468
15469 int main() {
15470 readline()
15471 ; return 0; }
15472 EOF
15473 if { (eval echo configure:15474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15474   rm -rf conftest*
15475   eval "ac_cv_lib_$ac_lib_var=yes"
15476 else
15477   echo "configure: failed program was:" >&5
15478   cat conftest.$ac_ext >&5
15479   rm -rf conftest*
15480   eval "ac_cv_lib_$ac_lib_var=no"
15481 fi
15482 rm -f conftest*
15483 LIBS="$ac_save_LIBS"
15484
15485 fi
15486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15487   echo "$ac_t""yes" 1>&6
15488   have_readline=yes
15489 else
15490   echo "$ac_t""no" 1>&6
15491 have_readline=no
15492 fi
15493
15494                 LIBS="$save_LIBS"
15495                         
15496                 if test $have_readline = yes ; then
15497                         ol_with_readline=found
15498                         ol_link_readline=yes
15499
15500                         READLINE_LIBS="-lreadline"
15501                 fi
15502         fi
15503 fi
15504
15505 if test $ol_link_readline = yes ; then
15506         cat >> confdefs.h <<\EOF
15507 #define HAVE_READLINE 1
15508 EOF
15509
15510 fi
15511
15512
15513 if test $ol_enable_crypt != no ; then
15514         echo $ac_n "checking for crypt""... $ac_c" 1>&6
15515 echo "configure:15516: checking for crypt" >&5
15516 if eval "test \"\${ac_cv_func_crypt+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 /* System header to define __stub macros and hopefully few prototypes,
15523     which can conflict with char crypt(); below.  */
15524 #include <assert.h>
15525 /* Override any gcc2 internal prototype to avoid an error.  */
15526 /* We use char because int might match the return type of a gcc2
15527     builtin and then its argument prototype would still apply.  */
15528 char crypt();
15529 char (*f)();
15530
15531 int main() {
15532
15533 /* The GNU C library defines this for functions which it implements
15534     to always fail with ENOSYS.  Some functions are actually named
15535     something starting with __ and the normal name is an alias.  */
15536 #if defined (__stub_crypt) || defined (__stub___crypt)
15537 choke me
15538 #else
15539 f = crypt;
15540 #endif
15541
15542 ; return 0; }
15543 EOF
15544 if { (eval echo configure:15545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15545   rm -rf conftest*
15546   eval "ac_cv_func_crypt=yes"
15547 else
15548   echo "configure: failed program was:" >&5
15549   cat conftest.$ac_ext >&5
15550   rm -rf conftest*
15551   eval "ac_cv_func_crypt=no"
15552 fi
15553 rm -f conftest*
15554 fi
15555
15556 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
15557   echo "$ac_t""yes" 1>&6
15558   have_crypt=yes
15559 else
15560   echo "$ac_t""no" 1>&6
15561
15562                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
15563 echo "configure:15564: checking for crypt in -lcrypt" >&5
15564 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
15565 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15566   echo $ac_n "(cached) $ac_c" 1>&6
15567 else
15568   ac_save_LIBS="$LIBS"
15569 LIBS="-lcrypt  $LIBS"
15570 cat > conftest.$ac_ext <<EOF
15571 #line 15572 "configure"
15572 #include "confdefs.h"
15573 /* Override any gcc2 internal prototype to avoid an error.  */
15574 /* We use char because int might match the return type of a gcc2
15575     builtin and then its argument prototype would still apply.  */
15576 char crypt();
15577
15578 int main() {
15579 crypt()
15580 ; return 0; }
15581 EOF
15582 if { (eval echo configure:15583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15583   rm -rf conftest*
15584   eval "ac_cv_lib_$ac_lib_var=yes"
15585 else
15586   echo "configure: failed program was:" >&5
15587   cat conftest.$ac_ext >&5
15588   rm -rf conftest*
15589   eval "ac_cv_lib_$ac_lib_var=no"
15590 fi
15591 rm -f conftest*
15592 LIBS="$ac_save_LIBS"
15593
15594 fi
15595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15596   echo "$ac_t""yes" 1>&6
15597   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
15598                         have_crypt=yes
15599 else
15600   echo "$ac_t""no" 1>&6
15601 have_crypt=no
15602 fi
15603
15604 fi
15605
15606
15607         if test $have_crypt = yes ; then
15608                 cat >> confdefs.h <<\EOF
15609 #define HAVE_CRYPT 1
15610 EOF
15611
15612         else
15613                 echo "configure: warning: could not find crypt" 1>&2
15614                 if test $ol_enable_crypt = yes ; then
15615                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
15616                 fi
15617
15618                 echo "configure: warning: disabling crypt support" 1>&2
15619                 ol_enable_crypt=no
15620         fi
15621 fi
15622
15623 if test $ol_enable_proctitle != no ; then
15624         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
15625 echo "configure:15626: checking for setproctitle" >&5
15626 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
15627   echo $ac_n "(cached) $ac_c" 1>&6
15628 else
15629   cat > conftest.$ac_ext <<EOF
15630 #line 15631 "configure"
15631 #include "confdefs.h"
15632 /* System header to define __stub macros and hopefully few prototypes,
15633     which can conflict with char setproctitle(); below.  */
15634 #include <assert.h>
15635 /* Override any gcc2 internal prototype to avoid an error.  */
15636 /* We use char because int might match the return type of a gcc2
15637     builtin and then its argument prototype would still apply.  */
15638 char setproctitle();
15639 char (*f)();
15640
15641 int main() {
15642
15643 /* The GNU C library defines this for functions which it implements
15644     to always fail with ENOSYS.  Some functions are actually named
15645     something starting with __ and the normal name is an alias.  */
15646 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
15647 choke me
15648 #else
15649 f = setproctitle;
15650 #endif
15651
15652 ; return 0; }
15653 EOF
15654 if { (eval echo configure:15655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15655   rm -rf conftest*
15656   eval "ac_cv_func_setproctitle=yes"
15657 else
15658   echo "configure: failed program was:" >&5
15659   cat conftest.$ac_ext >&5
15660   rm -rf conftest*
15661   eval "ac_cv_func_setproctitle=no"
15662 fi
15663 rm -f conftest*
15664 fi
15665
15666 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
15667   echo "$ac_t""yes" 1>&6
15668   have_setproctitle=yes
15669 else
15670   echo "$ac_t""no" 1>&6
15671
15672                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
15673 echo "configure:15674: checking for setproctitle in -lutil" >&5
15674 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
15675 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15676   echo $ac_n "(cached) $ac_c" 1>&6
15677 else
15678   ac_save_LIBS="$LIBS"
15679 LIBS="-lutil  $LIBS"
15680 cat > conftest.$ac_ext <<EOF
15681 #line 15682 "configure"
15682 #include "confdefs.h"
15683 /* Override any gcc2 internal prototype to avoid an error.  */
15684 /* We use char because int might match the return type of a gcc2
15685     builtin and then its argument prototype would still apply.  */
15686 char setproctitle();
15687
15688 int main() {
15689 setproctitle()
15690 ; return 0; }
15691 EOF
15692 if { (eval echo configure:15693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15693   rm -rf conftest*
15694   eval "ac_cv_lib_$ac_lib_var=yes"
15695 else
15696   echo "configure: failed program was:" >&5
15697   cat conftest.$ac_ext >&5
15698   rm -rf conftest*
15699   eval "ac_cv_lib_$ac_lib_var=no"
15700 fi
15701 rm -f conftest*
15702 LIBS="$ac_save_LIBS"
15703
15704 fi
15705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15706   echo "$ac_t""yes" 1>&6
15707   have_setproctitle=yes
15708                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
15709 else
15710   echo "$ac_t""no" 1>&6
15711 have_setproctitle=no
15712                         LIBOBJS="$LIBOBJS setproctitle.o"
15713                         LIBSRCS="$LIBSRCS setproctitle.c"
15714 fi
15715
15716 fi
15717
15718
15719         if test $have_setproctitle = yes ; then
15720                 cat >> confdefs.h <<\EOF
15721 #define HAVE_SETPROCTITLE 1
15722 EOF
15723
15724         fi
15725 fi
15726
15727 if test $ol_enable_slp != no ; then
15728         for ac_hdr in slp.h 
15729 do
15730 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15731 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15732 echo "configure:15733: checking for $ac_hdr" >&5
15733 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15734   echo $ac_n "(cached) $ac_c" 1>&6
15735 else
15736   cat > conftest.$ac_ext <<EOF
15737 #line 15738 "configure"
15738 #include "confdefs.h"
15739 #include <$ac_hdr>
15740 EOF
15741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15742 { (eval echo configure:15743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15744 if test -z "$ac_err"; then
15745   rm -rf conftest*
15746   eval "ac_cv_header_$ac_safe=yes"
15747 else
15748   echo "$ac_err" >&5
15749   echo "configure: failed program was:" >&5
15750   cat conftest.$ac_ext >&5
15751   rm -rf conftest*
15752   eval "ac_cv_header_$ac_safe=no"
15753 fi
15754 rm -f conftest*
15755 fi
15756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15757   echo "$ac_t""yes" 1>&6
15758     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15759   cat >> confdefs.h <<EOF
15760 #define $ac_tr_hdr 1
15761 EOF
15762  
15763 else
15764   echo "$ac_t""no" 1>&6
15765 fi
15766 done
15767
15768
15769         if test $ac_cv_header_slp_h = yes ; then
15770                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
15771 echo "configure:15772: checking for SLPOpen in -lslp" >&5
15772 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
15773 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15774   echo $ac_n "(cached) $ac_c" 1>&6
15775 else
15776   ac_save_LIBS="$LIBS"
15777 LIBS="-lslp  $LIBS"
15778 cat > conftest.$ac_ext <<EOF
15779 #line 15780 "configure"
15780 #include "confdefs.h"
15781 /* Override any gcc2 internal prototype to avoid an error.  */
15782 /* We use char because int might match the return type of a gcc2
15783     builtin and then its argument prototype would still apply.  */
15784 char SLPOpen();
15785
15786 int main() {
15787 SLPOpen()
15788 ; return 0; }
15789 EOF
15790 if { (eval echo configure:15791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15791   rm -rf conftest*
15792   eval "ac_cv_lib_$ac_lib_var=yes"
15793 else
15794   echo "configure: failed program was:" >&5
15795   cat conftest.$ac_ext >&5
15796   rm -rf conftest*
15797   eval "ac_cv_lib_$ac_lib_var=no"
15798 fi
15799 rm -f conftest*
15800 LIBS="$ac_save_LIBS"
15801
15802 fi
15803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15804   echo "$ac_t""yes" 1>&6
15805   have_slp=yes
15806 else
15807   echo "$ac_t""no" 1>&6
15808 have_slp=no
15809 fi
15810
15811                 if test $have_slp = yes ; then
15812                         cat >> confdefs.h <<\EOF
15813 #define HAVE_SLP 1
15814 EOF
15815
15816                         SLAPD_SLP_LIBS=-lslp
15817                 fi
15818
15819         elif test $ol_enable_slp = yes ; then
15820                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
15821         fi
15822 fi
15823
15824 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
15825 echo "configure:15826: checking for ANSI C header files" >&5
15826 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
15827   echo $ac_n "(cached) $ac_c" 1>&6
15828 else
15829   cat > conftest.$ac_ext <<EOF
15830 #line 15831 "configure"
15831 #include "confdefs.h"
15832 #include <stdlib.h>
15833 #include <stdarg.h>
15834 #include <string.h>
15835 #include <float.h>
15836 EOF
15837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15838 { (eval echo configure:15839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15840 if test -z "$ac_err"; then
15841   rm -rf conftest*
15842   ac_cv_header_stdc=yes
15843 else
15844   echo "$ac_err" >&5
15845   echo "configure: failed program was:" >&5
15846   cat conftest.$ac_ext >&5
15847   rm -rf conftest*
15848   ac_cv_header_stdc=no
15849 fi
15850 rm -f conftest*
15851
15852 if test $ac_cv_header_stdc = yes; then
15853   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15854 cat > conftest.$ac_ext <<EOF
15855 #line 15856 "configure"
15856 #include "confdefs.h"
15857 #include <string.h>
15858 EOF
15859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15860   egrep "memchr" >/dev/null 2>&1; then
15861   :
15862 else
15863   rm -rf conftest*
15864   ac_cv_header_stdc=no
15865 fi
15866 rm -f conftest*
15867
15868 fi
15869
15870 if test $ac_cv_header_stdc = yes; then
15871   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15872 cat > conftest.$ac_ext <<EOF
15873 #line 15874 "configure"
15874 #include "confdefs.h"
15875 #include <stdlib.h>
15876 EOF
15877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15878   egrep "free" >/dev/null 2>&1; then
15879   :
15880 else
15881   rm -rf conftest*
15882   ac_cv_header_stdc=no
15883 fi
15884 rm -f conftest*
15885
15886 fi
15887
15888 if test $ac_cv_header_stdc = yes; then
15889   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15890 if test "$cross_compiling" = yes; then
15891   :
15892 else
15893   cat > conftest.$ac_ext <<EOF
15894 #line 15895 "configure"
15895 #include "confdefs.h"
15896 #include <ctype.h>
15897 #if ((' ' & 0x0FF) == 0x020)
15898 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15899 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15900 #else
15901 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15902  || ('j' <= (c) && (c) <= 'r') \
15903  || ('s' <= (c) && (c) <= 'z'))
15904 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15905 #endif
15906 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15907 int main () { int i; for (i = 0; i < 256; i++)
15908 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
15909 exit (0); }
15910
15911 EOF
15912 if { (eval echo configure:15913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15913 then
15914   :
15915 else
15916   echo "configure: failed program was:" >&5
15917   cat conftest.$ac_ext >&5
15918   rm -fr conftest*
15919   ac_cv_header_stdc=no
15920 fi
15921 rm -fr conftest*
15922 fi
15923
15924 fi
15925 fi
15926
15927 echo "$ac_t""$ac_cv_header_stdc" 1>&6
15928 if test $ac_cv_header_stdc = yes; then
15929   cat >> confdefs.h <<\EOF
15930 #define STDC_HEADERS 1
15931 EOF
15932
15933 fi
15934
15935 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
15936 echo "configure:15937: checking for mode_t" >&5
15937 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
15938   echo $ac_n "(cached) $ac_c" 1>&6
15939 else
15940   cat > conftest.$ac_ext <<EOF
15941 #line 15942 "configure"
15942 #include "confdefs.h"
15943 #include <sys/types.h>
15944 #if STDC_HEADERS
15945 #include <stdlib.h>
15946 #include <stddef.h>
15947 #endif
15948
15949 EOF
15950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15951   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15952   rm -rf conftest*
15953   eval "ac_cv_type_mode_t=yes"
15954 else
15955   rm -rf conftest*
15956   eval "ac_cv_type_mode_t=no"
15957 fi
15958 rm -f conftest*
15959
15960 fi
15961 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
15962   echo "$ac_t""yes" 1>&6
15963 else
15964   echo "$ac_t""no" 1>&6
15965   cat >> confdefs.h <<EOF
15966 #define mode_t int
15967 EOF
15968
15969 fi
15970
15971 echo $ac_n "checking for off_t""... $ac_c" 1>&6
15972 echo "configure:15973: checking for off_t" >&5
15973 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
15974   echo $ac_n "(cached) $ac_c" 1>&6
15975 else
15976   cat > conftest.$ac_ext <<EOF
15977 #line 15978 "configure"
15978 #include "confdefs.h"
15979 #include <sys/types.h>
15980 #if STDC_HEADERS
15981 #include <stdlib.h>
15982 #include <stddef.h>
15983 #endif
15984
15985 EOF
15986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15987   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15988   rm -rf conftest*
15989   eval "ac_cv_type_off_t=yes"
15990 else
15991   rm -rf conftest*
15992   eval "ac_cv_type_off_t=no"
15993 fi
15994 rm -f conftest*
15995
15996 fi
15997 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
15998   echo "$ac_t""yes" 1>&6
15999 else
16000   echo "$ac_t""no" 1>&6
16001   cat >> confdefs.h <<EOF
16002 #define off_t long
16003 EOF
16004
16005 fi
16006
16007 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
16008 echo "configure:16009: checking for pid_t" >&5
16009 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
16010   echo $ac_n "(cached) $ac_c" 1>&6
16011 else
16012   cat > conftest.$ac_ext <<EOF
16013 #line 16014 "configure"
16014 #include "confdefs.h"
16015 #include <sys/types.h>
16016 #if STDC_HEADERS
16017 #include <stdlib.h>
16018 #include <stddef.h>
16019 #endif
16020
16021 EOF
16022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16023   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16024   rm -rf conftest*
16025   eval "ac_cv_type_pid_t=yes"
16026 else
16027   rm -rf conftest*
16028   eval "ac_cv_type_pid_t=no"
16029 fi
16030 rm -f conftest*
16031
16032 fi
16033 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
16034   echo "$ac_t""yes" 1>&6
16035 else
16036   echo "$ac_t""no" 1>&6
16037   cat >> confdefs.h <<EOF
16038 #define pid_t int
16039 EOF
16040
16041 fi
16042
16043 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
16044 echo "configure:16045: checking for ptrdiff_t" >&5
16045 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
16046   echo $ac_n "(cached) $ac_c" 1>&6
16047 else
16048   cat > conftest.$ac_ext <<EOF
16049 #line 16050 "configure"
16050 #include "confdefs.h"
16051 #include <stddef.h>
16052 int main() {
16053 ptrdiff_t p
16054 ; return 0; }
16055 EOF
16056 if { (eval echo configure:16057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16057   rm -rf conftest*
16058   am_cv_type_ptrdiff_t=yes
16059 else
16060   echo "configure: failed program was:" >&5
16061   cat conftest.$ac_ext >&5
16062   rm -rf conftest*
16063   am_cv_type_ptrdiff_t=no
16064 fi
16065 rm -f conftest*
16066 fi
16067
16068 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
16069    if test $am_cv_type_ptrdiff_t = yes; then
16070      cat >> confdefs.h <<\EOF
16071 #define HAVE_PTRDIFF_T 1
16072 EOF
16073
16074    fi
16075
16076 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
16077 echo "configure:16078: checking return type of signal handlers" >&5
16078 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
16079   echo $ac_n "(cached) $ac_c" 1>&6
16080 else
16081   cat > conftest.$ac_ext <<EOF
16082 #line 16083 "configure"
16083 #include "confdefs.h"
16084 #include <sys/types.h>
16085 #include <signal.h>
16086 #ifdef signal
16087 #undef signal
16088 #endif
16089 #ifdef __cplusplus
16090 extern "C" void (*signal (int, void (*)(int)))(int);
16091 #else
16092 void (*signal ()) ();
16093 #endif
16094
16095 int main() {
16096 int i;
16097 ; return 0; }
16098 EOF
16099 if { (eval echo configure:16100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16100   rm -rf conftest*
16101   ac_cv_type_signal=void
16102 else
16103   echo "configure: failed program was:" >&5
16104   cat conftest.$ac_ext >&5
16105   rm -rf conftest*
16106   ac_cv_type_signal=int
16107 fi
16108 rm -f conftest*
16109 fi
16110
16111 echo "$ac_t""$ac_cv_type_signal" 1>&6
16112 cat >> confdefs.h <<EOF
16113 #define RETSIGTYPE $ac_cv_type_signal
16114 EOF
16115
16116
16117 echo $ac_n "checking for size_t""... $ac_c" 1>&6
16118 echo "configure:16119: checking for size_t" >&5
16119 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
16120   echo $ac_n "(cached) $ac_c" 1>&6
16121 else
16122   cat > conftest.$ac_ext <<EOF
16123 #line 16124 "configure"
16124 #include "confdefs.h"
16125 #include <sys/types.h>
16126 #if STDC_HEADERS
16127 #include <stdlib.h>
16128 #include <stddef.h>
16129 #endif
16130
16131 EOF
16132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16133   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16134   rm -rf conftest*
16135   eval "ac_cv_type_size_t=yes"
16136 else
16137   rm -rf conftest*
16138   eval "ac_cv_type_size_t=no"
16139 fi
16140 rm -f conftest*
16141
16142 fi
16143 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
16144   echo "$ac_t""yes" 1>&6
16145 else
16146   echo "$ac_t""no" 1>&6
16147   cat >> confdefs.h <<EOF
16148 #define size_t unsigned
16149 EOF
16150
16151 fi
16152
16153
16154 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
16155 echo "configure:16156: checking for ssize_t" >&5
16156 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
16157   echo $ac_n "(cached) $ac_c" 1>&6
16158 else
16159   cat > conftest.$ac_ext <<EOF
16160 #line 16161 "configure"
16161 #include "confdefs.h"
16162 #include <sys/types.h>
16163 #if STDC_HEADERS
16164 #include <stdlib.h>
16165 #include <stddef.h>
16166 #endif
16167
16168 EOF
16169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16170   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16171   rm -rf conftest*
16172   eval "ac_cv_type_ssize_t=yes"
16173 else
16174   rm -rf conftest*
16175   eval "ac_cv_type_ssize_t=no"
16176 fi
16177 rm -f conftest*
16178
16179 fi
16180 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
16181   echo "$ac_t""yes" 1>&6
16182 else
16183   echo "$ac_t""no" 1>&6
16184   cat >> confdefs.h <<EOF
16185 #define ssize_t signed int
16186 EOF
16187
16188 fi
16189
16190 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
16191 echo "configure:16192: checking for caddr_t" >&5
16192 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
16193   echo $ac_n "(cached) $ac_c" 1>&6
16194 else
16195   cat > conftest.$ac_ext <<EOF
16196 #line 16197 "configure"
16197 #include "confdefs.h"
16198 #include <sys/types.h>
16199 #if STDC_HEADERS
16200 #include <stdlib.h>
16201 #include <stddef.h>
16202 #endif
16203
16204 EOF
16205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16206   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16207   rm -rf conftest*
16208   eval "ac_cv_type_caddr_t=yes"
16209 else
16210   rm -rf conftest*
16211   eval "ac_cv_type_caddr_t=no"
16212 fi
16213 rm -f conftest*
16214
16215 fi
16216 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
16217   echo "$ac_t""yes" 1>&6
16218 else
16219   echo "$ac_t""no" 1>&6
16220   cat >> confdefs.h <<EOF
16221 #define caddr_t char *
16222 EOF
16223
16224 fi
16225
16226
16227 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
16228 echo "configure:16229: checking for socklen_t" >&5
16229 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
16230   echo $ac_n "(cached) $ac_c" 1>&6
16231 else
16232   cat > conftest.$ac_ext <<EOF
16233 #line 16234 "configure"
16234 #include "confdefs.h"
16235
16236 #ifdef HAVE_SYS_TYPES_H
16237 #include <sys/types.h>
16238 #endif
16239 #ifdef HAVE_SYS_SOCKET_H
16240 #include <sys/socket.h>
16241 #endif
16242
16243 int main() {
16244 socklen_t len;
16245 ; return 0; }
16246 EOF
16247 if { (eval echo configure:16248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16248   rm -rf conftest*
16249   ol_cv_type_socklen_t=yes
16250 else
16251   echo "configure: failed program was:" >&5
16252   cat conftest.$ac_ext >&5
16253   rm -rf conftest*
16254   ol_cv_type_socklen_t=no
16255 fi
16256 rm -f conftest*
16257 fi
16258
16259 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
16260   if test $ol_cv_type_socklen_t = no; then
16261     cat >> confdefs.h <<\EOF
16262 #define socklen_t int
16263 EOF
16264
16265   fi
16266  
16267 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
16268 echo "configure:16269: checking for member st_blksize in aggregate type struct stat" >&5
16269 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
16270   echo $ac_n "(cached) $ac_c" 1>&6
16271 else
16272   cat > conftest.$ac_ext <<EOF
16273 #line 16274 "configure"
16274 #include "confdefs.h"
16275 #include <sys/types.h>
16276 #include <sys/stat.h>
16277 int main() {
16278 struct stat foo; foo.st_blksize;
16279 ; return 0; }
16280 EOF
16281 if { (eval echo configure:16282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16282   rm -rf conftest*
16283   ac_cv_c_struct_member_st_blksize=yes
16284 else
16285   echo "configure: failed program was:" >&5
16286   cat conftest.$ac_ext >&5
16287   rm -rf conftest*
16288   ac_cv_c_struct_member_st_blksize=no
16289 fi
16290 rm -f conftest*
16291 fi
16292
16293 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
16294 st_blksize="$ac_cv_c_struct_member_st_blksize"
16295 if test $ac_cv_c_struct_member_st_blksize = yes; then
16296   cat >> confdefs.h <<\EOF
16297 #define HAVE_ST_BLKSIZE 1
16298 EOF
16299
16300 fi
16301
16302 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
16303 echo "configure:16304: checking whether time.h and sys/time.h may both be included" >&5
16304 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
16305   echo $ac_n "(cached) $ac_c" 1>&6
16306 else
16307   cat > conftest.$ac_ext <<EOF
16308 #line 16309 "configure"
16309 #include "confdefs.h"
16310 #include <sys/types.h>
16311 #include <sys/time.h>
16312 #include <time.h>
16313 int main() {
16314 struct tm *tp;
16315 ; return 0; }
16316 EOF
16317 if { (eval echo configure:16318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16318   rm -rf conftest*
16319   ac_cv_header_time=yes
16320 else
16321   echo "configure: failed program was:" >&5
16322   cat conftest.$ac_ext >&5
16323   rm -rf conftest*
16324   ac_cv_header_time=no
16325 fi
16326 rm -f conftest*
16327 fi
16328
16329 echo "$ac_t""$ac_cv_header_time" 1>&6
16330 if test $ac_cv_header_time = yes; then
16331   cat >> confdefs.h <<\EOF
16332 #define TIME_WITH_SYS_TIME 1
16333 EOF
16334
16335 fi
16336
16337 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
16338 echo "configure:16339: checking whether struct tm is in sys/time.h or time.h" >&5
16339 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
16340   echo $ac_n "(cached) $ac_c" 1>&6
16341 else
16342   cat > conftest.$ac_ext <<EOF
16343 #line 16344 "configure"
16344 #include "confdefs.h"
16345 #include <sys/types.h>
16346 #include <time.h>
16347 int main() {
16348 struct tm *tp; tp->tm_sec;
16349 ; return 0; }
16350 EOF
16351 if { (eval echo configure:16352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16352   rm -rf conftest*
16353   ac_cv_struct_tm=time.h
16354 else
16355   echo "configure: failed program was:" >&5
16356   cat conftest.$ac_ext >&5
16357   rm -rf conftest*
16358   ac_cv_struct_tm=sys/time.h
16359 fi
16360 rm -f conftest*
16361 fi
16362
16363 echo "$ac_t""$ac_cv_struct_tm" 1>&6
16364 if test $ac_cv_struct_tm = sys/time.h; then
16365   cat >> confdefs.h <<\EOF
16366 #define TM_IN_SYS_TIME 1
16367 EOF
16368
16369 fi
16370
16371 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
16372 echo "configure:16373: checking for uid_t in sys/types.h" >&5
16373 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
16374   echo $ac_n "(cached) $ac_c" 1>&6
16375 else
16376   cat > conftest.$ac_ext <<EOF
16377 #line 16378 "configure"
16378 #include "confdefs.h"
16379 #include <sys/types.h>
16380 EOF
16381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16382   egrep "uid_t" >/dev/null 2>&1; then
16383   rm -rf conftest*
16384   ac_cv_type_uid_t=yes
16385 else
16386   rm -rf conftest*
16387   ac_cv_type_uid_t=no
16388 fi
16389 rm -f conftest*
16390
16391 fi
16392
16393 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
16394 if test $ac_cv_type_uid_t = no; then
16395   cat >> confdefs.h <<\EOF
16396 #define uid_t int
16397 EOF
16398
16399   cat >> confdefs.h <<\EOF
16400 #define gid_t int
16401 EOF
16402
16403 fi
16404
16405 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
16406 echo "configure:16407: checking for sig_atomic_t" >&5
16407 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
16408   echo $ac_n "(cached) $ac_c" 1>&6
16409 else
16410   cat > conftest.$ac_ext <<EOF
16411 #line 16412 "configure"
16412 #include "confdefs.h"
16413 #include <signal.h>
16414 int main() {
16415 sig_atomic_t atomic;
16416 ; return 0; }
16417 EOF
16418 if { (eval echo configure:16419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16419   rm -rf conftest*
16420   ol_cv_type_sig_atomic_t=yes
16421 else
16422   echo "configure: failed program was:" >&5
16423   cat conftest.$ac_ext >&5
16424   rm -rf conftest*
16425   ol_cv_type_sig_atomic_t=no
16426 fi
16427 rm -f conftest*
16428 fi
16429
16430 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
16431   if test $ol_cv_type_sig_atomic_t = no; then
16432     cat >> confdefs.h <<\EOF
16433 #define sig_atomic_t int
16434 EOF
16435
16436   fi
16437  
16438
16439
16440 # test for pw_gecos in struct passwd
16441 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
16442 echo "configure:16443: checking struct passwd for pw_gecos" >&5
16443 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
16444   echo $ac_n "(cached) $ac_c" 1>&6
16445 else
16446   
16447         cat > conftest.$ac_ext <<EOF
16448 #line 16449 "configure"
16449 #include "confdefs.h"
16450 #include <pwd.h>
16451 int main() {
16452
16453         struct passwd pwd;
16454         pwd.pw_gecos = pwd.pw_name;
16455
16456 ; return 0; }
16457 EOF
16458 if { (eval echo configure:16459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16459   rm -rf conftest*
16460   ol_cv_struct_passwd_pw_gecos=yes
16461 else
16462   echo "configure: failed program was:" >&5
16463   cat conftest.$ac_ext >&5
16464   rm -rf conftest*
16465   ol_cv_struct_passwd_pw_gecos=no
16466 fi
16467 rm -f conftest*
16468 fi
16469
16470 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
16471 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
16472         cat >> confdefs.h <<\EOF
16473 #define HAVE_PW_GECOS 1
16474 EOF
16475
16476 fi
16477
16478 # test for pw_passwd in struct passwd
16479 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
16480 echo "configure:16481: checking struct passwd for pw_passwd" >&5
16481 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
16482   echo $ac_n "(cached) $ac_c" 1>&6
16483 else
16484   
16485         cat > conftest.$ac_ext <<EOF
16486 #line 16487 "configure"
16487 #include "confdefs.h"
16488 #include <pwd.h>
16489 int main() {
16490
16491         struct passwd pwd;
16492         pwd.pw_passwd = pwd.pw_name;
16493
16494 ; return 0; }
16495 EOF
16496 if { (eval echo configure:16497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16497   rm -rf conftest*
16498   ol_cv_struct_passwd_pw_passwd=yes
16499 else
16500   echo "configure: failed program was:" >&5
16501   cat conftest.$ac_ext >&5
16502   rm -rf conftest*
16503   ol_cv_struct_passwd_pw_passwd=no
16504 fi
16505 rm -f conftest*
16506 fi
16507
16508 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
16509 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
16510         cat >> confdefs.h <<\EOF
16511 #define HAVE_PW_PASSWD 1
16512 EOF
16513
16514 fi
16515
16516
16517 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
16518 echo "configure:16519: checking if toupper() requires islower()" >&5
16519 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
16520   echo $ac_n "(cached) $ac_c" 1>&6
16521 else
16522   
16523         if test "$cross_compiling" = yes; then
16524   ol_cv_c_upper_lower=safe
16525 else
16526   cat > conftest.$ac_ext <<EOF
16527 #line 16528 "configure"
16528 #include "confdefs.h"
16529
16530 #include <ctype.h>
16531 main()
16532 {
16533         if ('C' == toupper('C'))
16534                 exit(0);
16535         else
16536                 exit(1);
16537 }
16538 EOF
16539 if { (eval echo configure:16540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16540 then
16541   ol_cv_c_upper_lower=no
16542 else
16543   echo "configure: failed program was:" >&5
16544   cat conftest.$ac_ext >&5
16545   rm -fr conftest*
16546   ol_cv_c_upper_lower=yes
16547 fi
16548 rm -fr conftest*
16549 fi
16550
16551 fi
16552
16553 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
16554 if test $ol_cv_c_upper_lower != no ; then
16555         cat >> confdefs.h <<\EOF
16556 #define C_UPPER_LOWER 1
16557 EOF
16558
16559 fi
16560
16561 echo $ac_n "checking for working const""... $ac_c" 1>&6
16562 echo "configure:16563: checking for working const" >&5
16563 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
16564   echo $ac_n "(cached) $ac_c" 1>&6
16565 else
16566   cat > conftest.$ac_ext <<EOF
16567 #line 16568 "configure"
16568 #include "confdefs.h"
16569
16570 int main() {
16571
16572 /* Ultrix mips cc rejects this.  */
16573 typedef int charset[2]; const charset x;
16574 /* SunOS 4.1.1 cc rejects this.  */
16575 char const *const *ccp;
16576 char **p;
16577 /* NEC SVR4.0.2 mips cc rejects this.  */
16578 struct point {int x, y;};
16579 static struct point const zero = {0,0};
16580 /* AIX XL C 1.02.0.0 rejects this.
16581    It does not let you subtract one const X* pointer from another in an arm
16582    of an if-expression whose if-part is not a constant expression */
16583 const char *g = "string";
16584 ccp = &g + (g ? g-g : 0);
16585 /* HPUX 7.0 cc rejects these. */
16586 ++ccp;
16587 p = (char**) ccp;
16588 ccp = (char const *const *) p;
16589 { /* SCO 3.2v4 cc rejects this.  */
16590   char *t;
16591   char const *s = 0 ? (char *) 0 : (char const *) 0;
16592
16593   *t++ = 0;
16594 }
16595 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16596   int x[] = {25, 17};
16597   const int *foo = &x[0];
16598   ++foo;
16599 }
16600 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16601   typedef const int *iptr;
16602   iptr p = 0;
16603   ++p;
16604 }
16605 { /* AIX XL C 1.02.0.0 rejects this saying
16606      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16607   struct s { int j; const int *ap[3]; };
16608   struct s *b; b->j = 5;
16609 }
16610 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16611   const int foo = 10;
16612 }
16613
16614 ; return 0; }
16615 EOF
16616 if { (eval echo configure:16617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16617   rm -rf conftest*
16618   ac_cv_c_const=yes
16619 else
16620   echo "configure: failed program was:" >&5
16621   cat conftest.$ac_ext >&5
16622   rm -rf conftest*
16623   ac_cv_c_const=no
16624 fi
16625 rm -f conftest*
16626 fi
16627
16628 echo "$ac_t""$ac_cv_c_const" 1>&6
16629 if test $ac_cv_c_const = no; then
16630   cat >> confdefs.h <<\EOF
16631 #define const 
16632 EOF
16633
16634 fi
16635
16636 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
16637 echo "configure:16638: checking if compiler understands volatile" >&5
16638 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
16639   echo $ac_n "(cached) $ac_c" 1>&6
16640 else
16641   cat > conftest.$ac_ext <<EOF
16642 #line 16643 "configure"
16643 #include "confdefs.h"
16644 int x, y, z;
16645 int main() {
16646 volatile int a; int * volatile b = x ? &y : &z;
16647       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
16648       *b = 0;
16649 ; return 0; }
16650 EOF
16651 if { (eval echo configure:16652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16652   rm -rf conftest*
16653   ol_cv_c_volatile=yes
16654 else
16655   echo "configure: failed program was:" >&5
16656   cat conftest.$ac_ext >&5
16657   rm -rf conftest*
16658   ol_cv_c_volatile=no
16659 fi
16660 rm -f conftest*
16661 fi
16662
16663 echo "$ac_t""$ol_cv_c_volatile" 1>&6
16664   if test $ol_cv_c_volatile = yes; then
16665     : 
16666   else
16667     cat >> confdefs.h <<\EOF
16668 #define volatile 
16669 EOF
16670
16671   fi
16672  
16673
16674 if test $cross_compiling = yes ; then
16675         cat >> confdefs.h <<\EOF
16676 #define CROSS_COMPILING 1
16677 EOF
16678
16679 else
16680         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
16681 echo "configure:16682: checking whether byte ordering is bigendian" >&5
16682 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
16683   echo $ac_n "(cached) $ac_c" 1>&6
16684 else
16685   ac_cv_c_bigendian=unknown
16686 # See if sys/param.h defines the BYTE_ORDER macro.
16687 cat > conftest.$ac_ext <<EOF
16688 #line 16689 "configure"
16689 #include "confdefs.h"
16690 #include <sys/types.h>
16691 #include <sys/param.h>
16692 int main() {
16693
16694 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16695  bogus endian macros
16696 #endif
16697 ; return 0; }
16698 EOF
16699 if { (eval echo configure:16700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16700   rm -rf conftest*
16701   # It does; now see whether it defined to BIG_ENDIAN or not.
16702 cat > conftest.$ac_ext <<EOF
16703 #line 16704 "configure"
16704 #include "confdefs.h"
16705 #include <sys/types.h>
16706 #include <sys/param.h>
16707 int main() {
16708
16709 #if BYTE_ORDER != BIG_ENDIAN
16710  not big endian
16711 #endif
16712 ; return 0; }
16713 EOF
16714 if { (eval echo configure:16715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16715   rm -rf conftest*
16716   ac_cv_c_bigendian=yes
16717 else
16718   echo "configure: failed program was:" >&5
16719   cat conftest.$ac_ext >&5
16720   rm -rf conftest*
16721   ac_cv_c_bigendian=no
16722 fi
16723 rm -f conftest*
16724 else
16725   echo "configure: failed program was:" >&5
16726   cat conftest.$ac_ext >&5
16727 fi
16728 rm -f conftest*
16729 if test $ac_cv_c_bigendian = unknown; then
16730 if test "$cross_compiling" = yes; then
16731     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
16732 else
16733   cat > conftest.$ac_ext <<EOF
16734 #line 16735 "configure"
16735 #include "confdefs.h"
16736 main () {
16737   /* Are we little or big endian?  From Harbison&Steele.  */
16738   union
16739   {
16740     long l;
16741     char c[sizeof (long)];
16742   } u;
16743   u.l = 1;
16744   exit (u.c[sizeof (long) - 1] == 1);
16745 }
16746 EOF
16747 if { (eval echo configure:16748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16748 then
16749   ac_cv_c_bigendian=no
16750 else
16751   echo "configure: failed program was:" >&5
16752   cat conftest.$ac_ext >&5
16753   rm -fr conftest*
16754   ac_cv_c_bigendian=yes
16755 fi
16756 rm -fr conftest*
16757 fi
16758
16759 fi
16760 fi
16761
16762 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
16763 if test $ac_cv_c_bigendian = yes; then
16764   cat >> confdefs.h <<\EOF
16765 #define WORDS_BIGENDIAN 1
16766 EOF
16767
16768 fi
16769
16770 fi
16771
16772 echo $ac_n "checking size of short""... $ac_c" 1>&6
16773 echo "configure:16774: checking size of short" >&5 
16774 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
16775   echo $ac_n "(cached) $ac_c" 1>&6
16776 else
16777   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16778   cat > conftest.$ac_ext <<EOF
16779 #line 16780 "configure"
16780 #include "confdefs.h"
16781 #include "confdefs.h" 
16782 #include <sys/types.h> 
16783  
16784
16785 int main() {
16786 switch (0) case 0: case (sizeof (short) == $ac_size):;
16787 ; return 0; }
16788 EOF
16789 if { (eval echo configure:16790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16790   rm -rf conftest*
16791   ac_cv_sizeof_short=$ac_size
16792 else
16793   echo "configure: failed program was:" >&5
16794   cat conftest.$ac_ext >&5
16795 fi
16796 rm -f conftest* 
16797   if test x$ac_cv_sizeof_short != x ; then break; fi 
16798 done 
16799
16800 fi
16801  
16802 if test x$ac_cv_sizeof_short = x ; then 
16803   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
16804 fi 
16805 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
16806 cat >> confdefs.h <<EOF
16807 #define SIZEOF_SHORT $ac_cv_sizeof_short
16808 EOF
16809  
16810  
16811 echo $ac_n "checking size of int""... $ac_c" 1>&6
16812 echo "configure:16813: checking size of int" >&5 
16813 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
16814   echo $ac_n "(cached) $ac_c" 1>&6
16815 else
16816   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16817   cat > conftest.$ac_ext <<EOF
16818 #line 16819 "configure"
16819 #include "confdefs.h"
16820 #include "confdefs.h" 
16821 #include <sys/types.h> 
16822  
16823
16824 int main() {
16825 switch (0) case 0: case (sizeof (int) == $ac_size):;
16826 ; return 0; }
16827 EOF
16828 if { (eval echo configure:16829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16829   rm -rf conftest*
16830   ac_cv_sizeof_int=$ac_size
16831 else
16832   echo "configure: failed program was:" >&5
16833   cat conftest.$ac_ext >&5
16834 fi
16835 rm -f conftest* 
16836   if test x$ac_cv_sizeof_int != x ; then break; fi 
16837 done 
16838
16839 fi
16840  
16841 if test x$ac_cv_sizeof_int = x ; then 
16842   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
16843 fi 
16844 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
16845 cat >> confdefs.h <<EOF
16846 #define SIZEOF_INT $ac_cv_sizeof_int
16847 EOF
16848  
16849  
16850 echo $ac_n "checking size of long""... $ac_c" 1>&6
16851 echo "configure:16852: checking size of long" >&5 
16852 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
16853   echo $ac_n "(cached) $ac_c" 1>&6
16854 else
16855   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16856   cat > conftest.$ac_ext <<EOF
16857 #line 16858 "configure"
16858 #include "confdefs.h"
16859 #include "confdefs.h" 
16860 #include <sys/types.h> 
16861  
16862
16863 int main() {
16864 switch (0) case 0: case (sizeof (long) == $ac_size):;
16865 ; return 0; }
16866 EOF
16867 if { (eval echo configure:16868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16868   rm -rf conftest*
16869   ac_cv_sizeof_long=$ac_size
16870 else
16871   echo "configure: failed program was:" >&5
16872   cat conftest.$ac_ext >&5
16873 fi
16874 rm -f conftest* 
16875   if test x$ac_cv_sizeof_long != x ; then break; fi 
16876 done 
16877
16878 fi
16879  
16880 if test x$ac_cv_sizeof_long = x ; then 
16881   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
16882 fi 
16883 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
16884 cat >> confdefs.h <<EOF
16885 #define SIZEOF_LONG $ac_cv_sizeof_long
16886 EOF
16887  
16888
16889
16890 if test "$ac_cv_sizeof_int" -lt 4 ; then
16891         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
16892
16893         cat >> confdefs.h <<\EOF
16894 #define LBER_INT_T long
16895 EOF
16896
16897 else
16898         cat >> confdefs.h <<\EOF
16899 #define LBER_INT_T int
16900 EOF
16901
16902 fi
16903
16904 cat >> confdefs.h <<\EOF
16905 #define LBER_LEN_T long
16906 EOF
16907
16908 cat >> confdefs.h <<\EOF
16909 #define LBER_SOCKET_T int
16910 EOF
16911
16912 cat >> confdefs.h <<\EOF
16913 #define LBER_TAG_T long
16914 EOF
16915
16916
16917 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
16918 echo "configure:16919: checking for 8-bit clean memcmp" >&5
16919 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
16920   echo $ac_n "(cached) $ac_c" 1>&6
16921 else
16922   if test "$cross_compiling" = yes; then
16923   ac_cv_func_memcmp_clean=no
16924 else
16925   cat > conftest.$ac_ext <<EOF
16926 #line 16927 "configure"
16927 #include "confdefs.h"
16928
16929 main()
16930 {
16931   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
16932   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
16933 }
16934
16935 EOF
16936 if { (eval echo configure:16937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16937 then
16938   ac_cv_func_memcmp_clean=yes
16939 else
16940   echo "configure: failed program was:" >&5
16941   cat conftest.$ac_ext >&5
16942   rm -fr conftest*
16943   ac_cv_func_memcmp_clean=no
16944 fi
16945 rm -fr conftest*
16946 fi
16947
16948 fi
16949
16950 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
16951 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
16952
16953 echo $ac_n "checking for strftime""... $ac_c" 1>&6
16954 echo "configure:16955: checking for strftime" >&5
16955 if eval "test \"\${ac_cv_func_strftime+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 strftime(); 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 strftime();
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_strftime) || defined (__stub___strftime)
16976 choke me
16977 #else
16978 f = strftime;
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_strftime=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_strftime=no"
16991 fi
16992 rm -f conftest*
16993 fi
16994
16995 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
16996   echo "$ac_t""yes" 1>&6
16997   cat >> confdefs.h <<\EOF
16998 #define HAVE_STRFTIME 1
16999 EOF
17000
17001 else
17002   echo "$ac_t""no" 1>&6
17003 # strftime is in -lintl on SCO UNIX.
17004 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
17005 echo "configure:17006: checking for strftime in -lintl" >&5
17006 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
17007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
17008   echo $ac_n "(cached) $ac_c" 1>&6
17009 else
17010   ac_save_LIBS="$LIBS"
17011 LIBS="-lintl  $LIBS"
17012 cat > conftest.$ac_ext <<EOF
17013 #line 17014 "configure"
17014 #include "confdefs.h"
17015 /* Override any gcc2 internal prototype to avoid an error.  */
17016 /* We use char because int might match the return type of a gcc2
17017     builtin and then its argument prototype would still apply.  */
17018 char strftime();
17019
17020 int main() {
17021 strftime()
17022 ; return 0; }
17023 EOF
17024 if { (eval echo configure:17025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17025   rm -rf conftest*
17026   eval "ac_cv_lib_$ac_lib_var=yes"
17027 else
17028   echo "configure: failed program was:" >&5
17029   cat conftest.$ac_ext >&5
17030   rm -rf conftest*
17031   eval "ac_cv_lib_$ac_lib_var=no"
17032 fi
17033 rm -f conftest*
17034 LIBS="$ac_save_LIBS"
17035
17036 fi
17037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
17038   echo "$ac_t""yes" 1>&6
17039   cat >> confdefs.h <<\EOF
17040 #define HAVE_STRFTIME 1
17041 EOF
17042
17043 LIBS="-lintl $LIBS"
17044 else
17045   echo "$ac_t""no" 1>&6
17046 fi
17047
17048 fi
17049
17050
17051 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
17052 echo "configure:17053: checking for inet_aton()" >&5
17053 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
17054   echo $ac_n "(cached) $ac_c" 1>&6
17055 else
17056   cat > conftest.$ac_ext <<EOF
17057 #line 17058 "configure"
17058 #include "confdefs.h"
17059
17060 #ifdef HAVE_SYS_TYPES_H
17061 #       include <sys/types.h>
17062 #endif
17063 #ifdef HAVE_SYS_SOCKET_H
17064 #       include <sys/socket.h>
17065 #       ifdef HAVE_SYS_SELECT_H
17066 #               include <sys/select.h>
17067 #       endif
17068 #       include <netinet/in.h>
17069 #       ifdef HAVE_ARPA_INET_H
17070 #               include <arpa/inet.h>
17071 #       endif
17072 #endif
17073
17074 int main() {
17075 struct in_addr in;
17076 int rc = inet_aton( "255.255.255.255", &in );
17077 ; return 0; }
17078 EOF
17079 if { (eval echo configure:17080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17080   rm -rf conftest*
17081   ol_cv_func_inet_aton=yes
17082 else
17083   echo "configure: failed program was:" >&5
17084   cat conftest.$ac_ext >&5
17085   rm -rf conftest*
17086   ol_cv_func_inet_aton=no
17087 fi
17088 rm -f conftest*
17089 fi
17090
17091 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
17092   if test $ol_cv_func_inet_aton != no; then
17093     cat >> confdefs.h <<\EOF
17094 #define HAVE_INET_ATON 1
17095 EOF
17096
17097   fi
17098  
17099
17100 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
17101 echo "configure:17102: checking for _spawnlp" >&5
17102 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
17103   echo $ac_n "(cached) $ac_c" 1>&6
17104 else
17105   cat > conftest.$ac_ext <<EOF
17106 #line 17107 "configure"
17107 #include "confdefs.h"
17108 /* System header to define __stub macros and hopefully few prototypes,
17109     which can conflict with char _spawnlp(); below.  */
17110 #include <assert.h>
17111 /* Override any gcc2 internal prototype to avoid an error.  */
17112 /* We use char because int might match the return type of a gcc2
17113     builtin and then its argument prototype would still apply.  */
17114 char _spawnlp();
17115 char (*f)();
17116
17117 int main() {
17118
17119 /* The GNU C library defines this for functions which it implements
17120     to always fail with ENOSYS.  Some functions are actually named
17121     something starting with __ and the normal name is an alias.  */
17122 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
17123 choke me
17124 #else
17125 f = _spawnlp;
17126 #endif
17127
17128 ; return 0; }
17129 EOF
17130 if { (eval echo configure:17131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17131   rm -rf conftest*
17132   eval "ac_cv_func__spawnlp=yes"
17133 else
17134   echo "configure: failed program was:" >&5
17135   cat conftest.$ac_ext >&5
17136   rm -rf conftest*
17137   eval "ac_cv_func__spawnlp=no"
17138 fi
17139 rm -f conftest*
17140 fi
17141
17142 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
17143   echo "$ac_t""yes" 1>&6
17144   cat >> confdefs.h <<\EOF
17145 #define HAVE_SPAWNLP 1
17146 EOF
17147
17148 else
17149   echo "$ac_t""no" 1>&6
17150 fi
17151
17152
17153 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
17154 echo "configure:17155: checking for _snprintf" >&5
17155 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
17156   echo $ac_n "(cached) $ac_c" 1>&6
17157 else
17158   cat > conftest.$ac_ext <<EOF
17159 #line 17160 "configure"
17160 #include "confdefs.h"
17161 /* System header to define __stub macros and hopefully few prototypes,
17162     which can conflict with char _snprintf(); below.  */
17163 #include <assert.h>
17164 /* Override any gcc2 internal prototype to avoid an error.  */
17165 /* We use char because int might match the return type of a gcc2
17166     builtin and then its argument prototype would still apply.  */
17167 char _snprintf();
17168 char (*f)();
17169
17170 int main() {
17171
17172 /* The GNU C library defines this for functions which it implements
17173     to always fail with ENOSYS.  Some functions are actually named
17174     something starting with __ and the normal name is an alias.  */
17175 #if defined (__stub__snprintf) || defined (__stub____snprintf)
17176 choke me
17177 #else
17178 f = _snprintf;
17179 #endif
17180
17181 ; return 0; }
17182 EOF
17183 if { (eval echo configure:17184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17184   rm -rf conftest*
17185   eval "ac_cv_func__snprintf=yes"
17186 else
17187   echo "configure: failed program was:" >&5
17188   cat conftest.$ac_ext >&5
17189   rm -rf conftest*
17190   eval "ac_cv_func__snprintf=no"
17191 fi
17192 rm -f conftest*
17193 fi
17194
17195 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
17196   echo "$ac_t""yes" 1>&6
17197   ac_cv_func_snprintf=yes
17198         cat >> confdefs.h <<\EOF
17199 #define snprintf _snprintf
17200 EOF
17201
17202
17203 else
17204   echo "$ac_t""no" 1>&6
17205 fi
17206
17207
17208 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
17209 echo "configure:17210: checking for _vsnprintf" >&5
17210 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
17211   echo $ac_n "(cached) $ac_c" 1>&6
17212 else
17213   cat > conftest.$ac_ext <<EOF
17214 #line 17215 "configure"
17215 #include "confdefs.h"
17216 /* System header to define __stub macros and hopefully few prototypes,
17217     which can conflict with char _vsnprintf(); below.  */
17218 #include <assert.h>
17219 /* Override any gcc2 internal prototype to avoid an error.  */
17220 /* We use char because int might match the return type of a gcc2
17221     builtin and then its argument prototype would still apply.  */
17222 char _vsnprintf();
17223 char (*f)();
17224
17225 int main() {
17226
17227 /* The GNU C library defines this for functions which it implements
17228     to always fail with ENOSYS.  Some functions are actually named
17229     something starting with __ and the normal name is an alias.  */
17230 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
17231 choke me
17232 #else
17233 f = _vsnprintf;
17234 #endif
17235
17236 ; return 0; }
17237 EOF
17238 if { (eval echo configure:17239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17239   rm -rf conftest*
17240   eval "ac_cv_func__vsnprintf=yes"
17241 else
17242   echo "configure: failed program was:" >&5
17243   cat conftest.$ac_ext >&5
17244   rm -rf conftest*
17245   eval "ac_cv_func__vsnprintf=no"
17246 fi
17247 rm -f conftest*
17248 fi
17249
17250 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
17251   echo "$ac_t""yes" 1>&6
17252   ac_cv_func_vsnprintf=yes
17253         cat >> confdefs.h <<\EOF
17254 #define vsnprintf _vsnprintf
17255 EOF
17256
17257
17258 else
17259   echo "$ac_t""no" 1>&6
17260 fi
17261
17262
17263 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
17264 echo "configure:17265: checking for vprintf" >&5
17265 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
17266   echo $ac_n "(cached) $ac_c" 1>&6
17267 else
17268   cat > conftest.$ac_ext <<EOF
17269 #line 17270 "configure"
17270 #include "confdefs.h"
17271 /* System header to define __stub macros and hopefully few prototypes,
17272     which can conflict with char vprintf(); below.  */
17273 #include <assert.h>
17274 /* Override any gcc2 internal prototype to avoid an error.  */
17275 /* We use char because int might match the return type of a gcc2
17276     builtin and then its argument prototype would still apply.  */
17277 char vprintf();
17278 char (*f)();
17279
17280 int main() {
17281
17282 /* The GNU C library defines this for functions which it implements
17283     to always fail with ENOSYS.  Some functions are actually named
17284     something starting with __ and the normal name is an alias.  */
17285 #if defined (__stub_vprintf) || defined (__stub___vprintf)
17286 choke me
17287 #else
17288 f = vprintf;
17289 #endif
17290
17291 ; return 0; }
17292 EOF
17293 if { (eval echo configure:17294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17294   rm -rf conftest*
17295   eval "ac_cv_func_vprintf=yes"
17296 else
17297   echo "configure: failed program was:" >&5
17298   cat conftest.$ac_ext >&5
17299   rm -rf conftest*
17300   eval "ac_cv_func_vprintf=no"
17301 fi
17302 rm -f conftest*
17303 fi
17304
17305 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
17306   echo "$ac_t""yes" 1>&6
17307   cat >> confdefs.h <<\EOF
17308 #define HAVE_VPRINTF 1
17309 EOF
17310
17311 else
17312   echo "$ac_t""no" 1>&6
17313 fi
17314
17315 if test "$ac_cv_func_vprintf" != yes; then
17316 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
17317 echo "configure:17318: checking for _doprnt" >&5
17318 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
17319   echo $ac_n "(cached) $ac_c" 1>&6
17320 else
17321   cat > conftest.$ac_ext <<EOF
17322 #line 17323 "configure"
17323 #include "confdefs.h"
17324 /* System header to define __stub macros and hopefully few prototypes,
17325     which can conflict with char _doprnt(); below.  */
17326 #include <assert.h>
17327 /* Override any gcc2 internal prototype to avoid an error.  */
17328 /* We use char because int might match the return type of a gcc2
17329     builtin and then its argument prototype would still apply.  */
17330 char _doprnt();
17331 char (*f)();
17332
17333 int main() {
17334
17335 /* The GNU C library defines this for functions which it implements
17336     to always fail with ENOSYS.  Some functions are actually named
17337     something starting with __ and the normal name is an alias.  */
17338 #if defined (__stub__doprnt) || defined (__stub____doprnt)
17339 choke me
17340 #else
17341 f = _doprnt;
17342 #endif
17343
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   eval "ac_cv_func__doprnt=yes"
17349 else
17350   echo "configure: failed program was:" >&5
17351   cat conftest.$ac_ext >&5
17352   rm -rf conftest*
17353   eval "ac_cv_func__doprnt=no"
17354 fi
17355 rm -f conftest*
17356 fi
17357
17358 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
17359   echo "$ac_t""yes" 1>&6
17360   cat >> confdefs.h <<\EOF
17361 #define HAVE_DOPRNT 1
17362 EOF
17363
17364 else
17365   echo "$ac_t""no" 1>&6
17366 fi
17367
17368 fi
17369
17370
17371 if test $ac_cv_func_vprintf = yes ; then
17372                 for ac_func in vsnprintf vsprintf
17373 do
17374 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17375 echo "configure:17376: checking for $ac_func" >&5
17376 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17377   echo $ac_n "(cached) $ac_c" 1>&6
17378 else
17379   cat > conftest.$ac_ext <<EOF
17380 #line 17381 "configure"
17381 #include "confdefs.h"
17382 /* System header to define __stub macros and hopefully few prototypes,
17383     which can conflict with char $ac_func(); below.  */
17384 #include <assert.h>
17385 /* Override any gcc2 internal prototype to avoid an error.  */
17386 /* We use char because int might match the return type of a gcc2
17387     builtin and then its argument prototype would still apply.  */
17388 char $ac_func();
17389 char (*f)();
17390
17391 int main() {
17392
17393 /* The GNU C library defines this for functions which it implements
17394     to always fail with ENOSYS.  Some functions are actually named
17395     something starting with __ and the normal name is an alias.  */
17396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17397 choke me
17398 #else
17399 f = $ac_func;
17400 #endif
17401
17402 ; return 0; }
17403 EOF
17404 if { (eval echo configure:17405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17405   rm -rf conftest*
17406   eval "ac_cv_func_$ac_func=yes"
17407 else
17408   echo "configure: failed program was:" >&5
17409   cat conftest.$ac_ext >&5
17410   rm -rf conftest*
17411   eval "ac_cv_func_$ac_func=no"
17412 fi
17413 rm -f conftest*
17414 fi
17415
17416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17417   echo "$ac_t""yes" 1>&6
17418     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17419   cat >> confdefs.h <<EOF
17420 #define $ac_tr_func 1
17421 EOF
17422  
17423 else
17424   echo "$ac_t""no" 1>&6
17425 fi
17426 done
17427
17428 fi
17429
17430 for ac_func in \
17431         bcopy                   \
17432         closesocket             \
17433         chroot                  \
17434         endgrent                \
17435         endpwent                \
17436         fcntl                   \
17437         flock                   \
17438         getdtablesize   \
17439         getgrgid                \
17440         gethostname             \
17441         getpass                 \
17442         getpassphrase   \
17443         getpwuid                \
17444         getpwnam                \
17445         getspnam                \
17446         gettimeofday    \
17447         initgroups              \
17448         lockf                   \
17449         memcpy                  \
17450         memmove                 \
17451         pipe                    \
17452         read                    \
17453         recv                    \
17454         recvfrom                \
17455         setpwfile               \
17456         setgid                  \
17457         setegid                 \
17458         setsid                  \
17459         setuid                  \
17460         seteuid                 \
17461         sigaction               \
17462         signal                  \
17463         sigset                  \
17464         strdup                  \
17465         strerror                \
17466         strpbrk                 \
17467         strrchr                 \
17468         strsep                  \
17469         strstr                  \
17470         strtol                  \
17471         strtoul                 \
17472         strspn                  \
17473         sysconf                 \
17474         usleep                  \
17475         waitpid                 \
17476         wait4                   \
17477         write                   \
17478         send                    \
17479         sendto                  \
17480
17481 do
17482 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17483 echo "configure:17484: checking for $ac_func" >&5
17484 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17485   echo $ac_n "(cached) $ac_c" 1>&6
17486 else
17487   cat > conftest.$ac_ext <<EOF
17488 #line 17489 "configure"
17489 #include "confdefs.h"
17490 /* System header to define __stub macros and hopefully few prototypes,
17491     which can conflict with char $ac_func(); below.  */
17492 #include <assert.h>
17493 /* Override any gcc2 internal prototype to avoid an error.  */
17494 /* We use char because int might match the return type of a gcc2
17495     builtin and then its argument prototype would still apply.  */
17496 char $ac_func();
17497 char (*f)();
17498
17499 int main() {
17500
17501 /* The GNU C library defines this for functions which it implements
17502     to always fail with ENOSYS.  Some functions are actually named
17503     something starting with __ and the normal name is an alias.  */
17504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17505 choke me
17506 #else
17507 f = $ac_func;
17508 #endif
17509
17510 ; return 0; }
17511 EOF
17512 if { (eval echo configure:17513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17513   rm -rf conftest*
17514   eval "ac_cv_func_$ac_func=yes"
17515 else
17516   echo "configure: failed program was:" >&5
17517   cat conftest.$ac_ext >&5
17518   rm -rf conftest*
17519   eval "ac_cv_func_$ac_func=no"
17520 fi
17521 rm -f conftest*
17522 fi
17523
17524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17525   echo "$ac_t""yes" 1>&6
17526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17527   cat >> confdefs.h <<EOF
17528 #define $ac_tr_func 1
17529 EOF
17530  
17531 else
17532   echo "$ac_t""no" 1>&6
17533 fi
17534 done
17535
17536
17537 for ac_func in getopt
17538 do
17539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17540 echo "configure:17541: checking for $ac_func" >&5
17541 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17542   echo $ac_n "(cached) $ac_c" 1>&6
17543 else
17544   cat > conftest.$ac_ext <<EOF
17545 #line 17546 "configure"
17546 #include "confdefs.h"
17547 /* System header to define __stub macros and hopefully few prototypes,
17548     which can conflict with char $ac_func(); below.  */
17549 #include <assert.h>
17550 /* Override any gcc2 internal prototype to avoid an error.  */
17551 /* We use char because int might match the return type of a gcc2
17552     builtin and then its argument prototype would still apply.  */
17553 char $ac_func();
17554 char (*f)();
17555
17556 int main() {
17557
17558 /* The GNU C library defines this for functions which it implements
17559     to always fail with ENOSYS.  Some functions are actually named
17560     something starting with __ and the normal name is an alias.  */
17561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17562 choke me
17563 #else
17564 f = $ac_func;
17565 #endif
17566
17567 ; return 0; }
17568 EOF
17569 if { (eval echo configure:17570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17570   rm -rf conftest*
17571   eval "ac_cv_func_$ac_func=yes"
17572 else
17573   echo "configure: failed program was:" >&5
17574   cat conftest.$ac_ext >&5
17575   rm -rf conftest*
17576   eval "ac_cv_func_$ac_func=no"
17577 fi
17578 rm -f conftest*
17579 fi
17580
17581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17582   echo "$ac_t""yes" 1>&6
17583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17584   cat >> confdefs.h <<EOF
17585 #define $ac_tr_func 1
17586 EOF
17587  
17588 else
17589   echo "$ac_t""no" 1>&6
17590 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
17591 fi
17592 done
17593
17594
17595
17596 if test "$ac_cv_func_getopt" != yes; then
17597         LIBSRCS="$LIBSRCS getopt.c"
17598 fi
17599
17600 # Check Configuration
17601 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
17602 echo "configure:17603: checking declaration of sys_errlist" >&5
17603 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
17604   echo $ac_n "(cached) $ac_c" 1>&6
17605 else
17606   
17607         cat > conftest.$ac_ext <<EOF
17608 #line 17609 "configure"
17609 #include "confdefs.h"
17610
17611 #include <stdio.h>
17612 #include <sys/types.h>
17613 #include <errno.h>
17614 #ifdef WINNT
17615 #include <stdlib.h>
17616 #endif 
17617 int main() {
17618 char *c = (char *) *sys_errlist
17619 ; return 0; }
17620 EOF
17621 if { (eval echo configure:17622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17622   rm -rf conftest*
17623   ol_cv_dcl_sys_errlist=yes
17624         ol_cv_have_sys_errlist=yes
17625 else
17626   echo "configure: failed program was:" >&5
17627   cat conftest.$ac_ext >&5
17628   rm -rf conftest*
17629   ol_cv_dcl_sys_errlist=no
17630 fi
17631 rm -f conftest*
17632 fi
17633
17634 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
17635 #
17636 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
17637 if test $ol_cv_dcl_sys_errlist = no ; then
17638         cat >> confdefs.h <<\EOF
17639 #define DECL_SYS_ERRLIST 1
17640 EOF
17641
17642
17643         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
17644 echo "configure:17645: checking existence of sys_errlist" >&5
17645 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
17646   echo $ac_n "(cached) $ac_c" 1>&6
17647 else
17648   
17649                 cat > conftest.$ac_ext <<EOF
17650 #line 17651 "configure"
17651 #include "confdefs.h"
17652 #include <errno.h>
17653 int main() {
17654 char *c = (char *) *sys_errlist
17655 ; return 0; }
17656 EOF
17657 if { (eval echo configure:17658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17658   rm -rf conftest*
17659   ol_cv_have_sys_errlist=yes
17660 else
17661   echo "configure: failed program was:" >&5
17662   cat conftest.$ac_ext >&5
17663   rm -rf conftest*
17664   ol_cv_have_sys_errlist=no
17665 fi
17666 rm -f conftest*
17667 fi
17668
17669 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
17670 fi
17671 if test $ol_cv_have_sys_errlist = yes ; then
17672         cat >> confdefs.h <<\EOF
17673 #define HAVE_SYS_ERRLIST 1
17674 EOF
17675
17676 fi
17677
17678
17679
17680 if test "$ol_enable_debug" != no ; then
17681         cat >> confdefs.h <<\EOF
17682 #define LDAP_DEBUG 1
17683 EOF
17684
17685 fi
17686 if test "$ol_enable_syslog" = yes ; then
17687         cat >> confdefs.h <<\EOF
17688 #define LDAP_SYSLOG 1
17689 EOF
17690
17691 fi
17692 if test "$ol_enable_cache" = no ; then
17693         cat >> confdefs.h <<\EOF
17694 #define LDAP_NOCACHE 1
17695 EOF
17696
17697 fi
17698 if test "$ol_link_kbind" != no ; then
17699         cat >> confdefs.h <<\EOF
17700 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
17701 EOF
17702
17703 fi
17704 if test "$ol_enable_proctitle" != no ; then
17705         cat >> confdefs.h <<\EOF
17706 #define LDAP_PROCTITLE 1
17707 EOF
17708
17709 fi
17710 if test "$ol_enable_referrals" != no ; then
17711         cat >> confdefs.h <<\EOF
17712 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
17713 EOF
17714
17715 fi
17716 if test "$ol_enable_local" != no; then
17717         cat >> confdefs.h <<\EOF
17718 #define LDAP_PF_LOCAL 1
17719 EOF
17720
17721 fi
17722 if test "$ol_link_ipv6" != no; then
17723         cat >> confdefs.h <<\EOF
17724 #define LDAP_PF_INET6 1
17725 EOF
17726
17727 fi
17728 if test "$ol_enable_cleartext" != no ; then
17729         cat >> confdefs.h <<\EOF
17730 #define SLAPD_CLEARTEXT 1
17731 EOF
17732
17733 fi
17734 if test "$ol_enable_crypt" != no ; then
17735         cat >> confdefs.h <<\EOF
17736 #define SLAPD_CRYPT 1
17737 EOF
17738
17739 fi
17740 if test "$ol_link_kpasswd" != no ; then
17741         cat >> confdefs.h <<\EOF
17742 #define SLAPD_KPASSWD 1
17743 EOF
17744
17745 fi
17746 if test "$ol_link_spasswd" != no ; then
17747         cat >> confdefs.h <<\EOF
17748 #define SLAPD_SPASSWD 1
17749 EOF
17750
17751 fi
17752 if test "$ol_enable_phonetic" != no ; then
17753         cat >> confdefs.h <<\EOF
17754 #define SLAPD_PHONETIC 1
17755 EOF
17756
17757 fi
17758 if test "$ol_enable_rlookups" != no ; then
17759         cat >> confdefs.h <<\EOF
17760 #define SLAPD_RLOOKUPS 1
17761 EOF
17762
17763 fi
17764 if test "$ol_enable_aci" != no ; then
17765         cat >> confdefs.h <<\EOF
17766 #define SLAPD_ACI_ENABLED 1
17767 EOF
17768
17769 fi
17770
17771 if test "$ol_link_modules" != no ; then
17772         cat >> confdefs.h <<\EOF
17773 #define SLAPD_MODULES 1
17774 EOF
17775
17776         BUILD_SLAPD=yes
17777         SLAPD_MODULES_LDFLAGS="-dlopen self"
17778 fi
17779
17780 if test "$ol_enable_bdb" != no ; then
17781         cat >> confdefs.h <<\EOF
17782 #define SLAPD_BDB 1
17783 EOF
17784
17785         BUILD_SLAPD=yes
17786         BUILD_BDB=yes
17787         if test "$ol_with_bdb_module" != static ; then
17788                 cat >> confdefs.h <<\EOF
17789 #define SLAPD_BDB_DYNAMIC 1
17790 EOF
17791
17792                 BUILD_BDB=mod
17793                 BUILD_BDB_DYNAMIC=shared
17794                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
17795                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
17796         else
17797                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
17798         fi
17799 fi
17800
17801 if test "$ol_link_dnssrv" != no ; then
17802         cat >> confdefs.h <<\EOF
17803 #define SLAPD_DNSSRV 1
17804 EOF
17805
17806         BUILD_SLAPD=yes
17807         BUILD_DNSSRV=yes
17808         if test "$ol_with_dnssrv_module" != static ; then
17809                 cat >> confdefs.h <<\EOF
17810 #define SLAPD_DNSSRV_DYNAMIC 1
17811 EOF
17812
17813                 BUILD_DNSSRV=mod
17814                 BUILD_DNSSRV_DYNAMIC=shared
17815                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
17816                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
17817         else
17818                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
17819         fi
17820 fi
17821
17822 if test "$ol_enable_ldap" != no ; then
17823         cat >> confdefs.h <<\EOF
17824 #define SLAPD_LDAP 1
17825 EOF
17826
17827         BUILD_SLAPD=yes
17828         BUILD_LDAP=yes
17829         if test "$ol_with_ldap_module" != static ; then
17830                 cat >> confdefs.h <<\EOF
17831 #define SLAPD_LDAP_DYNAMIC 1
17832 EOF
17833
17834                 BUILD_LDAP=mod
17835                 BUILD_LDAP_DYNAMIC=shared
17836                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
17837                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
17838         else
17839                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
17840         fi
17841 fi
17842
17843 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
17844         cat >> confdefs.h <<\EOF
17845 #define SLAPD_LDBM 1
17846 EOF
17847
17848         BUILD_SLAPD=yes
17849         BUILD_LDBM=yes
17850         LDBM_LIB="-lldbm"
17851         if test "$ol_with_ldbm_module" != static ; then
17852                 cat >> confdefs.h <<\EOF
17853 #define SLAPD_LDBM_DYNAMIC 1
17854 EOF
17855
17856                 BUILD_LDBM=mod
17857                 BUILD_LDBM_DYNAMIC=shared
17858                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
17859                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
17860         else
17861                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
17862         fi
17863 fi
17864
17865 if test "$ol_enable_meta" != no ; then
17866         if test "$ol_enable_ldap" = no ; then
17867                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
17868         fi
17869         if test "$ol_enable_rewrite" = no ; then
17870                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
17871         fi
17872         cat >> confdefs.h <<\EOF
17873 #define SLAPD_META 1
17874 EOF
17875
17876         BUILD_SLAPD=yes
17877         BUILD_META=yes
17878         if test "$ol_with_meta_module" != static ; then
17879                 cat >> confdefs.h <<\EOF
17880 #define SLAPD_META_DYNAMIC 1
17881 EOF
17882
17883                 BUILD_META=mod
17884                 BUILD_META_DYNAMIC=shared
17885                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
17886                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
17887         else
17888                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
17889         fi
17890 fi
17891
17892 if test "$ol_enable_monitor" != no ; then
17893         cat >> confdefs.h <<\EOF
17894 #define SLAPD_MONITOR 1
17895 EOF
17896
17897         BUILD_SLAPD=yes
17898         BUILD_MONITOR=yes
17899         if test "$ol_with_monitor_module" != static ; then
17900                 cat >> confdefs.h <<\EOF
17901 #define SLAPD_MONITOR_DYNAMIC 1
17902 EOF
17903
17904                 BUILD_MONITOR=mod
17905                 BUILD_MONITOR_DYNAMIC=shared
17906                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
17907                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
17908         else
17909                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
17910         fi
17911 fi
17912
17913 if test "$ol_enable_passwd" != no ; then
17914         cat >> confdefs.h <<\EOF
17915 #define SLAPD_PASSWD 1
17916 EOF
17917
17918         BUILD_SLAPD=yes
17919         BUILD_PASSWD=yes
17920         if test "$ol_with_passwd_module" != static ; then
17921                 cat >> confdefs.h <<\EOF
17922 #define SLAPD_PASSWD_DYNAMIC 1
17923 EOF
17924
17925                 BUILD_PASSWD=mod
17926                 BUILD_PASSWD_DYNAMIC=shared
17927                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
17928                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
17929         else
17930                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
17931         fi
17932 fi
17933
17934 if test "$ol_link_perl" != no ; then
17935         cat >> confdefs.h <<\EOF
17936 #define SLAPD_PERL 1
17937 EOF
17938
17939         BUILD_SLAPD=yes
17940         BUILD_PERL=yes
17941         if test "$ol_with_perl_module" != static ; then
17942                 cat >> confdefs.h <<\EOF
17943 #define SLAPD_PERL_DYNAMIC 1
17944 EOF
17945
17946                 BUILD_PERL=mod
17947                 BUILD_PERL_DYNAMIC=shared
17948                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
17949                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
17950         else
17951                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
17952         fi
17953 fi
17954
17955 if test "$ol_enable_shell" != no ; then
17956         cat >> confdefs.h <<\EOF
17957 #define SLAPD_SHELL 1
17958 EOF
17959
17960         BUILD_SLAPD=yes
17961         BUILD_SHELL=yes
17962         if test "$ol_with_shell_module" != static ; then
17963                 cat >> confdefs.h <<\EOF
17964 #define SLAPD_SHELL_DYNAMIC 1
17965 EOF
17966
17967                 BUILD_SHELL=mod
17968                 BUILD_SHELL_DYNAMIC=shared
17969                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
17970                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
17971         else
17972                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
17973         fi
17974 fi
17975
17976 if test "$ol_enable_tcl" != no ; then
17977         cat >> confdefs.h <<\EOF
17978 #define SLAPD_TCL 1
17979 EOF
17980
17981         BUILD_SLAPD=yes
17982         BUILD_TCL=yes
17983         if test "$ol_with_tcl_module" != static; then
17984                 cat >> confdefs.h <<\EOF
17985 #define SLAPD_TCL_DYNAMIC 1
17986 EOF
17987
17988                 BUILD_TCL=mod
17989                 BUILD_TCL_DYNAMIC=shared
17990                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
17991                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
17992         else
17993                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
17994         fi
17995 fi
17996
17997 if test "$ol_link_sql" != no ; then
17998         cat >> confdefs.h <<\EOF
17999 #define SLAPD_SQL 1
18000 EOF
18001
18002         BUILD_SLAPD=yes
18003         BUILD_SQL=yes
18004         if test "$ol_with_sql_module" != static; then
18005                 cat >> confdefs.h <<\EOF
18006 #define SLAPD_SQL_DYNAMIC 1
18007 EOF
18008
18009                 BUILD_SQL=mod
18010                 BUILD_SQL_DYNAMIC=shared
18011                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
18012                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
18013         else
18014                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
18015         fi
18016 fi
18017
18018 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
18019         $BUILD_SLAPD = yes ; then
18020         BUILD_SLURPD=yes
18021 fi
18022
18023 if test "$ol_enable_rewrite" != no ; then
18024         cat >> confdefs.h <<\EOF
18025 #define ENABLE_REWRITE 1
18026 EOF
18027
18028         BUILD_REWRITE=yes
18029         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
18030 fi
18031
18032
18033
18034 if test "$ac_cv_mingw32" = yes ; then
18035         PLAT=NT
18036         SLAPD_MODULES_LDFLAGS=
18037         SLAPD_MODULES_LIST=
18038 else
18039         PLAT=UNIX
18040 fi
18041
18042
18043
18044
18045
18046
18047   
18048   
18049   
18050   
18051   
18052   
18053   
18054   
18055   
18056   
18057   
18058   
18059   
18060   
18061   
18062   
18063   
18064   
18065   
18066   
18067   
18068   
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110 trap '' 1 2 15
18111
18112 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
18113
18114 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18115 # Let make expand exec_prefix.
18116 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18117
18118 # Any assignment to VPATH causes Sun make to only execute
18119 # the first set of double-colon rules, so remove it if not needed.
18120 # If there is a colon in the path, we need to keep it.
18121 if test "x$srcdir" = x.; then
18122   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
18123 fi
18124
18125 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
18126
18127 DEFS=-DHAVE_CONFIG_H
18128
18129 # Without the "./", some shells look in PATH for config.status.
18130 : ${CONFIG_STATUS=./config.status}
18131
18132 echo creating $CONFIG_STATUS
18133 rm -f $CONFIG_STATUS
18134 cat > $CONFIG_STATUS <<EOF
18135 #! /bin/sh
18136 # Generated automatically by configure.
18137 # Run this file to recreate the current configuration.
18138 # This directory was configured as follows,
18139 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18140 #
18141 # $0 $ac_configure_args
18142 #
18143 # Compiler output produced by configure, useful for debugging
18144 # configure, is in ./config.log if it exists.
18145
18146 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
18147 for ac_option
18148 do
18149   case "\$ac_option" in
18150   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18151     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
18152     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
18153   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
18154     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
18155     exit 0 ;;
18156   -help | --help | --hel | --he | --h)
18157     echo "\$ac_cs_usage"; exit 0 ;;
18158   *) echo "\$ac_cs_usage"; exit 1 ;;
18159   esac
18160 done
18161
18162 ac_given_srcdir=$srcdir
18163 ac_given_INSTALL="$INSTALL"
18164
18165 trap 'rm -fr `echo "\
18166 Makefile:build/top.mk:Makefile.in:build/dir.mk \
18167 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
18168 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
18169 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
18170 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
18171 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
18172 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
18173 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
18174 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
18175 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
18176 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
18177 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
18178 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
18179 include/Makefile:build/top.mk:include/Makefile.in \
18180 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
18181 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
18182 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18183 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18184 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
18185 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
18186 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
18187 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
18188 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
18189 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
18190 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
18191 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
18192 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
18193 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
18194 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
18195 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
18196 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
18197 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
18198 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
18199 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
18200 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
18201 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
18202 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
18203 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
18204 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
18205 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
18206 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
18207 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
18208  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
18209 EOF
18210 cat >> $CONFIG_STATUS <<EOF
18211
18212 # Protect against being on the right side of a sed subst in config.status.
18213 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
18214  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
18215 $ac_vpsub
18216 $extrasub
18217 s%@SHELL@%$SHELL%g
18218 s%@CFLAGS@%$CFLAGS%g
18219 s%@CPPFLAGS@%$CPPFLAGS%g
18220 s%@CXXFLAGS@%$CXXFLAGS%g
18221 s%@FFLAGS@%$FFLAGS%g
18222 s%@DEFS@%$DEFS%g
18223 s%@LDFLAGS@%$LDFLAGS%g
18224 s%@LIBS@%$LIBS%g
18225 s%@exec_prefix@%$exec_prefix%g
18226 s%@prefix@%$prefix%g
18227 s%@program_transform_name@%$program_transform_name%g
18228 s%@bindir@%$bindir%g
18229 s%@sbindir@%$sbindir%g
18230 s%@libexecdir@%$libexecdir%g
18231 s%@datadir@%$datadir%g
18232 s%@sysconfdir@%$sysconfdir%g
18233 s%@sharedstatedir@%$sharedstatedir%g
18234 s%@localstatedir@%$localstatedir%g
18235 s%@libdir@%$libdir%g
18236 s%@includedir@%$includedir%g
18237 s%@oldincludedir@%$oldincludedir%g
18238 s%@infodir@%$infodir%g
18239 s%@mandir@%$mandir%g
18240 s%@host@%$host%g
18241 s%@host_alias@%$host_alias%g
18242 s%@host_cpu@%$host_cpu%g
18243 s%@host_vendor@%$host_vendor%g
18244 s%@host_os@%$host_os%g
18245 s%@target@%$target%g
18246 s%@target_alias@%$target_alias%g
18247 s%@target_cpu@%$target_cpu%g
18248 s%@target_vendor@%$target_vendor%g
18249 s%@target_os@%$target_os%g
18250 s%@build@%$build%g
18251 s%@build_alias@%$build_alias%g
18252 s%@build_cpu@%$build_cpu%g
18253 s%@build_vendor@%$build_vendor%g
18254 s%@build_os@%$build_os%g
18255 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
18256 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
18257 s%@INSTALL_DATA@%$INSTALL_DATA%g
18258 s%@PACKAGE@%$PACKAGE%g
18259 s%@VERSION@%$VERSION%g
18260 s%@ACLOCAL@%$ACLOCAL%g
18261 s%@AUTOCONF@%$AUTOCONF%g
18262 s%@AUTOMAKE@%$AUTOMAKE%g
18263 s%@AUTOHEADER@%$AUTOHEADER%g
18264 s%@MAKEINFO@%$MAKEINFO%g
18265 s%@install_sh@%$install_sh%g
18266 s%@AMTAR@%$AMTAR%g
18267 s%@AWK@%$AWK%g
18268 s%@AMTARFLAGS@%$AMTARFLAGS%g
18269 s%@SET_MAKE@%$SET_MAKE%g
18270 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
18271 s%@top_builddir@%$top_builddir%g
18272 s%@ldap_subdir@%$ldap_subdir%g
18273 s%@CC@%$CC%g
18274 s%@AR@%$AR%g
18275 s%@RANLIB@%$RANLIB%g
18276 s%@LN_S@%$LN_S%g
18277 s%@DLLTOOL@%$DLLTOOL%g
18278 s%@AS@%$AS%g
18279 s%@OBJDUMP@%$OBJDUMP%g
18280 s%@LIBTOOL@%$LIBTOOL%g
18281 s%@LN_H@%$LN_H%g
18282 s%@SENDMAIL@%$SENDMAIL%g
18283 s%@EDITOR@%$EDITOR%g
18284 s%@FINGER@%$FINGER%g
18285 s%@PERLBIN@%$PERLBIN%g
18286 s%@CPP@%$CPP%g
18287 s%@EXEEXT@%$EXEEXT%g
18288 s%@OBJEXT@%$OBJEXT%g
18289 s%@OL_MKDEP@%$OL_MKDEP%g
18290 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
18291 s%@LIBOBJS@%$LIBOBJS%g
18292 s%@LIBSRCS@%$LIBSRCS%g
18293 s%@PLAT@%$PLAT%g
18294 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
18295 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
18296 s%@BUILD_BDB@%$BUILD_BDB%g
18297 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
18298 s%@BUILD_LDAP@%$BUILD_LDAP%g
18299 s%@BUILD_LDBM@%$BUILD_LDBM%g
18300 s%@BUILD_META@%$BUILD_META%g
18301 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
18302 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
18303 s%@BUILD_PERL@%$BUILD_PERL%g
18304 s%@BUILD_SHELL@%$BUILD_SHELL%g
18305 s%@BUILD_SQL@%$BUILD_SQL%g
18306 s%@BUILD_TCL@%$BUILD_TCL%g
18307 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
18308 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
18309 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
18310 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
18311 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
18312 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
18313 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
18314 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
18315 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
18316 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
18317 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
18318 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
18319 s%@LDBM_LIB@%$LDBM_LIB%g
18320 s%@LDAP_LIBS@%$LDAP_LIBS%g
18321 s%@LDIF_LIBS@%$LDIF_LIBS%g
18322 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
18323 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
18324 s%@LDBM_LIBS@%$LDBM_LIBS%g
18325 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
18326 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
18327 s%@WRAP_LIBS@%$WRAP_LIBS%g
18328 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
18329 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
18330 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
18331 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
18332 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
18333 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
18334 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
18335 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
18336 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
18337 s%@KRB4_LIBS@%$KRB4_LIBS%g
18338 s%@KRB5_LIBS@%$KRB5_LIBS%g
18339 s%@READLINE_LIBS@%$READLINE_LIBS%g
18340 s%@SASL_LIBS@%$SASL_LIBS%g
18341 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
18342 s%@TLS_LIBS@%$TLS_LIBS%g
18343 s%@MODULES_LIBS@%$MODULES_LIBS%g
18344 s%@AUTH_LIBS@%$AUTH_LIBS%g
18345 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
18346 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
18347 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
18348 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
18349
18350 CEOF
18351 EOF
18352
18353 cat >> $CONFIG_STATUS <<\EOF
18354
18355 # Split the substitutions into bite-sized pieces for seds with
18356 # small command number limits, like on Digital OSF/1 and HP-UX.
18357 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
18358 ac_file=1 # Number of current file.
18359 ac_beg=1 # First line for current file.
18360 ac_end=$ac_max_sed_cmds # Line after last line for current file.
18361 ac_more_lines=:
18362 ac_sed_cmds=""
18363 while $ac_more_lines; do
18364   if test $ac_beg -gt 1; then
18365     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
18366   else
18367     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
18368   fi
18369   if test ! -s conftest.s$ac_file; then
18370     ac_more_lines=false
18371     rm -f conftest.s$ac_file
18372   else
18373     if test -z "$ac_sed_cmds"; then
18374       ac_sed_cmds="sed -f conftest.s$ac_file"
18375     else
18376       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
18377     fi
18378     ac_file=`expr $ac_file + 1`
18379     ac_beg=$ac_end
18380     ac_end=`expr $ac_end + $ac_max_sed_cmds`
18381   fi
18382 done
18383 if test -z "$ac_sed_cmds"; then
18384   ac_sed_cmds=cat
18385 fi
18386 EOF
18387
18388 cat >> $CONFIG_STATUS <<EOF
18389
18390 CONFIG_FILES=\${CONFIG_FILES-"\
18391 Makefile:build/top.mk:Makefile.in:build/dir.mk \
18392 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
18393 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
18394 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
18395 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
18396 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
18397 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
18398 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
18399 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
18400 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
18401 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
18402 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
18403 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
18404 include/Makefile:build/top.mk:include/Makefile.in \
18405 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
18406 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
18407 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18408 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18409 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
18410 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
18411 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
18412 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
18413 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
18414 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
18415 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
18416 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
18417 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
18418 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
18419 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
18420 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
18421 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
18422 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
18423 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
18424 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
18425 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
18426 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
18427 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
18428 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
18429 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
18430 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
18431 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
18432 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
18433 "}
18434 EOF
18435 cat >> $CONFIG_STATUS <<\EOF
18436 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
18437   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18438   case "$ac_file" in
18439   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18440        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18441   *) ac_file_in="${ac_file}.in" ;;
18442   esac
18443
18444   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
18445
18446   # Remove last slash and all that follows it.  Not all systems have dirname.
18447   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18448   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18449     # The file is in a subdirectory.
18450     test ! -d "$ac_dir" && mkdir "$ac_dir"
18451     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
18452     # A "../" for each directory in $ac_dir_suffix.
18453     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
18454   else
18455     ac_dir_suffix= ac_dots=
18456   fi
18457
18458   case "$ac_given_srcdir" in
18459   .)  srcdir=.
18460       if test -z "$ac_dots"; then top_srcdir=.
18461       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
18462   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
18463   *) # Relative path.
18464     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
18465     top_srcdir="$ac_dots$ac_given_srcdir" ;;
18466   esac
18467
18468   case "$ac_given_INSTALL" in
18469   [/$]*) INSTALL="$ac_given_INSTALL" ;;
18470   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
18471   esac
18472
18473   echo creating "$ac_file"
18474   rm -f "$ac_file"
18475   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
18476   case "$ac_file" in
18477   *[Mm]akefile*) ac_comsub="1i\\
18478 # $configure_input" ;;
18479   *) ac_comsub= ;;
18480   esac
18481
18482   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18483   sed -e "$ac_comsub
18484 s%@configure_input@%$configure_input%g
18485 s%@srcdir@%$srcdir%g
18486 s%@top_srcdir@%$top_srcdir%g
18487 s%@INSTALL@%$INSTALL%g
18488 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
18489 fi; done
18490 rm -f conftest.s*
18491
18492 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18493 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18494 #
18495 # ac_d sets the value in "#define NAME VALUE" lines.
18496 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18497 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
18498 ac_dC='\3'
18499 ac_dD='%g'
18500 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18501 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18502 ac_uB='\([      ]\)%\1#\2define\3'
18503 ac_uC=' '
18504 ac_uD='\4%g'
18505 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18506 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18507 ac_eB='$%\1#\2define\3'
18508 ac_eC=' '
18509 ac_eD='%g'
18510
18511 if test "${CONFIG_HEADERS+set}" != set; then
18512 EOF
18513 cat >> $CONFIG_STATUS <<EOF
18514   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
18515 EOF
18516 cat >> $CONFIG_STATUS <<\EOF
18517 fi
18518 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
18519   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18520   case "$ac_file" in
18521   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18522        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18523   *) ac_file_in="${ac_file}.in" ;;
18524   esac
18525
18526   echo creating $ac_file
18527
18528   rm -f conftest.frag conftest.in conftest.out
18529   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18530   cat $ac_file_inputs > conftest.in
18531
18532 EOF
18533
18534 # Transform confdefs.h into a sed script conftest.vals that substitutes
18535 # the proper values into config.h.in to produce config.h.  And first:
18536 # Protect against being on the right side of a sed subst in config.status.
18537 # Protect against being in an unquoted here document in config.status.
18538 rm -f conftest.vals
18539 cat > conftest.hdr <<\EOF
18540 s/[\\&%]/\\&/g
18541 s%[\\$`]%\\&%g
18542 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
18543 s%ac_d%ac_u%gp
18544 s%ac_u%ac_e%gp
18545 EOF
18546 sed -n -f conftest.hdr confdefs.h > conftest.vals
18547 rm -f conftest.hdr
18548
18549 # This sed command replaces #undef with comments.  This is necessary, for
18550 # example, in the case of _POSIX_SOURCE, which is predefined and required
18551 # on some systems where configure will not decide to define it.
18552 cat >> conftest.vals <<\EOF
18553 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
18554 EOF
18555
18556 # Break up conftest.vals because some shells have a limit on
18557 # the size of here documents, and old seds have small limits too.
18558
18559 rm -f conftest.tail
18560 while :
18561 do
18562   ac_lines=`grep -c . conftest.vals`
18563   # grep -c gives empty output for an empty file on some AIX systems.
18564   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
18565   # Write a limited-size here document to conftest.frag.
18566   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
18567   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
18568   echo 'CEOF
18569   sed -f conftest.frag conftest.in > conftest.out
18570   rm -f conftest.in
18571   mv conftest.out conftest.in
18572 ' >> $CONFIG_STATUS
18573   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18574   rm -f conftest.vals
18575   mv conftest.tail conftest.vals
18576 done
18577 rm -f conftest.vals
18578
18579 cat >> $CONFIG_STATUS <<\EOF
18580   rm -f conftest.frag conftest.h
18581   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
18582   cat conftest.in >> conftest.h
18583   rm -f conftest.in
18584   if cmp -s $ac_file conftest.h 2>/dev/null; then
18585     echo "$ac_file is unchanged"
18586     rm -f conftest.h
18587   else
18588     # Remove last slash and all that follows it.  Not all systems have dirname.
18589       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18590       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18591       # The file is in a subdirectory.
18592       test ! -d "$ac_dir" && mkdir "$ac_dir"
18593     fi
18594     rm -f $ac_file
18595     mv conftest.h $ac_file
18596   fi
18597 fi; done
18598
18599 EOF
18600 cat >> $CONFIG_STATUS <<EOF
18601
18602 EOF
18603 cat >> $CONFIG_STATUS <<\EOF
18604
18605 date > stamp-h
18606 echo Please \"make depend\" to build dependencies
18607
18608 exit 0
18609 EOF
18610 chmod +x $CONFIG_STATUS
18611 rm -fr confdefs* $ac_clean_files
18612 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
18613