]> git.sur5r.net Git - openldap/blob - configure
abd0f289cdf73f9eb2fd64c97ddb6880c603723c
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.351 2001/01/22 06:51:26 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 (experimental) [no]"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals (experimental) [no]"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (deprecated) [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-aci          enable per-object ACIs (experimental) [no]"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords [yes]"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords [no]"
71 ac_help="$ac_help
72     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
73 ac_help="$ac_help
74     --enable-kpasswd      enable Kerberos password verification [no]"
75 ac_help="$ac_help
76     --enable-lmpasswd     enable LAN Manager passwords [no]"
77 ac_help="$ac_help
78     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
79 ac_help="$ac_help
80     --enable-modules      enable dynamic module support [no]"
81 ac_help="$ac_help
82     --enable-phonetic     enable phonetic/soundex [no]"
83 ac_help="$ac_help
84     --enable-rlookups     enable reverse lookups [no]"
85 ac_help="$ac_help
86     --enable-slp          enable SLPv2 support [no]"
87 ac_help="$ac_help
88     --enable-wrappers     enable tcp wrapper support [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend [no]"
91 ac_help="$ac_help
92     --with-bdb-module     module type [static]"
93 ac_help="$ac_help
94     --enable-dnssrv       enable dnssrv backend [no]"
95 ac_help="$ac_help
96     --with-dnssrv-module  module type [static]"
97 ac_help="$ac_help
98     --enable-ldap         enable ldap backend [no]"
99 ac_help="$ac_help
100     --with-ldap-module    module type [static]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend [yes]"
103 ac_help="$ac_help
104     --with-ldbm-api       with LDBM API [auto]"
105 ac_help="$ac_help
106     --with-ldbm-module    module type [static]"
107 ac_help="$ac_help
108     --with-ldbm-type      use LDBM type [auto]"
109 ac_help="$ac_help
110     --enable-passwd       enable passwd backend [no]"
111 ac_help="$ac_help
112     --with-passwd-module  module type [static]"
113 ac_help="$ac_help
114     --enable-perl         enable perl backend [no]"
115 ac_help="$ac_help
116     --with-perl-module    module type [static]"
117 ac_help="$ac_help
118     --enable-shell        enable shell backend [no]"
119 ac_help="$ac_help
120     --with-shell-module   module type [static]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend [no]"
123 ac_help="$ac_help
124     --with-sql-module     module type [static]"
125 ac_help="$ac_help
126     --enable-tcl          enable tcl backend [no]"
127 ac_help="$ac_help
128     --with-tcl-module     module type [static]"
129 ac_help="$ac_help
130 SLURPD (Replication Daemon) Options:"
131 ac_help="$ac_help
132   --enable-slurpd         enable building slurpd [auto]"
133 ac_help="$ac_help
134 Library Generation & Linking Options"
135 ac_help="$ac_help
136   --enable-static[=PKGS]  build static libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-shared[=PKGS]  build shared libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
141 ac_help="$ac_help
142   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
143 ac_help="$ac_help
144   --disable-libtool-lock  avoid locking (might break parallel builds)"
145
146 # Initialize some variables set by options.
147 # The variables have the same names as the options, with
148 # dashes changed to underlines.
149 build=NONE
150 cache_file=./config.cache
151 exec_prefix=NONE
152 host=NONE
153 no_create=
154 nonopt=NONE
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 target=NONE
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167 bindir='${exec_prefix}/bin'
168 sbindir='${exec_prefix}/sbin'
169 libexecdir='${exec_prefix}/libexec'
170 datadir='${prefix}/share'
171 sysconfdir='${prefix}/etc'
172 sharedstatedir='${prefix}/com'
173 localstatedir='${prefix}/var'
174 libdir='${exec_prefix}/lib'
175 includedir='${prefix}/include'
176 oldincludedir='/usr/include'
177 infodir='${prefix}/info'
178 mandir='${prefix}/man'
179
180 # Initialize some other variables.
181 subdirs=
182 MFLAGS= MAKEFLAGS=
183 SHELL=${CONFIG_SHELL-/bin/sh}
184 # Maximum number of lines to put in a shell here document.
185 ac_max_here_lines=12
186
187 ac_prev=
188 for ac_option
189 do
190
191   # If the previous option needs an argument, assign it.
192   if test -n "$ac_prev"; then
193     eval "$ac_prev=\$ac_option"
194     ac_prev=
195     continue
196   fi
197
198   case "$ac_option" in
199   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
200   *) ac_optarg= ;;
201   esac
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case "$ac_option" in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir="$ac_optarg" ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build="$ac_optarg" ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file="$ac_optarg" ;;
223
224   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
225     ac_prev=datadir ;;
226   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
227   | --da=*)
228     datadir="$ac_optarg" ;;
229
230   -disable-* | --disable-*)
231     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
232     # Reject names that are not valid shell variable names.
233     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
234       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
235     fi
236     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
237     eval "enable_${ac_feature}=no" ;;
238
239   -enable-* | --enable-*)
240     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
241     # Reject names that are not valid shell variable names.
242     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
243       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244     fi
245     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246     case "$ac_option" in
247       *=*) ;;
248       *) ac_optarg=yes ;;
249     esac
250     eval "enable_${ac_feature}='$ac_optarg'" ;;
251
252   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
253   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
254   | --exec | --exe | --ex)
255     ac_prev=exec_prefix ;;
256   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
257   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
258   | --exec=* | --exe=* | --ex=*)
259     exec_prefix="$ac_optarg" ;;
260
261   -gas | --gas | --ga | --g)
262     # Obsolete; use --with-gas.
263     with_gas=yes ;;
264
265   -help | --help | --hel | --he)
266     # Omit some internal or obsolete options to make the list less imposing.
267     # This message is too long to be a string in the A/UX 3.1 sh.
268     cat << EOF
269 Usage: configure [options] [host]
270 Options: [defaults in brackets after descriptions]
271 Configuration:
272   --cache-file=FILE       cache test results in FILE
273   --help                  print this message
274   --no-create             do not create output files
275   --quiet, --silent       do not print \`checking...' messages
276   --version               print the version of autoconf that created configure
277 Directory and file names:
278   --prefix=PREFIX         install architecture-independent files in PREFIX
279                           [$ac_default_prefix]
280   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
281                           [same as prefix]
282   --bindir=DIR            user executables in DIR [EPREFIX/bin]
283   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
284   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
285   --datadir=DIR           read-only architecture-independent data in DIR
286                           [PREFIX/share]
287   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
288   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
289                           [PREFIX/com]
290   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
291   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
292   --includedir=DIR        C header files in DIR [PREFIX/include]
293   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
294   --infodir=DIR           info documentation in DIR [PREFIX/info]
295   --mandir=DIR            man documentation in DIR [PREFIX/man]
296   --srcdir=DIR            find the sources in DIR [configure dir or ..]
297   --program-prefix=PREFIX prepend PREFIX to installed program names
298   --program-suffix=SUFFIX append SUFFIX to installed program names
299   --program-transform-name=PROGRAM
300                           run sed PROGRAM on installed program names
301 EOF
302     cat << EOF
303 Host type:
304   --build=BUILD           configure for building on BUILD [BUILD=HOST]
305   --host=HOST             configure for HOST [guessed]
306   --target=TARGET         configure for TARGET [TARGET=HOST]
307 Features and packages:
308   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
309   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
310   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
311   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
312   --x-includes=DIR        X include files are in DIR
313   --x-libraries=DIR       X library files are in DIR
314 EOF
315     if test -n "$ac_help"; then
316       echo "--enable and --with options recognized:$ac_help"
317     fi
318     exit 0 ;;
319
320   -host | --host | --hos | --ho)
321     ac_prev=host ;;
322   -host=* | --host=* | --hos=* | --ho=*)
323     host="$ac_optarg" ;;
324
325   -includedir | --includedir | --includedi | --included | --include \
326   | --includ | --inclu | --incl | --inc)
327     ac_prev=includedir ;;
328   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
329   | --includ=* | --inclu=* | --incl=* | --inc=*)
330     includedir="$ac_optarg" ;;
331
332   -infodir | --infodir | --infodi | --infod | --info | --inf)
333     ac_prev=infodir ;;
334   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
335     infodir="$ac_optarg" ;;
336
337   -libdir | --libdir | --libdi | --libd)
338     ac_prev=libdir ;;
339   -libdir=* | --libdir=* | --libdi=* | --libd=*)
340     libdir="$ac_optarg" ;;
341
342   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
343   | --libexe | --libex | --libe)
344     ac_prev=libexecdir ;;
345   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
346   | --libexe=* | --libex=* | --libe=*)
347     libexecdir="$ac_optarg" ;;
348
349   -localstatedir | --localstatedir | --localstatedi | --localstated \
350   | --localstate | --localstat | --localsta | --localst \
351   | --locals | --local | --loca | --loc | --lo)
352     ac_prev=localstatedir ;;
353   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
354   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
355   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
356     localstatedir="$ac_optarg" ;;
357
358   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
359     ac_prev=mandir ;;
360   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
361     mandir="$ac_optarg" ;;
362
363   -nfp | --nfp | --nf)
364     # Obsolete; use --without-fp.
365     with_fp=no ;;
366
367   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
368   | --no-cr | --no-c)
369     no_create=yes ;;
370
371   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
372   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
373     no_recursion=yes ;;
374
375   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
376   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
377   | --oldin | --oldi | --old | --ol | --o)
378     ac_prev=oldincludedir ;;
379   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
380   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
381   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
382     oldincludedir="$ac_optarg" ;;
383
384   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
385     ac_prev=prefix ;;
386   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
387     prefix="$ac_optarg" ;;
388
389   -program-prefix | --program-prefix | --program-prefi | --program-pref \
390   | --program-pre | --program-pr | --program-p)
391     ac_prev=program_prefix ;;
392   -program-prefix=* | --program-prefix=* | --program-prefi=* \
393   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
394     program_prefix="$ac_optarg" ;;
395
396   -program-suffix | --program-suffix | --program-suffi | --program-suff \
397   | --program-suf | --program-su | --program-s)
398     ac_prev=program_suffix ;;
399   -program-suffix=* | --program-suffix=* | --program-suffi=* \
400   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
401     program_suffix="$ac_optarg" ;;
402
403   -program-transform-name | --program-transform-name \
404   | --program-transform-nam | --program-transform-na \
405   | --program-transform-n | --program-transform- \
406   | --program-transform | --program-transfor \
407   | --program-transfo | --program-transf \
408   | --program-trans | --program-tran \
409   | --progr-tra | --program-tr | --program-t)
410     ac_prev=program_transform_name ;;
411   -program-transform-name=* | --program-transform-name=* \
412   | --program-transform-nam=* | --program-transform-na=* \
413   | --program-transform-n=* | --program-transform-=* \
414   | --program-transform=* | --program-transfor=* \
415   | --program-transfo=* | --program-transf=* \
416   | --program-trans=* | --program-tran=* \
417   | --progr-tra=* | --program-tr=* | --program-t=*)
418     program_transform_name="$ac_optarg" ;;
419
420   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
421   | -silent | --silent | --silen | --sile | --sil)
422     silent=yes ;;
423
424   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
425     ac_prev=sbindir ;;
426   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
427   | --sbi=* | --sb=*)
428     sbindir="$ac_optarg" ;;
429
430   -sharedstatedir | --sharedstatedir | --sharedstatedi \
431   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
432   | --sharedst | --shareds | --shared | --share | --shar \
433   | --sha | --sh)
434     ac_prev=sharedstatedir ;;
435   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
436   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
437   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
438   | --sha=* | --sh=*)
439     sharedstatedir="$ac_optarg" ;;
440
441   -site | --site | --sit)
442     ac_prev=site ;;
443   -site=* | --site=* | --sit=*)
444     site="$ac_optarg" ;;
445
446   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
447     ac_prev=srcdir ;;
448   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
449     srcdir="$ac_optarg" ;;
450
451   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
452   | --syscon | --sysco | --sysc | --sys | --sy)
453     ac_prev=sysconfdir ;;
454   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
455   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
456     sysconfdir="$ac_optarg" ;;
457
458   -target | --target | --targe | --targ | --tar | --ta | --t)
459     ac_prev=target ;;
460   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
461     target="$ac_optarg" ;;
462
463   -v | -verbose | --verbose | --verbos | --verbo | --verb)
464     verbose=yes ;;
465
466   -version | --version | --versio | --versi | --vers)
467     echo "configure generated by autoconf version 2.13.1"
468     exit 0 ;;
469
470   -with-* | --with-*)
471     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
472     # Reject names that are not valid shell variable names.
473     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
474       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
475     fi
476     ac_package=`echo $ac_package| sed 's/-/_/g'`
477     case "$ac_option" in
478       *=*) ;;
479       *) ac_optarg=yes ;;
480     esac
481     eval "with_${ac_package}='$ac_optarg'" ;;
482
483   -without-* | --without-*)
484     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
485     # Reject names that are not valid shell variable names.
486     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
487       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
488     fi
489     ac_package=`echo $ac_package| sed 's/-/_/g'`
490     eval "with_${ac_package}=no" ;;
491
492   --x)
493     # Obsolete; use --with-x.
494     with_x=yes ;;
495
496   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
497   | --x-incl | --x-inc | --x-in | --x-i)
498     ac_prev=x_includes ;;
499   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
500   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
501     x_includes="$ac_optarg" ;;
502
503   -x-libraries | --x-libraries | --x-librarie | --x-librari \
504   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
505     ac_prev=x_libraries ;;
506   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
507   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
508     x_libraries="$ac_optarg" ;;
509
510   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
511     ;;
512
513   *)
514     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
515       echo "configure: warning: $ac_option: invalid host type" 1>&2
516     fi
517     if test "x$nonopt" != xNONE; then
518       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
519     fi
520     nonopt="$ac_option"
521     ;;
522
523   esac
524 done
525
526 if test -n "$ac_prev"; then
527   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
528 fi
529
530 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
531
532 # File descriptor usage:
533 # 0 standard input
534 # 1 file creation
535 # 2 errors and warnings
536 # 3 some systems may open it to /dev/tty
537 # 4 used on the Kubota Titan
538 # 6 checking for... messages and results
539 # 5 compiler messages saved in config.log
540 if test "$silent" = yes; then
541   exec 6>/dev/null
542 else
543   exec 6>&1
544 fi
545 exec 5>./config.log
546
547 echo "\
548 This file contains any messages produced by compilers while
549 running configure, to aid debugging if configure makes a mistake.
550 " 1>&5
551
552 # Strip out --no-create and --no-recursion so they do not pile up.
553 # Also quote any args containing shell metacharacters.
554 ac_configure_args=
555 for ac_arg
556 do
557   case "$ac_arg" in
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c) ;;
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
562   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
563   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
564   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
565   esac
566 done
567
568 # NLS nuisances.
569 # Only set these to C if already set.  These must not be set unconditionally
570 # because not all systems understand e.g. LANG=C (notably SCO).
571 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
572 # Non-C LC_CTYPE values break the ctype check.
573 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
574 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
575 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
576 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
577
578 # confdefs.h avoids OS command line length limits that DEFS can exceed.
579 rm -rf conftest* confdefs.h
580 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
581 echo > confdefs.h
582
583 # A filename unique to this package, relative to the directory that
584 # configure is in, which we can look for to find out if srcdir is correct.
585 ac_unique_file=build/version.sh
586
587 # Find the source files, if location was not specified.
588 if test -z "$srcdir"; then
589   ac_srcdir_defaulted=yes
590   # Try the directory containing this script, then its parent.
591   ac_prog=$0
592   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
593   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
594   srcdir=$ac_confdir
595   if test ! -r $srcdir/$ac_unique_file; then
596     srcdir=..
597   fi
598 else
599   ac_srcdir_defaulted=no
600 fi
601 if test ! -r $srcdir/$ac_unique_file; then
602   if test "$ac_srcdir_defaulted" = yes; then
603     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
604   else
605     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
606   fi
607 fi
608 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
609
610 # Prefer explicitly selected file to automatically selected ones.
611 if test -z "$CONFIG_SITE"; then
612   if test "x$prefix" != xNONE; then
613     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
614   else
615     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
616   fi
617 fi
618 for ac_site_file in $CONFIG_SITE; do
619   if test -r "$ac_site_file"; then
620     echo "loading site script $ac_site_file"
621     . "$ac_site_file"
622   fi
623 done
624
625
626 ac_ext=c
627 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
628 ac_cpp='$CPP $CPPFLAGS'
629 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
630 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
631 cross_compiling=$ac_cv_prog_cc_cross
632
633 ac_exeext=
634 ac_objext=o
635 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
636   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
637   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
638     ac_n= ac_c='
639 ' ac_t='        '
640   else
641     ac_n=-n ac_c= ac_t=
642   fi
643 else
644   ac_n= ac_c='\c' ac_t=
645 fi
646
647
648 # set unset (borrowed from autoconf 2.49c)
649 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
650   ol_unset=unset
651 else
652   ol_unset=false
653 fi
654 # unset CDPATH
655 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
656
657 ac_aux_dir=
658 for ac_dir in build $srcdir/build; do
659   if test -f $ac_dir/install-sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install-sh -c"
662     break
663   elif test -f $ac_dir/install.sh; then
664     ac_aux_dir=$ac_dir
665     ac_install_sh="$ac_aux_dir/install.sh -c"
666     break
667   elif test -f $ac_dir/shtool; then
668     ac_aux_dir=$ac_dir
669     ac_install_sh="$ac_aux_dir/shtool install -c"
670     break
671   fi
672 done
673 if test -z "$ac_aux_dir"; then
674   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
675 fi
676 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
677 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
678 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
679
680 eval `$ac_aux_dir/version.sh`
681 if test -z "$OL_STRING"; then
682         { echo "configure: error: could not determine version" 1>&2; exit 1; }
683 fi
684
685 echo "Configuring $OL_STRING ..."
686
687
688 echo $ac_n "checking host system type""... $ac_c" 1>&6
689 echo "configure:690: checking host system type" >&5
690 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
691
692 # Make sure we can run config.sub.
693   if $ac_config_sub sun4 >/dev/null 2>&1; then :
694     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
695   fi
696
697   ac_cv_host_alias=$host
698   case "$ac_cv_host_alias" in
699   NONE)
700     case $nonopt in
701     NONE)
702       if ac_cv_host_alias=`$ac_config_guess`; then :
703       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
704       fi ;;
705     *) ac_cv_host_alias=$nonopt ;;
706     esac ;;
707   esac
708
709   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
710   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
711   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
712   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
713 else
714   echo $ac_n "(cached) $ac_c" 1>&6
715 fi
716
717 echo "$ac_t""$ac_cv_host" 1>&6
718
719 host=$ac_cv_host
720 host_alias=$ac_cv_host_alias
721 host_cpu=$ac_cv_host_cpu
722 host_vendor=$ac_cv_host_vendor
723 host_os=$ac_cv_host_os
724
725
726
727
728
729 echo $ac_n "checking target system type""... $ac_c" 1>&6
730 echo "configure:731: checking target system type" >&5
731 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
732
733 # Make sure we can run config.sub.
734   if $ac_config_sub sun4 >/dev/null 2>&1; then :
735     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
736   fi
737
738   ac_cv_target_alias=$target
739   case "$ac_cv_target_alias" in
740   NONE)
741     case $nonopt in
742     NONE)
743       ac_cv_target_alias=$host_alias ;;
744
745     *) ac_cv_target_alias=$nonopt ;;
746     esac ;;
747   esac
748
749   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
750   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
751   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
752   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
753 else
754   echo $ac_n "(cached) $ac_c" 1>&6
755 fi
756
757 echo "$ac_t""$ac_cv_target" 1>&6
758
759 target=$ac_cv_target
760 target_alias=$ac_cv_target_alias
761 target_cpu=$ac_cv_target_cpu
762 target_vendor=$ac_cv_target_vendor
763 target_os=$ac_cv_target_os
764
765
766
767
768
769 echo $ac_n "checking build system type""... $ac_c" 1>&6
770 echo "configure:771: checking build system type" >&5
771 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
772
773 # Make sure we can run config.sub.
774   if $ac_config_sub sun4 >/dev/null 2>&1; then :
775     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
776   fi
777
778   ac_cv_build_alias=$build
779   case "$ac_cv_build_alias" in
780   NONE)
781     case $nonopt in
782     NONE)
783       ac_cv_build_alias=$host_alias ;;
784
785     *) ac_cv_build_alias=$nonopt ;;
786     esac ;;
787   esac
788
789   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
790   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
791   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
792   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
793 else
794   echo $ac_n "(cached) $ac_c" 1>&6
795 fi
796
797 echo "$ac_t""$ac_cv_build" 1>&6
798
799 build=$ac_cv_build
800 build_alias=$ac_cv_build_alias
801 build_cpu=$ac_cv_build_cpu
802 build_vendor=$ac_cv_build_vendor
803 build_os=$ac_cv_build_os
804
805
806
807
808
809 # Do some error checking and defaulting for the host and target type.
810 # The inputs are:
811 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
812 #
813 # The rules are:
814 # 1. You are not allowed to specify --host, --target, and nonopt at the
815 #    same time.
816 # 2. Host defaults to nonopt.
817 # 3. If nonopt is not specified, then host defaults to the current host,
818 #    as determined by config.guess.
819 # 4. Target and build default to nonopt.
820 # 5. If nonopt is not specified, then target and build default to host.
821
822 # The aliases save the names the user supplied, while $host etc.
823 # will get canonicalized.
824 case $host---$target---$nonopt in
825 NONE---*---* | *---NONE---* | *---*---NONE) ;;
826 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
827 esac
828
829 test "$host_alias" != "$target_alias" &&
830   test "$program_prefix$program_suffix$program_transform_name" = \
831     NONENONEs,x,x, &&
832   program_prefix=${target_alias}-
833
834
835 # Find a good install program.  We prefer a C program (faster),
836 # so one script is as good as another.  But avoid the broken or
837 # incompatible versions:
838 # SysV /etc/install, /usr/sbin/install
839 # SunOS /usr/etc/install
840 # IRIX /sbin/install
841 # AIX /bin/install
842 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
843 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
844 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
845 # ./install, which can be erroneously created by make from ./install.sh.
846 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
847 echo "configure:848: checking for a BSD compatible install" >&5
848 if test -z "$INSTALL"; then
849 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
850   echo $ac_n "(cached) $ac_c" 1>&6
851 else
852     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
853   for ac_dir in $PATH; do
854     # Account for people who put trailing slashes in PATH elements.
855     case "$ac_dir/" in
856     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
857     *)
858       # OSF1 and SCO ODT 3.0 have their own names for install.
859       # Don't use installbsd from OSF since it installs stuff as root
860       # by default.
861       for ac_prog in ginstall scoinst install; do
862         if test -f $ac_dir/$ac_prog; then
863           if test $ac_prog = install &&
864             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
865             # AIX install.  It has an incompatible calling convention.
866             :
867           elif test $ac_prog = install &&
868             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
869             # program-specific install script used by HP pwplus--don't use.
870             :
871           else
872             ac_cv_path_install="$ac_dir/$ac_prog -c"
873             break 2
874           fi
875         fi
876       done
877       ;;
878     esac
879   done
880   IFS="$ac_save_IFS"
881
882 fi
883   if test "${ac_cv_path_install+set}" = set; then
884     INSTALL="$ac_cv_path_install"
885   else
886     # As a last resort, use the slow shell script.  We don't cache a
887     # path for INSTALL within a source directory, because that will
888     # break other packages using the cache if that directory is
889     # removed, or if the path is relative.
890     INSTALL="$ac_install_sh"
891   fi
892 fi
893 echo "$ac_t""$INSTALL" 1>&6
894
895 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
896 # It thinks the first close brace ends the variable substitution.
897 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
898
899 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
900
901 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
902
903 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
904 echo "configure:905: checking whether build environment is sane" >&5
905 # Just in case
906 sleep 1
907 echo timestamp > conftestfile
908 # Do `set' in a subshell so we don't clobber the current shell's
909 # arguments.  Must try -L first in case configure is actually a
910 # symlink; some systems play weird games with the mod time of symlinks
911 # (eg FreeBSD returns the mod time of the symlink's containing
912 # directory).
913 if (
914    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
915    if test "$*" = "X"; then
916       # -L didn't work.
917       set X `ls -t $srcdir/configure conftestfile`
918    fi
919    if test "$*" != "X $srcdir/configure conftestfile" \
920       && test "$*" != "X conftestfile $srcdir/configure"; then
921
922       # If neither matched, then we have a broken ls.  This can happen
923       # if, for instance, CONFIG_SHELL is bash and it inherits a
924       # broken ls alias from the environment.  This has actually
925       # happened.  Such a system could not be considered "sane".
926       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
927 alias in your environment" 1>&2; exit 1; }
928    fi
929
930    test "$2" = conftestfile
931    )
932 then
933    # Ok.
934    :
935 else
936    { echo "configure: error: newly created file is older than distributed files!
937 Check your system clock" 1>&2; exit 1; }
938 fi
939 rm -f conftest*
940 echo "$ac_t""yes" 1>&6
941 if test "$program_transform_name" = s,x,x,; then
942   program_transform_name=
943 else
944   # Double any \ or $.  echo might interpret backslashes.
945   cat <<\EOF_SED > conftestsed
946 s,\\,\\\\,g; s,\$,$$,g
947 EOF_SED
948   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
949   rm -f conftestsed
950 fi
951 test "$program_prefix" != NONE &&
952   program_transform_name="s,^,${program_prefix},;$program_transform_name"
953 # Use a double $ so make ignores it.
954 test "$program_suffix" != NONE &&
955   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
956
957 # sed with no file args requires a program.
958 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
959
960 for ac_prog in mawk gawk nawk awk
961 do
962 # Extract the first word of "$ac_prog", so it can be a program name with args.
963 set dummy $ac_prog; ac_word=$2
964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
965 echo "configure:966: checking for $ac_word" >&5
966 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
967   echo $ac_n "(cached) $ac_c" 1>&6
968 else
969   if test -n "$AWK"; then
970   ac_cv_prog_AWK="$AWK" # Let the user override the test.
971 else
972   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
973   ac_dummy="$PATH"
974   for ac_dir in $ac_dummy; do
975     test -z "$ac_dir" && ac_dir=.
976     if test -f $ac_dir/$ac_word; then
977       ac_cv_prog_AWK="$ac_prog"
978       break
979     fi
980   done
981   IFS="$ac_save_ifs"
982 fi
983 fi
984 AWK="$ac_cv_prog_AWK"
985 if test -n "$AWK"; then
986   echo "$ac_t""$AWK" 1>&6
987 else
988   echo "$ac_t""no" 1>&6
989 fi
990
991 test -n "$AWK" && break
992 done
993
994 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
995 echo "configure:996: checking whether ${MAKE-make} sets \${MAKE}" >&5
996 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
997 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
998   echo $ac_n "(cached) $ac_c" 1>&6
999 else
1000   cat > conftestmake <<\EOF
1001 all:
1002         @echo 'ac_maketemp="${MAKE}"'
1003 EOF
1004 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1005 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1006 if test -n "$ac_maketemp"; then
1007   eval ac_cv_prog_make_${ac_make}_set=yes
1008 else
1009   eval ac_cv_prog_make_${ac_make}_set=no
1010 fi
1011 rm -f conftestmake
1012 fi
1013 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1014   echo "$ac_t""yes" 1>&6
1015   SET_MAKE=
1016 else
1017   echo "$ac_t""no" 1>&6
1018   SET_MAKE="MAKE=${MAKE-make}"
1019 fi
1020
1021
1022
1023 PACKAGE=$OL_PACKAGE
1024
1025 VERSION=$OL_VERSION
1026
1027 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1028   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1029 fi
1030
1031
1032
1033 missing_dir=`cd $ac_aux_dir && pwd`
1034 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1035 echo "configure:1036: checking for working aclocal" >&5
1036 # Run test in a subshell; some versions of sh will print an error if
1037 # an executable is not found, even if stderr is redirected.
1038 # Redirect stdin to placate older versions of autoconf.  Sigh.
1039 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1040    ACLOCAL=aclocal
1041    echo "$ac_t""found" 1>&6
1042 else
1043    ACLOCAL="$missing_dir/missing aclocal"
1044    echo "$ac_t""missing" 1>&6
1045 fi
1046
1047 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1048 echo "configure:1049: checking for working autoconf" >&5
1049 # Run test in a subshell; some versions of sh will print an error if
1050 # an executable is not found, even if stderr is redirected.
1051 # Redirect stdin to placate older versions of autoconf.  Sigh.
1052 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1053    AUTOCONF=autoconf
1054    echo "$ac_t""found" 1>&6
1055 else
1056    AUTOCONF="$missing_dir/missing autoconf"
1057    echo "$ac_t""missing" 1>&6
1058 fi
1059
1060 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1061 echo "configure:1062: checking for working automake" >&5
1062 # Run test in a subshell; some versions of sh will print an error if
1063 # an executable is not found, even if stderr is redirected.
1064 # Redirect stdin to placate older versions of autoconf.  Sigh.
1065 if (automake --version) < /dev/null > /dev/null 2>&1; then
1066    AUTOMAKE=automake
1067    echo "$ac_t""found" 1>&6
1068 else
1069    AUTOMAKE="$missing_dir/missing automake"
1070    echo "$ac_t""missing" 1>&6
1071 fi
1072
1073 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1074 echo "configure:1075: checking for working autoheader" >&5
1075 # Run test in a subshell; some versions of sh will print an error if
1076 # an executable is not found, even if stderr is redirected.
1077 # Redirect stdin to placate older versions of autoconf.  Sigh.
1078 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1079    AUTOHEADER=autoheader
1080    echo "$ac_t""found" 1>&6
1081 else
1082    AUTOHEADER="$missing_dir/missing autoheader"
1083    echo "$ac_t""missing" 1>&6
1084 fi
1085
1086 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1087 echo "configure:1088: checking for working makeinfo" >&5
1088 # Run test in a subshell; some versions of sh will print an error if
1089 # an executable is not found, even if stderr is redirected.
1090 # Redirect stdin to placate older versions of autoconf.  Sigh.
1091 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1092    MAKEINFO=makeinfo
1093    echo "$ac_t""found" 1>&6
1094 else
1095    MAKEINFO="$missing_dir/missing makeinfo"
1096    echo "$ac_t""missing" 1>&6
1097 fi
1098
1099 install_sh="$missing_dir/install-sh"
1100 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1101
1102 for ac_prog in gnutar gtar tar
1103 do
1104 # Extract the first word of "$ac_prog", so it can be a program name with args.
1105 set dummy $ac_prog; ac_word=$2
1106 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1107 echo "configure:1108: checking for $ac_word" >&5
1108 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1109   echo $ac_n "(cached) $ac_c" 1>&6
1110 else
1111   if test -n "$AMTAR"; then
1112   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1113 else
1114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1115   ac_dummy="$PATH"
1116   for ac_dir in $ac_dummy; do
1117     test -z "$ac_dir" && ac_dir=.
1118     if test -f $ac_dir/$ac_word; then
1119       ac_cv_prog_AMTAR="$ac_prog"
1120       break
1121     fi
1122   done
1123   IFS="$ac_save_ifs"
1124 fi
1125 fi
1126 AMTAR="$ac_cv_prog_AMTAR"
1127 if test -n "$AMTAR"; then
1128   echo "$ac_t""$AMTAR" 1>&6
1129 else
1130   echo "$ac_t""no" 1>&6
1131 fi
1132
1133 test -n "$AMTAR" && break
1134 done
1135
1136
1137 AMTARFLAGS=
1138 if test -n "$AMTAR"; then
1139   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1140         AMTARFLAGS=o
1141   fi
1142 fi
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_PACKAGE "$PACKAGE"
1146 EOF
1147
1148 cat >> confdefs.h <<EOF
1149 #define OPENLDAP_VERSION "$VERSION"
1150 EOF
1151
1152
1153 cat >> confdefs.h <<EOF
1154 #define LDAP_VENDOR_VERSION $OL_API_INC
1155 EOF
1156
1157 cat >> confdefs.h <<EOF
1158 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1159 EOF
1160
1161 cat >> confdefs.h <<EOF
1162 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1163 EOF
1164
1165 cat >> confdefs.h <<EOF
1166 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1167 EOF
1168
1169
1170 OPENLDAP_LIBVERSION=$OL_API_LIB
1171
1172
1173
1174 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1175 echo "configure:1176: checking configure arguments" >&5
1176
1177
1178 top_builddir=`pwd`
1179
1180 ldap_subdir="/openldap"
1181
1182 # Check whether --with-subdir or --without-subdir was given.
1183 if test "${with_subdir+set}" = set; then
1184   withval="$with_subdir"
1185   case "$withval" in
1186         no) ldap_subdir=""
1187                 ;;
1188         yes)
1189                 ;;
1190         /*|\\*)
1191                 ldap_subdir="$withval"
1192                 ;;
1193         *)
1194                 ldap_subdir="/$withval"
1195                 ;;
1196 esac
1197
1198 fi
1199
1200
1201 # OpenLDAP --enable-debug
1202         # Check whether --enable-debug or --disable-debug was given.
1203 if test "${enable_debug+set}" = set; then
1204   enableval="$enable_debug"
1205   
1206         ol_arg=invalid
1207         for ol_val in auto yes no ; do
1208                 if test "$enableval" = "$ol_val" ; then
1209                         ol_arg="$ol_val"
1210                 fi
1211         done
1212         if test "$ol_arg" = "invalid" ; then
1213                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1214         fi
1215         ol_enable_debug="$ol_arg"
1216
1217 else
1218         ol_enable_debug="yes"
1219 fi
1220 # end --enable-debug
1221 # OpenLDAP --enable-syslog
1222         # Check whether --enable-syslog or --disable-syslog was given.
1223 if test "${enable_syslog+set}" = set; then
1224   enableval="$enable_syslog"
1225   
1226         ol_arg=invalid
1227         for ol_val in auto yes no ; do
1228                 if test "$enableval" = "$ol_val" ; then
1229                         ol_arg="$ol_val"
1230                 fi
1231         done
1232         if test "$ol_arg" = "invalid" ; then
1233                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1234         fi
1235         ol_enable_syslog="$ol_arg"
1236
1237 else
1238         ol_enable_syslog="auto"
1239 fi
1240 # end --enable-syslog
1241 # OpenLDAP --enable-proctitle
1242         # Check whether --enable-proctitle or --disable-proctitle was given.
1243 if test "${enable_proctitle+set}" = set; then
1244   enableval="$enable_proctitle"
1245   
1246         ol_arg=invalid
1247         for ol_val in auto yes no ; do
1248                 if test "$enableval" = "$ol_val" ; then
1249                         ol_arg="$ol_val"
1250                 fi
1251         done
1252         if test "$ol_arg" = "invalid" ; then
1253                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1254         fi
1255         ol_enable_proctitle="$ol_arg"
1256
1257 else
1258         ol_enable_proctitle="yes"
1259 fi
1260 # end --enable-proctitle
1261 # OpenLDAP --enable-cache
1262         # Check whether --enable-cache or --disable-cache was given.
1263 if test "${enable_cache+set}" = set; then
1264   enableval="$enable_cache"
1265   
1266         ol_arg=invalid
1267         for ol_val in auto yes no ; do
1268                 if test "$enableval" = "$ol_val" ; then
1269                         ol_arg="$ol_val"
1270                 fi
1271         done
1272         if test "$ol_arg" = "invalid" ; then
1273                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1274         fi
1275         ol_enable_cache="$ol_arg"
1276
1277 else
1278         ol_enable_cache="no"
1279 fi
1280 # end --enable-cache
1281 # OpenLDAP --enable-referrals
1282         # Check whether --enable-referrals or --disable-referrals was given.
1283 if test "${enable_referrals+set}" = set; then
1284   enableval="$enable_referrals"
1285   
1286         ol_arg=invalid
1287         for ol_val in auto yes no ; do
1288                 if test "$enableval" = "$ol_val" ; then
1289                         ol_arg="$ol_val"
1290                 fi
1291         done
1292         if test "$ol_arg" = "invalid" ; then
1293                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1294         fi
1295         ol_enable_referrals="$ol_arg"
1296
1297 else
1298         ol_enable_referrals="no"
1299 fi
1300 # end --enable-referrals
1301 # OpenLDAP --enable-kbind
1302         # Check whether --enable-kbind or --disable-kbind was given.
1303 if test "${enable_kbind+set}" = set; then
1304   enableval="$enable_kbind"
1305   
1306         ol_arg=invalid
1307         for ol_val in auto yes no ; do
1308                 if test "$enableval" = "$ol_val" ; then
1309                         ol_arg="$ol_val"
1310                 fi
1311         done
1312         if test "$ol_arg" = "invalid" ; then
1313                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1314         fi
1315         ol_enable_kbind="$ol_arg"
1316
1317 else
1318         ol_enable_kbind="no"
1319 fi
1320 # end --enable-kbind
1321 # OpenLDAP --enable-ipv6
1322         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1323 if test "${enable_ipv6+set}" = set; then
1324   enableval="$enable_ipv6"
1325   
1326         ol_arg=invalid
1327         for ol_val in auto yes no ; do
1328                 if test "$enableval" = "$ol_val" ; then
1329                         ol_arg="$ol_val"
1330                 fi
1331         done
1332         if test "$ol_arg" = "invalid" ; then
1333                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1334         fi
1335         ol_enable_ipv6="$ol_arg"
1336
1337 else
1338         ol_enable_ipv6="auto"
1339 fi
1340 # end --enable-ipv6
1341 # OpenLDAP --enable-local
1342         # Check whether --enable-local or --disable-local was given.
1343 if test "${enable_local+set}" = set; then
1344   enableval="$enable_local"
1345   
1346         ol_arg=invalid
1347         for ol_val in auto yes no ; do
1348                 if test "$enableval" = "$ol_val" ; then
1349                         ol_arg="$ol_val"
1350                 fi
1351         done
1352         if test "$ol_arg" = "invalid" ; then
1353                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1354         fi
1355         ol_enable_local="$ol_arg"
1356
1357 else
1358         ol_enable_local="auto"
1359 fi
1360 # end --enable-local
1361 # OpenLDAP --enable-x_compile
1362         # Check whether --enable-x_compile or --disable-x_compile was given.
1363 if test "${enable_x_compile+set}" = set; then
1364   enableval="$enable_x_compile"
1365   
1366         ol_arg=invalid
1367         for ol_val in yes no ; do
1368                 if test "$enableval" = "$ol_val" ; then
1369                         ol_arg="$ol_val"
1370                 fi
1371         done
1372         if test "$ol_arg" = "invalid" ; then
1373                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1374         fi
1375         ol_enable_x_compile="$ol_arg"
1376
1377 else
1378         ol_enable_x_compile="no"
1379 fi
1380 # end --enable-x_compile
1381
1382
1383 # OpenLDAP --with-cyrus_sasl
1384         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1385 if test "${with_cyrus_sasl+set}" = set; then
1386   withval="$with_cyrus_sasl"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no  ; do
1390                 if test "$withval" = "$ol_val" ; then
1391                         ol_arg="$ol_val"
1392                 fi
1393         done
1394         if test "$ol_arg" = "invalid" ; then
1395                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1396         fi
1397         ol_with_cyrus_sasl="$ol_arg"
1398
1399 else
1400         ol_with_cyrus_sasl="auto"
1401 fi
1402 # end --with-cyrus_sasl
1403
1404 # OpenLDAP --with-fetch
1405         # Check whether --with-fetch or --without-fetch was given.
1406 if test "${with_fetch+set}" = set; then
1407   withval="$with_fetch"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto yes no  ; do
1411                 if test "$withval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1417         fi
1418         ol_with_fetch="$ol_arg"
1419
1420 else
1421         ol_with_fetch="auto"
1422 fi
1423 # end --with-fetch
1424
1425 # OpenLDAP --with-kerberos
1426         # Check whether --with-kerberos or --without-kerberos was given.
1427 if test "${with_kerberos+set}" = set; then
1428   withval="$with_kerberos"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1432                 if test "$withval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1438         fi
1439         ol_with_kerberos="$ol_arg"
1440
1441 else
1442         ol_with_kerberos="auto"
1443 fi
1444 # end --with-kerberos
1445
1446 # OpenLDAP --with-readline
1447         # Check whether --with-readline or --without-readline was given.
1448 if test "${with_readline+set}" = set; then
1449   withval="$with_readline"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto yes no  ; do
1453                 if test "$withval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1459         fi
1460         ol_with_readline="$ol_arg"
1461
1462 else
1463         ol_with_readline="auto"
1464 fi
1465 # end --with-readline
1466
1467 # OpenLDAP --with-threads
1468         # Check whether --with-threads or --without-threads was given.
1469 if test "${with_threads+set}" = set; then
1470   withval="$with_threads"
1471   
1472         ol_arg=invalid
1473         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1474                 if test "$withval" = "$ol_val" ; then
1475                         ol_arg="$ol_val"
1476                 fi
1477         done
1478         if test "$ol_arg" = "invalid" ; then
1479                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1480         fi
1481         ol_with_threads="$ol_arg"
1482
1483 else
1484         ol_with_threads="auto"
1485 fi
1486 # end --with-threads
1487
1488 # OpenLDAP --with-tls
1489         # Check whether --with-tls or --without-tls was given.
1490 if test "${with_tls+set}" = set; then
1491   withval="$with_tls"
1492   
1493         ol_arg=invalid
1494         for ol_val in auto ssleay openssl yes no  ; do
1495                 if test "$withval" = "$ol_val" ; then
1496                         ol_arg="$ol_val"
1497                 fi
1498         done
1499         if test "$ol_arg" = "invalid" ; then
1500                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1501         fi
1502         ol_with_tls="$ol_arg"
1503
1504 else
1505         ol_with_tls="auto"
1506 fi
1507 # end --with-tls
1508
1509 # OpenLDAP --with-yielding_select
1510         # Check whether --with-yielding_select or --without-yielding_select was given.
1511 if test "${with_yielding_select+set}" = set; then
1512   withval="$with_yielding_select"
1513   
1514         ol_arg=invalid
1515         for ol_val in auto yes no manual  ; do
1516                 if test "$withval" = "$ol_val" ; then
1517                         ol_arg="$ol_val"
1518                 fi
1519         done
1520         if test "$ol_arg" = "invalid" ; then
1521                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1522         fi
1523         ol_with_yielding_select="$ol_arg"
1524
1525 else
1526         ol_with_yielding_select="auto"
1527 fi
1528 # end --with-yielding_select
1529
1530
1531
1532 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1533 if test "${with_xxslapdoptions+set}" = set; then
1534   withval="$with_xxslapdoptions"
1535   :
1536 fi
1537
1538 # OpenLDAP --enable-slapd
1539         # Check whether --enable-slapd or --disable-slapd was given.
1540 if test "${enable_slapd+set}" = set; then
1541   enableval="$enable_slapd"
1542   
1543         ol_arg=invalid
1544         for ol_val in auto yes no ; do
1545                 if test "$enableval" = "$ol_val" ; then
1546                         ol_arg="$ol_val"
1547                 fi
1548         done
1549         if test "$ol_arg" = "invalid" ; then
1550                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1551         fi
1552         ol_enable_slapd="$ol_arg"
1553
1554 else
1555         ol_enable_slapd="yes"
1556 fi
1557 # end --enable-slapd
1558 # OpenLDAP --enable-aci
1559         # Check whether --enable-aci or --disable-aci was given.
1560 if test "${enable_aci+set}" = set; then
1561   enableval="$enable_aci"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no ; do
1565                 if test "$enableval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1571         fi
1572         ol_enable_aci="$ol_arg"
1573
1574 else
1575         ol_enable_aci="no"
1576 fi
1577 # end --enable-aci
1578 # OpenLDAP --enable-cleartext
1579         # Check whether --enable-cleartext or --disable-cleartext was given.
1580 if test "${enable_cleartext+set}" = set; then
1581   enableval="$enable_cleartext"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto yes no ; do
1585                 if test "$enableval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1591         fi
1592         ol_enable_cleartext="$ol_arg"
1593
1594 else
1595         ol_enable_cleartext="yes"
1596 fi
1597 # end --enable-cleartext
1598 # OpenLDAP --enable-crypt
1599         # Check whether --enable-crypt or --disable-crypt was given.
1600 if test "${enable_crypt+set}" = set; then
1601   enableval="$enable_crypt"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto yes no ; do
1605                 if test "$enableval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1611         fi
1612         ol_enable_crypt="$ol_arg"
1613
1614 else
1615         ol_enable_crypt="no"
1616 fi
1617 # end --enable-crypt
1618 # OpenLDAP --enable-dynamic
1619         # Check whether --enable-dynamic or --disable-dynamic was given.
1620 if test "${enable_dynamic+set}" = set; then
1621   enableval="$enable_dynamic"
1622   
1623         ol_arg=invalid
1624         for ol_val in auto yes no ; do
1625                 if test "$enableval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1631         fi
1632         ol_enable_dynamic="$ol_arg"
1633
1634 else
1635         ol_enable_dynamic="no"
1636 fi
1637 # end --enable-dynamic
1638 # OpenLDAP --enable-kpasswd
1639         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1640 if test "${enable_kpasswd+set}" = set; then
1641   enableval="$enable_kpasswd"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto yes no ; do
1645                 if test "$enableval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1651         fi
1652         ol_enable_kpasswd="$ol_arg"
1653
1654 else
1655         ol_enable_kpasswd="no"
1656 fi
1657 # end --enable-kpasswd
1658 # OpenLDAP --enable-lmpasswd
1659         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1660 if test "${enable_lmpasswd+set}" = set; then
1661   enableval="$enable_lmpasswd"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1671         fi
1672         ol_enable_lmpasswd="$ol_arg"
1673
1674 else
1675         ol_enable_lmpasswd="no"
1676 fi
1677 # end --enable-lmpasswd
1678 # OpenLDAP --enable-spasswd
1679         # Check whether --enable-spasswd or --disable-spasswd was given.
1680 if test "${enable_spasswd+set}" = set; then
1681   enableval="$enable_spasswd"
1682   
1683         ol_arg=invalid
1684         for ol_val in auto yes no ; do
1685                 if test "$enableval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1691         fi
1692         ol_enable_spasswd="$ol_arg"
1693
1694 else
1695         ol_enable_spasswd="no"
1696 fi
1697 # end --enable-spasswd
1698 # OpenLDAP --enable-modules
1699         # Check whether --enable-modules or --disable-modules was given.
1700 if test "${enable_modules+set}" = set; then
1701   enableval="$enable_modules"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no ; do
1705                 if test "$enableval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1711         fi
1712         ol_enable_modules="$ol_arg"
1713
1714 else
1715         ol_enable_modules="no"
1716 fi
1717 # end --enable-modules
1718 # OpenLDAP --enable-phonetic
1719         # Check whether --enable-phonetic or --disable-phonetic was given.
1720 if test "${enable_phonetic+set}" = set; then
1721   enableval="$enable_phonetic"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no ; do
1725                 if test "$enableval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1731         fi
1732         ol_enable_phonetic="$ol_arg"
1733
1734 else
1735         ol_enable_phonetic="no"
1736 fi
1737 # end --enable-phonetic
1738 # OpenLDAP --enable-rlookups
1739         # Check whether --enable-rlookups or --disable-rlookups was given.
1740 if test "${enable_rlookups+set}" = set; then
1741   enableval="$enable_rlookups"
1742   
1743         ol_arg=invalid
1744         for ol_val in auto yes no ; do
1745                 if test "$enableval" = "$ol_val" ; then
1746                         ol_arg="$ol_val"
1747                 fi
1748         done
1749         if test "$ol_arg" = "invalid" ; then
1750                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1751         fi
1752         ol_enable_rlookups="$ol_arg"
1753
1754 else
1755         ol_enable_rlookups="no"
1756 fi
1757 # end --enable-rlookups
1758 # OpenLDAP --enable-slp
1759         # Check whether --enable-slp or --disable-slp was given.
1760 if test "${enable_slp+set}" = set; then
1761   enableval="$enable_slp"
1762   
1763         ol_arg=invalid
1764         for ol_val in auto yes no ; do
1765                 if test "$enableval" = "$ol_val" ; then
1766                         ol_arg="$ol_val"
1767                 fi
1768         done
1769         if test "$ol_arg" = "invalid" ; then
1770                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1771         fi
1772         ol_enable_slp="$ol_arg"
1773
1774 else
1775         ol_enable_slp="no"
1776 fi
1777 # end --enable-slp
1778 # OpenLDAP --enable-wrappers
1779         # Check whether --enable-wrappers or --disable-wrappers was given.
1780 if test "${enable_wrappers+set}" = set; then
1781   enableval="$enable_wrappers"
1782   
1783         ol_arg=invalid
1784         for ol_val in auto yes no ; do
1785                 if test "$enableval" = "$ol_val" ; then
1786                         ol_arg="$ol_val"
1787                 fi
1788         done
1789         if test "$ol_arg" = "invalid" ; then
1790                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1791         fi
1792         ol_enable_wrappers="$ol_arg"
1793
1794 else
1795         ol_enable_wrappers="no"
1796 fi
1797 # end --enable-wrappers
1798
1799 # OpenLDAP --enable-bdb
1800         # Check whether --enable-bdb or --disable-bdb was given.
1801 if test "${enable_bdb+set}" = set; then
1802   enableval="$enable_bdb"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1812         fi
1813         ol_enable_bdb="$ol_arg"
1814
1815 else
1816         ol_enable_bdb="no"
1817 fi
1818 # end --enable-bdb
1819 # OpenLDAP --with-bdb_module
1820         # Check whether --with-bdb_module or --without-bdb_module was given.
1821 if test "${with_bdb_module+set}" = set; then
1822   withval="$with_bdb_module"
1823   
1824         ol_arg=invalid
1825         for ol_val in static dynamic ; do
1826                 if test "$withval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1832         fi
1833         ol_with_bdb_module="$ol_arg"
1834
1835 else
1836         ol_with_bdb_module="static"
1837 fi
1838 # end --with-bdb_module
1839
1840 # OpenLDAP --enable-dnssrv
1841         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1842 if test "${enable_dnssrv+set}" = set; then
1843   enableval="$enable_dnssrv"
1844   
1845         ol_arg=invalid
1846         for ol_val in auto yes no ; do
1847                 if test "$enableval" = "$ol_val" ; then
1848                         ol_arg="$ol_val"
1849                 fi
1850         done
1851         if test "$ol_arg" = "invalid" ; then
1852                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1853         fi
1854         ol_enable_dnssrv="$ol_arg"
1855
1856 else
1857         ol_enable_dnssrv="no"
1858 fi
1859 # end --enable-dnssrv
1860 # OpenLDAP --with-dnssrv_module
1861         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1862 if test "${with_dnssrv_module+set}" = set; then
1863   withval="$with_dnssrv_module"
1864   
1865         ol_arg=invalid
1866         for ol_val in static dynamic ; do
1867                 if test "$withval" = "$ol_val" ; then
1868                         ol_arg="$ol_val"
1869                 fi
1870         done
1871         if test "$ol_arg" = "invalid" ; then
1872                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1873         fi
1874         ol_with_dnssrv_module="$ol_arg"
1875
1876 else
1877         ol_with_dnssrv_module="static"
1878 fi
1879 # end --with-dnssrv_module
1880
1881 # OpenLDAP --enable-ldap
1882         # Check whether --enable-ldap or --disable-ldap was given.
1883 if test "${enable_ldap+set}" = set; then
1884   enableval="$enable_ldap"
1885   
1886         ol_arg=invalid
1887         for ol_val in auto yes no ; do
1888                 if test "$enableval" = "$ol_val" ; then
1889                         ol_arg="$ol_val"
1890                 fi
1891         done
1892         if test "$ol_arg" = "invalid" ; then
1893                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1894         fi
1895         ol_enable_ldap="$ol_arg"
1896
1897 else
1898         ol_enable_ldap="no"
1899 fi
1900 # end --enable-ldap
1901 # OpenLDAP --with-ldap_module
1902         # Check whether --with-ldap_module or --without-ldap_module was given.
1903 if test "${with_ldap_module+set}" = set; then
1904   withval="$with_ldap_module"
1905   
1906         ol_arg=invalid
1907         for ol_val in static dynamic ; do
1908                 if test "$withval" = "$ol_val" ; then
1909                         ol_arg="$ol_val"
1910                 fi
1911         done
1912         if test "$ol_arg" = "invalid" ; then
1913                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1914         fi
1915         ol_with_ldap_module="$ol_arg"
1916
1917 else
1918         ol_with_ldap_module="static"
1919 fi
1920 # end --with-ldap_module
1921
1922 # OpenLDAP --enable-ldbm
1923         # Check whether --enable-ldbm or --disable-ldbm was given.
1924 if test "${enable_ldbm+set}" = set; then
1925   enableval="$enable_ldbm"
1926   
1927         ol_arg=invalid
1928         for ol_val in auto yes no ; do
1929                 if test "$enableval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1935         fi
1936         ol_enable_ldbm="$ol_arg"
1937
1938 else
1939         ol_enable_ldbm="yes"
1940 fi
1941 # end --enable-ldbm
1942 # OpenLDAP --with-ldbm_api
1943         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1944 if test "${with_ldbm_api+set}" = set; then
1945   withval="$with_ldbm_api"
1946   
1947         ol_arg=invalid
1948         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1949                 if test "$withval" = "$ol_val" ; then
1950                         ol_arg="$ol_val"
1951                 fi
1952         done
1953         if test "$ol_arg" = "invalid" ; then
1954                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1955         fi
1956         ol_with_ldbm_api="$ol_arg"
1957
1958 else
1959         ol_with_ldbm_api="auto"
1960 fi
1961 # end --with-ldbm_api
1962
1963 # OpenLDAP --with-ldbm_module
1964         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1965 if test "${with_ldbm_module+set}" = set; then
1966   withval="$with_ldbm_module"
1967   
1968         ol_arg=invalid
1969         for ol_val in static dynamic ; do
1970                 if test "$withval" = "$ol_val" ; then
1971                         ol_arg="$ol_val"
1972                 fi
1973         done
1974         if test "$ol_arg" = "invalid" ; then
1975                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1976         fi
1977         ol_with_ldbm_module="$ol_arg"
1978
1979 else
1980         ol_with_ldbm_module="static"
1981 fi
1982 # end --with-ldbm_module
1983
1984 # OpenLDAP --with-ldbm_type
1985         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1986 if test "${with_ldbm_type+set}" = set; then
1987   withval="$with_ldbm_type"
1988   
1989         ol_arg=invalid
1990         for ol_val in auto btree hash ; do
1991                 if test "$withval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1997         fi
1998         ol_with_ldbm_type="$ol_arg"
1999
2000 else
2001         ol_with_ldbm_type="auto"
2002 fi
2003 # end --with-ldbm_type
2004
2005 # OpenLDAP --enable-passwd
2006         # Check whether --enable-passwd or --disable-passwd was given.
2007 if test "${enable_passwd+set}" = set; then
2008   enableval="$enable_passwd"
2009   
2010         ol_arg=invalid
2011         for ol_val in auto yes no ; do
2012                 if test "$enableval" = "$ol_val" ; then
2013                         ol_arg="$ol_val"
2014                 fi
2015         done
2016         if test "$ol_arg" = "invalid" ; then
2017                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2018         fi
2019         ol_enable_passwd="$ol_arg"
2020
2021 else
2022         ol_enable_passwd="no"
2023 fi
2024 # end --enable-passwd
2025 # OpenLDAP --with-passwd_module
2026         # Check whether --with-passwd_module or --without-passwd_module was given.
2027 if test "${with_passwd_module+set}" = set; then
2028   withval="$with_passwd_module"
2029   
2030         ol_arg=invalid
2031         for ol_val in static dynamic ; do
2032                 if test "$withval" = "$ol_val" ; then
2033                         ol_arg="$ol_val"
2034                 fi
2035         done
2036         if test "$ol_arg" = "invalid" ; then
2037                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2038         fi
2039         ol_with_passwd_module="$ol_arg"
2040
2041 else
2042         ol_with_passwd_module="static"
2043 fi
2044 # end --with-passwd_module
2045
2046 # OpenLDAP --enable-perl
2047         # Check whether --enable-perl or --disable-perl was given.
2048 if test "${enable_perl+set}" = set; then
2049   enableval="$enable_perl"
2050   
2051         ol_arg=invalid
2052         for ol_val in auto yes no ; do
2053                 if test "$enableval" = "$ol_val" ; then
2054                         ol_arg="$ol_val"
2055                 fi
2056         done
2057         if test "$ol_arg" = "invalid" ; then
2058                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2059         fi
2060         ol_enable_perl="$ol_arg"
2061
2062 else
2063         ol_enable_perl="no"
2064 fi
2065 # end --enable-perl
2066 # OpenLDAP --with-perl_module
2067         # Check whether --with-perl_module or --without-perl_module was given.
2068 if test "${with_perl_module+set}" = set; then
2069   withval="$with_perl_module"
2070   
2071         ol_arg=invalid
2072         for ol_val in static dynamic ; do
2073                 if test "$withval" = "$ol_val" ; then
2074                         ol_arg="$ol_val"
2075                 fi
2076         done
2077         if test "$ol_arg" = "invalid" ; then
2078                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2079         fi
2080         ol_with_perl_module="$ol_arg"
2081
2082 else
2083         ol_with_perl_module="static"
2084 fi
2085 # end --with-perl_module
2086
2087 # OpenLDAP --enable-shell
2088         # Check whether --enable-shell or --disable-shell was given.
2089 if test "${enable_shell+set}" = set; then
2090   enableval="$enable_shell"
2091   
2092         ol_arg=invalid
2093         for ol_val in auto yes no ; do
2094                 if test "$enableval" = "$ol_val" ; then
2095                         ol_arg="$ol_val"
2096                 fi
2097         done
2098         if test "$ol_arg" = "invalid" ; then
2099                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2100         fi
2101         ol_enable_shell="$ol_arg"
2102
2103 else
2104         ol_enable_shell="no"
2105 fi
2106 # end --enable-shell
2107 # OpenLDAP --with-shell_module
2108         # Check whether --with-shell_module or --without-shell_module was given.
2109 if test "${with_shell_module+set}" = set; then
2110   withval="$with_shell_module"
2111   
2112         ol_arg=invalid
2113         for ol_val in static dynamic ; do
2114                 if test "$withval" = "$ol_val" ; then
2115                         ol_arg="$ol_val"
2116                 fi
2117         done
2118         if test "$ol_arg" = "invalid" ; then
2119                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2120         fi
2121         ol_with_shell_module="$ol_arg"
2122
2123 else
2124         ol_with_shell_module="static"
2125 fi
2126 # end --with-shell_module
2127
2128 # OpenLDAP --enable-sql
2129         # Check whether --enable-sql or --disable-sql was given.
2130 if test "${enable_sql+set}" = set; then
2131   enableval="$enable_sql"
2132   
2133         ol_arg=invalid
2134         for ol_val in auto yes no ; do
2135                 if test "$enableval" = "$ol_val" ; then
2136                         ol_arg="$ol_val"
2137                 fi
2138         done
2139         if test "$ol_arg" = "invalid" ; then
2140                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2141         fi
2142         ol_enable_sql="$ol_arg"
2143
2144 else
2145         ol_enable_sql="no"
2146 fi
2147 # end --enable-sql
2148 # OpenLDAP --with-sql_module
2149         # Check whether --with-sql_module or --without-sql_module was given.
2150 if test "${with_sql_module+set}" = set; then
2151   withval="$with_sql_module"
2152   
2153         ol_arg=invalid
2154         for ol_val in static dynamic ; do
2155                 if test "$withval" = "$ol_val" ; then
2156                         ol_arg="$ol_val"
2157                 fi
2158         done
2159         if test "$ol_arg" = "invalid" ; then
2160                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2161         fi
2162         ol_with_sql_module="$ol_arg"
2163
2164 else
2165         ol_with_sql_module="static"
2166 fi
2167 # end --with-sql_module
2168
2169 # OpenLDAP --enable-tcl
2170         # Check whether --enable-tcl or --disable-tcl was given.
2171 if test "${enable_tcl+set}" = set; then
2172   enableval="$enable_tcl"
2173   
2174         ol_arg=invalid
2175         for ol_val in auto yes no ; do
2176                 if test "$enableval" = "$ol_val" ; then
2177                         ol_arg="$ol_val"
2178                 fi
2179         done
2180         if test "$ol_arg" = "invalid" ; then
2181                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2182         fi
2183         ol_enable_tcl="$ol_arg"
2184
2185 else
2186         ol_enable_tcl="no"
2187 fi
2188 # end --enable-tcl
2189 # OpenLDAP --with-tcl_module
2190         # Check whether --with-tcl_module or --without-tcl_module was given.
2191 if test "${with_tcl_module+set}" = set; then
2192   withval="$with_tcl_module"
2193   
2194         ol_arg=invalid
2195         for ol_val in static dynamic ; do
2196                 if test "$withval" = "$ol_val" ; then
2197                         ol_arg="$ol_val"
2198                 fi
2199         done
2200         if test "$ol_arg" = "invalid" ; then
2201                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2202         fi
2203         ol_with_tcl_module="$ol_arg"
2204
2205 else
2206         ol_with_tcl_module="static"
2207 fi
2208 # end --with-tcl_module
2209
2210
2211 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2212 if test "${with_xxslurpdoptions+set}" = set; then
2213   withval="$with_xxslurpdoptions"
2214   :
2215 fi
2216
2217 # OpenLDAP --enable-slurpd
2218         # Check whether --enable-slurpd or --disable-slurpd was given.
2219 if test "${enable_slurpd+set}" = set; then
2220   enableval="$enable_slurpd"
2221   
2222         ol_arg=invalid
2223         for ol_val in auto yes no ; do
2224                 if test "$enableval" = "$ol_val" ; then
2225                         ol_arg="$ol_val"
2226                 fi
2227         done
2228         if test "$ol_arg" = "invalid" ; then
2229                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2230         fi
2231         ol_enable_slurpd="$ol_arg"
2232
2233 else
2234         ol_enable_slurpd="auto"
2235 fi
2236 # end --enable-slurpd
2237
2238 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2239 if test "${with_xxliboptions+set}" = set; then
2240   withval="$with_xxliboptions"
2241   :
2242 fi
2243
2244 # Check whether --enable-static or --disable-static was given.
2245 if test "${enable_static+set}" = set; then
2246   enableval="$enable_static"
2247   p=${PACKAGE-default}
2248 case "$enableval" in
2249 yes) enable_static=yes ;;
2250 no) enable_static=no ;;
2251 *)
2252   enable_static=no
2253   # Look at the argument we got.  We use all the common list separators.
2254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2255   for pkg in $enableval; do
2256     if test "X$pkg" = "X$p"; then
2257       enable_static=yes
2258     fi
2259   done
2260   IFS="$ac_save_ifs"
2261   ;;
2262 esac
2263 else
2264   enable_static=yes
2265 fi
2266
2267 # Check whether --enable-shared or --disable-shared was given.
2268 if test "${enable_shared+set}" = set; then
2269   enableval="$enable_shared"
2270   p=${PACKAGE-default}
2271 case "$enableval" in
2272 yes) enable_shared=yes ;;
2273 no) enable_shared=no ;;
2274 *)
2275   enable_shared=no
2276   # Look at the argument we got.  We use all the common list separators.
2277   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2278   for pkg in $enableval; do
2279     if test "X$pkg" = "X$p"; then
2280       enable_shared=yes
2281     fi
2282   done
2283   IFS="$ac_save_ifs"
2284   ;;
2285 esac
2286 else
2287   enable_shared=yes
2288 fi
2289
2290
2291
2292 # validate options
2293 if test $ol_enable_slapd = no ; then
2294                 if test $ol_enable_bdb = yes ; then
2295                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2296         fi
2297         if test $ol_enable_dnssrv = yes ; then
2298                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2299         fi
2300         if test $ol_enable_ldap = yes ; then
2301                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2302         fi
2303         if test $ol_enable_ldbm = yes ; then
2304                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2305         fi
2306         if test $ol_enable_passwd = yes ; then
2307                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2308         fi
2309         if test $ol_enable_perl = yes ; then
2310                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2311         fi
2312         if test $ol_enable_shell = yes ; then
2313                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2314         fi
2315         if test $ol_enable_tcl = yes ; then
2316                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2317         fi
2318         if test $ol_enable_sql = yes ; then
2319                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2320         fi
2321         if test $ol_enable_modules = yes ; then
2322                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2323         fi
2324         if test $ol_enable_wrappers = yes ; then
2325                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2326         fi
2327         if test $ol_enable_phonetic = yes ; then
2328                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2329         fi
2330         if test $ol_enable_rlookups = yes ; then
2331                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2332         fi
2333         if test $ol_enable_aci = yes ; then
2334                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2335         fi
2336         if test $ol_with_ldbm_api != auto ; then
2337                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2338         fi
2339         if test $ol_with_ldbm_type != auto ; then
2340                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2341         fi
2342         if test $ol_with_bdb_module != static ; then
2343                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2344         fi
2345         if test $ol_with_dnssrv_module != static ; then
2346                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2347         fi
2348         if test $ol_with_ldap_module != static ; then
2349                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2350         fi
2351         if test $ol_with_ldbm_module != static ; then
2352                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2353         fi
2354         if test $ol_with_passwd_module != static ; then
2355                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2356         fi
2357         if test $ol_with_perl_module != static ; then
2358                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2359         fi
2360         if test $ol_with_shell_module != static ; then
2361                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2362         fi
2363         if test $ol_with_tcl_module != static ; then
2364                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2365         fi
2366         if test $ol_with_sql_module != static ; then
2367                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2368         fi
2369         if test $ol_enable_slurpd = yes ; then
2370                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2371         fi
2372
2373         # force settings to no
2374         ol_enable_bdb=no
2375         ol_enable_dnssrv=no
2376         ol_enable_ldap=no
2377         ol_enable_ldbm=no
2378         ol_enable_passwd=no
2379         ol_enable_perl=no
2380         ol_enable_shell=no
2381         ol_enable_tcl=no
2382         ol_enable_sql=no
2383
2384         ol_enable_modules=no
2385         ol_enable_phonetic=no
2386         ol_enable_rlookups=no
2387         ol_enable_aci=no
2388         ol_enable_wrappers=no
2389         ol_enable_dynamic=no
2390
2391         ol_with_ldbm_api=no
2392         ol_with_ldbm_type=no
2393
2394         ol_with_bdb_module=static
2395         ol_with_dnssrv_module=static
2396         ol_with_ldap_module=static
2397         ol_with_ldbm_module=static
2398         ol_with_passwd_module=static
2399         ol_with_perl_module=static
2400         ol_with_shell_module=static
2401         ol_with_tcl_module=static
2402         ol_with_sql_module=static
2403
2404         ol_enable_slurpd=no
2405
2406 elif test $ol_enable_ldbm = no ; then
2407         
2408         if test $ol_with_ldbm_api != auto ; then
2409                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2410         fi
2411
2412         if test $ol_with_ldbm_type != auto ; then
2413                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2414         fi
2415
2416         if test $ol_with_ldbm_module != static ; then
2417                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2418         fi
2419
2420         if test $ol_enable_modules != yes -a \
2421                 $ol_enable_bdb = no -a \
2422                 $ol_enable_dnssrv = no -a \
2423                 $ol_enable_ldap = no -a \
2424                 $ol_enable_passwd = no -a \
2425                 $ol_enable_perl = no -a \
2426                 $ol_enable_shell = no -a \
2427                 $ol_enable_sql = no -a \
2428                 $ol_enable_tcl = no ; then
2429                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2430         fi
2431
2432         ol_with_ldbm_api=no
2433         ol_with_ldbm_type=no
2434         ol_with_ldbm_module=static
2435
2436 else
2437                 if test $ol_with_ldbm_api = gdbm -a \
2438                 $ol_with_ldbm_type = btree ; then
2439                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2440         fi
2441         if test $ol_with_ldbm_api = mdbm -a \
2442                 $ol_with_ldbm_type = btree ; then
2443                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2444         fi
2445         if test $ol_with_ldbm_api = ndbm -a \
2446                 $ol_with_ldbm_type = btree ; then
2447                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2448         fi
2449 fi
2450
2451 if test $ol_enable_slurpd = yes ; then
2452                 if test $ol_with_threads = no ; then
2453                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2454         fi
2455 fi
2456
2457 if test $ol_enable_lmpasswd = yes ; then
2458         if test $ol_with_tls = no ; then
2459                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2460         fi
2461 fi
2462
2463 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2464         if test $ol_with_kerberos = no ; then
2465                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2466         fi
2467         ol_with_kerberos=yes
2468 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2469         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2470                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2471         fi
2472         ol_with_kerberos=no
2473 fi
2474
2475 if test $ol_enable_spasswd = yes ; then
2476         if test $ol_with_cyrus_sasl = no ; then
2477                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2478         fi
2479         ol_with_cyrus_sasl=yes
2480 fi
2481
2482 echo "$ac_t""done" 1>&6
2483
2484 LDAP_LIBS=
2485 LDIF_LIBS=
2486 LDBM_LIBS=
2487 LTHREAD_LIBS=
2488 LUTIL_LIBS=
2489
2490 SLAPD_LIBS=
2491 SLURPD_LIBS=
2492
2493 BUILD_SLAPD=no
2494 BUILD_SLURPD=no
2495
2496 BUILD_THREAD=no
2497
2498 BUILD_BDB=no
2499 BUILD_DNSSRV=no
2500 BUILD_LDAP=no
2501 BUILD_LDBM=no
2502 BUILD_PASSWD=no
2503 BUILD_PERL=no
2504 BUILD_SHELL=no
2505 BUILD_SQL=no
2506 BUILD_TCL=no
2507
2508 BUILD_BDB_DYNAMIC=static
2509 BUILD_DNSSRV_DYNAMIC=static
2510 BUILD_LDAP_DYNAMIC=static
2511 BUILD_LDBM_DYNAMIC=static
2512 BUILD_PASSWD_DYNAMIC=static
2513 BUILD_PERL_DYNAMIC=static
2514 BUILD_SHELL_DYNAMIC=static
2515 BUILD_TCL_DYNAMIC=static
2516 BUILD_SQL_DYNAMIC=static
2517
2518 SLAPD_MODULES_LDFLAGS=
2519 SLAPD_MODULES_CPPFLAGS=
2520 SLAPD_MODULES_LIST=
2521
2522 SLAPD_PERL_LDFLAGS=
2523 MOD_PERL_LDFLAGS=
2524 PERL_CPPFLAGS=
2525
2526 SLAPD_SQL_LDFLAGS=
2527 SLAPD_SQL_LIBS=
2528 SLAPD_SQL_INCLUDES=
2529
2530 MOD_TCL_LIB=
2531 KRB4_LIBS=
2532 KRB5_LIBS=
2533 READLINE_LIBS=
2534 SASL_LIBS=
2535 TERMCAP_LIBS=
2536 TLS_LIBS=
2537 MODULES_LIBS=
2538 AUTH_LIBS=
2539
2540 SLAPD_SLP_LIBS=
2541
2542
2543
2544 cat >> confdefs.h <<\EOF
2545 #define HAVE_MKVERSION 1
2546 EOF
2547
2548
2549
2550
2551 ol_aix_threads=no
2552 case "$target" in
2553 *-*-aix*)       if test -z "$CC" ; then
2554                 case "$ol_with_threads" in
2555                 auto | yes |  posix) ol_aix_threads=yes ;;
2556                 esac
2557         fi
2558 ;;
2559 esac
2560
2561 if test $ol_aix_threads = yes ; then
2562         if test -z "${CC}" ; then
2563                 for ac_prog in cc_r xlc_r cc
2564 do
2565 # Extract the first word of "$ac_prog", so it can be a program name with args.
2566 set dummy $ac_prog; ac_word=$2
2567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2568 echo "configure:2569: checking for $ac_word" >&5
2569 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2570   echo $ac_n "(cached) $ac_c" 1>&6
2571 else
2572   if test -n "$CC"; then
2573   ac_cv_prog_CC="$CC" # Let the user override the test.
2574 else
2575   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2576   ac_dummy="$PATH"
2577   for ac_dir in $ac_dummy; do
2578     test -z "$ac_dir" && ac_dir=.
2579     if test -f $ac_dir/$ac_word; then
2580       ac_cv_prog_CC="$ac_prog"
2581       break
2582     fi
2583   done
2584   IFS="$ac_save_ifs"
2585 fi
2586 fi
2587 CC="$ac_cv_prog_CC"
2588 if test -n "$CC"; then
2589   echo "$ac_t""$CC" 1>&6
2590 else
2591   echo "$ac_t""no" 1>&6
2592 fi
2593
2594 test -n "$CC" && break
2595 done
2596
2597
2598                 if test "$CC" = cc ; then
2599                                                 if test $ol_with_threads != auto ; then
2600                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2601                         else
2602                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2603                         fi
2604                         ol_with_threads=no
2605                 fi
2606         fi
2607
2608         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2609                 ol_with_threads=posix
2610                 ol_cv_pthread_create=yes
2611         fi
2612 fi
2613
2614 if test -z "${CC}"; then
2615         for ac_prog in cc
2616 do
2617 # Extract the first word of "$ac_prog", so it can be a program name with args.
2618 set dummy $ac_prog; ac_word=$2
2619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2620 echo "configure:2621: checking for $ac_word" >&5
2621 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2622   echo $ac_n "(cached) $ac_c" 1>&6
2623 else
2624   if test -n "$CC"; then
2625   ac_cv_prog_CC="$CC" # Let the user override the test.
2626 else
2627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2628   ac_dummy="$PATH"
2629   for ac_dir in $ac_dummy; do
2630     test -z "$ac_dir" && ac_dir=.
2631     if test -f $ac_dir/$ac_word; then
2632       ac_cv_prog_CC="$ac_prog"
2633       break
2634     fi
2635   done
2636   IFS="$ac_save_ifs"
2637 fi
2638 fi
2639 CC="$ac_cv_prog_CC"
2640 if test -n "$CC"; then
2641   echo "$ac_t""$CC" 1>&6
2642 else
2643   echo "$ac_t""no" 1>&6
2644 fi
2645
2646 test -n "$CC" && break
2647 done
2648
2649 fi
2650
2651
2652
2653
2654 # Check whether --enable-fast-install or --disable-fast-install was given.
2655 if test "${enable_fast_install+set}" = set; then
2656   enableval="$enable_fast_install"
2657   p=${PACKAGE-default}
2658 case "$enableval" in
2659 yes) enable_fast_install=yes ;;
2660 no) enable_fast_install=no ;;
2661 *)
2662   enable_fast_install=no
2663   # Look at the argument we got.  We use all the common list separators.
2664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2665   for pkg in $enableval; do
2666     if test "X$pkg" = "X$p"; then
2667       enable_fast_install=yes
2668     fi
2669   done
2670   IFS="$ac_save_ifs"
2671   ;;
2672 esac
2673 else
2674   enable_fast_install=yes
2675 fi
2676
2677 # Extract the first word of "ranlib", so it can be a program name with args.
2678 set dummy ranlib; ac_word=$2
2679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2680 echo "configure:2681: checking for $ac_word" >&5
2681 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   if test -n "$RANLIB"; then
2685   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2686 else
2687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2688   ac_dummy="$PATH"
2689   for ac_dir in $ac_dummy; do
2690     test -z "$ac_dir" && ac_dir=.
2691     if test -f $ac_dir/$ac_word; then
2692       ac_cv_prog_RANLIB="ranlib"
2693       break
2694     fi
2695   done
2696   IFS="$ac_save_ifs"
2697   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2698 fi
2699 fi
2700 RANLIB="$ac_cv_prog_RANLIB"
2701 if test -n "$RANLIB"; then
2702   echo "$ac_t""$RANLIB" 1>&6
2703 else
2704   echo "$ac_t""no" 1>&6
2705 fi
2706
2707 # Extract the first word of "gcc", so it can be a program name with args.
2708 set dummy gcc; ac_word=$2
2709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2710 echo "configure:2711: checking for $ac_word" >&5
2711 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2712   echo $ac_n "(cached) $ac_c" 1>&6
2713 else
2714   if test -n "$CC"; then
2715   ac_cv_prog_CC="$CC" # Let the user override the test.
2716 else
2717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2718   ac_dummy="$PATH"
2719   for ac_dir in $ac_dummy; do
2720     test -z "$ac_dir" && ac_dir=.
2721     if test -f $ac_dir/$ac_word; then
2722       ac_cv_prog_CC="gcc"
2723       break
2724     fi
2725   done
2726   IFS="$ac_save_ifs"
2727 fi
2728 fi
2729 CC="$ac_cv_prog_CC"
2730 if test -n "$CC"; then
2731   echo "$ac_t""$CC" 1>&6
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735
2736 if test -z "$CC"; then
2737   # Extract the first word of "cc", so it can be a program name with args.
2738 set dummy cc; ac_word=$2
2739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2740 echo "configure:2741: checking for $ac_word" >&5
2741 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   if test -n "$CC"; then
2745   ac_cv_prog_CC="$CC" # Let the user override the test.
2746 else
2747   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2748   ac_prog_rejected=no
2749   ac_dummy="$PATH"
2750   for ac_dir in $ac_dummy; do
2751     test -z "$ac_dir" && ac_dir=.
2752     if test -f $ac_dir/$ac_word; then
2753       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2754         ac_prog_rejected=yes
2755         continue
2756       fi
2757       ac_cv_prog_CC="cc"
2758       break
2759     fi
2760   done
2761   IFS="$ac_save_ifs"
2762 if test $ac_prog_rejected = yes; then
2763   # We found a bogon in the path, so make sure we never use it.
2764   set dummy $ac_cv_prog_CC
2765   shift
2766   if test $# -gt 0; then
2767     # We chose a different compiler from the bogus one.
2768     # However, it has the same basename, so the bogon will be chosen
2769     # first if we set CC to just the basename; use the full file name.
2770     shift
2771     set dummy "$ac_dir/$ac_word" "$@"
2772     shift
2773     ac_cv_prog_CC="$@"
2774   fi
2775 fi
2776 fi
2777 fi
2778 CC="$ac_cv_prog_CC"
2779 if test -n "$CC"; then
2780   echo "$ac_t""$CC" 1>&6
2781 else
2782   echo "$ac_t""no" 1>&6
2783 fi
2784
2785   if test -z "$CC"; then
2786     case "`uname -s`" in
2787     *win32* | *WIN32* | *CYGWIN*)
2788       # Extract the first word of "cl", so it can be a program name with args.
2789 set dummy cl; ac_word=$2
2790 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2791 echo "configure:2792: checking for $ac_word" >&5
2792 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   if test -n "$CC"; then
2796   ac_cv_prog_CC="$CC" # Let the user override the test.
2797 else
2798   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2799   ac_dummy="$PATH"
2800   for ac_dir in $ac_dummy; do
2801     test -z "$ac_dir" && ac_dir=.
2802     if test -f $ac_dir/$ac_word; then
2803       ac_cv_prog_CC="cl"
2804       break
2805     fi
2806   done
2807   IFS="$ac_save_ifs"
2808 fi
2809 fi
2810 CC="$ac_cv_prog_CC"
2811 if test -n "$CC"; then
2812   echo "$ac_t""$CC" 1>&6
2813 else
2814   echo "$ac_t""no" 1>&6
2815 fi
2816  ;;
2817     esac
2818   fi
2819   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2820 fi
2821
2822 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2823 echo "configure:2824: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2824
2825 ac_ext=c
2826 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2827 ac_cpp='$CPP $CPPFLAGS'
2828 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2829 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2830 cross_compiling=$ac_cv_prog_cc_cross
2831
2832 cat > conftest.$ac_ext << EOF
2833
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836
2837 main(){return(0);}
2838 EOF
2839 if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2840   ac_cv_prog_cc_works=yes
2841   # If we can't run a trivial program, we are probably using a cross compiler.
2842   if (./conftest; exit) 2>/dev/null; then
2843     ac_cv_prog_cc_cross=no
2844   else
2845     ac_cv_prog_cc_cross=yes
2846   fi
2847 else
2848   echo "configure: failed program was:" >&5
2849   cat conftest.$ac_ext >&5
2850   ac_cv_prog_cc_works=no
2851 fi
2852 rm -fr conftest*
2853 ac_ext=c
2854 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2855 ac_cpp='$CPP $CPPFLAGS'
2856 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2857 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2858 cross_compiling=$ac_cv_prog_cc_cross
2859
2860 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2861 if test $ac_cv_prog_cc_works = no; then
2862   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2863 fi
2864 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2865 echo "configure:2866: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2866 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2867 cross_compiling=$ac_cv_prog_cc_cross
2868
2869 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2870 echo "configure:2871: checking whether we are using GNU C" >&5
2871 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2872   echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874   cat > conftest.c <<EOF
2875 #ifdef __GNUC__
2876   yes;
2877 #endif
2878 EOF
2879 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2880   ac_cv_prog_gcc=yes
2881 else
2882   ac_cv_prog_gcc=no
2883 fi
2884 fi
2885
2886 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2887
2888 if test $ac_cv_prog_gcc = yes; then
2889   GCC=yes
2890 else
2891   GCC=
2892 fi
2893
2894 ac_test_CFLAGS="${CFLAGS+set}"
2895 ac_save_CFLAGS="$CFLAGS"
2896 CFLAGS=
2897 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2898 echo "configure:2899: checking whether ${CC-cc} accepts -g" >&5
2899 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   echo 'void f(){}' > conftest.c
2903 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2904   ac_cv_prog_cc_g=yes
2905 else
2906   ac_cv_prog_cc_g=no
2907 fi
2908 rm -f conftest*
2909
2910 fi
2911
2912 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2913 if test "$ac_test_CFLAGS" = set; then
2914   CFLAGS="$ac_save_CFLAGS"
2915 elif test $ac_cv_prog_cc_g = yes; then
2916   if test "$GCC" = yes; then
2917     CFLAGS="-g -O2"
2918   else
2919     CFLAGS="-g"
2920   fi
2921 else
2922   if test "$GCC" = yes; then
2923     CFLAGS="-O2"
2924   else
2925     CFLAGS=
2926   fi
2927 fi
2928
2929 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2930 if test "${with_gnu_ld+set}" = set; then
2931   withval="$with_gnu_ld"
2932   test "$withval" = no || with_gnu_ld=yes
2933 else
2934   with_gnu_ld=no
2935 fi
2936
2937 ac_prog=ld
2938 if test "$ac_cv_prog_gcc" = yes; then
2939   # Check if gcc -print-prog-name=ld gives a path.
2940   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2941 echo "configure:2942: checking for ld used by GCC" >&5
2942   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2943   case "$ac_prog" in
2944     # Accept absolute paths.
2945     [\\/]* | [A-Za-z]:[\\/]*)
2946       re_direlt='/[^/][^/]*/\.\./'
2947       # Canonicalize the path of ld
2948       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2949       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2950         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2951       done
2952       test -z "$LD" && LD="$ac_prog"
2953       ;;
2954   "")
2955     # If it fails, then pretend we aren't using GCC.
2956     ac_prog=ld
2957     ;;
2958   *)
2959     # If it is relative, then search for the first ld in PATH.
2960     with_gnu_ld=unknown
2961     ;;
2962   esac
2963 elif test "$with_gnu_ld" = yes; then
2964   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2965 echo "configure:2966: checking for GNU ld" >&5
2966 else
2967   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2968 echo "configure:2969: checking for non-GNU ld" >&5
2969 fi
2970 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2971   echo $ac_n "(cached) $ac_c" 1>&6
2972 else
2973   if test -z "$LD"; then
2974   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2975   for ac_dir in $PATH; do
2976     test -z "$ac_dir" && ac_dir=.
2977     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2978       ac_cv_path_LD="$ac_dir/$ac_prog"
2979       # Check to see if the program is GNU ld.  I'd rather use --version,
2980       # but apparently some GNU ld's only accept -v.
2981       # Break only if it was the GNU/non-GNU ld that we prefer.
2982       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2983         test "$with_gnu_ld" != no && break
2984       else
2985         test "$with_gnu_ld" != yes && break
2986       fi
2987     fi
2988   done
2989   IFS="$ac_save_ifs"
2990 else
2991   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2992 fi
2993 fi
2994
2995 LD="$ac_cv_path_LD"
2996 if test -n "$LD"; then
2997   echo "$ac_t""$LD" 1>&6
2998 else
2999   echo "$ac_t""no" 1>&6
3000 fi
3001 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3002 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3003 echo "configure:3004: checking if the linker ($LD) is GNU ld" >&5
3004 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3005   echo $ac_n "(cached) $ac_c" 1>&6
3006 else
3007   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3008 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3009   ac_cv_prog_gnu_ld=yes
3010 else
3011   ac_cv_prog_gnu_ld=no
3012 fi
3013 fi
3014
3015 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3016
3017
3018 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3019 echo "configure:3020: checking for BSD-compatible nm" >&5
3020 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   if test -n "$NM"; then
3024   # Let the user override the test.
3025   ac_cv_path_NM="$NM"
3026 else
3027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3028   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3029     test -z "$ac_dir" && ac_dir=.
3030     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3031       # Check to see if the nm accepts a BSD-compat flag.
3032       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3033       #   nm: unknown option "B" ignored
3034       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3035         ac_cv_path_NM="$ac_dir/nm -B"
3036         break
3037       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3038         ac_cv_path_NM="$ac_dir/nm -p"
3039         break
3040       else
3041         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3042         continue # so that we can try to find one that supports BSD flags
3043       fi
3044     fi
3045   done
3046   IFS="$ac_save_ifs"
3047   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3048 fi
3049 fi
3050
3051 NM="$ac_cv_path_NM"
3052 echo "$ac_t""$NM" 1>&6
3053
3054 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3055 echo "configure:3056: checking whether ln -s works" >&5
3056 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3057   echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059   rm -f conftestdata
3060 if ln -s X conftestdata 2>/dev/null
3061 then
3062   rm -f conftestdata
3063   ac_cv_prog_LN_S="ln -s"
3064 else
3065   ac_cv_prog_LN_S=ln
3066 fi
3067 fi
3068 LN_S="$ac_cv_prog_LN_S"
3069 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3070   echo "$ac_t""yes" 1>&6
3071 else
3072   echo "$ac_t""no" 1>&6
3073 fi
3074
3075 if test $host != $build; then
3076   ac_tool_prefix=${host_alias}-
3077 else
3078   ac_tool_prefix=
3079 fi
3080
3081
3082 case "$target" in
3083 NONE) lt_target="$host" ;;
3084 *) lt_target="$target" ;;
3085 esac
3086
3087 # Check for any special flags to pass to ltconfig.
3088 libtool_flags="--cache-file=$cache_file"
3089 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3090 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3091 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3092 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3093 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3094 libtool_flags="$libtool_flags --enable-dlopen"
3095 libtool_flags="$libtool_flags --enable-win32-dll"
3096 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3097 if test "${enable_libtool_lock+set}" = set; then
3098   enableval="$enable_libtool_lock"
3099   :
3100 fi
3101
3102 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3103 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3104
3105 # Some flags need to be propagated to the compiler or linker for good
3106 # libtool support.
3107 case "$lt_target" in
3108 *-*-irix6*)
3109   # Find out which ABI we are using.
3110   echo '#line 3111 "configure"' > conftest.$ac_ext
3111   if { (eval echo configure:3112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3112     case "`/usr/bin/file conftest.o`" in
3113     *32-bit*)
3114       LD="${LD-ld} -32"
3115       ;;
3116     *N32*)
3117       LD="${LD-ld} -n32"
3118       ;;
3119     *64-bit*)
3120       LD="${LD-ld} -64"
3121       ;;
3122     esac
3123   fi
3124   rm -rf conftest*
3125   ;;
3126
3127 *-*-sco3.2v5*)
3128   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3129   SAVE_CFLAGS="$CFLAGS"
3130   CFLAGS="$CFLAGS -belf"
3131   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3132 echo "configure:3133: checking whether the C compiler needs -belf" >&5
3133 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139
3140 int main() {
3141
3142 ; return 0; }
3143 EOF
3144 if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3145   rm -rf conftest*
3146   lt_cv_cc_needs_belf=yes
3147 else
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   lt_cv_cc_needs_belf=no
3152 fi
3153 rm -f conftest*
3154 fi
3155
3156 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3157   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3158     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3159     CFLAGS="$SAVE_CFLAGS"
3160   fi
3161   ;;
3162
3163 *-*-cygwin* | *-*-mingw*)
3164   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3165 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3167 echo "configure:3168: checking for $ac_word" >&5
3168 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3169   echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171   if test -n "$DLLTOOL"; then
3172   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3173 else
3174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3175   ac_dummy="$PATH"
3176   for ac_dir in $ac_dummy; do
3177     test -z "$ac_dir" && ac_dir=.
3178     if test -f $ac_dir/$ac_word; then
3179       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3180       break
3181     fi
3182   done
3183   IFS="$ac_save_ifs"
3184 fi
3185 fi
3186 DLLTOOL="$ac_cv_prog_DLLTOOL"
3187 if test -n "$DLLTOOL"; then
3188   echo "$ac_t""$DLLTOOL" 1>&6
3189 else
3190   echo "$ac_t""no" 1>&6
3191 fi
3192
3193
3194 if test -z "$ac_cv_prog_DLLTOOL"; then
3195 if test -n "$ac_tool_prefix"; then
3196   # Extract the first word of "dlltool", so it can be a program name with args.
3197 set dummy dlltool; ac_word=$2
3198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3199 echo "configure:3200: checking for $ac_word" >&5
3200 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   if test -n "$DLLTOOL"; then
3204   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3205 else
3206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3207   ac_dummy="$PATH"
3208   for ac_dir in $ac_dummy; do
3209     test -z "$ac_dir" && ac_dir=.
3210     if test -f $ac_dir/$ac_word; then
3211       ac_cv_prog_DLLTOOL="dlltool"
3212       break
3213     fi
3214   done
3215   IFS="$ac_save_ifs"
3216   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3217 fi
3218 fi
3219 DLLTOOL="$ac_cv_prog_DLLTOOL"
3220 if test -n "$DLLTOOL"; then
3221   echo "$ac_t""$DLLTOOL" 1>&6
3222 else
3223   echo "$ac_t""no" 1>&6
3224 fi
3225
3226 else
3227   DLLTOOL="false"
3228 fi
3229 fi
3230
3231   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3232 set dummy ${ac_tool_prefix}as; ac_word=$2
3233 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3234 echo "configure:3235: checking for $ac_word" >&5
3235 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3236   echo $ac_n "(cached) $ac_c" 1>&6
3237 else
3238   if test -n "$AS"; then
3239   ac_cv_prog_AS="$AS" # Let the user override the test.
3240 else
3241   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3242   ac_dummy="$PATH"
3243   for ac_dir in $ac_dummy; do
3244     test -z "$ac_dir" && ac_dir=.
3245     if test -f $ac_dir/$ac_word; then
3246       ac_cv_prog_AS="${ac_tool_prefix}as"
3247       break
3248     fi
3249   done
3250   IFS="$ac_save_ifs"
3251 fi
3252 fi
3253 AS="$ac_cv_prog_AS"
3254 if test -n "$AS"; then
3255   echo "$ac_t""$AS" 1>&6
3256 else
3257   echo "$ac_t""no" 1>&6
3258 fi
3259
3260
3261 if test -z "$ac_cv_prog_AS"; then
3262 if test -n "$ac_tool_prefix"; then
3263   # Extract the first word of "as", so it can be a program name with args.
3264 set dummy as; ac_word=$2
3265 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3266 echo "configure:3267: checking for $ac_word" >&5
3267 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3268   echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270   if test -n "$AS"; then
3271   ac_cv_prog_AS="$AS" # Let the user override the test.
3272 else
3273   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3274   ac_dummy="$PATH"
3275   for ac_dir in $ac_dummy; do
3276     test -z "$ac_dir" && ac_dir=.
3277     if test -f $ac_dir/$ac_word; then
3278       ac_cv_prog_AS="as"
3279       break
3280     fi
3281   done
3282   IFS="$ac_save_ifs"
3283   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3284 fi
3285 fi
3286 AS="$ac_cv_prog_AS"
3287 if test -n "$AS"; then
3288   echo "$ac_t""$AS" 1>&6
3289 else
3290   echo "$ac_t""no" 1>&6
3291 fi
3292
3293 else
3294   AS="false"
3295 fi
3296 fi
3297
3298   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3299 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3301 echo "configure:3302: checking for $ac_word" >&5
3302 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   if test -n "$OBJDUMP"; then
3306   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3307 else
3308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3309   ac_dummy="$PATH"
3310   for ac_dir in $ac_dummy; do
3311     test -z "$ac_dir" && ac_dir=.
3312     if test -f $ac_dir/$ac_word; then
3313       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3314       break
3315     fi
3316   done
3317   IFS="$ac_save_ifs"
3318 fi
3319 fi
3320 OBJDUMP="$ac_cv_prog_OBJDUMP"
3321 if test -n "$OBJDUMP"; then
3322   echo "$ac_t""$OBJDUMP" 1>&6
3323 else
3324   echo "$ac_t""no" 1>&6
3325 fi
3326
3327
3328 if test -z "$ac_cv_prog_OBJDUMP"; then
3329 if test -n "$ac_tool_prefix"; then
3330   # Extract the first word of "objdump", so it can be a program name with args.
3331 set dummy objdump; ac_word=$2
3332 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3333 echo "configure:3334: checking for $ac_word" >&5
3334 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   if test -n "$OBJDUMP"; then
3338   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3339 else
3340   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3341   ac_dummy="$PATH"
3342   for ac_dir in $ac_dummy; do
3343     test -z "$ac_dir" && ac_dir=.
3344     if test -f $ac_dir/$ac_word; then
3345       ac_cv_prog_OBJDUMP="objdump"
3346       break
3347     fi
3348   done
3349   IFS="$ac_save_ifs"
3350   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3351 fi
3352 fi
3353 OBJDUMP="$ac_cv_prog_OBJDUMP"
3354 if test -n "$OBJDUMP"; then
3355   echo "$ac_t""$OBJDUMP" 1>&6
3356 else
3357   echo "$ac_t""no" 1>&6
3358 fi
3359
3360 else
3361   OBJDUMP="false"
3362 fi
3363 fi
3364
3365   ;;
3366
3367 esac
3368
3369
3370 # Save cache, so that ltconfig can load it
3371
3372
3373 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3374 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3375 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3376 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3377 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3378 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3379 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3380 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3381
3382 # Reload cache, that may have been modified by ltconfig
3383
3384
3385 # This can be used to rebuild libtool when needed
3386 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3387
3388 # Always use our own libtool.
3389 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3390
3391 # Redirect the config.log output again, so that the ltconfig log is not
3392 # clobbered by the next message.
3393 exec 5>>./config.log
3394
3395
3396 for ac_prog in mawk gawk nawk awk
3397 do
3398 # Extract the first word of "$ac_prog", so it can be a program name with args.
3399 set dummy $ac_prog; ac_word=$2
3400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3401 echo "configure:3402: checking for $ac_word" >&5
3402 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   if test -n "$AWK"; then
3406   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3407 else
3408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3409   ac_dummy="$PATH"
3410   for ac_dir in $ac_dummy; do
3411     test -z "$ac_dir" && ac_dir=.
3412     if test -f $ac_dir/$ac_word; then
3413       ac_cv_prog_AWK="$ac_prog"
3414       break
3415     fi
3416   done
3417   IFS="$ac_save_ifs"
3418 fi
3419 fi
3420 AWK="$ac_cv_prog_AWK"
3421 if test -n "$AWK"; then
3422   echo "$ac_t""$AWK" 1>&6
3423 else
3424   echo "$ac_t""no" 1>&6
3425 fi
3426
3427 test -n "$AWK" && break
3428 done
3429
3430 # test for ln hardlink support
3431 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3432 echo "configure:3433: checking whether ln works" >&5
3433 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3434   echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436   rm -f conftest.src conftest.dst
3437 echo "conftest" > conftest.src
3438 if ln conftest.src conftest.dst 2>/dev/null
3439 then
3440   ol_cv_prog_LN_H="ln"
3441 else
3442   ol_cv_prog_LN_H="cp"
3443 fi
3444 rm -f conftest.src conftest.dst
3445
3446 fi
3447 LN_H="$ol_cv_prog_LN_H"
3448 if test "$ol_cv_prog_LN_H" = "ln"; then
3449         echo "$ac_t""yes" 1>&6
3450 else
3451         echo "$ac_t""no" 1>&6
3452 fi
3453
3454 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3455 echo "configure:3456: checking whether ln -s works" >&5
3456 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3457   echo $ac_n "(cached) $ac_c" 1>&6
3458 else
3459   rm -f conftestdata
3460 if ln -s X conftestdata 2>/dev/null
3461 then
3462   rm -f conftestdata
3463   ac_cv_prog_LN_S="ln -s"
3464 else
3465   ac_cv_prog_LN_S=ln
3466 fi
3467 fi
3468 LN_S="$ac_cv_prog_LN_S"
3469 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3470   echo "$ac_t""yes" 1>&6
3471 else
3472   echo "$ac_t""no" 1>&6
3473 fi
3474
3475
3476 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3477         LN_S="$LN_H"
3478 fi
3479
3480 # Extract the first word of "sendmail", so it can be a program name with args.
3481 set dummy sendmail; ac_word=$2
3482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3483 echo "configure:3484: checking for $ac_word" >&5
3484 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3485   echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487   case "$SENDMAIL" in
3488   /*)
3489   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3490   ;;
3491   ?:/*)
3492   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3493   ;;
3494   *)
3495   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3496   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3497   for ac_dir in $ac_dummy; do 
3498     test -z "$ac_dir" && ac_dir=.
3499     if test -f $ac_dir/$ac_word; then
3500       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3501       break
3502     fi
3503   done
3504   IFS="$ac_save_ifs"
3505   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3506   ;;
3507 esac
3508 fi
3509 SENDMAIL="$ac_cv_path_SENDMAIL"
3510 if test -n "$SENDMAIL"; then
3511   echo "$ac_t""$SENDMAIL" 1>&6
3512 else
3513   echo "$ac_t""no" 1>&6
3514 fi
3515
3516 # Extract the first word of "vi", so it can be a program name with args.
3517 set dummy vi; ac_word=$2
3518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3519 echo "configure:3520: checking for $ac_word" >&5
3520 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3521   echo $ac_n "(cached) $ac_c" 1>&6
3522 else
3523   case "$EDITOR" in
3524   /*)
3525   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3526   ;;
3527   ?:/*)
3528   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3529   ;;
3530   *)
3531   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3532   ac_dummy="$PATH:/usr/ucb"
3533   for ac_dir in $ac_dummy; do 
3534     test -z "$ac_dir" && ac_dir=.
3535     if test -f $ac_dir/$ac_word; then
3536       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3537       break
3538     fi
3539   done
3540   IFS="$ac_save_ifs"
3541   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3542   ;;
3543 esac
3544 fi
3545 EDITOR="$ac_cv_path_EDITOR"
3546 if test -n "$EDITOR"; then
3547   echo "$ac_t""$EDITOR" 1>&6
3548 else
3549   echo "$ac_t""no" 1>&6
3550 fi
3551
3552 # Extract the first word of "finger", so it can be a program name with args.
3553 set dummy finger; ac_word=$2
3554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3555 echo "configure:3556: checking for $ac_word" >&5
3556 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3557   echo $ac_n "(cached) $ac_c" 1>&6
3558 else
3559   case "$FINGER" in
3560   /*)
3561   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3562   ;;
3563   ?:/*)
3564   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3565   ;;
3566   *)
3567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3568   ac_dummy="$PATH:/usr/ucb"
3569   for ac_dir in $ac_dummy; do 
3570     test -z "$ac_dir" && ac_dir=.
3571     if test -f $ac_dir/$ac_word; then
3572       ac_cv_path_FINGER="$ac_dir/$ac_word"
3573       break
3574     fi
3575   done
3576   IFS="$ac_save_ifs"
3577   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3578   ;;
3579 esac
3580 fi
3581 FINGER="$ac_cv_path_FINGER"
3582 if test -n "$FINGER"; then
3583   echo "$ac_t""$FINGER" 1>&6
3584 else
3585   echo "$ac_t""no" 1>&6
3586 fi
3587
3588
3589 ol_link_perl=no
3590 if test $ol_enable_perl != no ; then
3591         # Extract the first word of "perl", so it can be a program name with args.
3592 set dummy perl; ac_word=$2
3593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3594 echo "configure:3595: checking for $ac_word" >&5
3595 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   case "$PERLBIN" in
3599   /*)
3600   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3601   ;;
3602   ?:/*)
3603   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3604   ;;
3605   *)
3606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3607   ac_dummy="$PATH"
3608   for ac_dir in $ac_dummy; do 
3609     test -z "$ac_dir" && ac_dir=.
3610     if test -f $ac_dir/$ac_word; then
3611       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3612       break
3613     fi
3614   done
3615   IFS="$ac_save_ifs"
3616   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3617   ;;
3618 esac
3619 fi
3620 PERLBIN="$ac_cv_path_PERLBIN"
3621 if test -n "$PERLBIN"; then
3622   echo "$ac_t""$PERLBIN" 1>&6
3623 else
3624   echo "$ac_t""no" 1>&6
3625 fi
3626
3627
3628         if test "no$PERLBIN" = "no" ; then
3629                 if test $ol_enable_perl = yes ; then
3630                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3631                 fi
3632
3633         else
3634                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3635                 if test x"$ol_with_perl_module" = "xstatic" ; then
3636                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3637                 else
3638                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3639                 fi
3640                                 ol_link_perl=yes
3641         fi
3642 fi
3643
3644 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3645 echo "configure:3646: checking how to run the C preprocessor" >&5
3646 # On Suns, sometimes $CPP names a directory.
3647 if test -n "$CPP" && test -d "$CPP"; then
3648   CPP=
3649 fi
3650 if test -z "$CPP"; then
3651 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3652   echo $ac_n "(cached) $ac_c" 1>&6
3653 else
3654     # This must be in double quotes, not single quotes, because CPP may get
3655   # substituted into the Makefile and "${CC-cc}" will confuse make.
3656   CPP="${CC-cc} -E"
3657   # On the NeXT, cc -E runs the code through the compiler's parser,
3658   # not just through cpp.
3659   cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <assert.h>
3663 Syntax Error
3664 EOF
3665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3666 { (eval echo configure:3667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3668 if test -z "$ac_err"; then
3669   :
3670 else
3671   echo "$ac_err" >&5
3672   echo "configure: failed program was:" >&5
3673   cat conftest.$ac_ext >&5
3674   rm -rf conftest*
3675   CPP="${CC-cc} -E -traditional-cpp"
3676   cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <assert.h>
3680 Syntax Error
3681 EOF
3682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3683 { (eval echo configure:3684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3685 if test -z "$ac_err"; then
3686   :
3687 else
3688   echo "$ac_err" >&5
3689   echo "configure: failed program was:" >&5
3690   cat conftest.$ac_ext >&5
3691   rm -rf conftest*
3692   CPP="${CC-cc} -nologo -E"
3693   cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <assert.h>
3697 Syntax Error
3698 EOF
3699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3700 { (eval echo configure:3701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3702 if test -z "$ac_err"; then
3703   :
3704 else
3705   echo "$ac_err" >&5
3706   echo "configure: failed program was:" >&5
3707   cat conftest.$ac_ext >&5
3708   rm -rf conftest*
3709   CPP=/lib/cpp
3710 fi
3711 rm -f conftest*
3712 fi
3713 rm -f conftest*
3714 fi
3715 rm -f conftest*
3716   ac_cv_prog_CPP="$CPP"
3717 fi
3718   CPP="$ac_cv_prog_CPP"
3719 else
3720   ac_cv_prog_CPP="$CPP"
3721 fi
3722 echo "$ac_t""$CPP" 1>&6
3723
3724
3725 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3726         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3727
3728 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3729         echo "configure: warning: programs compiled here do run here..." 1>&2
3730         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3731
3732 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3733         echo "configure: warning: programs compiled here do not run here..." 1>&2
3734         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3735 fi
3736
3737 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3738 echo "configure:3739: checking for AIX" >&5
3739 cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 #ifdef _AIX
3743   yes
3744 #endif
3745
3746 EOF
3747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3748   egrep "yes" >/dev/null 2>&1; then
3749   rm -rf conftest*
3750   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3751 #define _ALL_SOURCE 1
3752 EOF
3753
3754 else
3755   rm -rf conftest*
3756   echo "$ac_t""no" 1>&6
3757 fi
3758 rm -f conftest*
3759
3760
3761 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3762 echo "configure:3763: checking for POSIXized ISC" >&5
3763 if test -d /etc/conf/kconfig.d &&
3764   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3765 then
3766   echo "$ac_t""yes" 1>&6
3767   ISC=yes # If later tests want to check for ISC.
3768   cat >> confdefs.h <<\EOF
3769 #define _POSIX_SOURCE 1
3770 EOF
3771
3772   if test "$GCC" = yes; then
3773     CC="$CC -posix"
3774   else
3775     CC="$CC -Xp"
3776   fi
3777 else
3778   echo "$ac_t""no" 1>&6
3779   ISC=
3780 fi
3781
3782 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3783 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3784 echo "configure:3785: checking for minix/config.h" >&5
3785 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3786   echo $ac_n "(cached) $ac_c" 1>&6
3787 else
3788   cat > conftest.$ac_ext <<EOF
3789 #line 3790 "configure"
3790 #include "confdefs.h"
3791 #include <minix/config.h>
3792 EOF
3793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3794 { (eval echo configure:3795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3796 if test -z "$ac_err"; then
3797   rm -rf conftest*
3798   eval "ac_cv_header_$ac_safe=yes"
3799 else
3800   echo "$ac_err" >&5
3801   echo "configure: failed program was:" >&5
3802   cat conftest.$ac_ext >&5
3803   rm -rf conftest*
3804   eval "ac_cv_header_$ac_safe=no"
3805 fi
3806 rm -f conftest*
3807 fi
3808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3809   echo "$ac_t""yes" 1>&6
3810   MINIX=yes
3811 else
3812   echo "$ac_t""no" 1>&6
3813 MINIX=
3814 fi
3815
3816 if test "$MINIX" = yes; then
3817   cat >> confdefs.h <<\EOF
3818 #define _POSIX_SOURCE 1
3819 EOF
3820
3821   cat >> confdefs.h <<\EOF
3822 #define _POSIX_1_SOURCE 2
3823 EOF
3824
3825   cat >> confdefs.h <<\EOF
3826 #define _MINIX 1
3827 EOF
3828
3829 fi
3830
3831
3832 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3833 echo "configure:3834: checking for Cygwin environment" >&5
3834 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3835   echo $ac_n "(cached) $ac_c" 1>&6
3836 else
3837   cat > conftest.$ac_ext <<EOF
3838 #line 3839 "configure"
3839 #include "confdefs.h"
3840
3841 int main() {
3842
3843 #ifndef __CYGWIN__
3844 #define __CYGWIN__ __CYGWIN32__
3845 #endif
3846 return __CYGWIN__;
3847 ; return 0; }
3848 EOF
3849 if { (eval echo configure:3850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3850   rm -rf conftest*
3851   ac_cv_cygwin=yes
3852 else
3853   echo "configure: failed program was:" >&5
3854   cat conftest.$ac_ext >&5
3855   rm -rf conftest*
3856   ac_cv_cygwin=no
3857 fi
3858 rm -f conftest*
3859 fi
3860
3861 echo "$ac_t""$ac_cv_cygwin" 1>&6
3862 CYGWIN=
3863 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3864 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3865 echo "configure:3866: checking for mingw32 environment" >&5
3866 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872
3873 int main() {
3874 return __MINGW32__;
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3878   rm -rf conftest*
3879   ac_cv_mingw32=yes
3880 else
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   ac_cv_mingw32=no
3885 fi
3886 rm -f conftest*
3887 fi
3888
3889 echo "$ac_t""$ac_cv_mingw32" 1>&6
3890 MINGW32=
3891 test "$ac_cv_mingw32" = yes && MINGW32=yes
3892 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3893 echo "configure:3894: checking for EMX OS/2 environment" >&5
3894 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3895   echo $ac_n "(cached) $ac_c" 1>&6
3896 else
3897   cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900
3901 int main() {
3902 return __EMX__;
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3906   rm -rf conftest*
3907   ac_cv_emxos2=yes
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   ac_cv_emxos2=no
3913 fi
3914 rm -f conftest*
3915 fi
3916
3917 echo "$ac_t""$ac_cv_emxos2" 1>&6
3918 EMXOS2=
3919 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3920
3921
3922
3923 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3924 echo "configure:3925: checking for executable suffix" >&5
3925 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3926   echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3929   ac_cv_exeext=.exe
3930 else
3931   rm -f conftest*
3932   echo 'int main () { return 0; }' > conftest.$ac_ext
3933   ac_cv_exeext=
3934   if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3935     for file in conftest.*; do
3936       case $file in
3937       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3938       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3939       esac
3940     done
3941   else
3942     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3943   fi
3944   rm -f conftest*
3945   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3946 fi
3947 fi
3948
3949 EXEEXT=""
3950 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3951 echo "$ac_t""${ac_cv_exeext}" 1>&6
3952 ac_exeext=$EXEEXT
3953
3954 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3955 echo "configure:3956: checking for object suffix" >&5
3956 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3957   echo $ac_n "(cached) $ac_c" 1>&6
3958 else
3959   rm -f conftest*
3960 echo 'int i = 1;' > conftest.$ac_ext
3961 if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3962   for ac_file in conftest.*; do
3963     case $ac_file in
3964     *.c) ;;
3965     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3966     esac
3967   done
3968 else
3969   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3970 fi
3971 rm -f conftest*
3972 fi
3973
3974 echo "$ac_t""$ac_cv_objext" 1>&6
3975 OBJEXT=$ac_cv_objext
3976 ac_objext=$ac_cv_objext
3977
3978
3979 cat >> confdefs.h <<EOF
3980 #define EXEEXT "${EXEEXT}"
3981 EOF
3982
3983
3984 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3985 echo "configure:3986: checking for be_app in -lbe" >&5
3986 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3988   echo $ac_n "(cached) $ac_c" 1>&6
3989 else
3990   ac_save_LIBS="$LIBS"
3991 LIBS="-lbe -lroot -lnet $LIBS"
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 /* Override any gcc2 internal prototype to avoid an error.  */
3996 /* We use char because int might match the return type of a gcc2
3997     builtin and then its argument prototype would still apply.  */
3998 char be_app();
3999
4000 int main() {
4001 be_app()
4002 ; return 0; }
4003 EOF
4004 if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4005   rm -rf conftest*
4006   eval "ac_cv_lib_$ac_lib_var=yes"
4007 else
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   eval "ac_cv_lib_$ac_lib_var=no"
4012 fi
4013 rm -f conftest*
4014 LIBS="$ac_save_LIBS"
4015
4016 fi
4017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4018   echo "$ac_t""yes" 1>&6
4019   LIBS="$LIBS -lbe -lroot -lnet"
4020 else
4021   echo "$ac_t""no" 1>&6
4022 :
4023 fi
4024
4025
4026
4027
4028
4029 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4030 echo "configure:4031: checking for ${CC-cc} option to accept ANSI C" >&5
4031 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4032   echo $ac_n "(cached) $ac_c" 1>&6
4033 else
4034   am_cv_prog_cc_stdc=no
4035 ac_save_CC="$CC"
4036 # Don't try gcc -ansi; that turns off useful extensions and
4037 # breaks some systems' header files.
4038 # AIX                   -qlanglvl=ansi
4039 # Ultrix and OSF/1      -std1
4040 # HP-UX 10.20 and later -Ae
4041 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4042 # SVR4                  -Xc -D__EXTENSIONS__
4043 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4044 do
4045   CC="$ac_save_CC $ac_arg"
4046   cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <stdarg.h>
4050 #include <stdio.h>
4051 #include <sys/types.h>
4052 #include <sys/stat.h>
4053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4054 struct buf { int x; };
4055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4056 static char *e (p, i)
4057      char **p;
4058      int i;
4059 {
4060   return p[i];
4061 }
4062 static char *f (char * (*g) (char **, int), char **p, ...)
4063 {
4064   char *s;
4065   va_list v;
4066   va_start (v,p);
4067   s = g (p, va_arg (v,int));
4068   va_end (v);
4069   return s;
4070 }
4071 int test (int i, double x);
4072 struct s1 {int (*f) (int a);};
4073 struct s2 {int (*f) (double a);};
4074 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4075 int argc;
4076 char **argv;
4077
4078 int main() {
4079
4080 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4081
4082 ; return 0; }
4083 EOF
4084 if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4085   rm -rf conftest*
4086   am_cv_prog_cc_stdc="$ac_arg"; break
4087 else
4088   echo "configure: failed program was:" >&5
4089   cat conftest.$ac_ext >&5
4090 fi
4091 rm -f conftest*
4092 done
4093 CC="$ac_save_CC"
4094
4095 fi
4096
4097 if test -z "$am_cv_prog_cc_stdc"; then
4098   echo "$ac_t""none needed" 1>&6
4099 else
4100   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4101 fi
4102 case "x$am_cv_prog_cc_stdc" in
4103   x|xno) ;;
4104   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4105 esac
4106
4107 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4108         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4109 fi
4110
4111 # test for make depend flag
4112 OL_MKDEP=
4113 OL_MKDEP_FLAGS=
4114 if test -z "${MKDEP}"; then
4115         OL_MKDEP="${CC-cc}"
4116         if test -z "${MKDEP_FLAGS}"; then
4117                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4118 echo "configure:4119: checking for ${OL_MKDEP} depend flag" >&5
4119 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4120   echo $ac_n "(cached) $ac_c" 1>&6
4121 else
4122   
4123                         ol_cv_mkdep=no
4124                         for flag in "-M" "-xM"; do
4125                                 cat > conftest.c <<EOF
4126  noCode;
4127 EOF
4128                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4129                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4130                                 then
4131                                         if test ! -f conftest."${ac_object}" ; then
4132                                                 ol_cv_mkdep=$flag
4133                                                 OL_MKDEP_FLAGS="$flag"
4134                                                 break
4135                                         fi
4136                                 fi
4137                         done
4138                         rm -f conftest*
4139                 
4140 fi
4141
4142 echo "$ac_t""$ol_cv_mkdep" 1>&6
4143         else
4144                 cc_cv_mkdep=yes
4145                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4146         fi
4147 else
4148         cc_cv_mkdep=yes
4149         OL_MKDEP="${MKDEP}"
4150         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4151 fi
4152
4153
4154
4155 if test "${ol_cv_mkdep}" = no ; then
4156         # this will soon become an error
4157         echo "configure: warning: do not know how to generate dependencies" 1>&2
4158 fi
4159
4160 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4161 echo "configure:4162: checking for afopen in -ls" >&5
4162 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4164   echo $ac_n "(cached) $ac_c" 1>&6
4165 else
4166   ac_save_LIBS="$LIBS"
4167 LIBS="-ls  $LIBS"
4168 cat > conftest.$ac_ext <<EOF
4169 #line 4170 "configure"
4170 #include "confdefs.h"
4171 /* Override any gcc2 internal prototype to avoid an error.  */
4172 /* We use char because int might match the return type of a gcc2
4173     builtin and then its argument prototype would still apply.  */
4174 char afopen();
4175
4176 int main() {
4177 afopen()
4178 ; return 0; }
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4181   rm -rf conftest*
4182   eval "ac_cv_lib_$ac_lib_var=yes"
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186   rm -rf conftest*
4187   eval "ac_cv_lib_$ac_lib_var=no"
4188 fi
4189 rm -f conftest*
4190 LIBS="$ac_save_LIBS"
4191
4192 fi
4193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4194   echo "$ac_t""yes" 1>&6
4195   
4196         AUTH_LIBS=-ls
4197         cat >> confdefs.h <<\EOF
4198 #define HAVE_AIX_SECURITY 1
4199 EOF
4200
4201
4202 else
4203   echo "$ac_t""no" 1>&6
4204 fi
4205
4206
4207
4208 ol_link_modules=no
4209 if test $ol_enable_modules != no ; then
4210         for ac_hdr in ltdl.h
4211 do
4212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4214 echo "configure:4215: checking for $ac_hdr" >&5
4215 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4216   echo $ac_n "(cached) $ac_c" 1>&6
4217 else
4218   cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <$ac_hdr>
4222 EOF
4223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4224 { (eval echo configure:4225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4226 if test -z "$ac_err"; then
4227   rm -rf conftest*
4228   eval "ac_cv_header_$ac_safe=yes"
4229 else
4230   echo "$ac_err" >&5
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=no"
4235 fi
4236 rm -f conftest*
4237 fi
4238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4239   echo "$ac_t""yes" 1>&6
4240     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4241   cat >> confdefs.h <<EOF
4242 #define $ac_tr_hdr 1
4243 EOF
4244  
4245 else
4246   echo "$ac_t""no" 1>&6
4247 fi
4248 done
4249
4250
4251         if test $ac_cv_header_ltdl_h = no ; then
4252                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4253         fi
4254
4255         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4256 echo "configure:4257: checking for lt_dlinit in -lltdl" >&5
4257 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4259   echo $ac_n "(cached) $ac_c" 1>&6
4260 else
4261   ac_save_LIBS="$LIBS"
4262 LIBS="-lltdl  $LIBS"
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 /* Override any gcc2 internal prototype to avoid an error.  */
4267 /* We use char because int might match the return type of a gcc2
4268     builtin and then its argument prototype would still apply.  */
4269 char lt_dlinit();
4270
4271 int main() {
4272 lt_dlinit()
4273 ; return 0; }
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4276   rm -rf conftest*
4277   eval "ac_cv_lib_$ac_lib_var=yes"
4278 else
4279   echo "configure: failed program was:" >&5
4280   cat conftest.$ac_ext >&5
4281   rm -rf conftest*
4282   eval "ac_cv_lib_$ac_lib_var=no"
4283 fi
4284 rm -f conftest*
4285 LIBS="$ac_save_LIBS"
4286
4287 fi
4288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4289   echo "$ac_t""yes" 1>&6
4290   
4291             MODULES_LIBS=-lltdl
4292             cat >> confdefs.h <<\EOF
4293 #define HAVE_LIBLTDL 1
4294 EOF
4295
4296         
4297 else
4298   echo "$ac_t""no" 1>&6
4299 fi
4300
4301
4302         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4303                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4304         fi
4305         ol_link_modules=yes
4306 else
4307         ol_with_bdb_module=static
4308         ol_with_dnssrv_module=static
4309         ol_with_ldap_module=static
4310         ol_with_ldbm_module=static
4311         ol_with_passwd_module=static
4312         ol_with_perl_module=static
4313         ol_with_shell_module=static
4314         ol_with_tcl_module=static
4315         ol_with_sql_module=static
4316 fi
4317
4318 # test for EBCDIC
4319 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4320 echo "configure:4321: checking for EBCDIC" >&5
4321 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4322   echo $ac_n "(cached) $ac_c" 1>&6
4323 else
4324   
4325         cat > conftest.$ac_ext <<EOF
4326 #line 4327 "configure"
4327 #include "confdefs.h"
4328
4329 #if !('M' == 0xd4)
4330 #include <__ASCII__/generate_error.h>
4331 #endif
4332
4333 EOF
4334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4335 { (eval echo configure:4336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4337 if test -z "$ac_err"; then
4338   rm -rf conftest*
4339   ol_cv_cpp_ebcdic=yes
4340 else
4341   echo "$ac_err" >&5
4342   echo "configure: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   rm -rf conftest*
4345   ol_cv_cpp_ebcdic=no
4346 fi
4347 rm -f conftest*
4348 fi
4349
4350 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4351 if test $ol_cv_cpp_ebcdic = yes ; then
4352         cat >> confdefs.h <<\EOF
4353 #define HAVE_EBCDIC 1
4354 EOF
4355
4356 fi
4357
4358 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4359 echo "configure:4360: checking for ANSI C header files" >&5
4360 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 #include <stdlib.h>
4367 #include <stdarg.h>
4368 #include <string.h>
4369 #include <float.h>
4370 EOF
4371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4372 { (eval echo configure:4373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4374 if test -z "$ac_err"; then
4375   rm -rf conftest*
4376   ol_cv_header_stdc=yes
4377 else
4378   echo "$ac_err" >&5
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381   rm -rf conftest*
4382   ol_cv_header_stdc=no
4383 fi
4384 rm -f conftest*
4385
4386 if test $ol_cv_header_stdc = yes; then
4387   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4388 cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391 #include <string.h>
4392 EOF
4393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4394   egrep "memchr" >/dev/null 2>&1; then
4395   :
4396 else
4397   rm -rf conftest*
4398   ol_cv_header_stdc=no
4399 fi
4400 rm -f conftest*
4401
4402 fi
4403
4404 if test $ol_cv_header_stdc = yes; then
4405   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4408 "configure"
4408 #include "confdefs.h"
4409 #include <stdlib.h>
4410 EOF
4411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4412   egrep "free" >/dev/null 2>&1; then
4413   :
4414 else
4415   rm -rf conftest*
4416   ol_cv_header_stdc=no
4417 fi
4418 rm -f conftest*
4419
4420 fi
4421
4422 if test $ol_cv_header_stdc = yes; then
4423   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4424 if test "$cross_compiling" = yes; then
4425   :
4426 else
4427   cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <ctype.h>
4431 #ifndef HAVE_EBCDIC
4432 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4433 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4434 #else
4435 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4436                 || ('j' <= (c) && (c) <= 'r') \
4437                 || ('s' <= (c) && (c) <= 'z'))
4438 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4439 #endif
4440 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4441 int main () { int i; for (i = 0; i < 256; i++)
4442 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4443 exit (0); }
4444
4445 EOF
4446 if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4447 then
4448   :
4449 else
4450   echo "configure: failed program was:" >&5
4451   cat conftest.$ac_ext >&5
4452   rm -fr conftest*
4453   ol_cv_header_stdc=no
4454 fi
4455 rm -fr conftest*
4456 fi
4457
4458 fi
4459 fi
4460
4461 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4462 if test $ol_cv_header_stdc = yes; then
4463   cat >> confdefs.h <<\EOF
4464 #define STDC_HEADERS 1
4465 EOF
4466
4467 fi
4468 ac_cv_header_stdc=disable
4469
4470
4471 if test $ol_cv_header_stdc != yes; then
4472         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4473 fi
4474
4475 ac_header_dirent=no
4476 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4477 do
4478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4479 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4480 echo "configure:4481: checking for $ac_hdr that defines DIR" >&5
4481 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4482   echo $ac_n "(cached) $ac_c" 1>&6
4483 else
4484   cat > conftest.$ac_ext <<EOF
4485 #line 4486 "configure"
4486 #include "confdefs.h"
4487 #include <sys/types.h>
4488 #include <$ac_hdr>
4489 int main() {
4490 DIR *dirp = 0;
4491 ; return 0; }
4492 EOF
4493 if { (eval echo configure:4494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4494   rm -rf conftest*
4495   eval "ac_cv_header_dirent_$ac_safe=yes"
4496 else
4497   echo "configure: failed program was:" >&5
4498   cat conftest.$ac_ext >&5
4499   rm -rf conftest*
4500   eval "ac_cv_header_dirent_$ac_safe=no"
4501 fi
4502 rm -f conftest*
4503 fi
4504 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4505   echo "$ac_t""yes" 1>&6
4506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4507   cat >> confdefs.h <<EOF
4508 #define $ac_tr_hdr 1
4509 EOF
4510  ac_header_dirent=$ac_hdr; break
4511 else
4512   echo "$ac_t""no" 1>&6
4513 fi
4514 done
4515 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4516 if test $ac_header_dirent = dirent.h; then
4517 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4518 echo "configure:4519: checking for opendir in -ldir" >&5
4519 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4520 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4521   echo $ac_n "(cached) $ac_c" 1>&6
4522 else
4523   ac_save_LIBS="$LIBS"
4524 LIBS="-ldir  $LIBS"
4525 cat > conftest.$ac_ext <<EOF
4526 #line 4527 "configure"
4527 #include "confdefs.h"
4528 /* Override any gcc2 internal prototype to avoid an error.  */
4529 /* We use char because int might match the return type of a gcc2
4530     builtin and then its argument prototype would still apply.  */
4531 char opendir();
4532
4533 int main() {
4534 opendir()
4535 ; return 0; }
4536 EOF
4537 if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4538   rm -rf conftest*
4539   eval "ac_cv_lib_$ac_lib_var=yes"
4540 else
4541   echo "configure: failed program was:" >&5
4542   cat conftest.$ac_ext >&5
4543   rm -rf conftest*
4544   eval "ac_cv_lib_$ac_lib_var=no"
4545 fi
4546 rm -f conftest*
4547 LIBS="$ac_save_LIBS"
4548
4549 fi
4550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4551   echo "$ac_t""yes" 1>&6
4552   LIBS="$LIBS -ldir"
4553 else
4554   echo "$ac_t""no" 1>&6
4555 fi
4556
4557 else
4558 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4559 echo "configure:4560: checking for opendir in -lx" >&5
4560 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   ac_save_LIBS="$LIBS"
4565 LIBS="-lx  $LIBS"
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 /* Override any gcc2 internal prototype to avoid an error.  */
4570 /* We use char because int might match the return type of a gcc2
4571     builtin and then its argument prototype would still apply.  */
4572 char opendir();
4573
4574 int main() {
4575 opendir()
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=yes"
4581 else
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -rf conftest*
4585   eval "ac_cv_lib_$ac_lib_var=no"
4586 fi
4587 rm -f conftest*
4588 LIBS="$ac_save_LIBS"
4589
4590 fi
4591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4592   echo "$ac_t""yes" 1>&6
4593   LIBS="$LIBS -lx"
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597
4598 fi
4599
4600 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4601 echo "configure:4602: checking for sys/wait.h that is POSIX.1 compatible" >&5
4602 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <sys/types.h>
4609 #include <sys/wait.h>
4610 #ifndef WEXITSTATUS
4611 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4612 #endif
4613 #ifndef WIFEXITED
4614 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4615 #endif
4616 int main() {
4617 int s;
4618 wait (&s);
4619 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4620 ; return 0; }
4621 EOF
4622 if { (eval echo configure:4623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4623   rm -rf conftest*
4624   ac_cv_header_sys_wait_h=yes
4625 else
4626   echo "configure: failed program was:" >&5
4627   cat conftest.$ac_ext >&5
4628   rm -rf conftest*
4629   ac_cv_header_sys_wait_h=no
4630 fi
4631 rm -f conftest*
4632 fi
4633
4634 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4635 if test $ac_cv_header_sys_wait_h = yes; then
4636   cat >> confdefs.h <<\EOF
4637 #define HAVE_SYS_WAIT_H 1
4638 EOF
4639
4640 fi
4641
4642 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4643 echo "configure:4644: checking POSIX termios" >&5
4644 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4645   echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647   cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650 #include <sys/types.h>
4651 #include <unistd.h>
4652 #include <termios.h>
4653 int main() {
4654 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4655    tcgetattr(0, 0);
4656 ; return 0; }
4657 EOF
4658 if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4659   rm -rf conftest*
4660   am_cv_sys_posix_termios=yes
4661 else
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -rf conftest*
4665   am_cv_sys_posix_termios=no
4666 fi
4667 rm -f conftest*
4668 fi
4669
4670 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4671
4672
4673  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4674 echo "configure:4675: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4675 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4679
4680   gwinsz_in_termios_h=no
4681   if test $am_cv_sys_posix_termios = yes; then
4682     cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 #include <sys/types.h>
4686 #     include <termios.h>
4687 #     ifdef TIOCGWINSZ
4688         yes
4689 #     endif
4690     
4691 EOF
4692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4693   egrep "yes" >/dev/null 2>&1; then
4694   rm -rf conftest*
4695   gwinsz_in_termios_h=yes
4696 fi
4697 rm -f conftest*
4698
4699   fi
4700
4701   if test $gwinsz_in_termios_h = no; then
4702     cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 #include <sys/types.h>
4706 #     include <sys/ioctl.h>
4707 #     ifdef TIOCGWINSZ
4708         yes
4709 #     endif
4710     
4711 EOF
4712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4713   egrep "yes" >/dev/null 2>&1; then
4714   rm -rf conftest*
4715   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4716 fi
4717 rm -f conftest*
4718
4719   fi
4720   
4721 fi
4722
4723 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4724   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4725     cat >> confdefs.h <<\EOF
4726 #define GWINSZ_IN_SYS_IOCTL 1
4727 EOF
4728
4729   fi
4730
4731 if test $am_cv_sys_posix_termios = yes ; then
4732         cat >> confdefs.h <<\EOF
4733 #define HAVE_POSIX_TERMIOS 1
4734 EOF
4735
4736 fi
4737
4738 for ac_hdr in \
4739         arpa/inet.h             \
4740         arpa/nameser.h  \
4741         assert.h                \
4742         conio.h                 \
4743         crypt.h                 \
4744         direct.h                \
4745         errno.h                 \
4746         fcntl.h                 \
4747         filio.h                 \
4748         getopt.h                \
4749         grp.h                   \
4750         io.h                    \
4751         libutil.h               \
4752         limits.h                \
4753         locale.h                \
4754         netinet/tcp.h   \
4755         malloc.h                \
4756         memory.h                \
4757         psap.h                  \
4758         pwd.h                   \
4759         process.h               \
4760         resolv.h                \
4761         sgtty.h                 \
4762         shadow.h                \
4763         stddef.h                \
4764         string.h                \
4765         strings.h               \
4766         sysexits.h              \
4767         sys/file.h              \
4768         sys/filio.h             \
4769         sys/errno.h             \
4770         sys/ioctl.h             \
4771         sys/param.h             \
4772         sys/resource.h  \
4773         sys/select.h    \
4774         sys/socket.h    \
4775         sys/syslog.h    \
4776         sys/time.h              \
4777         sys/types.h             \
4778         syslog.h                \
4779         termios.h               \
4780         unistd.h                \
4781         winsock.h               \
4782
4783 do
4784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4786 echo "configure:4787: checking for $ac_hdr" >&5
4787 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4788   echo $ac_n "(cached) $ac_c" 1>&6
4789 else
4790   cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4793 #include <$ac_hdr>
4794 EOF
4795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4796 { (eval echo configure:4797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4798 if test -z "$ac_err"; then
4799   rm -rf conftest*
4800   eval "ac_cv_header_$ac_safe=yes"
4801 else
4802   echo "$ac_err" >&5
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   rm -rf conftest*
4806   eval "ac_cv_header_$ac_safe=no"
4807 fi
4808 rm -f conftest*
4809 fi
4810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4813   cat >> confdefs.h <<EOF
4814 #define $ac_tr_hdr 1
4815 EOF
4816  
4817 else
4818   echo "$ac_t""no" 1>&6
4819 fi
4820 done
4821
4822
4823
4824
4825 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4826 echo "configure:4827: checking for sigset in -lV3" >&5
4827 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4828 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4829   echo $ac_n "(cached) $ac_c" 1>&6
4830 else
4831   ac_save_LIBS="$LIBS"
4832 LIBS="-lV3  $LIBS"
4833 cat > conftest.$ac_ext <<EOF
4834 #line 4835 "configure"
4835 #include "confdefs.h"
4836 /* Override any gcc2 internal prototype to avoid an error.  */
4837 /* We use char because int might match the return type of a gcc2
4838     builtin and then its argument prototype would still apply.  */
4839 char sigset();
4840
4841 int main() {
4842 sigset()
4843 ; return 0; }
4844 EOF
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4846   rm -rf conftest*
4847   eval "ac_cv_lib_$ac_lib_var=yes"
4848 else
4849   echo "configure: failed program was:" >&5
4850   cat conftest.$ac_ext >&5
4851   rm -rf conftest*
4852   eval "ac_cv_lib_$ac_lib_var=no"
4853 fi
4854 rm -f conftest*
4855 LIBS="$ac_save_LIBS"
4856
4857 fi
4858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4859   echo "$ac_t""yes" 1>&6
4860     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4861     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4862   cat >> confdefs.h <<EOF
4863 #define $ac_tr_lib 1
4864 EOF
4865
4866   LIBS="-lV3 $LIBS"
4867
4868 else
4869   echo "$ac_t""no" 1>&6
4870 fi
4871
4872
4873 if test $ac_cv_header_winsock_h = yes; then
4874         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4875 echo "configure:4876: checking for winsock" >&5
4876 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4877   echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879   cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 #include <winsock.h>
4883 int main() {
4884
4885                         socket(0,0,0);
4886                         select(0,NULL,NULL,NULL,NULL);
4887                         closesocket(0);
4888                         gethostname(NULL,0);
4889         
4890 ; return 0; }
4891 EOF
4892 if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4893   rm -rf conftest*
4894   ol_cv_winsock=yes
4895 else
4896   echo "configure: failed program was:" >&5
4897   cat conftest.$ac_ext >&5
4898   rm -rf conftest*
4899   ol_cv_winsock=no
4900 fi
4901 rm -f conftest*]
4902 fi
4903
4904 echo "$ac_t""$ol_cv_winsock" 1>&6
4905
4906         if test $ol_cv_winsock = yes ; then
4907                 cat >> confdefs.h <<\EOF
4908 #define HAVE_WINSOCK 1
4909 EOF
4910
4911                 ac_cv_func_socket=yes
4912                 ac_cv_func_select=yes
4913                 ac_cv_func_closesocket=yes
4914                 ac_cv_func_gethostname=yes
4915         fi
4916 fi
4917
4918
4919 echo $ac_n "checking for socket""... $ac_c" 1>&6
4920 echo "configure:4921: checking for socket" >&5
4921 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4922   echo $ac_n "(cached) $ac_c" 1>&6
4923 else
4924   cat > conftest.$ac_ext <<EOF
4925 #line 4926 "configure"
4926 #include "confdefs.h"
4927 /* System header to define __stub macros and hopefully few prototypes,
4928     which can conflict with char socket(); below.  */
4929 #include <assert.h>
4930 /* Override any gcc2 internal prototype to avoid an error.  */
4931 /* We use char because int might match the return type of a gcc2
4932     builtin and then its argument prototype would still apply.  */
4933 char socket();
4934 char (*f)();
4935
4936 int main() {
4937
4938 /* The GNU C library defines this for functions which it implements
4939     to always fail with ENOSYS.  Some functions are actually named
4940     something starting with __ and the normal name is an alias.  */
4941 #if defined (__stub_socket) || defined (__stub___socket)
4942 choke me
4943 #else
4944 f = socket;
4945 #endif
4946
4947 ; return 0; }
4948 EOF
4949 if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4950   rm -rf conftest*
4951   eval "ac_cv_func_socket=yes"
4952 else
4953   echo "configure: failed program was:" >&5
4954   cat conftest.$ac_ext >&5
4955   rm -rf conftest*
4956   eval "ac_cv_func_socket=no"
4957 fi
4958 rm -f conftest*
4959 fi
4960
4961 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4962   echo "$ac_t""yes" 1>&6
4963   :
4964 else
4965   echo "$ac_t""no" 1>&6
4966         
4967         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4968 echo "configure:4969: checking for main in -lsocket" >&5
4969 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4970 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4971   echo $ac_n "(cached) $ac_c" 1>&6
4972 else
4973   ac_save_LIBS="$LIBS"
4974 LIBS="-lsocket  $LIBS"
4975 cat > conftest.$ac_ext <<EOF
4976 #line 4977 "configure"
4977 #include "confdefs.h"
4978
4979 int main() {
4980 main()
4981 ; return 0; }
4982 EOF
4983 if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4984   rm -rf conftest*
4985   eval "ac_cv_lib_$ac_lib_var=yes"
4986 else
4987   echo "configure: failed program was:" >&5
4988   cat conftest.$ac_ext >&5
4989   rm -rf conftest*
4990   eval "ac_cv_lib_$ac_lib_var=no"
4991 fi
4992 rm -f conftest*
4993 LIBS="$ac_save_LIBS"
4994
4995 fi
4996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4997   echo "$ac_t""yes" 1>&6
4998     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4999     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5000   cat >> confdefs.h <<EOF
5001 #define $ac_tr_lib 1
5002 EOF
5003
5004   LIBS="-lsocket $LIBS"
5005
5006 else
5007   echo "$ac_t""no" 1>&6
5008 fi
5009
5010         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5011 echo "configure:5012: checking for main in -lnet" >&5
5012 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5014   echo $ac_n "(cached) $ac_c" 1>&6
5015 else
5016   ac_save_LIBS="$LIBS"
5017 LIBS="-lnet  $LIBS"
5018 cat > conftest.$ac_ext <<EOF
5019 #line 5020 "configure"
5020 #include "confdefs.h"
5021
5022 int main() {
5023 main()
5024 ; return 0; }
5025 EOF
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5027   rm -rf conftest*
5028   eval "ac_cv_lib_$ac_lib_var=yes"
5029 else
5030   echo "configure: failed program was:" >&5
5031   cat conftest.$ac_ext >&5
5032   rm -rf conftest*
5033   eval "ac_cv_lib_$ac_lib_var=no"
5034 fi
5035 rm -f conftest*
5036 LIBS="$ac_save_LIBS"
5037
5038 fi
5039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5040   echo "$ac_t""yes" 1>&6
5041     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5042     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5043   cat >> confdefs.h <<EOF
5044 #define $ac_tr_lib 1
5045 EOF
5046
5047   LIBS="-lnet $LIBS"
5048
5049 else
5050   echo "$ac_t""no" 1>&6
5051 fi
5052
5053         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5054 echo "configure:5055: checking for main in -lnsl_s" >&5
5055 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5057   echo $ac_n "(cached) $ac_c" 1>&6
5058 else
5059   ac_save_LIBS="$LIBS"
5060 LIBS="-lnsl_s  $LIBS"
5061 cat > conftest.$ac_ext <<EOF
5062 #line 5063 "configure"
5063 #include "confdefs.h"
5064
5065 int main() {
5066 main()
5067 ; return 0; }
5068 EOF
5069 if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=yes"
5072 else
5073   echo "configure: failed program was:" >&5
5074   cat conftest.$ac_ext >&5
5075   rm -rf conftest*
5076   eval "ac_cv_lib_$ac_lib_var=no"
5077 fi
5078 rm -f conftest*
5079 LIBS="$ac_save_LIBS"
5080
5081 fi
5082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5083   echo "$ac_t""yes" 1>&6
5084     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5085     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5086   cat >> confdefs.h <<EOF
5087 #define $ac_tr_lib 1
5088 EOF
5089
5090   LIBS="-lnsl_s $LIBS"
5091
5092 else
5093   echo "$ac_t""no" 1>&6
5094 fi
5095
5096         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5097 echo "configure:5098: checking for main in -lnsl" >&5
5098 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5100   echo $ac_n "(cached) $ac_c" 1>&6
5101 else
5102   ac_save_LIBS="$LIBS"
5103 LIBS="-lnsl  $LIBS"
5104 cat > conftest.$ac_ext <<EOF
5105 #line 5106 "configure"
5106 #include "confdefs.h"
5107
5108 int main() {
5109 main()
5110 ; return 0; }
5111 EOF
5112 if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5113   rm -rf conftest*
5114   eval "ac_cv_lib_$ac_lib_var=yes"
5115 else
5116   echo "configure: failed program was:" >&5
5117   cat conftest.$ac_ext >&5
5118   rm -rf conftest*
5119   eval "ac_cv_lib_$ac_lib_var=no"
5120 fi
5121 rm -f conftest*
5122 LIBS="$ac_save_LIBS"
5123
5124 fi
5125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5126   echo "$ac_t""yes" 1>&6
5127     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5128     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5129   cat >> confdefs.h <<EOF
5130 #define $ac_tr_lib 1
5131 EOF
5132
5133   LIBS="-lnsl $LIBS"
5134
5135 else
5136   echo "$ac_t""no" 1>&6
5137 fi
5138
5139         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5140 echo "configure:5141: checking for socket in -linet" >&5
5141 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5143   echo $ac_n "(cached) $ac_c" 1>&6
5144 else
5145   ac_save_LIBS="$LIBS"
5146 LIBS="-linet  $LIBS"
5147 cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150 /* Override any gcc2 internal prototype to avoid an error.  */
5151 /* We use char because int might match the return type of a gcc2
5152     builtin and then its argument prototype would still apply.  */
5153 char socket();
5154
5155 int main() {
5156 socket()
5157 ; return 0; }
5158 EOF
5159 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=yes"
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166   eval "ac_cv_lib_$ac_lib_var=no"
5167 fi
5168 rm -f conftest*
5169 LIBS="$ac_save_LIBS"
5170
5171 fi
5172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5173   echo "$ac_t""yes" 1>&6
5174     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5176   cat >> confdefs.h <<EOF
5177 #define $ac_tr_lib 1
5178 EOF
5179
5180   LIBS="-linet $LIBS"
5181
5182 else
5183   echo "$ac_t""no" 1>&6
5184 fi
5185
5186         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5187 echo "configure:5188: checking for main in -lgen" >&5
5188 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5190   echo $ac_n "(cached) $ac_c" 1>&6
5191 else
5192   ac_save_LIBS="$LIBS"
5193 LIBS="-lgen  $LIBS"
5194 cat > conftest.$ac_ext <<EOF
5195 #line 5196 "configure"
5196 #include "confdefs.h"
5197
5198 int main() {
5199 main()
5200 ; return 0; }
5201 EOF
5202 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5203   rm -rf conftest*
5204   eval "ac_cv_lib_$ac_lib_var=yes"
5205 else
5206   echo "configure: failed program was:" >&5
5207   cat conftest.$ac_ext >&5
5208   rm -rf conftest*
5209   eval "ac_cv_lib_$ac_lib_var=no"
5210 fi
5211 rm -f conftest*
5212 LIBS="$ac_save_LIBS"
5213
5214 fi
5215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5216   echo "$ac_t""yes" 1>&6
5217     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5219   cat >> confdefs.h <<EOF
5220 #define $ac_tr_lib 1
5221 EOF
5222
5223   LIBS="-lgen $LIBS"
5224
5225 else
5226   echo "$ac_t""no" 1>&6
5227 fi
5228
5229
5230 fi
5231
5232
5233 echo $ac_n "checking for select""... $ac_c" 1>&6
5234 echo "configure:5235: checking for select" >&5
5235 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238   cat > conftest.$ac_ext <<EOF
5239 #line 5240 "configure"
5240 #include "confdefs.h"
5241 /* System header to define __stub macros and hopefully few prototypes,
5242     which can conflict with char select(); below.  */
5243 #include <assert.h>
5244 /* Override any gcc2 internal prototype to avoid an error.  */
5245 /* We use char because int might match the return type of a gcc2
5246     builtin and then its argument prototype would still apply.  */
5247 char select();
5248 char (*f)();
5249
5250 int main() {
5251
5252 /* The GNU C library defines this for functions which it implements
5253     to always fail with ENOSYS.  Some functions are actually named
5254     something starting with __ and the normal name is an alias.  */
5255 #if defined (__stub_select) || defined (__stub___select)
5256 choke me
5257 #else
5258 f = select;
5259 #endif
5260
5261 ; return 0; }
5262 EOF
5263 if { (eval echo configure:5264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5264   rm -rf conftest*
5265   eval "ac_cv_func_select=yes"
5266 else
5267   echo "configure: failed program was:" >&5
5268   cat conftest.$ac_ext >&5
5269   rm -rf conftest*
5270   eval "ac_cv_func_select=no"
5271 fi
5272 rm -f conftest*
5273 fi
5274
5275 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5276   echo "$ac_t""yes" 1>&6
5277   :
5278 else
5279   echo "$ac_t""no" 1>&6
5280 { echo "configure: error: select() required." 1>&2; exit 1; }
5281 fi
5282
5283
5284 if test "${ac_cv_header_winsock_h}" != yes; then
5285                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5286 echo "configure:5287: checking types of arguments for select()" >&5
5287  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5291   echo $ac_n "(cached) $ac_c" 1>&6
5292 else
5293     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5297      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5298       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5299        cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302 #ifdef HAVE_SYS_TYPES_H
5303 #include <sys/types.h>
5304 #endif
5305 #ifdef HAVE_SYS_TIME_H
5306 #include <sys/time.h>
5307 #endif
5308 #ifdef HAVE_SYS_SELECT_H
5309 #include <sys/select.h>
5310 #endif
5311 #ifdef HAVE_SYS_SOCKET_H
5312 #include <sys/socket.h>
5313 #endif
5314 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);
5315 int main() {
5316
5317 ; return 0; }
5318 EOF
5319 if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5320   rm -rf conftest*
5321           ac_not_found=no ; break 3
5322 else
5323   echo "configure: failed program was:" >&5
5324   cat conftest.$ac_ext >&5
5325   rm -rf conftest*
5326   ac_not_found=yes
5327 fi
5328 rm -f conftest*
5329       done
5330      done
5331     done
5332    
5333 fi
5334   
5335 fi
5336  
5337 fi
5338  if test "$ac_not_found" = yes; then
5339   ac_cv_func_select_arg1=int 
5340   ac_cv_func_select_arg234='int *' 
5341   ac_cv_func_select_arg5='struct timeval *'
5342  fi
5343  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5344  cat >> confdefs.h <<EOF
5345 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5346 EOF
5347
5348  cat >> confdefs.h <<EOF
5349 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5350 EOF
5351
5352  cat >> confdefs.h <<EOF
5353 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5354 EOF
5355
5356
5357 fi
5358
5359
5360 for ac_hdr in regex.h 
5361 do
5362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5364 echo "configure:5365: checking for $ac_hdr" >&5
5365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5366   echo $ac_n "(cached) $ac_c" 1>&6
5367 else
5368   cat > conftest.$ac_ext <<EOF
5369 #line 5370 "configure"
5370 #include "confdefs.h"
5371 #include <$ac_hdr>
5372 EOF
5373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5374 { (eval echo configure:5375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5376 if test -z "$ac_err"; then
5377   rm -rf conftest*
5378   eval "ac_cv_header_$ac_safe=yes"
5379 else
5380   echo "$ac_err" >&5
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   eval "ac_cv_header_$ac_safe=no"
5385 fi
5386 rm -f conftest*
5387 fi
5388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5389   echo "$ac_t""yes" 1>&6
5390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5391   cat >> confdefs.h <<EOF
5392 #define $ac_tr_hdr 1
5393 EOF
5394  
5395 else
5396   echo "$ac_t""no" 1>&6
5397 fi
5398 done
5399
5400 if test "$ac_cv_header_regex_h" != yes ; then
5401         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5402 fi
5403 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5404 echo "configure:5405: checking for regfree" >&5
5405 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5406   echo $ac_n "(cached) $ac_c" 1>&6
5407 else
5408   cat > conftest.$ac_ext <<EOF
5409 #line 5410 "configure"
5410 #include "confdefs.h"
5411 /* System header to define __stub macros and hopefully few prototypes,
5412     which can conflict with char regfree(); below.  */
5413 #include <assert.h>
5414 /* Override any gcc2 internal prototype to avoid an error.  */
5415 /* We use char because int might match the return type of a gcc2
5416     builtin and then its argument prototype would still apply.  */
5417 char regfree();
5418 char (*f)();
5419
5420 int main() {
5421
5422 /* The GNU C library defines this for functions which it implements
5423     to always fail with ENOSYS.  Some functions are actually named
5424     something starting with __ and the normal name is an alias.  */
5425 #if defined (__stub_regfree) || defined (__stub___regfree)
5426 choke me
5427 #else
5428 f = regfree;
5429 #endif
5430
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434   rm -rf conftest*
5435   eval "ac_cv_func_regfree=yes"
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   eval "ac_cv_func_regfree=no"
5441 fi
5442 rm -f conftest*
5443 fi
5444
5445 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5446   echo "$ac_t""yes" 1>&6
5447   :
5448 else
5449   echo "$ac_t""no" 1>&6
5450 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5451 fi
5452
5453
5454
5455 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5456 echo "configure:5457: checking for compatible POSIX regex" >&5
5457 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5458   echo $ac_n "(cached) $ac_c" 1>&6
5459 else
5460   
5461         if test "$cross_compiling" = yes; then
5462   ol_cv_c_posix_regex=cross
5463 else
5464   cat > conftest.$ac_ext <<EOF
5465 #line 5466 "configure"
5466 #include "confdefs.h"
5467
5468 #include <sys/types.h>
5469 #include <regex.h>
5470 static char *pattern, *string;
5471 main()
5472 {
5473         int rc;
5474         regex_t re;
5475
5476         pattern = "^A";
5477
5478         if(regcomp(&re, pattern, 0)) {
5479                 return -1;
5480         }
5481         
5482         string = "ALL MATCH";
5483         
5484         rc = regexec(&re, string, 0, (void*)0, 0);
5485
5486         regfree(&re);
5487
5488         return rc;
5489 }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5492 then
5493   ol_cv_c_posix_regex=yes
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -fr conftest*
5498   ol_cv_c_posix_regex=no
5499 fi
5500 rm -fr conftest*
5501 fi
5502
5503 fi
5504
5505 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5506
5507 if test "$ol_cv_c_posix_regex" = no ; then
5508         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5509 fi
5510
5511 ol_link_dnssrv=no
5512 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5513 echo "configure:5514: checking for res_query" >&5
5514 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5515   echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517   cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5520 /* System header to define __stub macros and hopefully few prototypes,
5521     which can conflict with char res_query(); below.  */
5522 #include <assert.h>
5523 /* Override any gcc2 internal prototype to avoid an error.  */
5524 /* We use char because int might match the return type of a gcc2
5525     builtin and then its argument prototype would still apply.  */
5526 char res_query();
5527 char (*f)();
5528
5529 int main() {
5530
5531 /* The GNU C library defines this for functions which it implements
5532     to always fail with ENOSYS.  Some functions are actually named
5533     something starting with __ and the normal name is an alias.  */
5534 #if defined (__stub_res_query) || defined (__stub___res_query)
5535 choke me
5536 #else
5537 f = res_query;
5538 #endif
5539
5540 ; return 0; }
5541 EOF
5542 if { (eval echo configure:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5543   rm -rf conftest*
5544   eval "ac_cv_func_res_query=yes"
5545 else
5546   echo "configure: failed program was:" >&5
5547   cat conftest.$ac_ext >&5
5548   rm -rf conftest*
5549   eval "ac_cv_func_res_query=no"
5550 fi
5551 rm -f conftest*
5552 fi
5553
5554 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5555   echo "$ac_t""yes" 1>&6
5556   :
5557 else
5558   echo "$ac_t""no" 1>&6
5559 fi
5560
5561 if test $ac_cv_func_res_query = no ; then 
5562         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5563 echo "configure:5564: checking for res_query in -lbind" >&5
5564 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5565 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5566   echo $ac_n "(cached) $ac_c" 1>&6
5567 else
5568   ac_save_LIBS="$LIBS"
5569 LIBS="-lbind  $LIBS"
5570 cat > conftest.$ac_ext <<EOF
5571 #line 5572 "configure"
5572 #include "confdefs.h"
5573 /* Override any gcc2 internal prototype to avoid an error.  */
5574 /* We use char because int might match the return type of a gcc2
5575     builtin and then its argument prototype would still apply.  */
5576 char res_query();
5577
5578 int main() {
5579 res_query()
5580 ; return 0; }
5581 EOF
5582 if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5583   rm -rf conftest*
5584   eval "ac_cv_lib_$ac_lib_var=yes"
5585 else
5586   echo "configure: failed program was:" >&5
5587   cat conftest.$ac_ext >&5
5588   rm -rf conftest*
5589   eval "ac_cv_lib_$ac_lib_var=no"
5590 fi
5591 rm -f conftest*
5592 LIBS="$ac_save_LIBS"
5593
5594 fi
5595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5596   echo "$ac_t""yes" 1>&6
5597     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5598     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5599   cat >> confdefs.h <<EOF
5600 #define $ac_tr_lib 1
5601 EOF
5602
5603   LIBS="-lbind $LIBS"
5604
5605 else
5606   echo "$ac_t""no" 1>&6
5607 fi
5608
5609         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5610 fi
5611
5612 if test $ac_cv_func_res_query = no ; then 
5613         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5614 echo "configure:5615: checking for __res_query in -lbind" >&5
5615 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5616 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5617   echo $ac_n "(cached) $ac_c" 1>&6
5618 else
5619   ac_save_LIBS="$LIBS"
5620 LIBS="-lbind  $LIBS"
5621 cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 /* Override any gcc2 internal prototype to avoid an error.  */
5625 /* We use char because int might match the return type of a gcc2
5626     builtin and then its argument prototype would still apply.  */
5627 char __res_query();
5628
5629 int main() {
5630 __res_query()
5631 ; return 0; }
5632 EOF
5633 if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5634   rm -rf conftest*
5635   eval "ac_cv_lib_$ac_lib_var=yes"
5636 else
5637   echo "configure: failed program was:" >&5
5638   cat conftest.$ac_ext >&5
5639   rm -rf conftest*
5640   eval "ac_cv_lib_$ac_lib_var=no"
5641 fi
5642 rm -f conftest*
5643 LIBS="$ac_save_LIBS"
5644
5645 fi
5646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5647   echo "$ac_t""yes" 1>&6
5648     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5649     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5650   cat >> confdefs.h <<EOF
5651 #define $ac_tr_lib 1
5652 EOF
5653
5654   LIBS="-lbind $LIBS"
5655
5656 else
5657   echo "$ac_t""no" 1>&6
5658 fi
5659
5660         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5661 fi
5662
5663 if test $ac_cv_func_res_query = no ; then 
5664         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5665 echo "configure:5666: checking for res_query in -lresolv" >&5
5666 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5668   echo $ac_n "(cached) $ac_c" 1>&6
5669 else
5670   ac_save_LIBS="$LIBS"
5671 LIBS="-lresolv  $LIBS"
5672 cat > conftest.$ac_ext <<EOF
5673 #line 5674 "configure"
5674 #include "confdefs.h"
5675 /* Override any gcc2 internal prototype to avoid an error.  */
5676 /* We use char because int might match the return type of a gcc2
5677     builtin and then its argument prototype would still apply.  */
5678 char res_query();
5679
5680 int main() {
5681 res_query()
5682 ; return 0; }
5683 EOF
5684 if { (eval echo configure:5685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5685   rm -rf conftest*
5686   eval "ac_cv_lib_$ac_lib_var=yes"
5687 else
5688   echo "configure: failed program was:" >&5
5689   cat conftest.$ac_ext >&5
5690   rm -rf conftest*
5691   eval "ac_cv_lib_$ac_lib_var=no"
5692 fi
5693 rm -f conftest*
5694 LIBS="$ac_save_LIBS"
5695
5696 fi
5697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5698   echo "$ac_t""yes" 1>&6
5699     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5700     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5701   cat >> confdefs.h <<EOF
5702 #define $ac_tr_lib 1
5703 EOF
5704
5705   LIBS="-lresolv $LIBS"
5706
5707 else
5708   echo "$ac_t""no" 1>&6
5709 fi
5710
5711         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5712 fi
5713
5714 if test "$ac_cv_func_res_query" = yes ; then
5715         cat >> confdefs.h <<\EOF
5716 #define HAVE_RES_QUERY 1
5717 EOF
5718
5719
5720         if test $ol_enable_dnssrv != no ; then
5721                 ol_link_dnssrv=yes
5722         fi
5723 fi
5724
5725 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5726         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5727 fi
5728
5729 for ac_func in getaddrinfo 
5730 do
5731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5732 echo "configure:5733: checking for $ac_func" >&5
5733 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5734   echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736   cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 /* System header to define __stub macros and hopefully few prototypes,
5740     which can conflict with char $ac_func(); below.  */
5741 #include <assert.h>
5742 /* Override any gcc2 internal prototype to avoid an error.  */
5743 /* We use char because int might match the return type of a gcc2
5744     builtin and then its argument prototype would still apply.  */
5745 char $ac_func();
5746 char (*f)();
5747
5748 int main() {
5749
5750 /* The GNU C library defines this for functions which it implements
5751     to always fail with ENOSYS.  Some functions are actually named
5752     something starting with __ and the normal name is an alias.  */
5753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5754 choke me
5755 #else
5756 f = $ac_func;
5757 #endif
5758
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762   rm -rf conftest*
5763   eval "ac_cv_func_$ac_func=yes"
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   eval "ac_cv_func_$ac_func=no"
5769 fi
5770 rm -f conftest*
5771 fi
5772
5773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5774   echo "$ac_t""yes" 1>&6
5775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5776   cat >> confdefs.h <<EOF
5777 #define $ac_tr_func 1
5778 EOF
5779  
5780 else
5781   echo "$ac_t""no" 1>&6
5782 fi
5783 done
5784
5785
5786 ol_link_ipv6=no
5787 if test $ac_cv_func_getaddrinfo = no ; then
5788         if test $ol_enable_ipv6 = yes ; then
5789                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5790         fi
5791 else
5792         for ac_func in gai_strerror 
5793 do
5794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5795 echo "configure:5796: checking for $ac_func" >&5
5796 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5797   echo $ac_n "(cached) $ac_c" 1>&6
5798 else
5799   cat > conftest.$ac_ext <<EOF
5800 #line 5801 "configure"
5801 #include "confdefs.h"
5802 /* System header to define __stub macros and hopefully few prototypes,
5803     which can conflict with char $ac_func(); below.  */
5804 #include <assert.h>
5805 /* Override any gcc2 internal prototype to avoid an error.  */
5806 /* We use char because int might match the return type of a gcc2
5807     builtin and then its argument prototype would still apply.  */
5808 char $ac_func();
5809 char (*f)();
5810
5811 int main() {
5812
5813 /* The GNU C library defines this for functions which it implements
5814     to always fail with ENOSYS.  Some functions are actually named
5815     something starting with __ and the normal name is an alias.  */
5816 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5817 choke me
5818 #else
5819 f = $ac_func;
5820 #endif
5821
5822 ; return 0; }
5823 EOF
5824 if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5825   rm -rf conftest*
5826   eval "ac_cv_func_$ac_func=yes"
5827 else
5828   echo "configure: failed program was:" >&5
5829   cat conftest.$ac_ext >&5
5830   rm -rf conftest*
5831   eval "ac_cv_func_$ac_func=no"
5832 fi
5833 rm -f conftest*
5834 fi
5835
5836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5837   echo "$ac_t""yes" 1>&6
5838     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5839   cat >> confdefs.h <<EOF
5840 #define $ac_tr_func 1
5841 EOF
5842  
5843 else
5844   echo "$ac_t""no" 1>&6
5845 fi
5846 done
5847
5848
5849         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5850 echo "configure:5851: checking INET6_ADDRSTRLEN" >&5
5851 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5852   echo $ac_n "(cached) $ac_c" 1>&6
5853 else
5854   
5855                 cat > conftest.$ac_ext <<EOF
5856 #line 5857 "configure"
5857 #include "confdefs.h"
5858
5859 #                       include <netinet/in.h>
5860 #                       ifdef INET6_ADDRSTRLEN
5861                                 __has_inet6_addrstrlen__;
5862 #                       endif
5863                 
5864 EOF
5865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5866   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5867   rm -rf conftest*
5868   ol_cv_inet6_addrstrlen=yes
5869 else
5870   rm -rf conftest*
5871   ol_cv_inet6_addrstrlen=no
5872 fi
5873 rm -f conftest*
5874
5875 fi
5876
5877 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5878
5879         if test $ol_cv_inet6_addrstrlen = yes ; then
5880                 ol_link_ipv6=yes
5881         elif test $ol_enable_ipv6 = yes ; then
5882                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5883         fi
5884 fi
5885
5886 if test $ol_enable_local != no ; then
5887         for ac_hdr in sys/un.h 
5888 do
5889 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5890 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5891 echo "configure:5892: checking for $ac_hdr" >&5
5892 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5893   echo $ac_n "(cached) $ac_c" 1>&6
5894 else
5895   cat > conftest.$ac_ext <<EOF
5896 #line 5897 "configure"
5897 #include "confdefs.h"
5898 #include <$ac_hdr>
5899 EOF
5900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5901 { (eval echo configure:5902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5903 if test -z "$ac_err"; then
5904   rm -rf conftest*
5905   eval "ac_cv_header_$ac_safe=yes"
5906 else
5907   echo "$ac_err" >&5
5908   echo "configure: failed program was:" >&5
5909   cat conftest.$ac_ext >&5
5910   rm -rf conftest*
5911   eval "ac_cv_header_$ac_safe=no"
5912 fi
5913 rm -f conftest*
5914 fi
5915 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5916   echo "$ac_t""yes" 1>&6
5917     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5918   cat >> confdefs.h <<EOF
5919 #define $ac_tr_hdr 1
5920 EOF
5921  
5922 else
5923   echo "$ac_t""no" 1>&6
5924 fi
5925 done
5926
5927
5928         if test $ol_enable_local = auto ; then
5929                 ol_enable_local=$ac_cv_header_sys_un_h
5930         elif test $ac_cv_header_sys_un_h = no ; then
5931                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5932         fi
5933 fi
5934
5935 ol_link_kbind=no
5936 ol_link_kpasswd=no
5937 ol_link_krb5=no
5938 ol_link_krb4=no
5939
5940 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5941         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5942         -o $ol_with_kerberos = k425 ; then
5943
5944         for ac_hdr in krb5.h
5945 do
5946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5948 echo "configure:5949: checking for $ac_hdr" >&5
5949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5950   echo $ac_n "(cached) $ac_c" 1>&6
5951 else
5952   cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955 #include <$ac_hdr>
5956 EOF
5957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5958 { (eval echo configure:5959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5960 if test -z "$ac_err"; then
5961   rm -rf conftest*
5962   eval "ac_cv_header_$ac_safe=yes"
5963 else
5964   echo "$ac_err" >&5
5965   echo "configure: failed program was:" >&5
5966   cat conftest.$ac_ext >&5
5967   rm -rf conftest*
5968   eval "ac_cv_header_$ac_safe=no"
5969 fi
5970 rm -f conftest*
5971 fi
5972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5973   echo "$ac_t""yes" 1>&6
5974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5975   cat >> confdefs.h <<EOF
5976 #define $ac_tr_hdr 1
5977 EOF
5978  
5979 else
5980   echo "$ac_t""no" 1>&6
5981 fi
5982 done
5983
5984
5985         if test $ac_cv_header_krb5_h = yes ; then
5986                                 for ac_hdr in heim_err.h
5987 do
5988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5990 echo "configure:5991: checking for $ac_hdr" >&5
5991 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5992   echo $ac_n "(cached) $ac_c" 1>&6
5993 else
5994   cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 #include <$ac_hdr>
5998 EOF
5999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6000 { (eval echo configure:6001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6002 if test -z "$ac_err"; then
6003   rm -rf conftest*
6004   eval "ac_cv_header_$ac_safe=yes"
6005 else
6006   echo "$ac_err" >&5
6007   echo "configure: failed program was:" >&5
6008   cat conftest.$ac_ext >&5
6009   rm -rf conftest*
6010   eval "ac_cv_header_$ac_safe=no"
6011 fi
6012 rm -f conftest*
6013 fi
6014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6015   echo "$ac_t""yes" 1>&6
6016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6017   cat >> confdefs.h <<EOF
6018 #define $ac_tr_hdr 1
6019 EOF
6020  
6021 else
6022   echo "$ac_t""no" 1>&6
6023 fi
6024 done
6025
6026                 if test $ac_cv_header_heim_err_h = yes ; then
6027                         krb5_impl=heimdal
6028                 else
6029                         krb5_impl=mit
6030                 fi
6031
6032                 if test $krb5_impl = mit; then
6033                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6034 echo "configure:6035: checking for main in -lkrb5" >&5
6035 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6037   echo $ac_n "(cached) $ac_c" 1>&6
6038 else
6039   ac_save_LIBS="$LIBS"
6040 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6041 cat > conftest.$ac_ext <<EOF
6042 #line 6043 "configure"
6043 #include "confdefs.h"
6044
6045 int main() {
6046 main()
6047 ; return 0; }
6048 EOF
6049 if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6050   rm -rf conftest*
6051   eval "ac_cv_lib_$ac_lib_var=yes"
6052 else
6053   echo "configure: failed program was:" >&5
6054   cat conftest.$ac_ext >&5
6055   rm -rf conftest*
6056   eval "ac_cv_lib_$ac_lib_var=no"
6057 fi
6058 rm -f conftest*
6059 LIBS="$ac_save_LIBS"
6060
6061 fi
6062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6063   echo "$ac_t""yes" 1>&6
6064   have_krb5=yes
6065                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6066 else
6067   echo "$ac_t""no" 1>&6
6068 have_krb5=no
6069 fi
6070
6071
6072                 elif test $krb5_impl = heimdal; then
6073                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6074 echo "configure:6075: checking for main in -lkrb5" >&5
6075 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6077   echo $ac_n "(cached) $ac_c" 1>&6
6078 else
6079   ac_save_LIBS="$LIBS"
6080 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6081 cat > conftest.$ac_ext <<EOF
6082 #line 6083 "configure"
6083 #include "confdefs.h"
6084
6085 int main() {
6086 main()
6087 ; return 0; }
6088 EOF
6089 if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6090   rm -rf conftest*
6091   eval "ac_cv_lib_$ac_lib_var=yes"
6092 else
6093   echo "configure: failed program was:" >&5
6094   cat conftest.$ac_ext >&5
6095   rm -rf conftest*
6096   eval "ac_cv_lib_$ac_lib_var=no"
6097 fi
6098 rm -f conftest*
6099 LIBS="$ac_save_LIBS"
6100
6101 fi
6102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6103   echo "$ac_t""yes" 1>&6
6104   have_krb5=yes
6105                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6106 else
6107   echo "$ac_t""no" 1>&6
6108 have_krb5=no
6109 fi
6110
6111
6112                         cat >> confdefs.h <<\EOF
6113 #define HAVE_HEIMDAL_KERBEROS 1
6114 EOF
6115
6116                 else
6117                         have_krb5=no
6118                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6119                 fi
6120
6121                 if test $have_krb5 = yes ; then
6122                         ol_link_krb5=yes
6123
6124                         cat >> confdefs.h <<\EOF
6125 #define HAVE_KRB5 1
6126 EOF
6127
6128
6129                         if test $ol_enable_kpasswd != no ; then
6130                                 ol_link_kpasswd=yes;
6131                         fi
6132
6133                         if test $ol_with_kerberos = k5only ; then
6134                                 ol_with_kerberos=found
6135                         fi
6136
6137                 elif test $ol_with_kerberos != auto ; then
6138                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6139                 fi
6140
6141         fi
6142 fi
6143
6144 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6145         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6146
6147         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6148 do
6149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6151 echo "configure:6152: checking for $ac_hdr" >&5
6152 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6153   echo $ac_n "(cached) $ac_c" 1>&6
6154 else
6155   cat > conftest.$ac_ext <<EOF
6156 #line 6157 "configure"
6157 #include "confdefs.h"
6158 #include <$ac_hdr>
6159 EOF
6160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6161 { (eval echo configure:6162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6163 if test -z "$ac_err"; then
6164   rm -rf conftest*
6165   eval "ac_cv_header_$ac_safe=yes"
6166 else
6167   echo "$ac_err" >&5
6168   echo "configure: failed program was:" >&5
6169   cat conftest.$ac_ext >&5
6170   rm -rf conftest*
6171   eval "ac_cv_header_$ac_safe=no"
6172 fi
6173 rm -f conftest*
6174 fi
6175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6176   echo "$ac_t""yes" 1>&6
6177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6178   cat >> confdefs.h <<EOF
6179 #define $ac_tr_hdr 1
6180 EOF
6181  
6182 else
6183   echo "$ac_t""no" 1>&6
6184 fi
6185 done
6186
6187
6188         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6189                 if test $krb5_impl = mit; then
6190                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6191 echo "configure:6192: checking for main in -lkrb4" >&5
6192 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6194   echo $ac_n "(cached) $ac_c" 1>&6
6195 else
6196   ac_save_LIBS="$LIBS"
6197 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6198 cat > conftest.$ac_ext <<EOF
6199 #line 6200 "configure"
6200 #include "confdefs.h"
6201
6202 int main() {
6203 main()
6204 ; return 0; }
6205 EOF
6206 if { (eval echo configure:6207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6207   rm -rf conftest*
6208   eval "ac_cv_lib_$ac_lib_var=yes"
6209 else
6210   echo "configure: failed program was:" >&5
6211   cat conftest.$ac_ext >&5
6212   rm -rf conftest*
6213   eval "ac_cv_lib_$ac_lib_var=no"
6214 fi
6215 rm -f conftest*
6216 LIBS="$ac_save_LIBS"
6217
6218 fi
6219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6220   echo "$ac_t""yes" 1>&6
6221   have_k425=yes
6222                                 KRB4_LIBS="-lkrb4 -ldes425"
6223 else
6224   echo "$ac_t""no" 1>&6
6225 have_k425=no
6226 fi
6227
6228
6229                 elif test $krb5_impl = heimdal; then
6230                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6231 echo "configure:6232: checking for main in -lkrb4" >&5
6232 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6234   echo $ac_n "(cached) $ac_c" 1>&6
6235 else
6236   ac_save_LIBS="$LIBS"
6237 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6238 cat > conftest.$ac_ext <<EOF
6239 #line 6240 "configure"
6240 #include "confdefs.h"
6241
6242 int main() {
6243 main()
6244 ; return 0; }
6245 EOF
6246 if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6247   rm -rf conftest*
6248   eval "ac_cv_lib_$ac_lib_var=yes"
6249 else
6250   echo "configure: failed program was:" >&5
6251   cat conftest.$ac_ext >&5
6252   rm -rf conftest*
6253   eval "ac_cv_lib_$ac_lib_var=no"
6254 fi
6255 rm -f conftest*
6256 LIBS="$ac_save_LIBS"
6257
6258 fi
6259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6260   echo "$ac_t""yes" 1>&6
6261   have_k425=yes
6262                                 KRB4_LIBS="-lkrb4"
6263 else
6264   echo "$ac_t""no" 1>&6
6265 have_k425=no
6266 fi
6267
6268
6269                 else
6270                         have_425=no
6271                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6272                 fi
6273
6274                 if test $have_k425 = yes ; then
6275                         ol_with_kerberos=found
6276                         ol_link_krb4=yes
6277
6278                         cat >> confdefs.h <<\EOF
6279 #define HAVE_KRB425 1
6280 EOF
6281
6282                         cat >> confdefs.h <<\EOF
6283 #define HAVE_KRB4 1
6284 EOF
6285
6286
6287                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6288 echo "configure:6289: checking for des_debug in Kerberos libraries" >&5
6289 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6290   echo $ac_n "(cached) $ac_c" 1>&6
6291 else
6292   
6293                                                                 save_LIBS="$LIBS"
6294                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6295                                 cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298
6299 #include <kerberosIV/krb.h>
6300 #include <kerberosIV/des.h>
6301 extern int des_debug;
6302
6303 int main() {
6304
6305 des_debug = 1;
6306
6307 ; return 0; }
6308 EOF
6309 if { (eval echo configure:6310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6310   rm -rf conftest*
6311   ol_cv_var_des_debug=yes
6312 else
6313   echo "configure: failed program was:" >&5
6314   cat conftest.$ac_ext >&5
6315   rm -rf conftest*
6316   ol_cv_var_des_debug=no
6317 fi
6318 rm -f conftest*
6319                                                                 LIBS="$save_LIBS"
6320                         
6321 fi
6322
6323 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6324
6325                         if test $ol_cv_var_des_debug = yes ; then
6326                                 cat >> confdefs.h <<\EOF
6327 #define HAVE_DES_DEBUG 1
6328 EOF
6329
6330                         fi
6331
6332                         LIBS="$save_LIBS"
6333                 fi
6334         fi
6335 fi
6336
6337 if test $ol_link_krb5 = yes ; then
6338         ol_with_kerberos=found
6339 fi
6340
6341 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6342         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6343
6344         for ac_hdr in krb.h des.h krb-archaeology.h 
6345 do
6346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6348 echo "configure:6349: checking for $ac_hdr" >&5
6349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6350   echo $ac_n "(cached) $ac_c" 1>&6
6351 else
6352   cat > conftest.$ac_ext <<EOF
6353 #line 6354 "configure"
6354 #include "confdefs.h"
6355 #include <$ac_hdr>
6356 EOF
6357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6358 { (eval echo configure:6359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6360 if test -z "$ac_err"; then
6361   rm -rf conftest*
6362   eval "ac_cv_header_$ac_safe=yes"
6363 else
6364   echo "$ac_err" >&5
6365   echo "configure: failed program was:" >&5
6366   cat conftest.$ac_ext >&5
6367   rm -rf conftest*
6368   eval "ac_cv_header_$ac_safe=no"
6369 fi
6370 rm -f conftest*
6371 fi
6372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6373   echo "$ac_t""yes" 1>&6
6374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6375   cat >> confdefs.h <<EOF
6376 #define $ac_tr_hdr 1
6377 EOF
6378  
6379 else
6380   echo "$ac_t""no" 1>&6
6381 fi
6382 done
6383
6384
6385         if test $ac_cv_header_krb_h = yes ; then
6386                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6387 echo "configure:6388: checking for main in -lkrb" >&5
6388 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6389 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6390   echo $ac_n "(cached) $ac_c" 1>&6
6391 else
6392   ac_save_LIBS="$LIBS"
6393 LIBS="-lkrb -ldes $LIBS"
6394 cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397
6398 int main() {
6399 main()
6400 ; return 0; }
6401 EOF
6402 if { (eval echo configure:6403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6403   rm -rf conftest*
6404   eval "ac_cv_lib_$ac_lib_var=yes"
6405 else
6406   echo "configure: failed program was:" >&5
6407   cat conftest.$ac_ext >&5
6408   rm -rf conftest*
6409   eval "ac_cv_lib_$ac_lib_var=no"
6410 fi
6411 rm -f conftest*
6412 LIBS="$ac_save_LIBS"
6413
6414 fi
6415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6416   echo "$ac_t""yes" 1>&6
6417   have_k4=yes
6418 else
6419   echo "$ac_t""no" 1>&6
6420 have_k4=no
6421 fi
6422
6423
6424                 if test $have_k4 = yes ; then
6425                         ol_with_kerberos=found
6426                         ol_link_krb4=yes
6427
6428                         cat >> confdefs.h <<\EOF
6429 #define HAVE_KRB4 1
6430 EOF
6431
6432
6433                         KRB4_LIBS="-lkrb -ldes"
6434
6435                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6436                                 cat >> confdefs.h <<\EOF
6437 #define HAVE_KTH_KERBEROS 1
6438 EOF
6439
6440                         fi
6441                 fi
6442         fi
6443 fi
6444
6445 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6446         ol_link_kpasswd=yes
6447 fi
6448
6449 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6450         ol_link_kbind=yes
6451
6452 elif test $ol_enable_kbind = yes ; then
6453         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6454 fi
6455
6456 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6457         cat >> confdefs.h <<\EOF
6458 #define HAVE_KERBEROS 1
6459 EOF
6460
6461
6462 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6463         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6464 fi
6465
6466 ol_link_tls=no
6467 if test $ol_with_tls != no ; then
6468         for ac_hdr in openssl/ssl.h ssl.h
6469 do
6470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6471 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6472 echo "configure:6473: checking for $ac_hdr" >&5
6473 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6474   echo $ac_n "(cached) $ac_c" 1>&6
6475 else
6476   cat > conftest.$ac_ext <<EOF
6477 #line 6478 "configure"
6478 #include "confdefs.h"
6479 #include <$ac_hdr>
6480 EOF
6481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6482 { (eval echo configure:6483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6484 if test -z "$ac_err"; then
6485   rm -rf conftest*
6486   eval "ac_cv_header_$ac_safe=yes"
6487 else
6488   echo "$ac_err" >&5
6489   echo "configure: failed program was:" >&5
6490   cat conftest.$ac_ext >&5
6491   rm -rf conftest*
6492   eval "ac_cv_header_$ac_safe=no"
6493 fi
6494 rm -f conftest*
6495 fi
6496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6497   echo "$ac_t""yes" 1>&6
6498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6499   cat >> confdefs.h <<EOF
6500 #define $ac_tr_hdr 1
6501 EOF
6502  
6503 else
6504   echo "$ac_t""no" 1>&6
6505 fi
6506 done
6507
6508         
6509         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6510                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6511 echo "configure:6512: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6512 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6514   echo $ac_n "(cached) $ac_c" 1>&6
6515 else
6516   ac_save_LIBS="$LIBS"
6517 LIBS="-lssl -lcrypto $LIBS"
6518 cat > conftest.$ac_ext <<EOF
6519 #line 6520 "configure"
6520 #include "confdefs.h"
6521 /* Override any gcc2 internal prototype to avoid an error.  */
6522 /* We use char because int might match the return type of a gcc2
6523     builtin and then its argument prototype would still apply.  */
6524 char SSLeay_add_ssl_algorithms();
6525
6526 int main() {
6527 SSLeay_add_ssl_algorithms()
6528 ; return 0; }
6529 EOF
6530 if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6531   rm -rf conftest*
6532   eval "ac_cv_lib_$ac_lib_var=yes"
6533 else
6534   echo "configure: failed program was:" >&5
6535   cat conftest.$ac_ext >&5
6536   rm -rf conftest*
6537   eval "ac_cv_lib_$ac_lib_var=no"
6538 fi
6539 rm -f conftest*
6540 LIBS="$ac_save_LIBS"
6541
6542 fi
6543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6544   echo "$ac_t""yes" 1>&6
6545   have_ssleay=yes
6546                         need_rsaref=no
6547 else
6548   echo "$ac_t""no" 1>&6
6549 have_ssleay=no
6550 fi
6551
6552                         
6553                 if test $have_ssleay = no ; then
6554                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6555 echo "configure:6556: checking for SSL_library_init in -lssl" >&5
6556 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6558   echo $ac_n "(cached) $ac_c" 1>&6
6559 else
6560   ac_save_LIBS="$LIBS"
6561 LIBS="-lssl -lcrypto $LIBS"
6562 cat > conftest.$ac_ext <<EOF
6563 #line 6564 "configure"
6564 #include "confdefs.h"
6565 /* Override any gcc2 internal prototype to avoid an error.  */
6566 /* We use char because int might match the return type of a gcc2
6567     builtin and then its argument prototype would still apply.  */
6568 char SSL_library_init();
6569
6570 int main() {
6571 SSL_library_init()
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6575   rm -rf conftest*
6576   eval "ac_cv_lib_$ac_lib_var=yes"
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   eval "ac_cv_lib_$ac_lib_var=no"
6582 fi
6583 rm -f conftest*
6584 LIBS="$ac_save_LIBS"
6585
6586 fi
6587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6588   echo "$ac_t""yes" 1>&6
6589   have_ssleay=yes
6590                                 need_rsaref=no
6591 else
6592   echo "$ac_t""no" 1>&6
6593 have_ssleay=no
6594 fi
6595
6596                 fi
6597
6598                 if test $have_ssleay = no ; then
6599                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6600 echo "configure:6601: checking for ssl3_accept in -lssl" >&5
6601 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6602 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6603   echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605   ac_save_LIBS="$LIBS"
6606 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6607 cat > conftest.$ac_ext <<EOF
6608 #line 6609 "configure"
6609 #include "confdefs.h"
6610 /* Override any gcc2 internal prototype to avoid an error.  */
6611 /* We use char because int might match the return type of a gcc2
6612     builtin and then its argument prototype would still apply.  */
6613 char ssl3_accept();
6614
6615 int main() {
6616 ssl3_accept()
6617 ; return 0; }
6618 EOF
6619 if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6620   rm -rf conftest*
6621   eval "ac_cv_lib_$ac_lib_var=yes"
6622 else
6623   echo "configure: failed program was:" >&5
6624   cat conftest.$ac_ext >&5
6625   rm -rf conftest*
6626   eval "ac_cv_lib_$ac_lib_var=no"
6627 fi
6628 rm -f conftest*
6629 LIBS="$ac_save_LIBS"
6630
6631 fi
6632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6633   echo "$ac_t""yes" 1>&6
6634   have_ssleay=yes
6635                                 need_rsaref=yes
6636 else
6637   echo "$ac_t""no" 1>&6
6638 have_ssleay=no
6639 fi
6640
6641                 fi
6642
6643                 if test $have_ssleay = yes ; then
6644                         ol_with_tls=found
6645                         ol_link_tls=yes
6646
6647                         cat >> confdefs.h <<\EOF
6648 #define HAVE_SSLEAY 1
6649 EOF
6650
6651
6652                         if test $need_rsaref = yes; then
6653                                 cat >> confdefs.h <<\EOF
6654 #define HAVE_RSAREF 1
6655 EOF
6656
6657
6658                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6659                         else
6660                                 TLS_LIBS="-lssl -lcrypto"
6661                         fi
6662                 fi
6663         fi
6664
6665 else
6666         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6667 fi
6668
6669 if test $ol_link_tls = yes ; then
6670         cat >> confdefs.h <<\EOF
6671 #define HAVE_TLS 1
6672 EOF
6673
6674
6675 elif test $ol_with_tls = auto ; then
6676         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6677         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6678
6679 elif test $ol_with_tls != no ; then
6680         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6681 fi
6682
6683 if test $ol_enable_lmpasswd != no; then
6684         if test $ol_link_tls != yes ; then
6685                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
6686         fi
6687
6688         cat >> confdefs.h <<\EOF
6689 #define SLAPD_LMHASH 1
6690 EOF
6691
6692 fi
6693
6694 for ac_func in \
6695         ctime_r                 \
6696         gethostbyname_r gethostbyaddr_r \
6697
6698 do
6699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6700 echo "configure:6701: checking for $ac_func" >&5
6701 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char $ac_func(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char $ac_func();
6714 char (*f)();
6715
6716 int main() {
6717
6718 /* The GNU C library defines this for functions which it implements
6719     to always fail with ENOSYS.  Some functions are actually named
6720     something starting with __ and the normal name is an alias.  */
6721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6722 choke me
6723 #else
6724 f = $ac_func;
6725 #endif
6726
6727 ; return 0; }
6728 EOF
6729 if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6730   rm -rf conftest*
6731   eval "ac_cv_func_$ac_func=yes"
6732 else
6733   echo "configure: failed program was:" >&5
6734   cat conftest.$ac_ext >&5
6735   rm -rf conftest*
6736   eval "ac_cv_func_$ac_func=no"
6737 fi
6738 rm -f conftest*
6739 fi
6740
6741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6744   cat >> confdefs.h <<EOF
6745 #define $ac_tr_func 1
6746 EOF
6747  
6748 else
6749   echo "$ac_t""no" 1>&6
6750 fi
6751 done
6752
6753
6754 if test "$ac_cv_func_ctime_r" = no ; then
6755         ol_cv_func_ctime_r_nargs=0
6756 else
6757         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6758 echo "configure:6759: checking number of arguments of ctime_r" >&5
6759 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6760   echo $ac_n "(cached) $ac_c" 1>&6
6761 else
6762   cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 #include <time.h>
6766 int main() {
6767 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6768 ; return 0; }
6769 EOF
6770 if { (eval echo configure:6771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6771   rm -rf conftest*
6772   ol_cv_func_ctime_r_nargs3=yes
6773 else
6774   echo "configure: failed program was:" >&5
6775   cat conftest.$ac_ext >&5
6776   rm -rf conftest*
6777   ol_cv_func_ctime_r_nargs3=no
6778 fi
6779 rm -f conftest*
6780
6781         cat > conftest.$ac_ext <<EOF
6782 #line 6783 "configure"
6783 #include "confdefs.h"
6784 #include <time.h>
6785 int main() {
6786 time_t ti; char *buffer; ctime_r(&ti,buffer);
6787 ; return 0; }
6788 EOF
6789 if { (eval echo configure:6790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6790   rm -rf conftest*
6791   ol_cv_func_ctime_r_nargs2=yes
6792 else
6793   echo "configure: failed program was:" >&5
6794   cat conftest.$ac_ext >&5
6795   rm -rf conftest*
6796   ol_cv_func_ctime_r_nargs2=no
6797 fi
6798 rm -f conftest*
6799
6800         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6801                 $ol_cv_func_ctime_r_nargs2 = no ; then
6802
6803                 ol_cv_func_ctime_r_nargs=3
6804
6805         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6806                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6807
6808                 ol_cv_func_ctime_r_nargs=2
6809
6810         else
6811                 ol_cv_func_ctime_r_nargs=0
6812         fi
6813   
6814 fi
6815
6816 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6817
6818   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6819         cat >> confdefs.h <<EOF
6820 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6821 EOF
6822
6823   fi
6824
6825 fi
6826
6827 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6828         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6829 echo "configure:6830: checking number of arguments of gethostbyname_r" >&5
6830 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   cat > conftest.$ac_ext <<EOF
6834 #line 6835 "configure"
6835 #include "confdefs.h"
6836 #include <sys/types.h>
6837 #include <sys/socket.h>
6838 #include <netinet/in.h>
6839 #include <netdb.h>
6840 #define BUFSIZE (sizeof(struct hostent)+10)
6841 int main() {
6842 struct hostent hent; char buffer[BUFSIZE];
6843                 int bufsize=BUFSIZE;int h_errno;
6844                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6845                         buffer, bufsize, &h_errno);
6846 ; return 0; }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6849   rm -rf conftest*
6850   ol_cv_func_gethostbyname_r_nargs5=yes
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -rf conftest*
6855   ol_cv_func_gethostbyname_r_nargs5=no
6856 fi
6857 rm -f conftest*
6858
6859         cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862 #include <sys/types.h>
6863 #include <sys/socket.h>
6864 #include <netinet/in.h>
6865 #include <netdb.h>
6866 #define BUFSIZE (sizeof(struct hostent)+10)
6867 int main() {
6868 struct hostent hent;struct hostent *rhent;
6869                 char buffer[BUFSIZE];
6870                 int bufsize=BUFSIZE;int h_errno;
6871                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6872                         &rhent, &h_errno);
6873 ; return 0; }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6876   rm -rf conftest*
6877   ol_cv_func_gethostbyname_r_nargs6=yes
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   ol_cv_func_gethostbyname_r_nargs6=no
6883 fi
6884 rm -f conftest*
6885
6886         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6887                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6888
6889                 ol_cv_func_gethostbyname_r_nargs=5
6890
6891         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6892                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6893
6894                 ol_cv_func_gethostbyname_r_nargs=6
6895
6896         else
6897                 ol_cv_func_gethostbyname_r_nargs=0
6898         fi
6899   
6900 fi
6901
6902 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6903   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6904         cat >> confdefs.h <<EOF
6905 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6906 EOF
6907
6908   fi
6909
6910 else
6911         ol_cv_func_gethostbyname_r_nargs=0
6912 fi
6913  
6914 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6915         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6916 echo "configure:6917: checking number of arguments of gethostbyaddr_r" >&5
6917 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6918   echo $ac_n "(cached) $ac_c" 1>&6
6919 else
6920   cat > conftest.$ac_ext <<EOF
6921 #line 6922 "configure"
6922 #include "confdefs.h"
6923 #include <sys/types.h>
6924 #include <sys/socket.h>
6925 #include <netinet/in.h>
6926 #include <netdb.h>
6927 #define BUFSIZE (sizeof(struct hostent)+10)
6928 int main() {
6929 struct hostent hent; char buffer[BUFSIZE]; 
6930             struct in_addr add;
6931             size_t alen=sizeof(struct in_addr);
6932             int bufsize=BUFSIZE;int h_errno;
6933                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6934                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6935 ; return 0; }
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6938   rm -rf conftest*
6939   ol_cv_func_gethostbyaddr_r_nargs7=yes
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   ol_cv_func_gethostbyaddr_r_nargs7=no
6945 fi
6946 rm -f conftest*
6947
6948         cat > conftest.$ac_ext <<EOF
6949 #line 6950 "configure"
6950 #include "confdefs.h"
6951 #include <sys/types.h>
6952 #include <sys/socket.h>
6953 #include <netinet/in.h>
6954 #include <netdb.h>
6955 #define BUFSIZE (sizeof(struct hostent)+10)
6956 int main() {
6957 struct hostent hent;
6958                 struct hostent *rhent; char buffer[BUFSIZE]; 
6959                 struct in_addr add;
6960                 size_t alen=sizeof(struct in_addr);
6961                 int bufsize=BUFSIZE;int h_errno;
6962                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6963                         alen, AF_INET, &hent, buffer, bufsize, 
6964                         &rhent, &h_errno);
6965 ; return 0; }
6966 EOF
6967 if { (eval echo configure:6968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6968   rm -rf conftest*
6969   ol_cv_func_gethostbyaddr_r_nargs8=yes
6970 else
6971   echo "configure: failed program was:" >&5
6972   cat conftest.$ac_ext >&5
6973   rm -rf conftest*
6974   ol_cv_func_gethostbyaddr_r_nargs8=no
6975 fi
6976 rm -f conftest*
6977
6978         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6979                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6980
6981                 ol_cv_func_gethostbyaddr_r_nargs=7
6982
6983         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6984                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6985
6986                 ol_cv_func_gethostbyaddr_r_nargs=8
6987
6988         else
6989                 ol_cv_func_gethostbyaddr_r_nargs=0
6990         fi
6991   
6992 fi
6993
6994 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6995   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6996     cat >> confdefs.h <<EOF
6997 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6998 EOF
6999
7000   fi
7001
7002 else
7003         ol_cv_func_gethostbyaddr_r_nargs=0
7004 fi
7005
7006 if test "$ac_cv_func_ctime_r" = yes \
7007         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7008         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7009         -a "$ac_cv_func_gethostbyname_r" = yes \
7010         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7011         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7012         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7013         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7014         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7015         ; then
7016  
7017         cat >> confdefs.h <<\EOF
7018 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7019 EOF
7020
7021 fi
7022
7023 ol_link_threads=no
7024
7025 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7026         -o $ol_with_threads = nt ; then
7027
7028         
7029         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7030 echo "configure:7031: checking for NT Threads" >&5
7031 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7032   echo $ac_n "(cached) $ac_c" 1>&6
7033 else
7034   
7035                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7036 echo "configure:7037: checking for _beginthread" >&5
7037 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7038   echo $ac_n "(cached) $ac_c" 1>&6
7039 else
7040   cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043 /* System header to define __stub macros and hopefully few prototypes,
7044     which can conflict with char _beginthread(); below.  */
7045 #include <assert.h>
7046 /* Override any gcc2 internal prototype to avoid an error.  */
7047 /* We use char because int might match the return type of a gcc2
7048     builtin and then its argument prototype would still apply.  */
7049 char _beginthread();
7050 char (*f)();
7051
7052 int main() {
7053
7054 /* The GNU C library defines this for functions which it implements
7055     to always fail with ENOSYS.  Some functions are actually named
7056     something starting with __ and the normal name is an alias.  */
7057 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7058 choke me
7059 #else
7060 f = _beginthread;
7061 #endif
7062
7063 ; return 0; }
7064 EOF
7065 if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7066   rm -rf conftest*
7067   eval "ac_cv_func__beginthread=yes"
7068 else
7069   echo "configure: failed program was:" >&5
7070   cat conftest.$ac_ext >&5
7071   rm -rf conftest*
7072   eval "ac_cv_func__beginthread=no"
7073 fi
7074 rm -f conftest*
7075 fi
7076
7077 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7078   echo "$ac_t""yes" 1>&6
7079   ol_cv_nt_threads=yes
7080 else
7081   echo "$ac_t""no" 1>&6
7082 ol_cv_nt_threads=no
7083 fi
7084
7085         
7086 fi
7087
7088 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7089
7090         if test $ol_cv_nt_threads = yes ; then
7091                 cat >> confdefs.h <<\EOF
7092 #define HAVE_NT_THREADS 1
7093 EOF
7094
7095         fi
7096
7097
7098         if test "$ol_cv_nt_threads" = yes ; then
7099         ol_link_threads=nt
7100         ol_with_threads=found
7101         ol_with_yielding_select=yes
7102
7103                 cat >> confdefs.h <<\EOF
7104 #define HAVE_NT_SERVICE_MANAGER 1
7105 EOF
7106
7107                 cat >> confdefs.h <<\EOF
7108 #define HAVE_NT_EVENT_LOG 1
7109 EOF
7110
7111         fi
7112
7113         if test $ol_with_threads = nt ; then
7114                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7115         fi
7116 fi
7117
7118 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7119         -o $ol_with_threads = posix ; then
7120
7121         for ac_hdr in pthread.h
7122 do
7123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7125 echo "configure:7126: checking for $ac_hdr" >&5
7126 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7127   echo $ac_n "(cached) $ac_c" 1>&6
7128 else
7129   cat > conftest.$ac_ext <<EOF
7130 #line 7131 "configure"
7131 #include "confdefs.h"
7132 #include <$ac_hdr>
7133 EOF
7134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7135 { (eval echo configure:7136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7137 if test -z "$ac_err"; then
7138   rm -rf conftest*
7139   eval "ac_cv_header_$ac_safe=yes"
7140 else
7141   echo "$ac_err" >&5
7142   echo "configure: failed program was:" >&5
7143   cat conftest.$ac_ext >&5
7144   rm -rf conftest*
7145   eval "ac_cv_header_$ac_safe=no"
7146 fi
7147 rm -f conftest*
7148 fi
7149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7150   echo "$ac_t""yes" 1>&6
7151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7152   cat >> confdefs.h <<EOF
7153 #define $ac_tr_hdr 1
7154 EOF
7155  
7156 else
7157   echo "$ac_t""no" 1>&6
7158 fi
7159 done
7160
7161
7162         if test $ac_cv_header_pthread_h = yes ; then
7163                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7164 echo "configure:7165: checking POSIX thread version" >&5
7165 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7166   echo $ac_n "(cached) $ac_c" 1>&6
7167 else
7168   
7169         cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172
7173 #               include <pthread.h>
7174                 /* this check could be improved */
7175 #               ifdef PTHREAD_ONCE_INIT
7176                         pthread_version_final;
7177 #               endif
7178         
7179 EOF
7180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7181   egrep "pthread_version_final" >/dev/null 2>&1; then
7182   rm -rf conftest*
7183   ol_pthread_final=yes
7184 else
7185   rm -rf conftest*
7186   ol_pthread_final=no
7187 fi
7188 rm -f conftest*
7189
7190
7191         cat > conftest.$ac_ext <<EOF
7192 #line 7193 "configure"
7193 #include "confdefs.h"
7194
7195 #               include <pthread.h>
7196                 /* this check could be improved */
7197 #               ifdef pthread_once_init
7198                         pthread_version_draft4;
7199 #               endif
7200         
7201 EOF
7202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7203   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7204   rm -rf conftest*
7205   ol_pthread_draft4=yes
7206 else
7207   rm -rf conftest*
7208   ol_pthread_draft4=no
7209 fi
7210 rm -f conftest*
7211
7212
7213         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7214                 ol_cv_pthread_version=final
7215         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7216                 ol_cv_pthread_version=draft4
7217         else
7218                 ol_cv_pthread_version=unknown
7219         fi
7220
7221 fi
7222
7223 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7224
7225
7226                 if test $ol_cv_pthread_version = final ; then
7227                         cat >> confdefs.h <<\EOF
7228 #define HAVE_PTHREADS_FINAL 1
7229 EOF
7230
7231                 elif test $ol_cv_pthread_version = draft4 ; then
7232                         cat >> confdefs.h <<\EOF
7233 #define HAVE_PTHREADS_D4 1
7234 EOF
7235
7236                 else
7237                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7238                 fi
7239
7240                 # consider threads found
7241                 ol_with_threads=found
7242
7243                 
7244         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7245 echo "configure:7246: checking for LinuxThreads pthread.h" >&5
7246 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7247   echo $ac_n "(cached) $ac_c" 1>&6
7248 else
7249   cat > conftest.$ac_ext <<EOF
7250 #line 7251 "configure"
7251 #include "confdefs.h"
7252 #include <pthread.h>
7253 EOF
7254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7255   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7256   rm -rf conftest*
7257   ol_cv_header_linux_threads=yes
7258 else
7259   rm -rf conftest*
7260   ol_cv_header_linux_threads=no
7261 fi
7262 rm -f conftest*
7263
7264                 
7265 fi
7266
7267 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7268         if test $ol_cv_header_linux_threads = yes; then
7269                 cat >> confdefs.h <<\EOF
7270 #define HAVE_LINUX_THREADS 1
7271 EOF
7272
7273         fi
7274
7275                 
7276         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7277 echo "configure:7278: checking for GNU Pth pthread.h" >&5
7278 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7279   echo $ac_n "(cached) $ac_c" 1>&6
7280 else
7281   cat > conftest.$ac_ext <<EOF
7282 #line 7283 "configure"
7283 #include "confdefs.h"
7284 #include <pthread.h>
7285 #ifdef _POSIX_THREAD_IS_GNU_PTH
7286         __gnu_pth__;
7287 #endif
7288
7289 EOF
7290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7291   egrep "__gnu_pth__" >/dev/null 2>&1; then
7292   rm -rf conftest*
7293   ol_cv_header_gnu_pth_pthread_h=yes
7294 else
7295   rm -rf conftest*
7296   ol_cv_header_gnu_pth_pthread_h=no
7297 fi
7298 rm -f conftest*
7299
7300                 
7301 fi
7302
7303 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7304
7305
7306                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7307                         for ac_hdr in sched.h
7308 do
7309 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7310 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7311 echo "configure:7312: checking for $ac_hdr" >&5
7312 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7313   echo $ac_n "(cached) $ac_c" 1>&6
7314 else
7315   cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318 #include <$ac_hdr>
7319 EOF
7320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7321 { (eval echo configure:7322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7323 if test -z "$ac_err"; then
7324   rm -rf conftest*
7325   eval "ac_cv_header_$ac_safe=yes"
7326 else
7327   echo "$ac_err" >&5
7328   echo "configure: failed program was:" >&5
7329   cat conftest.$ac_ext >&5
7330   rm -rf conftest*
7331   eval "ac_cv_header_$ac_safe=no"
7332 fi
7333 rm -f conftest*
7334 fi
7335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7336   echo "$ac_t""yes" 1>&6
7337     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7338   cat >> confdefs.h <<EOF
7339 #define $ac_tr_hdr 1
7340 EOF
7341  
7342 else
7343   echo "$ac_t""no" 1>&6
7344 fi
7345 done
7346
7347                 fi
7348
7349                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7350                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7351 echo "configure:7352: checking for pthread_create in default libraries" >&5
7352 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7353   echo $ac_n "(cached) $ac_c" 1>&6
7354 else
7355   
7356                 if test "$cross_compiling" = yes; then
7357   cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 /* pthread test headers */
7361 #include <pthread.h>
7362 #ifndef NULL
7363 #define NULL (void*)0
7364 #endif
7365
7366 static void *task(p)
7367         void *p;
7368 {
7369         return (void *) (p == NULL);
7370 }
7371
7372 int main() {
7373
7374         /* pthread test function */
7375         pthread_t t;
7376         int status;
7377 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7378         /* This system (e.g. AIX) defaults detached; must override */
7379         pthread_attr_t attr;
7380
7381         status = pthread_attr_init(&attr);
7382         if( status ) exit( status );
7383
7384         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7385         if( status ) exit( status );
7386
7387 #       define  ATTR    &attr
7388 #elif defined( HAVE_PTHREADS_D4 )
7389 #       define  ATTR    pthread_attr_default
7390 #else
7391 #       define  ATTR    NULL
7392 #endif
7393
7394         /* make sure pthread_create() isn't just a stub */
7395         status = pthread_create(&t, ATTR, task, NULL);
7396         if( status ) exit( status );
7397
7398         /* give the thread a chance to complete...
7399      * it should remain joinable and hence detachable
7400          */
7401         sleep( 1 );
7402
7403         /* make sure pthread_detach() isn't just a stub */
7404 #if HAVE_PTHREADS_D4
7405         status = pthread_detach( &t );
7406 #else
7407         status = pthread_detach( t );
7408 #endif
7409
7410 #ifdef HAVE_LINUX_THREADS
7411         pthread_kill_other_threads_np();
7412 #endif
7413
7414         exit( status );
7415
7416 ; return 0; }
7417 EOF
7418 if { (eval echo configure:7419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7419   rm -rf conftest*
7420   ol_cv_pthread_create=yes
7421 else
7422   echo "configure: failed program was:" >&5
7423   cat conftest.$ac_ext >&5
7424   rm -rf conftest*
7425   ol_cv_pthread_create=no
7426 fi
7427 rm -f conftest*
7428 else
7429   cat > conftest.$ac_ext <<EOF
7430 #line 7431 "configure"
7431 #include "confdefs.h"
7432 /* pthread test headers */
7433 #include <pthread.h>
7434 #ifndef NULL
7435 #define NULL (void*)0
7436 #endif
7437
7438 static void *task(p)
7439         void *p;
7440 {
7441         return (void *) (p == NULL);
7442 }
7443
7444
7445 int main(argc, argv)
7446         int argc;
7447         char **argv;
7448 {
7449
7450         /* pthread test function */
7451         pthread_t t;
7452         int status;
7453 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7454         /* This system (e.g. AIX) defaults detached; must override */
7455         pthread_attr_t attr;
7456
7457         status = pthread_attr_init(&attr);
7458         if( status ) exit( status );
7459
7460         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7461         if( status ) exit( status );
7462
7463 #       define  ATTR    &attr
7464 #elif defined( HAVE_PTHREADS_D4 )
7465 #       define  ATTR    pthread_attr_default
7466 #else
7467 #       define  ATTR    NULL
7468 #endif
7469
7470         /* make sure pthread_create() isn't just a stub */
7471         status = pthread_create(&t, ATTR, task, NULL);
7472         if( status ) exit( status );
7473
7474         /* give the thread a chance to complete...
7475      * it should remain joinable and hence detachable
7476          */
7477         sleep( 1 );
7478
7479         /* make sure pthread_detach() isn't just a stub */
7480 #if HAVE_PTHREADS_D4
7481         status = pthread_detach( &t );
7482 #else
7483         status = pthread_detach( t );
7484 #endif
7485
7486 #ifdef HAVE_LINUX_THREADS
7487         pthread_kill_other_threads_np();
7488 #endif
7489
7490         exit( status );
7491
7492 }
7493
7494 EOF
7495 if { (eval echo configure:7496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7496 then
7497   ol_cv_pthread_create=yes
7498 else
7499   echo "configure: failed program was:" >&5
7500   cat conftest.$ac_ext >&5
7501   rm -fr conftest*
7502   ol_cv_pthread_create=no
7503 fi
7504 rm -fr conftest*
7505 fi
7506
7507 fi
7508
7509 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7510
7511                 if test $ol_cv_pthread_create != no ; then
7512                         ol_link_threads=posix
7513                         ol_link_pthreads=""
7514                 fi
7515                 
7516                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7517 if test "$ol_link_threads" = no ; then
7518         # try -kthread
7519         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7520 echo "configure:7521: checking for pthread link with -kthread" >&5
7521 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7522   echo $ac_n "(cached) $ac_c" 1>&6
7523 else
7524   
7525                 # save the flags
7526                 ol_LIBS="$LIBS"
7527                 LIBS="-kthread $LIBS"
7528
7529                 if test "$cross_compiling" = yes; then
7530   cat > conftest.$ac_ext <<EOF
7531 #line 7532 "configure"
7532 #include "confdefs.h"
7533 /* pthread test headers */
7534 #include <pthread.h>
7535 #ifndef NULL
7536 #define NULL (void*)0
7537 #endif
7538
7539 static void *task(p)
7540         void *p;
7541 {
7542         return (void *) (p == NULL);
7543 }
7544
7545 int main() {
7546
7547         /* pthread test function */
7548         pthread_t t;
7549         int status;
7550 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7551         /* This system (e.g. AIX) defaults detached; must override */
7552         pthread_attr_t attr;
7553
7554         status = pthread_attr_init(&attr);
7555         if( status ) exit( status );
7556
7557         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7558         if( status ) exit( status );
7559
7560 #       define  ATTR    &attr
7561 #elif defined( HAVE_PTHREADS_D4 )
7562 #       define  ATTR    pthread_attr_default
7563 #else
7564 #       define  ATTR    NULL
7565 #endif
7566
7567         /* make sure pthread_create() isn't just a stub */
7568         status = pthread_create(&t, ATTR, task, NULL);
7569         if( status ) exit( status );
7570
7571         /* give the thread a chance to complete...
7572      * it should remain joinable and hence detachable
7573          */
7574         sleep( 1 );
7575
7576         /* make sure pthread_detach() isn't just a stub */
7577 #if HAVE_PTHREADS_D4
7578         status = pthread_detach( &t );
7579 #else
7580         status = pthread_detach( t );
7581 #endif
7582
7583 #ifdef HAVE_LINUX_THREADS
7584         pthread_kill_other_threads_np();
7585 #endif
7586
7587         exit( status );
7588
7589 ; return 0; }
7590 EOF
7591 if { (eval echo configure:7592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7592   rm -rf conftest*
7593   ol_cv_pthread_kthread=yes
7594 else
7595   echo "configure: failed program was:" >&5
7596   cat conftest.$ac_ext >&5
7597   rm -rf conftest*
7598   ol_cv_pthread_kthread=no
7599 fi
7600 rm -f conftest*
7601 else
7602   cat > conftest.$ac_ext <<EOF
7603 #line 7604 "configure"
7604 #include "confdefs.h"
7605 /* pthread test headers */
7606 #include <pthread.h>
7607 #ifndef NULL
7608 #define NULL (void*)0
7609 #endif
7610
7611 static void *task(p)
7612         void *p;
7613 {
7614         return (void *) (p == NULL);
7615 }
7616
7617
7618 int main(argc, argv)
7619         int argc;
7620         char **argv;
7621 {
7622
7623         /* pthread test function */
7624         pthread_t t;
7625         int status;
7626 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7627         /* This system (e.g. AIX) defaults detached; must override */
7628         pthread_attr_t attr;
7629
7630         status = pthread_attr_init(&attr);
7631         if( status ) exit( status );
7632
7633         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7634         if( status ) exit( status );
7635
7636 #       define  ATTR    &attr
7637 #elif defined( HAVE_PTHREADS_D4 )
7638 #       define  ATTR    pthread_attr_default
7639 #else
7640 #       define  ATTR    NULL
7641 #endif
7642
7643         /* make sure pthread_create() isn't just a stub */
7644         status = pthread_create(&t, ATTR, task, NULL);
7645         if( status ) exit( status );
7646
7647         /* give the thread a chance to complete...
7648      * it should remain joinable and hence detachable
7649          */
7650         sleep( 1 );
7651
7652         /* make sure pthread_detach() isn't just a stub */
7653 #if HAVE_PTHREADS_D4
7654         status = pthread_detach( &t );
7655 #else
7656         status = pthread_detach( t );
7657 #endif
7658
7659 #ifdef HAVE_LINUX_THREADS
7660         pthread_kill_other_threads_np();
7661 #endif
7662
7663         exit( status );
7664
7665 }
7666
7667 EOF
7668 if { (eval echo configure:7669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7669 then
7670   ol_cv_pthread_kthread=yes
7671 else
7672   echo "configure: failed program was:" >&5
7673   cat conftest.$ac_ext >&5
7674   rm -fr conftest*
7675   ol_cv_pthread_kthread=no
7676 fi
7677 rm -fr conftest*
7678 fi
7679
7680
7681                 # restore the LIBS
7682                 LIBS="$ol_LIBS"
7683         
7684 fi
7685
7686 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7687
7688         if test $ol_cv_pthread_kthread = yes ; then
7689                 ol_link_pthreads="-kthread"
7690                 ol_link_threads=posix
7691         fi
7692 fi
7693
7694                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7695 if test "$ol_link_threads" = no ; then
7696         # try -pthread
7697         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7698 echo "configure:7699: checking for pthread link with -pthread" >&5
7699 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7700   echo $ac_n "(cached) $ac_c" 1>&6
7701 else
7702   
7703                 # save the flags
7704                 ol_LIBS="$LIBS"
7705                 LIBS="-pthread $LIBS"
7706
7707                 if test "$cross_compiling" = yes; then
7708   cat > conftest.$ac_ext <<EOF
7709 #line 7710 "configure"
7710 #include "confdefs.h"
7711 /* pthread test headers */
7712 #include <pthread.h>
7713 #ifndef NULL
7714 #define NULL (void*)0
7715 #endif
7716
7717 static void *task(p)
7718         void *p;
7719 {
7720         return (void *) (p == NULL);
7721 }
7722
7723 int main() {
7724
7725         /* pthread test function */
7726         pthread_t t;
7727         int status;
7728 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7729         /* This system (e.g. AIX) defaults detached; must override */
7730         pthread_attr_t attr;
7731
7732         status = pthread_attr_init(&attr);
7733         if( status ) exit( status );
7734
7735         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7736         if( status ) exit( status );
7737
7738 #       define  ATTR    &attr
7739 #elif defined( HAVE_PTHREADS_D4 )
7740 #       define  ATTR    pthread_attr_default
7741 #else
7742 #       define  ATTR    NULL
7743 #endif
7744
7745         /* make sure pthread_create() isn't just a stub */
7746         status = pthread_create(&t, ATTR, task, NULL);
7747         if( status ) exit( status );
7748
7749         /* give the thread a chance to complete...
7750      * it should remain joinable and hence detachable
7751          */
7752         sleep( 1 );
7753
7754         /* make sure pthread_detach() isn't just a stub */
7755 #if HAVE_PTHREADS_D4
7756         status = pthread_detach( &t );
7757 #else
7758         status = pthread_detach( t );
7759 #endif
7760
7761 #ifdef HAVE_LINUX_THREADS
7762         pthread_kill_other_threads_np();
7763 #endif
7764
7765         exit( status );
7766
7767 ; return 0; }
7768 EOF
7769 if { (eval echo configure:7770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7770   rm -rf conftest*
7771   ol_cv_pthread_pthread=yes
7772 else
7773   echo "configure: failed program was:" >&5
7774   cat conftest.$ac_ext >&5
7775   rm -rf conftest*
7776   ol_cv_pthread_pthread=no
7777 fi
7778 rm -f conftest*
7779 else
7780   cat > conftest.$ac_ext <<EOF
7781 #line 7782 "configure"
7782 #include "confdefs.h"
7783 /* pthread test headers */
7784 #include <pthread.h>
7785 #ifndef NULL
7786 #define NULL (void*)0
7787 #endif
7788
7789 static void *task(p)
7790         void *p;
7791 {
7792         return (void *) (p == NULL);
7793 }
7794
7795
7796 int main(argc, argv)
7797         int argc;
7798         char **argv;
7799 {
7800
7801         /* pthread test function */
7802         pthread_t t;
7803         int status;
7804 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7805         /* This system (e.g. AIX) defaults detached; must override */
7806         pthread_attr_t attr;
7807
7808         status = pthread_attr_init(&attr);
7809         if( status ) exit( status );
7810
7811         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7812         if( status ) exit( status );
7813
7814 #       define  ATTR    &attr
7815 #elif defined( HAVE_PTHREADS_D4 )
7816 #       define  ATTR    pthread_attr_default
7817 #else
7818 #       define  ATTR    NULL
7819 #endif
7820
7821         /* make sure pthread_create() isn't just a stub */
7822         status = pthread_create(&t, ATTR, task, NULL);
7823         if( status ) exit( status );
7824
7825         /* give the thread a chance to complete...
7826      * it should remain joinable and hence detachable
7827          */
7828         sleep( 1 );
7829
7830         /* make sure pthread_detach() isn't just a stub */
7831 #if HAVE_PTHREADS_D4
7832         status = pthread_detach( &t );
7833 #else
7834         status = pthread_detach( t );
7835 #endif
7836
7837 #ifdef HAVE_LINUX_THREADS
7838         pthread_kill_other_threads_np();
7839 #endif
7840
7841         exit( status );
7842
7843 }
7844
7845 EOF
7846 if { (eval echo configure:7847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7847 then
7848   ol_cv_pthread_pthread=yes
7849 else
7850   echo "configure: failed program was:" >&5
7851   cat conftest.$ac_ext >&5
7852   rm -fr conftest*
7853   ol_cv_pthread_pthread=no
7854 fi
7855 rm -fr conftest*
7856 fi
7857
7858
7859                 # restore the LIBS
7860                 LIBS="$ol_LIBS"
7861         
7862 fi
7863
7864 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7865
7866         if test $ol_cv_pthread_pthread = yes ; then
7867                 ol_link_pthreads="-pthread"
7868                 ol_link_threads=posix
7869         fi
7870 fi
7871
7872                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7873 if test "$ol_link_threads" = no ; then
7874         # try -pthreads
7875         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7876 echo "configure:7877: checking for pthread link with -pthreads" >&5
7877 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7878   echo $ac_n "(cached) $ac_c" 1>&6
7879 else
7880   
7881                 # save the flags
7882                 ol_LIBS="$LIBS"
7883                 LIBS="-pthreads $LIBS"
7884
7885                 if test "$cross_compiling" = yes; then
7886   cat > conftest.$ac_ext <<EOF
7887 #line 7888 "configure"
7888 #include "confdefs.h"
7889 /* pthread test headers */
7890 #include <pthread.h>
7891 #ifndef NULL
7892 #define NULL (void*)0
7893 #endif
7894
7895 static void *task(p)
7896         void *p;
7897 {
7898         return (void *) (p == NULL);
7899 }
7900
7901 int main() {
7902
7903         /* pthread test function */
7904         pthread_t t;
7905         int status;
7906 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7907         /* This system (e.g. AIX) defaults detached; must override */
7908         pthread_attr_t attr;
7909
7910         status = pthread_attr_init(&attr);
7911         if( status ) exit( status );
7912
7913         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7914         if( status ) exit( status );
7915
7916 #       define  ATTR    &attr
7917 #elif defined( HAVE_PTHREADS_D4 )
7918 #       define  ATTR    pthread_attr_default
7919 #else
7920 #       define  ATTR    NULL
7921 #endif
7922
7923         /* make sure pthread_create() isn't just a stub */
7924         status = pthread_create(&t, ATTR, task, NULL);
7925         if( status ) exit( status );
7926
7927         /* give the thread a chance to complete...
7928      * it should remain joinable and hence detachable
7929          */
7930         sleep( 1 );
7931
7932         /* make sure pthread_detach() isn't just a stub */
7933 #if HAVE_PTHREADS_D4
7934         status = pthread_detach( &t );
7935 #else
7936         status = pthread_detach( t );
7937 #endif
7938
7939 #ifdef HAVE_LINUX_THREADS
7940         pthread_kill_other_threads_np();
7941 #endif
7942
7943         exit( status );
7944
7945 ; return 0; }
7946 EOF
7947 if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7948   rm -rf conftest*
7949   ol_cv_pthread_pthreads=yes
7950 else
7951   echo "configure: failed program was:" >&5
7952   cat conftest.$ac_ext >&5
7953   rm -rf conftest*
7954   ol_cv_pthread_pthreads=no
7955 fi
7956 rm -f conftest*
7957 else
7958   cat > conftest.$ac_ext <<EOF
7959 #line 7960 "configure"
7960 #include "confdefs.h"
7961 /* pthread test headers */
7962 #include <pthread.h>
7963 #ifndef NULL
7964 #define NULL (void*)0
7965 #endif
7966
7967 static void *task(p)
7968         void *p;
7969 {
7970         return (void *) (p == NULL);
7971 }
7972
7973
7974 int main(argc, argv)
7975         int argc;
7976         char **argv;
7977 {
7978
7979         /* pthread test function */
7980         pthread_t t;
7981         int status;
7982 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7983         /* This system (e.g. AIX) defaults detached; must override */
7984         pthread_attr_t attr;
7985
7986         status = pthread_attr_init(&attr);
7987         if( status ) exit( status );
7988
7989         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7990         if( status ) exit( status );
7991
7992 #       define  ATTR    &attr
7993 #elif defined( HAVE_PTHREADS_D4 )
7994 #       define  ATTR    pthread_attr_default
7995 #else
7996 #       define  ATTR    NULL
7997 #endif
7998
7999         /* make sure pthread_create() isn't just a stub */
8000         status = pthread_create(&t, ATTR, task, NULL);
8001         if( status ) exit( status );
8002
8003         /* give the thread a chance to complete...
8004      * it should remain joinable and hence detachable
8005          */
8006         sleep( 1 );
8007
8008         /* make sure pthread_detach() isn't just a stub */
8009 #if HAVE_PTHREADS_D4
8010         status = pthread_detach( &t );
8011 #else
8012         status = pthread_detach( t );
8013 #endif
8014
8015 #ifdef HAVE_LINUX_THREADS
8016         pthread_kill_other_threads_np();
8017 #endif
8018
8019         exit( status );
8020
8021 }
8022
8023 EOF
8024 if { (eval echo configure:8025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8025 then
8026   ol_cv_pthread_pthreads=yes
8027 else
8028   echo "configure: failed program was:" >&5
8029   cat conftest.$ac_ext >&5
8030   rm -fr conftest*
8031   ol_cv_pthread_pthreads=no
8032 fi
8033 rm -fr conftest*
8034 fi
8035
8036
8037                 # restore the LIBS
8038                 LIBS="$ol_LIBS"
8039         
8040 fi
8041
8042 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8043
8044         if test $ol_cv_pthread_pthreads = yes ; then
8045                 ol_link_pthreads="-pthreads"
8046                 ol_link_threads=posix
8047         fi
8048 fi
8049
8050                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8051 if test "$ol_link_threads" = no ; then
8052         # try -mthreads
8053         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8054 echo "configure:8055: checking for pthread link with -mthreads" >&5
8055 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8056   echo $ac_n "(cached) $ac_c" 1>&6
8057 else
8058   
8059                 # save the flags
8060                 ol_LIBS="$LIBS"
8061                 LIBS="-mthreads $LIBS"
8062
8063                 if test "$cross_compiling" = yes; then
8064   cat > conftest.$ac_ext <<EOF
8065 #line 8066 "configure"
8066 #include "confdefs.h"
8067 /* pthread test headers */
8068 #include <pthread.h>
8069 #ifndef NULL
8070 #define NULL (void*)0
8071 #endif
8072
8073 static void *task(p)
8074         void *p;
8075 {
8076         return (void *) (p == NULL);
8077 }
8078
8079 int main() {
8080
8081         /* pthread test function */
8082         pthread_t t;
8083         int status;
8084 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8085         /* This system (e.g. AIX) defaults detached; must override */
8086         pthread_attr_t attr;
8087
8088         status = pthread_attr_init(&attr);
8089         if( status ) exit( status );
8090
8091         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8092         if( status ) exit( status );
8093
8094 #       define  ATTR    &attr
8095 #elif defined( HAVE_PTHREADS_D4 )
8096 #       define  ATTR    pthread_attr_default
8097 #else
8098 #       define  ATTR    NULL
8099 #endif
8100
8101         /* make sure pthread_create() isn't just a stub */
8102         status = pthread_create(&t, ATTR, task, NULL);
8103         if( status ) exit( status );
8104
8105         /* give the thread a chance to complete...
8106      * it should remain joinable and hence detachable
8107          */
8108         sleep( 1 );
8109
8110         /* make sure pthread_detach() isn't just a stub */
8111 #if HAVE_PTHREADS_D4
8112         status = pthread_detach( &t );
8113 #else
8114         status = pthread_detach( t );
8115 #endif
8116
8117 #ifdef HAVE_LINUX_THREADS
8118         pthread_kill_other_threads_np();
8119 #endif
8120
8121         exit( status );
8122
8123 ; return 0; }
8124 EOF
8125 if { (eval echo configure:8126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8126   rm -rf conftest*
8127   ol_cv_pthread_mthreads=yes
8128 else
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -rf conftest*
8132   ol_cv_pthread_mthreads=no
8133 fi
8134 rm -f conftest*
8135 else
8136   cat > conftest.$ac_ext <<EOF
8137 #line 8138 "configure"
8138 #include "confdefs.h"
8139 /* pthread test headers */
8140 #include <pthread.h>
8141 #ifndef NULL
8142 #define NULL (void*)0
8143 #endif
8144
8145 static void *task(p)
8146         void *p;
8147 {
8148         return (void *) (p == NULL);
8149 }
8150
8151
8152 int main(argc, argv)
8153         int argc;
8154         char **argv;
8155 {
8156
8157         /* pthread test function */
8158         pthread_t t;
8159         int status;
8160 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8161         /* This system (e.g. AIX) defaults detached; must override */
8162         pthread_attr_t attr;
8163
8164         status = pthread_attr_init(&attr);
8165         if( status ) exit( status );
8166
8167         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8168         if( status ) exit( status );
8169
8170 #       define  ATTR    &attr
8171 #elif defined( HAVE_PTHREADS_D4 )
8172 #       define  ATTR    pthread_attr_default
8173 #else
8174 #       define  ATTR    NULL
8175 #endif
8176
8177         /* make sure pthread_create() isn't just a stub */
8178         status = pthread_create(&t, ATTR, task, NULL);
8179         if( status ) exit( status );
8180
8181         /* give the thread a chance to complete...
8182      * it should remain joinable and hence detachable
8183          */
8184         sleep( 1 );
8185
8186         /* make sure pthread_detach() isn't just a stub */
8187 #if HAVE_PTHREADS_D4
8188         status = pthread_detach( &t );
8189 #else
8190         status = pthread_detach( t );
8191 #endif
8192
8193 #ifdef HAVE_LINUX_THREADS
8194         pthread_kill_other_threads_np();
8195 #endif
8196
8197         exit( status );
8198
8199 }
8200
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8203 then
8204   ol_cv_pthread_mthreads=yes
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -fr conftest*
8209   ol_cv_pthread_mthreads=no
8210 fi
8211 rm -fr conftest*
8212 fi
8213
8214
8215                 # restore the LIBS
8216                 LIBS="$ol_LIBS"
8217         
8218 fi
8219
8220 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8221
8222         if test $ol_cv_pthread_mthreads = yes ; then
8223                 ol_link_pthreads="-mthreads"
8224                 ol_link_threads=posix
8225         fi
8226 fi
8227
8228                 # Pthread try link: -thread (ol_cv_pthread_thread)
8229 if test "$ol_link_threads" = no ; then
8230         # try -thread
8231         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8232 echo "configure:8233: checking for pthread link with -thread" >&5
8233 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8234   echo $ac_n "(cached) $ac_c" 1>&6
8235 else
8236   
8237                 # save the flags
8238                 ol_LIBS="$LIBS"
8239                 LIBS="-thread $LIBS"
8240
8241                 if test "$cross_compiling" = yes; then
8242   cat > conftest.$ac_ext <<EOF
8243 #line 8244 "configure"
8244 #include "confdefs.h"
8245 /* pthread test headers */
8246 #include <pthread.h>
8247 #ifndef NULL
8248 #define NULL (void*)0
8249 #endif
8250
8251 static void *task(p)
8252         void *p;
8253 {
8254         return (void *) (p == NULL);
8255 }
8256
8257 int main() {
8258
8259         /* pthread test function */
8260         pthread_t t;
8261         int status;
8262 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8263         /* This system (e.g. AIX) defaults detached; must override */
8264         pthread_attr_t attr;
8265
8266         status = pthread_attr_init(&attr);
8267         if( status ) exit( status );
8268
8269         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8270         if( status ) exit( status );
8271
8272 #       define  ATTR    &attr
8273 #elif defined( HAVE_PTHREADS_D4 )
8274 #       define  ATTR    pthread_attr_default
8275 #else
8276 #       define  ATTR    NULL
8277 #endif
8278
8279         /* make sure pthread_create() isn't just a stub */
8280         status = pthread_create(&t, ATTR, task, NULL);
8281         if( status ) exit( status );
8282
8283         /* give the thread a chance to complete...
8284      * it should remain joinable and hence detachable
8285          */
8286         sleep( 1 );
8287
8288         /* make sure pthread_detach() isn't just a stub */
8289 #if HAVE_PTHREADS_D4
8290         status = pthread_detach( &t );
8291 #else
8292         status = pthread_detach( t );
8293 #endif
8294
8295 #ifdef HAVE_LINUX_THREADS
8296         pthread_kill_other_threads_np();
8297 #endif
8298
8299         exit( status );
8300
8301 ; return 0; }
8302 EOF
8303 if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8304   rm -rf conftest*
8305   ol_cv_pthread_thread=yes
8306 else
8307   echo "configure: failed program was:" >&5
8308   cat conftest.$ac_ext >&5
8309   rm -rf conftest*
8310   ol_cv_pthread_thread=no
8311 fi
8312 rm -f conftest*
8313 else
8314   cat > conftest.$ac_ext <<EOF
8315 #line 8316 "configure"
8316 #include "confdefs.h"
8317 /* pthread test headers */
8318 #include <pthread.h>
8319 #ifndef NULL
8320 #define NULL (void*)0
8321 #endif
8322
8323 static void *task(p)
8324         void *p;
8325 {
8326         return (void *) (p == NULL);
8327 }
8328
8329
8330 int main(argc, argv)
8331         int argc;
8332         char **argv;
8333 {
8334
8335         /* pthread test function */
8336         pthread_t t;
8337         int status;
8338 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8339         /* This system (e.g. AIX) defaults detached; must override */
8340         pthread_attr_t attr;
8341
8342         status = pthread_attr_init(&attr);
8343         if( status ) exit( status );
8344
8345         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8346         if( status ) exit( status );
8347
8348 #       define  ATTR    &attr
8349 #elif defined( HAVE_PTHREADS_D4 )
8350 #       define  ATTR    pthread_attr_default
8351 #else
8352 #       define  ATTR    NULL
8353 #endif
8354
8355         /* make sure pthread_create() isn't just a stub */
8356         status = pthread_create(&t, ATTR, task, NULL);
8357         if( status ) exit( status );
8358
8359         /* give the thread a chance to complete...
8360      * it should remain joinable and hence detachable
8361          */
8362         sleep( 1 );
8363
8364         /* make sure pthread_detach() isn't just a stub */
8365 #if HAVE_PTHREADS_D4
8366         status = pthread_detach( &t );
8367 #else
8368         status = pthread_detach( t );
8369 #endif
8370
8371 #ifdef HAVE_LINUX_THREADS
8372         pthread_kill_other_threads_np();
8373 #endif
8374
8375         exit( status );
8376
8377 }
8378
8379 EOF
8380 if { (eval echo configure:8381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8381 then
8382   ol_cv_pthread_thread=yes
8383 else
8384   echo "configure: failed program was:" >&5
8385   cat conftest.$ac_ext >&5
8386   rm -fr conftest*
8387   ol_cv_pthread_thread=no
8388 fi
8389 rm -fr conftest*
8390 fi
8391
8392
8393                 # restore the LIBS
8394                 LIBS="$ol_LIBS"
8395         
8396 fi
8397
8398 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8399
8400         if test $ol_cv_pthread_thread = yes ; then
8401                 ol_link_pthreads="-thread"
8402                 ol_link_threads=posix
8403         fi
8404 fi
8405
8406
8407                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8408 if test "$ol_link_threads" = no ; then
8409         # try -lpthread -lmach -lexc -lc_r
8410         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8411 echo "configure:8412: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8412 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8413   echo $ac_n "(cached) $ac_c" 1>&6
8414 else
8415   
8416                 # save the flags
8417                 ol_LIBS="$LIBS"
8418                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8419
8420                 if test "$cross_compiling" = yes; then
8421   cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 /* pthread test headers */
8425 #include <pthread.h>
8426 #ifndef NULL
8427 #define NULL (void*)0
8428 #endif
8429
8430 static void *task(p)
8431         void *p;
8432 {
8433         return (void *) (p == NULL);
8434 }
8435
8436 int main() {
8437
8438         /* pthread test function */
8439         pthread_t t;
8440         int status;
8441 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8442         /* This system (e.g. AIX) defaults detached; must override */
8443         pthread_attr_t attr;
8444
8445         status = pthread_attr_init(&attr);
8446         if( status ) exit( status );
8447
8448         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8449         if( status ) exit( status );
8450
8451 #       define  ATTR    &attr
8452 #elif defined( HAVE_PTHREADS_D4 )
8453 #       define  ATTR    pthread_attr_default
8454 #else
8455 #       define  ATTR    NULL
8456 #endif
8457
8458         /* make sure pthread_create() isn't just a stub */
8459         status = pthread_create(&t, ATTR, task, NULL);
8460         if( status ) exit( status );
8461
8462         /* give the thread a chance to complete...
8463      * it should remain joinable and hence detachable
8464          */
8465         sleep( 1 );
8466
8467         /* make sure pthread_detach() isn't just a stub */
8468 #if HAVE_PTHREADS_D4
8469         status = pthread_detach( &t );
8470 #else
8471         status = pthread_detach( t );
8472 #endif
8473
8474 #ifdef HAVE_LINUX_THREADS
8475         pthread_kill_other_threads_np();
8476 #endif
8477
8478         exit( status );
8479
8480 ; return 0; }
8481 EOF
8482 if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8483   rm -rf conftest*
8484   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8485 else
8486   echo "configure: failed program was:" >&5
8487   cat conftest.$ac_ext >&5
8488   rm -rf conftest*
8489   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8490 fi
8491 rm -f conftest*
8492 else
8493   cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 /* pthread test headers */
8497 #include <pthread.h>
8498 #ifndef NULL
8499 #define NULL (void*)0
8500 #endif
8501
8502 static void *task(p)
8503         void *p;
8504 {
8505         return (void *) (p == NULL);
8506 }
8507
8508
8509 int main(argc, argv)
8510         int argc;
8511         char **argv;
8512 {
8513
8514         /* pthread test function */
8515         pthread_t t;
8516         int status;
8517 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8518         /* This system (e.g. AIX) defaults detached; must override */
8519         pthread_attr_t attr;
8520
8521         status = pthread_attr_init(&attr);
8522         if( status ) exit( status );
8523
8524         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8525         if( status ) exit( status );
8526
8527 #       define  ATTR    &attr
8528 #elif defined( HAVE_PTHREADS_D4 )
8529 #       define  ATTR    pthread_attr_default
8530 #else
8531 #       define  ATTR    NULL
8532 #endif
8533
8534         /* make sure pthread_create() isn't just a stub */
8535         status = pthread_create(&t, ATTR, task, NULL);
8536         if( status ) exit( status );
8537
8538         /* give the thread a chance to complete...
8539      * it should remain joinable and hence detachable
8540          */
8541         sleep( 1 );
8542
8543         /* make sure pthread_detach() isn't just a stub */
8544 #if HAVE_PTHREADS_D4
8545         status = pthread_detach( &t );
8546 #else
8547         status = pthread_detach( t );
8548 #endif
8549
8550 #ifdef HAVE_LINUX_THREADS
8551         pthread_kill_other_threads_np();
8552 #endif
8553
8554         exit( status );
8555
8556 }
8557
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8560 then
8561   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -fr conftest*
8566   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8567 fi
8568 rm -fr conftest*
8569 fi
8570
8571
8572                 # restore the LIBS
8573                 LIBS="$ol_LIBS"
8574         
8575 fi
8576
8577 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8578
8579         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8580                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8581                 ol_link_threads=posix
8582         fi
8583 fi
8584
8585                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8586 if test "$ol_link_threads" = no ; then
8587         # try -lpthread -lmach -lexc
8588         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8589 echo "configure:8590: checking for pthread link with -lpthread -lmach -lexc" >&5
8590 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8591   echo $ac_n "(cached) $ac_c" 1>&6
8592 else
8593   
8594                 # save the flags
8595                 ol_LIBS="$LIBS"
8596                 LIBS="-lpthread -lmach -lexc $LIBS"
8597
8598                 if test "$cross_compiling" = yes; then
8599   cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602 /* pthread test headers */
8603 #include <pthread.h>
8604 #ifndef NULL
8605 #define NULL (void*)0
8606 #endif
8607
8608 static void *task(p)
8609         void *p;
8610 {
8611         return (void *) (p == NULL);
8612 }
8613
8614 int main() {
8615
8616         /* pthread test function */
8617         pthread_t t;
8618         int status;
8619 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8620         /* This system (e.g. AIX) defaults detached; must override */
8621         pthread_attr_t attr;
8622
8623         status = pthread_attr_init(&attr);
8624         if( status ) exit( status );
8625
8626         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8627         if( status ) exit( status );
8628
8629 #       define  ATTR    &attr
8630 #elif defined( HAVE_PTHREADS_D4 )
8631 #       define  ATTR    pthread_attr_default
8632 #else
8633 #       define  ATTR    NULL
8634 #endif
8635
8636         /* make sure pthread_create() isn't just a stub */
8637         status = pthread_create(&t, ATTR, task, NULL);
8638         if( status ) exit( status );
8639
8640         /* give the thread a chance to complete...
8641      * it should remain joinable and hence detachable
8642          */
8643         sleep( 1 );
8644
8645         /* make sure pthread_detach() isn't just a stub */
8646 #if HAVE_PTHREADS_D4
8647         status = pthread_detach( &t );
8648 #else
8649         status = pthread_detach( t );
8650 #endif
8651
8652 #ifdef HAVE_LINUX_THREADS
8653         pthread_kill_other_threads_np();
8654 #endif
8655
8656         exit( status );
8657
8658 ; return 0; }
8659 EOF
8660 if { (eval echo configure:8661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8661   rm -rf conftest*
8662   ol_cv_pthread_lpthread_lmach_lexc=yes
8663 else
8664   echo "configure: failed program was:" >&5
8665   cat conftest.$ac_ext >&5
8666   rm -rf conftest*
8667   ol_cv_pthread_lpthread_lmach_lexc=no
8668 fi
8669 rm -f conftest*
8670 else
8671   cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 /* pthread test headers */
8675 #include <pthread.h>
8676 #ifndef NULL
8677 #define NULL (void*)0
8678 #endif
8679
8680 static void *task(p)
8681         void *p;
8682 {
8683         return (void *) (p == NULL);
8684 }
8685
8686
8687 int main(argc, argv)
8688         int argc;
8689         char **argv;
8690 {
8691
8692         /* pthread test function */
8693         pthread_t t;
8694         int status;
8695 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8696         /* This system (e.g. AIX) defaults detached; must override */
8697         pthread_attr_t attr;
8698
8699         status = pthread_attr_init(&attr);
8700         if( status ) exit( status );
8701
8702         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8703         if( status ) exit( status );
8704
8705 #       define  ATTR    &attr
8706 #elif defined( HAVE_PTHREADS_D4 )
8707 #       define  ATTR    pthread_attr_default
8708 #else
8709 #       define  ATTR    NULL
8710 #endif
8711
8712         /* make sure pthread_create() isn't just a stub */
8713         status = pthread_create(&t, ATTR, task, NULL);
8714         if( status ) exit( status );
8715
8716         /* give the thread a chance to complete...
8717      * it should remain joinable and hence detachable
8718          */
8719         sleep( 1 );
8720
8721         /* make sure pthread_detach() isn't just a stub */
8722 #if HAVE_PTHREADS_D4
8723         status = pthread_detach( &t );
8724 #else
8725         status = pthread_detach( t );
8726 #endif
8727
8728 #ifdef HAVE_LINUX_THREADS
8729         pthread_kill_other_threads_np();
8730 #endif
8731
8732         exit( status );
8733
8734 }
8735
8736 EOF
8737 if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8738 then
8739   ol_cv_pthread_lpthread_lmach_lexc=yes
8740 else
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -fr conftest*
8744   ol_cv_pthread_lpthread_lmach_lexc=no
8745 fi
8746 rm -fr conftest*
8747 fi
8748
8749
8750                 # restore the LIBS
8751                 LIBS="$ol_LIBS"
8752         
8753 fi
8754
8755 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8756
8757         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8758                 ol_link_pthreads="-lpthread -lmach -lexc"
8759                 ol_link_threads=posix
8760         fi
8761 fi
8762
8763
8764                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8765 if test "$ol_link_threads" = no ; then
8766         # try -lpthread -Wl,-woff,85
8767         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8768 echo "configure:8769: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8769 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8770   echo $ac_n "(cached) $ac_c" 1>&6
8771 else
8772   
8773                 # save the flags
8774                 ol_LIBS="$LIBS"
8775                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8776
8777                 if test "$cross_compiling" = yes; then
8778   cat > conftest.$ac_ext <<EOF
8779 #line 8780 "configure"
8780 #include "confdefs.h"
8781 /* pthread test headers */
8782 #include <pthread.h>
8783 #ifndef NULL
8784 #define NULL (void*)0
8785 #endif
8786
8787 static void *task(p)
8788         void *p;
8789 {
8790         return (void *) (p == NULL);
8791 }
8792
8793 int main() {
8794
8795         /* pthread test function */
8796         pthread_t t;
8797         int status;
8798 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8799         /* This system (e.g. AIX) defaults detached; must override */
8800         pthread_attr_t attr;
8801
8802         status = pthread_attr_init(&attr);
8803         if( status ) exit( status );
8804
8805         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8806         if( status ) exit( status );
8807
8808 #       define  ATTR    &attr
8809 #elif defined( HAVE_PTHREADS_D4 )
8810 #       define  ATTR    pthread_attr_default
8811 #else
8812 #       define  ATTR    NULL
8813 #endif
8814
8815         /* make sure pthread_create() isn't just a stub */
8816         status = pthread_create(&t, ATTR, task, NULL);
8817         if( status ) exit( status );
8818
8819         /* give the thread a chance to complete...
8820      * it should remain joinable and hence detachable
8821          */
8822         sleep( 1 );
8823
8824         /* make sure pthread_detach() isn't just a stub */
8825 #if HAVE_PTHREADS_D4
8826         status = pthread_detach( &t );
8827 #else
8828         status = pthread_detach( t );
8829 #endif
8830
8831 #ifdef HAVE_LINUX_THREADS
8832         pthread_kill_other_threads_np();
8833 #endif
8834
8835         exit( status );
8836
8837 ; return 0; }
8838 EOF
8839 if { (eval echo configure:8840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8840   rm -rf conftest*
8841   ol_cv_pthread_lib_lpthread_woff=yes
8842 else
8843   echo "configure: failed program was:" >&5
8844   cat conftest.$ac_ext >&5
8845   rm -rf conftest*
8846   ol_cv_pthread_lib_lpthread_woff=no
8847 fi
8848 rm -f conftest*
8849 else
8850   cat > conftest.$ac_ext <<EOF
8851 #line 8852 "configure"
8852 #include "confdefs.h"
8853 /* pthread test headers */
8854 #include <pthread.h>
8855 #ifndef NULL
8856 #define NULL (void*)0
8857 #endif
8858
8859 static void *task(p)
8860         void *p;
8861 {
8862         return (void *) (p == NULL);
8863 }
8864
8865
8866 int main(argc, argv)
8867         int argc;
8868         char **argv;
8869 {
8870
8871         /* pthread test function */
8872         pthread_t t;
8873         int status;
8874 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8875         /* This system (e.g. AIX) defaults detached; must override */
8876         pthread_attr_t attr;
8877
8878         status = pthread_attr_init(&attr);
8879         if( status ) exit( status );
8880
8881         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8882         if( status ) exit( status );
8883
8884 #       define  ATTR    &attr
8885 #elif defined( HAVE_PTHREADS_D4 )
8886 #       define  ATTR    pthread_attr_default
8887 #else
8888 #       define  ATTR    NULL
8889 #endif
8890
8891         /* make sure pthread_create() isn't just a stub */
8892         status = pthread_create(&t, ATTR, task, NULL);
8893         if( status ) exit( status );
8894
8895         /* give the thread a chance to complete...
8896      * it should remain joinable and hence detachable
8897          */
8898         sleep( 1 );
8899
8900         /* make sure pthread_detach() isn't just a stub */
8901 #if HAVE_PTHREADS_D4
8902         status = pthread_detach( &t );
8903 #else
8904         status = pthread_detach( t );
8905 #endif
8906
8907 #ifdef HAVE_LINUX_THREADS
8908         pthread_kill_other_threads_np();
8909 #endif
8910
8911         exit( status );
8912
8913 }
8914
8915 EOF
8916 if { (eval echo configure:8917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8917 then
8918   ol_cv_pthread_lib_lpthread_woff=yes
8919 else
8920   echo "configure: failed program was:" >&5
8921   cat conftest.$ac_ext >&5
8922   rm -fr conftest*
8923   ol_cv_pthread_lib_lpthread_woff=no
8924 fi
8925 rm -fr conftest*
8926 fi
8927
8928
8929                 # restore the LIBS
8930                 LIBS="$ol_LIBS"
8931         
8932 fi
8933
8934 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8935
8936         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8937                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8938                 ol_link_threads=posix
8939         fi
8940 fi
8941
8942
8943                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8944 if test "$ol_link_threads" = no ; then
8945         # try -lpthread
8946         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8947 echo "configure:8948: checking for pthread link with -lpthread" >&5
8948 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8949   echo $ac_n "(cached) $ac_c" 1>&6
8950 else
8951   
8952                 # save the flags
8953                 ol_LIBS="$LIBS"
8954                 LIBS="-lpthread $LIBS"
8955
8956                 if test "$cross_compiling" = yes; then
8957   cat > conftest.$ac_ext <<EOF
8958 #line 8959 "configure"
8959 #include "confdefs.h"
8960 /* pthread test headers */
8961 #include <pthread.h>
8962 #ifndef NULL
8963 #define NULL (void*)0
8964 #endif
8965
8966 static void *task(p)
8967         void *p;
8968 {
8969         return (void *) (p == NULL);
8970 }
8971
8972 int main() {
8973
8974         /* pthread test function */
8975         pthread_t t;
8976         int status;
8977 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8978         /* This system (e.g. AIX) defaults detached; must override */
8979         pthread_attr_t attr;
8980
8981         status = pthread_attr_init(&attr);
8982         if( status ) exit( status );
8983
8984         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8985         if( status ) exit( status );
8986
8987 #       define  ATTR    &attr
8988 #elif defined( HAVE_PTHREADS_D4 )
8989 #       define  ATTR    pthread_attr_default
8990 #else
8991 #       define  ATTR    NULL
8992 #endif
8993
8994         /* make sure pthread_create() isn't just a stub */
8995         status = pthread_create(&t, ATTR, task, NULL);
8996         if( status ) exit( status );
8997
8998         /* give the thread a chance to complete...
8999      * it should remain joinable and hence detachable
9000          */
9001         sleep( 1 );
9002
9003         /* make sure pthread_detach() isn't just a stub */
9004 #if HAVE_PTHREADS_D4
9005         status = pthread_detach( &t );
9006 #else
9007         status = pthread_detach( t );
9008 #endif
9009
9010 #ifdef HAVE_LINUX_THREADS
9011         pthread_kill_other_threads_np();
9012 #endif
9013
9014         exit( status );
9015
9016 ; return 0; }
9017 EOF
9018 if { (eval echo configure:9019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9019   rm -rf conftest*
9020   ol_cv_pthread_lpthread=yes
9021 else
9022   echo "configure: failed program was:" >&5
9023   cat conftest.$ac_ext >&5
9024   rm -rf conftest*
9025   ol_cv_pthread_lpthread=no
9026 fi
9027 rm -f conftest*
9028 else
9029   cat > conftest.$ac_ext <<EOF
9030 #line 9031 "configure"
9031 #include "confdefs.h"
9032 /* pthread test headers */
9033 #include <pthread.h>
9034 #ifndef NULL
9035 #define NULL (void*)0
9036 #endif
9037
9038 static void *task(p)
9039         void *p;
9040 {
9041         return (void *) (p == NULL);
9042 }
9043
9044
9045 int main(argc, argv)
9046         int argc;
9047         char **argv;
9048 {
9049
9050         /* pthread test function */
9051         pthread_t t;
9052         int status;
9053 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9054         /* This system (e.g. AIX) defaults detached; must override */
9055         pthread_attr_t attr;
9056
9057         status = pthread_attr_init(&attr);
9058         if( status ) exit( status );
9059
9060         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9061         if( status ) exit( status );
9062
9063 #       define  ATTR    &attr
9064 #elif defined( HAVE_PTHREADS_D4 )
9065 #       define  ATTR    pthread_attr_default
9066 #else
9067 #       define  ATTR    NULL
9068 #endif
9069
9070         /* make sure pthread_create() isn't just a stub */
9071         status = pthread_create(&t, ATTR, task, NULL);
9072         if( status ) exit( status );
9073
9074         /* give the thread a chance to complete...
9075      * it should remain joinable and hence detachable
9076          */
9077         sleep( 1 );
9078
9079         /* make sure pthread_detach() isn't just a stub */
9080 #if HAVE_PTHREADS_D4
9081         status = pthread_detach( &t );
9082 #else
9083         status = pthread_detach( t );
9084 #endif
9085
9086 #ifdef HAVE_LINUX_THREADS
9087         pthread_kill_other_threads_np();
9088 #endif
9089
9090         exit( status );
9091
9092 }
9093
9094 EOF
9095 if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9096 then
9097   ol_cv_pthread_lpthread=yes
9098 else
9099   echo "configure: failed program was:" >&5
9100   cat conftest.$ac_ext >&5
9101   rm -fr conftest*
9102   ol_cv_pthread_lpthread=no
9103 fi
9104 rm -fr conftest*
9105 fi
9106
9107
9108                 # restore the LIBS
9109                 LIBS="$ol_LIBS"
9110         
9111 fi
9112
9113 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9114
9115         if test $ol_cv_pthread_lpthread = yes ; then
9116                 ol_link_pthreads="-lpthread"
9117                 ol_link_threads=posix
9118         fi
9119 fi
9120
9121                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9122 if test "$ol_link_threads" = no ; then
9123         # try -lc_r
9124         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9125 echo "configure:9126: checking for pthread link with -lc_r" >&5
9126 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9127   echo $ac_n "(cached) $ac_c" 1>&6
9128 else
9129   
9130                 # save the flags
9131                 ol_LIBS="$LIBS"
9132                 LIBS="-lc_r $LIBS"
9133
9134                 if test "$cross_compiling" = yes; then
9135   cat > conftest.$ac_ext <<EOF
9136 #line 9137 "configure"
9137 #include "confdefs.h"
9138 /* pthread test headers */
9139 #include <pthread.h>
9140 #ifndef NULL
9141 #define NULL (void*)0
9142 #endif
9143
9144 static void *task(p)
9145         void *p;
9146 {
9147         return (void *) (p == NULL);
9148 }
9149
9150 int main() {
9151
9152         /* pthread test function */
9153         pthread_t t;
9154         int status;
9155 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9156         /* This system (e.g. AIX) defaults detached; must override */
9157         pthread_attr_t attr;
9158
9159         status = pthread_attr_init(&attr);
9160         if( status ) exit( status );
9161
9162         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9163         if( status ) exit( status );
9164
9165 #       define  ATTR    &attr
9166 #elif defined( HAVE_PTHREADS_D4 )
9167 #       define  ATTR    pthread_attr_default
9168 #else
9169 #       define  ATTR    NULL
9170 #endif
9171
9172         /* make sure pthread_create() isn't just a stub */
9173         status = pthread_create(&t, ATTR, task, NULL);
9174         if( status ) exit( status );
9175
9176         /* give the thread a chance to complete...
9177      * it should remain joinable and hence detachable
9178          */
9179         sleep( 1 );
9180
9181         /* make sure pthread_detach() isn't just a stub */
9182 #if HAVE_PTHREADS_D4
9183         status = pthread_detach( &t );
9184 #else
9185         status = pthread_detach( t );
9186 #endif
9187
9188 #ifdef HAVE_LINUX_THREADS
9189         pthread_kill_other_threads_np();
9190 #endif
9191
9192         exit( status );
9193
9194 ; return 0; }
9195 EOF
9196 if { (eval echo configure:9197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9197   rm -rf conftest*
9198   ol_cv_pthread_lc_r=yes
9199 else
9200   echo "configure: failed program was:" >&5
9201   cat conftest.$ac_ext >&5
9202   rm -rf conftest*
9203   ol_cv_pthread_lc_r=no
9204 fi
9205 rm -f conftest*
9206 else
9207   cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210 /* pthread test headers */
9211 #include <pthread.h>
9212 #ifndef NULL
9213 #define NULL (void*)0
9214 #endif
9215
9216 static void *task(p)
9217         void *p;
9218 {
9219         return (void *) (p == NULL);
9220 }
9221
9222
9223 int main(argc, argv)
9224         int argc;
9225         char **argv;
9226 {
9227
9228         /* pthread test function */
9229         pthread_t t;
9230         int status;
9231 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9232         /* This system (e.g. AIX) defaults detached; must override */
9233         pthread_attr_t attr;
9234
9235         status = pthread_attr_init(&attr);
9236         if( status ) exit( status );
9237
9238         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9239         if( status ) exit( status );
9240
9241 #       define  ATTR    &attr
9242 #elif defined( HAVE_PTHREADS_D4 )
9243 #       define  ATTR    pthread_attr_default
9244 #else
9245 #       define  ATTR    NULL
9246 #endif
9247
9248         /* make sure pthread_create() isn't just a stub */
9249         status = pthread_create(&t, ATTR, task, NULL);
9250         if( status ) exit( status );
9251
9252         /* give the thread a chance to complete...
9253      * it should remain joinable and hence detachable
9254          */
9255         sleep( 1 );
9256
9257         /* make sure pthread_detach() isn't just a stub */
9258 #if HAVE_PTHREADS_D4
9259         status = pthread_detach( &t );
9260 #else
9261         status = pthread_detach( t );
9262 #endif
9263
9264 #ifdef HAVE_LINUX_THREADS
9265         pthread_kill_other_threads_np();
9266 #endif
9267
9268         exit( status );
9269
9270 }
9271
9272 EOF
9273 if { (eval echo configure:9274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9274 then
9275   ol_cv_pthread_lc_r=yes
9276 else
9277   echo "configure: failed program was:" >&5
9278   cat conftest.$ac_ext >&5
9279   rm -fr conftest*
9280   ol_cv_pthread_lc_r=no
9281 fi
9282 rm -fr conftest*
9283 fi
9284
9285
9286                 # restore the LIBS
9287                 LIBS="$ol_LIBS"
9288         
9289 fi
9290
9291 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9292
9293         if test $ol_cv_pthread_lc_r = yes ; then
9294                 ol_link_pthreads="-lc_r"
9295                 ol_link_threads=posix
9296         fi
9297 fi
9298
9299
9300                 # Pthread try link: -threads (ol_cv_pthread_threads)
9301 if test "$ol_link_threads" = no ; then
9302         # try -threads
9303         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9304 echo "configure:9305: checking for pthread link with -threads" >&5
9305 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9306   echo $ac_n "(cached) $ac_c" 1>&6
9307 else
9308   
9309                 # save the flags
9310                 ol_LIBS="$LIBS"
9311                 LIBS="-threads $LIBS"
9312
9313                 if test "$cross_compiling" = yes; then
9314   cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317 /* pthread test headers */
9318 #include <pthread.h>
9319 #ifndef NULL
9320 #define NULL (void*)0
9321 #endif
9322
9323 static void *task(p)
9324         void *p;
9325 {
9326         return (void *) (p == NULL);
9327 }
9328
9329 int main() {
9330
9331         /* pthread test function */
9332         pthread_t t;
9333         int status;
9334 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9335         /* This system (e.g. AIX) defaults detached; must override */
9336         pthread_attr_t attr;
9337
9338         status = pthread_attr_init(&attr);
9339         if( status ) exit( status );
9340
9341         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9342         if( status ) exit( status );
9343
9344 #       define  ATTR    &attr
9345 #elif defined( HAVE_PTHREADS_D4 )
9346 #       define  ATTR    pthread_attr_default
9347 #else
9348 #       define  ATTR    NULL
9349 #endif
9350
9351         /* make sure pthread_create() isn't just a stub */
9352         status = pthread_create(&t, ATTR, task, NULL);
9353         if( status ) exit( status );
9354
9355         /* give the thread a chance to complete...
9356      * it should remain joinable and hence detachable
9357          */
9358         sleep( 1 );
9359
9360         /* make sure pthread_detach() isn't just a stub */
9361 #if HAVE_PTHREADS_D4
9362         status = pthread_detach( &t );
9363 #else
9364         status = pthread_detach( t );
9365 #endif
9366
9367 #ifdef HAVE_LINUX_THREADS
9368         pthread_kill_other_threads_np();
9369 #endif
9370
9371         exit( status );
9372
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   ol_cv_pthread_threads=yes
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   ol_cv_pthread_threads=no
9383 fi
9384 rm -f conftest*
9385 else
9386   cat > conftest.$ac_ext <<EOF
9387 #line 9388 "configure"
9388 #include "confdefs.h"
9389 /* pthread test headers */
9390 #include <pthread.h>
9391 #ifndef NULL
9392 #define NULL (void*)0
9393 #endif
9394
9395 static void *task(p)
9396         void *p;
9397 {
9398         return (void *) (p == NULL);
9399 }
9400
9401
9402 int main(argc, argv)
9403         int argc;
9404         char **argv;
9405 {
9406
9407         /* pthread test function */
9408         pthread_t t;
9409         int status;
9410 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9411         /* This system (e.g. AIX) defaults detached; must override */
9412         pthread_attr_t attr;
9413
9414         status = pthread_attr_init(&attr);
9415         if( status ) exit( status );
9416
9417         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9418         if( status ) exit( status );
9419
9420 #       define  ATTR    &attr
9421 #elif defined( HAVE_PTHREADS_D4 )
9422 #       define  ATTR    pthread_attr_default
9423 #else
9424 #       define  ATTR    NULL
9425 #endif
9426
9427         /* make sure pthread_create() isn't just a stub */
9428         status = pthread_create(&t, ATTR, task, NULL);
9429         if( status ) exit( status );
9430
9431         /* give the thread a chance to complete...
9432      * it should remain joinable and hence detachable
9433          */
9434         sleep( 1 );
9435
9436         /* make sure pthread_detach() isn't just a stub */
9437 #if HAVE_PTHREADS_D4
9438         status = pthread_detach( &t );
9439 #else
9440         status = pthread_detach( t );
9441 #endif
9442
9443 #ifdef HAVE_LINUX_THREADS
9444         pthread_kill_other_threads_np();
9445 #endif
9446
9447         exit( status );
9448
9449 }
9450
9451 EOF
9452 if { (eval echo configure:9453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9453 then
9454   ol_cv_pthread_threads=yes
9455 else
9456   echo "configure: failed program was:" >&5
9457   cat conftest.$ac_ext >&5
9458   rm -fr conftest*
9459   ol_cv_pthread_threads=no
9460 fi
9461 rm -fr conftest*
9462 fi
9463
9464
9465                 # restore the LIBS
9466                 LIBS="$ol_LIBS"
9467         
9468 fi
9469
9470 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9471
9472         if test $ol_cv_pthread_threads = yes ; then
9473                 ol_link_pthreads="-threads"
9474                 ol_link_threads=posix
9475         fi
9476 fi
9477
9478
9479                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9480 if test "$ol_link_threads" = no ; then
9481         # try -lpthreads -lmach -lexc -lc_r
9482         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9483 echo "configure:9484: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9484 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9485   echo $ac_n "(cached) $ac_c" 1>&6
9486 else
9487   
9488                 # save the flags
9489                 ol_LIBS="$LIBS"
9490                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9491
9492                 if test "$cross_compiling" = yes; then
9493   cat > conftest.$ac_ext <<EOF
9494 #line 9495 "configure"
9495 #include "confdefs.h"
9496 /* pthread test headers */
9497 #include <pthread.h>
9498 #ifndef NULL
9499 #define NULL (void*)0
9500 #endif
9501
9502 static void *task(p)
9503         void *p;
9504 {
9505         return (void *) (p == NULL);
9506 }
9507
9508 int main() {
9509
9510         /* pthread test function */
9511         pthread_t t;
9512         int status;
9513 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9514         /* This system (e.g. AIX) defaults detached; must override */
9515         pthread_attr_t attr;
9516
9517         status = pthread_attr_init(&attr);
9518         if( status ) exit( status );
9519
9520         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9521         if( status ) exit( status );
9522
9523 #       define  ATTR    &attr
9524 #elif defined( HAVE_PTHREADS_D4 )
9525 #       define  ATTR    pthread_attr_default
9526 #else
9527 #       define  ATTR    NULL
9528 #endif
9529
9530         /* make sure pthread_create() isn't just a stub */
9531         status = pthread_create(&t, ATTR, task, NULL);
9532         if( status ) exit( status );
9533
9534         /* give the thread a chance to complete...
9535      * it should remain joinable and hence detachable
9536          */
9537         sleep( 1 );
9538
9539         /* make sure pthread_detach() isn't just a stub */
9540 #if HAVE_PTHREADS_D4
9541         status = pthread_detach( &t );
9542 #else
9543         status = pthread_detach( t );
9544 #endif
9545
9546 #ifdef HAVE_LINUX_THREADS
9547         pthread_kill_other_threads_np();
9548 #endif
9549
9550         exit( status );
9551
9552 ; return 0; }
9553 EOF
9554 if { (eval echo configure:9555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9555   rm -rf conftest*
9556   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9557 else
9558   echo "configure: failed program was:" >&5
9559   cat conftest.$ac_ext >&5
9560   rm -rf conftest*
9561   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9562 fi
9563 rm -f conftest*
9564 else
9565   cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 /* pthread test headers */
9569 #include <pthread.h>
9570 #ifndef NULL
9571 #define NULL (void*)0
9572 #endif
9573
9574 static void *task(p)
9575         void *p;
9576 {
9577         return (void *) (p == NULL);
9578 }
9579
9580
9581 int main(argc, argv)
9582         int argc;
9583         char **argv;
9584 {
9585
9586         /* pthread test function */
9587         pthread_t t;
9588         int status;
9589 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9590         /* This system (e.g. AIX) defaults detached; must override */
9591         pthread_attr_t attr;
9592
9593         status = pthread_attr_init(&attr);
9594         if( status ) exit( status );
9595
9596         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9597         if( status ) exit( status );
9598
9599 #       define  ATTR    &attr
9600 #elif defined( HAVE_PTHREADS_D4 )
9601 #       define  ATTR    pthread_attr_default
9602 #else
9603 #       define  ATTR    NULL
9604 #endif
9605
9606         /* make sure pthread_create() isn't just a stub */
9607         status = pthread_create(&t, ATTR, task, NULL);
9608         if( status ) exit( status );
9609
9610         /* give the thread a chance to complete...
9611      * it should remain joinable and hence detachable
9612          */
9613         sleep( 1 );
9614
9615         /* make sure pthread_detach() isn't just a stub */
9616 #if HAVE_PTHREADS_D4
9617         status = pthread_detach( &t );
9618 #else
9619         status = pthread_detach( t );
9620 #endif
9621
9622 #ifdef HAVE_LINUX_THREADS
9623         pthread_kill_other_threads_np();
9624 #endif
9625
9626         exit( status );
9627
9628 }
9629
9630 EOF
9631 if { (eval echo configure:9632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9632 then
9633   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9634 else
9635   echo "configure: failed program was:" >&5
9636   cat conftest.$ac_ext >&5
9637   rm -fr conftest*
9638   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9639 fi
9640 rm -fr conftest*
9641 fi
9642
9643
9644                 # restore the LIBS
9645                 LIBS="$ol_LIBS"
9646         
9647 fi
9648
9649 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9650
9651         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9652                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9653                 ol_link_threads=posix
9654         fi
9655 fi
9656
9657                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9658 if test "$ol_link_threads" = no ; then
9659         # try -lpthreads -lmach -lexc
9660         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9661 echo "configure:9662: checking for pthread link with -lpthreads -lmach -lexc" >&5
9662 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9663   echo $ac_n "(cached) $ac_c" 1>&6
9664 else
9665   
9666                 # save the flags
9667                 ol_LIBS="$LIBS"
9668                 LIBS="-lpthreads -lmach -lexc $LIBS"
9669
9670                 if test "$cross_compiling" = yes; then
9671   cat > conftest.$ac_ext <<EOF
9672 #line 9673 "configure"
9673 #include "confdefs.h"
9674 /* pthread test headers */
9675 #include <pthread.h>
9676 #ifndef NULL
9677 #define NULL (void*)0
9678 #endif
9679
9680 static void *task(p)
9681         void *p;
9682 {
9683         return (void *) (p == NULL);
9684 }
9685
9686 int main() {
9687
9688         /* pthread test function */
9689         pthread_t t;
9690         int status;
9691 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9692         /* This system (e.g. AIX) defaults detached; must override */
9693         pthread_attr_t attr;
9694
9695         status = pthread_attr_init(&attr);
9696         if( status ) exit( status );
9697
9698         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9699         if( status ) exit( status );
9700
9701 #       define  ATTR    &attr
9702 #elif defined( HAVE_PTHREADS_D4 )
9703 #       define  ATTR    pthread_attr_default
9704 #else
9705 #       define  ATTR    NULL
9706 #endif
9707
9708         /* make sure pthread_create() isn't just a stub */
9709         status = pthread_create(&t, ATTR, task, NULL);
9710         if( status ) exit( status );
9711
9712         /* give the thread a chance to complete...
9713      * it should remain joinable and hence detachable
9714          */
9715         sleep( 1 );
9716
9717         /* make sure pthread_detach() isn't just a stub */
9718 #if HAVE_PTHREADS_D4
9719         status = pthread_detach( &t );
9720 #else
9721         status = pthread_detach( t );
9722 #endif
9723
9724 #ifdef HAVE_LINUX_THREADS
9725         pthread_kill_other_threads_np();
9726 #endif
9727
9728         exit( status );
9729
9730 ; return 0; }
9731 EOF
9732 if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9733   rm -rf conftest*
9734   ol_cv_pthread_lpthreads_lmach_lexc=yes
9735 else
9736   echo "configure: failed program was:" >&5
9737   cat conftest.$ac_ext >&5
9738   rm -rf conftest*
9739   ol_cv_pthread_lpthreads_lmach_lexc=no
9740 fi
9741 rm -f conftest*
9742 else
9743   cat > conftest.$ac_ext <<EOF
9744 #line 9745 "configure"
9745 #include "confdefs.h"
9746 /* pthread test headers */
9747 #include <pthread.h>
9748 #ifndef NULL
9749 #define NULL (void*)0
9750 #endif
9751
9752 static void *task(p)
9753         void *p;
9754 {
9755         return (void *) (p == NULL);
9756 }
9757
9758
9759 int main(argc, argv)
9760         int argc;
9761         char **argv;
9762 {
9763
9764         /* pthread test function */
9765         pthread_t t;
9766         int status;
9767 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9768         /* This system (e.g. AIX) defaults detached; must override */
9769         pthread_attr_t attr;
9770
9771         status = pthread_attr_init(&attr);
9772         if( status ) exit( status );
9773
9774         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9775         if( status ) exit( status );
9776
9777 #       define  ATTR    &attr
9778 #elif defined( HAVE_PTHREADS_D4 )
9779 #       define  ATTR    pthread_attr_default
9780 #else
9781 #       define  ATTR    NULL
9782 #endif
9783
9784         /* make sure pthread_create() isn't just a stub */
9785         status = pthread_create(&t, ATTR, task, NULL);
9786         if( status ) exit( status );
9787
9788         /* give the thread a chance to complete...
9789      * it should remain joinable and hence detachable
9790          */
9791         sleep( 1 );
9792
9793         /* make sure pthread_detach() isn't just a stub */
9794 #if HAVE_PTHREADS_D4
9795         status = pthread_detach( &t );
9796 #else
9797         status = pthread_detach( t );
9798 #endif
9799
9800 #ifdef HAVE_LINUX_THREADS
9801         pthread_kill_other_threads_np();
9802 #endif
9803
9804         exit( status );
9805
9806 }
9807
9808 EOF
9809 if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9810 then
9811   ol_cv_pthread_lpthreads_lmach_lexc=yes
9812 else
9813   echo "configure: failed program was:" >&5
9814   cat conftest.$ac_ext >&5
9815   rm -fr conftest*
9816   ol_cv_pthread_lpthreads_lmach_lexc=no
9817 fi
9818 rm -fr conftest*
9819 fi
9820
9821
9822                 # restore the LIBS
9823                 LIBS="$ol_LIBS"
9824         
9825 fi
9826
9827 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9828
9829         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9830                 ol_link_pthreads="-lpthreads -lmach -lexc"
9831                 ol_link_threads=posix
9832         fi
9833 fi
9834
9835                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9836 if test "$ol_link_threads" = no ; then
9837         # try -lpthreads -lexc
9838         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9839 echo "configure:9840: checking for pthread link with -lpthreads -lexc" >&5
9840 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9841   echo $ac_n "(cached) $ac_c" 1>&6
9842 else
9843   
9844                 # save the flags
9845                 ol_LIBS="$LIBS"
9846                 LIBS="-lpthreads -lexc $LIBS"
9847
9848                 if test "$cross_compiling" = yes; then
9849   cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852 /* pthread test headers */
9853 #include <pthread.h>
9854 #ifndef NULL
9855 #define NULL (void*)0
9856 #endif
9857
9858 static void *task(p)
9859         void *p;
9860 {
9861         return (void *) (p == NULL);
9862 }
9863
9864 int main() {
9865
9866         /* pthread test function */
9867         pthread_t t;
9868         int status;
9869 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9870         /* This system (e.g. AIX) defaults detached; must override */
9871         pthread_attr_t attr;
9872
9873         status = pthread_attr_init(&attr);
9874         if( status ) exit( status );
9875
9876         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9877         if( status ) exit( status );
9878
9879 #       define  ATTR    &attr
9880 #elif defined( HAVE_PTHREADS_D4 )
9881 #       define  ATTR    pthread_attr_default
9882 #else
9883 #       define  ATTR    NULL
9884 #endif
9885
9886         /* make sure pthread_create() isn't just a stub */
9887         status = pthread_create(&t, ATTR, task, NULL);
9888         if( status ) exit( status );
9889
9890         /* give the thread a chance to complete...
9891      * it should remain joinable and hence detachable
9892          */
9893         sleep( 1 );
9894
9895         /* make sure pthread_detach() isn't just a stub */
9896 #if HAVE_PTHREADS_D4
9897         status = pthread_detach( &t );
9898 #else
9899         status = pthread_detach( t );
9900 #endif
9901
9902 #ifdef HAVE_LINUX_THREADS
9903         pthread_kill_other_threads_np();
9904 #endif
9905
9906         exit( status );
9907
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9911   rm -rf conftest*
9912   ol_cv_pthread_lpthreads_lexc=yes
9913 else
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   ol_cv_pthread_lpthreads_lexc=no
9918 fi
9919 rm -f conftest*
9920 else
9921   cat > conftest.$ac_ext <<EOF
9922 #line 9923 "configure"
9923 #include "confdefs.h"
9924 /* pthread test headers */
9925 #include <pthread.h>
9926 #ifndef NULL
9927 #define NULL (void*)0
9928 #endif
9929
9930 static void *task(p)
9931         void *p;
9932 {
9933         return (void *) (p == NULL);
9934 }
9935
9936
9937 int main(argc, argv)
9938         int argc;
9939         char **argv;
9940 {
9941
9942         /* pthread test function */
9943         pthread_t t;
9944         int status;
9945 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9946         /* This system (e.g. AIX) defaults detached; must override */
9947         pthread_attr_t attr;
9948
9949         status = pthread_attr_init(&attr);
9950         if( status ) exit( status );
9951
9952         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9953         if( status ) exit( status );
9954
9955 #       define  ATTR    &attr
9956 #elif defined( HAVE_PTHREADS_D4 )
9957 #       define  ATTR    pthread_attr_default
9958 #else
9959 #       define  ATTR    NULL
9960 #endif
9961
9962         /* make sure pthread_create() isn't just a stub */
9963         status = pthread_create(&t, ATTR, task, NULL);
9964         if( status ) exit( status );
9965
9966         /* give the thread a chance to complete...
9967      * it should remain joinable and hence detachable
9968          */
9969         sleep( 1 );
9970
9971         /* make sure pthread_detach() isn't just a stub */
9972 #if HAVE_PTHREADS_D4
9973         status = pthread_detach( &t );
9974 #else
9975         status = pthread_detach( t );
9976 #endif
9977
9978 #ifdef HAVE_LINUX_THREADS
9979         pthread_kill_other_threads_np();
9980 #endif
9981
9982         exit( status );
9983
9984 }
9985
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9988 then
9989   ol_cv_pthread_lpthreads_lexc=yes
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993   rm -fr conftest*
9994   ol_cv_pthread_lpthreads_lexc=no
9995 fi
9996 rm -fr conftest*
9997 fi
9998
9999
10000                 # restore the LIBS
10001                 LIBS="$ol_LIBS"
10002         
10003 fi
10004
10005 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
10006
10007         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10008                 ol_link_pthreads="-lpthreads -lexc"
10009                 ol_link_threads=posix
10010         fi
10011 fi
10012
10013
10014                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10015 if test "$ol_link_threads" = no ; then
10016         # try -lpthreads
10017         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10018 echo "configure:10019: checking for pthread link with -lpthreads" >&5
10019 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   
10023                 # save the flags
10024                 ol_LIBS="$LIBS"
10025                 LIBS="-lpthreads $LIBS"
10026
10027                 if test "$cross_compiling" = yes; then
10028   cat > conftest.$ac_ext <<EOF
10029 #line 10030 "configure"
10030 #include "confdefs.h"
10031 /* pthread test headers */
10032 #include <pthread.h>
10033 #ifndef NULL
10034 #define NULL (void*)0
10035 #endif
10036
10037 static void *task(p)
10038         void *p;
10039 {
10040         return (void *) (p == NULL);
10041 }
10042
10043 int main() {
10044
10045         /* pthread test function */
10046         pthread_t t;
10047         int status;
10048 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10049         /* This system (e.g. AIX) defaults detached; must override */
10050         pthread_attr_t attr;
10051
10052         status = pthread_attr_init(&attr);
10053         if( status ) exit( status );
10054
10055         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10056         if( status ) exit( status );
10057
10058 #       define  ATTR    &attr
10059 #elif defined( HAVE_PTHREADS_D4 )
10060 #       define  ATTR    pthread_attr_default
10061 #else
10062 #       define  ATTR    NULL
10063 #endif
10064
10065         /* make sure pthread_create() isn't just a stub */
10066         status = pthread_create(&t, ATTR, task, NULL);
10067         if( status ) exit( status );
10068
10069         /* give the thread a chance to complete...
10070      * it should remain joinable and hence detachable
10071          */
10072         sleep( 1 );
10073
10074         /* make sure pthread_detach() isn't just a stub */
10075 #if HAVE_PTHREADS_D4
10076         status = pthread_detach( &t );
10077 #else
10078         status = pthread_detach( t );
10079 #endif
10080
10081 #ifdef HAVE_LINUX_THREADS
10082         pthread_kill_other_threads_np();
10083 #endif
10084
10085         exit( status );
10086
10087 ; return 0; }
10088 EOF
10089 if { (eval echo configure:10090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10090   rm -rf conftest*
10091   ol_cv_pthread_lib_lpthreads=yes
10092 else
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -rf conftest*
10096   ol_cv_pthread_lib_lpthreads=no
10097 fi
10098 rm -f conftest*
10099 else
10100   cat > conftest.$ac_ext <<EOF
10101 #line 10102 "configure"
10102 #include "confdefs.h"
10103 /* pthread test headers */
10104 #include <pthread.h>
10105 #ifndef NULL
10106 #define NULL (void*)0
10107 #endif
10108
10109 static void *task(p)
10110         void *p;
10111 {
10112         return (void *) (p == NULL);
10113 }
10114
10115
10116 int main(argc, argv)
10117         int argc;
10118         char **argv;
10119 {
10120
10121         /* pthread test function */
10122         pthread_t t;
10123         int status;
10124 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10125         /* This system (e.g. AIX) defaults detached; must override */
10126         pthread_attr_t attr;
10127
10128         status = pthread_attr_init(&attr);
10129         if( status ) exit( status );
10130
10131         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10132         if( status ) exit( status );
10133
10134 #       define  ATTR    &attr
10135 #elif defined( HAVE_PTHREADS_D4 )
10136 #       define  ATTR    pthread_attr_default
10137 #else
10138 #       define  ATTR    NULL
10139 #endif
10140
10141         /* make sure pthread_create() isn't just a stub */
10142         status = pthread_create(&t, ATTR, task, NULL);
10143         if( status ) exit( status );
10144
10145         /* give the thread a chance to complete...
10146      * it should remain joinable and hence detachable
10147          */
10148         sleep( 1 );
10149
10150         /* make sure pthread_detach() isn't just a stub */
10151 #if HAVE_PTHREADS_D4
10152         status = pthread_detach( &t );
10153 #else
10154         status = pthread_detach( t );
10155 #endif
10156
10157 #ifdef HAVE_LINUX_THREADS
10158         pthread_kill_other_threads_np();
10159 #endif
10160
10161         exit( status );
10162
10163 }
10164
10165 EOF
10166 if { (eval echo configure:10167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10167 then
10168   ol_cv_pthread_lib_lpthreads=yes
10169 else
10170   echo "configure: failed program was:" >&5
10171   cat conftest.$ac_ext >&5
10172   rm -fr conftest*
10173   ol_cv_pthread_lib_lpthreads=no
10174 fi
10175 rm -fr conftest*
10176 fi
10177
10178
10179                 # restore the LIBS
10180                 LIBS="$ol_LIBS"
10181         
10182 fi
10183
10184 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10185
10186         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10187                 ol_link_pthreads="-lpthreads"
10188                 ol_link_threads=posix
10189         fi
10190 fi
10191
10192
10193                 if test $ol_link_threads != no ; then
10194                         cat >> confdefs.h <<\EOF
10195 #define HAVE_PTHREADS 1
10196 EOF
10197
10198
10199                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10200
10201                                                 save_CPPFLAGS="$CPPFLAGS"
10202                         save_LIBS="$LIBS"
10203                         LIBS="$LTHREAD_LIBS $LIBS"
10204
10205                                                                                                 for ac_func in sched_yield pthread_yield
10206 do
10207 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10208 echo "configure:10209: checking for $ac_func" >&5
10209 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10210   echo $ac_n "(cached) $ac_c" 1>&6
10211 else
10212   cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 /* System header to define __stub macros and hopefully few prototypes,
10216     which can conflict with char $ac_func(); below.  */
10217 #include <assert.h>
10218 /* Override any gcc2 internal prototype to avoid an error.  */
10219 /* We use char because int might match the return type of a gcc2
10220     builtin and then its argument prototype would still apply.  */
10221 char $ac_func();
10222 char (*f)();
10223
10224 int main() {
10225
10226 /* The GNU C library defines this for functions which it implements
10227     to always fail with ENOSYS.  Some functions are actually named
10228     something starting with __ and the normal name is an alias.  */
10229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10230 choke me
10231 #else
10232 f = $ac_func;
10233 #endif
10234
10235 ; return 0; }
10236 EOF
10237 if { (eval echo configure:10238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10238   rm -rf conftest*
10239   eval "ac_cv_func_$ac_func=yes"
10240 else
10241   echo "configure: failed program was:" >&5
10242   cat conftest.$ac_ext >&5
10243   rm -rf conftest*
10244   eval "ac_cv_func_$ac_func=no"
10245 fi
10246 rm -f conftest*
10247 fi
10248
10249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10250   echo "$ac_t""yes" 1>&6
10251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10252   cat >> confdefs.h <<EOF
10253 #define $ac_tr_func 1
10254 EOF
10255  
10256 else
10257   echo "$ac_t""no" 1>&6
10258 fi
10259 done
10260
10261
10262                         if test $ac_cv_func_sched_yield = no -a \
10263                                 $ac_cv_func_pthread_yield = no ; then
10264                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10265 echo "configure:10266: checking for sched_yield in -lrt" >&5
10266 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10267 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10268   echo $ac_n "(cached) $ac_c" 1>&6
10269 else
10270   ac_save_LIBS="$LIBS"
10271 LIBS="-lrt  $LIBS"
10272 cat > conftest.$ac_ext <<EOF
10273 #line 10274 "configure"
10274 #include "confdefs.h"
10275 /* Override any gcc2 internal prototype to avoid an error.  */
10276 /* We use char because int might match the return type of a gcc2
10277     builtin and then its argument prototype would still apply.  */
10278 char sched_yield();
10279
10280 int main() {
10281 sched_yield()
10282 ; return 0; }
10283 EOF
10284 if { (eval echo configure:10285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10285   rm -rf conftest*
10286   eval "ac_cv_lib_$ac_lib_var=yes"
10287 else
10288   echo "configure: failed program was:" >&5
10289   cat conftest.$ac_ext >&5
10290   rm -rf conftest*
10291   eval "ac_cv_lib_$ac_lib_var=no"
10292 fi
10293 rm -f conftest*
10294 LIBS="$ac_save_LIBS"
10295
10296 fi
10297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10298   echo "$ac_t""yes" 1>&6
10299   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10300                                         cat >> confdefs.h <<\EOF
10301 #define HAVE_SCHED_YIELD 1
10302 EOF
10303
10304                                         ac_cv_func_sched_yield=yes
10305 else
10306   echo "$ac_t""no" 1>&6
10307 ac_cv_func_sched_yield=no
10308 fi
10309
10310                         fi
10311                         if test $ac_cv_func_sched_yield = no -a \
10312                                 $ac_cv_func_pthread_yield = no ; then
10313                                                                                                 for ac_func in thr_yield
10314 do
10315 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10316 echo "configure:10317: checking for $ac_func" >&5
10317 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10318   echo $ac_n "(cached) $ac_c" 1>&6
10319 else
10320   cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323 /* System header to define __stub macros and hopefully few prototypes,
10324     which can conflict with char $ac_func(); below.  */
10325 #include <assert.h>
10326 /* Override any gcc2 internal prototype to avoid an error.  */
10327 /* We use char because int might match the return type of a gcc2
10328     builtin and then its argument prototype would still apply.  */
10329 char $ac_func();
10330 char (*f)();
10331
10332 int main() {
10333
10334 /* The GNU C library defines this for functions which it implements
10335     to always fail with ENOSYS.  Some functions are actually named
10336     something starting with __ and the normal name is an alias.  */
10337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10338 choke me
10339 #else
10340 f = $ac_func;
10341 #endif
10342
10343 ; return 0; }
10344 EOF
10345 if { (eval echo configure:10346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10346   rm -rf conftest*
10347   eval "ac_cv_func_$ac_func=yes"
10348 else
10349   echo "configure: failed program was:" >&5
10350   cat conftest.$ac_ext >&5
10351   rm -rf conftest*
10352   eval "ac_cv_func_$ac_func=no"
10353 fi
10354 rm -f conftest*
10355 fi
10356
10357 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10358   echo "$ac_t""yes" 1>&6
10359     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10360   cat >> confdefs.h <<EOF
10361 #define $ac_tr_func 1
10362 EOF
10363  
10364 else
10365   echo "$ac_t""no" 1>&6
10366 fi
10367 done
10368
10369                         fi
10370                         if test $ac_cv_func_sched_yield = no -a \
10371                                 $ac_cv_func_pthread_yield = no -a \
10372                                 "$ac_cv_func_thr_yield" = no ; then
10373                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10374                         fi
10375
10376                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10377 do
10378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10379 echo "configure:10380: checking for $ac_func" >&5
10380 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386 /* System header to define __stub macros and hopefully few prototypes,
10387     which can conflict with char $ac_func(); below.  */
10388 #include <assert.h>
10389 /* Override any gcc2 internal prototype to avoid an error.  */
10390 /* We use char because int might match the return type of a gcc2
10391     builtin and then its argument prototype would still apply.  */
10392 char $ac_func();
10393 char (*f)();
10394
10395 int main() {
10396
10397 /* The GNU C library defines this for functions which it implements
10398     to always fail with ENOSYS.  Some functions are actually named
10399     something starting with __ and the normal name is an alias.  */
10400 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10401 choke me
10402 #else
10403 f = $ac_func;
10404 #endif
10405
10406 ; return 0; }
10407 EOF
10408 if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10409   rm -rf conftest*
10410   eval "ac_cv_func_$ac_func=yes"
10411 else
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -rf conftest*
10415   eval "ac_cv_func_$ac_func=no"
10416 fi
10417 rm -f conftest*
10418 fi
10419
10420 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10421   echo "$ac_t""yes" 1>&6
10422     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10423   cat >> confdefs.h <<EOF
10424 #define $ac_tr_func 1
10425 EOF
10426  
10427 else
10428   echo "$ac_t""no" 1>&6
10429 fi
10430 done
10431
10432
10433                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10434 echo "configure:10435: checking for pthread_detach with <pthread.h>" >&5
10435 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10436   echo $ac_n "(cached) $ac_c" 1>&6
10437 else
10438   
10439                                                                 cat > conftest.$ac_ext <<EOF
10440 #line 10441 "configure"
10441 #include "confdefs.h"
10442
10443 #include <pthread.h>
10444 #ifndef NULL
10445 #define NULL (void*)0
10446 #endif
10447
10448 int main() {
10449 pthread_detach(NULL);
10450 ; return 0; }
10451 EOF
10452 if { (eval echo configure:10453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10453   rm -rf conftest*
10454   ol_cv_func_pthread_detach=yes
10455 else
10456   echo "configure: failed program was:" >&5
10457   cat conftest.$ac_ext >&5
10458   rm -rf conftest*
10459   ol_cv_func_pthread_detach=no
10460 fi
10461 rm -f conftest*
10462                         
10463 fi
10464
10465 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10466
10467                         if test $ol_cv_func_pthread_detach = no ; then
10468                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10469                         fi
10470
10471                         cat >> confdefs.h <<\EOF
10472 #define HAVE_PTHREAD_DETACH 1
10473 EOF
10474
10475
10476                                                 for ac_func in \
10477                                 pthread_setconcurrency \
10478                                 pthread_getconcurrency \
10479                                 thr_setconcurrency \
10480                                 thr_getconcurrency \
10481                         
10482 do
10483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10484 echo "configure:10485: checking for $ac_func" >&5
10485 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10486   echo $ac_n "(cached) $ac_c" 1>&6
10487 else
10488   cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491 /* System header to define __stub macros and hopefully few prototypes,
10492     which can conflict with char $ac_func(); below.  */
10493 #include <assert.h>
10494 /* Override any gcc2 internal prototype to avoid an error.  */
10495 /* We use char because int might match the return type of a gcc2
10496     builtin and then its argument prototype would still apply.  */
10497 char $ac_func();
10498 char (*f)();
10499
10500 int main() {
10501
10502 /* The GNU C library defines this for functions which it implements
10503     to always fail with ENOSYS.  Some functions are actually named
10504     something starting with __ and the normal name is an alias.  */
10505 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10506 choke me
10507 #else
10508 f = $ac_func;
10509 #endif
10510
10511 ; return 0; }
10512 EOF
10513 if { (eval echo configure:10514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10514   rm -rf conftest*
10515   eval "ac_cv_func_$ac_func=yes"
10516 else
10517   echo "configure: failed program was:" >&5
10518   cat conftest.$ac_ext >&5
10519   rm -rf conftest*
10520   eval "ac_cv_func_$ac_func=no"
10521 fi
10522 rm -f conftest*
10523 fi
10524
10525 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10526   echo "$ac_t""yes" 1>&6
10527     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10528   cat >> confdefs.h <<EOF
10529 #define $ac_tr_func 1
10530 EOF
10531  
10532 else
10533   echo "$ac_t""no" 1>&6
10534 fi
10535 done
10536
10537
10538                         
10539         for ac_func in pthread_kill_other_threads_np
10540 do
10541 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10542 echo "configure:10543: checking for $ac_func" >&5
10543 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10544   echo $ac_n "(cached) $ac_c" 1>&6
10545 else
10546   cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549 /* System header to define __stub macros and hopefully few prototypes,
10550     which can conflict with char $ac_func(); below.  */
10551 #include <assert.h>
10552 /* Override any gcc2 internal prototype to avoid an error.  */
10553 /* We use char because int might match the return type of a gcc2
10554     builtin and then its argument prototype would still apply.  */
10555 char $ac_func();
10556 char (*f)();
10557
10558 int main() {
10559
10560 /* The GNU C library defines this for functions which it implements
10561     to always fail with ENOSYS.  Some functions are actually named
10562     something starting with __ and the normal name is an alias.  */
10563 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10564 choke me
10565 #else
10566 f = $ac_func;
10567 #endif
10568
10569 ; return 0; }
10570 EOF
10571 if { (eval echo configure:10572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10572   rm -rf conftest*
10573   eval "ac_cv_func_$ac_func=yes"
10574 else
10575   echo "configure: failed program was:" >&5
10576   cat conftest.$ac_ext >&5
10577   rm -rf conftest*
10578   eval "ac_cv_func_$ac_func=no"
10579 fi
10580 rm -f conftest*
10581 fi
10582
10583 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10584   echo "$ac_t""yes" 1>&6
10585     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10586   cat >> confdefs.h <<EOF
10587 #define $ac_tr_func 1
10588 EOF
10589  
10590 else
10591   echo "$ac_t""no" 1>&6
10592 fi
10593 done
10594
10595         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10596 echo "configure:10597: checking for LinuxThreads implementation" >&5
10597 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10598   echo $ac_n "(cached) $ac_c" 1>&6
10599 else
10600   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10601 fi
10602
10603 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10604
10605                         
10606         
10607         
10608         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10609 echo "configure:10610: checking for LinuxThreads consistency" >&5
10610 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10611   echo $ac_n "(cached) $ac_c" 1>&6
10612 else
10613   
10614                 if test $ol_cv_header_linux_threads = yes -a \
10615                         $ol_cv_sys_linux_threads = yes; then
10616                         ol_cv_linux_threads=yes
10617                 elif test $ol_cv_header_linux_threads = no -a \
10618                         $ol_cv_sys_linux_threads = no; then
10619                         ol_cv_linux_threads=no
10620                 else
10621                         ol_cv_linux_threads=error
10622                 fi
10623         
10624 fi
10625
10626 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10627
10628
10629                         if test $ol_cv_linux_threads = error; then
10630                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10631                         fi
10632
10633                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10634 echo "configure:10635: checking if pthread_create() works" >&5
10635 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10636   echo $ac_n "(cached) $ac_c" 1>&6
10637 else
10638   
10639                         if test "$cross_compiling" = yes; then
10640                                 ol_cv_pthread_create_works=yes
10641 else
10642   cat > conftest.$ac_ext <<EOF
10643 #line 10644 "configure"
10644 #include "confdefs.h"
10645 /* pthread test headers */
10646 #include <pthread.h>
10647 #ifndef NULL
10648 #define NULL (void*)0
10649 #endif
10650
10651 static void *task(p)
10652         void *p;
10653 {
10654         return (void *) (p == NULL);
10655 }
10656
10657
10658 int main(argc, argv)
10659         int argc;
10660         char **argv;
10661 {
10662
10663         /* pthread test function */
10664         pthread_t t;
10665         int status;
10666 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10667         /* This system (e.g. AIX) defaults detached; must override */
10668         pthread_attr_t attr;
10669
10670         status = pthread_attr_init(&attr);
10671         if( status ) exit( status );
10672
10673         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10674         if( status ) exit( status );
10675
10676 #       define  ATTR    &attr
10677 #elif defined( HAVE_PTHREADS_D4 )
10678 #       define  ATTR    pthread_attr_default
10679 #else
10680 #       define  ATTR    NULL
10681 #endif
10682
10683         /* make sure pthread_create() isn't just a stub */
10684         status = pthread_create(&t, ATTR, task, NULL);
10685         if( status ) exit( status );
10686
10687         /* give the thread a chance to complete...
10688      * it should remain joinable and hence detachable
10689          */
10690         sleep( 1 );
10691
10692         /* make sure pthread_detach() isn't just a stub */
10693 #if HAVE_PTHREADS_D4
10694         status = pthread_detach( &t );
10695 #else
10696         status = pthread_detach( t );
10697 #endif
10698
10699 #ifdef HAVE_LINUX_THREADS
10700         pthread_kill_other_threads_np();
10701 #endif
10702
10703         exit( status );
10704
10705 }
10706
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10709 then
10710   ol_cv_pthread_create_works=yes
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -fr conftest*
10715   ol_cv_pthread_create_works=no
10716 fi
10717 rm -fr conftest*
10718 fi
10719
10720 fi
10721
10722 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10723
10724                         if test $ol_cv_pthread_create_works = no ; then
10725                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10726                         fi
10727
10728                                                 if test $ol_with_yielding_select = auto ; then
10729                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10730 echo "configure:10731: checking if select yields when using pthreads" >&5
10731 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10732   echo $ac_n "(cached) $ac_c" 1>&6
10733 else
10734   
10735                                 if test "$cross_compiling" = yes; then
10736   ol_cv_pthread_select_yields=cross
10737 else
10738   cat > conftest.$ac_ext <<EOF
10739 #line 10740 "configure"
10740 #include "confdefs.h"
10741
10742 #include <sys/types.h>
10743 #include <sys/time.h>
10744 #include <unistd.h>
10745 #include <pthread.h>
10746 #ifndef NULL
10747 #define NULL (void*) 0
10748 #endif
10749
10750 static int fildes[2];
10751
10752 static void *task(p)
10753         void *p;
10754 {
10755         int i;
10756         struct timeval tv;
10757
10758         fd_set rfds;
10759
10760         tv.tv_sec=10;
10761         tv.tv_usec=0;
10762
10763         FD_ZERO(&rfds);
10764         FD_SET(fildes[0], &rfds);
10765
10766         /* we're not interested in any fds */
10767         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10768
10769         if(i < 0) {
10770                 perror("select");
10771                 exit(10);
10772         }
10773
10774         exit(0); /* if we exit here, the select blocked the whole process */
10775 }
10776
10777 int main(argc, argv)
10778         int argc;
10779         char **argv;
10780 {
10781         pthread_t t;
10782
10783         /* create a pipe to select */
10784         if(pipe(&fildes[0])) {
10785                 perror("select");
10786                 exit(1);
10787         }
10788
10789 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10790         (void) pthread_setconcurrency(2);
10791 #else
10792 #ifdef HAVE_THR_SETCONCURRENCY
10793         /* Set Solaris LWP concurrency to 2 */
10794         thr_setconcurrency(2);
10795 #endif
10796 #endif
10797
10798 #if HAVE_PTHREADS_D4
10799         pthread_create(&t, pthread_attr_default, task, NULL);
10800 #else
10801         pthread_create(&t, NULL, task, NULL);
10802 #endif
10803
10804 #if HAVE_SCHED_YIELD
10805         sched_yield();  /* make sure task runs first */
10806 #else
10807 #ifdef HAVE_PTHREAD_YIELD
10808         pthread_yield();        /* make sure task runs first */
10809 #endif
10810 #endif
10811
10812         exit(2);
10813 }
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10816 then
10817   ol_cv_pthread_select_yields=no
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -fr conftest*
10822   ol_cv_pthread_select_yields=yes
10823 fi
10824 rm -fr conftest*
10825 fi
10826
10827 fi
10828
10829 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10830
10831                                 if test $ol_cv_pthread_select_yields = cross ; then
10832                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10833                                 fi
10834
10835                                 if test $ol_cv_pthread_select_yields = yes ; then
10836                                         ol_with_yielding_select=yes
10837                                 fi
10838                         fi
10839
10840                                                 CPPFLAGS="$save_CPPFLAGS"
10841                         LIBS="$save_LIBS"
10842                 else
10843                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10844                 fi
10845         fi
10846
10847         if test $ol_with_threads = posix ; then
10848                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10849         fi
10850 fi
10851
10852 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10853         -o $ol_with_threads = mach ; then
10854
10855                 for ac_hdr in mach/cthreads.h
10856 do
10857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10859 echo "configure:10860: checking for $ac_hdr" >&5
10860 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10861   echo $ac_n "(cached) $ac_c" 1>&6
10862 else
10863   cat > conftest.$ac_ext <<EOF
10864 #line 10865 "configure"
10865 #include "confdefs.h"
10866 #include <$ac_hdr>
10867 EOF
10868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10869 { (eval echo configure:10870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10871 if test -z "$ac_err"; then
10872   rm -rf conftest*
10873   eval "ac_cv_header_$ac_safe=yes"
10874 else
10875   echo "$ac_err" >&5
10876   echo "configure: failed program was:" >&5
10877   cat conftest.$ac_ext >&5
10878   rm -rf conftest*
10879   eval "ac_cv_header_$ac_safe=no"
10880 fi
10881 rm -f conftest*
10882 fi
10883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10884   echo "$ac_t""yes" 1>&6
10885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10886   cat >> confdefs.h <<EOF
10887 #define $ac_tr_hdr 1
10888 EOF
10889  
10890 else
10891   echo "$ac_t""no" 1>&6
10892 fi
10893 done
10894
10895         if test $ac_cv_header_mach_cthreads_h = yes ; then
10896                 ol_with_threads=found
10897
10898                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10899 echo "configure:10900: checking for cthread_fork" >&5
10900 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10901   echo $ac_n "(cached) $ac_c" 1>&6
10902 else
10903   cat > conftest.$ac_ext <<EOF
10904 #line 10905 "configure"
10905 #include "confdefs.h"
10906 /* System header to define __stub macros and hopefully few prototypes,
10907     which can conflict with char cthread_fork(); below.  */
10908 #include <assert.h>
10909 /* Override any gcc2 internal prototype to avoid an error.  */
10910 /* We use char because int might match the return type of a gcc2
10911     builtin and then its argument prototype would still apply.  */
10912 char cthread_fork();
10913 char (*f)();
10914
10915 int main() {
10916
10917 /* The GNU C library defines this for functions which it implements
10918     to always fail with ENOSYS.  Some functions are actually named
10919     something starting with __ and the normal name is an alias.  */
10920 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10921 choke me
10922 #else
10923 f = cthread_fork;
10924 #endif
10925
10926 ; return 0; }
10927 EOF
10928 if { (eval echo configure:10929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10929   rm -rf conftest*
10930   eval "ac_cv_func_cthread_fork=yes"
10931 else
10932   echo "configure: failed program was:" >&5
10933   cat conftest.$ac_ext >&5
10934   rm -rf conftest*
10935   eval "ac_cv_func_cthread_fork=no"
10936 fi
10937 rm -f conftest*
10938 fi
10939
10940 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10941   echo "$ac_t""yes" 1>&6
10942   ol_link_threads=yes
10943 else
10944   echo "$ac_t""no" 1>&6
10945 fi
10946
10947
10948                 if test $ol_link_threads = no ; then
10949                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10950 echo "configure:10951: checking for cthread_fork with -all_load" >&5
10951 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10952   echo $ac_n "(cached) $ac_c" 1>&6
10953 else
10954   
10955                                                                 save_LIBS="$LIBS"
10956                                 LIBS="-all_load $LIBS"
10957                                 cat > conftest.$ac_ext <<EOF
10958 #line 10959 "configure"
10959 #include "confdefs.h"
10960 #include <mach/cthreads.h>
10961 int main() {
10962
10963                                         cthread_fork((void *)0, (void *)0);
10964                                         
10965 ; return 0; }
10966 EOF
10967 if { (eval echo configure:10968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10968   rm -rf conftest*
10969   ol_cv_cthread_all_load=yes
10970 else
10971   echo "configure: failed program was:" >&5
10972   cat conftest.$ac_ext >&5
10973   rm -rf conftest*
10974   ol_cv_cthread_all_load=no
10975 fi
10976 rm -f conftest*
10977                                                                 LIBS="$save_LIBS"
10978                         
10979 fi
10980
10981 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10982
10983                         if test $ol_cv_cthread_all_load = yes ; then
10984                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10985                                 ol_link_threads=mach
10986                         fi
10987                 fi
10988
10989                 if test $ol_link_threads != no ; then
10990                         : check for cthread specific functionality here
10991                         cat >> confdefs.h <<\EOF
10992 #define HAVE_MACH_CTHREADS 1
10993 EOF
10994
10995                 else
10996                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10997                 fi
10998         fi
10999
11000         if test $ol_with_threads = mach ; then
11001                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
11002         fi
11003 fi
11004
11005 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11006         -o $ol_with_threads = pth ; then
11007
11008         for ac_hdr in pth.h
11009 do
11010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11012 echo "configure:11013: checking for $ac_hdr" >&5
11013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <$ac_hdr>
11020 EOF
11021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11022 { (eval echo configure:11023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11024 if test -z "$ac_err"; then
11025   rm -rf conftest*
11026   eval "ac_cv_header_$ac_safe=yes"
11027 else
11028   echo "$ac_err" >&5
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -rf conftest*
11032   eval "ac_cv_header_$ac_safe=no"
11033 fi
11034 rm -f conftest*
11035 fi
11036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11037   echo "$ac_t""yes" 1>&6
11038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11039   cat >> confdefs.h <<EOF
11040 #define $ac_tr_hdr 1
11041 EOF
11042  
11043 else
11044   echo "$ac_t""no" 1>&6
11045 fi
11046 done
11047
11048
11049         if test $ac_cv_header_pth_h = yes ; then
11050                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11051 echo "configure:11052: checking for pth_version in -lpth" >&5
11052 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11054   echo $ac_n "(cached) $ac_c" 1>&6
11055 else
11056   ac_save_LIBS="$LIBS"
11057 LIBS="-lpth  $LIBS"
11058 cat > conftest.$ac_ext <<EOF
11059 #line 11060 "configure"
11060 #include "confdefs.h"
11061 /* Override any gcc2 internal prototype to avoid an error.  */
11062 /* We use char because int might match the return type of a gcc2
11063     builtin and then its argument prototype would still apply.  */
11064 char pth_version();
11065
11066 int main() {
11067 pth_version()
11068 ; return 0; }
11069 EOF
11070 if { (eval echo configure:11071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11071   rm -rf conftest*
11072   eval "ac_cv_lib_$ac_lib_var=yes"
11073 else
11074   echo "configure: failed program was:" >&5
11075   cat conftest.$ac_ext >&5
11076   rm -rf conftest*
11077   eval "ac_cv_lib_$ac_lib_var=no"
11078 fi
11079 rm -f conftest*
11080 LIBS="$ac_save_LIBS"
11081
11082 fi
11083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11084   echo "$ac_t""yes" 1>&6
11085   have_pth=yes
11086 else
11087   echo "$ac_t""no" 1>&6
11088 have_pth=no
11089 fi
11090
11091
11092                 if test $have_pth = yes ; then
11093                         cat >> confdefs.h <<\EOF
11094 #define HAVE_GNU_PTH 1
11095 EOF
11096
11097                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11098                         ol_link_threads=pth
11099
11100                         if test $ol_with_yielding_select = auto ; then
11101                                 ol_with_yielding_select=yes
11102                         fi
11103                 fi
11104         fi
11105 fi
11106
11107 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11108         -o $ol_with_threads = lwp ; then
11109
11110                 for ac_hdr in thread.h synch.h
11111 do
11112 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11113 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11114 echo "configure:11115: checking for $ac_hdr" >&5
11115 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11116   echo $ac_n "(cached) $ac_c" 1>&6
11117 else
11118   cat > conftest.$ac_ext <<EOF
11119 #line 11120 "configure"
11120 #include "confdefs.h"
11121 #include <$ac_hdr>
11122 EOF
11123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11124 { (eval echo configure:11125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11126 if test -z "$ac_err"; then
11127   rm -rf conftest*
11128   eval "ac_cv_header_$ac_safe=yes"
11129 else
11130   echo "$ac_err" >&5
11131   echo "configure: failed program was:" >&5
11132   cat conftest.$ac_ext >&5
11133   rm -rf conftest*
11134   eval "ac_cv_header_$ac_safe=no"
11135 fi
11136 rm -f conftest*
11137 fi
11138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11139   echo "$ac_t""yes" 1>&6
11140     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11141   cat >> confdefs.h <<EOF
11142 #define $ac_tr_hdr 1
11143 EOF
11144  
11145 else
11146   echo "$ac_t""no" 1>&6
11147 fi
11148 done
11149
11150         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11151                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11152 echo "configure:11153: checking for thr_create in -lthread" >&5
11153 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11155   echo $ac_n "(cached) $ac_c" 1>&6
11156 else
11157   ac_save_LIBS="$LIBS"
11158 LIBS="-lthread  $LIBS"
11159 cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11162 /* Override any gcc2 internal prototype to avoid an error.  */
11163 /* We use char because int might match the return type of a gcc2
11164     builtin and then its argument prototype would still apply.  */
11165 char thr_create();
11166
11167 int main() {
11168 thr_create()
11169 ; return 0; }
11170 EOF
11171 if { (eval echo configure:11172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11172   rm -rf conftest*
11173   eval "ac_cv_lib_$ac_lib_var=yes"
11174 else
11175   echo "configure: failed program was:" >&5
11176   cat conftest.$ac_ext >&5
11177   rm -rf conftest*
11178   eval "ac_cv_lib_$ac_lib_var=no"
11179 fi
11180 rm -f conftest*
11181 LIBS="$ac_save_LIBS"
11182
11183 fi
11184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11185   echo "$ac_t""yes" 1>&6
11186   have_thr=yes
11187 else
11188   echo "$ac_t""no" 1>&6
11189 have_thr=no
11190 fi
11191
11192
11193                 if test $have_thr = yes ; then
11194                         cat >> confdefs.h <<\EOF
11195 #define HAVE_THR 1
11196 EOF
11197
11198                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11199                         ol_link_threads=thr
11200
11201                         if test $ol_with_yielding_select = auto ; then
11202                                 ol_with_yielding_select=yes
11203                         fi
11204
11205                                                 for ac_func in \
11206                                 thr_setconcurrency \
11207                                 thr_getconcurrency \
11208                         
11209 do
11210 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11211 echo "configure:11212: checking for $ac_func" >&5
11212 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11213   echo $ac_n "(cached) $ac_c" 1>&6
11214 else
11215   cat > conftest.$ac_ext <<EOF
11216 #line 11217 "configure"
11217 #include "confdefs.h"
11218 /* System header to define __stub macros and hopefully few prototypes,
11219     which can conflict with char $ac_func(); below.  */
11220 #include <assert.h>
11221 /* Override any gcc2 internal prototype to avoid an error.  */
11222 /* We use char because int might match the return type of a gcc2
11223     builtin and then its argument prototype would still apply.  */
11224 char $ac_func();
11225 char (*f)();
11226
11227 int main() {
11228
11229 /* The GNU C library defines this for functions which it implements
11230     to always fail with ENOSYS.  Some functions are actually named
11231     something starting with __ and the normal name is an alias.  */
11232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11233 choke me
11234 #else
11235 f = $ac_func;
11236 #endif
11237
11238 ; return 0; }
11239 EOF
11240 if { (eval echo configure:11241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11241   rm -rf conftest*
11242   eval "ac_cv_func_$ac_func=yes"
11243 else
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   eval "ac_cv_func_$ac_func=no"
11248 fi
11249 rm -f conftest*
11250 fi
11251
11252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11253   echo "$ac_t""yes" 1>&6
11254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11255   cat >> confdefs.h <<EOF
11256 #define $ac_tr_func 1
11257 EOF
11258  
11259 else
11260   echo "$ac_t""no" 1>&6
11261 fi
11262 done
11263
11264                 fi
11265         fi
11266
11267                 for ac_hdr in lwp/lwp.h
11268 do
11269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11271 echo "configure:11272: checking for $ac_hdr" >&5
11272 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11273   echo $ac_n "(cached) $ac_c" 1>&6
11274 else
11275   cat > conftest.$ac_ext <<EOF
11276 #line 11277 "configure"
11277 #include "confdefs.h"
11278 #include <$ac_hdr>
11279 EOF
11280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11281 { (eval echo configure:11282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11283 if test -z "$ac_err"; then
11284   rm -rf conftest*
11285   eval "ac_cv_header_$ac_safe=yes"
11286 else
11287   echo "$ac_err" >&5
11288   echo "configure: failed program was:" >&5
11289   cat conftest.$ac_ext >&5
11290   rm -rf conftest*
11291   eval "ac_cv_header_$ac_safe=no"
11292 fi
11293 rm -f conftest*
11294 fi
11295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11296   echo "$ac_t""yes" 1>&6
11297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11298   cat >> confdefs.h <<EOF
11299 #define $ac_tr_hdr 1
11300 EOF
11301  
11302 else
11303   echo "$ac_t""no" 1>&6
11304 fi
11305 done
11306
11307         if test $ac_cv_header_lwp_lwp_h = yes ; then
11308                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11309 echo "configure:11310: checking for lwp_create in -llwp" >&5
11310 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11312   echo $ac_n "(cached) $ac_c" 1>&6
11313 else
11314   ac_save_LIBS="$LIBS"
11315 LIBS="-llwp  $LIBS"
11316 cat > conftest.$ac_ext <<EOF
11317 #line 11318 "configure"
11318 #include "confdefs.h"
11319 /* Override any gcc2 internal prototype to avoid an error.  */
11320 /* We use char because int might match the return type of a gcc2
11321     builtin and then its argument prototype would still apply.  */
11322 char lwp_create();
11323
11324 int main() {
11325 lwp_create()
11326 ; return 0; }
11327 EOF
11328 if { (eval echo configure:11329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11329   rm -rf conftest*
11330   eval "ac_cv_lib_$ac_lib_var=yes"
11331 else
11332   echo "configure: failed program was:" >&5
11333   cat conftest.$ac_ext >&5
11334   rm -rf conftest*
11335   eval "ac_cv_lib_$ac_lib_var=no"
11336 fi
11337 rm -f conftest*
11338 LIBS="$ac_save_LIBS"
11339
11340 fi
11341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11342   echo "$ac_t""yes" 1>&6
11343   have_lwp=yes
11344 else
11345   echo "$ac_t""no" 1>&6
11346 have_lwp=no
11347 fi
11348
11349
11350                 if test $have_lwp = yes ; then
11351                         cat >> confdefs.h <<\EOF
11352 #define HAVE_LWP 1
11353 EOF
11354
11355                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11356                         ol_link_threads=lwp
11357
11358                         if test $ol_with_yielding_select = auto ; then
11359                                 ol_with_yielding_select=no
11360                         fi
11361                 fi
11362         fi
11363 fi
11364
11365 if test $ol_with_yielding_select = yes ; then
11366         cat >> confdefs.h <<\EOF
11367 #define HAVE_YIELDING_SELECT 1
11368 EOF
11369
11370 fi
11371
11372 if test $ol_with_threads = manual ; then
11373                 ol_link_threads=yes
11374
11375         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11376
11377         for ac_hdr in pthread.h sched.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_func in sched_yield pthread_yield
11418 do
11419 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11420 echo "configure:11421: checking for $ac_func" >&5
11421 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11422   echo $ac_n "(cached) $ac_c" 1>&6
11423 else
11424   cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 /* System header to define __stub macros and hopefully few prototypes,
11428     which can conflict with char $ac_func(); below.  */
11429 #include <assert.h>
11430 /* Override any gcc2 internal prototype to avoid an error.  */
11431 /* We use char because int might match the return type of a gcc2
11432     builtin and then its argument prototype would still apply.  */
11433 char $ac_func();
11434 char (*f)();
11435
11436 int main() {
11437
11438 /* The GNU C library defines this for functions which it implements
11439     to always fail with ENOSYS.  Some functions are actually named
11440     something starting with __ and the normal name is an alias.  */
11441 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11442 choke me
11443 #else
11444 f = $ac_func;
11445 #endif
11446
11447 ; return 0; }
11448 EOF
11449 if { (eval echo configure:11450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11450   rm -rf conftest*
11451   eval "ac_cv_func_$ac_func=yes"
11452 else
11453   echo "configure: failed program was:" >&5
11454   cat conftest.$ac_ext >&5
11455   rm -rf conftest*
11456   eval "ac_cv_func_$ac_func=no"
11457 fi
11458 rm -f conftest*
11459 fi
11460
11461 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11462   echo "$ac_t""yes" 1>&6
11463     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11464   cat >> confdefs.h <<EOF
11465 #define $ac_tr_func 1
11466 EOF
11467  
11468 else
11469   echo "$ac_t""no" 1>&6
11470 fi
11471 done
11472
11473         
11474         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11475 echo "configure:11476: checking for LinuxThreads pthread.h" >&5
11476 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11477   echo $ac_n "(cached) $ac_c" 1>&6
11478 else
11479   cat > conftest.$ac_ext <<EOF
11480 #line 11481 "configure"
11481 #include "confdefs.h"
11482 #include <pthread.h>
11483 EOF
11484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11485   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11486   rm -rf conftest*
11487   ol_cv_header_linux_threads=yes
11488 else
11489   rm -rf conftest*
11490   ol_cv_header_linux_threads=no
11491 fi
11492 rm -f conftest*
11493
11494                 
11495 fi
11496
11497 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11498         if test $ol_cv_header_linux_threads = yes; then
11499                 cat >> confdefs.h <<\EOF
11500 #define HAVE_LINUX_THREADS 1
11501 EOF
11502
11503         fi
11504
11505
11506         for ac_hdr in mach/cthreads.h
11507 do
11508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11509 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11510 echo "configure:11511: checking for $ac_hdr" >&5
11511 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11512   echo $ac_n "(cached) $ac_c" 1>&6
11513 else
11514   cat > conftest.$ac_ext <<EOF
11515 #line 11516 "configure"
11516 #include "confdefs.h"
11517 #include <$ac_hdr>
11518 EOF
11519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11520 { (eval echo configure:11521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11522 if test -z "$ac_err"; then
11523   rm -rf conftest*
11524   eval "ac_cv_header_$ac_safe=yes"
11525 else
11526   echo "$ac_err" >&5
11527   echo "configure: failed program was:" >&5
11528   cat conftest.$ac_ext >&5
11529   rm -rf conftest*
11530   eval "ac_cv_header_$ac_safe=no"
11531 fi
11532 rm -f conftest*
11533 fi
11534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11535   echo "$ac_t""yes" 1>&6
11536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11537   cat >> confdefs.h <<EOF
11538 #define $ac_tr_hdr 1
11539 EOF
11540  
11541 else
11542   echo "$ac_t""no" 1>&6
11543 fi
11544 done
11545
11546         for ac_hdr in lwp/lwp.h
11547 do
11548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11550 echo "configure:11551: checking for $ac_hdr" >&5
11551 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11552   echo $ac_n "(cached) $ac_c" 1>&6
11553 else
11554   cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557 #include <$ac_hdr>
11558 EOF
11559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11560 { (eval echo configure:11561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11562 if test -z "$ac_err"; then
11563   rm -rf conftest*
11564   eval "ac_cv_header_$ac_safe=yes"
11565 else
11566   echo "$ac_err" >&5
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -rf conftest*
11570   eval "ac_cv_header_$ac_safe=no"
11571 fi
11572 rm -f conftest*
11573 fi
11574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11575   echo "$ac_t""yes" 1>&6
11576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11577   cat >> confdefs.h <<EOF
11578 #define $ac_tr_hdr 1
11579 EOF
11580  
11581 else
11582   echo "$ac_t""no" 1>&6
11583 fi
11584 done
11585
11586         for ac_hdr in thread.h synch.h
11587 do
11588 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11589 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11590 echo "configure:11591: checking for $ac_hdr" >&5
11591 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11592   echo $ac_n "(cached) $ac_c" 1>&6
11593 else
11594   cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 #include <$ac_hdr>
11598 EOF
11599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11600 { (eval echo configure:11601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11602 if test -z "$ac_err"; then
11603   rm -rf conftest*
11604   eval "ac_cv_header_$ac_safe=yes"
11605 else
11606   echo "$ac_err" >&5
11607   echo "configure: failed program was:" >&5
11608   cat conftest.$ac_ext >&5
11609   rm -rf conftest*
11610   eval "ac_cv_header_$ac_safe=no"
11611 fi
11612 rm -f conftest*
11613 fi
11614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11615   echo "$ac_t""yes" 1>&6
11616     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11617   cat >> confdefs.h <<EOF
11618 #define $ac_tr_hdr 1
11619 EOF
11620  
11621 else
11622   echo "$ac_t""no" 1>&6
11623 fi
11624 done
11625
11626 fi
11627
11628 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11629                         cat >> confdefs.h <<\EOF
11630 #define REENTRANT 1
11631 EOF
11632
11633         cat >> confdefs.h <<\EOF
11634 #define _REENTRANT 1
11635 EOF
11636
11637         cat >> confdefs.h <<\EOF
11638 #define THREAD_SAFE 1
11639 EOF
11640
11641         cat >> confdefs.h <<\EOF
11642 #define _THREAD_SAFE 1
11643 EOF
11644
11645         cat >> confdefs.h <<\EOF
11646 #define THREADSAFE 1
11647 EOF
11648
11649         cat >> confdefs.h <<\EOF
11650 #define _THREADSAFE 1
11651 EOF
11652
11653         cat >> confdefs.h <<\EOF
11654 #define _SGI_MP_SOURCE 1
11655 EOF
11656
11657
11658                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11659 echo "configure:11660: checking for thread specific errno" >&5
11660 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11661   echo $ac_n "(cached) $ac_c" 1>&6
11662 else
11663   
11664                 cat > conftest.$ac_ext <<EOF
11665 #line 11666 "configure"
11666 #include "confdefs.h"
11667 #include <errno.h>
11668 int main() {
11669 errno = 0;
11670 ; return 0; }
11671 EOF
11672 if { (eval echo configure:11673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11673   rm -rf conftest*
11674   ol_cv_errno_thread_specific=yes
11675 else
11676   echo "configure: failed program was:" >&5
11677   cat conftest.$ac_ext >&5
11678   rm -rf conftest*
11679   ol_cv_errno_thread_specific=no
11680 fi
11681 rm -f conftest*
11682         
11683 fi
11684
11685 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11686
11687                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11688 echo "configure:11689: checking for thread specific h_errno" >&5
11689 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11690   echo $ac_n "(cached) $ac_c" 1>&6
11691 else
11692   
11693                 cat > conftest.$ac_ext <<EOF
11694 #line 11695 "configure"
11695 #include "confdefs.h"
11696 #include <netdb.h>
11697 int main() {
11698 h_errno = 0;
11699 ; return 0; }
11700 EOF
11701 if { (eval echo configure:11702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11702   rm -rf conftest*
11703   ol_cv_h_errno_thread_specific=yes
11704 else
11705   echo "configure: failed program was:" >&5
11706   cat conftest.$ac_ext >&5
11707   rm -rf conftest*
11708   ol_cv_h_errno_thread_specific=no
11709 fi
11710 rm -f conftest*
11711         
11712 fi
11713
11714 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11715
11716         if test $ol_cv_errno_thread_specific != yes \
11717                 -o $ol_cv_h_errno_thread_specific != yes ; then
11718                 LIBS="$LTHREAD_LIBS $LIBS"
11719                 LTHREAD_LIBS=""
11720         fi
11721
11722 fi  
11723
11724 if test $ol_link_threads = no ; then
11725         if test $ol_with_threads = yes ; then
11726                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11727         fi
11728
11729         if test $ol_with_threads = auto ; then
11730                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11731                 ol_with_threads=no
11732         fi
11733
11734         cat >> confdefs.h <<\EOF
11735 #define NO_THREADS 1
11736 EOF
11737
11738         LTHREAD_LIBS=""
11739 fi
11740
11741 if test $ol_link_threads != no ; then
11742         cat >> confdefs.h <<\EOF
11743 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11744 EOF
11745
11746 fi
11747
11748 ol_link_ldbm=no 
11749
11750 if test $ol_with_ldbm_api = auto \
11751         -o $ol_with_ldbm_api = berkeley \
11752         -o $ol_with_ldbm_api = bcompat ; then
11753
11754         if test $ol_with_ldbm_api = bcompat; then \
11755                 ol_cv_berkeley_db=no
11756 for ac_hdr in db_185.h db.h
11757 do
11758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11760 echo "configure:11761: checking for $ac_hdr" >&5
11761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11762   echo $ac_n "(cached) $ac_c" 1>&6
11763 else
11764   cat > conftest.$ac_ext <<EOF
11765 #line 11766 "configure"
11766 #include "confdefs.h"
11767 #include <$ac_hdr>
11768 EOF
11769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11770 { (eval echo configure:11771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11772 if test -z "$ac_err"; then
11773   rm -rf conftest*
11774   eval "ac_cv_header_$ac_safe=yes"
11775 else
11776   echo "$ac_err" >&5
11777   echo "configure: failed program was:" >&5
11778   cat conftest.$ac_ext >&5
11779   rm -rf conftest*
11780   eval "ac_cv_header_$ac_safe=no"
11781 fi
11782 rm -f conftest*
11783 fi
11784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11785   echo "$ac_t""yes" 1>&6
11786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11787   cat >> confdefs.h <<EOF
11788 #define $ac_tr_hdr 1
11789 EOF
11790  
11791 else
11792   echo "$ac_t""no" 1>&6
11793 fi
11794 done
11795
11796 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11797         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11798 echo "configure:11799: checking if Berkeley DB header compatibility" >&5
11799 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11800   echo $ac_n "(cached) $ac_c" 1>&6
11801 else
11802   
11803                 cat > conftest.$ac_ext <<EOF
11804 #line 11805 "configure"
11805 #include "confdefs.h"
11806
11807 #if HAVE_DB_185_H
11808 #       include <db_185.h>
11809 #else
11810 #       include <db.h>
11811 #endif
11812
11813  /* this check could be improved */
11814 #ifndef DB_VERSION_MAJOR
11815 #       define DB_VERSION_MAJOR 1
11816 #endif
11817
11818 #if DB_VERSION_MAJOR == 1 
11819         __db_version_1
11820 #endif
11821
11822 EOF
11823 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11824   egrep "__db_version_1" >/dev/null 2>&1; then
11825   rm -rf conftest*
11826   ol_cv_header_db1=yes
11827 else
11828   rm -rf conftest*
11829   ol_cv_header_db1=no
11830 fi
11831 rm -f conftest*
11832
11833 fi
11834
11835 echo "$ac_t""$ol_cv_header_db1" 1>&6
11836
11837         if test ol_cv_header_db1=yes ; then
11838                 ol_cv_lib_db=no
11839 if test $ol_cv_lib_db = no ; then
11840         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11841 echo "configure:11842: checking for Berkeley DB link (default)" >&5
11842 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11843   echo $ac_n "(cached) $ac_c" 1>&6
11844 else
11845   
11846         ol_DB_LIB=
11847         ol_LIBS=$LIBS
11848         LIBS="$ol_DB_LIB $LIBS"
11849
11850         cat > conftest.$ac_ext <<EOF
11851 #line 11852 "configure"
11852 #include "confdefs.h"
11853
11854 #ifdef HAVE_DB_185_H
11855 # include <db_185.h>
11856 #else
11857 # include <db.h>
11858 #endif
11859
11860 #ifndef DB_VERSION_MAJOR
11861 # define DB_VERSION_MAJOR 1
11862 #endif
11863
11864 #ifndef NULL
11865 #define NULL ((void*)0)
11866 #endif
11867
11868 int main() {
11869
11870 #if DB_VERSION_MAJOR > 2
11871         db_env_create( NULL, 0 );
11872 #elif DB_VERSION_MAJOR > 1
11873         db_appexit( NULL );
11874 #else
11875         (void) dbopen( NULL, 0, 0, 0, NULL);
11876 #endif
11877
11878 ; return 0; }
11879 EOF
11880 if { (eval echo configure:11881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11881   rm -rf conftest*
11882   ol_cv_db_none=yes
11883 else
11884   echo "configure: failed program was:" >&5
11885   cat conftest.$ac_ext >&5
11886   rm -rf conftest*
11887   ol_cv_db_none=no
11888 fi
11889 rm -f conftest*
11890
11891         LIBS="$ol_LIBS"
11892
11893 fi
11894
11895 echo "$ac_t""$ol_cv_db_none" 1>&6
11896
11897         if test $ol_cv_db_none = yes ; then
11898                 ol_cv_lib_db=yes
11899         fi
11900 fi
11901
11902 if test $ol_cv_lib_db = no ; then
11903         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11904 echo "configure:11905: checking for Berkeley DB link (-ldb)" >&5
11905 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11906   echo $ac_n "(cached) $ac_c" 1>&6
11907 else
11908   
11909         ol_DB_LIB=-ldb
11910         ol_LIBS=$LIBS
11911         LIBS="$ol_DB_LIB $LIBS"
11912
11913         cat > conftest.$ac_ext <<EOF
11914 #line 11915 "configure"
11915 #include "confdefs.h"
11916
11917 #ifdef HAVE_DB_185_H
11918 # include <db_185.h>
11919 #else
11920 # include <db.h>
11921 #endif
11922
11923 #ifndef DB_VERSION_MAJOR
11924 # define DB_VERSION_MAJOR 1
11925 #endif
11926
11927 #ifndef NULL
11928 #define NULL ((void*)0)
11929 #endif
11930
11931 int main() {
11932
11933 #if DB_VERSION_MAJOR > 2
11934         db_env_create( NULL, 0 );
11935 #elif DB_VERSION_MAJOR > 1
11936         db_appexit( NULL );
11937 #else
11938         (void) dbopen( NULL, 0, 0, 0, NULL);
11939 #endif
11940
11941 ; return 0; }
11942 EOF
11943 if { (eval echo configure:11944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11944   rm -rf conftest*
11945   ol_cv_db_db=yes
11946 else
11947   echo "configure: failed program was:" >&5
11948   cat conftest.$ac_ext >&5
11949   rm -rf conftest*
11950   ol_cv_db_db=no
11951 fi
11952 rm -f conftest*
11953
11954         LIBS="$ol_LIBS"
11955
11956 fi
11957
11958 echo "$ac_t""$ol_cv_db_db" 1>&6
11959
11960         if test $ol_cv_db_db = yes ; then
11961                 ol_cv_lib_db=-ldb
11962         fi
11963 fi
11964
11965 if test $ol_cv_lib_db = no ; then
11966         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11967 echo "configure:11968: checking for Berkeley DB link (-ldb3)" >&5
11968 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11969   echo $ac_n "(cached) $ac_c" 1>&6
11970 else
11971   
11972         ol_DB_LIB=-ldb3
11973         ol_LIBS=$LIBS
11974         LIBS="$ol_DB_LIB $LIBS"
11975
11976         cat > conftest.$ac_ext <<EOF
11977 #line 11978 "configure"
11978 #include "confdefs.h"
11979
11980 #ifdef HAVE_DB_185_H
11981 # include <db_185.h>
11982 #else
11983 # include <db.h>
11984 #endif
11985
11986 #ifndef DB_VERSION_MAJOR
11987 # define DB_VERSION_MAJOR 1
11988 #endif
11989
11990 #ifndef NULL
11991 #define NULL ((void*)0)
11992 #endif
11993
11994 int main() {
11995
11996 #if DB_VERSION_MAJOR > 2
11997         db_env_create( NULL, 0 );
11998 #elif DB_VERSION_MAJOR > 1
11999         db_appexit( NULL );
12000 #else
12001         (void) dbopen( NULL, 0, 0, 0, NULL);
12002 #endif
12003
12004 ; return 0; }
12005 EOF
12006 if { (eval echo configure:12007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12007   rm -rf conftest*
12008   ol_cv_db_db3=yes
12009 else
12010   echo "configure: failed program was:" >&5
12011   cat conftest.$ac_ext >&5
12012   rm -rf conftest*
12013   ol_cv_db_db3=no
12014 fi
12015 rm -f conftest*
12016
12017         LIBS="$ol_LIBS"
12018
12019 fi
12020
12021 echo "$ac_t""$ol_cv_db_db3" 1>&6
12022
12023         if test $ol_cv_db_db3 = yes ; then
12024                 ol_cv_lib_db=-ldb3
12025         fi
12026 fi
12027
12028 if test $ol_cv_lib_db = no ; then
12029         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12030 echo "configure:12031: checking for Berkeley DB link (-ldb2)" >&5
12031 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12032   echo $ac_n "(cached) $ac_c" 1>&6
12033 else
12034   
12035         ol_DB_LIB=-ldb2
12036         ol_LIBS=$LIBS
12037         LIBS="$ol_DB_LIB $LIBS"
12038
12039         cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12042
12043 #ifdef HAVE_DB_185_H
12044 # include <db_185.h>
12045 #else
12046 # include <db.h>
12047 #endif
12048
12049 #ifndef DB_VERSION_MAJOR
12050 # define DB_VERSION_MAJOR 1
12051 #endif
12052
12053 #ifndef NULL
12054 #define NULL ((void*)0)
12055 #endif
12056
12057 int main() {
12058
12059 #if DB_VERSION_MAJOR > 2
12060         db_env_create( NULL, 0 );
12061 #elif DB_VERSION_MAJOR > 1
12062         db_appexit( NULL );
12063 #else
12064         (void) dbopen( NULL, 0, 0, 0, NULL);
12065 #endif
12066
12067 ; return 0; }
12068 EOF
12069 if { (eval echo configure:12070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12070   rm -rf conftest*
12071   ol_cv_db_db2=yes
12072 else
12073   echo "configure: failed program was:" >&5
12074   cat conftest.$ac_ext >&5
12075   rm -rf conftest*
12076   ol_cv_db_db2=no
12077 fi
12078 rm -f conftest*
12079
12080         LIBS="$ol_LIBS"
12081
12082 fi
12083
12084 echo "$ac_t""$ol_cv_db_db2" 1>&6
12085
12086         if test $ol_cv_db_db2 = yes ; then
12087                 ol_cv_lib_db=-ldb2
12088         fi
12089 fi
12090
12091 if test $ol_cv_lib_db = no ; then
12092         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12093 echo "configure:12094: checking for Berkeley DB link (-ldb1)" >&5
12094 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12095   echo $ac_n "(cached) $ac_c" 1>&6
12096 else
12097   
12098         ol_DB_LIB=-ldb1
12099         ol_LIBS=$LIBS
12100         LIBS="$ol_DB_LIB $LIBS"
12101
12102         cat > conftest.$ac_ext <<EOF
12103 #line 12104 "configure"
12104 #include "confdefs.h"
12105
12106 #ifdef HAVE_DB_185_H
12107 # include <db_185.h>
12108 #else
12109 # include <db.h>
12110 #endif
12111
12112 #ifndef DB_VERSION_MAJOR
12113 # define DB_VERSION_MAJOR 1
12114 #endif
12115
12116 #ifndef NULL
12117 #define NULL ((void*)0)
12118 #endif
12119
12120 int main() {
12121
12122 #if DB_VERSION_MAJOR > 2
12123         db_env_create( NULL, 0 );
12124 #elif DB_VERSION_MAJOR > 1
12125         db_appexit( NULL );
12126 #else
12127         (void) dbopen( NULL, 0, 0, 0, NULL);
12128 #endif
12129
12130 ; return 0; }
12131 EOF
12132 if { (eval echo configure:12133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12133   rm -rf conftest*
12134   ol_cv_db_db1=yes
12135 else
12136   echo "configure: failed program was:" >&5
12137   cat conftest.$ac_ext >&5
12138   rm -rf conftest*
12139   ol_cv_db_db1=no
12140 fi
12141 rm -f conftest*
12142
12143         LIBS="$ol_LIBS"
12144
12145 fi
12146
12147 echo "$ac_t""$ol_cv_db_db1" 1>&6
12148
12149         if test $ol_cv_db_db1 = yes ; then
12150                 ol_cv_lib_db=-ldb1
12151         fi
12152 fi
12153
12154
12155                 if test "$ol_cv_lib_db" != no ; then
12156                         ol_cv_berkeley_db=yes
12157                 fi
12158         fi
12159 fi
12160
12161         else
12162                 ol_cv_berkeley_db=no
12163 for ac_hdr in db.h
12164 do
12165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12167 echo "configure:12168: checking for $ac_hdr" >&5
12168 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12169   echo $ac_n "(cached) $ac_c" 1>&6
12170 else
12171   cat > conftest.$ac_ext <<EOF
12172 #line 12173 "configure"
12173 #include "confdefs.h"
12174 #include <$ac_hdr>
12175 EOF
12176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12177 { (eval echo configure:12178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12179 if test -z "$ac_err"; then
12180   rm -rf conftest*
12181   eval "ac_cv_header_$ac_safe=yes"
12182 else
12183   echo "$ac_err" >&5
12184   echo "configure: failed program was:" >&5
12185   cat conftest.$ac_ext >&5
12186   rm -rf conftest*
12187   eval "ac_cv_header_$ac_safe=no"
12188 fi
12189 rm -f conftest*
12190 fi
12191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12192   echo "$ac_t""yes" 1>&6
12193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12194   cat >> confdefs.h <<EOF
12195 #define $ac_tr_hdr 1
12196 EOF
12197  
12198 else
12199   echo "$ac_t""no" 1>&6
12200 fi
12201 done
12202
12203 if test $ac_cv_header_db_h = yes; then
12204         ol_cv_lib_db=no
12205 if test $ol_cv_lib_db = no ; then
12206         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12207 echo "configure:12208: checking for Berkeley DB link (default)" >&5
12208 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12209   echo $ac_n "(cached) $ac_c" 1>&6
12210 else
12211   
12212         ol_DB_LIB=
12213         ol_LIBS=$LIBS
12214         LIBS="$ol_DB_LIB $LIBS"
12215
12216         cat > conftest.$ac_ext <<EOF
12217 #line 12218 "configure"
12218 #include "confdefs.h"
12219
12220 #ifdef HAVE_DB_185_H
12221 # include <db_185.h>
12222 #else
12223 # include <db.h>
12224 #endif
12225
12226 #ifndef DB_VERSION_MAJOR
12227 # define DB_VERSION_MAJOR 1
12228 #endif
12229
12230 #ifndef NULL
12231 #define NULL ((void*)0)
12232 #endif
12233
12234 int main() {
12235
12236 #if DB_VERSION_MAJOR > 2
12237         db_env_create( NULL, 0 );
12238 #elif DB_VERSION_MAJOR > 1
12239         db_appexit( NULL );
12240 #else
12241         (void) dbopen( NULL, 0, 0, 0, NULL);
12242 #endif
12243
12244 ; return 0; }
12245 EOF
12246 if { (eval echo configure:12247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12247   rm -rf conftest*
12248   ol_cv_db_none=yes
12249 else
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -rf conftest*
12253   ol_cv_db_none=no
12254 fi
12255 rm -f conftest*
12256
12257         LIBS="$ol_LIBS"
12258
12259 fi
12260
12261 echo "$ac_t""$ol_cv_db_none" 1>&6
12262
12263         if test $ol_cv_db_none = yes ; then
12264                 ol_cv_lib_db=yes
12265         fi
12266 fi
12267
12268 if test $ol_cv_lib_db = no ; then
12269         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12270 echo "configure:12271: checking for Berkeley DB link (-ldb)" >&5
12271 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12272   echo $ac_n "(cached) $ac_c" 1>&6
12273 else
12274   
12275         ol_DB_LIB=-ldb
12276         ol_LIBS=$LIBS
12277         LIBS="$ol_DB_LIB $LIBS"
12278
12279         cat > conftest.$ac_ext <<EOF
12280 #line 12281 "configure"
12281 #include "confdefs.h"
12282
12283 #ifdef HAVE_DB_185_H
12284 # include <db_185.h>
12285 #else
12286 # include <db.h>
12287 #endif
12288
12289 #ifndef DB_VERSION_MAJOR
12290 # define DB_VERSION_MAJOR 1
12291 #endif
12292
12293 #ifndef NULL
12294 #define NULL ((void*)0)
12295 #endif
12296
12297 int main() {
12298
12299 #if DB_VERSION_MAJOR > 2
12300         db_env_create( NULL, 0 );
12301 #elif DB_VERSION_MAJOR > 1
12302         db_appexit( NULL );
12303 #else
12304         (void) dbopen( NULL, 0, 0, 0, NULL);
12305 #endif
12306
12307 ; return 0; }
12308 EOF
12309 if { (eval echo configure:12310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12310   rm -rf conftest*
12311   ol_cv_db_db=yes
12312 else
12313   echo "configure: failed program was:" >&5
12314   cat conftest.$ac_ext >&5
12315   rm -rf conftest*
12316   ol_cv_db_db=no
12317 fi
12318 rm -f conftest*
12319
12320         LIBS="$ol_LIBS"
12321
12322 fi
12323
12324 echo "$ac_t""$ol_cv_db_db" 1>&6
12325
12326         if test $ol_cv_db_db = yes ; then
12327                 ol_cv_lib_db=-ldb
12328         fi
12329 fi
12330
12331 if test $ol_cv_lib_db = no ; then
12332         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12333 echo "configure:12334: checking for Berkeley DB link (-ldb3)" >&5
12334 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12335   echo $ac_n "(cached) $ac_c" 1>&6
12336 else
12337   
12338         ol_DB_LIB=-ldb3
12339         ol_LIBS=$LIBS
12340         LIBS="$ol_DB_LIB $LIBS"
12341
12342         cat > conftest.$ac_ext <<EOF
12343 #line 12344 "configure"
12344 #include "confdefs.h"
12345
12346 #ifdef HAVE_DB_185_H
12347 # include <db_185.h>
12348 #else
12349 # include <db.h>
12350 #endif
12351
12352 #ifndef DB_VERSION_MAJOR
12353 # define DB_VERSION_MAJOR 1
12354 #endif
12355
12356 #ifndef NULL
12357 #define NULL ((void*)0)
12358 #endif
12359
12360 int main() {
12361
12362 #if DB_VERSION_MAJOR > 2
12363         db_env_create( NULL, 0 );
12364 #elif DB_VERSION_MAJOR > 1
12365         db_appexit( NULL );
12366 #else
12367         (void) dbopen( NULL, 0, 0, 0, NULL);
12368 #endif
12369
12370 ; return 0; }
12371 EOF
12372 if { (eval echo configure:12373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12373   rm -rf conftest*
12374   ol_cv_db_db3=yes
12375 else
12376   echo "configure: failed program was:" >&5
12377   cat conftest.$ac_ext >&5
12378   rm -rf conftest*
12379   ol_cv_db_db3=no
12380 fi
12381 rm -f conftest*
12382
12383         LIBS="$ol_LIBS"
12384
12385 fi
12386
12387 echo "$ac_t""$ol_cv_db_db3" 1>&6
12388
12389         if test $ol_cv_db_db3 = yes ; then
12390                 ol_cv_lib_db=-ldb3
12391         fi
12392 fi
12393
12394 if test $ol_cv_lib_db = no ; then
12395         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12396 echo "configure:12397: checking for Berkeley DB link (-ldb2)" >&5
12397 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12398   echo $ac_n "(cached) $ac_c" 1>&6
12399 else
12400   
12401         ol_DB_LIB=-ldb2
12402         ol_LIBS=$LIBS
12403         LIBS="$ol_DB_LIB $LIBS"
12404
12405         cat > conftest.$ac_ext <<EOF
12406 #line 12407 "configure"
12407 #include "confdefs.h"
12408
12409 #ifdef HAVE_DB_185_H
12410 # include <db_185.h>
12411 #else
12412 # include <db.h>
12413 #endif
12414
12415 #ifndef DB_VERSION_MAJOR
12416 # define DB_VERSION_MAJOR 1
12417 #endif
12418
12419 #ifndef NULL
12420 #define NULL ((void*)0)
12421 #endif
12422
12423 int main() {
12424
12425 #if DB_VERSION_MAJOR > 2
12426         db_env_create( NULL, 0 );
12427 #elif DB_VERSION_MAJOR > 1
12428         db_appexit( NULL );
12429 #else
12430         (void) dbopen( NULL, 0, 0, 0, NULL);
12431 #endif
12432
12433 ; return 0; }
12434 EOF
12435 if { (eval echo configure:12436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12436   rm -rf conftest*
12437   ol_cv_db_db2=yes
12438 else
12439   echo "configure: failed program was:" >&5
12440   cat conftest.$ac_ext >&5
12441   rm -rf conftest*
12442   ol_cv_db_db2=no
12443 fi
12444 rm -f conftest*
12445
12446         LIBS="$ol_LIBS"
12447
12448 fi
12449
12450 echo "$ac_t""$ol_cv_db_db2" 1>&6
12451
12452         if test $ol_cv_db_db2 = yes ; then
12453                 ol_cv_lib_db=-ldb2
12454         fi
12455 fi
12456
12457 if test $ol_cv_lib_db = no ; then
12458         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12459 echo "configure:12460: checking for Berkeley DB link (-ldb1)" >&5
12460 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12461   echo $ac_n "(cached) $ac_c" 1>&6
12462 else
12463   
12464         ol_DB_LIB=-ldb1
12465         ol_LIBS=$LIBS
12466         LIBS="$ol_DB_LIB $LIBS"
12467
12468         cat > conftest.$ac_ext <<EOF
12469 #line 12470 "configure"
12470 #include "confdefs.h"
12471
12472 #ifdef HAVE_DB_185_H
12473 # include <db_185.h>
12474 #else
12475 # include <db.h>
12476 #endif
12477
12478 #ifndef DB_VERSION_MAJOR
12479 # define DB_VERSION_MAJOR 1
12480 #endif
12481
12482 #ifndef NULL
12483 #define NULL ((void*)0)
12484 #endif
12485
12486 int main() {
12487
12488 #if DB_VERSION_MAJOR > 2
12489         db_env_create( NULL, 0 );
12490 #elif DB_VERSION_MAJOR > 1
12491         db_appexit( NULL );
12492 #else
12493         (void) dbopen( NULL, 0, 0, 0, NULL);
12494 #endif
12495
12496 ; return 0; }
12497 EOF
12498 if { (eval echo configure:12499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12499   rm -rf conftest*
12500   ol_cv_db_db1=yes
12501 else
12502   echo "configure: failed program was:" >&5
12503   cat conftest.$ac_ext >&5
12504   rm -rf conftest*
12505   ol_cv_db_db1=no
12506 fi
12507 rm -f conftest*
12508
12509         LIBS="$ol_LIBS"
12510
12511 fi
12512
12513 echo "$ac_t""$ol_cv_db_db1" 1>&6
12514
12515         if test $ol_cv_db_db1 = yes ; then
12516                 ol_cv_lib_db=-ldb1
12517         fi
12518 fi
12519
12520
12521         if test "$ol_cv_lib_db" != no ; then
12522                 ol_cv_berkeley_db=yes
12523                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12524 echo "configure:12525: checking for Berkeley DB thread support" >&5
12525 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12526   echo $ac_n "(cached) $ac_c" 1>&6
12527 else
12528   
12529         ol_LIBS="$LIBS"
12530         if test $ol_cv_lib_db != yes ; then
12531                 LIBS="$ol_cv_lib_db"
12532         fi
12533
12534         if test "$cross_compiling" = yes; then
12535   ol_cv_berkeley_db_thread=cross
12536 else
12537   cat > conftest.$ac_ext <<EOF
12538 #line 12539 "configure"
12539 #include "confdefs.h"
12540
12541 #ifdef HAVE_DB_185_H
12542         choke me;
12543 #else
12544 #include <db.h>
12545 #endif
12546 #ifndef NULL
12547 #define NULL ((void *)0)
12548 #endif
12549 main()
12550 {
12551         int rc;
12552         u_int32_t flags = DB_CREATE | DB_THREAD;
12553
12554 #if DB_VERSION_MAJOR > 2
12555         DB_ENV *env = NULL;
12556
12557         rc = db_env_create( &env, 0 );
12558
12559         if( rc == 0 ) {
12560 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12561                 rc = env->open( env, NULL, flags, 0 );
12562 #else
12563                 rc = env->open( env, NULL, NULL, flags, 0 );
12564 #endif
12565         }
12566
12567 #else
12568         DB_ENV env;
12569         memset( &env, '\0', sizeof(env) );
12570
12571         rc = db_appinit( NULL, NULL, &env, flags );
12572
12573         if( rc == 0 ) {
12574                 db_appexit( &env );
12575         }
12576 #endif
12577 #if DB_VERSION_MAJOR > 2
12578 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12579         env->remove( env, NULL, DB_FORCE);
12580 #else
12581         env->remove( env, NULL, NULL, DB_FORCE);
12582 #endif
12583 #endif
12584
12585         return rc;
12586 }
12587 EOF
12588 if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12589 then
12590   ol_cv_berkeley_db_thread=yes
12591 else
12592   echo "configure: failed program was:" >&5
12593   cat conftest.$ac_ext >&5
12594   rm -fr conftest*
12595   ol_cv_berkeley_db_thread=no
12596 fi
12597 rm -fr conftest*
12598 fi
12599
12600
12601         LIBS="$ol_LIBS"
12602
12603         if test $ol_cv_berkeley_db_thread != no ; then
12604                 cat >> confdefs.h <<\EOF
12605 #define HAVE_BERKELEY_DB_THREAD 1
12606 EOF
12607
12608         fi
12609
12610 fi
12611
12612 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12613         fi
12614 fi
12615
12616         fi
12617
12618         if test $ol_cv_berkeley_db != no ; then
12619                 cat >> confdefs.h <<\EOF
12620 #define HAVE_BERKELEY_DB 1
12621 EOF
12622
12623
12624                 ol_link_ldbm=berkeley
12625                 ol_with_ldbm_api=db
12626
12627                 if test $ol_with_ldbm_type = hash ; then
12628                         cat >> confdefs.h <<\EOF
12629 #define LDBM_USE_DBHASH 1
12630 EOF
12631
12632                 else
12633                         cat >> confdefs.h <<\EOF
12634 #define LDBM_USE_DBBTREE 1
12635 EOF
12636
12637                 fi
12638
12639                                                 if test $ol_cv_lib_db != yes ; then
12640                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12641                 fi
12642         fi
12643 fi
12644
12645 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12646         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12647         ol_with_ldbm_api=none
12648 fi
12649
12650 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12651         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12652 echo "configure:12653: checking for MDBM library" >&5
12653 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12654   echo $ac_n "(cached) $ac_c" 1>&6
12655 else
12656         ol_LIBS="$LIBS"
12657         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12658 echo "configure:12659: checking for mdbm_set_chain" >&5
12659 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12660   echo $ac_n "(cached) $ac_c" 1>&6
12661 else
12662   cat > conftest.$ac_ext <<EOF
12663 #line 12664 "configure"
12664 #include "confdefs.h"
12665 /* System header to define __stub macros and hopefully few prototypes,
12666     which can conflict with char mdbm_set_chain(); below.  */
12667 #include <assert.h>
12668 /* Override any gcc2 internal prototype to avoid an error.  */
12669 /* We use char because int might match the return type of a gcc2
12670     builtin and then its argument prototype would still apply.  */
12671 char mdbm_set_chain();
12672 char (*f)();
12673
12674 int main() {
12675
12676 /* The GNU C library defines this for functions which it implements
12677     to always fail with ENOSYS.  Some functions are actually named
12678     something starting with __ and the normal name is an alias.  */
12679 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12680 choke me
12681 #else
12682 f = mdbm_set_chain;
12683 #endif
12684
12685 ; return 0; }
12686 EOF
12687 if { (eval echo configure:12688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12688   rm -rf conftest*
12689   eval "ac_cv_func_mdbm_set_chain=yes"
12690 else
12691   echo "configure: failed program was:" >&5
12692   cat conftest.$ac_ext >&5
12693   rm -rf conftest*
12694   eval "ac_cv_func_mdbm_set_chain=no"
12695 fi
12696 rm -f conftest*
12697 fi
12698
12699 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12700   echo "$ac_t""yes" 1>&6
12701   ol_cv_lib_mdbm=yes
12702 else
12703   echo "$ac_t""no" 1>&6
12704
12705                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12706 echo "configure:12707: checking for mdbm_set_chain in -lmdbm" >&5
12707 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12708 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12709   echo $ac_n "(cached) $ac_c" 1>&6
12710 else
12711   ac_save_LIBS="$LIBS"
12712 LIBS="-lmdbm  $LIBS"
12713 cat > conftest.$ac_ext <<EOF
12714 #line 12715 "configure"
12715 #include "confdefs.h"
12716 /* Override any gcc2 internal prototype to avoid an error.  */
12717 /* We use char because int might match the return type of a gcc2
12718     builtin and then its argument prototype would still apply.  */
12719 char mdbm_set_chain();
12720
12721 int main() {
12722 mdbm_set_chain()
12723 ; return 0; }
12724 EOF
12725 if { (eval echo configure:12726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12726   rm -rf conftest*
12727   eval "ac_cv_lib_$ac_lib_var=yes"
12728 else
12729   echo "configure: failed program was:" >&5
12730   cat conftest.$ac_ext >&5
12731   rm -rf conftest*
12732   eval "ac_cv_lib_$ac_lib_var=no"
12733 fi
12734 rm -f conftest*
12735 LIBS="$ac_save_LIBS"
12736
12737 fi
12738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12739   echo "$ac_t""yes" 1>&6
12740   ol_cv_lib_mdbm=-lmdbm
12741 else
12742   echo "$ac_t""no" 1>&6
12743 ol_cv_lib_mdbm=no
12744 fi
12745
12746         
12747 fi
12748
12749         LIBS="$ol_LIBS"
12750
12751 fi
12752
12753 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12754
12755
12756  for ac_hdr in mdbm.h
12757 do
12758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12760 echo "configure:12761: checking for $ac_hdr" >&5
12761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12762   echo $ac_n "(cached) $ac_c" 1>&6
12763 else
12764   cat > conftest.$ac_ext <<EOF
12765 #line 12766 "configure"
12766 #include "confdefs.h"
12767 #include <$ac_hdr>
12768 EOF
12769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12770 { (eval echo configure:12771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12772 if test -z "$ac_err"; then
12773   rm -rf conftest*
12774   eval "ac_cv_header_$ac_safe=yes"
12775 else
12776   echo "$ac_err" >&5
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -rf conftest*
12780   eval "ac_cv_header_$ac_safe=no"
12781 fi
12782 rm -f conftest*
12783 fi
12784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12785   echo "$ac_t""yes" 1>&6
12786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12787   cat >> confdefs.h <<EOF
12788 #define $ac_tr_hdr 1
12789 EOF
12790  
12791 else
12792   echo "$ac_t""no" 1>&6
12793 fi
12794 done
12795
12796  echo $ac_n "checking for db""... $ac_c" 1>&6
12797 echo "configure:12798: checking for db" >&5
12798 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12799   echo $ac_n "(cached) $ac_c" 1>&6
12800 else
12801   
12802         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12803                 ol_cv_mdbm=no
12804         else
12805                 ol_cv_mdbm=yes
12806         fi
12807
12808 fi
12809
12810 echo "$ac_t""$ol_cv_mdbm" 1>&6
12811  if test $ol_cv_mdbm = yes ; then
12812         cat >> confdefs.h <<\EOF
12813 #define HAVE_MDBM 1
12814 EOF
12815
12816  fi
12817
12818
12819         if test $ol_cv_mdbm = yes ; then
12820                 ol_link_ldbm=mdbm
12821                 ol_with_ldbm_api=mdbm
12822                 if test $ol_cv_lib_mdbm != yes ; then
12823                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12824                 fi
12825         fi
12826 fi
12827
12828 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12829         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12830 echo "configure:12831: checking for GDBM library" >&5
12831 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12832   echo $ac_n "(cached) $ac_c" 1>&6
12833 else
12834         ol_LIBS="$LIBS"
12835         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12836 echo "configure:12837: checking for gdbm_open" >&5
12837 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12838   echo $ac_n "(cached) $ac_c" 1>&6
12839 else
12840   cat > conftest.$ac_ext <<EOF
12841 #line 12842 "configure"
12842 #include "confdefs.h"
12843 /* System header to define __stub macros and hopefully few prototypes,
12844     which can conflict with char gdbm_open(); below.  */
12845 #include <assert.h>
12846 /* Override any gcc2 internal prototype to avoid an error.  */
12847 /* We use char because int might match the return type of a gcc2
12848     builtin and then its argument prototype would still apply.  */
12849 char gdbm_open();
12850 char (*f)();
12851
12852 int main() {
12853
12854 /* The GNU C library defines this for functions which it implements
12855     to always fail with ENOSYS.  Some functions are actually named
12856     something starting with __ and the normal name is an alias.  */
12857 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12858 choke me
12859 #else
12860 f = gdbm_open;
12861 #endif
12862
12863 ; return 0; }
12864 EOF
12865 if { (eval echo configure:12866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12866   rm -rf conftest*
12867   eval "ac_cv_func_gdbm_open=yes"
12868 else
12869   echo "configure: failed program was:" >&5
12870   cat conftest.$ac_ext >&5
12871   rm -rf conftest*
12872   eval "ac_cv_func_gdbm_open=no"
12873 fi
12874 rm -f conftest*
12875 fi
12876
12877 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12878   echo "$ac_t""yes" 1>&6
12879   ol_cv_lib_gdbm=yes
12880 else
12881   echo "$ac_t""no" 1>&6
12882
12883                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12884 echo "configure:12885: checking for gdbm_open in -lgdbm" >&5
12885 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12886 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12887   echo $ac_n "(cached) $ac_c" 1>&6
12888 else
12889   ac_save_LIBS="$LIBS"
12890 LIBS="-lgdbm  $LIBS"
12891 cat > conftest.$ac_ext <<EOF
12892 #line 12893 "configure"
12893 #include "confdefs.h"
12894 /* Override any gcc2 internal prototype to avoid an error.  */
12895 /* We use char because int might match the return type of a gcc2
12896     builtin and then its argument prototype would still apply.  */
12897 char gdbm_open();
12898
12899 int main() {
12900 gdbm_open()
12901 ; return 0; }
12902 EOF
12903 if { (eval echo configure:12904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12904   rm -rf conftest*
12905   eval "ac_cv_lib_$ac_lib_var=yes"
12906 else
12907   echo "configure: failed program was:" >&5
12908   cat conftest.$ac_ext >&5
12909   rm -rf conftest*
12910   eval "ac_cv_lib_$ac_lib_var=no"
12911 fi
12912 rm -f conftest*
12913 LIBS="$ac_save_LIBS"
12914
12915 fi
12916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12917   echo "$ac_t""yes" 1>&6
12918   ol_cv_lib_gdbm=-lgdbm
12919 else
12920   echo "$ac_t""no" 1>&6
12921 ol_cv_lib_gdbm=no
12922 fi
12923
12924         
12925 fi
12926
12927         LIBS="$ol_LIBS"
12928
12929 fi
12930
12931 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12932
12933
12934  for ac_hdr in gdbm.h
12935 do
12936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12938 echo "configure:12939: checking for $ac_hdr" >&5
12939 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12940   echo $ac_n "(cached) $ac_c" 1>&6
12941 else
12942   cat > conftest.$ac_ext <<EOF
12943 #line 12944 "configure"
12944 #include "confdefs.h"
12945 #include <$ac_hdr>
12946 EOF
12947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12948 { (eval echo configure:12949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12950 if test -z "$ac_err"; then
12951   rm -rf conftest*
12952   eval "ac_cv_header_$ac_safe=yes"
12953 else
12954   echo "$ac_err" >&5
12955   echo "configure: failed program was:" >&5
12956   cat conftest.$ac_ext >&5
12957   rm -rf conftest*
12958   eval "ac_cv_header_$ac_safe=no"
12959 fi
12960 rm -f conftest*
12961 fi
12962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12963   echo "$ac_t""yes" 1>&6
12964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12965   cat >> confdefs.h <<EOF
12966 #define $ac_tr_hdr 1
12967 EOF
12968  
12969 else
12970   echo "$ac_t""no" 1>&6
12971 fi
12972 done
12973
12974  echo $ac_n "checking for db""... $ac_c" 1>&6
12975 echo "configure:12976: checking for db" >&5
12976 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12977   echo $ac_n "(cached) $ac_c" 1>&6
12978 else
12979   
12980         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12981                 ol_cv_gdbm=no
12982         else
12983                 ol_cv_gdbm=yes
12984         fi
12985
12986 fi
12987
12988 echo "$ac_t""$ol_cv_gdbm" 1>&6
12989  if test $ol_cv_gdbm = yes ; then
12990         cat >> confdefs.h <<\EOF
12991 #define HAVE_GDBM 1
12992 EOF
12993
12994  fi
12995
12996
12997         if test $ol_cv_gdbm = yes ; then
12998                 ol_link_ldbm=gdbm
12999                 ol_with_ldbm_api=gdbm
13000
13001                 if test $ol_cv_lib_gdbm != yes ; then
13002                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
13003                 fi
13004         fi
13005 fi
13006
13007 if test $ol_with_ldbm_api = ndbm ; then
13008         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
13009 echo "configure:13010: checking for NDBM library" >&5
13010 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
13011   echo $ac_n "(cached) $ac_c" 1>&6
13012 else
13013         ol_LIBS="$LIBS"
13014         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13015 echo "configure:13016: checking for dbm_open" >&5
13016 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
13017   echo $ac_n "(cached) $ac_c" 1>&6
13018 else
13019   cat > conftest.$ac_ext <<EOF
13020 #line 13021 "configure"
13021 #include "confdefs.h"
13022 /* System header to define __stub macros and hopefully few prototypes,
13023     which can conflict with char dbm_open(); below.  */
13024 #include <assert.h>
13025 /* Override any gcc2 internal prototype to avoid an error.  */
13026 /* We use char because int might match the return type of a gcc2
13027     builtin and then its argument prototype would still apply.  */
13028 char dbm_open();
13029 char (*f)();
13030
13031 int main() {
13032
13033 /* The GNU C library defines this for functions which it implements
13034     to always fail with ENOSYS.  Some functions are actually named
13035     something starting with __ and the normal name is an alias.  */
13036 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13037 choke me
13038 #else
13039 f = dbm_open;
13040 #endif
13041
13042 ; return 0; }
13043 EOF
13044 if { (eval echo configure:13045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13045   rm -rf conftest*
13046   eval "ac_cv_func_dbm_open=yes"
13047 else
13048   echo "configure: failed program was:" >&5
13049   cat conftest.$ac_ext >&5
13050   rm -rf conftest*
13051   eval "ac_cv_func_dbm_open=no"
13052 fi
13053 rm -f conftest*
13054 fi
13055
13056 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13057   echo "$ac_t""yes" 1>&6
13058   ol_cv_lib_ndbm=yes
13059 else
13060   echo "$ac_t""no" 1>&6
13061
13062                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13063 echo "configure:13064: checking for dbm_open in -lndbm" >&5
13064 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13066   echo $ac_n "(cached) $ac_c" 1>&6
13067 else
13068   ac_save_LIBS="$LIBS"
13069 LIBS="-lndbm  $LIBS"
13070 cat > conftest.$ac_ext <<EOF
13071 #line 13072 "configure"
13072 #include "confdefs.h"
13073 /* Override any gcc2 internal prototype to avoid an error.  */
13074 /* We use char because int might match the return type of a gcc2
13075     builtin and then its argument prototype would still apply.  */
13076 char dbm_open();
13077
13078 int main() {
13079 dbm_open()
13080 ; return 0; }
13081 EOF
13082 if { (eval echo configure:13083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13083   rm -rf conftest*
13084   eval "ac_cv_lib_$ac_lib_var=yes"
13085 else
13086   echo "configure: failed program was:" >&5
13087   cat conftest.$ac_ext >&5
13088   rm -rf conftest*
13089   eval "ac_cv_lib_$ac_lib_var=no"
13090 fi
13091 rm -f conftest*
13092 LIBS="$ac_save_LIBS"
13093
13094 fi
13095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13096   echo "$ac_t""yes" 1>&6
13097   ol_cv_lib_ndbm=-lndbm
13098 else
13099   echo "$ac_t""no" 1>&6
13100
13101                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13102 echo "configure:13103: checking for dbm_open in -ldbm" >&5
13103 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13105   echo $ac_n "(cached) $ac_c" 1>&6
13106 else
13107   ac_save_LIBS="$LIBS"
13108 LIBS="-ldbm  $LIBS"
13109 cat > conftest.$ac_ext <<EOF
13110 #line 13111 "configure"
13111 #include "confdefs.h"
13112 /* Override any gcc2 internal prototype to avoid an error.  */
13113 /* We use char because int might match the return type of a gcc2
13114     builtin and then its argument prototype would still apply.  */
13115 char dbm_open();
13116
13117 int main() {
13118 dbm_open()
13119 ; return 0; }
13120 EOF
13121 if { (eval echo configure:13122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13122   rm -rf conftest*
13123   eval "ac_cv_lib_$ac_lib_var=yes"
13124 else
13125   echo "configure: failed program was:" >&5
13126   cat conftest.$ac_ext >&5
13127   rm -rf conftest*
13128   eval "ac_cv_lib_$ac_lib_var=no"
13129 fi
13130 rm -f conftest*
13131 LIBS="$ac_save_LIBS"
13132
13133 fi
13134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13135   echo "$ac_t""yes" 1>&6
13136   ol_cv_lib_ndbm=-ldbm
13137 else
13138   echo "$ac_t""no" 1>&6
13139 ol_cv_lib_ndbm=no
13140 fi
13141                 
13142 fi
13143
13144         
13145 fi
13146
13147         LIBS="$ol_LIBS"
13148
13149 fi
13150
13151 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13152
13153
13154  for ac_hdr in ndbm.h
13155 do
13156 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13157 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13158 echo "configure:13159: checking for $ac_hdr" >&5
13159 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13160   echo $ac_n "(cached) $ac_c" 1>&6
13161 else
13162   cat > conftest.$ac_ext <<EOF
13163 #line 13164 "configure"
13164 #include "confdefs.h"
13165 #include <$ac_hdr>
13166 EOF
13167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13168 { (eval echo configure:13169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13170 if test -z "$ac_err"; then
13171   rm -rf conftest*
13172   eval "ac_cv_header_$ac_safe=yes"
13173 else
13174   echo "$ac_err" >&5
13175   echo "configure: failed program was:" >&5
13176   cat conftest.$ac_ext >&5
13177   rm -rf conftest*
13178   eval "ac_cv_header_$ac_safe=no"
13179 fi
13180 rm -f conftest*
13181 fi
13182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13183   echo "$ac_t""yes" 1>&6
13184     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13185   cat >> confdefs.h <<EOF
13186 #define $ac_tr_hdr 1
13187 EOF
13188  
13189 else
13190   echo "$ac_t""no" 1>&6
13191 fi
13192 done
13193
13194  echo $ac_n "checking for db""... $ac_c" 1>&6
13195 echo "configure:13196: checking for db" >&5
13196 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13197   echo $ac_n "(cached) $ac_c" 1>&6
13198 else
13199   
13200         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13201                 ol_cv_ndbm=no
13202         else
13203                 ol_cv_ndbm=yes
13204         fi
13205
13206 fi
13207
13208 echo "$ac_t""$ol_cv_ndbm" 1>&6
13209  if test $ol_cv_ndbm = yes ; then
13210         cat >> confdefs.h <<\EOF
13211 #define HAVE_NDBM 1
13212 EOF
13213
13214  fi
13215
13216
13217         if test $ol_cv_ndbm = yes ; then
13218                 ol_link_ldbm=ndbm
13219                 ol_with_ldbm_api=ndbm
13220
13221                 if test $ol_cv_lib_ndbm != yes ; then
13222                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13223                 fi
13224         fi
13225 fi
13226
13227 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13228         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13229         if test $ol_enable_ldbm = yes ; then
13230                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13231         fi
13232
13233         echo "configure: warning: disabling LDBM" 1>&2
13234         ol_enable_ldbm=no
13235 fi
13236
13237 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13238         LINK_BINS_DYNAMIC="yes"
13239 else
13240         LINK_BINS_DYNAMIC="no"
13241 fi
13242
13243 if test $ol_enable_wrappers != no ; then
13244         for ac_hdr in tcpd.h
13245 do
13246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13248 echo "configure:13249: checking for $ac_hdr" >&5
13249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13250   echo $ac_n "(cached) $ac_c" 1>&6
13251 else
13252   cat > conftest.$ac_ext <<EOF
13253 #line 13254 "configure"
13254 #include "confdefs.h"
13255 #include <$ac_hdr>
13256 EOF
13257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13258 { (eval echo configure:13259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13260 if test -z "$ac_err"; then
13261   rm -rf conftest*
13262   eval "ac_cv_header_$ac_safe=yes"
13263 else
13264   echo "$ac_err" >&5
13265   echo "configure: failed program was:" >&5
13266   cat conftest.$ac_ext >&5
13267   rm -rf conftest*
13268   eval "ac_cv_header_$ac_safe=no"
13269 fi
13270 rm -f conftest*
13271 fi
13272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13273   echo "$ac_t""yes" 1>&6
13274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13275   cat >> confdefs.h <<EOF
13276 #define $ac_tr_hdr 1
13277 EOF
13278  
13279 else
13280   echo "$ac_t""no" 1>&6
13281 fi
13282 done
13283
13284
13285         if test $ac_cv_header_tcpd_h != yes ; then
13286                 have_wrappers=no
13287         else
13288                 cat > conftest.$ac_ext <<EOF
13289 #line 13290 "configure"
13290 #include "confdefs.h"
13291
13292 int allow_severity = 0;
13293 int deny_severity  = 0;
13294                 
13295 int main() {
13296 hosts_access()
13297 ; return 0; }
13298 EOF
13299 if { (eval echo configure:13300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13300   rm -rf conftest*
13301   have_wrappers=yes
13302 else
13303   echo "configure: failed program was:" >&5
13304   cat conftest.$ac_ext >&5
13305   rm -rf conftest*
13306   have_wrappers=no
13307 fi
13308 rm -f conftest*
13309         fi
13310
13311         if test $have_wrappers = yes ; then
13312                 cat >> confdefs.h <<\EOF
13313 #define HAVE_TCPD 1
13314 EOF
13315
13316                 WRAP_LIBS="-lwrap"
13317
13318                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13319 echo "configure:13320: checking for main in -lnsl" >&5
13320 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13322   echo $ac_n "(cached) $ac_c" 1>&6
13323 else
13324   ac_save_LIBS="$LIBS"
13325 LIBS="-lnsl  $LIBS"
13326 cat > conftest.$ac_ext <<EOF
13327 #line 13328 "configure"
13328 #include "confdefs.h"
13329
13330 int main() {
13331 main()
13332 ; return 0; }
13333 EOF
13334 if { (eval echo configure:13335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13335   rm -rf conftest*
13336   eval "ac_cv_lib_$ac_lib_var=yes"
13337 else
13338   echo "configure: failed program was:" >&5
13339   cat conftest.$ac_ext >&5
13340   rm -rf conftest*
13341   eval "ac_cv_lib_$ac_lib_var=no"
13342 fi
13343 rm -f conftest*
13344 LIBS="$ac_save_LIBS"
13345
13346 fi
13347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13348   echo "$ac_t""yes" 1>&6
13349     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13351   cat >> confdefs.h <<EOF
13352 #define $ac_tr_lib 1
13353 EOF
13354
13355   LIBS="-lnsl $LIBS"
13356
13357 else
13358   echo "$ac_t""no" 1>&6
13359 fi
13360
13361         else
13362                 echo "configure: warning: could not find -lwrap" 1>&2
13363                 if test $ol_enable_wrappers = yes ; then
13364                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13365                 fi
13366
13367                 echo "configure: warning: disabling wrappers support" 1>&2
13368                 ol_enable_wrappers=no
13369                 WRAP_LIBS=""
13370         fi
13371 fi
13372
13373 if test $ol_enable_syslog != no ; then
13374         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13375 echo "configure:13376: checking for openlog" >&5
13376 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13377   echo $ac_n "(cached) $ac_c" 1>&6
13378 else
13379   cat > conftest.$ac_ext <<EOF
13380 #line 13381 "configure"
13381 #include "confdefs.h"
13382 /* System header to define __stub macros and hopefully few prototypes,
13383     which can conflict with char openlog(); below.  */
13384 #include <assert.h>
13385 /* Override any gcc2 internal prototype to avoid an error.  */
13386 /* We use char because int might match the return type of a gcc2
13387     builtin and then its argument prototype would still apply.  */
13388 char openlog();
13389 char (*f)();
13390
13391 int main() {
13392
13393 /* The GNU C library defines this for functions which it implements
13394     to always fail with ENOSYS.  Some functions are actually named
13395     something starting with __ and the normal name is an alias.  */
13396 #if defined (__stub_openlog) || defined (__stub___openlog)
13397 choke me
13398 #else
13399 f = openlog;
13400 #endif
13401
13402 ; return 0; }
13403 EOF
13404 if { (eval echo configure:13405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13405   rm -rf conftest*
13406   eval "ac_cv_func_openlog=yes"
13407 else
13408   echo "configure: failed program was:" >&5
13409   cat conftest.$ac_ext >&5
13410   rm -rf conftest*
13411   eval "ac_cv_func_openlog=no"
13412 fi
13413 rm -f conftest*
13414 fi
13415
13416 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13417   echo "$ac_t""yes" 1>&6
13418   :
13419 else
13420   echo "$ac_t""no" 1>&6
13421 fi
13422
13423         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13424                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13425         fi
13426         ol_enable_syslog=$ac_cv_func_openlog
13427 fi
13428
13429
13430 ol_link_sql=no
13431 if test $ol_enable_sql != no ; then
13432         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13433 echo "configure:13434: checking for SQLDriverConnect in -liodbc" >&5
13434 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13435 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13436   echo $ac_n "(cached) $ac_c" 1>&6
13437 else
13438   ac_save_LIBS="$LIBS"
13439 LIBS="-liodbc  $LIBS"
13440 cat > conftest.$ac_ext <<EOF
13441 #line 13442 "configure"
13442 #include "confdefs.h"
13443 /* Override any gcc2 internal prototype to avoid an error.  */
13444 /* We use char because int might match the return type of a gcc2
13445     builtin and then its argument prototype would still apply.  */
13446 char SQLDriverConnect();
13447
13448 int main() {
13449 SQLDriverConnect()
13450 ; return 0; }
13451 EOF
13452 if { (eval echo configure:13453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13453   rm -rf conftest*
13454   eval "ac_cv_lib_$ac_lib_var=yes"
13455 else
13456   echo "configure: failed program was:" >&5
13457   cat conftest.$ac_ext >&5
13458   rm -rf conftest*
13459   eval "ac_cv_lib_$ac_lib_var=no"
13460 fi
13461 rm -f conftest*
13462 LIBS="$ac_save_LIBS"
13463
13464 fi
13465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13466   echo "$ac_t""yes" 1>&6
13467   have_iodbc=yes
13468 else
13469   echo "$ac_t""no" 1>&6
13470 have_iodbc=no
13471 fi
13472
13473         if test $have_iodbc = yes ; then
13474                 ol_link_sql="-liodbc"
13475         else
13476                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13477 echo "configure:13478: checking for SQLDriverConnect in -lodbc" >&5
13478 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13479 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13480   echo $ac_n "(cached) $ac_c" 1>&6
13481 else
13482   ac_save_LIBS="$LIBS"
13483 LIBS="-lodbc  $LIBS"
13484 cat > conftest.$ac_ext <<EOF
13485 #line 13486 "configure"
13486 #include "confdefs.h"
13487 /* Override any gcc2 internal prototype to avoid an error.  */
13488 /* We use char because int might match the return type of a gcc2
13489     builtin and then its argument prototype would still apply.  */
13490 char SQLDriverConnect();
13491
13492 int main() {
13493 SQLDriverConnect()
13494 ; return 0; }
13495 EOF
13496 if { (eval echo configure:13497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13497   rm -rf conftest*
13498   eval "ac_cv_lib_$ac_lib_var=yes"
13499 else
13500   echo "configure: failed program was:" >&5
13501   cat conftest.$ac_ext >&5
13502   rm -rf conftest*
13503   eval "ac_cv_lib_$ac_lib_var=no"
13504 fi
13505 rm -f conftest*
13506 LIBS="$ac_save_LIBS"
13507
13508 fi
13509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13510   echo "$ac_t""yes" 1>&6
13511   have_odbc=yes
13512 else
13513   echo "$ac_t""no" 1>&6
13514 have_odbc=no
13515 fi
13516
13517                 if test $have_odbc = yes ; then
13518                         ol_link_sql="-lodbc"
13519                 fi
13520         fi
13521
13522         if test $ol_link_sql != no ; then
13523                 SLAPD_SQL_LIBS="$ol_link_sql"
13524
13525         elif test $ol_enable_sql != auto ; then
13526                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13527         fi
13528 fi
13529
13530 if test $ol_enable_tcl != no ; then
13531         for ac_hdr in tcl.h
13532 do
13533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13535 echo "configure:13536: checking for $ac_hdr" >&5
13536 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13537   echo $ac_n "(cached) $ac_c" 1>&6
13538 else
13539   cat > conftest.$ac_ext <<EOF
13540 #line 13541 "configure"
13541 #include "confdefs.h"
13542 #include <$ac_hdr>
13543 EOF
13544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13545 { (eval echo configure:13546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13547 if test -z "$ac_err"; then
13548   rm -rf conftest*
13549   eval "ac_cv_header_$ac_safe=yes"
13550 else
13551   echo "$ac_err" >&5
13552   echo "configure: failed program was:" >&5
13553   cat conftest.$ac_ext >&5
13554   rm -rf conftest*
13555   eval "ac_cv_header_$ac_safe=no"
13556 fi
13557 rm -f conftest*
13558 fi
13559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13560   echo "$ac_t""yes" 1>&6
13561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13562   cat >> confdefs.h <<EOF
13563 #define $ac_tr_hdr 1
13564 EOF
13565  
13566 else
13567   echo "$ac_t""no" 1>&6
13568 fi
13569 done
13570
13571
13572         if test $ac_cv_header_tcl_h != yes ; then
13573                 have_tcl=no
13574         else
13575                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13576                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13577 echo "configure:13578: checking for main in -l$lib" >&5
13578 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13580   echo $ac_n "(cached) $ac_c" 1>&6
13581 else
13582   ac_save_LIBS="$LIBS"
13583 LIBS="-l$lib  $LIBS"
13584 cat > conftest.$ac_ext <<EOF
13585 #line 13586 "configure"
13586 #include "confdefs.h"
13587
13588 int main() {
13589 main()
13590 ; return 0; }
13591 EOF
13592 if { (eval echo configure:13593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13593   rm -rf conftest*
13594   eval "ac_cv_lib_$ac_lib_var=yes"
13595 else
13596   echo "configure: failed program was:" >&5
13597   cat conftest.$ac_ext >&5
13598   rm -rf conftest*
13599   eval "ac_cv_lib_$ac_lib_var=no"
13600 fi
13601 rm -f conftest*
13602 LIBS="$ac_save_LIBS"
13603
13604 fi
13605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13606   echo "$ac_t""yes" 1>&6
13607   have_tcl=yes
13608                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13609                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13610                            else
13611                                MOD_TCL_LIB="-l${lib}"
13612                            fi;break
13613 else
13614   echo "$ac_t""no" 1>&6
13615 have_tcl=no
13616 fi
13617
13618                 done
13619         fi
13620
13621         if test $have_tcl != yes ; then
13622                 echo "configure: warning: could not find -ltcl" 1>&2
13623                 if test $ol_enable_tcl = yes ; then
13624                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13625                 fi
13626
13627                 ol_enable_tcl=no
13628         fi
13629 fi
13630
13631 ol_link_termcap=no
13632 for ac_hdr in termcap.h ncurses.h
13633 do
13634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13636 echo "configure:13637: checking for $ac_hdr" >&5
13637 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13638   echo $ac_n "(cached) $ac_c" 1>&6
13639 else
13640   cat > conftest.$ac_ext <<EOF
13641 #line 13642 "configure"
13642 #include "confdefs.h"
13643 #include <$ac_hdr>
13644 EOF
13645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13646 { (eval echo configure:13647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13648 if test -z "$ac_err"; then
13649   rm -rf conftest*
13650   eval "ac_cv_header_$ac_safe=yes"
13651 else
13652   echo "$ac_err" >&5
13653   echo "configure: failed program was:" >&5
13654   cat conftest.$ac_ext >&5
13655   rm -rf conftest*
13656   eval "ac_cv_header_$ac_safe=no"
13657 fi
13658 rm -f conftest*
13659 fi
13660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13661   echo "$ac_t""yes" 1>&6
13662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13663   cat >> confdefs.h <<EOF
13664 #define $ac_tr_hdr 1
13665 EOF
13666  
13667 else
13668   echo "$ac_t""no" 1>&6
13669 fi
13670 done
13671
13672
13673 if test $ol_link_termcap = no ; then
13674         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13675 echo "configure:13676: checking for tputs in -ltermcap" >&5
13676 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13677 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13678   echo $ac_n "(cached) $ac_c" 1>&6
13679 else
13680   ac_save_LIBS="$LIBS"
13681 LIBS="-ltermcap  $LIBS"
13682 cat > conftest.$ac_ext <<EOF
13683 #line 13684 "configure"
13684 #include "confdefs.h"
13685 /* Override any gcc2 internal prototype to avoid an error.  */
13686 /* We use char because int might match the return type of a gcc2
13687     builtin and then its argument prototype would still apply.  */
13688 char tputs();
13689
13690 int main() {
13691 tputs()
13692 ; return 0; }
13693 EOF
13694 if { (eval echo configure:13695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13695   rm -rf conftest*
13696   eval "ac_cv_lib_$ac_lib_var=yes"
13697 else
13698   echo "configure: failed program was:" >&5
13699   cat conftest.$ac_ext >&5
13700   rm -rf conftest*
13701   eval "ac_cv_lib_$ac_lib_var=no"
13702 fi
13703 rm -f conftest*
13704 LIBS="$ac_save_LIBS"
13705
13706 fi
13707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13708   echo "$ac_t""yes" 1>&6
13709   have_termcap=yes
13710 else
13711   echo "$ac_t""no" 1>&6
13712 have_termcap=no
13713 fi
13714
13715         if test $have_termcap = yes ; then
13716                 cat >> confdefs.h <<\EOF
13717 #define HAVE_TERMCAP 1
13718 EOF
13719
13720                 ol_link_termcap=yes
13721                 TERMCAP_LIBS=-ltermcap
13722         fi
13723 fi
13724
13725 if test $ol_link_termcap = no ; then
13726         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13727 echo "configure:13728: checking for initscr in -lncurses" >&5
13728 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13729 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13730   echo $ac_n "(cached) $ac_c" 1>&6
13731 else
13732   ac_save_LIBS="$LIBS"
13733 LIBS="-lncurses  $LIBS"
13734 cat > conftest.$ac_ext <<EOF
13735 #line 13736 "configure"
13736 #include "confdefs.h"
13737 /* Override any gcc2 internal prototype to avoid an error.  */
13738 /* We use char because int might match the return type of a gcc2
13739     builtin and then its argument prototype would still apply.  */
13740 char initscr();
13741
13742 int main() {
13743 initscr()
13744 ; return 0; }
13745 EOF
13746 if { (eval echo configure:13747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13747   rm -rf conftest*
13748   eval "ac_cv_lib_$ac_lib_var=yes"
13749 else
13750   echo "configure: failed program was:" >&5
13751   cat conftest.$ac_ext >&5
13752   rm -rf conftest*
13753   eval "ac_cv_lib_$ac_lib_var=no"
13754 fi
13755 rm -f conftest*
13756 LIBS="$ac_save_LIBS"
13757
13758 fi
13759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13760   echo "$ac_t""yes" 1>&6
13761   have_ncurses=yes
13762 else
13763   echo "$ac_t""no" 1>&6
13764 have_ncurses=no
13765 fi
13766
13767         if test $have_ncurses = yes ; then
13768                 cat >> confdefs.h <<\EOF
13769 #define HAVE_NCURSES 1
13770 EOF
13771
13772                 ol_link_termcap=yes
13773                 TERMCAP_LIBS=-lncurses
13774         fi
13775 fi
13776
13777 if test $ol_link_termcap = no ; then
13778         cat >> confdefs.h <<\EOF
13779 #define NO_TERMCAP 1
13780 EOF
13781
13782         TERMCAP_LIBS=
13783 fi
13784
13785 ol_link_sasl=no
13786 ol_link_spasswd=no
13787 if test $ol_with_cyrus_sasl != no ; then
13788         for ac_hdr in sasl.h
13789 do
13790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13792 echo "configure:13793: checking for $ac_hdr" >&5
13793 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13794   echo $ac_n "(cached) $ac_c" 1>&6
13795 else
13796   cat > conftest.$ac_ext <<EOF
13797 #line 13798 "configure"
13798 #include "confdefs.h"
13799 #include <$ac_hdr>
13800 EOF
13801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13802 { (eval echo configure:13803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13804 if test -z "$ac_err"; then
13805   rm -rf conftest*
13806   eval "ac_cv_header_$ac_safe=yes"
13807 else
13808   echo "$ac_err" >&5
13809   echo "configure: failed program was:" >&5
13810   cat conftest.$ac_ext >&5
13811   rm -rf conftest*
13812   eval "ac_cv_header_$ac_safe=no"
13813 fi
13814 rm -f conftest*
13815 fi
13816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13817   echo "$ac_t""yes" 1>&6
13818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13819   cat >> confdefs.h <<EOF
13820 #define $ac_tr_hdr 1
13821 EOF
13822  
13823 else
13824   echo "$ac_t""no" 1>&6
13825 fi
13826 done
13827
13828
13829         if test $ac_cv_header_sasl_h = yes ; then
13830                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13831 echo "configure:13832: checking for sasl_client_init in -lsasl" >&5
13832 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13833 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13834   echo $ac_n "(cached) $ac_c" 1>&6
13835 else
13836   ac_save_LIBS="$LIBS"
13837 LIBS="-lsasl  $LIBS"
13838 cat > conftest.$ac_ext <<EOF
13839 #line 13840 "configure"
13840 #include "confdefs.h"
13841 /* Override any gcc2 internal prototype to avoid an error.  */
13842 /* We use char because int might match the return type of a gcc2
13843     builtin and then its argument prototype would still apply.  */
13844 char sasl_client_init();
13845
13846 int main() {
13847 sasl_client_init()
13848 ; return 0; }
13849 EOF
13850 if { (eval echo configure:13851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13851   rm -rf conftest*
13852   eval "ac_cv_lib_$ac_lib_var=yes"
13853 else
13854   echo "configure: failed program was:" >&5
13855   cat conftest.$ac_ext >&5
13856   rm -rf conftest*
13857   eval "ac_cv_lib_$ac_lib_var=no"
13858 fi
13859 rm -f conftest*
13860 LIBS="$ac_save_LIBS"
13861
13862 fi
13863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13864   echo "$ac_t""yes" 1>&6
13865   have_cyrus_sasl=yes
13866 else
13867   echo "$ac_t""no" 1>&6
13868 have_cyrus_sasl=no
13869 fi
13870
13871
13872                 if test $have_cyrus_sasl != no ; then
13873                         SASL_LIBS="-lsasl"
13874                         cat >> confdefs.h <<\EOF
13875 #define HAVE_CYRUS_SASL 1
13876 EOF
13877
13878                         ol_link_sasl=yes
13879                 fi
13880         fi
13881
13882         if test $ol_link_sasl = no ; then
13883                 if test $ol_with_cyrus_sasl != auto ; then
13884                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13885                 else
13886                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13887                         echo "configure: warning: SASL authentication not supported!" 1>&2
13888                         if test $ol_link_tls = no ; then
13889                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13890                         fi
13891                 fi
13892
13893         elif test $ol_enable_spasswd != no ; then
13894                 ol_link_spasswd=yes
13895         fi
13896
13897 else
13898         echo "configure: warning: SASL authentication not supported!" 1>&2
13899         if test $ol_link_tls = no ; then
13900                 echo "configure: warning: Strong authentication not supported!" 1>&2
13901         fi
13902 fi
13903
13904 if test $cross_compiling != yes ; then
13905         dev=no
13906         if test -r /dev/urandom ; then
13907                 dev="/dev/urandom";
13908         elif test -r /idev/urandom ; then
13909                 dev="/idev/urandom";
13910         elif test -r /dev/srandom ; then
13911                 dev="/dev/srandom";
13912         elif test -r /dev/random ; then
13913                 dev="/dev/random";
13914         elif test -r /idev/random ; then
13915                 dev="/idev/random";
13916         fi
13917
13918         if test $dev != no ; then
13919                 cat >> confdefs.h <<EOF
13920 #define URANDOM_DEVICE "$dev"
13921 EOF
13922
13923         fi
13924 fi
13925
13926 ol_link_fetch=no
13927 if test $ol_with_fetch != no ; then
13928         ol_LIBS=$LIBS
13929 LIBS="-lfetch -lcom_err $LIBS"
13930 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13931 echo "configure:13932: checking fetch(3) library" >&5
13932 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13933   echo $ac_n "(cached) $ac_c" 1>&6
13934 else
13935   
13936         cat > conftest.$ac_ext <<EOF
13937 #line 13938 "configure"
13938 #include "confdefs.h"
13939
13940 #include <sys/param.h>
13941 #include <stdio.h>
13942 #include <fetch.h>
13943 int main() {
13944 struct url *u = fetchParseURL("file:///"); 
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   ol_cv_lib_fetch=yes
13950 else
13951   echo "configure: failed program was:" >&5
13952   cat conftest.$ac_ext >&5
13953   rm -rf conftest*
13954   ol_cv_lib_fetch=no
13955 fi
13956 rm -f conftest*
13957 fi
13958
13959 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13960 LIBS=$ol_LIBS
13961 if test $ol_cv_lib_fetch != no ; then
13962         ol_link_fetch="-lfetch -lcom_err"
13963         cat >> confdefs.h <<\EOF
13964 #define HAVE_FETCH 1
13965 EOF
13966
13967 fi
13968
13969
13970         if test $ol_cv_lib_fetch != no ; then
13971                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13972                 ol_link_fetch=freebsd
13973
13974         elif test $ol_with_fetch != auto ; then
13975                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13976         fi 
13977 fi
13978
13979 ol_link_readline=no
13980 if test $ol_with_readline != no ; then
13981         for ac_hdr in readline/readline.h readline/history.h
13982 do
13983 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13984 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13985 echo "configure:13986: checking for $ac_hdr" >&5
13986 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13987   echo $ac_n "(cached) $ac_c" 1>&6
13988 else
13989   cat > conftest.$ac_ext <<EOF
13990 #line 13991 "configure"
13991 #include "confdefs.h"
13992 #include <$ac_hdr>
13993 EOF
13994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13995 { (eval echo configure:13996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13997 if test -z "$ac_err"; then
13998   rm -rf conftest*
13999   eval "ac_cv_header_$ac_safe=yes"
14000 else
14001   echo "$ac_err" >&5
14002   echo "configure: failed program was:" >&5
14003   cat conftest.$ac_ext >&5
14004   rm -rf conftest*
14005   eval "ac_cv_header_$ac_safe=no"
14006 fi
14007 rm -f conftest*
14008 fi
14009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14010   echo "$ac_t""yes" 1>&6
14011     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14012   cat >> confdefs.h <<EOF
14013 #define $ac_tr_hdr 1
14014 EOF
14015  
14016 else
14017   echo "$ac_t""no" 1>&6
14018 fi
14019 done
14020
14021
14022         if test $ac_cv_header_readline_readline_h = yes ; then
14023                 save_LIBS="$LIBS"
14024                 LIBS="$TERMCAP_LIBS $LIBS"
14025                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
14026 echo "configure:14027: checking for readline in -lreadline" >&5
14027 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
14028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14029   echo $ac_n "(cached) $ac_c" 1>&6
14030 else
14031   ac_save_LIBS="$LIBS"
14032 LIBS="-lreadline  $LIBS"
14033 cat > conftest.$ac_ext <<EOF
14034 #line 14035 "configure"
14035 #include "confdefs.h"
14036 /* Override any gcc2 internal prototype to avoid an error.  */
14037 /* We use char because int might match the return type of a gcc2
14038     builtin and then its argument prototype would still apply.  */
14039 char readline();
14040
14041 int main() {
14042 readline()
14043 ; return 0; }
14044 EOF
14045 if { (eval echo configure:14046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14046   rm -rf conftest*
14047   eval "ac_cv_lib_$ac_lib_var=yes"
14048 else
14049   echo "configure: failed program was:" >&5
14050   cat conftest.$ac_ext >&5
14051   rm -rf conftest*
14052   eval "ac_cv_lib_$ac_lib_var=no"
14053 fi
14054 rm -f conftest*
14055 LIBS="$ac_save_LIBS"
14056
14057 fi
14058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14059   echo "$ac_t""yes" 1>&6
14060   have_readline=yes
14061 else
14062   echo "$ac_t""no" 1>&6
14063 have_readline=no
14064 fi
14065
14066                 LIBS="$save_LIBS"
14067                         
14068                 if test $have_readline = yes ; then
14069                         ol_with_readline=found
14070                         ol_link_readline=yes
14071
14072                         READLINE_LIBS="-lreadline"
14073                 fi
14074         fi
14075 fi
14076
14077 if test $ol_link_readline = yes ; then
14078         cat >> confdefs.h <<\EOF
14079 #define HAVE_READLINE 1
14080 EOF
14081
14082 fi
14083
14084
14085 if test $ol_enable_crypt != no ; then
14086         echo $ac_n "checking for crypt""... $ac_c" 1>&6
14087 echo "configure:14088: checking for crypt" >&5
14088 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
14089   echo $ac_n "(cached) $ac_c" 1>&6
14090 else
14091   cat > conftest.$ac_ext <<EOF
14092 #line 14093 "configure"
14093 #include "confdefs.h"
14094 /* System header to define __stub macros and hopefully few prototypes,
14095     which can conflict with char crypt(); below.  */
14096 #include <assert.h>
14097 /* Override any gcc2 internal prototype to avoid an error.  */
14098 /* We use char because int might match the return type of a gcc2
14099     builtin and then its argument prototype would still apply.  */
14100 char crypt();
14101 char (*f)();
14102
14103 int main() {
14104
14105 /* The GNU C library defines this for functions which it implements
14106     to always fail with ENOSYS.  Some functions are actually named
14107     something starting with __ and the normal name is an alias.  */
14108 #if defined (__stub_crypt) || defined (__stub___crypt)
14109 choke me
14110 #else
14111 f = crypt;
14112 #endif
14113
14114 ; return 0; }
14115 EOF
14116 if { (eval echo configure:14117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14117   rm -rf conftest*
14118   eval "ac_cv_func_crypt=yes"
14119 else
14120   echo "configure: failed program was:" >&5
14121   cat conftest.$ac_ext >&5
14122   rm -rf conftest*
14123   eval "ac_cv_func_crypt=no"
14124 fi
14125 rm -f conftest*
14126 fi
14127
14128 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
14129   echo "$ac_t""yes" 1>&6
14130   have_crypt=yes
14131 else
14132   echo "$ac_t""no" 1>&6
14133
14134                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14135 echo "configure:14136: checking for crypt in -lcrypt" >&5
14136 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14138   echo $ac_n "(cached) $ac_c" 1>&6
14139 else
14140   ac_save_LIBS="$LIBS"
14141 LIBS="-lcrypt  $LIBS"
14142 cat > conftest.$ac_ext <<EOF
14143 #line 14144 "configure"
14144 #include "confdefs.h"
14145 /* Override any gcc2 internal prototype to avoid an error.  */
14146 /* We use char because int might match the return type of a gcc2
14147     builtin and then its argument prototype would still apply.  */
14148 char crypt();
14149
14150 int main() {
14151 crypt()
14152 ; return 0; }
14153 EOF
14154 if { (eval echo configure:14155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14155   rm -rf conftest*
14156   eval "ac_cv_lib_$ac_lib_var=yes"
14157 else
14158   echo "configure: failed program was:" >&5
14159   cat conftest.$ac_ext >&5
14160   rm -rf conftest*
14161   eval "ac_cv_lib_$ac_lib_var=no"
14162 fi
14163 rm -f conftest*
14164 LIBS="$ac_save_LIBS"
14165
14166 fi
14167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14168   echo "$ac_t""yes" 1>&6
14169   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14170                         have_crypt=yes
14171 else
14172   echo "$ac_t""no" 1>&6
14173 have_crypt=no
14174 fi
14175
14176 fi
14177
14178
14179         if test $have_crypt = yes ; then
14180                 cat >> confdefs.h <<\EOF
14181 #define HAVE_CRYPT 1
14182 EOF
14183
14184         else
14185                 echo "configure: warning: could not find crypt" 1>&2
14186                 if test $ol_enable_crypt = yes ; then
14187                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14188                 fi
14189
14190                 echo "configure: warning: disabling crypt support" 1>&2
14191                 ol_enable_crypt=no
14192         fi
14193 fi
14194
14195 if test $ol_enable_proctitle != no ; then
14196         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14197 echo "configure:14198: checking for setproctitle" >&5
14198 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14199   echo $ac_n "(cached) $ac_c" 1>&6
14200 else
14201   cat > conftest.$ac_ext <<EOF
14202 #line 14203 "configure"
14203 #include "confdefs.h"
14204 /* System header to define __stub macros and hopefully few prototypes,
14205     which can conflict with char setproctitle(); below.  */
14206 #include <assert.h>
14207 /* Override any gcc2 internal prototype to avoid an error.  */
14208 /* We use char because int might match the return type of a gcc2
14209     builtin and then its argument prototype would still apply.  */
14210 char setproctitle();
14211 char (*f)();
14212
14213 int main() {
14214
14215 /* The GNU C library defines this for functions which it implements
14216     to always fail with ENOSYS.  Some functions are actually named
14217     something starting with __ and the normal name is an alias.  */
14218 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14219 choke me
14220 #else
14221 f = setproctitle;
14222 #endif
14223
14224 ; return 0; }
14225 EOF
14226 if { (eval echo configure:14227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14227   rm -rf conftest*
14228   eval "ac_cv_func_setproctitle=yes"
14229 else
14230   echo "configure: failed program was:" >&5
14231   cat conftest.$ac_ext >&5
14232   rm -rf conftest*
14233   eval "ac_cv_func_setproctitle=no"
14234 fi
14235 rm -f conftest*
14236 fi
14237
14238 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14239   echo "$ac_t""yes" 1>&6
14240   have_setproctitle=yes
14241 else
14242   echo "$ac_t""no" 1>&6
14243
14244                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14245 echo "configure:14246: checking for setproctitle in -lutil" >&5
14246 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14247 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14248   echo $ac_n "(cached) $ac_c" 1>&6
14249 else
14250   ac_save_LIBS="$LIBS"
14251 LIBS="-lutil  $LIBS"
14252 cat > conftest.$ac_ext <<EOF
14253 #line 14254 "configure"
14254 #include "confdefs.h"
14255 /* Override any gcc2 internal prototype to avoid an error.  */
14256 /* We use char because int might match the return type of a gcc2
14257     builtin and then its argument prototype would still apply.  */
14258 char setproctitle();
14259
14260 int main() {
14261 setproctitle()
14262 ; return 0; }
14263 EOF
14264 if { (eval echo configure:14265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14265   rm -rf conftest*
14266   eval "ac_cv_lib_$ac_lib_var=yes"
14267 else
14268   echo "configure: failed program was:" >&5
14269   cat conftest.$ac_ext >&5
14270   rm -rf conftest*
14271   eval "ac_cv_lib_$ac_lib_var=no"
14272 fi
14273 rm -f conftest*
14274 LIBS="$ac_save_LIBS"
14275
14276 fi
14277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14278   echo "$ac_t""yes" 1>&6
14279   have_setproctitle=yes
14280                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14281 else
14282   echo "$ac_t""no" 1>&6
14283 have_setproctitle=no
14284                         LIBOBJS="$LIBOBJS setproctitle.o"
14285                         LIBSRCS="$LIBSRCS setproctitle.c"
14286 fi
14287
14288 fi
14289
14290
14291         if test $have_setproctitle = yes ; then
14292                 cat >> confdefs.h <<\EOF
14293 #define HAVE_SETPROCTITLE 1
14294 EOF
14295
14296         fi
14297 fi
14298
14299 if test $ol_enable_slp != no ; then
14300         for ac_hdr in slp.h 
14301 do
14302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14304 echo "configure:14305: checking for $ac_hdr" >&5
14305 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14306   echo $ac_n "(cached) $ac_c" 1>&6
14307 else
14308   cat > conftest.$ac_ext <<EOF
14309 #line 14310 "configure"
14310 #include "confdefs.h"
14311 #include <$ac_hdr>
14312 EOF
14313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14314 { (eval echo configure:14315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14316 if test -z "$ac_err"; then
14317   rm -rf conftest*
14318   eval "ac_cv_header_$ac_safe=yes"
14319 else
14320   echo "$ac_err" >&5
14321   echo "configure: failed program was:" >&5
14322   cat conftest.$ac_ext >&5
14323   rm -rf conftest*
14324   eval "ac_cv_header_$ac_safe=no"
14325 fi
14326 rm -f conftest*
14327 fi
14328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14329   echo "$ac_t""yes" 1>&6
14330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14331   cat >> confdefs.h <<EOF
14332 #define $ac_tr_hdr 1
14333 EOF
14334  
14335 else
14336   echo "$ac_t""no" 1>&6
14337 fi
14338 done
14339
14340
14341         if test $ac_cv_header_slp_h = yes ; then
14342                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
14343 echo "configure:14344: checking for SLPOpen in -lslp" >&5
14344 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
14345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14346   echo $ac_n "(cached) $ac_c" 1>&6
14347 else
14348   ac_save_LIBS="$LIBS"
14349 LIBS="-lslp  $LIBS"
14350 cat > conftest.$ac_ext <<EOF
14351 #line 14352 "configure"
14352 #include "confdefs.h"
14353 /* Override any gcc2 internal prototype to avoid an error.  */
14354 /* We use char because int might match the return type of a gcc2
14355     builtin and then its argument prototype would still apply.  */
14356 char SLPOpen();
14357
14358 int main() {
14359 SLPOpen()
14360 ; return 0; }
14361 EOF
14362 if { (eval echo configure:14363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14363   rm -rf conftest*
14364   eval "ac_cv_lib_$ac_lib_var=yes"
14365 else
14366   echo "configure: failed program was:" >&5
14367   cat conftest.$ac_ext >&5
14368   rm -rf conftest*
14369   eval "ac_cv_lib_$ac_lib_var=no"
14370 fi
14371 rm -f conftest*
14372 LIBS="$ac_save_LIBS"
14373
14374 fi
14375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14376   echo "$ac_t""yes" 1>&6
14377   have_slp=yes
14378 else
14379   echo "$ac_t""no" 1>&6
14380 have_slp=no
14381 fi
14382
14383                 if test $have_slp = yes ; then
14384                         cat >> confdefs.h <<\EOF
14385 #define HAVE_SLP 1
14386 EOF
14387
14388                         SLAPD_SLP_LIBS=-lslp
14389                 fi
14390
14391         elif test $ol_enable_slp = yes ; then
14392                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
14393         fi
14394 fi
14395
14396 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14397 echo "configure:14398: checking for ANSI C header files" >&5
14398 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14399   echo $ac_n "(cached) $ac_c" 1>&6
14400 else
14401   cat > conftest.$ac_ext <<EOF
14402 #line 14403 "configure"
14403 #include "confdefs.h"
14404 #include <stdlib.h>
14405 #include <stdarg.h>
14406 #include <string.h>
14407 #include <float.h>
14408 EOF
14409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14410 { (eval echo configure:14411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14412 if test -z "$ac_err"; then
14413   rm -rf conftest*
14414   ac_cv_header_stdc=yes
14415 else
14416   echo "$ac_err" >&5
14417   echo "configure: failed program was:" >&5
14418   cat conftest.$ac_ext >&5
14419   rm -rf conftest*
14420   ac_cv_header_stdc=no
14421 fi
14422 rm -f conftest*
14423
14424 if test $ac_cv_header_stdc = yes; then
14425   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14426 cat > conftest.$ac_ext <<EOF
14427 #line 14428 "configure"
14428 #include "confdefs.h"
14429 #include <string.h>
14430 EOF
14431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14432   egrep "memchr" >/dev/null 2>&1; then
14433   :
14434 else
14435   rm -rf conftest*
14436   ac_cv_header_stdc=no
14437 fi
14438 rm -f conftest*
14439
14440 fi
14441
14442 if test $ac_cv_header_stdc = yes; then
14443   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14444 cat > conftest.$ac_ext <<EOF
14445 #line 14446 "configure"
14446 #include "confdefs.h"
14447 #include <stdlib.h>
14448 EOF
14449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14450   egrep "free" >/dev/null 2>&1; then
14451   :
14452 else
14453   rm -rf conftest*
14454   ac_cv_header_stdc=no
14455 fi
14456 rm -f conftest*
14457
14458 fi
14459
14460 if test $ac_cv_header_stdc = yes; then
14461   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14462 if test "$cross_compiling" = yes; then
14463   :
14464 else
14465   cat > conftest.$ac_ext <<EOF
14466 #line 14467 "configure"
14467 #include "confdefs.h"
14468 #include <ctype.h>
14469 #if ((' ' & 0x0FF) == 0x020)
14470 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14471 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14472 #else
14473 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14474  || ('j' <= (c) && (c) <= 'r') \
14475  || ('s' <= (c) && (c) <= 'z'))
14476 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14477 #endif
14478 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14479 int main () { int i; for (i = 0; i < 256; i++)
14480 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14481 exit (0); }
14482
14483 EOF
14484 if { (eval echo configure:14485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14485 then
14486   :
14487 else
14488   echo "configure: failed program was:" >&5
14489   cat conftest.$ac_ext >&5
14490   rm -fr conftest*
14491   ac_cv_header_stdc=no
14492 fi
14493 rm -fr conftest*
14494 fi
14495
14496 fi
14497 fi
14498
14499 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14500 if test $ac_cv_header_stdc = yes; then
14501   cat >> confdefs.h <<\EOF
14502 #define STDC_HEADERS 1
14503 EOF
14504
14505 fi
14506
14507 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14508 echo "configure:14509: checking for mode_t" >&5
14509 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14510   echo $ac_n "(cached) $ac_c" 1>&6
14511 else
14512   cat > conftest.$ac_ext <<EOF
14513 #line 14514 "configure"
14514 #include "confdefs.h"
14515 #include <sys/types.h>
14516 #if STDC_HEADERS
14517 #include <stdlib.h>
14518 #include <stddef.h>
14519 #endif
14520
14521 EOF
14522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14523   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14524   rm -rf conftest*
14525   eval "ac_cv_type_mode_t=yes"
14526 else
14527   rm -rf conftest*
14528   eval "ac_cv_type_mode_t=no"
14529 fi
14530 rm -f conftest*
14531
14532 fi
14533 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14534   echo "$ac_t""yes" 1>&6
14535 else
14536   echo "$ac_t""no" 1>&6
14537   cat >> confdefs.h <<EOF
14538 #define mode_t int
14539 EOF
14540
14541 fi
14542
14543 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14544 echo "configure:14545: checking for off_t" >&5
14545 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14546   echo $ac_n "(cached) $ac_c" 1>&6
14547 else
14548   cat > conftest.$ac_ext <<EOF
14549 #line 14550 "configure"
14550 #include "confdefs.h"
14551 #include <sys/types.h>
14552 #if STDC_HEADERS
14553 #include <stdlib.h>
14554 #include <stddef.h>
14555 #endif
14556
14557 EOF
14558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14559   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14560   rm -rf conftest*
14561   eval "ac_cv_type_off_t=yes"
14562 else
14563   rm -rf conftest*
14564   eval "ac_cv_type_off_t=no"
14565 fi
14566 rm -f conftest*
14567
14568 fi
14569 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14570   echo "$ac_t""yes" 1>&6
14571 else
14572   echo "$ac_t""no" 1>&6
14573   cat >> confdefs.h <<EOF
14574 #define off_t long
14575 EOF
14576
14577 fi
14578
14579 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14580 echo "configure:14581: checking for pid_t" >&5
14581 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14582   echo $ac_n "(cached) $ac_c" 1>&6
14583 else
14584   cat > conftest.$ac_ext <<EOF
14585 #line 14586 "configure"
14586 #include "confdefs.h"
14587 #include <sys/types.h>
14588 #if STDC_HEADERS
14589 #include <stdlib.h>
14590 #include <stddef.h>
14591 #endif
14592
14593 EOF
14594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14595   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14596   rm -rf conftest*
14597   eval "ac_cv_type_pid_t=yes"
14598 else
14599   rm -rf conftest*
14600   eval "ac_cv_type_pid_t=no"
14601 fi
14602 rm -f conftest*
14603
14604 fi
14605 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14606   echo "$ac_t""yes" 1>&6
14607 else
14608   echo "$ac_t""no" 1>&6
14609   cat >> confdefs.h <<EOF
14610 #define pid_t int
14611 EOF
14612
14613 fi
14614
14615 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14616 echo "configure:14617: checking for ptrdiff_t" >&5
14617 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14618   echo $ac_n "(cached) $ac_c" 1>&6
14619 else
14620   cat > conftest.$ac_ext <<EOF
14621 #line 14622 "configure"
14622 #include "confdefs.h"
14623 #include <stddef.h>
14624 int main() {
14625 ptrdiff_t p
14626 ; return 0; }
14627 EOF
14628 if { (eval echo configure:14629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14629   rm -rf conftest*
14630   am_cv_type_ptrdiff_t=yes
14631 else
14632   echo "configure: failed program was:" >&5
14633   cat conftest.$ac_ext >&5
14634   rm -rf conftest*
14635   am_cv_type_ptrdiff_t=no
14636 fi
14637 rm -f conftest*
14638 fi
14639
14640 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14641    if test $am_cv_type_ptrdiff_t = yes; then
14642      cat >> confdefs.h <<\EOF
14643 #define HAVE_PTRDIFF_T 1
14644 EOF
14645
14646    fi
14647
14648 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14649 echo "configure:14650: checking return type of signal handlers" >&5
14650 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14651   echo $ac_n "(cached) $ac_c" 1>&6
14652 else
14653   cat > conftest.$ac_ext <<EOF
14654 #line 14655 "configure"
14655 #include "confdefs.h"
14656 #include <sys/types.h>
14657 #include <signal.h>
14658 #ifdef signal
14659 #undef signal
14660 #endif
14661 #ifdef __cplusplus
14662 extern "C" void (*signal (int, void (*)(int)))(int);
14663 #else
14664 void (*signal ()) ();
14665 #endif
14666
14667 int main() {
14668 int i;
14669 ; return 0; }
14670 EOF
14671 if { (eval echo configure:14672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14672   rm -rf conftest*
14673   ac_cv_type_signal=void
14674 else
14675   echo "configure: failed program was:" >&5
14676   cat conftest.$ac_ext >&5
14677   rm -rf conftest*
14678   ac_cv_type_signal=int
14679 fi
14680 rm -f conftest*
14681 fi
14682
14683 echo "$ac_t""$ac_cv_type_signal" 1>&6
14684 cat >> confdefs.h <<EOF
14685 #define RETSIGTYPE $ac_cv_type_signal
14686 EOF
14687
14688
14689 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14690 echo "configure:14691: checking for size_t" >&5
14691 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14692   echo $ac_n "(cached) $ac_c" 1>&6
14693 else
14694   cat > conftest.$ac_ext <<EOF
14695 #line 14696 "configure"
14696 #include "confdefs.h"
14697 #include <sys/types.h>
14698 #if STDC_HEADERS
14699 #include <stdlib.h>
14700 #include <stddef.h>
14701 #endif
14702
14703 EOF
14704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14705   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14706   rm -rf conftest*
14707   eval "ac_cv_type_size_t=yes"
14708 else
14709   rm -rf conftest*
14710   eval "ac_cv_type_size_t=no"
14711 fi
14712 rm -f conftest*
14713
14714 fi
14715 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14716   echo "$ac_t""yes" 1>&6
14717 else
14718   echo "$ac_t""no" 1>&6
14719   cat >> confdefs.h <<EOF
14720 #define size_t unsigned
14721 EOF
14722
14723 fi
14724
14725
14726 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14727 echo "configure:14728: checking for ssize_t" >&5
14728 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14729   echo $ac_n "(cached) $ac_c" 1>&6
14730 else
14731   cat > conftest.$ac_ext <<EOF
14732 #line 14733 "configure"
14733 #include "confdefs.h"
14734 #include <sys/types.h>
14735 #if STDC_HEADERS
14736 #include <stdlib.h>
14737 #include <stddef.h>
14738 #endif
14739
14740 EOF
14741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14742   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14743   rm -rf conftest*
14744   eval "ac_cv_type_ssize_t=yes"
14745 else
14746   rm -rf conftest*
14747   eval "ac_cv_type_ssize_t=no"
14748 fi
14749 rm -f conftest*
14750
14751 fi
14752 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14753   echo "$ac_t""yes" 1>&6
14754 else
14755   echo "$ac_t""no" 1>&6
14756   cat >> confdefs.h <<EOF
14757 #define ssize_t signed int
14758 EOF
14759
14760 fi
14761
14762 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14763 echo "configure:14764: checking for caddr_t" >&5
14764 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14765   echo $ac_n "(cached) $ac_c" 1>&6
14766 else
14767   cat > conftest.$ac_ext <<EOF
14768 #line 14769 "configure"
14769 #include "confdefs.h"
14770 #include <sys/types.h>
14771 #if STDC_HEADERS
14772 #include <stdlib.h>
14773 #include <stddef.h>
14774 #endif
14775
14776 EOF
14777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14778   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14779   rm -rf conftest*
14780   eval "ac_cv_type_caddr_t=yes"
14781 else
14782   rm -rf conftest*
14783   eval "ac_cv_type_caddr_t=no"
14784 fi
14785 rm -f conftest*
14786
14787 fi
14788 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14789   echo "$ac_t""yes" 1>&6
14790 else
14791   echo "$ac_t""no" 1>&6
14792   cat >> confdefs.h <<EOF
14793 #define caddr_t char *
14794 EOF
14795
14796 fi
14797
14798
14799 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14800 echo "configure:14801: checking for socklen_t" >&5
14801 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14802   echo $ac_n "(cached) $ac_c" 1>&6
14803 else
14804   cat > conftest.$ac_ext <<EOF
14805 #line 14806 "configure"
14806 #include "confdefs.h"
14807
14808 #ifdef HAVE_SYS_TYPES_H
14809 #include <sys/types.h>
14810 #endif
14811 #ifdef HAVE_SYS_SOCKET_H
14812 #include <sys/socket.h>
14813 #endif
14814
14815 int main() {
14816 socklen_t len;
14817 ; return 0; }
14818 EOF
14819 if { (eval echo configure:14820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14820   rm -rf conftest*
14821   ol_cv_type_socklen_t=yes
14822 else
14823   echo "configure: failed program was:" >&5
14824   cat conftest.$ac_ext >&5
14825   rm -rf conftest*
14826   ol_cv_type_socklen_t=no
14827 fi
14828 rm -f conftest*
14829 fi
14830
14831 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14832   if test $ol_cv_type_socklen_t = no; then
14833     cat >> confdefs.h <<\EOF
14834 #define socklen_t int
14835 EOF
14836
14837   fi
14838  
14839 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14840 echo "configure:14841: checking for member st_blksize in aggregate type struct stat" >&5
14841 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14842   echo $ac_n "(cached) $ac_c" 1>&6
14843 else
14844   cat > conftest.$ac_ext <<EOF
14845 #line 14846 "configure"
14846 #include "confdefs.h"
14847 #include <sys/types.h>
14848 #include <sys/stat.h>
14849 int main() {
14850 struct stat foo; foo.st_blksize;
14851 ; return 0; }
14852 EOF
14853 if { (eval echo configure:14854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14854   rm -rf conftest*
14855   ac_cv_c_struct_member_st_blksize=yes
14856 else
14857   echo "configure: failed program was:" >&5
14858   cat conftest.$ac_ext >&5
14859   rm -rf conftest*
14860   ac_cv_c_struct_member_st_blksize=no
14861 fi
14862 rm -f conftest*
14863 fi
14864
14865 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14866 st_blksize="$ac_cv_c_struct_member_st_blksize"
14867 if test $ac_cv_c_struct_member_st_blksize = yes; then
14868   cat >> confdefs.h <<\EOF
14869 #define HAVE_ST_BLKSIZE 1
14870 EOF
14871
14872 fi
14873
14874 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14875 echo "configure:14876: checking whether time.h and sys/time.h may both be included" >&5
14876 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14877   echo $ac_n "(cached) $ac_c" 1>&6
14878 else
14879   cat > conftest.$ac_ext <<EOF
14880 #line 14881 "configure"
14881 #include "confdefs.h"
14882 #include <sys/types.h>
14883 #include <sys/time.h>
14884 #include <time.h>
14885 int main() {
14886 struct tm *tp;
14887 ; return 0; }
14888 EOF
14889 if { (eval echo configure:14890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14890   rm -rf conftest*
14891   ac_cv_header_time=yes
14892 else
14893   echo "configure: failed program was:" >&5
14894   cat conftest.$ac_ext >&5
14895   rm -rf conftest*
14896   ac_cv_header_time=no
14897 fi
14898 rm -f conftest*
14899 fi
14900
14901 echo "$ac_t""$ac_cv_header_time" 1>&6
14902 if test $ac_cv_header_time = yes; then
14903   cat >> confdefs.h <<\EOF
14904 #define TIME_WITH_SYS_TIME 1
14905 EOF
14906
14907 fi
14908
14909 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14910 echo "configure:14911: checking whether struct tm is in sys/time.h or time.h" >&5
14911 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14912   echo $ac_n "(cached) $ac_c" 1>&6
14913 else
14914   cat > conftest.$ac_ext <<EOF
14915 #line 14916 "configure"
14916 #include "confdefs.h"
14917 #include <sys/types.h>
14918 #include <time.h>
14919 int main() {
14920 struct tm *tp; tp->tm_sec;
14921 ; return 0; }
14922 EOF
14923 if { (eval echo configure:14924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14924   rm -rf conftest*
14925   ac_cv_struct_tm=time.h
14926 else
14927   echo "configure: failed program was:" >&5
14928   cat conftest.$ac_ext >&5
14929   rm -rf conftest*
14930   ac_cv_struct_tm=sys/time.h
14931 fi
14932 rm -f conftest*
14933 fi
14934
14935 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14936 if test $ac_cv_struct_tm = sys/time.h; then
14937   cat >> confdefs.h <<\EOF
14938 #define TM_IN_SYS_TIME 1
14939 EOF
14940
14941 fi
14942
14943 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14944 echo "configure:14945: checking for uid_t in sys/types.h" >&5
14945 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14946   echo $ac_n "(cached) $ac_c" 1>&6
14947 else
14948   cat > conftest.$ac_ext <<EOF
14949 #line 14950 "configure"
14950 #include "confdefs.h"
14951 #include <sys/types.h>
14952 EOF
14953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14954   egrep "uid_t" >/dev/null 2>&1; then
14955   rm -rf conftest*
14956   ac_cv_type_uid_t=yes
14957 else
14958   rm -rf conftest*
14959   ac_cv_type_uid_t=no
14960 fi
14961 rm -f conftest*
14962
14963 fi
14964
14965 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14966 if test $ac_cv_type_uid_t = no; then
14967   cat >> confdefs.h <<\EOF
14968 #define uid_t int
14969 EOF
14970
14971   cat >> confdefs.h <<\EOF
14972 #define gid_t int
14973 EOF
14974
14975 fi
14976
14977 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14978 echo "configure:14979: checking for sig_atomic_t" >&5
14979 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14980   echo $ac_n "(cached) $ac_c" 1>&6
14981 else
14982   cat > conftest.$ac_ext <<EOF
14983 #line 14984 "configure"
14984 #include "confdefs.h"
14985 #include <signal.h>
14986 int main() {
14987 sig_atomic_t atomic;
14988 ; return 0; }
14989 EOF
14990 if { (eval echo configure:14991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14991   rm -rf conftest*
14992   ol_cv_type_sig_atomic_t=yes
14993 else
14994   echo "configure: failed program was:" >&5
14995   cat conftest.$ac_ext >&5
14996   rm -rf conftest*
14997   ol_cv_type_sig_atomic_t=no
14998 fi
14999 rm -f conftest*
15000 fi
15001
15002 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
15003   if test $ol_cv_type_sig_atomic_t = no; then
15004     cat >> confdefs.h <<\EOF
15005 #define sig_atomic_t int
15006 EOF
15007
15008   fi
15009  
15010
15011
15012 # test for pw_gecos in struct passwd
15013 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
15014 echo "configure:15015: checking struct passwd for pw_gecos" >&5
15015 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
15016   echo $ac_n "(cached) $ac_c" 1>&6
15017 else
15018   
15019         cat > conftest.$ac_ext <<EOF
15020 #line 15021 "configure"
15021 #include "confdefs.h"
15022 #include <pwd.h>
15023 int main() {
15024
15025         struct passwd pwd;
15026         pwd.pw_gecos = pwd.pw_name;
15027
15028 ; return 0; }
15029 EOF
15030 if { (eval echo configure:15031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15031   rm -rf conftest*
15032   ol_cv_struct_passwd_pw_gecos=yes
15033 else
15034   echo "configure: failed program was:" >&5
15035   cat conftest.$ac_ext >&5
15036   rm -rf conftest*
15037   ol_cv_struct_passwd_pw_gecos=no
15038 fi
15039 rm -f conftest*
15040 fi
15041
15042 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
15043 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
15044         cat >> confdefs.h <<\EOF
15045 #define HAVE_PW_GECOS 1
15046 EOF
15047
15048 fi
15049
15050 # test for pw_passwd in struct passwd
15051 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
15052 echo "configure:15053: checking struct passwd for pw_passwd" >&5
15053 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
15054   echo $ac_n "(cached) $ac_c" 1>&6
15055 else
15056   
15057         cat > conftest.$ac_ext <<EOF
15058 #line 15059 "configure"
15059 #include "confdefs.h"
15060 #include <pwd.h>
15061 int main() {
15062
15063         struct passwd pwd;
15064         pwd.pw_passwd = pwd.pw_name;
15065
15066 ; return 0; }
15067 EOF
15068 if { (eval echo configure:15069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15069   rm -rf conftest*
15070   ol_cv_struct_passwd_pw_passwd=yes
15071 else
15072   echo "configure: failed program was:" >&5
15073   cat conftest.$ac_ext >&5
15074   rm -rf conftest*
15075   ol_cv_struct_passwd_pw_passwd=no
15076 fi
15077 rm -f conftest*
15078 fi
15079
15080 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
15081 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
15082         cat >> confdefs.h <<\EOF
15083 #define HAVE_PW_PASSWD 1
15084 EOF
15085
15086 fi
15087
15088
15089 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
15090 echo "configure:15091: checking if toupper() requires islower()" >&5
15091 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
15092   echo $ac_n "(cached) $ac_c" 1>&6
15093 else
15094   
15095         if test "$cross_compiling" = yes; then
15096   ol_cv_c_upper_lower=safe
15097 else
15098   cat > conftest.$ac_ext <<EOF
15099 #line 15100 "configure"
15100 #include "confdefs.h"
15101
15102 #include <ctype.h>
15103 main()
15104 {
15105         if ('C' == toupper('C'))
15106                 exit(0);
15107         else
15108                 exit(1);
15109 }
15110 EOF
15111 if { (eval echo configure:15112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15112 then
15113   ol_cv_c_upper_lower=no
15114 else
15115   echo "configure: failed program was:" >&5
15116   cat conftest.$ac_ext >&5
15117   rm -fr conftest*
15118   ol_cv_c_upper_lower=yes
15119 fi
15120 rm -fr conftest*
15121 fi
15122
15123 fi
15124
15125 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
15126 if test $ol_cv_c_upper_lower != no ; then
15127         cat >> confdefs.h <<\EOF
15128 #define C_UPPER_LOWER 1
15129 EOF
15130
15131 fi
15132
15133 echo $ac_n "checking for working const""... $ac_c" 1>&6
15134 echo "configure:15135: checking for working const" >&5
15135 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
15136   echo $ac_n "(cached) $ac_c" 1>&6
15137 else
15138   cat > conftest.$ac_ext <<EOF
15139 #line 15140 "configure"
15140 #include "confdefs.h"
15141
15142 int main() {
15143
15144 /* Ultrix mips cc rejects this.  */
15145 typedef int charset[2]; const charset x;
15146 /* SunOS 4.1.1 cc rejects this.  */
15147 char const *const *ccp;
15148 char **p;
15149 /* NEC SVR4.0.2 mips cc rejects this.  */
15150 struct point {int x, y;};
15151 static struct point const zero = {0,0};
15152 /* AIX XL C 1.02.0.0 rejects this.
15153    It does not let you subtract one const X* pointer from another in an arm
15154    of an if-expression whose if-part is not a constant expression */
15155 const char *g = "string";
15156 ccp = &g + (g ? g-g : 0);
15157 /* HPUX 7.0 cc rejects these. */
15158 ++ccp;
15159 p = (char**) ccp;
15160 ccp = (char const *const *) p;
15161 { /* SCO 3.2v4 cc rejects this.  */
15162   char *t;
15163   char const *s = 0 ? (char *) 0 : (char const *) 0;
15164
15165   *t++ = 0;
15166 }
15167 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15168   int x[] = {25, 17};
15169   const int *foo = &x[0];
15170   ++foo;
15171 }
15172 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15173   typedef const int *iptr;
15174   iptr p = 0;
15175   ++p;
15176 }
15177 { /* AIX XL C 1.02.0.0 rejects this saying
15178      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15179   struct s { int j; const int *ap[3]; };
15180   struct s *b; b->j = 5;
15181 }
15182 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15183   const int foo = 10;
15184 }
15185
15186 ; return 0; }
15187 EOF
15188 if { (eval echo configure:15189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15189   rm -rf conftest*
15190   ac_cv_c_const=yes
15191 else
15192   echo "configure: failed program was:" >&5
15193   cat conftest.$ac_ext >&5
15194   rm -rf conftest*
15195   ac_cv_c_const=no
15196 fi
15197 rm -f conftest*
15198 fi
15199
15200 echo "$ac_t""$ac_cv_c_const" 1>&6
15201 if test $ac_cv_c_const = no; then
15202   cat >> confdefs.h <<\EOF
15203 #define const 
15204 EOF
15205
15206 fi
15207
15208 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
15209 echo "configure:15210: checking if compiler understands volatile" >&5
15210 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
15211   echo $ac_n "(cached) $ac_c" 1>&6
15212 else
15213   cat > conftest.$ac_ext <<EOF
15214 #line 15215 "configure"
15215 #include "confdefs.h"
15216 int x, y, z;
15217 int main() {
15218 volatile int a; int * volatile b = x ? &y : &z;
15219       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
15220       *b = 0;
15221 ; return 0; }
15222 EOF
15223 if { (eval echo configure:15224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15224   rm -rf conftest*
15225   ol_cv_c_volatile=yes
15226 else
15227   echo "configure: failed program was:" >&5
15228   cat conftest.$ac_ext >&5
15229   rm -rf conftest*
15230   ol_cv_c_volatile=no
15231 fi
15232 rm -f conftest*
15233 fi
15234
15235 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15236   if test $ol_cv_c_volatile = yes; then
15237     : 
15238   else
15239     cat >> confdefs.h <<\EOF
15240 #define volatile 
15241 EOF
15242
15243   fi
15244  
15245
15246 if test $cross_compiling = yes ; then
15247         cat >> confdefs.h <<\EOF
15248 #define CROSS_COMPILING 1
15249 EOF
15250
15251 else
15252         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15253 echo "configure:15254: checking whether byte ordering is bigendian" >&5
15254 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15255   echo $ac_n "(cached) $ac_c" 1>&6
15256 else
15257   ac_cv_c_bigendian=unknown
15258 # See if sys/param.h defines the BYTE_ORDER macro.
15259 cat > conftest.$ac_ext <<EOF
15260 #line 15261 "configure"
15261 #include "confdefs.h"
15262 #include <sys/types.h>
15263 #include <sys/param.h>
15264 int main() {
15265
15266 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15267  bogus endian macros
15268 #endif
15269 ; return 0; }
15270 EOF
15271 if { (eval echo configure:15272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15272   rm -rf conftest*
15273   # It does; now see whether it defined to BIG_ENDIAN or not.
15274 cat > conftest.$ac_ext <<EOF
15275 #line 15276 "configure"
15276 #include "confdefs.h"
15277 #include <sys/types.h>
15278 #include <sys/param.h>
15279 int main() {
15280
15281 #if BYTE_ORDER != BIG_ENDIAN
15282  not big endian
15283 #endif
15284 ; return 0; }
15285 EOF
15286 if { (eval echo configure:15287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15287   rm -rf conftest*
15288   ac_cv_c_bigendian=yes
15289 else
15290   echo "configure: failed program was:" >&5
15291   cat conftest.$ac_ext >&5
15292   rm -rf conftest*
15293   ac_cv_c_bigendian=no
15294 fi
15295 rm -f conftest*
15296 else
15297   echo "configure: failed program was:" >&5
15298   cat conftest.$ac_ext >&5
15299 fi
15300 rm -f conftest*
15301 if test $ac_cv_c_bigendian = unknown; then
15302 if test "$cross_compiling" = yes; then
15303     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15304 else
15305   cat > conftest.$ac_ext <<EOF
15306 #line 15307 "configure"
15307 #include "confdefs.h"
15308 main () {
15309   /* Are we little or big endian?  From Harbison&Steele.  */
15310   union
15311   {
15312     long l;
15313     char c[sizeof (long)];
15314   } u;
15315   u.l = 1;
15316   exit (u.c[sizeof (long) - 1] == 1);
15317 }
15318 EOF
15319 if { (eval echo configure:15320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15320 then
15321   ac_cv_c_bigendian=no
15322 else
15323   echo "configure: failed program was:" >&5
15324   cat conftest.$ac_ext >&5
15325   rm -fr conftest*
15326   ac_cv_c_bigendian=yes
15327 fi
15328 rm -fr conftest*
15329 fi
15330
15331 fi
15332 fi
15333
15334 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15335 if test $ac_cv_c_bigendian = yes; then
15336   cat >> confdefs.h <<\EOF
15337 #define WORDS_BIGENDIAN 1
15338 EOF
15339
15340 fi
15341
15342 fi
15343
15344 echo $ac_n "checking size of short""... $ac_c" 1>&6
15345 echo "configure:15346: checking size of short" >&5 
15346 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15347   echo $ac_n "(cached) $ac_c" 1>&6
15348 else
15349   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15350   cat > conftest.$ac_ext <<EOF
15351 #line 15352 "configure"
15352 #include "confdefs.h"
15353 #include "confdefs.h" 
15354 #include <sys/types.h> 
15355  
15356
15357 int main() {
15358 switch (0) case 0: case (sizeof (short) == $ac_size):;
15359 ; return 0; }
15360 EOF
15361 if { (eval echo configure:15362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15362   rm -rf conftest*
15363   ac_cv_sizeof_short=$ac_size
15364 else
15365   echo "configure: failed program was:" >&5
15366   cat conftest.$ac_ext >&5
15367 fi
15368 rm -f conftest* 
15369   if test x$ac_cv_sizeof_short != x ; then break; fi 
15370 done 
15371
15372 fi
15373  
15374 if test x$ac_cv_sizeof_short = x ; then 
15375   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15376 fi 
15377 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15378 cat >> confdefs.h <<EOF
15379 #define SIZEOF_SHORT $ac_cv_sizeof_short
15380 EOF
15381  
15382  
15383 echo $ac_n "checking size of int""... $ac_c" 1>&6
15384 echo "configure:15385: checking size of int" >&5 
15385 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15386   echo $ac_n "(cached) $ac_c" 1>&6
15387 else
15388   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15389   cat > conftest.$ac_ext <<EOF
15390 #line 15391 "configure"
15391 #include "confdefs.h"
15392 #include "confdefs.h" 
15393 #include <sys/types.h> 
15394  
15395
15396 int main() {
15397 switch (0) case 0: case (sizeof (int) == $ac_size):;
15398 ; return 0; }
15399 EOF
15400 if { (eval echo configure:15401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15401   rm -rf conftest*
15402   ac_cv_sizeof_int=$ac_size
15403 else
15404   echo "configure: failed program was:" >&5
15405   cat conftest.$ac_ext >&5
15406 fi
15407 rm -f conftest* 
15408   if test x$ac_cv_sizeof_int != x ; then break; fi 
15409 done 
15410
15411 fi
15412  
15413 if test x$ac_cv_sizeof_int = x ; then 
15414   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15415 fi 
15416 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15417 cat >> confdefs.h <<EOF
15418 #define SIZEOF_INT $ac_cv_sizeof_int
15419 EOF
15420  
15421  
15422 echo $ac_n "checking size of long""... $ac_c" 1>&6
15423 echo "configure:15424: checking size of long" >&5 
15424 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15425   echo $ac_n "(cached) $ac_c" 1>&6
15426 else
15427   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15428   cat > conftest.$ac_ext <<EOF
15429 #line 15430 "configure"
15430 #include "confdefs.h"
15431 #include "confdefs.h" 
15432 #include <sys/types.h> 
15433  
15434
15435 int main() {
15436 switch (0) case 0: case (sizeof (long) == $ac_size):;
15437 ; return 0; }
15438 EOF
15439 if { (eval echo configure:15440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15440   rm -rf conftest*
15441   ac_cv_sizeof_long=$ac_size
15442 else
15443   echo "configure: failed program was:" >&5
15444   cat conftest.$ac_ext >&5
15445 fi
15446 rm -f conftest* 
15447   if test x$ac_cv_sizeof_long != x ; then break; fi 
15448 done 
15449
15450 fi
15451  
15452 if test x$ac_cv_sizeof_long = x ; then 
15453   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15454 fi 
15455 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15456 cat >> confdefs.h <<EOF
15457 #define SIZEOF_LONG $ac_cv_sizeof_long
15458 EOF
15459  
15460
15461
15462 if test "$ac_cv_sizeof_int" -lt 4 ; then
15463         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15464
15465         cat >> confdefs.h <<\EOF
15466 #define LBER_INT_T long
15467 EOF
15468
15469 else
15470         cat >> confdefs.h <<\EOF
15471 #define LBER_INT_T int
15472 EOF
15473
15474 fi
15475
15476 cat >> confdefs.h <<\EOF
15477 #define LBER_LEN_T long
15478 EOF
15479
15480 cat >> confdefs.h <<\EOF
15481 #define LBER_SOCKET_T int
15482 EOF
15483
15484 cat >> confdefs.h <<\EOF
15485 #define LBER_TAG_T long
15486 EOF
15487
15488
15489 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15490 echo "configure:15491: checking for 8-bit clean memcmp" >&5
15491 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15492   echo $ac_n "(cached) $ac_c" 1>&6
15493 else
15494   if test "$cross_compiling" = yes; then
15495   ac_cv_func_memcmp_clean=no
15496 else
15497   cat > conftest.$ac_ext <<EOF
15498 #line 15499 "configure"
15499 #include "confdefs.h"
15500
15501 main()
15502 {
15503   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15504   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15505 }
15506
15507 EOF
15508 if { (eval echo configure:15509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15509 then
15510   ac_cv_func_memcmp_clean=yes
15511 else
15512   echo "configure: failed program was:" >&5
15513   cat conftest.$ac_ext >&5
15514   rm -fr conftest*
15515   ac_cv_func_memcmp_clean=no
15516 fi
15517 rm -fr conftest*
15518 fi
15519
15520 fi
15521
15522 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15523 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15524
15525 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15526 echo "configure:15527: checking for strftime" >&5
15527 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15528   echo $ac_n "(cached) $ac_c" 1>&6
15529 else
15530   cat > conftest.$ac_ext <<EOF
15531 #line 15532 "configure"
15532 #include "confdefs.h"
15533 /* System header to define __stub macros and hopefully few prototypes,
15534     which can conflict with char strftime(); below.  */
15535 #include <assert.h>
15536 /* Override any gcc2 internal prototype to avoid an error.  */
15537 /* We use char because int might match the return type of a gcc2
15538     builtin and then its argument prototype would still apply.  */
15539 char strftime();
15540 char (*f)();
15541
15542 int main() {
15543
15544 /* The GNU C library defines this for functions which it implements
15545     to always fail with ENOSYS.  Some functions are actually named
15546     something starting with __ and the normal name is an alias.  */
15547 #if defined (__stub_strftime) || defined (__stub___strftime)
15548 choke me
15549 #else
15550 f = strftime;
15551 #endif
15552
15553 ; return 0; }
15554 EOF
15555 if { (eval echo configure:15556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15556   rm -rf conftest*
15557   eval "ac_cv_func_strftime=yes"
15558 else
15559   echo "configure: failed program was:" >&5
15560   cat conftest.$ac_ext >&5
15561   rm -rf conftest*
15562   eval "ac_cv_func_strftime=no"
15563 fi
15564 rm -f conftest*
15565 fi
15566
15567 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15568   echo "$ac_t""yes" 1>&6
15569   cat >> confdefs.h <<\EOF
15570 #define HAVE_STRFTIME 1
15571 EOF
15572
15573 else
15574   echo "$ac_t""no" 1>&6
15575 # strftime is in -lintl on SCO UNIX.
15576 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15577 echo "configure:15578: checking for strftime in -lintl" >&5
15578 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15580   echo $ac_n "(cached) $ac_c" 1>&6
15581 else
15582   ac_save_LIBS="$LIBS"
15583 LIBS="-lintl  $LIBS"
15584 cat > conftest.$ac_ext <<EOF
15585 #line 15586 "configure"
15586 #include "confdefs.h"
15587 /* Override any gcc2 internal prototype to avoid an error.  */
15588 /* We use char because int might match the return type of a gcc2
15589     builtin and then its argument prototype would still apply.  */
15590 char strftime();
15591
15592 int main() {
15593 strftime()
15594 ; return 0; }
15595 EOF
15596 if { (eval echo configure:15597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15597   rm -rf conftest*
15598   eval "ac_cv_lib_$ac_lib_var=yes"
15599 else
15600   echo "configure: failed program was:" >&5
15601   cat conftest.$ac_ext >&5
15602   rm -rf conftest*
15603   eval "ac_cv_lib_$ac_lib_var=no"
15604 fi
15605 rm -f conftest*
15606 LIBS="$ac_save_LIBS"
15607
15608 fi
15609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15610   echo "$ac_t""yes" 1>&6
15611   cat >> confdefs.h <<\EOF
15612 #define HAVE_STRFTIME 1
15613 EOF
15614
15615 LIBS="-lintl $LIBS"
15616 else
15617   echo "$ac_t""no" 1>&6
15618 fi
15619
15620 fi
15621
15622
15623 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15624 echo "configure:15625: checking for inet_aton()" >&5
15625 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15626   echo $ac_n "(cached) $ac_c" 1>&6
15627 else
15628   cat > conftest.$ac_ext <<EOF
15629 #line 15630 "configure"
15630 #include "confdefs.h"
15631
15632 #ifdef HAVE_SYS_TYPES_H
15633 #       include <sys/types.h>
15634 #endif
15635 #ifdef HAVE_SYS_SOCKET_H
15636 #       include <sys/socket.h>
15637 #       ifdef HAVE_SYS_SELECT_H
15638 #               include <sys/select.h>
15639 #       endif
15640 #       include <netinet/in.h>
15641 #       ifdef HAVE_ARPA_INET_H
15642 #               include <arpa/inet.h>
15643 #       endif
15644 #endif
15645
15646 int main() {
15647 struct in_addr in;
15648 int rc = inet_aton( "255.255.255.255", &in );
15649 ; return 0; }
15650 EOF
15651 if { (eval echo configure:15652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15652   rm -rf conftest*
15653   ol_cv_func_inet_aton=yes
15654 else
15655   echo "configure: failed program was:" >&5
15656   cat conftest.$ac_ext >&5
15657   rm -rf conftest*
15658   ol_cv_func_inet_aton=no
15659 fi
15660 rm -f conftest*
15661 fi
15662
15663 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15664   if test $ol_cv_func_inet_aton != no; then
15665     cat >> confdefs.h <<\EOF
15666 #define HAVE_INET_ATON 1
15667 EOF
15668
15669   fi
15670  
15671
15672 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15673 echo "configure:15674: checking for _spawnlp" >&5
15674 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15675   echo $ac_n "(cached) $ac_c" 1>&6
15676 else
15677   cat > conftest.$ac_ext <<EOF
15678 #line 15679 "configure"
15679 #include "confdefs.h"
15680 /* System header to define __stub macros and hopefully few prototypes,
15681     which can conflict with char _spawnlp(); below.  */
15682 #include <assert.h>
15683 /* Override any gcc2 internal prototype to avoid an error.  */
15684 /* We use char because int might match the return type of a gcc2
15685     builtin and then its argument prototype would still apply.  */
15686 char _spawnlp();
15687 char (*f)();
15688
15689 int main() {
15690
15691 /* The GNU C library defines this for functions which it implements
15692     to always fail with ENOSYS.  Some functions are actually named
15693     something starting with __ and the normal name is an alias.  */
15694 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15695 choke me
15696 #else
15697 f = _spawnlp;
15698 #endif
15699
15700 ; return 0; }
15701 EOF
15702 if { (eval echo configure:15703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15703   rm -rf conftest*
15704   eval "ac_cv_func__spawnlp=yes"
15705 else
15706   echo "configure: failed program was:" >&5
15707   cat conftest.$ac_ext >&5
15708   rm -rf conftest*
15709   eval "ac_cv_func__spawnlp=no"
15710 fi
15711 rm -f conftest*
15712 fi
15713
15714 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15715   echo "$ac_t""yes" 1>&6
15716   cat >> confdefs.h <<\EOF
15717 #define HAVE_SPAWNLP 1
15718 EOF
15719
15720 else
15721   echo "$ac_t""no" 1>&6
15722 fi
15723
15724
15725 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15726 echo "configure:15727: checking for _snprintf" >&5
15727 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15728   echo $ac_n "(cached) $ac_c" 1>&6
15729 else
15730   cat > conftest.$ac_ext <<EOF
15731 #line 15732 "configure"
15732 #include "confdefs.h"
15733 /* System header to define __stub macros and hopefully few prototypes,
15734     which can conflict with char _snprintf(); below.  */
15735 #include <assert.h>
15736 /* Override any gcc2 internal prototype to avoid an error.  */
15737 /* We use char because int might match the return type of a gcc2
15738     builtin and then its argument prototype would still apply.  */
15739 char _snprintf();
15740 char (*f)();
15741
15742 int main() {
15743
15744 /* The GNU C library defines this for functions which it implements
15745     to always fail with ENOSYS.  Some functions are actually named
15746     something starting with __ and the normal name is an alias.  */
15747 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15748 choke me
15749 #else
15750 f = _snprintf;
15751 #endif
15752
15753 ; return 0; }
15754 EOF
15755 if { (eval echo configure:15756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15756   rm -rf conftest*
15757   eval "ac_cv_func__snprintf=yes"
15758 else
15759   echo "configure: failed program was:" >&5
15760   cat conftest.$ac_ext >&5
15761   rm -rf conftest*
15762   eval "ac_cv_func__snprintf=no"
15763 fi
15764 rm -f conftest*
15765 fi
15766
15767 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15768   echo "$ac_t""yes" 1>&6
15769   ac_cv_func_snprintf=yes
15770         cat >> confdefs.h <<\EOF
15771 #define snprintf _snprintf
15772 EOF
15773
15774
15775 else
15776   echo "$ac_t""no" 1>&6
15777 fi
15778
15779
15780 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15781 echo "configure:15782: checking for _vsnprintf" >&5
15782 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15783   echo $ac_n "(cached) $ac_c" 1>&6
15784 else
15785   cat > conftest.$ac_ext <<EOF
15786 #line 15787 "configure"
15787 #include "confdefs.h"
15788 /* System header to define __stub macros and hopefully few prototypes,
15789     which can conflict with char _vsnprintf(); below.  */
15790 #include <assert.h>
15791 /* Override any gcc2 internal prototype to avoid an error.  */
15792 /* We use char because int might match the return type of a gcc2
15793     builtin and then its argument prototype would still apply.  */
15794 char _vsnprintf();
15795 char (*f)();
15796
15797 int main() {
15798
15799 /* The GNU C library defines this for functions which it implements
15800     to always fail with ENOSYS.  Some functions are actually named
15801     something starting with __ and the normal name is an alias.  */
15802 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15803 choke me
15804 #else
15805 f = _vsnprintf;
15806 #endif
15807
15808 ; return 0; }
15809 EOF
15810 if { (eval echo configure:15811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15811   rm -rf conftest*
15812   eval "ac_cv_func__vsnprintf=yes"
15813 else
15814   echo "configure: failed program was:" >&5
15815   cat conftest.$ac_ext >&5
15816   rm -rf conftest*
15817   eval "ac_cv_func__vsnprintf=no"
15818 fi
15819 rm -f conftest*
15820 fi
15821
15822 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15823   echo "$ac_t""yes" 1>&6
15824   ac_cv_func_vsnprintf=yes
15825         cat >> confdefs.h <<\EOF
15826 #define vsnprintf _vsnprintf
15827 EOF
15828
15829
15830 else
15831   echo "$ac_t""no" 1>&6
15832 fi
15833
15834
15835 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15836 echo "configure:15837: checking for vprintf" >&5
15837 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15838   echo $ac_n "(cached) $ac_c" 1>&6
15839 else
15840   cat > conftest.$ac_ext <<EOF
15841 #line 15842 "configure"
15842 #include "confdefs.h"
15843 /* System header to define __stub macros and hopefully few prototypes,
15844     which can conflict with char vprintf(); below.  */
15845 #include <assert.h>
15846 /* Override any gcc2 internal prototype to avoid an error.  */
15847 /* We use char because int might match the return type of a gcc2
15848     builtin and then its argument prototype would still apply.  */
15849 char vprintf();
15850 char (*f)();
15851
15852 int main() {
15853
15854 /* The GNU C library defines this for functions which it implements
15855     to always fail with ENOSYS.  Some functions are actually named
15856     something starting with __ and the normal name is an alias.  */
15857 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15858 choke me
15859 #else
15860 f = vprintf;
15861 #endif
15862
15863 ; return 0; }
15864 EOF
15865 if { (eval echo configure:15866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15866   rm -rf conftest*
15867   eval "ac_cv_func_vprintf=yes"
15868 else
15869   echo "configure: failed program was:" >&5
15870   cat conftest.$ac_ext >&5
15871   rm -rf conftest*
15872   eval "ac_cv_func_vprintf=no"
15873 fi
15874 rm -f conftest*
15875 fi
15876
15877 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15878   echo "$ac_t""yes" 1>&6
15879   cat >> confdefs.h <<\EOF
15880 #define HAVE_VPRINTF 1
15881 EOF
15882
15883 else
15884   echo "$ac_t""no" 1>&6
15885 fi
15886
15887 if test "$ac_cv_func_vprintf" != yes; then
15888 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15889 echo "configure:15890: checking for _doprnt" >&5
15890 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15891   echo $ac_n "(cached) $ac_c" 1>&6
15892 else
15893   cat > conftest.$ac_ext <<EOF
15894 #line 15895 "configure"
15895 #include "confdefs.h"
15896 /* System header to define __stub macros and hopefully few prototypes,
15897     which can conflict with char _doprnt(); below.  */
15898 #include <assert.h>
15899 /* Override any gcc2 internal prototype to avoid an error.  */
15900 /* We use char because int might match the return type of a gcc2
15901     builtin and then its argument prototype would still apply.  */
15902 char _doprnt();
15903 char (*f)();
15904
15905 int main() {
15906
15907 /* The GNU C library defines this for functions which it implements
15908     to always fail with ENOSYS.  Some functions are actually named
15909     something starting with __ and the normal name is an alias.  */
15910 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15911 choke me
15912 #else
15913 f = _doprnt;
15914 #endif
15915
15916 ; return 0; }
15917 EOF
15918 if { (eval echo configure:15919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15919   rm -rf conftest*
15920   eval "ac_cv_func__doprnt=yes"
15921 else
15922   echo "configure: failed program was:" >&5
15923   cat conftest.$ac_ext >&5
15924   rm -rf conftest*
15925   eval "ac_cv_func__doprnt=no"
15926 fi
15927 rm -f conftest*
15928 fi
15929
15930 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15931   echo "$ac_t""yes" 1>&6
15932   cat >> confdefs.h <<\EOF
15933 #define HAVE_DOPRNT 1
15934 EOF
15935
15936 else
15937   echo "$ac_t""no" 1>&6
15938 fi
15939
15940 fi
15941
15942
15943 if test $ac_cv_func_vprintf = yes ; then
15944                 for ac_func in vsnprintf vsprintf
15945 do
15946 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15947 echo "configure:15948: checking for $ac_func" >&5
15948 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15949   echo $ac_n "(cached) $ac_c" 1>&6
15950 else
15951   cat > conftest.$ac_ext <<EOF
15952 #line 15953 "configure"
15953 #include "confdefs.h"
15954 /* System header to define __stub macros and hopefully few prototypes,
15955     which can conflict with char $ac_func(); below.  */
15956 #include <assert.h>
15957 /* Override any gcc2 internal prototype to avoid an error.  */
15958 /* We use char because int might match the return type of a gcc2
15959     builtin and then its argument prototype would still apply.  */
15960 char $ac_func();
15961 char (*f)();
15962
15963 int main() {
15964
15965 /* The GNU C library defines this for functions which it implements
15966     to always fail with ENOSYS.  Some functions are actually named
15967     something starting with __ and the normal name is an alias.  */
15968 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15969 choke me
15970 #else
15971 f = $ac_func;
15972 #endif
15973
15974 ; return 0; }
15975 EOF
15976 if { (eval echo configure:15977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15977   rm -rf conftest*
15978   eval "ac_cv_func_$ac_func=yes"
15979 else
15980   echo "configure: failed program was:" >&5
15981   cat conftest.$ac_ext >&5
15982   rm -rf conftest*
15983   eval "ac_cv_func_$ac_func=no"
15984 fi
15985 rm -f conftest*
15986 fi
15987
15988 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15989   echo "$ac_t""yes" 1>&6
15990     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15991   cat >> confdefs.h <<EOF
15992 #define $ac_tr_func 1
15993 EOF
15994  
15995 else
15996   echo "$ac_t""no" 1>&6
15997 fi
15998 done
15999
16000 fi
16001
16002 for ac_func in \
16003         bcopy                   \
16004         closesocket             \
16005         chroot                  \
16006         endgrent                \
16007         endpwent                \
16008         flock                   \
16009         getdtablesize   \
16010         getgrgid                \
16011         gethostname             \
16012         getpass                 \
16013         getpassphrase   \
16014         getpwuid                \
16015         getpwnam                \
16016         getspnam                \
16017         gettimeofday    \
16018         initgroups              \
16019         lockf                   \
16020         memcpy                  \
16021         memmove                 \
16022         mkstemp                 \
16023         pipe                    \
16024         read                    \
16025         recv                    \
16026         recvfrom                \
16027         setpwfile               \
16028         setgid                  \
16029         setegid                 \
16030         setsid                  \
16031         setuid                  \
16032         seteuid                 \
16033         sigaction               \
16034         signal                  \
16035         sigset                  \
16036         snprintf                \
16037         strdup                  \
16038         strerror                \
16039         strpbrk                 \
16040         strrchr                 \
16041         strsep                  \
16042         strstr                  \
16043         strtol                  \
16044         strtoul                 \
16045         strspn                  \
16046         sysconf                 \
16047         waitpid                 \
16048         wait4                   \
16049         write                   \
16050         send                    \
16051         sendto                  \
16052
16053 do
16054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16055 echo "configure:16056: checking for $ac_func" >&5
16056 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16057   echo $ac_n "(cached) $ac_c" 1>&6
16058 else
16059   cat > conftest.$ac_ext <<EOF
16060 #line 16061 "configure"
16061 #include "confdefs.h"
16062 /* System header to define __stub macros and hopefully few prototypes,
16063     which can conflict with char $ac_func(); below.  */
16064 #include <assert.h>
16065 /* Override any gcc2 internal prototype to avoid an error.  */
16066 /* We use char because int might match the return type of a gcc2
16067     builtin and then its argument prototype would still apply.  */
16068 char $ac_func();
16069 char (*f)();
16070
16071 int main() {
16072
16073 /* The GNU C library defines this for functions which it implements
16074     to always fail with ENOSYS.  Some functions are actually named
16075     something starting with __ and the normal name is an alias.  */
16076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16077 choke me
16078 #else
16079 f = $ac_func;
16080 #endif
16081
16082 ; return 0; }
16083 EOF
16084 if { (eval echo configure:16085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16085   rm -rf conftest*
16086   eval "ac_cv_func_$ac_func=yes"
16087 else
16088   echo "configure: failed program was:" >&5
16089   cat conftest.$ac_ext >&5
16090   rm -rf conftest*
16091   eval "ac_cv_func_$ac_func=no"
16092 fi
16093 rm -f conftest*
16094 fi
16095
16096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16097   echo "$ac_t""yes" 1>&6
16098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16099   cat >> confdefs.h <<EOF
16100 #define $ac_tr_func 1
16101 EOF
16102  
16103 else
16104   echo "$ac_t""no" 1>&6
16105 fi
16106 done
16107
16108
16109 for ac_func in getopt tempnam
16110 do
16111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16112 echo "configure:16113: checking for $ac_func" >&5
16113 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16114   echo $ac_n "(cached) $ac_c" 1>&6
16115 else
16116   cat > conftest.$ac_ext <<EOF
16117 #line 16118 "configure"
16118 #include "confdefs.h"
16119 /* System header to define __stub macros and hopefully few prototypes,
16120     which can conflict with char $ac_func(); below.  */
16121 #include <assert.h>
16122 /* Override any gcc2 internal prototype to avoid an error.  */
16123 /* We use char because int might match the return type of a gcc2
16124     builtin and then its argument prototype would still apply.  */
16125 char $ac_func();
16126 char (*f)();
16127
16128 int main() {
16129
16130 /* The GNU C library defines this for functions which it implements
16131     to always fail with ENOSYS.  Some functions are actually named
16132     something starting with __ and the normal name is an alias.  */
16133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16134 choke me
16135 #else
16136 f = $ac_func;
16137 #endif
16138
16139 ; return 0; }
16140 EOF
16141 if { (eval echo configure:16142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16142   rm -rf conftest*
16143   eval "ac_cv_func_$ac_func=yes"
16144 else
16145   echo "configure: failed program was:" >&5
16146   cat conftest.$ac_ext >&5
16147   rm -rf conftest*
16148   eval "ac_cv_func_$ac_func=no"
16149 fi
16150 rm -f conftest*
16151 fi
16152
16153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16154   echo "$ac_t""yes" 1>&6
16155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16156   cat >> confdefs.h <<EOF
16157 #define $ac_tr_func 1
16158 EOF
16159  
16160 else
16161   echo "$ac_t""no" 1>&6
16162 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16163 fi
16164 done
16165
16166
16167
16168 if test "$ac_cv_func_getopt" != yes; then
16169     LIBSRCS="$LIBSRCS getopt.c"
16170 fi
16171
16172 if test "$ac_cv_func_tempnam" != yes; then
16173     LIBSRCS="$LIBSRCS tempnam.c"
16174 fi
16175
16176 # Check Configuration
16177 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
16178 echo "configure:16179: checking declaration of sys_errlist" >&5
16179 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
16180   echo $ac_n "(cached) $ac_c" 1>&6
16181 else
16182   
16183         cat > conftest.$ac_ext <<EOF
16184 #line 16185 "configure"
16185 #include "confdefs.h"
16186
16187 #include <stdio.h>
16188 #include <sys/types.h>
16189 #include <errno.h>
16190 #ifdef WINNT
16191 #include <stdlib.h>
16192 #endif 
16193 int main() {
16194 char *c = (char *) *sys_errlist
16195 ; return 0; }
16196 EOF
16197 if { (eval echo configure:16198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16198   rm -rf conftest*
16199   ol_cv_dcl_sys_errlist=yes
16200         ol_cv_have_sys_errlist=yes
16201 else
16202   echo "configure: failed program was:" >&5
16203   cat conftest.$ac_ext >&5
16204   rm -rf conftest*
16205   ol_cv_dcl_sys_errlist=no
16206 fi
16207 rm -f conftest*
16208 fi
16209
16210 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
16211 #
16212 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16213 if test $ol_cv_dcl_sys_errlist = no ; then
16214         cat >> confdefs.h <<\EOF
16215 #define DECL_SYS_ERRLIST 1
16216 EOF
16217
16218
16219         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
16220 echo "configure:16221: checking existence of sys_errlist" >&5
16221 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16222   echo $ac_n "(cached) $ac_c" 1>&6
16223 else
16224   
16225                 cat > conftest.$ac_ext <<EOF
16226 #line 16227 "configure"
16227 #include "confdefs.h"
16228 #include <errno.h>
16229 int main() {
16230 char *c = (char *) *sys_errlist
16231 ; return 0; }
16232 EOF
16233 if { (eval echo configure:16234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16234   rm -rf conftest*
16235   ol_cv_have_sys_errlist=yes
16236 else
16237   echo "configure: failed program was:" >&5
16238   cat conftest.$ac_ext >&5
16239   rm -rf conftest*
16240   ol_cv_have_sys_errlist=no
16241 fi
16242 rm -f conftest*
16243 fi
16244
16245 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16246 fi
16247 if test $ol_cv_have_sys_errlist = yes ; then
16248         cat >> confdefs.h <<\EOF
16249 #define HAVE_SYS_ERRLIST 1
16250 EOF
16251
16252 fi
16253
16254
16255
16256 if test "$ol_enable_debug" != no ; then
16257         cat >> confdefs.h <<\EOF
16258 #define LDAP_DEBUG 1
16259 EOF
16260
16261 fi
16262 if test "$ol_enable_syslog" = yes ; then
16263         cat >> confdefs.h <<\EOF
16264 #define LDAP_SYSLOG 1
16265 EOF
16266
16267 fi
16268 if test "$ol_enable_cache" = no ; then
16269         cat >> confdefs.h <<\EOF
16270 #define LDAP_NOCACHE 1
16271 EOF
16272
16273 fi
16274 if test "$ol_link_kbind" != no ; then
16275         cat >> confdefs.h <<\EOF
16276 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16277 EOF
16278
16279 fi
16280 if test "$ol_enable_proctitle" != no ; then
16281         cat >> confdefs.h <<\EOF
16282 #define LDAP_PROCTITLE 1
16283 EOF
16284
16285 fi
16286 if test "$ol_enable_referrals" != no ; then
16287         cat >> confdefs.h <<\EOF
16288 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16289 EOF
16290
16291 fi
16292 if test "$ol_enable_local" != no; then
16293         cat >> confdefs.h <<\EOF
16294 #define LDAP_PF_LOCAL 1
16295 EOF
16296
16297 fi
16298 if test "$ol_link_ipv6" != no; then
16299         cat >> confdefs.h <<\EOF
16300 #define LDAP_PF_INET6 1
16301 EOF
16302
16303 fi
16304 if test "$ol_enable_cleartext" != no ; then
16305         cat >> confdefs.h <<\EOF
16306 #define SLAPD_CLEARTEXT 1
16307 EOF
16308
16309 fi
16310 if test "$ol_enable_crypt" != no ; then
16311         cat >> confdefs.h <<\EOF
16312 #define SLAPD_CRYPT 1
16313 EOF
16314
16315 fi
16316 if test "$ol_link_kpasswd" != no ; then
16317         cat >> confdefs.h <<\EOF
16318 #define SLAPD_KPASSWD 1
16319 EOF
16320
16321 fi
16322 if test "$ol_link_spasswd" != no ; then
16323         cat >> confdefs.h <<\EOF
16324 #define SLAPD_SPASSWD 1
16325 EOF
16326
16327 fi
16328 if test "$ol_enable_phonetic" != no ; then
16329         cat >> confdefs.h <<\EOF
16330 #define SLAPD_PHONETIC 1
16331 EOF
16332
16333 fi
16334 if test "$ol_enable_rlookups" != no ; then
16335         cat >> confdefs.h <<\EOF
16336 #define SLAPD_RLOOKUPS 1
16337 EOF
16338
16339 fi
16340 if test "$ol_enable_aci" != no ; then
16341         cat >> confdefs.h <<\EOF
16342 #define SLAPD_ACI_ENABLED 1
16343 EOF
16344
16345 fi
16346
16347 if test "$ol_link_modules" != no ; then
16348         cat >> confdefs.h <<\EOF
16349 #define SLAPD_MODULES 1
16350 EOF
16351
16352         BUILD_SLAPD=yes
16353         SLAPD_MODULES_LDFLAGS="-dlopen self"
16354 fi
16355
16356 if test "$ol_enable_bdb" != no ; then
16357         cat >> confdefs.h <<\EOF
16358 #define SLAPD_BDB 1
16359 EOF
16360
16361         BUILD_SLAPD=yes
16362         BUILD_BDB=yes
16363         if test "$ol_with_bdb_module" != static ; then
16364                 cat >> confdefs.h <<\EOF
16365 #define SLAPD_BDB_DYNAMIC 1
16366 EOF
16367
16368                 BUILD_BDB=mod
16369                 BUILD_BDB_DYNAMIC=shared
16370                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16371         fi
16372 fi
16373
16374 if test "$ol_link_dnssrv" != no ; then
16375         cat >> confdefs.h <<\EOF
16376 #define SLAPD_DNSSRV 1
16377 EOF
16378
16379         BUILD_SLAPD=yes
16380         BUILD_DNSSRV=yes
16381         if test "$ol_with_dnssrv_module" != static ; then
16382                 cat >> confdefs.h <<\EOF
16383 #define SLAPD_DNSSRV_DYNAMIC 1
16384 EOF
16385
16386                 BUILD_DNSSRV=mod
16387                 BUILD_DNSSRV_DYNAMIC=shared
16388                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16389         fi
16390 fi
16391
16392 if test "$ol_enable_ldap" != no ; then
16393         cat >> confdefs.h <<\EOF
16394 #define SLAPD_LDAP 1
16395 EOF
16396
16397         BUILD_SLAPD=yes
16398         BUILD_LDAP=yes
16399         if test "$ol_with_ldap_module" != static ; then
16400                 cat >> confdefs.h <<\EOF
16401 #define SLAPD_LDAP_DYNAMIC 1
16402 EOF
16403
16404                 BUILD_LDAP=mod
16405                 BUILD_LDAP_DYNAMIC=shared
16406                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16407         fi
16408 fi
16409
16410 if test "$ol_link_ldbm" != no ; then
16411         cat >> confdefs.h <<\EOF
16412 #define SLAPD_LDBM 1
16413 EOF
16414
16415         BUILD_SLAPD=yes
16416         BUILD_LDBM=yes
16417         if test "$ol_with_ldbm_module" != static ; then
16418                 cat >> confdefs.h <<\EOF
16419 #define SLAPD_LDBM_DYNAMIC 1
16420 EOF
16421
16422                 BUILD_LDBM=mod
16423                 BUILD_LDBM_DYNAMIC=shared
16424                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16425         fi
16426 fi
16427
16428 if test "$ol_enable_passwd" != no ; then
16429         cat >> confdefs.h <<\EOF
16430 #define SLAPD_PASSWD 1
16431 EOF
16432
16433         BUILD_SLAPD=yes
16434         BUILD_PASSWD=yes
16435         if test "$ol_with_passwd_module" != static ; then
16436                 cat >> confdefs.h <<\EOF
16437 #define SLAPD_PASSWD_DYNAMIC 1
16438 EOF
16439
16440                 BUILD_PASSWD=mod
16441                 BUILD_PASSWD_DYNAMIC=shared
16442                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16443         fi
16444 fi
16445
16446 if test "$ol_link_perl" != no ; then
16447         cat >> confdefs.h <<\EOF
16448 #define SLAPD_PERL 1
16449 EOF
16450
16451         BUILD_SLAPD=yes
16452         BUILD_PERL=yes
16453         if test "$ol_with_perl_module" != static ; then
16454                 cat >> confdefs.h <<\EOF
16455 #define SLAPD_PERL_DYNAMIC 1
16456 EOF
16457
16458                 BUILD_PERL=mod
16459                 BUILD_PERL_DYNAMIC=shared
16460                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16461         fi
16462 fi
16463
16464 if test "$ol_enable_shell" != no ; then
16465         cat >> confdefs.h <<\EOF
16466 #define SLAPD_SHELL 1
16467 EOF
16468
16469         BUILD_SLAPD=yes
16470         BUILD_SHELL=yes
16471         if test "$ol_with_shell_module" != static ; then
16472                 cat >> confdefs.h <<\EOF
16473 #define SLAPD_SHELL_DYNAMIC 1
16474 EOF
16475
16476                 BUILD_SHELL=mod
16477                 BUILD_SHELL_DYNAMIC=shared
16478                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16479         fi
16480 fi
16481
16482 if test "$ol_enable_tcl" != no ; then
16483         cat >> confdefs.h <<\EOF
16484 #define SLAPD_TCL 1
16485 EOF
16486
16487         BUILD_SLAPD=yes
16488         BUILD_TCL=yes
16489         if test "$ol_with_tcl_module" != static; then
16490                 cat >> confdefs.h <<\EOF
16491 #define SLAPD_TCL_DYNAMIC 1
16492 EOF
16493
16494                 BUILD_TCL=mod
16495                 BUILD_TCL_DYNAMIC=shared
16496                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16497         fi
16498 fi
16499
16500 if test "$ol_link_sql" != no ; then
16501         cat >> confdefs.h <<\EOF
16502 #define SLAPD_SQL 1
16503 EOF
16504
16505         BUILD_SLAPD=yes
16506         BUILD_SQL=yes
16507         if test "$ol_with_sql_module" != static; then
16508                 cat >> confdefs.h <<\EOF
16509 #define SLAPD_SQL_DYNAMIC 1
16510 EOF
16511
16512                 BUILD_SQL=mod
16513                 BUILD_SQL_DYNAMIC=shared
16514                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16515         fi
16516 fi
16517
16518 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16519         $BUILD_SLAPD = yes ; then
16520         BUILD_SLURPD=yes
16521 fi
16522
16523
16524 if test "$LINK_BINS_DYNAMIC" = yes; then
16525     LIB_LINKAGE=DYN
16526     LT_LIB_LINKAGE=shared
16527 else
16528     LIB_LINKAGE=STAT
16529     LT_LIB_LINKAGE=static
16530 fi
16531
16532 if test "$ac_cv_mingw32" = yes ; then
16533     PLAT=NT
16534     DYN_EXT=dll
16535 else
16536     PLAT=UNIX
16537     DYN_EXT=so
16538 fi
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548   
16549   
16550   
16551   
16552   
16553   
16554   
16555   
16556   
16557   
16558   
16559   
16560   
16561   
16562   
16563   
16564   
16565   
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603 trap '' 1 2 15
16604
16605 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16606
16607 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16608 # Let make expand exec_prefix.
16609 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16610
16611 # Any assignment to VPATH causes Sun make to only execute
16612 # the first set of double-colon rules, so remove it if not needed.
16613 # If there is a colon in the path, we need to keep it.
16614 if test "x$srcdir" = x.; then
16615   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16616 fi
16617
16618 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16619
16620 DEFS=-DHAVE_CONFIG_H
16621
16622 # Without the "./", some shells look in PATH for config.status.
16623 : ${CONFIG_STATUS=./config.status}
16624
16625 echo creating $CONFIG_STATUS
16626 rm -f $CONFIG_STATUS
16627 cat > $CONFIG_STATUS <<EOF
16628 #! /bin/sh
16629 # Generated automatically by configure.
16630 # Run this file to recreate the current configuration.
16631 # This directory was configured as follows,
16632 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16633 #
16634 # $0 $ac_configure_args
16635 #
16636 # Compiler output produced by configure, useful for debugging
16637 # configure, is in ./config.log if it exists.
16638
16639 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16640 for ac_option
16641 do
16642   case "\$ac_option" in
16643   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16644     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16645     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16646   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16647     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16648     exit 0 ;;
16649   -help | --help | --hel | --he | --h)
16650     echo "\$ac_cs_usage"; exit 0 ;;
16651   *) echo "\$ac_cs_usage"; exit 1 ;;
16652   esac
16653 done
16654
16655 ac_given_srcdir=$srcdir
16656 ac_given_INSTALL="$INSTALL"
16657
16658 trap 'rm -fr `echo "\
16659 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16660 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16661 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16662 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16663 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16664 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16665 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16666 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16667 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16668 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16669 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16670 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16671 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16672 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16673 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16674 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16675 include/Makefile:build/top.mk:include/Makefile.in \
16676 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16677 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16678 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16679 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16680 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16681 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16682 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16683 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16684 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16685 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16686 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16687 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16688 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16689 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16690 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16691 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16692 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16693 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16694 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16695 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16696 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16697 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16698 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16699 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16700 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16701 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16702 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16703 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16704  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16705 EOF
16706 cat >> $CONFIG_STATUS <<EOF
16707
16708 # Protect against being on the right side of a sed subst in config.status.
16709 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16710  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16711 $ac_vpsub
16712 $extrasub
16713 s%@SHELL@%$SHELL%g
16714 s%@CFLAGS@%$CFLAGS%g
16715 s%@CPPFLAGS@%$CPPFLAGS%g
16716 s%@CXXFLAGS@%$CXXFLAGS%g
16717 s%@FFLAGS@%$FFLAGS%g
16718 s%@DEFS@%$DEFS%g
16719 s%@LDFLAGS@%$LDFLAGS%g
16720 s%@LIBS@%$LIBS%g
16721 s%@exec_prefix@%$exec_prefix%g
16722 s%@prefix@%$prefix%g
16723 s%@program_transform_name@%$program_transform_name%g
16724 s%@bindir@%$bindir%g
16725 s%@sbindir@%$sbindir%g
16726 s%@libexecdir@%$libexecdir%g
16727 s%@datadir@%$datadir%g
16728 s%@sysconfdir@%$sysconfdir%g
16729 s%@sharedstatedir@%$sharedstatedir%g
16730 s%@localstatedir@%$localstatedir%g
16731 s%@libdir@%$libdir%g
16732 s%@includedir@%$includedir%g
16733 s%@oldincludedir@%$oldincludedir%g
16734 s%@infodir@%$infodir%g
16735 s%@mandir@%$mandir%g
16736 s%@host@%$host%g
16737 s%@host_alias@%$host_alias%g
16738 s%@host_cpu@%$host_cpu%g
16739 s%@host_vendor@%$host_vendor%g
16740 s%@host_os@%$host_os%g
16741 s%@target@%$target%g
16742 s%@target_alias@%$target_alias%g
16743 s%@target_cpu@%$target_cpu%g
16744 s%@target_vendor@%$target_vendor%g
16745 s%@target_os@%$target_os%g
16746 s%@build@%$build%g
16747 s%@build_alias@%$build_alias%g
16748 s%@build_cpu@%$build_cpu%g
16749 s%@build_vendor@%$build_vendor%g
16750 s%@build_os@%$build_os%g
16751 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16752 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16753 s%@INSTALL_DATA@%$INSTALL_DATA%g
16754 s%@PACKAGE@%$PACKAGE%g
16755 s%@VERSION@%$VERSION%g
16756 s%@ACLOCAL@%$ACLOCAL%g
16757 s%@AUTOCONF@%$AUTOCONF%g
16758 s%@AUTOMAKE@%$AUTOMAKE%g
16759 s%@AUTOHEADER@%$AUTOHEADER%g
16760 s%@MAKEINFO@%$MAKEINFO%g
16761 s%@install_sh@%$install_sh%g
16762 s%@AMTAR@%$AMTAR%g
16763 s%@AWK@%$AWK%g
16764 s%@AMTARFLAGS@%$AMTARFLAGS%g
16765 s%@SET_MAKE@%$SET_MAKE%g
16766 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16767 s%@top_builddir@%$top_builddir%g
16768 s%@ldap_subdir@%$ldap_subdir%g
16769 s%@CC@%$CC%g
16770 s%@RANLIB@%$RANLIB%g
16771 s%@LN_S@%$LN_S%g
16772 s%@DLLTOOL@%$DLLTOOL%g
16773 s%@AS@%$AS%g
16774 s%@OBJDUMP@%$OBJDUMP%g
16775 s%@LIBTOOL@%$LIBTOOL%g
16776 s%@LN_H@%$LN_H%g
16777 s%@SENDMAIL@%$SENDMAIL%g
16778 s%@EDITOR@%$EDITOR%g
16779 s%@FINGER@%$FINGER%g
16780 s%@PERLBIN@%$PERLBIN%g
16781 s%@CPP@%$CPP%g
16782 s%@EXEEXT@%$EXEEXT%g
16783 s%@OBJEXT@%$OBJEXT%g
16784 s%@OL_MKDEP@%$OL_MKDEP%g
16785 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16786 s%@LIBOBJS@%$LIBOBJS%g
16787 s%@LIBSRCS@%$LIBSRCS%g
16788 s%@PLAT@%$PLAT%g
16789 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16790 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16791 s%@DYN_EXT@%$DYN_EXT%g
16792 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16793 s%@BUILD_BDB@%$BUILD_BDB%g
16794 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16795 s%@BUILD_LDAP@%$BUILD_LDAP%g
16796 s%@BUILD_LDBM@%$BUILD_LDBM%g
16797 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16798 s%@BUILD_PERL@%$BUILD_PERL%g
16799 s%@BUILD_SHELL@%$BUILD_SHELL%g
16800 s%@BUILD_SQL@%$BUILD_SQL%g
16801 s%@BUILD_TCL@%$BUILD_TCL%g
16802 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16803 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16804 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16805 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16806 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16807 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16808 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16809 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16810 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16811 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16812 s%@LDAP_LIBS@%$LDAP_LIBS%g
16813 s%@LDIF_LIBS@%$LDIF_LIBS%g
16814 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16815 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16816 s%@LDBM_LIBS@%$LDBM_LIBS%g
16817 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16818 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16819 s%@WRAP_LIBS@%$WRAP_LIBS%g
16820 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16821 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16822 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16823 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16824 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16825 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16826 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16827 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16828 s%@KRB4_LIBS@%$KRB4_LIBS%g
16829 s%@KRB5_LIBS@%$KRB5_LIBS%g
16830 s%@READLINE_LIBS@%$READLINE_LIBS%g
16831 s%@SASL_LIBS@%$SASL_LIBS%g
16832 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16833 s%@TLS_LIBS@%$TLS_LIBS%g
16834 s%@MODULES_LIBS@%$MODULES_LIBS%g
16835 s%@AUTH_LIBS@%$AUTH_LIBS%g
16836 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
16837 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16838 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16839 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16840
16841 CEOF
16842 EOF
16843
16844 cat >> $CONFIG_STATUS <<\EOF
16845
16846 # Split the substitutions into bite-sized pieces for seds with
16847 # small command number limits, like on Digital OSF/1 and HP-UX.
16848 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16849 ac_file=1 # Number of current file.
16850 ac_beg=1 # First line for current file.
16851 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16852 ac_more_lines=:
16853 ac_sed_cmds=""
16854 while $ac_more_lines; do
16855   if test $ac_beg -gt 1; then
16856     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16857   else
16858     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16859   fi
16860   if test ! -s conftest.s$ac_file; then
16861     ac_more_lines=false
16862     rm -f conftest.s$ac_file
16863   else
16864     if test -z "$ac_sed_cmds"; then
16865       ac_sed_cmds="sed -f conftest.s$ac_file"
16866     else
16867       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16868     fi
16869     ac_file=`expr $ac_file + 1`
16870     ac_beg=$ac_end
16871     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16872   fi
16873 done
16874 if test -z "$ac_sed_cmds"; then
16875   ac_sed_cmds=cat
16876 fi
16877 EOF
16878
16879 cat >> $CONFIG_STATUS <<EOF
16880
16881 CONFIG_FILES=\${CONFIG_FILES-"\
16882 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16883 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16884 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16885 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16886 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16887 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16888 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16889 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16890 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16891 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16892 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16893 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16894 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16895 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16896 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16897 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16898 include/Makefile:build/top.mk:include/Makefile.in \
16899 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16900 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16901 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16902 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16903 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16904 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16905 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16906 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16907 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16908 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16909 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16910 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16911 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16912 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16913 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16914 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16915 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16916 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16917 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16918 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16919 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16920 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16921 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16922 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16923 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16924 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16925 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16926 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16927 "}
16928 EOF
16929 cat >> $CONFIG_STATUS <<\EOF
16930 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16931   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16932   case "$ac_file" in
16933   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16934        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16935   *) ac_file_in="${ac_file}.in" ;;
16936   esac
16937
16938   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16939
16940   # Remove last slash and all that follows it.  Not all systems have dirname.
16941   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16942   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16943     # The file is in a subdirectory.
16944     test ! -d "$ac_dir" && mkdir "$ac_dir"
16945     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16946     # A "../" for each directory in $ac_dir_suffix.
16947     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16948   else
16949     ac_dir_suffix= ac_dots=
16950   fi
16951
16952   case "$ac_given_srcdir" in
16953   .)  srcdir=.
16954       if test -z "$ac_dots"; then top_srcdir=.
16955       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16956   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16957   *) # Relative path.
16958     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16959     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16960   esac
16961
16962   case "$ac_given_INSTALL" in
16963   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16964   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16965   esac
16966
16967   echo creating "$ac_file"
16968   rm -f "$ac_file"
16969   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16970   case "$ac_file" in
16971   *[Mm]akefile*) ac_comsub="1i\\
16972 # $configure_input" ;;
16973   *) ac_comsub= ;;
16974   esac
16975
16976   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16977   sed -e "$ac_comsub
16978 s%@configure_input@%$configure_input%g
16979 s%@srcdir@%$srcdir%g
16980 s%@top_srcdir@%$top_srcdir%g
16981 s%@INSTALL@%$INSTALL%g
16982 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16983 fi; done
16984 rm -f conftest.s*
16985
16986 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16987 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16988 #
16989 # ac_d sets the value in "#define NAME VALUE" lines.
16990 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16991 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16992 ac_dC='\3'
16993 ac_dD='%g'
16994 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16995 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16996 ac_uB='\([      ]\)%\1#\2define\3'
16997 ac_uC=' '
16998 ac_uD='\4%g'
16999 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17000 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17001 ac_eB='$%\1#\2define\3'
17002 ac_eC=' '
17003 ac_eD='%g'
17004
17005 if test "${CONFIG_HEADERS+set}" != set; then
17006 EOF
17007 cat >> $CONFIG_STATUS <<EOF
17008   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
17009 EOF
17010 cat >> $CONFIG_STATUS <<\EOF
17011 fi
17012 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17013   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17014   case "$ac_file" in
17015   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17016        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17017   *) ac_file_in="${ac_file}.in" ;;
17018   esac
17019
17020   echo creating $ac_file
17021
17022   rm -f conftest.frag conftest.in conftest.out
17023   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17024   cat $ac_file_inputs > conftest.in
17025
17026 EOF
17027
17028 # Transform confdefs.h into a sed script conftest.vals that substitutes
17029 # the proper values into config.h.in to produce config.h.  And first:
17030 # Protect against being on the right side of a sed subst in config.status.
17031 # Protect against being in an unquoted here document in config.status.
17032 rm -f conftest.vals
17033 cat > conftest.hdr <<\EOF
17034 s/[\\&%]/\\&/g
17035 s%[\\$`]%\\&%g
17036 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17037 s%ac_d%ac_u%gp
17038 s%ac_u%ac_e%gp
17039 EOF
17040 sed -n -f conftest.hdr confdefs.h > conftest.vals
17041 rm -f conftest.hdr
17042
17043 # This sed command replaces #undef with comments.  This is necessary, for
17044 # example, in the case of _POSIX_SOURCE, which is predefined and required
17045 # on some systems where configure will not decide to define it.
17046 cat >> conftest.vals <<\EOF
17047 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17048 EOF
17049
17050 # Break up conftest.vals because some shells have a limit on
17051 # the size of here documents, and old seds have small limits too.
17052
17053 rm -f conftest.tail
17054 while :
17055 do
17056   ac_lines=`grep -c . conftest.vals`
17057   # grep -c gives empty output for an empty file on some AIX systems.
17058   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17059   # Write a limited-size here document to conftest.frag.
17060   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17061   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17062   echo 'CEOF
17063   sed -f conftest.frag conftest.in > conftest.out
17064   rm -f conftest.in
17065   mv conftest.out conftest.in
17066 ' >> $CONFIG_STATUS
17067   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17068   rm -f conftest.vals
17069   mv conftest.tail conftest.vals
17070 done
17071 rm -f conftest.vals
17072
17073 cat >> $CONFIG_STATUS <<\EOF
17074   rm -f conftest.frag conftest.h
17075   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17076   cat conftest.in >> conftest.h
17077   rm -f conftest.in
17078   if cmp -s $ac_file conftest.h 2>/dev/null; then
17079     echo "$ac_file is unchanged"
17080     rm -f conftest.h
17081   else
17082     # Remove last slash and all that follows it.  Not all systems have dirname.
17083       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17084       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17085       # The file is in a subdirectory.
17086       test ! -d "$ac_dir" && mkdir "$ac_dir"
17087     fi
17088     rm -f $ac_file
17089     mv conftest.h $ac_file
17090   fi
17091 fi; done
17092
17093 EOF
17094 cat >> $CONFIG_STATUS <<EOF
17095
17096 EOF
17097 cat >> $CONFIG_STATUS <<\EOF
17098
17099 date > stamp-h
17100 echo Please \"make depend\" to build dependencies
17101
17102 exit 0
17103 EOF
17104 chmod +x $CONFIG_STATUS
17105 rm -fr confdefs* $ac_clean_files
17106 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
17107