]> git.sur5r.net Git - openldap/blob - configure
68a795f8dbec11ebd0d0a17a0606a3171a7fbeae
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.339 2000/10/16 02:10:27 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug          enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog         enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle      enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache          enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster  enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-rlookups     enable reverse lookups (auto)"
81 ac_help="$ac_help
82     --enable-aci          enable per-object ACIs (no)"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support (no)"
85 ac_help="$ac_help
86     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
87 ac_help="$ac_help
88     --enable-bdb          enable Berkeley DB backend (no)"
89 ac_help="$ac_help
90     --with-bdb-module  module type (static)"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend (no)"
93 ac_help="$ac_help
94     --with-dnssrv-module  module type (static)"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend (no)"
97 ac_help="$ac_help
98     --with-ldap-module    module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm         enable ldbm backend (yes)"
101 ac_help="$ac_help
102     --with-ldbm-api       with LDBM API (auto)"
103 ac_help="$ac_help
104     --with-ldbm-module    module type (static)"
105 ac_help="$ac_help
106     --with-ldbm-type      use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd       enable passwd backend (no)"
109 ac_help="$ac_help
110     --with-passwd-module  module type (static)"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend (no)"
113 ac_help="$ac_help
114     --with-perl-module    module type (static)"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend (no)"
117 ac_help="$ac_help
118     --with-shell-module   module type (static)"
119 ac_help="$ac_help
120     --enable-sql          enable sql backend (no)"
121 ac_help="$ac_help
122     --with-sql-module     module type (static)"
123 ac_help="$ac_help
124     --enable-tcl          enable tcl backend (no)"
125 ac_help="$ac_help
126     --with-tcl-module     module type (static)"
127 ac_help="$ac_help
128 SLURPD (Replication Daemon) Options:"
129 ac_help="$ac_help
130   --enable-slurpd         enable building slurpd (auto)"
131 ac_help="$ac_help
132 Library Generation & Linking Options"
133 ac_help="$ac_help
134   --enable-static[=PKGS]  build static libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-shared[=PKGS]  build shared libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
139 ac_help="$ac_help
140   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
141 ac_help="$ac_help
142   --disable-libtool-lock  avoid locking (might break parallel builds)"
143
144 # Initialize some variables set by options.
145 # The variables have the same names as the options, with
146 # dashes changed to underlines.
147 build=NONE
148 cache_file=./config.cache
149 exec_prefix=NONE
150 host=NONE
151 no_create=
152 nonopt=NONE
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 target=NONE
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165 bindir='${exec_prefix}/bin'
166 sbindir='${exec_prefix}/sbin'
167 libexecdir='${exec_prefix}/libexec'
168 datadir='${prefix}/share'
169 sysconfdir='${prefix}/etc'
170 sharedstatedir='${prefix}/com'
171 localstatedir='${prefix}/var'
172 libdir='${exec_prefix}/lib'
173 includedir='${prefix}/include'
174 oldincludedir='/usr/include'
175 infodir='${prefix}/info'
176 mandir='${prefix}/man'
177
178 # Initialize some other variables.
179 subdirs=
180 MFLAGS= MAKEFLAGS=
181 SHELL=${CONFIG_SHELL-/bin/sh}
182 # Maximum number of lines to put in a shell here document.
183 ac_max_here_lines=12
184
185 ac_prev=
186 for ac_option
187 do
188
189   # If the previous option needs an argument, assign it.
190   if test -n "$ac_prev"; then
191     eval "$ac_prev=\$ac_option"
192     ac_prev=
193     continue
194   fi
195
196   case "$ac_option" in
197   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
198   *) ac_optarg= ;;
199   esac
200
201   # Accept the important Cygnus configure options, so we can diagnose typos.
202
203   case "$ac_option" in
204
205   -bindir | --bindir | --bindi | --bind | --bin | --bi)
206     ac_prev=bindir ;;
207   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
208     bindir="$ac_optarg" ;;
209
210   -build | --build | --buil | --bui | --bu)
211     ac_prev=build ;;
212   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
213     build="$ac_optarg" ;;
214
215   -cache-file | --cache-file | --cache-fil | --cache-fi \
216   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
217     ac_prev=cache_file ;;
218   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
219   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
220     cache_file="$ac_optarg" ;;
221
222   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
223     ac_prev=datadir ;;
224   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
225   | --da=*)
226     datadir="$ac_optarg" ;;
227
228   -disable-* | --disable-*)
229     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
230     # Reject names that are not valid shell variable names.
231     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
232       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
233     fi
234     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
235     eval "enable_${ac_feature}=no" ;;
236
237   -enable-* | --enable-*)
238     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
239     # Reject names that are not valid shell variable names.
240     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
241       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
242     fi
243     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
244     case "$ac_option" in
245       *=*) ;;
246       *) ac_optarg=yes ;;
247     esac
248     eval "enable_${ac_feature}='$ac_optarg'" ;;
249
250   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
251   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
252   | --exec | --exe | --ex)
253     ac_prev=exec_prefix ;;
254   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
255   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
256   | --exec=* | --exe=* | --ex=*)
257     exec_prefix="$ac_optarg" ;;
258
259   -gas | --gas | --ga | --g)
260     # Obsolete; use --with-gas.
261     with_gas=yes ;;
262
263   -help | --help | --hel | --he)
264     # Omit some internal or obsolete options to make the list less imposing.
265     # This message is too long to be a string in the A/UX 3.1 sh.
266     cat << EOF
267 Usage: configure [options] [host]
268 Options: [defaults in brackets after descriptions]
269 Configuration:
270   --cache-file=FILE       cache test results in FILE
271   --help                  print this message
272   --no-create             do not create output files
273   --quiet, --silent       do not print \`checking...' messages
274   --version               print the version of autoconf that created configure
275 Directory and file names:
276   --prefix=PREFIX         install architecture-independent files in PREFIX
277                           [$ac_default_prefix]
278   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
279                           [same as prefix]
280   --bindir=DIR            user executables in DIR [EPREFIX/bin]
281   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
282   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
283   --datadir=DIR           read-only architecture-independent data in DIR
284                           [PREFIX/share]
285   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
286   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
287                           [PREFIX/com]
288   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
289   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
290   --includedir=DIR        C header files in DIR [PREFIX/include]
291   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
292   --infodir=DIR           info documentation in DIR [PREFIX/info]
293   --mandir=DIR            man documentation in DIR [PREFIX/man]
294   --srcdir=DIR            find the sources in DIR [configure dir or ..]
295   --program-prefix=PREFIX prepend PREFIX to installed program names
296   --program-suffix=SUFFIX append SUFFIX to installed program names
297   --program-transform-name=PROGRAM
298                           run sed PROGRAM on installed program names
299 EOF
300     cat << EOF
301 Host type:
302   --build=BUILD           configure for building on BUILD [BUILD=HOST]
303   --host=HOST             configure for HOST [guessed]
304   --target=TARGET         configure for TARGET [TARGET=HOST]
305 Features and packages:
306   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
307   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
308   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
309   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
310   --x-includes=DIR        X include files are in DIR
311   --x-libraries=DIR       X library files are in DIR
312 EOF
313     if test -n "$ac_help"; then
314       echo "--enable and --with options recognized:$ac_help"
315     fi
316     exit 0 ;;
317
318   -host | --host | --hos | --ho)
319     ac_prev=host ;;
320   -host=* | --host=* | --hos=* | --ho=*)
321     host="$ac_optarg" ;;
322
323   -includedir | --includedir | --includedi | --included | --include \
324   | --includ | --inclu | --incl | --inc)
325     ac_prev=includedir ;;
326   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
327   | --includ=* | --inclu=* | --incl=* | --inc=*)
328     includedir="$ac_optarg" ;;
329
330   -infodir | --infodir | --infodi | --infod | --info | --inf)
331     ac_prev=infodir ;;
332   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
333     infodir="$ac_optarg" ;;
334
335   -libdir | --libdir | --libdi | --libd)
336     ac_prev=libdir ;;
337   -libdir=* | --libdir=* | --libdi=* | --libd=*)
338     libdir="$ac_optarg" ;;
339
340   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
341   | --libexe | --libex | --libe)
342     ac_prev=libexecdir ;;
343   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
344   | --libexe=* | --libex=* | --libe=*)
345     libexecdir="$ac_optarg" ;;
346
347   -localstatedir | --localstatedir | --localstatedi | --localstated \
348   | --localstate | --localstat | --localsta | --localst \
349   | --locals | --local | --loca | --loc | --lo)
350     ac_prev=localstatedir ;;
351   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
352   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
353   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
354     localstatedir="$ac_optarg" ;;
355
356   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
357     ac_prev=mandir ;;
358   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
359     mandir="$ac_optarg" ;;
360
361   -nfp | --nfp | --nf)
362     # Obsolete; use --without-fp.
363     with_fp=no ;;
364
365   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
366   | --no-cr | --no-c)
367     no_create=yes ;;
368
369   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
370   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
371     no_recursion=yes ;;
372
373   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
374   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
375   | --oldin | --oldi | --old | --ol | --o)
376     ac_prev=oldincludedir ;;
377   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
378   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
379   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
380     oldincludedir="$ac_optarg" ;;
381
382   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
383     ac_prev=prefix ;;
384   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
385     prefix="$ac_optarg" ;;
386
387   -program-prefix | --program-prefix | --program-prefi | --program-pref \
388   | --program-pre | --program-pr | --program-p)
389     ac_prev=program_prefix ;;
390   -program-prefix=* | --program-prefix=* | --program-prefi=* \
391   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
392     program_prefix="$ac_optarg" ;;
393
394   -program-suffix | --program-suffix | --program-suffi | --program-suff \
395   | --program-suf | --program-su | --program-s)
396     ac_prev=program_suffix ;;
397   -program-suffix=* | --program-suffix=* | --program-suffi=* \
398   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
399     program_suffix="$ac_optarg" ;;
400
401   -program-transform-name | --program-transform-name \
402   | --program-transform-nam | --program-transform-na \
403   | --program-transform-n | --program-transform- \
404   | --program-transform | --program-transfor \
405   | --program-transfo | --program-transf \
406   | --program-trans | --program-tran \
407   | --progr-tra | --program-tr | --program-t)
408     ac_prev=program_transform_name ;;
409   -program-transform-name=* | --program-transform-name=* \
410   | --program-transform-nam=* | --program-transform-na=* \
411   | --program-transform-n=* | --program-transform-=* \
412   | --program-transform=* | --program-transfor=* \
413   | --program-transfo=* | --program-transf=* \
414   | --program-trans=* | --program-tran=* \
415   | --progr-tra=* | --program-tr=* | --program-t=*)
416     program_transform_name="$ac_optarg" ;;
417
418   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
419   | -silent | --silent | --silen | --sile | --sil)
420     silent=yes ;;
421
422   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
423     ac_prev=sbindir ;;
424   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
425   | --sbi=* | --sb=*)
426     sbindir="$ac_optarg" ;;
427
428   -sharedstatedir | --sharedstatedir | --sharedstatedi \
429   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
430   | --sharedst | --shareds | --shared | --share | --shar \
431   | --sha | --sh)
432     ac_prev=sharedstatedir ;;
433   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
434   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
435   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
436   | --sha=* | --sh=*)
437     sharedstatedir="$ac_optarg" ;;
438
439   -site | --site | --sit)
440     ac_prev=site ;;
441   -site=* | --site=* | --sit=*)
442     site="$ac_optarg" ;;
443
444   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
445     ac_prev=srcdir ;;
446   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
447     srcdir="$ac_optarg" ;;
448
449   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
450   | --syscon | --sysco | --sysc | --sys | --sy)
451     ac_prev=sysconfdir ;;
452   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
453   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
454     sysconfdir="$ac_optarg" ;;
455
456   -target | --target | --targe | --targ | --tar | --ta | --t)
457     ac_prev=target ;;
458   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
459     target="$ac_optarg" ;;
460
461   -v | -verbose | --verbose | --verbos | --verbo | --verb)
462     verbose=yes ;;
463
464   -version | --version | --versio | --versi | --vers)
465     echo "configure generated by autoconf version 2.13.1"
466     exit 0 ;;
467
468   -with-* | --with-*)
469     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
470     # Reject names that are not valid shell variable names.
471     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
472       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
473     fi
474     ac_package=`echo $ac_package| sed 's/-/_/g'`
475     case "$ac_option" in
476       *=*) ;;
477       *) ac_optarg=yes ;;
478     esac
479     eval "with_${ac_package}='$ac_optarg'" ;;
480
481   -without-* | --without-*)
482     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
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     eval "with_${ac_package}=no" ;;
489
490   --x)
491     # Obsolete; use --with-x.
492     with_x=yes ;;
493
494   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
495   | --x-incl | --x-inc | --x-in | --x-i)
496     ac_prev=x_includes ;;
497   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
498   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
499     x_includes="$ac_optarg" ;;
500
501   -x-libraries | --x-libraries | --x-librarie | --x-librari \
502   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
503     ac_prev=x_libraries ;;
504   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
505   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
506     x_libraries="$ac_optarg" ;;
507
508   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
509     ;;
510
511   *)
512     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
513       echo "configure: warning: $ac_option: invalid host type" 1>&2
514     fi
515     if test "x$nonopt" != xNONE; then
516       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
517     fi
518     nonopt="$ac_option"
519     ;;
520
521   esac
522 done
523
524 if test -n "$ac_prev"; then
525   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
526 fi
527
528 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
529
530 # File descriptor usage:
531 # 0 standard input
532 # 1 file creation
533 # 2 errors and warnings
534 # 3 some systems may open it to /dev/tty
535 # 4 used on the Kubota Titan
536 # 6 checking for... messages and results
537 # 5 compiler messages saved in config.log
538 if test "$silent" = yes; then
539   exec 6>/dev/null
540 else
541   exec 6>&1
542 fi
543 exec 5>./config.log
544
545 echo "\
546 This file contains any messages produced by compilers while
547 running configure, to aid debugging if configure makes a mistake.
548 " 1>&5
549
550 # Strip out --no-create and --no-recursion so they do not pile up.
551 # Also quote any args containing shell metacharacters.
552 ac_configure_args=
553 for ac_arg
554 do
555   case "$ac_arg" in
556   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
557   | --no-cr | --no-c) ;;
558   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
559   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
560   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
561   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
562   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
563   esac
564 done
565
566 # NLS nuisances.
567 # Only set these to C if already set.  These must not be set unconditionally
568 # because not all systems understand e.g. LANG=C (notably SCO).
569 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
570 # Non-C LC_CTYPE values break the ctype check.
571 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
572 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
573 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
574 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
575
576 # confdefs.h avoids OS command line length limits that DEFS can exceed.
577 rm -rf conftest* confdefs.h
578 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
579 echo > confdefs.h
580
581 # A filename unique to this package, relative to the directory that
582 # configure is in, which we can look for to find out if srcdir is correct.
583 ac_unique_file=build/version.sh
584
585 # Find the source files, if location was not specified.
586 if test -z "$srcdir"; then
587   ac_srcdir_defaulted=yes
588   # Try the directory containing this script, then its parent.
589   ac_prog=$0
590   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
591   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
592   srcdir=$ac_confdir
593   if test ! -r $srcdir/$ac_unique_file; then
594     srcdir=..
595   fi
596 else
597   ac_srcdir_defaulted=no
598 fi
599 if test ! -r $srcdir/$ac_unique_file; then
600   if test "$ac_srcdir_defaulted" = yes; then
601     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
602   else
603     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
604   fi
605 fi
606 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
607
608 # Prefer explicitly selected file to automatically selected ones.
609 if test -z "$CONFIG_SITE"; then
610   if test "x$prefix" != xNONE; then
611     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
612   else
613     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
614   fi
615 fi
616 for ac_site_file in $CONFIG_SITE; do
617   if test -r "$ac_site_file"; then
618     echo "loading site script $ac_site_file"
619     . "$ac_site_file"
620   fi
621 done
622
623
624 ac_ext=c
625 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
626 ac_cpp='$CPP $CPPFLAGS'
627 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
628 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
629 cross_compiling=$ac_cv_prog_cc_cross
630
631 ac_exeext=
632 ac_objext=o
633 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
634   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
635   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
636     ac_n= ac_c='
637 ' ac_t='        '
638   else
639     ac_n=-n ac_c= ac_t=
640   fi
641 else
642   ac_n= ac_c='\c' ac_t=
643 fi
644
645
646 # set unset (borrowed from autoconf 2.14a)
647 if (unset FOO) >/dev/null 2>&1; then
648   ol_unset=unset
649 else
650   ol_unset=false
651 fi
652 # unset CDPATH
653 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
654
655 ac_aux_dir=
656 for ac_dir in build $srcdir/build; do
657   if test -f $ac_dir/install-sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install-sh -c"
660     break
661   elif test -f $ac_dir/install.sh; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/install.sh -c"
664     break
665   elif test -f $ac_dir/shtool; then
666     ac_aux_dir=$ac_dir
667     ac_install_sh="$ac_aux_dir/shtool install -c"
668     break
669   fi
670 done
671 if test -z "$ac_aux_dir"; then
672   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
673 fi
674 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
675 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
676 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
677
678 eval `$ac_aux_dir/version.sh`
679 if test -z "$OL_STRING"; then
680         { echo "configure: error: could not determine version" 1>&2; exit 1; }
681 fi
682
683 echo "Configuring $OL_STRING ..."
684
685
686 echo $ac_n "checking host system type""... $ac_c" 1>&6
687 echo "configure:688: checking host system type" >&5
688 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
689
690 # Make sure we can run config.sub.
691   if $ac_config_sub sun4 >/dev/null 2>&1; then :
692     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
693   fi
694
695   ac_cv_host_alias=$host
696   case "$ac_cv_host_alias" in
697   NONE)
698     case $nonopt in
699     NONE)
700       if ac_cv_host_alias=`$ac_config_guess`; then :
701       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
702       fi ;;
703     *) ac_cv_host_alias=$nonopt ;;
704     esac ;;
705   esac
706
707   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
708   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 else
712   echo $ac_n "(cached) $ac_c" 1>&6
713 fi
714
715 echo "$ac_t""$ac_cv_host" 1>&6
716
717 host=$ac_cv_host
718 host_alias=$ac_cv_host_alias
719 host_cpu=$ac_cv_host_cpu
720 host_vendor=$ac_cv_host_vendor
721 host_os=$ac_cv_host_os
722
723
724
725
726
727 echo $ac_n "checking target system type""... $ac_c" 1>&6
728 echo "configure:729: checking target system type" >&5
729 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
730
731 # Make sure we can run config.sub.
732   if $ac_config_sub sun4 >/dev/null 2>&1; then :
733     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734   fi
735
736   ac_cv_target_alias=$target
737   case "$ac_cv_target_alias" in
738   NONE)
739     case $nonopt in
740     NONE)
741       ac_cv_target_alias=$host_alias ;;
742
743     *) ac_cv_target_alias=$nonopt ;;
744     esac ;;
745   esac
746
747   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
748   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
749   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
750   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
751 else
752   echo $ac_n "(cached) $ac_c" 1>&6
753 fi
754
755 echo "$ac_t""$ac_cv_target" 1>&6
756
757 target=$ac_cv_target
758 target_alias=$ac_cv_target_alias
759 target_cpu=$ac_cv_target_cpu
760 target_vendor=$ac_cv_target_vendor
761 target_os=$ac_cv_target_os
762
763
764
765
766
767 echo $ac_n "checking build system type""... $ac_c" 1>&6
768 echo "configure:769: checking build system type" >&5
769 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
770
771 # Make sure we can run config.sub.
772   if $ac_config_sub sun4 >/dev/null 2>&1; then :
773     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
774   fi
775
776   ac_cv_build_alias=$build
777   case "$ac_cv_build_alias" in
778   NONE)
779     case $nonopt in
780     NONE)
781       ac_cv_build_alias=$host_alias ;;
782
783     *) ac_cv_build_alias=$nonopt ;;
784     esac ;;
785   esac
786
787   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
788   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
789   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
790   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
791 else
792   echo $ac_n "(cached) $ac_c" 1>&6
793 fi
794
795 echo "$ac_t""$ac_cv_build" 1>&6
796
797 build=$ac_cv_build
798 build_alias=$ac_cv_build_alias
799 build_cpu=$ac_cv_build_cpu
800 build_vendor=$ac_cv_build_vendor
801 build_os=$ac_cv_build_os
802
803
804
805
806
807 # Do some error checking and defaulting for the host and target type.
808 # The inputs are:
809 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
810 #
811 # The rules are:
812 # 1. You are not allowed to specify --host, --target, and nonopt at the
813 #    same time.
814 # 2. Host defaults to nonopt.
815 # 3. If nonopt is not specified, then host defaults to the current host,
816 #    as determined by config.guess.
817 # 4. Target and build default to nonopt.
818 # 5. If nonopt is not specified, then target and build default to host.
819
820 # The aliases save the names the user supplied, while $host etc.
821 # will get canonicalized.
822 case $host---$target---$nonopt in
823 NONE---*---* | *---NONE---* | *---*---NONE) ;;
824 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
825 esac
826
827 test "$host_alias" != "$target_alias" &&
828   test "$program_prefix$program_suffix$program_transform_name" = \
829     NONENONEs,x,x, &&
830   program_prefix=${target_alias}-
831
832
833 # Find a good install program.  We prefer a C program (faster),
834 # so one script is as good as another.  But avoid the broken or
835 # incompatible versions:
836 # SysV /etc/install, /usr/sbin/install
837 # SunOS /usr/etc/install
838 # IRIX /sbin/install
839 # AIX /bin/install
840 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
841 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
842 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
843 # ./install, which can be erroneously created by make from ./install.sh.
844 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
845 echo "configure:846: checking for a BSD compatible install" >&5
846 if test -z "$INSTALL"; then
847 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
848   echo $ac_n "(cached) $ac_c" 1>&6
849 else
850     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
851   for ac_dir in $PATH; do
852     # Account for people who put trailing slashes in PATH elements.
853     case "$ac_dir/" in
854     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
855     *)
856       # OSF1 and SCO ODT 3.0 have their own names for install.
857       # Don't use installbsd from OSF since it installs stuff as root
858       # by default.
859       for ac_prog in ginstall scoinst install; do
860         if test -f $ac_dir/$ac_prog; then
861           if test $ac_prog = install &&
862             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # AIX install.  It has an incompatible calling convention.
864             :
865           elif test $ac_prog = install &&
866             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
867             # program-specific install script used by HP pwplus--don't use.
868             :
869           else
870             ac_cv_path_install="$ac_dir/$ac_prog -c"
871             break 2
872           fi
873         fi
874       done
875       ;;
876     esac
877   done
878   IFS="$ac_save_IFS"
879
880 fi
881   if test "${ac_cv_path_install+set}" = set; then
882     INSTALL="$ac_cv_path_install"
883   else
884     # As a last resort, use the slow shell script.  We don't cache a
885     # path for INSTALL within a source directory, because that will
886     # break other packages using the cache if that directory is
887     # removed, or if the path is relative.
888     INSTALL="$ac_install_sh"
889   fi
890 fi
891 echo "$ac_t""$INSTALL" 1>&6
892
893 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
894 # It thinks the first close brace ends the variable substitution.
895 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
896
897 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
898
899 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
900
901 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
902 echo "configure:903: checking whether build environment is sane" >&5
903 # Just in case
904 sleep 1
905 echo timestamp > conftestfile
906 # Do `set' in a subshell so we don't clobber the current shell's
907 # arguments.  Must try -L first in case configure is actually a
908 # symlink; some systems play weird games with the mod time of symlinks
909 # (eg FreeBSD returns the mod time of the symlink's containing
910 # directory).
911 if (
912    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913    if test "$*" = "X"; then
914       # -L didn't work.
915       set X `ls -t $srcdir/configure conftestfile`
916    fi
917    if test "$*" != "X $srcdir/configure conftestfile" \
918       && test "$*" != "X conftestfile $srcdir/configure"; then
919
920       # If neither matched, then we have a broken ls.  This can happen
921       # if, for instance, CONFIG_SHELL is bash and it inherits a
922       # broken ls alias from the environment.  This has actually
923       # happened.  Such a system could not be considered "sane".
924       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
925 alias in your environment" 1>&2; exit 1; }
926    fi
927
928    test "$2" = conftestfile
929    )
930 then
931    # Ok.
932    :
933 else
934    { echo "configure: error: newly created file is older than distributed files!
935 Check your system clock" 1>&2; exit 1; }
936 fi
937 rm -f conftest*
938 echo "$ac_t""yes" 1>&6
939 if test "$program_transform_name" = s,x,x,; then
940   program_transform_name=
941 else
942   # Double any \ or $.  echo might interpret backslashes.
943   cat <<\EOF_SED > conftestsed
944 s,\\,\\\\,g; s,\$,$$,g
945 EOF_SED
946   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
947   rm -f conftestsed
948 fi
949 test "$program_prefix" != NONE &&
950   program_transform_name="s,^,${program_prefix},;$program_transform_name"
951 # Use a double $ so make ignores it.
952 test "$program_suffix" != NONE &&
953   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
954
955 # sed with no file args requires a program.
956 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
957
958 for ac_prog in mawk gawk nawk awk
959 do
960 # Extract the first word of "$ac_prog", so it can be a program name with args.
961 set dummy $ac_prog; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   if test -n "$AWK"; then
968   ac_cv_prog_AWK="$AWK" # Let the user override the test.
969 else
970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
971   ac_dummy="$PATH"
972   for ac_dir in $ac_dummy; do
973     test -z "$ac_dir" && ac_dir=.
974     if test -f $ac_dir/$ac_word; then
975       ac_cv_prog_AWK="$ac_prog"
976       break
977     fi
978   done
979   IFS="$ac_save_ifs"
980 fi
981 fi
982 AWK="$ac_cv_prog_AWK"
983 if test -n "$AWK"; then
984   echo "$ac_t""$AWK" 1>&6
985 else
986   echo "$ac_t""no" 1>&6
987 fi
988
989 test -n "$AWK" && break
990 done
991
992 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
993 echo "configure:994: checking whether ${MAKE-make} sets \${MAKE}" >&5
994 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
995 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
996   echo $ac_n "(cached) $ac_c" 1>&6
997 else
998   cat > conftestmake <<\EOF
999 all:
1000         @echo 'ac_maketemp="${MAKE}"'
1001 EOF
1002 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1003 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1004 if test -n "$ac_maketemp"; then
1005   eval ac_cv_prog_make_${ac_make}_set=yes
1006 else
1007   eval ac_cv_prog_make_${ac_make}_set=no
1008 fi
1009 rm -f conftestmake
1010 fi
1011 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1012   echo "$ac_t""yes" 1>&6
1013   SET_MAKE=
1014 else
1015   echo "$ac_t""no" 1>&6
1016   SET_MAKE="MAKE=${MAKE-make}"
1017 fi
1018
1019
1020
1021 PACKAGE=$OL_PACKAGE
1022
1023 VERSION=$OL_VERSION
1024
1025 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1026   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1027 fi
1028
1029
1030
1031 missing_dir=`cd $ac_aux_dir && pwd`
1032 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working aclocal" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf.  Sigh.
1037 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1038    ACLOCAL=aclocal
1039    echo "$ac_t""found" 1>&6
1040 else
1041    ACLOCAL="$missing_dir/missing aclocal"
1042    echo "$ac_t""missing" 1>&6
1043 fi
1044
1045 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working autoconf" >&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 (autoconf --version) < /dev/null > /dev/null 2>&1; then
1051    AUTOCONF=autoconf
1052    echo "$ac_t""found" 1>&6
1053 else
1054    AUTOCONF="$missing_dir/missing autoconf"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working automake" >&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 (automake --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOMAKE=automake
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOMAKE="$missing_dir/missing automake"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working autoheader" >&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 (autoheader --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOHEADER=autoheader
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOHEADER="$missing_dir/missing autoheader"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working makeinfo" >&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 (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1090    MAKEINFO=makeinfo
1091    echo "$ac_t""found" 1>&6
1092 else
1093    MAKEINFO="$missing_dir/missing makeinfo"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 install_sh="$missing_dir/install-sh"
1098 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1099
1100 for ac_prog in gnutar gtar tar
1101 do
1102 # Extract the first word of "$ac_prog", so it can be a program name with args.
1103 set dummy $ac_prog; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 echo "configure:1106: checking for $ac_word" >&5
1106 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1107   echo $ac_n "(cached) $ac_c" 1>&6
1108 else
1109   if test -n "$AMTAR"; then
1110   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1111 else
1112   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1113   ac_dummy="$PATH"
1114   for ac_dir in $ac_dummy; do
1115     test -z "$ac_dir" && ac_dir=.
1116     if test -f $ac_dir/$ac_word; then
1117       ac_cv_prog_AMTAR="$ac_prog"
1118       break
1119     fi
1120   done
1121   IFS="$ac_save_ifs"
1122 fi
1123 fi
1124 AMTAR="$ac_cv_prog_AMTAR"
1125 if test -n "$AMTAR"; then
1126   echo "$ac_t""$AMTAR" 1>&6
1127 else
1128   echo "$ac_t""no" 1>&6
1129 fi
1130
1131 test -n "$AMTAR" && break
1132 done
1133
1134
1135 AMTARFLAGS=
1136 if test -n "$AMTAR"; then
1137   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1138         AMTARFLAGS=o
1139   fi
1140 fi
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_PACKAGE "$PACKAGE"
1144 EOF
1145
1146 cat >> confdefs.h <<EOF
1147 #define OPENLDAP_VERSION "$VERSION"
1148 EOF
1149
1150
1151 cat >> confdefs.h <<EOF
1152 #define LDAP_VENDOR_VERSION $OL_API_INC
1153 EOF
1154
1155 cat >> confdefs.h <<EOF
1156 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1157 EOF
1158
1159 cat >> confdefs.h <<EOF
1160 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1161 EOF
1162
1163 cat >> confdefs.h <<EOF
1164 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1165 EOF
1166
1167
1168 OPENLDAP_LIBVERSION=$OL_API_LIB
1169
1170
1171
1172 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1173 echo "configure:1174: checking configure arguments" >&5
1174
1175
1176 top_builddir=`pwd`
1177
1178 ldap_subdir="/openldap"
1179
1180 # Check whether --with-subdir or --without-subdir was given.
1181 if test "${with_subdir+set}" = set; then
1182   withval="$with_subdir"
1183   case "$withval" in
1184         no) ldap_subdir=""
1185                 ;;
1186         yes)
1187                 ;;
1188         /*|\\*)
1189                 ldap_subdir="$withval"
1190                 ;;
1191         *)
1192                 ldap_subdir="/$withval"
1193                 ;;
1194 esac
1195
1196 fi
1197
1198
1199 # OpenLDAP --enable-debug
1200         # Check whether --enable-debug or --disable-debug was given.
1201 if test "${enable_debug+set}" = set; then
1202   enableval="$enable_debug"
1203   
1204         ol_arg=invalid
1205         for ol_val in auto yes no ; do
1206                 if test "$enableval" = "$ol_val" ; then
1207                         ol_arg="$ol_val"
1208                 fi
1209         done
1210         if test "$ol_arg" = "invalid" ; then
1211                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1212         fi
1213         ol_enable_debug="$ol_arg"
1214
1215 else
1216         ol_enable_debug="yes"
1217 fi
1218 # end --enable-debug
1219 # OpenLDAP --enable-syslog
1220         # Check whether --enable-syslog or --disable-syslog was given.
1221 if test "${enable_syslog+set}" = set; then
1222   enableval="$enable_syslog"
1223   
1224         ol_arg=invalid
1225         for ol_val in auto yes no ; do
1226                 if test "$enableval" = "$ol_val" ; then
1227                         ol_arg="$ol_val"
1228                 fi
1229         done
1230         if test "$ol_arg" = "invalid" ; then
1231                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1232         fi
1233         ol_enable_syslog="$ol_arg"
1234
1235 else
1236         ol_enable_syslog="auto"
1237 fi
1238 # end --enable-syslog
1239 # OpenLDAP --enable-proctitle
1240         # Check whether --enable-proctitle or --disable-proctitle was given.
1241 if test "${enable_proctitle+set}" = set; then
1242   enableval="$enable_proctitle"
1243   
1244         ol_arg=invalid
1245         for ol_val in auto yes no ; do
1246                 if test "$enableval" = "$ol_val" ; then
1247                         ol_arg="$ol_val"
1248                 fi
1249         done
1250         if test "$ol_arg" = "invalid" ; then
1251                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1252         fi
1253         ol_enable_proctitle="$ol_arg"
1254
1255 else
1256         ol_enable_proctitle="yes"
1257 fi
1258 # end --enable-proctitle
1259 # OpenLDAP --enable-cache
1260         # Check whether --enable-cache or --disable-cache was given.
1261 if test "${enable_cache+set}" = set; then
1262   enableval="$enable_cache"
1263   
1264         ol_arg=invalid
1265         for ol_val in auto yes no ; do
1266                 if test "$enableval" = "$ol_val" ; then
1267                         ol_arg="$ol_val"
1268                 fi
1269         done
1270         if test "$ol_arg" = "invalid" ; then
1271                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1272         fi
1273         ol_enable_cache="$ol_arg"
1274
1275 else
1276         ol_enable_cache="yes"
1277 fi
1278 # end --enable-cache
1279 # OpenLDAP --enable-referrals
1280         # Check whether --enable-referrals or --disable-referrals was given.
1281 if test "${enable_referrals+set}" = set; then
1282   enableval="$enable_referrals"
1283   
1284         ol_arg=invalid
1285         for ol_val in auto yes no ; do
1286                 if test "$enableval" = "$ol_val" ; then
1287                         ol_arg="$ol_val"
1288                 fi
1289         done
1290         if test "$ol_arg" = "invalid" ; then
1291                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1292         fi
1293         ol_enable_referrals="$ol_arg"
1294
1295 else
1296         ol_enable_referrals="yes"
1297 fi
1298 # end --enable-referrals
1299 # OpenLDAP --enable-kbind
1300         # Check whether --enable-kbind or --disable-kbind was given.
1301 if test "${enable_kbind+set}" = set; then
1302   enableval="$enable_kbind"
1303   
1304         ol_arg=invalid
1305         for ol_val in auto yes no ; do
1306                 if test "$enableval" = "$ol_val" ; then
1307                         ol_arg="$ol_val"
1308                 fi
1309         done
1310         if test "$ol_arg" = "invalid" ; then
1311                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1312         fi
1313         ol_enable_kbind="$ol_arg"
1314
1315 else
1316         ol_enable_kbind="no"
1317 fi
1318 # end --enable-kbind
1319 # OpenLDAP --enable-ipv6
1320         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1321 if test "${enable_ipv6+set}" = set; then
1322   enableval="$enable_ipv6"
1323   
1324         ol_arg=invalid
1325         for ol_val in auto yes no ; do
1326                 if test "$enableval" = "$ol_val" ; then
1327                         ol_arg="$ol_val"
1328                 fi
1329         done
1330         if test "$ol_arg" = "invalid" ; then
1331                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1332         fi
1333         ol_enable_ipv6="$ol_arg"
1334
1335 else
1336         ol_enable_ipv6="auto"
1337 fi
1338 # end --enable-ipv6
1339 # OpenLDAP --enable-local
1340         # Check whether --enable-local or --disable-local was given.
1341 if test "${enable_local+set}" = set; then
1342   enableval="$enable_local"
1343   
1344         ol_arg=invalid
1345         for ol_val in auto yes no ; do
1346                 if test "$enableval" = "$ol_val" ; then
1347                         ol_arg="$ol_val"
1348                 fi
1349         done
1350         if test "$ol_arg" = "invalid" ; then
1351                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1352         fi
1353         ol_enable_local="$ol_arg"
1354
1355 else
1356         ol_enable_local="auto"
1357 fi
1358 # end --enable-local
1359 # OpenLDAP --enable-x_compile
1360         # Check whether --enable-x_compile or --disable-x_compile was given.
1361 if test "${enable_x_compile+set}" = set; then
1362   enableval="$enable_x_compile"
1363   
1364         ol_arg=invalid
1365         for ol_val in yes no ; do
1366                 if test "$enableval" = "$ol_val" ; then
1367                         ol_arg="$ol_val"
1368                 fi
1369         done
1370         if test "$ol_arg" = "invalid" ; then
1371                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1372         fi
1373         ol_enable_x_compile="$ol_arg"
1374
1375 else
1376         ol_enable_x_compile="no"
1377 fi
1378 # end --enable-x_compile
1379
1380
1381 # OpenLDAP --with-cyrus_sasl
1382         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1383 if test "${with_cyrus_sasl+set}" = set; then
1384   withval="$with_cyrus_sasl"
1385   
1386         ol_arg=invalid
1387         for ol_val in auto yes no  ; do
1388                 if test "$withval" = "$ol_val" ; then
1389                         ol_arg="$ol_val"
1390                 fi
1391         done
1392         if test "$ol_arg" = "invalid" ; then
1393                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1394         fi
1395         ol_with_cyrus_sasl="$ol_arg"
1396
1397 else
1398         ol_with_cyrus_sasl="auto"
1399 fi
1400 # end --with-cyrus_sasl
1401
1402 # OpenLDAP --with-fetch
1403         # Check whether --with-fetch or --without-fetch was given.
1404 if test "${with_fetch+set}" = set; then
1405   withval="$with_fetch"
1406   
1407         ol_arg=invalid
1408         for ol_val in auto yes no  ; do
1409                 if test "$withval" = "$ol_val" ; then
1410                         ol_arg="$ol_val"
1411                 fi
1412         done
1413         if test "$ol_arg" = "invalid" ; then
1414                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1415         fi
1416         ol_with_fetch="$ol_arg"
1417
1418 else
1419         ol_with_fetch="auto"
1420 fi
1421 # end --with-fetch
1422
1423 # OpenLDAP --with-kerberos
1424         # Check whether --with-kerberos or --without-kerberos was given.
1425 if test "${with_kerberos+set}" = set; then
1426   withval="$with_kerberos"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1430                 if test "$withval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1436         fi
1437         ol_with_kerberos="$ol_arg"
1438
1439 else
1440         ol_with_kerberos="auto"
1441 fi
1442 # end --with-kerberos
1443
1444 # OpenLDAP --with-readline
1445         # Check whether --with-readline or --without-readline was given.
1446 if test "${with_readline+set}" = set; then
1447   withval="$with_readline"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto yes no  ; do
1451                 if test "$withval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1457         fi
1458         ol_with_readline="$ol_arg"
1459
1460 else
1461         ol_with_readline="auto"
1462 fi
1463 # end --with-readline
1464
1465 # OpenLDAP --with-threads
1466         # Check whether --with-threads or --without-threads was given.
1467 if test "${with_threads+set}" = set; then
1468   withval="$with_threads"
1469   
1470         ol_arg=invalid
1471         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1472                 if test "$withval" = "$ol_val" ; then
1473                         ol_arg="$ol_val"
1474                 fi
1475         done
1476         if test "$ol_arg" = "invalid" ; then
1477                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1478         fi
1479         ol_with_threads="$ol_arg"
1480
1481 else
1482         ol_with_threads="auto"
1483 fi
1484 # end --with-threads
1485
1486 # OpenLDAP --with-tls
1487         # Check whether --with-tls or --without-tls was given.
1488 if test "${with_tls+set}" = set; then
1489   withval="$with_tls"
1490   
1491         ol_arg=invalid
1492         for ol_val in auto ssleay openssl yes no  ; do
1493                 if test "$withval" = "$ol_val" ; then
1494                         ol_arg="$ol_val"
1495                 fi
1496         done
1497         if test "$ol_arg" = "invalid" ; then
1498                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1499         fi
1500         ol_with_tls="$ol_arg"
1501
1502 else
1503         ol_with_tls="auto"
1504 fi
1505 # end --with-tls
1506
1507 # OpenLDAP --with-yielding_select
1508         # Check whether --with-yielding_select or --without-yielding_select was given.
1509 if test "${with_yielding_select+set}" = set; then
1510   withval="$with_yielding_select"
1511   
1512         ol_arg=invalid
1513         for ol_val in auto yes no manual  ; do
1514                 if test "$withval" = "$ol_val" ; then
1515                         ol_arg="$ol_val"
1516                 fi
1517         done
1518         if test "$ol_arg" = "invalid" ; then
1519                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1520         fi
1521         ol_with_yielding_select="$ol_arg"
1522
1523 else
1524         ol_with_yielding_select="auto"
1525 fi
1526 # end --with-yielding_select
1527
1528
1529
1530 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1531 if test "${with_xxslapdoptions+set}" = set; then
1532   withval="$with_xxslapdoptions"
1533   :
1534 fi
1535
1536 # OpenLDAP --enable-slapd
1537         # Check whether --enable-slapd or --disable-slapd was given.
1538 if test "${enable_slapd+set}" = set; then
1539   enableval="$enable_slapd"
1540   
1541         ol_arg=invalid
1542         for ol_val in auto yes no ; do
1543                 if test "$enableval" = "$ol_val" ; then
1544                         ol_arg="$ol_val"
1545                 fi
1546         done
1547         if test "$ol_arg" = "invalid" ; then
1548                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1549         fi
1550         ol_enable_slapd="$ol_arg"
1551
1552 else
1553         ol_enable_slapd="yes"
1554 fi
1555 # end --enable-slapd
1556 # OpenLDAP --enable-cleartext
1557         # Check whether --enable-cleartext or --disable-cleartext was given.
1558 if test "${enable_cleartext+set}" = set; then
1559   enableval="$enable_cleartext"
1560   
1561         ol_arg=invalid
1562         for ol_val in auto yes no ; do
1563                 if test "$enableval" = "$ol_val" ; then
1564                         ol_arg="$ol_val"
1565                 fi
1566         done
1567         if test "$ol_arg" = "invalid" ; then
1568                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1569         fi
1570         ol_enable_cleartext="$ol_arg"
1571
1572 else
1573         ol_enable_cleartext="yes"
1574 fi
1575 # end --enable-cleartext
1576 # OpenLDAP --enable-crypt
1577         # Check whether --enable-crypt or --disable-crypt was given.
1578 if test "${enable_crypt+set}" = set; then
1579   enableval="$enable_crypt"
1580   
1581         ol_arg=invalid
1582         for ol_val in auto yes no ; do
1583                 if test "$enableval" = "$ol_val" ; then
1584                         ol_arg="$ol_val"
1585                 fi
1586         done
1587         if test "$ol_arg" = "invalid" ; then
1588                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1589         fi
1590         ol_enable_crypt="$ol_arg"
1591
1592 else
1593         ol_enable_crypt="auto"
1594 fi
1595 # end --enable-crypt
1596 # OpenLDAP --enable-kpasswd
1597         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1598 if test "${enable_kpasswd+set}" = set; then
1599   enableval="$enable_kpasswd"
1600   
1601         ol_arg=invalid
1602         for ol_val in auto yes no ; do
1603                 if test "$enableval" = "$ol_val" ; then
1604                         ol_arg="$ol_val"
1605                 fi
1606         done
1607         if test "$ol_arg" = "invalid" ; then
1608                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1609         fi
1610         ol_enable_kpasswd="$ol_arg"
1611
1612 else
1613         ol_enable_kpasswd="no"
1614 fi
1615 # end --enable-kpasswd
1616 # OpenLDAP --enable-spasswd
1617         # Check whether --enable-spasswd or --disable-spasswd was given.
1618 if test "${enable_spasswd+set}" = set; then
1619   enableval="$enable_spasswd"
1620   
1621         ol_arg=invalid
1622         for ol_val in auto yes no ; do
1623                 if test "$enableval" = "$ol_val" ; then
1624                         ol_arg="$ol_val"
1625                 fi
1626         done
1627         if test "$ol_arg" = "invalid" ; then
1628                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1629         fi
1630         ol_enable_spasswd="$ol_arg"
1631
1632 else
1633         ol_enable_spasswd="no"
1634 fi
1635 # end --enable-spasswd
1636 # OpenLDAP --enable-modules
1637         # Check whether --enable-modules or --disable-modules was given.
1638 if test "${enable_modules+set}" = set; then
1639   enableval="$enable_modules"
1640   
1641         ol_arg=invalid
1642         for ol_val in auto yes no ; do
1643                 if test "$enableval" = "$ol_val" ; then
1644                         ol_arg="$ol_val"
1645                 fi
1646         done
1647         if test "$ol_arg" = "invalid" ; then
1648                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1649         fi
1650         ol_enable_modules="$ol_arg"
1651
1652 else
1653         ol_enable_modules="no"
1654 fi
1655 # end --enable-modules
1656 # OpenLDAP --enable-multimaster
1657         # Check whether --enable-multimaster or --disable-multimaster was given.
1658 if test "${enable_multimaster+set}" = set; then
1659   enableval="$enable_multimaster"
1660   
1661         ol_arg=invalid
1662         for ol_val in auto yes no ; do
1663                 if test "$enableval" = "$ol_val" ; then
1664                         ol_arg="$ol_val"
1665                 fi
1666         done
1667         if test "$ol_arg" = "invalid" ; then
1668                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1669         fi
1670         ol_enable_multimaster="$ol_arg"
1671
1672 else
1673         ol_enable_multimaster="no"
1674 fi
1675 # end --enable-multimaster
1676 # OpenLDAP --enable-phonetic
1677         # Check whether --enable-phonetic or --disable-phonetic was given.
1678 if test "${enable_phonetic+set}" = set; then
1679   enableval="$enable_phonetic"
1680   
1681         ol_arg=invalid
1682         for ol_val in auto yes no ; do
1683                 if test "$enableval" = "$ol_val" ; then
1684                         ol_arg="$ol_val"
1685                 fi
1686         done
1687         if test "$ol_arg" = "invalid" ; then
1688                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1689         fi
1690         ol_enable_phonetic="$ol_arg"
1691
1692 else
1693         ol_enable_phonetic="no"
1694 fi
1695 # end --enable-phonetic
1696 # OpenLDAP --enable-rlookups
1697         # Check whether --enable-rlookups or --disable-rlookups was given.
1698 if test "${enable_rlookups+set}" = set; then
1699   enableval="$enable_rlookups"
1700   
1701         ol_arg=invalid
1702         for ol_val in auto yes no ; do
1703                 if test "$enableval" = "$ol_val" ; then
1704                         ol_arg="$ol_val"
1705                 fi
1706         done
1707         if test "$ol_arg" = "invalid" ; then
1708                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1709         fi
1710         ol_enable_rlookups="$ol_arg"
1711
1712 else
1713         ol_enable_rlookups="auto"
1714 fi
1715 # end --enable-rlookups
1716 # OpenLDAP --enable-aci
1717         # Check whether --enable-aci or --disable-aci was given.
1718 if test "${enable_aci+set}" = set; then
1719   enableval="$enable_aci"
1720   
1721         ol_arg=invalid
1722         for ol_val in auto yes no ; do
1723                 if test "$enableval" = "$ol_val" ; then
1724                         ol_arg="$ol_val"
1725                 fi
1726         done
1727         if test "$ol_arg" = "invalid" ; then
1728                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1729         fi
1730         ol_enable_aci="$ol_arg"
1731
1732 else
1733         ol_enable_aci="no"
1734 fi
1735 # end --enable-aci
1736 # OpenLDAP --enable-wrappers
1737         # Check whether --enable-wrappers or --disable-wrappers was given.
1738 if test "${enable_wrappers+set}" = set; then
1739   enableval="$enable_wrappers"
1740   
1741         ol_arg=invalid
1742         for ol_val in auto yes no ; do
1743                 if test "$enableval" = "$ol_val" ; then
1744                         ol_arg="$ol_val"
1745                 fi
1746         done
1747         if test "$ol_arg" = "invalid" ; then
1748                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1749         fi
1750         ol_enable_wrappers="$ol_arg"
1751
1752 else
1753         ol_enable_wrappers="no"
1754 fi
1755 # end --enable-wrappers
1756 # OpenLDAP --enable-dynamic
1757         # Check whether --enable-dynamic or --disable-dynamic was given.
1758 if test "${enable_dynamic+set}" = set; then
1759   enableval="$enable_dynamic"
1760   
1761         ol_arg=invalid
1762         for ol_val in auto yes no ; do
1763                 if test "$enableval" = "$ol_val" ; then
1764                         ol_arg="$ol_val"
1765                 fi
1766         done
1767         if test "$ol_arg" = "invalid" ; then
1768                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1769         fi
1770         ol_enable_dynamic="$ol_arg"
1771
1772 else
1773         ol_enable_dynamic="no"
1774 fi
1775 # end --enable-dynamic
1776
1777 # OpenLDAP --enable-bdb
1778         # Check whether --enable-bdb or --disable-bdb was given.
1779 if test "${enable_bdb+set}" = set; then
1780   enableval="$enable_bdb"
1781   
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1790         fi
1791         ol_enable_bdb="$ol_arg"
1792
1793 else
1794         ol_enable_bdb="no"
1795 fi
1796 # end --enable-bdb
1797 # OpenLDAP --with-bdb_module
1798         # Check whether --with-bdb_module or --without-bdb_module was given.
1799 if test "${with_bdb_module+set}" = set; then
1800   withval="$with_bdb_module"
1801   
1802         ol_arg=invalid
1803         for ol_val in static dynamic ; do
1804                 if test "$withval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1810         fi
1811         ol_with_bdb_module="$ol_arg"
1812
1813 else
1814         ol_with_bdb_module="static"
1815 fi
1816 # end --with-bdb_module
1817
1818 # OpenLDAP --enable-dnssrv
1819         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1820 if test "${enable_dnssrv+set}" = set; then
1821   enableval="$enable_dnssrv"
1822   
1823         ol_arg=invalid
1824         for ol_val in auto yes no ; do
1825                 if test "$enableval" = "$ol_val" ; then
1826                         ol_arg="$ol_val"
1827                 fi
1828         done
1829         if test "$ol_arg" = "invalid" ; then
1830                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1831         fi
1832         ol_enable_dnssrv="$ol_arg"
1833
1834 else
1835         ol_enable_dnssrv="no"
1836 fi
1837 # end --enable-dnssrv
1838 # OpenLDAP --with-dnssrv_module
1839         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1840 if test "${with_dnssrv_module+set}" = set; then
1841   withval="$with_dnssrv_module"
1842   
1843         ol_arg=invalid
1844         for ol_val in static dynamic ; do
1845                 if test "$withval" = "$ol_val" ; then
1846                         ol_arg="$ol_val"
1847                 fi
1848         done
1849         if test "$ol_arg" = "invalid" ; then
1850                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1851         fi
1852         ol_with_dnssrv_module="$ol_arg"
1853
1854 else
1855         ol_with_dnssrv_module="static"
1856 fi
1857 # end --with-dnssrv_module
1858
1859 # OpenLDAP --enable-ldap
1860         # Check whether --enable-ldap or --disable-ldap was given.
1861 if test "${enable_ldap+set}" = set; then
1862   enableval="$enable_ldap"
1863   
1864         ol_arg=invalid
1865         for ol_val in auto yes no ; do
1866                 if test "$enableval" = "$ol_val" ; then
1867                         ol_arg="$ol_val"
1868                 fi
1869         done
1870         if test "$ol_arg" = "invalid" ; then
1871                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1872         fi
1873         ol_enable_ldap="$ol_arg"
1874
1875 else
1876         ol_enable_ldap="no"
1877 fi
1878 # end --enable-ldap
1879 # OpenLDAP --with-ldap_module
1880         # Check whether --with-ldap_module or --without-ldap_module was given.
1881 if test "${with_ldap_module+set}" = set; then
1882   withval="$with_ldap_module"
1883   
1884         ol_arg=invalid
1885         for ol_val in static dynamic ; do
1886                 if test "$withval" = "$ol_val" ; then
1887                         ol_arg="$ol_val"
1888                 fi
1889         done
1890         if test "$ol_arg" = "invalid" ; then
1891                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1892         fi
1893         ol_with_ldap_module="$ol_arg"
1894
1895 else
1896         ol_with_ldap_module="static"
1897 fi
1898 # end --with-ldap_module
1899
1900 # OpenLDAP --enable-ldbm
1901         # Check whether --enable-ldbm or --disable-ldbm was given.
1902 if test "${enable_ldbm+set}" = set; then
1903   enableval="$enable_ldbm"
1904   
1905         ol_arg=invalid
1906         for ol_val in auto yes no ; do
1907                 if test "$enableval" = "$ol_val" ; then
1908                         ol_arg="$ol_val"
1909                 fi
1910         done
1911         if test "$ol_arg" = "invalid" ; then
1912                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1913         fi
1914         ol_enable_ldbm="$ol_arg"
1915
1916 else
1917         ol_enable_ldbm="yes"
1918 fi
1919 # end --enable-ldbm
1920 # OpenLDAP --with-ldbm_api
1921         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1922 if test "${with_ldbm_api+set}" = set; then
1923   withval="$with_ldbm_api"
1924   
1925         ol_arg=invalid
1926         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1927                 if test "$withval" = "$ol_val" ; then
1928                         ol_arg="$ol_val"
1929                 fi
1930         done
1931         if test "$ol_arg" = "invalid" ; then
1932                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1933         fi
1934         ol_with_ldbm_api="$ol_arg"
1935
1936 else
1937         ol_with_ldbm_api="auto"
1938 fi
1939 # end --with-ldbm_api
1940
1941 # OpenLDAP --with-ldbm_module
1942         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1943 if test "${with_ldbm_module+set}" = set; then
1944   withval="$with_ldbm_module"
1945   
1946         ol_arg=invalid
1947         for ol_val in static dynamic ; do
1948                 if test "$withval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1954         fi
1955         ol_with_ldbm_module="$ol_arg"
1956
1957 else
1958         ol_with_ldbm_module="static"
1959 fi
1960 # end --with-ldbm_module
1961
1962 # OpenLDAP --with-ldbm_type
1963         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1964 if test "${with_ldbm_type+set}" = set; then
1965   withval="$with_ldbm_type"
1966   
1967         ol_arg=invalid
1968         for ol_val in auto btree hash ; do
1969                 if test "$withval" = "$ol_val" ; then
1970                         ol_arg="$ol_val"
1971                 fi
1972         done
1973         if test "$ol_arg" = "invalid" ; then
1974                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1975         fi
1976         ol_with_ldbm_type="$ol_arg"
1977
1978 else
1979         ol_with_ldbm_type="auto"
1980 fi
1981 # end --with-ldbm_type
1982
1983 # OpenLDAP --enable-passwd
1984         # Check whether --enable-passwd or --disable-passwd was given.
1985 if test "${enable_passwd+set}" = set; then
1986   enableval="$enable_passwd"
1987   
1988         ol_arg=invalid
1989         for ol_val in auto yes no ; do
1990                 if test "$enableval" = "$ol_val" ; then
1991                         ol_arg="$ol_val"
1992                 fi
1993         done
1994         if test "$ol_arg" = "invalid" ; then
1995                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1996         fi
1997         ol_enable_passwd="$ol_arg"
1998
1999 else
2000         ol_enable_passwd="no"
2001 fi
2002 # end --enable-passwd
2003 # OpenLDAP --with-passwd_module
2004         # Check whether --with-passwd_module or --without-passwd_module was given.
2005 if test "${with_passwd_module+set}" = set; then
2006   withval="$with_passwd_module"
2007   
2008         ol_arg=invalid
2009         for ol_val in static dynamic ; do
2010                 if test "$withval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2016         fi
2017         ol_with_passwd_module="$ol_arg"
2018
2019 else
2020         ol_with_passwd_module="static"
2021 fi
2022 # end --with-passwd_module
2023
2024 # OpenLDAP --enable-perl
2025         # Check whether --enable-perl or --disable-perl was given.
2026 if test "${enable_perl+set}" = set; then
2027   enableval="$enable_perl"
2028   
2029         ol_arg=invalid
2030         for ol_val in auto yes no ; do
2031                 if test "$enableval" = "$ol_val" ; then
2032                         ol_arg="$ol_val"
2033                 fi
2034         done
2035         if test "$ol_arg" = "invalid" ; then
2036                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2037         fi
2038         ol_enable_perl="$ol_arg"
2039
2040 else
2041         ol_enable_perl="no"
2042 fi
2043 # end --enable-perl
2044 # OpenLDAP --with-perl_module
2045         # Check whether --with-perl_module or --without-perl_module was given.
2046 if test "${with_perl_module+set}" = set; then
2047   withval="$with_perl_module"
2048   
2049         ol_arg=invalid
2050         for ol_val in static dynamic ; do
2051                 if test "$withval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2057         fi
2058         ol_with_perl_module="$ol_arg"
2059
2060 else
2061         ol_with_perl_module="static"
2062 fi
2063 # end --with-perl_module
2064
2065 # OpenLDAP --enable-shell
2066         # Check whether --enable-shell or --disable-shell was given.
2067 if test "${enable_shell+set}" = set; then
2068   enableval="$enable_shell"
2069   
2070         ol_arg=invalid
2071         for ol_val in auto yes no ; do
2072                 if test "$enableval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2078         fi
2079         ol_enable_shell="$ol_arg"
2080
2081 else
2082         ol_enable_shell="no"
2083 fi
2084 # end --enable-shell
2085 # OpenLDAP --with-shell_module
2086         # Check whether --with-shell_module or --without-shell_module was given.
2087 if test "${with_shell_module+set}" = set; then
2088   withval="$with_shell_module"
2089   
2090         ol_arg=invalid
2091         for ol_val in static dynamic ; do
2092                 if test "$withval" = "$ol_val" ; then
2093                         ol_arg="$ol_val"
2094                 fi
2095         done
2096         if test "$ol_arg" = "invalid" ; then
2097                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2098         fi
2099         ol_with_shell_module="$ol_arg"
2100
2101 else
2102         ol_with_shell_module="static"
2103 fi
2104 # end --with-shell_module
2105
2106 # OpenLDAP --enable-sql
2107         # Check whether --enable-sql or --disable-sql was given.
2108 if test "${enable_sql+set}" = set; then
2109   enableval="$enable_sql"
2110   
2111         ol_arg=invalid
2112         for ol_val in auto yes no ; do
2113                 if test "$enableval" = "$ol_val" ; then
2114                         ol_arg="$ol_val"
2115                 fi
2116         done
2117         if test "$ol_arg" = "invalid" ; then
2118                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2119         fi
2120         ol_enable_sql="$ol_arg"
2121
2122 else
2123         ol_enable_sql="no"
2124 fi
2125 # end --enable-sql
2126 # OpenLDAP --with-sql_module
2127         # Check whether --with-sql_module or --without-sql_module was given.
2128 if test "${with_sql_module+set}" = set; then
2129   withval="$with_sql_module"
2130   
2131         ol_arg=invalid
2132         for ol_val in static dynamic ; do
2133                 if test "$withval" = "$ol_val" ; then
2134                         ol_arg="$ol_val"
2135                 fi
2136         done
2137         if test "$ol_arg" = "invalid" ; then
2138                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2139         fi
2140         ol_with_sql_module="$ol_arg"
2141
2142 else
2143         ol_with_sql_module="static"
2144 fi
2145 # end --with-sql_module
2146
2147 # OpenLDAP --enable-tcl
2148         # Check whether --enable-tcl or --disable-tcl was given.
2149 if test "${enable_tcl+set}" = set; then
2150   enableval="$enable_tcl"
2151   
2152         ol_arg=invalid
2153         for ol_val in auto yes no ; do
2154                 if test "$enableval" = "$ol_val" ; then
2155                         ol_arg="$ol_val"
2156                 fi
2157         done
2158         if test "$ol_arg" = "invalid" ; then
2159                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2160         fi
2161         ol_enable_tcl="$ol_arg"
2162
2163 else
2164         ol_enable_tcl="no"
2165 fi
2166 # end --enable-tcl
2167 # OpenLDAP --with-tcl_module
2168         # Check whether --with-tcl_module or --without-tcl_module was given.
2169 if test "${with_tcl_module+set}" = set; then
2170   withval="$with_tcl_module"
2171   
2172         ol_arg=invalid
2173         for ol_val in static dynamic ; do
2174                 if test "$withval" = "$ol_val" ; then
2175                         ol_arg="$ol_val"
2176                 fi
2177         done
2178         if test "$ol_arg" = "invalid" ; then
2179                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2180         fi
2181         ol_with_tcl_module="$ol_arg"
2182
2183 else
2184         ol_with_tcl_module="static"
2185 fi
2186 # end --with-tcl_module
2187
2188
2189 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2190 if test "${with_xxslurpdoptions+set}" = set; then
2191   withval="$with_xxslurpdoptions"
2192   :
2193 fi
2194
2195 # OpenLDAP --enable-slurpd
2196         # Check whether --enable-slurpd or --disable-slurpd was given.
2197 if test "${enable_slurpd+set}" = set; then
2198   enableval="$enable_slurpd"
2199   
2200         ol_arg=invalid
2201         for ol_val in auto yes no ; do
2202                 if test "$enableval" = "$ol_val" ; then
2203                         ol_arg="$ol_val"
2204                 fi
2205         done
2206         if test "$ol_arg" = "invalid" ; then
2207                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2208         fi
2209         ol_enable_slurpd="$ol_arg"
2210
2211 else
2212         ol_enable_slurpd="auto"
2213 fi
2214 # end --enable-slurpd
2215
2216 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2217 if test "${with_xxliboptions+set}" = set; then
2218   withval="$with_xxliboptions"
2219   :
2220 fi
2221
2222 # Check whether --enable-static or --disable-static was given.
2223 if test "${enable_static+set}" = set; then
2224   enableval="$enable_static"
2225   p=${PACKAGE-default}
2226 case "$enableval" in
2227 yes) enable_static=yes ;;
2228 no) enable_static=no ;;
2229 *)
2230   enable_static=no
2231   # Look at the argument we got.  We use all the common list separators.
2232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2233   for pkg in $enableval; do
2234     if test "X$pkg" = "X$p"; then
2235       enable_static=yes
2236     fi
2237   done
2238   IFS="$ac_save_ifs"
2239   ;;
2240 esac
2241 else
2242   enable_static=yes
2243 fi
2244
2245 # Check whether --enable-shared or --disable-shared was given.
2246 if test "${enable_shared+set}" = set; then
2247   enableval="$enable_shared"
2248   p=${PACKAGE-default}
2249 case "$enableval" in
2250 yes) enable_shared=yes ;;
2251 no) enable_shared=no ;;
2252 *)
2253   enable_shared=no
2254   # Look at the argument we got.  We use all the common list separators.
2255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2256   for pkg in $enableval; do
2257     if test "X$pkg" = "X$p"; then
2258       enable_shared=yes
2259     fi
2260   done
2261   IFS="$ac_save_ifs"
2262   ;;
2263 esac
2264 else
2265   enable_shared=yes
2266 fi
2267
2268
2269
2270 # validate options
2271 if test $ol_enable_slapd = no ; then
2272                 if test $ol_enable_bdb = yes ; then
2273                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2274         fi
2275         if test $ol_enable_dnssrv = yes ; then
2276                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2277         fi
2278         if test $ol_enable_ldap = yes ; then
2279                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2280         fi
2281         if test $ol_enable_ldbm = yes ; then
2282                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2283         fi
2284         if test $ol_enable_passwd = yes ; then
2285                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2286         fi
2287         if test $ol_enable_perl = yes ; then
2288                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2289         fi
2290         if test $ol_enable_shell = yes ; then
2291                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2292         fi
2293         if test $ol_enable_tcl = yes ; then
2294                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2295         fi
2296         if test $ol_enable_sql = yes ; then
2297                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2298         fi
2299         if test $ol_enable_modules = yes ; then
2300                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2301         fi
2302         if test $ol_enable_multimaster = yes ; then
2303                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2304         fi
2305         if test $ol_enable_wrappers = yes ; then
2306                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2307         fi
2308         if test $ol_enable_phonetic = yes ; then
2309                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2310         fi
2311         if test $ol_enable_rlookups = yes ; then
2312                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2313         fi
2314         if test $ol_enable_aci = yes ; then
2315                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2316         fi
2317         if test $ol_with_ldbm_api != auto ; then
2318                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2319         fi
2320         if test $ol_with_ldbm_type != auto ; then
2321                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2322         fi
2323         if test $ol_with_bdb_module != static ; then
2324                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2325         fi
2326         if test $ol_with_dnssrv_module != static ; then
2327                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2328         fi
2329         if test $ol_with_ldap_module != static ; then
2330                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2331         fi
2332         if test $ol_with_ldbm_module != static ; then
2333                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2334         fi
2335         if test $ol_with_passwd_module != static ; then
2336                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2337         fi
2338         if test $ol_with_perl_module != static ; then
2339                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2340         fi
2341         if test $ol_with_shell_module != static ; then
2342                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2343         fi
2344         if test $ol_with_tcl_module != static ; then
2345                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2346         fi
2347         if test $ol_with_sql_module != static ; then
2348                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2349         fi
2350         if test $ol_enable_slurpd = yes ; then
2351                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2352         fi
2353
2354         # force settings to no
2355         ol_enable_bdb=no
2356         ol_enable_dnssrv=no
2357         ol_enable_ldap=no
2358         ol_enable_ldbm=no
2359         ol_enable_passwd=no
2360         ol_enable_perl=no
2361         ol_enable_shell=no
2362         ol_enable_tcl=no
2363         ol_enable_sql=no
2364
2365         ol_enable_modules=no
2366         ol_enable_multimaster=no
2367         ol_enable_phonetic=no
2368         ol_enable_rlookups=no
2369         ol_enable_aci=no
2370         ol_enable_wrappers=no
2371         ol_enable_dynamic=no
2372
2373         ol_with_ldbm_api=no
2374         ol_with_ldbm_type=no
2375
2376         ol_with_bdb_module=static
2377         ol_with_dnssrv_module=static
2378         ol_with_ldap_module=static
2379         ol_with_ldbm_module=static
2380         ol_with_passwd_module=static
2381         ol_with_perl_module=static
2382         ol_with_shell_module=static
2383         ol_with_tcl_module=static
2384         ol_with_sql_module=static
2385
2386         ol_enable_slurpd=no
2387
2388 elif test $ol_enable_ldbm = no ; then
2389         
2390         if test $ol_with_ldbm_api != auto ; then
2391                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2392         fi
2393
2394         if test $ol_with_ldbm_type != auto ; then
2395                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2396         fi
2397
2398         if test $ol_with_ldbm_module != static ; then
2399                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2400         fi
2401
2402         if test $ol_enable_modules != yes -a \
2403                 $ol_enable_bdb = no -a \
2404                 $ol_enable_dnssrv = no -a \
2405                 $ol_enable_ldap = no -a \
2406                 $ol_enable_passwd = no -a \
2407                 $ol_enable_perl = no -a \
2408                 $ol_enable_shell = no -a \
2409                 $ol_enable_sql = no -a \
2410                 $ol_enable_tcl = no ; then
2411                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2412         fi
2413
2414         ol_with_ldbm_api=no
2415         ol_with_ldbm_type=no
2416         ol_with_ldbm_module=static
2417
2418 else
2419                 if test $ol_with_ldbm_api = gdbm -a \
2420                 $ol_with_ldbm_type = btree ; then
2421                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2422         fi
2423         if test $ol_with_ldbm_api = mdbm -a \
2424                 $ol_with_ldbm_type = btree ; then
2425                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2426         fi
2427         if test $ol_with_ldbm_api = ndbm -a \
2428                 $ol_with_ldbm_type = btree ; then
2429                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2430         fi
2431 fi
2432
2433 if test $ol_enable_slurpd = yes ; then
2434                 if test $ol_with_threads = no ; then
2435                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2436         fi
2437 fi
2438
2439 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2440         if test $ol_with_kerberos = no ; then
2441                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2442         fi
2443         ol_with_kerberos=yes
2444 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2445         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2446                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2447         fi
2448         ol_with_kerberos=no
2449 fi
2450
2451 if test $ol_enable_spasswd = yes ; then
2452         if test $ol_with_cyrus_sasl = no ; then
2453                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2454         fi
2455         ol_with_cyrus_sasl=yes
2456 fi
2457
2458 echo "$ac_t""done" 1>&6
2459
2460 LDAP_LIBS=
2461 LDIF_LIBS=
2462 LDBM_LIBS=
2463 LTHREAD_LIBS=
2464 LUTIL_LIBS=
2465
2466 SLAPD_LIBS=
2467 SLURPD_LIBS=
2468
2469 BUILD_SLAPD=no
2470 BUILD_SLURPD=no
2471
2472 BUILD_THREAD=no
2473
2474 BUILD_BDB=no
2475 BUILD_DNSSRV=no
2476 BUILD_LDAP=no
2477 BUILD_LDBM=no
2478 BUILD_PASSWD=no
2479 BUILD_PERL=no
2480 BUILD_SHELL=no
2481 BUILD_SQL=no
2482 BUILD_TCL=no
2483
2484 BUILD_BDB_DYNAMIC=static
2485 BUILD_DNSSRV_DYNAMIC=static
2486 BUILD_LDAP_DYNAMIC=static
2487 BUILD_LDBM_DYNAMIC=static
2488 BUILD_PASSWD_DYNAMIC=static
2489 BUILD_PERL_DYNAMIC=static
2490 BUILD_SHELL_DYNAMIC=static
2491 BUILD_TCL_DYNAMIC=static
2492 BUILD_SQL_DYNAMIC=static
2493
2494 SLAPD_MODULES_LDFLAGS=
2495 SLAPD_MODULES_CPPFLAGS=
2496 SLAPD_MODULES_LIST=
2497
2498 SLAPD_PERL_LDFLAGS=
2499 MOD_PERL_LDFLAGS=
2500 PERL_CPPFLAGS=
2501
2502 SLAPD_SQL_LDFLAGS=
2503 SLAPD_SQL_LIBS=
2504 SLAPD_SQL_INCLUDES=
2505
2506 MOD_TCL_LIB=
2507 KRB4_LIBS=
2508 KRB5_LIBS=
2509 READLINE_LIBS=
2510 SASL_LIBS=
2511 TERMCAP_LIBS=
2512 TLS_LIBS=
2513 MODULES_LIBS=
2514 AUTH_LIBS=
2515
2516
2517
2518 cat >> confdefs.h <<\EOF
2519 #define HAVE_MKVERSION 1
2520 EOF
2521
2522
2523
2524
2525 ol_aix_threads=no
2526 case "$target" in
2527 *-*-aix*)       if test -z "$CC" ; then
2528                 case "$ol_with_threads" in
2529                 auto | yes |  posix) ol_aix_threads=yes ;;
2530                 esac
2531         fi
2532 ;;
2533 esac
2534
2535 if test $ol_aix_threads = yes ; then
2536         if test -z "${CC}" ; then
2537                 for ac_prog in cc_r xlc_r cc
2538 do
2539 # Extract the first word of "$ac_prog", so it can be a program name with args.
2540 set dummy $ac_prog; ac_word=$2
2541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2542 echo "configure:2543: checking for $ac_word" >&5
2543 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2544   echo $ac_n "(cached) $ac_c" 1>&6
2545 else
2546   if test -n "$CC"; then
2547   ac_cv_prog_CC="$CC" # Let the user override the test.
2548 else
2549   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2550   ac_dummy="$PATH"
2551   for ac_dir in $ac_dummy; do
2552     test -z "$ac_dir" && ac_dir=.
2553     if test -f $ac_dir/$ac_word; then
2554       ac_cv_prog_CC="$ac_prog"
2555       break
2556     fi
2557   done
2558   IFS="$ac_save_ifs"
2559 fi
2560 fi
2561 CC="$ac_cv_prog_CC"
2562 if test -n "$CC"; then
2563   echo "$ac_t""$CC" 1>&6
2564 else
2565   echo "$ac_t""no" 1>&6
2566 fi
2567
2568 test -n "$CC" && break
2569 done
2570
2571
2572                 if test "$CC" = cc ; then
2573                                                 if test $ol_with_threads != auto ; then
2574                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2575                         else
2576                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2577                         fi
2578                         ol_with_threads=no
2579                 fi
2580         fi
2581
2582         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2583                 ol_with_threads=posix
2584                 ol_cv_pthread_create=yes
2585         fi
2586 fi
2587
2588 if test -z "${CC}"; then
2589         for ac_prog in cc
2590 do
2591 # Extract the first word of "$ac_prog", so it can be a program name with args.
2592 set dummy $ac_prog; ac_word=$2
2593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2594 echo "configure:2595: checking for $ac_word" >&5
2595 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2596   echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598   if test -n "$CC"; then
2599   ac_cv_prog_CC="$CC" # Let the user override the test.
2600 else
2601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2602   ac_dummy="$PATH"
2603   for ac_dir in $ac_dummy; do
2604     test -z "$ac_dir" && ac_dir=.
2605     if test -f $ac_dir/$ac_word; then
2606       ac_cv_prog_CC="$ac_prog"
2607       break
2608     fi
2609   done
2610   IFS="$ac_save_ifs"
2611 fi
2612 fi
2613 CC="$ac_cv_prog_CC"
2614 if test -n "$CC"; then
2615   echo "$ac_t""$CC" 1>&6
2616 else
2617   echo "$ac_t""no" 1>&6
2618 fi
2619
2620 test -n "$CC" && break
2621 done
2622
2623 fi
2624
2625
2626
2627
2628 # Check whether --enable-fast-install or --disable-fast-install was given.
2629 if test "${enable_fast_install+set}" = set; then
2630   enableval="$enable_fast_install"
2631   p=${PACKAGE-default}
2632 case "$enableval" in
2633 yes) enable_fast_install=yes ;;
2634 no) enable_fast_install=no ;;
2635 *)
2636   enable_fast_install=no
2637   # Look at the argument we got.  We use all the common list separators.
2638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2639   for pkg in $enableval; do
2640     if test "X$pkg" = "X$p"; then
2641       enable_fast_install=yes
2642     fi
2643   done
2644   IFS="$ac_save_ifs"
2645   ;;
2646 esac
2647 else
2648   enable_fast_install=yes
2649 fi
2650
2651 # Extract the first word of "ranlib", so it can be a program name with args.
2652 set dummy ranlib; ac_word=$2
2653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2654 echo "configure:2655: checking for $ac_word" >&5
2655 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2656   echo $ac_n "(cached) $ac_c" 1>&6
2657 else
2658   if test -n "$RANLIB"; then
2659   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2660 else
2661   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2662   ac_dummy="$PATH"
2663   for ac_dir in $ac_dummy; do
2664     test -z "$ac_dir" && ac_dir=.
2665     if test -f $ac_dir/$ac_word; then
2666       ac_cv_prog_RANLIB="ranlib"
2667       break
2668     fi
2669   done
2670   IFS="$ac_save_ifs"
2671   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2672 fi
2673 fi
2674 RANLIB="$ac_cv_prog_RANLIB"
2675 if test -n "$RANLIB"; then
2676   echo "$ac_t""$RANLIB" 1>&6
2677 else
2678   echo "$ac_t""no" 1>&6
2679 fi
2680
2681 # Extract the first word of "gcc", so it can be a program name with args.
2682 set dummy gcc; ac_word=$2
2683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2684 echo "configure:2685: checking for $ac_word" >&5
2685 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2686   echo $ac_n "(cached) $ac_c" 1>&6
2687 else
2688   if test -n "$CC"; then
2689   ac_cv_prog_CC="$CC" # Let the user override the test.
2690 else
2691   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2692   ac_dummy="$PATH"
2693   for ac_dir in $ac_dummy; do
2694     test -z "$ac_dir" && ac_dir=.
2695     if test -f $ac_dir/$ac_word; then
2696       ac_cv_prog_CC="gcc"
2697       break
2698     fi
2699   done
2700   IFS="$ac_save_ifs"
2701 fi
2702 fi
2703 CC="$ac_cv_prog_CC"
2704 if test -n "$CC"; then
2705   echo "$ac_t""$CC" 1>&6
2706 else
2707   echo "$ac_t""no" 1>&6
2708 fi
2709
2710 if test -z "$CC"; then
2711   # Extract the first word of "cc", so it can be a program name with args.
2712 set dummy cc; ac_word=$2
2713 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2714 echo "configure:2715: checking for $ac_word" >&5
2715 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2716   echo $ac_n "(cached) $ac_c" 1>&6
2717 else
2718   if test -n "$CC"; then
2719   ac_cv_prog_CC="$CC" # Let the user override the test.
2720 else
2721   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2722   ac_prog_rejected=no
2723   ac_dummy="$PATH"
2724   for ac_dir in $ac_dummy; do
2725     test -z "$ac_dir" && ac_dir=.
2726     if test -f $ac_dir/$ac_word; then
2727       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2728         ac_prog_rejected=yes
2729         continue
2730       fi
2731       ac_cv_prog_CC="cc"
2732       break
2733     fi
2734   done
2735   IFS="$ac_save_ifs"
2736 if test $ac_prog_rejected = yes; then
2737   # We found a bogon in the path, so make sure we never use it.
2738   set dummy $ac_cv_prog_CC
2739   shift
2740   if test $# -gt 0; then
2741     # We chose a different compiler from the bogus one.
2742     # However, it has the same basename, so the bogon will be chosen
2743     # first if we set CC to just the basename; use the full file name.
2744     shift
2745     set dummy "$ac_dir/$ac_word" "$@"
2746     shift
2747     ac_cv_prog_CC="$@"
2748   fi
2749 fi
2750 fi
2751 fi
2752 CC="$ac_cv_prog_CC"
2753 if test -n "$CC"; then
2754   echo "$ac_t""$CC" 1>&6
2755 else
2756   echo "$ac_t""no" 1>&6
2757 fi
2758
2759   if test -z "$CC"; then
2760     case "`uname -s`" in
2761     *win32* | *WIN32* | *CYGWIN*)
2762       # Extract the first word of "cl", so it can be a program name with args.
2763 set dummy cl; ac_word=$2
2764 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2765 echo "configure:2766: checking for $ac_word" >&5
2766 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2767   echo $ac_n "(cached) $ac_c" 1>&6
2768 else
2769   if test -n "$CC"; then
2770   ac_cv_prog_CC="$CC" # Let the user override the test.
2771 else
2772   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2773   ac_dummy="$PATH"
2774   for ac_dir in $ac_dummy; do
2775     test -z "$ac_dir" && ac_dir=.
2776     if test -f $ac_dir/$ac_word; then
2777       ac_cv_prog_CC="cl"
2778       break
2779     fi
2780   done
2781   IFS="$ac_save_ifs"
2782 fi
2783 fi
2784 CC="$ac_cv_prog_CC"
2785 if test -n "$CC"; then
2786   echo "$ac_t""$CC" 1>&6
2787 else
2788   echo "$ac_t""no" 1>&6
2789 fi
2790  ;;
2791     esac
2792   fi
2793   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2794 fi
2795
2796 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2797 echo "configure:2798: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2798
2799 ac_ext=c
2800 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2801 ac_cpp='$CPP $CPPFLAGS'
2802 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2803 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2804 cross_compiling=$ac_cv_prog_cc_cross
2805
2806 cat > conftest.$ac_ext << EOF
2807
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810
2811 main(){return(0);}
2812 EOF
2813 if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2814   ac_cv_prog_cc_works=yes
2815   # If we can't run a trivial program, we are probably using a cross compiler.
2816   if (./conftest; exit) 2>/dev/null; then
2817     ac_cv_prog_cc_cross=no
2818   else
2819     ac_cv_prog_cc_cross=yes
2820   fi
2821 else
2822   echo "configure: failed program was:" >&5
2823   cat conftest.$ac_ext >&5
2824   ac_cv_prog_cc_works=no
2825 fi
2826 rm -fr conftest*
2827 ac_ext=c
2828 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2829 ac_cpp='$CPP $CPPFLAGS'
2830 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2831 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2832 cross_compiling=$ac_cv_prog_cc_cross
2833
2834 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2835 if test $ac_cv_prog_cc_works = no; then
2836   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2837 fi
2838 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2839 echo "configure:2840: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2840 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2841 cross_compiling=$ac_cv_prog_cc_cross
2842
2843 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2844 echo "configure:2845: checking whether we are using GNU C" >&5
2845 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2846   echo $ac_n "(cached) $ac_c" 1>&6
2847 else
2848   cat > conftest.c <<EOF
2849 #ifdef __GNUC__
2850   yes;
2851 #endif
2852 EOF
2853 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2854   ac_cv_prog_gcc=yes
2855 else
2856   ac_cv_prog_gcc=no
2857 fi
2858 fi
2859
2860 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2861
2862 if test $ac_cv_prog_gcc = yes; then
2863   GCC=yes
2864 else
2865   GCC=
2866 fi
2867
2868 ac_test_CFLAGS="${CFLAGS+set}"
2869 ac_save_CFLAGS="$CFLAGS"
2870 CFLAGS=
2871 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2872 echo "configure:2873: checking whether ${CC-cc} accepts -g" >&5
2873 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2874   echo $ac_n "(cached) $ac_c" 1>&6
2875 else
2876   echo 'void f(){}' > conftest.c
2877 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2878   ac_cv_prog_cc_g=yes
2879 else
2880   ac_cv_prog_cc_g=no
2881 fi
2882 rm -f conftest*
2883
2884 fi
2885
2886 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2887 if test "$ac_test_CFLAGS" = set; then
2888   CFLAGS="$ac_save_CFLAGS"
2889 elif test $ac_cv_prog_cc_g = yes; then
2890   if test "$GCC" = yes; then
2891     CFLAGS="-g -O2"
2892   else
2893     CFLAGS="-g"
2894   fi
2895 else
2896   if test "$GCC" = yes; then
2897     CFLAGS="-O2"
2898   else
2899     CFLAGS=
2900   fi
2901 fi
2902
2903 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2904 if test "${with_gnu_ld+set}" = set; then
2905   withval="$with_gnu_ld"
2906   test "$withval" = no || with_gnu_ld=yes
2907 else
2908   with_gnu_ld=no
2909 fi
2910
2911 ac_prog=ld
2912 if test "$ac_cv_prog_gcc" = yes; then
2913   # Check if gcc -print-prog-name=ld gives a path.
2914   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2915 echo "configure:2916: checking for ld used by GCC" >&5
2916   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2917   case "$ac_prog" in
2918     # Accept absolute paths.
2919     [\\/]* | [A-Za-z]:[\\/]*)
2920       re_direlt='/[^/][^/]*/\.\./'
2921       # Canonicalize the path of ld
2922       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2923       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2924         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2925       done
2926       test -z "$LD" && LD="$ac_prog"
2927       ;;
2928   "")
2929     # If it fails, then pretend we aren't using GCC.
2930     ac_prog=ld
2931     ;;
2932   *)
2933     # If it is relative, then search for the first ld in PATH.
2934     with_gnu_ld=unknown
2935     ;;
2936   esac
2937 elif test "$with_gnu_ld" = yes; then
2938   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2939 echo "configure:2940: checking for GNU ld" >&5
2940 else
2941   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2942 echo "configure:2943: checking for non-GNU ld" >&5
2943 fi
2944 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2945   echo $ac_n "(cached) $ac_c" 1>&6
2946 else
2947   if test -z "$LD"; then
2948   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2949   for ac_dir in $PATH; do
2950     test -z "$ac_dir" && ac_dir=.
2951     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2952       ac_cv_path_LD="$ac_dir/$ac_prog"
2953       # Check to see if the program is GNU ld.  I'd rather use --version,
2954       # but apparently some GNU ld's only accept -v.
2955       # Break only if it was the GNU/non-GNU ld that we prefer.
2956       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2957         test "$with_gnu_ld" != no && break
2958       else
2959         test "$with_gnu_ld" != yes && break
2960       fi
2961     fi
2962   done
2963   IFS="$ac_save_ifs"
2964 else
2965   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2966 fi
2967 fi
2968
2969 LD="$ac_cv_path_LD"
2970 if test -n "$LD"; then
2971   echo "$ac_t""$LD" 1>&6
2972 else
2973   echo "$ac_t""no" 1>&6
2974 fi
2975 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2976 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2977 echo "configure:2978: checking if the linker ($LD) is GNU ld" >&5
2978 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2982 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2983   ac_cv_prog_gnu_ld=yes
2984 else
2985   ac_cv_prog_gnu_ld=no
2986 fi
2987 fi
2988
2989 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2990
2991
2992 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2993 echo "configure:2994: checking for BSD-compatible nm" >&5
2994 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2995   echo $ac_n "(cached) $ac_c" 1>&6
2996 else
2997   if test -n "$NM"; then
2998   # Let the user override the test.
2999   ac_cv_path_NM="$NM"
3000 else
3001   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3002   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3003     test -z "$ac_dir" && ac_dir=.
3004     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3005       # Check to see if the nm accepts a BSD-compat flag.
3006       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3007       #   nm: unknown option "B" ignored
3008       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3009         ac_cv_path_NM="$ac_dir/nm -B"
3010         break
3011       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3012         ac_cv_path_NM="$ac_dir/nm -p"
3013         break
3014       else
3015         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3016         continue # so that we can try to find one that supports BSD flags
3017       fi
3018     fi
3019   done
3020   IFS="$ac_save_ifs"
3021   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3022 fi
3023 fi
3024
3025 NM="$ac_cv_path_NM"
3026 echo "$ac_t""$NM" 1>&6
3027
3028 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3029 echo "configure:3030: checking whether ln -s works" >&5
3030 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3031   echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033   rm -f conftestdata
3034 if ln -s X conftestdata 2>/dev/null
3035 then
3036   rm -f conftestdata
3037   ac_cv_prog_LN_S="ln -s"
3038 else
3039   ac_cv_prog_LN_S=ln
3040 fi
3041 fi
3042 LN_S="$ac_cv_prog_LN_S"
3043 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3044   echo "$ac_t""yes" 1>&6
3045 else
3046   echo "$ac_t""no" 1>&6
3047 fi
3048
3049 if test $host != $build; then
3050   ac_tool_prefix=${host_alias}-
3051 else
3052   ac_tool_prefix=
3053 fi
3054
3055
3056 case "$target" in
3057 NONE) lt_target="$host" ;;
3058 *) lt_target="$target" ;;
3059 esac
3060
3061 # Check for any special flags to pass to ltconfig.
3062 libtool_flags="--cache-file=$cache_file"
3063 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3064 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3065 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3066 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3067 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3068 libtool_flags="$libtool_flags --enable-dlopen"
3069 libtool_flags="$libtool_flags --enable-win32-dll"
3070 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3071 if test "${enable_libtool_lock+set}" = set; then
3072   enableval="$enable_libtool_lock"
3073   :
3074 fi
3075
3076 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3077 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3078
3079 # Some flags need to be propagated to the compiler or linker for good
3080 # libtool support.
3081 case "$lt_target" in
3082 *-*-irix6*)
3083   # Find out which ABI we are using.
3084   echo '#line 3085 "configure"' > conftest.$ac_ext
3085   if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3086     case "`/usr/bin/file conftest.o`" in
3087     *32-bit*)
3088       LD="${LD-ld} -32"
3089       ;;
3090     *N32*)
3091       LD="${LD-ld} -n32"
3092       ;;
3093     *64-bit*)
3094       LD="${LD-ld} -64"
3095       ;;
3096     esac
3097   fi
3098   rm -rf conftest*
3099   ;;
3100
3101 *-*-sco3.2v5*)
3102   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3103   SAVE_CFLAGS="$CFLAGS"
3104   CFLAGS="$CFLAGS -belf"
3105   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3106 echo "configure:3107: checking whether the C compiler needs -belf" >&5
3107 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   cat > conftest.$ac_ext <<EOF
3111 #line 3112 "configure"
3112 #include "confdefs.h"
3113
3114 int main() {
3115
3116 ; return 0; }
3117 EOF
3118 if { (eval echo configure:3119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3119   rm -rf conftest*
3120   lt_cv_cc_needs_belf=yes
3121 else
3122   echo "configure: failed program was:" >&5
3123   cat conftest.$ac_ext >&5
3124   rm -rf conftest*
3125   lt_cv_cc_needs_belf=no
3126 fi
3127 rm -f conftest*
3128 fi
3129
3130 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3131   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3132     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3133     CFLAGS="$SAVE_CFLAGS"
3134   fi
3135   ;;
3136
3137 *-*-cygwin* | *-*-mingw*)
3138   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3139 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3140 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3141 echo "configure:3142: checking for $ac_word" >&5
3142 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3143   echo $ac_n "(cached) $ac_c" 1>&6
3144 else
3145   if test -n "$DLLTOOL"; then
3146   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3147 else
3148   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3149   ac_dummy="$PATH"
3150   for ac_dir in $ac_dummy; do
3151     test -z "$ac_dir" && ac_dir=.
3152     if test -f $ac_dir/$ac_word; then
3153       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3154       break
3155     fi
3156   done
3157   IFS="$ac_save_ifs"
3158 fi
3159 fi
3160 DLLTOOL="$ac_cv_prog_DLLTOOL"
3161 if test -n "$DLLTOOL"; then
3162   echo "$ac_t""$DLLTOOL" 1>&6
3163 else
3164   echo "$ac_t""no" 1>&6
3165 fi
3166
3167
3168 if test -z "$ac_cv_prog_DLLTOOL"; then
3169 if test -n "$ac_tool_prefix"; then
3170   # Extract the first word of "dlltool", so it can be a program name with args.
3171 set dummy dlltool; ac_word=$2
3172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3173 echo "configure:3174: checking for $ac_word" >&5
3174 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   if test -n "$DLLTOOL"; then
3178   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3179 else
3180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3181   ac_dummy="$PATH"
3182   for ac_dir in $ac_dummy; do
3183     test -z "$ac_dir" && ac_dir=.
3184     if test -f $ac_dir/$ac_word; then
3185       ac_cv_prog_DLLTOOL="dlltool"
3186       break
3187     fi
3188   done
3189   IFS="$ac_save_ifs"
3190   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3191 fi
3192 fi
3193 DLLTOOL="$ac_cv_prog_DLLTOOL"
3194 if test -n "$DLLTOOL"; then
3195   echo "$ac_t""$DLLTOOL" 1>&6
3196 else
3197   echo "$ac_t""no" 1>&6
3198 fi
3199
3200 else
3201   DLLTOOL="false"
3202 fi
3203 fi
3204
3205   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3206 set dummy ${ac_tool_prefix}as; ac_word=$2
3207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3208 echo "configure:3209: checking for $ac_word" >&5
3209 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   if test -n "$AS"; then
3213   ac_cv_prog_AS="$AS" # Let the user override the test.
3214 else
3215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3216   ac_dummy="$PATH"
3217   for ac_dir in $ac_dummy; do
3218     test -z "$ac_dir" && ac_dir=.
3219     if test -f $ac_dir/$ac_word; then
3220       ac_cv_prog_AS="${ac_tool_prefix}as"
3221       break
3222     fi
3223   done
3224   IFS="$ac_save_ifs"
3225 fi
3226 fi
3227 AS="$ac_cv_prog_AS"
3228 if test -n "$AS"; then
3229   echo "$ac_t""$AS" 1>&6
3230 else
3231   echo "$ac_t""no" 1>&6
3232 fi
3233
3234
3235 if test -z "$ac_cv_prog_AS"; then
3236 if test -n "$ac_tool_prefix"; then
3237   # Extract the first word of "as", so it can be a program name with args.
3238 set dummy as; ac_word=$2
3239 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3240 echo "configure:3241: checking for $ac_word" >&5
3241 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3242   echo $ac_n "(cached) $ac_c" 1>&6
3243 else
3244   if test -n "$AS"; then
3245   ac_cv_prog_AS="$AS" # Let the user override the test.
3246 else
3247   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3248   ac_dummy="$PATH"
3249   for ac_dir in $ac_dummy; do
3250     test -z "$ac_dir" && ac_dir=.
3251     if test -f $ac_dir/$ac_word; then
3252       ac_cv_prog_AS="as"
3253       break
3254     fi
3255   done
3256   IFS="$ac_save_ifs"
3257   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3258 fi
3259 fi
3260 AS="$ac_cv_prog_AS"
3261 if test -n "$AS"; then
3262   echo "$ac_t""$AS" 1>&6
3263 else
3264   echo "$ac_t""no" 1>&6
3265 fi
3266
3267 else
3268   AS="false"
3269 fi
3270 fi
3271
3272   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3273 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3275 echo "configure:3276: checking for $ac_word" >&5
3276 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3277   echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3279   if test -n "$OBJDUMP"; then
3280   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3281 else
3282   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3283   ac_dummy="$PATH"
3284   for ac_dir in $ac_dummy; do
3285     test -z "$ac_dir" && ac_dir=.
3286     if test -f $ac_dir/$ac_word; then
3287       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3288       break
3289     fi
3290   done
3291   IFS="$ac_save_ifs"
3292 fi
3293 fi
3294 OBJDUMP="$ac_cv_prog_OBJDUMP"
3295 if test -n "$OBJDUMP"; then
3296   echo "$ac_t""$OBJDUMP" 1>&6
3297 else
3298   echo "$ac_t""no" 1>&6
3299 fi
3300
3301
3302 if test -z "$ac_cv_prog_OBJDUMP"; then
3303 if test -n "$ac_tool_prefix"; then
3304   # Extract the first word of "objdump", so it can be a program name with args.
3305 set dummy objdump; ac_word=$2
3306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $ac_word" >&5
3308 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   if test -n "$OBJDUMP"; then
3312   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3313 else
3314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3315   ac_dummy="$PATH"
3316   for ac_dir in $ac_dummy; do
3317     test -z "$ac_dir" && ac_dir=.
3318     if test -f $ac_dir/$ac_word; then
3319       ac_cv_prog_OBJDUMP="objdump"
3320       break
3321     fi
3322   done
3323   IFS="$ac_save_ifs"
3324   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3325 fi
3326 fi
3327 OBJDUMP="$ac_cv_prog_OBJDUMP"
3328 if test -n "$OBJDUMP"; then
3329   echo "$ac_t""$OBJDUMP" 1>&6
3330 else
3331   echo "$ac_t""no" 1>&6
3332 fi
3333
3334 else
3335   OBJDUMP="false"
3336 fi
3337 fi
3338
3339   ;;
3340
3341 esac
3342
3343
3344 # Save cache, so that ltconfig can load it
3345
3346
3347 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3348 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3349 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3350 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3351 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3352 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3353 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3354 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3355
3356 # Reload cache, that may have been modified by ltconfig
3357
3358
3359 # This can be used to rebuild libtool when needed
3360 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3361
3362 # Always use our own libtool.
3363 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3364
3365 # Redirect the config.log output again, so that the ltconfig log is not
3366 # clobbered by the next message.
3367 exec 5>>./config.log
3368
3369
3370 for ac_prog in mawk gawk nawk awk
3371 do
3372 # Extract the first word of "$ac_prog", so it can be a program name with args.
3373 set dummy $ac_prog; ac_word=$2
3374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3375 echo "configure:3376: checking for $ac_word" >&5
3376 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3377   echo $ac_n "(cached) $ac_c" 1>&6
3378 else
3379   if test -n "$AWK"; then
3380   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3381 else
3382   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3383   ac_dummy="$PATH"
3384   for ac_dir in $ac_dummy; do
3385     test -z "$ac_dir" && ac_dir=.
3386     if test -f $ac_dir/$ac_word; then
3387       ac_cv_prog_AWK="$ac_prog"
3388       break
3389     fi
3390   done
3391   IFS="$ac_save_ifs"
3392 fi
3393 fi
3394 AWK="$ac_cv_prog_AWK"
3395 if test -n "$AWK"; then
3396   echo "$ac_t""$AWK" 1>&6
3397 else
3398   echo "$ac_t""no" 1>&6
3399 fi
3400
3401 test -n "$AWK" && break
3402 done
3403
3404 # test for ln hardlink support
3405 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3406 echo "configure:3407: checking whether ln works" >&5
3407 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   rm -f conftest.src conftest.dst
3411 echo "conftest" > conftest.src
3412 if ln conftest.src conftest.dst 2>/dev/null
3413 then
3414   ol_cv_prog_LN_H="ln"
3415 else
3416   ol_cv_prog_LN_H="cp"
3417 fi
3418 rm -f conftest.src conftest.dst
3419
3420 fi
3421 LN_H="$ol_cv_prog_LN_H"
3422 if test "$ol_cv_prog_LN_H" = "ln"; then
3423         echo "$ac_t""yes" 1>&6
3424 else
3425         echo "$ac_t""no" 1>&6
3426 fi
3427
3428 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3429 echo "configure:3430: checking whether ln -s works" >&5
3430 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3431   echo $ac_n "(cached) $ac_c" 1>&6
3432 else
3433   rm -f conftestdata
3434 if ln -s X conftestdata 2>/dev/null
3435 then
3436   rm -f conftestdata
3437   ac_cv_prog_LN_S="ln -s"
3438 else
3439   ac_cv_prog_LN_S=ln
3440 fi
3441 fi
3442 LN_S="$ac_cv_prog_LN_S"
3443 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3444   echo "$ac_t""yes" 1>&6
3445 else
3446   echo "$ac_t""no" 1>&6
3447 fi
3448
3449
3450 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3451         LN_S="$LN_H"
3452 fi
3453
3454 # Extract the first word of "sendmail", so it can be a program name with args.
3455 set dummy sendmail; ac_word=$2
3456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3457 echo "configure:3458: checking for $ac_word" >&5
3458 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3459   echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461   case "$SENDMAIL" in
3462   /*)
3463   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3464   ;;
3465   ?:/*)
3466   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3467   ;;
3468   *)
3469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3470   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3471   for ac_dir in $ac_dummy; do 
3472     test -z "$ac_dir" && ac_dir=.
3473     if test -f $ac_dir/$ac_word; then
3474       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3475       break
3476     fi
3477   done
3478   IFS="$ac_save_ifs"
3479   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3480   ;;
3481 esac
3482 fi
3483 SENDMAIL="$ac_cv_path_SENDMAIL"
3484 if test -n "$SENDMAIL"; then
3485   echo "$ac_t""$SENDMAIL" 1>&6
3486 else
3487   echo "$ac_t""no" 1>&6
3488 fi
3489
3490 # Extract the first word of "vi", so it can be a program name with args.
3491 set dummy vi; ac_word=$2
3492 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3493 echo "configure:3494: checking for $ac_word" >&5
3494 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3495   echo $ac_n "(cached) $ac_c" 1>&6
3496 else
3497   case "$EDITOR" in
3498   /*)
3499   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3500   ;;
3501   ?:/*)
3502   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3503   ;;
3504   *)
3505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3506   ac_dummy="$PATH:/usr/ucb"
3507   for ac_dir in $ac_dummy; do 
3508     test -z "$ac_dir" && ac_dir=.
3509     if test -f $ac_dir/$ac_word; then
3510       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3511       break
3512     fi
3513   done
3514   IFS="$ac_save_ifs"
3515   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3516   ;;
3517 esac
3518 fi
3519 EDITOR="$ac_cv_path_EDITOR"
3520 if test -n "$EDITOR"; then
3521   echo "$ac_t""$EDITOR" 1>&6
3522 else
3523   echo "$ac_t""no" 1>&6
3524 fi
3525
3526 # Extract the first word of "finger", so it can be a program name with args.
3527 set dummy finger; ac_word=$2
3528 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3529 echo "configure:3530: checking for $ac_word" >&5
3530 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533   case "$FINGER" in
3534   /*)
3535   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3536   ;;
3537   ?:/*)
3538   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3539   ;;
3540   *)
3541   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3542   ac_dummy="$PATH:/usr/ucb"
3543   for ac_dir in $ac_dummy; do 
3544     test -z "$ac_dir" && ac_dir=.
3545     if test -f $ac_dir/$ac_word; then
3546       ac_cv_path_FINGER="$ac_dir/$ac_word"
3547       break
3548     fi
3549   done
3550   IFS="$ac_save_ifs"
3551   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3552   ;;
3553 esac
3554 fi
3555 FINGER="$ac_cv_path_FINGER"
3556 if test -n "$FINGER"; then
3557   echo "$ac_t""$FINGER" 1>&6
3558 else
3559   echo "$ac_t""no" 1>&6
3560 fi
3561
3562
3563 ol_link_perl=no
3564 if test $ol_enable_perl != no ; then
3565         # Extract the first word of "perl", so it can be a program name with args.
3566 set dummy perl; ac_word=$2
3567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3568 echo "configure:3569: checking for $ac_word" >&5
3569 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3570   echo $ac_n "(cached) $ac_c" 1>&6
3571 else
3572   case "$PERLBIN" in
3573   /*)
3574   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3575   ;;
3576   ?:/*)
3577   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3578   ;;
3579   *)
3580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3581   ac_dummy="$PATH"
3582   for ac_dir in $ac_dummy; do 
3583     test -z "$ac_dir" && ac_dir=.
3584     if test -f $ac_dir/$ac_word; then
3585       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3586       break
3587     fi
3588   done
3589   IFS="$ac_save_ifs"
3590   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3591   ;;
3592 esac
3593 fi
3594 PERLBIN="$ac_cv_path_PERLBIN"
3595 if test -n "$PERLBIN"; then
3596   echo "$ac_t""$PERLBIN" 1>&6
3597 else
3598   echo "$ac_t""no" 1>&6
3599 fi
3600
3601
3602         if test "no$PERLBIN" = "no" ; then
3603                 if test $ol_enable_perl = yes ; then
3604                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3605                 fi
3606
3607         else
3608                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3609                 if test x"$ol_with_perl_module" = "xstatic" ; then
3610                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3611                 else
3612                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3613                 fi
3614                                 ol_link_perl=yes
3615         fi
3616 fi
3617
3618 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3619 echo "configure:3620: checking how to run the C preprocessor" >&5
3620 # On Suns, sometimes $CPP names a directory.
3621 if test -n "$CPP" && test -d "$CPP"; then
3622   CPP=
3623 fi
3624 if test -z "$CPP"; then
3625 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628     # This must be in double quotes, not single quotes, because CPP may get
3629   # substituted into the Makefile and "${CC-cc}" will confuse make.
3630   CPP="${CC-cc} -E"
3631   # On the NeXT, cc -E runs the code through the compiler's parser,
3632   # not just through cpp.
3633   cat > conftest.$ac_ext <<EOF
3634 #line 3635 "configure"
3635 #include "confdefs.h"
3636 #include <assert.h>
3637 Syntax Error
3638 EOF
3639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3640 { (eval echo configure:3641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3642 if test -z "$ac_err"; then
3643   :
3644 else
3645   echo "$ac_err" >&5
3646   echo "configure: failed program was:" >&5
3647   cat conftest.$ac_ext >&5
3648   rm -rf conftest*
3649   CPP="${CC-cc} -E -traditional-cpp"
3650   cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 #include <assert.h>
3654 Syntax Error
3655 EOF
3656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3657 { (eval echo configure:3658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3659 if test -z "$ac_err"; then
3660   :
3661 else
3662   echo "$ac_err" >&5
3663   echo "configure: failed program was:" >&5
3664   cat conftest.$ac_ext >&5
3665   rm -rf conftest*
3666   CPP="${CC-cc} -nologo -E"
3667   cat > conftest.$ac_ext <<EOF
3668 #line 3669 "configure"
3669 #include "confdefs.h"
3670 #include <assert.h>
3671 Syntax Error
3672 EOF
3673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3674 { (eval echo configure:3675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3676 if test -z "$ac_err"; then
3677   :
3678 else
3679   echo "$ac_err" >&5
3680   echo "configure: failed program was:" >&5
3681   cat conftest.$ac_ext >&5
3682   rm -rf conftest*
3683   CPP=/lib/cpp
3684 fi
3685 rm -f conftest*
3686 fi
3687 rm -f conftest*
3688 fi
3689 rm -f conftest*
3690   ac_cv_prog_CPP="$CPP"
3691 fi
3692   CPP="$ac_cv_prog_CPP"
3693 else
3694   ac_cv_prog_CPP="$CPP"
3695 fi
3696 echo "$ac_t""$CPP" 1>&6
3697
3698
3699 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3700         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3701
3702 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3703         echo "configure: warning: programs compiled here do run here..." 1>&2
3704         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3705
3706 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3707         echo "configure: warning: programs compiled here do not run here..." 1>&2
3708         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3709 fi
3710
3711 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3712 echo "configure:3713: checking for AIX" >&5
3713 cat > conftest.$ac_ext <<EOF
3714 #line 3715 "configure"
3715 #include "confdefs.h"
3716 #ifdef _AIX
3717   yes
3718 #endif
3719
3720 EOF
3721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3722   egrep "yes" >/dev/null 2>&1; then
3723   rm -rf conftest*
3724   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3725 #define _ALL_SOURCE 1
3726 EOF
3727
3728 else
3729   rm -rf conftest*
3730   echo "$ac_t""no" 1>&6
3731 fi
3732 rm -f conftest*
3733
3734
3735 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3736 echo "configure:3737: checking for POSIXized ISC" >&5
3737 if test -d /etc/conf/kconfig.d &&
3738   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3739 then
3740   echo "$ac_t""yes" 1>&6
3741   ISC=yes # If later tests want to check for ISC.
3742   cat >> confdefs.h <<\EOF
3743 #define _POSIX_SOURCE 1
3744 EOF
3745
3746   if test "$GCC" = yes; then
3747     CC="$CC -posix"
3748   else
3749     CC="$CC -Xp"
3750   fi
3751 else
3752   echo "$ac_t""no" 1>&6
3753   ISC=
3754 fi
3755
3756 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3757 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3758 echo "configure:3759: checking for minix/config.h" >&5
3759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   cat > conftest.$ac_ext <<EOF
3763 #line 3764 "configure"
3764 #include "confdefs.h"
3765 #include <minix/config.h>
3766 EOF
3767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3768 { (eval echo configure:3769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3770 if test -z "$ac_err"; then
3771   rm -rf conftest*
3772   eval "ac_cv_header_$ac_safe=yes"
3773 else
3774   echo "$ac_err" >&5
3775   echo "configure: failed program was:" >&5
3776   cat conftest.$ac_ext >&5
3777   rm -rf conftest*
3778   eval "ac_cv_header_$ac_safe=no"
3779 fi
3780 rm -f conftest*
3781 fi
3782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3783   echo "$ac_t""yes" 1>&6
3784   MINIX=yes
3785 else
3786   echo "$ac_t""no" 1>&6
3787 MINIX=
3788 fi
3789
3790 if test "$MINIX" = yes; then
3791   cat >> confdefs.h <<\EOF
3792 #define _POSIX_SOURCE 1
3793 EOF
3794
3795   cat >> confdefs.h <<\EOF
3796 #define _POSIX_1_SOURCE 2
3797 EOF
3798
3799   cat >> confdefs.h <<\EOF
3800 #define _MINIX 1
3801 EOF
3802
3803 fi
3804
3805
3806 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3807 echo "configure:3808: checking for Cygwin environment" >&5
3808 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3809   echo $ac_n "(cached) $ac_c" 1>&6
3810 else
3811   cat > conftest.$ac_ext <<EOF
3812 #line 3813 "configure"
3813 #include "confdefs.h"
3814
3815 int main() {
3816
3817 #ifndef __CYGWIN__
3818 #define __CYGWIN__ __CYGWIN32__
3819 #endif
3820 return __CYGWIN__;
3821 ; return 0; }
3822 EOF
3823 if { (eval echo configure:3824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3824   rm -rf conftest*
3825   ac_cv_cygwin=yes
3826 else
3827   echo "configure: failed program was:" >&5
3828   cat conftest.$ac_ext >&5
3829   rm -rf conftest*
3830   ac_cv_cygwin=no
3831 fi
3832 rm -f conftest*
3833 fi
3834
3835 echo "$ac_t""$ac_cv_cygwin" 1>&6
3836 CYGWIN=
3837 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3838 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3839 echo "configure:3840: checking for mingw32 environment" >&5
3840 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3841   echo $ac_n "(cached) $ac_c" 1>&6
3842 else
3843   cat > conftest.$ac_ext <<EOF
3844 #line 3845 "configure"
3845 #include "confdefs.h"
3846
3847 int main() {
3848 return __MINGW32__;
3849 ; return 0; }
3850 EOF
3851 if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3852   rm -rf conftest*
3853   ac_cv_mingw32=yes
3854 else
3855   echo "configure: failed program was:" >&5
3856   cat conftest.$ac_ext >&5
3857   rm -rf conftest*
3858   ac_cv_mingw32=no
3859 fi
3860 rm -f conftest*
3861 fi
3862
3863 echo "$ac_t""$ac_cv_mingw32" 1>&6
3864 MINGW32=
3865 test "$ac_cv_mingw32" = yes && MINGW32=yes
3866 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3867 echo "configure:3868: checking for EMX OS/2 environment" >&5
3868 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3869   echo $ac_n "(cached) $ac_c" 1>&6
3870 else
3871   cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874
3875 int main() {
3876 return __EMX__;
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3880   rm -rf conftest*
3881   ac_cv_emxos2=yes
3882 else
3883   echo "configure: failed program was:" >&5
3884   cat conftest.$ac_ext >&5
3885   rm -rf conftest*
3886   ac_cv_emxos2=no
3887 fi
3888 rm -f conftest*
3889 fi
3890
3891 echo "$ac_t""$ac_cv_emxos2" 1>&6
3892 EMXOS2=
3893 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3894
3895
3896
3897 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3898 echo "configure:3899: checking for executable suffix" >&5
3899 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3900   echo $ac_n "(cached) $ac_c" 1>&6
3901 else
3902   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3903   ac_cv_exeext=.exe
3904 else
3905   rm -f conftest*
3906   echo 'int main () { return 0; }' > conftest.$ac_ext
3907   ac_cv_exeext=
3908   if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3909     for file in conftest.*; do
3910       case $file in
3911       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3912       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3913       esac
3914     done
3915   else
3916     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3917   fi
3918   rm -f conftest*
3919   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3920 fi
3921 fi
3922
3923 EXEEXT=""
3924 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3925 echo "$ac_t""${ac_cv_exeext}" 1>&6
3926 ac_exeext=$EXEEXT
3927
3928 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3929 echo "configure:3930: checking for object suffix" >&5
3930 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3931   echo $ac_n "(cached) $ac_c" 1>&6
3932 else
3933   rm -f conftest*
3934 echo 'int i = 1;' > conftest.$ac_ext
3935 if { (eval echo configure:3936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3936   for ac_file in conftest.*; do
3937     case $ac_file in
3938     *.c) ;;
3939     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3940     esac
3941   done
3942 else
3943   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3944 fi
3945 rm -f conftest*
3946 fi
3947
3948 echo "$ac_t""$ac_cv_objext" 1>&6
3949 OBJEXT=$ac_cv_objext
3950 ac_objext=$ac_cv_objext
3951
3952
3953 cat >> confdefs.h <<EOF
3954 #define EXEEXT "${EXEEXT}"
3955 EOF
3956
3957
3958 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3959 echo "configure:3960: checking for be_app in -lbe" >&5
3960 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3961 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3962   echo $ac_n "(cached) $ac_c" 1>&6
3963 else
3964   ac_save_LIBS="$LIBS"
3965 LIBS="-lbe -lroot -lnet $LIBS"
3966 cat > conftest.$ac_ext <<EOF
3967 #line 3968 "configure"
3968 #include "confdefs.h"
3969 /* Override any gcc2 internal prototype to avoid an error.  */
3970 /* We use char because int might match the return type of a gcc2
3971     builtin and then its argument prototype would still apply.  */
3972 char be_app();
3973
3974 int main() {
3975 be_app()
3976 ; return 0; }
3977 EOF
3978 if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3979   rm -rf conftest*
3980   eval "ac_cv_lib_$ac_lib_var=yes"
3981 else
3982   echo "configure: failed program was:" >&5
3983   cat conftest.$ac_ext >&5
3984   rm -rf conftest*
3985   eval "ac_cv_lib_$ac_lib_var=no"
3986 fi
3987 rm -f conftest*
3988 LIBS="$ac_save_LIBS"
3989
3990 fi
3991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3992   echo "$ac_t""yes" 1>&6
3993   LIBS="$LIBS -lbe -lroot -lnet"
3994 else
3995   echo "$ac_t""no" 1>&6
3996 :
3997 fi
3998
3999
4000
4001
4002
4003 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4004 echo "configure:4005: checking for ${CC-cc} option to accept ANSI C" >&5
4005 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4006   echo $ac_n "(cached) $ac_c" 1>&6
4007 else
4008   am_cv_prog_cc_stdc=no
4009 ac_save_CC="$CC"
4010 # Don't try gcc -ansi; that turns off useful extensions and
4011 # breaks some systems' header files.
4012 # AIX                   -qlanglvl=ansi
4013 # Ultrix and OSF/1      -std1
4014 # HP-UX 10.20 and later -Ae
4015 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4016 # SVR4                  -Xc -D__EXTENSIONS__
4017 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4018 do
4019   CC="$ac_save_CC $ac_arg"
4020   cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 #include <stdarg.h>
4024 #include <stdio.h>
4025 #include <sys/types.h>
4026 #include <sys/stat.h>
4027 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4028 struct buf { int x; };
4029 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4030 static char *e (p, i)
4031      char **p;
4032      int i;
4033 {
4034   return p[i];
4035 }
4036 static char *f (char * (*g) (char **, int), char **p, ...)
4037 {
4038   char *s;
4039   va_list v;
4040   va_start (v,p);
4041   s = g (p, va_arg (v,int));
4042   va_end (v);
4043   return s;
4044 }
4045 int test (int i, double x);
4046 struct s1 {int (*f) (int a);};
4047 struct s2 {int (*f) (double a);};
4048 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4049 int argc;
4050 char **argv;
4051
4052 int main() {
4053
4054 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4055
4056 ; return 0; }
4057 EOF
4058 if { (eval echo configure:4059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4059   rm -rf conftest*
4060   am_cv_prog_cc_stdc="$ac_arg"; break
4061 else
4062   echo "configure: failed program was:" >&5
4063   cat conftest.$ac_ext >&5
4064 fi
4065 rm -f conftest*
4066 done
4067 CC="$ac_save_CC"
4068
4069 fi
4070
4071 if test -z "$am_cv_prog_cc_stdc"; then
4072   echo "$ac_t""none needed" 1>&6
4073 else
4074   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4075 fi
4076 case "x$am_cv_prog_cc_stdc" in
4077   x|xno) ;;
4078   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4079 esac
4080
4081 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4082         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4083 fi
4084
4085 # test for make depend flag
4086 OL_MKDEP=
4087 OL_MKDEP_FLAGS=
4088 if test -z "${MKDEP}"; then
4089         OL_MKDEP="${CC-cc}"
4090         if test -z "${MKDEP_FLAGS}"; then
4091                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4092 echo "configure:4093: checking for ${OL_MKDEP} depend flag" >&5
4093 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4094   echo $ac_n "(cached) $ac_c" 1>&6
4095 else
4096   
4097                         ol_cv_mkdep=no
4098                         for flag in "-M" "-xM"; do
4099                                 cat > conftest.c <<EOF
4100  noCode;
4101 EOF
4102                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4103                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4104                                 then
4105                                         if test ! -f conftest."${ac_object}" ; then
4106                                                 ol_cv_mkdep=$flag
4107                                                 OL_MKDEP_FLAGS="$flag"
4108                                                 break
4109                                         fi
4110                                 fi
4111                         done
4112                         rm -f conftest*
4113                 
4114 fi
4115
4116 echo "$ac_t""$ol_cv_mkdep" 1>&6
4117         else
4118                 cc_cv_mkdep=yes
4119                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4120         fi
4121 else
4122         cc_cv_mkdep=yes
4123         OL_MKDEP="${MKDEP}"
4124         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4125 fi
4126
4127
4128
4129 if test "${ol_cv_mkdep}" = no ; then
4130         # this will soon become an error
4131         echo "configure: warning: do not know how to generate dependencies" 1>&2
4132 fi
4133
4134 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4135 echo "configure:4136: checking for afopen in -ls" >&5
4136 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4138   echo $ac_n "(cached) $ac_c" 1>&6
4139 else
4140   ac_save_LIBS="$LIBS"
4141 LIBS="-ls  $LIBS"
4142 cat > conftest.$ac_ext <<EOF
4143 #line 4144 "configure"
4144 #include "confdefs.h"
4145 /* Override any gcc2 internal prototype to avoid an error.  */
4146 /* We use char because int might match the return type of a gcc2
4147     builtin and then its argument prototype would still apply.  */
4148 char afopen();
4149
4150 int main() {
4151 afopen()
4152 ; return 0; }
4153 EOF
4154 if { (eval echo configure:4155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4155   rm -rf conftest*
4156   eval "ac_cv_lib_$ac_lib_var=yes"
4157 else
4158   echo "configure: failed program was:" >&5
4159   cat conftest.$ac_ext >&5
4160   rm -rf conftest*
4161   eval "ac_cv_lib_$ac_lib_var=no"
4162 fi
4163 rm -f conftest*
4164 LIBS="$ac_save_LIBS"
4165
4166 fi
4167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4168   echo "$ac_t""yes" 1>&6
4169   
4170         AUTH_LIBS=-ls
4171         cat >> confdefs.h <<\EOF
4172 #define HAVE_AIX_SECURITY 1
4173 EOF
4174
4175
4176 else
4177   echo "$ac_t""no" 1>&6
4178 fi
4179
4180
4181
4182 ol_link_modules=no
4183 if test $ol_enable_modules != no ; then
4184         for ac_hdr in ltdl.h
4185 do
4186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4188 echo "configure:4189: checking for $ac_hdr" >&5
4189 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4190   echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192   cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 #include <$ac_hdr>
4196 EOF
4197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4198 { (eval echo configure:4199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4200 if test -z "$ac_err"; then
4201   rm -rf conftest*
4202   eval "ac_cv_header_$ac_safe=yes"
4203 else
4204   echo "$ac_err" >&5
4205   echo "configure: failed program was:" >&5
4206   cat conftest.$ac_ext >&5
4207   rm -rf conftest*
4208   eval "ac_cv_header_$ac_safe=no"
4209 fi
4210 rm -f conftest*
4211 fi
4212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4213   echo "$ac_t""yes" 1>&6
4214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4215   cat >> confdefs.h <<EOF
4216 #define $ac_tr_hdr 1
4217 EOF
4218  
4219 else
4220   echo "$ac_t""no" 1>&6
4221 fi
4222 done
4223
4224
4225         if test $ac_cv_header_ltdl_h = no ; then
4226                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4227         fi
4228
4229         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4230 echo "configure:4231: checking for lt_dlinit in -lltdl" >&5
4231 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4233   echo $ac_n "(cached) $ac_c" 1>&6
4234 else
4235   ac_save_LIBS="$LIBS"
4236 LIBS="-lltdl  $LIBS"
4237 cat > conftest.$ac_ext <<EOF
4238 #line 4239 "configure"
4239 #include "confdefs.h"
4240 /* Override any gcc2 internal prototype to avoid an error.  */
4241 /* We use char because int might match the return type of a gcc2
4242     builtin and then its argument prototype would still apply.  */
4243 char lt_dlinit();
4244
4245 int main() {
4246 lt_dlinit()
4247 ; return 0; }
4248 EOF
4249 if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4250   rm -rf conftest*
4251   eval "ac_cv_lib_$ac_lib_var=yes"
4252 else
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255   rm -rf conftest*
4256   eval "ac_cv_lib_$ac_lib_var=no"
4257 fi
4258 rm -f conftest*
4259 LIBS="$ac_save_LIBS"
4260
4261 fi
4262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4263   echo "$ac_t""yes" 1>&6
4264   
4265             MODULES_LIBS=-lltdl
4266             cat >> confdefs.h <<\EOF
4267 #define HAVE_LIBLTDL 1
4268 EOF
4269
4270         
4271 else
4272   echo "$ac_t""no" 1>&6
4273 fi
4274
4275
4276         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4277                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4278         fi
4279         ol_link_modules=yes
4280 else
4281         ol_with_bdb_module=static
4282         ol_with_dnssrv_module=static
4283         ol_with_ldap_module=static
4284         ol_with_ldbm_module=static
4285         ol_with_passwd_module=static
4286         ol_with_perl_module=static
4287         ol_with_shell_module=static
4288         ol_with_tcl_module=static
4289         ol_with_sql_module=static
4290 fi
4291
4292 # test for EBCDIC
4293 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4294 echo "configure:4295: checking for EBCDIC" >&5
4295 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4296   echo $ac_n "(cached) $ac_c" 1>&6
4297 else
4298   
4299         cat > conftest.$ac_ext <<EOF
4300 #line 4301 "configure"
4301 #include "confdefs.h"
4302
4303 #if !('M' == 0xd4)
4304 #include <__ASCII__/generate_error.h>
4305 #endif
4306
4307 EOF
4308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4309 { (eval echo configure:4310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4311 if test -z "$ac_err"; then
4312   rm -rf conftest*
4313   ol_cv_cpp_ebcdic=yes
4314 else
4315   echo "$ac_err" >&5
4316   echo "configure: failed program was:" >&5
4317   cat conftest.$ac_ext >&5
4318   rm -rf conftest*
4319   ol_cv_cpp_ebcdic=no
4320 fi
4321 rm -f conftest*
4322 fi
4323
4324 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4325 if test $ol_cv_cpp_ebcdic = yes ; then
4326         cat >> confdefs.h <<\EOF
4327 #define HAVE_EBCDIC 1
4328 EOF
4329
4330 fi
4331
4332 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4333 echo "configure:4334: checking for ANSI C header files" >&5
4334 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4335   echo $ac_n "(cached) $ac_c" 1>&6
4336 else
4337   cat > conftest.$ac_ext <<EOF
4338 #line 4339 "configure"
4339 #include "confdefs.h"
4340 #include <stdlib.h>
4341 #include <stdarg.h>
4342 #include <string.h>
4343 #include <float.h>
4344 EOF
4345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4346 { (eval echo configure:4347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4348 if test -z "$ac_err"; then
4349   rm -rf conftest*
4350   ol_cv_header_stdc=yes
4351 else
4352   echo "$ac_err" >&5
4353   echo "configure: failed program was:" >&5
4354   cat conftest.$ac_ext >&5
4355   rm -rf conftest*
4356   ol_cv_header_stdc=no
4357 fi
4358 rm -f conftest*
4359
4360 if test $ol_cv_header_stdc = yes; then
4361   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4362 cat > conftest.$ac_ext <<EOF
4363 #line 4364 "configure"
4364 #include "confdefs.h"
4365 #include <string.h>
4366 EOF
4367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4368   egrep "memchr" >/dev/null 2>&1; then
4369   :
4370 else
4371   rm -rf conftest*
4372   ol_cv_header_stdc=no
4373 fi
4374 rm -f conftest*
4375
4376 fi
4377
4378 if test $ol_cv_header_stdc = yes; then
4379   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4380 cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 #include <stdlib.h>
4384 EOF
4385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4386   egrep "free" >/dev/null 2>&1; then
4387   :
4388 else
4389   rm -rf conftest*
4390   ol_cv_header_stdc=no
4391 fi
4392 rm -f conftest*
4393
4394 fi
4395
4396 if test $ol_cv_header_stdc = yes; then
4397   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4398 if test "$cross_compiling" = yes; then
4399   :
4400 else
4401   cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 #include <ctype.h>
4405 #ifndef HAVE_EBCDIC
4406 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4407 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4408 #else
4409 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4410                 || ('j' <= (c) && (c) <= 'r') \
4411                 || ('s' <= (c) && (c) <= 'z'))
4412 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4413 #endif
4414 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4415 int main () { int i; for (i = 0; i < 256; i++)
4416 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4417 exit (0); }
4418
4419 EOF
4420 if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4421 then
4422   :
4423 else
4424   echo "configure: failed program was:" >&5
4425   cat conftest.$ac_ext >&5
4426   rm -fr conftest*
4427   ol_cv_header_stdc=no
4428 fi
4429 rm -fr conftest*
4430 fi
4431
4432 fi
4433 fi
4434
4435 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4436 if test $ol_cv_header_stdc = yes; then
4437   cat >> confdefs.h <<\EOF
4438 #define STDC_HEADERS 1
4439 EOF
4440
4441 fi
4442 ac_cv_header_stdc=disable
4443
4444
4445 if test $ol_cv_header_stdc != yes; then
4446         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4447 fi
4448
4449 ac_header_dirent=no
4450 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4451 do
4452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4453 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4454 echo "configure:4455: checking for $ac_hdr that defines DIR" >&5
4455 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4456   echo $ac_n "(cached) $ac_c" 1>&6
4457 else
4458   cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461 #include <sys/types.h>
4462 #include <$ac_hdr>
4463 int main() {
4464 DIR *dirp = 0;
4465 ; return 0; }
4466 EOF
4467 if { (eval echo configure:4468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4468   rm -rf conftest*
4469   eval "ac_cv_header_dirent_$ac_safe=yes"
4470 else
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -rf conftest*
4474   eval "ac_cv_header_dirent_$ac_safe=no"
4475 fi
4476 rm -f conftest*
4477 fi
4478 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4479   echo "$ac_t""yes" 1>&6
4480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4481   cat >> confdefs.h <<EOF
4482 #define $ac_tr_hdr 1
4483 EOF
4484  ac_header_dirent=$ac_hdr; break
4485 else
4486   echo "$ac_t""no" 1>&6
4487 fi
4488 done
4489 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4490 if test $ac_header_dirent = dirent.h; then
4491 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4492 echo "configure:4493: checking for opendir in -ldir" >&5
4493 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4494 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4495   echo $ac_n "(cached) $ac_c" 1>&6
4496 else
4497   ac_save_LIBS="$LIBS"
4498 LIBS="-ldir  $LIBS"
4499 cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 /* Override any gcc2 internal prototype to avoid an error.  */
4503 /* We use char because int might match the return type of a gcc2
4504     builtin and then its argument prototype would still apply.  */
4505 char opendir();
4506
4507 int main() {
4508 opendir()
4509 ; return 0; }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4512   rm -rf conftest*
4513   eval "ac_cv_lib_$ac_lib_var=yes"
4514 else
4515   echo "configure: failed program was:" >&5
4516   cat conftest.$ac_ext >&5
4517   rm -rf conftest*
4518   eval "ac_cv_lib_$ac_lib_var=no"
4519 fi
4520 rm -f conftest*
4521 LIBS="$ac_save_LIBS"
4522
4523 fi
4524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4525   echo "$ac_t""yes" 1>&6
4526   LIBS="$LIBS -ldir"
4527 else
4528   echo "$ac_t""no" 1>&6
4529 fi
4530
4531 else
4532 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4533 echo "configure:4534: checking for opendir in -lx" >&5
4534 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4535 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4536   echo $ac_n "(cached) $ac_c" 1>&6
4537 else
4538   ac_save_LIBS="$LIBS"
4539 LIBS="-lx  $LIBS"
4540 cat > conftest.$ac_ext <<EOF
4541 #line 4542 "configure"
4542 #include "confdefs.h"
4543 /* Override any gcc2 internal prototype to avoid an error.  */
4544 /* We use char because int might match the return type of a gcc2
4545     builtin and then its argument prototype would still apply.  */
4546 char opendir();
4547
4548 int main() {
4549 opendir()
4550 ; return 0; }
4551 EOF
4552 if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4553   rm -rf conftest*
4554   eval "ac_cv_lib_$ac_lib_var=yes"
4555 else
4556   echo "configure: failed program was:" >&5
4557   cat conftest.$ac_ext >&5
4558   rm -rf conftest*
4559   eval "ac_cv_lib_$ac_lib_var=no"
4560 fi
4561 rm -f conftest*
4562 LIBS="$ac_save_LIBS"
4563
4564 fi
4565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4566   echo "$ac_t""yes" 1>&6
4567   LIBS="$LIBS -lx"
4568 else
4569   echo "$ac_t""no" 1>&6
4570 fi
4571
4572 fi
4573
4574 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4575 echo "configure:4576: checking for sys/wait.h that is POSIX.1 compatible" >&5
4576 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4577   echo $ac_n "(cached) $ac_c" 1>&6
4578 else
4579   cat > conftest.$ac_ext <<EOF
4580 #line 4581 "configure"
4581 #include "confdefs.h"
4582 #include <sys/types.h>
4583 #include <sys/wait.h>
4584 #ifndef WEXITSTATUS
4585 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4586 #endif
4587 #ifndef WIFEXITED
4588 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4589 #endif
4590 int main() {
4591 int s;
4592 wait (&s);
4593 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4594 ; return 0; }
4595 EOF
4596 if { (eval echo configure:4597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4597   rm -rf conftest*
4598   ac_cv_header_sys_wait_h=yes
4599 else
4600   echo "configure: failed program was:" >&5
4601   cat conftest.$ac_ext >&5
4602   rm -rf conftest*
4603   ac_cv_header_sys_wait_h=no
4604 fi
4605 rm -f conftest*
4606 fi
4607
4608 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4609 if test $ac_cv_header_sys_wait_h = yes; then
4610   cat >> confdefs.h <<\EOF
4611 #define HAVE_SYS_WAIT_H 1
4612 EOF
4613
4614 fi
4615
4616 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4617 echo "configure:4618: checking POSIX termios" >&5
4618 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4619   echo $ac_n "(cached) $ac_c" 1>&6
4620 else
4621   cat > conftest.$ac_ext <<EOF
4622 #line 4623 "configure"
4623 #include "confdefs.h"
4624 #include <sys/types.h>
4625 #include <unistd.h>
4626 #include <termios.h>
4627 int main() {
4628 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4629    tcgetattr(0, 0);
4630 ; return 0; }
4631 EOF
4632 if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4633   rm -rf conftest*
4634   am_cv_sys_posix_termios=yes
4635 else
4636   echo "configure: failed program was:" >&5
4637   cat conftest.$ac_ext >&5
4638   rm -rf conftest*
4639   am_cv_sys_posix_termios=no
4640 fi
4641 rm -f conftest*
4642 fi
4643
4644 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4645
4646
4647  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4648 echo "configure:4649: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4649 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4650   echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4653
4654   gwinsz_in_termios_h=no
4655   if test $am_cv_sys_posix_termios = yes; then
4656     cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 #include <sys/types.h>
4660 #     include <termios.h>
4661 #     ifdef TIOCGWINSZ
4662         yes
4663 #     endif
4664     
4665 EOF
4666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4667   egrep "yes" >/dev/null 2>&1; then
4668   rm -rf conftest*
4669   gwinsz_in_termios_h=yes
4670 fi
4671 rm -f conftest*
4672
4673   fi
4674
4675   if test $gwinsz_in_termios_h = no; then
4676     cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 #include <sys/types.h>
4680 #     include <sys/ioctl.h>
4681 #     ifdef TIOCGWINSZ
4682         yes
4683 #     endif
4684     
4685 EOF
4686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4687   egrep "yes" >/dev/null 2>&1; then
4688   rm -rf conftest*
4689   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4690 fi
4691 rm -f conftest*
4692
4693   fi
4694   
4695 fi
4696
4697 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4698   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4699     cat >> confdefs.h <<\EOF
4700 #define GWINSZ_IN_SYS_IOCTL 1
4701 EOF
4702
4703   fi
4704
4705 if test $am_cv_sys_posix_termios = yes ; then
4706         cat >> confdefs.h <<\EOF
4707 #define HAVE_POSIX_TERMIOS 1
4708 EOF
4709
4710 fi
4711
4712 for ac_hdr in \
4713         arpa/inet.h             \
4714         arpa/nameser.h  \
4715         assert.h                \
4716         conio.h                 \
4717         crypt.h                 \
4718         direct.h                \
4719         errno.h                 \
4720         fcntl.h                 \
4721         filio.h                 \
4722         getopt.h                \
4723         grp.h                   \
4724         io.h                    \
4725         libutil.h               \
4726         limits.h                \
4727         locale.h                \
4728         netinet/tcp.h   \
4729         malloc.h                \
4730         memory.h                \
4731         psap.h                  \
4732         pwd.h                   \
4733         process.h               \
4734         resolv.h                \
4735         sgtty.h                 \
4736         shadow.h                \
4737         stddef.h                \
4738         string.h                \
4739         strings.h               \
4740         sysexits.h              \
4741         sys/file.h              \
4742         sys/filio.h             \
4743         sys/errno.h             \
4744         sys/ioctl.h             \
4745         sys/param.h             \
4746         sys/resource.h  \
4747         sys/select.h    \
4748         sys/socket.h    \
4749         sys/syslog.h    \
4750         sys/time.h              \
4751         sys/types.h             \
4752         syslog.h                \
4753         termios.h               \
4754         unistd.h                \
4755         winsock.h               \
4756
4757 do
4758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4760 echo "configure:4761: checking for $ac_hdr" >&5
4761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4762   echo $ac_n "(cached) $ac_c" 1>&6
4763 else
4764   cat > conftest.$ac_ext <<EOF
4765 #line 4766 "configure"
4766 #include "confdefs.h"
4767 #include <$ac_hdr>
4768 EOF
4769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4770 { (eval echo configure:4771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4772 if test -z "$ac_err"; then
4773   rm -rf conftest*
4774   eval "ac_cv_header_$ac_safe=yes"
4775 else
4776   echo "$ac_err" >&5
4777   echo "configure: failed program was:" >&5
4778   cat conftest.$ac_ext >&5
4779   rm -rf conftest*
4780   eval "ac_cv_header_$ac_safe=no"
4781 fi
4782 rm -f conftest*
4783 fi
4784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4785   echo "$ac_t""yes" 1>&6
4786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4787   cat >> confdefs.h <<EOF
4788 #define $ac_tr_hdr 1
4789 EOF
4790  
4791 else
4792   echo "$ac_t""no" 1>&6
4793 fi
4794 done
4795
4796
4797
4798
4799 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4800 echo "configure:4801: checking for sigset in -lV3" >&5
4801 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4802 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4803   echo $ac_n "(cached) $ac_c" 1>&6
4804 else
4805   ac_save_LIBS="$LIBS"
4806 LIBS="-lV3  $LIBS"
4807 cat > conftest.$ac_ext <<EOF
4808 #line 4809 "configure"
4809 #include "confdefs.h"
4810 /* Override any gcc2 internal prototype to avoid an error.  */
4811 /* We use char because int might match the return type of a gcc2
4812     builtin and then its argument prototype would still apply.  */
4813 char sigset();
4814
4815 int main() {
4816 sigset()
4817 ; return 0; }
4818 EOF
4819 if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4820   rm -rf conftest*
4821   eval "ac_cv_lib_$ac_lib_var=yes"
4822 else
4823   echo "configure: failed program was:" >&5
4824   cat conftest.$ac_ext >&5
4825   rm -rf conftest*
4826   eval "ac_cv_lib_$ac_lib_var=no"
4827 fi
4828 rm -f conftest*
4829 LIBS="$ac_save_LIBS"
4830
4831 fi
4832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4833   echo "$ac_t""yes" 1>&6
4834     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4835     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4836   cat >> confdefs.h <<EOF
4837 #define $ac_tr_lib 1
4838 EOF
4839
4840   LIBS="-lV3 $LIBS"
4841
4842 else
4843   echo "$ac_t""no" 1>&6
4844 fi
4845
4846
4847 if test $ac_cv_header_winsock_h = yes; then
4848         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4849 echo "configure:4850: checking for winsock" >&5
4850 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4851   echo $ac_n "(cached) $ac_c" 1>&6
4852 else
4853   cat > conftest.$ac_ext <<EOF
4854 #line 4855 "configure"
4855 #include "confdefs.h"
4856 #include <winsock.h>
4857 int main() {
4858
4859                         socket(0,0,0);
4860                         select(0,NULL,NULL,NULL,NULL);
4861                         closesocket(0);
4862                         gethostname(NULL,0);
4863         
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   ol_cv_winsock=yes
4869 else
4870   echo "configure: failed program was:" >&5
4871   cat conftest.$ac_ext >&5
4872   rm -rf conftest*
4873   ol_cv_winsock=no
4874 fi
4875 rm -f conftest*]
4876 fi
4877
4878 echo "$ac_t""$ol_cv_winsock" 1>&6
4879
4880         if test $ol_cv_winsock = yes ; then
4881                 cat >> confdefs.h <<\EOF
4882 #define HAVE_WINSOCK 1
4883 EOF
4884
4885                 ac_cv_func_socket=yes
4886                 ac_cv_func_select=yes
4887                 ac_cv_func_closesocket=yes
4888                 ac_cv_func_gethostname=yes
4889         fi
4890 fi
4891
4892
4893 echo $ac_n "checking for socket""... $ac_c" 1>&6
4894 echo "configure:4895: checking for socket" >&5
4895 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   cat > conftest.$ac_ext <<EOF
4899 #line 4900 "configure"
4900 #include "confdefs.h"
4901 /* System header to define __stub macros and hopefully few prototypes,
4902     which can conflict with char socket(); below.  */
4903 #include <assert.h>
4904 /* Override any gcc2 internal prototype to avoid an error.  */
4905 /* We use char because int might match the return type of a gcc2
4906     builtin and then its argument prototype would still apply.  */
4907 char socket();
4908 char (*f)();
4909
4910 int main() {
4911
4912 /* The GNU C library defines this for functions which it implements
4913     to always fail with ENOSYS.  Some functions are actually named
4914     something starting with __ and the normal name is an alias.  */
4915 #if defined (__stub_socket) || defined (__stub___socket)
4916 choke me
4917 #else
4918 f = socket;
4919 #endif
4920
4921 ; return 0; }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924   rm -rf conftest*
4925   eval "ac_cv_func_socket=yes"
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   eval "ac_cv_func_socket=no"
4931 fi
4932 rm -f conftest*
4933 fi
4934
4935 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4936   echo "$ac_t""yes" 1>&6
4937   :
4938 else
4939   echo "$ac_t""no" 1>&6
4940         
4941         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4942 echo "configure:4943: checking for main in -lsocket" >&5
4943 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4945   echo $ac_n "(cached) $ac_c" 1>&6
4946 else
4947   ac_save_LIBS="$LIBS"
4948 LIBS="-lsocket  $LIBS"
4949 cat > conftest.$ac_ext <<EOF
4950 #line 4951 "configure"
4951 #include "confdefs.h"
4952
4953 int main() {
4954 main()
4955 ; return 0; }
4956 EOF
4957 if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4958   rm -rf conftest*
4959   eval "ac_cv_lib_$ac_lib_var=yes"
4960 else
4961   echo "configure: failed program was:" >&5
4962   cat conftest.$ac_ext >&5
4963   rm -rf conftest*
4964   eval "ac_cv_lib_$ac_lib_var=no"
4965 fi
4966 rm -f conftest*
4967 LIBS="$ac_save_LIBS"
4968
4969 fi
4970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4971   echo "$ac_t""yes" 1>&6
4972     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4973     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4974   cat >> confdefs.h <<EOF
4975 #define $ac_tr_lib 1
4976 EOF
4977
4978   LIBS="-lsocket $LIBS"
4979
4980 else
4981   echo "$ac_t""no" 1>&6
4982 fi
4983
4984         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4985 echo "configure:4986: checking for main in -lnet" >&5
4986 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   ac_save_LIBS="$LIBS"
4991 LIBS="-lnet  $LIBS"
4992 cat > conftest.$ac_ext <<EOF
4993 #line 4994 "configure"
4994 #include "confdefs.h"
4995
4996 int main() {
4997 main()
4998 ; return 0; }
4999 EOF
5000 if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5001   rm -rf conftest*
5002   eval "ac_cv_lib_$ac_lib_var=yes"
5003 else
5004   echo "configure: failed program was:" >&5
5005   cat conftest.$ac_ext >&5
5006   rm -rf conftest*
5007   eval "ac_cv_lib_$ac_lib_var=no"
5008 fi
5009 rm -f conftest*
5010 LIBS="$ac_save_LIBS"
5011
5012 fi
5013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5014   echo "$ac_t""yes" 1>&6
5015     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5016     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5017   cat >> confdefs.h <<EOF
5018 #define $ac_tr_lib 1
5019 EOF
5020
5021   LIBS="-lnet $LIBS"
5022
5023 else
5024   echo "$ac_t""no" 1>&6
5025 fi
5026
5027         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5028 echo "configure:5029: checking for main in -lnsl_s" >&5
5029 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5030 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5031   echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033   ac_save_LIBS="$LIBS"
5034 LIBS="-lnsl_s  $LIBS"
5035 cat > conftest.$ac_ext <<EOF
5036 #line 5037 "configure"
5037 #include "confdefs.h"
5038
5039 int main() {
5040 main()
5041 ; return 0; }
5042 EOF
5043 if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5044   rm -rf conftest*
5045   eval "ac_cv_lib_$ac_lib_var=yes"
5046 else
5047   echo "configure: failed program was:" >&5
5048   cat conftest.$ac_ext >&5
5049   rm -rf conftest*
5050   eval "ac_cv_lib_$ac_lib_var=no"
5051 fi
5052 rm -f conftest*
5053 LIBS="$ac_save_LIBS"
5054
5055 fi
5056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5057   echo "$ac_t""yes" 1>&6
5058     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5059     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5060   cat >> confdefs.h <<EOF
5061 #define $ac_tr_lib 1
5062 EOF
5063
5064   LIBS="-lnsl_s $LIBS"
5065
5066 else
5067   echo "$ac_t""no" 1>&6
5068 fi
5069
5070         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5071 echo "configure:5072: checking for main in -lnsl" >&5
5072 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5073 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5074   echo $ac_n "(cached) $ac_c" 1>&6
5075 else
5076   ac_save_LIBS="$LIBS"
5077 LIBS="-lnsl  $LIBS"
5078 cat > conftest.$ac_ext <<EOF
5079 #line 5080 "configure"
5080 #include "confdefs.h"
5081
5082 int main() {
5083 main()
5084 ; return 0; }
5085 EOF
5086 if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5087   rm -rf conftest*
5088   eval "ac_cv_lib_$ac_lib_var=yes"
5089 else
5090   echo "configure: failed program was:" >&5
5091   cat conftest.$ac_ext >&5
5092   rm -rf conftest*
5093   eval "ac_cv_lib_$ac_lib_var=no"
5094 fi
5095 rm -f conftest*
5096 LIBS="$ac_save_LIBS"
5097
5098 fi
5099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5100   echo "$ac_t""yes" 1>&6
5101     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5102     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5103   cat >> confdefs.h <<EOF
5104 #define $ac_tr_lib 1
5105 EOF
5106
5107   LIBS="-lnsl $LIBS"
5108
5109 else
5110   echo "$ac_t""no" 1>&6
5111 fi
5112
5113         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5114 echo "configure:5115: checking for socket in -linet" >&5
5115 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5117   echo $ac_n "(cached) $ac_c" 1>&6
5118 else
5119   ac_save_LIBS="$LIBS"
5120 LIBS="-linet  $LIBS"
5121 cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124 /* Override any gcc2 internal prototype to avoid an error.  */
5125 /* We use char because int might match the return type of a gcc2
5126     builtin and then its argument prototype would still apply.  */
5127 char socket();
5128
5129 int main() {
5130 socket()
5131 ; return 0; }
5132 EOF
5133 if { (eval echo configure:5134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5134   rm -rf conftest*
5135   eval "ac_cv_lib_$ac_lib_var=yes"
5136 else
5137   echo "configure: failed program was:" >&5
5138   cat conftest.$ac_ext >&5
5139   rm -rf conftest*
5140   eval "ac_cv_lib_$ac_lib_var=no"
5141 fi
5142 rm -f conftest*
5143 LIBS="$ac_save_LIBS"
5144
5145 fi
5146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5147   echo "$ac_t""yes" 1>&6
5148     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5149     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5150   cat >> confdefs.h <<EOF
5151 #define $ac_tr_lib 1
5152 EOF
5153
5154   LIBS="-linet $LIBS"
5155
5156 else
5157   echo "$ac_t""no" 1>&6
5158 fi
5159
5160         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5161 echo "configure:5162: checking for main in -lgen" >&5
5162 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5164   echo $ac_n "(cached) $ac_c" 1>&6
5165 else
5166   ac_save_LIBS="$LIBS"
5167 LIBS="-lgen  $LIBS"
5168 cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171
5172 int main() {
5173 main()
5174 ; return 0; }
5175 EOF
5176 if { (eval echo configure:5177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5177   rm -rf conftest*
5178   eval "ac_cv_lib_$ac_lib_var=yes"
5179 else
5180   echo "configure: failed program was:" >&5
5181   cat conftest.$ac_ext >&5
5182   rm -rf conftest*
5183   eval "ac_cv_lib_$ac_lib_var=no"
5184 fi
5185 rm -f conftest*
5186 LIBS="$ac_save_LIBS"
5187
5188 fi
5189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5190   echo "$ac_t""yes" 1>&6
5191     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5192     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5193   cat >> confdefs.h <<EOF
5194 #define $ac_tr_lib 1
5195 EOF
5196
5197   LIBS="-lgen $LIBS"
5198
5199 else
5200   echo "$ac_t""no" 1>&6
5201 fi
5202
5203
5204 fi
5205
5206
5207 echo $ac_n "checking for select""... $ac_c" 1>&6
5208 echo "configure:5209: checking for select" >&5
5209 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5210   echo $ac_n "(cached) $ac_c" 1>&6
5211 else
5212   cat > conftest.$ac_ext <<EOF
5213 #line 5214 "configure"
5214 #include "confdefs.h"
5215 /* System header to define __stub macros and hopefully few prototypes,
5216     which can conflict with char select(); below.  */
5217 #include <assert.h>
5218 /* Override any gcc2 internal prototype to avoid an error.  */
5219 /* We use char because int might match the return type of a gcc2
5220     builtin and then its argument prototype would still apply.  */
5221 char select();
5222 char (*f)();
5223
5224 int main() {
5225
5226 /* The GNU C library defines this for functions which it implements
5227     to always fail with ENOSYS.  Some functions are actually named
5228     something starting with __ and the normal name is an alias.  */
5229 #if defined (__stub_select) || defined (__stub___select)
5230 choke me
5231 #else
5232 f = select;
5233 #endif
5234
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   eval "ac_cv_func_select=yes"
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   rm -rf conftest*
5244   eval "ac_cv_func_select=no"
5245 fi
5246 rm -f conftest*
5247 fi
5248
5249 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5250   echo "$ac_t""yes" 1>&6
5251   :
5252 else
5253   echo "$ac_t""no" 1>&6
5254 { echo "configure: error: select() required." 1>&2; exit 1; }
5255 fi
5256
5257
5258 if test "${ac_cv_header_winsock_h}" != yes; then
5259                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5260 echo "configure:5261: checking types of arguments for select()" >&5
5261  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5262   echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5268   echo $ac_n "(cached) $ac_c" 1>&6
5269 else
5270      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5271      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5272       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5273        cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 #ifdef HAVE_SYS_TYPES_H
5277 #include <sys/types.h>
5278 #endif
5279 #ifdef HAVE_SYS_TIME_H
5280 #include <sys/time.h>
5281 #endif
5282 #ifdef HAVE_SYS_SELECT_H
5283 #include <sys/select.h>
5284 #endif
5285 #ifdef HAVE_SYS_SOCKET_H
5286 #include <sys/socket.h>
5287 #endif
5288 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);
5289 int main() {
5290
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5294   rm -rf conftest*
5295           ac_not_found=no ; break 3
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299   rm -rf conftest*
5300   ac_not_found=yes
5301 fi
5302 rm -f conftest*
5303       done
5304      done
5305     done
5306    
5307 fi
5308   
5309 fi
5310  
5311 fi
5312  if test "$ac_not_found" = yes; then
5313   ac_cv_func_select_arg1=int 
5314   ac_cv_func_select_arg234='int *' 
5315   ac_cv_func_select_arg5='struct timeval *'
5316  fi
5317  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5318  cat >> confdefs.h <<EOF
5319 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5320 EOF
5321
5322  cat >> confdefs.h <<EOF
5323 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5324 EOF
5325
5326  cat >> confdefs.h <<EOF
5327 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5328 EOF
5329
5330
5331 fi
5332
5333
5334 for ac_hdr in regex.h 
5335 do
5336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5338 echo "configure:5339: checking for $ac_hdr" >&5
5339 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5340   echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342   cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345 #include <$ac_hdr>
5346 EOF
5347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5348 { (eval echo configure:5349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5350 if test -z "$ac_err"; then
5351   rm -rf conftest*
5352   eval "ac_cv_header_$ac_safe=yes"
5353 else
5354   echo "$ac_err" >&5
5355   echo "configure: failed program was:" >&5
5356   cat conftest.$ac_ext >&5
5357   rm -rf conftest*
5358   eval "ac_cv_header_$ac_safe=no"
5359 fi
5360 rm -f conftest*
5361 fi
5362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5363   echo "$ac_t""yes" 1>&6
5364     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5365   cat >> confdefs.h <<EOF
5366 #define $ac_tr_hdr 1
5367 EOF
5368  
5369 else
5370   echo "$ac_t""no" 1>&6
5371 fi
5372 done
5373
5374 if test "$ac_cv_header_regex_h" != yes ; then
5375         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5376 fi
5377 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5378 echo "configure:5379: checking for regfree" >&5
5379 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5380   echo $ac_n "(cached) $ac_c" 1>&6
5381 else
5382   cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385 /* System header to define __stub macros and hopefully few prototypes,
5386     which can conflict with char regfree(); below.  */
5387 #include <assert.h>
5388 /* Override any gcc2 internal prototype to avoid an error.  */
5389 /* We use char because int might match the return type of a gcc2
5390     builtin and then its argument prototype would still apply.  */
5391 char regfree();
5392 char (*f)();
5393
5394 int main() {
5395
5396 /* The GNU C library defines this for functions which it implements
5397     to always fail with ENOSYS.  Some functions are actually named
5398     something starting with __ and the normal name is an alias.  */
5399 #if defined (__stub_regfree) || defined (__stub___regfree)
5400 choke me
5401 #else
5402 f = regfree;
5403 #endif
5404
5405 ; return 0; }
5406 EOF
5407 if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5408   rm -rf conftest*
5409   eval "ac_cv_func_regfree=yes"
5410 else
5411   echo "configure: failed program was:" >&5
5412   cat conftest.$ac_ext >&5
5413   rm -rf conftest*
5414   eval "ac_cv_func_regfree=no"
5415 fi
5416 rm -f conftest*
5417 fi
5418
5419 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5420   echo "$ac_t""yes" 1>&6
5421   :
5422 else
5423   echo "$ac_t""no" 1>&6
5424 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5425 fi
5426
5427
5428
5429 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5430 echo "configure:5431: checking for compatible POSIX regex" >&5
5431 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5432   echo $ac_n "(cached) $ac_c" 1>&6
5433 else
5434   
5435         if test "$cross_compiling" = yes; then
5436   ol_cv_c_posix_regex=cross
5437 else
5438   cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441
5442 #include <sys/types.h>
5443 #include <regex.h>
5444 static char *pattern, *string;
5445 main()
5446 {
5447         int rc;
5448         regex_t re;
5449
5450         pattern = "^A";
5451
5452         if(regcomp(&re, pattern, 0)) {
5453                 return -1;
5454         }
5455         
5456         string = "ALL MATCH";
5457         
5458         rc = regexec(&re, string, 0, (void*)0, 0);
5459
5460         regfree(&re);
5461
5462         return rc;
5463 }
5464 EOF
5465 if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5466 then
5467   ol_cv_c_posix_regex=yes
5468 else
5469   echo "configure: failed program was:" >&5
5470   cat conftest.$ac_ext >&5
5471   rm -fr conftest*
5472   ol_cv_c_posix_regex=no
5473 fi
5474 rm -fr conftest*
5475 fi
5476
5477 fi
5478
5479 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5480
5481 if test "$ol_cv_c_posix_regex" = no ; then
5482         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5483 fi
5484
5485 ol_link_dnssrv=no
5486 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5487 echo "configure:5488: checking for res_query" >&5
5488 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5489   echo $ac_n "(cached) $ac_c" 1>&6
5490 else
5491   cat > conftest.$ac_ext <<EOF
5492 #line 5493 "configure"
5493 #include "confdefs.h"
5494 /* System header to define __stub macros and hopefully few prototypes,
5495     which can conflict with char res_query(); below.  */
5496 #include <assert.h>
5497 /* Override any gcc2 internal prototype to avoid an error.  */
5498 /* We use char because int might match the return type of a gcc2
5499     builtin and then its argument prototype would still apply.  */
5500 char res_query();
5501 char (*f)();
5502
5503 int main() {
5504
5505 /* The GNU C library defines this for functions which it implements
5506     to always fail with ENOSYS.  Some functions are actually named
5507     something starting with __ and the normal name is an alias.  */
5508 #if defined (__stub_res_query) || defined (__stub___res_query)
5509 choke me
5510 #else
5511 f = res_query;
5512 #endif
5513
5514 ; return 0; }
5515 EOF
5516 if { (eval echo configure:5517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5517   rm -rf conftest*
5518   eval "ac_cv_func_res_query=yes"
5519 else
5520   echo "configure: failed program was:" >&5
5521   cat conftest.$ac_ext >&5
5522   rm -rf conftest*
5523   eval "ac_cv_func_res_query=no"
5524 fi
5525 rm -f conftest*
5526 fi
5527
5528 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5529   echo "$ac_t""yes" 1>&6
5530   :
5531 else
5532   echo "$ac_t""no" 1>&6
5533 fi
5534
5535 if test $ac_cv_func_res_query = no ; then 
5536         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5537 echo "configure:5538: checking for res_query in -lbind" >&5
5538 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5540   echo $ac_n "(cached) $ac_c" 1>&6
5541 else
5542   ac_save_LIBS="$LIBS"
5543 LIBS="-lbind  $LIBS"
5544 cat > conftest.$ac_ext <<EOF
5545 #line 5546 "configure"
5546 #include "confdefs.h"
5547 /* Override any gcc2 internal prototype to avoid an error.  */
5548 /* We use char because int might match the return type of a gcc2
5549     builtin and then its argument prototype would still apply.  */
5550 char res_query();
5551
5552 int main() {
5553 res_query()
5554 ; return 0; }
5555 EOF
5556 if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5557   rm -rf conftest*
5558   eval "ac_cv_lib_$ac_lib_var=yes"
5559 else
5560   echo "configure: failed program was:" >&5
5561   cat conftest.$ac_ext >&5
5562   rm -rf conftest*
5563   eval "ac_cv_lib_$ac_lib_var=no"
5564 fi
5565 rm -f conftest*
5566 LIBS="$ac_save_LIBS"
5567
5568 fi
5569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5570   echo "$ac_t""yes" 1>&6
5571     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5572     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5573   cat >> confdefs.h <<EOF
5574 #define $ac_tr_lib 1
5575 EOF
5576
5577   LIBS="-lbind $LIBS"
5578
5579 else
5580   echo "$ac_t""no" 1>&6
5581 fi
5582
5583         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5584 fi
5585
5586 if test $ac_cv_func_res_query = no ; then 
5587         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5588 echo "configure:5589: checking for __res_query in -lbind" >&5
5589 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5590 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5591   echo $ac_n "(cached) $ac_c" 1>&6
5592 else
5593   ac_save_LIBS="$LIBS"
5594 LIBS="-lbind  $LIBS"
5595 cat > conftest.$ac_ext <<EOF
5596 #line 5597 "configure"
5597 #include "confdefs.h"
5598 /* Override any gcc2 internal prototype to avoid an error.  */
5599 /* We use char because int might match the return type of a gcc2
5600     builtin and then its argument prototype would still apply.  */
5601 char __res_query();
5602
5603 int main() {
5604 __res_query()
5605 ; return 0; }
5606 EOF
5607 if { (eval echo configure:5608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5608   rm -rf conftest*
5609   eval "ac_cv_lib_$ac_lib_var=yes"
5610 else
5611   echo "configure: failed program was:" >&5
5612   cat conftest.$ac_ext >&5
5613   rm -rf conftest*
5614   eval "ac_cv_lib_$ac_lib_var=no"
5615 fi
5616 rm -f conftest*
5617 LIBS="$ac_save_LIBS"
5618
5619 fi
5620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5621   echo "$ac_t""yes" 1>&6
5622     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5623     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5624   cat >> confdefs.h <<EOF
5625 #define $ac_tr_lib 1
5626 EOF
5627
5628   LIBS="-lbind $LIBS"
5629
5630 else
5631   echo "$ac_t""no" 1>&6
5632 fi
5633
5634         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5635 fi
5636
5637 if test $ac_cv_func_res_query = no ; then 
5638         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5639 echo "configure:5640: checking for res_query in -lresolv" >&5
5640 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5642   echo $ac_n "(cached) $ac_c" 1>&6
5643 else
5644   ac_save_LIBS="$LIBS"
5645 LIBS="-lresolv  $LIBS"
5646 cat > conftest.$ac_ext <<EOF
5647 #line 5648 "configure"
5648 #include "confdefs.h"
5649 /* Override any gcc2 internal prototype to avoid an error.  */
5650 /* We use char because int might match the return type of a gcc2
5651     builtin and then its argument prototype would still apply.  */
5652 char res_query();
5653
5654 int main() {
5655 res_query()
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_lib_$ac_lib_var=no"
5666 fi
5667 rm -f conftest*
5668 LIBS="$ac_save_LIBS"
5669
5670 fi
5671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5672   echo "$ac_t""yes" 1>&6
5673     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5674     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5675   cat >> confdefs.h <<EOF
5676 #define $ac_tr_lib 1
5677 EOF
5678
5679   LIBS="-lresolv $LIBS"
5680
5681 else
5682   echo "$ac_t""no" 1>&6
5683 fi
5684
5685         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5686 fi
5687
5688 if test "$ac_cv_func_res_query" = yes ; then
5689         cat >> confdefs.h <<\EOF
5690 #define HAVE_RES_QUERY 1
5691 EOF
5692
5693
5694         if test $ol_enable_dnssrv != no ; then
5695                 ol_link_dnssrv=yes
5696         fi
5697 fi
5698
5699 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5700         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5701 fi
5702
5703 for ac_func in getaddrinfo 
5704 do
5705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5706 echo "configure:5707: checking for $ac_func" >&5
5707 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5708   echo $ac_n "(cached) $ac_c" 1>&6
5709 else
5710   cat > conftest.$ac_ext <<EOF
5711 #line 5712 "configure"
5712 #include "confdefs.h"
5713 /* System header to define __stub macros and hopefully few prototypes,
5714     which can conflict with char $ac_func(); below.  */
5715 #include <assert.h>
5716 /* Override any gcc2 internal prototype to avoid an error.  */
5717 /* We use char because int might match the return type of a gcc2
5718     builtin and then its argument prototype would still apply.  */
5719 char $ac_func();
5720 char (*f)();
5721
5722 int main() {
5723
5724 /* The GNU C library defines this for functions which it implements
5725     to always fail with ENOSYS.  Some functions are actually named
5726     something starting with __ and the normal name is an alias.  */
5727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5728 choke me
5729 #else
5730 f = $ac_func;
5731 #endif
5732
5733 ; return 0; }
5734 EOF
5735 if { (eval echo configure:5736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5736   rm -rf conftest*
5737   eval "ac_cv_func_$ac_func=yes"
5738 else
5739   echo "configure: failed program was:" >&5
5740   cat conftest.$ac_ext >&5
5741   rm -rf conftest*
5742   eval "ac_cv_func_$ac_func=no"
5743 fi
5744 rm -f conftest*
5745 fi
5746
5747 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5748   echo "$ac_t""yes" 1>&6
5749     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5750   cat >> confdefs.h <<EOF
5751 #define $ac_tr_func 1
5752 EOF
5753  
5754 else
5755   echo "$ac_t""no" 1>&6
5756 fi
5757 done
5758
5759
5760 ol_link_ipv6=no
5761 if test $ac_cv_func_getaddrinfo = no ; then
5762         if test $ol_enable_ipv6 = yes ; then
5763                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5764         fi
5765 else
5766         for ac_func in gai_strerror 
5767 do
5768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5769 echo "configure:5770: checking for $ac_func" >&5
5770 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5771   echo $ac_n "(cached) $ac_c" 1>&6
5772 else
5773   cat > conftest.$ac_ext <<EOF
5774 #line 5775 "configure"
5775 #include "confdefs.h"
5776 /* System header to define __stub macros and hopefully few prototypes,
5777     which can conflict with char $ac_func(); below.  */
5778 #include <assert.h>
5779 /* Override any gcc2 internal prototype to avoid an error.  */
5780 /* We use char because int might match the return type of a gcc2
5781     builtin and then its argument prototype would still apply.  */
5782 char $ac_func();
5783 char (*f)();
5784
5785 int main() {
5786
5787 /* The GNU C library defines this for functions which it implements
5788     to always fail with ENOSYS.  Some functions are actually named
5789     something starting with __ and the normal name is an alias.  */
5790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5791 choke me
5792 #else
5793 f = $ac_func;
5794 #endif
5795
5796 ; return 0; }
5797 EOF
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5799   rm -rf conftest*
5800   eval "ac_cv_func_$ac_func=yes"
5801 else
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   eval "ac_cv_func_$ac_func=no"
5806 fi
5807 rm -f conftest*
5808 fi
5809
5810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5811   echo "$ac_t""yes" 1>&6
5812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5813   cat >> confdefs.h <<EOF
5814 #define $ac_tr_func 1
5815 EOF
5816  
5817 else
5818   echo "$ac_t""no" 1>&6
5819 fi
5820 done
5821
5822
5823         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5824 echo "configure:5825: checking INET6_ADDRSTRLEN" >&5
5825 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5826   echo $ac_n "(cached) $ac_c" 1>&6
5827 else
5828   
5829                 cat > conftest.$ac_ext <<EOF
5830 #line 5831 "configure"
5831 #include "confdefs.h"
5832
5833 #                       include <netinet/in.h>
5834 #                       ifdef INET6_ADDRSTRLEN
5835                                 __has_inet6_addrstrlen__;
5836 #                       endif
5837                 
5838 EOF
5839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5840   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5841   rm -rf conftest*
5842   ol_cv_inet6_addrstrlen=yes
5843 else
5844   rm -rf conftest*
5845   ol_cv_inet6_addrstrlen=no
5846 fi
5847 rm -f conftest*
5848
5849 fi
5850
5851 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5852
5853         if test $ol_cv_inet6_addrstrlen = yes ; then
5854                 ol_link_ipv6=yes
5855         elif test $ol_enable_ipv6 = yes ; then
5856                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5857         fi
5858 fi
5859
5860 if test $ol_enable_local != no ; then
5861         for ac_hdr in sys/un.h 
5862 do
5863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5865 echo "configure:5866: checking for $ac_hdr" >&5
5866 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5867   echo $ac_n "(cached) $ac_c" 1>&6
5868 else
5869   cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872 #include <$ac_hdr>
5873 EOF
5874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5875 { (eval echo configure:5876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5877 if test -z "$ac_err"; then
5878   rm -rf conftest*
5879   eval "ac_cv_header_$ac_safe=yes"
5880 else
5881   echo "$ac_err" >&5
5882   echo "configure: failed program was:" >&5
5883   cat conftest.$ac_ext >&5
5884   rm -rf conftest*
5885   eval "ac_cv_header_$ac_safe=no"
5886 fi
5887 rm -f conftest*
5888 fi
5889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5890   echo "$ac_t""yes" 1>&6
5891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5892   cat >> confdefs.h <<EOF
5893 #define $ac_tr_hdr 1
5894 EOF
5895  
5896 else
5897   echo "$ac_t""no" 1>&6
5898 fi
5899 done
5900
5901
5902         if test $ol_enable_local = auto ; then
5903                 ol_enable_local=$ac_cv_header_sys_un_h
5904         elif test $ac_cv_header_sys_un_h = no ; then
5905                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5906         fi
5907 fi
5908
5909 ol_link_kbind=no
5910 ol_link_kpasswd=no
5911 ol_link_krb5=no
5912 ol_link_krb4=no
5913
5914 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5915         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5916         -o $ol_with_kerberos = k425 ; then
5917
5918         for ac_hdr in krb5.h
5919 do
5920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5922 echo "configure:5923: checking for $ac_hdr" >&5
5923 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5924   echo $ac_n "(cached) $ac_c" 1>&6
5925 else
5926   cat > conftest.$ac_ext <<EOF
5927 #line 5928 "configure"
5928 #include "confdefs.h"
5929 #include <$ac_hdr>
5930 EOF
5931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5932 { (eval echo configure:5933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5934 if test -z "$ac_err"; then
5935   rm -rf conftest*
5936   eval "ac_cv_header_$ac_safe=yes"
5937 else
5938   echo "$ac_err" >&5
5939   echo "configure: failed program was:" >&5
5940   cat conftest.$ac_ext >&5
5941   rm -rf conftest*
5942   eval "ac_cv_header_$ac_safe=no"
5943 fi
5944 rm -f conftest*
5945 fi
5946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5947   echo "$ac_t""yes" 1>&6
5948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5949   cat >> confdefs.h <<EOF
5950 #define $ac_tr_hdr 1
5951 EOF
5952  
5953 else
5954   echo "$ac_t""no" 1>&6
5955 fi
5956 done
5957
5958
5959         if test $ac_cv_header_krb5_h = yes ; then
5960                                 for ac_hdr in heim_err.h
5961 do
5962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5964 echo "configure:5965: checking for $ac_hdr" >&5
5965 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5966   echo $ac_n "(cached) $ac_c" 1>&6
5967 else
5968   cat > conftest.$ac_ext <<EOF
5969 #line 5970 "configure"
5970 #include "confdefs.h"
5971 #include <$ac_hdr>
5972 EOF
5973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5974 { (eval echo configure:5975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5976 if test -z "$ac_err"; then
5977   rm -rf conftest*
5978   eval "ac_cv_header_$ac_safe=yes"
5979 else
5980   echo "$ac_err" >&5
5981   echo "configure: failed program was:" >&5
5982   cat conftest.$ac_ext >&5
5983   rm -rf conftest*
5984   eval "ac_cv_header_$ac_safe=no"
5985 fi
5986 rm -f conftest*
5987 fi
5988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5989   echo "$ac_t""yes" 1>&6
5990     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5991   cat >> confdefs.h <<EOF
5992 #define $ac_tr_hdr 1
5993 EOF
5994  
5995 else
5996   echo "$ac_t""no" 1>&6
5997 fi
5998 done
5999
6000                 if test $ac_cv_header_heim_err_h = yes ; then
6001                         krb5_impl=heimdal
6002                 else
6003                         krb5_impl=mit
6004                 fi
6005
6006                 if test $krb5_impl = mit; then
6007                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6008 echo "configure:6009: checking for main in -lkrb5" >&5
6009 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6011   echo $ac_n "(cached) $ac_c" 1>&6
6012 else
6013   ac_save_LIBS="$LIBS"
6014 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6015 cat > conftest.$ac_ext <<EOF
6016 #line 6017 "configure"
6017 #include "confdefs.h"
6018
6019 int main() {
6020 main()
6021 ; return 0; }
6022 EOF
6023 if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6024   rm -rf conftest*
6025   eval "ac_cv_lib_$ac_lib_var=yes"
6026 else
6027   echo "configure: failed program was:" >&5
6028   cat conftest.$ac_ext >&5
6029   rm -rf conftest*
6030   eval "ac_cv_lib_$ac_lib_var=no"
6031 fi
6032 rm -f conftest*
6033 LIBS="$ac_save_LIBS"
6034
6035 fi
6036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6037   echo "$ac_t""yes" 1>&6
6038   have_krb5=yes
6039                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6040 else
6041   echo "$ac_t""no" 1>&6
6042 have_krb5=no
6043 fi
6044
6045
6046                 elif test $krb5_impl = heimdal; then
6047                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6048 echo "configure:6049: checking for main in -lkrb5" >&5
6049 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6051   echo $ac_n "(cached) $ac_c" 1>&6
6052 else
6053   ac_save_LIBS="$LIBS"
6054 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6055 cat > conftest.$ac_ext <<EOF
6056 #line 6057 "configure"
6057 #include "confdefs.h"
6058
6059 int main() {
6060 main()
6061 ; return 0; }
6062 EOF
6063 if { (eval echo configure:6064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6064   rm -rf conftest*
6065   eval "ac_cv_lib_$ac_lib_var=yes"
6066 else
6067   echo "configure: failed program was:" >&5
6068   cat conftest.$ac_ext >&5
6069   rm -rf conftest*
6070   eval "ac_cv_lib_$ac_lib_var=no"
6071 fi
6072 rm -f conftest*
6073 LIBS="$ac_save_LIBS"
6074
6075 fi
6076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6077   echo "$ac_t""yes" 1>&6
6078   have_krb5=yes
6079                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6080 else
6081   echo "$ac_t""no" 1>&6
6082 have_krb5=no
6083 fi
6084
6085
6086                         cat >> confdefs.h <<\EOF
6087 #define HAVE_HEIMDAL_KERBEROS 1
6088 EOF
6089
6090                 else
6091                         have_krb5=no
6092                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6093                 fi
6094
6095                 if test $have_krb5 = yes ; then
6096                         ol_link_krb5=yes
6097
6098                         cat >> confdefs.h <<\EOF
6099 #define HAVE_KRB5 1
6100 EOF
6101
6102
6103                         if test $ol_enable_kpasswd != no ; then
6104                                 ol_link_kpasswd=yes;
6105                         fi
6106
6107                         if test $ol_with_kerberos = k5only ; then
6108                                 ol_with_kerberos=found
6109                         fi
6110
6111                 elif test $ol_with_kerberos != auto ; then
6112                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6113                 fi
6114
6115         fi
6116 fi
6117
6118 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6119         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6120
6121         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6122 do
6123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6125 echo "configure:6126: checking for $ac_hdr" >&5
6126 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6127   echo $ac_n "(cached) $ac_c" 1>&6
6128 else
6129   cat > conftest.$ac_ext <<EOF
6130 #line 6131 "configure"
6131 #include "confdefs.h"
6132 #include <$ac_hdr>
6133 EOF
6134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6135 { (eval echo configure:6136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6137 if test -z "$ac_err"; then
6138   rm -rf conftest*
6139   eval "ac_cv_header_$ac_safe=yes"
6140 else
6141   echo "$ac_err" >&5
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144   rm -rf conftest*
6145   eval "ac_cv_header_$ac_safe=no"
6146 fi
6147 rm -f conftest*
6148 fi
6149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6150   echo "$ac_t""yes" 1>&6
6151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6152   cat >> confdefs.h <<EOF
6153 #define $ac_tr_hdr 1
6154 EOF
6155  
6156 else
6157   echo "$ac_t""no" 1>&6
6158 fi
6159 done
6160
6161
6162         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6163                 if test $krb5_impl = mit; then
6164                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6165 echo "configure:6166: checking for main in -lkrb4" >&5
6166 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6167 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6168   echo $ac_n "(cached) $ac_c" 1>&6
6169 else
6170   ac_save_LIBS="$LIBS"
6171 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6172 cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175
6176 int main() {
6177 main()
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181   rm -rf conftest*
6182   eval "ac_cv_lib_$ac_lib_var=yes"
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   eval "ac_cv_lib_$ac_lib_var=no"
6188 fi
6189 rm -f conftest*
6190 LIBS="$ac_save_LIBS"
6191
6192 fi
6193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6194   echo "$ac_t""yes" 1>&6
6195   have_k425=yes
6196                                 KRB4_LIBS="-lkrb4 -ldes425"
6197 else
6198   echo "$ac_t""no" 1>&6
6199 have_k425=no
6200 fi
6201
6202
6203                 elif test $krb5_impl = heimdal; then
6204                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6205 echo "configure:6206: checking for main in -lkrb4" >&5
6206 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6208   echo $ac_n "(cached) $ac_c" 1>&6
6209 else
6210   ac_save_LIBS="$LIBS"
6211 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6212 cat > conftest.$ac_ext <<EOF
6213 #line 6214 "configure"
6214 #include "confdefs.h"
6215
6216 int main() {
6217 main()
6218 ; return 0; }
6219 EOF
6220 if { (eval echo configure:6221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6221   rm -rf conftest*
6222   eval "ac_cv_lib_$ac_lib_var=yes"
6223 else
6224   echo "configure: failed program was:" >&5
6225   cat conftest.$ac_ext >&5
6226   rm -rf conftest*
6227   eval "ac_cv_lib_$ac_lib_var=no"
6228 fi
6229 rm -f conftest*
6230 LIBS="$ac_save_LIBS"
6231
6232 fi
6233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6234   echo "$ac_t""yes" 1>&6
6235   have_k425=yes
6236                                 KRB4_LIBS="-lkrb4"
6237 else
6238   echo "$ac_t""no" 1>&6
6239 have_k425=no
6240 fi
6241
6242
6243                 else
6244                         have_425=no
6245                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6246                 fi
6247
6248                 if test $have_k425 = yes ; then
6249                         ol_with_kerberos=found
6250                         ol_link_krb4=yes
6251
6252                         cat >> confdefs.h <<\EOF
6253 #define HAVE_KRB425 1
6254 EOF
6255
6256                         cat >> confdefs.h <<\EOF
6257 #define HAVE_KRB4 1
6258 EOF
6259
6260
6261                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6262 echo "configure:6263: checking for des_debug in Kerberos libraries" >&5
6263 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6264   echo $ac_n "(cached) $ac_c" 1>&6
6265 else
6266   
6267                                                                 save_LIBS="$LIBS"
6268                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6269                                 cat > conftest.$ac_ext <<EOF
6270 #line 6271 "configure"
6271 #include "confdefs.h"
6272
6273 #include <kerberosIV/krb.h>
6274 #include <kerberosIV/des.h>
6275 extern int des_debug;
6276
6277 int main() {
6278
6279 des_debug = 1;
6280
6281 ; return 0; }
6282 EOF
6283 if { (eval echo configure:6284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6284   rm -rf conftest*
6285   ol_cv_var_des_debug=yes
6286 else
6287   echo "configure: failed program was:" >&5
6288   cat conftest.$ac_ext >&5
6289   rm -rf conftest*
6290   ol_cv_var_des_debug=no
6291 fi
6292 rm -f conftest*
6293                                                                 LIBS="$save_LIBS"
6294                         
6295 fi
6296
6297 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6298
6299                         if test $ol_cv_var_des_debug = yes ; then
6300                                 cat >> confdefs.h <<\EOF
6301 #define HAVE_DES_DEBUG 1
6302 EOF
6303
6304                         fi
6305
6306                         LIBS="$save_LIBS"
6307                 fi
6308         fi
6309 fi
6310
6311 if test $ol_link_krb5 = yes ; then
6312         ol_with_kerberos=found
6313 fi
6314
6315 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6316         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6317
6318         for ac_hdr in krb.h des.h krb-archaeology.h 
6319 do
6320 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6321 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6322 echo "configure:6323: checking for $ac_hdr" >&5
6323 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6324   echo $ac_n "(cached) $ac_c" 1>&6
6325 else
6326   cat > conftest.$ac_ext <<EOF
6327 #line 6328 "configure"
6328 #include "confdefs.h"
6329 #include <$ac_hdr>
6330 EOF
6331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6332 { (eval echo configure:6333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6334 if test -z "$ac_err"; then
6335   rm -rf conftest*
6336   eval "ac_cv_header_$ac_safe=yes"
6337 else
6338   echo "$ac_err" >&5
6339   echo "configure: failed program was:" >&5
6340   cat conftest.$ac_ext >&5
6341   rm -rf conftest*
6342   eval "ac_cv_header_$ac_safe=no"
6343 fi
6344 rm -f conftest*
6345 fi
6346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6347   echo "$ac_t""yes" 1>&6
6348     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6349   cat >> confdefs.h <<EOF
6350 #define $ac_tr_hdr 1
6351 EOF
6352  
6353 else
6354   echo "$ac_t""no" 1>&6
6355 fi
6356 done
6357
6358
6359         if test $ac_cv_header_krb_h = yes ; then
6360                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6361 echo "configure:6362: checking for main in -lkrb" >&5
6362 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6364   echo $ac_n "(cached) $ac_c" 1>&6
6365 else
6366   ac_save_LIBS="$LIBS"
6367 LIBS="-lkrb -ldes $LIBS"
6368 cat > conftest.$ac_ext <<EOF
6369 #line 6370 "configure"
6370 #include "confdefs.h"
6371
6372 int main() {
6373 main()
6374 ; return 0; }
6375 EOF
6376 if { (eval echo configure:6377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6377   rm -rf conftest*
6378   eval "ac_cv_lib_$ac_lib_var=yes"
6379 else
6380   echo "configure: failed program was:" >&5
6381   cat conftest.$ac_ext >&5
6382   rm -rf conftest*
6383   eval "ac_cv_lib_$ac_lib_var=no"
6384 fi
6385 rm -f conftest*
6386 LIBS="$ac_save_LIBS"
6387
6388 fi
6389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6390   echo "$ac_t""yes" 1>&6
6391   have_k4=yes
6392 else
6393   echo "$ac_t""no" 1>&6
6394 have_k4=no
6395 fi
6396
6397
6398                 if test $have_k4 = yes ; then
6399                         ol_with_kerberos=found
6400                         ol_link_krb4=yes
6401
6402                         cat >> confdefs.h <<\EOF
6403 #define HAVE_KRB4 1
6404 EOF
6405
6406
6407                         KRB4_LIBS="-lkrb -ldes"
6408
6409                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6410                                 cat >> confdefs.h <<\EOF
6411 #define HAVE_KTH_KERBEROS 1
6412 EOF
6413
6414                         fi
6415                 fi
6416         fi
6417 fi
6418
6419 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6420         ol_link_kpasswd=yes
6421 fi
6422
6423 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6424         ol_link_kbind=yes
6425
6426 elif test $ol_enable_kbind = yes ; then
6427         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6428 fi
6429
6430 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6431         cat >> confdefs.h <<\EOF
6432 #define HAVE_KERBEROS 1
6433 EOF
6434
6435
6436 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6437         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6438 fi
6439
6440 ol_link_tls=no
6441 if test $ol_with_tls != no ; then
6442         for ac_hdr in openssl/ssl.h ssl.h
6443 do
6444 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6445 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6446 echo "configure:6447: checking for $ac_hdr" >&5
6447 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6448   echo $ac_n "(cached) $ac_c" 1>&6
6449 else
6450   cat > conftest.$ac_ext <<EOF
6451 #line 6452 "configure"
6452 #include "confdefs.h"
6453 #include <$ac_hdr>
6454 EOF
6455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6456 { (eval echo configure:6457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6458 if test -z "$ac_err"; then
6459   rm -rf conftest*
6460   eval "ac_cv_header_$ac_safe=yes"
6461 else
6462   echo "$ac_err" >&5
6463   echo "configure: failed program was:" >&5
6464   cat conftest.$ac_ext >&5
6465   rm -rf conftest*
6466   eval "ac_cv_header_$ac_safe=no"
6467 fi
6468 rm -f conftest*
6469 fi
6470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6471   echo "$ac_t""yes" 1>&6
6472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6473   cat >> confdefs.h <<EOF
6474 #define $ac_tr_hdr 1
6475 EOF
6476  
6477 else
6478   echo "$ac_t""no" 1>&6
6479 fi
6480 done
6481
6482         
6483         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6484                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6485 echo "configure:6486: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6486 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6487 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6488   echo $ac_n "(cached) $ac_c" 1>&6
6489 else
6490   ac_save_LIBS="$LIBS"
6491 LIBS="-lssl -lcrypto $LIBS"
6492 cat > conftest.$ac_ext <<EOF
6493 #line 6494 "configure"
6494 #include "confdefs.h"
6495 /* Override any gcc2 internal prototype to avoid an error.  */
6496 /* We use char because int might match the return type of a gcc2
6497     builtin and then its argument prototype would still apply.  */
6498 char SSLeay_add_ssl_algorithms();
6499
6500 int main() {
6501 SSLeay_add_ssl_algorithms()
6502 ; return 0; }
6503 EOF
6504 if { (eval echo configure:6505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6505   rm -rf conftest*
6506   eval "ac_cv_lib_$ac_lib_var=yes"
6507 else
6508   echo "configure: failed program was:" >&5
6509   cat conftest.$ac_ext >&5
6510   rm -rf conftest*
6511   eval "ac_cv_lib_$ac_lib_var=no"
6512 fi
6513 rm -f conftest*
6514 LIBS="$ac_save_LIBS"
6515
6516 fi
6517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6518   echo "$ac_t""yes" 1>&6
6519   have_ssleay=yes
6520                         need_rsaref=no
6521 else
6522   echo "$ac_t""no" 1>&6
6523 have_ssleay=no
6524 fi
6525
6526                         
6527                 if test $have_ssleay = no ; then
6528                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6529 echo "configure:6530: checking for SSL_library_init in -lssl" >&5
6530 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6531 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6532   echo $ac_n "(cached) $ac_c" 1>&6
6533 else
6534   ac_save_LIBS="$LIBS"
6535 LIBS="-lssl -lcrypto $LIBS"
6536 cat > conftest.$ac_ext <<EOF
6537 #line 6538 "configure"
6538 #include "confdefs.h"
6539 /* Override any gcc2 internal prototype to avoid an error.  */
6540 /* We use char because int might match the return type of a gcc2
6541     builtin and then its argument prototype would still apply.  */
6542 char SSL_library_init();
6543
6544 int main() {
6545 SSL_library_init()
6546 ; return 0; }
6547 EOF
6548 if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6549   rm -rf conftest*
6550   eval "ac_cv_lib_$ac_lib_var=yes"
6551 else
6552   echo "configure: failed program was:" >&5
6553   cat conftest.$ac_ext >&5
6554   rm -rf conftest*
6555   eval "ac_cv_lib_$ac_lib_var=no"
6556 fi
6557 rm -f conftest*
6558 LIBS="$ac_save_LIBS"
6559
6560 fi
6561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6562   echo "$ac_t""yes" 1>&6
6563   have_ssleay=yes
6564                                 need_rsaref=no
6565 else
6566   echo "$ac_t""no" 1>&6
6567 have_ssleay=no
6568 fi
6569
6570                 fi
6571
6572                 if test $have_ssleay = no ; then
6573                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6574 echo "configure:6575: checking for ssl3_accept in -lssl" >&5
6575 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6576 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6577   echo $ac_n "(cached) $ac_c" 1>&6
6578 else
6579   ac_save_LIBS="$LIBS"
6580 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6581 cat > conftest.$ac_ext <<EOF
6582 #line 6583 "configure"
6583 #include "confdefs.h"
6584 /* Override any gcc2 internal prototype to avoid an error.  */
6585 /* We use char because int might match the return type of a gcc2
6586     builtin and then its argument prototype would still apply.  */
6587 char ssl3_accept();
6588
6589 int main() {
6590 ssl3_accept()
6591 ; return 0; }
6592 EOF
6593 if { (eval echo configure:6594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6594   rm -rf conftest*
6595   eval "ac_cv_lib_$ac_lib_var=yes"
6596 else
6597   echo "configure: failed program was:" >&5
6598   cat conftest.$ac_ext >&5
6599   rm -rf conftest*
6600   eval "ac_cv_lib_$ac_lib_var=no"
6601 fi
6602 rm -f conftest*
6603 LIBS="$ac_save_LIBS"
6604
6605 fi
6606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6607   echo "$ac_t""yes" 1>&6
6608   have_ssleay=yes
6609                                 need_rsaref=yes
6610 else
6611   echo "$ac_t""no" 1>&6
6612 have_ssleay=no
6613 fi
6614
6615                 fi
6616
6617                 if test $have_ssleay = yes ; then
6618                         ol_with_tls=found
6619                         ol_link_tls=yes
6620
6621                         cat >> confdefs.h <<\EOF
6622 #define HAVE_SSLEAY 1
6623 EOF
6624
6625
6626                         if test $need_rsaref = yes; then
6627                                 cat >> confdefs.h <<\EOF
6628 #define HAVE_RSAREF 1
6629 EOF
6630
6631
6632                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6633                         else
6634                                 TLS_LIBS="-lssl -lcrypto"
6635                         fi
6636                 fi
6637         fi
6638
6639 else
6640         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6641 fi
6642
6643 if test $ol_link_tls = yes ; then
6644         cat >> confdefs.h <<\EOF
6645 #define HAVE_TLS 1
6646 EOF
6647
6648
6649 elif test $ol_with_tls = auto ; then
6650         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6651         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6652
6653 elif test $ol_with_tls != no ; then
6654         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6655 fi
6656
6657 for ac_func in \
6658         ctime_r                 \
6659         gethostbyname_r gethostbyaddr_r \
6660
6661 do
6662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6663 echo "configure:6664: checking for $ac_func" >&5
6664 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 /* System header to define __stub macros and hopefully few prototypes,
6671     which can conflict with char $ac_func(); below.  */
6672 #include <assert.h>
6673 /* Override any gcc2 internal prototype to avoid an error.  */
6674 /* We use char because int might match the return type of a gcc2
6675     builtin and then its argument prototype would still apply.  */
6676 char $ac_func();
6677 char (*f)();
6678
6679 int main() {
6680
6681 /* The GNU C library defines this for functions which it implements
6682     to always fail with ENOSYS.  Some functions are actually named
6683     something starting with __ and the normal name is an alias.  */
6684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6685 choke me
6686 #else
6687 f = $ac_func;
6688 #endif
6689
6690 ; return 0; }
6691 EOF
6692 if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6693   rm -rf conftest*
6694   eval "ac_cv_func_$ac_func=yes"
6695 else
6696   echo "configure: failed program was:" >&5
6697   cat conftest.$ac_ext >&5
6698   rm -rf conftest*
6699   eval "ac_cv_func_$ac_func=no"
6700 fi
6701 rm -f conftest*
6702 fi
6703
6704 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6705   echo "$ac_t""yes" 1>&6
6706     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6707   cat >> confdefs.h <<EOF
6708 #define $ac_tr_func 1
6709 EOF
6710  
6711 else
6712   echo "$ac_t""no" 1>&6
6713 fi
6714 done
6715
6716
6717 if test "$ac_cv_func_ctime_r" = no ; then
6718         ol_cv_func_ctime_r_nargs=0
6719 else
6720         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6721 echo "configure:6722: checking number of arguments of ctime_r" >&5
6722 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6723   echo $ac_n "(cached) $ac_c" 1>&6
6724 else
6725   cat > conftest.$ac_ext <<EOF
6726 #line 6727 "configure"
6727 #include "confdefs.h"
6728 #include <time.h>
6729 int main() {
6730 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6731 ; return 0; }
6732 EOF
6733 if { (eval echo configure:6734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6734   rm -rf conftest*
6735   ol_cv_func_ctime_r_nargs3=yes
6736 else
6737   echo "configure: failed program was:" >&5
6738   cat conftest.$ac_ext >&5
6739   rm -rf conftest*
6740   ol_cv_func_ctime_r_nargs3=no
6741 fi
6742 rm -f conftest*
6743
6744         cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 #include <time.h>
6748 int main() {
6749 time_t ti; char *buffer; ctime_r(&ti,buffer);
6750 ; return 0; }
6751 EOF
6752 if { (eval echo configure:6753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6753   rm -rf conftest*
6754   ol_cv_func_ctime_r_nargs2=yes
6755 else
6756   echo "configure: failed program was:" >&5
6757   cat conftest.$ac_ext >&5
6758   rm -rf conftest*
6759   ol_cv_func_ctime_r_nargs2=no
6760 fi
6761 rm -f conftest*
6762
6763         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6764                 $ol_cv_func_ctime_r_nargs2 = no ; then
6765
6766                 ol_cv_func_ctime_r_nargs=3
6767
6768         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6769                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6770
6771                 ol_cv_func_ctime_r_nargs=2
6772
6773         else
6774                 ol_cv_func_ctime_r_nargs=0
6775         fi
6776   
6777 fi
6778
6779 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6780
6781   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6782         cat >> confdefs.h <<EOF
6783 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6784 EOF
6785
6786   fi
6787
6788 fi
6789
6790 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6791         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6792 echo "configure:6793: checking number of arguments of gethostbyname_r" >&5
6793 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6794   echo $ac_n "(cached) $ac_c" 1>&6
6795 else
6796   cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6799 #include <sys/types.h>
6800 #include <sys/socket.h>
6801 #include <netinet/in.h>
6802 #include <netdb.h>
6803 #define BUFSIZE (sizeof(struct hostent)+10)
6804 int main() {
6805 struct hostent hent; char buffer[BUFSIZE];
6806                 int bufsize=BUFSIZE;int h_errno;
6807                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6808                         buffer, bufsize, &h_errno);
6809 ; return 0; }
6810 EOF
6811 if { (eval echo configure:6812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6812   rm -rf conftest*
6813   ol_cv_func_gethostbyname_r_nargs5=yes
6814 else
6815   echo "configure: failed program was:" >&5
6816   cat conftest.$ac_ext >&5
6817   rm -rf conftest*
6818   ol_cv_func_gethostbyname_r_nargs5=no
6819 fi
6820 rm -f conftest*
6821
6822         cat > conftest.$ac_ext <<EOF
6823 #line 6824 "configure"
6824 #include "confdefs.h"
6825 #include <sys/types.h>
6826 #include <sys/socket.h>
6827 #include <netinet/in.h>
6828 #include <netdb.h>
6829 #define BUFSIZE (sizeof(struct hostent)+10)
6830 int main() {
6831 struct hostent hent;struct hostent *rhent;
6832                 char buffer[BUFSIZE];
6833                 int bufsize=BUFSIZE;int h_errno;
6834                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6835                         &rhent, &h_errno);
6836 ; return 0; }
6837 EOF
6838 if { (eval echo configure:6839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6839   rm -rf conftest*
6840   ol_cv_func_gethostbyname_r_nargs6=yes
6841 else
6842   echo "configure: failed program was:" >&5
6843   cat conftest.$ac_ext >&5
6844   rm -rf conftest*
6845   ol_cv_func_gethostbyname_r_nargs6=no
6846 fi
6847 rm -f conftest*
6848
6849         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6850                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6851
6852                 ol_cv_func_gethostbyname_r_nargs=5
6853
6854         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6855                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6856
6857                 ol_cv_func_gethostbyname_r_nargs=6
6858
6859         else
6860                 ol_cv_func_gethostbyname_r_nargs=0
6861         fi
6862   
6863 fi
6864
6865 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6866   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6867         cat >> confdefs.h <<EOF
6868 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6869 EOF
6870
6871   fi
6872
6873 else
6874         ol_cv_func_gethostbyname_r_nargs=0
6875 fi
6876  
6877 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6878         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6879 echo "configure:6880: checking number of arguments of gethostbyaddr_r" >&5
6880 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 #include <sys/types.h>
6887 #include <sys/socket.h>
6888 #include <netinet/in.h>
6889 #include <netdb.h>
6890 #define BUFSIZE (sizeof(struct hostent)+10)
6891 int main() {
6892 struct hostent hent; char buffer[BUFSIZE]; 
6893             struct in_addr add;
6894             size_t alen=sizeof(struct in_addr);
6895             int bufsize=BUFSIZE;int h_errno;
6896                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6897                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6898 ; return 0; }
6899 EOF
6900 if { (eval echo configure:6901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6901   rm -rf conftest*
6902   ol_cv_func_gethostbyaddr_r_nargs7=yes
6903 else
6904   echo "configure: failed program was:" >&5
6905   cat conftest.$ac_ext >&5
6906   rm -rf conftest*
6907   ol_cv_func_gethostbyaddr_r_nargs7=no
6908 fi
6909 rm -f conftest*
6910
6911         cat > conftest.$ac_ext <<EOF
6912 #line 6913 "configure"
6913 #include "confdefs.h"
6914 #include <sys/types.h>
6915 #include <sys/socket.h>
6916 #include <netinet/in.h>
6917 #include <netdb.h>
6918 #define BUFSIZE (sizeof(struct hostent)+10)
6919 int main() {
6920 struct hostent hent;
6921                 struct hostent *rhent; char buffer[BUFSIZE]; 
6922                 struct in_addr add;
6923                 size_t alen=sizeof(struct in_addr);
6924                 int bufsize=BUFSIZE;int h_errno;
6925                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6926                         alen, AF_INET, &hent, buffer, bufsize, 
6927                         &rhent, &h_errno);
6928 ; return 0; }
6929 EOF
6930 if { (eval echo configure:6931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6931   rm -rf conftest*
6932   ol_cv_func_gethostbyaddr_r_nargs8=yes
6933 else
6934   echo "configure: failed program was:" >&5
6935   cat conftest.$ac_ext >&5
6936   rm -rf conftest*
6937   ol_cv_func_gethostbyaddr_r_nargs8=no
6938 fi
6939 rm -f conftest*
6940
6941         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6942                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6943
6944                 ol_cv_func_gethostbyaddr_r_nargs=7
6945
6946         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6947                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6948
6949                 ol_cv_func_gethostbyaddr_r_nargs=8
6950
6951         else
6952                 ol_cv_func_gethostbyaddr_r_nargs=0
6953         fi
6954   
6955 fi
6956
6957 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6958   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6959     cat >> confdefs.h <<EOF
6960 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6961 EOF
6962
6963   fi
6964
6965 else
6966         ol_cv_func_gethostbyaddr_r_nargs=0
6967 fi
6968
6969 if test "$ac_cv_func_ctime_r" = yes \
6970         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6971         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6972         -a "$ac_cv_func_gethostbyname_r" = yes \
6973         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6974         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6975         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6976         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6977         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6978         ; then
6979  
6980         cat >> confdefs.h <<\EOF
6981 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6982 EOF
6983
6984 fi
6985
6986 ol_link_threads=no
6987
6988 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6989         -o $ol_with_threads = nt ; then
6990
6991         
6992         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6993 echo "configure:6994: checking for NT Threads" >&5
6994 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6995   echo $ac_n "(cached) $ac_c" 1>&6
6996 else
6997   
6998                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6999 echo "configure:7000: checking for _beginthread" >&5
7000 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7001   echo $ac_n "(cached) $ac_c" 1>&6
7002 else
7003   cat > conftest.$ac_ext <<EOF
7004 #line 7005 "configure"
7005 #include "confdefs.h"
7006 /* System header to define __stub macros and hopefully few prototypes,
7007     which can conflict with char _beginthread(); below.  */
7008 #include <assert.h>
7009 /* Override any gcc2 internal prototype to avoid an error.  */
7010 /* We use char because int might match the return type of a gcc2
7011     builtin and then its argument prototype would still apply.  */
7012 char _beginthread();
7013 char (*f)();
7014
7015 int main() {
7016
7017 /* The GNU C library defines this for functions which it implements
7018     to always fail with ENOSYS.  Some functions are actually named
7019     something starting with __ and the normal name is an alias.  */
7020 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7021 choke me
7022 #else
7023 f = _beginthread;
7024 #endif
7025
7026 ; return 0; }
7027 EOF
7028 if { (eval echo configure:7029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7029   rm -rf conftest*
7030   eval "ac_cv_func__beginthread=yes"
7031 else
7032   echo "configure: failed program was:" >&5
7033   cat conftest.$ac_ext >&5
7034   rm -rf conftest*
7035   eval "ac_cv_func__beginthread=no"
7036 fi
7037 rm -f conftest*
7038 fi
7039
7040 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7041   echo "$ac_t""yes" 1>&6
7042   ol_cv_nt_threads=yes
7043 else
7044   echo "$ac_t""no" 1>&6
7045 ol_cv_nt_threads=no
7046 fi
7047
7048         
7049 fi
7050
7051 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7052
7053         if test $ol_cv_nt_threads = yes ; then
7054                 cat >> confdefs.h <<\EOF
7055 #define HAVE_NT_THREADS 1
7056 EOF
7057
7058         fi
7059
7060
7061         if test "$ol_cv_nt_threads" = yes ; then
7062         ol_link_threads=nt
7063         ol_with_threads=found
7064         ol_with_yielding_select=yes
7065
7066                 cat >> confdefs.h <<\EOF
7067 #define HAVE_NT_SERVICE_MANAGER 1
7068 EOF
7069
7070                 cat >> confdefs.h <<\EOF
7071 #define HAVE_NT_EVENT_LOG 1
7072 EOF
7073
7074         fi
7075
7076         if test $ol_with_threads = nt ; then
7077                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7078         fi
7079 fi
7080
7081 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7082         -o $ol_with_threads = posix ; then
7083
7084         for ac_hdr in pthread.h
7085 do
7086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7088 echo "configure:7089: checking for $ac_hdr" >&5
7089 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7090   echo $ac_n "(cached) $ac_c" 1>&6
7091 else
7092   cat > conftest.$ac_ext <<EOF
7093 #line 7094 "configure"
7094 #include "confdefs.h"
7095 #include <$ac_hdr>
7096 EOF
7097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7098 { (eval echo configure:7099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7100 if test -z "$ac_err"; then
7101   rm -rf conftest*
7102   eval "ac_cv_header_$ac_safe=yes"
7103 else
7104   echo "$ac_err" >&5
7105   echo "configure: failed program was:" >&5
7106   cat conftest.$ac_ext >&5
7107   rm -rf conftest*
7108   eval "ac_cv_header_$ac_safe=no"
7109 fi
7110 rm -f conftest*
7111 fi
7112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7113   echo "$ac_t""yes" 1>&6
7114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7115   cat >> confdefs.h <<EOF
7116 #define $ac_tr_hdr 1
7117 EOF
7118  
7119 else
7120   echo "$ac_t""no" 1>&6
7121 fi
7122 done
7123
7124
7125         if test $ac_cv_header_pthread_h = yes ; then
7126                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7127 echo "configure:7128: checking POSIX thread version" >&5
7128 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7129   echo $ac_n "(cached) $ac_c" 1>&6
7130 else
7131   
7132         cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135
7136 #               include <pthread.h>
7137                 /* this check could be improved */
7138 #               ifdef PTHREAD_ONCE_INIT
7139                         pthread_version_final;
7140 #               endif
7141         
7142 EOF
7143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7144   egrep "pthread_version_final" >/dev/null 2>&1; then
7145   rm -rf conftest*
7146   ol_pthread_final=yes
7147 else
7148   rm -rf conftest*
7149   ol_pthread_final=no
7150 fi
7151 rm -f conftest*
7152
7153
7154         cat > conftest.$ac_ext <<EOF
7155 #line 7156 "configure"
7156 #include "confdefs.h"
7157
7158 #               include <pthread.h>
7159                 /* this check could be improved */
7160 #               ifdef pthread_once_init
7161                         pthread_version_draft4;
7162 #               endif
7163         
7164 EOF
7165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7166   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7167   rm -rf conftest*
7168   ol_pthread_draft4=yes
7169 else
7170   rm -rf conftest*
7171   ol_pthread_draft4=no
7172 fi
7173 rm -f conftest*
7174
7175
7176         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7177                 ol_cv_pthread_version=final
7178         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7179                 ol_cv_pthread_version=draft4
7180         else
7181                 ol_cv_pthread_version=unknown
7182         fi
7183
7184 fi
7185
7186 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7187
7188
7189                 if test $ol_cv_pthread_version = final ; then
7190                         cat >> confdefs.h <<\EOF
7191 #define HAVE_PTHREADS_FINAL 1
7192 EOF
7193
7194                 elif test $ol_cv_pthread_version = draft4 ; then
7195                         cat >> confdefs.h <<\EOF
7196 #define HAVE_PTHREADS_D4 1
7197 EOF
7198
7199                 else
7200                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7201                 fi
7202
7203                 # consider threads found
7204                 ol_with_threads=found
7205
7206                 
7207         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7208 echo "configure:7209: checking for LinuxThreads pthread.h" >&5
7209 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7210   echo $ac_n "(cached) $ac_c" 1>&6
7211 else
7212   cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 #include <pthread.h>
7216 EOF
7217 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7218   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7219   rm -rf conftest*
7220   ol_cv_header_linux_threads=yes
7221 else
7222   rm -rf conftest*
7223   ol_cv_header_linux_threads=no
7224 fi
7225 rm -f conftest*
7226
7227                 
7228 fi
7229
7230 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7231         if test $ol_cv_header_linux_threads = yes; then
7232                 cat >> confdefs.h <<\EOF
7233 #define HAVE_LINUX_THREADS 1
7234 EOF
7235
7236         fi
7237
7238                 
7239         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7240 echo "configure:7241: checking for GNU Pth pthread.h" >&5
7241 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7242   echo $ac_n "(cached) $ac_c" 1>&6
7243 else
7244   cat > conftest.$ac_ext <<EOF
7245 #line 7246 "configure"
7246 #include "confdefs.h"
7247 #include <pthread.h>
7248 #ifdef _POSIX_THREAD_IS_GNU_PTH
7249         __gnu_pth__;
7250 #endif
7251
7252 EOF
7253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7254   egrep "__gnu_pth__" >/dev/null 2>&1; then
7255   rm -rf conftest*
7256   ol_cv_header_gnu_pth_pthread_h=yes
7257 else
7258   rm -rf conftest*
7259   ol_cv_header_gnu_pth_pthread_h=no
7260 fi
7261 rm -f conftest*
7262
7263                 
7264 fi
7265
7266 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7267
7268
7269                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7270                         for ac_hdr in sched.h
7271 do
7272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7274 echo "configure:7275: checking for $ac_hdr" >&5
7275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7276   echo $ac_n "(cached) $ac_c" 1>&6
7277 else
7278   cat > conftest.$ac_ext <<EOF
7279 #line 7280 "configure"
7280 #include "confdefs.h"
7281 #include <$ac_hdr>
7282 EOF
7283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7284 { (eval echo configure:7285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7286 if test -z "$ac_err"; then
7287   rm -rf conftest*
7288   eval "ac_cv_header_$ac_safe=yes"
7289 else
7290   echo "$ac_err" >&5
7291   echo "configure: failed program was:" >&5
7292   cat conftest.$ac_ext >&5
7293   rm -rf conftest*
7294   eval "ac_cv_header_$ac_safe=no"
7295 fi
7296 rm -f conftest*
7297 fi
7298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7299   echo "$ac_t""yes" 1>&6
7300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7301   cat >> confdefs.h <<EOF
7302 #define $ac_tr_hdr 1
7303 EOF
7304  
7305 else
7306   echo "$ac_t""no" 1>&6
7307 fi
7308 done
7309
7310                 fi
7311
7312                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7313                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7314 echo "configure:7315: checking for pthread_create in default libraries" >&5
7315 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7316   echo $ac_n "(cached) $ac_c" 1>&6
7317 else
7318   
7319                 if test "$cross_compiling" = yes; then
7320   cat > conftest.$ac_ext <<EOF
7321 #line 7322 "configure"
7322 #include "confdefs.h"
7323 /* pthread test headers */
7324 #include <pthread.h>
7325 #ifndef NULL
7326 #define NULL (void*)0
7327 #endif
7328
7329 static void *task(p)
7330         void *p;
7331 {
7332         return (void *) (p == NULL);
7333 }
7334
7335 int main() {
7336
7337         /* pthread test function */
7338         pthread_t t;
7339         int status;
7340 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7341         /* This system (e.g. AIX) defaults detached; must override */
7342         pthread_attr_t attr;
7343
7344         status = pthread_attr_init(&attr);
7345         if( status ) exit( status );
7346
7347         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7348         if( status ) exit( status );
7349
7350 #define ATTR    &attr
7351 #else
7352 #if HAVE_PTHREADS_D4
7353 #define ATTR    pthread_attr_default
7354 #else
7355 #define ATTR    NULL
7356 #endif
7357 #endif
7358         /* make sure pthread_create() isn't just a stub */
7359         status = pthread_create(&t, ATTR, task, NULL);
7360         if( status ) exit( status );
7361
7362         /* make sure pthread_detach() isn't just a stub */
7363 #if HAVE_PTHREADS_D4
7364         status = pthread_detach( &t );
7365 #else
7366         status = pthread_detach( t );
7367 #endif
7368
7369 #ifdef HAVE_LINUX_THREADS
7370         pthread_kill_other_threads_np();
7371 #endif
7372
7373         exit( status );
7374
7375 ; return 0; }
7376 EOF
7377 if { (eval echo configure:7378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7378   rm -rf conftest*
7379   ol_cv_pthread_create=yes
7380 else
7381   echo "configure: failed program was:" >&5
7382   cat conftest.$ac_ext >&5
7383   rm -rf conftest*
7384   ol_cv_pthread_create=no
7385 fi
7386 rm -f conftest*
7387 else
7388   cat > conftest.$ac_ext <<EOF
7389 #line 7390 "configure"
7390 #include "confdefs.h"
7391 /* pthread test headers */
7392 #include <pthread.h>
7393 #ifndef NULL
7394 #define NULL (void*)0
7395 #endif
7396
7397 static void *task(p)
7398         void *p;
7399 {
7400         return (void *) (p == NULL);
7401 }
7402
7403
7404 int main(argc, argv)
7405         int argc;
7406         char **argv;
7407 {
7408
7409         /* pthread test function */
7410         pthread_t t;
7411         int status;
7412 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7413         /* This system (e.g. AIX) defaults detached; must override */
7414         pthread_attr_t attr;
7415
7416         status = pthread_attr_init(&attr);
7417         if( status ) exit( status );
7418
7419         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7420         if( status ) exit( status );
7421
7422 #define ATTR    &attr
7423 #else
7424 #if HAVE_PTHREADS_D4
7425 #define ATTR    pthread_attr_default
7426 #else
7427 #define ATTR    NULL
7428 #endif
7429 #endif
7430         /* make sure pthread_create() isn't just a stub */
7431         status = pthread_create(&t, ATTR, task, NULL);
7432         if( status ) exit( status );
7433
7434         /* make sure pthread_detach() isn't just a stub */
7435 #if HAVE_PTHREADS_D4
7436         status = pthread_detach( &t );
7437 #else
7438         status = pthread_detach( t );
7439 #endif
7440
7441 #ifdef HAVE_LINUX_THREADS
7442         pthread_kill_other_threads_np();
7443 #endif
7444
7445         exit( status );
7446
7447 }
7448
7449 EOF
7450 if { (eval echo configure:7451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7451 then
7452   ol_cv_pthread_create=yes
7453 else
7454   echo "configure: failed program was:" >&5
7455   cat conftest.$ac_ext >&5
7456   rm -fr conftest*
7457   ol_cv_pthread_create=no
7458 fi
7459 rm -fr conftest*
7460 fi
7461
7462 fi
7463
7464 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7465
7466                 if test $ol_cv_pthread_create != no ; then
7467                         ol_link_threads=posix
7468                         ol_link_pthreads=""
7469                 fi
7470                 
7471                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7472 if test "$ol_link_threads" = no ; then
7473         # try -kthread
7474         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7475 echo "configure:7476: checking for pthread link with -kthread" >&5
7476 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7477   echo $ac_n "(cached) $ac_c" 1>&6
7478 else
7479   
7480                 # save the flags
7481                 ol_LIBS="$LIBS"
7482                 LIBS="-kthread $LIBS"
7483
7484                 if test "$cross_compiling" = yes; then
7485   cat > conftest.$ac_ext <<EOF
7486 #line 7487 "configure"
7487 #include "confdefs.h"
7488 /* pthread test headers */
7489 #include <pthread.h>
7490 #ifndef NULL
7491 #define NULL (void*)0
7492 #endif
7493
7494 static void *task(p)
7495         void *p;
7496 {
7497         return (void *) (p == NULL);
7498 }
7499
7500 int main() {
7501
7502         /* pthread test function */
7503         pthread_t t;
7504         int status;
7505 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7506         /* This system (e.g. AIX) defaults detached; must override */
7507         pthread_attr_t attr;
7508
7509         status = pthread_attr_init(&attr);
7510         if( status ) exit( status );
7511
7512         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7513         if( status ) exit( status );
7514
7515 #define ATTR    &attr
7516 #else
7517 #if HAVE_PTHREADS_D4
7518 #define ATTR    pthread_attr_default
7519 #else
7520 #define ATTR    NULL
7521 #endif
7522 #endif
7523         /* make sure pthread_create() isn't just a stub */
7524         status = pthread_create(&t, ATTR, task, NULL);
7525         if( status ) exit( status );
7526
7527         /* make sure pthread_detach() isn't just a stub */
7528 #if HAVE_PTHREADS_D4
7529         status = pthread_detach( &t );
7530 #else
7531         status = pthread_detach( t );
7532 #endif
7533
7534 #ifdef HAVE_LINUX_THREADS
7535         pthread_kill_other_threads_np();
7536 #endif
7537
7538         exit( status );
7539
7540 ; return 0; }
7541 EOF
7542 if { (eval echo configure:7543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7543   rm -rf conftest*
7544   ol_cv_pthread_kthread=yes
7545 else
7546   echo "configure: failed program was:" >&5
7547   cat conftest.$ac_ext >&5
7548   rm -rf conftest*
7549   ol_cv_pthread_kthread=no
7550 fi
7551 rm -f conftest*
7552 else
7553   cat > conftest.$ac_ext <<EOF
7554 #line 7555 "configure"
7555 #include "confdefs.h"
7556 /* pthread test headers */
7557 #include <pthread.h>
7558 #ifndef NULL
7559 #define NULL (void*)0
7560 #endif
7561
7562 static void *task(p)
7563         void *p;
7564 {
7565         return (void *) (p == NULL);
7566 }
7567
7568
7569 int main(argc, argv)
7570         int argc;
7571         char **argv;
7572 {
7573
7574         /* pthread test function */
7575         pthread_t t;
7576         int status;
7577 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7578         /* This system (e.g. AIX) defaults detached; must override */
7579         pthread_attr_t attr;
7580
7581         status = pthread_attr_init(&attr);
7582         if( status ) exit( status );
7583
7584         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7585         if( status ) exit( status );
7586
7587 #define ATTR    &attr
7588 #else
7589 #if HAVE_PTHREADS_D4
7590 #define ATTR    pthread_attr_default
7591 #else
7592 #define ATTR    NULL
7593 #endif
7594 #endif
7595         /* make sure pthread_create() isn't just a stub */
7596         status = pthread_create(&t, ATTR, task, NULL);
7597         if( status ) exit( status );
7598
7599         /* make sure pthread_detach() isn't just a stub */
7600 #if HAVE_PTHREADS_D4
7601         status = pthread_detach( &t );
7602 #else
7603         status = pthread_detach( t );
7604 #endif
7605
7606 #ifdef HAVE_LINUX_THREADS
7607         pthread_kill_other_threads_np();
7608 #endif
7609
7610         exit( status );
7611
7612 }
7613
7614 EOF
7615 if { (eval echo configure:7616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7616 then
7617   ol_cv_pthread_kthread=yes
7618 else
7619   echo "configure: failed program was:" >&5
7620   cat conftest.$ac_ext >&5
7621   rm -fr conftest*
7622   ol_cv_pthread_kthread=no
7623 fi
7624 rm -fr conftest*
7625 fi
7626
7627
7628                 # restore the LIBS
7629                 LIBS="$ol_LIBS"
7630         
7631 fi
7632
7633 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7634
7635         if test $ol_cv_pthread_kthread = yes ; then
7636                 ol_link_pthreads="-kthread"
7637                 ol_link_threads=posix
7638         fi
7639 fi
7640
7641                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7642 if test "$ol_link_threads" = no ; then
7643         # try -pthread
7644         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7645 echo "configure:7646: checking for pthread link with -pthread" >&5
7646 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7647   echo $ac_n "(cached) $ac_c" 1>&6
7648 else
7649   
7650                 # save the flags
7651                 ol_LIBS="$LIBS"
7652                 LIBS="-pthread $LIBS"
7653
7654                 if test "$cross_compiling" = yes; then
7655   cat > conftest.$ac_ext <<EOF
7656 #line 7657 "configure"
7657 #include "confdefs.h"
7658 /* pthread test headers */
7659 #include <pthread.h>
7660 #ifndef NULL
7661 #define NULL (void*)0
7662 #endif
7663
7664 static void *task(p)
7665         void *p;
7666 {
7667         return (void *) (p == NULL);
7668 }
7669
7670 int main() {
7671
7672         /* pthread test function */
7673         pthread_t t;
7674         int status;
7675 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7676         /* This system (e.g. AIX) defaults detached; must override */
7677         pthread_attr_t attr;
7678
7679         status = pthread_attr_init(&attr);
7680         if( status ) exit( status );
7681
7682         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7683         if( status ) exit( status );
7684
7685 #define ATTR    &attr
7686 #else
7687 #if HAVE_PTHREADS_D4
7688 #define ATTR    pthread_attr_default
7689 #else
7690 #define ATTR    NULL
7691 #endif
7692 #endif
7693         /* make sure pthread_create() isn't just a stub */
7694         status = pthread_create(&t, ATTR, task, NULL);
7695         if( status ) exit( status );
7696
7697         /* make sure pthread_detach() isn't just a stub */
7698 #if HAVE_PTHREADS_D4
7699         status = pthread_detach( &t );
7700 #else
7701         status = pthread_detach( t );
7702 #endif
7703
7704 #ifdef HAVE_LINUX_THREADS
7705         pthread_kill_other_threads_np();
7706 #endif
7707
7708         exit( status );
7709
7710 ; return 0; }
7711 EOF
7712 if { (eval echo configure:7713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7713   rm -rf conftest*
7714   ol_cv_pthread_pthread=yes
7715 else
7716   echo "configure: failed program was:" >&5
7717   cat conftest.$ac_ext >&5
7718   rm -rf conftest*
7719   ol_cv_pthread_pthread=no
7720 fi
7721 rm -f conftest*
7722 else
7723   cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 /* pthread test headers */
7727 #include <pthread.h>
7728 #ifndef NULL
7729 #define NULL (void*)0
7730 #endif
7731
7732 static void *task(p)
7733         void *p;
7734 {
7735         return (void *) (p == NULL);
7736 }
7737
7738
7739 int main(argc, argv)
7740         int argc;
7741         char **argv;
7742 {
7743
7744         /* pthread test function */
7745         pthread_t t;
7746         int status;
7747 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7748         /* This system (e.g. AIX) defaults detached; must override */
7749         pthread_attr_t attr;
7750
7751         status = pthread_attr_init(&attr);
7752         if( status ) exit( status );
7753
7754         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7755         if( status ) exit( status );
7756
7757 #define ATTR    &attr
7758 #else
7759 #if HAVE_PTHREADS_D4
7760 #define ATTR    pthread_attr_default
7761 #else
7762 #define ATTR    NULL
7763 #endif
7764 #endif
7765         /* make sure pthread_create() isn't just a stub */
7766         status = pthread_create(&t, ATTR, task, NULL);
7767         if( status ) exit( status );
7768
7769         /* make sure pthread_detach() isn't just a stub */
7770 #if HAVE_PTHREADS_D4
7771         status = pthread_detach( &t );
7772 #else
7773         status = pthread_detach( t );
7774 #endif
7775
7776 #ifdef HAVE_LINUX_THREADS
7777         pthread_kill_other_threads_np();
7778 #endif
7779
7780         exit( status );
7781
7782 }
7783
7784 EOF
7785 if { (eval echo configure:7786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7786 then
7787   ol_cv_pthread_pthread=yes
7788 else
7789   echo "configure: failed program was:" >&5
7790   cat conftest.$ac_ext >&5
7791   rm -fr conftest*
7792   ol_cv_pthread_pthread=no
7793 fi
7794 rm -fr conftest*
7795 fi
7796
7797
7798                 # restore the LIBS
7799                 LIBS="$ol_LIBS"
7800         
7801 fi
7802
7803 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7804
7805         if test $ol_cv_pthread_pthread = yes ; then
7806                 ol_link_pthreads="-pthread"
7807                 ol_link_threads=posix
7808         fi
7809 fi
7810
7811                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7812 if test "$ol_link_threads" = no ; then
7813         # try -pthreads
7814         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7815 echo "configure:7816: checking for pthread link with -pthreads" >&5
7816 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7817   echo $ac_n "(cached) $ac_c" 1>&6
7818 else
7819   
7820                 # save the flags
7821                 ol_LIBS="$LIBS"
7822                 LIBS="-pthreads $LIBS"
7823
7824                 if test "$cross_compiling" = yes; then
7825   cat > conftest.$ac_ext <<EOF
7826 #line 7827 "configure"
7827 #include "confdefs.h"
7828 /* pthread test headers */
7829 #include <pthread.h>
7830 #ifndef NULL
7831 #define NULL (void*)0
7832 #endif
7833
7834 static void *task(p)
7835         void *p;
7836 {
7837         return (void *) (p == NULL);
7838 }
7839
7840 int main() {
7841
7842         /* pthread test function */
7843         pthread_t t;
7844         int status;
7845 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7846         /* This system (e.g. AIX) defaults detached; must override */
7847         pthread_attr_t attr;
7848
7849         status = pthread_attr_init(&attr);
7850         if( status ) exit( status );
7851
7852         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7853         if( status ) exit( status );
7854
7855 #define ATTR    &attr
7856 #else
7857 #if HAVE_PTHREADS_D4
7858 #define ATTR    pthread_attr_default
7859 #else
7860 #define ATTR    NULL
7861 #endif
7862 #endif
7863         /* make sure pthread_create() isn't just a stub */
7864         status = pthread_create(&t, ATTR, task, NULL);
7865         if( status ) exit( status );
7866
7867         /* make sure pthread_detach() isn't just a stub */
7868 #if HAVE_PTHREADS_D4
7869         status = pthread_detach( &t );
7870 #else
7871         status = pthread_detach( t );
7872 #endif
7873
7874 #ifdef HAVE_LINUX_THREADS
7875         pthread_kill_other_threads_np();
7876 #endif
7877
7878         exit( status );
7879
7880 ; return 0; }
7881 EOF
7882 if { (eval echo configure:7883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7883   rm -rf conftest*
7884   ol_cv_pthread_pthreads=yes
7885 else
7886   echo "configure: failed program was:" >&5
7887   cat conftest.$ac_ext >&5
7888   rm -rf conftest*
7889   ol_cv_pthread_pthreads=no
7890 fi
7891 rm -f conftest*
7892 else
7893   cat > conftest.$ac_ext <<EOF
7894 #line 7895 "configure"
7895 #include "confdefs.h"
7896 /* pthread test headers */
7897 #include <pthread.h>
7898 #ifndef NULL
7899 #define NULL (void*)0
7900 #endif
7901
7902 static void *task(p)
7903         void *p;
7904 {
7905         return (void *) (p == NULL);
7906 }
7907
7908
7909 int main(argc, argv)
7910         int argc;
7911         char **argv;
7912 {
7913
7914         /* pthread test function */
7915         pthread_t t;
7916         int status;
7917 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7918         /* This system (e.g. AIX) defaults detached; must override */
7919         pthread_attr_t attr;
7920
7921         status = pthread_attr_init(&attr);
7922         if( status ) exit( status );
7923
7924         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7925         if( status ) exit( status );
7926
7927 #define ATTR    &attr
7928 #else
7929 #if HAVE_PTHREADS_D4
7930 #define ATTR    pthread_attr_default
7931 #else
7932 #define ATTR    NULL
7933 #endif
7934 #endif
7935         /* make sure pthread_create() isn't just a stub */
7936         status = pthread_create(&t, ATTR, task, NULL);
7937         if( status ) exit( status );
7938
7939         /* make sure pthread_detach() isn't just a stub */
7940 #if HAVE_PTHREADS_D4
7941         status = pthread_detach( &t );
7942 #else
7943         status = pthread_detach( t );
7944 #endif
7945
7946 #ifdef HAVE_LINUX_THREADS
7947         pthread_kill_other_threads_np();
7948 #endif
7949
7950         exit( status );
7951
7952 }
7953
7954 EOF
7955 if { (eval echo configure:7956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7956 then
7957   ol_cv_pthread_pthreads=yes
7958 else
7959   echo "configure: failed program was:" >&5
7960   cat conftest.$ac_ext >&5
7961   rm -fr conftest*
7962   ol_cv_pthread_pthreads=no
7963 fi
7964 rm -fr conftest*
7965 fi
7966
7967
7968                 # restore the LIBS
7969                 LIBS="$ol_LIBS"
7970         
7971 fi
7972
7973 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7974
7975         if test $ol_cv_pthread_pthreads = yes ; then
7976                 ol_link_pthreads="-pthreads"
7977                 ol_link_threads=posix
7978         fi
7979 fi
7980
7981                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7982 if test "$ol_link_threads" = no ; then
7983         # try -mthreads
7984         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7985 echo "configure:7986: checking for pthread link with -mthreads" >&5
7986 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7987   echo $ac_n "(cached) $ac_c" 1>&6
7988 else
7989   
7990                 # save the flags
7991                 ol_LIBS="$LIBS"
7992                 LIBS="-mthreads $LIBS"
7993
7994                 if test "$cross_compiling" = yes; then
7995   cat > conftest.$ac_ext <<EOF
7996 #line 7997 "configure"
7997 #include "confdefs.h"
7998 /* pthread test headers */
7999 #include <pthread.h>
8000 #ifndef NULL
8001 #define NULL (void*)0
8002 #endif
8003
8004 static void *task(p)
8005         void *p;
8006 {
8007         return (void *) (p == NULL);
8008 }
8009
8010 int main() {
8011
8012         /* pthread test function */
8013         pthread_t t;
8014         int status;
8015 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8016         /* This system (e.g. AIX) defaults detached; must override */
8017         pthread_attr_t attr;
8018
8019         status = pthread_attr_init(&attr);
8020         if( status ) exit( status );
8021
8022         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8023         if( status ) exit( status );
8024
8025 #define ATTR    &attr
8026 #else
8027 #if HAVE_PTHREADS_D4
8028 #define ATTR    pthread_attr_default
8029 #else
8030 #define ATTR    NULL
8031 #endif
8032 #endif
8033         /* make sure pthread_create() isn't just a stub */
8034         status = pthread_create(&t, ATTR, task, NULL);
8035         if( status ) exit( status );
8036
8037         /* make sure pthread_detach() isn't just a stub */
8038 #if HAVE_PTHREADS_D4
8039         status = pthread_detach( &t );
8040 #else
8041         status = pthread_detach( t );
8042 #endif
8043
8044 #ifdef HAVE_LINUX_THREADS
8045         pthread_kill_other_threads_np();
8046 #endif
8047
8048         exit( status );
8049
8050 ; return 0; }
8051 EOF
8052 if { (eval echo configure:8053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8053   rm -rf conftest*
8054   ol_cv_pthread_mthreads=yes
8055 else
8056   echo "configure: failed program was:" >&5
8057   cat conftest.$ac_ext >&5
8058   rm -rf conftest*
8059   ol_cv_pthread_mthreads=no
8060 fi
8061 rm -f conftest*
8062 else
8063   cat > conftest.$ac_ext <<EOF
8064 #line 8065 "configure"
8065 #include "confdefs.h"
8066 /* pthread test headers */
8067 #include <pthread.h>
8068 #ifndef NULL
8069 #define NULL (void*)0
8070 #endif
8071
8072 static void *task(p)
8073         void *p;
8074 {
8075         return (void *) (p == NULL);
8076 }
8077
8078
8079 int main(argc, argv)
8080         int argc;
8081         char **argv;
8082 {
8083
8084         /* pthread test function */
8085         pthread_t t;
8086         int status;
8087 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8088         /* This system (e.g. AIX) defaults detached; must override */
8089         pthread_attr_t attr;
8090
8091         status = pthread_attr_init(&attr);
8092         if( status ) exit( status );
8093
8094         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8095         if( status ) exit( status );
8096
8097 #define ATTR    &attr
8098 #else
8099 #if HAVE_PTHREADS_D4
8100 #define ATTR    pthread_attr_default
8101 #else
8102 #define ATTR    NULL
8103 #endif
8104 #endif
8105         /* make sure pthread_create() isn't just a stub */
8106         status = pthread_create(&t, ATTR, task, NULL);
8107         if( status ) exit( status );
8108
8109         /* make sure pthread_detach() isn't just a stub */
8110 #if HAVE_PTHREADS_D4
8111         status = pthread_detach( &t );
8112 #else
8113         status = pthread_detach( t );
8114 #endif
8115
8116 #ifdef HAVE_LINUX_THREADS
8117         pthread_kill_other_threads_np();
8118 #endif
8119
8120         exit( status );
8121
8122 }
8123
8124 EOF
8125 if { (eval echo configure:8126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8126 then
8127   ol_cv_pthread_mthreads=yes
8128 else
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -fr conftest*
8132   ol_cv_pthread_mthreads=no
8133 fi
8134 rm -fr conftest*
8135 fi
8136
8137
8138                 # restore the LIBS
8139                 LIBS="$ol_LIBS"
8140         
8141 fi
8142
8143 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8144
8145         if test $ol_cv_pthread_mthreads = yes ; then
8146                 ol_link_pthreads="-mthreads"
8147                 ol_link_threads=posix
8148         fi
8149 fi
8150
8151                 # Pthread try link: -thread (ol_cv_pthread_thread)
8152 if test "$ol_link_threads" = no ; then
8153         # try -thread
8154         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8155 echo "configure:8156: checking for pthread link with -thread" >&5
8156 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8157   echo $ac_n "(cached) $ac_c" 1>&6
8158 else
8159   
8160                 # save the flags
8161                 ol_LIBS="$LIBS"
8162                 LIBS="-thread $LIBS"
8163
8164                 if test "$cross_compiling" = yes; then
8165   cat > conftest.$ac_ext <<EOF
8166 #line 8167 "configure"
8167 #include "confdefs.h"
8168 /* pthread test headers */
8169 #include <pthread.h>
8170 #ifndef NULL
8171 #define NULL (void*)0
8172 #endif
8173
8174 static void *task(p)
8175         void *p;
8176 {
8177         return (void *) (p == NULL);
8178 }
8179
8180 int main() {
8181
8182         /* pthread test function */
8183         pthread_t t;
8184         int status;
8185 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8186         /* This system (e.g. AIX) defaults detached; must override */
8187         pthread_attr_t attr;
8188
8189         status = pthread_attr_init(&attr);
8190         if( status ) exit( status );
8191
8192         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8193         if( status ) exit( status );
8194
8195 #define ATTR    &attr
8196 #else
8197 #if HAVE_PTHREADS_D4
8198 #define ATTR    pthread_attr_default
8199 #else
8200 #define ATTR    NULL
8201 #endif
8202 #endif
8203         /* make sure pthread_create() isn't just a stub */
8204         status = pthread_create(&t, ATTR, task, NULL);
8205         if( status ) exit( status );
8206
8207         /* make sure pthread_detach() isn't just a stub */
8208 #if HAVE_PTHREADS_D4
8209         status = pthread_detach( &t );
8210 #else
8211         status = pthread_detach( t );
8212 #endif
8213
8214 #ifdef HAVE_LINUX_THREADS
8215         pthread_kill_other_threads_np();
8216 #endif
8217
8218         exit( status );
8219
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8223   rm -rf conftest*
8224   ol_cv_pthread_thread=yes
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   ol_cv_pthread_thread=no
8230 fi
8231 rm -f conftest*
8232 else
8233   cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 /* pthread test headers */
8237 #include <pthread.h>
8238 #ifndef NULL
8239 #define NULL (void*)0
8240 #endif
8241
8242 static void *task(p)
8243         void *p;
8244 {
8245         return (void *) (p == NULL);
8246 }
8247
8248
8249 int main(argc, argv)
8250         int argc;
8251         char **argv;
8252 {
8253
8254         /* pthread test function */
8255         pthread_t t;
8256         int status;
8257 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8258         /* This system (e.g. AIX) defaults detached; must override */
8259         pthread_attr_t attr;
8260
8261         status = pthread_attr_init(&attr);
8262         if( status ) exit( status );
8263
8264         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8265         if( status ) exit( status );
8266
8267 #define ATTR    &attr
8268 #else
8269 #if HAVE_PTHREADS_D4
8270 #define ATTR    pthread_attr_default
8271 #else
8272 #define ATTR    NULL
8273 #endif
8274 #endif
8275         /* make sure pthread_create() isn't just a stub */
8276         status = pthread_create(&t, ATTR, task, NULL);
8277         if( status ) exit( status );
8278
8279         /* make sure pthread_detach() isn't just a stub */
8280 #if HAVE_PTHREADS_D4
8281         status = pthread_detach( &t );
8282 #else
8283         status = pthread_detach( t );
8284 #endif
8285
8286 #ifdef HAVE_LINUX_THREADS
8287         pthread_kill_other_threads_np();
8288 #endif
8289
8290         exit( status );
8291
8292 }
8293
8294 EOF
8295 if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8296 then
8297   ol_cv_pthread_thread=yes
8298 else
8299   echo "configure: failed program was:" >&5
8300   cat conftest.$ac_ext >&5
8301   rm -fr conftest*
8302   ol_cv_pthread_thread=no
8303 fi
8304 rm -fr conftest*
8305 fi
8306
8307
8308                 # restore the LIBS
8309                 LIBS="$ol_LIBS"
8310         
8311 fi
8312
8313 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8314
8315         if test $ol_cv_pthread_thread = yes ; then
8316                 ol_link_pthreads="-thread"
8317                 ol_link_threads=posix
8318         fi
8319 fi
8320
8321
8322                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8323 if test "$ol_link_threads" = no ; then
8324         # try -lpthread -lmach -lexc -lc_r
8325         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8326 echo "configure:8327: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8327 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8328   echo $ac_n "(cached) $ac_c" 1>&6
8329 else
8330   
8331                 # save the flags
8332                 ol_LIBS="$LIBS"
8333                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8334
8335                 if test "$cross_compiling" = yes; then
8336   cat > conftest.$ac_ext <<EOF
8337 #line 8338 "configure"
8338 #include "confdefs.h"
8339 /* pthread test headers */
8340 #include <pthread.h>
8341 #ifndef NULL
8342 #define NULL (void*)0
8343 #endif
8344
8345 static void *task(p)
8346         void *p;
8347 {
8348         return (void *) (p == NULL);
8349 }
8350
8351 int main() {
8352
8353         /* pthread test function */
8354         pthread_t t;
8355         int status;
8356 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8357         /* This system (e.g. AIX) defaults detached; must override */
8358         pthread_attr_t attr;
8359
8360         status = pthread_attr_init(&attr);
8361         if( status ) exit( status );
8362
8363         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8364         if( status ) exit( status );
8365
8366 #define ATTR    &attr
8367 #else
8368 #if HAVE_PTHREADS_D4
8369 #define ATTR    pthread_attr_default
8370 #else
8371 #define ATTR    NULL
8372 #endif
8373 #endif
8374         /* make sure pthread_create() isn't just a stub */
8375         status = pthread_create(&t, ATTR, task, NULL);
8376         if( status ) exit( status );
8377
8378         /* make sure pthread_detach() isn't just a stub */
8379 #if HAVE_PTHREADS_D4
8380         status = pthread_detach( &t );
8381 #else
8382         status = pthread_detach( t );
8383 #endif
8384
8385 #ifdef HAVE_LINUX_THREADS
8386         pthread_kill_other_threads_np();
8387 #endif
8388
8389         exit( status );
8390
8391 ; return 0; }
8392 EOF
8393 if { (eval echo configure:8394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8394   rm -rf conftest*
8395   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8396 else
8397   echo "configure: failed program was:" >&5
8398   cat conftest.$ac_ext >&5
8399   rm -rf conftest*
8400   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8401 fi
8402 rm -f conftest*
8403 else
8404   cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 /* pthread test headers */
8408 #include <pthread.h>
8409 #ifndef NULL
8410 #define NULL (void*)0
8411 #endif
8412
8413 static void *task(p)
8414         void *p;
8415 {
8416         return (void *) (p == NULL);
8417 }
8418
8419
8420 int main(argc, argv)
8421         int argc;
8422         char **argv;
8423 {
8424
8425         /* pthread test function */
8426         pthread_t t;
8427         int status;
8428 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8429         /* This system (e.g. AIX) defaults detached; must override */
8430         pthread_attr_t attr;
8431
8432         status = pthread_attr_init(&attr);
8433         if( status ) exit( status );
8434
8435         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8436         if( status ) exit( status );
8437
8438 #define ATTR    &attr
8439 #else
8440 #if HAVE_PTHREADS_D4
8441 #define ATTR    pthread_attr_default
8442 #else
8443 #define ATTR    NULL
8444 #endif
8445 #endif
8446         /* make sure pthread_create() isn't just a stub */
8447         status = pthread_create(&t, ATTR, task, NULL);
8448         if( status ) exit( status );
8449
8450         /* make sure pthread_detach() isn't just a stub */
8451 #if HAVE_PTHREADS_D4
8452         status = pthread_detach( &t );
8453 #else
8454         status = pthread_detach( t );
8455 #endif
8456
8457 #ifdef HAVE_LINUX_THREADS
8458         pthread_kill_other_threads_np();
8459 #endif
8460
8461         exit( status );
8462
8463 }
8464
8465 EOF
8466 if { (eval echo configure:8467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8467 then
8468   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8469 else
8470   echo "configure: failed program was:" >&5
8471   cat conftest.$ac_ext >&5
8472   rm -fr conftest*
8473   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8474 fi
8475 rm -fr conftest*
8476 fi
8477
8478
8479                 # restore the LIBS
8480                 LIBS="$ol_LIBS"
8481         
8482 fi
8483
8484 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8485
8486         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8487                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8488                 ol_link_threads=posix
8489         fi
8490 fi
8491
8492                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8493 if test "$ol_link_threads" = no ; then
8494         # try -lpthread -lmach -lexc
8495         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8496 echo "configure:8497: checking for pthread link with -lpthread -lmach -lexc" >&5
8497 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8498   echo $ac_n "(cached) $ac_c" 1>&6
8499 else
8500   
8501                 # save the flags
8502                 ol_LIBS="$LIBS"
8503                 LIBS="-lpthread -lmach -lexc $LIBS"
8504
8505                 if test "$cross_compiling" = yes; then
8506   cat > conftest.$ac_ext <<EOF
8507 #line 8508 "configure"
8508 #include "confdefs.h"
8509 /* pthread test headers */
8510 #include <pthread.h>
8511 #ifndef NULL
8512 #define NULL (void*)0
8513 #endif
8514
8515 static void *task(p)
8516         void *p;
8517 {
8518         return (void *) (p == NULL);
8519 }
8520
8521 int main() {
8522
8523         /* pthread test function */
8524         pthread_t t;
8525         int status;
8526 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8527         /* This system (e.g. AIX) defaults detached; must override */
8528         pthread_attr_t attr;
8529
8530         status = pthread_attr_init(&attr);
8531         if( status ) exit( status );
8532
8533         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8534         if( status ) exit( status );
8535
8536 #define ATTR    &attr
8537 #else
8538 #if HAVE_PTHREADS_D4
8539 #define ATTR    pthread_attr_default
8540 #else
8541 #define ATTR    NULL
8542 #endif
8543 #endif
8544         /* make sure pthread_create() isn't just a stub */
8545         status = pthread_create(&t, ATTR, task, NULL);
8546         if( status ) exit( status );
8547
8548         /* make sure pthread_detach() isn't just a stub */
8549 #if HAVE_PTHREADS_D4
8550         status = pthread_detach( &t );
8551 #else
8552         status = pthread_detach( t );
8553 #endif
8554
8555 #ifdef HAVE_LINUX_THREADS
8556         pthread_kill_other_threads_np();
8557 #endif
8558
8559         exit( status );
8560
8561 ; return 0; }
8562 EOF
8563 if { (eval echo configure:8564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8564   rm -rf conftest*
8565   ol_cv_pthread_lpthread_lmach_lexc=yes
8566 else
8567   echo "configure: failed program was:" >&5
8568   cat conftest.$ac_ext >&5
8569   rm -rf conftest*
8570   ol_cv_pthread_lpthread_lmach_lexc=no
8571 fi
8572 rm -f conftest*
8573 else
8574   cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 /* pthread test headers */
8578 #include <pthread.h>
8579 #ifndef NULL
8580 #define NULL (void*)0
8581 #endif
8582
8583 static void *task(p)
8584         void *p;
8585 {
8586         return (void *) (p == NULL);
8587 }
8588
8589
8590 int main(argc, argv)
8591         int argc;
8592         char **argv;
8593 {
8594
8595         /* pthread test function */
8596         pthread_t t;
8597         int status;
8598 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8599         /* This system (e.g. AIX) defaults detached; must override */
8600         pthread_attr_t attr;
8601
8602         status = pthread_attr_init(&attr);
8603         if( status ) exit( status );
8604
8605         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8606         if( status ) exit( status );
8607
8608 #define ATTR    &attr
8609 #else
8610 #if HAVE_PTHREADS_D4
8611 #define ATTR    pthread_attr_default
8612 #else
8613 #define ATTR    NULL
8614 #endif
8615 #endif
8616         /* make sure pthread_create() isn't just a stub */
8617         status = pthread_create(&t, ATTR, task, NULL);
8618         if( status ) exit( status );
8619
8620         /* make sure pthread_detach() isn't just a stub */
8621 #if HAVE_PTHREADS_D4
8622         status = pthread_detach( &t );
8623 #else
8624         status = pthread_detach( t );
8625 #endif
8626
8627 #ifdef HAVE_LINUX_THREADS
8628         pthread_kill_other_threads_np();
8629 #endif
8630
8631         exit( status );
8632
8633 }
8634
8635 EOF
8636 if { (eval echo configure:8637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8637 then
8638   ol_cv_pthread_lpthread_lmach_lexc=yes
8639 else
8640   echo "configure: failed program was:" >&5
8641   cat conftest.$ac_ext >&5
8642   rm -fr conftest*
8643   ol_cv_pthread_lpthread_lmach_lexc=no
8644 fi
8645 rm -fr conftest*
8646 fi
8647
8648
8649                 # restore the LIBS
8650                 LIBS="$ol_LIBS"
8651         
8652 fi
8653
8654 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8655
8656         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8657                 ol_link_pthreads="-lpthread -lmach -lexc"
8658                 ol_link_threads=posix
8659         fi
8660 fi
8661
8662
8663                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8664 if test "$ol_link_threads" = no ; then
8665         # try -lpthread -Wl,-woff,85
8666         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8667 echo "configure:8668: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8668 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8669   echo $ac_n "(cached) $ac_c" 1>&6
8670 else
8671   
8672                 # save the flags
8673                 ol_LIBS="$LIBS"
8674                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8675
8676                 if test "$cross_compiling" = yes; then
8677   cat > conftest.$ac_ext <<EOF
8678 #line 8679 "configure"
8679 #include "confdefs.h"
8680 /* pthread test headers */
8681 #include <pthread.h>
8682 #ifndef NULL
8683 #define NULL (void*)0
8684 #endif
8685
8686 static void *task(p)
8687         void *p;
8688 {
8689         return (void *) (p == NULL);
8690 }
8691
8692 int main() {
8693
8694         /* pthread test function */
8695         pthread_t t;
8696         int status;
8697 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8698         /* This system (e.g. AIX) defaults detached; must override */
8699         pthread_attr_t attr;
8700
8701         status = pthread_attr_init(&attr);
8702         if( status ) exit( status );
8703
8704         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8705         if( status ) exit( status );
8706
8707 #define ATTR    &attr
8708 #else
8709 #if HAVE_PTHREADS_D4
8710 #define ATTR    pthread_attr_default
8711 #else
8712 #define ATTR    NULL
8713 #endif
8714 #endif
8715         /* make sure pthread_create() isn't just a stub */
8716         status = pthread_create(&t, ATTR, task, NULL);
8717         if( status ) exit( status );
8718
8719         /* make sure pthread_detach() isn't just a stub */
8720 #if HAVE_PTHREADS_D4
8721         status = pthread_detach( &t );
8722 #else
8723         status = pthread_detach( t );
8724 #endif
8725
8726 #ifdef HAVE_LINUX_THREADS
8727         pthread_kill_other_threads_np();
8728 #endif
8729
8730         exit( status );
8731
8732 ; return 0; }
8733 EOF
8734 if { (eval echo configure:8735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8735   rm -rf conftest*
8736   ol_cv_pthread_lib_lpthread_woff=yes
8737 else
8738   echo "configure: failed program was:" >&5
8739   cat conftest.$ac_ext >&5
8740   rm -rf conftest*
8741   ol_cv_pthread_lib_lpthread_woff=no
8742 fi
8743 rm -f conftest*
8744 else
8745   cat > conftest.$ac_ext <<EOF
8746 #line 8747 "configure"
8747 #include "confdefs.h"
8748 /* pthread test headers */
8749 #include <pthread.h>
8750 #ifndef NULL
8751 #define NULL (void*)0
8752 #endif
8753
8754 static void *task(p)
8755         void *p;
8756 {
8757         return (void *) (p == NULL);
8758 }
8759
8760
8761 int main(argc, argv)
8762         int argc;
8763         char **argv;
8764 {
8765
8766         /* pthread test function */
8767         pthread_t t;
8768         int status;
8769 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8770         /* This system (e.g. AIX) defaults detached; must override */
8771         pthread_attr_t attr;
8772
8773         status = pthread_attr_init(&attr);
8774         if( status ) exit( status );
8775
8776         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8777         if( status ) exit( status );
8778
8779 #define ATTR    &attr
8780 #else
8781 #if HAVE_PTHREADS_D4
8782 #define ATTR    pthread_attr_default
8783 #else
8784 #define ATTR    NULL
8785 #endif
8786 #endif
8787         /* make sure pthread_create() isn't just a stub */
8788         status = pthread_create(&t, ATTR, task, NULL);
8789         if( status ) exit( status );
8790
8791         /* make sure pthread_detach() isn't just a stub */
8792 #if HAVE_PTHREADS_D4
8793         status = pthread_detach( &t );
8794 #else
8795         status = pthread_detach( t );
8796 #endif
8797
8798 #ifdef HAVE_LINUX_THREADS
8799         pthread_kill_other_threads_np();
8800 #endif
8801
8802         exit( status );
8803
8804 }
8805
8806 EOF
8807 if { (eval echo configure:8808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8808 then
8809   ol_cv_pthread_lib_lpthread_woff=yes
8810 else
8811   echo "configure: failed program was:" >&5
8812   cat conftest.$ac_ext >&5
8813   rm -fr conftest*
8814   ol_cv_pthread_lib_lpthread_woff=no
8815 fi
8816 rm -fr conftest*
8817 fi
8818
8819
8820                 # restore the LIBS
8821                 LIBS="$ol_LIBS"
8822         
8823 fi
8824
8825 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8826
8827         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8828                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8829                 ol_link_threads=posix
8830         fi
8831 fi
8832
8833
8834                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8835 if test "$ol_link_threads" = no ; then
8836         # try -lpthread
8837         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8838 echo "configure:8839: checking for pthread link with -lpthread" >&5
8839 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8840   echo $ac_n "(cached) $ac_c" 1>&6
8841 else
8842   
8843                 # save the flags
8844                 ol_LIBS="$LIBS"
8845                 LIBS="-lpthread $LIBS"
8846
8847                 if test "$cross_compiling" = yes; then
8848   cat > conftest.$ac_ext <<EOF
8849 #line 8850 "configure"
8850 #include "confdefs.h"
8851 /* pthread test headers */
8852 #include <pthread.h>
8853 #ifndef NULL
8854 #define NULL (void*)0
8855 #endif
8856
8857 static void *task(p)
8858         void *p;
8859 {
8860         return (void *) (p == NULL);
8861 }
8862
8863 int main() {
8864
8865         /* pthread test function */
8866         pthread_t t;
8867         int status;
8868 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8869         /* This system (e.g. AIX) defaults detached; must override */
8870         pthread_attr_t attr;
8871
8872         status = pthread_attr_init(&attr);
8873         if( status ) exit( status );
8874
8875         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8876         if( status ) exit( status );
8877
8878 #define ATTR    &attr
8879 #else
8880 #if HAVE_PTHREADS_D4
8881 #define ATTR    pthread_attr_default
8882 #else
8883 #define ATTR    NULL
8884 #endif
8885 #endif
8886         /* make sure pthread_create() isn't just a stub */
8887         status = pthread_create(&t, ATTR, task, NULL);
8888         if( status ) exit( status );
8889
8890         /* make sure pthread_detach() isn't just a stub */
8891 #if HAVE_PTHREADS_D4
8892         status = pthread_detach( &t );
8893 #else
8894         status = pthread_detach( t );
8895 #endif
8896
8897 #ifdef HAVE_LINUX_THREADS
8898         pthread_kill_other_threads_np();
8899 #endif
8900
8901         exit( status );
8902
8903 ; return 0; }
8904 EOF
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8906   rm -rf conftest*
8907   ol_cv_pthread_lpthread=yes
8908 else
8909   echo "configure: failed program was:" >&5
8910   cat conftest.$ac_ext >&5
8911   rm -rf conftest*
8912   ol_cv_pthread_lpthread=no
8913 fi
8914 rm -f conftest*
8915 else
8916   cat > conftest.$ac_ext <<EOF
8917 #line 8918 "configure"
8918 #include "confdefs.h"
8919 /* pthread test headers */
8920 #include <pthread.h>
8921 #ifndef NULL
8922 #define NULL (void*)0
8923 #endif
8924
8925 static void *task(p)
8926         void *p;
8927 {
8928         return (void *) (p == NULL);
8929 }
8930
8931
8932 int main(argc, argv)
8933         int argc;
8934         char **argv;
8935 {
8936
8937         /* pthread test function */
8938         pthread_t t;
8939         int status;
8940 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8941         /* This system (e.g. AIX) defaults detached; must override */
8942         pthread_attr_t attr;
8943
8944         status = pthread_attr_init(&attr);
8945         if( status ) exit( status );
8946
8947         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8948         if( status ) exit( status );
8949
8950 #define ATTR    &attr
8951 #else
8952 #if HAVE_PTHREADS_D4
8953 #define ATTR    pthread_attr_default
8954 #else
8955 #define ATTR    NULL
8956 #endif
8957 #endif
8958         /* make sure pthread_create() isn't just a stub */
8959         status = pthread_create(&t, ATTR, task, NULL);
8960         if( status ) exit( status );
8961
8962         /* make sure pthread_detach() isn't just a stub */
8963 #if HAVE_PTHREADS_D4
8964         status = pthread_detach( &t );
8965 #else
8966         status = pthread_detach( t );
8967 #endif
8968
8969 #ifdef HAVE_LINUX_THREADS
8970         pthread_kill_other_threads_np();
8971 #endif
8972
8973         exit( status );
8974
8975 }
8976
8977 EOF
8978 if { (eval echo configure:8979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8979 then
8980   ol_cv_pthread_lpthread=yes
8981 else
8982   echo "configure: failed program was:" >&5
8983   cat conftest.$ac_ext >&5
8984   rm -fr conftest*
8985   ol_cv_pthread_lpthread=no
8986 fi
8987 rm -fr conftest*
8988 fi
8989
8990
8991                 # restore the LIBS
8992                 LIBS="$ol_LIBS"
8993         
8994 fi
8995
8996 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8997
8998         if test $ol_cv_pthread_lpthread = yes ; then
8999                 ol_link_pthreads="-lpthread"
9000                 ol_link_threads=posix
9001         fi
9002 fi
9003
9004                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9005 if test "$ol_link_threads" = no ; then
9006         # try -lc_r
9007         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9008 echo "configure:9009: checking for pthread link with -lc_r" >&5
9009 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9010   echo $ac_n "(cached) $ac_c" 1>&6
9011 else
9012   
9013                 # save the flags
9014                 ol_LIBS="$LIBS"
9015                 LIBS="-lc_r $LIBS"
9016
9017                 if test "$cross_compiling" = yes; then
9018   cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 /* pthread test headers */
9022 #include <pthread.h>
9023 #ifndef NULL
9024 #define NULL (void*)0
9025 #endif
9026
9027 static void *task(p)
9028         void *p;
9029 {
9030         return (void *) (p == NULL);
9031 }
9032
9033 int main() {
9034
9035         /* pthread test function */
9036         pthread_t t;
9037         int status;
9038 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9039         /* This system (e.g. AIX) defaults detached; must override */
9040         pthread_attr_t attr;
9041
9042         status = pthread_attr_init(&attr);
9043         if( status ) exit( status );
9044
9045         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9046         if( status ) exit( status );
9047
9048 #define ATTR    &attr
9049 #else
9050 #if HAVE_PTHREADS_D4
9051 #define ATTR    pthread_attr_default
9052 #else
9053 #define ATTR    NULL
9054 #endif
9055 #endif
9056         /* make sure pthread_create() isn't just a stub */
9057         status = pthread_create(&t, ATTR, task, NULL);
9058         if( status ) exit( status );
9059
9060         /* make sure pthread_detach() isn't just a stub */
9061 #if HAVE_PTHREADS_D4
9062         status = pthread_detach( &t );
9063 #else
9064         status = pthread_detach( t );
9065 #endif
9066
9067 #ifdef HAVE_LINUX_THREADS
9068         pthread_kill_other_threads_np();
9069 #endif
9070
9071         exit( status );
9072
9073 ; return 0; }
9074 EOF
9075 if { (eval echo configure:9076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9076   rm -rf conftest*
9077   ol_cv_pthread_lc_r=yes
9078 else
9079   echo "configure: failed program was:" >&5
9080   cat conftest.$ac_ext >&5
9081   rm -rf conftest*
9082   ol_cv_pthread_lc_r=no
9083 fi
9084 rm -f conftest*
9085 else
9086   cat > conftest.$ac_ext <<EOF
9087 #line 9088 "configure"
9088 #include "confdefs.h"
9089 /* pthread test headers */
9090 #include <pthread.h>
9091 #ifndef NULL
9092 #define NULL (void*)0
9093 #endif
9094
9095 static void *task(p)
9096         void *p;
9097 {
9098         return (void *) (p == NULL);
9099 }
9100
9101
9102 int main(argc, argv)
9103         int argc;
9104         char **argv;
9105 {
9106
9107         /* pthread test function */
9108         pthread_t t;
9109         int status;
9110 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9111         /* This system (e.g. AIX) defaults detached; must override */
9112         pthread_attr_t attr;
9113
9114         status = pthread_attr_init(&attr);
9115         if( status ) exit( status );
9116
9117         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9118         if( status ) exit( status );
9119
9120 #define ATTR    &attr
9121 #else
9122 #if HAVE_PTHREADS_D4
9123 #define ATTR    pthread_attr_default
9124 #else
9125 #define ATTR    NULL
9126 #endif
9127 #endif
9128         /* make sure pthread_create() isn't just a stub */
9129         status = pthread_create(&t, ATTR, task, NULL);
9130         if( status ) exit( status );
9131
9132         /* make sure pthread_detach() isn't just a stub */
9133 #if HAVE_PTHREADS_D4
9134         status = pthread_detach( &t );
9135 #else
9136         status = pthread_detach( t );
9137 #endif
9138
9139 #ifdef HAVE_LINUX_THREADS
9140         pthread_kill_other_threads_np();
9141 #endif
9142
9143         exit( status );
9144
9145 }
9146
9147 EOF
9148 if { (eval echo configure:9149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9149 then
9150   ol_cv_pthread_lc_r=yes
9151 else
9152   echo "configure: failed program was:" >&5
9153   cat conftest.$ac_ext >&5
9154   rm -fr conftest*
9155   ol_cv_pthread_lc_r=no
9156 fi
9157 rm -fr conftest*
9158 fi
9159
9160
9161                 # restore the LIBS
9162                 LIBS="$ol_LIBS"
9163         
9164 fi
9165
9166 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9167
9168         if test $ol_cv_pthread_lc_r = yes ; then
9169                 ol_link_pthreads="-lc_r"
9170                 ol_link_threads=posix
9171         fi
9172 fi
9173
9174
9175                 # Pthread try link: -threads (ol_cv_pthread_threads)
9176 if test "$ol_link_threads" = no ; then
9177         # try -threads
9178         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9179 echo "configure:9180: checking for pthread link with -threads" >&5
9180 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9181   echo $ac_n "(cached) $ac_c" 1>&6
9182 else
9183   
9184                 # save the flags
9185                 ol_LIBS="$LIBS"
9186                 LIBS="-threads $LIBS"
9187
9188                 if test "$cross_compiling" = yes; then
9189   cat > conftest.$ac_ext <<EOF
9190 #line 9191 "configure"
9191 #include "confdefs.h"
9192 /* pthread test headers */
9193 #include <pthread.h>
9194 #ifndef NULL
9195 #define NULL (void*)0
9196 #endif
9197
9198 static void *task(p)
9199         void *p;
9200 {
9201         return (void *) (p == NULL);
9202 }
9203
9204 int main() {
9205
9206         /* pthread test function */
9207         pthread_t t;
9208         int status;
9209 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9210         /* This system (e.g. AIX) defaults detached; must override */
9211         pthread_attr_t attr;
9212
9213         status = pthread_attr_init(&attr);
9214         if( status ) exit( status );
9215
9216         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9217         if( status ) exit( status );
9218
9219 #define ATTR    &attr
9220 #else
9221 #if HAVE_PTHREADS_D4
9222 #define ATTR    pthread_attr_default
9223 #else
9224 #define ATTR    NULL
9225 #endif
9226 #endif
9227         /* make sure pthread_create() isn't just a stub */
9228         status = pthread_create(&t, ATTR, task, NULL);
9229         if( status ) exit( status );
9230
9231         /* make sure pthread_detach() isn't just a stub */
9232 #if HAVE_PTHREADS_D4
9233         status = pthread_detach( &t );
9234 #else
9235         status = pthread_detach( t );
9236 #endif
9237
9238 #ifdef HAVE_LINUX_THREADS
9239         pthread_kill_other_threads_np();
9240 #endif
9241
9242         exit( status );
9243
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9247   rm -rf conftest*
9248   ol_cv_pthread_threads=yes
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   ol_cv_pthread_threads=no
9254 fi
9255 rm -f conftest*
9256 else
9257   cat > conftest.$ac_ext <<EOF
9258 #line 9259 "configure"
9259 #include "confdefs.h"
9260 /* pthread test headers */
9261 #include <pthread.h>
9262 #ifndef NULL
9263 #define NULL (void*)0
9264 #endif
9265
9266 static void *task(p)
9267         void *p;
9268 {
9269         return (void *) (p == NULL);
9270 }
9271
9272
9273 int main(argc, argv)
9274         int argc;
9275         char **argv;
9276 {
9277
9278         /* pthread test function */
9279         pthread_t t;
9280         int status;
9281 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9282         /* This system (e.g. AIX) defaults detached; must override */
9283         pthread_attr_t attr;
9284
9285         status = pthread_attr_init(&attr);
9286         if( status ) exit( status );
9287
9288         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9289         if( status ) exit( status );
9290
9291 #define ATTR    &attr
9292 #else
9293 #if HAVE_PTHREADS_D4
9294 #define ATTR    pthread_attr_default
9295 #else
9296 #define ATTR    NULL
9297 #endif
9298 #endif
9299         /* make sure pthread_create() isn't just a stub */
9300         status = pthread_create(&t, ATTR, task, NULL);
9301         if( status ) exit( status );
9302
9303         /* make sure pthread_detach() isn't just a stub */
9304 #if HAVE_PTHREADS_D4
9305         status = pthread_detach( &t );
9306 #else
9307         status = pthread_detach( t );
9308 #endif
9309
9310 #ifdef HAVE_LINUX_THREADS
9311         pthread_kill_other_threads_np();
9312 #endif
9313
9314         exit( status );
9315
9316 }
9317
9318 EOF
9319 if { (eval echo configure:9320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9320 then
9321   ol_cv_pthread_threads=yes
9322 else
9323   echo "configure: failed program was:" >&5
9324   cat conftest.$ac_ext >&5
9325   rm -fr conftest*
9326   ol_cv_pthread_threads=no
9327 fi
9328 rm -fr conftest*
9329 fi
9330
9331
9332                 # restore the LIBS
9333                 LIBS="$ol_LIBS"
9334         
9335 fi
9336
9337 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9338
9339         if test $ol_cv_pthread_threads = yes ; then
9340                 ol_link_pthreads="-threads"
9341                 ol_link_threads=posix
9342         fi
9343 fi
9344
9345
9346                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9347 if test "$ol_link_threads" = no ; then
9348         # try -lpthreads -lmach -lexc -lc_r
9349         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9350 echo "configure:9351: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9351 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9352   echo $ac_n "(cached) $ac_c" 1>&6
9353 else
9354   
9355                 # save the flags
9356                 ol_LIBS="$LIBS"
9357                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9358
9359                 if test "$cross_compiling" = yes; then
9360   cat > conftest.$ac_ext <<EOF
9361 #line 9362 "configure"
9362 #include "confdefs.h"
9363 /* pthread test headers */
9364 #include <pthread.h>
9365 #ifndef NULL
9366 #define NULL (void*)0
9367 #endif
9368
9369 static void *task(p)
9370         void *p;
9371 {
9372         return (void *) (p == NULL);
9373 }
9374
9375 int main() {
9376
9377         /* pthread test function */
9378         pthread_t t;
9379         int status;
9380 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9381         /* This system (e.g. AIX) defaults detached; must override */
9382         pthread_attr_t attr;
9383
9384         status = pthread_attr_init(&attr);
9385         if( status ) exit( status );
9386
9387         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9388         if( status ) exit( status );
9389
9390 #define ATTR    &attr
9391 #else
9392 #if HAVE_PTHREADS_D4
9393 #define ATTR    pthread_attr_default
9394 #else
9395 #define ATTR    NULL
9396 #endif
9397 #endif
9398         /* make sure pthread_create() isn't just a stub */
9399         status = pthread_create(&t, ATTR, task, NULL);
9400         if( status ) exit( status );
9401
9402         /* make sure pthread_detach() isn't just a stub */
9403 #if HAVE_PTHREADS_D4
9404         status = pthread_detach( &t );
9405 #else
9406         status = pthread_detach( t );
9407 #endif
9408
9409 #ifdef HAVE_LINUX_THREADS
9410         pthread_kill_other_threads_np();
9411 #endif
9412
9413         exit( status );
9414
9415 ; return 0; }
9416 EOF
9417 if { (eval echo configure:9418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9418   rm -rf conftest*
9419   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9420 else
9421   echo "configure: failed program was:" >&5
9422   cat conftest.$ac_ext >&5
9423   rm -rf conftest*
9424   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9425 fi
9426 rm -f conftest*
9427 else
9428   cat > conftest.$ac_ext <<EOF
9429 #line 9430 "configure"
9430 #include "confdefs.h"
9431 /* pthread test headers */
9432 #include <pthread.h>
9433 #ifndef NULL
9434 #define NULL (void*)0
9435 #endif
9436
9437 static void *task(p)
9438         void *p;
9439 {
9440         return (void *) (p == NULL);
9441 }
9442
9443
9444 int main(argc, argv)
9445         int argc;
9446         char **argv;
9447 {
9448
9449         /* pthread test function */
9450         pthread_t t;
9451         int status;
9452 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9453         /* This system (e.g. AIX) defaults detached; must override */
9454         pthread_attr_t attr;
9455
9456         status = pthread_attr_init(&attr);
9457         if( status ) exit( status );
9458
9459         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9460         if( status ) exit( status );
9461
9462 #define ATTR    &attr
9463 #else
9464 #if HAVE_PTHREADS_D4
9465 #define ATTR    pthread_attr_default
9466 #else
9467 #define ATTR    NULL
9468 #endif
9469 #endif
9470         /* make sure pthread_create() isn't just a stub */
9471         status = pthread_create(&t, ATTR, task, NULL);
9472         if( status ) exit( status );
9473
9474         /* make sure pthread_detach() isn't just a stub */
9475 #if HAVE_PTHREADS_D4
9476         status = pthread_detach( &t );
9477 #else
9478         status = pthread_detach( t );
9479 #endif
9480
9481 #ifdef HAVE_LINUX_THREADS
9482         pthread_kill_other_threads_np();
9483 #endif
9484
9485         exit( status );
9486
9487 }
9488
9489 EOF
9490 if { (eval echo configure:9491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9491 then
9492   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9493 else
9494   echo "configure: failed program was:" >&5
9495   cat conftest.$ac_ext >&5
9496   rm -fr conftest*
9497   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9498 fi
9499 rm -fr conftest*
9500 fi
9501
9502
9503                 # restore the LIBS
9504                 LIBS="$ol_LIBS"
9505         
9506 fi
9507
9508 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9509
9510         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9511                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9512                 ol_link_threads=posix
9513         fi
9514 fi
9515
9516                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9517 if test "$ol_link_threads" = no ; then
9518         # try -lpthreads -lmach -lexc
9519         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9520 echo "configure:9521: checking for pthread link with -lpthreads -lmach -lexc" >&5
9521 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   
9525                 # save the flags
9526                 ol_LIBS="$LIBS"
9527                 LIBS="-lpthreads -lmach -lexc $LIBS"
9528
9529                 if test "$cross_compiling" = yes; then
9530   cat > conftest.$ac_ext <<EOF
9531 #line 9532 "configure"
9532 #include "confdefs.h"
9533 /* pthread test headers */
9534 #include <pthread.h>
9535 #ifndef NULL
9536 #define NULL (void*)0
9537 #endif
9538
9539 static void *task(p)
9540         void *p;
9541 {
9542         return (void *) (p == NULL);
9543 }
9544
9545 int main() {
9546
9547         /* pthread test function */
9548         pthread_t t;
9549         int status;
9550 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9551         /* This system (e.g. AIX) defaults detached; must override */
9552         pthread_attr_t attr;
9553
9554         status = pthread_attr_init(&attr);
9555         if( status ) exit( status );
9556
9557         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9558         if( status ) exit( status );
9559
9560 #define ATTR    &attr
9561 #else
9562 #if HAVE_PTHREADS_D4
9563 #define ATTR    pthread_attr_default
9564 #else
9565 #define ATTR    NULL
9566 #endif
9567 #endif
9568         /* make sure pthread_create() isn't just a stub */
9569         status = pthread_create(&t, ATTR, task, NULL);
9570         if( status ) exit( status );
9571
9572         /* make sure pthread_detach() isn't just a stub */
9573 #if HAVE_PTHREADS_D4
9574         status = pthread_detach( &t );
9575 #else
9576         status = pthread_detach( t );
9577 #endif
9578
9579 #ifdef HAVE_LINUX_THREADS
9580         pthread_kill_other_threads_np();
9581 #endif
9582
9583         exit( status );
9584
9585 ; return 0; }
9586 EOF
9587 if { (eval echo configure:9588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9588   rm -rf conftest*
9589   ol_cv_pthread_lpthreads_lmach_lexc=yes
9590 else
9591   echo "configure: failed program was:" >&5
9592   cat conftest.$ac_ext >&5
9593   rm -rf conftest*
9594   ol_cv_pthread_lpthreads_lmach_lexc=no
9595 fi
9596 rm -f conftest*
9597 else
9598   cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 /* pthread test headers */
9602 #include <pthread.h>
9603 #ifndef NULL
9604 #define NULL (void*)0
9605 #endif
9606
9607 static void *task(p)
9608         void *p;
9609 {
9610         return (void *) (p == NULL);
9611 }
9612
9613
9614 int main(argc, argv)
9615         int argc;
9616         char **argv;
9617 {
9618
9619         /* pthread test function */
9620         pthread_t t;
9621         int status;
9622 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9623         /* This system (e.g. AIX) defaults detached; must override */
9624         pthread_attr_t attr;
9625
9626         status = pthread_attr_init(&attr);
9627         if( status ) exit( status );
9628
9629         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9630         if( status ) exit( status );
9631
9632 #define ATTR    &attr
9633 #else
9634 #if HAVE_PTHREADS_D4
9635 #define ATTR    pthread_attr_default
9636 #else
9637 #define ATTR    NULL
9638 #endif
9639 #endif
9640         /* make sure pthread_create() isn't just a stub */
9641         status = pthread_create(&t, ATTR, task, NULL);
9642         if( status ) exit( status );
9643
9644         /* make sure pthread_detach() isn't just a stub */
9645 #if HAVE_PTHREADS_D4
9646         status = pthread_detach( &t );
9647 #else
9648         status = pthread_detach( t );
9649 #endif
9650
9651 #ifdef HAVE_LINUX_THREADS
9652         pthread_kill_other_threads_np();
9653 #endif
9654
9655         exit( status );
9656
9657 }
9658
9659 EOF
9660 if { (eval echo configure:9661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9661 then
9662   ol_cv_pthread_lpthreads_lmach_lexc=yes
9663 else
9664   echo "configure: failed program was:" >&5
9665   cat conftest.$ac_ext >&5
9666   rm -fr conftest*
9667   ol_cv_pthread_lpthreads_lmach_lexc=no
9668 fi
9669 rm -fr conftest*
9670 fi
9671
9672
9673                 # restore the LIBS
9674                 LIBS="$ol_LIBS"
9675         
9676 fi
9677
9678 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9679
9680         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9681                 ol_link_pthreads="-lpthreads -lmach -lexc"
9682                 ol_link_threads=posix
9683         fi
9684 fi
9685
9686                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9687 if test "$ol_link_threads" = no ; then
9688         # try -lpthreads -lexc
9689         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9690 echo "configure:9691: checking for pthread link with -lpthreads -lexc" >&5
9691 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9692   echo $ac_n "(cached) $ac_c" 1>&6
9693 else
9694   
9695                 # save the flags
9696                 ol_LIBS="$LIBS"
9697                 LIBS="-lpthreads -lexc $LIBS"
9698
9699                 if test "$cross_compiling" = yes; then
9700   cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703 /* pthread test headers */
9704 #include <pthread.h>
9705 #ifndef NULL
9706 #define NULL (void*)0
9707 #endif
9708
9709 static void *task(p)
9710         void *p;
9711 {
9712         return (void *) (p == NULL);
9713 }
9714
9715 int main() {
9716
9717         /* pthread test function */
9718         pthread_t t;
9719         int status;
9720 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9721         /* This system (e.g. AIX) defaults detached; must override */
9722         pthread_attr_t attr;
9723
9724         status = pthread_attr_init(&attr);
9725         if( status ) exit( status );
9726
9727         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9728         if( status ) exit( status );
9729
9730 #define ATTR    &attr
9731 #else
9732 #if HAVE_PTHREADS_D4
9733 #define ATTR    pthread_attr_default
9734 #else
9735 #define ATTR    NULL
9736 #endif
9737 #endif
9738         /* make sure pthread_create() isn't just a stub */
9739         status = pthread_create(&t, ATTR, task, NULL);
9740         if( status ) exit( status );
9741
9742         /* make sure pthread_detach() isn't just a stub */
9743 #if HAVE_PTHREADS_D4
9744         status = pthread_detach( &t );
9745 #else
9746         status = pthread_detach( t );
9747 #endif
9748
9749 #ifdef HAVE_LINUX_THREADS
9750         pthread_kill_other_threads_np();
9751 #endif
9752
9753         exit( status );
9754
9755 ; return 0; }
9756 EOF
9757 if { (eval echo configure:9758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9758   rm -rf conftest*
9759   ol_cv_pthread_lpthreads_lexc=yes
9760 else
9761   echo "configure: failed program was:" >&5
9762   cat conftest.$ac_ext >&5
9763   rm -rf conftest*
9764   ol_cv_pthread_lpthreads_lexc=no
9765 fi
9766 rm -f conftest*
9767 else
9768   cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771 /* pthread test headers */
9772 #include <pthread.h>
9773 #ifndef NULL
9774 #define NULL (void*)0
9775 #endif
9776
9777 static void *task(p)
9778         void *p;
9779 {
9780         return (void *) (p == NULL);
9781 }
9782
9783
9784 int main(argc, argv)
9785         int argc;
9786         char **argv;
9787 {
9788
9789         /* pthread test function */
9790         pthread_t t;
9791         int status;
9792 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9793         /* This system (e.g. AIX) defaults detached; must override */
9794         pthread_attr_t attr;
9795
9796         status = pthread_attr_init(&attr);
9797         if( status ) exit( status );
9798
9799         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9800         if( status ) exit( status );
9801
9802 #define ATTR    &attr
9803 #else
9804 #if HAVE_PTHREADS_D4
9805 #define ATTR    pthread_attr_default
9806 #else
9807 #define ATTR    NULL
9808 #endif
9809 #endif
9810         /* make sure pthread_create() isn't just a stub */
9811         status = pthread_create(&t, ATTR, task, NULL);
9812         if( status ) exit( status );
9813
9814         /* make sure pthread_detach() isn't just a stub */
9815 #if HAVE_PTHREADS_D4
9816         status = pthread_detach( &t );
9817 #else
9818         status = pthread_detach( t );
9819 #endif
9820
9821 #ifdef HAVE_LINUX_THREADS
9822         pthread_kill_other_threads_np();
9823 #endif
9824
9825         exit( status );
9826
9827 }
9828
9829 EOF
9830 if { (eval echo configure:9831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9831 then
9832   ol_cv_pthread_lpthreads_lexc=yes
9833 else
9834   echo "configure: failed program was:" >&5
9835   cat conftest.$ac_ext >&5
9836   rm -fr conftest*
9837   ol_cv_pthread_lpthreads_lexc=no
9838 fi
9839 rm -fr conftest*
9840 fi
9841
9842
9843                 # restore the LIBS
9844                 LIBS="$ol_LIBS"
9845         
9846 fi
9847
9848 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9849
9850         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9851                 ol_link_pthreads="-lpthreads -lexc"
9852                 ol_link_threads=posix
9853         fi
9854 fi
9855
9856
9857                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9858 if test "$ol_link_threads" = no ; then
9859         # try -lpthreads
9860         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9861 echo "configure:9862: checking for pthread link with -lpthreads" >&5
9862 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9863   echo $ac_n "(cached) $ac_c" 1>&6
9864 else
9865   
9866                 # save the flags
9867                 ol_LIBS="$LIBS"
9868                 LIBS="-lpthreads $LIBS"
9869
9870                 if test "$cross_compiling" = yes; then
9871   cat > conftest.$ac_ext <<EOF
9872 #line 9873 "configure"
9873 #include "confdefs.h"
9874 /* pthread test headers */
9875 #include <pthread.h>
9876 #ifndef NULL
9877 #define NULL (void*)0
9878 #endif
9879
9880 static void *task(p)
9881         void *p;
9882 {
9883         return (void *) (p == NULL);
9884 }
9885
9886 int main() {
9887
9888         /* pthread test function */
9889         pthread_t t;
9890         int status;
9891 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9892         /* This system (e.g. AIX) defaults detached; must override */
9893         pthread_attr_t attr;
9894
9895         status = pthread_attr_init(&attr);
9896         if( status ) exit( status );
9897
9898         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9899         if( status ) exit( status );
9900
9901 #define ATTR    &attr
9902 #else
9903 #if HAVE_PTHREADS_D4
9904 #define ATTR    pthread_attr_default
9905 #else
9906 #define ATTR    NULL
9907 #endif
9908 #endif
9909         /* make sure pthread_create() isn't just a stub */
9910         status = pthread_create(&t, ATTR, task, NULL);
9911         if( status ) exit( status );
9912
9913         /* make sure pthread_detach() isn't just a stub */
9914 #if HAVE_PTHREADS_D4
9915         status = pthread_detach( &t );
9916 #else
9917         status = pthread_detach( t );
9918 #endif
9919
9920 #ifdef HAVE_LINUX_THREADS
9921         pthread_kill_other_threads_np();
9922 #endif
9923
9924         exit( status );
9925
9926 ; return 0; }
9927 EOF
9928 if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9929   rm -rf conftest*
9930   ol_cv_pthread_lib_lpthreads=yes
9931 else
9932   echo "configure: failed program was:" >&5
9933   cat conftest.$ac_ext >&5
9934   rm -rf conftest*
9935   ol_cv_pthread_lib_lpthreads=no
9936 fi
9937 rm -f conftest*
9938 else
9939   cat > conftest.$ac_ext <<EOF
9940 #line 9941 "configure"
9941 #include "confdefs.h"
9942 /* pthread test headers */
9943 #include <pthread.h>
9944 #ifndef NULL
9945 #define NULL (void*)0
9946 #endif
9947
9948 static void *task(p)
9949         void *p;
9950 {
9951         return (void *) (p == NULL);
9952 }
9953
9954
9955 int main(argc, argv)
9956         int argc;
9957         char **argv;
9958 {
9959
9960         /* pthread test function */
9961         pthread_t t;
9962         int status;
9963 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9964         /* This system (e.g. AIX) defaults detached; must override */
9965         pthread_attr_t attr;
9966
9967         status = pthread_attr_init(&attr);
9968         if( status ) exit( status );
9969
9970         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9971         if( status ) exit( status );
9972
9973 #define ATTR    &attr
9974 #else
9975 #if HAVE_PTHREADS_D4
9976 #define ATTR    pthread_attr_default
9977 #else
9978 #define ATTR    NULL
9979 #endif
9980 #endif
9981         /* make sure pthread_create() isn't just a stub */
9982         status = pthread_create(&t, ATTR, task, NULL);
9983         if( status ) exit( status );
9984
9985         /* make sure pthread_detach() isn't just a stub */
9986 #if HAVE_PTHREADS_D4
9987         status = pthread_detach( &t );
9988 #else
9989         status = pthread_detach( t );
9990 #endif
9991
9992 #ifdef HAVE_LINUX_THREADS
9993         pthread_kill_other_threads_np();
9994 #endif
9995
9996         exit( status );
9997
9998 }
9999
10000 EOF
10001 if { (eval echo configure:10002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10002 then
10003   ol_cv_pthread_lib_lpthreads=yes
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007   rm -fr conftest*
10008   ol_cv_pthread_lib_lpthreads=no
10009 fi
10010 rm -fr conftest*
10011 fi
10012
10013
10014                 # restore the LIBS
10015                 LIBS="$ol_LIBS"
10016         
10017 fi
10018
10019 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10020
10021         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10022                 ol_link_pthreads="-lpthreads"
10023                 ol_link_threads=posix
10024         fi
10025 fi
10026
10027
10028                 if test $ol_link_threads != no ; then
10029                         cat >> confdefs.h <<\EOF
10030 #define HAVE_PTHREADS 1
10031 EOF
10032
10033
10034                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10035
10036                                                 save_CPPFLAGS="$CPPFLAGS"
10037                         save_LIBS="$LIBS"
10038                         LIBS="$LTHREAD_LIBS $LIBS"
10039
10040                                                                                                 for ac_func in sched_yield pthread_yield
10041 do
10042 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10043 echo "configure:10044: checking for $ac_func" >&5
10044 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10045   echo $ac_n "(cached) $ac_c" 1>&6
10046 else
10047   cat > conftest.$ac_ext <<EOF
10048 #line 10049 "configure"
10049 #include "confdefs.h"
10050 /* System header to define __stub macros and hopefully few prototypes,
10051     which can conflict with char $ac_func(); below.  */
10052 #include <assert.h>
10053 /* Override any gcc2 internal prototype to avoid an error.  */
10054 /* We use char because int might match the return type of a gcc2
10055     builtin and then its argument prototype would still apply.  */
10056 char $ac_func();
10057 char (*f)();
10058
10059 int main() {
10060
10061 /* The GNU C library defines this for functions which it implements
10062     to always fail with ENOSYS.  Some functions are actually named
10063     something starting with __ and the normal name is an alias.  */
10064 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10065 choke me
10066 #else
10067 f = $ac_func;
10068 #endif
10069
10070 ; return 0; }
10071 EOF
10072 if { (eval echo configure:10073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10073   rm -rf conftest*
10074   eval "ac_cv_func_$ac_func=yes"
10075 else
10076   echo "configure: failed program was:" >&5
10077   cat conftest.$ac_ext >&5
10078   rm -rf conftest*
10079   eval "ac_cv_func_$ac_func=no"
10080 fi
10081 rm -f conftest*
10082 fi
10083
10084 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10085   echo "$ac_t""yes" 1>&6
10086     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10087   cat >> confdefs.h <<EOF
10088 #define $ac_tr_func 1
10089 EOF
10090  
10091 else
10092   echo "$ac_t""no" 1>&6
10093 fi
10094 done
10095
10096
10097                         if test $ac_cv_func_sched_yield = no -a \
10098                                 $ac_cv_func_pthread_yield = no ; then
10099                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10100 echo "configure:10101: checking for sched_yield in -lrt" >&5
10101 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10102 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10103   echo $ac_n "(cached) $ac_c" 1>&6
10104 else
10105   ac_save_LIBS="$LIBS"
10106 LIBS="-lrt  $LIBS"
10107 cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110 /* Override any gcc2 internal prototype to avoid an error.  */
10111 /* We use char because int might match the return type of a gcc2
10112     builtin and then its argument prototype would still apply.  */
10113 char sched_yield();
10114
10115 int main() {
10116 sched_yield()
10117 ; return 0; }
10118 EOF
10119 if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10120   rm -rf conftest*
10121   eval "ac_cv_lib_$ac_lib_var=yes"
10122 else
10123   echo "configure: failed program was:" >&5
10124   cat conftest.$ac_ext >&5
10125   rm -rf conftest*
10126   eval "ac_cv_lib_$ac_lib_var=no"
10127 fi
10128 rm -f conftest*
10129 LIBS="$ac_save_LIBS"
10130
10131 fi
10132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10133   echo "$ac_t""yes" 1>&6
10134   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10135                                         cat >> confdefs.h <<\EOF
10136 #define HAVE_SCHED_YIELD 1
10137 EOF
10138
10139                                         ac_cv_func_sched_yield=yes
10140 else
10141   echo "$ac_t""no" 1>&6
10142 ac_cv_func_sched_yield=no
10143 fi
10144
10145                         fi
10146                         if test $ac_cv_func_sched_yield = no -a \
10147                                 $ac_cv_func_pthread_yield = no ; then
10148                                                                                                 for ac_func in thr_yield
10149 do
10150 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10151 echo "configure:10152: checking for $ac_func" >&5
10152 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10153   echo $ac_n "(cached) $ac_c" 1>&6
10154 else
10155   cat > conftest.$ac_ext <<EOF
10156 #line 10157 "configure"
10157 #include "confdefs.h"
10158 /* System header to define __stub macros and hopefully few prototypes,
10159     which can conflict with char $ac_func(); below.  */
10160 #include <assert.h>
10161 /* Override any gcc2 internal prototype to avoid an error.  */
10162 /* We use char because int might match the return type of a gcc2
10163     builtin and then its argument prototype would still apply.  */
10164 char $ac_func();
10165 char (*f)();
10166
10167 int main() {
10168
10169 /* The GNU C library defines this for functions which it implements
10170     to always fail with ENOSYS.  Some functions are actually named
10171     something starting with __ and the normal name is an alias.  */
10172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10173 choke me
10174 #else
10175 f = $ac_func;
10176 #endif
10177
10178 ; return 0; }
10179 EOF
10180 if { (eval echo configure:10181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10181   rm -rf conftest*
10182   eval "ac_cv_func_$ac_func=yes"
10183 else
10184   echo "configure: failed program was:" >&5
10185   cat conftest.$ac_ext >&5
10186   rm -rf conftest*
10187   eval "ac_cv_func_$ac_func=no"
10188 fi
10189 rm -f conftest*
10190 fi
10191
10192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10193   echo "$ac_t""yes" 1>&6
10194     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10195   cat >> confdefs.h <<EOF
10196 #define $ac_tr_func 1
10197 EOF
10198  
10199 else
10200   echo "$ac_t""no" 1>&6
10201 fi
10202 done
10203
10204                         fi
10205                         if test $ac_cv_func_sched_yield = no -a \
10206                                 $ac_cv_func_pthread_yield = no -a \
10207                                 "$ac_cv_func_thr_yield" = no ; then
10208                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10209                         fi
10210
10211                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10212 do
10213 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10214 echo "configure:10215: checking for $ac_func" >&5
10215 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10216   echo $ac_n "(cached) $ac_c" 1>&6
10217 else
10218   cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 /* System header to define __stub macros and hopefully few prototypes,
10222     which can conflict with char $ac_func(); below.  */
10223 #include <assert.h>
10224 /* Override any gcc2 internal prototype to avoid an error.  */
10225 /* We use char because int might match the return type of a gcc2
10226     builtin and then its argument prototype would still apply.  */
10227 char $ac_func();
10228 char (*f)();
10229
10230 int main() {
10231
10232 /* The GNU C library defines this for functions which it implements
10233     to always fail with ENOSYS.  Some functions are actually named
10234     something starting with __ and the normal name is an alias.  */
10235 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10236 choke me
10237 #else
10238 f = $ac_func;
10239 #endif
10240
10241 ; return 0; }
10242 EOF
10243 if { (eval echo configure:10244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10244   rm -rf conftest*
10245   eval "ac_cv_func_$ac_func=yes"
10246 else
10247   echo "configure: failed program was:" >&5
10248   cat conftest.$ac_ext >&5
10249   rm -rf conftest*
10250   eval "ac_cv_func_$ac_func=no"
10251 fi
10252 rm -f conftest*
10253 fi
10254
10255 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10256   echo "$ac_t""yes" 1>&6
10257     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10258   cat >> confdefs.h <<EOF
10259 #define $ac_tr_func 1
10260 EOF
10261  
10262 else
10263   echo "$ac_t""no" 1>&6
10264 fi
10265 done
10266
10267
10268                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10269 echo "configure:10270: checking for pthread_detach with <pthread.h>" >&5
10270 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10271   echo $ac_n "(cached) $ac_c" 1>&6
10272 else
10273   
10274                                                                 cat > conftest.$ac_ext <<EOF
10275 #line 10276 "configure"
10276 #include "confdefs.h"
10277
10278 #include <pthread.h>
10279 #ifndef NULL
10280 #define NULL (void*)0
10281 #endif
10282
10283 int main() {
10284 pthread_detach(NULL);
10285 ; return 0; }
10286 EOF
10287 if { (eval echo configure:10288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10288   rm -rf conftest*
10289   ol_cv_func_pthread_detach=yes
10290 else
10291   echo "configure: failed program was:" >&5
10292   cat conftest.$ac_ext >&5
10293   rm -rf conftest*
10294   ol_cv_func_pthread_detach=no
10295 fi
10296 rm -f conftest*
10297                         
10298 fi
10299
10300 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10301
10302                         if test $ol_cv_func_pthread_detach = no ; then
10303                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10304                         fi
10305
10306                         cat >> confdefs.h <<\EOF
10307 #define HAVE_PTHREAD_DETACH 1
10308 EOF
10309
10310
10311                                                 for ac_func in \
10312                                 pthread_setconcurrency \
10313                                 pthread_getconcurrency \
10314                                 thr_setconcurrency \
10315                                 thr_getconcurrency \
10316                         
10317 do
10318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10319 echo "configure:10320: checking for $ac_func" >&5
10320 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10321   echo $ac_n "(cached) $ac_c" 1>&6
10322 else
10323   cat > conftest.$ac_ext <<EOF
10324 #line 10325 "configure"
10325 #include "confdefs.h"
10326 /* System header to define __stub macros and hopefully few prototypes,
10327     which can conflict with char $ac_func(); below.  */
10328 #include <assert.h>
10329 /* Override any gcc2 internal prototype to avoid an error.  */
10330 /* We use char because int might match the return type of a gcc2
10331     builtin and then its argument prototype would still apply.  */
10332 char $ac_func();
10333 char (*f)();
10334
10335 int main() {
10336
10337 /* The GNU C library defines this for functions which it implements
10338     to always fail with ENOSYS.  Some functions are actually named
10339     something starting with __ and the normal name is an alias.  */
10340 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10341 choke me
10342 #else
10343 f = $ac_func;
10344 #endif
10345
10346 ; return 0; }
10347 EOF
10348 if { (eval echo configure:10349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10349   rm -rf conftest*
10350   eval "ac_cv_func_$ac_func=yes"
10351 else
10352   echo "configure: failed program was:" >&5
10353   cat conftest.$ac_ext >&5
10354   rm -rf conftest*
10355   eval "ac_cv_func_$ac_func=no"
10356 fi
10357 rm -f conftest*
10358 fi
10359
10360 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10361   echo "$ac_t""yes" 1>&6
10362     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10363   cat >> confdefs.h <<EOF
10364 #define $ac_tr_func 1
10365 EOF
10366  
10367 else
10368   echo "$ac_t""no" 1>&6
10369 fi
10370 done
10371
10372
10373                         
10374         for ac_func in pthread_kill_other_threads_np
10375 do
10376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10377 echo "configure:10378: checking for $ac_func" >&5
10378 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10379   echo $ac_n "(cached) $ac_c" 1>&6
10380 else
10381   cat > conftest.$ac_ext <<EOF
10382 #line 10383 "configure"
10383 #include "confdefs.h"
10384 /* System header to define __stub macros and hopefully few prototypes,
10385     which can conflict with char $ac_func(); below.  */
10386 #include <assert.h>
10387 /* Override any gcc2 internal prototype to avoid an error.  */
10388 /* We use char because int might match the return type of a gcc2
10389     builtin and then its argument prototype would still apply.  */
10390 char $ac_func();
10391 char (*f)();
10392
10393 int main() {
10394
10395 /* The GNU C library defines this for functions which it implements
10396     to always fail with ENOSYS.  Some functions are actually named
10397     something starting with __ and the normal name is an alias.  */
10398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10399 choke me
10400 #else
10401 f = $ac_func;
10402 #endif
10403
10404 ; return 0; }
10405 EOF
10406 if { (eval echo configure:10407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10407   rm -rf conftest*
10408   eval "ac_cv_func_$ac_func=yes"
10409 else
10410   echo "configure: failed program was:" >&5
10411   cat conftest.$ac_ext >&5
10412   rm -rf conftest*
10413   eval "ac_cv_func_$ac_func=no"
10414 fi
10415 rm -f conftest*
10416 fi
10417
10418 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10419   echo "$ac_t""yes" 1>&6
10420     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10421   cat >> confdefs.h <<EOF
10422 #define $ac_tr_func 1
10423 EOF
10424  
10425 else
10426   echo "$ac_t""no" 1>&6
10427 fi
10428 done
10429
10430         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10431 echo "configure:10432: checking for LinuxThreads implementation" >&5
10432 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10433   echo $ac_n "(cached) $ac_c" 1>&6
10434 else
10435   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10436 fi
10437
10438 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10439
10440                         
10441         
10442         
10443         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10444 echo "configure:10445: checking for LinuxThreads consistency" >&5
10445 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10446   echo $ac_n "(cached) $ac_c" 1>&6
10447 else
10448   
10449                 if test $ol_cv_header_linux_threads = yes -a \
10450                         $ol_cv_sys_linux_threads = yes; then
10451                         ol_cv_linux_threads=yes
10452                 elif test $ol_cv_header_linux_threads = no -a \
10453                         $ol_cv_sys_linux_threads = no; then
10454                         ol_cv_linux_threads=no
10455                 else
10456                         ol_cv_linux_threads=error
10457                 fi
10458         
10459 fi
10460
10461 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10462
10463
10464                         if test $ol_cv_linux_threads = error; then
10465                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10466                         fi
10467
10468                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10469 echo "configure:10470: checking if pthread_create() works" >&5
10470 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10471   echo $ac_n "(cached) $ac_c" 1>&6
10472 else
10473   
10474                         if test "$cross_compiling" = yes; then
10475                                 ol_cv_pthread_create_works=yes
10476 else
10477   cat > conftest.$ac_ext <<EOF
10478 #line 10479 "configure"
10479 #include "confdefs.h"
10480 /* pthread test headers */
10481 #include <pthread.h>
10482 #ifndef NULL
10483 #define NULL (void*)0
10484 #endif
10485
10486 static void *task(p)
10487         void *p;
10488 {
10489         return (void *) (p == NULL);
10490 }
10491
10492
10493 int main(argc, argv)
10494         int argc;
10495         char **argv;
10496 {
10497
10498         /* pthread test function */
10499         pthread_t t;
10500         int status;
10501 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10502         /* This system (e.g. AIX) defaults detached; must override */
10503         pthread_attr_t attr;
10504
10505         status = pthread_attr_init(&attr);
10506         if( status ) exit( status );
10507
10508         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10509         if( status ) exit( status );
10510
10511 #define ATTR    &attr
10512 #else
10513 #if HAVE_PTHREADS_D4
10514 #define ATTR    pthread_attr_default
10515 #else
10516 #define ATTR    NULL
10517 #endif
10518 #endif
10519         /* make sure pthread_create() isn't just a stub */
10520         status = pthread_create(&t, ATTR, task, NULL);
10521         if( status ) exit( status );
10522
10523         /* make sure pthread_detach() isn't just a stub */
10524 #if HAVE_PTHREADS_D4
10525         status = pthread_detach( &t );
10526 #else
10527         status = pthread_detach( t );
10528 #endif
10529
10530 #ifdef HAVE_LINUX_THREADS
10531         pthread_kill_other_threads_np();
10532 #endif
10533
10534         exit( status );
10535
10536 }
10537
10538 EOF
10539 if { (eval echo configure:10540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10540 then
10541   ol_cv_pthread_create_works=yes
10542 else
10543   echo "configure: failed program was:" >&5
10544   cat conftest.$ac_ext >&5
10545   rm -fr conftest*
10546   ol_cv_pthread_create_works=no
10547 fi
10548 rm -fr conftest*
10549 fi
10550
10551 fi
10552
10553 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10554
10555                         if test $ol_cv_pthread_create_works = no ; then
10556                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10557                         fi
10558
10559                                                 if test $ol_with_yielding_select = auto ; then
10560                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10561 echo "configure:10562: checking if select yields when using pthreads" >&5
10562 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10563   echo $ac_n "(cached) $ac_c" 1>&6
10564 else
10565   
10566                                 if test "$cross_compiling" = yes; then
10567   ol_cv_pthread_select_yields=cross
10568 else
10569   cat > conftest.$ac_ext <<EOF
10570 #line 10571 "configure"
10571 #include "confdefs.h"
10572
10573 #include <sys/types.h>
10574 #include <sys/time.h>
10575 #include <unistd.h>
10576 #include <pthread.h>
10577 #ifndef NULL
10578 #define NULL (void*) 0
10579 #endif
10580
10581 static int fildes[2];
10582
10583 static void *task(p)
10584         void *p;
10585 {
10586         int i;
10587         struct timeval tv;
10588
10589         fd_set rfds;
10590
10591         tv.tv_sec=10;
10592         tv.tv_usec=0;
10593
10594         FD_ZERO(&rfds);
10595         FD_SET(fildes[0], &rfds);
10596
10597         /* we're not interested in any fds */
10598         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10599
10600         if(i < 0) {
10601                 perror("select");
10602                 exit(10);
10603         }
10604
10605         exit(0); /* if we exit here, the select blocked the whole process */
10606 }
10607
10608 int main(argc, argv)
10609         int argc;
10610         char **argv;
10611 {
10612         pthread_t t;
10613
10614         /* create a pipe to select */
10615         if(pipe(&fildes[0])) {
10616                 perror("select");
10617                 exit(1);
10618         }
10619
10620 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10621         (void) pthread_setconcurrency(2);
10622 #else
10623 #ifdef HAVE_THR_SETCONCURRENCY
10624         /* Set Solaris LWP concurrency to 2 */
10625         thr_setconcurrency(2);
10626 #endif
10627 #endif
10628
10629 #if HAVE_PTHREADS_D4
10630         pthread_create(&t, pthread_attr_default, task, NULL);
10631 #else
10632         pthread_create(&t, NULL, task, NULL);
10633 #endif
10634
10635 #if HAVE_SCHED_YIELD
10636         sched_yield();  /* make sure task runs first */
10637 #else
10638 #ifdef HAVE_PTHREAD_YIELD
10639         pthread_yield();        /* make sure task runs first */
10640 #endif
10641 #endif
10642
10643         exit(2);
10644 }
10645 EOF
10646 if { (eval echo configure:10647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10647 then
10648   ol_cv_pthread_select_yields=no
10649 else
10650   echo "configure: failed program was:" >&5
10651   cat conftest.$ac_ext >&5
10652   rm -fr conftest*
10653   ol_cv_pthread_select_yields=yes
10654 fi
10655 rm -fr conftest*
10656 fi
10657
10658 fi
10659
10660 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10661
10662                                 if test $ol_cv_pthread_select_yields = cross ; then
10663                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10664                                 fi
10665
10666                                 if test $ol_cv_pthread_select_yields = yes ; then
10667                                         ol_with_yielding_select=yes
10668                                 fi
10669                         fi
10670
10671                                                 CPPFLAGS="$save_CPPFLAGS"
10672                         LIBS="$save_LIBS"
10673                 else
10674                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10675                 fi
10676         fi
10677
10678         if test $ol_with_threads = posix ; then
10679                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10680         fi
10681 fi
10682
10683 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10684         -o $ol_with_threads = mach ; then
10685
10686                 for ac_hdr in mach/cthreads.h
10687 do
10688 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10689 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10690 echo "configure:10691: checking for $ac_hdr" >&5
10691 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10692   echo $ac_n "(cached) $ac_c" 1>&6
10693 else
10694   cat > conftest.$ac_ext <<EOF
10695 #line 10696 "configure"
10696 #include "confdefs.h"
10697 #include <$ac_hdr>
10698 EOF
10699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10700 { (eval echo configure:10701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10702 if test -z "$ac_err"; then
10703   rm -rf conftest*
10704   eval "ac_cv_header_$ac_safe=yes"
10705 else
10706   echo "$ac_err" >&5
10707   echo "configure: failed program was:" >&5
10708   cat conftest.$ac_ext >&5
10709   rm -rf conftest*
10710   eval "ac_cv_header_$ac_safe=no"
10711 fi
10712 rm -f conftest*
10713 fi
10714 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10715   echo "$ac_t""yes" 1>&6
10716     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10717   cat >> confdefs.h <<EOF
10718 #define $ac_tr_hdr 1
10719 EOF
10720  
10721 else
10722   echo "$ac_t""no" 1>&6
10723 fi
10724 done
10725
10726         if test $ac_cv_header_mach_cthreads_h = yes ; then
10727                 ol_with_threads=found
10728
10729                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10730 echo "configure:10731: checking for cthread_fork" >&5
10731 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10732   echo $ac_n "(cached) $ac_c" 1>&6
10733 else
10734   cat > conftest.$ac_ext <<EOF
10735 #line 10736 "configure"
10736 #include "confdefs.h"
10737 /* System header to define __stub macros and hopefully few prototypes,
10738     which can conflict with char cthread_fork(); below.  */
10739 #include <assert.h>
10740 /* Override any gcc2 internal prototype to avoid an error.  */
10741 /* We use char because int might match the return type of a gcc2
10742     builtin and then its argument prototype would still apply.  */
10743 char cthread_fork();
10744 char (*f)();
10745
10746 int main() {
10747
10748 /* The GNU C library defines this for functions which it implements
10749     to always fail with ENOSYS.  Some functions are actually named
10750     something starting with __ and the normal name is an alias.  */
10751 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10752 choke me
10753 #else
10754 f = cthread_fork;
10755 #endif
10756
10757 ; return 0; }
10758 EOF
10759 if { (eval echo configure:10760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10760   rm -rf conftest*
10761   eval "ac_cv_func_cthread_fork=yes"
10762 else
10763   echo "configure: failed program was:" >&5
10764   cat conftest.$ac_ext >&5
10765   rm -rf conftest*
10766   eval "ac_cv_func_cthread_fork=no"
10767 fi
10768 rm -f conftest*
10769 fi
10770
10771 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10772   echo "$ac_t""yes" 1>&6
10773   ol_link_threads=yes
10774 else
10775   echo "$ac_t""no" 1>&6
10776 fi
10777
10778
10779                 if test $ol_link_threads = no ; then
10780                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10781 echo "configure:10782: checking for cthread_fork with -all_load" >&5
10782 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10783   echo $ac_n "(cached) $ac_c" 1>&6
10784 else
10785   
10786                                                                 save_LIBS="$LIBS"
10787                                 LIBS="-all_load $LIBS"
10788                                 cat > conftest.$ac_ext <<EOF
10789 #line 10790 "configure"
10790 #include "confdefs.h"
10791 #include <mach/cthreads.h>
10792 int main() {
10793
10794                                         cthread_fork((void *)0, (void *)0);
10795                                         
10796 ; return 0; }
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10799   rm -rf conftest*
10800   ol_cv_cthread_all_load=yes
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -rf conftest*
10805   ol_cv_cthread_all_load=no
10806 fi
10807 rm -f conftest*
10808                                                                 LIBS="$save_LIBS"
10809                         
10810 fi
10811
10812 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10813
10814                         if test $ol_cv_cthread_all_load = yes ; then
10815                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10816                                 ol_link_threads=mach
10817                         fi
10818                 fi
10819
10820                 if test $ol_link_threads != no ; then
10821                         : check for cthread specific functionality here
10822                         cat >> confdefs.h <<\EOF
10823 #define HAVE_MACH_CTHREADS 1
10824 EOF
10825
10826                 else
10827                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10828                 fi
10829         fi
10830
10831         if test $ol_with_threads = mach ; then
10832                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10833         fi
10834 fi
10835
10836 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10837         -o $ol_with_threads = pth ; then
10838
10839         for ac_hdr in pth.h
10840 do
10841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10843 echo "configure:10844: checking for $ac_hdr" >&5
10844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10845   echo $ac_n "(cached) $ac_c" 1>&6
10846 else
10847   cat > conftest.$ac_ext <<EOF
10848 #line 10849 "configure"
10849 #include "confdefs.h"
10850 #include <$ac_hdr>
10851 EOF
10852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10853 { (eval echo configure:10854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10855 if test -z "$ac_err"; then
10856   rm -rf conftest*
10857   eval "ac_cv_header_$ac_safe=yes"
10858 else
10859   echo "$ac_err" >&5
10860   echo "configure: failed program was:" >&5
10861   cat conftest.$ac_ext >&5
10862   rm -rf conftest*
10863   eval "ac_cv_header_$ac_safe=no"
10864 fi
10865 rm -f conftest*
10866 fi
10867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10868   echo "$ac_t""yes" 1>&6
10869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10870   cat >> confdefs.h <<EOF
10871 #define $ac_tr_hdr 1
10872 EOF
10873  
10874 else
10875   echo "$ac_t""no" 1>&6
10876 fi
10877 done
10878
10879
10880         if test $ac_cv_header_pth_h = yes ; then
10881                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10882 echo "configure:10883: checking for pth_version in -lpth" >&5
10883 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10884 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10885   echo $ac_n "(cached) $ac_c" 1>&6
10886 else
10887   ac_save_LIBS="$LIBS"
10888 LIBS="-lpth  $LIBS"
10889 cat > conftest.$ac_ext <<EOF
10890 #line 10891 "configure"
10891 #include "confdefs.h"
10892 /* Override any gcc2 internal prototype to avoid an error.  */
10893 /* We use char because int might match the return type of a gcc2
10894     builtin and then its argument prototype would still apply.  */
10895 char pth_version();
10896
10897 int main() {
10898 pth_version()
10899 ; return 0; }
10900 EOF
10901 if { (eval echo configure:10902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10902   rm -rf conftest*
10903   eval "ac_cv_lib_$ac_lib_var=yes"
10904 else
10905   echo "configure: failed program was:" >&5
10906   cat conftest.$ac_ext >&5
10907   rm -rf conftest*
10908   eval "ac_cv_lib_$ac_lib_var=no"
10909 fi
10910 rm -f conftest*
10911 LIBS="$ac_save_LIBS"
10912
10913 fi
10914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10915   echo "$ac_t""yes" 1>&6
10916   have_pth=yes
10917 else
10918   echo "$ac_t""no" 1>&6
10919 have_pth=no
10920 fi
10921
10922
10923                 if test $have_pth = yes ; then
10924                         cat >> confdefs.h <<\EOF
10925 #define HAVE_GNU_PTH 1
10926 EOF
10927
10928                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10929                         ol_link_threads=pth
10930
10931                         if test $ol_with_yielding_select = auto ; then
10932                                 ol_with_yielding_select=yes
10933                         fi
10934                 fi
10935         fi
10936 fi
10937
10938 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10939         -o $ol_with_threads = lwp ; then
10940
10941                 for ac_hdr in thread.h synch.h
10942 do
10943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10945 echo "configure:10946: checking for $ac_hdr" >&5
10946 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10947   echo $ac_n "(cached) $ac_c" 1>&6
10948 else
10949   cat > conftest.$ac_ext <<EOF
10950 #line 10951 "configure"
10951 #include "confdefs.h"
10952 #include <$ac_hdr>
10953 EOF
10954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10955 { (eval echo configure:10956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10957 if test -z "$ac_err"; then
10958   rm -rf conftest*
10959   eval "ac_cv_header_$ac_safe=yes"
10960 else
10961   echo "$ac_err" >&5
10962   echo "configure: failed program was:" >&5
10963   cat conftest.$ac_ext >&5
10964   rm -rf conftest*
10965   eval "ac_cv_header_$ac_safe=no"
10966 fi
10967 rm -f conftest*
10968 fi
10969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10970   echo "$ac_t""yes" 1>&6
10971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10972   cat >> confdefs.h <<EOF
10973 #define $ac_tr_hdr 1
10974 EOF
10975  
10976 else
10977   echo "$ac_t""no" 1>&6
10978 fi
10979 done
10980
10981         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10982                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10983 echo "configure:10984: checking for thr_create in -lthread" >&5
10984 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10986   echo $ac_n "(cached) $ac_c" 1>&6
10987 else
10988   ac_save_LIBS="$LIBS"
10989 LIBS="-lthread  $LIBS"
10990 cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 /* Override any gcc2 internal prototype to avoid an error.  */
10994 /* We use char because int might match the return type of a gcc2
10995     builtin and then its argument prototype would still apply.  */
10996 char thr_create();
10997
10998 int main() {
10999 thr_create()
11000 ; return 0; }
11001 EOF
11002 if { (eval echo configure:11003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11003   rm -rf conftest*
11004   eval "ac_cv_lib_$ac_lib_var=yes"
11005 else
11006   echo "configure: failed program was:" >&5
11007   cat conftest.$ac_ext >&5
11008   rm -rf conftest*
11009   eval "ac_cv_lib_$ac_lib_var=no"
11010 fi
11011 rm -f conftest*
11012 LIBS="$ac_save_LIBS"
11013
11014 fi
11015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11016   echo "$ac_t""yes" 1>&6
11017   have_thr=yes
11018 else
11019   echo "$ac_t""no" 1>&6
11020 have_thr=no
11021 fi
11022
11023
11024                 if test $have_thr = yes ; then
11025                         cat >> confdefs.h <<\EOF
11026 #define HAVE_THR 1
11027 EOF
11028
11029                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11030                         ol_link_threads=thr
11031
11032                         if test $ol_with_yielding_select = auto ; then
11033                                 ol_with_yielding_select=yes
11034                         fi
11035
11036                                                 for ac_func in \
11037                                 thr_setconcurrency \
11038                                 thr_getconcurrency \
11039                         
11040 do
11041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11042 echo "configure:11043: checking for $ac_func" >&5
11043 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11044   echo $ac_n "(cached) $ac_c" 1>&6
11045 else
11046   cat > conftest.$ac_ext <<EOF
11047 #line 11048 "configure"
11048 #include "confdefs.h"
11049 /* System header to define __stub macros and hopefully few prototypes,
11050     which can conflict with char $ac_func(); below.  */
11051 #include <assert.h>
11052 /* Override any gcc2 internal prototype to avoid an error.  */
11053 /* We use char because int might match the return type of a gcc2
11054     builtin and then its argument prototype would still apply.  */
11055 char $ac_func();
11056 char (*f)();
11057
11058 int main() {
11059
11060 /* The GNU C library defines this for functions which it implements
11061     to always fail with ENOSYS.  Some functions are actually named
11062     something starting with __ and the normal name is an alias.  */
11063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11064 choke me
11065 #else
11066 f = $ac_func;
11067 #endif
11068
11069 ; return 0; }
11070 EOF
11071 if { (eval echo configure:11072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11072   rm -rf conftest*
11073   eval "ac_cv_func_$ac_func=yes"
11074 else
11075   echo "configure: failed program was:" >&5
11076   cat conftest.$ac_ext >&5
11077   rm -rf conftest*
11078   eval "ac_cv_func_$ac_func=no"
11079 fi
11080 rm -f conftest*
11081 fi
11082
11083 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11084   echo "$ac_t""yes" 1>&6
11085     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11086   cat >> confdefs.h <<EOF
11087 #define $ac_tr_func 1
11088 EOF
11089  
11090 else
11091   echo "$ac_t""no" 1>&6
11092 fi
11093 done
11094
11095                 fi
11096         fi
11097
11098                 for ac_hdr in lwp/lwp.h
11099 do
11100 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11101 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11102 echo "configure:11103: checking for $ac_hdr" >&5
11103 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11104   echo $ac_n "(cached) $ac_c" 1>&6
11105 else
11106   cat > conftest.$ac_ext <<EOF
11107 #line 11108 "configure"
11108 #include "confdefs.h"
11109 #include <$ac_hdr>
11110 EOF
11111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11112 { (eval echo configure:11113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11114 if test -z "$ac_err"; then
11115   rm -rf conftest*
11116   eval "ac_cv_header_$ac_safe=yes"
11117 else
11118   echo "$ac_err" >&5
11119   echo "configure: failed program was:" >&5
11120   cat conftest.$ac_ext >&5
11121   rm -rf conftest*
11122   eval "ac_cv_header_$ac_safe=no"
11123 fi
11124 rm -f conftest*
11125 fi
11126 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11127   echo "$ac_t""yes" 1>&6
11128     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11129   cat >> confdefs.h <<EOF
11130 #define $ac_tr_hdr 1
11131 EOF
11132  
11133 else
11134   echo "$ac_t""no" 1>&6
11135 fi
11136 done
11137
11138         if test $ac_cv_header_lwp_lwp_h = yes ; then
11139                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11140 echo "configure:11141: checking for lwp_create in -llwp" >&5
11141 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11143   echo $ac_n "(cached) $ac_c" 1>&6
11144 else
11145   ac_save_LIBS="$LIBS"
11146 LIBS="-llwp  $LIBS"
11147 cat > conftest.$ac_ext <<EOF
11148 #line 11149 "configure"
11149 #include "confdefs.h"
11150 /* Override any gcc2 internal prototype to avoid an error.  */
11151 /* We use char because int might match the return type of a gcc2
11152     builtin and then its argument prototype would still apply.  */
11153 char lwp_create();
11154
11155 int main() {
11156 lwp_create()
11157 ; return 0; }
11158 EOF
11159 if { (eval echo configure:11160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11160   rm -rf conftest*
11161   eval "ac_cv_lib_$ac_lib_var=yes"
11162 else
11163   echo "configure: failed program was:" >&5
11164   cat conftest.$ac_ext >&5
11165   rm -rf conftest*
11166   eval "ac_cv_lib_$ac_lib_var=no"
11167 fi
11168 rm -f conftest*
11169 LIBS="$ac_save_LIBS"
11170
11171 fi
11172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11173   echo "$ac_t""yes" 1>&6
11174   have_lwp=yes
11175 else
11176   echo "$ac_t""no" 1>&6
11177 have_lwp=no
11178 fi
11179
11180
11181                 if test $have_lwp = yes ; then
11182                         cat >> confdefs.h <<\EOF
11183 #define HAVE_LWP 1
11184 EOF
11185
11186                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11187                         ol_link_threads=lwp
11188
11189                         if test $ol_with_yielding_select = auto ; then
11190                                 ol_with_yielding_select=no
11191                         fi
11192                 fi
11193         fi
11194 fi
11195
11196 if test $ol_with_yielding_select = yes ; then
11197         cat >> confdefs.h <<\EOF
11198 #define HAVE_YIELDING_SELECT 1
11199 EOF
11200
11201 fi
11202
11203 if test $ol_with_threads = manual ; then
11204                 ol_link_threads=yes
11205
11206         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11207
11208         for ac_hdr in pthread.h sched.h
11209 do
11210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11212 echo "configure:11213: checking for $ac_hdr" >&5
11213 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11214   echo $ac_n "(cached) $ac_c" 1>&6
11215 else
11216   cat > conftest.$ac_ext <<EOF
11217 #line 11218 "configure"
11218 #include "confdefs.h"
11219 #include <$ac_hdr>
11220 EOF
11221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11222 { (eval echo configure:11223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11224 if test -z "$ac_err"; then
11225   rm -rf conftest*
11226   eval "ac_cv_header_$ac_safe=yes"
11227 else
11228   echo "$ac_err" >&5
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   eval "ac_cv_header_$ac_safe=no"
11233 fi
11234 rm -f conftest*
11235 fi
11236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11237   echo "$ac_t""yes" 1>&6
11238     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11239   cat >> confdefs.h <<EOF
11240 #define $ac_tr_hdr 1
11241 EOF
11242  
11243 else
11244   echo "$ac_t""no" 1>&6
11245 fi
11246 done
11247
11248         for ac_func in sched_yield pthread_yield
11249 do
11250 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11251 echo "configure:11252: checking for $ac_func" >&5
11252 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   cat > conftest.$ac_ext <<EOF
11256 #line 11257 "configure"
11257 #include "confdefs.h"
11258 /* System header to define __stub macros and hopefully few prototypes,
11259     which can conflict with char $ac_func(); below.  */
11260 #include <assert.h>
11261 /* Override any gcc2 internal prototype to avoid an error.  */
11262 /* We use char because int might match the return type of a gcc2
11263     builtin and then its argument prototype would still apply.  */
11264 char $ac_func();
11265 char (*f)();
11266
11267 int main() {
11268
11269 /* The GNU C library defines this for functions which it implements
11270     to always fail with ENOSYS.  Some functions are actually named
11271     something starting with __ and the normal name is an alias.  */
11272 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11273 choke me
11274 #else
11275 f = $ac_func;
11276 #endif
11277
11278 ; return 0; }
11279 EOF
11280 if { (eval echo configure:11281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11281   rm -rf conftest*
11282   eval "ac_cv_func_$ac_func=yes"
11283 else
11284   echo "configure: failed program was:" >&5
11285   cat conftest.$ac_ext >&5
11286   rm -rf conftest*
11287   eval "ac_cv_func_$ac_func=no"
11288 fi
11289 rm -f conftest*
11290 fi
11291
11292 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11295   cat >> confdefs.h <<EOF
11296 #define $ac_tr_func 1
11297 EOF
11298  
11299 else
11300   echo "$ac_t""no" 1>&6
11301 fi
11302 done
11303
11304         
11305         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11306 echo "configure:11307: checking for LinuxThreads pthread.h" >&5
11307 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11308   echo $ac_n "(cached) $ac_c" 1>&6
11309 else
11310   cat > conftest.$ac_ext <<EOF
11311 #line 11312 "configure"
11312 #include "confdefs.h"
11313 #include <pthread.h>
11314 EOF
11315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11316   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11317   rm -rf conftest*
11318   ol_cv_header_linux_threads=yes
11319 else
11320   rm -rf conftest*
11321   ol_cv_header_linux_threads=no
11322 fi
11323 rm -f conftest*
11324
11325                 
11326 fi
11327
11328 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11329         if test $ol_cv_header_linux_threads = yes; then
11330                 cat >> confdefs.h <<\EOF
11331 #define HAVE_LINUX_THREADS 1
11332 EOF
11333
11334         fi
11335
11336
11337         for ac_hdr in mach/cthreads.h
11338 do
11339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11340 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11341 echo "configure:11342: checking for $ac_hdr" >&5
11342 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11343   echo $ac_n "(cached) $ac_c" 1>&6
11344 else
11345   cat > conftest.$ac_ext <<EOF
11346 #line 11347 "configure"
11347 #include "confdefs.h"
11348 #include <$ac_hdr>
11349 EOF
11350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11351 { (eval echo configure:11352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11353 if test -z "$ac_err"; then
11354   rm -rf conftest*
11355   eval "ac_cv_header_$ac_safe=yes"
11356 else
11357   echo "$ac_err" >&5
11358   echo "configure: failed program was:" >&5
11359   cat conftest.$ac_ext >&5
11360   rm -rf conftest*
11361   eval "ac_cv_header_$ac_safe=no"
11362 fi
11363 rm -f conftest*
11364 fi
11365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11366   echo "$ac_t""yes" 1>&6
11367     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11368   cat >> confdefs.h <<EOF
11369 #define $ac_tr_hdr 1
11370 EOF
11371  
11372 else
11373   echo "$ac_t""no" 1>&6
11374 fi
11375 done
11376
11377         for ac_hdr in lwp/lwp.h
11378 do
11379 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11380 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11381 echo "configure:11382: checking for $ac_hdr" >&5
11382 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11383   echo $ac_n "(cached) $ac_c" 1>&6
11384 else
11385   cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388 #include <$ac_hdr>
11389 EOF
11390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11391 { (eval echo configure:11392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11393 if test -z "$ac_err"; then
11394   rm -rf conftest*
11395   eval "ac_cv_header_$ac_safe=yes"
11396 else
11397   echo "$ac_err" >&5
11398   echo "configure: failed program was:" >&5
11399   cat conftest.$ac_ext >&5
11400   rm -rf conftest*
11401   eval "ac_cv_header_$ac_safe=no"
11402 fi
11403 rm -f conftest*
11404 fi
11405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11406   echo "$ac_t""yes" 1>&6
11407     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11408   cat >> confdefs.h <<EOF
11409 #define $ac_tr_hdr 1
11410 EOF
11411  
11412 else
11413   echo "$ac_t""no" 1>&6
11414 fi
11415 done
11416
11417         for ac_hdr in thread.h synch.h
11418 do
11419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11421 echo "configure:11422: checking for $ac_hdr" >&5
11422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11423   echo $ac_n "(cached) $ac_c" 1>&6
11424 else
11425   cat > conftest.$ac_ext <<EOF
11426 #line 11427 "configure"
11427 #include "confdefs.h"
11428 #include <$ac_hdr>
11429 EOF
11430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11431 { (eval echo configure:11432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11433 if test -z "$ac_err"; then
11434   rm -rf conftest*
11435   eval "ac_cv_header_$ac_safe=yes"
11436 else
11437   echo "$ac_err" >&5
11438   echo "configure: failed program was:" >&5
11439   cat conftest.$ac_ext >&5
11440   rm -rf conftest*
11441   eval "ac_cv_header_$ac_safe=no"
11442 fi
11443 rm -f conftest*
11444 fi
11445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11446   echo "$ac_t""yes" 1>&6
11447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11448   cat >> confdefs.h <<EOF
11449 #define $ac_tr_hdr 1
11450 EOF
11451  
11452 else
11453   echo "$ac_t""no" 1>&6
11454 fi
11455 done
11456
11457 fi
11458
11459 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11460                         cat >> confdefs.h <<\EOF
11461 #define REENTRANT 1
11462 EOF
11463
11464         cat >> confdefs.h <<\EOF
11465 #define _REENTRANT 1
11466 EOF
11467
11468         cat >> confdefs.h <<\EOF
11469 #define THREAD_SAFE 1
11470 EOF
11471
11472         cat >> confdefs.h <<\EOF
11473 #define _THREAD_SAFE 1
11474 EOF
11475
11476         cat >> confdefs.h <<\EOF
11477 #define THREADSAFE 1
11478 EOF
11479
11480         cat >> confdefs.h <<\EOF
11481 #define _THREADSAFE 1
11482 EOF
11483
11484         cat >> confdefs.h <<\EOF
11485 #define _SGI_MP_SOURCE 1
11486 EOF
11487
11488
11489                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11490 echo "configure:11491: checking for thread specific errno" >&5
11491 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11492   echo $ac_n "(cached) $ac_c" 1>&6
11493 else
11494   
11495                 cat > conftest.$ac_ext <<EOF
11496 #line 11497 "configure"
11497 #include "confdefs.h"
11498 #include <errno.h>
11499 int main() {
11500 errno = 0;
11501 ; return 0; }
11502 EOF
11503 if { (eval echo configure:11504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11504   rm -rf conftest*
11505   ol_cv_errno_thread_specific=yes
11506 else
11507   echo "configure: failed program was:" >&5
11508   cat conftest.$ac_ext >&5
11509   rm -rf conftest*
11510   ol_cv_errno_thread_specific=no
11511 fi
11512 rm -f conftest*
11513         
11514 fi
11515
11516 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11517
11518                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11519 echo "configure:11520: checking for thread specific h_errno" >&5
11520 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11521   echo $ac_n "(cached) $ac_c" 1>&6
11522 else
11523   
11524                 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 #include <netdb.h>
11528 int main() {
11529 h_errno = 0;
11530 ; return 0; }
11531 EOF
11532 if { (eval echo configure:11533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11533   rm -rf conftest*
11534   ol_cv_h_errno_thread_specific=yes
11535 else
11536   echo "configure: failed program was:" >&5
11537   cat conftest.$ac_ext >&5
11538   rm -rf conftest*
11539   ol_cv_h_errno_thread_specific=no
11540 fi
11541 rm -f conftest*
11542         
11543 fi
11544
11545 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11546
11547         if test $ol_cv_errno_thread_specific != yes \
11548                 -o $ol_cv_h_errno_thread_specific != yes ; then
11549                 LIBS="$LTHREAD_LIBS $LIBS"
11550                 LTHREAD_LIBS=""
11551         fi
11552
11553 fi  
11554
11555 if test $ol_link_threads = no ; then
11556         if test $ol_with_threads = yes ; then
11557                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11558         fi
11559
11560         if test $ol_with_threads = auto ; then
11561                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11562                 ol_with_threads=no
11563         fi
11564
11565         cat >> confdefs.h <<\EOF
11566 #define NO_THREADS 1
11567 EOF
11568
11569         LTHREAD_LIBS=""
11570 fi
11571
11572 if test $ol_link_threads != no ; then
11573         cat >> confdefs.h <<\EOF
11574 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11575 EOF
11576
11577 fi
11578
11579 ol_link_ldbm=no 
11580
11581 if test $ol_with_ldbm_api = auto \
11582         -o $ol_with_ldbm_api = berkeley \
11583         -o $ol_with_ldbm_api = bcompat ; then
11584
11585         if test $ol_with_ldbm_api = bcompat; then \
11586                 ol_cv_berkeley_db=no
11587 for ac_hdr in db_185.h db.h
11588 do
11589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11591 echo "configure:11592: checking for $ac_hdr" >&5
11592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11593   echo $ac_n "(cached) $ac_c" 1>&6
11594 else
11595   cat > conftest.$ac_ext <<EOF
11596 #line 11597 "configure"
11597 #include "confdefs.h"
11598 #include <$ac_hdr>
11599 EOF
11600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11601 { (eval echo configure:11602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11603 if test -z "$ac_err"; then
11604   rm -rf conftest*
11605   eval "ac_cv_header_$ac_safe=yes"
11606 else
11607   echo "$ac_err" >&5
11608   echo "configure: failed program was:" >&5
11609   cat conftest.$ac_ext >&5
11610   rm -rf conftest*
11611   eval "ac_cv_header_$ac_safe=no"
11612 fi
11613 rm -f conftest*
11614 fi
11615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11616   echo "$ac_t""yes" 1>&6
11617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11618   cat >> confdefs.h <<EOF
11619 #define $ac_tr_hdr 1
11620 EOF
11621  
11622 else
11623   echo "$ac_t""no" 1>&6
11624 fi
11625 done
11626
11627 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11628         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11629 echo "configure:11630: checking if Berkeley DB header compatibility" >&5
11630 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11631   echo $ac_n "(cached) $ac_c" 1>&6
11632 else
11633   
11634                 cat > conftest.$ac_ext <<EOF
11635 #line 11636 "configure"
11636 #include "confdefs.h"
11637
11638 #if HAVE_DB_185_H
11639 #       include <db_185.h>
11640 #else
11641 #       include <db.h>
11642 #endif
11643
11644  /* this check could be improved */
11645 #ifndef DB_VERSION_MAJOR
11646 #       define DB_VERSION_MAJOR 1
11647 #endif
11648
11649 #if DB_VERSION_MAJOR == 1 
11650         __db_version_1
11651 #endif
11652
11653 EOF
11654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11655   egrep "__db_version_1" >/dev/null 2>&1; then
11656   rm -rf conftest*
11657   ol_cv_header_db1=yes
11658 else
11659   rm -rf conftest*
11660   ol_cv_header_db1=no
11661 fi
11662 rm -f conftest*
11663
11664 fi
11665
11666 echo "$ac_t""$ol_cv_header_db1" 1>&6
11667
11668         if test ol_cv_header_db1=yes ; then
11669                 ol_cv_lib_db=no
11670 if test $ol_cv_lib_db = no ; then
11671         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11672 echo "configure:11673: checking for Berkeley DB link (default)" >&5
11673 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11674   echo $ac_n "(cached) $ac_c" 1>&6
11675 else
11676   
11677         ol_DB_LIB=
11678         ol_LIBS=$LIBS
11679         LIBS="$ol_DB_LIB $LIBS"
11680
11681         cat > conftest.$ac_ext <<EOF
11682 #line 11683 "configure"
11683 #include "confdefs.h"
11684
11685 #ifdef HAVE_DB_185_H
11686 # include <db_185.h>
11687 #else
11688 # include <db.h>
11689 #endif
11690
11691 #ifndef DB_VERSION_MAJOR
11692 # define DB_VERSION_MAJOR 1
11693 #endif
11694
11695 #ifndef NULL
11696 #define NULL ((void*)0)
11697 #endif
11698
11699 int main() {
11700
11701 #if DB_VERSION_MAJOR > 2
11702         db_env_create( NULL, 0 );
11703 #elif DB_VERSION_MAJOR > 1
11704         db_appexit( NULL );
11705 #else
11706         (void) dbopen( NULL, 0, 0, 0, NULL);
11707 #endif
11708
11709 ; return 0; }
11710 EOF
11711 if { (eval echo configure:11712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11712   rm -rf conftest*
11713   ol_cv_db_none=yes
11714 else
11715   echo "configure: failed program was:" >&5
11716   cat conftest.$ac_ext >&5
11717   rm -rf conftest*
11718   ol_cv_db_none=no
11719 fi
11720 rm -f conftest*
11721
11722         LIBS="$ol_LIBS"
11723
11724 fi
11725
11726 echo "$ac_t""$ol_cv_db_none" 1>&6
11727
11728         if test $ol_cv_db_none = yes ; then
11729                 ol_cv_lib_db=yes
11730         fi
11731 fi
11732
11733 if test $ol_cv_lib_db = no ; then
11734         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11735 echo "configure:11736: checking for Berkeley DB link (-ldb)" >&5
11736 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11737   echo $ac_n "(cached) $ac_c" 1>&6
11738 else
11739   
11740         ol_DB_LIB=-ldb
11741         ol_LIBS=$LIBS
11742         LIBS="$ol_DB_LIB $LIBS"
11743
11744         cat > conftest.$ac_ext <<EOF
11745 #line 11746 "configure"
11746 #include "confdefs.h"
11747
11748 #ifdef HAVE_DB_185_H
11749 # include <db_185.h>
11750 #else
11751 # include <db.h>
11752 #endif
11753
11754 #ifndef DB_VERSION_MAJOR
11755 # define DB_VERSION_MAJOR 1
11756 #endif
11757
11758 #ifndef NULL
11759 #define NULL ((void*)0)
11760 #endif
11761
11762 int main() {
11763
11764 #if DB_VERSION_MAJOR > 2
11765         db_env_create( NULL, 0 );
11766 #elif DB_VERSION_MAJOR > 1
11767         db_appexit( NULL );
11768 #else
11769         (void) dbopen( NULL, 0, 0, 0, NULL);
11770 #endif
11771
11772 ; return 0; }
11773 EOF
11774 if { (eval echo configure:11775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11775   rm -rf conftest*
11776   ol_cv_db_db=yes
11777 else
11778   echo "configure: failed program was:" >&5
11779   cat conftest.$ac_ext >&5
11780   rm -rf conftest*
11781   ol_cv_db_db=no
11782 fi
11783 rm -f conftest*
11784
11785         LIBS="$ol_LIBS"
11786
11787 fi
11788
11789 echo "$ac_t""$ol_cv_db_db" 1>&6
11790
11791         if test $ol_cv_db_db = yes ; then
11792                 ol_cv_lib_db=-ldb
11793         fi
11794 fi
11795
11796 if test $ol_cv_lib_db = no ; then
11797         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11798 echo "configure:11799: checking for Berkeley DB link (-ldb3)" >&5
11799 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11800   echo $ac_n "(cached) $ac_c" 1>&6
11801 else
11802   
11803         ol_DB_LIB=-ldb3
11804         ol_LIBS=$LIBS
11805         LIBS="$ol_DB_LIB $LIBS"
11806
11807         cat > conftest.$ac_ext <<EOF
11808 #line 11809 "configure"
11809 #include "confdefs.h"
11810
11811 #ifdef HAVE_DB_185_H
11812 # include <db_185.h>
11813 #else
11814 # include <db.h>
11815 #endif
11816
11817 #ifndef DB_VERSION_MAJOR
11818 # define DB_VERSION_MAJOR 1
11819 #endif
11820
11821 #ifndef NULL
11822 #define NULL ((void*)0)
11823 #endif
11824
11825 int main() {
11826
11827 #if DB_VERSION_MAJOR > 2
11828         db_env_create( NULL, 0 );
11829 #elif DB_VERSION_MAJOR > 1
11830         db_appexit( NULL );
11831 #else
11832         (void) dbopen( NULL, 0, 0, 0, NULL);
11833 #endif
11834
11835 ; return 0; }
11836 EOF
11837 if { (eval echo configure:11838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11838   rm -rf conftest*
11839   ol_cv_db_db3=yes
11840 else
11841   echo "configure: failed program was:" >&5
11842   cat conftest.$ac_ext >&5
11843   rm -rf conftest*
11844   ol_cv_db_db3=no
11845 fi
11846 rm -f conftest*
11847
11848         LIBS="$ol_LIBS"
11849
11850 fi
11851
11852 echo "$ac_t""$ol_cv_db_db3" 1>&6
11853
11854         if test $ol_cv_db_db3 = yes ; then
11855                 ol_cv_lib_db=-ldb3
11856         fi
11857 fi
11858
11859 if test $ol_cv_lib_db = no ; then
11860         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11861 echo "configure:11862: checking for Berkeley DB link (-ldb2)" >&5
11862 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11863   echo $ac_n "(cached) $ac_c" 1>&6
11864 else
11865   
11866         ol_DB_LIB=-ldb2
11867         ol_LIBS=$LIBS
11868         LIBS="$ol_DB_LIB $LIBS"
11869
11870         cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873
11874 #ifdef HAVE_DB_185_H
11875 # include <db_185.h>
11876 #else
11877 # include <db.h>
11878 #endif
11879
11880 #ifndef DB_VERSION_MAJOR
11881 # define DB_VERSION_MAJOR 1
11882 #endif
11883
11884 #ifndef NULL
11885 #define NULL ((void*)0)
11886 #endif
11887
11888 int main() {
11889
11890 #if DB_VERSION_MAJOR > 2
11891         db_env_create( NULL, 0 );
11892 #elif DB_VERSION_MAJOR > 1
11893         db_appexit( NULL );
11894 #else
11895         (void) dbopen( NULL, 0, 0, 0, NULL);
11896 #endif
11897
11898 ; return 0; }
11899 EOF
11900 if { (eval echo configure:11901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11901   rm -rf conftest*
11902   ol_cv_db_db2=yes
11903 else
11904   echo "configure: failed program was:" >&5
11905   cat conftest.$ac_ext >&5
11906   rm -rf conftest*
11907   ol_cv_db_db2=no
11908 fi
11909 rm -f conftest*
11910
11911         LIBS="$ol_LIBS"
11912
11913 fi
11914
11915 echo "$ac_t""$ol_cv_db_db2" 1>&6
11916
11917         if test $ol_cv_db_db2 = yes ; then
11918                 ol_cv_lib_db=-ldb2
11919         fi
11920 fi
11921
11922 if test $ol_cv_lib_db = no ; then
11923         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11924 echo "configure:11925: checking for Berkeley DB link (-ldb1)" >&5
11925 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11926   echo $ac_n "(cached) $ac_c" 1>&6
11927 else
11928   
11929         ol_DB_LIB=-ldb1
11930         ol_LIBS=$LIBS
11931         LIBS="$ol_DB_LIB $LIBS"
11932
11933         cat > conftest.$ac_ext <<EOF
11934 #line 11935 "configure"
11935 #include "confdefs.h"
11936
11937 #ifdef HAVE_DB_185_H
11938 # include <db_185.h>
11939 #else
11940 # include <db.h>
11941 #endif
11942
11943 #ifndef DB_VERSION_MAJOR
11944 # define DB_VERSION_MAJOR 1
11945 #endif
11946
11947 #ifndef NULL
11948 #define NULL ((void*)0)
11949 #endif
11950
11951 int main() {
11952
11953 #if DB_VERSION_MAJOR > 2
11954         db_env_create( NULL, 0 );
11955 #elif DB_VERSION_MAJOR > 1
11956         db_appexit( NULL );
11957 #else
11958         (void) dbopen( NULL, 0, 0, 0, NULL);
11959 #endif
11960
11961 ; return 0; }
11962 EOF
11963 if { (eval echo configure:11964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11964   rm -rf conftest*
11965   ol_cv_db_db1=yes
11966 else
11967   echo "configure: failed program was:" >&5
11968   cat conftest.$ac_ext >&5
11969   rm -rf conftest*
11970   ol_cv_db_db1=no
11971 fi
11972 rm -f conftest*
11973
11974         LIBS="$ol_LIBS"
11975
11976 fi
11977
11978 echo "$ac_t""$ol_cv_db_db1" 1>&6
11979
11980         if test $ol_cv_db_db1 = yes ; then
11981                 ol_cv_lib_db=-ldb1
11982         fi
11983 fi
11984
11985
11986                 if test "$ol_cv_lib_db" != no ; then
11987                         ol_cv_berkeley_db=yes
11988                 fi
11989         fi
11990 fi
11991
11992         else
11993                 ol_cv_berkeley_db=no
11994 for ac_hdr in db.h
11995 do
11996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11997 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11998 echo "configure:11999: checking for $ac_hdr" >&5
11999 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12000   echo $ac_n "(cached) $ac_c" 1>&6
12001 else
12002   cat > conftest.$ac_ext <<EOF
12003 #line 12004 "configure"
12004 #include "confdefs.h"
12005 #include <$ac_hdr>
12006 EOF
12007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12008 { (eval echo configure:12009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12010 if test -z "$ac_err"; then
12011   rm -rf conftest*
12012   eval "ac_cv_header_$ac_safe=yes"
12013 else
12014   echo "$ac_err" >&5
12015   echo "configure: failed program was:" >&5
12016   cat conftest.$ac_ext >&5
12017   rm -rf conftest*
12018   eval "ac_cv_header_$ac_safe=no"
12019 fi
12020 rm -f conftest*
12021 fi
12022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12023   echo "$ac_t""yes" 1>&6
12024     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12025   cat >> confdefs.h <<EOF
12026 #define $ac_tr_hdr 1
12027 EOF
12028  
12029 else
12030   echo "$ac_t""no" 1>&6
12031 fi
12032 done
12033
12034 if test $ac_cv_header_db_h = yes; then
12035         ol_cv_lib_db=no
12036 if test $ol_cv_lib_db = no ; then
12037         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12038 echo "configure:12039: checking for Berkeley DB link (default)" >&5
12039 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12040   echo $ac_n "(cached) $ac_c" 1>&6
12041 else
12042   
12043         ol_DB_LIB=
12044         ol_LIBS=$LIBS
12045         LIBS="$ol_DB_LIB $LIBS"
12046
12047         cat > conftest.$ac_ext <<EOF
12048 #line 12049 "configure"
12049 #include "confdefs.h"
12050
12051 #ifdef HAVE_DB_185_H
12052 # include <db_185.h>
12053 #else
12054 # include <db.h>
12055 #endif
12056
12057 #ifndef DB_VERSION_MAJOR
12058 # define DB_VERSION_MAJOR 1
12059 #endif
12060
12061 #ifndef NULL
12062 #define NULL ((void*)0)
12063 #endif
12064
12065 int main() {
12066
12067 #if DB_VERSION_MAJOR > 2
12068         db_env_create( NULL, 0 );
12069 #elif DB_VERSION_MAJOR > 1
12070         db_appexit( NULL );
12071 #else
12072         (void) dbopen( NULL, 0, 0, 0, NULL);
12073 #endif
12074
12075 ; return 0; }
12076 EOF
12077 if { (eval echo configure:12078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12078   rm -rf conftest*
12079   ol_cv_db_none=yes
12080 else
12081   echo "configure: failed program was:" >&5
12082   cat conftest.$ac_ext >&5
12083   rm -rf conftest*
12084   ol_cv_db_none=no
12085 fi
12086 rm -f conftest*
12087
12088         LIBS="$ol_LIBS"
12089
12090 fi
12091
12092 echo "$ac_t""$ol_cv_db_none" 1>&6
12093
12094         if test $ol_cv_db_none = yes ; then
12095                 ol_cv_lib_db=yes
12096         fi
12097 fi
12098
12099 if test $ol_cv_lib_db = no ; then
12100         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12101 echo "configure:12102: checking for Berkeley DB link (-ldb)" >&5
12102 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12103   echo $ac_n "(cached) $ac_c" 1>&6
12104 else
12105   
12106         ol_DB_LIB=-ldb
12107         ol_LIBS=$LIBS
12108         LIBS="$ol_DB_LIB $LIBS"
12109
12110         cat > conftest.$ac_ext <<EOF
12111 #line 12112 "configure"
12112 #include "confdefs.h"
12113
12114 #ifdef HAVE_DB_185_H
12115 # include <db_185.h>
12116 #else
12117 # include <db.h>
12118 #endif
12119
12120 #ifndef DB_VERSION_MAJOR
12121 # define DB_VERSION_MAJOR 1
12122 #endif
12123
12124 #ifndef NULL
12125 #define NULL ((void*)0)
12126 #endif
12127
12128 int main() {
12129
12130 #if DB_VERSION_MAJOR > 2
12131         db_env_create( NULL, 0 );
12132 #elif DB_VERSION_MAJOR > 1
12133         db_appexit( NULL );
12134 #else
12135         (void) dbopen( NULL, 0, 0, 0, NULL);
12136 #endif
12137
12138 ; return 0; }
12139 EOF
12140 if { (eval echo configure:12141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12141   rm -rf conftest*
12142   ol_cv_db_db=yes
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   ol_cv_db_db=no
12148 fi
12149 rm -f conftest*
12150
12151         LIBS="$ol_LIBS"
12152
12153 fi
12154
12155 echo "$ac_t""$ol_cv_db_db" 1>&6
12156
12157         if test $ol_cv_db_db = yes ; then
12158                 ol_cv_lib_db=-ldb
12159         fi
12160 fi
12161
12162 if test $ol_cv_lib_db = no ; then
12163         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12164 echo "configure:12165: checking for Berkeley DB link (-ldb3)" >&5
12165 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12166   echo $ac_n "(cached) $ac_c" 1>&6
12167 else
12168   
12169         ol_DB_LIB=-ldb3
12170         ol_LIBS=$LIBS
12171         LIBS="$ol_DB_LIB $LIBS"
12172
12173         cat > conftest.$ac_ext <<EOF
12174 #line 12175 "configure"
12175 #include "confdefs.h"
12176
12177 #ifdef HAVE_DB_185_H
12178 # include <db_185.h>
12179 #else
12180 # include <db.h>
12181 #endif
12182
12183 #ifndef DB_VERSION_MAJOR
12184 # define DB_VERSION_MAJOR 1
12185 #endif
12186
12187 #ifndef NULL
12188 #define NULL ((void*)0)
12189 #endif
12190
12191 int main() {
12192
12193 #if DB_VERSION_MAJOR > 2
12194         db_env_create( NULL, 0 );
12195 #elif DB_VERSION_MAJOR > 1
12196         db_appexit( NULL );
12197 #else
12198         (void) dbopen( NULL, 0, 0, 0, NULL);
12199 #endif
12200
12201 ; return 0; }
12202 EOF
12203 if { (eval echo configure:12204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12204   rm -rf conftest*
12205   ol_cv_db_db3=yes
12206 else
12207   echo "configure: failed program was:" >&5
12208   cat conftest.$ac_ext >&5
12209   rm -rf conftest*
12210   ol_cv_db_db3=no
12211 fi
12212 rm -f conftest*
12213
12214         LIBS="$ol_LIBS"
12215
12216 fi
12217
12218 echo "$ac_t""$ol_cv_db_db3" 1>&6
12219
12220         if test $ol_cv_db_db3 = yes ; then
12221                 ol_cv_lib_db=-ldb3
12222         fi
12223 fi
12224
12225 if test $ol_cv_lib_db = no ; then
12226         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12227 echo "configure:12228: checking for Berkeley DB link (-ldb2)" >&5
12228 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12229   echo $ac_n "(cached) $ac_c" 1>&6
12230 else
12231   
12232         ol_DB_LIB=-ldb2
12233         ol_LIBS=$LIBS
12234         LIBS="$ol_DB_LIB $LIBS"
12235
12236         cat > conftest.$ac_ext <<EOF
12237 #line 12238 "configure"
12238 #include "confdefs.h"
12239
12240 #ifdef HAVE_DB_185_H
12241 # include <db_185.h>
12242 #else
12243 # include <db.h>
12244 #endif
12245
12246 #ifndef DB_VERSION_MAJOR
12247 # define DB_VERSION_MAJOR 1
12248 #endif
12249
12250 #ifndef NULL
12251 #define NULL ((void*)0)
12252 #endif
12253
12254 int main() {
12255
12256 #if DB_VERSION_MAJOR > 2
12257         db_env_create( NULL, 0 );
12258 #elif DB_VERSION_MAJOR > 1
12259         db_appexit( NULL );
12260 #else
12261         (void) dbopen( NULL, 0, 0, 0, NULL);
12262 #endif
12263
12264 ; return 0; }
12265 EOF
12266 if { (eval echo configure:12267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12267   rm -rf conftest*
12268   ol_cv_db_db2=yes
12269 else
12270   echo "configure: failed program was:" >&5
12271   cat conftest.$ac_ext >&5
12272   rm -rf conftest*
12273   ol_cv_db_db2=no
12274 fi
12275 rm -f conftest*
12276
12277         LIBS="$ol_LIBS"
12278
12279 fi
12280
12281 echo "$ac_t""$ol_cv_db_db2" 1>&6
12282
12283         if test $ol_cv_db_db2 = yes ; then
12284                 ol_cv_lib_db=-ldb2
12285         fi
12286 fi
12287
12288 if test $ol_cv_lib_db = no ; then
12289         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12290 echo "configure:12291: checking for Berkeley DB link (-ldb1)" >&5
12291 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12292   echo $ac_n "(cached) $ac_c" 1>&6
12293 else
12294   
12295         ol_DB_LIB=-ldb1
12296         ol_LIBS=$LIBS
12297         LIBS="$ol_DB_LIB $LIBS"
12298
12299         cat > conftest.$ac_ext <<EOF
12300 #line 12301 "configure"
12301 #include "confdefs.h"
12302
12303 #ifdef HAVE_DB_185_H
12304 # include <db_185.h>
12305 #else
12306 # include <db.h>
12307 #endif
12308
12309 #ifndef DB_VERSION_MAJOR
12310 # define DB_VERSION_MAJOR 1
12311 #endif
12312
12313 #ifndef NULL
12314 #define NULL ((void*)0)
12315 #endif
12316
12317 int main() {
12318
12319 #if DB_VERSION_MAJOR > 2
12320         db_env_create( NULL, 0 );
12321 #elif DB_VERSION_MAJOR > 1
12322         db_appexit( NULL );
12323 #else
12324         (void) dbopen( NULL, 0, 0, 0, NULL);
12325 #endif
12326
12327 ; return 0; }
12328 EOF
12329 if { (eval echo configure:12330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12330   rm -rf conftest*
12331   ol_cv_db_db1=yes
12332 else
12333   echo "configure: failed program was:" >&5
12334   cat conftest.$ac_ext >&5
12335   rm -rf conftest*
12336   ol_cv_db_db1=no
12337 fi
12338 rm -f conftest*
12339
12340         LIBS="$ol_LIBS"
12341
12342 fi
12343
12344 echo "$ac_t""$ol_cv_db_db1" 1>&6
12345
12346         if test $ol_cv_db_db1 = yes ; then
12347                 ol_cv_lib_db=-ldb1
12348         fi
12349 fi
12350
12351
12352         if test "$ol_cv_lib_db" != no ; then
12353                 ol_cv_berkeley_db=yes
12354                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12355 echo "configure:12356: checking for Berkeley DB thread support" >&5
12356 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12357   echo $ac_n "(cached) $ac_c" 1>&6
12358 else
12359   
12360         ol_LIBS="$LIBS"
12361         if test $ol_cv_lib_db != yes ; then
12362                 LIBS="$ol_cv_lib_db"
12363         fi
12364
12365         if test "$cross_compiling" = yes; then
12366   ol_cv_berkeley_db_thread=cross
12367 else
12368   cat > conftest.$ac_ext <<EOF
12369 #line 12370 "configure"
12370 #include "confdefs.h"
12371
12372 #ifdef HAVE_DB_185_H
12373         choke me;
12374 #else
12375 #include <db.h>
12376 #endif
12377 #ifndef NULL
12378 #define NULL ((void *)0)
12379 #endif
12380 main()
12381 {
12382         int rc;
12383         u_int32_t flags = DB_CREATE | DB_THREAD;
12384
12385 #if DB_VERSION_MAJOR > 2
12386         DB_ENV *env = NULL;
12387
12388         rc = db_env_create( &env, 0 );
12389
12390         if( rc == 0 ) {
12391 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12392                 rc = env->open( env, NULL, flags, 0 );
12393 #else
12394                 rc = env->open( env, NULL, NULL, flags, 0 );
12395 #endif
12396         }
12397
12398 #else
12399         DB_ENV env;
12400         memset( &env, '\0', sizeof(env) );
12401
12402         rc = db_appinit( NULL, NULL, &env, flags );
12403
12404         if( rc == 0 ) {
12405                 db_appexit( &env );
12406         }
12407 #endif
12408 #if DB_VERSION_MAJOR > 2
12409 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12410         env->remove( env, NULL, DB_FORCE);
12411 #else
12412         env->remove( env, NULL, NULL, DB_FORCE);
12413 #endif
12414 #endif
12415
12416         return rc;
12417 }
12418 EOF
12419 if { (eval echo configure:12420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12420 then
12421   ol_cv_berkeley_db_thread=yes
12422 else
12423   echo "configure: failed program was:" >&5
12424   cat conftest.$ac_ext >&5
12425   rm -fr conftest*
12426   ol_cv_berkeley_db_thread=no
12427 fi
12428 rm -fr conftest*
12429 fi
12430
12431
12432         LIBS="$ol_LIBS"
12433
12434         if test $ol_cv_berkeley_db_thread != no ; then
12435                 cat >> confdefs.h <<\EOF
12436 #define HAVE_BERKELEY_DB_THREAD 1
12437 EOF
12438
12439         fi
12440
12441 fi
12442
12443 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12444         fi
12445 fi
12446
12447         fi
12448
12449         if test $ol_cv_berkeley_db != no ; then
12450                 cat >> confdefs.h <<\EOF
12451 #define HAVE_BERKELEY_DB 1
12452 EOF
12453
12454
12455                 ol_link_ldbm=berkeley
12456                 ol_with_ldbm_api=db
12457
12458                 if test $ol_with_ldbm_type = hash ; then
12459                         cat >> confdefs.h <<\EOF
12460 #define LDBM_USE_DBHASH 1
12461 EOF
12462
12463                 else
12464                         cat >> confdefs.h <<\EOF
12465 #define LDBM_USE_DBBTREE 1
12466 EOF
12467
12468                 fi
12469
12470                                                 if test $ol_cv_lib_db != yes ; then
12471                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12472                 fi
12473         fi
12474 fi
12475
12476 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12477         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12478         ol_with_ldbm_api=none
12479 fi
12480
12481 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12482         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12483 echo "configure:12484: checking for MDBM library" >&5
12484 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12485   echo $ac_n "(cached) $ac_c" 1>&6
12486 else
12487         ol_LIBS="$LIBS"
12488         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12489 echo "configure:12490: checking for mdbm_set_chain" >&5
12490 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12491   echo $ac_n "(cached) $ac_c" 1>&6
12492 else
12493   cat > conftest.$ac_ext <<EOF
12494 #line 12495 "configure"
12495 #include "confdefs.h"
12496 /* System header to define __stub macros and hopefully few prototypes,
12497     which can conflict with char mdbm_set_chain(); below.  */
12498 #include <assert.h>
12499 /* Override any gcc2 internal prototype to avoid an error.  */
12500 /* We use char because int might match the return type of a gcc2
12501     builtin and then its argument prototype would still apply.  */
12502 char mdbm_set_chain();
12503 char (*f)();
12504
12505 int main() {
12506
12507 /* The GNU C library defines this for functions which it implements
12508     to always fail with ENOSYS.  Some functions are actually named
12509     something starting with __ and the normal name is an alias.  */
12510 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12511 choke me
12512 #else
12513 f = mdbm_set_chain;
12514 #endif
12515
12516 ; return 0; }
12517 EOF
12518 if { (eval echo configure:12519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12519   rm -rf conftest*
12520   eval "ac_cv_func_mdbm_set_chain=yes"
12521 else
12522   echo "configure: failed program was:" >&5
12523   cat conftest.$ac_ext >&5
12524   rm -rf conftest*
12525   eval "ac_cv_func_mdbm_set_chain=no"
12526 fi
12527 rm -f conftest*
12528 fi
12529
12530 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12531   echo "$ac_t""yes" 1>&6
12532   ol_cv_lib_mdbm=yes
12533 else
12534   echo "$ac_t""no" 1>&6
12535
12536                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12537 echo "configure:12538: checking for mdbm_set_chain in -lmdbm" >&5
12538 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12540   echo $ac_n "(cached) $ac_c" 1>&6
12541 else
12542   ac_save_LIBS="$LIBS"
12543 LIBS="-lmdbm  $LIBS"
12544 cat > conftest.$ac_ext <<EOF
12545 #line 12546 "configure"
12546 #include "confdefs.h"
12547 /* Override any gcc2 internal prototype to avoid an error.  */
12548 /* We use char because int might match the return type of a gcc2
12549     builtin and then its argument prototype would still apply.  */
12550 char mdbm_set_chain();
12551
12552 int main() {
12553 mdbm_set_chain()
12554 ; return 0; }
12555 EOF
12556 if { (eval echo configure:12557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12557   rm -rf conftest*
12558   eval "ac_cv_lib_$ac_lib_var=yes"
12559 else
12560   echo "configure: failed program was:" >&5
12561   cat conftest.$ac_ext >&5
12562   rm -rf conftest*
12563   eval "ac_cv_lib_$ac_lib_var=no"
12564 fi
12565 rm -f conftest*
12566 LIBS="$ac_save_LIBS"
12567
12568 fi
12569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12570   echo "$ac_t""yes" 1>&6
12571   ol_cv_lib_mdbm=-lmdbm
12572 else
12573   echo "$ac_t""no" 1>&6
12574 ol_cv_lib_mdbm=no
12575 fi
12576
12577         
12578 fi
12579
12580         LIBS="$ol_LIBS"
12581
12582 fi
12583
12584 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12585
12586
12587  for ac_hdr in mdbm.h
12588 do
12589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12591 echo "configure:12592: checking for $ac_hdr" >&5
12592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12593   echo $ac_n "(cached) $ac_c" 1>&6
12594 else
12595   cat > conftest.$ac_ext <<EOF
12596 #line 12597 "configure"
12597 #include "confdefs.h"
12598 #include <$ac_hdr>
12599 EOF
12600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12601 { (eval echo configure:12602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12603 if test -z "$ac_err"; then
12604   rm -rf conftest*
12605   eval "ac_cv_header_$ac_safe=yes"
12606 else
12607   echo "$ac_err" >&5
12608   echo "configure: failed program was:" >&5
12609   cat conftest.$ac_ext >&5
12610   rm -rf conftest*
12611   eval "ac_cv_header_$ac_safe=no"
12612 fi
12613 rm -f conftest*
12614 fi
12615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12616   echo "$ac_t""yes" 1>&6
12617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12618   cat >> confdefs.h <<EOF
12619 #define $ac_tr_hdr 1
12620 EOF
12621  
12622 else
12623   echo "$ac_t""no" 1>&6
12624 fi
12625 done
12626
12627  echo $ac_n "checking for db""... $ac_c" 1>&6
12628 echo "configure:12629: checking for db" >&5
12629 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12630   echo $ac_n "(cached) $ac_c" 1>&6
12631 else
12632   
12633         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12634                 ol_cv_mdbm=no
12635         else
12636                 ol_cv_mdbm=yes
12637         fi
12638
12639 fi
12640
12641 echo "$ac_t""$ol_cv_mdbm" 1>&6
12642  if test $ol_cv_mdbm = yes ; then
12643         cat >> confdefs.h <<\EOF
12644 #define HAVE_MDBM 1
12645 EOF
12646
12647  fi
12648
12649
12650         if test $ol_cv_mdbm = yes ; then
12651                 ol_link_ldbm=mdbm
12652                 ol_with_ldbm_api=mdbm
12653                 if test $ol_cv_lib_mdbm != yes ; then
12654                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12655                 fi
12656         fi
12657 fi
12658
12659 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12660         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12661 echo "configure:12662: checking for GDBM library" >&5
12662 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12663   echo $ac_n "(cached) $ac_c" 1>&6
12664 else
12665         ol_LIBS="$LIBS"
12666         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12667 echo "configure:12668: checking for gdbm_open" >&5
12668 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12669   echo $ac_n "(cached) $ac_c" 1>&6
12670 else
12671   cat > conftest.$ac_ext <<EOF
12672 #line 12673 "configure"
12673 #include "confdefs.h"
12674 /* System header to define __stub macros and hopefully few prototypes,
12675     which can conflict with char gdbm_open(); below.  */
12676 #include <assert.h>
12677 /* Override any gcc2 internal prototype to avoid an error.  */
12678 /* We use char because int might match the return type of a gcc2
12679     builtin and then its argument prototype would still apply.  */
12680 char gdbm_open();
12681 char (*f)();
12682
12683 int main() {
12684
12685 /* The GNU C library defines this for functions which it implements
12686     to always fail with ENOSYS.  Some functions are actually named
12687     something starting with __ and the normal name is an alias.  */
12688 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12689 choke me
12690 #else
12691 f = gdbm_open;
12692 #endif
12693
12694 ; return 0; }
12695 EOF
12696 if { (eval echo configure:12697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12697   rm -rf conftest*
12698   eval "ac_cv_func_gdbm_open=yes"
12699 else
12700   echo "configure: failed program was:" >&5
12701   cat conftest.$ac_ext >&5
12702   rm -rf conftest*
12703   eval "ac_cv_func_gdbm_open=no"
12704 fi
12705 rm -f conftest*
12706 fi
12707
12708 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12709   echo "$ac_t""yes" 1>&6
12710   ol_cv_lib_gdbm=yes
12711 else
12712   echo "$ac_t""no" 1>&6
12713
12714                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12715 echo "configure:12716: checking for gdbm_open in -lgdbm" >&5
12716 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12718   echo $ac_n "(cached) $ac_c" 1>&6
12719 else
12720   ac_save_LIBS="$LIBS"
12721 LIBS="-lgdbm  $LIBS"
12722 cat > conftest.$ac_ext <<EOF
12723 #line 12724 "configure"
12724 #include "confdefs.h"
12725 /* Override any gcc2 internal prototype to avoid an error.  */
12726 /* We use char because int might match the return type of a gcc2
12727     builtin and then its argument prototype would still apply.  */
12728 char gdbm_open();
12729
12730 int main() {
12731 gdbm_open()
12732 ; return 0; }
12733 EOF
12734 if { (eval echo configure:12735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12735   rm -rf conftest*
12736   eval "ac_cv_lib_$ac_lib_var=yes"
12737 else
12738   echo "configure: failed program was:" >&5
12739   cat conftest.$ac_ext >&5
12740   rm -rf conftest*
12741   eval "ac_cv_lib_$ac_lib_var=no"
12742 fi
12743 rm -f conftest*
12744 LIBS="$ac_save_LIBS"
12745
12746 fi
12747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12748   echo "$ac_t""yes" 1>&6
12749   ol_cv_lib_gdbm=-lgdbm
12750 else
12751   echo "$ac_t""no" 1>&6
12752 ol_cv_lib_gdbm=no
12753 fi
12754
12755         
12756 fi
12757
12758         LIBS="$ol_LIBS"
12759
12760 fi
12761
12762 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12763
12764
12765  for ac_hdr in gdbm.h
12766 do
12767 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12768 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12769 echo "configure:12770: checking for $ac_hdr" >&5
12770 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12771   echo $ac_n "(cached) $ac_c" 1>&6
12772 else
12773   cat > conftest.$ac_ext <<EOF
12774 #line 12775 "configure"
12775 #include "confdefs.h"
12776 #include <$ac_hdr>
12777 EOF
12778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12779 { (eval echo configure:12780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12781 if test -z "$ac_err"; then
12782   rm -rf conftest*
12783   eval "ac_cv_header_$ac_safe=yes"
12784 else
12785   echo "$ac_err" >&5
12786   echo "configure: failed program was:" >&5
12787   cat conftest.$ac_ext >&5
12788   rm -rf conftest*
12789   eval "ac_cv_header_$ac_safe=no"
12790 fi
12791 rm -f conftest*
12792 fi
12793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12794   echo "$ac_t""yes" 1>&6
12795     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12796   cat >> confdefs.h <<EOF
12797 #define $ac_tr_hdr 1
12798 EOF
12799  
12800 else
12801   echo "$ac_t""no" 1>&6
12802 fi
12803 done
12804
12805  echo $ac_n "checking for db""... $ac_c" 1>&6
12806 echo "configure:12807: checking for db" >&5
12807 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12808   echo $ac_n "(cached) $ac_c" 1>&6
12809 else
12810   
12811         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12812                 ol_cv_gdbm=no
12813         else
12814                 ol_cv_gdbm=yes
12815         fi
12816
12817 fi
12818
12819 echo "$ac_t""$ol_cv_gdbm" 1>&6
12820  if test $ol_cv_gdbm = yes ; then
12821         cat >> confdefs.h <<\EOF
12822 #define HAVE_GDBM 1
12823 EOF
12824
12825  fi
12826
12827
12828         if test $ol_cv_gdbm = yes ; then
12829                 ol_link_ldbm=gdbm
12830                 ol_with_ldbm_api=gdbm
12831
12832                 if test $ol_cv_lib_gdbm != yes ; then
12833                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12834                 fi
12835         fi
12836 fi
12837
12838 if test $ol_with_ldbm_api = ndbm ; then
12839         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12840 echo "configure:12841: checking for NDBM library" >&5
12841 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12842   echo $ac_n "(cached) $ac_c" 1>&6
12843 else
12844         ol_LIBS="$LIBS"
12845         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12846 echo "configure:12847: checking for dbm_open" >&5
12847 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12848   echo $ac_n "(cached) $ac_c" 1>&6
12849 else
12850   cat > conftest.$ac_ext <<EOF
12851 #line 12852 "configure"
12852 #include "confdefs.h"
12853 /* System header to define __stub macros and hopefully few prototypes,
12854     which can conflict with char dbm_open(); below.  */
12855 #include <assert.h>
12856 /* Override any gcc2 internal prototype to avoid an error.  */
12857 /* We use char because int might match the return type of a gcc2
12858     builtin and then its argument prototype would still apply.  */
12859 char dbm_open();
12860 char (*f)();
12861
12862 int main() {
12863
12864 /* The GNU C library defines this for functions which it implements
12865     to always fail with ENOSYS.  Some functions are actually named
12866     something starting with __ and the normal name is an alias.  */
12867 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12868 choke me
12869 #else
12870 f = dbm_open;
12871 #endif
12872
12873 ; return 0; }
12874 EOF
12875 if { (eval echo configure:12876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12876   rm -rf conftest*
12877   eval "ac_cv_func_dbm_open=yes"
12878 else
12879   echo "configure: failed program was:" >&5
12880   cat conftest.$ac_ext >&5
12881   rm -rf conftest*
12882   eval "ac_cv_func_dbm_open=no"
12883 fi
12884 rm -f conftest*
12885 fi
12886
12887 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12888   echo "$ac_t""yes" 1>&6
12889   ol_cv_lib_ndbm=yes
12890 else
12891   echo "$ac_t""no" 1>&6
12892
12893                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12894 echo "configure:12895: checking for dbm_open in -lndbm" >&5
12895 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12897   echo $ac_n "(cached) $ac_c" 1>&6
12898 else
12899   ac_save_LIBS="$LIBS"
12900 LIBS="-lndbm  $LIBS"
12901 cat > conftest.$ac_ext <<EOF
12902 #line 12903 "configure"
12903 #include "confdefs.h"
12904 /* Override any gcc2 internal prototype to avoid an error.  */
12905 /* We use char because int might match the return type of a gcc2
12906     builtin and then its argument prototype would still apply.  */
12907 char dbm_open();
12908
12909 int main() {
12910 dbm_open()
12911 ; return 0; }
12912 EOF
12913 if { (eval echo configure:12914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12914   rm -rf conftest*
12915   eval "ac_cv_lib_$ac_lib_var=yes"
12916 else
12917   echo "configure: failed program was:" >&5
12918   cat conftest.$ac_ext >&5
12919   rm -rf conftest*
12920   eval "ac_cv_lib_$ac_lib_var=no"
12921 fi
12922 rm -f conftest*
12923 LIBS="$ac_save_LIBS"
12924
12925 fi
12926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12927   echo "$ac_t""yes" 1>&6
12928   ol_cv_lib_ndbm=-lndbm
12929 else
12930   echo "$ac_t""no" 1>&6
12931
12932                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12933 echo "configure:12934: checking for dbm_open in -ldbm" >&5
12934 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12936   echo $ac_n "(cached) $ac_c" 1>&6
12937 else
12938   ac_save_LIBS="$LIBS"
12939 LIBS="-ldbm  $LIBS"
12940 cat > conftest.$ac_ext <<EOF
12941 #line 12942 "configure"
12942 #include "confdefs.h"
12943 /* Override any gcc2 internal prototype to avoid an error.  */
12944 /* We use char because int might match the return type of a gcc2
12945     builtin and then its argument prototype would still apply.  */
12946 char dbm_open();
12947
12948 int main() {
12949 dbm_open()
12950 ; return 0; }
12951 EOF
12952 if { (eval echo configure:12953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12953   rm -rf conftest*
12954   eval "ac_cv_lib_$ac_lib_var=yes"
12955 else
12956   echo "configure: failed program was:" >&5
12957   cat conftest.$ac_ext >&5
12958   rm -rf conftest*
12959   eval "ac_cv_lib_$ac_lib_var=no"
12960 fi
12961 rm -f conftest*
12962 LIBS="$ac_save_LIBS"
12963
12964 fi
12965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12966   echo "$ac_t""yes" 1>&6
12967   ol_cv_lib_ndbm=-ldbm
12968 else
12969   echo "$ac_t""no" 1>&6
12970 ol_cv_lib_ndbm=no
12971 fi
12972                 
12973 fi
12974
12975         
12976 fi
12977
12978         LIBS="$ol_LIBS"
12979
12980 fi
12981
12982 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12983
12984
12985  for ac_hdr in ndbm.h
12986 do
12987 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12988 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12989 echo "configure:12990: checking for $ac_hdr" >&5
12990 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12991   echo $ac_n "(cached) $ac_c" 1>&6
12992 else
12993   cat > conftest.$ac_ext <<EOF
12994 #line 12995 "configure"
12995 #include "confdefs.h"
12996 #include <$ac_hdr>
12997 EOF
12998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12999 { (eval echo configure:13000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13001 if test -z "$ac_err"; then
13002   rm -rf conftest*
13003   eval "ac_cv_header_$ac_safe=yes"
13004 else
13005   echo "$ac_err" >&5
13006   echo "configure: failed program was:" >&5
13007   cat conftest.$ac_ext >&5
13008   rm -rf conftest*
13009   eval "ac_cv_header_$ac_safe=no"
13010 fi
13011 rm -f conftest*
13012 fi
13013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13014   echo "$ac_t""yes" 1>&6
13015     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13016   cat >> confdefs.h <<EOF
13017 #define $ac_tr_hdr 1
13018 EOF
13019  
13020 else
13021   echo "$ac_t""no" 1>&6
13022 fi
13023 done
13024
13025  echo $ac_n "checking for db""... $ac_c" 1>&6
13026 echo "configure:13027: checking for db" >&5
13027 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13028   echo $ac_n "(cached) $ac_c" 1>&6
13029 else
13030   
13031         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13032                 ol_cv_ndbm=no
13033         else
13034                 ol_cv_ndbm=yes
13035         fi
13036
13037 fi
13038
13039 echo "$ac_t""$ol_cv_ndbm" 1>&6
13040  if test $ol_cv_ndbm = yes ; then
13041         cat >> confdefs.h <<\EOF
13042 #define HAVE_NDBM 1
13043 EOF
13044
13045  fi
13046
13047
13048         if test $ol_cv_ndbm = yes ; then
13049                 ol_link_ldbm=ndbm
13050                 ol_with_ldbm_api=ndbm
13051
13052                 if test $ol_cv_lib_ndbm != yes ; then
13053                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13054                 fi
13055         fi
13056 fi
13057
13058 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13059         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13060         if test $ol_enable_ldbm = yes ; then
13061                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13062         fi
13063
13064         echo "configure: warning: disabling LDBM" 1>&2
13065         ol_enable_ldbm=no
13066 fi
13067
13068 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13069         LINK_BINS_DYNAMIC="yes"
13070 else
13071         LINK_BINS_DYNAMIC="no"
13072 fi
13073
13074 if test $ol_enable_wrappers != no ; then
13075         for ac_hdr in tcpd.h
13076 do
13077 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13078 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13079 echo "configure:13080: checking for $ac_hdr" >&5
13080 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13081   echo $ac_n "(cached) $ac_c" 1>&6
13082 else
13083   cat > conftest.$ac_ext <<EOF
13084 #line 13085 "configure"
13085 #include "confdefs.h"
13086 #include <$ac_hdr>
13087 EOF
13088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13089 { (eval echo configure:13090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13091 if test -z "$ac_err"; then
13092   rm -rf conftest*
13093   eval "ac_cv_header_$ac_safe=yes"
13094 else
13095   echo "$ac_err" >&5
13096   echo "configure: failed program was:" >&5
13097   cat conftest.$ac_ext >&5
13098   rm -rf conftest*
13099   eval "ac_cv_header_$ac_safe=no"
13100 fi
13101 rm -f conftest*
13102 fi
13103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13104   echo "$ac_t""yes" 1>&6
13105     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13106   cat >> confdefs.h <<EOF
13107 #define $ac_tr_hdr 1
13108 EOF
13109  
13110 else
13111   echo "$ac_t""no" 1>&6
13112 fi
13113 done
13114
13115
13116         if test $ac_cv_header_tcpd_h != yes ; then
13117                 have_wrappers=no
13118         else
13119                 cat > conftest.$ac_ext <<EOF
13120 #line 13121 "configure"
13121 #include "confdefs.h"
13122
13123 int allow_severity = 0;
13124 int deny_severity  = 0;
13125                 
13126 int main() {
13127 hosts_access()
13128 ; return 0; }
13129 EOF
13130 if { (eval echo configure:13131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13131   rm -rf conftest*
13132   have_wrappers=yes
13133 else
13134   echo "configure: failed program was:" >&5
13135   cat conftest.$ac_ext >&5
13136   rm -rf conftest*
13137   have_wrappers=no
13138 fi
13139 rm -f conftest*
13140         fi
13141
13142         if test $have_wrappers = yes ; then
13143                 cat >> confdefs.h <<\EOF
13144 #define HAVE_TCPD 1
13145 EOF
13146
13147                 WRAP_LIBS="-lwrap"
13148
13149                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13150 echo "configure:13151: checking for main in -lnsl" >&5
13151 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13152 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13153   echo $ac_n "(cached) $ac_c" 1>&6
13154 else
13155   ac_save_LIBS="$LIBS"
13156 LIBS="-lnsl  $LIBS"
13157 cat > conftest.$ac_ext <<EOF
13158 #line 13159 "configure"
13159 #include "confdefs.h"
13160
13161 int main() {
13162 main()
13163 ; return 0; }
13164 EOF
13165 if { (eval echo configure:13166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13166   rm -rf conftest*
13167   eval "ac_cv_lib_$ac_lib_var=yes"
13168 else
13169   echo "configure: failed program was:" >&5
13170   cat conftest.$ac_ext >&5
13171   rm -rf conftest*
13172   eval "ac_cv_lib_$ac_lib_var=no"
13173 fi
13174 rm -f conftest*
13175 LIBS="$ac_save_LIBS"
13176
13177 fi
13178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13179   echo "$ac_t""yes" 1>&6
13180     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13181     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13182   cat >> confdefs.h <<EOF
13183 #define $ac_tr_lib 1
13184 EOF
13185
13186   LIBS="-lnsl $LIBS"
13187
13188 else
13189   echo "$ac_t""no" 1>&6
13190 fi
13191
13192         else
13193                 echo "configure: warning: could not find -lwrap" 1>&2
13194                 if test $ol_enable_wrappers = yes ; then
13195                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13196                 fi
13197
13198                 echo "configure: warning: disabling wrappers support" 1>&2
13199                 ol_enable_wrappers=no
13200                 WRAP_LIBS=""
13201         fi
13202 fi
13203
13204 if test $ol_enable_syslog != no ; then
13205         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13206 echo "configure:13207: checking for openlog" >&5
13207 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13208   echo $ac_n "(cached) $ac_c" 1>&6
13209 else
13210   cat > conftest.$ac_ext <<EOF
13211 #line 13212 "configure"
13212 #include "confdefs.h"
13213 /* System header to define __stub macros and hopefully few prototypes,
13214     which can conflict with char openlog(); below.  */
13215 #include <assert.h>
13216 /* Override any gcc2 internal prototype to avoid an error.  */
13217 /* We use char because int might match the return type of a gcc2
13218     builtin and then its argument prototype would still apply.  */
13219 char openlog();
13220 char (*f)();
13221
13222 int main() {
13223
13224 /* The GNU C library defines this for functions which it implements
13225     to always fail with ENOSYS.  Some functions are actually named
13226     something starting with __ and the normal name is an alias.  */
13227 #if defined (__stub_openlog) || defined (__stub___openlog)
13228 choke me
13229 #else
13230 f = openlog;
13231 #endif
13232
13233 ; return 0; }
13234 EOF
13235 if { (eval echo configure:13236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13236   rm -rf conftest*
13237   eval "ac_cv_func_openlog=yes"
13238 else
13239   echo "configure: failed program was:" >&5
13240   cat conftest.$ac_ext >&5
13241   rm -rf conftest*
13242   eval "ac_cv_func_openlog=no"
13243 fi
13244 rm -f conftest*
13245 fi
13246
13247 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13248   echo "$ac_t""yes" 1>&6
13249   :
13250 else
13251   echo "$ac_t""no" 1>&6
13252 fi
13253
13254         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13255                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13256         fi
13257         ol_enable_syslog=$ac_cv_func_openlog
13258 fi
13259
13260
13261 ol_link_sql=no
13262 if test $ol_enable_sql != no ; then
13263         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13264 echo "configure:13265: checking for SQLDriverConnect in -liodbc" >&5
13265 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13267   echo $ac_n "(cached) $ac_c" 1>&6
13268 else
13269   ac_save_LIBS="$LIBS"
13270 LIBS="-liodbc  $LIBS"
13271 cat > conftest.$ac_ext <<EOF
13272 #line 13273 "configure"
13273 #include "confdefs.h"
13274 /* Override any gcc2 internal prototype to avoid an error.  */
13275 /* We use char because int might match the return type of a gcc2
13276     builtin and then its argument prototype would still apply.  */
13277 char SQLDriverConnect();
13278
13279 int main() {
13280 SQLDriverConnect()
13281 ; return 0; }
13282 EOF
13283 if { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13284   rm -rf conftest*
13285   eval "ac_cv_lib_$ac_lib_var=yes"
13286 else
13287   echo "configure: failed program was:" >&5
13288   cat conftest.$ac_ext >&5
13289   rm -rf conftest*
13290   eval "ac_cv_lib_$ac_lib_var=no"
13291 fi
13292 rm -f conftest*
13293 LIBS="$ac_save_LIBS"
13294
13295 fi
13296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13297   echo "$ac_t""yes" 1>&6
13298   have_iodbc=yes
13299 else
13300   echo "$ac_t""no" 1>&6
13301 have_iodbc=no
13302 fi
13303
13304         if test $have_iodbc = yes ; then
13305                 ol_link_sql="-liodbc"
13306         else
13307                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13308 echo "configure:13309: checking for SQLDriverConnect in -lodbc" >&5
13309 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13311   echo $ac_n "(cached) $ac_c" 1>&6
13312 else
13313   ac_save_LIBS="$LIBS"
13314 LIBS="-lodbc  $LIBS"
13315 cat > conftest.$ac_ext <<EOF
13316 #line 13317 "configure"
13317 #include "confdefs.h"
13318 /* Override any gcc2 internal prototype to avoid an error.  */
13319 /* We use char because int might match the return type of a gcc2
13320     builtin and then its argument prototype would still apply.  */
13321 char SQLDriverConnect();
13322
13323 int main() {
13324 SQLDriverConnect()
13325 ; return 0; }
13326 EOF
13327 if { (eval echo configure:13328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13328   rm -rf conftest*
13329   eval "ac_cv_lib_$ac_lib_var=yes"
13330 else
13331   echo "configure: failed program was:" >&5
13332   cat conftest.$ac_ext >&5
13333   rm -rf conftest*
13334   eval "ac_cv_lib_$ac_lib_var=no"
13335 fi
13336 rm -f conftest*
13337 LIBS="$ac_save_LIBS"
13338
13339 fi
13340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13341   echo "$ac_t""yes" 1>&6
13342   have_odbc=yes
13343 else
13344   echo "$ac_t""no" 1>&6
13345 have_odbc=no
13346 fi
13347
13348                 if test $have_odbc = yes ; then
13349                         ol_link_sql="-lodbc"
13350                 fi
13351         fi
13352
13353         if test $ol_link_sql != no ; then
13354                 SLAPD_SQL_LIBS="$ol_link_sql"
13355
13356         elif test $ol_enable_sql != auto ; then
13357                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13358         fi
13359 fi
13360
13361 if test $ol_enable_tcl != no ; then
13362         for ac_hdr in tcl.h
13363 do
13364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13366 echo "configure:13367: checking for $ac_hdr" >&5
13367 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13368   echo $ac_n "(cached) $ac_c" 1>&6
13369 else
13370   cat > conftest.$ac_ext <<EOF
13371 #line 13372 "configure"
13372 #include "confdefs.h"
13373 #include <$ac_hdr>
13374 EOF
13375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13376 { (eval echo configure:13377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13378 if test -z "$ac_err"; then
13379   rm -rf conftest*
13380   eval "ac_cv_header_$ac_safe=yes"
13381 else
13382   echo "$ac_err" >&5
13383   echo "configure: failed program was:" >&5
13384   cat conftest.$ac_ext >&5
13385   rm -rf conftest*
13386   eval "ac_cv_header_$ac_safe=no"
13387 fi
13388 rm -f conftest*
13389 fi
13390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13391   echo "$ac_t""yes" 1>&6
13392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13393   cat >> confdefs.h <<EOF
13394 #define $ac_tr_hdr 1
13395 EOF
13396  
13397 else
13398   echo "$ac_t""no" 1>&6
13399 fi
13400 done
13401
13402
13403         if test $ac_cv_header_tcl_h != yes ; then
13404                 have_tcl=no
13405         else
13406                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13407                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13408 echo "configure:13409: checking for main in -l$lib" >&5
13409 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13410 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13411   echo $ac_n "(cached) $ac_c" 1>&6
13412 else
13413   ac_save_LIBS="$LIBS"
13414 LIBS="-l$lib  $LIBS"
13415 cat > conftest.$ac_ext <<EOF
13416 #line 13417 "configure"
13417 #include "confdefs.h"
13418
13419 int main() {
13420 main()
13421 ; return 0; }
13422 EOF
13423 if { (eval echo configure:13424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13424   rm -rf conftest*
13425   eval "ac_cv_lib_$ac_lib_var=yes"
13426 else
13427   echo "configure: failed program was:" >&5
13428   cat conftest.$ac_ext >&5
13429   rm -rf conftest*
13430   eval "ac_cv_lib_$ac_lib_var=no"
13431 fi
13432 rm -f conftest*
13433 LIBS="$ac_save_LIBS"
13434
13435 fi
13436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13437   echo "$ac_t""yes" 1>&6
13438   have_tcl=yes
13439                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13440                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13441                            else
13442                                MOD_TCL_LIB="-l${lib}"
13443                            fi;break
13444 else
13445   echo "$ac_t""no" 1>&6
13446 have_tcl=no
13447 fi
13448
13449                 done
13450         fi
13451
13452         if test $have_tcl != yes ; then
13453                 echo "configure: warning: could not find -ltcl" 1>&2
13454                 if test $ol_enable_tcl = yes ; then
13455                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13456                 fi
13457
13458                 ol_enable_tcl=no
13459         fi
13460 fi
13461
13462 ol_link_termcap=no
13463 for ac_hdr in termcap.h ncurses.h
13464 do
13465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13467 echo "configure:13468: checking for $ac_hdr" >&5
13468 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13469   echo $ac_n "(cached) $ac_c" 1>&6
13470 else
13471   cat > conftest.$ac_ext <<EOF
13472 #line 13473 "configure"
13473 #include "confdefs.h"
13474 #include <$ac_hdr>
13475 EOF
13476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13477 { (eval echo configure:13478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13479 if test -z "$ac_err"; then
13480   rm -rf conftest*
13481   eval "ac_cv_header_$ac_safe=yes"
13482 else
13483   echo "$ac_err" >&5
13484   echo "configure: failed program was:" >&5
13485   cat conftest.$ac_ext >&5
13486   rm -rf conftest*
13487   eval "ac_cv_header_$ac_safe=no"
13488 fi
13489 rm -f conftest*
13490 fi
13491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13492   echo "$ac_t""yes" 1>&6
13493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13494   cat >> confdefs.h <<EOF
13495 #define $ac_tr_hdr 1
13496 EOF
13497  
13498 else
13499   echo "$ac_t""no" 1>&6
13500 fi
13501 done
13502
13503
13504 if test $ol_link_termcap = no ; then
13505         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13506 echo "configure:13507: checking for tputs in -ltermcap" >&5
13507 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13509   echo $ac_n "(cached) $ac_c" 1>&6
13510 else
13511   ac_save_LIBS="$LIBS"
13512 LIBS="-ltermcap  $LIBS"
13513 cat > conftest.$ac_ext <<EOF
13514 #line 13515 "configure"
13515 #include "confdefs.h"
13516 /* Override any gcc2 internal prototype to avoid an error.  */
13517 /* We use char because int might match the return type of a gcc2
13518     builtin and then its argument prototype would still apply.  */
13519 char tputs();
13520
13521 int main() {
13522 tputs()
13523 ; return 0; }
13524 EOF
13525 if { (eval echo configure:13526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13526   rm -rf conftest*
13527   eval "ac_cv_lib_$ac_lib_var=yes"
13528 else
13529   echo "configure: failed program was:" >&5
13530   cat conftest.$ac_ext >&5
13531   rm -rf conftest*
13532   eval "ac_cv_lib_$ac_lib_var=no"
13533 fi
13534 rm -f conftest*
13535 LIBS="$ac_save_LIBS"
13536
13537 fi
13538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13539   echo "$ac_t""yes" 1>&6
13540   have_termcap=yes
13541 else
13542   echo "$ac_t""no" 1>&6
13543 have_termcap=no
13544 fi
13545
13546         if test $have_termcap = yes ; then
13547                 cat >> confdefs.h <<\EOF
13548 #define HAVE_TERMCAP 1
13549 EOF
13550
13551                 ol_link_termcap=yes
13552                 TERMCAP_LIBS=-ltermcap
13553         fi
13554 fi
13555
13556 if test $ol_link_termcap = no ; then
13557         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13558 echo "configure:13559: checking for initscr in -lncurses" >&5
13559 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13560 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13561   echo $ac_n "(cached) $ac_c" 1>&6
13562 else
13563   ac_save_LIBS="$LIBS"
13564 LIBS="-lncurses  $LIBS"
13565 cat > conftest.$ac_ext <<EOF
13566 #line 13567 "configure"
13567 #include "confdefs.h"
13568 /* Override any gcc2 internal prototype to avoid an error.  */
13569 /* We use char because int might match the return type of a gcc2
13570     builtin and then its argument prototype would still apply.  */
13571 char initscr();
13572
13573 int main() {
13574 initscr()
13575 ; return 0; }
13576 EOF
13577 if { (eval echo configure:13578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13578   rm -rf conftest*
13579   eval "ac_cv_lib_$ac_lib_var=yes"
13580 else
13581   echo "configure: failed program was:" >&5
13582   cat conftest.$ac_ext >&5
13583   rm -rf conftest*
13584   eval "ac_cv_lib_$ac_lib_var=no"
13585 fi
13586 rm -f conftest*
13587 LIBS="$ac_save_LIBS"
13588
13589 fi
13590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13591   echo "$ac_t""yes" 1>&6
13592   have_ncurses=yes
13593 else
13594   echo "$ac_t""no" 1>&6
13595 have_ncurses=no
13596 fi
13597
13598         if test $have_ncurses = yes ; then
13599                 cat >> confdefs.h <<\EOF
13600 #define HAVE_NCURSES 1
13601 EOF
13602
13603                 ol_link_termcap=yes
13604                 TERMCAP_LIBS=-lncurses
13605         fi
13606 fi
13607
13608 if test $ol_link_termcap = no ; then
13609         cat >> confdefs.h <<\EOF
13610 #define NO_TERMCAP 1
13611 EOF
13612
13613         TERMCAP_LIBS=
13614 fi
13615
13616 ol_link_sasl=no
13617 ol_link_spasswd=no
13618 if test $ol_with_cyrus_sasl != no ; then
13619         for ac_hdr in sasl.h
13620 do
13621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13623 echo "configure:13624: checking for $ac_hdr" >&5
13624 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13625   echo $ac_n "(cached) $ac_c" 1>&6
13626 else
13627   cat > conftest.$ac_ext <<EOF
13628 #line 13629 "configure"
13629 #include "confdefs.h"
13630 #include <$ac_hdr>
13631 EOF
13632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13633 { (eval echo configure:13634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13635 if test -z "$ac_err"; then
13636   rm -rf conftest*
13637   eval "ac_cv_header_$ac_safe=yes"
13638 else
13639   echo "$ac_err" >&5
13640   echo "configure: failed program was:" >&5
13641   cat conftest.$ac_ext >&5
13642   rm -rf conftest*
13643   eval "ac_cv_header_$ac_safe=no"
13644 fi
13645 rm -f conftest*
13646 fi
13647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13648   echo "$ac_t""yes" 1>&6
13649     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13650   cat >> confdefs.h <<EOF
13651 #define $ac_tr_hdr 1
13652 EOF
13653  
13654 else
13655   echo "$ac_t""no" 1>&6
13656 fi
13657 done
13658
13659
13660         if test $ac_cv_header_sasl_h = yes ; then
13661                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13662 echo "configure:13663: checking for sasl_client_init in -lsasl" >&5
13663 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13665   echo $ac_n "(cached) $ac_c" 1>&6
13666 else
13667   ac_save_LIBS="$LIBS"
13668 LIBS="-lsasl  $LIBS"
13669 cat > conftest.$ac_ext <<EOF
13670 #line 13671 "configure"
13671 #include "confdefs.h"
13672 /* Override any gcc2 internal prototype to avoid an error.  */
13673 /* We use char because int might match the return type of a gcc2
13674     builtin and then its argument prototype would still apply.  */
13675 char sasl_client_init();
13676
13677 int main() {
13678 sasl_client_init()
13679 ; return 0; }
13680 EOF
13681 if { (eval echo configure:13682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13682   rm -rf conftest*
13683   eval "ac_cv_lib_$ac_lib_var=yes"
13684 else
13685   echo "configure: failed program was:" >&5
13686   cat conftest.$ac_ext >&5
13687   rm -rf conftest*
13688   eval "ac_cv_lib_$ac_lib_var=no"
13689 fi
13690 rm -f conftest*
13691 LIBS="$ac_save_LIBS"
13692
13693 fi
13694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13695   echo "$ac_t""yes" 1>&6
13696   have_cyrus_sasl=yes
13697 else
13698   echo "$ac_t""no" 1>&6
13699 have_cyrus_sasl=no
13700 fi
13701
13702
13703                 if test $have_cyrus_sasl != no ; then
13704                         SASL_LIBS="-lsasl"
13705                         cat >> confdefs.h <<\EOF
13706 #define HAVE_CYRUS_SASL 1
13707 EOF
13708
13709                         ol_link_sasl=yes
13710                 fi
13711         fi
13712
13713         if test $ol_link_sasl = no ; then
13714                 if test $ol_with_cyrus_sasl != auto ; then
13715                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13716                 else
13717                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13718                         echo "configure: warning: SASL authentication not supported!" 1>&2
13719                         if test $ol_link_tls = no ; then
13720                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13721                         fi
13722                 fi
13723
13724         elif test $ol_enable_spasswd != no ; then
13725                 ol_link_spasswd=yes
13726         fi
13727
13728 else
13729         echo "configure: warning: SASL authentication not supported!" 1>&2
13730         if test $ol_link_tls = no ; then
13731                 echo "configure: warning: Strong authentication not supported!" 1>&2
13732         fi
13733 fi
13734
13735 if test $cross_compiling != yes ; then
13736         dev=no
13737         if test -r /dev/urandom ; then
13738                 dev="/dev/urandom";
13739         elif test -r /idev/urandom ; then
13740                 dev="/idev/urandom";
13741         elif test -r /dev/srandom ; then
13742                 dev="/dev/srandom";
13743         elif test -r /dev/random ; then
13744                 dev="/dev/random";
13745         elif test -r /idev/random ; then
13746                 dev="/idev/random";
13747         fi
13748
13749         if test $dev != no ; then
13750                 cat >> confdefs.h <<EOF
13751 #define URANDOM_DEVICE "$dev"
13752 EOF
13753
13754         fi
13755 fi
13756
13757 ol_link_fetch=no
13758 if test $ol_with_fetch != no ; then
13759         ol_LIBS=$LIBS
13760 LIBS="-lfetch -lcom_err $LIBS"
13761 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13762 echo "configure:13763: checking fetch(3) library" >&5
13763 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13764   echo $ac_n "(cached) $ac_c" 1>&6
13765 else
13766   
13767         cat > conftest.$ac_ext <<EOF
13768 #line 13769 "configure"
13769 #include "confdefs.h"
13770
13771 #include <sys/param.h>
13772 #include <stdio.h>
13773 #include <fetch.h>
13774 int main() {
13775 struct url *u = fetchParseURL("file:///"); 
13776 ; return 0; }
13777 EOF
13778 if { (eval echo configure:13779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13779   rm -rf conftest*
13780   ol_cv_lib_fetch=yes
13781 else
13782   echo "configure: failed program was:" >&5
13783   cat conftest.$ac_ext >&5
13784   rm -rf conftest*
13785   ol_cv_lib_fetch=no
13786 fi
13787 rm -f conftest*
13788 fi
13789
13790 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13791 LIBS=$ol_LIBS
13792 if test $ol_cv_lib_fetch != no ; then
13793         ol_link_fetch="-lfetch -lcom_err"
13794         cat >> confdefs.h <<\EOF
13795 #define HAVE_FETCH 1
13796 EOF
13797
13798 fi
13799
13800
13801         if test $ol_cv_lib_fetch != no ; then
13802                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13803                 ol_link_fetch=freebsd
13804
13805         elif test $ol_with_fetch != auto ; then
13806                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13807         fi 
13808 fi
13809
13810 ol_link_readline=no
13811 if test $ol_with_readline != no ; then
13812         for ac_hdr in readline/readline.h readline/history.h
13813 do
13814 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13815 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13816 echo "configure:13817: checking for $ac_hdr" >&5
13817 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13818   echo $ac_n "(cached) $ac_c" 1>&6
13819 else
13820   cat > conftest.$ac_ext <<EOF
13821 #line 13822 "configure"
13822 #include "confdefs.h"
13823 #include <$ac_hdr>
13824 EOF
13825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13826 { (eval echo configure:13827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13828 if test -z "$ac_err"; then
13829   rm -rf conftest*
13830   eval "ac_cv_header_$ac_safe=yes"
13831 else
13832   echo "$ac_err" >&5
13833   echo "configure: failed program was:" >&5
13834   cat conftest.$ac_ext >&5
13835   rm -rf conftest*
13836   eval "ac_cv_header_$ac_safe=no"
13837 fi
13838 rm -f conftest*
13839 fi
13840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13841   echo "$ac_t""yes" 1>&6
13842     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13843   cat >> confdefs.h <<EOF
13844 #define $ac_tr_hdr 1
13845 EOF
13846  
13847 else
13848   echo "$ac_t""no" 1>&6
13849 fi
13850 done
13851
13852
13853         if test $ac_cv_header_readline_readline_h = yes ; then
13854                 save_LIBS="$LIBS"
13855                 LIBS="$TERMCAP_LIBS $LIBS"
13856                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13857 echo "configure:13858: checking for readline in -lreadline" >&5
13858 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13859 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13860   echo $ac_n "(cached) $ac_c" 1>&6
13861 else
13862   ac_save_LIBS="$LIBS"
13863 LIBS="-lreadline  $LIBS"
13864 cat > conftest.$ac_ext <<EOF
13865 #line 13866 "configure"
13866 #include "confdefs.h"
13867 /* Override any gcc2 internal prototype to avoid an error.  */
13868 /* We use char because int might match the return type of a gcc2
13869     builtin and then its argument prototype would still apply.  */
13870 char readline();
13871
13872 int main() {
13873 readline()
13874 ; return 0; }
13875 EOF
13876 if { (eval echo configure:13877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13877   rm -rf conftest*
13878   eval "ac_cv_lib_$ac_lib_var=yes"
13879 else
13880   echo "configure: failed program was:" >&5
13881   cat conftest.$ac_ext >&5
13882   rm -rf conftest*
13883   eval "ac_cv_lib_$ac_lib_var=no"
13884 fi
13885 rm -f conftest*
13886 LIBS="$ac_save_LIBS"
13887
13888 fi
13889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13890   echo "$ac_t""yes" 1>&6
13891   have_readline=yes
13892 else
13893   echo "$ac_t""no" 1>&6
13894 have_readline=no
13895 fi
13896
13897                 LIBS="$save_LIBS"
13898                         
13899                 if test $have_readline = yes ; then
13900                         ol_with_readline=found
13901                         ol_link_readline=yes
13902
13903                         READLINE_LIBS="-lreadline"
13904                 fi
13905         fi
13906 fi
13907
13908 if test $ol_link_readline = yes ; then
13909         cat >> confdefs.h <<\EOF
13910 #define HAVE_READLINE 1
13911 EOF
13912
13913 fi
13914
13915
13916 if test $ol_enable_crypt != no ; then
13917         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13918 echo "configure:13919: checking for crypt" >&5
13919 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13920   echo $ac_n "(cached) $ac_c" 1>&6
13921 else
13922   cat > conftest.$ac_ext <<EOF
13923 #line 13924 "configure"
13924 #include "confdefs.h"
13925 /* System header to define __stub macros and hopefully few prototypes,
13926     which can conflict with char crypt(); below.  */
13927 #include <assert.h>
13928 /* Override any gcc2 internal prototype to avoid an error.  */
13929 /* We use char because int might match the return type of a gcc2
13930     builtin and then its argument prototype would still apply.  */
13931 char crypt();
13932 char (*f)();
13933
13934 int main() {
13935
13936 /* The GNU C library defines this for functions which it implements
13937     to always fail with ENOSYS.  Some functions are actually named
13938     something starting with __ and the normal name is an alias.  */
13939 #if defined (__stub_crypt) || defined (__stub___crypt)
13940 choke me
13941 #else
13942 f = crypt;
13943 #endif
13944
13945 ; return 0; }
13946 EOF
13947 if { (eval echo configure:13948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13948   rm -rf conftest*
13949   eval "ac_cv_func_crypt=yes"
13950 else
13951   echo "configure: failed program was:" >&5
13952   cat conftest.$ac_ext >&5
13953   rm -rf conftest*
13954   eval "ac_cv_func_crypt=no"
13955 fi
13956 rm -f conftest*
13957 fi
13958
13959 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13960   echo "$ac_t""yes" 1>&6
13961   have_crypt=yes
13962 else
13963   echo "$ac_t""no" 1>&6
13964
13965                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13966 echo "configure:13967: checking for crypt in -lcrypt" >&5
13967 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13969   echo $ac_n "(cached) $ac_c" 1>&6
13970 else
13971   ac_save_LIBS="$LIBS"
13972 LIBS="-lcrypt  $LIBS"
13973 cat > conftest.$ac_ext <<EOF
13974 #line 13975 "configure"
13975 #include "confdefs.h"
13976 /* Override any gcc2 internal prototype to avoid an error.  */
13977 /* We use char because int might match the return type of a gcc2
13978     builtin and then its argument prototype would still apply.  */
13979 char crypt();
13980
13981 int main() {
13982 crypt()
13983 ; return 0; }
13984 EOF
13985 if { (eval echo configure:13986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13986   rm -rf conftest*
13987   eval "ac_cv_lib_$ac_lib_var=yes"
13988 else
13989   echo "configure: failed program was:" >&5
13990   cat conftest.$ac_ext >&5
13991   rm -rf conftest*
13992   eval "ac_cv_lib_$ac_lib_var=no"
13993 fi
13994 rm -f conftest*
13995 LIBS="$ac_save_LIBS"
13996
13997 fi
13998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13999   echo "$ac_t""yes" 1>&6
14000   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14001                         have_crypt=yes
14002 else
14003   echo "$ac_t""no" 1>&6
14004 have_crypt=no
14005 fi
14006
14007 fi
14008
14009
14010         if test $have_crypt = yes ; then
14011                 cat >> confdefs.h <<\EOF
14012 #define HAVE_CRYPT 1
14013 EOF
14014
14015         else
14016                 echo "configure: warning: could not find crypt" 1>&2
14017                 if test $ol_enable_crypt = yes ; then
14018                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14019                 fi
14020
14021                 echo "configure: warning: disabling crypt support" 1>&2
14022                 ol_enable_crypt=no
14023         fi
14024 fi
14025
14026 if test $ol_enable_proctitle != no ; then
14027         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14028 echo "configure:14029: checking for setproctitle" >&5
14029 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14030   echo $ac_n "(cached) $ac_c" 1>&6
14031 else
14032   cat > conftest.$ac_ext <<EOF
14033 #line 14034 "configure"
14034 #include "confdefs.h"
14035 /* System header to define __stub macros and hopefully few prototypes,
14036     which can conflict with char setproctitle(); below.  */
14037 #include <assert.h>
14038 /* Override any gcc2 internal prototype to avoid an error.  */
14039 /* We use char because int might match the return type of a gcc2
14040     builtin and then its argument prototype would still apply.  */
14041 char setproctitle();
14042 char (*f)();
14043
14044 int main() {
14045
14046 /* The GNU C library defines this for functions which it implements
14047     to always fail with ENOSYS.  Some functions are actually named
14048     something starting with __ and the normal name is an alias.  */
14049 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14050 choke me
14051 #else
14052 f = setproctitle;
14053 #endif
14054
14055 ; return 0; }
14056 EOF
14057 if { (eval echo configure:14058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14058   rm -rf conftest*
14059   eval "ac_cv_func_setproctitle=yes"
14060 else
14061   echo "configure: failed program was:" >&5
14062   cat conftest.$ac_ext >&5
14063   rm -rf conftest*
14064   eval "ac_cv_func_setproctitle=no"
14065 fi
14066 rm -f conftest*
14067 fi
14068
14069 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14070   echo "$ac_t""yes" 1>&6
14071   have_setproctitle=yes
14072 else
14073   echo "$ac_t""no" 1>&6
14074
14075                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14076 echo "configure:14077: checking for setproctitle in -lutil" >&5
14077 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14079   echo $ac_n "(cached) $ac_c" 1>&6
14080 else
14081   ac_save_LIBS="$LIBS"
14082 LIBS="-lutil  $LIBS"
14083 cat > conftest.$ac_ext <<EOF
14084 #line 14085 "configure"
14085 #include "confdefs.h"
14086 /* Override any gcc2 internal prototype to avoid an error.  */
14087 /* We use char because int might match the return type of a gcc2
14088     builtin and then its argument prototype would still apply.  */
14089 char setproctitle();
14090
14091 int main() {
14092 setproctitle()
14093 ; return 0; }
14094 EOF
14095 if { (eval echo configure:14096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14096   rm -rf conftest*
14097   eval "ac_cv_lib_$ac_lib_var=yes"
14098 else
14099   echo "configure: failed program was:" >&5
14100   cat conftest.$ac_ext >&5
14101   rm -rf conftest*
14102   eval "ac_cv_lib_$ac_lib_var=no"
14103 fi
14104 rm -f conftest*
14105 LIBS="$ac_save_LIBS"
14106
14107 fi
14108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14109   echo "$ac_t""yes" 1>&6
14110   have_setproctitle=yes
14111                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14112 else
14113   echo "$ac_t""no" 1>&6
14114 have_setproctitle=no
14115                         LIBOBJS="$LIBOBJS setproctitle.o"
14116                         LIBSRCS="$LIBSRCS setproctitle.c"
14117 fi
14118
14119 fi
14120
14121
14122         if test $have_setproctitle = yes ; then
14123                 cat >> confdefs.h <<\EOF
14124 #define HAVE_SETPROCTITLE 1
14125 EOF
14126
14127         fi
14128 fi
14129
14130 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14131 echo "configure:14132: checking for ANSI C header files" >&5
14132 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14133   echo $ac_n "(cached) $ac_c" 1>&6
14134 else
14135   cat > conftest.$ac_ext <<EOF
14136 #line 14137 "configure"
14137 #include "confdefs.h"
14138 #include <stdlib.h>
14139 #include <stdarg.h>
14140 #include <string.h>
14141 #include <float.h>
14142 EOF
14143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14144 { (eval echo configure:14145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14146 if test -z "$ac_err"; then
14147   rm -rf conftest*
14148   ac_cv_header_stdc=yes
14149 else
14150   echo "$ac_err" >&5
14151   echo "configure: failed program was:" >&5
14152   cat conftest.$ac_ext >&5
14153   rm -rf conftest*
14154   ac_cv_header_stdc=no
14155 fi
14156 rm -f conftest*
14157
14158 if test $ac_cv_header_stdc = yes; then
14159   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14160 cat > conftest.$ac_ext <<EOF
14161 #line 14162 "configure"
14162 #include "confdefs.h"
14163 #include <string.h>
14164 EOF
14165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14166   egrep "memchr" >/dev/null 2>&1; then
14167   :
14168 else
14169   rm -rf conftest*
14170   ac_cv_header_stdc=no
14171 fi
14172 rm -f conftest*
14173
14174 fi
14175
14176 if test $ac_cv_header_stdc = yes; then
14177   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14178 cat > conftest.$ac_ext <<EOF
14179 #line 14180 "configure"
14180 #include "confdefs.h"
14181 #include <stdlib.h>
14182 EOF
14183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14184   egrep "free" >/dev/null 2>&1; then
14185   :
14186 else
14187   rm -rf conftest*
14188   ac_cv_header_stdc=no
14189 fi
14190 rm -f conftest*
14191
14192 fi
14193
14194 if test $ac_cv_header_stdc = yes; then
14195   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14196 if test "$cross_compiling" = yes; then
14197   :
14198 else
14199   cat > conftest.$ac_ext <<EOF
14200 #line 14201 "configure"
14201 #include "confdefs.h"
14202 #include <ctype.h>
14203 #if ((' ' & 0x0FF) == 0x020)
14204 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14205 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14206 #else
14207 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14208  || ('j' <= (c) && (c) <= 'r') \
14209  || ('s' <= (c) && (c) <= 'z'))
14210 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14211 #endif
14212 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14213 int main () { int i; for (i = 0; i < 256; i++)
14214 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14215 exit (0); }
14216
14217 EOF
14218 if { (eval echo configure:14219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14219 then
14220   :
14221 else
14222   echo "configure: failed program was:" >&5
14223   cat conftest.$ac_ext >&5
14224   rm -fr conftest*
14225   ac_cv_header_stdc=no
14226 fi
14227 rm -fr conftest*
14228 fi
14229
14230 fi
14231 fi
14232
14233 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14234 if test $ac_cv_header_stdc = yes; then
14235   cat >> confdefs.h <<\EOF
14236 #define STDC_HEADERS 1
14237 EOF
14238
14239 fi
14240
14241 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14242 echo "configure:14243: checking for mode_t" >&5
14243 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14244   echo $ac_n "(cached) $ac_c" 1>&6
14245 else
14246   cat > conftest.$ac_ext <<EOF
14247 #line 14248 "configure"
14248 #include "confdefs.h"
14249 #include <sys/types.h>
14250 #if STDC_HEADERS
14251 #include <stdlib.h>
14252 #include <stddef.h>
14253 #endif
14254
14255 EOF
14256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14257   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14258   rm -rf conftest*
14259   eval "ac_cv_type_mode_t=yes"
14260 else
14261   rm -rf conftest*
14262   eval "ac_cv_type_mode_t=no"
14263 fi
14264 rm -f conftest*
14265
14266 fi
14267 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14268   echo "$ac_t""yes" 1>&6
14269 else
14270   echo "$ac_t""no" 1>&6
14271   cat >> confdefs.h <<EOF
14272 #define mode_t int
14273 EOF
14274
14275 fi
14276
14277 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14278 echo "configure:14279: checking for off_t" >&5
14279 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14280   echo $ac_n "(cached) $ac_c" 1>&6
14281 else
14282   cat > conftest.$ac_ext <<EOF
14283 #line 14284 "configure"
14284 #include "confdefs.h"
14285 #include <sys/types.h>
14286 #if STDC_HEADERS
14287 #include <stdlib.h>
14288 #include <stddef.h>
14289 #endif
14290
14291 EOF
14292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14293   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14294   rm -rf conftest*
14295   eval "ac_cv_type_off_t=yes"
14296 else
14297   rm -rf conftest*
14298   eval "ac_cv_type_off_t=no"
14299 fi
14300 rm -f conftest*
14301
14302 fi
14303 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14304   echo "$ac_t""yes" 1>&6
14305 else
14306   echo "$ac_t""no" 1>&6
14307   cat >> confdefs.h <<EOF
14308 #define off_t long
14309 EOF
14310
14311 fi
14312
14313 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14314 echo "configure:14315: checking for pid_t" >&5
14315 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14316   echo $ac_n "(cached) $ac_c" 1>&6
14317 else
14318   cat > conftest.$ac_ext <<EOF
14319 #line 14320 "configure"
14320 #include "confdefs.h"
14321 #include <sys/types.h>
14322 #if STDC_HEADERS
14323 #include <stdlib.h>
14324 #include <stddef.h>
14325 #endif
14326
14327 EOF
14328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14329   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14330   rm -rf conftest*
14331   eval "ac_cv_type_pid_t=yes"
14332 else
14333   rm -rf conftest*
14334   eval "ac_cv_type_pid_t=no"
14335 fi
14336 rm -f conftest*
14337
14338 fi
14339 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14340   echo "$ac_t""yes" 1>&6
14341 else
14342   echo "$ac_t""no" 1>&6
14343   cat >> confdefs.h <<EOF
14344 #define pid_t int
14345 EOF
14346
14347 fi
14348
14349 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14350 echo "configure:14351: checking for ptrdiff_t" >&5
14351 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14352   echo $ac_n "(cached) $ac_c" 1>&6
14353 else
14354   cat > conftest.$ac_ext <<EOF
14355 #line 14356 "configure"
14356 #include "confdefs.h"
14357 #include <stddef.h>
14358 int main() {
14359 ptrdiff_t p
14360 ; return 0; }
14361 EOF
14362 if { (eval echo configure:14363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14363   rm -rf conftest*
14364   am_cv_type_ptrdiff_t=yes
14365 else
14366   echo "configure: failed program was:" >&5
14367   cat conftest.$ac_ext >&5
14368   rm -rf conftest*
14369   am_cv_type_ptrdiff_t=no
14370 fi
14371 rm -f conftest*
14372 fi
14373
14374 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14375    if test $am_cv_type_ptrdiff_t = yes; then
14376      cat >> confdefs.h <<\EOF
14377 #define HAVE_PTRDIFF_T 1
14378 EOF
14379
14380    fi
14381
14382 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14383 echo "configure:14384: checking return type of signal handlers" >&5
14384 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14385   echo $ac_n "(cached) $ac_c" 1>&6
14386 else
14387   cat > conftest.$ac_ext <<EOF
14388 #line 14389 "configure"
14389 #include "confdefs.h"
14390 #include <sys/types.h>
14391 #include <signal.h>
14392 #ifdef signal
14393 #undef signal
14394 #endif
14395 #ifdef __cplusplus
14396 extern "C" void (*signal (int, void (*)(int)))(int);
14397 #else
14398 void (*signal ()) ();
14399 #endif
14400
14401 int main() {
14402 int i;
14403 ; return 0; }
14404 EOF
14405 if { (eval echo configure:14406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14406   rm -rf conftest*
14407   ac_cv_type_signal=void
14408 else
14409   echo "configure: failed program was:" >&5
14410   cat conftest.$ac_ext >&5
14411   rm -rf conftest*
14412   ac_cv_type_signal=int
14413 fi
14414 rm -f conftest*
14415 fi
14416
14417 echo "$ac_t""$ac_cv_type_signal" 1>&6
14418 cat >> confdefs.h <<EOF
14419 #define RETSIGTYPE $ac_cv_type_signal
14420 EOF
14421
14422
14423 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14424 echo "configure:14425: checking for size_t" >&5
14425 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14426   echo $ac_n "(cached) $ac_c" 1>&6
14427 else
14428   cat > conftest.$ac_ext <<EOF
14429 #line 14430 "configure"
14430 #include "confdefs.h"
14431 #include <sys/types.h>
14432 #if STDC_HEADERS
14433 #include <stdlib.h>
14434 #include <stddef.h>
14435 #endif
14436
14437 EOF
14438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14439   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14440   rm -rf conftest*
14441   eval "ac_cv_type_size_t=yes"
14442 else
14443   rm -rf conftest*
14444   eval "ac_cv_type_size_t=no"
14445 fi
14446 rm -f conftest*
14447
14448 fi
14449 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14450   echo "$ac_t""yes" 1>&6
14451 else
14452   echo "$ac_t""no" 1>&6
14453   cat >> confdefs.h <<EOF
14454 #define size_t unsigned
14455 EOF
14456
14457 fi
14458
14459
14460 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14461 echo "configure:14462: checking for ssize_t" >&5
14462 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14463   echo $ac_n "(cached) $ac_c" 1>&6
14464 else
14465   cat > conftest.$ac_ext <<EOF
14466 #line 14467 "configure"
14467 #include "confdefs.h"
14468 #include <sys/types.h>
14469 #if STDC_HEADERS
14470 #include <stdlib.h>
14471 #include <stddef.h>
14472 #endif
14473
14474 EOF
14475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14476   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14477   rm -rf conftest*
14478   eval "ac_cv_type_ssize_t=yes"
14479 else
14480   rm -rf conftest*
14481   eval "ac_cv_type_ssize_t=no"
14482 fi
14483 rm -f conftest*
14484
14485 fi
14486 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14487   echo "$ac_t""yes" 1>&6
14488 else
14489   echo "$ac_t""no" 1>&6
14490   cat >> confdefs.h <<EOF
14491 #define ssize_t signed int
14492 EOF
14493
14494 fi
14495
14496 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14497 echo "configure:14498: checking for caddr_t" >&5
14498 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14499   echo $ac_n "(cached) $ac_c" 1>&6
14500 else
14501   cat > conftest.$ac_ext <<EOF
14502 #line 14503 "configure"
14503 #include "confdefs.h"
14504 #include <sys/types.h>
14505 #if STDC_HEADERS
14506 #include <stdlib.h>
14507 #include <stddef.h>
14508 #endif
14509
14510 EOF
14511 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14512   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14513   rm -rf conftest*
14514   eval "ac_cv_type_caddr_t=yes"
14515 else
14516   rm -rf conftest*
14517   eval "ac_cv_type_caddr_t=no"
14518 fi
14519 rm -f conftest*
14520
14521 fi
14522 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14523   echo "$ac_t""yes" 1>&6
14524 else
14525   echo "$ac_t""no" 1>&6
14526   cat >> confdefs.h <<EOF
14527 #define caddr_t char *
14528 EOF
14529
14530 fi
14531
14532
14533 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14534 echo "configure:14535: checking for socklen_t" >&5
14535 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14536   echo $ac_n "(cached) $ac_c" 1>&6
14537 else
14538   cat > conftest.$ac_ext <<EOF
14539 #line 14540 "configure"
14540 #include "confdefs.h"
14541
14542 #ifdef HAVE_SYS_TYPES_H
14543 #include <sys/types.h>
14544 #endif
14545 #ifdef HAVE_SYS_SOCKET_H
14546 #include <sys/socket.h>
14547 #endif
14548
14549 int main() {
14550 socklen_t len;
14551 ; return 0; }
14552 EOF
14553 if { (eval echo configure:14554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14554   rm -rf conftest*
14555   ol_cv_type_socklen_t=yes
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -rf conftest*
14560   ol_cv_type_socklen_t=no
14561 fi
14562 rm -f conftest*
14563 fi
14564
14565 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14566   if test $ol_cv_type_socklen_t = no; then
14567     cat >> confdefs.h <<\EOF
14568 #define socklen_t int
14569 EOF
14570
14571   fi
14572  
14573 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14574 echo "configure:14575: checking for member st_blksize in aggregate type struct stat" >&5
14575 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14576   echo $ac_n "(cached) $ac_c" 1>&6
14577 else
14578   cat > conftest.$ac_ext <<EOF
14579 #line 14580 "configure"
14580 #include "confdefs.h"
14581 #include <sys/types.h>
14582 #include <sys/stat.h>
14583 int main() {
14584 struct stat foo; foo.st_blksize;
14585 ; return 0; }
14586 EOF
14587 if { (eval echo configure:14588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14588   rm -rf conftest*
14589   ac_cv_c_struct_member_st_blksize=yes
14590 else
14591   echo "configure: failed program was:" >&5
14592   cat conftest.$ac_ext >&5
14593   rm -rf conftest*
14594   ac_cv_c_struct_member_st_blksize=no
14595 fi
14596 rm -f conftest*
14597 fi
14598
14599 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14600 st_blksize="$ac_cv_c_struct_member_st_blksize"
14601 if test $ac_cv_c_struct_member_st_blksize = yes; then
14602   cat >> confdefs.h <<\EOF
14603 #define HAVE_ST_BLKSIZE 1
14604 EOF
14605
14606 fi
14607
14608 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14609 echo "configure:14610: checking whether time.h and sys/time.h may both be included" >&5
14610 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14611   echo $ac_n "(cached) $ac_c" 1>&6
14612 else
14613   cat > conftest.$ac_ext <<EOF
14614 #line 14615 "configure"
14615 #include "confdefs.h"
14616 #include <sys/types.h>
14617 #include <sys/time.h>
14618 #include <time.h>
14619 int main() {
14620 struct tm *tp;
14621 ; return 0; }
14622 EOF
14623 if { (eval echo configure:14624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14624   rm -rf conftest*
14625   ac_cv_header_time=yes
14626 else
14627   echo "configure: failed program was:" >&5
14628   cat conftest.$ac_ext >&5
14629   rm -rf conftest*
14630   ac_cv_header_time=no
14631 fi
14632 rm -f conftest*
14633 fi
14634
14635 echo "$ac_t""$ac_cv_header_time" 1>&6
14636 if test $ac_cv_header_time = yes; then
14637   cat >> confdefs.h <<\EOF
14638 #define TIME_WITH_SYS_TIME 1
14639 EOF
14640
14641 fi
14642
14643 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14644 echo "configure:14645: checking whether struct tm is in sys/time.h or time.h" >&5
14645 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14646   echo $ac_n "(cached) $ac_c" 1>&6
14647 else
14648   cat > conftest.$ac_ext <<EOF
14649 #line 14650 "configure"
14650 #include "confdefs.h"
14651 #include <sys/types.h>
14652 #include <time.h>
14653 int main() {
14654 struct tm *tp; tp->tm_sec;
14655 ; return 0; }
14656 EOF
14657 if { (eval echo configure:14658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14658   rm -rf conftest*
14659   ac_cv_struct_tm=time.h
14660 else
14661   echo "configure: failed program was:" >&5
14662   cat conftest.$ac_ext >&5
14663   rm -rf conftest*
14664   ac_cv_struct_tm=sys/time.h
14665 fi
14666 rm -f conftest*
14667 fi
14668
14669 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14670 if test $ac_cv_struct_tm = sys/time.h; then
14671   cat >> confdefs.h <<\EOF
14672 #define TM_IN_SYS_TIME 1
14673 EOF
14674
14675 fi
14676
14677 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14678 echo "configure:14679: checking for uid_t in sys/types.h" >&5
14679 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14680   echo $ac_n "(cached) $ac_c" 1>&6
14681 else
14682   cat > conftest.$ac_ext <<EOF
14683 #line 14684 "configure"
14684 #include "confdefs.h"
14685 #include <sys/types.h>
14686 EOF
14687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14688   egrep "uid_t" >/dev/null 2>&1; then
14689   rm -rf conftest*
14690   ac_cv_type_uid_t=yes
14691 else
14692   rm -rf conftest*
14693   ac_cv_type_uid_t=no
14694 fi
14695 rm -f conftest*
14696
14697 fi
14698
14699 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14700 if test $ac_cv_type_uid_t = no; then
14701   cat >> confdefs.h <<\EOF
14702 #define uid_t int
14703 EOF
14704
14705   cat >> confdefs.h <<\EOF
14706 #define gid_t int
14707 EOF
14708
14709 fi
14710
14711 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14712 echo "configure:14713: checking for sig_atomic_t" >&5
14713 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14714   echo $ac_n "(cached) $ac_c" 1>&6
14715 else
14716   cat > conftest.$ac_ext <<EOF
14717 #line 14718 "configure"
14718 #include "confdefs.h"
14719 #include <signal.h>
14720 int main() {
14721 sig_atomic_t atomic;
14722 ; return 0; }
14723 EOF
14724 if { (eval echo configure:14725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14725   rm -rf conftest*
14726   ol_cv_type_sig_atomic_t=yes
14727 else
14728   echo "configure: failed program was:" >&5
14729   cat conftest.$ac_ext >&5
14730   rm -rf conftest*
14731   ol_cv_type_sig_atomic_t=no
14732 fi
14733 rm -f conftest*
14734 fi
14735
14736 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14737   if test $ol_cv_type_sig_atomic_t = no; then
14738     cat >> confdefs.h <<\EOF
14739 #define sig_atomic_t int
14740 EOF
14741
14742   fi
14743  
14744
14745
14746 # test for pw_gecos in struct passwd
14747 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14748 echo "configure:14749: checking struct passwd for pw_gecos" >&5
14749 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14750   echo $ac_n "(cached) $ac_c" 1>&6
14751 else
14752   
14753         cat > conftest.$ac_ext <<EOF
14754 #line 14755 "configure"
14755 #include "confdefs.h"
14756 #include <pwd.h>
14757 int main() {
14758
14759         struct passwd pwd;
14760         pwd.pw_gecos = pwd.pw_name;
14761
14762 ; return 0; }
14763 EOF
14764 if { (eval echo configure:14765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14765   rm -rf conftest*
14766   ol_cv_struct_passwd_pw_gecos=yes
14767 else
14768   echo "configure: failed program was:" >&5
14769   cat conftest.$ac_ext >&5
14770   rm -rf conftest*
14771   ol_cv_struct_passwd_pw_gecos=no
14772 fi
14773 rm -f conftest*
14774 fi
14775
14776 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14777 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14778         cat >> confdefs.h <<\EOF
14779 #define HAVE_PW_GECOS 1
14780 EOF
14781
14782 fi
14783
14784 # test for pw_passwd in struct passwd
14785 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14786 echo "configure:14787: checking struct passwd for pw_passwd" >&5
14787 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14788   echo $ac_n "(cached) $ac_c" 1>&6
14789 else
14790   
14791         cat > conftest.$ac_ext <<EOF
14792 #line 14793 "configure"
14793 #include "confdefs.h"
14794 #include <pwd.h>
14795 int main() {
14796
14797         struct passwd pwd;
14798         pwd.pw_passwd = pwd.pw_name;
14799
14800 ; return 0; }
14801 EOF
14802 if { (eval echo configure:14803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14803   rm -rf conftest*
14804   ol_cv_struct_passwd_pw_passwd=yes
14805 else
14806   echo "configure: failed program was:" >&5
14807   cat conftest.$ac_ext >&5
14808   rm -rf conftest*
14809   ol_cv_struct_passwd_pw_passwd=no
14810 fi
14811 rm -f conftest*
14812 fi
14813
14814 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14815 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14816         cat >> confdefs.h <<\EOF
14817 #define HAVE_PW_PASSWD 1
14818 EOF
14819
14820 fi
14821
14822
14823 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14824 echo "configure:14825: checking if toupper() requires islower()" >&5
14825 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14826   echo $ac_n "(cached) $ac_c" 1>&6
14827 else
14828   
14829         if test "$cross_compiling" = yes; then
14830   ol_cv_c_upper_lower=safe
14831 else
14832   cat > conftest.$ac_ext <<EOF
14833 #line 14834 "configure"
14834 #include "confdefs.h"
14835
14836 #include <ctype.h>
14837 main()
14838 {
14839         if ('C' == toupper('C'))
14840                 exit(0);
14841         else
14842                 exit(1);
14843 }
14844 EOF
14845 if { (eval echo configure:14846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14846 then
14847   ol_cv_c_upper_lower=no
14848 else
14849   echo "configure: failed program was:" >&5
14850   cat conftest.$ac_ext >&5
14851   rm -fr conftest*
14852   ol_cv_c_upper_lower=yes
14853 fi
14854 rm -fr conftest*
14855 fi
14856
14857 fi
14858
14859 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14860 if test $ol_cv_c_upper_lower != no ; then
14861         cat >> confdefs.h <<\EOF
14862 #define C_UPPER_LOWER 1
14863 EOF
14864
14865 fi
14866
14867 echo $ac_n "checking for working const""... $ac_c" 1>&6
14868 echo "configure:14869: checking for working const" >&5
14869 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14870   echo $ac_n "(cached) $ac_c" 1>&6
14871 else
14872   cat > conftest.$ac_ext <<EOF
14873 #line 14874 "configure"
14874 #include "confdefs.h"
14875
14876 int main() {
14877
14878 /* Ultrix mips cc rejects this.  */
14879 typedef int charset[2]; const charset x;
14880 /* SunOS 4.1.1 cc rejects this.  */
14881 char const *const *ccp;
14882 char **p;
14883 /* NEC SVR4.0.2 mips cc rejects this.  */
14884 struct point {int x, y;};
14885 static struct point const zero = {0,0};
14886 /* AIX XL C 1.02.0.0 rejects this.
14887    It does not let you subtract one const X* pointer from another in an arm
14888    of an if-expression whose if-part is not a constant expression */
14889 const char *g = "string";
14890 ccp = &g + (g ? g-g : 0);
14891 /* HPUX 7.0 cc rejects these. */
14892 ++ccp;
14893 p = (char**) ccp;
14894 ccp = (char const *const *) p;
14895 { /* SCO 3.2v4 cc rejects this.  */
14896   char *t;
14897   char const *s = 0 ? (char *) 0 : (char const *) 0;
14898
14899   *t++ = 0;
14900 }
14901 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14902   int x[] = {25, 17};
14903   const int *foo = &x[0];
14904   ++foo;
14905 }
14906 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14907   typedef const int *iptr;
14908   iptr p = 0;
14909   ++p;
14910 }
14911 { /* AIX XL C 1.02.0.0 rejects this saying
14912      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14913   struct s { int j; const int *ap[3]; };
14914   struct s *b; b->j = 5;
14915 }
14916 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14917   const int foo = 10;
14918 }
14919
14920 ; return 0; }
14921 EOF
14922 if { (eval echo configure:14923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14923   rm -rf conftest*
14924   ac_cv_c_const=yes
14925 else
14926   echo "configure: failed program was:" >&5
14927   cat conftest.$ac_ext >&5
14928   rm -rf conftest*
14929   ac_cv_c_const=no
14930 fi
14931 rm -f conftest*
14932 fi
14933
14934 echo "$ac_t""$ac_cv_c_const" 1>&6
14935 if test $ac_cv_c_const = no; then
14936   cat >> confdefs.h <<\EOF
14937 #define const 
14938 EOF
14939
14940 fi
14941
14942 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14943 echo "configure:14944: checking if compiler understands volatile" >&5
14944 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14945   echo $ac_n "(cached) $ac_c" 1>&6
14946 else
14947   cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950 int x, y, z;
14951 int main() {
14952 volatile int a; int * volatile b = x ? &y : &z;
14953       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14954       *b = 0;
14955 ; return 0; }
14956 EOF
14957 if { (eval echo configure:14958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14958   rm -rf conftest*
14959   ol_cv_c_volatile=yes
14960 else
14961   echo "configure: failed program was:" >&5
14962   cat conftest.$ac_ext >&5
14963   rm -rf conftest*
14964   ol_cv_c_volatile=no
14965 fi
14966 rm -f conftest*
14967 fi
14968
14969 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14970   if test $ol_cv_c_volatile = yes; then
14971     : 
14972   else
14973     cat >> confdefs.h <<\EOF
14974 #define volatile 
14975 EOF
14976
14977   fi
14978  
14979
14980 if test $cross_compiling = yes ; then
14981         cat >> confdefs.h <<\EOF
14982 #define CROSS_COMPILING 1
14983 EOF
14984
14985 else
14986         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14987 echo "configure:14988: checking whether byte ordering is bigendian" >&5
14988 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14989   echo $ac_n "(cached) $ac_c" 1>&6
14990 else
14991   ac_cv_c_bigendian=unknown
14992 # See if sys/param.h defines the BYTE_ORDER macro.
14993 cat > conftest.$ac_ext <<EOF
14994 #line 14995 "configure"
14995 #include "confdefs.h"
14996 #include <sys/types.h>
14997 #include <sys/param.h>
14998 int main() {
14999
15000 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15001  bogus endian macros
15002 #endif
15003 ; return 0; }
15004 EOF
15005 if { (eval echo configure:15006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15006   rm -rf conftest*
15007   # It does; now see whether it defined to BIG_ENDIAN or not.
15008 cat > conftest.$ac_ext <<EOF
15009 #line 15010 "configure"
15010 #include "confdefs.h"
15011 #include <sys/types.h>
15012 #include <sys/param.h>
15013 int main() {
15014
15015 #if BYTE_ORDER != BIG_ENDIAN
15016  not big endian
15017 #endif
15018 ; return 0; }
15019 EOF
15020 if { (eval echo configure:15021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15021   rm -rf conftest*
15022   ac_cv_c_bigendian=yes
15023 else
15024   echo "configure: failed program was:" >&5
15025   cat conftest.$ac_ext >&5
15026   rm -rf conftest*
15027   ac_cv_c_bigendian=no
15028 fi
15029 rm -f conftest*
15030 else
15031   echo "configure: failed program was:" >&5
15032   cat conftest.$ac_ext >&5
15033 fi
15034 rm -f conftest*
15035 if test $ac_cv_c_bigendian = unknown; then
15036 if test "$cross_compiling" = yes; then
15037     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15038 else
15039   cat > conftest.$ac_ext <<EOF
15040 #line 15041 "configure"
15041 #include "confdefs.h"
15042 main () {
15043   /* Are we little or big endian?  From Harbison&Steele.  */
15044   union
15045   {
15046     long l;
15047     char c[sizeof (long)];
15048   } u;
15049   u.l = 1;
15050   exit (u.c[sizeof (long) - 1] == 1);
15051 }
15052 EOF
15053 if { (eval echo configure:15054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15054 then
15055   ac_cv_c_bigendian=no
15056 else
15057   echo "configure: failed program was:" >&5
15058   cat conftest.$ac_ext >&5
15059   rm -fr conftest*
15060   ac_cv_c_bigendian=yes
15061 fi
15062 rm -fr conftest*
15063 fi
15064
15065 fi
15066 fi
15067
15068 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15069 if test $ac_cv_c_bigendian = yes; then
15070   cat >> confdefs.h <<\EOF
15071 #define WORDS_BIGENDIAN 1
15072 EOF
15073
15074 fi
15075
15076 fi
15077
15078 echo $ac_n "checking size of short""... $ac_c" 1>&6
15079 echo "configure:15080: checking size of short" >&5 
15080 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15081   echo $ac_n "(cached) $ac_c" 1>&6
15082 else
15083   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15084   cat > conftest.$ac_ext <<EOF
15085 #line 15086 "configure"
15086 #include "confdefs.h"
15087 #include "confdefs.h" 
15088 #include <sys/types.h> 
15089  
15090
15091 int main() {
15092 switch (0) case 0: case (sizeof (short) == $ac_size):;
15093 ; return 0; }
15094 EOF
15095 if { (eval echo configure:15096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15096   rm -rf conftest*
15097   ac_cv_sizeof_short=$ac_size
15098 else
15099   echo "configure: failed program was:" >&5
15100   cat conftest.$ac_ext >&5
15101 fi
15102 rm -f conftest* 
15103   if test x$ac_cv_sizeof_short != x ; then break; fi 
15104 done 
15105
15106 fi
15107  
15108 if test x$ac_cv_sizeof_short = x ; then 
15109   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15110 fi 
15111 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15112 cat >> confdefs.h <<EOF
15113 #define SIZEOF_SHORT $ac_cv_sizeof_short
15114 EOF
15115  
15116  
15117 echo $ac_n "checking size of int""... $ac_c" 1>&6
15118 echo "configure:15119: checking size of int" >&5 
15119 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15120   echo $ac_n "(cached) $ac_c" 1>&6
15121 else
15122   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15123   cat > conftest.$ac_ext <<EOF
15124 #line 15125 "configure"
15125 #include "confdefs.h"
15126 #include "confdefs.h" 
15127 #include <sys/types.h> 
15128  
15129
15130 int main() {
15131 switch (0) case 0: case (sizeof (int) == $ac_size):;
15132 ; return 0; }
15133 EOF
15134 if { (eval echo configure:15135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15135   rm -rf conftest*
15136   ac_cv_sizeof_int=$ac_size
15137 else
15138   echo "configure: failed program was:" >&5
15139   cat conftest.$ac_ext >&5
15140 fi
15141 rm -f conftest* 
15142   if test x$ac_cv_sizeof_int != x ; then break; fi 
15143 done 
15144
15145 fi
15146  
15147 if test x$ac_cv_sizeof_int = x ; then 
15148   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15149 fi 
15150 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15151 cat >> confdefs.h <<EOF
15152 #define SIZEOF_INT $ac_cv_sizeof_int
15153 EOF
15154  
15155  
15156 echo $ac_n "checking size of long""... $ac_c" 1>&6
15157 echo "configure:15158: checking size of long" >&5 
15158 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15159   echo $ac_n "(cached) $ac_c" 1>&6
15160 else
15161   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15162   cat > conftest.$ac_ext <<EOF
15163 #line 15164 "configure"
15164 #include "confdefs.h"
15165 #include "confdefs.h" 
15166 #include <sys/types.h> 
15167  
15168
15169 int main() {
15170 switch (0) case 0: case (sizeof (long) == $ac_size):;
15171 ; return 0; }
15172 EOF
15173 if { (eval echo configure:15174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15174   rm -rf conftest*
15175   ac_cv_sizeof_long=$ac_size
15176 else
15177   echo "configure: failed program was:" >&5
15178   cat conftest.$ac_ext >&5
15179 fi
15180 rm -f conftest* 
15181   if test x$ac_cv_sizeof_long != x ; then break; fi 
15182 done 
15183
15184 fi
15185  
15186 if test x$ac_cv_sizeof_long = x ; then 
15187   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15188 fi 
15189 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15190 cat >> confdefs.h <<EOF
15191 #define SIZEOF_LONG $ac_cv_sizeof_long
15192 EOF
15193  
15194
15195
15196 if test "$ac_cv_sizeof_int" -lt 4 ; then
15197         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15198
15199         cat >> confdefs.h <<\EOF
15200 #define LBER_INT_T long
15201 EOF
15202
15203 else
15204         cat >> confdefs.h <<\EOF
15205 #define LBER_INT_T int
15206 EOF
15207
15208 fi
15209
15210 cat >> confdefs.h <<\EOF
15211 #define LBER_LEN_T long
15212 EOF
15213
15214 cat >> confdefs.h <<\EOF
15215 #define LBER_SOCKET_T int
15216 EOF
15217
15218 cat >> confdefs.h <<\EOF
15219 #define LBER_TAG_T long
15220 EOF
15221
15222
15223 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15224 echo "configure:15225: checking for 8-bit clean memcmp" >&5
15225 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15226   echo $ac_n "(cached) $ac_c" 1>&6
15227 else
15228   if test "$cross_compiling" = yes; then
15229   ac_cv_func_memcmp_clean=no
15230 else
15231   cat > conftest.$ac_ext <<EOF
15232 #line 15233 "configure"
15233 #include "confdefs.h"
15234
15235 main()
15236 {
15237   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15238   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15239 }
15240
15241 EOF
15242 if { (eval echo configure:15243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15243 then
15244   ac_cv_func_memcmp_clean=yes
15245 else
15246   echo "configure: failed program was:" >&5
15247   cat conftest.$ac_ext >&5
15248   rm -fr conftest*
15249   ac_cv_func_memcmp_clean=no
15250 fi
15251 rm -fr conftest*
15252 fi
15253
15254 fi
15255
15256 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15257 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15258
15259 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15260 echo "configure:15261: checking for strftime" >&5
15261 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15262   echo $ac_n "(cached) $ac_c" 1>&6
15263 else
15264   cat > conftest.$ac_ext <<EOF
15265 #line 15266 "configure"
15266 #include "confdefs.h"
15267 /* System header to define __stub macros and hopefully few prototypes,
15268     which can conflict with char strftime(); below.  */
15269 #include <assert.h>
15270 /* Override any gcc2 internal prototype to avoid an error.  */
15271 /* We use char because int might match the return type of a gcc2
15272     builtin and then its argument prototype would still apply.  */
15273 char strftime();
15274 char (*f)();
15275
15276 int main() {
15277
15278 /* The GNU C library defines this for functions which it implements
15279     to always fail with ENOSYS.  Some functions are actually named
15280     something starting with __ and the normal name is an alias.  */
15281 #if defined (__stub_strftime) || defined (__stub___strftime)
15282 choke me
15283 #else
15284 f = strftime;
15285 #endif
15286
15287 ; return 0; }
15288 EOF
15289 if { (eval echo configure:15290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15290   rm -rf conftest*
15291   eval "ac_cv_func_strftime=yes"
15292 else
15293   echo "configure: failed program was:" >&5
15294   cat conftest.$ac_ext >&5
15295   rm -rf conftest*
15296   eval "ac_cv_func_strftime=no"
15297 fi
15298 rm -f conftest*
15299 fi
15300
15301 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15302   echo "$ac_t""yes" 1>&6
15303   cat >> confdefs.h <<\EOF
15304 #define HAVE_STRFTIME 1
15305 EOF
15306
15307 else
15308   echo "$ac_t""no" 1>&6
15309 # strftime is in -lintl on SCO UNIX.
15310 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15311 echo "configure:15312: checking for strftime in -lintl" >&5
15312 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15313 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15314   echo $ac_n "(cached) $ac_c" 1>&6
15315 else
15316   ac_save_LIBS="$LIBS"
15317 LIBS="-lintl  $LIBS"
15318 cat > conftest.$ac_ext <<EOF
15319 #line 15320 "configure"
15320 #include "confdefs.h"
15321 /* Override any gcc2 internal prototype to avoid an error.  */
15322 /* We use char because int might match the return type of a gcc2
15323     builtin and then its argument prototype would still apply.  */
15324 char strftime();
15325
15326 int main() {
15327 strftime()
15328 ; return 0; }
15329 EOF
15330 if { (eval echo configure:15331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15331   rm -rf conftest*
15332   eval "ac_cv_lib_$ac_lib_var=yes"
15333 else
15334   echo "configure: failed program was:" >&5
15335   cat conftest.$ac_ext >&5
15336   rm -rf conftest*
15337   eval "ac_cv_lib_$ac_lib_var=no"
15338 fi
15339 rm -f conftest*
15340 LIBS="$ac_save_LIBS"
15341
15342 fi
15343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15344   echo "$ac_t""yes" 1>&6
15345   cat >> confdefs.h <<\EOF
15346 #define HAVE_STRFTIME 1
15347 EOF
15348
15349 LIBS="-lintl $LIBS"
15350 else
15351   echo "$ac_t""no" 1>&6
15352 fi
15353
15354 fi
15355
15356
15357 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15358 echo "configure:15359: checking for inet_aton()" >&5
15359 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15360   echo $ac_n "(cached) $ac_c" 1>&6
15361 else
15362   cat > conftest.$ac_ext <<EOF
15363 #line 15364 "configure"
15364 #include "confdefs.h"
15365
15366 #ifdef HAVE_SYS_TYPES_H
15367 #       include <sys/types.h>
15368 #endif
15369 #ifdef HAVE_SYS_SOCKET_H
15370 #       include <sys/socket.h>
15371 #       ifdef HAVE_SYS_SELECT_H
15372 #               include <sys/select.h>
15373 #       endif
15374 #       include <netinet/in.h>
15375 #       ifdef HAVE_ARPA_INET_H
15376 #               include <arpa/inet.h>
15377 #       endif
15378 #endif
15379
15380 int main() {
15381 struct in_addr in;
15382 int rc = inet_aton( "255.255.255.255", &in );
15383 ; return 0; }
15384 EOF
15385 if { (eval echo configure:15386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15386   rm -rf conftest*
15387   ol_cv_func_inet_aton=yes
15388 else
15389   echo "configure: failed program was:" >&5
15390   cat conftest.$ac_ext >&5
15391   rm -rf conftest*
15392   ol_cv_func_inet_aton=no
15393 fi
15394 rm -f conftest*
15395 fi
15396
15397 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15398   if test $ol_cv_func_inet_aton != no; then
15399     cat >> confdefs.h <<\EOF
15400 #define HAVE_INET_ATON 1
15401 EOF
15402
15403   fi
15404  
15405
15406 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15407 echo "configure:15408: checking for _spawnlp" >&5
15408 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15409   echo $ac_n "(cached) $ac_c" 1>&6
15410 else
15411   cat > conftest.$ac_ext <<EOF
15412 #line 15413 "configure"
15413 #include "confdefs.h"
15414 /* System header to define __stub macros and hopefully few prototypes,
15415     which can conflict with char _spawnlp(); below.  */
15416 #include <assert.h>
15417 /* Override any gcc2 internal prototype to avoid an error.  */
15418 /* We use char because int might match the return type of a gcc2
15419     builtin and then its argument prototype would still apply.  */
15420 char _spawnlp();
15421 char (*f)();
15422
15423 int main() {
15424
15425 /* The GNU C library defines this for functions which it implements
15426     to always fail with ENOSYS.  Some functions are actually named
15427     something starting with __ and the normal name is an alias.  */
15428 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15429 choke me
15430 #else
15431 f = _spawnlp;
15432 #endif
15433
15434 ; return 0; }
15435 EOF
15436 if { (eval echo configure:15437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15437   rm -rf conftest*
15438   eval "ac_cv_func__spawnlp=yes"
15439 else
15440   echo "configure: failed program was:" >&5
15441   cat conftest.$ac_ext >&5
15442   rm -rf conftest*
15443   eval "ac_cv_func__spawnlp=no"
15444 fi
15445 rm -f conftest*
15446 fi
15447
15448 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15449   echo "$ac_t""yes" 1>&6
15450   cat >> confdefs.h <<\EOF
15451 #define HAVE_SPAWNLP 1
15452 EOF
15453
15454 else
15455   echo "$ac_t""no" 1>&6
15456 fi
15457
15458
15459 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15460 echo "configure:15461: checking for _snprintf" >&5
15461 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15462   echo $ac_n "(cached) $ac_c" 1>&6
15463 else
15464   cat > conftest.$ac_ext <<EOF
15465 #line 15466 "configure"
15466 #include "confdefs.h"
15467 /* System header to define __stub macros and hopefully few prototypes,
15468     which can conflict with char _snprintf(); below.  */
15469 #include <assert.h>
15470 /* Override any gcc2 internal prototype to avoid an error.  */
15471 /* We use char because int might match the return type of a gcc2
15472     builtin and then its argument prototype would still apply.  */
15473 char _snprintf();
15474 char (*f)();
15475
15476 int main() {
15477
15478 /* The GNU C library defines this for functions which it implements
15479     to always fail with ENOSYS.  Some functions are actually named
15480     something starting with __ and the normal name is an alias.  */
15481 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15482 choke me
15483 #else
15484 f = _snprintf;
15485 #endif
15486
15487 ; return 0; }
15488 EOF
15489 if { (eval echo configure:15490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15490   rm -rf conftest*
15491   eval "ac_cv_func__snprintf=yes"
15492 else
15493   echo "configure: failed program was:" >&5
15494   cat conftest.$ac_ext >&5
15495   rm -rf conftest*
15496   eval "ac_cv_func__snprintf=no"
15497 fi
15498 rm -f conftest*
15499 fi
15500
15501 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15502   echo "$ac_t""yes" 1>&6
15503   ac_cv_func_snprintf=yes
15504         cat >> confdefs.h <<\EOF
15505 #define snprintf _snprintf
15506 EOF
15507
15508
15509 else
15510   echo "$ac_t""no" 1>&6
15511 fi
15512
15513
15514 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15515 echo "configure:15516: checking for _vsnprintf" >&5
15516 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15517   echo $ac_n "(cached) $ac_c" 1>&6
15518 else
15519   cat > conftest.$ac_ext <<EOF
15520 #line 15521 "configure"
15521 #include "confdefs.h"
15522 /* System header to define __stub macros and hopefully few prototypes,
15523     which can conflict with char _vsnprintf(); below.  */
15524 #include <assert.h>
15525 /* Override any gcc2 internal prototype to avoid an error.  */
15526 /* We use char because int might match the return type of a gcc2
15527     builtin and then its argument prototype would still apply.  */
15528 char _vsnprintf();
15529 char (*f)();
15530
15531 int main() {
15532
15533 /* The GNU C library defines this for functions which it implements
15534     to always fail with ENOSYS.  Some functions are actually named
15535     something starting with __ and the normal name is an alias.  */
15536 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15537 choke me
15538 #else
15539 f = _vsnprintf;
15540 #endif
15541
15542 ; return 0; }
15543 EOF
15544 if { (eval echo configure:15545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15545   rm -rf conftest*
15546   eval "ac_cv_func__vsnprintf=yes"
15547 else
15548   echo "configure: failed program was:" >&5
15549   cat conftest.$ac_ext >&5
15550   rm -rf conftest*
15551   eval "ac_cv_func__vsnprintf=no"
15552 fi
15553 rm -f conftest*
15554 fi
15555
15556 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15557   echo "$ac_t""yes" 1>&6
15558   ac_cv_func_vsnprintf=yes
15559         cat >> confdefs.h <<\EOF
15560 #define vsnprintf _vsnprintf
15561 EOF
15562
15563
15564 else
15565   echo "$ac_t""no" 1>&6
15566 fi
15567
15568
15569 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15570 echo "configure:15571: checking for vprintf" >&5
15571 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15572   echo $ac_n "(cached) $ac_c" 1>&6
15573 else
15574   cat > conftest.$ac_ext <<EOF
15575 #line 15576 "configure"
15576 #include "confdefs.h"
15577 /* System header to define __stub macros and hopefully few prototypes,
15578     which can conflict with char vprintf(); below.  */
15579 #include <assert.h>
15580 /* Override any gcc2 internal prototype to avoid an error.  */
15581 /* We use char because int might match the return type of a gcc2
15582     builtin and then its argument prototype would still apply.  */
15583 char vprintf();
15584 char (*f)();
15585
15586 int main() {
15587
15588 /* The GNU C library defines this for functions which it implements
15589     to always fail with ENOSYS.  Some functions are actually named
15590     something starting with __ and the normal name is an alias.  */
15591 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15592 choke me
15593 #else
15594 f = vprintf;
15595 #endif
15596
15597 ; return 0; }
15598 EOF
15599 if { (eval echo configure:15600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15600   rm -rf conftest*
15601   eval "ac_cv_func_vprintf=yes"
15602 else
15603   echo "configure: failed program was:" >&5
15604   cat conftest.$ac_ext >&5
15605   rm -rf conftest*
15606   eval "ac_cv_func_vprintf=no"
15607 fi
15608 rm -f conftest*
15609 fi
15610
15611 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15612   echo "$ac_t""yes" 1>&6
15613   cat >> confdefs.h <<\EOF
15614 #define HAVE_VPRINTF 1
15615 EOF
15616
15617 else
15618   echo "$ac_t""no" 1>&6
15619 fi
15620
15621 if test "$ac_cv_func_vprintf" != yes; then
15622 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15623 echo "configure:15624: checking for _doprnt" >&5
15624 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15625   echo $ac_n "(cached) $ac_c" 1>&6
15626 else
15627   cat > conftest.$ac_ext <<EOF
15628 #line 15629 "configure"
15629 #include "confdefs.h"
15630 /* System header to define __stub macros and hopefully few prototypes,
15631     which can conflict with char _doprnt(); below.  */
15632 #include <assert.h>
15633 /* Override any gcc2 internal prototype to avoid an error.  */
15634 /* We use char because int might match the return type of a gcc2
15635     builtin and then its argument prototype would still apply.  */
15636 char _doprnt();
15637 char (*f)();
15638
15639 int main() {
15640
15641 /* The GNU C library defines this for functions which it implements
15642     to always fail with ENOSYS.  Some functions are actually named
15643     something starting with __ and the normal name is an alias.  */
15644 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15645 choke me
15646 #else
15647 f = _doprnt;
15648 #endif
15649
15650 ; return 0; }
15651 EOF
15652 if { (eval echo configure:15653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15653   rm -rf conftest*
15654   eval "ac_cv_func__doprnt=yes"
15655 else
15656   echo "configure: failed program was:" >&5
15657   cat conftest.$ac_ext >&5
15658   rm -rf conftest*
15659   eval "ac_cv_func__doprnt=no"
15660 fi
15661 rm -f conftest*
15662 fi
15663
15664 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15665   echo "$ac_t""yes" 1>&6
15666   cat >> confdefs.h <<\EOF
15667 #define HAVE_DOPRNT 1
15668 EOF
15669
15670 else
15671   echo "$ac_t""no" 1>&6
15672 fi
15673
15674 fi
15675
15676
15677 if test $ac_cv_func_vprintf = yes ; then
15678                 for ac_func in vsnprintf vsprintf
15679 do
15680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15681 echo "configure:15682: checking for $ac_func" >&5
15682 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15683   echo $ac_n "(cached) $ac_c" 1>&6
15684 else
15685   cat > conftest.$ac_ext <<EOF
15686 #line 15687 "configure"
15687 #include "confdefs.h"
15688 /* System header to define __stub macros and hopefully few prototypes,
15689     which can conflict with char $ac_func(); below.  */
15690 #include <assert.h>
15691 /* Override any gcc2 internal prototype to avoid an error.  */
15692 /* We use char because int might match the return type of a gcc2
15693     builtin and then its argument prototype would still apply.  */
15694 char $ac_func();
15695 char (*f)();
15696
15697 int main() {
15698
15699 /* The GNU C library defines this for functions which it implements
15700     to always fail with ENOSYS.  Some functions are actually named
15701     something starting with __ and the normal name is an alias.  */
15702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15703 choke me
15704 #else
15705 f = $ac_func;
15706 #endif
15707
15708 ; return 0; }
15709 EOF
15710 if { (eval echo configure:15711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15711   rm -rf conftest*
15712   eval "ac_cv_func_$ac_func=yes"
15713 else
15714   echo "configure: failed program was:" >&5
15715   cat conftest.$ac_ext >&5
15716   rm -rf conftest*
15717   eval "ac_cv_func_$ac_func=no"
15718 fi
15719 rm -f conftest*
15720 fi
15721
15722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15723   echo "$ac_t""yes" 1>&6
15724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15725   cat >> confdefs.h <<EOF
15726 #define $ac_tr_func 1
15727 EOF
15728  
15729 else
15730   echo "$ac_t""no" 1>&6
15731 fi
15732 done
15733
15734 fi
15735
15736 for ac_func in \
15737         bcopy                   \
15738         closesocket             \
15739         chroot                  \
15740         endgrent                \
15741         endpwent                \
15742         flock                   \
15743         getdtablesize   \
15744         getgrgid                \
15745         gethostname             \
15746         getpass                 \
15747         getpassphrase   \
15748         getpwuid                \
15749         getpwnam                \
15750         getspnam                \
15751         gettimeofday    \
15752         initgroups              \
15753         lockf                   \
15754         memcpy                  \
15755         memmove                 \
15756         mkstemp                 \
15757         pipe                    \
15758         read                    \
15759         recv                    \
15760         recvfrom                \
15761         setpwfile               \
15762         setgid                  \
15763         setegid                 \
15764         setsid                  \
15765         setuid                  \
15766         seteuid                 \
15767         sigaction               \
15768         signal                  \
15769         sigset                  \
15770         snprintf                \
15771         strdup                  \
15772         strerror                \
15773         strpbrk                 \
15774         strrchr                 \
15775         strsep                  \
15776         strstr                  \
15777         strtol                  \
15778         strtoul                 \
15779         strspn                  \
15780         sysconf                 \
15781         waitpid                 \
15782         wait4                   \
15783         write                   \
15784         send                    \
15785         sendto                  \
15786
15787 do
15788 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15789 echo "configure:15790: checking for $ac_func" >&5
15790 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15791   echo $ac_n "(cached) $ac_c" 1>&6
15792 else
15793   cat > conftest.$ac_ext <<EOF
15794 #line 15795 "configure"
15795 #include "confdefs.h"
15796 /* System header to define __stub macros and hopefully few prototypes,
15797     which can conflict with char $ac_func(); below.  */
15798 #include <assert.h>
15799 /* Override any gcc2 internal prototype to avoid an error.  */
15800 /* We use char because int might match the return type of a gcc2
15801     builtin and then its argument prototype would still apply.  */
15802 char $ac_func();
15803 char (*f)();
15804
15805 int main() {
15806
15807 /* The GNU C library defines this for functions which it implements
15808     to always fail with ENOSYS.  Some functions are actually named
15809     something starting with __ and the normal name is an alias.  */
15810 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15811 choke me
15812 #else
15813 f = $ac_func;
15814 #endif
15815
15816 ; return 0; }
15817 EOF
15818 if { (eval echo configure:15819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15819   rm -rf conftest*
15820   eval "ac_cv_func_$ac_func=yes"
15821 else
15822   echo "configure: failed program was:" >&5
15823   cat conftest.$ac_ext >&5
15824   rm -rf conftest*
15825   eval "ac_cv_func_$ac_func=no"
15826 fi
15827 rm -f conftest*
15828 fi
15829
15830 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15831   echo "$ac_t""yes" 1>&6
15832     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15833   cat >> confdefs.h <<EOF
15834 #define $ac_tr_func 1
15835 EOF
15836  
15837 else
15838   echo "$ac_t""no" 1>&6
15839 fi
15840 done
15841
15842
15843 for ac_func in getopt tempnam
15844 do
15845 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15846 echo "configure:15847: checking for $ac_func" >&5
15847 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15848   echo $ac_n "(cached) $ac_c" 1>&6
15849 else
15850   cat > conftest.$ac_ext <<EOF
15851 #line 15852 "configure"
15852 #include "confdefs.h"
15853 /* System header to define __stub macros and hopefully few prototypes,
15854     which can conflict with char $ac_func(); below.  */
15855 #include <assert.h>
15856 /* Override any gcc2 internal prototype to avoid an error.  */
15857 /* We use char because int might match the return type of a gcc2
15858     builtin and then its argument prototype would still apply.  */
15859 char $ac_func();
15860 char (*f)();
15861
15862 int main() {
15863
15864 /* The GNU C library defines this for functions which it implements
15865     to always fail with ENOSYS.  Some functions are actually named
15866     something starting with __ and the normal name is an alias.  */
15867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15868 choke me
15869 #else
15870 f = $ac_func;
15871 #endif
15872
15873 ; return 0; }
15874 EOF
15875 if { (eval echo configure:15876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15876   rm -rf conftest*
15877   eval "ac_cv_func_$ac_func=yes"
15878 else
15879   echo "configure: failed program was:" >&5
15880   cat conftest.$ac_ext >&5
15881   rm -rf conftest*
15882   eval "ac_cv_func_$ac_func=no"
15883 fi
15884 rm -f conftest*
15885 fi
15886
15887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15888   echo "$ac_t""yes" 1>&6
15889     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15890   cat >> confdefs.h <<EOF
15891 #define $ac_tr_func 1
15892 EOF
15893  
15894 else
15895   echo "$ac_t""no" 1>&6
15896 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15897 fi
15898 done
15899
15900
15901
15902 if test "$ac_cv_func_getopt" != yes; then
15903     LIBSRCS="$LIBSRCS getopt.c"
15904 fi
15905
15906 if test "$ac_cv_func_tempnam" != yes; then
15907     LIBSRCS="$LIBSRCS tempnam.c"
15908 fi
15909
15910 # Check Configuration
15911 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15912 echo "configure:15913: checking declaration of sys_errlist" >&5
15913 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15914   echo $ac_n "(cached) $ac_c" 1>&6
15915 else
15916   
15917         cat > conftest.$ac_ext <<EOF
15918 #line 15919 "configure"
15919 #include "confdefs.h"
15920
15921 #include <stdio.h>
15922 #include <sys/types.h>
15923 #include <errno.h>
15924 #ifdef WINNT
15925 #include <stdlib.h>
15926 #endif 
15927 int main() {
15928 char *c = (char *) *sys_errlist
15929 ; return 0; }
15930 EOF
15931 if { (eval echo configure:15932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15932   rm -rf conftest*
15933   ol_cv_dcl_sys_errlist=yes
15934         ol_cv_have_sys_errlist=yes
15935 else
15936   echo "configure: failed program was:" >&5
15937   cat conftest.$ac_ext >&5
15938   rm -rf conftest*
15939   ol_cv_dcl_sys_errlist=no
15940 fi
15941 rm -f conftest*
15942 fi
15943
15944 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15945 #
15946 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15947 if test $ol_cv_dcl_sys_errlist = no ; then
15948         cat >> confdefs.h <<\EOF
15949 #define DECL_SYS_ERRLIST 1
15950 EOF
15951
15952
15953         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15954 echo "configure:15955: checking existence of sys_errlist" >&5
15955 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15956   echo $ac_n "(cached) $ac_c" 1>&6
15957 else
15958   
15959                 cat > conftest.$ac_ext <<EOF
15960 #line 15961 "configure"
15961 #include "confdefs.h"
15962 #include <errno.h>
15963 int main() {
15964 char *c = (char *) *sys_errlist
15965 ; return 0; }
15966 EOF
15967 if { (eval echo configure:15968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15968   rm -rf conftest*
15969   ol_cv_have_sys_errlist=yes
15970 else
15971   echo "configure: failed program was:" >&5
15972   cat conftest.$ac_ext >&5
15973   rm -rf conftest*
15974   ol_cv_have_sys_errlist=no
15975 fi
15976 rm -f conftest*
15977 fi
15978
15979 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15980 fi
15981 if test $ol_cv_have_sys_errlist = yes ; then
15982         cat >> confdefs.h <<\EOF
15983 #define HAVE_SYS_ERRLIST 1
15984 EOF
15985
15986 fi
15987
15988
15989
15990 if test "$ol_enable_debug" != no ; then
15991         cat >> confdefs.h <<\EOF
15992 #define LDAP_DEBUG 1
15993 EOF
15994
15995 fi
15996 if test "$ol_enable_syslog" = yes ; then
15997         cat >> confdefs.h <<\EOF
15998 #define LDAP_SYSLOG 1
15999 EOF
16000
16001 fi
16002 if test "$ol_enable_cache" = no ; then
16003         cat >> confdefs.h <<\EOF
16004 #define LDAP_NOCACHE 1
16005 EOF
16006
16007 fi
16008 if test "$ol_link_kbind" != no ; then
16009         cat >> confdefs.h <<\EOF
16010 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16011 EOF
16012
16013 fi
16014 if test "$ol_enable_proctitle" != no ; then
16015         cat >> confdefs.h <<\EOF
16016 #define LDAP_PROCTITLE 1
16017 EOF
16018
16019 fi
16020 if test "$ol_enable_referrals" != no ; then
16021         cat >> confdefs.h <<\EOF
16022 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16023 EOF
16024
16025 fi
16026 if test "$ol_enable_local" != no; then
16027         cat >> confdefs.h <<\EOF
16028 #define LDAP_PF_LOCAL 1
16029 EOF
16030
16031 fi
16032 if test "$ol_link_ipv6" != no; then
16033         cat >> confdefs.h <<\EOF
16034 #define LDAP_PF_INET6 1
16035 EOF
16036
16037 fi
16038 if test "$ol_enable_cleartext" != no ; then
16039         cat >> confdefs.h <<\EOF
16040 #define SLAPD_CLEARTEXT 1
16041 EOF
16042
16043 fi
16044 if test "$ol_enable_crypt" != no ; then
16045         cat >> confdefs.h <<\EOF
16046 #define SLAPD_CRYPT 1
16047 EOF
16048
16049 fi
16050 if test "$ol_link_kpasswd" != no ; then
16051         cat >> confdefs.h <<\EOF
16052 #define SLAPD_KPASSWD 1
16053 EOF
16054
16055 fi
16056 if test "$ol_link_spasswd" != no ; then
16057         cat >> confdefs.h <<\EOF
16058 #define SLAPD_SPASSWD 1
16059 EOF
16060
16061 fi
16062 if test "$ol_enable_multimaster" != no ; then
16063         cat >> confdefs.h <<\EOF
16064 #define SLAPD_MULTIMASTER 1
16065 EOF
16066
16067 fi
16068 if test "$ol_enable_phonetic" != no ; then
16069         cat >> confdefs.h <<\EOF
16070 #define SLAPD_PHONETIC 1
16071 EOF
16072
16073 fi
16074 if test "$ol_enable_rlookups" != no ; then
16075         cat >> confdefs.h <<\EOF
16076 #define SLAPD_RLOOKUPS 1
16077 EOF
16078
16079 fi
16080 if test "$ol_enable_aci" != no ; then
16081         cat >> confdefs.h <<\EOF
16082 #define SLAPD_ACI_ENABLED 1
16083 EOF
16084
16085 fi
16086
16087 if test "$ol_link_modules" != no ; then
16088         cat >> confdefs.h <<\EOF
16089 #define SLAPD_MODULES 1
16090 EOF
16091
16092         BUILD_SLAPD=yes
16093         SLAPD_MODULES_LDFLAGS="-dlopen self"
16094 fi
16095
16096 if test "$ol_enable_bdb" != no ; then
16097         cat >> confdefs.h <<\EOF
16098 #define SLAPD_BDB 1
16099 EOF
16100
16101         BUILD_SLAPD=yes
16102         BUILD_BDB=yes
16103         if test "$ol_with_bdb_module" != static ; then
16104                 cat >> confdefs.h <<\EOF
16105 #define SLAPD_BDB_DYNAMIC 1
16106 EOF
16107
16108                 BUILD_BDB=mod
16109                 BUILD_BDB_DYNAMIC=shared
16110                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16111         fi
16112 fi
16113
16114 if test "$ol_link_dnssrv" != no ; then
16115         cat >> confdefs.h <<\EOF
16116 #define SLAPD_DNSSRV 1
16117 EOF
16118
16119         BUILD_SLAPD=yes
16120         BUILD_DNSSRV=yes
16121         if test "$ol_with_dnssrv_module" != static ; then
16122                 cat >> confdefs.h <<\EOF
16123 #define SLAPD_DNSSRV_DYNAMIC 1
16124 EOF
16125
16126                 BUILD_DNSSRV=mod
16127                 BUILD_DNSSRV_DYNAMIC=shared
16128                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16129         fi
16130 fi
16131
16132 if test "$ol_enable_ldap" != no ; then
16133         cat >> confdefs.h <<\EOF
16134 #define SLAPD_LDAP 1
16135 EOF
16136
16137         BUILD_SLAPD=yes
16138         BUILD_LDAP=yes
16139         if test "$ol_with_ldap_module" != static ; then
16140                 cat >> confdefs.h <<\EOF
16141 #define SLAPD_LDAP_DYNAMIC 1
16142 EOF
16143
16144                 BUILD_LDAP=mod
16145                 BUILD_LDAP_DYNAMIC=shared
16146                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16147         fi
16148 fi
16149
16150 if test "$ol_link_ldbm" != no ; then
16151         cat >> confdefs.h <<\EOF
16152 #define SLAPD_LDBM 1
16153 EOF
16154
16155         BUILD_SLAPD=yes
16156         BUILD_LDBM=yes
16157         if test "$ol_with_ldbm_module" != static ; then
16158                 cat >> confdefs.h <<\EOF
16159 #define SLAPD_LDBM_DYNAMIC 1
16160 EOF
16161
16162                 BUILD_LDBM=mod
16163                 BUILD_LDBM_DYNAMIC=shared
16164                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16165         fi
16166 fi
16167
16168 if test "$ol_enable_passwd" != no ; then
16169         cat >> confdefs.h <<\EOF
16170 #define SLAPD_PASSWD 1
16171 EOF
16172
16173         BUILD_SLAPD=yes
16174         BUILD_PASSWD=yes
16175         if test "$ol_with_passwd_module" != static ; then
16176                 cat >> confdefs.h <<\EOF
16177 #define SLAPD_PASSWD_DYNAMIC 1
16178 EOF
16179
16180                 BUILD_PASSWD=mod
16181                 BUILD_PASSWD_DYNAMIC=shared
16182                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16183         fi
16184 fi
16185
16186 if test "$ol_link_perl" != no ; then
16187         cat >> confdefs.h <<\EOF
16188 #define SLAPD_PERL 1
16189 EOF
16190
16191         BUILD_SLAPD=yes
16192         BUILD_PERL=yes
16193         if test "$ol_with_perl_module" != static ; then
16194                 cat >> confdefs.h <<\EOF
16195 #define SLAPD_PERL_DYNAMIC 1
16196 EOF
16197
16198                 BUILD_PERL=mod
16199                 BUILD_PERL_DYNAMIC=shared
16200                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16201         fi
16202 fi
16203
16204 if test "$ol_enable_shell" != no ; then
16205         cat >> confdefs.h <<\EOF
16206 #define SLAPD_SHELL 1
16207 EOF
16208
16209         BUILD_SLAPD=yes
16210         BUILD_SHELL=yes
16211         if test "$ol_with_shell_module" != static ; then
16212                 cat >> confdefs.h <<\EOF
16213 #define SLAPD_SHELL_DYNAMIC 1
16214 EOF
16215
16216                 BUILD_SHELL=mod
16217                 BUILD_SHELL_DYNAMIC=shared
16218                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16219         fi
16220 fi
16221
16222 if test "$ol_enable_tcl" != no ; then
16223         cat >> confdefs.h <<\EOF
16224 #define SLAPD_TCL 1
16225 EOF
16226
16227         BUILD_SLAPD=yes
16228         BUILD_TCL=yes
16229         if test "$ol_with_tcl_module" != static; then
16230                 cat >> confdefs.h <<\EOF
16231 #define SLAPD_TCL_DYNAMIC 1
16232 EOF
16233
16234                 BUILD_TCL=mod
16235                 BUILD_TCL_DYNAMIC=shared
16236                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16237         fi
16238 fi
16239
16240 if test "$ol_link_sql" != no ; then
16241         cat >> confdefs.h <<\EOF
16242 #define SLAPD_SQL 1
16243 EOF
16244
16245         BUILD_SLAPD=yes
16246         BUILD_SQL=yes
16247         if test "$ol_with_sql_module" != static; then
16248                 cat >> confdefs.h <<\EOF
16249 #define SLAPD_SQL_DYNAMIC 1
16250 EOF
16251
16252                 BUILD_SQL=mod
16253                 BUILD_SQL_DYNAMIC=shared
16254                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16255         fi
16256 fi
16257
16258 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16259         $BUILD_SLAPD = yes ; then
16260         BUILD_SLURPD=yes
16261 fi
16262
16263
16264 if test "$LINK_BINS_DYNAMIC" = yes; then
16265     LIB_LINKAGE=DYN
16266     LT_LIB_LINKAGE=shared
16267 else
16268     LIB_LINKAGE=STAT
16269     LT_LIB_LINKAGE=static
16270 fi
16271
16272 if test "$ac_cv_mingw32" = yes ; then
16273     PLAT=NT
16274     DYN_EXT=dll
16275 else
16276     PLAT=UNIX
16277     DYN_EXT=so
16278 fi
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288   
16289   
16290   
16291   
16292   
16293   
16294   
16295   
16296   
16297   
16298   
16299   
16300   
16301   
16302   
16303   
16304   
16305   
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341 trap '' 1 2 15
16342
16343 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16344
16345 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16346 # Let make expand exec_prefix.
16347 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16348
16349 # Any assignment to VPATH causes Sun make to only execute
16350 # the first set of double-colon rules, so remove it if not needed.
16351 # If there is a colon in the path, we need to keep it.
16352 if test "x$srcdir" = x.; then
16353   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16354 fi
16355
16356 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16357
16358 DEFS=-DHAVE_CONFIG_H
16359
16360 # Without the "./", some shells look in PATH for config.status.
16361 : ${CONFIG_STATUS=./config.status}
16362
16363 echo creating $CONFIG_STATUS
16364 rm -f $CONFIG_STATUS
16365 cat > $CONFIG_STATUS <<EOF
16366 #! /bin/sh
16367 # Generated automatically by configure.
16368 # Run this file to recreate the current configuration.
16369 # This directory was configured as follows,
16370 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16371 #
16372 # $0 $ac_configure_args
16373 #
16374 # Compiler output produced by configure, useful for debugging
16375 # configure, is in ./config.log if it exists.
16376
16377 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16378 for ac_option
16379 do
16380   case "\$ac_option" in
16381   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16382     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16383     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16384   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16385     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16386     exit 0 ;;
16387   -help | --help | --hel | --he | --h)
16388     echo "\$ac_cs_usage"; exit 0 ;;
16389   *) echo "\$ac_cs_usage"; exit 1 ;;
16390   esac
16391 done
16392
16393 ac_given_srcdir=$srcdir
16394 ac_given_INSTALL="$INSTALL"
16395
16396 trap 'rm -fr `echo "\
16397 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16398 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16399 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16400 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16401 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16402 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16403 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16404 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16405 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16406 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16407 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16408 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16409 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16410 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16411 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16412 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16413 include/Makefile:build/top.mk:include/Makefile.in \
16414 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16415 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16416 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16417 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16418 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16419 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16420 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16421 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16422 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16423 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16424 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16425 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16426 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16427 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16428 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16429 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16430 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16431 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16432 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16433 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16434 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16435 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16436 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16437 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16438 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16439 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16440 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16441 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16442  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16443 EOF
16444 cat >> $CONFIG_STATUS <<EOF
16445
16446 # Protect against being on the right side of a sed subst in config.status.
16447 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16448  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16449 $ac_vpsub
16450 $extrasub
16451 s%@SHELL@%$SHELL%g
16452 s%@CFLAGS@%$CFLAGS%g
16453 s%@CPPFLAGS@%$CPPFLAGS%g
16454 s%@CXXFLAGS@%$CXXFLAGS%g
16455 s%@FFLAGS@%$FFLAGS%g
16456 s%@DEFS@%$DEFS%g
16457 s%@LDFLAGS@%$LDFLAGS%g
16458 s%@LIBS@%$LIBS%g
16459 s%@exec_prefix@%$exec_prefix%g
16460 s%@prefix@%$prefix%g
16461 s%@program_transform_name@%$program_transform_name%g
16462 s%@bindir@%$bindir%g
16463 s%@sbindir@%$sbindir%g
16464 s%@libexecdir@%$libexecdir%g
16465 s%@datadir@%$datadir%g
16466 s%@sysconfdir@%$sysconfdir%g
16467 s%@sharedstatedir@%$sharedstatedir%g
16468 s%@localstatedir@%$localstatedir%g
16469 s%@libdir@%$libdir%g
16470 s%@includedir@%$includedir%g
16471 s%@oldincludedir@%$oldincludedir%g
16472 s%@infodir@%$infodir%g
16473 s%@mandir@%$mandir%g
16474 s%@host@%$host%g
16475 s%@host_alias@%$host_alias%g
16476 s%@host_cpu@%$host_cpu%g
16477 s%@host_vendor@%$host_vendor%g
16478 s%@host_os@%$host_os%g
16479 s%@target@%$target%g
16480 s%@target_alias@%$target_alias%g
16481 s%@target_cpu@%$target_cpu%g
16482 s%@target_vendor@%$target_vendor%g
16483 s%@target_os@%$target_os%g
16484 s%@build@%$build%g
16485 s%@build_alias@%$build_alias%g
16486 s%@build_cpu@%$build_cpu%g
16487 s%@build_vendor@%$build_vendor%g
16488 s%@build_os@%$build_os%g
16489 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16490 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16491 s%@INSTALL_DATA@%$INSTALL_DATA%g
16492 s%@PACKAGE@%$PACKAGE%g
16493 s%@VERSION@%$VERSION%g
16494 s%@ACLOCAL@%$ACLOCAL%g
16495 s%@AUTOCONF@%$AUTOCONF%g
16496 s%@AUTOMAKE@%$AUTOMAKE%g
16497 s%@AUTOHEADER@%$AUTOHEADER%g
16498 s%@MAKEINFO@%$MAKEINFO%g
16499 s%@install_sh@%$install_sh%g
16500 s%@AMTAR@%$AMTAR%g
16501 s%@AWK@%$AWK%g
16502 s%@AMTARFLAGS@%$AMTARFLAGS%g
16503 s%@SET_MAKE@%$SET_MAKE%g
16504 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16505 s%@top_builddir@%$top_builddir%g
16506 s%@ldap_subdir@%$ldap_subdir%g
16507 s%@CC@%$CC%g
16508 s%@RANLIB@%$RANLIB%g
16509 s%@LN_S@%$LN_S%g
16510 s%@DLLTOOL@%$DLLTOOL%g
16511 s%@AS@%$AS%g
16512 s%@OBJDUMP@%$OBJDUMP%g
16513 s%@LIBTOOL@%$LIBTOOL%g
16514 s%@LN_H@%$LN_H%g
16515 s%@SENDMAIL@%$SENDMAIL%g
16516 s%@EDITOR@%$EDITOR%g
16517 s%@FINGER@%$FINGER%g
16518 s%@PERLBIN@%$PERLBIN%g
16519 s%@CPP@%$CPP%g
16520 s%@EXEEXT@%$EXEEXT%g
16521 s%@OBJEXT@%$OBJEXT%g
16522 s%@OL_MKDEP@%$OL_MKDEP%g
16523 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16524 s%@LIBOBJS@%$LIBOBJS%g
16525 s%@LIBSRCS@%$LIBSRCS%g
16526 s%@PLAT@%$PLAT%g
16527 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16528 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16529 s%@DYN_EXT@%$DYN_EXT%g
16530 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16531 s%@BUILD_BDB@%$BUILD_BDB%g
16532 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16533 s%@BUILD_LDAP@%$BUILD_LDAP%g
16534 s%@BUILD_LDBM@%$BUILD_LDBM%g
16535 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16536 s%@BUILD_PERL@%$BUILD_PERL%g
16537 s%@BUILD_SHELL@%$BUILD_SHELL%g
16538 s%@BUILD_SQL@%$BUILD_SQL%g
16539 s%@BUILD_TCL@%$BUILD_TCL%g
16540 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16541 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16542 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16543 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16544 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16545 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16546 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16547 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16548 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16549 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16550 s%@LDAP_LIBS@%$LDAP_LIBS%g
16551 s%@LDIF_LIBS@%$LDIF_LIBS%g
16552 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16553 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16554 s%@LDBM_LIBS@%$LDBM_LIBS%g
16555 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16556 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16557 s%@WRAP_LIBS@%$WRAP_LIBS%g
16558 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16559 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16560 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16561 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16562 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16563 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16564 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16565 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16566 s%@KRB4_LIBS@%$KRB4_LIBS%g
16567 s%@KRB5_LIBS@%$KRB5_LIBS%g
16568 s%@READLINE_LIBS@%$READLINE_LIBS%g
16569 s%@SASL_LIBS@%$SASL_LIBS%g
16570 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16571 s%@TLS_LIBS@%$TLS_LIBS%g
16572 s%@MODULES_LIBS@%$MODULES_LIBS%g
16573 s%@AUTH_LIBS@%$AUTH_LIBS%g
16574 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16575 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16576 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16577
16578 CEOF
16579 EOF
16580
16581 cat >> $CONFIG_STATUS <<\EOF
16582
16583 # Split the substitutions into bite-sized pieces for seds with
16584 # small command number limits, like on Digital OSF/1 and HP-UX.
16585 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16586 ac_file=1 # Number of current file.
16587 ac_beg=1 # First line for current file.
16588 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16589 ac_more_lines=:
16590 ac_sed_cmds=""
16591 while $ac_more_lines; do
16592   if test $ac_beg -gt 1; then
16593     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16594   else
16595     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16596   fi
16597   if test ! -s conftest.s$ac_file; then
16598     ac_more_lines=false
16599     rm -f conftest.s$ac_file
16600   else
16601     if test -z "$ac_sed_cmds"; then
16602       ac_sed_cmds="sed -f conftest.s$ac_file"
16603     else
16604       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16605     fi
16606     ac_file=`expr $ac_file + 1`
16607     ac_beg=$ac_end
16608     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16609   fi
16610 done
16611 if test -z "$ac_sed_cmds"; then
16612   ac_sed_cmds=cat
16613 fi
16614 EOF
16615
16616 cat >> $CONFIG_STATUS <<EOF
16617
16618 CONFIG_FILES=\${CONFIG_FILES-"\
16619 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16620 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16621 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16622 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16623 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16624 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16625 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16626 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16627 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16628 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16629 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16630 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16631 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16632 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16633 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16634 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16635 include/Makefile:build/top.mk:include/Makefile.in \
16636 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16637 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16638 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16639 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16640 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16641 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16642 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16643 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16644 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16645 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16646 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16647 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16648 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16649 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16650 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16651 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16652 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16653 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16654 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16655 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16656 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16657 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16658 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16659 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16660 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16661 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16662 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16663 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16664 "}
16665 EOF
16666 cat >> $CONFIG_STATUS <<\EOF
16667 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16668   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16669   case "$ac_file" in
16670   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16671        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16672   *) ac_file_in="${ac_file}.in" ;;
16673   esac
16674
16675   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16676
16677   # Remove last slash and all that follows it.  Not all systems have dirname.
16678   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16679   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16680     # The file is in a subdirectory.
16681     test ! -d "$ac_dir" && mkdir "$ac_dir"
16682     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16683     # A "../" for each directory in $ac_dir_suffix.
16684     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16685   else
16686     ac_dir_suffix= ac_dots=
16687   fi
16688
16689   case "$ac_given_srcdir" in
16690   .)  srcdir=.
16691       if test -z "$ac_dots"; then top_srcdir=.
16692       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16693   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16694   *) # Relative path.
16695     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16696     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16697   esac
16698
16699   case "$ac_given_INSTALL" in
16700   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16701   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16702   esac
16703
16704   echo creating "$ac_file"
16705   rm -f "$ac_file"
16706   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16707   case "$ac_file" in
16708   *[Mm]akefile*) ac_comsub="1i\\
16709 # $configure_input" ;;
16710   *) ac_comsub= ;;
16711   esac
16712
16713   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16714   sed -e "$ac_comsub
16715 s%@configure_input@%$configure_input%g
16716 s%@srcdir@%$srcdir%g
16717 s%@top_srcdir@%$top_srcdir%g
16718 s%@INSTALL@%$INSTALL%g
16719 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16720 fi; done
16721 rm -f conftest.s*
16722
16723 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16724 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16725 #
16726 # ac_d sets the value in "#define NAME VALUE" lines.
16727 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16728 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16729 ac_dC='\3'
16730 ac_dD='%g'
16731 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16732 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16733 ac_uB='\([      ]\)%\1#\2define\3'
16734 ac_uC=' '
16735 ac_uD='\4%g'
16736 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16737 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16738 ac_eB='$%\1#\2define\3'
16739 ac_eC=' '
16740 ac_eD='%g'
16741
16742 if test "${CONFIG_HEADERS+set}" != set; then
16743 EOF
16744 cat >> $CONFIG_STATUS <<EOF
16745   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16746 EOF
16747 cat >> $CONFIG_STATUS <<\EOF
16748 fi
16749 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16750   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16751   case "$ac_file" in
16752   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16753        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16754   *) ac_file_in="${ac_file}.in" ;;
16755   esac
16756
16757   echo creating $ac_file
16758
16759   rm -f conftest.frag conftest.in conftest.out
16760   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16761   cat $ac_file_inputs > conftest.in
16762
16763 EOF
16764
16765 # Transform confdefs.h into a sed script conftest.vals that substitutes
16766 # the proper values into config.h.in to produce config.h.  And first:
16767 # Protect against being on the right side of a sed subst in config.status.
16768 # Protect against being in an unquoted here document in config.status.
16769 rm -f conftest.vals
16770 cat > conftest.hdr <<\EOF
16771 s/[\\&%]/\\&/g
16772 s%[\\$`]%\\&%g
16773 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16774 s%ac_d%ac_u%gp
16775 s%ac_u%ac_e%gp
16776 EOF
16777 sed -n -f conftest.hdr confdefs.h > conftest.vals
16778 rm -f conftest.hdr
16779
16780 # This sed command replaces #undef with comments.  This is necessary, for
16781 # example, in the case of _POSIX_SOURCE, which is predefined and required
16782 # on some systems where configure will not decide to define it.
16783 cat >> conftest.vals <<\EOF
16784 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16785 EOF
16786
16787 # Break up conftest.vals because some shells have a limit on
16788 # the size of here documents, and old seds have small limits too.
16789
16790 rm -f conftest.tail
16791 while :
16792 do
16793   ac_lines=`grep -c . conftest.vals`
16794   # grep -c gives empty output for an empty file on some AIX systems.
16795   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16796   # Write a limited-size here document to conftest.frag.
16797   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16798   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16799   echo 'CEOF
16800   sed -f conftest.frag conftest.in > conftest.out
16801   rm -f conftest.in
16802   mv conftest.out conftest.in
16803 ' >> $CONFIG_STATUS
16804   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16805   rm -f conftest.vals
16806   mv conftest.tail conftest.vals
16807 done
16808 rm -f conftest.vals
16809
16810 cat >> $CONFIG_STATUS <<\EOF
16811   rm -f conftest.frag conftest.h
16812   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16813   cat conftest.in >> conftest.h
16814   rm -f conftest.in
16815   if cmp -s $ac_file conftest.h 2>/dev/null; then
16816     echo "$ac_file is unchanged"
16817     rm -f conftest.h
16818   else
16819     # Remove last slash and all that follows it.  Not all systems have dirname.
16820       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16821       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16822       # The file is in a subdirectory.
16823       test ! -d "$ac_dir" && mkdir "$ac_dir"
16824     fi
16825     rm -f $ac_file
16826     mv conftest.h $ac_file
16827   fi
16828 fi; done
16829
16830 EOF
16831 cat >> $CONFIG_STATUS <<EOF
16832
16833 EOF
16834 cat >> $CONFIG_STATUS <<\EOF
16835
16836 date > stamp-h
16837 echo Please \"make depend\" to build dependencies
16838
16839 exit 0
16840 EOF
16841 chmod +x $CONFIG_STATUS
16842 rm -fr confdefs* $ac_clean_files
16843 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16844