]> git.sur5r.net Git - openldap/blob - configure
00ee745a12e7f1d8ddd0bf4f46c951e0592e37c9
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.377 2001/11/28 01:32:49 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_PERL_LDFLAGS=
2693 MOD_PERL_LDFLAGS=
2694 PERL_CPPFLAGS=
2695
2696 SLAPD_SQL_LDFLAGS=
2697 SLAPD_SQL_LIBS=
2698 SLAPD_SQL_INCLUDES=
2699
2700 MOD_TCL_LIB=
2701 KRB4_LIBS=
2702 KRB5_LIBS=
2703 READLINE_LIBS=
2704 SASL_LIBS=
2705 TERMCAP_LIBS=
2706 TLS_LIBS=
2707 MODULES_LIBS=
2708 AUTH_LIBS=
2709
2710 SLAPD_SLP_LIBS=
2711
2712
2713
2714 cat >> confdefs.h <<\EOF
2715 #define HAVE_MKVERSION 1
2716 EOF
2717
2718
2719
2720
2721 ol_aix_threads=no
2722 case "$target" in
2723 *-*-aix*)       if test -z "$CC" ; then
2724                 case "$ol_with_threads" in
2725                 auto | yes |  posix) ol_aix_threads=yes ;;
2726                 esac
2727         fi
2728 ;;
2729 esac
2730
2731 if test $ol_aix_threads = yes ; then
2732         if test -z "${CC}" ; then
2733                 for ac_prog in cc_r xlc_r cc
2734 do
2735 # Extract the first word of "$ac_prog", so it can be a program name with args.
2736 set dummy $ac_prog; ac_word=$2
2737 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2738 echo "configure:2739: checking for $ac_word" >&5
2739 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2740   echo $ac_n "(cached) $ac_c" 1>&6
2741 else
2742   if test -n "$CC"; then
2743   ac_cv_prog_CC="$CC" # Let the user override the test.
2744 else
2745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2746   ac_dummy="$PATH"
2747   for ac_dir in $ac_dummy; do
2748     test -z "$ac_dir" && ac_dir=.
2749     if test -f $ac_dir/$ac_word; then
2750       ac_cv_prog_CC="$ac_prog"
2751       break
2752     fi
2753   done
2754   IFS="$ac_save_ifs"
2755 fi
2756 fi
2757 CC="$ac_cv_prog_CC"
2758 if test -n "$CC"; then
2759   echo "$ac_t""$CC" 1>&6
2760 else
2761   echo "$ac_t""no" 1>&6
2762 fi
2763
2764 test -n "$CC" && break
2765 done
2766
2767
2768                 if test "$CC" = cc ; then
2769                                                 if test $ol_with_threads != auto ; then
2770                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2771                         else
2772                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2773                         fi
2774                         ol_with_threads=no
2775                 fi
2776         fi
2777
2778         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2779                 ol_with_threads=posix
2780                 ol_cv_pthread_create=yes
2781         fi
2782 fi
2783
2784 if test -z "${CC}"; then
2785         for ac_prog in cc
2786 do
2787 # Extract the first word of "$ac_prog", so it can be a program name with args.
2788 set dummy $ac_prog; ac_word=$2
2789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2790 echo "configure:2791: checking for $ac_word" >&5
2791 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2792   echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794   if test -n "$CC"; then
2795   ac_cv_prog_CC="$CC" # Let the user override the test.
2796 else
2797   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2798   ac_dummy="$PATH"
2799   for ac_dir in $ac_dummy; do
2800     test -z "$ac_dir" && ac_dir=.
2801     if test -f $ac_dir/$ac_word; then
2802       ac_cv_prog_CC="$ac_prog"
2803       break
2804     fi
2805   done
2806   IFS="$ac_save_ifs"
2807 fi
2808 fi
2809 CC="$ac_cv_prog_CC"
2810 if test -n "$CC"; then
2811   echo "$ac_t""$CC" 1>&6
2812 else
2813   echo "$ac_t""no" 1>&6
2814 fi
2815
2816 test -n "$CC" && break
2817 done
2818
2819 fi
2820
2821
2822 for ac_prog in ar gar
2823 do
2824 # Extract the first word of "$ac_prog", so it can be a program name with args.
2825 set dummy $ac_prog; ac_word=$2
2826 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2827 echo "configure:2828: checking for $ac_word" >&5
2828 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2829   echo $ac_n "(cached) $ac_c" 1>&6
2830 else
2831   if test -n "$AR"; then
2832   ac_cv_prog_AR="$AR" # Let the user override the test.
2833 else
2834   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2835   ac_dummy="$PATH"
2836   for ac_dir in $ac_dummy; do
2837     test -z "$ac_dir" && ac_dir=.
2838     if test -f $ac_dir/$ac_word; then
2839       ac_cv_prog_AR="$ac_prog"
2840       break
2841     fi
2842   done
2843   IFS="$ac_save_ifs"
2844 fi
2845 fi
2846 AR="$ac_cv_prog_AR"
2847 if test -n "$AR"; then
2848   echo "$ac_t""$AR" 1>&6
2849 else
2850   echo "$ac_t""no" 1>&6
2851 fi
2852
2853 test -n "$AR" && break
2854 done
2855
2856
2857
2858
2859 # Check whether --enable-fast-install or --disable-fast-install was given.
2860 if test "${enable_fast_install+set}" = set; then
2861   enableval="$enable_fast_install"
2862   p=${PACKAGE-default}
2863 case "$enableval" in
2864 yes) enable_fast_install=yes ;;
2865 no) enable_fast_install=no ;;
2866 *)
2867   enable_fast_install=no
2868   # Look at the argument we got.  We use all the common list separators.
2869   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2870   for pkg in $enableval; do
2871     if test "X$pkg" = "X$p"; then
2872       enable_fast_install=yes
2873     fi
2874   done
2875   IFS="$ac_save_ifs"
2876   ;;
2877 esac
2878 else
2879   enable_fast_install=yes
2880 fi
2881
2882 # Extract the first word of "ranlib", so it can be a program name with args.
2883 set dummy ranlib; ac_word=$2
2884 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2885 echo "configure:2886: checking for $ac_word" >&5
2886 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2887   echo $ac_n "(cached) $ac_c" 1>&6
2888 else
2889   if test -n "$RANLIB"; then
2890   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2891 else
2892   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2893   ac_dummy="$PATH"
2894   for ac_dir in $ac_dummy; do
2895     test -z "$ac_dir" && ac_dir=.
2896     if test -f $ac_dir/$ac_word; then
2897       ac_cv_prog_RANLIB="ranlib"
2898       break
2899     fi
2900   done
2901   IFS="$ac_save_ifs"
2902   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2903 fi
2904 fi
2905 RANLIB="$ac_cv_prog_RANLIB"
2906 if test -n "$RANLIB"; then
2907   echo "$ac_t""$RANLIB" 1>&6
2908 else
2909   echo "$ac_t""no" 1>&6
2910 fi
2911
2912 # Extract the first word of "gcc", so it can be a program name with args.
2913 set dummy gcc; ac_word=$2
2914 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2915 echo "configure:2916: checking for $ac_word" >&5
2916 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2917   echo $ac_n "(cached) $ac_c" 1>&6
2918 else
2919   if test -n "$CC"; then
2920   ac_cv_prog_CC="$CC" # Let the user override the test.
2921 else
2922   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2923   ac_dummy="$PATH"
2924   for ac_dir in $ac_dummy; do
2925     test -z "$ac_dir" && ac_dir=.
2926     if test -f $ac_dir/$ac_word; then
2927       ac_cv_prog_CC="gcc"
2928       break
2929     fi
2930   done
2931   IFS="$ac_save_ifs"
2932 fi
2933 fi
2934 CC="$ac_cv_prog_CC"
2935 if test -n "$CC"; then
2936   echo "$ac_t""$CC" 1>&6
2937 else
2938   echo "$ac_t""no" 1>&6
2939 fi
2940
2941 if test -z "$CC"; then
2942   # Extract the first word of "cc", so it can be a program name with args.
2943 set dummy cc; ac_word=$2
2944 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2945 echo "configure:2946: checking for $ac_word" >&5
2946 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   if test -n "$CC"; then
2950   ac_cv_prog_CC="$CC" # Let the user override the test.
2951 else
2952   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2953   ac_prog_rejected=no
2954   ac_dummy="$PATH"
2955   for ac_dir in $ac_dummy; do
2956     test -z "$ac_dir" && ac_dir=.
2957     if test -f $ac_dir/$ac_word; then
2958       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2959         ac_prog_rejected=yes
2960         continue
2961       fi
2962       ac_cv_prog_CC="cc"
2963       break
2964     fi
2965   done
2966   IFS="$ac_save_ifs"
2967 if test $ac_prog_rejected = yes; then
2968   # We found a bogon in the path, so make sure we never use it.
2969   set dummy $ac_cv_prog_CC
2970   shift
2971   if test $# -gt 0; then
2972     # We chose a different compiler from the bogus one.
2973     # However, it has the same basename, so the bogon will be chosen
2974     # first if we set CC to just the basename; use the full file name.
2975     shift
2976     set dummy "$ac_dir/$ac_word" "$@"
2977     shift
2978     ac_cv_prog_CC="$@"
2979   fi
2980 fi
2981 fi
2982 fi
2983 CC="$ac_cv_prog_CC"
2984 if test -n "$CC"; then
2985   echo "$ac_t""$CC" 1>&6
2986 else
2987   echo "$ac_t""no" 1>&6
2988 fi
2989
2990   if test -z "$CC"; then
2991     case "`uname -s`" in
2992     *win32* | *WIN32* | *CYGWIN*)
2993       # Extract the first word of "cl", so it can be a program name with args.
2994 set dummy cl; ac_word=$2
2995 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2996 echo "configure:2997: checking for $ac_word" >&5
2997 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   if test -n "$CC"; then
3001   ac_cv_prog_CC="$CC" # Let the user override the test.
3002 else
3003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3004   ac_dummy="$PATH"
3005   for ac_dir in $ac_dummy; do
3006     test -z "$ac_dir" && ac_dir=.
3007     if test -f $ac_dir/$ac_word; then
3008       ac_cv_prog_CC="cl"
3009       break
3010     fi
3011   done
3012   IFS="$ac_save_ifs"
3013 fi
3014 fi
3015 CC="$ac_cv_prog_CC"
3016 if test -n "$CC"; then
3017   echo "$ac_t""$CC" 1>&6
3018 else
3019   echo "$ac_t""no" 1>&6
3020 fi
3021  ;;
3022     esac
3023   fi
3024   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3025 fi
3026
3027 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3028 echo "configure:3029: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3029
3030 ac_ext=c
3031 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3032 ac_cpp='$CPP $CPPFLAGS'
3033 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3034 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3035 cross_compiling=$ac_cv_prog_cc_cross
3036
3037 cat > conftest.$ac_ext << EOF
3038
3039 #line 3040 "configure"
3040 #include "confdefs.h"
3041
3042 main(){return(0);}
3043 EOF
3044 if { (eval echo configure:3045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3045   ac_cv_prog_cc_works=yes
3046   # If we can't run a trivial program, we are probably using a cross compiler.
3047   if (./conftest; exit) 2>/dev/null; then
3048     ac_cv_prog_cc_cross=no
3049   else
3050     ac_cv_prog_cc_cross=yes
3051   fi
3052 else
3053   echo "configure: failed program was:" >&5
3054   cat conftest.$ac_ext >&5
3055   ac_cv_prog_cc_works=no
3056 fi
3057 rm -fr conftest*
3058 ac_ext=c
3059 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3060 ac_cpp='$CPP $CPPFLAGS'
3061 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3062 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3063 cross_compiling=$ac_cv_prog_cc_cross
3064
3065 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3066 if test $ac_cv_prog_cc_works = no; then
3067   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3068 fi
3069 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3070 echo "configure:3071: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3071 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3072 cross_compiling=$ac_cv_prog_cc_cross
3073
3074 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3075 echo "configure:3076: checking whether we are using GNU C" >&5
3076 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3077   echo $ac_n "(cached) $ac_c" 1>&6
3078 else
3079   cat > conftest.c <<EOF
3080 #ifdef __GNUC__
3081   yes;
3082 #endif
3083 EOF
3084 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3085   ac_cv_prog_gcc=yes
3086 else
3087   ac_cv_prog_gcc=no
3088 fi
3089 fi
3090
3091 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3092
3093 if test $ac_cv_prog_gcc = yes; then
3094   GCC=yes
3095 else
3096   GCC=
3097 fi
3098
3099 ac_test_CFLAGS="${CFLAGS+set}"
3100 ac_save_CFLAGS="$CFLAGS"
3101 CFLAGS=
3102 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3103 echo "configure:3104: checking whether ${CC-cc} accepts -g" >&5
3104 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   echo 'void f(){}' > conftest.c
3108 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3109   ac_cv_prog_cc_g=yes
3110 else
3111   ac_cv_prog_cc_g=no
3112 fi
3113 rm -f conftest*
3114
3115 fi
3116
3117 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3118 if test "$ac_test_CFLAGS" = set; then
3119   CFLAGS="$ac_save_CFLAGS"
3120 elif test $ac_cv_prog_cc_g = yes; then
3121   if test "$GCC" = yes; then
3122     CFLAGS="-g -O2"
3123   else
3124     CFLAGS="-g"
3125   fi
3126 else
3127   if test "$GCC" = yes; then
3128     CFLAGS="-O2"
3129   else
3130     CFLAGS=
3131   fi
3132 fi
3133
3134 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3135 if test "${with_gnu_ld+set}" = set; then
3136   withval="$with_gnu_ld"
3137   test "$withval" = no || with_gnu_ld=yes
3138 else
3139   with_gnu_ld=no
3140 fi
3141
3142 ac_prog=ld
3143 if test "$ac_cv_prog_gcc" = yes; then
3144   # Check if gcc -print-prog-name=ld gives a path.
3145   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3146 echo "configure:3147: checking for ld used by GCC" >&5
3147   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3148   case "$ac_prog" in
3149     # Accept absolute paths.
3150     [\\/]* | [A-Za-z]:[\\/]*)
3151       re_direlt='/[^/][^/]*/\.\./'
3152       # Canonicalize the path of ld
3153       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3154       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3155         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3156       done
3157       test -z "$LD" && LD="$ac_prog"
3158       ;;
3159   "")
3160     # If it fails, then pretend we aren't using GCC.
3161     ac_prog=ld
3162     ;;
3163   *)
3164     # If it is relative, then search for the first ld in PATH.
3165     with_gnu_ld=unknown
3166     ;;
3167   esac
3168 elif test "$with_gnu_ld" = yes; then
3169   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3170 echo "configure:3171: checking for GNU ld" >&5
3171 else
3172   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3173 echo "configure:3174: checking for non-GNU ld" >&5
3174 fi
3175 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3176   echo $ac_n "(cached) $ac_c" 1>&6
3177 else
3178   if test -z "$LD"; then
3179   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3180   for ac_dir in $PATH; do
3181     test -z "$ac_dir" && ac_dir=.
3182     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3183       ac_cv_path_LD="$ac_dir/$ac_prog"
3184       # Check to see if the program is GNU ld.  I'd rather use --version,
3185       # but apparently some GNU ld's only accept -v.
3186       # Break only if it was the GNU/non-GNU ld that we prefer.
3187       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3188         test "$with_gnu_ld" != no && break
3189       else
3190         test "$with_gnu_ld" != yes && break
3191       fi
3192     fi
3193   done
3194   IFS="$ac_save_ifs"
3195 else
3196   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3197 fi
3198 fi
3199
3200 LD="$ac_cv_path_LD"
3201 if test -n "$LD"; then
3202   echo "$ac_t""$LD" 1>&6
3203 else
3204   echo "$ac_t""no" 1>&6
3205 fi
3206 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3207 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3208 echo "configure:3209: checking if the linker ($LD) is GNU ld" >&5
3209 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3213 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3214   ac_cv_prog_gnu_ld=yes
3215 else
3216   ac_cv_prog_gnu_ld=no
3217 fi
3218 fi
3219
3220 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3221
3222
3223 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3224 echo "configure:3225: checking for BSD-compatible nm" >&5
3225 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   if test -n "$NM"; then
3229   # Let the user override the test.
3230   ac_cv_path_NM="$NM"
3231 else
3232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3233   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3234     test -z "$ac_dir" && ac_dir=.
3235     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3236       # Check to see if the nm accepts a BSD-compat flag.
3237       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3238       #   nm: unknown option "B" ignored
3239       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3240         ac_cv_path_NM="$ac_dir/nm -B"
3241         break
3242       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3243         ac_cv_path_NM="$ac_dir/nm -p"
3244         break
3245       else
3246         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3247         continue # so that we can try to find one that supports BSD flags
3248       fi
3249     fi
3250   done
3251   IFS="$ac_save_ifs"
3252   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3253 fi
3254 fi
3255
3256 NM="$ac_cv_path_NM"
3257 echo "$ac_t""$NM" 1>&6
3258
3259 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3260 echo "configure:3261: checking whether ln -s works" >&5
3261 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3262   echo $ac_n "(cached) $ac_c" 1>&6
3263 else
3264   rm -f conftestdata
3265 if ln -s X conftestdata 2>/dev/null
3266 then
3267   rm -f conftestdata
3268   ac_cv_prog_LN_S="ln -s"
3269 else
3270   ac_cv_prog_LN_S=ln
3271 fi
3272 fi
3273 LN_S="$ac_cv_prog_LN_S"
3274 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3275   echo "$ac_t""yes" 1>&6
3276 else
3277   echo "$ac_t""no" 1>&6
3278 fi
3279
3280 if test $host != $build; then
3281   ac_tool_prefix=${host_alias}-
3282 else
3283   ac_tool_prefix=
3284 fi
3285
3286
3287 case "$target" in
3288 NONE) lt_target="$host" ;;
3289 *) lt_target="$target" ;;
3290 esac
3291
3292 # Check for any special flags to pass to ltconfig.
3293 libtool_flags="--cache-file=$cache_file"
3294 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3295 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3296 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3297 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3298 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3299 libtool_flags="$libtool_flags --enable-dlopen"
3300 libtool_flags="$libtool_flags --enable-win32-dll"
3301 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3302 if test "${enable_libtool_lock+set}" = set; then
3303   enableval="$enable_libtool_lock"
3304   :
3305 fi
3306
3307 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3308 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3309
3310 # Some flags need to be propagated to the compiler or linker for good
3311 # libtool support.
3312 case "$lt_target" in
3313 *-*-irix6*)
3314   # Find out which ABI we are using.
3315   echo '#line 3316 "configure"' > conftest.$ac_ext
3316   if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3317     case "`/usr/bin/file conftest.o`" in
3318     *32-bit*)
3319       LD="${LD-ld} -32"
3320       ;;
3321     *N32*)
3322       LD="${LD-ld} -n32"
3323       ;;
3324     *64-bit*)
3325       LD="${LD-ld} -64"
3326       ;;
3327     esac
3328   fi
3329   rm -rf conftest*
3330   ;;
3331
3332 *-*-sco3.2v5*)
3333   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3334   SAVE_CFLAGS="$CFLAGS"
3335   CFLAGS="$CFLAGS -belf"
3336   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3337 echo "configure:3338: checking whether the C compiler needs -belf" >&5
3338 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3339   echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341   cat > conftest.$ac_ext <<EOF
3342 #line 3343 "configure"
3343 #include "confdefs.h"
3344
3345 int main() {
3346
3347 ; return 0; }
3348 EOF
3349 if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3350   rm -rf conftest*
3351   lt_cv_cc_needs_belf=yes
3352 else
3353   echo "configure: failed program was:" >&5
3354   cat conftest.$ac_ext >&5
3355   rm -rf conftest*
3356   lt_cv_cc_needs_belf=no
3357 fi
3358 rm -f conftest*
3359 fi
3360
3361 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3362   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3363     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3364     CFLAGS="$SAVE_CFLAGS"
3365   fi
3366   ;;
3367
3368 *-*-cygwin* | *-*-mingw*)
3369   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3370 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3371 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3372 echo "configure:3373: checking for $ac_word" >&5
3373 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3374   echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376   if test -n "$DLLTOOL"; then
3377   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3378 else
3379   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3380   ac_dummy="$PATH"
3381   for ac_dir in $ac_dummy; do
3382     test -z "$ac_dir" && ac_dir=.
3383     if test -f $ac_dir/$ac_word; then
3384       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3385       break
3386     fi
3387   done
3388   IFS="$ac_save_ifs"
3389 fi
3390 fi
3391 DLLTOOL="$ac_cv_prog_DLLTOOL"
3392 if test -n "$DLLTOOL"; then
3393   echo "$ac_t""$DLLTOOL" 1>&6
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398
3399 if test -z "$ac_cv_prog_DLLTOOL"; then
3400 if test -n "$ac_tool_prefix"; then
3401   # Extract the first word of "dlltool", so it can be a program name with args.
3402 set dummy dlltool; ac_word=$2
3403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3404 echo "configure:3405: checking for $ac_word" >&5
3405 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3406   echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408   if test -n "$DLLTOOL"; then
3409   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3410 else
3411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3412   ac_dummy="$PATH"
3413   for ac_dir in $ac_dummy; do
3414     test -z "$ac_dir" && ac_dir=.
3415     if test -f $ac_dir/$ac_word; then
3416       ac_cv_prog_DLLTOOL="dlltool"
3417       break
3418     fi
3419   done
3420   IFS="$ac_save_ifs"
3421   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3422 fi
3423 fi
3424 DLLTOOL="$ac_cv_prog_DLLTOOL"
3425 if test -n "$DLLTOOL"; then
3426   echo "$ac_t""$DLLTOOL" 1>&6
3427 else
3428   echo "$ac_t""no" 1>&6
3429 fi
3430
3431 else
3432   DLLTOOL="false"
3433 fi
3434 fi
3435
3436   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3437 set dummy ${ac_tool_prefix}as; ac_word=$2
3438 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3439 echo "configure:3440: checking for $ac_word" >&5
3440 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3441   echo $ac_n "(cached) $ac_c" 1>&6
3442 else
3443   if test -n "$AS"; then
3444   ac_cv_prog_AS="$AS" # Let the user override the test.
3445 else
3446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3447   ac_dummy="$PATH"
3448   for ac_dir in $ac_dummy; do
3449     test -z "$ac_dir" && ac_dir=.
3450     if test -f $ac_dir/$ac_word; then
3451       ac_cv_prog_AS="${ac_tool_prefix}as"
3452       break
3453     fi
3454   done
3455   IFS="$ac_save_ifs"
3456 fi
3457 fi
3458 AS="$ac_cv_prog_AS"
3459 if test -n "$AS"; then
3460   echo "$ac_t""$AS" 1>&6
3461 else
3462   echo "$ac_t""no" 1>&6
3463 fi
3464
3465
3466 if test -z "$ac_cv_prog_AS"; then
3467 if test -n "$ac_tool_prefix"; then
3468   # Extract the first word of "as", so it can be a program name with args.
3469 set dummy as; ac_word=$2
3470 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3471 echo "configure:3472: checking for $ac_word" >&5
3472 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3473   echo $ac_n "(cached) $ac_c" 1>&6
3474 else
3475   if test -n "$AS"; then
3476   ac_cv_prog_AS="$AS" # Let the user override the test.
3477 else
3478   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3479   ac_dummy="$PATH"
3480   for ac_dir in $ac_dummy; do
3481     test -z "$ac_dir" && ac_dir=.
3482     if test -f $ac_dir/$ac_word; then
3483       ac_cv_prog_AS="as"
3484       break
3485     fi
3486   done
3487   IFS="$ac_save_ifs"
3488   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3489 fi
3490 fi
3491 AS="$ac_cv_prog_AS"
3492 if test -n "$AS"; then
3493   echo "$ac_t""$AS" 1>&6
3494 else
3495   echo "$ac_t""no" 1>&6
3496 fi
3497
3498 else
3499   AS="false"
3500 fi
3501 fi
3502
3503   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3504 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3505 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3506 echo "configure:3507: checking for $ac_word" >&5
3507 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   if test -n "$OBJDUMP"; then
3511   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3512 else
3513   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3514   ac_dummy="$PATH"
3515   for ac_dir in $ac_dummy; do
3516     test -z "$ac_dir" && ac_dir=.
3517     if test -f $ac_dir/$ac_word; then
3518       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3519       break
3520     fi
3521   done
3522   IFS="$ac_save_ifs"
3523 fi
3524 fi
3525 OBJDUMP="$ac_cv_prog_OBJDUMP"
3526 if test -n "$OBJDUMP"; then
3527   echo "$ac_t""$OBJDUMP" 1>&6
3528 else
3529   echo "$ac_t""no" 1>&6
3530 fi
3531
3532
3533 if test -z "$ac_cv_prog_OBJDUMP"; then
3534 if test -n "$ac_tool_prefix"; then
3535   # Extract the first word of "objdump", so it can be a program name with args.
3536 set dummy objdump; ac_word=$2
3537 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3538 echo "configure:3539: checking for $ac_word" >&5
3539 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3540   echo $ac_n "(cached) $ac_c" 1>&6
3541 else
3542   if test -n "$OBJDUMP"; then
3543   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3544 else
3545   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3546   ac_dummy="$PATH"
3547   for ac_dir in $ac_dummy; do
3548     test -z "$ac_dir" && ac_dir=.
3549     if test -f $ac_dir/$ac_word; then
3550       ac_cv_prog_OBJDUMP="objdump"
3551       break
3552     fi
3553   done
3554   IFS="$ac_save_ifs"
3555   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3556 fi
3557 fi
3558 OBJDUMP="$ac_cv_prog_OBJDUMP"
3559 if test -n "$OBJDUMP"; then
3560   echo "$ac_t""$OBJDUMP" 1>&6
3561 else
3562   echo "$ac_t""no" 1>&6
3563 fi
3564
3565 else
3566   OBJDUMP="false"
3567 fi
3568 fi
3569
3570   ;;
3571
3572 esac
3573
3574
3575 # Save cache, so that ltconfig can load it
3576
3577
3578 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3579 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3580 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3581 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3582 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3583 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3584 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3585 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3586
3587 # Reload cache, that may have been modified by ltconfig
3588
3589
3590 # This can be used to rebuild libtool when needed
3591 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3592
3593 # Always use our own libtool.
3594 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3595
3596 # Redirect the config.log output again, so that the ltconfig log is not
3597 # clobbered by the next message.
3598 exec 5>>./config.log
3599
3600
3601 for ac_prog in mawk gawk nawk awk
3602 do
3603 # Extract the first word of "$ac_prog", so it can be a program name with args.
3604 set dummy $ac_prog; ac_word=$2
3605 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3606 echo "configure:3607: checking for $ac_word" >&5
3607 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3608   echo $ac_n "(cached) $ac_c" 1>&6
3609 else
3610   if test -n "$AWK"; then
3611   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3612 else
3613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3614   ac_dummy="$PATH"
3615   for ac_dir in $ac_dummy; do
3616     test -z "$ac_dir" && ac_dir=.
3617     if test -f $ac_dir/$ac_word; then
3618       ac_cv_prog_AWK="$ac_prog"
3619       break
3620     fi
3621   done
3622   IFS="$ac_save_ifs"
3623 fi
3624 fi
3625 AWK="$ac_cv_prog_AWK"
3626 if test -n "$AWK"; then
3627   echo "$ac_t""$AWK" 1>&6
3628 else
3629   echo "$ac_t""no" 1>&6
3630 fi
3631
3632 test -n "$AWK" && break
3633 done
3634
3635 # test for ln hardlink support
3636 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3637 echo "configure:3638: checking whether ln works" >&5
3638 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   rm -f conftest.src conftest.dst
3642 echo "conftest" > conftest.src
3643 if ln conftest.src conftest.dst 2>/dev/null
3644 then
3645   ol_cv_prog_LN_H="ln"
3646 else
3647   ol_cv_prog_LN_H="cp"
3648 fi
3649 rm -f conftest.src conftest.dst
3650
3651 fi
3652 LN_H="$ol_cv_prog_LN_H"
3653 if test "$ol_cv_prog_LN_H" = "ln"; then
3654         echo "$ac_t""yes" 1>&6
3655 else
3656         echo "$ac_t""no" 1>&6
3657 fi
3658
3659 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3660 echo "configure:3661: checking whether ln -s works" >&5
3661 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3662   echo $ac_n "(cached) $ac_c" 1>&6
3663 else
3664   rm -f conftestdata
3665 if ln -s X conftestdata 2>/dev/null
3666 then
3667   rm -f conftestdata
3668   ac_cv_prog_LN_S="ln -s"
3669 else
3670   ac_cv_prog_LN_S=ln
3671 fi
3672 fi
3673 LN_S="$ac_cv_prog_LN_S"
3674 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3675   echo "$ac_t""yes" 1>&6
3676 else
3677   echo "$ac_t""no" 1>&6
3678 fi
3679
3680
3681 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3682         LN_S="$LN_H"
3683 fi
3684
3685 # Extract the first word of "sendmail", so it can be a program name with args.
3686 set dummy sendmail; ac_word=$2
3687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3688 echo "configure:3689: checking for $ac_word" >&5
3689 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3690   echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692   case "$SENDMAIL" in
3693   /*)
3694   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3695   ;;
3696   ?:/*)
3697   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3698   ;;
3699   *)
3700   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3701   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3702   for ac_dir in $ac_dummy; do 
3703     test -z "$ac_dir" && ac_dir=.
3704     if test -f $ac_dir/$ac_word; then
3705       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3706       break
3707     fi
3708   done
3709   IFS="$ac_save_ifs"
3710   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3711   ;;
3712 esac
3713 fi
3714 SENDMAIL="$ac_cv_path_SENDMAIL"
3715 if test -n "$SENDMAIL"; then
3716   echo "$ac_t""$SENDMAIL" 1>&6
3717 else
3718   echo "$ac_t""no" 1>&6
3719 fi
3720
3721 # Extract the first word of "vi", so it can be a program name with args.
3722 set dummy vi; ac_word=$2
3723 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3724 echo "configure:3725: checking for $ac_word" >&5
3725 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3726   echo $ac_n "(cached) $ac_c" 1>&6
3727 else
3728   case "$EDITOR" in
3729   /*)
3730   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3731   ;;
3732   ?:/*)
3733   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3734   ;;
3735   *)
3736   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3737   ac_dummy="$PATH:/usr/ucb"
3738   for ac_dir in $ac_dummy; do 
3739     test -z "$ac_dir" && ac_dir=.
3740     if test -f $ac_dir/$ac_word; then
3741       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3742       break
3743     fi
3744   done
3745   IFS="$ac_save_ifs"
3746   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3747   ;;
3748 esac
3749 fi
3750 EDITOR="$ac_cv_path_EDITOR"
3751 if test -n "$EDITOR"; then
3752   echo "$ac_t""$EDITOR" 1>&6
3753 else
3754   echo "$ac_t""no" 1>&6
3755 fi
3756
3757 # Extract the first word of "finger", so it can be a program name with args.
3758 set dummy finger; ac_word=$2
3759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3760 echo "configure:3761: checking for $ac_word" >&5
3761 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3762   echo $ac_n "(cached) $ac_c" 1>&6
3763 else
3764   case "$FINGER" in
3765   /*)
3766   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3767   ;;
3768   ?:/*)
3769   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3770   ;;
3771   *)
3772   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3773   ac_dummy="$PATH:/usr/ucb"
3774   for ac_dir in $ac_dummy; do 
3775     test -z "$ac_dir" && ac_dir=.
3776     if test -f $ac_dir/$ac_word; then
3777       ac_cv_path_FINGER="$ac_dir/$ac_word"
3778       break
3779     fi
3780   done
3781   IFS="$ac_save_ifs"
3782   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3783   ;;
3784 esac
3785 fi
3786 FINGER="$ac_cv_path_FINGER"
3787 if test -n "$FINGER"; then
3788   echo "$ac_t""$FINGER" 1>&6
3789 else
3790   echo "$ac_t""no" 1>&6
3791 fi
3792
3793
3794 ol_link_perl=no
3795 if test $ol_enable_perl != no ; then
3796         # Extract the first word of "perl", so it can be a program name with args.
3797 set dummy perl; ac_word=$2
3798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3799 echo "configure:3800: checking for $ac_word" >&5
3800 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3801   echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803   case "$PERLBIN" in
3804   /*)
3805   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3806   ;;
3807   ?:/*)
3808   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3809   ;;
3810   *)
3811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3812   ac_dummy="$PATH"
3813   for ac_dir in $ac_dummy; do 
3814     test -z "$ac_dir" && ac_dir=.
3815     if test -f $ac_dir/$ac_word; then
3816       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3817       break
3818     fi
3819   done
3820   IFS="$ac_save_ifs"
3821   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3822   ;;
3823 esac
3824 fi
3825 PERLBIN="$ac_cv_path_PERLBIN"
3826 if test -n "$PERLBIN"; then
3827   echo "$ac_t""$PERLBIN" 1>&6
3828 else
3829   echo "$ac_t""no" 1>&6
3830 fi
3831
3832
3833         if test "no$PERLBIN" = "no" ; then
3834                 if test $ol_enable_perl = yes ; then
3835                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3836                 fi
3837
3838         else
3839                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3840                 if test x"$ol_with_perl_module" = "xstatic" ; then
3841                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3842                 else
3843                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3844                 fi
3845                                 ol_link_perl=yes
3846         fi
3847 fi
3848
3849 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3850 echo "configure:3851: checking how to run the C preprocessor" >&5
3851 # On Suns, sometimes $CPP names a directory.
3852 if test -n "$CPP" && test -d "$CPP"; then
3853   CPP=
3854 fi
3855 if test -z "$CPP"; then
3856 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3857   echo $ac_n "(cached) $ac_c" 1>&6
3858 else
3859     # This must be in double quotes, not single quotes, because CPP may get
3860   # substituted into the Makefile and "${CC-cc}" will confuse make.
3861   CPP="${CC-cc} -E"
3862   # On the NeXT, cc -E runs the code through the compiler's parser,
3863   # not just through cpp.
3864   cat > conftest.$ac_ext <<EOF
3865 #line 3866 "configure"
3866 #include "confdefs.h"
3867 #include <assert.h>
3868 Syntax Error
3869 EOF
3870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3871 { (eval echo configure:3872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3873 if test -z "$ac_err"; then
3874   :
3875 else
3876   echo "$ac_err" >&5
3877   echo "configure: failed program was:" >&5
3878   cat conftest.$ac_ext >&5
3879   rm -rf conftest*
3880   CPP="${CC-cc} -E -traditional-cpp"
3881   cat > conftest.$ac_ext <<EOF
3882 #line 3883 "configure"
3883 #include "confdefs.h"
3884 #include <assert.h>
3885 Syntax Error
3886 EOF
3887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3888 { (eval echo configure:3889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3890 if test -z "$ac_err"; then
3891   :
3892 else
3893   echo "$ac_err" >&5
3894   echo "configure: failed program was:" >&5
3895   cat conftest.$ac_ext >&5
3896   rm -rf conftest*
3897   CPP="${CC-cc} -nologo -E"
3898   cat > conftest.$ac_ext <<EOF
3899 #line 3900 "configure"
3900 #include "confdefs.h"
3901 #include <assert.h>
3902 Syntax Error
3903 EOF
3904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3905 { (eval echo configure:3906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3907 if test -z "$ac_err"; then
3908   :
3909 else
3910   echo "$ac_err" >&5
3911   echo "configure: failed program was:" >&5
3912   cat conftest.$ac_ext >&5
3913   rm -rf conftest*
3914   CPP=/lib/cpp
3915 fi
3916 rm -f conftest*
3917 fi
3918 rm -f conftest*
3919 fi
3920 rm -f conftest*
3921   ac_cv_prog_CPP="$CPP"
3922 fi
3923   CPP="$ac_cv_prog_CPP"
3924 else
3925   ac_cv_prog_CPP="$CPP"
3926 fi
3927 echo "$ac_t""$CPP" 1>&6
3928
3929
3930 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3931         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3932
3933 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3934         echo "configure: warning: programs compiled here do run here..." 1>&2
3935         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3936
3937 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3938         echo "configure: warning: programs compiled here do not run here..." 1>&2
3939         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3940 fi
3941
3942 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3943 echo "configure:3944: checking for AIX" >&5
3944 cat > conftest.$ac_ext <<EOF
3945 #line 3946 "configure"
3946 #include "confdefs.h"
3947 #ifdef _AIX
3948   yes
3949 #endif
3950
3951 EOF
3952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3953   egrep "yes" >/dev/null 2>&1; then
3954   rm -rf conftest*
3955   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3956 #define _ALL_SOURCE 1
3957 EOF
3958
3959 else
3960   rm -rf conftest*
3961   echo "$ac_t""no" 1>&6
3962 fi
3963 rm -f conftest*
3964
3965
3966 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3967 echo "configure:3968: checking for POSIXized ISC" >&5
3968 if test -d /etc/conf/kconfig.d &&
3969   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3970 then
3971   echo "$ac_t""yes" 1>&6
3972   ISC=yes # If later tests want to check for ISC.
3973   cat >> confdefs.h <<\EOF
3974 #define _POSIX_SOURCE 1
3975 EOF
3976
3977   if test "$GCC" = yes; then
3978     CC="$CC -posix"
3979   else
3980     CC="$CC -Xp"
3981   fi
3982 else
3983   echo "$ac_t""no" 1>&6
3984   ISC=
3985 fi
3986
3987 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3988 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3989 echo "configure:3990: checking for minix/config.h" >&5
3990 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3991   echo $ac_n "(cached) $ac_c" 1>&6
3992 else
3993   cat > conftest.$ac_ext <<EOF
3994 #line 3995 "configure"
3995 #include "confdefs.h"
3996 #include <minix/config.h>
3997 EOF
3998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3999 { (eval echo configure:4000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4001 if test -z "$ac_err"; then
4002   rm -rf conftest*
4003   eval "ac_cv_header_$ac_safe=yes"
4004 else
4005   echo "$ac_err" >&5
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   eval "ac_cv_header_$ac_safe=no"
4010 fi
4011 rm -f conftest*
4012 fi
4013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4014   echo "$ac_t""yes" 1>&6
4015   MINIX=yes
4016 else
4017   echo "$ac_t""no" 1>&6
4018 MINIX=
4019 fi
4020
4021 if test "$MINIX" = yes; then
4022   cat >> confdefs.h <<\EOF
4023 #define _POSIX_SOURCE 1
4024 EOF
4025
4026   cat >> confdefs.h <<\EOF
4027 #define _POSIX_1_SOURCE 2
4028 EOF
4029
4030   cat >> confdefs.h <<\EOF
4031 #define _MINIX 1
4032 EOF
4033
4034 fi
4035
4036
4037 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4038 echo "configure:4039: checking for Cygwin environment" >&5
4039 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
4040   echo $ac_n "(cached) $ac_c" 1>&6
4041 else
4042   cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045
4046 int main() {
4047
4048 #ifndef __CYGWIN__
4049 #define __CYGWIN__ __CYGWIN32__
4050 #endif
4051 return __CYGWIN__;
4052 ; return 0; }
4053 EOF
4054 if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4055   rm -rf conftest*
4056   ac_cv_cygwin=yes
4057 else
4058   echo "configure: failed program was:" >&5
4059   cat conftest.$ac_ext >&5
4060   rm -rf conftest*
4061   ac_cv_cygwin=no
4062 fi
4063 rm -f conftest*
4064 fi
4065
4066 echo "$ac_t""$ac_cv_cygwin" 1>&6
4067 CYGWIN=
4068 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4069 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4070 echo "configure:4071: checking for mingw32 environment" >&5
4071 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
4072   echo $ac_n "(cached) $ac_c" 1>&6
4073 else
4074   cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077
4078 int main() {
4079 return __MINGW32__;
4080 ; return 0; }
4081 EOF
4082 if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4083   rm -rf conftest*
4084   ac_cv_mingw32=yes
4085 else
4086   echo "configure: failed program was:" >&5
4087   cat conftest.$ac_ext >&5
4088   rm -rf conftest*
4089   ac_cv_mingw32=no
4090 fi
4091 rm -f conftest*
4092 fi
4093
4094 echo "$ac_t""$ac_cv_mingw32" 1>&6
4095 MINGW32=
4096 test "$ac_cv_mingw32" = yes && MINGW32=yes
4097 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
4098 echo "configure:4099: checking for EMX OS/2 environment" >&5
4099 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
4100   echo $ac_n "(cached) $ac_c" 1>&6
4101 else
4102   cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105
4106 int main() {
4107 return __EMX__;
4108 ; return 0; }
4109 EOF
4110 if { (eval echo configure:4111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4111   rm -rf conftest*
4112   ac_cv_emxos2=yes
4113 else
4114   echo "configure: failed program was:" >&5
4115   cat conftest.$ac_ext >&5
4116   rm -rf conftest*
4117   ac_cv_emxos2=no
4118 fi
4119 rm -f conftest*
4120 fi
4121
4122 echo "$ac_t""$ac_cv_emxos2" 1>&6
4123 EMXOS2=
4124 test "$ac_cv_emxos2" = yes && EMXOS2=yes
4125
4126
4127
4128 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4129 echo "configure:4130: checking for executable suffix" >&5
4130 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4131   echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4134   ac_cv_exeext=.exe
4135 else
4136   rm -f conftest*
4137   echo 'int main () { return 0; }' > conftest.$ac_ext
4138   ac_cv_exeext=
4139   if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4140     for file in conftest.*; do
4141       case $file in
4142       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4143       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4144       esac
4145     done
4146   else
4147     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4148   fi
4149   rm -f conftest*
4150   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4151 fi
4152 fi
4153
4154 EXEEXT=""
4155 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4156 echo "$ac_t""${ac_cv_exeext}" 1>&6
4157 ac_exeext=$EXEEXT
4158
4159 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4160 echo "configure:4161: checking for object suffix" >&5
4161 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4162   echo $ac_n "(cached) $ac_c" 1>&6
4163 else
4164   rm -f conftest*
4165 echo 'int i = 1;' > conftest.$ac_ext
4166 if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4167   for ac_file in conftest.*; do
4168     case $ac_file in
4169     *.c) ;;
4170     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4171     esac
4172   done
4173 else
4174   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4175 fi
4176 rm -f conftest*
4177 fi
4178
4179 echo "$ac_t""$ac_cv_objext" 1>&6
4180 OBJEXT=$ac_cv_objext
4181 ac_objext=$ac_cv_objext
4182
4183
4184 cat >> confdefs.h <<EOF
4185 #define EXEEXT "${EXEEXT}"
4186 EOF
4187
4188
4189 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4190 echo "configure:4191: checking for be_app in -lbe" >&5
4191 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   ac_save_LIBS="$LIBS"
4196 LIBS="-lbe -lroot -lnet $LIBS"
4197 cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 /* Override any gcc2 internal prototype to avoid an error.  */
4201 /* We use char because int might match the return type of a gcc2
4202     builtin and then its argument prototype would still apply.  */
4203 char be_app();
4204
4205 int main() {
4206 be_app()
4207 ; return 0; }
4208 EOF
4209 if { (eval echo configure:4210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4210   rm -rf conftest*
4211   eval "ac_cv_lib_$ac_lib_var=yes"
4212 else
4213   echo "configure: failed program was:" >&5
4214   cat conftest.$ac_ext >&5
4215   rm -rf conftest*
4216   eval "ac_cv_lib_$ac_lib_var=no"
4217 fi
4218 rm -f conftest*
4219 LIBS="$ac_save_LIBS"
4220
4221 fi
4222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4223   echo "$ac_t""yes" 1>&6
4224   LIBS="$LIBS -lbe -lroot -lnet"
4225 else
4226   echo "$ac_t""no" 1>&6
4227 :
4228 fi
4229
4230
4231
4232
4233
4234 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4235 echo "configure:4236: checking for ${CC-cc} option to accept ANSI C" >&5
4236 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   am_cv_prog_cc_stdc=no
4240 ac_save_CC="$CC"
4241 # Don't try gcc -ansi; that turns off useful extensions and
4242 # breaks some systems' header files.
4243 # AIX                   -qlanglvl=ansi
4244 # Ultrix and OSF/1      -std1
4245 # HP-UX 10.20 and later -Ae
4246 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4247 # SVR4                  -Xc -D__EXTENSIONS__
4248 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4249 do
4250   CC="$ac_save_CC $ac_arg"
4251   cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 #include <stdarg.h>
4255 #include <stdio.h>
4256 #include <sys/types.h>
4257 #include <sys/stat.h>
4258 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4259 struct buf { int x; };
4260 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4261 static char *e (p, i)
4262      char **p;
4263      int i;
4264 {
4265   return p[i];
4266 }
4267 static char *f (char * (*g) (char **, int), char **p, ...)
4268 {
4269   char *s;
4270   va_list v;
4271   va_start (v,p);
4272   s = g (p, va_arg (v,int));
4273   va_end (v);
4274   return s;
4275 }
4276 int test (int i, double x);
4277 struct s1 {int (*f) (int a);};
4278 struct s2 {int (*f) (double a);};
4279 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4280 int argc;
4281 char **argv;
4282
4283 int main() {
4284
4285 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4286
4287 ; return 0; }
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4290   rm -rf conftest*
4291   am_cv_prog_cc_stdc="$ac_arg"; break
4292 else
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295 fi
4296 rm -f conftest*
4297 done
4298 CC="$ac_save_CC"
4299
4300 fi
4301
4302 if test -z "$am_cv_prog_cc_stdc"; then
4303   echo "$ac_t""none needed" 1>&6
4304 else
4305   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4306 fi
4307 case "x$am_cv_prog_cc_stdc" in
4308   x|xno) ;;
4309   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4310 esac
4311
4312 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4313         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4314 fi
4315
4316 # test for make depend flag
4317 OL_MKDEP=
4318 OL_MKDEP_FLAGS=
4319 if test -z "${MKDEP}"; then
4320         OL_MKDEP="${CC-cc}"
4321         if test -z "${MKDEP_FLAGS}"; then
4322                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4323 echo "configure:4324: checking for ${OL_MKDEP} depend flag" >&5
4324 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   
4328                         ol_cv_mkdep=no
4329                         for flag in "-M" "-xM"; do
4330                                 cat > conftest.c <<EOF
4331  noCode;
4332 EOF
4333                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4334                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4335                                 then
4336                                         if test ! -f conftest."${ac_object}" ; then
4337                                                 ol_cv_mkdep=$flag
4338                                                 OL_MKDEP_FLAGS="$flag"
4339                                                 break
4340                                         fi
4341                                 fi
4342                         done
4343                         rm -f conftest*
4344                 
4345 fi
4346
4347 echo "$ac_t""$ol_cv_mkdep" 1>&6
4348         else
4349                 cc_cv_mkdep=yes
4350                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4351         fi
4352 else
4353         cc_cv_mkdep=yes
4354         OL_MKDEP="${MKDEP}"
4355         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4356 fi
4357
4358
4359
4360 if test "${ol_cv_mkdep}" = no ; then
4361         # this will soon become an error
4362         echo "configure: warning: do not know how to generate dependencies" 1>&2
4363 fi
4364
4365 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4366 echo "configure:4367: checking for afopen in -ls" >&5
4367 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4369   echo $ac_n "(cached) $ac_c" 1>&6
4370 else
4371   ac_save_LIBS="$LIBS"
4372 LIBS="-ls  $LIBS"
4373 cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 /* Override any gcc2 internal prototype to avoid an error.  */
4377 /* We use char because int might match the return type of a gcc2
4378     builtin and then its argument prototype would still apply.  */
4379 char afopen();
4380
4381 int main() {
4382 afopen()
4383 ; return 0; }
4384 EOF
4385 if { (eval echo configure:4386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4386   rm -rf conftest*
4387   eval "ac_cv_lib_$ac_lib_var=yes"
4388 else
4389   echo "configure: failed program was:" >&5
4390   cat conftest.$ac_ext >&5
4391   rm -rf conftest*
4392   eval "ac_cv_lib_$ac_lib_var=no"
4393 fi
4394 rm -f conftest*
4395 LIBS="$ac_save_LIBS"
4396
4397 fi
4398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4399   echo "$ac_t""yes" 1>&6
4400   
4401         AUTH_LIBS=-ls
4402         cat >> confdefs.h <<\EOF
4403 #define HAVE_AIX_SECURITY 1
4404 EOF
4405
4406
4407 else
4408   echo "$ac_t""no" 1>&6
4409 fi
4410
4411
4412
4413 ol_link_modules=no
4414 if test $ol_enable_modules != no ; then
4415         for ac_hdr in ltdl.h
4416 do
4417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4419 echo "configure:4420: checking for $ac_hdr" >&5
4420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4421   echo $ac_n "(cached) $ac_c" 1>&6
4422 else
4423   cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426 #include <$ac_hdr>
4427 EOF
4428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4429 { (eval echo configure:4430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4431 if test -z "$ac_err"; then
4432   rm -rf conftest*
4433   eval "ac_cv_header_$ac_safe=yes"
4434 else
4435   echo "$ac_err" >&5
4436   echo "configure: failed program was:" >&5
4437   cat conftest.$ac_ext >&5
4438   rm -rf conftest*
4439   eval "ac_cv_header_$ac_safe=no"
4440 fi
4441 rm -f conftest*
4442 fi
4443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4444   echo "$ac_t""yes" 1>&6
4445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4446   cat >> confdefs.h <<EOF
4447 #define $ac_tr_hdr 1
4448 EOF
4449  
4450 else
4451   echo "$ac_t""no" 1>&6
4452 fi
4453 done
4454
4455
4456         if test $ac_cv_header_ltdl_h = no ; then
4457                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4458         fi
4459
4460         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4461 echo "configure:4462: checking for lt_dlinit in -lltdl" >&5
4462 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466   ac_save_LIBS="$LIBS"
4467 LIBS="-lltdl  $LIBS"
4468 cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471 /* Override any gcc2 internal prototype to avoid an error.  */
4472 /* We use char because int might match the return type of a gcc2
4473     builtin and then its argument prototype would still apply.  */
4474 char lt_dlinit();
4475
4476 int main() {
4477 lt_dlinit()
4478 ; return 0; }
4479 EOF
4480 if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4481   rm -rf conftest*
4482   eval "ac_cv_lib_$ac_lib_var=yes"
4483 else
4484   echo "configure: failed program was:" >&5
4485   cat conftest.$ac_ext >&5
4486   rm -rf conftest*
4487   eval "ac_cv_lib_$ac_lib_var=no"
4488 fi
4489 rm -f conftest*
4490 LIBS="$ac_save_LIBS"
4491
4492 fi
4493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4494   echo "$ac_t""yes" 1>&6
4495   
4496             MODULES_LIBS=-lltdl
4497             cat >> confdefs.h <<\EOF
4498 #define HAVE_LIBLTDL 1
4499 EOF
4500
4501         
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505
4506
4507         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4508                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4509         fi
4510         ol_link_modules=yes
4511 else
4512         ol_with_bdb_module=static
4513         ol_with_dnssrv_module=static
4514         ol_with_ldap_module=static
4515         ol_with_ldbm_module=static
4516         ol_with_meta_module=static
4517         ol_with_monitor_module=static
4518         ol_with_passwd_module=static
4519         ol_with_perl_module=static
4520         ol_with_shell_module=static
4521         ol_with_tcl_module=static
4522         ol_with_sql_module=static
4523 fi
4524
4525 # test for EBCDIC
4526 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4527 echo "configure:4528: checking for EBCDIC" >&5
4528 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4529   echo $ac_n "(cached) $ac_c" 1>&6
4530 else
4531   
4532         cat > conftest.$ac_ext <<EOF
4533 #line 4534 "configure"
4534 #include "confdefs.h"
4535
4536 #if !('M' == 0xd4)
4537 #include <__ASCII__/generate_error.h>
4538 #endif
4539
4540 EOF
4541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4542 { (eval echo configure:4543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4544 if test -z "$ac_err"; then
4545   rm -rf conftest*
4546   ol_cv_cpp_ebcdic=yes
4547 else
4548   echo "$ac_err" >&5
4549   echo "configure: failed program was:" >&5
4550   cat conftest.$ac_ext >&5
4551   rm -rf conftest*
4552   ol_cv_cpp_ebcdic=no
4553 fi
4554 rm -f conftest*
4555 fi
4556
4557 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4558 if test $ol_cv_cpp_ebcdic = yes ; then
4559         cat >> confdefs.h <<\EOF
4560 #define HAVE_EBCDIC 1
4561 EOF
4562
4563 fi
4564
4565 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4566 echo "configure:4567: checking for ANSI C header files" >&5
4567 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4568   echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570   cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 #include "confdefs.h"
4573 #include <stdlib.h>
4574 #include <stdarg.h>
4575 #include <string.h>
4576 #include <float.h>
4577 EOF
4578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4579 { (eval echo configure:4580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4581 if test -z "$ac_err"; then
4582   rm -rf conftest*
4583   ol_cv_header_stdc=yes
4584 else
4585   echo "$ac_err" >&5
4586   echo "configure: failed program was:" >&5
4587   cat conftest.$ac_ext >&5
4588   rm -rf conftest*
4589   ol_cv_header_stdc=no
4590 fi
4591 rm -f conftest*
4592
4593 if test $ol_cv_header_stdc = yes; then
4594   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4595 cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 #include <string.h>
4599 EOF
4600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4601   egrep "memchr" >/dev/null 2>&1; then
4602   :
4603 else
4604   rm -rf conftest*
4605   ol_cv_header_stdc=no
4606 fi
4607 rm -f conftest*
4608
4609 fi
4610
4611 if test $ol_cv_header_stdc = yes; then
4612   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4613 cat > conftest.$ac_ext <<EOF
4614 #line 4615 "configure"
4615 #include "confdefs.h"
4616 #include <stdlib.h>
4617 EOF
4618 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4619   egrep "free" >/dev/null 2>&1; then
4620   :
4621 else
4622   rm -rf conftest*
4623   ol_cv_header_stdc=no
4624 fi
4625 rm -f conftest*
4626
4627 fi
4628
4629 if test $ol_cv_header_stdc = yes; then
4630   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4631 if test "$cross_compiling" = yes; then
4632   :
4633 else
4634   cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637 #include <ctype.h>
4638 #ifndef HAVE_EBCDIC
4639 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4640 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4641 #else
4642 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4643                 || ('j' <= (c) && (c) <= 'r') \
4644                 || ('s' <= (c) && (c) <= 'z'))
4645 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4646 #endif
4647 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4648 int main () { int i; for (i = 0; i < 256; i++)
4649 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4650 exit (0); }
4651
4652 EOF
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4654 then
4655   :
4656 else
4657   echo "configure: failed program was:" >&5
4658   cat conftest.$ac_ext >&5
4659   rm -fr conftest*
4660   ol_cv_header_stdc=no
4661 fi
4662 rm -fr conftest*
4663 fi
4664
4665 fi
4666 fi
4667
4668 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4669 if test $ol_cv_header_stdc = yes; then
4670   cat >> confdefs.h <<\EOF
4671 #define STDC_HEADERS 1
4672 EOF
4673
4674 fi
4675 ac_cv_header_stdc=disable
4676
4677
4678 if test $ol_cv_header_stdc != yes; then
4679         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4680 fi
4681
4682 ac_header_dirent=no
4683 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4684 do
4685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4686 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4687 echo "configure:4688: checking for $ac_hdr that defines DIR" >&5
4688 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 #include <sys/types.h>
4695 #include <$ac_hdr>
4696 int main() {
4697 DIR *dirp = 0;
4698 ; return 0; }
4699 EOF
4700 if { (eval echo configure:4701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4701   rm -rf conftest*
4702   eval "ac_cv_header_dirent_$ac_safe=yes"
4703 else
4704   echo "configure: failed program was:" >&5
4705   cat conftest.$ac_ext >&5
4706   rm -rf conftest*
4707   eval "ac_cv_header_dirent_$ac_safe=no"
4708 fi
4709 rm -f conftest*
4710 fi
4711 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4712   echo "$ac_t""yes" 1>&6
4713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4714   cat >> confdefs.h <<EOF
4715 #define $ac_tr_hdr 1
4716 EOF
4717  ac_header_dirent=$ac_hdr; break
4718 else
4719   echo "$ac_t""no" 1>&6
4720 fi
4721 done
4722 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4723 if test $ac_header_dirent = dirent.h; then
4724 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4725 echo "configure:4726: checking for opendir in -ldir" >&5
4726 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4727 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4728   echo $ac_n "(cached) $ac_c" 1>&6
4729 else
4730   ac_save_LIBS="$LIBS"
4731 LIBS="-ldir  $LIBS"
4732 cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735 /* Override any gcc2 internal prototype to avoid an error.  */
4736 /* We use char because int might match the return type of a gcc2
4737     builtin and then its argument prototype would still apply.  */
4738 char opendir();
4739
4740 int main() {
4741 opendir()
4742 ; return 0; }
4743 EOF
4744 if { (eval echo configure:4745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4745   rm -rf conftest*
4746   eval "ac_cv_lib_$ac_lib_var=yes"
4747 else
4748   echo "configure: failed program was:" >&5
4749   cat conftest.$ac_ext >&5
4750   rm -rf conftest*
4751   eval "ac_cv_lib_$ac_lib_var=no"
4752 fi
4753 rm -f conftest*
4754 LIBS="$ac_save_LIBS"
4755
4756 fi
4757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4758   echo "$ac_t""yes" 1>&6
4759   LIBS="$LIBS -ldir"
4760 else
4761   echo "$ac_t""no" 1>&6
4762 fi
4763
4764 else
4765 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4766 echo "configure:4767: checking for opendir in -lx" >&5
4767 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4768 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4769   echo $ac_n "(cached) $ac_c" 1>&6
4770 else
4771   ac_save_LIBS="$LIBS"
4772 LIBS="-lx  $LIBS"
4773 cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776 /* Override any gcc2 internal prototype to avoid an error.  */
4777 /* We use char because int might match the return type of a gcc2
4778     builtin and then its argument prototype would still apply.  */
4779 char opendir();
4780
4781 int main() {
4782 opendir()
4783 ; return 0; }
4784 EOF
4785 if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786   rm -rf conftest*
4787   eval "ac_cv_lib_$ac_lib_var=yes"
4788 else
4789   echo "configure: failed program was:" >&5
4790   cat conftest.$ac_ext >&5
4791   rm -rf conftest*
4792   eval "ac_cv_lib_$ac_lib_var=no"
4793 fi
4794 rm -f conftest*
4795 LIBS="$ac_save_LIBS"
4796
4797 fi
4798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4799   echo "$ac_t""yes" 1>&6
4800   LIBS="$LIBS -lx"
4801 else
4802   echo "$ac_t""no" 1>&6
4803 fi
4804
4805 fi
4806
4807 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4808 echo "configure:4809: checking for sys/wait.h that is POSIX.1 compatible" >&5
4809 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4810   echo $ac_n "(cached) $ac_c" 1>&6
4811 else
4812   cat > conftest.$ac_ext <<EOF
4813 #line 4814 "configure"
4814 #include "confdefs.h"
4815 #include <sys/types.h>
4816 #include <sys/wait.h>
4817 #ifndef WEXITSTATUS
4818 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4819 #endif
4820 #ifndef WIFEXITED
4821 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4822 #endif
4823 int main() {
4824 int s;
4825 wait (&s);
4826 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4827 ; return 0; }
4828 EOF
4829 if { (eval echo configure:4830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4830   rm -rf conftest*
4831   ac_cv_header_sys_wait_h=yes
4832 else
4833   echo "configure: failed program was:" >&5
4834   cat conftest.$ac_ext >&5
4835   rm -rf conftest*
4836   ac_cv_header_sys_wait_h=no
4837 fi
4838 rm -f conftest*
4839 fi
4840
4841 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4842 if test $ac_cv_header_sys_wait_h = yes; then
4843   cat >> confdefs.h <<\EOF
4844 #define HAVE_SYS_WAIT_H 1
4845 EOF
4846
4847 fi
4848
4849 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4850 echo "configure:4851: checking POSIX termios" >&5
4851 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4852   echo $ac_n "(cached) $ac_c" 1>&6
4853 else
4854   cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857 #include <sys/types.h>
4858 #include <unistd.h>
4859 #include <termios.h>
4860 int main() {
4861 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4862    tcgetattr(0, 0);
4863 ; return 0; }
4864 EOF
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866   rm -rf conftest*
4867   am_cv_sys_posix_termios=yes
4868 else
4869   echo "configure: failed program was:" >&5
4870   cat conftest.$ac_ext >&5
4871   rm -rf conftest*
4872   am_cv_sys_posix_termios=no
4873 fi
4874 rm -f conftest*
4875 fi
4876
4877 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4878
4879
4880  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4881 echo "configure:4882: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4882 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4883   echo $ac_n "(cached) $ac_c" 1>&6
4884 else
4885   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4886
4887   gwinsz_in_termios_h=no
4888   if test $am_cv_sys_posix_termios = yes; then
4889     cat > conftest.$ac_ext <<EOF
4890 #line 4891 "configure"
4891 #include "confdefs.h"
4892 #include <sys/types.h>
4893 #     include <termios.h>
4894 #     ifdef TIOCGWINSZ
4895         yes
4896 #     endif
4897     
4898 EOF
4899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4900   egrep "yes" >/dev/null 2>&1; then
4901   rm -rf conftest*
4902   gwinsz_in_termios_h=yes
4903 fi
4904 rm -f conftest*
4905
4906   fi
4907
4908   if test $gwinsz_in_termios_h = no; then
4909     cat > conftest.$ac_ext <<EOF
4910 #line 4911 "configure"
4911 #include "confdefs.h"
4912 #include <sys/types.h>
4913 #     include <sys/ioctl.h>
4914 #     ifdef TIOCGWINSZ
4915         yes
4916 #     endif
4917     
4918 EOF
4919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4920   egrep "yes" >/dev/null 2>&1; then
4921   rm -rf conftest*
4922   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4923 fi
4924 rm -f conftest*
4925
4926   fi
4927   
4928 fi
4929
4930 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4931   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4932     cat >> confdefs.h <<\EOF
4933 #define GWINSZ_IN_SYS_IOCTL 1
4934 EOF
4935
4936   fi
4937
4938 if test $am_cv_sys_posix_termios = yes ; then
4939         cat >> confdefs.h <<\EOF
4940 #define HAVE_POSIX_TERMIOS 1
4941 EOF
4942
4943 fi
4944
4945 for ac_hdr in \
4946         arpa/inet.h             \
4947         arpa/nameser.h  \
4948         assert.h                \
4949         conio.h                 \
4950         crypt.h                 \
4951         direct.h                \
4952         errno.h                 \
4953         fcntl.h                 \
4954         filio.h                 \
4955         getopt.h                \
4956         grp.h                   \
4957         io.h                    \
4958         libutil.h               \
4959         limits.h                \
4960         locale.h                \
4961         netinet/tcp.h   \
4962         malloc.h                \
4963         memory.h                \
4964         psap.h                  \
4965         pwd.h                   \
4966         process.h               \
4967         resolv.h                \
4968         sgtty.h                 \
4969         shadow.h                \
4970         stddef.h                \
4971         string.h                \
4972         strings.h               \
4973         sysexits.h              \
4974         sys/file.h              \
4975         sys/filio.h             \
4976         sys/errno.h             \
4977         sys/ioctl.h             \
4978         sys/param.h             \
4979         sys/resource.h  \
4980         sys/select.h    \
4981         sys/socket.h    \
4982         sys/syslog.h    \
4983         sys/time.h              \
4984         sys/types.h             \
4985         syslog.h                \
4986         termios.h               \
4987         unistd.h                \
4988         winsock.h               \
4989
4990 do
4991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4993 echo "configure:4994: checking for $ac_hdr" >&5
4994 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4995   echo $ac_n "(cached) $ac_c" 1>&6
4996 else
4997   cat > conftest.$ac_ext <<EOF
4998 #line 4999 "configure"
4999 #include "confdefs.h"
5000 #include <$ac_hdr>
5001 EOF
5002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5003 { (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5005 if test -z "$ac_err"; then
5006   rm -rf conftest*
5007   eval "ac_cv_header_$ac_safe=yes"
5008 else
5009   echo "$ac_err" >&5
5010   echo "configure: failed program was:" >&5
5011   cat conftest.$ac_ext >&5
5012   rm -rf conftest*
5013   eval "ac_cv_header_$ac_safe=no"
5014 fi
5015 rm -f conftest*
5016 fi
5017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_hdr 1
5022 EOF
5023  
5024 else
5025   echo "$ac_t""no" 1>&6
5026 fi
5027 done
5028
5029
5030
5031
5032 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
5033 echo "configure:5034: checking for dlopen" >&5
5034 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
5035   echo $ac_n "(cached) $ac_c" 1>&6
5036 else
5037   cat > conftest.$ac_ext <<EOF
5038 #line 5039 "configure"
5039 #include "confdefs.h"
5040 /* System header to define __stub macros and hopefully few prototypes,
5041     which can conflict with char dlopen(); below.  */
5042 #include <assert.h>
5043 /* Override any gcc2 internal prototype to avoid an error.  */
5044 /* We use char because int might match the return type of a gcc2
5045     builtin and then its argument prototype would still apply.  */
5046 char dlopen();
5047 char (*f)();
5048
5049 int main() {
5050
5051 /* The GNU C library defines this for functions which it implements
5052     to always fail with ENOSYS.  Some functions are actually named
5053     something starting with __ and the normal name is an alias.  */
5054 #if defined (__stub_dlopen) || defined (__stub___dlopen)
5055 choke me
5056 #else
5057 f = dlopen;
5058 #endif
5059
5060 ; return 0; }
5061 EOF
5062 if { (eval echo configure:5063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5063   rm -rf conftest*
5064   eval "ac_cv_func_dlopen=yes"
5065 else
5066   echo "configure: failed program was:" >&5
5067   cat conftest.$ac_ext >&5
5068   rm -rf conftest*
5069   eval "ac_cv_func_dlopen=no"
5070 fi
5071 rm -f conftest*
5072 fi
5073
5074 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
5075   echo "$ac_t""yes" 1>&6
5076   :
5077 else
5078   echo "$ac_t""no" 1>&6
5079 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5080 echo "configure:5081: checking for dlopen in -ldl" >&5
5081 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
5082 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5083   echo $ac_n "(cached) $ac_c" 1>&6
5084 else
5085   ac_save_LIBS="$LIBS"
5086 LIBS="-ldl  $LIBS"
5087 cat > conftest.$ac_ext <<EOF
5088 #line 5089 "configure"
5089 #include "confdefs.h"
5090 /* Override any gcc2 internal prototype to avoid an error.  */
5091 /* We use char because int might match the return type of a gcc2
5092     builtin and then its argument prototype would still apply.  */
5093 char dlopen();
5094
5095 int main() {
5096 dlopen()
5097 ; return 0; }
5098 EOF
5099 if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5100   rm -rf conftest*
5101   eval "ac_cv_lib_$ac_lib_var=yes"
5102 else
5103   echo "configure: failed program was:" >&5
5104   cat conftest.$ac_ext >&5
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=no"
5107 fi
5108 rm -f conftest*
5109 LIBS="$ac_save_LIBS"
5110
5111 fi
5112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5113   echo "$ac_t""yes" 1>&6
5114     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5115     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5116   cat >> confdefs.h <<EOF
5117 #define $ac_tr_lib 1
5118 EOF
5119
5120   LIBS="-ldl $LIBS"
5121
5122 else
5123   echo "$ac_t""no" 1>&6
5124 fi
5125
5126 fi
5127
5128
5129 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5130 echo "configure:5131: checking for sigset in -lV3" >&5
5131 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5133   echo $ac_n "(cached) $ac_c" 1>&6
5134 else
5135   ac_save_LIBS="$LIBS"
5136 LIBS="-lV3  $LIBS"
5137 cat > conftest.$ac_ext <<EOF
5138 #line 5139 "configure"
5139 #include "confdefs.h"
5140 /* Override any gcc2 internal prototype to avoid an error.  */
5141 /* We use char because int might match the return type of a gcc2
5142     builtin and then its argument prototype would still apply.  */
5143 char sigset();
5144
5145 int main() {
5146 sigset()
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150   rm -rf conftest*
5151   eval "ac_cv_lib_$ac_lib_var=yes"
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=no"
5157 fi
5158 rm -f conftest*
5159 LIBS="$ac_save_LIBS"
5160
5161 fi
5162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5163   echo "$ac_t""yes" 1>&6
5164     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5165     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5166   cat >> confdefs.h <<EOF
5167 #define $ac_tr_lib 1
5168 EOF
5169
5170   LIBS="-lV3 $LIBS"
5171
5172 else
5173   echo "$ac_t""no" 1>&6
5174 fi
5175
5176
5177 if test $ac_cv_header_winsock_h = yes; then
5178         echo $ac_n "checking for winsock""... $ac_c" 1>&6
5179 echo "configure:5180: checking for winsock" >&5
5180 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
5181   echo $ac_n "(cached) $ac_c" 1>&6
5182 else
5183   cat > conftest.$ac_ext <<EOF
5184 #line 5185 "configure"
5185 #include "confdefs.h"
5186 #include <winsock.h>
5187 int main() {
5188
5189                         socket(0,0,0);
5190                         select(0,NULL,NULL,NULL,NULL);
5191                         closesocket(0);
5192                         gethostname(NULL,0);
5193         
5194 ; return 0; }
5195 EOF
5196 if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5197   rm -rf conftest*
5198   ol_cv_winsock=yes
5199 else
5200   echo "configure: failed program was:" >&5
5201   cat conftest.$ac_ext >&5
5202   rm -rf conftest*
5203   ol_cv_winsock=no
5204 fi
5205 rm -f conftest*
5206 fi
5207
5208 echo "$ac_t""$ol_cv_winsock" 1>&6
5209
5210         if test $ol_cv_winsock = yes ; then
5211                 cat >> confdefs.h <<\EOF
5212 #define HAVE_WINSOCK 1
5213 EOF
5214
5215                 ac_cv_func_socket=yes
5216                 ac_cv_func_select=yes
5217                 ac_cv_func_closesocket=yes
5218                 ac_cv_func_gethostname=yes
5219         fi
5220 fi
5221
5222
5223 echo $ac_n "checking for socket""... $ac_c" 1>&6
5224 echo "configure:5225: checking for socket" >&5
5225 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5226   echo $ac_n "(cached) $ac_c" 1>&6
5227 else
5228   cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231 /* System header to define __stub macros and hopefully few prototypes,
5232     which can conflict with char socket(); below.  */
5233 #include <assert.h>
5234 /* Override any gcc2 internal prototype to avoid an error.  */
5235 /* We use char because int might match the return type of a gcc2
5236     builtin and then its argument prototype would still apply.  */
5237 char socket();
5238 char (*f)();
5239
5240 int main() {
5241
5242 /* The GNU C library defines this for functions which it implements
5243     to always fail with ENOSYS.  Some functions are actually named
5244     something starting with __ and the normal name is an alias.  */
5245 #if defined (__stub_socket) || defined (__stub___socket)
5246 choke me
5247 #else
5248 f = socket;
5249 #endif
5250
5251 ; return 0; }
5252 EOF
5253 if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5254   rm -rf conftest*
5255   eval "ac_cv_func_socket=yes"
5256 else
5257   echo "configure: failed program was:" >&5
5258   cat conftest.$ac_ext >&5
5259   rm -rf conftest*
5260   eval "ac_cv_func_socket=no"
5261 fi
5262 rm -f conftest*
5263 fi
5264
5265 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5266   echo "$ac_t""yes" 1>&6
5267   :
5268 else
5269   echo "$ac_t""no" 1>&6
5270         
5271         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5272 echo "configure:5273: checking for main in -lsocket" >&5
5273 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5274 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5275   echo $ac_n "(cached) $ac_c" 1>&6
5276 else
5277   ac_save_LIBS="$LIBS"
5278 LIBS="-lsocket  $LIBS"
5279 cat > conftest.$ac_ext <<EOF
5280 #line 5281 "configure"
5281 #include "confdefs.h"
5282
5283 int main() {
5284 main()
5285 ; return 0; }
5286 EOF
5287 if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5288   rm -rf conftest*
5289   eval "ac_cv_lib_$ac_lib_var=yes"
5290 else
5291   echo "configure: failed program was:" >&5
5292   cat conftest.$ac_ext >&5
5293   rm -rf conftest*
5294   eval "ac_cv_lib_$ac_lib_var=no"
5295 fi
5296 rm -f conftest*
5297 LIBS="$ac_save_LIBS"
5298
5299 fi
5300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5301   echo "$ac_t""yes" 1>&6
5302     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5304   cat >> confdefs.h <<EOF
5305 #define $ac_tr_lib 1
5306 EOF
5307
5308   LIBS="-lsocket $LIBS"
5309
5310 else
5311   echo "$ac_t""no" 1>&6
5312 fi
5313
5314         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5315 echo "configure:5316: checking for main in -lnet" >&5
5316 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5318   echo $ac_n "(cached) $ac_c" 1>&6
5319 else
5320   ac_save_LIBS="$LIBS"
5321 LIBS="-lnet  $LIBS"
5322 cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325
5326 int main() {
5327 main()
5328 ; return 0; }
5329 EOF
5330 if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5331   rm -rf conftest*
5332   eval "ac_cv_lib_$ac_lib_var=yes"
5333 else
5334   echo "configure: failed program was:" >&5
5335   cat conftest.$ac_ext >&5
5336   rm -rf conftest*
5337   eval "ac_cv_lib_$ac_lib_var=no"
5338 fi
5339 rm -f conftest*
5340 LIBS="$ac_save_LIBS"
5341
5342 fi
5343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5344   echo "$ac_t""yes" 1>&6
5345     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5347   cat >> confdefs.h <<EOF
5348 #define $ac_tr_lib 1
5349 EOF
5350
5351   LIBS="-lnet $LIBS"
5352
5353 else
5354   echo "$ac_t""no" 1>&6
5355 fi
5356
5357         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5358 echo "configure:5359: checking for main in -lnsl_s" >&5
5359 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5361   echo $ac_n "(cached) $ac_c" 1>&6
5362 else
5363   ac_save_LIBS="$LIBS"
5364 LIBS="-lnsl_s  $LIBS"
5365 cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368
5369 int main() {
5370 main()
5371 ; return 0; }
5372 EOF
5373 if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5374   rm -rf conftest*
5375   eval "ac_cv_lib_$ac_lib_var=yes"
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379   rm -rf conftest*
5380   eval "ac_cv_lib_$ac_lib_var=no"
5381 fi
5382 rm -f conftest*
5383 LIBS="$ac_save_LIBS"
5384
5385 fi
5386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5387   echo "$ac_t""yes" 1>&6
5388     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5389     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5390   cat >> confdefs.h <<EOF
5391 #define $ac_tr_lib 1
5392 EOF
5393
5394   LIBS="-lnsl_s $LIBS"
5395
5396 else
5397   echo "$ac_t""no" 1>&6
5398 fi
5399
5400         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5401 echo "configure:5402: checking for main in -lnsl" >&5
5402 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5403 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5404   echo $ac_n "(cached) $ac_c" 1>&6
5405 else
5406   ac_save_LIBS="$LIBS"
5407 LIBS="-lnsl  $LIBS"
5408 cat > conftest.$ac_ext <<EOF
5409 #line 5410 "configure"
5410 #include "confdefs.h"
5411
5412 int main() {
5413 main()
5414 ; return 0; }
5415 EOF
5416 if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5417   rm -rf conftest*
5418   eval "ac_cv_lib_$ac_lib_var=yes"
5419 else
5420   echo "configure: failed program was:" >&5
5421   cat conftest.$ac_ext >&5
5422   rm -rf conftest*
5423   eval "ac_cv_lib_$ac_lib_var=no"
5424 fi
5425 rm -f conftest*
5426 LIBS="$ac_save_LIBS"
5427
5428 fi
5429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5430   echo "$ac_t""yes" 1>&6
5431     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5432     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5433   cat >> confdefs.h <<EOF
5434 #define $ac_tr_lib 1
5435 EOF
5436
5437   LIBS="-lnsl $LIBS"
5438
5439 else
5440   echo "$ac_t""no" 1>&6
5441 fi
5442
5443         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5444 echo "configure:5445: checking for socket in -linet" >&5
5445 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5446 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5447   echo $ac_n "(cached) $ac_c" 1>&6
5448 else
5449   ac_save_LIBS="$LIBS"
5450 LIBS="-linet  $LIBS"
5451 cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5454 /* Override any gcc2 internal prototype to avoid an error.  */
5455 /* We use char because int might match the return type of a gcc2
5456     builtin and then its argument prototype would still apply.  */
5457 char socket();
5458
5459 int main() {
5460 socket()
5461 ; return 0; }
5462 EOF
5463 if { (eval echo configure:5464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5464   rm -rf conftest*
5465   eval "ac_cv_lib_$ac_lib_var=yes"
5466 else
5467   echo "configure: failed program was:" >&5
5468   cat conftest.$ac_ext >&5
5469   rm -rf conftest*
5470   eval "ac_cv_lib_$ac_lib_var=no"
5471 fi
5472 rm -f conftest*
5473 LIBS="$ac_save_LIBS"
5474
5475 fi
5476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5477   echo "$ac_t""yes" 1>&6
5478     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5479     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5480   cat >> confdefs.h <<EOF
5481 #define $ac_tr_lib 1
5482 EOF
5483
5484   LIBS="-linet $LIBS"
5485
5486 else
5487   echo "$ac_t""no" 1>&6
5488 fi
5489
5490         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5491 echo "configure:5492: checking for main in -lgen" >&5
5492 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5493 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5494   echo $ac_n "(cached) $ac_c" 1>&6
5495 else
5496   ac_save_LIBS="$LIBS"
5497 LIBS="-lgen  $LIBS"
5498 cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501
5502 int main() {
5503 main()
5504 ; return 0; }
5505 EOF
5506 if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5507   rm -rf conftest*
5508   eval "ac_cv_lib_$ac_lib_var=yes"
5509 else
5510   echo "configure: failed program was:" >&5
5511   cat conftest.$ac_ext >&5
5512   rm -rf conftest*
5513   eval "ac_cv_lib_$ac_lib_var=no"
5514 fi
5515 rm -f conftest*
5516 LIBS="$ac_save_LIBS"
5517
5518 fi
5519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5520   echo "$ac_t""yes" 1>&6
5521     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5522     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5523   cat >> confdefs.h <<EOF
5524 #define $ac_tr_lib 1
5525 EOF
5526
5527   LIBS="-lgen $LIBS"
5528
5529 else
5530   echo "$ac_t""no" 1>&6
5531 fi
5532
5533
5534 fi
5535
5536
5537 echo $ac_n "checking for select""... $ac_c" 1>&6
5538 echo "configure:5539: checking for select" >&5
5539 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5540   echo $ac_n "(cached) $ac_c" 1>&6
5541 else
5542   cat > conftest.$ac_ext <<EOF
5543 #line 5544 "configure"
5544 #include "confdefs.h"
5545 /* System header to define __stub macros and hopefully few prototypes,
5546     which can conflict with char select(); below.  */
5547 #include <assert.h>
5548 /* Override any gcc2 internal prototype to avoid an error.  */
5549 /* We use char because int might match the return type of a gcc2
5550     builtin and then its argument prototype would still apply.  */
5551 char select();
5552 char (*f)();
5553
5554 int main() {
5555
5556 /* The GNU C library defines this for functions which it implements
5557     to always fail with ENOSYS.  Some functions are actually named
5558     something starting with __ and the normal name is an alias.  */
5559 #if defined (__stub_select) || defined (__stub___select)
5560 choke me
5561 #else
5562 f = select;
5563 #endif
5564
5565 ; return 0; }
5566 EOF
5567 if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5568   rm -rf conftest*
5569   eval "ac_cv_func_select=yes"
5570 else
5571   echo "configure: failed program was:" >&5
5572   cat conftest.$ac_ext >&5
5573   rm -rf conftest*
5574   eval "ac_cv_func_select=no"
5575 fi
5576 rm -f conftest*
5577 fi
5578
5579 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5580   echo "$ac_t""yes" 1>&6
5581   :
5582 else
5583   echo "$ac_t""no" 1>&6
5584 { echo "configure: error: select() required." 1>&2; exit 1; }
5585 fi
5586
5587
5588 if test "${ac_cv_header_winsock_h}" != yes; then
5589                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5590 echo "configure:5591: checking types of arguments for select()" >&5
5591  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5592   echo $ac_n "(cached) $ac_c" 1>&6
5593 else
5594    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5595   echo $ac_n "(cached) $ac_c" 1>&6
5596 else
5597     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5598   echo $ac_n "(cached) $ac_c" 1>&6
5599 else
5600      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5601      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5602       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5603        cat > conftest.$ac_ext <<EOF
5604 #line 5605 "configure"
5605 #include "confdefs.h"
5606 #ifdef HAVE_SYS_TYPES_H
5607 #include <sys/types.h>
5608 #endif
5609 #ifdef HAVE_SYS_TIME_H
5610 #include <sys/time.h>
5611 #endif
5612 #ifdef HAVE_SYS_SELECT_H
5613 #include <sys/select.h>
5614 #endif
5615 #ifdef HAVE_SYS_SOCKET_H
5616 #include <sys/socket.h>
5617 #endif
5618 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);
5619 int main() {
5620
5621 ; return 0; }
5622 EOF
5623 if { (eval echo configure:5624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5624   rm -rf conftest*
5625           ac_not_found=no ; break 3
5626 else
5627   echo "configure: failed program was:" >&5
5628   cat conftest.$ac_ext >&5
5629   rm -rf conftest*
5630   ac_not_found=yes
5631 fi
5632 rm -f conftest*
5633       done
5634      done
5635     done
5636    
5637 fi
5638   
5639 fi
5640  
5641 fi
5642  if test "$ac_not_found" = yes; then
5643   ac_cv_func_select_arg1=int 
5644   ac_cv_func_select_arg234='int *' 
5645   ac_cv_func_select_arg5='struct timeval *'
5646  fi
5647  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5648  cat >> confdefs.h <<EOF
5649 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5650 EOF
5651
5652  cat >> confdefs.h <<EOF
5653 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5654 EOF
5655
5656  cat >> confdefs.h <<EOF
5657 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5658 EOF
5659
5660
5661 fi
5662
5663
5664 for ac_hdr in regex.h 
5665 do
5666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5668 echo "configure:5669: checking for $ac_hdr" >&5
5669 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5670   echo $ac_n "(cached) $ac_c" 1>&6
5671 else
5672   cat > conftest.$ac_ext <<EOF
5673 #line 5674 "configure"
5674 #include "confdefs.h"
5675 #include <$ac_hdr>
5676 EOF
5677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5678 { (eval echo configure:5679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5680 if test -z "$ac_err"; then
5681   rm -rf conftest*
5682   eval "ac_cv_header_$ac_safe=yes"
5683 else
5684   echo "$ac_err" >&5
5685   echo "configure: failed program was:" >&5
5686   cat conftest.$ac_ext >&5
5687   rm -rf conftest*
5688   eval "ac_cv_header_$ac_safe=no"
5689 fi
5690 rm -f conftest*
5691 fi
5692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5693   echo "$ac_t""yes" 1>&6
5694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5695   cat >> confdefs.h <<EOF
5696 #define $ac_tr_hdr 1
5697 EOF
5698  
5699 else
5700   echo "$ac_t""no" 1>&6
5701 fi
5702 done
5703
5704 if test "$ac_cv_header_regex_h" != yes ; then
5705         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5706 fi
5707 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5708 echo "configure:5709: checking for regfree" >&5
5709 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5710   echo $ac_n "(cached) $ac_c" 1>&6
5711 else
5712   cat > conftest.$ac_ext <<EOF
5713 #line 5714 "configure"
5714 #include "confdefs.h"
5715 /* System header to define __stub macros and hopefully few prototypes,
5716     which can conflict with char regfree(); below.  */
5717 #include <assert.h>
5718 /* Override any gcc2 internal prototype to avoid an error.  */
5719 /* We use char because int might match the return type of a gcc2
5720     builtin and then its argument prototype would still apply.  */
5721 char regfree();
5722 char (*f)();
5723
5724 int main() {
5725
5726 /* The GNU C library defines this for functions which it implements
5727     to always fail with ENOSYS.  Some functions are actually named
5728     something starting with __ and the normal name is an alias.  */
5729 #if defined (__stub_regfree) || defined (__stub___regfree)
5730 choke me
5731 #else
5732 f = regfree;
5733 #endif
5734
5735 ; return 0; }
5736 EOF
5737 if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5738   rm -rf conftest*
5739   eval "ac_cv_func_regfree=yes"
5740 else
5741   echo "configure: failed program was:" >&5
5742   cat conftest.$ac_ext >&5
5743   rm -rf conftest*
5744   eval "ac_cv_func_regfree=no"
5745 fi
5746 rm -f conftest*
5747 fi
5748
5749 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5750   echo "$ac_t""yes" 1>&6
5751   :
5752 else
5753   echo "$ac_t""no" 1>&6
5754 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5755 fi
5756
5757
5758
5759 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5760 echo "configure:5761: checking for compatible POSIX regex" >&5
5761 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5762   echo $ac_n "(cached) $ac_c" 1>&6
5763 else
5764   
5765         if test "$cross_compiling" = yes; then
5766   ol_cv_c_posix_regex=cross
5767 else
5768   cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771
5772 #include <sys/types.h>
5773 #include <regex.h>
5774 static char *pattern, *string;
5775 main()
5776 {
5777         int rc;
5778         regex_t re;
5779
5780         pattern = "^A";
5781
5782         if(regcomp(&re, pattern, 0)) {
5783                 return -1;
5784         }
5785         
5786         string = "ALL MATCH";
5787         
5788         rc = regexec(&re, string, 0, (void*)0, 0);
5789
5790         regfree(&re);
5791
5792         return rc;
5793 }
5794 EOF
5795 if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5796 then
5797   ol_cv_c_posix_regex=yes
5798 else
5799   echo "configure: failed program was:" >&5
5800   cat conftest.$ac_ext >&5
5801   rm -fr conftest*
5802   ol_cv_c_posix_regex=no
5803 fi
5804 rm -fr conftest*
5805 fi
5806
5807 fi
5808
5809 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5810
5811 if test "$ol_cv_c_posix_regex" = no ; then
5812         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5813 fi
5814
5815 ol_link_dnssrv=no
5816 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5817 echo "configure:5818: checking for res_query" >&5
5818 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5819   echo $ac_n "(cached) $ac_c" 1>&6
5820 else
5821   cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 /* System header to define __stub macros and hopefully few prototypes,
5825     which can conflict with char res_query(); below.  */
5826 #include <assert.h>
5827 /* Override any gcc2 internal prototype to avoid an error.  */
5828 /* We use char because int might match the return type of a gcc2
5829     builtin and then its argument prototype would still apply.  */
5830 char res_query();
5831 char (*f)();
5832
5833 int main() {
5834
5835 /* The GNU C library defines this for functions which it implements
5836     to always fail with ENOSYS.  Some functions are actually named
5837     something starting with __ and the normal name is an alias.  */
5838 #if defined (__stub_res_query) || defined (__stub___res_query)
5839 choke me
5840 #else
5841 f = res_query;
5842 #endif
5843
5844 ; return 0; }
5845 EOF
5846 if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5847   rm -rf conftest*
5848   eval "ac_cv_func_res_query=yes"
5849 else
5850   echo "configure: failed program was:" >&5
5851   cat conftest.$ac_ext >&5
5852   rm -rf conftest*
5853   eval "ac_cv_func_res_query=no"
5854 fi
5855 rm -f conftest*
5856 fi
5857
5858 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5859   echo "$ac_t""yes" 1>&6
5860   :
5861 else
5862   echo "$ac_t""no" 1>&6
5863 fi
5864
5865 if test $ac_cv_func_res_query = no ; then 
5866         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
5867 echo "configure:5868: checking for __res_query" >&5
5868 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
5869   echo $ac_n "(cached) $ac_c" 1>&6
5870 else
5871   cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 /* System header to define __stub macros and hopefully few prototypes,
5875     which can conflict with char __res_query(); below.  */
5876 #include <assert.h>
5877 /* Override any gcc2 internal prototype to avoid an error.  */
5878 /* We use char because int might match the return type of a gcc2
5879     builtin and then its argument prototype would still apply.  */
5880 char __res_query();
5881 char (*f)();
5882
5883 int main() {
5884
5885 /* The GNU C library defines this for functions which it implements
5886     to always fail with ENOSYS.  Some functions are actually named
5887     something starting with __ and the normal name is an alias.  */
5888 #if defined (__stub___res_query) || defined (__stub_____res_query)
5889 choke me
5890 #else
5891 f = __res_query;
5892 #endif
5893
5894 ; return 0; }
5895 EOF
5896 if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5897   rm -rf conftest*
5898   eval "ac_cv_func___res_query=yes"
5899 else
5900   echo "configure: failed program was:" >&5
5901   cat conftest.$ac_ext >&5
5902   rm -rf conftest*
5903   eval "ac_cv_func___res_query=no"
5904 fi
5905 rm -f conftest*
5906 fi
5907
5908 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
5909   echo "$ac_t""yes" 1>&6
5910   :
5911 else
5912   echo "$ac_t""no" 1>&6
5913 fi
5914
5915         ac_cv_func_res_query=$ac_cv_func___res_query
5916 fi
5917
5918 if test $ac_cv_func_res_query = no ; then 
5919         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5920 echo "configure:5921: checking for res_query in -lbind" >&5
5921 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5922 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5923   echo $ac_n "(cached) $ac_c" 1>&6
5924 else
5925   ac_save_LIBS="$LIBS"
5926 LIBS="-lbind  $LIBS"
5927 cat > conftest.$ac_ext <<EOF
5928 #line 5929 "configure"
5929 #include "confdefs.h"
5930 /* Override any gcc2 internal prototype to avoid an error.  */
5931 /* We use char because int might match the return type of a gcc2
5932     builtin and then its argument prototype would still apply.  */
5933 char res_query();
5934
5935 int main() {
5936 res_query()
5937 ; return 0; }
5938 EOF
5939 if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5940   rm -rf conftest*
5941   eval "ac_cv_lib_$ac_lib_var=yes"
5942 else
5943   echo "configure: failed program was:" >&5
5944   cat conftest.$ac_ext >&5
5945   rm -rf conftest*
5946   eval "ac_cv_lib_$ac_lib_var=no"
5947 fi
5948 rm -f conftest*
5949 LIBS="$ac_save_LIBS"
5950
5951 fi
5952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5953   echo "$ac_t""yes" 1>&6
5954     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5955     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5956   cat >> confdefs.h <<EOF
5957 #define $ac_tr_lib 1
5958 EOF
5959
5960   LIBS="-lbind $LIBS"
5961
5962 else
5963   echo "$ac_t""no" 1>&6
5964 fi
5965
5966         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5967 fi
5968
5969 if test $ac_cv_func_res_query = no ; then 
5970         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5971 echo "configure:5972: checking for __res_query in -lbind" >&5
5972 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5973 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5974   echo $ac_n "(cached) $ac_c" 1>&6
5975 else
5976   ac_save_LIBS="$LIBS"
5977 LIBS="-lbind  $LIBS"
5978 cat > conftest.$ac_ext <<EOF
5979 #line 5980 "configure"
5980 #include "confdefs.h"
5981 /* Override any gcc2 internal prototype to avoid an error.  */
5982 /* We use char because int might match the return type of a gcc2
5983     builtin and then its argument prototype would still apply.  */
5984 char __res_query();
5985
5986 int main() {
5987 __res_query()
5988 ; return 0; }
5989 EOF
5990 if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5991   rm -rf conftest*
5992   eval "ac_cv_lib_$ac_lib_var=yes"
5993 else
5994   echo "configure: failed program was:" >&5
5995   cat conftest.$ac_ext >&5
5996   rm -rf conftest*
5997   eval "ac_cv_lib_$ac_lib_var=no"
5998 fi
5999 rm -f conftest*
6000 LIBS="$ac_save_LIBS"
6001
6002 fi
6003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6004   echo "$ac_t""yes" 1>&6
6005     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6006     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6007   cat >> confdefs.h <<EOF
6008 #define $ac_tr_lib 1
6009 EOF
6010
6011   LIBS="-lbind $LIBS"
6012
6013 else
6014   echo "$ac_t""no" 1>&6
6015 fi
6016
6017         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
6018 fi
6019
6020 if test $ac_cv_func_res_query = no ; then 
6021         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
6022 echo "configure:6023: checking for res_query in -lresolv" >&5
6023 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
6024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6025   echo $ac_n "(cached) $ac_c" 1>&6
6026 else
6027   ac_save_LIBS="$LIBS"
6028 LIBS="-lresolv  $LIBS"
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032 /* Override any gcc2 internal prototype to avoid an error.  */
6033 /* We use char because int might match the return type of a gcc2
6034     builtin and then its argument prototype would still apply.  */
6035 char res_query();
6036
6037 int main() {
6038 res_query()
6039 ; return 0; }
6040 EOF
6041 if { (eval echo configure:6042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6042   rm -rf conftest*
6043   eval "ac_cv_lib_$ac_lib_var=yes"
6044 else
6045   echo "configure: failed program was:" >&5
6046   cat conftest.$ac_ext >&5
6047   rm -rf conftest*
6048   eval "ac_cv_lib_$ac_lib_var=no"
6049 fi
6050 rm -f conftest*
6051 LIBS="$ac_save_LIBS"
6052
6053 fi
6054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6055   echo "$ac_t""yes" 1>&6
6056     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6058   cat >> confdefs.h <<EOF
6059 #define $ac_tr_lib 1
6060 EOF
6061
6062   LIBS="-lresolv $LIBS"
6063
6064 else
6065   echo "$ac_t""no" 1>&6
6066 fi
6067
6068         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
6069 fi
6070
6071 if test $ac_cv_func_res_query = no ; then 
6072         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
6073 echo "configure:6074: checking for __res_query in -lresolv" >&5
6074 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
6075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6076   echo $ac_n "(cached) $ac_c" 1>&6
6077 else
6078   ac_save_LIBS="$LIBS"
6079 LIBS="-lresolv  $LIBS"
6080 cat > conftest.$ac_ext <<EOF
6081 #line 6082 "configure"
6082 #include "confdefs.h"
6083 /* Override any gcc2 internal prototype to avoid an error.  */
6084 /* We use char because int might match the return type of a gcc2
6085     builtin and then its argument prototype would still apply.  */
6086 char __res_query();
6087
6088 int main() {
6089 __res_query()
6090 ; return 0; }
6091 EOF
6092 if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6093   rm -rf conftest*
6094   eval "ac_cv_lib_$ac_lib_var=yes"
6095 else
6096   echo "configure: failed program was:" >&5
6097   cat conftest.$ac_ext >&5
6098   rm -rf conftest*
6099   eval "ac_cv_lib_$ac_lib_var=no"
6100 fi
6101 rm -f conftest*
6102 LIBS="$ac_save_LIBS"
6103
6104 fi
6105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6106   echo "$ac_t""yes" 1>&6
6107     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6108     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6109   cat >> confdefs.h <<EOF
6110 #define $ac_tr_lib 1
6111 EOF
6112
6113   LIBS="-lresolv $LIBS"
6114
6115 else
6116   echo "$ac_t""no" 1>&6
6117 fi
6118
6119         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
6120 fi
6121
6122 if test "$ac_cv_func_res_query" = yes ; then
6123         cat >> confdefs.h <<\EOF
6124 #define HAVE_RES_QUERY 1
6125 EOF
6126
6127
6128         if test $ol_enable_dnssrv != no ; then
6129                 ol_link_dnssrv=yes
6130         fi
6131 fi
6132
6133 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
6134         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
6135 fi
6136
6137 for ac_func in getaddrinfo inet_ntop 
6138 do
6139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6140 echo "configure:6141: checking for $ac_func" >&5
6141 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6142   echo $ac_n "(cached) $ac_c" 1>&6
6143 else
6144   cat > conftest.$ac_ext <<EOF
6145 #line 6146 "configure"
6146 #include "confdefs.h"
6147 /* System header to define __stub macros and hopefully few prototypes,
6148     which can conflict with char $ac_func(); below.  */
6149 #include <assert.h>
6150 /* Override any gcc2 internal prototype to avoid an error.  */
6151 /* We use char because int might match the return type of a gcc2
6152     builtin and then its argument prototype would still apply.  */
6153 char $ac_func();
6154 char (*f)();
6155
6156 int main() {
6157
6158 /* The GNU C library defines this for functions which it implements
6159     to always fail with ENOSYS.  Some functions are actually named
6160     something starting with __ and the normal name is an alias.  */
6161 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6162 choke me
6163 #else
6164 f = $ac_func;
6165 #endif
6166
6167 ; return 0; }
6168 EOF
6169 if { (eval echo configure:6170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6170   rm -rf conftest*
6171   eval "ac_cv_func_$ac_func=yes"
6172 else
6173   echo "configure: failed program was:" >&5
6174   cat conftest.$ac_ext >&5
6175   rm -rf conftest*
6176   eval "ac_cv_func_$ac_func=no"
6177 fi
6178 rm -f conftest*
6179 fi
6180
6181 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6182   echo "$ac_t""yes" 1>&6
6183     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6184   cat >> confdefs.h <<EOF
6185 #define $ac_tr_func 1
6186 EOF
6187  
6188 else
6189   echo "$ac_t""no" 1>&6
6190 fi
6191 done
6192
6193
6194 ol_link_ipv6=no
6195 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
6196         if test $ol_enable_ipv6 = yes ; then
6197                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
6198         fi
6199 else
6200         for ac_func in gai_strerror 
6201 do
6202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6203 echo "configure:6204: checking for $ac_func" >&5
6204 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6205   echo $ac_n "(cached) $ac_c" 1>&6
6206 else
6207   cat > conftest.$ac_ext <<EOF
6208 #line 6209 "configure"
6209 #include "confdefs.h"
6210 /* System header to define __stub macros and hopefully few prototypes,
6211     which can conflict with char $ac_func(); below.  */
6212 #include <assert.h>
6213 /* Override any gcc2 internal prototype to avoid an error.  */
6214 /* We use char because int might match the return type of a gcc2
6215     builtin and then its argument prototype would still apply.  */
6216 char $ac_func();
6217 char (*f)();
6218
6219 int main() {
6220
6221 /* The GNU C library defines this for functions which it implements
6222     to always fail with ENOSYS.  Some functions are actually named
6223     something starting with __ and the normal name is an alias.  */
6224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6225 choke me
6226 #else
6227 f = $ac_func;
6228 #endif
6229
6230 ; return 0; }
6231 EOF
6232 if { (eval echo configure:6233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6233   rm -rf conftest*
6234   eval "ac_cv_func_$ac_func=yes"
6235 else
6236   echo "configure: failed program was:" >&5
6237   cat conftest.$ac_ext >&5
6238   rm -rf conftest*
6239   eval "ac_cv_func_$ac_func=no"
6240 fi
6241 rm -f conftest*
6242 fi
6243
6244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6245   echo "$ac_t""yes" 1>&6
6246     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6247   cat >> confdefs.h <<EOF
6248 #define $ac_tr_func 1
6249 EOF
6250  
6251 else
6252   echo "$ac_t""no" 1>&6
6253 fi
6254 done
6255
6256
6257         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
6258 echo "configure:6259: checking INET6_ADDRSTRLEN" >&5
6259 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
6260   echo $ac_n "(cached) $ac_c" 1>&6
6261 else
6262   
6263                 cat > conftest.$ac_ext <<EOF
6264 #line 6265 "configure"
6265 #include "confdefs.h"
6266
6267 #                       include <netinet/in.h>
6268 #                       ifdef INET6_ADDRSTRLEN
6269                                 __has_inet6_addrstrlen__;
6270 #                       endif
6271                 
6272 EOF
6273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6274   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
6275   rm -rf conftest*
6276   ol_cv_inet6_addrstrlen=yes
6277 else
6278   rm -rf conftest*
6279   ol_cv_inet6_addrstrlen=no
6280 fi
6281 rm -f conftest*
6282
6283 fi
6284
6285 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
6286
6287         if test $ol_cv_inet6_addrstrlen = yes ; then
6288                 ol_link_ipv6=yes
6289         elif test $ol_enable_ipv6 = yes ; then
6290                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
6291         fi
6292 fi
6293
6294 if test $ol_enable_local != no ; then
6295         for ac_hdr in sys/un.h 
6296 do
6297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6299 echo "configure:6300: checking for $ac_hdr" >&5
6300 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6301   echo $ac_n "(cached) $ac_c" 1>&6
6302 else
6303   cat > conftest.$ac_ext <<EOF
6304 #line 6305 "configure"
6305 #include "confdefs.h"
6306 #include <$ac_hdr>
6307 EOF
6308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6309 { (eval echo configure:6310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6311 if test -z "$ac_err"; then
6312   rm -rf conftest*
6313   eval "ac_cv_header_$ac_safe=yes"
6314 else
6315   echo "$ac_err" >&5
6316   echo "configure: failed program was:" >&5
6317   cat conftest.$ac_ext >&5
6318   rm -rf conftest*
6319   eval "ac_cv_header_$ac_safe=no"
6320 fi
6321 rm -f conftest*
6322 fi
6323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6324   echo "$ac_t""yes" 1>&6
6325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6326   cat >> confdefs.h <<EOF
6327 #define $ac_tr_hdr 1
6328 EOF
6329  
6330 else
6331   echo "$ac_t""no" 1>&6
6332 fi
6333 done
6334
6335
6336         if test $ol_enable_local = auto ; then
6337                 ol_enable_local=$ac_cv_header_sys_un_h
6338         elif test $ac_cv_header_sys_un_h = no ; then
6339                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
6340         fi
6341 fi
6342
6343 ol_link_kbind=no
6344 ol_link_kpasswd=no
6345 ol_link_krb5=no
6346 ol_link_krb4=no
6347
6348 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6349         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
6350         -o $ol_with_kerberos = k425 ; then
6351
6352         for ac_hdr in krb5.h
6353 do
6354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6356 echo "configure:6357: checking for $ac_hdr" >&5
6357 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   cat > conftest.$ac_ext <<EOF
6361 #line 6362 "configure"
6362 #include "confdefs.h"
6363 #include <$ac_hdr>
6364 EOF
6365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6366 { (eval echo configure:6367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6368 if test -z "$ac_err"; then
6369   rm -rf conftest*
6370   eval "ac_cv_header_$ac_safe=yes"
6371 else
6372   echo "$ac_err" >&5
6373   echo "configure: failed program was:" >&5
6374   cat conftest.$ac_ext >&5
6375   rm -rf conftest*
6376   eval "ac_cv_header_$ac_safe=no"
6377 fi
6378 rm -f conftest*
6379 fi
6380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6381   echo "$ac_t""yes" 1>&6
6382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6383   cat >> confdefs.h <<EOF
6384 #define $ac_tr_hdr 1
6385 EOF
6386  
6387 else
6388   echo "$ac_t""no" 1>&6
6389 fi
6390 done
6391
6392
6393         if test $ac_cv_header_krb5_h = yes ; then
6394                                 for ac_hdr in heim_err.h
6395 do
6396 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6397 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6398 echo "configure:6399: checking for $ac_hdr" >&5
6399 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6400   echo $ac_n "(cached) $ac_c" 1>&6
6401 else
6402   cat > conftest.$ac_ext <<EOF
6403 #line 6404 "configure"
6404 #include "confdefs.h"
6405 #include <$ac_hdr>
6406 EOF
6407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6408 { (eval echo configure:6409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6410 if test -z "$ac_err"; then
6411   rm -rf conftest*
6412   eval "ac_cv_header_$ac_safe=yes"
6413 else
6414   echo "$ac_err" >&5
6415   echo "configure: failed program was:" >&5
6416   cat conftest.$ac_ext >&5
6417   rm -rf conftest*
6418   eval "ac_cv_header_$ac_safe=no"
6419 fi
6420 rm -f conftest*
6421 fi
6422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6423   echo "$ac_t""yes" 1>&6
6424     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6425   cat >> confdefs.h <<EOF
6426 #define $ac_tr_hdr 1
6427 EOF
6428  
6429 else
6430   echo "$ac_t""no" 1>&6
6431 fi
6432 done
6433
6434                 if test $ac_cv_header_heim_err_h = yes ; then
6435                         krb5_impl=heimdal
6436                 else
6437                         krb5_impl=mit
6438                 fi
6439
6440                 if test $krb5_impl = mit; then
6441                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
6442 echo "configure:6443: checking for main in -lk5crypto" >&5
6443 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
6444 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6445   echo $ac_n "(cached) $ac_c" 1>&6
6446 else
6447   ac_save_LIBS="$LIBS"
6448 LIBS="-lk5crypto  $LIBS"
6449 cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452
6453 int main() {
6454 main()
6455 ; return 0; }
6456 EOF
6457 if { (eval echo configure:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6458   rm -rf conftest*
6459   eval "ac_cv_lib_$ac_lib_var=yes"
6460 else
6461   echo "configure: failed program was:" >&5
6462   cat conftest.$ac_ext >&5
6463   rm -rf conftest*
6464   eval "ac_cv_lib_$ac_lib_var=no"
6465 fi
6466 rm -f conftest*
6467 LIBS="$ac_save_LIBS"
6468
6469 fi
6470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6471   echo "$ac_t""yes" 1>&6
6472   krb5crypto=k5crypto
6473 else
6474   echo "$ac_t""no" 1>&6
6475 krb5crypto=crypto
6476 fi
6477
6478
6479                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6480 echo "configure:6481: checking for main in -lkrb5" >&5
6481 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6483   echo $ac_n "(cached) $ac_c" 1>&6
6484 else
6485   ac_save_LIBS="$LIBS"
6486 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
6487 cat > conftest.$ac_ext <<EOF
6488 #line 6489 "configure"
6489 #include "confdefs.h"
6490
6491 int main() {
6492 main()
6493 ; return 0; }
6494 EOF
6495 if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6496   rm -rf conftest*
6497   eval "ac_cv_lib_$ac_lib_var=yes"
6498 else
6499   echo "configure: failed program was:" >&5
6500   cat conftest.$ac_ext >&5
6501   rm -rf conftest*
6502   eval "ac_cv_lib_$ac_lib_var=no"
6503 fi
6504 rm -f conftest*
6505 LIBS="$ac_save_LIBS"
6506
6507 fi
6508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6509   echo "$ac_t""yes" 1>&6
6510   have_krb5=yes
6511                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
6512 else
6513   echo "$ac_t""no" 1>&6
6514 have_krb5=no
6515 fi
6516
6517
6518                 elif test $krb5_impl = heimdal; then
6519                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6520 echo "configure:6521: checking for main in -lkrb5" >&5
6521 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6522 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6523   echo $ac_n "(cached) $ac_c" 1>&6
6524 else
6525   ac_save_LIBS="$LIBS"
6526 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6527 cat > conftest.$ac_ext <<EOF
6528 #line 6529 "configure"
6529 #include "confdefs.h"
6530
6531 int main() {
6532 main()
6533 ; return 0; }
6534 EOF
6535 if { (eval echo configure:6536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6536   rm -rf conftest*
6537   eval "ac_cv_lib_$ac_lib_var=yes"
6538 else
6539   echo "configure: failed program was:" >&5
6540   cat conftest.$ac_ext >&5
6541   rm -rf conftest*
6542   eval "ac_cv_lib_$ac_lib_var=no"
6543 fi
6544 rm -f conftest*
6545 LIBS="$ac_save_LIBS"
6546
6547 fi
6548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6549   echo "$ac_t""yes" 1>&6
6550   have_krb5=yes
6551                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6552 else
6553   echo "$ac_t""no" 1>&6
6554 have_krb5=no
6555 fi
6556
6557
6558                         cat >> confdefs.h <<\EOF
6559 #define HAVE_HEIMDAL_KERBEROS 1
6560 EOF
6561
6562
6563                 else
6564                         have_krb5=no
6565                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6566                 fi
6567
6568                 if test $have_krb5 = yes ; then
6569                         ol_link_krb5=yes
6570
6571                         cat >> confdefs.h <<\EOF
6572 #define HAVE_KRB5 1
6573 EOF
6574
6575
6576                         if test $ol_enable_kpasswd != no ; then
6577                                 ol_link_kpasswd=yes;
6578                         fi
6579
6580                         if test $ol_with_kerberos = k5only ; then
6581                                 ol_with_kerberos=found
6582                         fi
6583
6584                 elif test $ol_with_kerberos != auto ; then
6585                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6586                 fi
6587
6588         fi
6589 fi
6590
6591 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6592         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6593
6594         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6595 do
6596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6598 echo "configure:6599: checking for $ac_hdr" >&5
6599 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6600   echo $ac_n "(cached) $ac_c" 1>&6
6601 else
6602   cat > conftest.$ac_ext <<EOF
6603 #line 6604 "configure"
6604 #include "confdefs.h"
6605 #include <$ac_hdr>
6606 EOF
6607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6608 { (eval echo configure:6609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6610 if test -z "$ac_err"; then
6611   rm -rf conftest*
6612   eval "ac_cv_header_$ac_safe=yes"
6613 else
6614   echo "$ac_err" >&5
6615   echo "configure: failed program was:" >&5
6616   cat conftest.$ac_ext >&5
6617   rm -rf conftest*
6618   eval "ac_cv_header_$ac_safe=no"
6619 fi
6620 rm -f conftest*
6621 fi
6622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6623   echo "$ac_t""yes" 1>&6
6624     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6625   cat >> confdefs.h <<EOF
6626 #define $ac_tr_hdr 1
6627 EOF
6628  
6629 else
6630   echo "$ac_t""no" 1>&6
6631 fi
6632 done
6633
6634
6635         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6636                 if test $krb5_impl = mit; then
6637                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6638 echo "configure:6639: checking for main in -lkrb4" >&5
6639 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6641   echo $ac_n "(cached) $ac_c" 1>&6
6642 else
6643   ac_save_LIBS="$LIBS"
6644 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
6645 cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648
6649 int main() {
6650 main()
6651 ; return 0; }
6652 EOF
6653 if { (eval echo configure:6654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6654   rm -rf conftest*
6655   eval "ac_cv_lib_$ac_lib_var=yes"
6656 else
6657   echo "configure: failed program was:" >&5
6658   cat conftest.$ac_ext >&5
6659   rm -rf conftest*
6660   eval "ac_cv_lib_$ac_lib_var=no"
6661 fi
6662 rm -f conftest*
6663 LIBS="$ac_save_LIBS"
6664
6665 fi
6666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6667   echo "$ac_t""yes" 1>&6
6668   have_k425=yes
6669                                 KRB4_LIBS="-lkrb4 -ldes425"
6670 else
6671   echo "$ac_t""no" 1>&6
6672 have_k425=no
6673 fi
6674
6675
6676                 elif test $krb5_impl = heimdal; then
6677                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6678 echo "configure:6679: checking for main in -lkrb4" >&5
6679 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6681   echo $ac_n "(cached) $ac_c" 1>&6
6682 else
6683   ac_save_LIBS="$LIBS"
6684 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6685 cat > conftest.$ac_ext <<EOF
6686 #line 6687 "configure"
6687 #include "confdefs.h"
6688
6689 int main() {
6690 main()
6691 ; return 0; }
6692 EOF
6693 if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6694   rm -rf conftest*
6695   eval "ac_cv_lib_$ac_lib_var=yes"
6696 else
6697   echo "configure: failed program was:" >&5
6698   cat conftest.$ac_ext >&5
6699   rm -rf conftest*
6700   eval "ac_cv_lib_$ac_lib_var=no"
6701 fi
6702 rm -f conftest*
6703 LIBS="$ac_save_LIBS"
6704
6705 fi
6706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6707   echo "$ac_t""yes" 1>&6
6708   have_k425=yes
6709                                 KRB4_LIBS="-lkrb4"
6710 else
6711   echo "$ac_t""no" 1>&6
6712 have_k425=no
6713 fi
6714
6715
6716                 else
6717                         have_425=no
6718                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6719                 fi
6720
6721                 if test $have_k425 = yes ; then
6722                         ol_with_kerberos=found
6723                         ol_link_krb4=yes
6724
6725                         cat >> confdefs.h <<\EOF
6726 #define HAVE_KRB425 1
6727 EOF
6728
6729                         cat >> confdefs.h <<\EOF
6730 #define HAVE_KRB4 1
6731 EOF
6732
6733
6734                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6735 echo "configure:6736: checking for des_debug in Kerberos libraries" >&5
6736 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6737   echo $ac_n "(cached) $ac_c" 1>&6
6738 else
6739   
6740                                                                 save_LIBS="$LIBS"
6741                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6742                                 cat > conftest.$ac_ext <<EOF
6743 #line 6744 "configure"
6744 #include "confdefs.h"
6745
6746 #include <kerberosIV/krb.h>
6747 #include <kerberosIV/des.h>
6748 extern int des_debug;
6749
6750 int main() {
6751
6752 des_debug = 1;
6753
6754 ; return 0; }
6755 EOF
6756 if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6757   rm -rf conftest*
6758   ol_cv_var_des_debug=yes
6759 else
6760   echo "configure: failed program was:" >&5
6761   cat conftest.$ac_ext >&5
6762   rm -rf conftest*
6763   ol_cv_var_des_debug=no
6764 fi
6765 rm -f conftest*
6766                                                                 LIBS="$save_LIBS"
6767                         
6768 fi
6769
6770 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6771
6772                         if test $ol_cv_var_des_debug = yes ; then
6773                                 cat >> confdefs.h <<\EOF
6774 #define HAVE_DES_DEBUG 1
6775 EOF
6776
6777                         fi
6778
6779                         LIBS="$save_LIBS"
6780                 fi
6781         fi
6782 fi
6783
6784 if test $ol_link_krb5 = yes ; then
6785         ol_with_kerberos=found
6786 fi
6787
6788 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6789         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6790
6791         for ac_hdr in krb.h des.h krb-archaeology.h 
6792 do
6793 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6794 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6795 echo "configure:6796: checking for $ac_hdr" >&5
6796 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6797   echo $ac_n "(cached) $ac_c" 1>&6
6798 else
6799   cat > conftest.$ac_ext <<EOF
6800 #line 6801 "configure"
6801 #include "confdefs.h"
6802 #include <$ac_hdr>
6803 EOF
6804 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6805 { (eval echo configure:6806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6807 if test -z "$ac_err"; then
6808   rm -rf conftest*
6809   eval "ac_cv_header_$ac_safe=yes"
6810 else
6811   echo "$ac_err" >&5
6812   echo "configure: failed program was:" >&5
6813   cat conftest.$ac_ext >&5
6814   rm -rf conftest*
6815   eval "ac_cv_header_$ac_safe=no"
6816 fi
6817 rm -f conftest*
6818 fi
6819 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6820   echo "$ac_t""yes" 1>&6
6821     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6822   cat >> confdefs.h <<EOF
6823 #define $ac_tr_hdr 1
6824 EOF
6825  
6826 else
6827   echo "$ac_t""no" 1>&6
6828 fi
6829 done
6830
6831
6832         if test $ac_cv_header_krb_h = yes ; then
6833                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6834 echo "configure:6835: checking for main in -lkrb" >&5
6835 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6836 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6837   echo $ac_n "(cached) $ac_c" 1>&6
6838 else
6839   ac_save_LIBS="$LIBS"
6840 LIBS="-lkrb -ldes $LIBS"
6841 cat > conftest.$ac_ext <<EOF
6842 #line 6843 "configure"
6843 #include "confdefs.h"
6844
6845 int main() {
6846 main()
6847 ; return 0; }
6848 EOF
6849 if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6850   rm -rf conftest*
6851   eval "ac_cv_lib_$ac_lib_var=yes"
6852 else
6853   echo "configure: failed program was:" >&5
6854   cat conftest.$ac_ext >&5
6855   rm -rf conftest*
6856   eval "ac_cv_lib_$ac_lib_var=no"
6857 fi
6858 rm -f conftest*
6859 LIBS="$ac_save_LIBS"
6860
6861 fi
6862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6863   echo "$ac_t""yes" 1>&6
6864   have_k4=yes
6865 else
6866   echo "$ac_t""no" 1>&6
6867 have_k4=no
6868 fi
6869
6870
6871                 if test $have_k4 = yes ; then
6872                         ol_with_kerberos=found
6873                         ol_link_krb4=yes
6874
6875                         cat >> confdefs.h <<\EOF
6876 #define HAVE_KRB4 1
6877 EOF
6878
6879
6880                         KRB4_LIBS="-lkrb -ldes"
6881
6882                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6883                                 cat >> confdefs.h <<\EOF
6884 #define HAVE_KTH_KERBEROS 1
6885 EOF
6886
6887                         fi
6888                 fi
6889         fi
6890 fi
6891
6892 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6893         ol_link_kpasswd=yes
6894 fi
6895
6896 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6897         ol_link_kbind=yes
6898
6899 elif test $ol_enable_kbind = yes ; then
6900         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6901 fi
6902
6903 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6904         cat >> confdefs.h <<\EOF
6905 #define HAVE_KERBEROS 1
6906 EOF
6907
6908
6909 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6910         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6911 fi
6912
6913 ol_link_tls=no
6914 if test $ol_with_tls != no ; then
6915         for ac_hdr in openssl/ssl.h ssl.h
6916 do
6917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6919 echo "configure:6920: checking for $ac_hdr" >&5
6920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6921   echo $ac_n "(cached) $ac_c" 1>&6
6922 else
6923   cat > conftest.$ac_ext <<EOF
6924 #line 6925 "configure"
6925 #include "confdefs.h"
6926 #include <$ac_hdr>
6927 EOF
6928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6929 { (eval echo configure:6930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6931 if test -z "$ac_err"; then
6932   rm -rf conftest*
6933   eval "ac_cv_header_$ac_safe=yes"
6934 else
6935   echo "$ac_err" >&5
6936   echo "configure: failed program was:" >&5
6937   cat conftest.$ac_ext >&5
6938   rm -rf conftest*
6939   eval "ac_cv_header_$ac_safe=no"
6940 fi
6941 rm -f conftest*
6942 fi
6943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6944   echo "$ac_t""yes" 1>&6
6945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6946   cat >> confdefs.h <<EOF
6947 #define $ac_tr_hdr 1
6948 EOF
6949  
6950 else
6951   echo "$ac_t""no" 1>&6
6952 fi
6953 done
6954
6955         
6956         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6957                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6958 echo "configure:6959: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6959 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6961   echo $ac_n "(cached) $ac_c" 1>&6
6962 else
6963   ac_save_LIBS="$LIBS"
6964 LIBS="-lssl -lcrypto $LIBS"
6965 cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968 /* Override any gcc2 internal prototype to avoid an error.  */
6969 /* We use char because int might match the return type of a gcc2
6970     builtin and then its argument prototype would still apply.  */
6971 char SSLeay_add_ssl_algorithms();
6972
6973 int main() {
6974 SSLeay_add_ssl_algorithms()
6975 ; return 0; }
6976 EOF
6977 if { (eval echo configure:6978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6978   rm -rf conftest*
6979   eval "ac_cv_lib_$ac_lib_var=yes"
6980 else
6981   echo "configure: failed program was:" >&5
6982   cat conftest.$ac_ext >&5
6983   rm -rf conftest*
6984   eval "ac_cv_lib_$ac_lib_var=no"
6985 fi
6986 rm -f conftest*
6987 LIBS="$ac_save_LIBS"
6988
6989 fi
6990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6991   echo "$ac_t""yes" 1>&6
6992   have_ssleay=yes
6993                         need_rsaref=no
6994 else
6995   echo "$ac_t""no" 1>&6
6996 have_ssleay=no
6997 fi
6998
6999                         
7000                 if test $have_ssleay = no ; then
7001                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
7002 echo "configure:7003: checking for SSL_library_init in -lssl" >&5
7003 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
7004 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7005   echo $ac_n "(cached) $ac_c" 1>&6
7006 else
7007   ac_save_LIBS="$LIBS"
7008 LIBS="-lssl -lcrypto $LIBS"
7009 cat > conftest.$ac_ext <<EOF
7010 #line 7011 "configure"
7011 #include "confdefs.h"
7012 /* Override any gcc2 internal prototype to avoid an error.  */
7013 /* We use char because int might match the return type of a gcc2
7014     builtin and then its argument prototype would still apply.  */
7015 char SSL_library_init();
7016
7017 int main() {
7018 SSL_library_init()
7019 ; return 0; }
7020 EOF
7021 if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7022   rm -rf conftest*
7023   eval "ac_cv_lib_$ac_lib_var=yes"
7024 else
7025   echo "configure: failed program was:" >&5
7026   cat conftest.$ac_ext >&5
7027   rm -rf conftest*
7028   eval "ac_cv_lib_$ac_lib_var=no"
7029 fi
7030 rm -f conftest*
7031 LIBS="$ac_save_LIBS"
7032
7033 fi
7034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7035   echo "$ac_t""yes" 1>&6
7036   have_ssleay=yes
7037                                 need_rsaref=no
7038 else
7039   echo "$ac_t""no" 1>&6
7040 have_ssleay=no
7041 fi
7042
7043                 fi
7044
7045                 if test $have_ssleay = no ; then
7046                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
7047 echo "configure:7048: checking for ssl3_accept in -lssl" >&5
7048 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
7049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7050   echo $ac_n "(cached) $ac_c" 1>&6
7051 else
7052   ac_save_LIBS="$LIBS"
7053 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
7054 cat > conftest.$ac_ext <<EOF
7055 #line 7056 "configure"
7056 #include "confdefs.h"
7057 /* Override any gcc2 internal prototype to avoid an error.  */
7058 /* We use char because int might match the return type of a gcc2
7059     builtin and then its argument prototype would still apply.  */
7060 char ssl3_accept();
7061
7062 int main() {
7063 ssl3_accept()
7064 ; return 0; }
7065 EOF
7066 if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7067   rm -rf conftest*
7068   eval "ac_cv_lib_$ac_lib_var=yes"
7069 else
7070   echo "configure: failed program was:" >&5
7071   cat conftest.$ac_ext >&5
7072   rm -rf conftest*
7073   eval "ac_cv_lib_$ac_lib_var=no"
7074 fi
7075 rm -f conftest*
7076 LIBS="$ac_save_LIBS"
7077
7078 fi
7079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7080   echo "$ac_t""yes" 1>&6
7081   have_ssleay=yes
7082                                 need_rsaref=yes
7083 else
7084   echo "$ac_t""no" 1>&6
7085 have_ssleay=no
7086 fi
7087
7088                 fi
7089
7090                 if test $have_ssleay = yes ; then
7091                         ol_with_tls=found
7092                         ol_link_tls=yes
7093
7094                         cat >> confdefs.h <<\EOF
7095 #define HAVE_SSLEAY 1
7096 EOF
7097
7098
7099                         if test $need_rsaref = yes; then
7100                                 cat >> confdefs.h <<\EOF
7101 #define HAVE_RSAREF 1
7102 EOF
7103
7104
7105                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
7106                         else
7107                                 TLS_LIBS="-lssl -lcrypto"
7108                         fi
7109                 fi
7110         fi
7111
7112 else
7113         echo "configure: warning: TLS privacy protection not supported!" 1>&2
7114 fi
7115
7116 if test $ol_link_tls = yes ; then
7117         cat >> confdefs.h <<\EOF
7118 #define HAVE_TLS 1
7119 EOF
7120
7121
7122 elif test $ol_with_tls = auto ; then
7123         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
7124         echo "configure: warning: TLS privacy protection not supported!" 1>&2
7125
7126 elif test $ol_with_tls != no ; then
7127         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
7128 fi
7129
7130 if test $ol_enable_lmpasswd != no; then
7131         if test $ol_link_tls != yes ; then
7132                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
7133         fi
7134
7135         cat >> confdefs.h <<\EOF
7136 #define SLAPD_LMHASH 1
7137 EOF
7138
7139 fi
7140
7141 for ac_func in \
7142         ctime_r                 \
7143         gethostbyname_r gethostbyaddr_r \
7144
7145 do
7146 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7147 echo "configure:7148: checking for $ac_func" >&5
7148 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7149   echo $ac_n "(cached) $ac_c" 1>&6
7150 else
7151   cat > conftest.$ac_ext <<EOF
7152 #line 7153 "configure"
7153 #include "confdefs.h"
7154 /* System header to define __stub macros and hopefully few prototypes,
7155     which can conflict with char $ac_func(); below.  */
7156 #include <assert.h>
7157 /* Override any gcc2 internal prototype to avoid an error.  */
7158 /* We use char because int might match the return type of a gcc2
7159     builtin and then its argument prototype would still apply.  */
7160 char $ac_func();
7161 char (*f)();
7162
7163 int main() {
7164
7165 /* The GNU C library defines this for functions which it implements
7166     to always fail with ENOSYS.  Some functions are actually named
7167     something starting with __ and the normal name is an alias.  */
7168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7169 choke me
7170 #else
7171 f = $ac_func;
7172 #endif
7173
7174 ; return 0; }
7175 EOF
7176 if { (eval echo configure:7177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7177   rm -rf conftest*
7178   eval "ac_cv_func_$ac_func=yes"
7179 else
7180   echo "configure: failed program was:" >&5
7181   cat conftest.$ac_ext >&5
7182   rm -rf conftest*
7183   eval "ac_cv_func_$ac_func=no"
7184 fi
7185 rm -f conftest*
7186 fi
7187
7188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7189   echo "$ac_t""yes" 1>&6
7190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7191   cat >> confdefs.h <<EOF
7192 #define $ac_tr_func 1
7193 EOF
7194  
7195 else
7196   echo "$ac_t""no" 1>&6
7197 fi
7198 done
7199
7200
7201 if test "$ac_cv_func_ctime_r" = no ; then
7202         ol_cv_func_ctime_r_nargs=0
7203 else
7204         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
7205 echo "configure:7206: checking number of arguments of ctime_r" >&5
7206 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
7207   echo $ac_n "(cached) $ac_c" 1>&6
7208 else
7209   cat > conftest.$ac_ext <<EOF
7210 #line 7211 "configure"
7211 #include "confdefs.h"
7212 #include <time.h>
7213 int main() {
7214 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
7215 ; return 0; }
7216 EOF
7217 if { (eval echo configure:7218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7218   rm -rf conftest*
7219   ol_cv_func_ctime_r_nargs3=yes
7220 else
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -rf conftest*
7224   ol_cv_func_ctime_r_nargs3=no
7225 fi
7226 rm -f conftest*
7227
7228         cat > conftest.$ac_ext <<EOF
7229 #line 7230 "configure"
7230 #include "confdefs.h"
7231 #include <time.h>
7232 int main() {
7233 time_t ti; char *buffer; ctime_r(&ti,buffer);
7234 ; return 0; }
7235 EOF
7236 if { (eval echo configure:7237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7237   rm -rf conftest*
7238   ol_cv_func_ctime_r_nargs2=yes
7239 else
7240   echo "configure: failed program was:" >&5
7241   cat conftest.$ac_ext >&5
7242   rm -rf conftest*
7243   ol_cv_func_ctime_r_nargs2=no
7244 fi
7245 rm -f conftest*
7246
7247         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
7248                 $ol_cv_func_ctime_r_nargs2 = no ; then
7249
7250                 ol_cv_func_ctime_r_nargs=3
7251
7252         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
7253                 $ol_cv_func_ctime_r_nargs2 = yes ; then
7254
7255                 ol_cv_func_ctime_r_nargs=2
7256
7257         else
7258                 ol_cv_func_ctime_r_nargs=0
7259         fi
7260   
7261 fi
7262
7263 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
7264
7265   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
7266         cat >> confdefs.h <<EOF
7267 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
7268 EOF
7269
7270   fi
7271
7272 fi
7273
7274 if test "$ac_cv_func_gethostbyname_r" = yes ; then
7275         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
7276 echo "configure:7277: checking number of arguments of gethostbyname_r" >&5
7277 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
7278   echo $ac_n "(cached) $ac_c" 1>&6
7279 else
7280   cat > conftest.$ac_ext <<EOF
7281 #line 7282 "configure"
7282 #include "confdefs.h"
7283 #include <sys/types.h>
7284 #include <sys/socket.h>
7285 #include <netinet/in.h>
7286 #include <netdb.h>
7287 #define BUFSIZE (sizeof(struct hostent)+10)
7288 int main() {
7289 struct hostent hent; char buffer[BUFSIZE];
7290                 int bufsize=BUFSIZE;int h_errno;
7291                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
7292                         buffer, bufsize, &h_errno);
7293 ; return 0; }
7294 EOF
7295 if { (eval echo configure:7296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7296   rm -rf conftest*
7297   ol_cv_func_gethostbyname_r_nargs5=yes
7298 else
7299   echo "configure: failed program was:" >&5
7300   cat conftest.$ac_ext >&5
7301   rm -rf conftest*
7302   ol_cv_func_gethostbyname_r_nargs5=no
7303 fi
7304 rm -f conftest*
7305
7306         cat > conftest.$ac_ext <<EOF
7307 #line 7308 "configure"
7308 #include "confdefs.h"
7309 #include <sys/types.h>
7310 #include <sys/socket.h>
7311 #include <netinet/in.h>
7312 #include <netdb.h>
7313 #define BUFSIZE (sizeof(struct hostent)+10)
7314 int main() {
7315 struct hostent hent;struct hostent *rhent;
7316                 char buffer[BUFSIZE];
7317                 int bufsize=BUFSIZE;int h_errno;
7318                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
7319                         &rhent, &h_errno);
7320 ; return 0; }
7321 EOF
7322 if { (eval echo configure:7323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7323   rm -rf conftest*
7324   ol_cv_func_gethostbyname_r_nargs6=yes
7325 else
7326   echo "configure: failed program was:" >&5
7327   cat conftest.$ac_ext >&5
7328   rm -rf conftest*
7329   ol_cv_func_gethostbyname_r_nargs6=no
7330 fi
7331 rm -f conftest*
7332
7333         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
7334                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
7335
7336                 ol_cv_func_gethostbyname_r_nargs=5
7337
7338         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7339                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7340
7341                 ol_cv_func_gethostbyname_r_nargs=6
7342
7343         else
7344                 ol_cv_func_gethostbyname_r_nargs=0
7345         fi
7346   
7347 fi
7348
7349 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7350   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7351         cat >> confdefs.h <<EOF
7352 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7353 EOF
7354
7355   fi
7356
7357 else
7358         ol_cv_func_gethostbyname_r_nargs=0
7359 fi
7360  
7361 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7362         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7363 echo "configure:7364: checking number of arguments of gethostbyaddr_r" >&5
7364 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7365   echo $ac_n "(cached) $ac_c" 1>&6
7366 else
7367   cat > conftest.$ac_ext <<EOF
7368 #line 7369 "configure"
7369 #include "confdefs.h"
7370 #include <sys/types.h>
7371 #include <sys/socket.h>
7372 #include <netinet/in.h>
7373 #include <netdb.h>
7374 #define BUFSIZE (sizeof(struct hostent)+10)
7375 int main() {
7376 struct hostent hent; char buffer[BUFSIZE]; 
7377             struct in_addr add;
7378             size_t alen=sizeof(struct in_addr);
7379             int bufsize=BUFSIZE;int h_errno;
7380                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7381                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7382 ; return 0; }
7383 EOF
7384 if { (eval echo configure:7385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7385   rm -rf conftest*
7386   ol_cv_func_gethostbyaddr_r_nargs7=yes
7387 else
7388   echo "configure: failed program was:" >&5
7389   cat conftest.$ac_ext >&5
7390   rm -rf conftest*
7391   ol_cv_func_gethostbyaddr_r_nargs7=no
7392 fi
7393 rm -f conftest*
7394
7395         cat > conftest.$ac_ext <<EOF
7396 #line 7397 "configure"
7397 #include "confdefs.h"
7398 #include <sys/types.h>
7399 #include <sys/socket.h>
7400 #include <netinet/in.h>
7401 #include <netdb.h>
7402 #define BUFSIZE (sizeof(struct hostent)+10)
7403 int main() {
7404 struct hostent hent;
7405                 struct hostent *rhent; 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, 
7411                         &rhent, &h_errno);
7412 ; return 0; }
7413 EOF
7414 if { (eval echo configure:7415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7415   rm -rf conftest*
7416   ol_cv_func_gethostbyaddr_r_nargs8=yes
7417 else
7418   echo "configure: failed program was:" >&5
7419   cat conftest.$ac_ext >&5
7420   rm -rf conftest*
7421   ol_cv_func_gethostbyaddr_r_nargs8=no
7422 fi
7423 rm -f conftest*
7424
7425         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7426                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7427
7428                 ol_cv_func_gethostbyaddr_r_nargs=7
7429
7430         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7431                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7432
7433                 ol_cv_func_gethostbyaddr_r_nargs=8
7434
7435         else
7436                 ol_cv_func_gethostbyaddr_r_nargs=0
7437         fi
7438   
7439 fi
7440
7441 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7442   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7443     cat >> confdefs.h <<EOF
7444 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7445 EOF
7446
7447   fi
7448
7449 else
7450         ol_cv_func_gethostbyaddr_r_nargs=0
7451 fi
7452
7453 if test "$ac_cv_func_ctime_r" = yes \
7454         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7455         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7456         -a "$ac_cv_func_gethostbyname_r" = yes \
7457         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7458         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7459         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7460         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7461         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7462         ; then
7463  
7464         cat >> confdefs.h <<\EOF
7465 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7466 EOF
7467
7468 fi
7469
7470 ol_link_threads=no
7471
7472 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7473         -o $ol_with_threads = nt ; then
7474
7475         
7476         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7477 echo "configure:7478: checking for _beginthread" >&5
7478 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7479   echo $ac_n "(cached) $ac_c" 1>&6
7480 else
7481   cat > conftest.$ac_ext <<EOF
7482 #line 7483 "configure"
7483 #include "confdefs.h"
7484 /* System header to define __stub macros and hopefully few prototypes,
7485     which can conflict with char _beginthread(); below.  */
7486 #include <assert.h>
7487 /* Override any gcc2 internal prototype to avoid an error.  */
7488 /* We use char because int might match the return type of a gcc2
7489     builtin and then its argument prototype would still apply.  */
7490 char _beginthread();
7491 char (*f)();
7492
7493 int main() {
7494
7495 /* The GNU C library defines this for functions which it implements
7496     to always fail with ENOSYS.  Some functions are actually named
7497     something starting with __ and the normal name is an alias.  */
7498 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7499 choke me
7500 #else
7501 f = _beginthread;
7502 #endif
7503
7504 ; return 0; }
7505 EOF
7506 if { (eval echo configure:7507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7507   rm -rf conftest*
7508   eval "ac_cv_func__beginthread=yes"
7509 else
7510   echo "configure: failed program was:" >&5
7511   cat conftest.$ac_ext >&5
7512   rm -rf conftest*
7513   eval "ac_cv_func__beginthread=no"
7514 fi
7515 rm -f conftest*
7516 fi
7517
7518 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7519   echo "$ac_t""yes" 1>&6
7520   :
7521 else
7522   echo "$ac_t""no" 1>&6
7523 fi
7524
7525
7526         if test $ac_cv_func__beginthread = yes ; then
7527                 cat >> confdefs.h <<\EOF
7528 #define HAVE_NT_THREADS 1
7529 EOF
7530
7531         fi
7532
7533
7534         if test "$ol_cv_nt_threads" = yes ; then
7535         ol_link_threads=nt
7536         ol_with_threads=found
7537         ol_with_yielding_select=yes
7538
7539                 cat >> confdefs.h <<\EOF
7540 #define HAVE_NT_SERVICE_MANAGER 1
7541 EOF
7542
7543                 cat >> confdefs.h <<\EOF
7544 #define HAVE_NT_EVENT_LOG 1
7545 EOF
7546
7547         fi
7548
7549         if test $ol_with_threads = nt ; then
7550                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7551         fi
7552 fi
7553
7554 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7555         -o $ol_with_threads = posix ; then
7556
7557         for ac_hdr in pthread.h
7558 do
7559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7561 echo "configure:7562: checking for $ac_hdr" >&5
7562 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7563   echo $ac_n "(cached) $ac_c" 1>&6
7564 else
7565   cat > conftest.$ac_ext <<EOF
7566 #line 7567 "configure"
7567 #include "confdefs.h"
7568 #include <$ac_hdr>
7569 EOF
7570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7571 { (eval echo configure:7572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7573 if test -z "$ac_err"; then
7574   rm -rf conftest*
7575   eval "ac_cv_header_$ac_safe=yes"
7576 else
7577   echo "$ac_err" >&5
7578   echo "configure: failed program was:" >&5
7579   cat conftest.$ac_ext >&5
7580   rm -rf conftest*
7581   eval "ac_cv_header_$ac_safe=no"
7582 fi
7583 rm -f conftest*
7584 fi
7585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7586   echo "$ac_t""yes" 1>&6
7587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7588   cat >> confdefs.h <<EOF
7589 #define $ac_tr_hdr 1
7590 EOF
7591  
7592 else
7593   echo "$ac_t""no" 1>&6
7594 fi
7595 done
7596
7597
7598         if test $ac_cv_header_pthread_h = yes ; then
7599                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7600 echo "configure:7601: checking POSIX thread version" >&5
7601 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7602   echo $ac_n "(cached) $ac_c" 1>&6
7603 else
7604   
7605         cat > conftest.$ac_ext <<EOF
7606 #line 7607 "configure"
7607 #include "confdefs.h"
7608
7609 #               include <pthread.h>
7610                 /* this check could be improved */
7611 #               ifdef PTHREAD_ONCE_INIT
7612                         pthread_version_final;
7613 #               endif
7614         
7615 EOF
7616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7617   egrep "pthread_version_final" >/dev/null 2>&1; then
7618   rm -rf conftest*
7619   ol_pthread_final=yes
7620 else
7621   rm -rf conftest*
7622   ol_pthread_final=no
7623 fi
7624 rm -f conftest*
7625
7626
7627         cat > conftest.$ac_ext <<EOF
7628 #line 7629 "configure"
7629 #include "confdefs.h"
7630
7631 #               include <pthread.h>
7632                 /* this check could be improved */
7633 #               ifdef pthread_once_init
7634                         pthread_version_draft4;
7635 #               endif
7636         
7637 EOF
7638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7639   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7640   rm -rf conftest*
7641   ol_pthread_draft4=yes
7642 else
7643   rm -rf conftest*
7644   ol_pthread_draft4=no
7645 fi
7646 rm -f conftest*
7647
7648
7649         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7650                 ol_cv_pthread_version=final
7651         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7652                 ol_cv_pthread_version=draft4
7653         else
7654                 ol_cv_pthread_version=unknown
7655         fi
7656
7657 fi
7658
7659 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7660
7661
7662                 if test $ol_cv_pthread_version = final ; then
7663                         cat >> confdefs.h <<\EOF
7664 #define HAVE_PTHREADS_FINAL 1
7665 EOF
7666
7667                 elif test $ol_cv_pthread_version = draft4 ; then
7668                         cat >> confdefs.h <<\EOF
7669 #define HAVE_PTHREADS_D4 1
7670 EOF
7671
7672                 else
7673                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7674                 fi
7675
7676                 # consider threads found
7677                 ol_with_threads=found
7678
7679                 
7680         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7681 echo "configure:7682: checking for LinuxThreads pthread.h" >&5
7682 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7683   echo $ac_n "(cached) $ac_c" 1>&6
7684 else
7685   cat > conftest.$ac_ext <<EOF
7686 #line 7687 "configure"
7687 #include "confdefs.h"
7688 #include <pthread.h>
7689 EOF
7690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7691   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7692   rm -rf conftest*
7693   ol_cv_header_linux_threads=yes
7694 else
7695   rm -rf conftest*
7696   ol_cv_header_linux_threads=no
7697 fi
7698 rm -f conftest*
7699
7700                 
7701 fi
7702
7703 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7704         if test $ol_cv_header_linux_threads = yes; then
7705                 cat >> confdefs.h <<\EOF
7706 #define HAVE_LINUX_THREADS 1
7707 EOF
7708
7709         fi
7710
7711                 
7712         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7713 echo "configure:7714: checking for GNU Pth pthread.h" >&5
7714 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7715   echo $ac_n "(cached) $ac_c" 1>&6
7716 else
7717   cat > conftest.$ac_ext <<EOF
7718 #line 7719 "configure"
7719 #include "confdefs.h"
7720 #include <pthread.h>
7721 #ifdef _POSIX_THREAD_IS_GNU_PTH
7722         __gnu_pth__;
7723 #endif
7724
7725 EOF
7726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7727   egrep "__gnu_pth__" >/dev/null 2>&1; then
7728   rm -rf conftest*
7729   ol_cv_header_gnu_pth_pthread_h=yes
7730 else
7731   rm -rf conftest*
7732   ol_cv_header_gnu_pth_pthread_h=no
7733 fi
7734 rm -f conftest*
7735
7736                 
7737 fi
7738
7739 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7740
7741
7742                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7743                         for ac_hdr in sched.h
7744 do
7745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7747 echo "configure:7748: checking for $ac_hdr" >&5
7748 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7749   echo $ac_n "(cached) $ac_c" 1>&6
7750 else
7751   cat > conftest.$ac_ext <<EOF
7752 #line 7753 "configure"
7753 #include "confdefs.h"
7754 #include <$ac_hdr>
7755 EOF
7756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7757 { (eval echo configure:7758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7759 if test -z "$ac_err"; then
7760   rm -rf conftest*
7761   eval "ac_cv_header_$ac_safe=yes"
7762 else
7763   echo "$ac_err" >&5
7764   echo "configure: failed program was:" >&5
7765   cat conftest.$ac_ext >&5
7766   rm -rf conftest*
7767   eval "ac_cv_header_$ac_safe=no"
7768 fi
7769 rm -f conftest*
7770 fi
7771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7772   echo "$ac_t""yes" 1>&6
7773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7774   cat >> confdefs.h <<EOF
7775 #define $ac_tr_hdr 1
7776 EOF
7777  
7778 else
7779   echo "$ac_t""no" 1>&6
7780 fi
7781 done
7782
7783                 fi
7784
7785                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7786                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7787 echo "configure:7788: checking for pthread_create in default libraries" >&5
7788 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7789   echo $ac_n "(cached) $ac_c" 1>&6
7790 else
7791   
7792                 if test "$cross_compiling" = yes; then
7793   cat > conftest.$ac_ext <<EOF
7794 #line 7795 "configure"
7795 #include "confdefs.h"
7796 /* pthread test headers */
7797 #include <pthread.h>
7798 #ifndef NULL
7799 #define NULL (void*)0
7800 #endif
7801
7802 static void *task(p)
7803         void *p;
7804 {
7805         return (void *) (p == NULL);
7806 }
7807
7808 int main() {
7809
7810         /* pthread test function */
7811         pthread_t t;
7812         int status;
7813         int detach = 1;
7814
7815 #ifdef HAVE_PTHREADS_FINAL
7816         /* Final pthreads */
7817         pthread_attr_t attr;
7818
7819         status = pthread_attr_init(&attr);
7820         if( status ) return status;
7821
7822 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7823         if( !detach ) {
7824 #if defined( PTHREAD_CREATE_JOINABLE )
7825                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7826 #else
7827                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7828 #endif
7829
7830 #ifdef PTHREAD_CREATE_DETACHED
7831         } else {
7832                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7833 #endif
7834         }
7835         if( status ) return status;
7836 #endif
7837
7838         status = pthread_create( &t, &attr, task, NULL );
7839         if( status ) return status;
7840
7841 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7842         if( detach ) {
7843                 /* give thread a chance to complete */
7844                 /* it should remain joinable and hence detachable */
7845                 sleep( 1 );
7846
7847                 status = pthread_detach( t );
7848                 if( status ) return status;
7849         }
7850 #endif
7851
7852 #else
7853         /* Draft 4 pthreads */
7854         status = pthread_create( &t, pthread_attr_default, task, NULL );
7855         if( status ) return status;
7856
7857         if( detach ) {
7858                 /* give thread a chance to complete */
7859                 /* it should remain joinable and hence detachable */
7860                 sleep( 1 );
7861
7862                 status = pthread_detach( &t );
7863                 if( status ) return status;
7864         }
7865 #endif
7866
7867 #ifdef HAVE_LINUX_THREADS
7868         pthread_kill_other_threads_np();
7869 #endif
7870
7871         return 0;
7872
7873 ; return 0; }
7874 EOF
7875 if { (eval echo configure:7876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7876   rm -rf conftest*
7877   ol_cv_pthread_create=yes
7878 else
7879   echo "configure: failed program was:" >&5
7880   cat conftest.$ac_ext >&5
7881   rm -rf conftest*
7882   ol_cv_pthread_create=no
7883 fi
7884 rm -f conftest*
7885 else
7886   cat > conftest.$ac_ext <<EOF
7887 #line 7888 "configure"
7888 #include "confdefs.h"
7889 /* pthread test headers */
7890 #include <pthread.h>
7891 #ifndef NULL
7892 #define NULL (void*)0
7893 #endif
7894
7895 static void *task(p)
7896         void *p;
7897 {
7898         return (void *) (p == NULL);
7899 }
7900
7901
7902 int main(argc, argv)
7903         int argc;
7904         char **argv;
7905 {
7906
7907         /* pthread test function */
7908         pthread_t t;
7909         int status;
7910         int detach = 1;
7911
7912 #ifdef HAVE_PTHREADS_FINAL
7913         /* Final pthreads */
7914         pthread_attr_t attr;
7915
7916         status = pthread_attr_init(&attr);
7917         if( status ) return status;
7918
7919 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
7920         if( !detach ) {
7921 #if defined( PTHREAD_CREATE_JOINABLE )
7922                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
7923 #else
7924                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
7925 #endif
7926
7927 #ifdef PTHREAD_CREATE_DETACHED
7928         } else {
7929                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
7930 #endif
7931         }
7932         if( status ) return status;
7933 #endif
7934
7935         status = pthread_create( &t, &attr, task, NULL );
7936         if( status ) return status;
7937
7938 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
7939         if( detach ) {
7940                 /* give thread a chance to complete */
7941                 /* it should remain joinable and hence detachable */
7942                 sleep( 1 );
7943
7944                 status = pthread_detach( t );
7945                 if( status ) return status;
7946         }
7947 #endif
7948
7949 #else
7950         /* Draft 4 pthreads */
7951         status = pthread_create( &t, pthread_attr_default, task, NULL );
7952         if( status ) return status;
7953
7954         if( detach ) {
7955                 /* give thread a chance to complete */
7956                 /* it should remain joinable and hence detachable */
7957                 sleep( 1 );
7958
7959                 status = pthread_detach( &t );
7960                 if( status ) return status;
7961         }
7962 #endif
7963
7964 #ifdef HAVE_LINUX_THREADS
7965         pthread_kill_other_threads_np();
7966 #endif
7967
7968         return 0;
7969
7970 }
7971
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7974 then
7975   ol_cv_pthread_create=yes
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -fr conftest*
7980   ol_cv_pthread_create=no
7981 fi
7982 rm -fr conftest*
7983 fi
7984
7985 fi
7986
7987 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7988
7989                 if test $ol_cv_pthread_create != no ; then
7990                         ol_link_threads=posix
7991                         ol_link_pthreads=""
7992                 fi
7993                 
7994                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7995 if test "$ol_link_threads" = no ; then
7996         # try -kthread
7997         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7998 echo "configure:7999: checking for pthread link with -kthread" >&5
7999 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
8000   echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8002   
8003                 # save the flags
8004                 ol_LIBS="$LIBS"
8005                 LIBS="-kthread $LIBS"
8006
8007                 if test "$cross_compiling" = yes; then
8008   cat > conftest.$ac_ext <<EOF
8009 #line 8010 "configure"
8010 #include "confdefs.h"
8011 /* pthread test headers */
8012 #include <pthread.h>
8013 #ifndef NULL
8014 #define NULL (void*)0
8015 #endif
8016
8017 static void *task(p)
8018         void *p;
8019 {
8020         return (void *) (p == NULL);
8021 }
8022
8023 int main() {
8024
8025         /* pthread test function */
8026         pthread_t t;
8027         int status;
8028         int detach = 1;
8029
8030 #ifdef HAVE_PTHREADS_FINAL
8031         /* Final pthreads */
8032         pthread_attr_t attr;
8033
8034         status = pthread_attr_init(&attr);
8035         if( status ) return status;
8036
8037 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8038         if( !detach ) {
8039 #if defined( PTHREAD_CREATE_JOINABLE )
8040                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8041 #else
8042                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8043 #endif
8044
8045 #ifdef PTHREAD_CREATE_DETACHED
8046         } else {
8047                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8048 #endif
8049         }
8050         if( status ) return status;
8051 #endif
8052
8053         status = pthread_create( &t, &attr, task, NULL );
8054         if( status ) return status;
8055
8056 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8057         if( detach ) {
8058                 /* give thread a chance to complete */
8059                 /* it should remain joinable and hence detachable */
8060                 sleep( 1 );
8061
8062                 status = pthread_detach( t );
8063                 if( status ) return status;
8064         }
8065 #endif
8066
8067 #else
8068         /* Draft 4 pthreads */
8069         status = pthread_create( &t, pthread_attr_default, task, NULL );
8070         if( status ) return status;
8071
8072         if( detach ) {
8073                 /* give thread a chance to complete */
8074                 /* it should remain joinable and hence detachable */
8075                 sleep( 1 );
8076
8077                 status = pthread_detach( &t );
8078                 if( status ) return status;
8079         }
8080 #endif
8081
8082 #ifdef HAVE_LINUX_THREADS
8083         pthread_kill_other_threads_np();
8084 #endif
8085
8086         return 0;
8087
8088 ; return 0; }
8089 EOF
8090 if { (eval echo configure:8091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8091   rm -rf conftest*
8092   ol_cv_pthread_kthread=yes
8093 else
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -rf conftest*
8097   ol_cv_pthread_kthread=no
8098 fi
8099 rm -f conftest*
8100 else
8101   cat > conftest.$ac_ext <<EOF
8102 #line 8103 "configure"
8103 #include "confdefs.h"
8104 /* pthread test headers */
8105 #include <pthread.h>
8106 #ifndef NULL
8107 #define NULL (void*)0
8108 #endif
8109
8110 static void *task(p)
8111         void *p;
8112 {
8113         return (void *) (p == NULL);
8114 }
8115
8116
8117 int main(argc, argv)
8118         int argc;
8119         char **argv;
8120 {
8121
8122         /* pthread test function */
8123         pthread_t t;
8124         int status;
8125         int detach = 1;
8126
8127 #ifdef HAVE_PTHREADS_FINAL
8128         /* Final pthreads */
8129         pthread_attr_t attr;
8130
8131         status = pthread_attr_init(&attr);
8132         if( status ) return status;
8133
8134 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8135         if( !detach ) {
8136 #if defined( PTHREAD_CREATE_JOINABLE )
8137                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8138 #else
8139                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8140 #endif
8141
8142 #ifdef PTHREAD_CREATE_DETACHED
8143         } else {
8144                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8145 #endif
8146         }
8147         if( status ) return status;
8148 #endif
8149
8150         status = pthread_create( &t, &attr, task, NULL );
8151         if( status ) return status;
8152
8153 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8154         if( detach ) {
8155                 /* give thread a chance to complete */
8156                 /* it should remain joinable and hence detachable */
8157                 sleep( 1 );
8158
8159                 status = pthread_detach( t );
8160                 if( status ) return status;
8161         }
8162 #endif
8163
8164 #else
8165         /* Draft 4 pthreads */
8166         status = pthread_create( &t, pthread_attr_default, task, NULL );
8167         if( status ) return status;
8168
8169         if( detach ) {
8170                 /* give thread a chance to complete */
8171                 /* it should remain joinable and hence detachable */
8172                 sleep( 1 );
8173
8174                 status = pthread_detach( &t );
8175                 if( status ) return status;
8176         }
8177 #endif
8178
8179 #ifdef HAVE_LINUX_THREADS
8180         pthread_kill_other_threads_np();
8181 #endif
8182
8183         return 0;
8184
8185 }
8186
8187 EOF
8188 if { (eval echo configure:8189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8189 then
8190   ol_cv_pthread_kthread=yes
8191 else
8192   echo "configure: failed program was:" >&5
8193   cat conftest.$ac_ext >&5
8194   rm -fr conftest*
8195   ol_cv_pthread_kthread=no
8196 fi
8197 rm -fr conftest*
8198 fi
8199
8200
8201                 # restore the LIBS
8202                 LIBS="$ol_LIBS"
8203         
8204 fi
8205
8206 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
8207
8208         if test $ol_cv_pthread_kthread = yes ; then
8209                 ol_link_pthreads="-kthread"
8210                 ol_link_threads=posix
8211         fi
8212 fi
8213
8214                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
8215 if test "$ol_link_threads" = no ; then
8216         # try -pthread
8217         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
8218 echo "configure:8219: checking for pthread link with -pthread" >&5
8219 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
8220   echo $ac_n "(cached) $ac_c" 1>&6
8221 else
8222   
8223                 # save the flags
8224                 ol_LIBS="$LIBS"
8225                 LIBS="-pthread $LIBS"
8226
8227                 if test "$cross_compiling" = yes; then
8228   cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* pthread test headers */
8232 #include <pthread.h>
8233 #ifndef NULL
8234 #define NULL (void*)0
8235 #endif
8236
8237 static void *task(p)
8238         void *p;
8239 {
8240         return (void *) (p == NULL);
8241 }
8242
8243 int main() {
8244
8245         /* pthread test function */
8246         pthread_t t;
8247         int status;
8248         int detach = 1;
8249
8250 #ifdef HAVE_PTHREADS_FINAL
8251         /* Final pthreads */
8252         pthread_attr_t attr;
8253
8254         status = pthread_attr_init(&attr);
8255         if( status ) return status;
8256
8257 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8258         if( !detach ) {
8259 #if defined( PTHREAD_CREATE_JOINABLE )
8260                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8261 #else
8262                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8263 #endif
8264
8265 #ifdef PTHREAD_CREATE_DETACHED
8266         } else {
8267                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8268 #endif
8269         }
8270         if( status ) return status;
8271 #endif
8272
8273         status = pthread_create( &t, &attr, task, NULL );
8274         if( status ) return status;
8275
8276 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8277         if( detach ) {
8278                 /* give thread a chance to complete */
8279                 /* it should remain joinable and hence detachable */
8280                 sleep( 1 );
8281
8282                 status = pthread_detach( t );
8283                 if( status ) return status;
8284         }
8285 #endif
8286
8287 #else
8288         /* Draft 4 pthreads */
8289         status = pthread_create( &t, pthread_attr_default, task, NULL );
8290         if( status ) return status;
8291
8292         if( detach ) {
8293                 /* give thread a chance to complete */
8294                 /* it should remain joinable and hence detachable */
8295                 sleep( 1 );
8296
8297                 status = pthread_detach( &t );
8298                 if( status ) return status;
8299         }
8300 #endif
8301
8302 #ifdef HAVE_LINUX_THREADS
8303         pthread_kill_other_threads_np();
8304 #endif
8305
8306         return 0;
8307
8308 ; return 0; }
8309 EOF
8310 if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8311   rm -rf conftest*
8312   ol_cv_pthread_pthread=yes
8313 else
8314   echo "configure: failed program was:" >&5
8315   cat conftest.$ac_ext >&5
8316   rm -rf conftest*
8317   ol_cv_pthread_pthread=no
8318 fi
8319 rm -f conftest*
8320 else
8321   cat > conftest.$ac_ext <<EOF
8322 #line 8323 "configure"
8323 #include "confdefs.h"
8324 /* pthread test headers */
8325 #include <pthread.h>
8326 #ifndef NULL
8327 #define NULL (void*)0
8328 #endif
8329
8330 static void *task(p)
8331         void *p;
8332 {
8333         return (void *) (p == NULL);
8334 }
8335
8336
8337 int main(argc, argv)
8338         int argc;
8339         char **argv;
8340 {
8341
8342         /* pthread test function */
8343         pthread_t t;
8344         int status;
8345         int detach = 1;
8346
8347 #ifdef HAVE_PTHREADS_FINAL
8348         /* Final pthreads */
8349         pthread_attr_t attr;
8350
8351         status = pthread_attr_init(&attr);
8352         if( status ) return status;
8353
8354 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8355         if( !detach ) {
8356 #if defined( PTHREAD_CREATE_JOINABLE )
8357                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8358 #else
8359                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8360 #endif
8361
8362 #ifdef PTHREAD_CREATE_DETACHED
8363         } else {
8364                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8365 #endif
8366         }
8367         if( status ) return status;
8368 #endif
8369
8370         status = pthread_create( &t, &attr, task, NULL );
8371         if( status ) return status;
8372
8373 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8374         if( detach ) {
8375                 /* give thread a chance to complete */
8376                 /* it should remain joinable and hence detachable */
8377                 sleep( 1 );
8378
8379                 status = pthread_detach( t );
8380                 if( status ) return status;
8381         }
8382 #endif
8383
8384 #else
8385         /* Draft 4 pthreads */
8386         status = pthread_create( &t, pthread_attr_default, task, NULL );
8387         if( status ) return status;
8388
8389         if( detach ) {
8390                 /* give thread a chance to complete */
8391                 /* it should remain joinable and hence detachable */
8392                 sleep( 1 );
8393
8394                 status = pthread_detach( &t );
8395                 if( status ) return status;
8396         }
8397 #endif
8398
8399 #ifdef HAVE_LINUX_THREADS
8400         pthread_kill_other_threads_np();
8401 #endif
8402
8403         return 0;
8404
8405 }
8406
8407 EOF
8408 if { (eval echo configure:8409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8409 then
8410   ol_cv_pthread_pthread=yes
8411 else
8412   echo "configure: failed program was:" >&5
8413   cat conftest.$ac_ext >&5
8414   rm -fr conftest*
8415   ol_cv_pthread_pthread=no
8416 fi
8417 rm -fr conftest*
8418 fi
8419
8420
8421                 # restore the LIBS
8422                 LIBS="$ol_LIBS"
8423         
8424 fi
8425
8426 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
8427
8428         if test $ol_cv_pthread_pthread = yes ; then
8429                 ol_link_pthreads="-pthread"
8430                 ol_link_threads=posix
8431         fi
8432 fi
8433
8434                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
8435 if test "$ol_link_threads" = no ; then
8436         # try -pthreads
8437         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
8438 echo "configure:8439: checking for pthread link with -pthreads" >&5
8439 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
8440   echo $ac_n "(cached) $ac_c" 1>&6
8441 else
8442   
8443                 # save the flags
8444                 ol_LIBS="$LIBS"
8445                 LIBS="-pthreads $LIBS"
8446
8447                 if test "$cross_compiling" = yes; then
8448   cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 /* pthread test headers */
8452 #include <pthread.h>
8453 #ifndef NULL
8454 #define NULL (void*)0
8455 #endif
8456
8457 static void *task(p)
8458         void *p;
8459 {
8460         return (void *) (p == NULL);
8461 }
8462
8463 int main() {
8464
8465         /* pthread test function */
8466         pthread_t t;
8467         int status;
8468         int detach = 1;
8469
8470 #ifdef HAVE_PTHREADS_FINAL
8471         /* Final pthreads */
8472         pthread_attr_t attr;
8473
8474         status = pthread_attr_init(&attr);
8475         if( status ) return status;
8476
8477 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8478         if( !detach ) {
8479 #if defined( PTHREAD_CREATE_JOINABLE )
8480                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8481 #else
8482                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8483 #endif
8484
8485 #ifdef PTHREAD_CREATE_DETACHED
8486         } else {
8487                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8488 #endif
8489         }
8490         if( status ) return status;
8491 #endif
8492
8493         status = pthread_create( &t, &attr, task, NULL );
8494         if( status ) return status;
8495
8496 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8497         if( detach ) {
8498                 /* give thread a chance to complete */
8499                 /* it should remain joinable and hence detachable */
8500                 sleep( 1 );
8501
8502                 status = pthread_detach( t );
8503                 if( status ) return status;
8504         }
8505 #endif
8506
8507 #else
8508         /* Draft 4 pthreads */
8509         status = pthread_create( &t, pthread_attr_default, task, NULL );
8510         if( status ) return status;
8511
8512         if( detach ) {
8513                 /* give thread a chance to complete */
8514                 /* it should remain joinable and hence detachable */
8515                 sleep( 1 );
8516
8517                 status = pthread_detach( &t );
8518                 if( status ) return status;
8519         }
8520 #endif
8521
8522 #ifdef HAVE_LINUX_THREADS
8523         pthread_kill_other_threads_np();
8524 #endif
8525
8526         return 0;
8527
8528 ; return 0; }
8529 EOF
8530 if { (eval echo configure:8531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8531   rm -rf conftest*
8532   ol_cv_pthread_pthreads=yes
8533 else
8534   echo "configure: failed program was:" >&5
8535   cat conftest.$ac_ext >&5
8536   rm -rf conftest*
8537   ol_cv_pthread_pthreads=no
8538 fi
8539 rm -f conftest*
8540 else
8541   cat > conftest.$ac_ext <<EOF
8542 #line 8543 "configure"
8543 #include "confdefs.h"
8544 /* pthread test headers */
8545 #include <pthread.h>
8546 #ifndef NULL
8547 #define NULL (void*)0
8548 #endif
8549
8550 static void *task(p)
8551         void *p;
8552 {
8553         return (void *) (p == NULL);
8554 }
8555
8556
8557 int main(argc, argv)
8558         int argc;
8559         char **argv;
8560 {
8561
8562         /* pthread test function */
8563         pthread_t t;
8564         int status;
8565         int detach = 1;
8566
8567 #ifdef HAVE_PTHREADS_FINAL
8568         /* Final pthreads */
8569         pthread_attr_t attr;
8570
8571         status = pthread_attr_init(&attr);
8572         if( status ) return status;
8573
8574 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8575         if( !detach ) {
8576 #if defined( PTHREAD_CREATE_JOINABLE )
8577                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8578 #else
8579                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8580 #endif
8581
8582 #ifdef PTHREAD_CREATE_DETACHED
8583         } else {
8584                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8585 #endif
8586         }
8587         if( status ) return status;
8588 #endif
8589
8590         status = pthread_create( &t, &attr, task, NULL );
8591         if( status ) return status;
8592
8593 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8594         if( detach ) {
8595                 /* give thread a chance to complete */
8596                 /* it should remain joinable and hence detachable */
8597                 sleep( 1 );
8598
8599                 status = pthread_detach( t );
8600                 if( status ) return status;
8601         }
8602 #endif
8603
8604 #else
8605         /* Draft 4 pthreads */
8606         status = pthread_create( &t, pthread_attr_default, task, NULL );
8607         if( status ) return status;
8608
8609         if( detach ) {
8610                 /* give thread a chance to complete */
8611                 /* it should remain joinable and hence detachable */
8612                 sleep( 1 );
8613
8614                 status = pthread_detach( &t );
8615                 if( status ) return status;
8616         }
8617 #endif
8618
8619 #ifdef HAVE_LINUX_THREADS
8620         pthread_kill_other_threads_np();
8621 #endif
8622
8623         return 0;
8624
8625 }
8626
8627 EOF
8628 if { (eval echo configure:8629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8629 then
8630   ol_cv_pthread_pthreads=yes
8631 else
8632   echo "configure: failed program was:" >&5
8633   cat conftest.$ac_ext >&5
8634   rm -fr conftest*
8635   ol_cv_pthread_pthreads=no
8636 fi
8637 rm -fr conftest*
8638 fi
8639
8640
8641                 # restore the LIBS
8642                 LIBS="$ol_LIBS"
8643         
8644 fi
8645
8646 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8647
8648         if test $ol_cv_pthread_pthreads = yes ; then
8649                 ol_link_pthreads="-pthreads"
8650                 ol_link_threads=posix
8651         fi
8652 fi
8653
8654                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8655 if test "$ol_link_threads" = no ; then
8656         # try -mthreads
8657         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8658 echo "configure:8659: checking for pthread link with -mthreads" >&5
8659 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8660   echo $ac_n "(cached) $ac_c" 1>&6
8661 else
8662   
8663                 # save the flags
8664                 ol_LIBS="$LIBS"
8665                 LIBS="-mthreads $LIBS"
8666
8667                 if test "$cross_compiling" = yes; then
8668   cat > conftest.$ac_ext <<EOF
8669 #line 8670 "configure"
8670 #include "confdefs.h"
8671 /* pthread test headers */
8672 #include <pthread.h>
8673 #ifndef NULL
8674 #define NULL (void*)0
8675 #endif
8676
8677 static void *task(p)
8678         void *p;
8679 {
8680         return (void *) (p == NULL);
8681 }
8682
8683 int main() {
8684
8685         /* pthread test function */
8686         pthread_t t;
8687         int status;
8688         int detach = 1;
8689
8690 #ifdef HAVE_PTHREADS_FINAL
8691         /* Final pthreads */
8692         pthread_attr_t attr;
8693
8694         status = pthread_attr_init(&attr);
8695         if( status ) return status;
8696
8697 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8698         if( !detach ) {
8699 #if defined( PTHREAD_CREATE_JOINABLE )
8700                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8701 #else
8702                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8703 #endif
8704
8705 #ifdef PTHREAD_CREATE_DETACHED
8706         } else {
8707                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8708 #endif
8709         }
8710         if( status ) return status;
8711 #endif
8712
8713         status = pthread_create( &t, &attr, task, NULL );
8714         if( status ) return status;
8715
8716 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8717         if( detach ) {
8718                 /* give thread a chance to complete */
8719                 /* it should remain joinable and hence detachable */
8720                 sleep( 1 );
8721
8722                 status = pthread_detach( t );
8723                 if( status ) return status;
8724         }
8725 #endif
8726
8727 #else
8728         /* Draft 4 pthreads */
8729         status = pthread_create( &t, pthread_attr_default, task, NULL );
8730         if( status ) return status;
8731
8732         if( detach ) {
8733                 /* give thread a chance to complete */
8734                 /* it should remain joinable and hence detachable */
8735                 sleep( 1 );
8736
8737                 status = pthread_detach( &t );
8738                 if( status ) return status;
8739         }
8740 #endif
8741
8742 #ifdef HAVE_LINUX_THREADS
8743         pthread_kill_other_threads_np();
8744 #endif
8745
8746         return 0;
8747
8748 ; return 0; }
8749 EOF
8750 if { (eval echo configure:8751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8751   rm -rf conftest*
8752   ol_cv_pthread_mthreads=yes
8753 else
8754   echo "configure: failed program was:" >&5
8755   cat conftest.$ac_ext >&5
8756   rm -rf conftest*
8757   ol_cv_pthread_mthreads=no
8758 fi
8759 rm -f conftest*
8760 else
8761   cat > conftest.$ac_ext <<EOF
8762 #line 8763 "configure"
8763 #include "confdefs.h"
8764 /* pthread test headers */
8765 #include <pthread.h>
8766 #ifndef NULL
8767 #define NULL (void*)0
8768 #endif
8769
8770 static void *task(p)
8771         void *p;
8772 {
8773         return (void *) (p == NULL);
8774 }
8775
8776
8777 int main(argc, argv)
8778         int argc;
8779         char **argv;
8780 {
8781
8782         /* pthread test function */
8783         pthread_t t;
8784         int status;
8785         int detach = 1;
8786
8787 #ifdef HAVE_PTHREADS_FINAL
8788         /* Final pthreads */
8789         pthread_attr_t attr;
8790
8791         status = pthread_attr_init(&attr);
8792         if( status ) return status;
8793
8794 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8795         if( !detach ) {
8796 #if defined( PTHREAD_CREATE_JOINABLE )
8797                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8798 #else
8799                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8800 #endif
8801
8802 #ifdef PTHREAD_CREATE_DETACHED
8803         } else {
8804                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8805 #endif
8806         }
8807         if( status ) return status;
8808 #endif
8809
8810         status = pthread_create( &t, &attr, task, NULL );
8811         if( status ) return status;
8812
8813 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8814         if( detach ) {
8815                 /* give thread a chance to complete */
8816                 /* it should remain joinable and hence detachable */
8817                 sleep( 1 );
8818
8819                 status = pthread_detach( t );
8820                 if( status ) return status;
8821         }
8822 #endif
8823
8824 #else
8825         /* Draft 4 pthreads */
8826         status = pthread_create( &t, pthread_attr_default, task, NULL );
8827         if( status ) return status;
8828
8829         if( detach ) {
8830                 /* give thread a chance to complete */
8831                 /* it should remain joinable and hence detachable */
8832                 sleep( 1 );
8833
8834                 status = pthread_detach( &t );
8835                 if( status ) return status;
8836         }
8837 #endif
8838
8839 #ifdef HAVE_LINUX_THREADS
8840         pthread_kill_other_threads_np();
8841 #endif
8842
8843         return 0;
8844
8845 }
8846
8847 EOF
8848 if { (eval echo configure:8849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8849 then
8850   ol_cv_pthread_mthreads=yes
8851 else
8852   echo "configure: failed program was:" >&5
8853   cat conftest.$ac_ext >&5
8854   rm -fr conftest*
8855   ol_cv_pthread_mthreads=no
8856 fi
8857 rm -fr conftest*
8858 fi
8859
8860
8861                 # restore the LIBS
8862                 LIBS="$ol_LIBS"
8863         
8864 fi
8865
8866 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8867
8868         if test $ol_cv_pthread_mthreads = yes ; then
8869                 ol_link_pthreads="-mthreads"
8870                 ol_link_threads=posix
8871         fi
8872 fi
8873
8874                 # Pthread try link: -thread (ol_cv_pthread_thread)
8875 if test "$ol_link_threads" = no ; then
8876         # try -thread
8877         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8878 echo "configure:8879: checking for pthread link with -thread" >&5
8879 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8880   echo $ac_n "(cached) $ac_c" 1>&6
8881 else
8882   
8883                 # save the flags
8884                 ol_LIBS="$LIBS"
8885                 LIBS="-thread $LIBS"
8886
8887                 if test "$cross_compiling" = yes; then
8888   cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891 /* pthread test headers */
8892 #include <pthread.h>
8893 #ifndef NULL
8894 #define NULL (void*)0
8895 #endif
8896
8897 static void *task(p)
8898         void *p;
8899 {
8900         return (void *) (p == NULL);
8901 }
8902
8903 int main() {
8904
8905         /* pthread test function */
8906         pthread_t t;
8907         int status;
8908         int detach = 1;
8909
8910 #ifdef HAVE_PTHREADS_FINAL
8911         /* Final pthreads */
8912         pthread_attr_t attr;
8913
8914         status = pthread_attr_init(&attr);
8915         if( status ) return status;
8916
8917 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
8918         if( !detach ) {
8919 #if defined( PTHREAD_CREATE_JOINABLE )
8920                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
8921 #else
8922                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
8923 #endif
8924
8925 #ifdef PTHREAD_CREATE_DETACHED
8926         } else {
8927                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
8928 #endif
8929         }
8930         if( status ) return status;
8931 #endif
8932
8933         status = pthread_create( &t, &attr, task, NULL );
8934         if( status ) return status;
8935
8936 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
8937         if( detach ) {
8938                 /* give thread a chance to complete */
8939                 /* it should remain joinable and hence detachable */
8940                 sleep( 1 );
8941
8942                 status = pthread_detach( t );
8943                 if( status ) return status;
8944         }
8945 #endif
8946
8947 #else
8948         /* Draft 4 pthreads */
8949         status = pthread_create( &t, pthread_attr_default, task, NULL );
8950         if( status ) return status;
8951
8952         if( detach ) {
8953                 /* give thread a chance to complete */
8954                 /* it should remain joinable and hence detachable */
8955                 sleep( 1 );
8956
8957                 status = pthread_detach( &t );
8958                 if( status ) return status;
8959         }
8960 #endif
8961
8962 #ifdef HAVE_LINUX_THREADS
8963         pthread_kill_other_threads_np();
8964 #endif
8965
8966         return 0;
8967
8968 ; return 0; }
8969 EOF
8970 if { (eval echo configure:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8971   rm -rf conftest*
8972   ol_cv_pthread_thread=yes
8973 else
8974   echo "configure: failed program was:" >&5
8975   cat conftest.$ac_ext >&5
8976   rm -rf conftest*
8977   ol_cv_pthread_thread=no
8978 fi
8979 rm -f conftest*
8980 else
8981   cat > conftest.$ac_ext <<EOF
8982 #line 8983 "configure"
8983 #include "confdefs.h"
8984 /* pthread test headers */
8985 #include <pthread.h>
8986 #ifndef NULL
8987 #define NULL (void*)0
8988 #endif
8989
8990 static void *task(p)
8991         void *p;
8992 {
8993         return (void *) (p == NULL);
8994 }
8995
8996
8997 int main(argc, argv)
8998         int argc;
8999         char **argv;
9000 {
9001
9002         /* pthread test function */
9003         pthread_t t;
9004         int status;
9005         int detach = 1;
9006
9007 #ifdef HAVE_PTHREADS_FINAL
9008         /* Final pthreads */
9009         pthread_attr_t attr;
9010
9011         status = pthread_attr_init(&attr);
9012         if( status ) return status;
9013
9014 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9015         if( !detach ) {
9016 #if defined( PTHREAD_CREATE_JOINABLE )
9017                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9018 #else
9019                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9020 #endif
9021
9022 #ifdef PTHREAD_CREATE_DETACHED
9023         } else {
9024                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9025 #endif
9026         }
9027         if( status ) return status;
9028 #endif
9029
9030         status = pthread_create( &t, &attr, task, NULL );
9031         if( status ) return status;
9032
9033 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9034         if( detach ) {
9035                 /* give thread a chance to complete */
9036                 /* it should remain joinable and hence detachable */
9037                 sleep( 1 );
9038
9039                 status = pthread_detach( t );
9040                 if( status ) return status;
9041         }
9042 #endif
9043
9044 #else
9045         /* Draft 4 pthreads */
9046         status = pthread_create( &t, pthread_attr_default, task, NULL );
9047         if( status ) return status;
9048
9049         if( detach ) {
9050                 /* give thread a chance to complete */
9051                 /* it should remain joinable and hence detachable */
9052                 sleep( 1 );
9053
9054                 status = pthread_detach( &t );
9055                 if( status ) return status;
9056         }
9057 #endif
9058
9059 #ifdef HAVE_LINUX_THREADS
9060         pthread_kill_other_threads_np();
9061 #endif
9062
9063         return 0;
9064
9065 }
9066
9067 EOF
9068 if { (eval echo configure:9069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9069 then
9070   ol_cv_pthread_thread=yes
9071 else
9072   echo "configure: failed program was:" >&5
9073   cat conftest.$ac_ext >&5
9074   rm -fr conftest*
9075   ol_cv_pthread_thread=no
9076 fi
9077 rm -fr conftest*
9078 fi
9079
9080
9081                 # restore the LIBS
9082                 LIBS="$ol_LIBS"
9083         
9084 fi
9085
9086 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
9087
9088         if test $ol_cv_pthread_thread = yes ; then
9089                 ol_link_pthreads="-thread"
9090                 ol_link_threads=posix
9091         fi
9092 fi
9093
9094
9095                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
9096 if test "$ol_link_threads" = no ; then
9097         # try -lpthread -lmach -lexc -lc_r
9098         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
9099 echo "configure:9100: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
9100 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
9101   echo $ac_n "(cached) $ac_c" 1>&6
9102 else
9103   
9104                 # save the flags
9105                 ol_LIBS="$LIBS"
9106                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
9107
9108                 if test "$cross_compiling" = yes; then
9109   cat > conftest.$ac_ext <<EOF
9110 #line 9111 "configure"
9111 #include "confdefs.h"
9112 /* pthread test headers */
9113 #include <pthread.h>
9114 #ifndef NULL
9115 #define NULL (void*)0
9116 #endif
9117
9118 static void *task(p)
9119         void *p;
9120 {
9121         return (void *) (p == NULL);
9122 }
9123
9124 int main() {
9125
9126         /* pthread test function */
9127         pthread_t t;
9128         int status;
9129         int detach = 1;
9130
9131 #ifdef HAVE_PTHREADS_FINAL
9132         /* Final pthreads */
9133         pthread_attr_t attr;
9134
9135         status = pthread_attr_init(&attr);
9136         if( status ) return status;
9137
9138 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9139         if( !detach ) {
9140 #if defined( PTHREAD_CREATE_JOINABLE )
9141                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9142 #else
9143                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9144 #endif
9145
9146 #ifdef PTHREAD_CREATE_DETACHED
9147         } else {
9148                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9149 #endif
9150         }
9151         if( status ) return status;
9152 #endif
9153
9154         status = pthread_create( &t, &attr, task, NULL );
9155         if( status ) return status;
9156
9157 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9158         if( detach ) {
9159                 /* give thread a chance to complete */
9160                 /* it should remain joinable and hence detachable */
9161                 sleep( 1 );
9162
9163                 status = pthread_detach( t );
9164                 if( status ) return status;
9165         }
9166 #endif
9167
9168 #else
9169         /* Draft 4 pthreads */
9170         status = pthread_create( &t, pthread_attr_default, task, NULL );
9171         if( status ) return status;
9172
9173         if( detach ) {
9174                 /* give thread a chance to complete */
9175                 /* it should remain joinable and hence detachable */
9176                 sleep( 1 );
9177
9178                 status = pthread_detach( &t );
9179                 if( status ) return status;
9180         }
9181 #endif
9182
9183 #ifdef HAVE_LINUX_THREADS
9184         pthread_kill_other_threads_np();
9185 #endif
9186
9187         return 0;
9188
9189 ; return 0; }
9190 EOF
9191 if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9192   rm -rf conftest*
9193   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9194 else
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -rf conftest*
9198   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9199 fi
9200 rm -f conftest*
9201 else
9202   cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205 /* pthread test headers */
9206 #include <pthread.h>
9207 #ifndef NULL
9208 #define NULL (void*)0
9209 #endif
9210
9211 static void *task(p)
9212         void *p;
9213 {
9214         return (void *) (p == NULL);
9215 }
9216
9217
9218 int main(argc, argv)
9219         int argc;
9220         char **argv;
9221 {
9222
9223         /* pthread test function */
9224         pthread_t t;
9225         int status;
9226         int detach = 1;
9227
9228 #ifdef HAVE_PTHREADS_FINAL
9229         /* Final pthreads */
9230         pthread_attr_t attr;
9231
9232         status = pthread_attr_init(&attr);
9233         if( status ) return status;
9234
9235 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9236         if( !detach ) {
9237 #if defined( PTHREAD_CREATE_JOINABLE )
9238                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9239 #else
9240                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9241 #endif
9242
9243 #ifdef PTHREAD_CREATE_DETACHED
9244         } else {
9245                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9246 #endif
9247         }
9248         if( status ) return status;
9249 #endif
9250
9251         status = pthread_create( &t, &attr, task, NULL );
9252         if( status ) return status;
9253
9254 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9255         if( detach ) {
9256                 /* give thread a chance to complete */
9257                 /* it should remain joinable and hence detachable */
9258                 sleep( 1 );
9259
9260                 status = pthread_detach( t );
9261                 if( status ) return status;
9262         }
9263 #endif
9264
9265 #else
9266         /* Draft 4 pthreads */
9267         status = pthread_create( &t, pthread_attr_default, task, NULL );
9268         if( status ) return status;
9269
9270         if( detach ) {
9271                 /* give thread a chance to complete */
9272                 /* it should remain joinable and hence detachable */
9273                 sleep( 1 );
9274
9275                 status = pthread_detach( &t );
9276                 if( status ) return status;
9277         }
9278 #endif
9279
9280 #ifdef HAVE_LINUX_THREADS
9281         pthread_kill_other_threads_np();
9282 #endif
9283
9284         return 0;
9285
9286 }
9287
9288 EOF
9289 if { (eval echo configure:9290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9290 then
9291   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
9292 else
9293   echo "configure: failed program was:" >&5
9294   cat conftest.$ac_ext >&5
9295   rm -fr conftest*
9296   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
9297 fi
9298 rm -fr conftest*
9299 fi
9300
9301
9302                 # restore the LIBS
9303                 LIBS="$ol_LIBS"
9304         
9305 fi
9306
9307 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
9308
9309         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
9310                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
9311                 ol_link_threads=posix
9312         fi
9313 fi
9314
9315                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
9316 if test "$ol_link_threads" = no ; then
9317         # try -lpthread -lmach -lexc
9318         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
9319 echo "configure:9320: checking for pthread link with -lpthread -lmach -lexc" >&5
9320 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
9321   echo $ac_n "(cached) $ac_c" 1>&6
9322 else
9323   
9324                 # save the flags
9325                 ol_LIBS="$LIBS"
9326                 LIBS="-lpthread -lmach -lexc $LIBS"
9327
9328                 if test "$cross_compiling" = yes; then
9329   cat > conftest.$ac_ext <<EOF
9330 #line 9331 "configure"
9331 #include "confdefs.h"
9332 /* pthread test headers */
9333 #include <pthread.h>
9334 #ifndef NULL
9335 #define NULL (void*)0
9336 #endif
9337
9338 static void *task(p)
9339         void *p;
9340 {
9341         return (void *) (p == NULL);
9342 }
9343
9344 int main() {
9345
9346         /* pthread test function */
9347         pthread_t t;
9348         int status;
9349         int detach = 1;
9350
9351 #ifdef HAVE_PTHREADS_FINAL
9352         /* Final pthreads */
9353         pthread_attr_t attr;
9354
9355         status = pthread_attr_init(&attr);
9356         if( status ) return status;
9357
9358 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9359         if( !detach ) {
9360 #if defined( PTHREAD_CREATE_JOINABLE )
9361                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9362 #else
9363                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9364 #endif
9365
9366 #ifdef PTHREAD_CREATE_DETACHED
9367         } else {
9368                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9369 #endif
9370         }
9371         if( status ) return status;
9372 #endif
9373
9374         status = pthread_create( &t, &attr, task, NULL );
9375         if( status ) return status;
9376
9377 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9378         if( detach ) {
9379                 /* give thread a chance to complete */
9380                 /* it should remain joinable and hence detachable */
9381                 sleep( 1 );
9382
9383                 status = pthread_detach( t );
9384                 if( status ) return status;
9385         }
9386 #endif
9387
9388 #else
9389         /* Draft 4 pthreads */
9390         status = pthread_create( &t, pthread_attr_default, task, NULL );
9391         if( status ) return status;
9392
9393         if( detach ) {
9394                 /* give thread a chance to complete */
9395                 /* it should remain joinable and hence detachable */
9396                 sleep( 1 );
9397
9398                 status = pthread_detach( &t );
9399                 if( status ) return status;
9400         }
9401 #endif
9402
9403 #ifdef HAVE_LINUX_THREADS
9404         pthread_kill_other_threads_np();
9405 #endif
9406
9407         return 0;
9408
9409 ; return 0; }
9410 EOF
9411 if { (eval echo configure:9412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9412   rm -rf conftest*
9413   ol_cv_pthread_lpthread_lmach_lexc=yes
9414 else
9415   echo "configure: failed program was:" >&5
9416   cat conftest.$ac_ext >&5
9417   rm -rf conftest*
9418   ol_cv_pthread_lpthread_lmach_lexc=no
9419 fi
9420 rm -f conftest*
9421 else
9422   cat > conftest.$ac_ext <<EOF
9423 #line 9424 "configure"
9424 #include "confdefs.h"
9425 /* pthread test headers */
9426 #include <pthread.h>
9427 #ifndef NULL
9428 #define NULL (void*)0
9429 #endif
9430
9431 static void *task(p)
9432         void *p;
9433 {
9434         return (void *) (p == NULL);
9435 }
9436
9437
9438 int main(argc, argv)
9439         int argc;
9440         char **argv;
9441 {
9442
9443         /* pthread test function */
9444         pthread_t t;
9445         int status;
9446         int detach = 1;
9447
9448 #ifdef HAVE_PTHREADS_FINAL
9449         /* Final pthreads */
9450         pthread_attr_t attr;
9451
9452         status = pthread_attr_init(&attr);
9453         if( status ) return status;
9454
9455 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9456         if( !detach ) {
9457 #if defined( PTHREAD_CREATE_JOINABLE )
9458                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9459 #else
9460                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9461 #endif
9462
9463 #ifdef PTHREAD_CREATE_DETACHED
9464         } else {
9465                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9466 #endif
9467         }
9468         if( status ) return status;
9469 #endif
9470
9471         status = pthread_create( &t, &attr, task, NULL );
9472         if( status ) return status;
9473
9474 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9475         if( detach ) {
9476                 /* give thread a chance to complete */
9477                 /* it should remain joinable and hence detachable */
9478                 sleep( 1 );
9479
9480                 status = pthread_detach( t );
9481                 if( status ) return status;
9482         }
9483 #endif
9484
9485 #else
9486         /* Draft 4 pthreads */
9487         status = pthread_create( &t, pthread_attr_default, task, NULL );
9488         if( status ) return status;
9489
9490         if( detach ) {
9491                 /* give thread a chance to complete */
9492                 /* it should remain joinable and hence detachable */
9493                 sleep( 1 );
9494
9495                 status = pthread_detach( &t );
9496                 if( status ) return status;
9497         }
9498 #endif
9499
9500 #ifdef HAVE_LINUX_THREADS
9501         pthread_kill_other_threads_np();
9502 #endif
9503
9504         return 0;
9505
9506 }
9507
9508 EOF
9509 if { (eval echo configure:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9510 then
9511   ol_cv_pthread_lpthread_lmach_lexc=yes
9512 else
9513   echo "configure: failed program was:" >&5
9514   cat conftest.$ac_ext >&5
9515   rm -fr conftest*
9516   ol_cv_pthread_lpthread_lmach_lexc=no
9517 fi
9518 rm -fr conftest*
9519 fi
9520
9521
9522                 # restore the LIBS
9523                 LIBS="$ol_LIBS"
9524         
9525 fi
9526
9527 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
9528
9529         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
9530                 ol_link_pthreads="-lpthread -lmach -lexc"
9531                 ol_link_threads=posix
9532         fi
9533 fi
9534
9535
9536                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
9537 if test "$ol_link_threads" = no ; then
9538         # try -lpthread -Wl,-woff,85
9539         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
9540 echo "configure:9541: checking for pthread link with -lpthread -Wl,-woff,85" >&5
9541 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
9542   echo $ac_n "(cached) $ac_c" 1>&6
9543 else
9544   
9545                 # save the flags
9546                 ol_LIBS="$LIBS"
9547                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
9548
9549                 if test "$cross_compiling" = yes; then
9550   cat > conftest.$ac_ext <<EOF
9551 #line 9552 "configure"
9552 #include "confdefs.h"
9553 /* pthread test headers */
9554 #include <pthread.h>
9555 #ifndef NULL
9556 #define NULL (void*)0
9557 #endif
9558
9559 static void *task(p)
9560         void *p;
9561 {
9562         return (void *) (p == NULL);
9563 }
9564
9565 int main() {
9566
9567         /* pthread test function */
9568         pthread_t t;
9569         int status;
9570         int detach = 1;
9571
9572 #ifdef HAVE_PTHREADS_FINAL
9573         /* Final pthreads */
9574         pthread_attr_t attr;
9575
9576         status = pthread_attr_init(&attr);
9577         if( status ) return status;
9578
9579 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9580         if( !detach ) {
9581 #if defined( PTHREAD_CREATE_JOINABLE )
9582                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9583 #else
9584                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9585 #endif
9586
9587 #ifdef PTHREAD_CREATE_DETACHED
9588         } else {
9589                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9590 #endif
9591         }
9592         if( status ) return status;
9593 #endif
9594
9595         status = pthread_create( &t, &attr, task, NULL );
9596         if( status ) return status;
9597
9598 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9599         if( detach ) {
9600                 /* give thread a chance to complete */
9601                 /* it should remain joinable and hence detachable */
9602                 sleep( 1 );
9603
9604                 status = pthread_detach( t );
9605                 if( status ) return status;
9606         }
9607 #endif
9608
9609 #else
9610         /* Draft 4 pthreads */
9611         status = pthread_create( &t, pthread_attr_default, task, NULL );
9612         if( status ) return status;
9613
9614         if( detach ) {
9615                 /* give thread a chance to complete */
9616                 /* it should remain joinable and hence detachable */
9617                 sleep( 1 );
9618
9619                 status = pthread_detach( &t );
9620                 if( status ) return status;
9621         }
9622 #endif
9623
9624 #ifdef HAVE_LINUX_THREADS
9625         pthread_kill_other_threads_np();
9626 #endif
9627
9628         return 0;
9629
9630 ; return 0; }
9631 EOF
9632 if { (eval echo configure:9633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9633   rm -rf conftest*
9634   ol_cv_pthread_lib_lpthread_woff=yes
9635 else
9636   echo "configure: failed program was:" >&5
9637   cat conftest.$ac_ext >&5
9638   rm -rf conftest*
9639   ol_cv_pthread_lib_lpthread_woff=no
9640 fi
9641 rm -f conftest*
9642 else
9643   cat > conftest.$ac_ext <<EOF
9644 #line 9645 "configure"
9645 #include "confdefs.h"
9646 /* pthread test headers */
9647 #include <pthread.h>
9648 #ifndef NULL
9649 #define NULL (void*)0
9650 #endif
9651
9652 static void *task(p)
9653         void *p;
9654 {
9655         return (void *) (p == NULL);
9656 }
9657
9658
9659 int main(argc, argv)
9660         int argc;
9661         char **argv;
9662 {
9663
9664         /* pthread test function */
9665         pthread_t t;
9666         int status;
9667         int detach = 1;
9668
9669 #ifdef HAVE_PTHREADS_FINAL
9670         /* Final pthreads */
9671         pthread_attr_t attr;
9672
9673         status = pthread_attr_init(&attr);
9674         if( status ) return status;
9675
9676 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9677         if( !detach ) {
9678 #if defined( PTHREAD_CREATE_JOINABLE )
9679                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9680 #else
9681                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9682 #endif
9683
9684 #ifdef PTHREAD_CREATE_DETACHED
9685         } else {
9686                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9687 #endif
9688         }
9689         if( status ) return status;
9690 #endif
9691
9692         status = pthread_create( &t, &attr, task, NULL );
9693         if( status ) return status;
9694
9695 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9696         if( detach ) {
9697                 /* give thread a chance to complete */
9698                 /* it should remain joinable and hence detachable */
9699                 sleep( 1 );
9700
9701                 status = pthread_detach( t );
9702                 if( status ) return status;
9703         }
9704 #endif
9705
9706 #else
9707         /* Draft 4 pthreads */
9708         status = pthread_create( &t, pthread_attr_default, task, NULL );
9709         if( status ) return status;
9710
9711         if( detach ) {
9712                 /* give thread a chance to complete */
9713                 /* it should remain joinable and hence detachable */
9714                 sleep( 1 );
9715
9716                 status = pthread_detach( &t );
9717                 if( status ) return status;
9718         }
9719 #endif
9720
9721 #ifdef HAVE_LINUX_THREADS
9722         pthread_kill_other_threads_np();
9723 #endif
9724
9725         return 0;
9726
9727 }
9728
9729 EOF
9730 if { (eval echo configure:9731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9731 then
9732   ol_cv_pthread_lib_lpthread_woff=yes
9733 else
9734   echo "configure: failed program was:" >&5
9735   cat conftest.$ac_ext >&5
9736   rm -fr conftest*
9737   ol_cv_pthread_lib_lpthread_woff=no
9738 fi
9739 rm -fr conftest*
9740 fi
9741
9742
9743                 # restore the LIBS
9744                 LIBS="$ol_LIBS"
9745         
9746 fi
9747
9748 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9749
9750         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9751                 ol_link_pthreads="-lpthread -Wl,-woff,85"
9752                 ol_link_threads=posix
9753         fi
9754 fi
9755
9756
9757                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9758 if test "$ol_link_threads" = no ; then
9759         # try -lpthread
9760         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9761 echo "configure:9762: checking for pthread link with -lpthread" >&5
9762 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9763   echo $ac_n "(cached) $ac_c" 1>&6
9764 else
9765   
9766                 # save the flags
9767                 ol_LIBS="$LIBS"
9768                 LIBS="-lpthread $LIBS"
9769
9770                 if test "$cross_compiling" = yes; then
9771   cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 /* pthread test headers */
9775 #include <pthread.h>
9776 #ifndef NULL
9777 #define NULL (void*)0
9778 #endif
9779
9780 static void *task(p)
9781         void *p;
9782 {
9783         return (void *) (p == NULL);
9784 }
9785
9786 int main() {
9787
9788         /* pthread test function */
9789         pthread_t t;
9790         int status;
9791         int detach = 1;
9792
9793 #ifdef HAVE_PTHREADS_FINAL
9794         /* Final pthreads */
9795         pthread_attr_t attr;
9796
9797         status = pthread_attr_init(&attr);
9798         if( status ) return status;
9799
9800 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9801         if( !detach ) {
9802 #if defined( PTHREAD_CREATE_JOINABLE )
9803                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9804 #else
9805                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9806 #endif
9807
9808 #ifdef PTHREAD_CREATE_DETACHED
9809         } else {
9810                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9811 #endif
9812         }
9813         if( status ) return status;
9814 #endif
9815
9816         status = pthread_create( &t, &attr, task, NULL );
9817         if( status ) return status;
9818
9819 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9820         if( detach ) {
9821                 /* give thread a chance to complete */
9822                 /* it should remain joinable and hence detachable */
9823                 sleep( 1 );
9824
9825                 status = pthread_detach( t );
9826                 if( status ) return status;
9827         }
9828 #endif
9829
9830 #else
9831         /* Draft 4 pthreads */
9832         status = pthread_create( &t, pthread_attr_default, task, NULL );
9833         if( status ) return status;
9834
9835         if( detach ) {
9836                 /* give thread a chance to complete */
9837                 /* it should remain joinable and hence detachable */
9838                 sleep( 1 );
9839
9840                 status = pthread_detach( &t );
9841                 if( status ) return status;
9842         }
9843 #endif
9844
9845 #ifdef HAVE_LINUX_THREADS
9846         pthread_kill_other_threads_np();
9847 #endif
9848
9849         return 0;
9850
9851 ; return 0; }
9852 EOF
9853 if { (eval echo configure:9854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9854   rm -rf conftest*
9855   ol_cv_pthread_lpthread=yes
9856 else
9857   echo "configure: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859   rm -rf conftest*
9860   ol_cv_pthread_lpthread=no
9861 fi
9862 rm -f conftest*
9863 else
9864   cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867 /* pthread test headers */
9868 #include <pthread.h>
9869 #ifndef NULL
9870 #define NULL (void*)0
9871 #endif
9872
9873 static void *task(p)
9874         void *p;
9875 {
9876         return (void *) (p == NULL);
9877 }
9878
9879
9880 int main(argc, argv)
9881         int argc;
9882         char **argv;
9883 {
9884
9885         /* pthread test function */
9886         pthread_t t;
9887         int status;
9888         int detach = 1;
9889
9890 #ifdef HAVE_PTHREADS_FINAL
9891         /* Final pthreads */
9892         pthread_attr_t attr;
9893
9894         status = pthread_attr_init(&attr);
9895         if( status ) return status;
9896
9897 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
9898         if( !detach ) {
9899 #if defined( PTHREAD_CREATE_JOINABLE )
9900                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
9901 #else
9902                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
9903 #endif
9904
9905 #ifdef PTHREAD_CREATE_DETACHED
9906         } else {
9907                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9908 #endif
9909         }
9910         if( status ) return status;
9911 #endif
9912
9913         status = pthread_create( &t, &attr, task, NULL );
9914         if( status ) return status;
9915
9916 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
9917         if( detach ) {
9918                 /* give thread a chance to complete */
9919                 /* it should remain joinable and hence detachable */
9920                 sleep( 1 );
9921
9922                 status = pthread_detach( t );
9923                 if( status ) return status;
9924         }
9925 #endif
9926
9927 #else
9928         /* Draft 4 pthreads */
9929         status = pthread_create( &t, pthread_attr_default, task, NULL );
9930         if( status ) return status;
9931
9932         if( detach ) {
9933                 /* give thread a chance to complete */
9934                 /* it should remain joinable and hence detachable */
9935                 sleep( 1 );
9936
9937                 status = pthread_detach( &t );
9938                 if( status ) return status;
9939         }
9940 #endif
9941
9942 #ifdef HAVE_LINUX_THREADS
9943         pthread_kill_other_threads_np();
9944 #endif
9945
9946         return 0;
9947
9948 }
9949
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9952 then
9953   ol_cv_pthread_lpthread=yes
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -fr conftest*
9958   ol_cv_pthread_lpthread=no
9959 fi
9960 rm -fr conftest*
9961 fi
9962
9963
9964                 # restore the LIBS
9965                 LIBS="$ol_LIBS"
9966         
9967 fi
9968
9969 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9970
9971         if test $ol_cv_pthread_lpthread = yes ; then
9972                 ol_link_pthreads="-lpthread"
9973                 ol_link_threads=posix
9974         fi
9975 fi
9976
9977                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9978 if test "$ol_link_threads" = no ; then
9979         # try -lc_r
9980         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9981 echo "configure:9982: checking for pthread link with -lc_r" >&5
9982 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9983   echo $ac_n "(cached) $ac_c" 1>&6
9984 else
9985   
9986                 # save the flags
9987                 ol_LIBS="$LIBS"
9988                 LIBS="-lc_r $LIBS"
9989
9990                 if test "$cross_compiling" = yes; then
9991   cat > conftest.$ac_ext <<EOF
9992 #line 9993 "configure"
9993 #include "confdefs.h"
9994 /* pthread test headers */
9995 #include <pthread.h>
9996 #ifndef NULL
9997 #define NULL (void*)0
9998 #endif
9999
10000 static void *task(p)
10001         void *p;
10002 {
10003         return (void *) (p == NULL);
10004 }
10005
10006 int main() {
10007
10008         /* pthread test function */
10009         pthread_t t;
10010         int status;
10011         int detach = 1;
10012
10013 #ifdef HAVE_PTHREADS_FINAL
10014         /* Final pthreads */
10015         pthread_attr_t attr;
10016
10017         status = pthread_attr_init(&attr);
10018         if( status ) return status;
10019
10020 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10021         if( !detach ) {
10022 #if defined( PTHREAD_CREATE_JOINABLE )
10023                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10024 #else
10025                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10026 #endif
10027
10028 #ifdef PTHREAD_CREATE_DETACHED
10029         } else {
10030                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10031 #endif
10032         }
10033         if( status ) return status;
10034 #endif
10035
10036         status = pthread_create( &t, &attr, task, NULL );
10037         if( status ) return status;
10038
10039 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10040         if( detach ) {
10041                 /* give thread a chance to complete */
10042                 /* it should remain joinable and hence detachable */
10043                 sleep( 1 );
10044
10045                 status = pthread_detach( t );
10046                 if( status ) return status;
10047         }
10048 #endif
10049
10050 #else
10051         /* Draft 4 pthreads */
10052         status = pthread_create( &t, pthread_attr_default, task, NULL );
10053         if( status ) return status;
10054
10055         if( detach ) {
10056                 /* give thread a chance to complete */
10057                 /* it should remain joinable and hence detachable */
10058                 sleep( 1 );
10059
10060                 status = pthread_detach( &t );
10061                 if( status ) return status;
10062         }
10063 #endif
10064
10065 #ifdef HAVE_LINUX_THREADS
10066         pthread_kill_other_threads_np();
10067 #endif
10068
10069         return 0;
10070
10071 ; return 0; }
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10074   rm -rf conftest*
10075   ol_cv_pthread_lc_r=yes
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -rf conftest*
10080   ol_cv_pthread_lc_r=no
10081 fi
10082 rm -f conftest*
10083 else
10084   cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 /* pthread test headers */
10088 #include <pthread.h>
10089 #ifndef NULL
10090 #define NULL (void*)0
10091 #endif
10092
10093 static void *task(p)
10094         void *p;
10095 {
10096         return (void *) (p == NULL);
10097 }
10098
10099
10100 int main(argc, argv)
10101         int argc;
10102         char **argv;
10103 {
10104
10105         /* pthread test function */
10106         pthread_t t;
10107         int status;
10108         int detach = 1;
10109
10110 #ifdef HAVE_PTHREADS_FINAL
10111         /* Final pthreads */
10112         pthread_attr_t attr;
10113
10114         status = pthread_attr_init(&attr);
10115         if( status ) return status;
10116
10117 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10118         if( !detach ) {
10119 #if defined( PTHREAD_CREATE_JOINABLE )
10120                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10121 #else
10122                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10123 #endif
10124
10125 #ifdef PTHREAD_CREATE_DETACHED
10126         } else {
10127                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10128 #endif
10129         }
10130         if( status ) return status;
10131 #endif
10132
10133         status = pthread_create( &t, &attr, task, NULL );
10134         if( status ) return status;
10135
10136 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10137         if( detach ) {
10138                 /* give thread a chance to complete */
10139                 /* it should remain joinable and hence detachable */
10140                 sleep( 1 );
10141
10142                 status = pthread_detach( t );
10143                 if( status ) return status;
10144         }
10145 #endif
10146
10147 #else
10148         /* Draft 4 pthreads */
10149         status = pthread_create( &t, pthread_attr_default, task, NULL );
10150         if( status ) return status;
10151
10152         if( detach ) {
10153                 /* give thread a chance to complete */
10154                 /* it should remain joinable and hence detachable */
10155                 sleep( 1 );
10156
10157                 status = pthread_detach( &t );
10158                 if( status ) return status;
10159         }
10160 #endif
10161
10162 #ifdef HAVE_LINUX_THREADS
10163         pthread_kill_other_threads_np();
10164 #endif
10165
10166         return 0;
10167
10168 }
10169
10170 EOF
10171 if { (eval echo configure:10172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10172 then
10173   ol_cv_pthread_lc_r=yes
10174 else
10175   echo "configure: failed program was:" >&5
10176   cat conftest.$ac_ext >&5
10177   rm -fr conftest*
10178   ol_cv_pthread_lc_r=no
10179 fi
10180 rm -fr conftest*
10181 fi
10182
10183
10184                 # restore the LIBS
10185                 LIBS="$ol_LIBS"
10186         
10187 fi
10188
10189 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
10190
10191         if test $ol_cv_pthread_lc_r = yes ; then
10192                 ol_link_pthreads="-lc_r"
10193                 ol_link_threads=posix
10194         fi
10195 fi
10196
10197
10198                 # Pthread try link: -threads (ol_cv_pthread_threads)
10199 if test "$ol_link_threads" = no ; then
10200         # try -threads
10201         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
10202 echo "configure:10203: checking for pthread link with -threads" >&5
10203 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
10204   echo $ac_n "(cached) $ac_c" 1>&6
10205 else
10206   
10207                 # save the flags
10208                 ol_LIBS="$LIBS"
10209                 LIBS="-threads $LIBS"
10210
10211                 if test "$cross_compiling" = yes; then
10212   cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 /* pthread test headers */
10216 #include <pthread.h>
10217 #ifndef NULL
10218 #define NULL (void*)0
10219 #endif
10220
10221 static void *task(p)
10222         void *p;
10223 {
10224         return (void *) (p == NULL);
10225 }
10226
10227 int main() {
10228
10229         /* pthread test function */
10230         pthread_t t;
10231         int status;
10232         int detach = 1;
10233
10234 #ifdef HAVE_PTHREADS_FINAL
10235         /* Final pthreads */
10236         pthread_attr_t attr;
10237
10238         status = pthread_attr_init(&attr);
10239         if( status ) return status;
10240
10241 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10242         if( !detach ) {
10243 #if defined( PTHREAD_CREATE_JOINABLE )
10244                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10245 #else
10246                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10247 #endif
10248
10249 #ifdef PTHREAD_CREATE_DETACHED
10250         } else {
10251                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10252 #endif
10253         }
10254         if( status ) return status;
10255 #endif
10256
10257         status = pthread_create( &t, &attr, task, NULL );
10258         if( status ) return status;
10259
10260 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10261         if( detach ) {
10262                 /* give thread a chance to complete */
10263                 /* it should remain joinable and hence detachable */
10264                 sleep( 1 );
10265
10266                 status = pthread_detach( t );
10267                 if( status ) return status;
10268         }
10269 #endif
10270
10271 #else
10272         /* Draft 4 pthreads */
10273         status = pthread_create( &t, pthread_attr_default, task, NULL );
10274         if( status ) return status;
10275
10276         if( detach ) {
10277                 /* give thread a chance to complete */
10278                 /* it should remain joinable and hence detachable */
10279                 sleep( 1 );
10280
10281                 status = pthread_detach( &t );
10282                 if( status ) return status;
10283         }
10284 #endif
10285
10286 #ifdef HAVE_LINUX_THREADS
10287         pthread_kill_other_threads_np();
10288 #endif
10289
10290         return 0;
10291
10292 ; return 0; }
10293 EOF
10294 if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10295   rm -rf conftest*
10296   ol_cv_pthread_threads=yes
10297 else
10298   echo "configure: failed program was:" >&5
10299   cat conftest.$ac_ext >&5
10300   rm -rf conftest*
10301   ol_cv_pthread_threads=no
10302 fi
10303 rm -f conftest*
10304 else
10305   cat > conftest.$ac_ext <<EOF
10306 #line 10307 "configure"
10307 #include "confdefs.h"
10308 /* pthread test headers */
10309 #include <pthread.h>
10310 #ifndef NULL
10311 #define NULL (void*)0
10312 #endif
10313
10314 static void *task(p)
10315         void *p;
10316 {
10317         return (void *) (p == NULL);
10318 }
10319
10320
10321 int main(argc, argv)
10322         int argc;
10323         char **argv;
10324 {
10325
10326         /* pthread test function */
10327         pthread_t t;
10328         int status;
10329         int detach = 1;
10330
10331 #ifdef HAVE_PTHREADS_FINAL
10332         /* Final pthreads */
10333         pthread_attr_t attr;
10334
10335         status = pthread_attr_init(&attr);
10336         if( status ) return status;
10337
10338 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10339         if( !detach ) {
10340 #if defined( PTHREAD_CREATE_JOINABLE )
10341                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10342 #else
10343                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10344 #endif
10345
10346 #ifdef PTHREAD_CREATE_DETACHED
10347         } else {
10348                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10349 #endif
10350         }
10351         if( status ) return status;
10352 #endif
10353
10354         status = pthread_create( &t, &attr, task, NULL );
10355         if( status ) return status;
10356
10357 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10358         if( detach ) {
10359                 /* give thread a chance to complete */
10360                 /* it should remain joinable and hence detachable */
10361                 sleep( 1 );
10362
10363                 status = pthread_detach( t );
10364                 if( status ) return status;
10365         }
10366 #endif
10367
10368 #else
10369         /* Draft 4 pthreads */
10370         status = pthread_create( &t, pthread_attr_default, task, NULL );
10371         if( status ) return status;
10372
10373         if( detach ) {
10374                 /* give thread a chance to complete */
10375                 /* it should remain joinable and hence detachable */
10376                 sleep( 1 );
10377
10378                 status = pthread_detach( &t );
10379                 if( status ) return status;
10380         }
10381 #endif
10382
10383 #ifdef HAVE_LINUX_THREADS
10384         pthread_kill_other_threads_np();
10385 #endif
10386
10387         return 0;
10388
10389 }
10390
10391 EOF
10392 if { (eval echo configure:10393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10393 then
10394   ol_cv_pthread_threads=yes
10395 else
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -fr conftest*
10399   ol_cv_pthread_threads=no
10400 fi
10401 rm -fr conftest*
10402 fi
10403
10404
10405                 # restore the LIBS
10406                 LIBS="$ol_LIBS"
10407         
10408 fi
10409
10410 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
10411
10412         if test $ol_cv_pthread_threads = yes ; then
10413                 ol_link_pthreads="-threads"
10414                 ol_link_threads=posix
10415         fi
10416 fi
10417
10418
10419                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
10420 if test "$ol_link_threads" = no ; then
10421         # try -lpthreads -lmach -lexc -lc_r
10422         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
10423 echo "configure:10424: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
10424 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
10425   echo $ac_n "(cached) $ac_c" 1>&6
10426 else
10427   
10428                 # save the flags
10429                 ol_LIBS="$LIBS"
10430                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
10431
10432                 if test "$cross_compiling" = yes; then
10433   cat > conftest.$ac_ext <<EOF
10434 #line 10435 "configure"
10435 #include "confdefs.h"
10436 /* pthread test headers */
10437 #include <pthread.h>
10438 #ifndef NULL
10439 #define NULL (void*)0
10440 #endif
10441
10442 static void *task(p)
10443         void *p;
10444 {
10445         return (void *) (p == NULL);
10446 }
10447
10448 int main() {
10449
10450         /* pthread test function */
10451         pthread_t t;
10452         int status;
10453         int detach = 1;
10454
10455 #ifdef HAVE_PTHREADS_FINAL
10456         /* Final pthreads */
10457         pthread_attr_t attr;
10458
10459         status = pthread_attr_init(&attr);
10460         if( status ) return status;
10461
10462 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10463         if( !detach ) {
10464 #if defined( PTHREAD_CREATE_JOINABLE )
10465                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10466 #else
10467                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10468 #endif
10469
10470 #ifdef PTHREAD_CREATE_DETACHED
10471         } else {
10472                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10473 #endif
10474         }
10475         if( status ) return status;
10476 #endif
10477
10478         status = pthread_create( &t, &attr, task, NULL );
10479         if( status ) return status;
10480
10481 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10482         if( detach ) {
10483                 /* give thread a chance to complete */
10484                 /* it should remain joinable and hence detachable */
10485                 sleep( 1 );
10486
10487                 status = pthread_detach( t );
10488                 if( status ) return status;
10489         }
10490 #endif
10491
10492 #else
10493         /* Draft 4 pthreads */
10494         status = pthread_create( &t, pthread_attr_default, task, NULL );
10495         if( status ) return status;
10496
10497         if( detach ) {
10498                 /* give thread a chance to complete */
10499                 /* it should remain joinable and hence detachable */
10500                 sleep( 1 );
10501
10502                 status = pthread_detach( &t );
10503                 if( status ) return status;
10504         }
10505 #endif
10506
10507 #ifdef HAVE_LINUX_THREADS
10508         pthread_kill_other_threads_np();
10509 #endif
10510
10511         return 0;
10512
10513 ; return 0; }
10514 EOF
10515 if { (eval echo configure:10516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10516   rm -rf conftest*
10517   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10518 else
10519   echo "configure: failed program was:" >&5
10520   cat conftest.$ac_ext >&5
10521   rm -rf conftest*
10522   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10523 fi
10524 rm -f conftest*
10525 else
10526   cat > conftest.$ac_ext <<EOF
10527 #line 10528 "configure"
10528 #include "confdefs.h"
10529 /* pthread test headers */
10530 #include <pthread.h>
10531 #ifndef NULL
10532 #define NULL (void*)0
10533 #endif
10534
10535 static void *task(p)
10536         void *p;
10537 {
10538         return (void *) (p == NULL);
10539 }
10540
10541
10542 int main(argc, argv)
10543         int argc;
10544         char **argv;
10545 {
10546
10547         /* pthread test function */
10548         pthread_t t;
10549         int status;
10550         int detach = 1;
10551
10552 #ifdef HAVE_PTHREADS_FINAL
10553         /* Final pthreads */
10554         pthread_attr_t attr;
10555
10556         status = pthread_attr_init(&attr);
10557         if( status ) return status;
10558
10559 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10560         if( !detach ) {
10561 #if defined( PTHREAD_CREATE_JOINABLE )
10562                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10563 #else
10564                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10565 #endif
10566
10567 #ifdef PTHREAD_CREATE_DETACHED
10568         } else {
10569                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10570 #endif
10571         }
10572         if( status ) return status;
10573 #endif
10574
10575         status = pthread_create( &t, &attr, task, NULL );
10576         if( status ) return status;
10577
10578 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10579         if( detach ) {
10580                 /* give thread a chance to complete */
10581                 /* it should remain joinable and hence detachable */
10582                 sleep( 1 );
10583
10584                 status = pthread_detach( t );
10585                 if( status ) return status;
10586         }
10587 #endif
10588
10589 #else
10590         /* Draft 4 pthreads */
10591         status = pthread_create( &t, pthread_attr_default, task, NULL );
10592         if( status ) return status;
10593
10594         if( detach ) {
10595                 /* give thread a chance to complete */
10596                 /* it should remain joinable and hence detachable */
10597                 sleep( 1 );
10598
10599                 status = pthread_detach( &t );
10600                 if( status ) return status;
10601         }
10602 #endif
10603
10604 #ifdef HAVE_LINUX_THREADS
10605         pthread_kill_other_threads_np();
10606 #endif
10607
10608         return 0;
10609
10610 }
10611
10612 EOF
10613 if { (eval echo configure:10614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10614 then
10615   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
10616 else
10617   echo "configure: failed program was:" >&5
10618   cat conftest.$ac_ext >&5
10619   rm -fr conftest*
10620   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
10621 fi
10622 rm -fr conftest*
10623 fi
10624
10625
10626                 # restore the LIBS
10627                 LIBS="$ol_LIBS"
10628         
10629 fi
10630
10631 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
10632
10633         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
10634                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
10635                 ol_link_threads=posix
10636         fi
10637 fi
10638
10639                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
10640 if test "$ol_link_threads" = no ; then
10641         # try -lpthreads -lmach -lexc
10642         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
10643 echo "configure:10644: checking for pthread link with -lpthreads -lmach -lexc" >&5
10644 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
10645   echo $ac_n "(cached) $ac_c" 1>&6
10646 else
10647   
10648                 # save the flags
10649                 ol_LIBS="$LIBS"
10650                 LIBS="-lpthreads -lmach -lexc $LIBS"
10651
10652                 if test "$cross_compiling" = yes; then
10653   cat > conftest.$ac_ext <<EOF
10654 #line 10655 "configure"
10655 #include "confdefs.h"
10656 /* pthread test headers */
10657 #include <pthread.h>
10658 #ifndef NULL
10659 #define NULL (void*)0
10660 #endif
10661
10662 static void *task(p)
10663         void *p;
10664 {
10665         return (void *) (p == NULL);
10666 }
10667
10668 int main() {
10669
10670         /* pthread test function */
10671         pthread_t t;
10672         int status;
10673         int detach = 1;
10674
10675 #ifdef HAVE_PTHREADS_FINAL
10676         /* Final pthreads */
10677         pthread_attr_t attr;
10678
10679         status = pthread_attr_init(&attr);
10680         if( status ) return status;
10681
10682 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10683         if( !detach ) {
10684 #if defined( PTHREAD_CREATE_JOINABLE )
10685                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10686 #else
10687                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10688 #endif
10689
10690 #ifdef PTHREAD_CREATE_DETACHED
10691         } else {
10692                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10693 #endif
10694         }
10695         if( status ) return status;
10696 #endif
10697
10698         status = pthread_create( &t, &attr, task, NULL );
10699         if( status ) return status;
10700
10701 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10702         if( detach ) {
10703                 /* give thread a chance to complete */
10704                 /* it should remain joinable and hence detachable */
10705                 sleep( 1 );
10706
10707                 status = pthread_detach( t );
10708                 if( status ) return status;
10709         }
10710 #endif
10711
10712 #else
10713         /* Draft 4 pthreads */
10714         status = pthread_create( &t, pthread_attr_default, task, NULL );
10715         if( status ) return status;
10716
10717         if( detach ) {
10718                 /* give thread a chance to complete */
10719                 /* it should remain joinable and hence detachable */
10720                 sleep( 1 );
10721
10722                 status = pthread_detach( &t );
10723                 if( status ) return status;
10724         }
10725 #endif
10726
10727 #ifdef HAVE_LINUX_THREADS
10728         pthread_kill_other_threads_np();
10729 #endif
10730
10731         return 0;
10732
10733 ; return 0; }
10734 EOF
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10736   rm -rf conftest*
10737   ol_cv_pthread_lpthreads_lmach_lexc=yes
10738 else
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -rf conftest*
10742   ol_cv_pthread_lpthreads_lmach_lexc=no
10743 fi
10744 rm -f conftest*
10745 else
10746   cat > conftest.$ac_ext <<EOF
10747 #line 10748 "configure"
10748 #include "confdefs.h"
10749 /* pthread test headers */
10750 #include <pthread.h>
10751 #ifndef NULL
10752 #define NULL (void*)0
10753 #endif
10754
10755 static void *task(p)
10756         void *p;
10757 {
10758         return (void *) (p == NULL);
10759 }
10760
10761
10762 int main(argc, argv)
10763         int argc;
10764         char **argv;
10765 {
10766
10767         /* pthread test function */
10768         pthread_t t;
10769         int status;
10770         int detach = 1;
10771
10772 #ifdef HAVE_PTHREADS_FINAL
10773         /* Final pthreads */
10774         pthread_attr_t attr;
10775
10776         status = pthread_attr_init(&attr);
10777         if( status ) return status;
10778
10779 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10780         if( !detach ) {
10781 #if defined( PTHREAD_CREATE_JOINABLE )
10782                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10783 #else
10784                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10785 #endif
10786
10787 #ifdef PTHREAD_CREATE_DETACHED
10788         } else {
10789                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10790 #endif
10791         }
10792         if( status ) return status;
10793 #endif
10794
10795         status = pthread_create( &t, &attr, task, NULL );
10796         if( status ) return status;
10797
10798 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10799         if( detach ) {
10800                 /* give thread a chance to complete */
10801                 /* it should remain joinable and hence detachable */
10802                 sleep( 1 );
10803
10804                 status = pthread_detach( t );
10805                 if( status ) return status;
10806         }
10807 #endif
10808
10809 #else
10810         /* Draft 4 pthreads */
10811         status = pthread_create( &t, pthread_attr_default, task, NULL );
10812         if( status ) return status;
10813
10814         if( detach ) {
10815                 /* give thread a chance to complete */
10816                 /* it should remain joinable and hence detachable */
10817                 sleep( 1 );
10818
10819                 status = pthread_detach( &t );
10820                 if( status ) return status;
10821         }
10822 #endif
10823
10824 #ifdef HAVE_LINUX_THREADS
10825         pthread_kill_other_threads_np();
10826 #endif
10827
10828         return 0;
10829
10830 }
10831
10832 EOF
10833 if { (eval echo configure:10834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10834 then
10835   ol_cv_pthread_lpthreads_lmach_lexc=yes
10836 else
10837   echo "configure: failed program was:" >&5
10838   cat conftest.$ac_ext >&5
10839   rm -fr conftest*
10840   ol_cv_pthread_lpthreads_lmach_lexc=no
10841 fi
10842 rm -fr conftest*
10843 fi
10844
10845
10846                 # restore the LIBS
10847                 LIBS="$ol_LIBS"
10848         
10849 fi
10850
10851 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
10852
10853         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
10854                 ol_link_pthreads="-lpthreads -lmach -lexc"
10855                 ol_link_threads=posix
10856         fi
10857 fi
10858
10859                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
10860 if test "$ol_link_threads" = no ; then
10861         # try -lpthreads -lexc
10862         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
10863 echo "configure:10864: checking for pthread link with -lpthreads -lexc" >&5
10864 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
10865   echo $ac_n "(cached) $ac_c" 1>&6
10866 else
10867   
10868                 # save the flags
10869                 ol_LIBS="$LIBS"
10870                 LIBS="-lpthreads -lexc $LIBS"
10871
10872                 if test "$cross_compiling" = yes; then
10873   cat > conftest.$ac_ext <<EOF
10874 #line 10875 "configure"
10875 #include "confdefs.h"
10876 /* pthread test headers */
10877 #include <pthread.h>
10878 #ifndef NULL
10879 #define NULL (void*)0
10880 #endif
10881
10882 static void *task(p)
10883         void *p;
10884 {
10885         return (void *) (p == NULL);
10886 }
10887
10888 int main() {
10889
10890         /* pthread test function */
10891         pthread_t t;
10892         int status;
10893         int detach = 1;
10894
10895 #ifdef HAVE_PTHREADS_FINAL
10896         /* Final pthreads */
10897         pthread_attr_t attr;
10898
10899         status = pthread_attr_init(&attr);
10900         if( status ) return status;
10901
10902 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
10903         if( !detach ) {
10904 #if defined( PTHREAD_CREATE_JOINABLE )
10905                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
10906 #else
10907                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
10908 #endif
10909
10910 #ifdef PTHREAD_CREATE_DETACHED
10911         } else {
10912                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
10913 #endif
10914         }
10915         if( status ) return status;
10916 #endif
10917
10918         status = pthread_create( &t, &attr, task, NULL );
10919         if( status ) return status;
10920
10921 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
10922         if( detach ) {
10923                 /* give thread a chance to complete */
10924                 /* it should remain joinable and hence detachable */
10925                 sleep( 1 );
10926
10927                 status = pthread_detach( t );
10928                 if( status ) return status;
10929         }
10930 #endif
10931
10932 #else
10933         /* Draft 4 pthreads */
10934         status = pthread_create( &t, pthread_attr_default, task, NULL );
10935         if( status ) return status;
10936
10937         if( detach ) {
10938                 /* give thread a chance to complete */
10939                 /* it should remain joinable and hence detachable */
10940                 sleep( 1 );
10941
10942                 status = pthread_detach( &t );
10943                 if( status ) return status;
10944         }
10945 #endif
10946
10947 #ifdef HAVE_LINUX_THREADS
10948         pthread_kill_other_threads_np();
10949 #endif
10950
10951         return 0;
10952
10953 ; return 0; }
10954 EOF
10955 if { (eval echo configure:10956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10956   rm -rf conftest*
10957   ol_cv_pthread_lpthreads_lexc=yes
10958 else
10959   echo "configure: failed program was:" >&5
10960   cat conftest.$ac_ext >&5
10961   rm -rf conftest*
10962   ol_cv_pthread_lpthreads_lexc=no
10963 fi
10964 rm -f conftest*
10965 else
10966   cat > conftest.$ac_ext <<EOF
10967 #line 10968 "configure"
10968 #include "confdefs.h"
10969 /* pthread test headers */
10970 #include <pthread.h>
10971 #ifndef NULL
10972 #define NULL (void*)0
10973 #endif
10974
10975 static void *task(p)
10976         void *p;
10977 {
10978         return (void *) (p == NULL);
10979 }
10980
10981
10982 int main(argc, argv)
10983         int argc;
10984         char **argv;
10985 {
10986
10987         /* pthread test function */
10988         pthread_t t;
10989         int status;
10990         int detach = 1;
10991
10992 #ifdef HAVE_PTHREADS_FINAL
10993         /* Final pthreads */
10994         pthread_attr_t attr;
10995
10996         status = pthread_attr_init(&attr);
10997         if( status ) return status;
10998
10999 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11000         if( !detach ) {
11001 #if defined( PTHREAD_CREATE_JOINABLE )
11002                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11003 #else
11004                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11005 #endif
11006
11007 #ifdef PTHREAD_CREATE_DETACHED
11008         } else {
11009                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11010 #endif
11011         }
11012         if( status ) return status;
11013 #endif
11014
11015         status = pthread_create( &t, &attr, task, NULL );
11016         if( status ) return status;
11017
11018 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11019         if( detach ) {
11020                 /* give thread a chance to complete */
11021                 /* it should remain joinable and hence detachable */
11022                 sleep( 1 );
11023
11024                 status = pthread_detach( t );
11025                 if( status ) return status;
11026         }
11027 #endif
11028
11029 #else
11030         /* Draft 4 pthreads */
11031         status = pthread_create( &t, pthread_attr_default, task, NULL );
11032         if( status ) return status;
11033
11034         if( detach ) {
11035                 /* give thread a chance to complete */
11036                 /* it should remain joinable and hence detachable */
11037                 sleep( 1 );
11038
11039                 status = pthread_detach( &t );
11040                 if( status ) return status;
11041         }
11042 #endif
11043
11044 #ifdef HAVE_LINUX_THREADS
11045         pthread_kill_other_threads_np();
11046 #endif
11047
11048         return 0;
11049
11050 }
11051
11052 EOF
11053 if { (eval echo configure:11054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11054 then
11055   ol_cv_pthread_lpthreads_lexc=yes
11056 else
11057   echo "configure: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   rm -fr conftest*
11060   ol_cv_pthread_lpthreads_lexc=no
11061 fi
11062 rm -fr conftest*
11063 fi
11064
11065
11066                 # restore the LIBS
11067                 LIBS="$ol_LIBS"
11068         
11069 fi
11070
11071 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
11072
11073         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
11074                 ol_link_pthreads="-lpthreads -lexc"
11075                 ol_link_threads=posix
11076         fi
11077 fi
11078
11079
11080                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
11081 if test "$ol_link_threads" = no ; then
11082         # try -lpthreads
11083         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
11084 echo "configure:11085: checking for pthread link with -lpthreads" >&5
11085 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
11086   echo $ac_n "(cached) $ac_c" 1>&6
11087 else
11088   
11089                 # save the flags
11090                 ol_LIBS="$LIBS"
11091                 LIBS="-lpthreads $LIBS"
11092
11093                 if test "$cross_compiling" = yes; then
11094   cat > conftest.$ac_ext <<EOF
11095 #line 11096 "configure"
11096 #include "confdefs.h"
11097 /* pthread test headers */
11098 #include <pthread.h>
11099 #ifndef NULL
11100 #define NULL (void*)0
11101 #endif
11102
11103 static void *task(p)
11104         void *p;
11105 {
11106         return (void *) (p == NULL);
11107 }
11108
11109 int main() {
11110
11111         /* pthread test function */
11112         pthread_t t;
11113         int status;
11114         int detach = 1;
11115
11116 #ifdef HAVE_PTHREADS_FINAL
11117         /* Final pthreads */
11118         pthread_attr_t attr;
11119
11120         status = pthread_attr_init(&attr);
11121         if( status ) return status;
11122
11123 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11124         if( !detach ) {
11125 #if defined( PTHREAD_CREATE_JOINABLE )
11126                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11127 #else
11128                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11129 #endif
11130
11131 #ifdef PTHREAD_CREATE_DETACHED
11132         } else {
11133                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11134 #endif
11135         }
11136         if( status ) return status;
11137 #endif
11138
11139         status = pthread_create( &t, &attr, task, NULL );
11140         if( status ) return status;
11141
11142 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11143         if( detach ) {
11144                 /* give thread a chance to complete */
11145                 /* it should remain joinable and hence detachable */
11146                 sleep( 1 );
11147
11148                 status = pthread_detach( t );
11149                 if( status ) return status;
11150         }
11151 #endif
11152
11153 #else
11154         /* Draft 4 pthreads */
11155         status = pthread_create( &t, pthread_attr_default, task, NULL );
11156         if( status ) return status;
11157
11158         if( detach ) {
11159                 /* give thread a chance to complete */
11160                 /* it should remain joinable and hence detachable */
11161                 sleep( 1 );
11162
11163                 status = pthread_detach( &t );
11164                 if( status ) return status;
11165         }
11166 #endif
11167
11168 #ifdef HAVE_LINUX_THREADS
11169         pthread_kill_other_threads_np();
11170 #endif
11171
11172         return 0;
11173
11174 ; return 0; }
11175 EOF
11176 if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11177   rm -rf conftest*
11178   ol_cv_pthread_lib_lpthreads=yes
11179 else
11180   echo "configure: failed program was:" >&5
11181   cat conftest.$ac_ext >&5
11182   rm -rf conftest*
11183   ol_cv_pthread_lib_lpthreads=no
11184 fi
11185 rm -f conftest*
11186 else
11187   cat > conftest.$ac_ext <<EOF
11188 #line 11189 "configure"
11189 #include "confdefs.h"
11190 /* pthread test headers */
11191 #include <pthread.h>
11192 #ifndef NULL
11193 #define NULL (void*)0
11194 #endif
11195
11196 static void *task(p)
11197         void *p;
11198 {
11199         return (void *) (p == NULL);
11200 }
11201
11202
11203 int main(argc, argv)
11204         int argc;
11205         char **argv;
11206 {
11207
11208         /* pthread test function */
11209         pthread_t t;
11210         int status;
11211         int detach = 1;
11212
11213 #ifdef HAVE_PTHREADS_FINAL
11214         /* Final pthreads */
11215         pthread_attr_t attr;
11216
11217         status = pthread_attr_init(&attr);
11218         if( status ) return status;
11219
11220 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11221         if( !detach ) {
11222 #if defined( PTHREAD_CREATE_JOINABLE )
11223                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11224 #else
11225                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11226 #endif
11227
11228 #ifdef PTHREAD_CREATE_DETACHED
11229         } else {
11230                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11231 #endif
11232         }
11233         if( status ) return status;
11234 #endif
11235
11236         status = pthread_create( &t, &attr, task, NULL );
11237         if( status ) return status;
11238
11239 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11240         if( detach ) {
11241                 /* give thread a chance to complete */
11242                 /* it should remain joinable and hence detachable */
11243                 sleep( 1 );
11244
11245                 status = pthread_detach( t );
11246                 if( status ) return status;
11247         }
11248 #endif
11249
11250 #else
11251         /* Draft 4 pthreads */
11252         status = pthread_create( &t, pthread_attr_default, task, NULL );
11253         if( status ) return status;
11254
11255         if( detach ) {
11256                 /* give thread a chance to complete */
11257                 /* it should remain joinable and hence detachable */
11258                 sleep( 1 );
11259
11260                 status = pthread_detach( &t );
11261                 if( status ) return status;
11262         }
11263 #endif
11264
11265 #ifdef HAVE_LINUX_THREADS
11266         pthread_kill_other_threads_np();
11267 #endif
11268
11269         return 0;
11270
11271 }
11272
11273 EOF
11274 if { (eval echo configure:11275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11275 then
11276   ol_cv_pthread_lib_lpthreads=yes
11277 else
11278   echo "configure: failed program was:" >&5
11279   cat conftest.$ac_ext >&5
11280   rm -fr conftest*
11281   ol_cv_pthread_lib_lpthreads=no
11282 fi
11283 rm -fr conftest*
11284 fi
11285
11286
11287                 # restore the LIBS
11288                 LIBS="$ol_LIBS"
11289         
11290 fi
11291
11292 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
11293
11294         if test $ol_cv_pthread_lib_lpthreads = yes ; then
11295                 ol_link_pthreads="-lpthreads"
11296                 ol_link_threads=posix
11297         fi
11298 fi
11299
11300
11301                 if test $ol_link_threads != no ; then
11302                         cat >> confdefs.h <<\EOF
11303 #define HAVE_PTHREADS 1
11304 EOF
11305
11306
11307                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
11308
11309                                                 save_CPPFLAGS="$CPPFLAGS"
11310                         save_LIBS="$LIBS"
11311                         LIBS="$LTHREAD_LIBS $LIBS"
11312
11313                                                                                                 for ac_func in sched_yield pthread_yield
11314 do
11315 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11316 echo "configure:11317: checking for $ac_func" >&5
11317 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11318   echo $ac_n "(cached) $ac_c" 1>&6
11319 else
11320   cat > conftest.$ac_ext <<EOF
11321 #line 11322 "configure"
11322 #include "confdefs.h"
11323 /* System header to define __stub macros and hopefully few prototypes,
11324     which can conflict with char $ac_func(); below.  */
11325 #include <assert.h>
11326 /* Override any gcc2 internal prototype to avoid an error.  */
11327 /* We use char because int might match the return type of a gcc2
11328     builtin and then its argument prototype would still apply.  */
11329 char $ac_func();
11330 char (*f)();
11331
11332 int main() {
11333
11334 /* The GNU C library defines this for functions which it implements
11335     to always fail with ENOSYS.  Some functions are actually named
11336     something starting with __ and the normal name is an alias.  */
11337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11338 choke me
11339 #else
11340 f = $ac_func;
11341 #endif
11342
11343 ; return 0; }
11344 EOF
11345 if { (eval echo configure:11346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11346   rm -rf conftest*
11347   eval "ac_cv_func_$ac_func=yes"
11348 else
11349   echo "configure: failed program was:" >&5
11350   cat conftest.$ac_ext >&5
11351   rm -rf conftest*
11352   eval "ac_cv_func_$ac_func=no"
11353 fi
11354 rm -f conftest*
11355 fi
11356
11357 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11358   echo "$ac_t""yes" 1>&6
11359     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11360   cat >> confdefs.h <<EOF
11361 #define $ac_tr_func 1
11362 EOF
11363  
11364 else
11365   echo "$ac_t""no" 1>&6
11366 fi
11367 done
11368
11369
11370                         if test $ac_cv_func_sched_yield = no -a \
11371                                 $ac_cv_func_pthread_yield = no ; then
11372                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
11373 echo "configure:11374: checking for sched_yield in -lrt" >&5
11374 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
11375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11376   echo $ac_n "(cached) $ac_c" 1>&6
11377 else
11378   ac_save_LIBS="$LIBS"
11379 LIBS="-lrt  $LIBS"
11380 cat > conftest.$ac_ext <<EOF
11381 #line 11382 "configure"
11382 #include "confdefs.h"
11383 /* Override any gcc2 internal prototype to avoid an error.  */
11384 /* We use char because int might match the return type of a gcc2
11385     builtin and then its argument prototype would still apply.  */
11386 char sched_yield();
11387
11388 int main() {
11389 sched_yield()
11390 ; return 0; }
11391 EOF
11392 if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11393   rm -rf conftest*
11394   eval "ac_cv_lib_$ac_lib_var=yes"
11395 else
11396   echo "configure: failed program was:" >&5
11397   cat conftest.$ac_ext >&5
11398   rm -rf conftest*
11399   eval "ac_cv_lib_$ac_lib_var=no"
11400 fi
11401 rm -f conftest*
11402 LIBS="$ac_save_LIBS"
11403
11404 fi
11405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11406   echo "$ac_t""yes" 1>&6
11407   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
11408                                         cat >> confdefs.h <<\EOF
11409 #define HAVE_SCHED_YIELD 1
11410 EOF
11411
11412                                         ac_cv_func_sched_yield=yes
11413 else
11414   echo "$ac_t""no" 1>&6
11415 ac_cv_func_sched_yield=no
11416 fi
11417
11418                         fi
11419                         if test $ac_cv_func_sched_yield = no -a \
11420                                 $ac_cv_func_pthread_yield = no ; then
11421                                                                                                 for ac_func in thr_yield
11422 do
11423 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11424 echo "configure:11425: checking for $ac_func" >&5
11425 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11426   echo $ac_n "(cached) $ac_c" 1>&6
11427 else
11428   cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431 /* System header to define __stub macros and hopefully few prototypes,
11432     which can conflict with char $ac_func(); below.  */
11433 #include <assert.h>
11434 /* Override any gcc2 internal prototype to avoid an error.  */
11435 /* We use char because int might match the return type of a gcc2
11436     builtin and then its argument prototype would still apply.  */
11437 char $ac_func();
11438 char (*f)();
11439
11440 int main() {
11441
11442 /* The GNU C library defines this for functions which it implements
11443     to always fail with ENOSYS.  Some functions are actually named
11444     something starting with __ and the normal name is an alias.  */
11445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11446 choke me
11447 #else
11448 f = $ac_func;
11449 #endif
11450
11451 ; return 0; }
11452 EOF
11453 if { (eval echo configure:11454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11454   rm -rf conftest*
11455   eval "ac_cv_func_$ac_func=yes"
11456 else
11457   echo "configure: failed program was:" >&5
11458   cat conftest.$ac_ext >&5
11459   rm -rf conftest*
11460   eval "ac_cv_func_$ac_func=no"
11461 fi
11462 rm -f conftest*
11463 fi
11464
11465 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11466   echo "$ac_t""yes" 1>&6
11467     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11468   cat >> confdefs.h <<EOF
11469 #define $ac_tr_func 1
11470 EOF
11471  
11472 else
11473   echo "$ac_t""no" 1>&6
11474 fi
11475 done
11476
11477                         fi
11478                         if test $ac_cv_func_sched_yield = no -a \
11479                                 $ac_cv_func_pthread_yield = no -a \
11480                                 "$ac_cv_func_thr_yield" = no ; then
11481                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
11482                         fi
11483
11484                                                 for ac_func in pthread_kill pthread_rwlock_destroy
11485 do
11486 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11487 echo "configure:11488: checking for $ac_func" >&5
11488 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11489   echo $ac_n "(cached) $ac_c" 1>&6
11490 else
11491   cat > conftest.$ac_ext <<EOF
11492 #line 11493 "configure"
11493 #include "confdefs.h"
11494 /* System header to define __stub macros and hopefully few prototypes,
11495     which can conflict with char $ac_func(); below.  */
11496 #include <assert.h>
11497 /* Override any gcc2 internal prototype to avoid an error.  */
11498 /* We use char because int might match the return type of a gcc2
11499     builtin and then its argument prototype would still apply.  */
11500 char $ac_func();
11501 char (*f)();
11502
11503 int main() {
11504
11505 /* The GNU C library defines this for functions which it implements
11506     to always fail with ENOSYS.  Some functions are actually named
11507     something starting with __ and the normal name is an alias.  */
11508 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11509 choke me
11510 #else
11511 f = $ac_func;
11512 #endif
11513
11514 ; return 0; }
11515 EOF
11516 if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11517   rm -rf conftest*
11518   eval "ac_cv_func_$ac_func=yes"
11519 else
11520   echo "configure: failed program was:" >&5
11521   cat conftest.$ac_ext >&5
11522   rm -rf conftest*
11523   eval "ac_cv_func_$ac_func=no"
11524 fi
11525 rm -f conftest*
11526 fi
11527
11528 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11529   echo "$ac_t""yes" 1>&6
11530     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11531   cat >> confdefs.h <<EOF
11532 #define $ac_tr_func 1
11533 EOF
11534  
11535 else
11536   echo "$ac_t""no" 1>&6
11537 fi
11538 done
11539
11540
11541                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
11542 echo "configure:11543: checking for pthread_detach with <pthread.h>" >&5
11543 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
11544   echo $ac_n "(cached) $ac_c" 1>&6
11545 else
11546   
11547                                                                 cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550
11551 #include <pthread.h>
11552 #ifndef NULL
11553 #define NULL (void*)0
11554 #endif
11555
11556 int main() {
11557 pthread_detach(NULL);
11558 ; return 0; }
11559 EOF
11560 if { (eval echo configure:11561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11561   rm -rf conftest*
11562   ol_cv_func_pthread_detach=yes
11563 else
11564   echo "configure: failed program was:" >&5
11565   cat conftest.$ac_ext >&5
11566   rm -rf conftest*
11567   ol_cv_func_pthread_detach=no
11568 fi
11569 rm -f conftest*
11570                         
11571 fi
11572
11573 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
11574
11575                         if test $ol_cv_func_pthread_detach = no ; then
11576                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
11577                         fi
11578
11579                         cat >> confdefs.h <<\EOF
11580 #define HAVE_PTHREAD_DETACH 1
11581 EOF
11582
11583
11584                                                 for ac_func in \
11585                                 pthread_setconcurrency \
11586                                 pthread_getconcurrency \
11587                                 thr_setconcurrency \
11588                                 thr_getconcurrency \
11589                         
11590 do
11591 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11592 echo "configure:11593: checking for $ac_func" >&5
11593 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11594   echo $ac_n "(cached) $ac_c" 1>&6
11595 else
11596   cat > conftest.$ac_ext <<EOF
11597 #line 11598 "configure"
11598 #include "confdefs.h"
11599 /* System header to define __stub macros and hopefully few prototypes,
11600     which can conflict with char $ac_func(); below.  */
11601 #include <assert.h>
11602 /* Override any gcc2 internal prototype to avoid an error.  */
11603 /* We use char because int might match the return type of a gcc2
11604     builtin and then its argument prototype would still apply.  */
11605 char $ac_func();
11606 char (*f)();
11607
11608 int main() {
11609
11610 /* The GNU C library defines this for functions which it implements
11611     to always fail with ENOSYS.  Some functions are actually named
11612     something starting with __ and the normal name is an alias.  */
11613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11614 choke me
11615 #else
11616 f = $ac_func;
11617 #endif
11618
11619 ; return 0; }
11620 EOF
11621 if { (eval echo configure:11622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11622   rm -rf conftest*
11623   eval "ac_cv_func_$ac_func=yes"
11624 else
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -rf conftest*
11628   eval "ac_cv_func_$ac_func=no"
11629 fi
11630 rm -f conftest*
11631 fi
11632
11633 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11634   echo "$ac_t""yes" 1>&6
11635     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11636   cat >> confdefs.h <<EOF
11637 #define $ac_tr_func 1
11638 EOF
11639  
11640 else
11641   echo "$ac_t""no" 1>&6
11642 fi
11643 done
11644
11645
11646                         
11647         for ac_func in pthread_kill_other_threads_np
11648 do
11649 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11650 echo "configure:11651: checking for $ac_func" >&5
11651 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11652   echo $ac_n "(cached) $ac_c" 1>&6
11653 else
11654   cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657 /* System header to define __stub macros and hopefully few prototypes,
11658     which can conflict with char $ac_func(); below.  */
11659 #include <assert.h>
11660 /* Override any gcc2 internal prototype to avoid an error.  */
11661 /* We use char because int might match the return type of a gcc2
11662     builtin and then its argument prototype would still apply.  */
11663 char $ac_func();
11664 char (*f)();
11665
11666 int main() {
11667
11668 /* The GNU C library defines this for functions which it implements
11669     to always fail with ENOSYS.  Some functions are actually named
11670     something starting with __ and the normal name is an alias.  */
11671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11672 choke me
11673 #else
11674 f = $ac_func;
11675 #endif
11676
11677 ; return 0; }
11678 EOF
11679 if { (eval echo configure:11680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11680   rm -rf conftest*
11681   eval "ac_cv_func_$ac_func=yes"
11682 else
11683   echo "configure: failed program was:" >&5
11684   cat conftest.$ac_ext >&5
11685   rm -rf conftest*
11686   eval "ac_cv_func_$ac_func=no"
11687 fi
11688 rm -f conftest*
11689 fi
11690
11691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11692   echo "$ac_t""yes" 1>&6
11693     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11694   cat >> confdefs.h <<EOF
11695 #define $ac_tr_func 1
11696 EOF
11697  
11698 else
11699   echo "$ac_t""no" 1>&6
11700 fi
11701 done
11702
11703         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
11704 echo "configure:11705: checking for LinuxThreads implementation" >&5
11705 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
11706   echo $ac_n "(cached) $ac_c" 1>&6
11707 else
11708   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
11709 fi
11710
11711 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
11712
11713                         
11714         
11715         
11716         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
11717 echo "configure:11718: checking for LinuxThreads consistency" >&5
11718 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
11719   echo $ac_n "(cached) $ac_c" 1>&6
11720 else
11721   
11722                 if test $ol_cv_header_linux_threads = yes -a \
11723                         $ol_cv_sys_linux_threads = yes; then
11724                         ol_cv_linux_threads=yes
11725                 elif test $ol_cv_header_linux_threads = no -a \
11726                         $ol_cv_sys_linux_threads = no; then
11727                         ol_cv_linux_threads=no
11728                 else
11729                         ol_cv_linux_threads=error
11730                 fi
11731         
11732 fi
11733
11734 echo "$ac_t""$ol_cv_linux_threads" 1>&6
11735
11736
11737                         if test $ol_cv_linux_threads = error; then
11738                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
11739                         fi
11740
11741                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
11742 echo "configure:11743: checking if pthread_create() works" >&5
11743 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
11744   echo $ac_n "(cached) $ac_c" 1>&6
11745 else
11746   
11747                         if test "$cross_compiling" = yes; then
11748                                 ol_cv_pthread_create_works=yes
11749 else
11750   cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 /* pthread test headers */
11754 #include <pthread.h>
11755 #ifndef NULL
11756 #define NULL (void*)0
11757 #endif
11758
11759 static void *task(p)
11760         void *p;
11761 {
11762         return (void *) (p == NULL);
11763 }
11764
11765
11766 int main(argc, argv)
11767         int argc;
11768         char **argv;
11769 {
11770
11771         /* pthread test function */
11772         pthread_t t;
11773         int status;
11774         int detach = 1;
11775
11776 #ifdef HAVE_PTHREADS_FINAL
11777         /* Final pthreads */
11778         pthread_attr_t attr;
11779
11780         status = pthread_attr_init(&attr);
11781         if( status ) return status;
11782
11783 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11784         if( !detach ) {
11785 #if defined( PTHREAD_CREATE_JOINABLE )
11786                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11787 #else
11788                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11789 #endif
11790
11791 #ifdef PTHREAD_CREATE_DETACHED
11792         } else {
11793                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11794 #endif
11795         }
11796         if( status ) return status;
11797 #endif
11798
11799         status = pthread_create( &t, &attr, task, NULL );
11800         if( status ) return status;
11801
11802 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11803         if( detach ) {
11804                 /* give thread a chance to complete */
11805                 /* it should remain joinable and hence detachable */
11806                 sleep( 1 );
11807
11808                 status = pthread_detach( t );
11809                 if( status ) return status;
11810         }
11811 #endif
11812
11813 #else
11814         /* Draft 4 pthreads */
11815         status = pthread_create( &t, pthread_attr_default, task, NULL );
11816         if( status ) return status;
11817
11818         if( detach ) {
11819                 /* give thread a chance to complete */
11820                 /* it should remain joinable and hence detachable */
11821                 sleep( 1 );
11822
11823                 status = pthread_detach( &t );
11824                 if( status ) return status;
11825         }
11826 #endif
11827
11828 #ifdef HAVE_LINUX_THREADS
11829         pthread_kill_other_threads_np();
11830 #endif
11831
11832         return 0;
11833
11834 }
11835
11836 EOF
11837 if { (eval echo configure:11838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11838 then
11839   ol_cv_pthread_create_works=yes
11840 else
11841   echo "configure: failed program was:" >&5
11842   cat conftest.$ac_ext >&5
11843   rm -fr conftest*
11844   ol_cv_pthread_create_works=no
11845 fi
11846 rm -fr conftest*
11847 fi
11848
11849 fi
11850
11851 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
11852
11853                         if test $ol_cv_pthread_create_works = no ; then
11854                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
11855                         fi
11856
11857                                                 if test $ol_with_yielding_select = auto ; then
11858                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
11859 echo "configure:11860: checking if select yields when using pthreads" >&5
11860 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
11861   echo $ac_n "(cached) $ac_c" 1>&6
11862 else
11863   
11864                                 if test "$cross_compiling" = yes; then
11865   ol_cv_pthread_select_yields=cross
11866 else
11867   cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870
11871 #include <sys/types.h>
11872 #include <sys/time.h>
11873 #include <unistd.h>
11874 #include <pthread.h>
11875 #ifndef NULL
11876 #define NULL (void*) 0
11877 #endif
11878
11879 static int fildes[2];
11880
11881 static void *task(p)
11882         void *p;
11883 {
11884         int i;
11885         struct timeval tv;
11886
11887         fd_set rfds;
11888
11889         tv.tv_sec=10;
11890         tv.tv_usec=0;
11891
11892         FD_ZERO(&rfds);
11893         FD_SET(fildes[0], &rfds);
11894
11895         /* we're not interested in any fds */
11896         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
11897
11898         if(i < 0) {
11899                 perror("select");
11900                 exit(10);
11901         }
11902
11903         exit(0); /* if we exit here, the select blocked the whole process */
11904 }
11905
11906 int main(argc, argv)
11907         int argc;
11908         char **argv;
11909 {
11910         pthread_t t;
11911
11912         /* create a pipe to select */
11913         if(pipe(&fildes[0])) {
11914                 perror("select");
11915                 exit(1);
11916         }
11917
11918 #ifdef HAVE_PTHREAD_SETCONCURRENCY
11919         (void) pthread_setconcurrency(2);
11920 #else
11921 #ifdef HAVE_THR_SETCONCURRENCY
11922         /* Set Solaris LWP concurrency to 2 */
11923         thr_setconcurrency(2);
11924 #endif
11925 #endif
11926
11927 #if HAVE_PTHREADS_D4
11928         pthread_create(&t, pthread_attr_default, task, NULL);
11929 #else
11930         pthread_create(&t, NULL, task, NULL);
11931 #endif
11932
11933 #if HAVE_SCHED_YIELD
11934         sched_yield();  /* make sure task runs first */
11935 #else
11936 #ifdef HAVE_PTHREAD_YIELD
11937         pthread_yield();        /* make sure task runs first */
11938 #endif
11939 #endif
11940
11941         exit(2);
11942 }
11943 EOF
11944 if { (eval echo configure:11945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11945 then
11946   ol_cv_pthread_select_yields=no
11947 else
11948   echo "configure: failed program was:" >&5
11949   cat conftest.$ac_ext >&5
11950   rm -fr conftest*
11951   ol_cv_pthread_select_yields=yes
11952 fi
11953 rm -fr conftest*
11954 fi
11955
11956 fi
11957
11958 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
11959
11960                                 if test $ol_cv_pthread_select_yields = cross ; then
11961                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
11962                                 fi
11963
11964                                 if test $ol_cv_pthread_select_yields = yes ; then
11965                                         ol_with_yielding_select=yes
11966                                 fi
11967                         fi
11968
11969                                                 CPPFLAGS="$save_CPPFLAGS"
11970                         LIBS="$save_LIBS"
11971                 else
11972                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
11973                 fi
11974         fi
11975
11976         if test $ol_with_threads = posix ; then
11977                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
11978         fi
11979 fi
11980
11981 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11982         -o $ol_with_threads = mach ; then
11983
11984                 for ac_hdr in mach/cthreads.h cthread.h
11985 do
11986 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11987 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11988 echo "configure:11989: checking for $ac_hdr" >&5
11989 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11990   echo $ac_n "(cached) $ac_c" 1>&6
11991 else
11992   cat > conftest.$ac_ext <<EOF
11993 #line 11994 "configure"
11994 #include "confdefs.h"
11995 #include <$ac_hdr>
11996 EOF
11997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11998 { (eval echo configure:11999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12000 if test -z "$ac_err"; then
12001   rm -rf conftest*
12002   eval "ac_cv_header_$ac_safe=yes"
12003 else
12004   echo "$ac_err" >&5
12005   echo "configure: failed program was:" >&5
12006   cat conftest.$ac_ext >&5
12007   rm -rf conftest*
12008   eval "ac_cv_header_$ac_safe=no"
12009 fi
12010 rm -f conftest*
12011 fi
12012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12013   echo "$ac_t""yes" 1>&6
12014     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12015   cat >> confdefs.h <<EOF
12016 #define $ac_tr_hdr 1
12017 EOF
12018  
12019 else
12020   echo "$ac_t""no" 1>&6
12021 fi
12022 done
12023
12024         if test $ac_cv_header_mach_cthreads_h = yes ; then
12025                 ol_with_threads=found
12026
12027                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
12028 echo "configure:12029: checking for cthread_fork" >&5
12029 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
12030   echo $ac_n "(cached) $ac_c" 1>&6
12031 else
12032   cat > conftest.$ac_ext <<EOF
12033 #line 12034 "configure"
12034 #include "confdefs.h"
12035 /* System header to define __stub macros and hopefully few prototypes,
12036     which can conflict with char cthread_fork(); below.  */
12037 #include <assert.h>
12038 /* Override any gcc2 internal prototype to avoid an error.  */
12039 /* We use char because int might match the return type of a gcc2
12040     builtin and then its argument prototype would still apply.  */
12041 char cthread_fork();
12042 char (*f)();
12043
12044 int main() {
12045
12046 /* The GNU C library defines this for functions which it implements
12047     to always fail with ENOSYS.  Some functions are actually named
12048     something starting with __ and the normal name is an alias.  */
12049 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
12050 choke me
12051 #else
12052 f = cthread_fork;
12053 #endif
12054
12055 ; return 0; }
12056 EOF
12057 if { (eval echo configure:12058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12058   rm -rf conftest*
12059   eval "ac_cv_func_cthread_fork=yes"
12060 else
12061   echo "configure: failed program was:" >&5
12062   cat conftest.$ac_ext >&5
12063   rm -rf conftest*
12064   eval "ac_cv_func_cthread_fork=no"
12065 fi
12066 rm -f conftest*
12067 fi
12068
12069 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
12070   echo "$ac_t""yes" 1>&6
12071   ol_link_threads=yes
12072 else
12073   echo "$ac_t""no" 1>&6
12074 fi
12075
12076
12077                 if test $ol_link_threads = no ; then
12078                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
12079 echo "configure:12080: checking for cthread_fork with -all_load" >&5
12080 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
12081   echo $ac_n "(cached) $ac_c" 1>&6
12082 else
12083   
12084                                                                 save_LIBS="$LIBS"
12085                                 LIBS="-all_load $LIBS"
12086                                 cat > conftest.$ac_ext <<EOF
12087 #line 12088 "configure"
12088 #include "confdefs.h"
12089 #include <mach/cthreads.h>
12090 int main() {
12091
12092                                         cthread_fork((void *)0, (void *)0);
12093                                         
12094 ; return 0; }
12095 EOF
12096 if { (eval echo configure:12097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12097   rm -rf conftest*
12098   ol_cv_cthread_all_load=yes
12099 else
12100   echo "configure: failed program was:" >&5
12101   cat conftest.$ac_ext >&5
12102   rm -rf conftest*
12103   ol_cv_cthread_all_load=no
12104 fi
12105 rm -f conftest*
12106                                                                 LIBS="$save_LIBS"
12107                         
12108 fi
12109
12110 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
12111
12112                         if test $ol_cv_cthread_all_load = yes ; then
12113                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
12114                                 ol_link_threads=mach
12115                         fi
12116                 fi
12117
12118     elif test $ac_cv_header_cthreads_h = yes ; then
12119                                 
12120                 ol_with_threads=found
12121  
12122                                 save_LIBS="$LIBS"
12123                 LIBS="$LIBS -lthreads"
12124                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
12125 echo "configure:12126: checking for cthread_fork" >&5
12126 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
12127   echo $ac_n "(cached) $ac_c" 1>&6
12128 else
12129   cat > conftest.$ac_ext <<EOF
12130 #line 12131 "configure"
12131 #include "confdefs.h"
12132 /* System header to define __stub macros and hopefully few prototypes,
12133     which can conflict with char cthread_fork(); below.  */
12134 #include <assert.h>
12135 /* Override any gcc2 internal prototype to avoid an error.  */
12136 /* We use char because int might match the return type of a gcc2
12137     builtin and then its argument prototype would still apply.  */
12138 char cthread_fork();
12139 char (*f)();
12140
12141 int main() {
12142
12143 /* The GNU C library defines this for functions which it implements
12144     to always fail with ENOSYS.  Some functions are actually named
12145     something starting with __ and the normal name is an alias.  */
12146 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
12147 choke me
12148 #else
12149 f = cthread_fork;
12150 #endif
12151
12152 ; return 0; }
12153 EOF
12154 if { (eval echo configure:12155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12155   rm -rf conftest*
12156   eval "ac_cv_func_cthread_fork=yes"
12157 else
12158   echo "configure: failed program was:" >&5
12159   cat conftest.$ac_ext >&5
12160   rm -rf conftest*
12161   eval "ac_cv_func_cthread_fork=no"
12162 fi
12163 rm -f conftest*
12164 fi
12165
12166 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
12167   echo "$ac_t""yes" 1>&6
12168   ol_link_threads=yes
12169 else
12170   echo "$ac_t""no" 1>&6
12171 fi
12172
12173                 LIBS="$save_LIBS"
12174
12175                 if test $ol_link_threads = yes ; then
12176                         LTHREAD_LIBS="-lthreads"
12177                         ol_link_threads=mach
12178                 else
12179                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
12180                 fi
12181
12182         elif test $ol_with_threads = mach ; then
12183                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
12184         fi
12185
12186         if test $ol_link_threads = mach ; then
12187                 cat >> confdefs.h <<\EOF
12188 #define HAVE_MACH_CTHREADS 1
12189 EOF
12190
12191         elif test $ol_with_threads = found ; then
12192                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
12193         fi
12194 fi
12195
12196 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12197         -o $ol_with_threads = pth ; then
12198
12199         for ac_hdr in pth.h
12200 do
12201 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12202 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12203 echo "configure:12204: checking for $ac_hdr" >&5
12204 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12205   echo $ac_n "(cached) $ac_c" 1>&6
12206 else
12207   cat > conftest.$ac_ext <<EOF
12208 #line 12209 "configure"
12209 #include "confdefs.h"
12210 #include <$ac_hdr>
12211 EOF
12212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12213 { (eval echo configure:12214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12215 if test -z "$ac_err"; then
12216   rm -rf conftest*
12217   eval "ac_cv_header_$ac_safe=yes"
12218 else
12219   echo "$ac_err" >&5
12220   echo "configure: failed program was:" >&5
12221   cat conftest.$ac_ext >&5
12222   rm -rf conftest*
12223   eval "ac_cv_header_$ac_safe=no"
12224 fi
12225 rm -f conftest*
12226 fi
12227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12228   echo "$ac_t""yes" 1>&6
12229     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12230   cat >> confdefs.h <<EOF
12231 #define $ac_tr_hdr 1
12232 EOF
12233  
12234 else
12235   echo "$ac_t""no" 1>&6
12236 fi
12237 done
12238
12239
12240         if test $ac_cv_header_pth_h = yes ; then
12241                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
12242 echo "configure:12243: checking for pth_version in -lpth" >&5
12243 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
12244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12245   echo $ac_n "(cached) $ac_c" 1>&6
12246 else
12247   ac_save_LIBS="$LIBS"
12248 LIBS="-lpth  $LIBS"
12249 cat > conftest.$ac_ext <<EOF
12250 #line 12251 "configure"
12251 #include "confdefs.h"
12252 /* Override any gcc2 internal prototype to avoid an error.  */
12253 /* We use char because int might match the return type of a gcc2
12254     builtin and then its argument prototype would still apply.  */
12255 char pth_version();
12256
12257 int main() {
12258 pth_version()
12259 ; return 0; }
12260 EOF
12261 if { (eval echo configure:12262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12262   rm -rf conftest*
12263   eval "ac_cv_lib_$ac_lib_var=yes"
12264 else
12265   echo "configure: failed program was:" >&5
12266   cat conftest.$ac_ext >&5
12267   rm -rf conftest*
12268   eval "ac_cv_lib_$ac_lib_var=no"
12269 fi
12270 rm -f conftest*
12271 LIBS="$ac_save_LIBS"
12272
12273 fi
12274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12275   echo "$ac_t""yes" 1>&6
12276   have_pth=yes
12277 else
12278   echo "$ac_t""no" 1>&6
12279 have_pth=no
12280 fi
12281
12282
12283                 if test $have_pth = yes ; then
12284                         cat >> confdefs.h <<\EOF
12285 #define HAVE_GNU_PTH 1
12286 EOF
12287
12288                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
12289                         ol_link_threads=pth
12290
12291                         if test $ol_with_yielding_select = auto ; then
12292                                 ol_with_yielding_select=yes
12293                         fi
12294                 fi
12295         fi
12296 fi
12297
12298 if test $ol_with_threads = auto -o $ol_with_threads = yes \
12299         -o $ol_with_threads = lwp ; then
12300
12301                 for ac_hdr in thread.h synch.h
12302 do
12303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12305 echo "configure:12306: checking for $ac_hdr" >&5
12306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12307   echo $ac_n "(cached) $ac_c" 1>&6
12308 else
12309   cat > conftest.$ac_ext <<EOF
12310 #line 12311 "configure"
12311 #include "confdefs.h"
12312 #include <$ac_hdr>
12313 EOF
12314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12315 { (eval echo configure:12316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12317 if test -z "$ac_err"; then
12318   rm -rf conftest*
12319   eval "ac_cv_header_$ac_safe=yes"
12320 else
12321   echo "$ac_err" >&5
12322   echo "configure: failed program was:" >&5
12323   cat conftest.$ac_ext >&5
12324   rm -rf conftest*
12325   eval "ac_cv_header_$ac_safe=no"
12326 fi
12327 rm -f conftest*
12328 fi
12329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12330   echo "$ac_t""yes" 1>&6
12331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12332   cat >> confdefs.h <<EOF
12333 #define $ac_tr_hdr 1
12334 EOF
12335  
12336 else
12337   echo "$ac_t""no" 1>&6
12338 fi
12339 done
12340
12341         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
12342                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
12343 echo "configure:12344: checking for thr_create in -lthread" >&5
12344 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
12345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12346   echo $ac_n "(cached) $ac_c" 1>&6
12347 else
12348   ac_save_LIBS="$LIBS"
12349 LIBS="-lthread  $LIBS"
12350 cat > conftest.$ac_ext <<EOF
12351 #line 12352 "configure"
12352 #include "confdefs.h"
12353 /* Override any gcc2 internal prototype to avoid an error.  */
12354 /* We use char because int might match the return type of a gcc2
12355     builtin and then its argument prototype would still apply.  */
12356 char thr_create();
12357
12358 int main() {
12359 thr_create()
12360 ; return 0; }
12361 EOF
12362 if { (eval echo configure:12363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12363   rm -rf conftest*
12364   eval "ac_cv_lib_$ac_lib_var=yes"
12365 else
12366   echo "configure: failed program was:" >&5
12367   cat conftest.$ac_ext >&5
12368   rm -rf conftest*
12369   eval "ac_cv_lib_$ac_lib_var=no"
12370 fi
12371 rm -f conftest*
12372 LIBS="$ac_save_LIBS"
12373
12374 fi
12375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12376   echo "$ac_t""yes" 1>&6
12377   have_thr=yes
12378 else
12379   echo "$ac_t""no" 1>&6
12380 have_thr=no
12381 fi
12382
12383
12384                 if test $have_thr = yes ; then
12385                         cat >> confdefs.h <<\EOF
12386 #define HAVE_THR 1
12387 EOF
12388
12389                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
12390                         ol_link_threads=thr
12391
12392                         if test $ol_with_yielding_select = auto ; then
12393                                 ol_with_yielding_select=yes
12394                         fi
12395
12396                                                 for ac_func in \
12397                                 thr_setconcurrency \
12398                                 thr_getconcurrency \
12399                         
12400 do
12401 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12402 echo "configure:12403: checking for $ac_func" >&5
12403 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12404   echo $ac_n "(cached) $ac_c" 1>&6
12405 else
12406   cat > conftest.$ac_ext <<EOF
12407 #line 12408 "configure"
12408 #include "confdefs.h"
12409 /* System header to define __stub macros and hopefully few prototypes,
12410     which can conflict with char $ac_func(); below.  */
12411 #include <assert.h>
12412 /* Override any gcc2 internal prototype to avoid an error.  */
12413 /* We use char because int might match the return type of a gcc2
12414     builtin and then its argument prototype would still apply.  */
12415 char $ac_func();
12416 char (*f)();
12417
12418 int main() {
12419
12420 /* The GNU C library defines this for functions which it implements
12421     to always fail with ENOSYS.  Some functions are actually named
12422     something starting with __ and the normal name is an alias.  */
12423 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12424 choke me
12425 #else
12426 f = $ac_func;
12427 #endif
12428
12429 ; return 0; }
12430 EOF
12431 if { (eval echo configure:12432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12432   rm -rf conftest*
12433   eval "ac_cv_func_$ac_func=yes"
12434 else
12435   echo "configure: failed program was:" >&5
12436   cat conftest.$ac_ext >&5
12437   rm -rf conftest*
12438   eval "ac_cv_func_$ac_func=no"
12439 fi
12440 rm -f conftest*
12441 fi
12442
12443 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12444   echo "$ac_t""yes" 1>&6
12445     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12446   cat >> confdefs.h <<EOF
12447 #define $ac_tr_func 1
12448 EOF
12449  
12450 else
12451   echo "$ac_t""no" 1>&6
12452 fi
12453 done
12454
12455                 fi
12456         fi
12457
12458                 for ac_hdr in lwp/lwp.h
12459 do
12460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12462 echo "configure:12463: checking for $ac_hdr" >&5
12463 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12464   echo $ac_n "(cached) $ac_c" 1>&6
12465 else
12466   cat > conftest.$ac_ext <<EOF
12467 #line 12468 "configure"
12468 #include "confdefs.h"
12469 #include <$ac_hdr>
12470 EOF
12471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12472 { (eval echo configure:12473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12474 if test -z "$ac_err"; then
12475   rm -rf conftest*
12476   eval "ac_cv_header_$ac_safe=yes"
12477 else
12478   echo "$ac_err" >&5
12479   echo "configure: failed program was:" >&5
12480   cat conftest.$ac_ext >&5
12481   rm -rf conftest*
12482   eval "ac_cv_header_$ac_safe=no"
12483 fi
12484 rm -f conftest*
12485 fi
12486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12487   echo "$ac_t""yes" 1>&6
12488     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12489   cat >> confdefs.h <<EOF
12490 #define $ac_tr_hdr 1
12491 EOF
12492  
12493 else
12494   echo "$ac_t""no" 1>&6
12495 fi
12496 done
12497
12498         if test $ac_cv_header_lwp_lwp_h = yes ; then
12499                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
12500 echo "configure:12501: checking for lwp_create in -llwp" >&5
12501 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
12502 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12503   echo $ac_n "(cached) $ac_c" 1>&6
12504 else
12505   ac_save_LIBS="$LIBS"
12506 LIBS="-llwp  $LIBS"
12507 cat > conftest.$ac_ext <<EOF
12508 #line 12509 "configure"
12509 #include "confdefs.h"
12510 /* Override any gcc2 internal prototype to avoid an error.  */
12511 /* We use char because int might match the return type of a gcc2
12512     builtin and then its argument prototype would still apply.  */
12513 char lwp_create();
12514
12515 int main() {
12516 lwp_create()
12517 ; return 0; }
12518 EOF
12519 if { (eval echo configure:12520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12520   rm -rf conftest*
12521   eval "ac_cv_lib_$ac_lib_var=yes"
12522 else
12523   echo "configure: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   rm -rf conftest*
12526   eval "ac_cv_lib_$ac_lib_var=no"
12527 fi
12528 rm -f conftest*
12529 LIBS="$ac_save_LIBS"
12530
12531 fi
12532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12533   echo "$ac_t""yes" 1>&6
12534   have_lwp=yes
12535 else
12536   echo "$ac_t""no" 1>&6
12537 have_lwp=no
12538 fi
12539
12540
12541                 if test $have_lwp = yes ; then
12542                         cat >> confdefs.h <<\EOF
12543 #define HAVE_LWP 1
12544 EOF
12545
12546                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
12547                         ol_link_threads=lwp
12548
12549                         if test $ol_with_yielding_select = auto ; then
12550                                 ol_with_yielding_select=no
12551                         fi
12552                 fi
12553         fi
12554 fi
12555
12556 if test $ol_with_yielding_select = yes ; then
12557         cat >> confdefs.h <<\EOF
12558 #define HAVE_YIELDING_SELECT 1
12559 EOF
12560
12561 fi
12562
12563 if test $ol_with_threads = manual ; then
12564                 ol_link_threads=yes
12565
12566         echo "configure: warning: thread defines and link options must be set manually" 1>&2
12567
12568         for ac_hdr in pthread.h sched.h
12569 do
12570 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12571 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12572 echo "configure:12573: checking for $ac_hdr" >&5
12573 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12574   echo $ac_n "(cached) $ac_c" 1>&6
12575 else
12576   cat > conftest.$ac_ext <<EOF
12577 #line 12578 "configure"
12578 #include "confdefs.h"
12579 #include <$ac_hdr>
12580 EOF
12581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12582 { (eval echo configure:12583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12584 if test -z "$ac_err"; then
12585   rm -rf conftest*
12586   eval "ac_cv_header_$ac_safe=yes"
12587 else
12588   echo "$ac_err" >&5
12589   echo "configure: failed program was:" >&5
12590   cat conftest.$ac_ext >&5
12591   rm -rf conftest*
12592   eval "ac_cv_header_$ac_safe=no"
12593 fi
12594 rm -f conftest*
12595 fi
12596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12597   echo "$ac_t""yes" 1>&6
12598     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12599   cat >> confdefs.h <<EOF
12600 #define $ac_tr_hdr 1
12601 EOF
12602  
12603 else
12604   echo "$ac_t""no" 1>&6
12605 fi
12606 done
12607
12608         for ac_func in sched_yield pthread_yield
12609 do
12610 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12611 echo "configure:12612: checking for $ac_func" >&5
12612 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
12613   echo $ac_n "(cached) $ac_c" 1>&6
12614 else
12615   cat > conftest.$ac_ext <<EOF
12616 #line 12617 "configure"
12617 #include "confdefs.h"
12618 /* System header to define __stub macros and hopefully few prototypes,
12619     which can conflict with char $ac_func(); below.  */
12620 #include <assert.h>
12621 /* Override any gcc2 internal prototype to avoid an error.  */
12622 /* We use char because int might match the return type of a gcc2
12623     builtin and then its argument prototype would still apply.  */
12624 char $ac_func();
12625 char (*f)();
12626
12627 int main() {
12628
12629 /* The GNU C library defines this for functions which it implements
12630     to always fail with ENOSYS.  Some functions are actually named
12631     something starting with __ and the normal name is an alias.  */
12632 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12633 choke me
12634 #else
12635 f = $ac_func;
12636 #endif
12637
12638 ; return 0; }
12639 EOF
12640 if { (eval echo configure:12641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12641   rm -rf conftest*
12642   eval "ac_cv_func_$ac_func=yes"
12643 else
12644   echo "configure: failed program was:" >&5
12645   cat conftest.$ac_ext >&5
12646   rm -rf conftest*
12647   eval "ac_cv_func_$ac_func=no"
12648 fi
12649 rm -f conftest*
12650 fi
12651
12652 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12653   echo "$ac_t""yes" 1>&6
12654     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12655   cat >> confdefs.h <<EOF
12656 #define $ac_tr_func 1
12657 EOF
12658  
12659 else
12660   echo "$ac_t""no" 1>&6
12661 fi
12662 done
12663
12664         
12665         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
12666 echo "configure:12667: checking for LinuxThreads pthread.h" >&5
12667 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
12668   echo $ac_n "(cached) $ac_c" 1>&6
12669 else
12670   cat > conftest.$ac_ext <<EOF
12671 #line 12672 "configure"
12672 #include "confdefs.h"
12673 #include <pthread.h>
12674 EOF
12675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12676   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
12677   rm -rf conftest*
12678   ol_cv_header_linux_threads=yes
12679 else
12680   rm -rf conftest*
12681   ol_cv_header_linux_threads=no
12682 fi
12683 rm -f conftest*
12684
12685                 
12686 fi
12687
12688 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12689         if test $ol_cv_header_linux_threads = yes; then
12690                 cat >> confdefs.h <<\EOF
12691 #define HAVE_LINUX_THREADS 1
12692 EOF
12693
12694         fi
12695
12696
12697         for ac_hdr in mach/cthreads.h
12698 do
12699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12701 echo "configure:12702: checking for $ac_hdr" >&5
12702 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12703   echo $ac_n "(cached) $ac_c" 1>&6
12704 else
12705   cat > conftest.$ac_ext <<EOF
12706 #line 12707 "configure"
12707 #include "confdefs.h"
12708 #include <$ac_hdr>
12709 EOF
12710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12711 { (eval echo configure:12712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12713 if test -z "$ac_err"; then
12714   rm -rf conftest*
12715   eval "ac_cv_header_$ac_safe=yes"
12716 else
12717   echo "$ac_err" >&5
12718   echo "configure: failed program was:" >&5
12719   cat conftest.$ac_ext >&5
12720   rm -rf conftest*
12721   eval "ac_cv_header_$ac_safe=no"
12722 fi
12723 rm -f conftest*
12724 fi
12725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12726   echo "$ac_t""yes" 1>&6
12727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12728   cat >> confdefs.h <<EOF
12729 #define $ac_tr_hdr 1
12730 EOF
12731  
12732 else
12733   echo "$ac_t""no" 1>&6
12734 fi
12735 done
12736
12737         for ac_hdr in lwp/lwp.h
12738 do
12739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12741 echo "configure:12742: checking for $ac_hdr" >&5
12742 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12743   echo $ac_n "(cached) $ac_c" 1>&6
12744 else
12745   cat > conftest.$ac_ext <<EOF
12746 #line 12747 "configure"
12747 #include "confdefs.h"
12748 #include <$ac_hdr>
12749 EOF
12750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12751 { (eval echo configure:12752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12753 if test -z "$ac_err"; then
12754   rm -rf conftest*
12755   eval "ac_cv_header_$ac_safe=yes"
12756 else
12757   echo "$ac_err" >&5
12758   echo "configure: failed program was:" >&5
12759   cat conftest.$ac_ext >&5
12760   rm -rf conftest*
12761   eval "ac_cv_header_$ac_safe=no"
12762 fi
12763 rm -f conftest*
12764 fi
12765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12766   echo "$ac_t""yes" 1>&6
12767     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12768   cat >> confdefs.h <<EOF
12769 #define $ac_tr_hdr 1
12770 EOF
12771  
12772 else
12773   echo "$ac_t""no" 1>&6
12774 fi
12775 done
12776
12777         for ac_hdr in thread.h synch.h
12778 do
12779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12781 echo "configure:12782: checking for $ac_hdr" >&5
12782 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12783   echo $ac_n "(cached) $ac_c" 1>&6
12784 else
12785   cat > conftest.$ac_ext <<EOF
12786 #line 12787 "configure"
12787 #include "confdefs.h"
12788 #include <$ac_hdr>
12789 EOF
12790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12791 { (eval echo configure:12792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12793 if test -z "$ac_err"; then
12794   rm -rf conftest*
12795   eval "ac_cv_header_$ac_safe=yes"
12796 else
12797   echo "$ac_err" >&5
12798   echo "configure: failed program was:" >&5
12799   cat conftest.$ac_ext >&5
12800   rm -rf conftest*
12801   eval "ac_cv_header_$ac_safe=no"
12802 fi
12803 rm -f conftest*
12804 fi
12805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12806   echo "$ac_t""yes" 1>&6
12807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12808   cat >> confdefs.h <<EOF
12809 #define $ac_tr_hdr 1
12810 EOF
12811  
12812 else
12813   echo "$ac_t""no" 1>&6
12814 fi
12815 done
12816
12817 fi
12818
12819 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
12820                         cat >> confdefs.h <<\EOF
12821 #define REENTRANT 1
12822 EOF
12823
12824         cat >> confdefs.h <<\EOF
12825 #define _REENTRANT 1
12826 EOF
12827
12828         cat >> confdefs.h <<\EOF
12829 #define THREAD_SAFE 1
12830 EOF
12831
12832         cat >> confdefs.h <<\EOF
12833 #define _THREAD_SAFE 1
12834 EOF
12835
12836         cat >> confdefs.h <<\EOF
12837 #define THREADSAFE 1
12838 EOF
12839
12840         cat >> confdefs.h <<\EOF
12841 #define _THREADSAFE 1
12842 EOF
12843
12844         cat >> confdefs.h <<\EOF
12845 #define _SGI_MP_SOURCE 1
12846 EOF
12847
12848
12849                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
12850 echo "configure:12851: checking for thread specific errno" >&5
12851 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
12852   echo $ac_n "(cached) $ac_c" 1>&6
12853 else
12854   
12855                 cat > conftest.$ac_ext <<EOF
12856 #line 12857 "configure"
12857 #include "confdefs.h"
12858 #include <errno.h>
12859 int main() {
12860 errno = 0;
12861 ; return 0; }
12862 EOF
12863 if { (eval echo configure:12864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12864   rm -rf conftest*
12865   ol_cv_errno_thread_specific=yes
12866 else
12867   echo "configure: failed program was:" >&5
12868   cat conftest.$ac_ext >&5
12869   rm -rf conftest*
12870   ol_cv_errno_thread_specific=no
12871 fi
12872 rm -f conftest*
12873         
12874 fi
12875
12876 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
12877
12878                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
12879 echo "configure:12880: checking for thread specific h_errno" >&5
12880 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
12881   echo $ac_n "(cached) $ac_c" 1>&6
12882 else
12883   
12884                 cat > conftest.$ac_ext <<EOF
12885 #line 12886 "configure"
12886 #include "confdefs.h"
12887 #include <netdb.h>
12888 int main() {
12889 h_errno = 0;
12890 ; return 0; }
12891 EOF
12892 if { (eval echo configure:12893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12893   rm -rf conftest*
12894   ol_cv_h_errno_thread_specific=yes
12895 else
12896   echo "configure: failed program was:" >&5
12897   cat conftest.$ac_ext >&5
12898   rm -rf conftest*
12899   ol_cv_h_errno_thread_specific=no
12900 fi
12901 rm -f conftest*
12902         
12903 fi
12904
12905 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
12906
12907         if test $ol_cv_errno_thread_specific != yes \
12908                 -o $ol_cv_h_errno_thread_specific != yes ; then
12909                 LIBS="$LTHREAD_LIBS $LIBS"
12910                 LTHREAD_LIBS=""
12911         fi
12912
12913 fi  
12914
12915 if test $ol_link_threads = no ; then
12916         if test $ol_with_threads = yes ; then
12917                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
12918         fi
12919
12920         if test $ol_with_threads = auto ; then
12921                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
12922                 ol_with_threads=no
12923         fi
12924
12925         cat >> confdefs.h <<\EOF
12926 #define NO_THREADS 1
12927 EOF
12928
12929         LTHREAD_LIBS=""
12930 fi
12931
12932 if test $ol_link_threads != no ; then
12933         cat >> confdefs.h <<\EOF
12934 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
12935 EOF
12936
12937 fi
12938
12939 ol_link_ldbm=no 
12940
12941 if test $ol_with_ldbm_api = auto \
12942         -o $ol_with_ldbm_api = berkeley \
12943         -o $ol_with_ldbm_api = bcompat ; then
12944
12945         if test $ol_with_ldbm_api = bcompat; then \
12946                 ol_cv_berkeley_db=no
12947 for ac_hdr in db_185.h db.h
12948 do
12949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12951 echo "configure:12952: checking for $ac_hdr" >&5
12952 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12953   echo $ac_n "(cached) $ac_c" 1>&6
12954 else
12955   cat > conftest.$ac_ext <<EOF
12956 #line 12957 "configure"
12957 #include "confdefs.h"
12958 #include <$ac_hdr>
12959 EOF
12960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12961 { (eval echo configure:12962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12963 if test -z "$ac_err"; then
12964   rm -rf conftest*
12965   eval "ac_cv_header_$ac_safe=yes"
12966 else
12967   echo "$ac_err" >&5
12968   echo "configure: failed program was:" >&5
12969   cat conftest.$ac_ext >&5
12970   rm -rf conftest*
12971   eval "ac_cv_header_$ac_safe=no"
12972 fi
12973 rm -f conftest*
12974 fi
12975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12976   echo "$ac_t""yes" 1>&6
12977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12978   cat >> confdefs.h <<EOF
12979 #define $ac_tr_hdr 1
12980 EOF
12981  
12982 else
12983   echo "$ac_t""no" 1>&6
12984 fi
12985 done
12986
12987 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
12988         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
12989 echo "configure:12990: checking if Berkeley DB header compatibility" >&5
12990 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
12991   echo $ac_n "(cached) $ac_c" 1>&6
12992 else
12993   
12994                 cat > conftest.$ac_ext <<EOF
12995 #line 12996 "configure"
12996 #include "confdefs.h"
12997
12998 #if HAVE_DB_185_H
12999 #       include <db_185.h>
13000 #else
13001 #       include <db.h>
13002 #endif
13003
13004  /* this check could be improved */
13005 #ifndef DB_VERSION_MAJOR
13006 #       define DB_VERSION_MAJOR 1
13007 #endif
13008
13009 #if DB_VERSION_MAJOR == 1 
13010         __db_version_1
13011 #endif
13012
13013 EOF
13014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13015   egrep "__db_version_1" >/dev/null 2>&1; then
13016   rm -rf conftest*
13017   ol_cv_header_db1=yes
13018 else
13019   rm -rf conftest*
13020   ol_cv_header_db1=no
13021 fi
13022 rm -f conftest*
13023
13024 fi
13025
13026 echo "$ac_t""$ol_cv_header_db1" 1>&6
13027
13028         if test $ol_cv_header_db1 = yes ; then
13029                 ol_cv_lib_db=no
13030 if test $ol_cv_lib_db = no ; then
13031         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
13032 echo "configure:13033: checking for Berkeley DB link (default)" >&5
13033 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
13034   echo $ac_n "(cached) $ac_c" 1>&6
13035 else
13036   
13037         ol_DB_LIB=
13038         ol_LIBS=$LIBS
13039         LIBS="$ol_DB_LIB $LIBS"
13040
13041         cat > conftest.$ac_ext <<EOF
13042 #line 13043 "configure"
13043 #include "confdefs.h"
13044
13045 #ifdef HAVE_DB_185_H
13046 # include <db_185.h>
13047 #else
13048 # include <db.h>
13049 #endif
13050
13051 #ifndef DB_VERSION_MAJOR
13052 # define DB_VERSION_MAJOR 1
13053 #endif
13054
13055 #ifndef NULL
13056 #define NULL ((void*)0)
13057 #endif
13058
13059 int main() {
13060
13061 #if DB_VERSION_MAJOR > 1
13062         {
13063                 char *version;
13064                 int major, minor, patch;
13065
13066                 version = db_version( &major, &minor, &patch );
13067
13068                 if( major != DB_VERSION_MAJOR ||
13069                         minor < DB_VERSION_MINOR )
13070                 {
13071                         printf("Berkeley DB version mismatch\n"
13072                                 "\texpected: %s\n\tgot: %s\n",
13073                                 DB_VERSION_STRING, version);
13074                         return 1;
13075                 }
13076         }
13077 #endif
13078
13079 #if DB_VERSION_MAJOR > 2
13080         db_env_create( NULL, 0 );
13081 #elif DB_VERSION_MAJOR > 1
13082         db_appexit( NULL );
13083 #else
13084         (void) dbopen( NULL, 0, 0, 0, NULL);
13085 #endif
13086
13087 ; return 0; }
13088 EOF
13089 if { (eval echo configure:13090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13090   rm -rf conftest*
13091   ol_cv_db_none=yes
13092 else
13093   echo "configure: failed program was:" >&5
13094   cat conftest.$ac_ext >&5
13095   rm -rf conftest*
13096   ol_cv_db_none=no
13097 fi
13098 rm -f conftest*
13099
13100         LIBS="$ol_LIBS"
13101
13102 fi
13103
13104 echo "$ac_t""$ol_cv_db_none" 1>&6
13105
13106         if test $ol_cv_db_none = yes ; then
13107                 ol_cv_lib_db=yes
13108         fi
13109 fi
13110
13111 if test $ol_cv_lib_db = no ; then
13112         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13113 echo "configure:13114: checking for Berkeley DB link (-ldb)" >&5
13114 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13115   echo $ac_n "(cached) $ac_c" 1>&6
13116 else
13117   
13118         ol_DB_LIB=-ldb
13119         ol_LIBS=$LIBS
13120         LIBS="$ol_DB_LIB $LIBS"
13121
13122         cat > conftest.$ac_ext <<EOF
13123 #line 13124 "configure"
13124 #include "confdefs.h"
13125
13126 #ifdef HAVE_DB_185_H
13127 # include <db_185.h>
13128 #else
13129 # include <db.h>
13130 #endif
13131
13132 #ifndef DB_VERSION_MAJOR
13133 # define DB_VERSION_MAJOR 1
13134 #endif
13135
13136 #ifndef NULL
13137 #define NULL ((void*)0)
13138 #endif
13139
13140 int main() {
13141
13142 #if DB_VERSION_MAJOR > 1
13143         {
13144                 char *version;
13145                 int major, minor, patch;
13146
13147                 version = db_version( &major, &minor, &patch );
13148
13149                 if( major != DB_VERSION_MAJOR ||
13150                         minor < DB_VERSION_MINOR )
13151                 {
13152                         printf("Berkeley DB version mismatch\n"
13153                                 "\texpected: %s\n\tgot: %s\n",
13154                                 DB_VERSION_STRING, version);
13155                         return 1;
13156                 }
13157         }
13158 #endif
13159
13160 #if DB_VERSION_MAJOR > 2
13161         db_env_create( NULL, 0 );
13162 #elif DB_VERSION_MAJOR > 1
13163         db_appexit( NULL );
13164 #else
13165         (void) dbopen( NULL, 0, 0, 0, NULL);
13166 #endif
13167
13168 ; return 0; }
13169 EOF
13170 if { (eval echo configure:13171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13171   rm -rf conftest*
13172   ol_cv_db_db=yes
13173 else
13174   echo "configure: failed program was:" >&5
13175   cat conftest.$ac_ext >&5
13176   rm -rf conftest*
13177   ol_cv_db_db=no
13178 fi
13179 rm -f conftest*
13180
13181         LIBS="$ol_LIBS"
13182
13183 fi
13184
13185 echo "$ac_t""$ol_cv_db_db" 1>&6
13186
13187         if test $ol_cv_db_db = yes ; then
13188                 ol_cv_lib_db=-ldb
13189         fi
13190 fi
13191
13192 if test $ol_cv_lib_db = no ; then
13193         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13194 echo "configure:13195: checking for Berkeley DB link (-ldb3)" >&5
13195 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13196   echo $ac_n "(cached) $ac_c" 1>&6
13197 else
13198   
13199         ol_DB_LIB=-ldb3
13200         ol_LIBS=$LIBS
13201         LIBS="$ol_DB_LIB $LIBS"
13202
13203         cat > conftest.$ac_ext <<EOF
13204 #line 13205 "configure"
13205 #include "confdefs.h"
13206
13207 #ifdef HAVE_DB_185_H
13208 # include <db_185.h>
13209 #else
13210 # include <db.h>
13211 #endif
13212
13213 #ifndef DB_VERSION_MAJOR
13214 # define DB_VERSION_MAJOR 1
13215 #endif
13216
13217 #ifndef NULL
13218 #define NULL ((void*)0)
13219 #endif
13220
13221 int main() {
13222
13223 #if DB_VERSION_MAJOR > 1
13224         {
13225                 char *version;
13226                 int major, minor, patch;
13227
13228                 version = db_version( &major, &minor, &patch );
13229
13230                 if( major != DB_VERSION_MAJOR ||
13231                         minor < DB_VERSION_MINOR )
13232                 {
13233                         printf("Berkeley DB version mismatch\n"
13234                                 "\texpected: %s\n\tgot: %s\n",
13235                                 DB_VERSION_STRING, version);
13236                         return 1;
13237                 }
13238         }
13239 #endif
13240
13241 #if DB_VERSION_MAJOR > 2
13242         db_env_create( NULL, 0 );
13243 #elif DB_VERSION_MAJOR > 1
13244         db_appexit( NULL );
13245 #else
13246         (void) dbopen( NULL, 0, 0, 0, NULL);
13247 #endif
13248
13249 ; return 0; }
13250 EOF
13251 if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13252   rm -rf conftest*
13253   ol_cv_db_db3=yes
13254 else
13255   echo "configure: failed program was:" >&5
13256   cat conftest.$ac_ext >&5
13257   rm -rf conftest*
13258   ol_cv_db_db3=no
13259 fi
13260 rm -f conftest*
13261
13262         LIBS="$ol_LIBS"
13263
13264 fi
13265
13266 echo "$ac_t""$ol_cv_db_db3" 1>&6
13267
13268         if test $ol_cv_db_db3 = yes ; then
13269                 ol_cv_lib_db=-ldb3
13270         fi
13271 fi
13272
13273 if test $ol_cv_lib_db = no ; then
13274         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13275 echo "configure:13276: checking for Berkeley DB link (-ldb2)" >&5
13276 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13277   echo $ac_n "(cached) $ac_c" 1>&6
13278 else
13279   
13280         ol_DB_LIB=-ldb2
13281         ol_LIBS=$LIBS
13282         LIBS="$ol_DB_LIB $LIBS"
13283
13284         cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287
13288 #ifdef HAVE_DB_185_H
13289 # include <db_185.h>
13290 #else
13291 # include <db.h>
13292 #endif
13293
13294 #ifndef DB_VERSION_MAJOR
13295 # define DB_VERSION_MAJOR 1
13296 #endif
13297
13298 #ifndef NULL
13299 #define NULL ((void*)0)
13300 #endif
13301
13302 int main() {
13303
13304 #if DB_VERSION_MAJOR > 1
13305         {
13306                 char *version;
13307                 int major, minor, patch;
13308
13309                 version = db_version( &major, &minor, &patch );
13310
13311                 if( major != DB_VERSION_MAJOR ||
13312                         minor < DB_VERSION_MINOR )
13313                 {
13314                         printf("Berkeley DB version mismatch\n"
13315                                 "\texpected: %s\n\tgot: %s\n",
13316                                 DB_VERSION_STRING, version);
13317                         return 1;
13318                 }
13319         }
13320 #endif
13321
13322 #if DB_VERSION_MAJOR > 2
13323         db_env_create( NULL, 0 );
13324 #elif DB_VERSION_MAJOR > 1
13325         db_appexit( NULL );
13326 #else
13327         (void) dbopen( NULL, 0, 0, 0, NULL);
13328 #endif
13329
13330 ; return 0; }
13331 EOF
13332 if { (eval echo configure:13333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13333   rm -rf conftest*
13334   ol_cv_db_db2=yes
13335 else
13336   echo "configure: failed program was:" >&5
13337   cat conftest.$ac_ext >&5
13338   rm -rf conftest*
13339   ol_cv_db_db2=no
13340 fi
13341 rm -f conftest*
13342
13343         LIBS="$ol_LIBS"
13344
13345 fi
13346
13347 echo "$ac_t""$ol_cv_db_db2" 1>&6
13348
13349         if test $ol_cv_db_db2 = yes ; then
13350                 ol_cv_lib_db=-ldb2
13351         fi
13352 fi
13353
13354 if test $ol_cv_lib_db = no ; then
13355         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13356 echo "configure:13357: checking for Berkeley DB link (-ldb1)" >&5
13357 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13358   echo $ac_n "(cached) $ac_c" 1>&6
13359 else
13360   
13361         ol_DB_LIB=-ldb1
13362         ol_LIBS=$LIBS
13363         LIBS="$ol_DB_LIB $LIBS"
13364
13365         cat > conftest.$ac_ext <<EOF
13366 #line 13367 "configure"
13367 #include "confdefs.h"
13368
13369 #ifdef HAVE_DB_185_H
13370 # include <db_185.h>
13371 #else
13372 # include <db.h>
13373 #endif
13374
13375 #ifndef DB_VERSION_MAJOR
13376 # define DB_VERSION_MAJOR 1
13377 #endif
13378
13379 #ifndef NULL
13380 #define NULL ((void*)0)
13381 #endif
13382
13383 int main() {
13384
13385 #if DB_VERSION_MAJOR > 1
13386         {
13387                 char *version;
13388                 int major, minor, patch;
13389
13390                 version = db_version( &major, &minor, &patch );
13391
13392                 if( major != DB_VERSION_MAJOR ||
13393                         minor < DB_VERSION_MINOR )
13394                 {
13395                         printf("Berkeley DB version mismatch\n"
13396                                 "\texpected: %s\n\tgot: %s\n",
13397                                 DB_VERSION_STRING, version);
13398                         return 1;
13399                 }
13400         }
13401 #endif
13402
13403 #if DB_VERSION_MAJOR > 2
13404         db_env_create( NULL, 0 );
13405 #elif DB_VERSION_MAJOR > 1
13406         db_appexit( NULL );
13407 #else
13408         (void) dbopen( NULL, 0, 0, 0, NULL);
13409 #endif
13410
13411 ; return 0; }
13412 EOF
13413 if { (eval echo configure:13414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13414   rm -rf conftest*
13415   ol_cv_db_db1=yes
13416 else
13417   echo "configure: failed program was:" >&5
13418   cat conftest.$ac_ext >&5
13419   rm -rf conftest*
13420   ol_cv_db_db1=no
13421 fi
13422 rm -f conftest*
13423
13424         LIBS="$ol_LIBS"
13425
13426 fi
13427
13428 echo "$ac_t""$ol_cv_db_db1" 1>&6
13429
13430         if test $ol_cv_db_db1 = yes ; then
13431                 ol_cv_lib_db=-ldb1
13432         fi
13433 fi
13434
13435
13436                 if test "$ol_cv_lib_db" != no ; then
13437                         ol_cv_berkeley_db=yes
13438                 fi
13439         fi
13440 fi
13441
13442         else
13443                 ol_cv_berkeley_db=no
13444 for ac_hdr in db.h
13445 do
13446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13448 echo "configure:13449: checking for $ac_hdr" >&5
13449 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13450   echo $ac_n "(cached) $ac_c" 1>&6
13451 else
13452   cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455 #include <$ac_hdr>
13456 EOF
13457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13458 { (eval echo configure:13459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13460 if test -z "$ac_err"; then
13461   rm -rf conftest*
13462   eval "ac_cv_header_$ac_safe=yes"
13463 else
13464   echo "$ac_err" >&5
13465   echo "configure: failed program was:" >&5
13466   cat conftest.$ac_ext >&5
13467   rm -rf conftest*
13468   eval "ac_cv_header_$ac_safe=no"
13469 fi
13470 rm -f conftest*
13471 fi
13472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13473   echo "$ac_t""yes" 1>&6
13474     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13475   cat >> confdefs.h <<EOF
13476 #define $ac_tr_hdr 1
13477 EOF
13478  
13479 else
13480   echo "$ac_t""no" 1>&6
13481 fi
13482 done
13483
13484 if test $ac_cv_header_db_h = yes; then
13485         ol_cv_lib_db=no
13486 if test $ol_cv_lib_db = no ; then
13487         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
13488 echo "configure:13489: checking for Berkeley DB link (default)" >&5
13489 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
13490   echo $ac_n "(cached) $ac_c" 1>&6
13491 else
13492   
13493         ol_DB_LIB=
13494         ol_LIBS=$LIBS
13495         LIBS="$ol_DB_LIB $LIBS"
13496
13497         cat > conftest.$ac_ext <<EOF
13498 #line 13499 "configure"
13499 #include "confdefs.h"
13500
13501 #ifdef HAVE_DB_185_H
13502 # include <db_185.h>
13503 #else
13504 # include <db.h>
13505 #endif
13506
13507 #ifndef DB_VERSION_MAJOR
13508 # define DB_VERSION_MAJOR 1
13509 #endif
13510
13511 #ifndef NULL
13512 #define NULL ((void*)0)
13513 #endif
13514
13515 int main() {
13516
13517 #if DB_VERSION_MAJOR > 1
13518         {
13519                 char *version;
13520                 int major, minor, patch;
13521
13522                 version = db_version( &major, &minor, &patch );
13523
13524                 if( major != DB_VERSION_MAJOR ||
13525                         minor < DB_VERSION_MINOR )
13526                 {
13527                         printf("Berkeley DB version mismatch\n"
13528                                 "\texpected: %s\n\tgot: %s\n",
13529                                 DB_VERSION_STRING, version);
13530                         return 1;
13531                 }
13532         }
13533 #endif
13534
13535 #if DB_VERSION_MAJOR > 2
13536         db_env_create( NULL, 0 );
13537 #elif DB_VERSION_MAJOR > 1
13538         db_appexit( NULL );
13539 #else
13540         (void) dbopen( NULL, 0, 0, 0, NULL);
13541 #endif
13542
13543 ; return 0; }
13544 EOF
13545 if { (eval echo configure:13546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13546   rm -rf conftest*
13547   ol_cv_db_none=yes
13548 else
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -rf conftest*
13552   ol_cv_db_none=no
13553 fi
13554 rm -f conftest*
13555
13556         LIBS="$ol_LIBS"
13557
13558 fi
13559
13560 echo "$ac_t""$ol_cv_db_none" 1>&6
13561
13562         if test $ol_cv_db_none = yes ; then
13563                 ol_cv_lib_db=yes
13564         fi
13565 fi
13566
13567 if test $ol_cv_lib_db = no ; then
13568         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
13569 echo "configure:13570: checking for Berkeley DB link (-ldb)" >&5
13570 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
13571   echo $ac_n "(cached) $ac_c" 1>&6
13572 else
13573   
13574         ol_DB_LIB=-ldb
13575         ol_LIBS=$LIBS
13576         LIBS="$ol_DB_LIB $LIBS"
13577
13578         cat > conftest.$ac_ext <<EOF
13579 #line 13580 "configure"
13580 #include "confdefs.h"
13581
13582 #ifdef HAVE_DB_185_H
13583 # include <db_185.h>
13584 #else
13585 # include <db.h>
13586 #endif
13587
13588 #ifndef DB_VERSION_MAJOR
13589 # define DB_VERSION_MAJOR 1
13590 #endif
13591
13592 #ifndef NULL
13593 #define NULL ((void*)0)
13594 #endif
13595
13596 int main() {
13597
13598 #if DB_VERSION_MAJOR > 1
13599         {
13600                 char *version;
13601                 int major, minor, patch;
13602
13603                 version = db_version( &major, &minor, &patch );
13604
13605                 if( major != DB_VERSION_MAJOR ||
13606                         minor < DB_VERSION_MINOR )
13607                 {
13608                         printf("Berkeley DB version mismatch\n"
13609                                 "\texpected: %s\n\tgot: %s\n",
13610                                 DB_VERSION_STRING, version);
13611                         return 1;
13612                 }
13613         }
13614 #endif
13615
13616 #if DB_VERSION_MAJOR > 2
13617         db_env_create( NULL, 0 );
13618 #elif DB_VERSION_MAJOR > 1
13619         db_appexit( NULL );
13620 #else
13621         (void) dbopen( NULL, 0, 0, 0, NULL);
13622 #endif
13623
13624 ; return 0; }
13625 EOF
13626 if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13627   rm -rf conftest*
13628   ol_cv_db_db=yes
13629 else
13630   echo "configure: failed program was:" >&5
13631   cat conftest.$ac_ext >&5
13632   rm -rf conftest*
13633   ol_cv_db_db=no
13634 fi
13635 rm -f conftest*
13636
13637         LIBS="$ol_LIBS"
13638
13639 fi
13640
13641 echo "$ac_t""$ol_cv_db_db" 1>&6
13642
13643         if test $ol_cv_db_db = yes ; then
13644                 ol_cv_lib_db=-ldb
13645         fi
13646 fi
13647
13648 if test $ol_cv_lib_db = no ; then
13649         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
13650 echo "configure:13651: checking for Berkeley DB link (-ldb3)" >&5
13651 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
13652   echo $ac_n "(cached) $ac_c" 1>&6
13653 else
13654   
13655         ol_DB_LIB=-ldb3
13656         ol_LIBS=$LIBS
13657         LIBS="$ol_DB_LIB $LIBS"
13658
13659         cat > conftest.$ac_ext <<EOF
13660 #line 13661 "configure"
13661 #include "confdefs.h"
13662
13663 #ifdef HAVE_DB_185_H
13664 # include <db_185.h>
13665 #else
13666 # include <db.h>
13667 #endif
13668
13669 #ifndef DB_VERSION_MAJOR
13670 # define DB_VERSION_MAJOR 1
13671 #endif
13672
13673 #ifndef NULL
13674 #define NULL ((void*)0)
13675 #endif
13676
13677 int main() {
13678
13679 #if DB_VERSION_MAJOR > 1
13680         {
13681                 char *version;
13682                 int major, minor, patch;
13683
13684                 version = db_version( &major, &minor, &patch );
13685
13686                 if( major != DB_VERSION_MAJOR ||
13687                         minor < DB_VERSION_MINOR )
13688                 {
13689                         printf("Berkeley DB version mismatch\n"
13690                                 "\texpected: %s\n\tgot: %s\n",
13691                                 DB_VERSION_STRING, version);
13692                         return 1;
13693                 }
13694         }
13695 #endif
13696
13697 #if DB_VERSION_MAJOR > 2
13698         db_env_create( NULL, 0 );
13699 #elif DB_VERSION_MAJOR > 1
13700         db_appexit( NULL );
13701 #else
13702         (void) dbopen( NULL, 0, 0, 0, NULL);
13703 #endif
13704
13705 ; return 0; }
13706 EOF
13707 if { (eval echo configure:13708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13708   rm -rf conftest*
13709   ol_cv_db_db3=yes
13710 else
13711   echo "configure: failed program was:" >&5
13712   cat conftest.$ac_ext >&5
13713   rm -rf conftest*
13714   ol_cv_db_db3=no
13715 fi
13716 rm -f conftest*
13717
13718         LIBS="$ol_LIBS"
13719
13720 fi
13721
13722 echo "$ac_t""$ol_cv_db_db3" 1>&6
13723
13724         if test $ol_cv_db_db3 = yes ; then
13725                 ol_cv_lib_db=-ldb3
13726         fi
13727 fi
13728
13729 if test $ol_cv_lib_db = no ; then
13730         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
13731 echo "configure:13732: checking for Berkeley DB link (-ldb2)" >&5
13732 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
13733   echo $ac_n "(cached) $ac_c" 1>&6
13734 else
13735   
13736         ol_DB_LIB=-ldb2
13737         ol_LIBS=$LIBS
13738         LIBS="$ol_DB_LIB $LIBS"
13739
13740         cat > conftest.$ac_ext <<EOF
13741 #line 13742 "configure"
13742 #include "confdefs.h"
13743
13744 #ifdef HAVE_DB_185_H
13745 # include <db_185.h>
13746 #else
13747 # include <db.h>
13748 #endif
13749
13750 #ifndef DB_VERSION_MAJOR
13751 # define DB_VERSION_MAJOR 1
13752 #endif
13753
13754 #ifndef NULL
13755 #define NULL ((void*)0)
13756 #endif
13757
13758 int main() {
13759
13760 #if DB_VERSION_MAJOR > 1
13761         {
13762                 char *version;
13763                 int major, minor, patch;
13764
13765                 version = db_version( &major, &minor, &patch );
13766
13767                 if( major != DB_VERSION_MAJOR ||
13768                         minor < DB_VERSION_MINOR )
13769                 {
13770                         printf("Berkeley DB version mismatch\n"
13771                                 "\texpected: %s\n\tgot: %s\n",
13772                                 DB_VERSION_STRING, version);
13773                         return 1;
13774                 }
13775         }
13776 #endif
13777
13778 #if DB_VERSION_MAJOR > 2
13779         db_env_create( NULL, 0 );
13780 #elif DB_VERSION_MAJOR > 1
13781         db_appexit( NULL );
13782 #else
13783         (void) dbopen( NULL, 0, 0, 0, NULL);
13784 #endif
13785
13786 ; return 0; }
13787 EOF
13788 if { (eval echo configure:13789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13789   rm -rf conftest*
13790   ol_cv_db_db2=yes
13791 else
13792   echo "configure: failed program was:" >&5
13793   cat conftest.$ac_ext >&5
13794   rm -rf conftest*
13795   ol_cv_db_db2=no
13796 fi
13797 rm -f conftest*
13798
13799         LIBS="$ol_LIBS"
13800
13801 fi
13802
13803 echo "$ac_t""$ol_cv_db_db2" 1>&6
13804
13805         if test $ol_cv_db_db2 = yes ; then
13806                 ol_cv_lib_db=-ldb2
13807         fi
13808 fi
13809
13810 if test $ol_cv_lib_db = no ; then
13811         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
13812 echo "configure:13813: checking for Berkeley DB link (-ldb1)" >&5
13813 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
13814   echo $ac_n "(cached) $ac_c" 1>&6
13815 else
13816   
13817         ol_DB_LIB=-ldb1
13818         ol_LIBS=$LIBS
13819         LIBS="$ol_DB_LIB $LIBS"
13820
13821         cat > conftest.$ac_ext <<EOF
13822 #line 13823 "configure"
13823 #include "confdefs.h"
13824
13825 #ifdef HAVE_DB_185_H
13826 # include <db_185.h>
13827 #else
13828 # include <db.h>
13829 #endif
13830
13831 #ifndef DB_VERSION_MAJOR
13832 # define DB_VERSION_MAJOR 1
13833 #endif
13834
13835 #ifndef NULL
13836 #define NULL ((void*)0)
13837 #endif
13838
13839 int main() {
13840
13841 #if DB_VERSION_MAJOR > 1
13842         {
13843                 char *version;
13844                 int major, minor, patch;
13845
13846                 version = db_version( &major, &minor, &patch );
13847
13848                 if( major != DB_VERSION_MAJOR ||
13849                         minor < DB_VERSION_MINOR )
13850                 {
13851                         printf("Berkeley DB version mismatch\n"
13852                                 "\texpected: %s\n\tgot: %s\n",
13853                                 DB_VERSION_STRING, version);
13854                         return 1;
13855                 }
13856         }
13857 #endif
13858
13859 #if DB_VERSION_MAJOR > 2
13860         db_env_create( NULL, 0 );
13861 #elif DB_VERSION_MAJOR > 1
13862         db_appexit( NULL );
13863 #else
13864         (void) dbopen( NULL, 0, 0, 0, NULL);
13865 #endif
13866
13867 ; return 0; }
13868 EOF
13869 if { (eval echo configure:13870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13870   rm -rf conftest*
13871   ol_cv_db_db1=yes
13872 else
13873   echo "configure: failed program was:" >&5
13874   cat conftest.$ac_ext >&5
13875   rm -rf conftest*
13876   ol_cv_db_db1=no
13877 fi
13878 rm -f conftest*
13879
13880         LIBS="$ol_LIBS"
13881
13882 fi
13883
13884 echo "$ac_t""$ol_cv_db_db1" 1>&6
13885
13886         if test $ol_cv_db_db1 = yes ; then
13887                 ol_cv_lib_db=-ldb1
13888         fi
13889 fi
13890
13891
13892         if test "$ol_cv_lib_db" != no ; then
13893                 ol_cv_berkeley_db=yes
13894                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
13895 echo "configure:13896: checking for Berkeley DB thread support" >&5
13896 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
13897   echo $ac_n "(cached) $ac_c" 1>&6
13898 else
13899   
13900         ol_LIBS="$LIBS"
13901         if test $ol_cv_lib_db != yes ; then
13902                 LIBS="$ol_cv_lib_db"
13903         fi
13904
13905         if test "$cross_compiling" = yes; then
13906   ol_cv_berkeley_db_thread=cross
13907 else
13908   cat > conftest.$ac_ext <<EOF
13909 #line 13910 "configure"
13910 #include "confdefs.h"
13911
13912 #ifdef HAVE_DB_185_H
13913         choke me;
13914 #else
13915 #include <db.h>
13916 #endif
13917 #ifndef NULL
13918 #define NULL ((void *)0)
13919 #endif
13920 main()
13921 {
13922         int rc;
13923         u_int32_t flags = DB_CREATE |
13924 #ifdef DB_PRIVATE
13925                 DB_PRIVATE |
13926 #endif
13927                 DB_THREAD;
13928
13929 #if DB_VERSION_MAJOR > 2
13930         DB_ENV *env = NULL;
13931
13932         rc = db_env_create( &env, 0 );
13933
13934         flags |= DB_INIT_MPOOL;
13935 #ifdef DB_MPOOL_PRIVATE
13936         flags |= DB_MPOOL_PRIVATE;
13937 #endif
13938
13939         if( rc ) {
13940                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13941                 return rc;
13942         }
13943
13944 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
13945         rc = env->open( env, NULL, flags, 0 );
13946 #else
13947         rc = env->open( env, NULL, NULL, flags, 0 );
13948 #endif
13949
13950         if ( rc == 0 ) {
13951                 rc = env->close( env, 0 );
13952         }
13953
13954         if( rc ) {
13955                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
13956                 return rc;
13957         }
13958
13959 #else
13960         DB_ENV env;
13961         memset( &env, '\0', sizeof(env) );
13962
13963         rc = db_appinit( NULL, NULL, &env, flags );
13964
13965         if( rc == 0 ) {
13966                 db_appexit( &env );
13967         }
13968
13969         unlink("__db_mpool.share");
13970         unlink("__db_lock.share");
13971 #endif
13972
13973         return rc;
13974 }
13975 EOF
13976 if { (eval echo configure:13977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13977 then
13978   ol_cv_berkeley_db_thread=yes
13979 else
13980   echo "configure: failed program was:" >&5
13981   cat conftest.$ac_ext >&5
13982   rm -fr conftest*
13983   ol_cv_berkeley_db_thread=no
13984 fi
13985 rm -fr conftest*
13986 fi
13987
13988
13989         LIBS="$ol_LIBS"
13990
13991         if test $ol_cv_berkeley_db_thread != no ; then
13992                 cat >> confdefs.h <<\EOF
13993 #define HAVE_BERKELEY_DB_THREAD 1
13994 EOF
13995
13996         fi
13997
13998 fi
13999
14000 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
14001         fi
14002 fi
14003
14004         fi
14005
14006         if test $ol_cv_berkeley_db != no ; then
14007                 cat >> confdefs.h <<\EOF
14008 #define HAVE_BERKELEY_DB 1
14009 EOF
14010
14011
14012                 ol_link_ldbm=berkeley
14013                 ol_with_ldbm_api=berkeley
14014
14015                 if test $ol_with_ldbm_type = hash ; then
14016                         cat >> confdefs.h <<\EOF
14017 #define LDBM_USE_DBHASH 1
14018 EOF
14019
14020                 else
14021                         cat >> confdefs.h <<\EOF
14022 #define LDBM_USE_DBBTREE 1
14023 EOF
14024
14025                 fi
14026
14027                                                 if test $ol_cv_lib_db != yes ; then
14028                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
14029                 fi
14030         fi
14031 fi
14032
14033 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
14034         { echo "configure: error: BerkeleyDB not availabl" 1>&2; exit 1; }
14035 elif test $ol_enable_bdb != no -a $ol_link_ldbm != no ; then
14036         ol_enable_bdb=yes
14037 fi
14038
14039 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
14040         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
14041         ol_with_ldbm_api=none
14042 fi
14043
14044 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
14045         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
14046 echo "configure:14047: checking for MDBM library" >&5
14047 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
14048   echo $ac_n "(cached) $ac_c" 1>&6
14049 else
14050         ol_LIBS="$LIBS"
14051         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
14052 echo "configure:14053: checking for mdbm_set_chain" >&5
14053 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
14054   echo $ac_n "(cached) $ac_c" 1>&6
14055 else
14056   cat > conftest.$ac_ext <<EOF
14057 #line 14058 "configure"
14058 #include "confdefs.h"
14059 /* System header to define __stub macros and hopefully few prototypes,
14060     which can conflict with char mdbm_set_chain(); below.  */
14061 #include <assert.h>
14062 /* Override any gcc2 internal prototype to avoid an error.  */
14063 /* We use char because int might match the return type of a gcc2
14064     builtin and then its argument prototype would still apply.  */
14065 char mdbm_set_chain();
14066 char (*f)();
14067
14068 int main() {
14069
14070 /* The GNU C library defines this for functions which it implements
14071     to always fail with ENOSYS.  Some functions are actually named
14072     something starting with __ and the normal name is an alias.  */
14073 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
14074 choke me
14075 #else
14076 f = mdbm_set_chain;
14077 #endif
14078
14079 ; return 0; }
14080 EOF
14081 if { (eval echo configure:14082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14082   rm -rf conftest*
14083   eval "ac_cv_func_mdbm_set_chain=yes"
14084 else
14085   echo "configure: failed program was:" >&5
14086   cat conftest.$ac_ext >&5
14087   rm -rf conftest*
14088   eval "ac_cv_func_mdbm_set_chain=no"
14089 fi
14090 rm -f conftest*
14091 fi
14092
14093 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
14094   echo "$ac_t""yes" 1>&6
14095   ol_cv_lib_mdbm=yes
14096 else
14097   echo "$ac_t""no" 1>&6
14098
14099                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
14100 echo "configure:14101: checking for mdbm_set_chain in -lmdbm" >&5
14101 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
14102 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14103   echo $ac_n "(cached) $ac_c" 1>&6
14104 else
14105   ac_save_LIBS="$LIBS"
14106 LIBS="-lmdbm  $LIBS"
14107 cat > conftest.$ac_ext <<EOF
14108 #line 14109 "configure"
14109 #include "confdefs.h"
14110 /* Override any gcc2 internal prototype to avoid an error.  */
14111 /* We use char because int might match the return type of a gcc2
14112     builtin and then its argument prototype would still apply.  */
14113 char mdbm_set_chain();
14114
14115 int main() {
14116 mdbm_set_chain()
14117 ; return 0; }
14118 EOF
14119 if { (eval echo configure:14120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14120   rm -rf conftest*
14121   eval "ac_cv_lib_$ac_lib_var=yes"
14122 else
14123   echo "configure: failed program was:" >&5
14124   cat conftest.$ac_ext >&5
14125   rm -rf conftest*
14126   eval "ac_cv_lib_$ac_lib_var=no"
14127 fi
14128 rm -f conftest*
14129 LIBS="$ac_save_LIBS"
14130
14131 fi
14132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14133   echo "$ac_t""yes" 1>&6
14134   ol_cv_lib_mdbm=-lmdbm
14135 else
14136   echo "$ac_t""no" 1>&6
14137 ol_cv_lib_mdbm=no
14138 fi
14139
14140         
14141 fi
14142
14143         LIBS="$ol_LIBS"
14144
14145 fi
14146
14147 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
14148
14149
14150  for ac_hdr in mdbm.h
14151 do
14152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14154 echo "configure:14155: checking for $ac_hdr" >&5
14155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14156   echo $ac_n "(cached) $ac_c" 1>&6
14157 else
14158   cat > conftest.$ac_ext <<EOF
14159 #line 14160 "configure"
14160 #include "confdefs.h"
14161 #include <$ac_hdr>
14162 EOF
14163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14164 { (eval echo configure:14165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14166 if test -z "$ac_err"; then
14167   rm -rf conftest*
14168   eval "ac_cv_header_$ac_safe=yes"
14169 else
14170   echo "$ac_err" >&5
14171   echo "configure: failed program was:" >&5
14172   cat conftest.$ac_ext >&5
14173   rm -rf conftest*
14174   eval "ac_cv_header_$ac_safe=no"
14175 fi
14176 rm -f conftest*
14177 fi
14178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14179   echo "$ac_t""yes" 1>&6
14180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14181   cat >> confdefs.h <<EOF
14182 #define $ac_tr_hdr 1
14183 EOF
14184  
14185 else
14186   echo "$ac_t""no" 1>&6
14187 fi
14188 done
14189
14190  echo $ac_n "checking for db""... $ac_c" 1>&6
14191 echo "configure:14192: checking for db" >&5
14192 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
14193   echo $ac_n "(cached) $ac_c" 1>&6
14194 else
14195   
14196         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
14197                 ol_cv_mdbm=no
14198         else
14199                 ol_cv_mdbm=yes
14200         fi
14201
14202 fi
14203
14204 echo "$ac_t""$ol_cv_mdbm" 1>&6
14205  if test $ol_cv_mdbm = yes ; then
14206         cat >> confdefs.h <<\EOF
14207 #define HAVE_MDBM 1
14208 EOF
14209
14210  fi
14211
14212
14213         if test $ol_cv_mdbm = yes ; then
14214                 ol_link_ldbm=mdbm
14215                 ol_with_ldbm_api=mdbm
14216                 if test $ol_cv_lib_mdbm != yes ; then
14217                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
14218                 fi
14219         fi
14220 fi
14221
14222 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
14223         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
14224 echo "configure:14225: checking for GDBM library" >&5
14225 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
14226   echo $ac_n "(cached) $ac_c" 1>&6
14227 else
14228         ol_LIBS="$LIBS"
14229         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
14230 echo "configure:14231: checking for gdbm_open" >&5
14231 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
14232   echo $ac_n "(cached) $ac_c" 1>&6
14233 else
14234   cat > conftest.$ac_ext <<EOF
14235 #line 14236 "configure"
14236 #include "confdefs.h"
14237 /* System header to define __stub macros and hopefully few prototypes,
14238     which can conflict with char gdbm_open(); below.  */
14239 #include <assert.h>
14240 /* Override any gcc2 internal prototype to avoid an error.  */
14241 /* We use char because int might match the return type of a gcc2
14242     builtin and then its argument prototype would still apply.  */
14243 char gdbm_open();
14244 char (*f)();
14245
14246 int main() {
14247
14248 /* The GNU C library defines this for functions which it implements
14249     to always fail with ENOSYS.  Some functions are actually named
14250     something starting with __ and the normal name is an alias.  */
14251 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
14252 choke me
14253 #else
14254 f = gdbm_open;
14255 #endif
14256
14257 ; return 0; }
14258 EOF
14259 if { (eval echo configure:14260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14260   rm -rf conftest*
14261   eval "ac_cv_func_gdbm_open=yes"
14262 else
14263   echo "configure: failed program was:" >&5
14264   cat conftest.$ac_ext >&5
14265   rm -rf conftest*
14266   eval "ac_cv_func_gdbm_open=no"
14267 fi
14268 rm -f conftest*
14269 fi
14270
14271 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
14272   echo "$ac_t""yes" 1>&6
14273   ol_cv_lib_gdbm=yes
14274 else
14275   echo "$ac_t""no" 1>&6
14276
14277                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
14278 echo "configure:14279: checking for gdbm_open in -lgdbm" >&5
14279 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
14280 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14281   echo $ac_n "(cached) $ac_c" 1>&6
14282 else
14283   ac_save_LIBS="$LIBS"
14284 LIBS="-lgdbm  $LIBS"
14285 cat > conftest.$ac_ext <<EOF
14286 #line 14287 "configure"
14287 #include "confdefs.h"
14288 /* Override any gcc2 internal prototype to avoid an error.  */
14289 /* We use char because int might match the return type of a gcc2
14290     builtin and then its argument prototype would still apply.  */
14291 char gdbm_open();
14292
14293 int main() {
14294 gdbm_open()
14295 ; return 0; }
14296 EOF
14297 if { (eval echo configure:14298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14298   rm -rf conftest*
14299   eval "ac_cv_lib_$ac_lib_var=yes"
14300 else
14301   echo "configure: failed program was:" >&5
14302   cat conftest.$ac_ext >&5
14303   rm -rf conftest*
14304   eval "ac_cv_lib_$ac_lib_var=no"
14305 fi
14306 rm -f conftest*
14307 LIBS="$ac_save_LIBS"
14308
14309 fi
14310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14311   echo "$ac_t""yes" 1>&6
14312   ol_cv_lib_gdbm=-lgdbm
14313 else
14314   echo "$ac_t""no" 1>&6
14315 ol_cv_lib_gdbm=no
14316 fi
14317
14318         
14319 fi
14320
14321         LIBS="$ol_LIBS"
14322
14323 fi
14324
14325 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
14326
14327
14328  for ac_hdr in gdbm.h
14329 do
14330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14332 echo "configure:14333: checking for $ac_hdr" >&5
14333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14334   echo $ac_n "(cached) $ac_c" 1>&6
14335 else
14336   cat > conftest.$ac_ext <<EOF
14337 #line 14338 "configure"
14338 #include "confdefs.h"
14339 #include <$ac_hdr>
14340 EOF
14341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14342 { (eval echo configure:14343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14344 if test -z "$ac_err"; then
14345   rm -rf conftest*
14346   eval "ac_cv_header_$ac_safe=yes"
14347 else
14348   echo "$ac_err" >&5
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -rf conftest*
14352   eval "ac_cv_header_$ac_safe=no"
14353 fi
14354 rm -f conftest*
14355 fi
14356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14357   echo "$ac_t""yes" 1>&6
14358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14359   cat >> confdefs.h <<EOF
14360 #define $ac_tr_hdr 1
14361 EOF
14362  
14363 else
14364   echo "$ac_t""no" 1>&6
14365 fi
14366 done
14367
14368  echo $ac_n "checking for db""... $ac_c" 1>&6
14369 echo "configure:14370: checking for db" >&5
14370 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
14371   echo $ac_n "(cached) $ac_c" 1>&6
14372 else
14373   
14374         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
14375                 ol_cv_gdbm=no
14376         else
14377                 ol_cv_gdbm=yes
14378         fi
14379
14380 fi
14381
14382 echo "$ac_t""$ol_cv_gdbm" 1>&6
14383  if test $ol_cv_gdbm = yes ; then
14384         cat >> confdefs.h <<\EOF
14385 #define HAVE_GDBM 1
14386 EOF
14387
14388  fi
14389
14390
14391         if test $ol_cv_gdbm = yes ; then
14392                 ol_link_ldbm=gdbm
14393                 ol_with_ldbm_api=gdbm
14394
14395                 if test $ol_cv_lib_gdbm != yes ; then
14396                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
14397                 fi
14398         fi
14399 fi
14400
14401 if test $ol_with_ldbm_api = ndbm ; then
14402         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
14403 echo "configure:14404: checking for NDBM library" >&5
14404 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
14405   echo $ac_n "(cached) $ac_c" 1>&6
14406 else
14407         ol_LIBS="$LIBS"
14408         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
14409 echo "configure:14410: checking for dbm_open" >&5
14410 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
14411   echo $ac_n "(cached) $ac_c" 1>&6
14412 else
14413   cat > conftest.$ac_ext <<EOF
14414 #line 14415 "configure"
14415 #include "confdefs.h"
14416 /* System header to define __stub macros and hopefully few prototypes,
14417     which can conflict with char dbm_open(); below.  */
14418 #include <assert.h>
14419 /* Override any gcc2 internal prototype to avoid an error.  */
14420 /* We use char because int might match the return type of a gcc2
14421     builtin and then its argument prototype would still apply.  */
14422 char dbm_open();
14423 char (*f)();
14424
14425 int main() {
14426
14427 /* The GNU C library defines this for functions which it implements
14428     to always fail with ENOSYS.  Some functions are actually named
14429     something starting with __ and the normal name is an alias.  */
14430 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
14431 choke me
14432 #else
14433 f = dbm_open;
14434 #endif
14435
14436 ; return 0; }
14437 EOF
14438 if { (eval echo configure:14439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14439   rm -rf conftest*
14440   eval "ac_cv_func_dbm_open=yes"
14441 else
14442   echo "configure: failed program was:" >&5
14443   cat conftest.$ac_ext >&5
14444   rm -rf conftest*
14445   eval "ac_cv_func_dbm_open=no"
14446 fi
14447 rm -f conftest*
14448 fi
14449
14450 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
14451   echo "$ac_t""yes" 1>&6
14452   ol_cv_lib_ndbm=yes
14453 else
14454   echo "$ac_t""no" 1>&6
14455
14456                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
14457 echo "configure:14458: checking for dbm_open in -lndbm" >&5
14458 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14459 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14460   echo $ac_n "(cached) $ac_c" 1>&6
14461 else
14462   ac_save_LIBS="$LIBS"
14463 LIBS="-lndbm  $LIBS"
14464 cat > conftest.$ac_ext <<EOF
14465 #line 14466 "configure"
14466 #include "confdefs.h"
14467 /* Override any gcc2 internal prototype to avoid an error.  */
14468 /* We use char because int might match the return type of a gcc2
14469     builtin and then its argument prototype would still apply.  */
14470 char dbm_open();
14471
14472 int main() {
14473 dbm_open()
14474 ; return 0; }
14475 EOF
14476 if { (eval echo configure:14477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14477   rm -rf conftest*
14478   eval "ac_cv_lib_$ac_lib_var=yes"
14479 else
14480   echo "configure: failed program was:" >&5
14481   cat conftest.$ac_ext >&5
14482   rm -rf conftest*
14483   eval "ac_cv_lib_$ac_lib_var=no"
14484 fi
14485 rm -f conftest*
14486 LIBS="$ac_save_LIBS"
14487
14488 fi
14489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14490   echo "$ac_t""yes" 1>&6
14491   ol_cv_lib_ndbm=-lndbm
14492 else
14493   echo "$ac_t""no" 1>&6
14494
14495                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
14496 echo "configure:14497: checking for dbm_open in -ldbm" >&5
14497 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
14498 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14499   echo $ac_n "(cached) $ac_c" 1>&6
14500 else
14501   ac_save_LIBS="$LIBS"
14502 LIBS="-ldbm  $LIBS"
14503 cat > conftest.$ac_ext <<EOF
14504 #line 14505 "configure"
14505 #include "confdefs.h"
14506 /* Override any gcc2 internal prototype to avoid an error.  */
14507 /* We use char because int might match the return type of a gcc2
14508     builtin and then its argument prototype would still apply.  */
14509 char dbm_open();
14510
14511 int main() {
14512 dbm_open()
14513 ; return 0; }
14514 EOF
14515 if { (eval echo configure:14516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14516   rm -rf conftest*
14517   eval "ac_cv_lib_$ac_lib_var=yes"
14518 else
14519   echo "configure: failed program was:" >&5
14520   cat conftest.$ac_ext >&5
14521   rm -rf conftest*
14522   eval "ac_cv_lib_$ac_lib_var=no"
14523 fi
14524 rm -f conftest*
14525 LIBS="$ac_save_LIBS"
14526
14527 fi
14528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14529   echo "$ac_t""yes" 1>&6
14530   ol_cv_lib_ndbm=-ldbm
14531 else
14532   echo "$ac_t""no" 1>&6
14533 ol_cv_lib_ndbm=no
14534 fi
14535                 
14536 fi
14537
14538         
14539 fi
14540
14541         LIBS="$ol_LIBS"
14542
14543 fi
14544
14545 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
14546
14547
14548  for ac_hdr in ndbm.h
14549 do
14550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14552 echo "configure:14553: checking for $ac_hdr" >&5
14553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14554   echo $ac_n "(cached) $ac_c" 1>&6
14555 else
14556   cat > conftest.$ac_ext <<EOF
14557 #line 14558 "configure"
14558 #include "confdefs.h"
14559 #include <$ac_hdr>
14560 EOF
14561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14562 { (eval echo configure:14563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14564 if test -z "$ac_err"; then
14565   rm -rf conftest*
14566   eval "ac_cv_header_$ac_safe=yes"
14567 else
14568   echo "$ac_err" >&5
14569   echo "configure: failed program was:" >&5
14570   cat conftest.$ac_ext >&5
14571   rm -rf conftest*
14572   eval "ac_cv_header_$ac_safe=no"
14573 fi
14574 rm -f conftest*
14575 fi
14576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14577   echo "$ac_t""yes" 1>&6
14578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14579   cat >> confdefs.h <<EOF
14580 #define $ac_tr_hdr 1
14581 EOF
14582  
14583 else
14584   echo "$ac_t""no" 1>&6
14585 fi
14586 done
14587
14588  echo $ac_n "checking for db""... $ac_c" 1>&6
14589 echo "configure:14590: checking for db" >&5
14590 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
14591   echo $ac_n "(cached) $ac_c" 1>&6
14592 else
14593   
14594         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
14595                 ol_cv_ndbm=no
14596         else
14597                 ol_cv_ndbm=yes
14598         fi
14599
14600 fi
14601
14602 echo "$ac_t""$ol_cv_ndbm" 1>&6
14603  if test $ol_cv_ndbm = yes ; then
14604         cat >> confdefs.h <<\EOF
14605 #define HAVE_NDBM 1
14606 EOF
14607
14608  fi
14609
14610
14611         if test $ol_cv_ndbm = yes ; then
14612                 ol_link_ldbm=ndbm
14613                 ol_with_ldbm_api=ndbm
14614
14615                 if test $ol_cv_lib_ndbm != yes ; then
14616                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
14617                 fi
14618         fi
14619 fi
14620
14621 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
14622         echo "configure: warning: could not find suitable LDBM backend" 1>&2
14623         if test $ol_enable_ldbm = yes ; then
14624                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
14625         fi
14626
14627         echo "configure: warning: disabling LDBM" 1>&2
14628         ol_enable_ldbm=no
14629 fi
14630
14631 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
14632         LINK_BINS_DYNAMIC="yes"
14633 else
14634         LINK_BINS_DYNAMIC="no"
14635 fi
14636
14637 if test $ol_enable_wrappers != no ; then
14638         for ac_hdr in tcpd.h
14639 do
14640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14641 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14642 echo "configure:14643: checking for $ac_hdr" >&5
14643 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14644   echo $ac_n "(cached) $ac_c" 1>&6
14645 else
14646   cat > conftest.$ac_ext <<EOF
14647 #line 14648 "configure"
14648 #include "confdefs.h"
14649 #include <$ac_hdr>
14650 EOF
14651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14652 { (eval echo configure:14653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14654 if test -z "$ac_err"; then
14655   rm -rf conftest*
14656   eval "ac_cv_header_$ac_safe=yes"
14657 else
14658   echo "$ac_err" >&5
14659   echo "configure: failed program was:" >&5
14660   cat conftest.$ac_ext >&5
14661   rm -rf conftest*
14662   eval "ac_cv_header_$ac_safe=no"
14663 fi
14664 rm -f conftest*
14665 fi
14666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14667   echo "$ac_t""yes" 1>&6
14668     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14669   cat >> confdefs.h <<EOF
14670 #define $ac_tr_hdr 1
14671 EOF
14672  
14673 else
14674   echo "$ac_t""no" 1>&6
14675 fi
14676 done
14677
14678
14679         if test $ac_cv_header_tcpd_h != yes ; then
14680                 have_wrappers=no
14681         else
14682                 cat > conftest.$ac_ext <<EOF
14683 #line 14684 "configure"
14684 #include "confdefs.h"
14685
14686 int allow_severity = 0;
14687 int deny_severity  = 0;
14688                 
14689 int main() {
14690 hosts_access()
14691 ; return 0; }
14692 EOF
14693 if { (eval echo configure:14694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14694   rm -rf conftest*
14695   have_wrappers=yes
14696 else
14697   echo "configure: failed program was:" >&5
14698   cat conftest.$ac_ext >&5
14699   rm -rf conftest*
14700   have_wrappers=no
14701 fi
14702 rm -f conftest*
14703         fi
14704
14705         if test $have_wrappers = yes ; then
14706                 cat >> confdefs.h <<\EOF
14707 #define HAVE_TCPD 1
14708 EOF
14709
14710                 WRAP_LIBS="-lwrap"
14711
14712                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
14713 echo "configure:14714: checking for main in -lnsl" >&5
14714 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
14715 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14716   echo $ac_n "(cached) $ac_c" 1>&6
14717 else
14718   ac_save_LIBS="$LIBS"
14719 LIBS="-lnsl  $LIBS"
14720 cat > conftest.$ac_ext <<EOF
14721 #line 14722 "configure"
14722 #include "confdefs.h"
14723
14724 int main() {
14725 main()
14726 ; return 0; }
14727 EOF
14728 if { (eval echo configure:14729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14729   rm -rf conftest*
14730   eval "ac_cv_lib_$ac_lib_var=yes"
14731 else
14732   echo "configure: failed program was:" >&5
14733   cat conftest.$ac_ext >&5
14734   rm -rf conftest*
14735   eval "ac_cv_lib_$ac_lib_var=no"
14736 fi
14737 rm -f conftest*
14738 LIBS="$ac_save_LIBS"
14739
14740 fi
14741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14742   echo "$ac_t""yes" 1>&6
14743     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14744     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14745   cat >> confdefs.h <<EOF
14746 #define $ac_tr_lib 1
14747 EOF
14748
14749   LIBS="-lnsl $LIBS"
14750
14751 else
14752   echo "$ac_t""no" 1>&6
14753 fi
14754
14755         else
14756                 echo "configure: warning: could not find -lwrap" 1>&2
14757                 if test $ol_enable_wrappers = yes ; then
14758                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
14759                 fi
14760
14761                 echo "configure: warning: disabling wrappers support" 1>&2
14762                 ol_enable_wrappers=no
14763                 WRAP_LIBS=""
14764         fi
14765 fi
14766
14767 if test $ol_enable_syslog != no ; then
14768         echo $ac_n "checking for openlog""... $ac_c" 1>&6
14769 echo "configure:14770: checking for openlog" >&5
14770 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
14771   echo $ac_n "(cached) $ac_c" 1>&6
14772 else
14773   cat > conftest.$ac_ext <<EOF
14774 #line 14775 "configure"
14775 #include "confdefs.h"
14776 /* System header to define __stub macros and hopefully few prototypes,
14777     which can conflict with char openlog(); below.  */
14778 #include <assert.h>
14779 /* Override any gcc2 internal prototype to avoid an error.  */
14780 /* We use char because int might match the return type of a gcc2
14781     builtin and then its argument prototype would still apply.  */
14782 char openlog();
14783 char (*f)();
14784
14785 int main() {
14786
14787 /* The GNU C library defines this for functions which it implements
14788     to always fail with ENOSYS.  Some functions are actually named
14789     something starting with __ and the normal name is an alias.  */
14790 #if defined (__stub_openlog) || defined (__stub___openlog)
14791 choke me
14792 #else
14793 f = openlog;
14794 #endif
14795
14796 ; return 0; }
14797 EOF
14798 if { (eval echo configure:14799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14799   rm -rf conftest*
14800   eval "ac_cv_func_openlog=yes"
14801 else
14802   echo "configure: failed program was:" >&5
14803   cat conftest.$ac_ext >&5
14804   rm -rf conftest*
14805   eval "ac_cv_func_openlog=no"
14806 fi
14807 rm -f conftest*
14808 fi
14809
14810 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
14811   echo "$ac_t""yes" 1>&6
14812   :
14813 else
14814   echo "$ac_t""no" 1>&6
14815 fi
14816
14817         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
14818                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
14819         fi
14820         ol_enable_syslog=$ac_cv_func_openlog
14821 fi
14822
14823
14824 ol_link_sql=no
14825 if test $ol_enable_sql != no ; then
14826         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
14827 echo "configure:14828: checking for SQLDriverConnect in -liodbc" >&5
14828 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14830   echo $ac_n "(cached) $ac_c" 1>&6
14831 else
14832   ac_save_LIBS="$LIBS"
14833 LIBS="-liodbc  $LIBS"
14834 cat > conftest.$ac_ext <<EOF
14835 #line 14836 "configure"
14836 #include "confdefs.h"
14837 /* Override any gcc2 internal prototype to avoid an error.  */
14838 /* We use char because int might match the return type of a gcc2
14839     builtin and then its argument prototype would still apply.  */
14840 char SQLDriverConnect();
14841
14842 int main() {
14843 SQLDriverConnect()
14844 ; return 0; }
14845 EOF
14846 if { (eval echo configure:14847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14847   rm -rf conftest*
14848   eval "ac_cv_lib_$ac_lib_var=yes"
14849 else
14850   echo "configure: failed program was:" >&5
14851   cat conftest.$ac_ext >&5
14852   rm -rf conftest*
14853   eval "ac_cv_lib_$ac_lib_var=no"
14854 fi
14855 rm -f conftest*
14856 LIBS="$ac_save_LIBS"
14857
14858 fi
14859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14860   echo "$ac_t""yes" 1>&6
14861   have_iodbc=yes
14862 else
14863   echo "$ac_t""no" 1>&6
14864 have_iodbc=no
14865 fi
14866
14867         if test $have_iodbc = yes ; then
14868                 ol_link_sql="-liodbc"
14869         else
14870                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
14871 echo "configure:14872: checking for SQLDriverConnect in -lodbc" >&5
14872 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
14873 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14874   echo $ac_n "(cached) $ac_c" 1>&6
14875 else
14876   ac_save_LIBS="$LIBS"
14877 LIBS="-lodbc  $LIBS"
14878 cat > conftest.$ac_ext <<EOF
14879 #line 14880 "configure"
14880 #include "confdefs.h"
14881 /* Override any gcc2 internal prototype to avoid an error.  */
14882 /* We use char because int might match the return type of a gcc2
14883     builtin and then its argument prototype would still apply.  */
14884 char SQLDriverConnect();
14885
14886 int main() {
14887 SQLDriverConnect()
14888 ; return 0; }
14889 EOF
14890 if { (eval echo configure:14891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14891   rm -rf conftest*
14892   eval "ac_cv_lib_$ac_lib_var=yes"
14893 else
14894   echo "configure: failed program was:" >&5
14895   cat conftest.$ac_ext >&5
14896   rm -rf conftest*
14897   eval "ac_cv_lib_$ac_lib_var=no"
14898 fi
14899 rm -f conftest*
14900 LIBS="$ac_save_LIBS"
14901
14902 fi
14903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14904   echo "$ac_t""yes" 1>&6
14905   have_odbc=yes
14906 else
14907   echo "$ac_t""no" 1>&6
14908 have_odbc=no
14909 fi
14910
14911                 if test $have_odbc = yes ; then
14912                         ol_link_sql="-lodbc"
14913                 fi
14914         fi
14915
14916         if test $ol_link_sql != no ; then
14917                 SLAPD_SQL_LIBS="$ol_link_sql"
14918
14919         elif test $ol_enable_sql != auto ; then
14920                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
14921         fi
14922 fi
14923
14924 if test $ol_enable_tcl != no ; then
14925         for ac_hdr in tcl.h
14926 do
14927 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14928 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14929 echo "configure:14930: checking for $ac_hdr" >&5
14930 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14931   echo $ac_n "(cached) $ac_c" 1>&6
14932 else
14933   cat > conftest.$ac_ext <<EOF
14934 #line 14935 "configure"
14935 #include "confdefs.h"
14936 #include <$ac_hdr>
14937 EOF
14938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14939 { (eval echo configure:14940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14941 if test -z "$ac_err"; then
14942   rm -rf conftest*
14943   eval "ac_cv_header_$ac_safe=yes"
14944 else
14945   echo "$ac_err" >&5
14946   echo "configure: failed program was:" >&5
14947   cat conftest.$ac_ext >&5
14948   rm -rf conftest*
14949   eval "ac_cv_header_$ac_safe=no"
14950 fi
14951 rm -f conftest*
14952 fi
14953 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14954   echo "$ac_t""yes" 1>&6
14955     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14956   cat >> confdefs.h <<EOF
14957 #define $ac_tr_hdr 1
14958 EOF
14959  
14960 else
14961   echo "$ac_t""no" 1>&6
14962 fi
14963 done
14964
14965
14966         if test $ac_cv_header_tcl_h != yes ; then
14967                 have_tcl=no
14968         else
14969                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
14970                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
14971 echo "configure:14972: checking for main in -l$lib" >&5
14972 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
14973 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14974   echo $ac_n "(cached) $ac_c" 1>&6
14975 else
14976   ac_save_LIBS="$LIBS"
14977 LIBS="-l$lib  $LIBS"
14978 cat > conftest.$ac_ext <<EOF
14979 #line 14980 "configure"
14980 #include "confdefs.h"
14981
14982 int main() {
14983 main()
14984 ; return 0; }
14985 EOF
14986 if { (eval echo configure:14987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14987   rm -rf conftest*
14988   eval "ac_cv_lib_$ac_lib_var=yes"
14989 else
14990   echo "configure: failed program was:" >&5
14991   cat conftest.$ac_ext >&5
14992   rm -rf conftest*
14993   eval "ac_cv_lib_$ac_lib_var=no"
14994 fi
14995 rm -f conftest*
14996 LIBS="$ac_save_LIBS"
14997
14998 fi
14999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15000   echo "$ac_t""yes" 1>&6
15001   have_tcl=yes
15002                            if test x"$ol_with_tcl_module" = "xstatic" ; then
15003                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
15004                            else
15005                                MOD_TCL_LIB="-l${lib}"
15006                            fi;break
15007 else
15008   echo "$ac_t""no" 1>&6
15009 have_tcl=no
15010 fi
15011
15012                 done
15013         fi
15014
15015         if test $have_tcl != yes ; then
15016                 echo "configure: warning: could not find -ltcl" 1>&2
15017                 if test $ol_enable_tcl = yes ; then
15018                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
15019                 fi
15020
15021                 ol_enable_tcl=no
15022         fi
15023 fi
15024
15025 ol_link_termcap=no
15026 for ac_hdr in termcap.h ncurses.h
15027 do
15028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15030 echo "configure:15031: checking for $ac_hdr" >&5
15031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15032   echo $ac_n "(cached) $ac_c" 1>&6
15033 else
15034   cat > conftest.$ac_ext <<EOF
15035 #line 15036 "configure"
15036 #include "confdefs.h"
15037 #include <$ac_hdr>
15038 EOF
15039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15040 { (eval echo configure:15041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15042 if test -z "$ac_err"; then
15043   rm -rf conftest*
15044   eval "ac_cv_header_$ac_safe=yes"
15045 else
15046   echo "$ac_err" >&5
15047   echo "configure: failed program was:" >&5
15048   cat conftest.$ac_ext >&5
15049   rm -rf conftest*
15050   eval "ac_cv_header_$ac_safe=no"
15051 fi
15052 rm -f conftest*
15053 fi
15054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15055   echo "$ac_t""yes" 1>&6
15056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15057   cat >> confdefs.h <<EOF
15058 #define $ac_tr_hdr 1
15059 EOF
15060  
15061 else
15062   echo "$ac_t""no" 1>&6
15063 fi
15064 done
15065
15066
15067 if test $ol_link_termcap = no ; then
15068         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
15069 echo "configure:15070: checking for tputs in -ltermcap" >&5
15070 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
15071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15072   echo $ac_n "(cached) $ac_c" 1>&6
15073 else
15074   ac_save_LIBS="$LIBS"
15075 LIBS="-ltermcap  $LIBS"
15076 cat > conftest.$ac_ext <<EOF
15077 #line 15078 "configure"
15078 #include "confdefs.h"
15079 /* Override any gcc2 internal prototype to avoid an error.  */
15080 /* We use char because int might match the return type of a gcc2
15081     builtin and then its argument prototype would still apply.  */
15082 char tputs();
15083
15084 int main() {
15085 tputs()
15086 ; return 0; }
15087 EOF
15088 if { (eval echo configure:15089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15089   rm -rf conftest*
15090   eval "ac_cv_lib_$ac_lib_var=yes"
15091 else
15092   echo "configure: failed program was:" >&5
15093   cat conftest.$ac_ext >&5
15094   rm -rf conftest*
15095   eval "ac_cv_lib_$ac_lib_var=no"
15096 fi
15097 rm -f conftest*
15098 LIBS="$ac_save_LIBS"
15099
15100 fi
15101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15102   echo "$ac_t""yes" 1>&6
15103   have_termcap=yes
15104 else
15105   echo "$ac_t""no" 1>&6
15106 have_termcap=no
15107 fi
15108
15109         if test $have_termcap = yes ; then
15110                 cat >> confdefs.h <<\EOF
15111 #define HAVE_TERMCAP 1
15112 EOF
15113
15114                 ol_link_termcap=yes
15115                 TERMCAP_LIBS=-ltermcap
15116         fi
15117 fi
15118
15119 if test $ol_link_termcap = no ; then
15120         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
15121 echo "configure:15122: checking for initscr in -lncurses" >&5
15122 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
15123 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15124   echo $ac_n "(cached) $ac_c" 1>&6
15125 else
15126   ac_save_LIBS="$LIBS"
15127 LIBS="-lncurses  $LIBS"
15128 cat > conftest.$ac_ext <<EOF
15129 #line 15130 "configure"
15130 #include "confdefs.h"
15131 /* Override any gcc2 internal prototype to avoid an error.  */
15132 /* We use char because int might match the return type of a gcc2
15133     builtin and then its argument prototype would still apply.  */
15134 char initscr();
15135
15136 int main() {
15137 initscr()
15138 ; return 0; }
15139 EOF
15140 if { (eval echo configure:15141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15141   rm -rf conftest*
15142   eval "ac_cv_lib_$ac_lib_var=yes"
15143 else
15144   echo "configure: failed program was:" >&5
15145   cat conftest.$ac_ext >&5
15146   rm -rf conftest*
15147   eval "ac_cv_lib_$ac_lib_var=no"
15148 fi
15149 rm -f conftest*
15150 LIBS="$ac_save_LIBS"
15151
15152 fi
15153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15154   echo "$ac_t""yes" 1>&6
15155   have_ncurses=yes
15156 else
15157   echo "$ac_t""no" 1>&6
15158 have_ncurses=no
15159 fi
15160
15161         if test $have_ncurses = yes ; then
15162                 cat >> confdefs.h <<\EOF
15163 #define HAVE_NCURSES 1
15164 EOF
15165
15166                 ol_link_termcap=yes
15167                 TERMCAP_LIBS=-lncurses
15168         fi
15169 fi
15170
15171 if test $ol_link_termcap = no ; then
15172         cat >> confdefs.h <<\EOF
15173 #define NO_TERMCAP 1
15174 EOF
15175
15176         TERMCAP_LIBS=
15177 fi
15178
15179 ol_link_sasl=no
15180 ol_link_spasswd=no
15181 if test $ol_with_cyrus_sasl != no ; then
15182         for ac_hdr in sasl.h
15183 do
15184 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15185 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15186 echo "configure:15187: checking for $ac_hdr" >&5
15187 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15188   echo $ac_n "(cached) $ac_c" 1>&6
15189 else
15190   cat > conftest.$ac_ext <<EOF
15191 #line 15192 "configure"
15192 #include "confdefs.h"
15193 #include <$ac_hdr>
15194 EOF
15195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15196 { (eval echo configure:15197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15198 if test -z "$ac_err"; then
15199   rm -rf conftest*
15200   eval "ac_cv_header_$ac_safe=yes"
15201 else
15202   echo "$ac_err" >&5
15203   echo "configure: failed program was:" >&5
15204   cat conftest.$ac_ext >&5
15205   rm -rf conftest*
15206   eval "ac_cv_header_$ac_safe=no"
15207 fi
15208 rm -f conftest*
15209 fi
15210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15211   echo "$ac_t""yes" 1>&6
15212     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15213   cat >> confdefs.h <<EOF
15214 #define $ac_tr_hdr 1
15215 EOF
15216  
15217 else
15218   echo "$ac_t""no" 1>&6
15219 fi
15220 done
15221
15222
15223         if test $ac_cv_header_sasl_h = yes ; then
15224                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
15225 echo "configure:15226: checking for sasl_client_init in -lsasl" >&5
15226 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
15227 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15228   echo $ac_n "(cached) $ac_c" 1>&6
15229 else
15230   ac_save_LIBS="$LIBS"
15231 LIBS="-lsasl  $LIBS"
15232 cat > conftest.$ac_ext <<EOF
15233 #line 15234 "configure"
15234 #include "confdefs.h"
15235 /* Override any gcc2 internal prototype to avoid an error.  */
15236 /* We use char because int might match the return type of a gcc2
15237     builtin and then its argument prototype would still apply.  */
15238 char sasl_client_init();
15239
15240 int main() {
15241 sasl_client_init()
15242 ; return 0; }
15243 EOF
15244 if { (eval echo configure:15245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15245   rm -rf conftest*
15246   eval "ac_cv_lib_$ac_lib_var=yes"
15247 else
15248   echo "configure: failed program was:" >&5
15249   cat conftest.$ac_ext >&5
15250   rm -rf conftest*
15251   eval "ac_cv_lib_$ac_lib_var=no"
15252 fi
15253 rm -f conftest*
15254 LIBS="$ac_save_LIBS"
15255
15256 fi
15257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15258   echo "$ac_t""yes" 1>&6
15259   have_cyrus_sasl=yes
15260 else
15261   echo "$ac_t""no" 1>&6
15262 have_cyrus_sasl=no
15263 fi
15264
15265
15266                 if test $have_cyrus_sasl != no ; then
15267                         SASL_LIBS="-lsasl"
15268                         cat >> confdefs.h <<\EOF
15269 #define HAVE_CYRUS_SASL 1
15270 EOF
15271
15272                         ol_link_sasl=yes
15273                 fi
15274         fi
15275
15276         if test $ol_link_sasl = no ; then
15277                 if test $ol_with_cyrus_sasl != auto ; then
15278                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
15279                 else
15280                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
15281                         echo "configure: warning: SASL authentication not supported!" 1>&2
15282                         if test $ol_link_tls = no ; then
15283                                 echo "configure: warning: Strong authentication not supported!" 1>&2
15284                         fi
15285                 fi
15286
15287         elif test $ol_enable_spasswd != no ; then
15288                 ol_link_spasswd=yes
15289         fi
15290
15291 else
15292         echo "configure: warning: SASL authentication not supported!" 1>&2
15293         if test $ol_link_tls = no ; then
15294                 echo "configure: warning: Strong authentication not supported!" 1>&2
15295         fi
15296 fi
15297
15298 if test $cross_compiling != yes ; then
15299         dev=no
15300         if test -r /dev/urandom ; then
15301                 dev="/dev/urandom";
15302         elif test -r /idev/urandom ; then
15303                 dev="/idev/urandom";
15304         elif test -r /dev/srandom ; then
15305                 dev="/dev/srandom";
15306         elif test -r /dev/random ; then
15307                 dev="/dev/random";
15308         elif test -r /idev/random ; then
15309                 dev="/idev/random";
15310         fi
15311
15312         if test $dev != no ; then
15313                 cat >> confdefs.h <<EOF
15314 #define URANDOM_DEVICE "$dev"
15315 EOF
15316
15317         fi
15318 fi
15319
15320 ol_link_fetch=no
15321 if test $ol_with_fetch != no ; then
15322         ol_LIBS=$LIBS
15323 LIBS="-lfetch -lcom_err $LIBS"
15324 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
15325 echo "configure:15326: checking fetch(3) library" >&5
15326 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
15327   echo $ac_n "(cached) $ac_c" 1>&6
15328 else
15329   
15330         cat > conftest.$ac_ext <<EOF
15331 #line 15332 "configure"
15332 #include "confdefs.h"
15333
15334 #include <sys/param.h>
15335 #include <stdio.h>
15336 #include <fetch.h>
15337 int main() {
15338 struct url *u = fetchParseURL("file:///"); 
15339 ; return 0; }
15340 EOF
15341 if { (eval echo configure:15342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15342   rm -rf conftest*
15343   ol_cv_lib_fetch=yes
15344 else
15345   echo "configure: failed program was:" >&5
15346   cat conftest.$ac_ext >&5
15347   rm -rf conftest*
15348   ol_cv_lib_fetch=no
15349 fi
15350 rm -f conftest*
15351 fi
15352
15353 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
15354 LIBS=$ol_LIBS
15355 if test $ol_cv_lib_fetch != no ; then
15356         ol_link_fetch="-lfetch -lcom_err"
15357         cat >> confdefs.h <<\EOF
15358 #define HAVE_FETCH 1
15359 EOF
15360
15361 fi
15362
15363
15364         if test $ol_cv_lib_fetch != no ; then
15365                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
15366                 ol_link_fetch=freebsd
15367
15368         elif test $ol_with_fetch != auto ; then
15369                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
15370         fi 
15371 fi
15372
15373 ol_link_readline=no
15374 if test $ol_with_readline != no ; then
15375         for ac_hdr in readline/readline.h readline/history.h
15376 do
15377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15379 echo "configure:15380: checking for $ac_hdr" >&5
15380 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15381   echo $ac_n "(cached) $ac_c" 1>&6
15382 else
15383   cat > conftest.$ac_ext <<EOF
15384 #line 15385 "configure"
15385 #include "confdefs.h"
15386 #include <$ac_hdr>
15387 EOF
15388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15389 { (eval echo configure:15390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15391 if test -z "$ac_err"; then
15392   rm -rf conftest*
15393   eval "ac_cv_header_$ac_safe=yes"
15394 else
15395   echo "$ac_err" >&5
15396   echo "configure: failed program was:" >&5
15397   cat conftest.$ac_ext >&5
15398   rm -rf conftest*
15399   eval "ac_cv_header_$ac_safe=no"
15400 fi
15401 rm -f conftest*
15402 fi
15403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15404   echo "$ac_t""yes" 1>&6
15405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15406   cat >> confdefs.h <<EOF
15407 #define $ac_tr_hdr 1
15408 EOF
15409  
15410 else
15411   echo "$ac_t""no" 1>&6
15412 fi
15413 done
15414
15415
15416         if test $ac_cv_header_readline_readline_h = yes ; then
15417                 save_LIBS="$LIBS"
15418                 LIBS="$TERMCAP_LIBS $LIBS"
15419                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
15420 echo "configure:15421: checking for readline in -lreadline" >&5
15421 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
15422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15423   echo $ac_n "(cached) $ac_c" 1>&6
15424 else
15425   ac_save_LIBS="$LIBS"
15426 LIBS="-lreadline  $LIBS"
15427 cat > conftest.$ac_ext <<EOF
15428 #line 15429 "configure"
15429 #include "confdefs.h"
15430 /* Override any gcc2 internal prototype to avoid an error.  */
15431 /* We use char because int might match the return type of a gcc2
15432     builtin and then its argument prototype would still apply.  */
15433 char readline();
15434
15435 int main() {
15436 readline()
15437 ; return 0; }
15438 EOF
15439 if { (eval echo configure:15440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15440   rm -rf conftest*
15441   eval "ac_cv_lib_$ac_lib_var=yes"
15442 else
15443   echo "configure: failed program was:" >&5
15444   cat conftest.$ac_ext >&5
15445   rm -rf conftest*
15446   eval "ac_cv_lib_$ac_lib_var=no"
15447 fi
15448 rm -f conftest*
15449 LIBS="$ac_save_LIBS"
15450
15451 fi
15452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15453   echo "$ac_t""yes" 1>&6
15454   have_readline=yes
15455 else
15456   echo "$ac_t""no" 1>&6
15457 have_readline=no
15458 fi
15459
15460                 LIBS="$save_LIBS"
15461                         
15462                 if test $have_readline = yes ; then
15463                         ol_with_readline=found
15464                         ol_link_readline=yes
15465
15466                         READLINE_LIBS="-lreadline"
15467                 fi
15468         fi
15469 fi
15470
15471 if test $ol_link_readline = yes ; then
15472         cat >> confdefs.h <<\EOF
15473 #define HAVE_READLINE 1
15474 EOF
15475
15476 fi
15477
15478
15479 if test $ol_enable_crypt != no ; then
15480         echo $ac_n "checking for crypt""... $ac_c" 1>&6
15481 echo "configure:15482: checking for crypt" >&5
15482 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
15483   echo $ac_n "(cached) $ac_c" 1>&6
15484 else
15485   cat > conftest.$ac_ext <<EOF
15486 #line 15487 "configure"
15487 #include "confdefs.h"
15488 /* System header to define __stub macros and hopefully few prototypes,
15489     which can conflict with char crypt(); below.  */
15490 #include <assert.h>
15491 /* Override any gcc2 internal prototype to avoid an error.  */
15492 /* We use char because int might match the return type of a gcc2
15493     builtin and then its argument prototype would still apply.  */
15494 char crypt();
15495 char (*f)();
15496
15497 int main() {
15498
15499 /* The GNU C library defines this for functions which it implements
15500     to always fail with ENOSYS.  Some functions are actually named
15501     something starting with __ and the normal name is an alias.  */
15502 #if defined (__stub_crypt) || defined (__stub___crypt)
15503 choke me
15504 #else
15505 f = crypt;
15506 #endif
15507
15508 ; return 0; }
15509 EOF
15510 if { (eval echo configure:15511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15511   rm -rf conftest*
15512   eval "ac_cv_func_crypt=yes"
15513 else
15514   echo "configure: failed program was:" >&5
15515   cat conftest.$ac_ext >&5
15516   rm -rf conftest*
15517   eval "ac_cv_func_crypt=no"
15518 fi
15519 rm -f conftest*
15520 fi
15521
15522 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
15523   echo "$ac_t""yes" 1>&6
15524   have_crypt=yes
15525 else
15526   echo "$ac_t""no" 1>&6
15527
15528                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
15529 echo "configure:15530: checking for crypt in -lcrypt" >&5
15530 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
15531 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15532   echo $ac_n "(cached) $ac_c" 1>&6
15533 else
15534   ac_save_LIBS="$LIBS"
15535 LIBS="-lcrypt  $LIBS"
15536 cat > conftest.$ac_ext <<EOF
15537 #line 15538 "configure"
15538 #include "confdefs.h"
15539 /* Override any gcc2 internal prototype to avoid an error.  */
15540 /* We use char because int might match the return type of a gcc2
15541     builtin and then its argument prototype would still apply.  */
15542 char crypt();
15543
15544 int main() {
15545 crypt()
15546 ; return 0; }
15547 EOF
15548 if { (eval echo configure:15549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15549   rm -rf conftest*
15550   eval "ac_cv_lib_$ac_lib_var=yes"
15551 else
15552   echo "configure: failed program was:" >&5
15553   cat conftest.$ac_ext >&5
15554   rm -rf conftest*
15555   eval "ac_cv_lib_$ac_lib_var=no"
15556 fi
15557 rm -f conftest*
15558 LIBS="$ac_save_LIBS"
15559
15560 fi
15561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15562   echo "$ac_t""yes" 1>&6
15563   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
15564                         have_crypt=yes
15565 else
15566   echo "$ac_t""no" 1>&6
15567 have_crypt=no
15568 fi
15569
15570 fi
15571
15572
15573         if test $have_crypt = yes ; then
15574                 cat >> confdefs.h <<\EOF
15575 #define HAVE_CRYPT 1
15576 EOF
15577
15578         else
15579                 echo "configure: warning: could not find crypt" 1>&2
15580                 if test $ol_enable_crypt = yes ; then
15581                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
15582                 fi
15583
15584                 echo "configure: warning: disabling crypt support" 1>&2
15585                 ol_enable_crypt=no
15586         fi
15587 fi
15588
15589 if test $ol_enable_proctitle != no ; then
15590         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
15591 echo "configure:15592: checking for setproctitle" >&5
15592 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
15593   echo $ac_n "(cached) $ac_c" 1>&6
15594 else
15595   cat > conftest.$ac_ext <<EOF
15596 #line 15597 "configure"
15597 #include "confdefs.h"
15598 /* System header to define __stub macros and hopefully few prototypes,
15599     which can conflict with char setproctitle(); below.  */
15600 #include <assert.h>
15601 /* Override any gcc2 internal prototype to avoid an error.  */
15602 /* We use char because int might match the return type of a gcc2
15603     builtin and then its argument prototype would still apply.  */
15604 char setproctitle();
15605 char (*f)();
15606
15607 int main() {
15608
15609 /* The GNU C library defines this for functions which it implements
15610     to always fail with ENOSYS.  Some functions are actually named
15611     something starting with __ and the normal name is an alias.  */
15612 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
15613 choke me
15614 #else
15615 f = setproctitle;
15616 #endif
15617
15618 ; return 0; }
15619 EOF
15620 if { (eval echo configure:15621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15621   rm -rf conftest*
15622   eval "ac_cv_func_setproctitle=yes"
15623 else
15624   echo "configure: failed program was:" >&5
15625   cat conftest.$ac_ext >&5
15626   rm -rf conftest*
15627   eval "ac_cv_func_setproctitle=no"
15628 fi
15629 rm -f conftest*
15630 fi
15631
15632 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
15633   echo "$ac_t""yes" 1>&6
15634   have_setproctitle=yes
15635 else
15636   echo "$ac_t""no" 1>&6
15637
15638                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
15639 echo "configure:15640: checking for setproctitle in -lutil" >&5
15640 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
15641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15642   echo $ac_n "(cached) $ac_c" 1>&6
15643 else
15644   ac_save_LIBS="$LIBS"
15645 LIBS="-lutil  $LIBS"
15646 cat > conftest.$ac_ext <<EOF
15647 #line 15648 "configure"
15648 #include "confdefs.h"
15649 /* Override any gcc2 internal prototype to avoid an error.  */
15650 /* We use char because int might match the return type of a gcc2
15651     builtin and then its argument prototype would still apply.  */
15652 char setproctitle();
15653
15654 int main() {
15655 setproctitle()
15656 ; return 0; }
15657 EOF
15658 if { (eval echo configure:15659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15659   rm -rf conftest*
15660   eval "ac_cv_lib_$ac_lib_var=yes"
15661 else
15662   echo "configure: failed program was:" >&5
15663   cat conftest.$ac_ext >&5
15664   rm -rf conftest*
15665   eval "ac_cv_lib_$ac_lib_var=no"
15666 fi
15667 rm -f conftest*
15668 LIBS="$ac_save_LIBS"
15669
15670 fi
15671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15672   echo "$ac_t""yes" 1>&6
15673   have_setproctitle=yes
15674                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
15675 else
15676   echo "$ac_t""no" 1>&6
15677 have_setproctitle=no
15678                         LIBOBJS="$LIBOBJS setproctitle.o"
15679                         LIBSRCS="$LIBSRCS setproctitle.c"
15680 fi
15681
15682 fi
15683
15684
15685         if test $have_setproctitle = yes ; then
15686                 cat >> confdefs.h <<\EOF
15687 #define HAVE_SETPROCTITLE 1
15688 EOF
15689
15690         fi
15691 fi
15692
15693 if test $ol_enable_slp != no ; then
15694         for ac_hdr in slp.h 
15695 do
15696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15698 echo "configure:15699: checking for $ac_hdr" >&5
15699 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15700   echo $ac_n "(cached) $ac_c" 1>&6
15701 else
15702   cat > conftest.$ac_ext <<EOF
15703 #line 15704 "configure"
15704 #include "confdefs.h"
15705 #include <$ac_hdr>
15706 EOF
15707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15708 { (eval echo configure:15709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15710 if test -z "$ac_err"; then
15711   rm -rf conftest*
15712   eval "ac_cv_header_$ac_safe=yes"
15713 else
15714   echo "$ac_err" >&5
15715   echo "configure: failed program was:" >&5
15716   cat conftest.$ac_ext >&5
15717   rm -rf conftest*
15718   eval "ac_cv_header_$ac_safe=no"
15719 fi
15720 rm -f conftest*
15721 fi
15722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15723   echo "$ac_t""yes" 1>&6
15724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15725   cat >> confdefs.h <<EOF
15726 #define $ac_tr_hdr 1
15727 EOF
15728  
15729 else
15730   echo "$ac_t""no" 1>&6
15731 fi
15732 done
15733
15734
15735         if test $ac_cv_header_slp_h = yes ; then
15736                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
15737 echo "configure:15738: checking for SLPOpen in -lslp" >&5
15738 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
15739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15740   echo $ac_n "(cached) $ac_c" 1>&6
15741 else
15742   ac_save_LIBS="$LIBS"
15743 LIBS="-lslp  $LIBS"
15744 cat > conftest.$ac_ext <<EOF
15745 #line 15746 "configure"
15746 #include "confdefs.h"
15747 /* Override any gcc2 internal prototype to avoid an error.  */
15748 /* We use char because int might match the return type of a gcc2
15749     builtin and then its argument prototype would still apply.  */
15750 char SLPOpen();
15751
15752 int main() {
15753 SLPOpen()
15754 ; return 0; }
15755 EOF
15756 if { (eval echo configure:15757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15757   rm -rf conftest*
15758   eval "ac_cv_lib_$ac_lib_var=yes"
15759 else
15760   echo "configure: failed program was:" >&5
15761   cat conftest.$ac_ext >&5
15762   rm -rf conftest*
15763   eval "ac_cv_lib_$ac_lib_var=no"
15764 fi
15765 rm -f conftest*
15766 LIBS="$ac_save_LIBS"
15767
15768 fi
15769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15770   echo "$ac_t""yes" 1>&6
15771   have_slp=yes
15772 else
15773   echo "$ac_t""no" 1>&6
15774 have_slp=no
15775 fi
15776
15777                 if test $have_slp = yes ; then
15778                         cat >> confdefs.h <<\EOF
15779 #define HAVE_SLP 1
15780 EOF
15781
15782                         SLAPD_SLP_LIBS=-lslp
15783                 fi
15784
15785         elif test $ol_enable_slp = yes ; then
15786                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
15787         fi
15788 fi
15789
15790 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
15791 echo "configure:15792: checking for ANSI C header files" >&5
15792 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
15793   echo $ac_n "(cached) $ac_c" 1>&6
15794 else
15795   cat > conftest.$ac_ext <<EOF
15796 #line 15797 "configure"
15797 #include "confdefs.h"
15798 #include <stdlib.h>
15799 #include <stdarg.h>
15800 #include <string.h>
15801 #include <float.h>
15802 EOF
15803 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15804 { (eval echo configure:15805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15805 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15806 if test -z "$ac_err"; then
15807   rm -rf conftest*
15808   ac_cv_header_stdc=yes
15809 else
15810   echo "$ac_err" >&5
15811   echo "configure: failed program was:" >&5
15812   cat conftest.$ac_ext >&5
15813   rm -rf conftest*
15814   ac_cv_header_stdc=no
15815 fi
15816 rm -f conftest*
15817
15818 if test $ac_cv_header_stdc = yes; then
15819   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15820 cat > conftest.$ac_ext <<EOF
15821 #line 15822 "configure"
15822 #include "confdefs.h"
15823 #include <string.h>
15824 EOF
15825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15826   egrep "memchr" >/dev/null 2>&1; then
15827   :
15828 else
15829   rm -rf conftest*
15830   ac_cv_header_stdc=no
15831 fi
15832 rm -f conftest*
15833
15834 fi
15835
15836 if test $ac_cv_header_stdc = yes; then
15837   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15838 cat > conftest.$ac_ext <<EOF
15839 #line 15840 "configure"
15840 #include "confdefs.h"
15841 #include <stdlib.h>
15842 EOF
15843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15844   egrep "free" >/dev/null 2>&1; then
15845   :
15846 else
15847   rm -rf conftest*
15848   ac_cv_header_stdc=no
15849 fi
15850 rm -f conftest*
15851
15852 fi
15853
15854 if test $ac_cv_header_stdc = yes; then
15855   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15856 if test "$cross_compiling" = yes; then
15857   :
15858 else
15859   cat > conftest.$ac_ext <<EOF
15860 #line 15861 "configure"
15861 #include "confdefs.h"
15862 #include <ctype.h>
15863 #if ((' ' & 0x0FF) == 0x020)
15864 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15865 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15866 #else
15867 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15868  || ('j' <= (c) && (c) <= 'r') \
15869  || ('s' <= (c) && (c) <= 'z'))
15870 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15871 #endif
15872 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15873 int main () { int i; for (i = 0; i < 256; i++)
15874 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
15875 exit (0); }
15876
15877 EOF
15878 if { (eval echo configure:15879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15879 then
15880   :
15881 else
15882   echo "configure: failed program was:" >&5
15883   cat conftest.$ac_ext >&5
15884   rm -fr conftest*
15885   ac_cv_header_stdc=no
15886 fi
15887 rm -fr conftest*
15888 fi
15889
15890 fi
15891 fi
15892
15893 echo "$ac_t""$ac_cv_header_stdc" 1>&6
15894 if test $ac_cv_header_stdc = yes; then
15895   cat >> confdefs.h <<\EOF
15896 #define STDC_HEADERS 1
15897 EOF
15898
15899 fi
15900
15901 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
15902 echo "configure:15903: checking for mode_t" >&5
15903 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
15904   echo $ac_n "(cached) $ac_c" 1>&6
15905 else
15906   cat > conftest.$ac_ext <<EOF
15907 #line 15908 "configure"
15908 #include "confdefs.h"
15909 #include <sys/types.h>
15910 #if STDC_HEADERS
15911 #include <stdlib.h>
15912 #include <stddef.h>
15913 #endif
15914
15915 EOF
15916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15917   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15918   rm -rf conftest*
15919   eval "ac_cv_type_mode_t=yes"
15920 else
15921   rm -rf conftest*
15922   eval "ac_cv_type_mode_t=no"
15923 fi
15924 rm -f conftest*
15925
15926 fi
15927 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
15928   echo "$ac_t""yes" 1>&6
15929 else
15930   echo "$ac_t""no" 1>&6
15931   cat >> confdefs.h <<EOF
15932 #define mode_t int
15933 EOF
15934
15935 fi
15936
15937 echo $ac_n "checking for off_t""... $ac_c" 1>&6
15938 echo "configure:15939: checking for off_t" >&5
15939 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
15940   echo $ac_n "(cached) $ac_c" 1>&6
15941 else
15942   cat > conftest.$ac_ext <<EOF
15943 #line 15944 "configure"
15944 #include "confdefs.h"
15945 #include <sys/types.h>
15946 #if STDC_HEADERS
15947 #include <stdlib.h>
15948 #include <stddef.h>
15949 #endif
15950
15951 EOF
15952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15953   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15954   rm -rf conftest*
15955   eval "ac_cv_type_off_t=yes"
15956 else
15957   rm -rf conftest*
15958   eval "ac_cv_type_off_t=no"
15959 fi
15960 rm -f conftest*
15961
15962 fi
15963 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
15964   echo "$ac_t""yes" 1>&6
15965 else
15966   echo "$ac_t""no" 1>&6
15967   cat >> confdefs.h <<EOF
15968 #define off_t long
15969 EOF
15970
15971 fi
15972
15973 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
15974 echo "configure:15975: checking for pid_t" >&5
15975 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
15976   echo $ac_n "(cached) $ac_c" 1>&6
15977 else
15978   cat > conftest.$ac_ext <<EOF
15979 #line 15980 "configure"
15980 #include "confdefs.h"
15981 #include <sys/types.h>
15982 #if STDC_HEADERS
15983 #include <stdlib.h>
15984 #include <stddef.h>
15985 #endif
15986
15987 EOF
15988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15989   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
15990   rm -rf conftest*
15991   eval "ac_cv_type_pid_t=yes"
15992 else
15993   rm -rf conftest*
15994   eval "ac_cv_type_pid_t=no"
15995 fi
15996 rm -f conftest*
15997
15998 fi
15999 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
16000   echo "$ac_t""yes" 1>&6
16001 else
16002   echo "$ac_t""no" 1>&6
16003   cat >> confdefs.h <<EOF
16004 #define pid_t int
16005 EOF
16006
16007 fi
16008
16009 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
16010 echo "configure:16011: checking for ptrdiff_t" >&5
16011 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
16012   echo $ac_n "(cached) $ac_c" 1>&6
16013 else
16014   cat > conftest.$ac_ext <<EOF
16015 #line 16016 "configure"
16016 #include "confdefs.h"
16017 #include <stddef.h>
16018 int main() {
16019 ptrdiff_t p
16020 ; return 0; }
16021 EOF
16022 if { (eval echo configure:16023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16023   rm -rf conftest*
16024   am_cv_type_ptrdiff_t=yes
16025 else
16026   echo "configure: failed program was:" >&5
16027   cat conftest.$ac_ext >&5
16028   rm -rf conftest*
16029   am_cv_type_ptrdiff_t=no
16030 fi
16031 rm -f conftest*
16032 fi
16033
16034 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
16035    if test $am_cv_type_ptrdiff_t = yes; then
16036      cat >> confdefs.h <<\EOF
16037 #define HAVE_PTRDIFF_T 1
16038 EOF
16039
16040    fi
16041
16042 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
16043 echo "configure:16044: checking return type of signal handlers" >&5
16044 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
16045   echo $ac_n "(cached) $ac_c" 1>&6
16046 else
16047   cat > conftest.$ac_ext <<EOF
16048 #line 16049 "configure"
16049 #include "confdefs.h"
16050 #include <sys/types.h>
16051 #include <signal.h>
16052 #ifdef signal
16053 #undef signal
16054 #endif
16055 #ifdef __cplusplus
16056 extern "C" void (*signal (int, void (*)(int)))(int);
16057 #else
16058 void (*signal ()) ();
16059 #endif
16060
16061 int main() {
16062 int i;
16063 ; return 0; }
16064 EOF
16065 if { (eval echo configure:16066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16066   rm -rf conftest*
16067   ac_cv_type_signal=void
16068 else
16069   echo "configure: failed program was:" >&5
16070   cat conftest.$ac_ext >&5
16071   rm -rf conftest*
16072   ac_cv_type_signal=int
16073 fi
16074 rm -f conftest*
16075 fi
16076
16077 echo "$ac_t""$ac_cv_type_signal" 1>&6
16078 cat >> confdefs.h <<EOF
16079 #define RETSIGTYPE $ac_cv_type_signal
16080 EOF
16081
16082
16083 echo $ac_n "checking for size_t""... $ac_c" 1>&6
16084 echo "configure:16085: checking for size_t" >&5
16085 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
16086   echo $ac_n "(cached) $ac_c" 1>&6
16087 else
16088   cat > conftest.$ac_ext <<EOF
16089 #line 16090 "configure"
16090 #include "confdefs.h"
16091 #include <sys/types.h>
16092 #if STDC_HEADERS
16093 #include <stdlib.h>
16094 #include <stddef.h>
16095 #endif
16096
16097 EOF
16098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16099   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16100   rm -rf conftest*
16101   eval "ac_cv_type_size_t=yes"
16102 else
16103   rm -rf conftest*
16104   eval "ac_cv_type_size_t=no"
16105 fi
16106 rm -f conftest*
16107
16108 fi
16109 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
16110   echo "$ac_t""yes" 1>&6
16111 else
16112   echo "$ac_t""no" 1>&6
16113   cat >> confdefs.h <<EOF
16114 #define size_t unsigned
16115 EOF
16116
16117 fi
16118
16119
16120 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
16121 echo "configure:16122: checking for ssize_t" >&5
16122 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
16123   echo $ac_n "(cached) $ac_c" 1>&6
16124 else
16125   cat > conftest.$ac_ext <<EOF
16126 #line 16127 "configure"
16127 #include "confdefs.h"
16128 #include <sys/types.h>
16129 #if STDC_HEADERS
16130 #include <stdlib.h>
16131 #include <stddef.h>
16132 #endif
16133
16134 EOF
16135 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16136   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16137   rm -rf conftest*
16138   eval "ac_cv_type_ssize_t=yes"
16139 else
16140   rm -rf conftest*
16141   eval "ac_cv_type_ssize_t=no"
16142 fi
16143 rm -f conftest*
16144
16145 fi
16146 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
16147   echo "$ac_t""yes" 1>&6
16148 else
16149   echo "$ac_t""no" 1>&6
16150   cat >> confdefs.h <<EOF
16151 #define ssize_t signed int
16152 EOF
16153
16154 fi
16155
16156 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
16157 echo "configure:16158: checking for caddr_t" >&5
16158 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
16159   echo $ac_n "(cached) $ac_c" 1>&6
16160 else
16161   cat > conftest.$ac_ext <<EOF
16162 #line 16163 "configure"
16163 #include "confdefs.h"
16164 #include <sys/types.h>
16165 #if STDC_HEADERS
16166 #include <stdlib.h>
16167 #include <stddef.h>
16168 #endif
16169
16170 EOF
16171 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16172   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
16173   rm -rf conftest*
16174   eval "ac_cv_type_caddr_t=yes"
16175 else
16176   rm -rf conftest*
16177   eval "ac_cv_type_caddr_t=no"
16178 fi
16179 rm -f conftest*
16180
16181 fi
16182 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
16183   echo "$ac_t""yes" 1>&6
16184 else
16185   echo "$ac_t""no" 1>&6
16186   cat >> confdefs.h <<EOF
16187 #define caddr_t char *
16188 EOF
16189
16190 fi
16191
16192
16193 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
16194 echo "configure:16195: checking for socklen_t" >&5
16195 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
16196   echo $ac_n "(cached) $ac_c" 1>&6
16197 else
16198   cat > conftest.$ac_ext <<EOF
16199 #line 16200 "configure"
16200 #include "confdefs.h"
16201
16202 #ifdef HAVE_SYS_TYPES_H
16203 #include <sys/types.h>
16204 #endif
16205 #ifdef HAVE_SYS_SOCKET_H
16206 #include <sys/socket.h>
16207 #endif
16208
16209 int main() {
16210 socklen_t len;
16211 ; return 0; }
16212 EOF
16213 if { (eval echo configure:16214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16214   rm -rf conftest*
16215   ol_cv_type_socklen_t=yes
16216 else
16217   echo "configure: failed program was:" >&5
16218   cat conftest.$ac_ext >&5
16219   rm -rf conftest*
16220   ol_cv_type_socklen_t=no
16221 fi
16222 rm -f conftest*
16223 fi
16224
16225 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
16226   if test $ol_cv_type_socklen_t = no; then
16227     cat >> confdefs.h <<\EOF
16228 #define socklen_t int
16229 EOF
16230
16231   fi
16232  
16233 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
16234 echo "configure:16235: checking for member st_blksize in aggregate type struct stat" >&5
16235 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
16236   echo $ac_n "(cached) $ac_c" 1>&6
16237 else
16238   cat > conftest.$ac_ext <<EOF
16239 #line 16240 "configure"
16240 #include "confdefs.h"
16241 #include <sys/types.h>
16242 #include <sys/stat.h>
16243 int main() {
16244 struct stat foo; foo.st_blksize;
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   ac_cv_c_struct_member_st_blksize=yes
16250 else
16251   echo "configure: failed program was:" >&5
16252   cat conftest.$ac_ext >&5
16253   rm -rf conftest*
16254   ac_cv_c_struct_member_st_blksize=no
16255 fi
16256 rm -f conftest*
16257 fi
16258
16259 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
16260 st_blksize="$ac_cv_c_struct_member_st_blksize"
16261 if test $ac_cv_c_struct_member_st_blksize = yes; then
16262   cat >> confdefs.h <<\EOF
16263 #define HAVE_ST_BLKSIZE 1
16264 EOF
16265
16266 fi
16267
16268 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
16269 echo "configure:16270: checking whether time.h and sys/time.h may both be included" >&5
16270 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
16271   echo $ac_n "(cached) $ac_c" 1>&6
16272 else
16273   cat > conftest.$ac_ext <<EOF
16274 #line 16275 "configure"
16275 #include "confdefs.h"
16276 #include <sys/types.h>
16277 #include <sys/time.h>
16278 #include <time.h>
16279 int main() {
16280 struct tm *tp;
16281 ; return 0; }
16282 EOF
16283 if { (eval echo configure:16284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16284   rm -rf conftest*
16285   ac_cv_header_time=yes
16286 else
16287   echo "configure: failed program was:" >&5
16288   cat conftest.$ac_ext >&5
16289   rm -rf conftest*
16290   ac_cv_header_time=no
16291 fi
16292 rm -f conftest*
16293 fi
16294
16295 echo "$ac_t""$ac_cv_header_time" 1>&6
16296 if test $ac_cv_header_time = yes; then
16297   cat >> confdefs.h <<\EOF
16298 #define TIME_WITH_SYS_TIME 1
16299 EOF
16300
16301 fi
16302
16303 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
16304 echo "configure:16305: checking whether struct tm is in sys/time.h or time.h" >&5
16305 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
16306   echo $ac_n "(cached) $ac_c" 1>&6
16307 else
16308   cat > conftest.$ac_ext <<EOF
16309 #line 16310 "configure"
16310 #include "confdefs.h"
16311 #include <sys/types.h>
16312 #include <time.h>
16313 int main() {
16314 struct tm *tp; tp->tm_sec;
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_struct_tm=time.h
16320 else
16321   echo "configure: failed program was:" >&5
16322   cat conftest.$ac_ext >&5
16323   rm -rf conftest*
16324   ac_cv_struct_tm=sys/time.h
16325 fi
16326 rm -f conftest*
16327 fi
16328
16329 echo "$ac_t""$ac_cv_struct_tm" 1>&6
16330 if test $ac_cv_struct_tm = sys/time.h; then
16331   cat >> confdefs.h <<\EOF
16332 #define TM_IN_SYS_TIME 1
16333 EOF
16334
16335 fi
16336
16337 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
16338 echo "configure:16339: checking for uid_t in sys/types.h" >&5
16339 if eval "test \"\${ac_cv_type_uid_t+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 EOF
16347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16348   egrep "uid_t" >/dev/null 2>&1; then
16349   rm -rf conftest*
16350   ac_cv_type_uid_t=yes
16351 else
16352   rm -rf conftest*
16353   ac_cv_type_uid_t=no
16354 fi
16355 rm -f conftest*
16356
16357 fi
16358
16359 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
16360 if test $ac_cv_type_uid_t = no; then
16361   cat >> confdefs.h <<\EOF
16362 #define uid_t int
16363 EOF
16364
16365   cat >> confdefs.h <<\EOF
16366 #define gid_t int
16367 EOF
16368
16369 fi
16370
16371 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
16372 echo "configure:16373: checking for sig_atomic_t" >&5
16373 if eval "test \"\${ol_cv_type_sig_atomic_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 <signal.h>
16380 int main() {
16381 sig_atomic_t atomic;
16382 ; return 0; }
16383 EOF
16384 if { (eval echo configure:16385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16385   rm -rf conftest*
16386   ol_cv_type_sig_atomic_t=yes
16387 else
16388   echo "configure: failed program was:" >&5
16389   cat conftest.$ac_ext >&5
16390   rm -rf conftest*
16391   ol_cv_type_sig_atomic_t=no
16392 fi
16393 rm -f conftest*
16394 fi
16395
16396 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
16397   if test $ol_cv_type_sig_atomic_t = no; then
16398     cat >> confdefs.h <<\EOF
16399 #define sig_atomic_t int
16400 EOF
16401
16402   fi
16403  
16404
16405
16406 # test for pw_gecos in struct passwd
16407 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
16408 echo "configure:16409: checking struct passwd for pw_gecos" >&5
16409 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
16410   echo $ac_n "(cached) $ac_c" 1>&6
16411 else
16412   
16413         cat > conftest.$ac_ext <<EOF
16414 #line 16415 "configure"
16415 #include "confdefs.h"
16416 #include <pwd.h>
16417 int main() {
16418
16419         struct passwd pwd;
16420         pwd.pw_gecos = pwd.pw_name;
16421
16422 ; return 0; }
16423 EOF
16424 if { (eval echo configure:16425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16425   rm -rf conftest*
16426   ol_cv_struct_passwd_pw_gecos=yes
16427 else
16428   echo "configure: failed program was:" >&5
16429   cat conftest.$ac_ext >&5
16430   rm -rf conftest*
16431   ol_cv_struct_passwd_pw_gecos=no
16432 fi
16433 rm -f conftest*
16434 fi
16435
16436 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
16437 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
16438         cat >> confdefs.h <<\EOF
16439 #define HAVE_PW_GECOS 1
16440 EOF
16441
16442 fi
16443
16444 # test for pw_passwd in struct passwd
16445 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
16446 echo "configure:16447: checking struct passwd for pw_passwd" >&5
16447 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
16448   echo $ac_n "(cached) $ac_c" 1>&6
16449 else
16450   
16451         cat > conftest.$ac_ext <<EOF
16452 #line 16453 "configure"
16453 #include "confdefs.h"
16454 #include <pwd.h>
16455 int main() {
16456
16457         struct passwd pwd;
16458         pwd.pw_passwd = pwd.pw_name;
16459
16460 ; return 0; }
16461 EOF
16462 if { (eval echo configure:16463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16463   rm -rf conftest*
16464   ol_cv_struct_passwd_pw_passwd=yes
16465 else
16466   echo "configure: failed program was:" >&5
16467   cat conftest.$ac_ext >&5
16468   rm -rf conftest*
16469   ol_cv_struct_passwd_pw_passwd=no
16470 fi
16471 rm -f conftest*
16472 fi
16473
16474 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
16475 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
16476         cat >> confdefs.h <<\EOF
16477 #define HAVE_PW_PASSWD 1
16478 EOF
16479
16480 fi
16481
16482
16483 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
16484 echo "configure:16485: checking if toupper() requires islower()" >&5
16485 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
16486   echo $ac_n "(cached) $ac_c" 1>&6
16487 else
16488   
16489         if test "$cross_compiling" = yes; then
16490   ol_cv_c_upper_lower=safe
16491 else
16492   cat > conftest.$ac_ext <<EOF
16493 #line 16494 "configure"
16494 #include "confdefs.h"
16495
16496 #include <ctype.h>
16497 main()
16498 {
16499         if ('C' == toupper('C'))
16500                 exit(0);
16501         else
16502                 exit(1);
16503 }
16504 EOF
16505 if { (eval echo configure:16506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16506 then
16507   ol_cv_c_upper_lower=no
16508 else
16509   echo "configure: failed program was:" >&5
16510   cat conftest.$ac_ext >&5
16511   rm -fr conftest*
16512   ol_cv_c_upper_lower=yes
16513 fi
16514 rm -fr conftest*
16515 fi
16516
16517 fi
16518
16519 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
16520 if test $ol_cv_c_upper_lower != no ; then
16521         cat >> confdefs.h <<\EOF
16522 #define C_UPPER_LOWER 1
16523 EOF
16524
16525 fi
16526
16527 echo $ac_n "checking for working const""... $ac_c" 1>&6
16528 echo "configure:16529: checking for working const" >&5
16529 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
16530   echo $ac_n "(cached) $ac_c" 1>&6
16531 else
16532   cat > conftest.$ac_ext <<EOF
16533 #line 16534 "configure"
16534 #include "confdefs.h"
16535
16536 int main() {
16537
16538 /* Ultrix mips cc rejects this.  */
16539 typedef int charset[2]; const charset x;
16540 /* SunOS 4.1.1 cc rejects this.  */
16541 char const *const *ccp;
16542 char **p;
16543 /* NEC SVR4.0.2 mips cc rejects this.  */
16544 struct point {int x, y;};
16545 static struct point const zero = {0,0};
16546 /* AIX XL C 1.02.0.0 rejects this.
16547    It does not let you subtract one const X* pointer from another in an arm
16548    of an if-expression whose if-part is not a constant expression */
16549 const char *g = "string";
16550 ccp = &g + (g ? g-g : 0);
16551 /* HPUX 7.0 cc rejects these. */
16552 ++ccp;
16553 p = (char**) ccp;
16554 ccp = (char const *const *) p;
16555 { /* SCO 3.2v4 cc rejects this.  */
16556   char *t;
16557   char const *s = 0 ? (char *) 0 : (char const *) 0;
16558
16559   *t++ = 0;
16560 }
16561 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16562   int x[] = {25, 17};
16563   const int *foo = &x[0];
16564   ++foo;
16565 }
16566 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16567   typedef const int *iptr;
16568   iptr p = 0;
16569   ++p;
16570 }
16571 { /* AIX XL C 1.02.0.0 rejects this saying
16572      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16573   struct s { int j; const int *ap[3]; };
16574   struct s *b; b->j = 5;
16575 }
16576 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16577   const int foo = 10;
16578 }
16579
16580 ; return 0; }
16581 EOF
16582 if { (eval echo configure:16583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16583   rm -rf conftest*
16584   ac_cv_c_const=yes
16585 else
16586   echo "configure: failed program was:" >&5
16587   cat conftest.$ac_ext >&5
16588   rm -rf conftest*
16589   ac_cv_c_const=no
16590 fi
16591 rm -f conftest*
16592 fi
16593
16594 echo "$ac_t""$ac_cv_c_const" 1>&6
16595 if test $ac_cv_c_const = no; then
16596   cat >> confdefs.h <<\EOF
16597 #define const 
16598 EOF
16599
16600 fi
16601
16602 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
16603 echo "configure:16604: checking if compiler understands volatile" >&5
16604 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
16605   echo $ac_n "(cached) $ac_c" 1>&6
16606 else
16607   cat > conftest.$ac_ext <<EOF
16608 #line 16609 "configure"
16609 #include "confdefs.h"
16610 int x, y, z;
16611 int main() {
16612 volatile int a; int * volatile b = x ? &y : &z;
16613       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
16614       *b = 0;
16615 ; return 0; }
16616 EOF
16617 if { (eval echo configure:16618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16618   rm -rf conftest*
16619   ol_cv_c_volatile=yes
16620 else
16621   echo "configure: failed program was:" >&5
16622   cat conftest.$ac_ext >&5
16623   rm -rf conftest*
16624   ol_cv_c_volatile=no
16625 fi
16626 rm -f conftest*
16627 fi
16628
16629 echo "$ac_t""$ol_cv_c_volatile" 1>&6
16630   if test $ol_cv_c_volatile = yes; then
16631     : 
16632   else
16633     cat >> confdefs.h <<\EOF
16634 #define volatile 
16635 EOF
16636
16637   fi
16638  
16639
16640 if test $cross_compiling = yes ; then
16641         cat >> confdefs.h <<\EOF
16642 #define CROSS_COMPILING 1
16643 EOF
16644
16645 else
16646         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
16647 echo "configure:16648: checking whether byte ordering is bigendian" >&5
16648 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
16649   echo $ac_n "(cached) $ac_c" 1>&6
16650 else
16651   ac_cv_c_bigendian=unknown
16652 # See if sys/param.h defines the BYTE_ORDER macro.
16653 cat > conftest.$ac_ext <<EOF
16654 #line 16655 "configure"
16655 #include "confdefs.h"
16656 #include <sys/types.h>
16657 #include <sys/param.h>
16658 int main() {
16659
16660 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16661  bogus endian macros
16662 #endif
16663 ; return 0; }
16664 EOF
16665 if { (eval echo configure:16666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16666   rm -rf conftest*
16667   # It does; now see whether it defined to BIG_ENDIAN or not.
16668 cat > conftest.$ac_ext <<EOF
16669 #line 16670 "configure"
16670 #include "confdefs.h"
16671 #include <sys/types.h>
16672 #include <sys/param.h>
16673 int main() {
16674
16675 #if BYTE_ORDER != BIG_ENDIAN
16676  not big endian
16677 #endif
16678 ; return 0; }
16679 EOF
16680 if { (eval echo configure:16681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16681   rm -rf conftest*
16682   ac_cv_c_bigendian=yes
16683 else
16684   echo "configure: failed program was:" >&5
16685   cat conftest.$ac_ext >&5
16686   rm -rf conftest*
16687   ac_cv_c_bigendian=no
16688 fi
16689 rm -f conftest*
16690 else
16691   echo "configure: failed program was:" >&5
16692   cat conftest.$ac_ext >&5
16693 fi
16694 rm -f conftest*
16695 if test $ac_cv_c_bigendian = unknown; then
16696 if test "$cross_compiling" = yes; then
16697     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
16698 else
16699   cat > conftest.$ac_ext <<EOF
16700 #line 16701 "configure"
16701 #include "confdefs.h"
16702 main () {
16703   /* Are we little or big endian?  From Harbison&Steele.  */
16704   union
16705   {
16706     long l;
16707     char c[sizeof (long)];
16708   } u;
16709   u.l = 1;
16710   exit (u.c[sizeof (long) - 1] == 1);
16711 }
16712 EOF
16713 if { (eval echo configure:16714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16714 then
16715   ac_cv_c_bigendian=no
16716 else
16717   echo "configure: failed program was:" >&5
16718   cat conftest.$ac_ext >&5
16719   rm -fr conftest*
16720   ac_cv_c_bigendian=yes
16721 fi
16722 rm -fr conftest*
16723 fi
16724
16725 fi
16726 fi
16727
16728 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
16729 if test $ac_cv_c_bigendian = yes; then
16730   cat >> confdefs.h <<\EOF
16731 #define WORDS_BIGENDIAN 1
16732 EOF
16733
16734 fi
16735
16736 fi
16737
16738 echo $ac_n "checking size of short""... $ac_c" 1>&6
16739 echo "configure:16740: checking size of short" >&5 
16740 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
16741   echo $ac_n "(cached) $ac_c" 1>&6
16742 else
16743   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16744   cat > conftest.$ac_ext <<EOF
16745 #line 16746 "configure"
16746 #include "confdefs.h"
16747 #include "confdefs.h" 
16748 #include <sys/types.h> 
16749  
16750
16751 int main() {
16752 switch (0) case 0: case (sizeof (short) == $ac_size):;
16753 ; return 0; }
16754 EOF
16755 if { (eval echo configure:16756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16756   rm -rf conftest*
16757   ac_cv_sizeof_short=$ac_size
16758 else
16759   echo "configure: failed program was:" >&5
16760   cat conftest.$ac_ext >&5
16761 fi
16762 rm -f conftest* 
16763   if test x$ac_cv_sizeof_short != x ; then break; fi 
16764 done 
16765
16766 fi
16767  
16768 if test x$ac_cv_sizeof_short = x ; then 
16769   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
16770 fi 
16771 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
16772 cat >> confdefs.h <<EOF
16773 #define SIZEOF_SHORT $ac_cv_sizeof_short
16774 EOF
16775  
16776  
16777 echo $ac_n "checking size of int""... $ac_c" 1>&6
16778 echo "configure:16779: checking size of int" >&5 
16779 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
16780   echo $ac_n "(cached) $ac_c" 1>&6
16781 else
16782   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16783   cat > conftest.$ac_ext <<EOF
16784 #line 16785 "configure"
16785 #include "confdefs.h"
16786 #include "confdefs.h" 
16787 #include <sys/types.h> 
16788  
16789
16790 int main() {
16791 switch (0) case 0: case (sizeof (int) == $ac_size):;
16792 ; return 0; }
16793 EOF
16794 if { (eval echo configure:16795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16795   rm -rf conftest*
16796   ac_cv_sizeof_int=$ac_size
16797 else
16798   echo "configure: failed program was:" >&5
16799   cat conftest.$ac_ext >&5
16800 fi
16801 rm -f conftest* 
16802   if test x$ac_cv_sizeof_int != x ; then break; fi 
16803 done 
16804
16805 fi
16806  
16807 if test x$ac_cv_sizeof_int = x ; then 
16808   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
16809 fi 
16810 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
16811 cat >> confdefs.h <<EOF
16812 #define SIZEOF_INT $ac_cv_sizeof_int
16813 EOF
16814  
16815  
16816 echo $ac_n "checking size of long""... $ac_c" 1>&6
16817 echo "configure:16818: checking size of long" >&5 
16818 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
16819   echo $ac_n "(cached) $ac_c" 1>&6
16820 else
16821   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
16822   cat > conftest.$ac_ext <<EOF
16823 #line 16824 "configure"
16824 #include "confdefs.h"
16825 #include "confdefs.h" 
16826 #include <sys/types.h> 
16827  
16828
16829 int main() {
16830 switch (0) case 0: case (sizeof (long) == $ac_size):;
16831 ; return 0; }
16832 EOF
16833 if { (eval echo configure:16834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16834   rm -rf conftest*
16835   ac_cv_sizeof_long=$ac_size
16836 else
16837   echo "configure: failed program was:" >&5
16838   cat conftest.$ac_ext >&5
16839 fi
16840 rm -f conftest* 
16841   if test x$ac_cv_sizeof_long != x ; then break; fi 
16842 done 
16843
16844 fi
16845  
16846 if test x$ac_cv_sizeof_long = x ; then 
16847   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
16848 fi 
16849 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
16850 cat >> confdefs.h <<EOF
16851 #define SIZEOF_LONG $ac_cv_sizeof_long
16852 EOF
16853  
16854
16855
16856 if test "$ac_cv_sizeof_int" -lt 4 ; then
16857         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
16858
16859         cat >> confdefs.h <<\EOF
16860 #define LBER_INT_T long
16861 EOF
16862
16863 else
16864         cat >> confdefs.h <<\EOF
16865 #define LBER_INT_T int
16866 EOF
16867
16868 fi
16869
16870 cat >> confdefs.h <<\EOF
16871 #define LBER_LEN_T long
16872 EOF
16873
16874 cat >> confdefs.h <<\EOF
16875 #define LBER_SOCKET_T int
16876 EOF
16877
16878 cat >> confdefs.h <<\EOF
16879 #define LBER_TAG_T long
16880 EOF
16881
16882
16883 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
16884 echo "configure:16885: checking for 8-bit clean memcmp" >&5
16885 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
16886   echo $ac_n "(cached) $ac_c" 1>&6
16887 else
16888   if test "$cross_compiling" = yes; then
16889   ac_cv_func_memcmp_clean=no
16890 else
16891   cat > conftest.$ac_ext <<EOF
16892 #line 16893 "configure"
16893 #include "confdefs.h"
16894
16895 main()
16896 {
16897   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
16898   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
16899 }
16900
16901 EOF
16902 if { (eval echo configure:16903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16903 then
16904   ac_cv_func_memcmp_clean=yes
16905 else
16906   echo "configure: failed program was:" >&5
16907   cat conftest.$ac_ext >&5
16908   rm -fr conftest*
16909   ac_cv_func_memcmp_clean=no
16910 fi
16911 rm -fr conftest*
16912 fi
16913
16914 fi
16915
16916 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
16917 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
16918
16919 echo $ac_n "checking for strftime""... $ac_c" 1>&6
16920 echo "configure:16921: checking for strftime" >&5
16921 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
16922   echo $ac_n "(cached) $ac_c" 1>&6
16923 else
16924   cat > conftest.$ac_ext <<EOF
16925 #line 16926 "configure"
16926 #include "confdefs.h"
16927 /* System header to define __stub macros and hopefully few prototypes,
16928     which can conflict with char strftime(); below.  */
16929 #include <assert.h>
16930 /* Override any gcc2 internal prototype to avoid an error.  */
16931 /* We use char because int might match the return type of a gcc2
16932     builtin and then its argument prototype would still apply.  */
16933 char strftime();
16934 char (*f)();
16935
16936 int main() {
16937
16938 /* The GNU C library defines this for functions which it implements
16939     to always fail with ENOSYS.  Some functions are actually named
16940     something starting with __ and the normal name is an alias.  */
16941 #if defined (__stub_strftime) || defined (__stub___strftime)
16942 choke me
16943 #else
16944 f = strftime;
16945 #endif
16946
16947 ; return 0; }
16948 EOF
16949 if { (eval echo configure:16950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16950   rm -rf conftest*
16951   eval "ac_cv_func_strftime=yes"
16952 else
16953   echo "configure: failed program was:" >&5
16954   cat conftest.$ac_ext >&5
16955   rm -rf conftest*
16956   eval "ac_cv_func_strftime=no"
16957 fi
16958 rm -f conftest*
16959 fi
16960
16961 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
16962   echo "$ac_t""yes" 1>&6
16963   cat >> confdefs.h <<\EOF
16964 #define HAVE_STRFTIME 1
16965 EOF
16966
16967 else
16968   echo "$ac_t""no" 1>&6
16969 # strftime is in -lintl on SCO UNIX.
16970 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
16971 echo "configure:16972: checking for strftime in -lintl" >&5
16972 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
16973 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16974   echo $ac_n "(cached) $ac_c" 1>&6
16975 else
16976   ac_save_LIBS="$LIBS"
16977 LIBS="-lintl  $LIBS"
16978 cat > conftest.$ac_ext <<EOF
16979 #line 16980 "configure"
16980 #include "confdefs.h"
16981 /* Override any gcc2 internal prototype to avoid an error.  */
16982 /* We use char because int might match the return type of a gcc2
16983     builtin and then its argument prototype would still apply.  */
16984 char strftime();
16985
16986 int main() {
16987 strftime()
16988 ; return 0; }
16989 EOF
16990 if { (eval echo configure:16991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16991   rm -rf conftest*
16992   eval "ac_cv_lib_$ac_lib_var=yes"
16993 else
16994   echo "configure: failed program was:" >&5
16995   cat conftest.$ac_ext >&5
16996   rm -rf conftest*
16997   eval "ac_cv_lib_$ac_lib_var=no"
16998 fi
16999 rm -f conftest*
17000 LIBS="$ac_save_LIBS"
17001
17002 fi
17003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
17004   echo "$ac_t""yes" 1>&6
17005   cat >> confdefs.h <<\EOF
17006 #define HAVE_STRFTIME 1
17007 EOF
17008
17009 LIBS="-lintl $LIBS"
17010 else
17011   echo "$ac_t""no" 1>&6
17012 fi
17013
17014 fi
17015
17016
17017 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
17018 echo "configure:17019: checking for inet_aton()" >&5
17019 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
17020   echo $ac_n "(cached) $ac_c" 1>&6
17021 else
17022   cat > conftest.$ac_ext <<EOF
17023 #line 17024 "configure"
17024 #include "confdefs.h"
17025
17026 #ifdef HAVE_SYS_TYPES_H
17027 #       include <sys/types.h>
17028 #endif
17029 #ifdef HAVE_SYS_SOCKET_H
17030 #       include <sys/socket.h>
17031 #       ifdef HAVE_SYS_SELECT_H
17032 #               include <sys/select.h>
17033 #       endif
17034 #       include <netinet/in.h>
17035 #       ifdef HAVE_ARPA_INET_H
17036 #               include <arpa/inet.h>
17037 #       endif
17038 #endif
17039
17040 int main() {
17041 struct in_addr in;
17042 int rc = inet_aton( "255.255.255.255", &in );
17043 ; return 0; }
17044 EOF
17045 if { (eval echo configure:17046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17046   rm -rf conftest*
17047   ol_cv_func_inet_aton=yes
17048 else
17049   echo "configure: failed program was:" >&5
17050   cat conftest.$ac_ext >&5
17051   rm -rf conftest*
17052   ol_cv_func_inet_aton=no
17053 fi
17054 rm -f conftest*
17055 fi
17056
17057 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
17058   if test $ol_cv_func_inet_aton != no; then
17059     cat >> confdefs.h <<\EOF
17060 #define HAVE_INET_ATON 1
17061 EOF
17062
17063   fi
17064  
17065
17066 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
17067 echo "configure:17068: checking for _spawnlp" >&5
17068 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
17069   echo $ac_n "(cached) $ac_c" 1>&6
17070 else
17071   cat > conftest.$ac_ext <<EOF
17072 #line 17073 "configure"
17073 #include "confdefs.h"
17074 /* System header to define __stub macros and hopefully few prototypes,
17075     which can conflict with char _spawnlp(); below.  */
17076 #include <assert.h>
17077 /* Override any gcc2 internal prototype to avoid an error.  */
17078 /* We use char because int might match the return type of a gcc2
17079     builtin and then its argument prototype would still apply.  */
17080 char _spawnlp();
17081 char (*f)();
17082
17083 int main() {
17084
17085 /* The GNU C library defines this for functions which it implements
17086     to always fail with ENOSYS.  Some functions are actually named
17087     something starting with __ and the normal name is an alias.  */
17088 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
17089 choke me
17090 #else
17091 f = _spawnlp;
17092 #endif
17093
17094 ; return 0; }
17095 EOF
17096 if { (eval echo configure:17097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17097   rm -rf conftest*
17098   eval "ac_cv_func__spawnlp=yes"
17099 else
17100   echo "configure: failed program was:" >&5
17101   cat conftest.$ac_ext >&5
17102   rm -rf conftest*
17103   eval "ac_cv_func__spawnlp=no"
17104 fi
17105 rm -f conftest*
17106 fi
17107
17108 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
17109   echo "$ac_t""yes" 1>&6
17110   cat >> confdefs.h <<\EOF
17111 #define HAVE_SPAWNLP 1
17112 EOF
17113
17114 else
17115   echo "$ac_t""no" 1>&6
17116 fi
17117
17118
17119 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
17120 echo "configure:17121: checking for _snprintf" >&5
17121 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
17122   echo $ac_n "(cached) $ac_c" 1>&6
17123 else
17124   cat > conftest.$ac_ext <<EOF
17125 #line 17126 "configure"
17126 #include "confdefs.h"
17127 /* System header to define __stub macros and hopefully few prototypes,
17128     which can conflict with char _snprintf(); below.  */
17129 #include <assert.h>
17130 /* Override any gcc2 internal prototype to avoid an error.  */
17131 /* We use char because int might match the return type of a gcc2
17132     builtin and then its argument prototype would still apply.  */
17133 char _snprintf();
17134 char (*f)();
17135
17136 int main() {
17137
17138 /* The GNU C library defines this for functions which it implements
17139     to always fail with ENOSYS.  Some functions are actually named
17140     something starting with __ and the normal name is an alias.  */
17141 #if defined (__stub__snprintf) || defined (__stub____snprintf)
17142 choke me
17143 #else
17144 f = _snprintf;
17145 #endif
17146
17147 ; return 0; }
17148 EOF
17149 if { (eval echo configure:17150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17150   rm -rf conftest*
17151   eval "ac_cv_func__snprintf=yes"
17152 else
17153   echo "configure: failed program was:" >&5
17154   cat conftest.$ac_ext >&5
17155   rm -rf conftest*
17156   eval "ac_cv_func__snprintf=no"
17157 fi
17158 rm -f conftest*
17159 fi
17160
17161 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
17162   echo "$ac_t""yes" 1>&6
17163   ac_cv_func_snprintf=yes
17164         cat >> confdefs.h <<\EOF
17165 #define snprintf _snprintf
17166 EOF
17167
17168
17169 else
17170   echo "$ac_t""no" 1>&6
17171 fi
17172
17173
17174 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
17175 echo "configure:17176: checking for _vsnprintf" >&5
17176 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
17177   echo $ac_n "(cached) $ac_c" 1>&6
17178 else
17179   cat > conftest.$ac_ext <<EOF
17180 #line 17181 "configure"
17181 #include "confdefs.h"
17182 /* System header to define __stub macros and hopefully few prototypes,
17183     which can conflict with char _vsnprintf(); below.  */
17184 #include <assert.h>
17185 /* Override any gcc2 internal prototype to avoid an error.  */
17186 /* We use char because int might match the return type of a gcc2
17187     builtin and then its argument prototype would still apply.  */
17188 char _vsnprintf();
17189 char (*f)();
17190
17191 int main() {
17192
17193 /* The GNU C library defines this for functions which it implements
17194     to always fail with ENOSYS.  Some functions are actually named
17195     something starting with __ and the normal name is an alias.  */
17196 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
17197 choke me
17198 #else
17199 f = _vsnprintf;
17200 #endif
17201
17202 ; return 0; }
17203 EOF
17204 if { (eval echo configure:17205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17205   rm -rf conftest*
17206   eval "ac_cv_func__vsnprintf=yes"
17207 else
17208   echo "configure: failed program was:" >&5
17209   cat conftest.$ac_ext >&5
17210   rm -rf conftest*
17211   eval "ac_cv_func__vsnprintf=no"
17212 fi
17213 rm -f conftest*
17214 fi
17215
17216 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
17217   echo "$ac_t""yes" 1>&6
17218   ac_cv_func_vsnprintf=yes
17219         cat >> confdefs.h <<\EOF
17220 #define vsnprintf _vsnprintf
17221 EOF
17222
17223
17224 else
17225   echo "$ac_t""no" 1>&6
17226 fi
17227
17228
17229 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
17230 echo "configure:17231: checking for vprintf" >&5
17231 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
17232   echo $ac_n "(cached) $ac_c" 1>&6
17233 else
17234   cat > conftest.$ac_ext <<EOF
17235 #line 17236 "configure"
17236 #include "confdefs.h"
17237 /* System header to define __stub macros and hopefully few prototypes,
17238     which can conflict with char vprintf(); below.  */
17239 #include <assert.h>
17240 /* Override any gcc2 internal prototype to avoid an error.  */
17241 /* We use char because int might match the return type of a gcc2
17242     builtin and then its argument prototype would still apply.  */
17243 char vprintf();
17244 char (*f)();
17245
17246 int main() {
17247
17248 /* The GNU C library defines this for functions which it implements
17249     to always fail with ENOSYS.  Some functions are actually named
17250     something starting with __ and the normal name is an alias.  */
17251 #if defined (__stub_vprintf) || defined (__stub___vprintf)
17252 choke me
17253 #else
17254 f = vprintf;
17255 #endif
17256
17257 ; return 0; }
17258 EOF
17259 if { (eval echo configure:17260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17260   rm -rf conftest*
17261   eval "ac_cv_func_vprintf=yes"
17262 else
17263   echo "configure: failed program was:" >&5
17264   cat conftest.$ac_ext >&5
17265   rm -rf conftest*
17266   eval "ac_cv_func_vprintf=no"
17267 fi
17268 rm -f conftest*
17269 fi
17270
17271 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
17272   echo "$ac_t""yes" 1>&6
17273   cat >> confdefs.h <<\EOF
17274 #define HAVE_VPRINTF 1
17275 EOF
17276
17277 else
17278   echo "$ac_t""no" 1>&6
17279 fi
17280
17281 if test "$ac_cv_func_vprintf" != yes; then
17282 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
17283 echo "configure:17284: checking for _doprnt" >&5
17284 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
17285   echo $ac_n "(cached) $ac_c" 1>&6
17286 else
17287   cat > conftest.$ac_ext <<EOF
17288 #line 17289 "configure"
17289 #include "confdefs.h"
17290 /* System header to define __stub macros and hopefully few prototypes,
17291     which can conflict with char _doprnt(); below.  */
17292 #include <assert.h>
17293 /* Override any gcc2 internal prototype to avoid an error.  */
17294 /* We use char because int might match the return type of a gcc2
17295     builtin and then its argument prototype would still apply.  */
17296 char _doprnt();
17297 char (*f)();
17298
17299 int main() {
17300
17301 /* The GNU C library defines this for functions which it implements
17302     to always fail with ENOSYS.  Some functions are actually named
17303     something starting with __ and the normal name is an alias.  */
17304 #if defined (__stub__doprnt) || defined (__stub____doprnt)
17305 choke me
17306 #else
17307 f = _doprnt;
17308 #endif
17309
17310 ; return 0; }
17311 EOF
17312 if { (eval echo configure:17313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17313   rm -rf conftest*
17314   eval "ac_cv_func__doprnt=yes"
17315 else
17316   echo "configure: failed program was:" >&5
17317   cat conftest.$ac_ext >&5
17318   rm -rf conftest*
17319   eval "ac_cv_func__doprnt=no"
17320 fi
17321 rm -f conftest*
17322 fi
17323
17324 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
17325   echo "$ac_t""yes" 1>&6
17326   cat >> confdefs.h <<\EOF
17327 #define HAVE_DOPRNT 1
17328 EOF
17329
17330 else
17331   echo "$ac_t""no" 1>&6
17332 fi
17333
17334 fi
17335
17336
17337 if test $ac_cv_func_vprintf = yes ; then
17338                 for ac_func in vsnprintf vsprintf
17339 do
17340 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17341 echo "configure:17342: checking for $ac_func" >&5
17342 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17343   echo $ac_n "(cached) $ac_c" 1>&6
17344 else
17345   cat > conftest.$ac_ext <<EOF
17346 #line 17347 "configure"
17347 #include "confdefs.h"
17348 /* System header to define __stub macros and hopefully few prototypes,
17349     which can conflict with char $ac_func(); below.  */
17350 #include <assert.h>
17351 /* Override any gcc2 internal prototype to avoid an error.  */
17352 /* We use char because int might match the return type of a gcc2
17353     builtin and then its argument prototype would still apply.  */
17354 char $ac_func();
17355 char (*f)();
17356
17357 int main() {
17358
17359 /* The GNU C library defines this for functions which it implements
17360     to always fail with ENOSYS.  Some functions are actually named
17361     something starting with __ and the normal name is an alias.  */
17362 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17363 choke me
17364 #else
17365 f = $ac_func;
17366 #endif
17367
17368 ; return 0; }
17369 EOF
17370 if { (eval echo configure:17371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17371   rm -rf conftest*
17372   eval "ac_cv_func_$ac_func=yes"
17373 else
17374   echo "configure: failed program was:" >&5
17375   cat conftest.$ac_ext >&5
17376   rm -rf conftest*
17377   eval "ac_cv_func_$ac_func=no"
17378 fi
17379 rm -f conftest*
17380 fi
17381
17382 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17383   echo "$ac_t""yes" 1>&6
17384     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17385   cat >> confdefs.h <<EOF
17386 #define $ac_tr_func 1
17387 EOF
17388  
17389 else
17390   echo "$ac_t""no" 1>&6
17391 fi
17392 done
17393
17394 fi
17395
17396 for ac_func in \
17397         bcopy                   \
17398         closesocket             \
17399         chroot                  \
17400         endgrent                \
17401         endpwent                \
17402         fcntl                   \
17403         flock                   \
17404         getdtablesize   \
17405         getgrgid                \
17406         gethostname             \
17407         getpass                 \
17408         getpassphrase   \
17409         getpwuid                \
17410         getpwnam                \
17411         getspnam                \
17412         gettimeofday    \
17413         initgroups              \
17414         lockf                   \
17415         memcpy                  \
17416         memmove                 \
17417         pipe                    \
17418         read                    \
17419         recv                    \
17420         recvfrom                \
17421         setpwfile               \
17422         setgid                  \
17423         setegid                 \
17424         setsid                  \
17425         setuid                  \
17426         seteuid                 \
17427         sigaction               \
17428         signal                  \
17429         sigset                  \
17430         strdup                  \
17431         strerror                \
17432         strpbrk                 \
17433         strrchr                 \
17434         strsep                  \
17435         strstr                  \
17436         strtol                  \
17437         strtoul                 \
17438         strspn                  \
17439         sysconf                 \
17440         usleep                  \
17441         waitpid                 \
17442         wait4                   \
17443         write                   \
17444         send                    \
17445         sendto                  \
17446
17447 do
17448 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17449 echo "configure:17450: checking for $ac_func" >&5
17450 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17451   echo $ac_n "(cached) $ac_c" 1>&6
17452 else
17453   cat > conftest.$ac_ext <<EOF
17454 #line 17455 "configure"
17455 #include "confdefs.h"
17456 /* System header to define __stub macros and hopefully few prototypes,
17457     which can conflict with char $ac_func(); below.  */
17458 #include <assert.h>
17459 /* Override any gcc2 internal prototype to avoid an error.  */
17460 /* We use char because int might match the return type of a gcc2
17461     builtin and then its argument prototype would still apply.  */
17462 char $ac_func();
17463 char (*f)();
17464
17465 int main() {
17466
17467 /* The GNU C library defines this for functions which it implements
17468     to always fail with ENOSYS.  Some functions are actually named
17469     something starting with __ and the normal name is an alias.  */
17470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17471 choke me
17472 #else
17473 f = $ac_func;
17474 #endif
17475
17476 ; return 0; }
17477 EOF
17478 if { (eval echo configure:17479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17479   rm -rf conftest*
17480   eval "ac_cv_func_$ac_func=yes"
17481 else
17482   echo "configure: failed program was:" >&5
17483   cat conftest.$ac_ext >&5
17484   rm -rf conftest*
17485   eval "ac_cv_func_$ac_func=no"
17486 fi
17487 rm -f conftest*
17488 fi
17489
17490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17491   echo "$ac_t""yes" 1>&6
17492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17493   cat >> confdefs.h <<EOF
17494 #define $ac_tr_func 1
17495 EOF
17496  
17497 else
17498   echo "$ac_t""no" 1>&6
17499 fi
17500 done
17501
17502
17503 for ac_func in getopt
17504 do
17505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
17506 echo "configure:17507: checking for $ac_func" >&5
17507 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
17508   echo $ac_n "(cached) $ac_c" 1>&6
17509 else
17510   cat > conftest.$ac_ext <<EOF
17511 #line 17512 "configure"
17512 #include "confdefs.h"
17513 /* System header to define __stub macros and hopefully few prototypes,
17514     which can conflict with char $ac_func(); below.  */
17515 #include <assert.h>
17516 /* Override any gcc2 internal prototype to avoid an error.  */
17517 /* We use char because int might match the return type of a gcc2
17518     builtin and then its argument prototype would still apply.  */
17519 char $ac_func();
17520 char (*f)();
17521
17522 int main() {
17523
17524 /* The GNU C library defines this for functions which it implements
17525     to always fail with ENOSYS.  Some functions are actually named
17526     something starting with __ and the normal name is an alias.  */
17527 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17528 choke me
17529 #else
17530 f = $ac_func;
17531 #endif
17532
17533 ; return 0; }
17534 EOF
17535 if { (eval echo configure:17536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17536   rm -rf conftest*
17537   eval "ac_cv_func_$ac_func=yes"
17538 else
17539   echo "configure: failed program was:" >&5
17540   cat conftest.$ac_ext >&5
17541   rm -rf conftest*
17542   eval "ac_cv_func_$ac_func=no"
17543 fi
17544 rm -f conftest*
17545 fi
17546
17547 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
17548   echo "$ac_t""yes" 1>&6
17549     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
17550   cat >> confdefs.h <<EOF
17551 #define $ac_tr_func 1
17552 EOF
17553  
17554 else
17555   echo "$ac_t""no" 1>&6
17556 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
17557 fi
17558 done
17559
17560
17561
17562 if test "$ac_cv_func_getopt" != yes; then
17563     LIBSRCS="$LIBSRCS getopt.c"
17564 fi
17565
17566 # Check Configuration
17567 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
17568 echo "configure:17569: checking declaration of sys_errlist" >&5
17569 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
17570   echo $ac_n "(cached) $ac_c" 1>&6
17571 else
17572   
17573         cat > conftest.$ac_ext <<EOF
17574 #line 17575 "configure"
17575 #include "confdefs.h"
17576
17577 #include <stdio.h>
17578 #include <sys/types.h>
17579 #include <errno.h>
17580 #ifdef WINNT
17581 #include <stdlib.h>
17582 #endif 
17583 int main() {
17584 char *c = (char *) *sys_errlist
17585 ; return 0; }
17586 EOF
17587 if { (eval echo configure:17588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17588   rm -rf conftest*
17589   ol_cv_dcl_sys_errlist=yes
17590         ol_cv_have_sys_errlist=yes
17591 else
17592   echo "configure: failed program was:" >&5
17593   cat conftest.$ac_ext >&5
17594   rm -rf conftest*
17595   ol_cv_dcl_sys_errlist=no
17596 fi
17597 rm -f conftest*
17598 fi
17599
17600 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
17601 #
17602 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
17603 if test $ol_cv_dcl_sys_errlist = no ; then
17604         cat >> confdefs.h <<\EOF
17605 #define DECL_SYS_ERRLIST 1
17606 EOF
17607
17608
17609         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
17610 echo "configure:17611: checking existence of sys_errlist" >&5
17611 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
17612   echo $ac_n "(cached) $ac_c" 1>&6
17613 else
17614   
17615                 cat > conftest.$ac_ext <<EOF
17616 #line 17617 "configure"
17617 #include "confdefs.h"
17618 #include <errno.h>
17619 int main() {
17620 char *c = (char *) *sys_errlist
17621 ; return 0; }
17622 EOF
17623 if { (eval echo configure:17624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17624   rm -rf conftest*
17625   ol_cv_have_sys_errlist=yes
17626 else
17627   echo "configure: failed program was:" >&5
17628   cat conftest.$ac_ext >&5
17629   rm -rf conftest*
17630   ol_cv_have_sys_errlist=no
17631 fi
17632 rm -f conftest*
17633 fi
17634
17635 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
17636 fi
17637 if test $ol_cv_have_sys_errlist = yes ; then
17638         cat >> confdefs.h <<\EOF
17639 #define HAVE_SYS_ERRLIST 1
17640 EOF
17641
17642 fi
17643
17644
17645
17646 if test "$ol_enable_debug" != no ; then
17647         cat >> confdefs.h <<\EOF
17648 #define LDAP_DEBUG 1
17649 EOF
17650
17651 fi
17652 if test "$ol_enable_syslog" = yes ; then
17653         cat >> confdefs.h <<\EOF
17654 #define LDAP_SYSLOG 1
17655 EOF
17656
17657 fi
17658 if test "$ol_enable_cache" = no ; then
17659         cat >> confdefs.h <<\EOF
17660 #define LDAP_NOCACHE 1
17661 EOF
17662
17663 fi
17664 if test "$ol_link_kbind" != no ; then
17665         cat >> confdefs.h <<\EOF
17666 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
17667 EOF
17668
17669 fi
17670 if test "$ol_enable_proctitle" != no ; then
17671         cat >> confdefs.h <<\EOF
17672 #define LDAP_PROCTITLE 1
17673 EOF
17674
17675 fi
17676 if test "$ol_enable_referrals" != no ; then
17677         cat >> confdefs.h <<\EOF
17678 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
17679 EOF
17680
17681 fi
17682 if test "$ol_enable_local" != no; then
17683         cat >> confdefs.h <<\EOF
17684 #define LDAP_PF_LOCAL 1
17685 EOF
17686
17687 fi
17688 if test "$ol_link_ipv6" != no; then
17689         cat >> confdefs.h <<\EOF
17690 #define LDAP_PF_INET6 1
17691 EOF
17692
17693 fi
17694 if test "$ol_enable_cleartext" != no ; then
17695         cat >> confdefs.h <<\EOF
17696 #define SLAPD_CLEARTEXT 1
17697 EOF
17698
17699 fi
17700 if test "$ol_enable_crypt" != no ; then
17701         cat >> confdefs.h <<\EOF
17702 #define SLAPD_CRYPT 1
17703 EOF
17704
17705 fi
17706 if test "$ol_link_kpasswd" != no ; then
17707         cat >> confdefs.h <<\EOF
17708 #define SLAPD_KPASSWD 1
17709 EOF
17710
17711 fi
17712 if test "$ol_link_spasswd" != no ; then
17713         cat >> confdefs.h <<\EOF
17714 #define SLAPD_SPASSWD 1
17715 EOF
17716
17717 fi
17718 if test "$ol_enable_phonetic" != no ; then
17719         cat >> confdefs.h <<\EOF
17720 #define SLAPD_PHONETIC 1
17721 EOF
17722
17723 fi
17724 if test "$ol_enable_rlookups" != no ; then
17725         cat >> confdefs.h <<\EOF
17726 #define SLAPD_RLOOKUPS 1
17727 EOF
17728
17729 fi
17730 if test "$ol_enable_aci" != no ; then
17731         cat >> confdefs.h <<\EOF
17732 #define SLAPD_ACI_ENABLED 1
17733 EOF
17734
17735 fi
17736
17737 if test "$ol_link_modules" != no ; then
17738         cat >> confdefs.h <<\EOF
17739 #define SLAPD_MODULES 1
17740 EOF
17741
17742         BUILD_SLAPD=yes
17743         SLAPD_MODULES_LDFLAGS="-dlopen self"
17744 fi
17745
17746 if test "$ol_enable_bdb" != no ; then
17747         cat >> confdefs.h <<\EOF
17748 #define SLAPD_BDB 1
17749 EOF
17750
17751         BUILD_SLAPD=yes
17752         BUILD_BDB=yes
17753         if test "$ol_with_bdb_module" != static ; then
17754                 cat >> confdefs.h <<\EOF
17755 #define SLAPD_BDB_DYNAMIC 1
17756 EOF
17757
17758                 BUILD_BDB=mod
17759                 BUILD_BDB_DYNAMIC=shared
17760                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
17761         fi
17762 fi
17763
17764 if test "$ol_link_dnssrv" != no ; then
17765         cat >> confdefs.h <<\EOF
17766 #define SLAPD_DNSSRV 1
17767 EOF
17768
17769         BUILD_SLAPD=yes
17770         BUILD_DNSSRV=yes
17771         if test "$ol_with_dnssrv_module" != static ; then
17772                 cat >> confdefs.h <<\EOF
17773 #define SLAPD_DNSSRV_DYNAMIC 1
17774 EOF
17775
17776                 BUILD_DNSSRV=mod
17777                 BUILD_DNSSRV_DYNAMIC=shared
17778                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
17779         fi
17780 fi
17781
17782 if test "$ol_enable_ldap" != no ; then
17783         cat >> confdefs.h <<\EOF
17784 #define SLAPD_LDAP 1
17785 EOF
17786
17787         BUILD_SLAPD=yes
17788         BUILD_LDAP=yes
17789         if test "$ol_with_ldap_module" != static ; then
17790                 cat >> confdefs.h <<\EOF
17791 #define SLAPD_LDAP_DYNAMIC 1
17792 EOF
17793
17794                 BUILD_LDAP=mod
17795                 BUILD_LDAP_DYNAMIC=shared
17796                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
17797         fi
17798 fi
17799
17800 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
17801         cat >> confdefs.h <<\EOF
17802 #define SLAPD_LDBM 1
17803 EOF
17804
17805         BUILD_SLAPD=yes
17806         BUILD_LDBM=yes
17807         LDBM_LIB="-lldbm"
17808         if test "$ol_with_ldbm_module" != static ; then
17809                 cat >> confdefs.h <<\EOF
17810 #define SLAPD_LDBM_DYNAMIC 1
17811 EOF
17812
17813                 BUILD_LDBM=mod
17814                 BUILD_LDBM_DYNAMIC=shared
17815                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
17816         fi
17817 fi
17818
17819 if test "$ol_enable_meta" != no ; then
17820         if test "$ol_enable_ldap" = no ; then
17821                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
17822         fi
17823         if test "$ol_enable_rewrite" = no ; then
17824                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
17825         fi
17826         cat >> confdefs.h <<\EOF
17827 #define SLAPD_META 1
17828 EOF
17829
17830         BUILD_SLAPD=yes
17831         BUILD_META=yes
17832         if test "$ol_with_meta_module" != static ; then
17833                 cat >> confdefs.h <<\EOF
17834 #define SLAPD_META_DYNAMIC 1
17835 EOF
17836
17837                 BUILD_META=mod
17838                 BUILD_META_DYNAMIC=shared
17839                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
17840         fi
17841 fi
17842
17843 if test "$ol_enable_monitor" != no ; then
17844         cat >> confdefs.h <<\EOF
17845 #define SLAPD_MONITOR 1
17846 EOF
17847
17848         BUILD_SLAPD=yes
17849         BUILD_MONITOR=yes
17850         if test "$ol_with_monitor_module" != static ; then
17851                 cat >> confdefs.h <<\EOF
17852 #define SLAPD_MONITOR_DYNAMIC 1
17853 EOF
17854
17855                 BUILD_MONITOR=mod
17856                 BUILD_MONITOR_DYNAMIC=shared
17857                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
17858         fi
17859 fi
17860
17861 if test "$ol_enable_passwd" != no ; then
17862         cat >> confdefs.h <<\EOF
17863 #define SLAPD_PASSWD 1
17864 EOF
17865
17866         BUILD_SLAPD=yes
17867         BUILD_PASSWD=yes
17868         if test "$ol_with_passwd_module" != static ; then
17869                 cat >> confdefs.h <<\EOF
17870 #define SLAPD_PASSWD_DYNAMIC 1
17871 EOF
17872
17873                 BUILD_PASSWD=mod
17874                 BUILD_PASSWD_DYNAMIC=shared
17875                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
17876         fi
17877 fi
17878
17879 if test "$ol_link_perl" != no ; then
17880         cat >> confdefs.h <<\EOF
17881 #define SLAPD_PERL 1
17882 EOF
17883
17884         BUILD_SLAPD=yes
17885         BUILD_PERL=yes
17886         if test "$ol_with_perl_module" != static ; then
17887                 cat >> confdefs.h <<\EOF
17888 #define SLAPD_PERL_DYNAMIC 1
17889 EOF
17890
17891                 BUILD_PERL=mod
17892                 BUILD_PERL_DYNAMIC=shared
17893                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
17894         fi
17895 fi
17896
17897 if test "$ol_enable_shell" != no ; then
17898         cat >> confdefs.h <<\EOF
17899 #define SLAPD_SHELL 1
17900 EOF
17901
17902         BUILD_SLAPD=yes
17903         BUILD_SHELL=yes
17904         if test "$ol_with_shell_module" != static ; then
17905                 cat >> confdefs.h <<\EOF
17906 #define SLAPD_SHELL_DYNAMIC 1
17907 EOF
17908
17909                 BUILD_SHELL=mod
17910                 BUILD_SHELL_DYNAMIC=shared
17911                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
17912         fi
17913 fi
17914
17915 if test "$ol_enable_tcl" != no ; then
17916         cat >> confdefs.h <<\EOF
17917 #define SLAPD_TCL 1
17918 EOF
17919
17920         BUILD_SLAPD=yes
17921         BUILD_TCL=yes
17922         if test "$ol_with_tcl_module" != static; then
17923                 cat >> confdefs.h <<\EOF
17924 #define SLAPD_TCL_DYNAMIC 1
17925 EOF
17926
17927                 BUILD_TCL=mod
17928                 BUILD_TCL_DYNAMIC=shared
17929                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
17930         fi
17931 fi
17932
17933 if test "$ol_link_sql" != no ; then
17934         cat >> confdefs.h <<\EOF
17935 #define SLAPD_SQL 1
17936 EOF
17937
17938         BUILD_SLAPD=yes
17939         BUILD_SQL=yes
17940         if test "$ol_with_sql_module" != static; then
17941                 cat >> confdefs.h <<\EOF
17942 #define SLAPD_SQL_DYNAMIC 1
17943 EOF
17944
17945                 BUILD_SQL=mod
17946                 BUILD_SQL_DYNAMIC=shared
17947                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
17948         fi
17949 fi
17950
17951 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
17952         $BUILD_SLAPD = yes ; then
17953         BUILD_SLURPD=yes
17954 fi
17955
17956 if test "$ol_enable_rewrite" != no ; then
17957         cat >> confdefs.h <<\EOF
17958 #define ENABLE_REWRITE 1
17959 EOF
17960
17961         BUILD_REWRITE=yes
17962         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
17963 fi
17964
17965
17966 if test "$LINK_BINS_DYNAMIC" = yes; then
17967     LIB_LINKAGE=DYN
17968     LT_LIB_LINKAGE=shared
17969 else
17970     LIB_LINKAGE=STAT
17971     LT_LIB_LINKAGE=static
17972 fi
17973
17974 if test "$ac_cv_mingw32" = yes ; then
17975     PLAT=NT
17976     DYN_EXT=dll
17977 else
17978     PLAT=UNIX
17979     DYN_EXT=so
17980 fi
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990   
17991   
17992   
17993   
17994   
17995   
17996   
17997   
17998   
17999   
18000   
18001   
18002   
18003   
18004   
18005   
18006   
18007   
18008   
18009   
18010   
18011   
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051 trap '' 1 2 15
18052
18053 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
18054
18055 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18056 # Let make expand exec_prefix.
18057 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18058
18059 # Any assignment to VPATH causes Sun make to only execute
18060 # the first set of double-colon rules, so remove it if not needed.
18061 # If there is a colon in the path, we need to keep it.
18062 if test "x$srcdir" = x.; then
18063   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
18064 fi
18065
18066 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
18067
18068 DEFS=-DHAVE_CONFIG_H
18069
18070 # Without the "./", some shells look in PATH for config.status.
18071 : ${CONFIG_STATUS=./config.status}
18072
18073 echo creating $CONFIG_STATUS
18074 rm -f $CONFIG_STATUS
18075 cat > $CONFIG_STATUS <<EOF
18076 #! /bin/sh
18077 # Generated automatically by configure.
18078 # Run this file to recreate the current configuration.
18079 # This directory was configured as follows,
18080 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18081 #
18082 # $0 $ac_configure_args
18083 #
18084 # Compiler output produced by configure, useful for debugging
18085 # configure, is in ./config.log if it exists.
18086
18087 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
18088 for ac_option
18089 do
18090   case "\$ac_option" in
18091   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18092     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
18093     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
18094   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
18095     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
18096     exit 0 ;;
18097   -help | --help | --hel | --he | --h)
18098     echo "\$ac_cs_usage"; exit 0 ;;
18099   *) echo "\$ac_cs_usage"; exit 1 ;;
18100   esac
18101 done
18102
18103 ac_given_srcdir=$srcdir
18104 ac_given_INSTALL="$INSTALL"
18105
18106 trap 'rm -fr `echo "\
18107 Makefile:build/top.mk:Makefile.in:build/dir.mk \
18108 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
18109 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
18110 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
18111 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
18112 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
18113 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
18114 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
18115 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
18116 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
18117 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
18118 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
18119 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
18120 include/Makefile:build/top.mk:include/Makefile.in \
18121 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
18122 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
18123 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18124 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18125 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
18126 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
18127 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
18128 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
18129 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
18130 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
18131 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
18132 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
18133 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
18134 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
18135 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
18136 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
18137 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
18138 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
18139 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
18140 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
18141 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
18142 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
18143 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
18144 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
18145 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
18146 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
18147 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
18148 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
18149  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
18150 EOF
18151 cat >> $CONFIG_STATUS <<EOF
18152
18153 # Protect against being on the right side of a sed subst in config.status.
18154 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
18155  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
18156 $ac_vpsub
18157 $extrasub
18158 s%@SHELL@%$SHELL%g
18159 s%@CFLAGS@%$CFLAGS%g
18160 s%@CPPFLAGS@%$CPPFLAGS%g
18161 s%@CXXFLAGS@%$CXXFLAGS%g
18162 s%@FFLAGS@%$FFLAGS%g
18163 s%@DEFS@%$DEFS%g
18164 s%@LDFLAGS@%$LDFLAGS%g
18165 s%@LIBS@%$LIBS%g
18166 s%@exec_prefix@%$exec_prefix%g
18167 s%@prefix@%$prefix%g
18168 s%@program_transform_name@%$program_transform_name%g
18169 s%@bindir@%$bindir%g
18170 s%@sbindir@%$sbindir%g
18171 s%@libexecdir@%$libexecdir%g
18172 s%@datadir@%$datadir%g
18173 s%@sysconfdir@%$sysconfdir%g
18174 s%@sharedstatedir@%$sharedstatedir%g
18175 s%@localstatedir@%$localstatedir%g
18176 s%@libdir@%$libdir%g
18177 s%@includedir@%$includedir%g
18178 s%@oldincludedir@%$oldincludedir%g
18179 s%@infodir@%$infodir%g
18180 s%@mandir@%$mandir%g
18181 s%@host@%$host%g
18182 s%@host_alias@%$host_alias%g
18183 s%@host_cpu@%$host_cpu%g
18184 s%@host_vendor@%$host_vendor%g
18185 s%@host_os@%$host_os%g
18186 s%@target@%$target%g
18187 s%@target_alias@%$target_alias%g
18188 s%@target_cpu@%$target_cpu%g
18189 s%@target_vendor@%$target_vendor%g
18190 s%@target_os@%$target_os%g
18191 s%@build@%$build%g
18192 s%@build_alias@%$build_alias%g
18193 s%@build_cpu@%$build_cpu%g
18194 s%@build_vendor@%$build_vendor%g
18195 s%@build_os@%$build_os%g
18196 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
18197 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
18198 s%@INSTALL_DATA@%$INSTALL_DATA%g
18199 s%@PACKAGE@%$PACKAGE%g
18200 s%@VERSION@%$VERSION%g
18201 s%@ACLOCAL@%$ACLOCAL%g
18202 s%@AUTOCONF@%$AUTOCONF%g
18203 s%@AUTOMAKE@%$AUTOMAKE%g
18204 s%@AUTOHEADER@%$AUTOHEADER%g
18205 s%@MAKEINFO@%$MAKEINFO%g
18206 s%@install_sh@%$install_sh%g
18207 s%@AMTAR@%$AMTAR%g
18208 s%@AWK@%$AWK%g
18209 s%@AMTARFLAGS@%$AMTARFLAGS%g
18210 s%@SET_MAKE@%$SET_MAKE%g
18211 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
18212 s%@top_builddir@%$top_builddir%g
18213 s%@ldap_subdir@%$ldap_subdir%g
18214 s%@CC@%$CC%g
18215 s%@AR@%$AR%g
18216 s%@RANLIB@%$RANLIB%g
18217 s%@LN_S@%$LN_S%g
18218 s%@DLLTOOL@%$DLLTOOL%g
18219 s%@AS@%$AS%g
18220 s%@OBJDUMP@%$OBJDUMP%g
18221 s%@LIBTOOL@%$LIBTOOL%g
18222 s%@LN_H@%$LN_H%g
18223 s%@SENDMAIL@%$SENDMAIL%g
18224 s%@EDITOR@%$EDITOR%g
18225 s%@FINGER@%$FINGER%g
18226 s%@PERLBIN@%$PERLBIN%g
18227 s%@CPP@%$CPP%g
18228 s%@EXEEXT@%$EXEEXT%g
18229 s%@OBJEXT@%$OBJEXT%g
18230 s%@OL_MKDEP@%$OL_MKDEP%g
18231 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
18232 s%@LIBOBJS@%$LIBOBJS%g
18233 s%@LIBSRCS@%$LIBSRCS%g
18234 s%@PLAT@%$PLAT%g
18235 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
18236 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
18237 s%@DYN_EXT@%$DYN_EXT%g
18238 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
18239 s%@BUILD_BDB@%$BUILD_BDB%g
18240 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
18241 s%@BUILD_LDAP@%$BUILD_LDAP%g
18242 s%@BUILD_LDBM@%$BUILD_LDBM%g
18243 s%@BUILD_META@%$BUILD_META%g
18244 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
18245 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
18246 s%@BUILD_PERL@%$BUILD_PERL%g
18247 s%@BUILD_SHELL@%$BUILD_SHELL%g
18248 s%@BUILD_SQL@%$BUILD_SQL%g
18249 s%@BUILD_TCL@%$BUILD_TCL%g
18250 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
18251 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
18252 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
18253 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
18254 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
18255 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
18256 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
18257 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
18258 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
18259 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
18260 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
18261 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
18262 s%@LDBM_LIB@%$LDBM_LIB%g
18263 s%@LDAP_LIBS@%$LDAP_LIBS%g
18264 s%@LDIF_LIBS@%$LDIF_LIBS%g
18265 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
18266 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
18267 s%@LDBM_LIBS@%$LDBM_LIBS%g
18268 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
18269 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
18270 s%@WRAP_LIBS@%$WRAP_LIBS%g
18271 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
18272 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
18273 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
18274 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
18275 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
18276 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
18277 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
18278 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
18279 s%@KRB4_LIBS@%$KRB4_LIBS%g
18280 s%@KRB5_LIBS@%$KRB5_LIBS%g
18281 s%@READLINE_LIBS@%$READLINE_LIBS%g
18282 s%@SASL_LIBS@%$SASL_LIBS%g
18283 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
18284 s%@TLS_LIBS@%$TLS_LIBS%g
18285 s%@MODULES_LIBS@%$MODULES_LIBS%g
18286 s%@AUTH_LIBS@%$AUTH_LIBS%g
18287 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
18288 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
18289 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
18290 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
18291
18292 CEOF
18293 EOF
18294
18295 cat >> $CONFIG_STATUS <<\EOF
18296
18297 # Split the substitutions into bite-sized pieces for seds with
18298 # small command number limits, like on Digital OSF/1 and HP-UX.
18299 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
18300 ac_file=1 # Number of current file.
18301 ac_beg=1 # First line for current file.
18302 ac_end=$ac_max_sed_cmds # Line after last line for current file.
18303 ac_more_lines=:
18304 ac_sed_cmds=""
18305 while $ac_more_lines; do
18306   if test $ac_beg -gt 1; then
18307     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
18308   else
18309     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
18310   fi
18311   if test ! -s conftest.s$ac_file; then
18312     ac_more_lines=false
18313     rm -f conftest.s$ac_file
18314   else
18315     if test -z "$ac_sed_cmds"; then
18316       ac_sed_cmds="sed -f conftest.s$ac_file"
18317     else
18318       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
18319     fi
18320     ac_file=`expr $ac_file + 1`
18321     ac_beg=$ac_end
18322     ac_end=`expr $ac_end + $ac_max_sed_cmds`
18323   fi
18324 done
18325 if test -z "$ac_sed_cmds"; then
18326   ac_sed_cmds=cat
18327 fi
18328 EOF
18329
18330 cat >> $CONFIG_STATUS <<EOF
18331
18332 CONFIG_FILES=\${CONFIG_FILES-"\
18333 Makefile:build/top.mk:Makefile.in:build/dir.mk \
18334 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
18335 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
18336 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
18337 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
18338 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
18339 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
18340 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
18341 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
18342 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
18343 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
18344 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
18345 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
18346 include/Makefile:build/top.mk:include/Makefile.in \
18347 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
18348 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
18349 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18350 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
18351 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
18352 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
18353 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
18354 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
18355 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
18356 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
18357 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
18358 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
18359 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
18360 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
18361 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
18362 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
18363 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
18364 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
18365 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
18366 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
18367 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
18368 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
18369 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
18370 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
18371 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
18372 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
18373 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
18374 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
18375 "}
18376 EOF
18377 cat >> $CONFIG_STATUS <<\EOF
18378 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
18379   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18380   case "$ac_file" in
18381   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18382        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18383   *) ac_file_in="${ac_file}.in" ;;
18384   esac
18385
18386   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
18387
18388   # Remove last slash and all that follows it.  Not all systems have dirname.
18389   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18390   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18391     # The file is in a subdirectory.
18392     test ! -d "$ac_dir" && mkdir "$ac_dir"
18393     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
18394     # A "../" for each directory in $ac_dir_suffix.
18395     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
18396   else
18397     ac_dir_suffix= ac_dots=
18398   fi
18399
18400   case "$ac_given_srcdir" in
18401   .)  srcdir=.
18402       if test -z "$ac_dots"; then top_srcdir=.
18403       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
18404   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
18405   *) # Relative path.
18406     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
18407     top_srcdir="$ac_dots$ac_given_srcdir" ;;
18408   esac
18409
18410   case "$ac_given_INSTALL" in
18411   [/$]*) INSTALL="$ac_given_INSTALL" ;;
18412   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
18413   esac
18414
18415   echo creating "$ac_file"
18416   rm -f "$ac_file"
18417   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
18418   case "$ac_file" in
18419   *[Mm]akefile*) ac_comsub="1i\\
18420 # $configure_input" ;;
18421   *) ac_comsub= ;;
18422   esac
18423
18424   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18425   sed -e "$ac_comsub
18426 s%@configure_input@%$configure_input%g
18427 s%@srcdir@%$srcdir%g
18428 s%@top_srcdir@%$top_srcdir%g
18429 s%@INSTALL@%$INSTALL%g
18430 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
18431 fi; done
18432 rm -f conftest.s*
18433
18434 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18435 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18436 #
18437 # ac_d sets the value in "#define NAME VALUE" lines.
18438 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18439 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
18440 ac_dC='\3'
18441 ac_dD='%g'
18442 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18443 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18444 ac_uB='\([      ]\)%\1#\2define\3'
18445 ac_uC=' '
18446 ac_uD='\4%g'
18447 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18448 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18449 ac_eB='$%\1#\2define\3'
18450 ac_eC=' '
18451 ac_eD='%g'
18452
18453 if test "${CONFIG_HEADERS+set}" != set; then
18454 EOF
18455 cat >> $CONFIG_STATUS <<EOF
18456   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
18457 EOF
18458 cat >> $CONFIG_STATUS <<\EOF
18459 fi
18460 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
18461   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18462   case "$ac_file" in
18463   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18464        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18465   *) ac_file_in="${ac_file}.in" ;;
18466   esac
18467
18468   echo creating $ac_file
18469
18470   rm -f conftest.frag conftest.in conftest.out
18471   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
18472   cat $ac_file_inputs > conftest.in
18473
18474 EOF
18475
18476 # Transform confdefs.h into a sed script conftest.vals that substitutes
18477 # the proper values into config.h.in to produce config.h.  And first:
18478 # Protect against being on the right side of a sed subst in config.status.
18479 # Protect against being in an unquoted here document in config.status.
18480 rm -f conftest.vals
18481 cat > conftest.hdr <<\EOF
18482 s/[\\&%]/\\&/g
18483 s%[\\$`]%\\&%g
18484 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
18485 s%ac_d%ac_u%gp
18486 s%ac_u%ac_e%gp
18487 EOF
18488 sed -n -f conftest.hdr confdefs.h > conftest.vals
18489 rm -f conftest.hdr
18490
18491 # This sed command replaces #undef with comments.  This is necessary, for
18492 # example, in the case of _POSIX_SOURCE, which is predefined and required
18493 # on some systems where configure will not decide to define it.
18494 cat >> conftest.vals <<\EOF
18495 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
18496 EOF
18497
18498 # Break up conftest.vals because some shells have a limit on
18499 # the size of here documents, and old seds have small limits too.
18500
18501 rm -f conftest.tail
18502 while :
18503 do
18504   ac_lines=`grep -c . conftest.vals`
18505   # grep -c gives empty output for an empty file on some AIX systems.
18506   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
18507   # Write a limited-size here document to conftest.frag.
18508   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
18509   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
18510   echo 'CEOF
18511   sed -f conftest.frag conftest.in > conftest.out
18512   rm -f conftest.in
18513   mv conftest.out conftest.in
18514 ' >> $CONFIG_STATUS
18515   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18516   rm -f conftest.vals
18517   mv conftest.tail conftest.vals
18518 done
18519 rm -f conftest.vals
18520
18521 cat >> $CONFIG_STATUS <<\EOF
18522   rm -f conftest.frag conftest.h
18523   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
18524   cat conftest.in >> conftest.h
18525   rm -f conftest.in
18526   if cmp -s $ac_file conftest.h 2>/dev/null; then
18527     echo "$ac_file is unchanged"
18528     rm -f conftest.h
18529   else
18530     # Remove last slash and all that follows it.  Not all systems have dirname.
18531       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18532       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18533       # The file is in a subdirectory.
18534       test ! -d "$ac_dir" && mkdir "$ac_dir"
18535     fi
18536     rm -f $ac_file
18537     mv conftest.h $ac_file
18538   fi
18539 fi; done
18540
18541 EOF
18542 cat >> $CONFIG_STATUS <<EOF
18543
18544 EOF
18545 cat >> $CONFIG_STATUS <<\EOF
18546
18547 date > stamp-h
18548 echo Please \"make depend\" to build dependencies
18549
18550 exit 0
18551 EOF
18552 chmod +x $CONFIG_STATUS
18553 rm -fr confdefs* $ac_clean_files
18554 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
18555